summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2019-01-25 16:25:39 +0100
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2019-01-29 15:43:13 +0000
commit2b94bfe47ccb6c08047959d1c26e392919550e86 (patch)
tree4a9cb6fb333ac7e0e5bfbdd3a8faa219880e193d
parent51f6c2793adab2d864b3d2b360000ef8db1d3e92 (diff)
downloadqtwebengine-chromium-2b94bfe47ccb6c08047959d1c26e392919550e86.tar.gz
BASELINE: Update Chromium to 71.0.3578.140
Change-Id: Ia85516cc06e245e449ca8a6652242b8a1bcace74 Reviewed-by: Michal Klocek <michal.klocek@qt.io>
-rw-r--r--chromium/DEPS24
-rw-r--r--chromium/build/util/LASTCHANGE2
-rw-r--r--chromium/build/util/LASTCHANGE.committime2
-rw-r--r--chromium/chrome/VERSION2
-rw-r--r--chromium/chrome/browser/extensions/api/tab_capture/tab_capture_api.cc4
-rw-r--r--chromium/components/variations/service/variations_service.cc8
-rw-r--r--chromium/content/browser/service_worker/service_worker_database.cc35
-rw-r--r--chromium/content/browser/service_worker/service_worker_database_unittest.cc61
-rw-r--r--chromium/gpu/config/gpu_lists_version.h2
-rw-r--r--chromium/net/http/http_proxy_client_socket_pool_unittest.cc61
-rw-r--r--chromium/net/http/http_proxy_client_socket_wrapper.cc25
-rw-r--r--chromium/third_party/blink/renderer/bindings/core/v8/js_based_event_listener.cc2
-rw-r--r--chromium/third_party/blink/renderer/bindings/core/v8/js_event_handler.cc3
-rw-r--r--chromium/third_party/catapult/telemetry/telemetry.isolate19
-rw-r--r--chromium/third_party/ffmpeg/libavformat/mov.c12
-rw-r--r--chromium/third_party/glslang/src/.appveyor.yml40
-rw-r--r--chromium/third_party/glslang/src/.clang-format12
-rw-r--r--chromium/third_party/glslang/src/.travis.yml60
-rw-r--r--chromium/third_party/glslang/src/CMakeLists.txt46
-rw-r--r--chromium/third_party/glslang/src/ChooseMSVCCRT.cmake105
-rw-r--r--chromium/third_party/glslang/src/External/CMakeLists.txt34
-rw-r--r--chromium/third_party/glslang/src/OGLCompilersDLL/CMakeLists.txt11
-rw-r--r--chromium/third_party/glslang/src/OGLCompilersDLL/InitializeDll.cpp155
-rw-r--r--chromium/third_party/glslang/src/OGLCompilersDLL/InitializeDll.h50
-rw-r--r--chromium/third_party/glslang/src/README-spirv-remap.txt137
-rw-r--r--chromium/third_party/glslang/src/README.md297
-rwxr-xr-xchromium/third_party/glslang/src/SPIRV/CMakeLists.txt29
-rwxr-xr-xchromium/third_party/glslang/src/SPIRV/GLSL.std.450.h131
-rwxr-xr-xchromium/third_party/glslang/src/SPIRV/GlslangToSpv.cpp4389
-rw-r--r--chromium/third_party/glslang/src/SPIRV/GlslangToSpv.h49
-rw-r--r--chromium/third_party/glslang/src/SPIRV/InReadableOrder.cpp113
-rw-r--r--chromium/third_party/glslang/src/SPIRV/Logger.cpp68
-rw-r--r--chromium/third_party/glslang/src/SPIRV/Logger.h74
-rwxr-xr-xchromium/third_party/glslang/src/SPIRV/SPVRemapper.cpp1241
-rwxr-xr-xchromium/third_party/glslang/src/SPIRV/SPVRemapper.h288
-rw-r--r--chromium/third_party/glslang/src/SPIRV/SpvBuilder.cpp2491
-rwxr-xr-xchromium/third_party/glslang/src/SPIRV/SpvBuilder.h588
-rw-r--r--chromium/third_party/glslang/src/SPIRV/disassemble.cpp573
-rwxr-xr-xchromium/third_party/glslang/src/SPIRV/disassemble.h52
-rwxr-xr-xchromium/third_party/glslang/src/SPIRV/doc.cpp2708
-rw-r--r--chromium/third_party/glslang/src/SPIRV/doc.h260
-rwxr-xr-xchromium/third_party/glslang/src/SPIRV/spirv.hpp880
-rwxr-xr-xchromium/third_party/glslang/src/SPIRV/spvIR.h404
-rw-r--r--chromium/third_party/glslang/src/StandAlone/CMakeLists.txt48
-rw-r--r--chromium/third_party/glslang/src/StandAlone/ResourceLimits.cpp444
-rw-r--r--chromium/third_party/glslang/src/StandAlone/ResourceLimits.h57
-rw-r--r--chromium/third_party/glslang/src/StandAlone/StandAlone.cpp891
-rw-r--r--chromium/third_party/glslang/src/StandAlone/Worklist.h98
-rw-r--r--chromium/third_party/glslang/src/StandAlone/spirv-remap.cpp344
-rw-r--r--chromium/third_party/glslang/src/Test/100.conf28
-rw-r--r--chromium/third_party/glslang/src/Test/100.frag221
-rw-r--r--chromium/third_party/glslang/src/Test/100Limits.vert76
-rw-r--r--chromium/third_party/glslang/src/Test/100scope.vert76
-rw-r--r--chromium/third_party/glslang/src/Test/110scope.vert74
-rw-r--r--chromium/third_party/glslang/src/Test/120.frag238
-rw-r--r--chromium/third_party/glslang/src/Test/120.vert201
-rw-r--r--chromium/third_party/glslang/src/Test/130.frag169
-rw-r--r--chromium/third_party/glslang/src/Test/130.vert78
-rw-r--r--chromium/third_party/glslang/src/Test/140.frag53
-rw-r--r--chromium/third_party/glslang/src/Test/140.vert59
-rw-r--r--chromium/third_party/glslang/src/Test/150.frag50
-rw-r--r--chromium/third_party/glslang/src/Test/150.geom139
-rw-r--r--chromium/third_party/glslang/src/Test/150.tesc34
-rw-r--r--chromium/third_party/glslang/src/Test/150.tese35
-rw-r--r--chromium/third_party/glslang/src/Test/150.vert25
-rw-r--r--chromium/third_party/glslang/src/Test/300.frag161
-rw-r--r--chromium/third_party/glslang/src/Test/300.vert187
-rw-r--r--chromium/third_party/glslang/src/Test/300BuiltIns.frag76
-rw-r--r--chromium/third_party/glslang/src/Test/300block.frag58
-rw-r--r--chromium/third_party/glslang/src/Test/300layout.frag19
-rw-r--r--chromium/third_party/glslang/src/Test/300layout.vert57
-rw-r--r--chromium/third_party/glslang/src/Test/300link.frag8
-rw-r--r--chromium/third_party/glslang/src/Test/300link2.frag11
-rw-r--r--chromium/third_party/glslang/src/Test/300link3.frag7
-rw-r--r--chromium/third_party/glslang/src/Test/300operations.frag135
-rw-r--r--chromium/third_party/glslang/src/Test/300scope.vert74
-rw-r--r--chromium/third_party/glslang/src/Test/310.comp240
-rw-r--r--chromium/third_party/glslang/src/Test/310.frag431
-rw-r--r--chromium/third_party/glslang/src/Test/310.geom152
-rw-r--r--chromium/third_party/glslang/src/Test/310.tesc169
-rw-r--r--chromium/third_party/glslang/src/Test/310.tese128
-rw-r--r--chromium/third_party/glslang/src/Test/310.vert403
-rw-r--r--chromium/third_party/glslang/src/Test/310AofA.vert115
-rw-r--r--chromium/third_party/glslang/src/Test/310implicitSizeArrayError.vert8
-rw-r--r--chromium/third_party/glslang/src/Test/330.frag152
-rw-r--r--chromium/third_party/glslang/src/Test/330comp.frag12
-rw-r--r--chromium/third_party/glslang/src/Test/400.frag197
-rw-r--r--chromium/third_party/glslang/src/Test/400.geom330
-rw-r--r--chromium/third_party/glslang/src/Test/400.tesc105
-rw-r--r--chromium/third_party/glslang/src/Test/400.tese105
-rw-r--r--chromium/third_party/glslang/src/Test/400.vert9
-rw-r--r--chromium/third_party/glslang/src/Test/410.geom39
-rw-r--r--chromium/third_party/glslang/src/Test/410.tesc11
-rw-r--r--chromium/third_party/glslang/src/Test/410.vert9
-rwxr-xr-xchromium/third_party/glslang/src/Test/420.comp30
-rw-r--r--chromium/third_party/glslang/src/Test/420.frag12
-rw-r--r--chromium/third_party/glslang/src/Test/420.geom55
-rw-r--r--chromium/third_party/glslang/src/Test/420.tesc43
-rw-r--r--chromium/third_party/glslang/src/Test/420.tese78
-rw-r--r--chromium/third_party/glslang/src/Test/420.vert159
-rw-r--r--chromium/third_party/glslang/src/Test/420_size_gl_in.geom21
-rw-r--r--chromium/third_party/glslang/src/Test/430.comp87
-rw-r--r--chromium/third_party/glslang/src/Test/430.vert223
-rw-r--r--chromium/third_party/glslang/src/Test/430AofA.frag108
-rw-r--r--chromium/third_party/glslang/src/Test/430scope.vert74
-rw-r--r--chromium/third_party/glslang/src/Test/440.frag153
-rw-r--r--chromium/third_party/glslang/src/Test/440.vert177
-rw-r--r--chromium/third_party/glslang/src/Test/450.comp1
-rw-r--r--chromium/third_party/glslang/src/Test/450.frag56
-rw-r--r--chromium/third_party/glslang/src/Test/450.geom14
-rw-r--r--chromium/third_party/glslang/src/Test/450.tesc14
-rw-r--r--chromium/third_party/glslang/src/Test/450.tese14
-rw-r--r--chromium/third_party/glslang/src/Test/450.vert23
-rw-r--r--chromium/third_party/glslang/src/Test/Operations.frag166
-rw-r--r--chromium/third_party/glslang/src/Test/aggOps.frag51
-rw-r--r--chromium/third_party/glslang/src/Test/always-discard.frag36
-rw-r--r--chromium/third_party/glslang/src/Test/always-discard2.frag19
-rw-r--r--chromium/third_party/glslang/src/Test/array.frag106
-rw-r--r--chromium/third_party/glslang/src/Test/array100.frag70
-rw-r--r--chromium/third_party/glslang/src/Test/atomic_uint.frag48
-rw-r--r--chromium/third_party/glslang/src/Test/badChars.frag6
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/100.frag.out734
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/100Limits.vert.out889
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/100LimitsConf.vert.out28
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/100scope.vert.out240
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/110scope.vert.out256
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/120.frag.out1193
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/120.vert.out783
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/130.frag.out782
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/130.vert.out303
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/140.frag.out223
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/140.vert.out270
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/150.frag.out244
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/150.geom.out317
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/150.tesc.out1659
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/150.vert.out95
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/300.frag.out756
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/300.vert.out612
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/300BuiltIns.frag.out418
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/300block.frag.out153
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/300layout.frag.out69
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/300layout.vert.out147
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/300link.frag.out22
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/300link2.frag.out25
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/300link3.frag.out19
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/300operations.frag.out420
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/300scope.vert.out239
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/310.comp.out934
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/310.frag.out1892
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/310.geom.out346
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/310.tesc.out709
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/310.tese.out315
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/310.vert.out1960
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/310AofA.vert.out647
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/310implicitSizeArrayError.vert.out50
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/330.frag.out217
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/330comp.frag.out48
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/400.frag.out998
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/400.geom.out2067
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/400.tesc.out414
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/400.tese.out281
-rwxr-xr-xchromium/third_party/glslang/src/Test/baseResults/400.vert.out34
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/410.geom.out112
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/410.tesc.out31
-rwxr-xr-xchromium/third_party/glslang/src/Test/baseResults/410.vert.out29
-rwxr-xr-xchromium/third_party/glslang/src/Test/baseResults/420.comp.out122
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/420.frag.out42
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/420.geom.out258
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/420.tesc.out230
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/420.tese.out313
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/420.vert.out556
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/420_size_gl_in.geom.out77
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/430.comp.out281
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/430.vert.out469
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/430AofA.frag.out803
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/430scope.vert.out243
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/440.frag.out194
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/440.vert.out241
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/450.comp.out18
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/450.frag.out327
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/450.geom.out72
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/450.tesc.out68
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/450.tese.out68
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/450.vert.out69
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/Operations.frag.out1151
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/aggOps.frag.out298
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/always-discard.frag.out239
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/always-discard2.frag.out121
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/array.frag.out530
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/array100.frag.out296
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/atomic_uint.frag.out145
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/badChars.frag.out26
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/comment.frag.out23
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/conditionalDiscard.frag.out63
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/constErrors.frag.out54
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/constFold.frag.out747
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/conversion.frag.out955
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/cppComplexExpr.vert.out200
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/cppIndent.vert.out84
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/cppNest.vert.out154
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/cppSimple.vert.out317
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/dataOut.frag.out35
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/dataOutIndirect.frag.out35
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/dce.frag.out276
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/decls.frag.out515
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/deepRvalue.frag.out285
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/depthOut.frag.out38
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/discard-dce.frag.out239
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/doWhileLoop.frag.out65
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/earlyReturnDiscard.frag.out257
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/empty.frag.out17
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/errors.frag.out32
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/es-link1.frag.out27
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/flowControl.frag.out81
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/forLoop.frag.out361
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/forwardRef.frag.out125
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/functionCall.frag.out183
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/functionSemantics.frag.out401
-rwxr-xr-xchromium/third_party/glslang/src/Test/baseResults/hlsl.assoc.frag.out113
-rwxr-xr-xchromium/third_party/glslang/src/Test/baseResults/hlsl.attribute.frag.out57
-rwxr-xr-xchromium/third_party/glslang/src/Test/baseResults/hlsl.cast.frag.out86
-rwxr-xr-xchromium/third_party/glslang/src/Test/baseResults/hlsl.doLoop.frag.out116
-rwxr-xr-xchromium/third_party/glslang/src/Test/baseResults/hlsl.float1.frag.out100
-rwxr-xr-xchromium/third_party/glslang/src/Test/baseResults/hlsl.float4.frag.out99
-rwxr-xr-xchromium/third_party/glslang/src/Test/baseResults/hlsl.forLoop.frag.out220
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/hlsl.frag.out160
-rwxr-xr-xchromium/third_party/glslang/src/Test/baseResults/hlsl.if.frag.out223
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/hlsl.intrinsics.frag.out3290
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/hlsl.intrinsics.negative.frag.out702
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/hlsl.intrinsics.negative.vert.out1055
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/hlsl.intrinsics.vert.out2868
-rwxr-xr-xchromium/third_party/glslang/src/Test/baseResults/hlsl.matType.frag.out101
-rwxr-xr-xchromium/third_party/glslang/src/Test/baseResults/hlsl.max.frag.out60
-rwxr-xr-xchromium/third_party/glslang/src/Test/baseResults/hlsl.precedence.frag.out80
-rwxr-xr-xchromium/third_party/glslang/src/Test/baseResults/hlsl.precedence2.frag.out103
-rwxr-xr-xchromium/third_party/glslang/src/Test/baseResults/hlsl.scope.frag.out150
-rwxr-xr-xchromium/third_party/glslang/src/Test/baseResults/hlsl.sin.frag.out53
-rwxr-xr-xchromium/third_party/glslang/src/Test/baseResults/hlsl.struct.frag.out107
-rwxr-xr-xchromium/third_party/glslang/src/Test/baseResults/hlsl.void.frag.out64
-rwxr-xr-xchromium/third_party/glslang/src/Test/baseResults/hlsl.whileLoop.frag.out145
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/length.frag.out61
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/lineContinuation.vert.out309
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/lineContinuation100.vert.out137
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/link1.frag.out162
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/localAggregates.frag.out414
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/loops.frag.out1935
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/loopsArtificial.frag.out433
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/mains1.frag.out72
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/matrix.frag.out507
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/matrix2.frag.out347
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/matrixError.vert.out71
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/max_vertices_0.geom.out35
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/negativeArraySize.comp.out24
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/newTexture.frag.out523
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/noMain.vert.out45
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/nonSquare.vert.out183
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/nonVulkan.frag.out30
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/numeral.frag.out829
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/pointCoord.frag.out69
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/precise.tesc.out768
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/precise_struct_block.vert.out1045
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/precision.frag.out245
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/precision.vert.out99
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/prepost.frag.out271
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/preprocessor.cpp_style___FILE__.vert.err0
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/preprocessor.cpp_style___FILE__.vert.out37
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/preprocessor.cpp_style_line_directive.vert.err15
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/preprocessor.cpp_style_line_directive.vert.out0
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/preprocessor.defined.vert.err4
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/preprocessor.defined.vert.out0
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/preprocessor.edge_cases.vert.err2
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/preprocessor.edge_cases.vert.out16
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/preprocessor.eof_missing.vert.err0
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/preprocessor.eof_missing.vert.out2
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/preprocessor.errors.vert.err8
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/preprocessor.errors.vert.out0
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/preprocessor.extensions.vert.err3
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/preprocessor.extensions.vert.out12
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/preprocessor.function_macro.vert.err2
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/preprocessor.function_macro.vert.out21
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/preprocessor.include.disabled.vert.err13
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/preprocessor.include.disabled.vert.out0
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/preprocessor.include.enabled.vert.err8
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/preprocessor.include.enabled.vert.out0
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/preprocessor.line.frag.err2
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/preprocessor.line.frag.out5
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/preprocessor.line.vert.err0
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/preprocessor.line.vert.out39
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/preprocessor.many.endif.vert.err12
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/preprocessor.many.endif.vert.out0
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/preprocessor.pragma.vert.err2
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/preprocessor.pragma.vert.out12
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/preprocessor.simple.vert.err2
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/preprocessor.simple.vert.out23
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/preprocessor.success_if_parse_would_fail.vert.err0
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/preprocessor.success_if_parse_would_fail.vert.out4
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/recurse1.vert.out397
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/reflection.vert.out104
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/sample.frag.out33
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/sample.vert.out43
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/simpleFunctionCall.frag.out43
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/specExamples.frag.out617
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/specExamples.vert.out602
-rwxr-xr-xchromium/third_party/glslang/src/Test/baseResults/spv.100ops.frag.out104
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/spv.130.frag.out313
-rwxr-xr-xchromium/third_party/glslang/src/Test/baseResults/spv.140.frag.out181
-rwxr-xr-xchromium/third_party/glslang/src/Test/baseResults/spv.150.geom.out149
-rwxr-xr-xchromium/third_party/glslang/src/Test/baseResults/spv.150.vert.out107
-rwxr-xr-xchromium/third_party/glslang/src/Test/baseResults/spv.300BuiltIns.vert.out79
-rwxr-xr-xchromium/third_party/glslang/src/Test/baseResults/spv.300layout.frag.out79
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/spv.300layout.vert.out254
-rwxr-xr-xchromium/third_party/glslang/src/Test/baseResults/spv.300layoutp.vert.out206
-rwxr-xr-xchromium/third_party/glslang/src/Test/baseResults/spv.310.comp.out127
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/spv.330.geom.out71
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/spv.400.frag.out1385
-rwxr-xr-xchromium/third_party/glslang/src/Test/baseResults/spv.400.tesc.out179
-rwxr-xr-xchromium/third_party/glslang/src/Test/baseResults/spv.400.tese.out189
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/spv.420.geom.out132
-rwxr-xr-xchromium/third_party/glslang/src/Test/baseResults/spv.430.vert.out143
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/spv.AofA.frag.out156
-rwxr-xr-xchromium/third_party/glslang/src/Test/baseResults/spv.Operations.frag.out674
-rwxr-xr-xchromium/third_party/glslang/src/Test/baseResults/spv.accessChain.frag.out323
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/spv.aggOps.frag.out310
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/spv.always-discard.frag.out113
-rwxr-xr-xchromium/third_party/glslang/src/Test/baseResults/spv.always-discard2.frag.out66
-rwxr-xr-xchromium/third_party/glslang/src/Test/baseResults/spv.atomic.comp.out205
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/spv.bitCast.frag.out240
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/spv.bool.vert.out94
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/spv.boolInBlock.frag.out169
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/spv.branch-return.vert.out71
-rwxr-xr-xchromium/third_party/glslang/src/Test/baseResults/spv.conditionalDiscard.frag.out63
-rwxr-xr-xchromium/third_party/glslang/src/Test/baseResults/spv.conversion.frag.out577
-rwxr-xr-xchromium/third_party/glslang/src/Test/baseResults/spv.dataOut.frag.out39
-rwxr-xr-xchromium/third_party/glslang/src/Test/baseResults/spv.dataOutIndirect.frag.out51
-rwxr-xr-xchromium/third_party/glslang/src/Test/baseResults/spv.dataOutIndirect.vert.out70
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/spv.deepRvalue.frag.out209
-rwxr-xr-xchromium/third_party/glslang/src/Test/baseResults/spv.depthOut.frag.out40
-rwxr-xr-xchromium/third_party/glslang/src/Test/baseResults/spv.discard-dce.frag.out130
-rwxr-xr-xchromium/third_party/glslang/src/Test/baseResults/spv.do-simple.vert.out46
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/spv.do-while-continue-break.vert.out84
-rwxr-xr-xchromium/third_party/glslang/src/Test/baseResults/spv.doWhileLoop.frag.out63
-rwxr-xr-xchromium/third_party/glslang/src/Test/baseResults/spv.double.comp.out104
-rwxr-xr-xchromium/third_party/glslang/src/Test/baseResults/spv.earlyReturnDiscard.frag.out173
-rwxr-xr-xchromium/third_party/glslang/src/Test/baseResults/spv.flowControl.frag.out73
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/spv.for-complex-condition.vert.out72
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/spv.for-continue-break.vert.out87
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/spv.for-nobody.vert.out54
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/spv.for-notest.vert.out48
-rwxr-xr-xchromium/third_party/glslang/src/Test/baseResults/spv.for-simple.vert.out52
-rwxr-xr-xchromium/third_party/glslang/src/Test/baseResults/spv.forLoop.frag.out215
-rwxr-xr-xchromium/third_party/glslang/src/Test/baseResults/spv.forwardFun.frag.out97
-rwxr-xr-xchromium/third_party/glslang/src/Test/baseResults/spv.functionCall.frag.out127
-rwxr-xr-xchromium/third_party/glslang/src/Test/baseResults/spv.functionSemantics.frag.out232
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/spv.image.frag.out523
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/spv.int64.frag.out626
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/spv.intOps.vert.out361
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/spv.interpOps.frag.out143
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/spv.layoutNested.vert.out242
-rwxr-xr-xchromium/third_party/glslang/src/Test/baseResults/spv.length.frag.out55
-rwxr-xr-xchromium/third_party/glslang/src/Test/baseResults/spv.localAggregates.frag.out256
-rwxr-xr-xchromium/third_party/glslang/src/Test/baseResults/spv.loops.frag.out1108
-rwxr-xr-xchromium/third_party/glslang/src/Test/baseResults/spv.loopsArtificial.frag.out243
-rwxr-xr-xchromium/third_party/glslang/src/Test/baseResults/spv.matFun.vert.out161
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/spv.matrix.frag.out313
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/spv.matrix2.frag.out273
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/spv.memoryQualifier.frag.out181
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/spv.merge-unreachable.frag.out47
-rwxr-xr-xchromium/third_party/glslang/src/Test/baseResults/spv.newTexture.frag.out385
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/spv.noDeadDecorations.vert.out64
-rwxr-xr-xchromium/third_party/glslang/src/Test/baseResults/spv.nonSquare.vert.out116
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/spv.precise.tesc.out122
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/spv.precise.tese.out191
-rwxr-xr-xchromium/third_party/glslang/src/Test/baseResults/spv.precision.frag.out234
-rwxr-xr-xchromium/third_party/glslang/src/Test/baseResults/spv.prepost.frag.out147
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/spv.pushConstant.vert.out67
-rwxr-xr-xchromium/third_party/glslang/src/Test/baseResults/spv.qualifiers.vert.out54
-rwxr-xr-xchromium/third_party/glslang/src/Test/baseResults/spv.queryL.frag.out331
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/spv.separate.frag.out427
-rwxr-xr-xchromium/third_party/glslang/src/Test/baseResults/spv.set.vert.out51
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/spv.shaderBallot.comp.out314
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/spv.shaderGroupVote.comp.out71
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/spv.shiftOps.frag.out70
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/spv.shortCircuit.frag.out241
-rwxr-xr-xchromium/third_party/glslang/src/Test/baseResults/spv.simpleFunctionCall.frag.out39
-rwxr-xr-xchromium/third_party/glslang/src/Test/baseResults/spv.simpleMat.vert.out64
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/spv.sparseTexture.frag.out593
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/spv.sparseTextureClamp.frag.out471
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/spv.specConstant.comp.out55
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/spv.specConstant.vert.out137
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/spv.specConstantComposite.vert.out89
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/spv.specConstantOperations.vert.out164
-rwxr-xr-xchromium/third_party/glslang/src/Test/baseResults/spv.structAssignment.frag.out93
-rwxr-xr-xchromium/third_party/glslang/src/Test/baseResults/spv.structDeref.frag.out191
-rwxr-xr-xchromium/third_party/glslang/src/Test/baseResults/spv.structure.frag.out99
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/spv.subpass.frag.out118
-rwxr-xr-xchromium/third_party/glslang/src/Test/baseResults/spv.switch.frag.out532
-rwxr-xr-xchromium/third_party/glslang/src/Test/baseResults/spv.swizzle.frag.out170
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/spv.test.frag.out90
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/spv.test.vert.out49
-rwxr-xr-xchromium/third_party/glslang/src/Test/baseResults/spv.texture.frag.out385
-rwxr-xr-xchromium/third_party/glslang/src/Test/baseResults/spv.texture.vert.out197
-rwxr-xr-xchromium/third_party/glslang/src/Test/baseResults/spv.types.frag.out340
-rwxr-xr-xchromium/third_party/glslang/src/Test/baseResults/spv.uint.frag.out438
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/spv.uniformArray.frag.out80
-rwxr-xr-xchromium/third_party/glslang/src/Test/baseResults/spv.variableArrayIndex.frag.out172
-rwxr-xr-xchromium/third_party/glslang/src/Test/baseResults/spv.varyingArray.frag.out89
-rwxr-xr-xchromium/third_party/glslang/src/Test/baseResults/spv.varyingArrayIndirect.frag.out102
-rwxr-xr-xchromium/third_party/glslang/src/Test/baseResults/spv.voidFunction.frag.out77
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/spv.while-continue-break.vert.out79
-rwxr-xr-xchromium/third_party/glslang/src/Test/baseResults/spv.while-simple.vert.out48
-rwxr-xr-xchromium/third_party/glslang/src/Test/baseResults/spv.whileLoop.frag.out65
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/structAssignment.frag.out103
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/structDeref.frag.out345
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/structure.frag.out165
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/switch.frag.out691
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/swizzle.frag.out423
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/syntaxError.frag.out24
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/test.conf92
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/test.frag.out115
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/texture.frag.out564
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/tokenLength.vert.out222
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/types.frag.out677
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/uint.frag.out607
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/uniformArray.frag.out97
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/variableArrayIndex.frag.out225
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/varyingArray.frag.out120
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/varyingArrayIndirect.frag.out126
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/versionsClean.frag.out44
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/versionsClean.vert.out49
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/versionsErrors.frag.out44
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/versionsErrors.vert.out58
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/voidFunction.frag.out91
-rwxr-xr-xchromium/third_party/glslang/src/Test/baseResults/vulkan.ast.vert.out324
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/vulkan.comp.out11
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/vulkan.frag.out44
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/vulkan.vert.out33
-rw-r--r--chromium/third_party/glslang/src/Test/baseResults/whileLoop.frag.out65
-rwxr-xr-xchromium/third_party/glslang/src/Test/bump2
-rw-r--r--chromium/third_party/glslang/src/Test/comment.frag19
-rw-r--r--chromium/third_party/glslang/src/Test/conditionalDiscard.frag14
-rw-r--r--chromium/third_party/glslang/src/Test/constErrors.frag35
-rw-r--r--chromium/third_party/glslang/src/Test/constFold.frag141
-rw-r--r--chromium/third_party/glslang/src/Test/conversion.frag112
-rw-r--r--chromium/third_party/glslang/src/Test/cppComplexExpr.vert183
-rw-r--r--chromium/third_party/glslang/src/Test/cppIndent.vert61
-rw-r--r--chromium/third_party/glslang/src/Test/cppNest.vert177
-rw-r--r--chromium/third_party/glslang/src/Test/cppSimple.vert343
-rw-r--r--chromium/third_party/glslang/src/Test/dataOut.frag8
-rw-r--r--chromium/third_party/glslang/src/Test/dataOutIndirect.frag10
-rw-r--r--chromium/third_party/glslang/src/Test/dce.frag56
-rw-r--r--chromium/third_party/glslang/src/Test/decls.frag49
-rw-r--r--chromium/third_party/glslang/src/Test/deepRvalue.frag36
-rw-r--r--chromium/third_party/glslang/src/Test/depthOut.frag10
-rw-r--r--chromium/third_party/glslang/src/Test/discard-dce.frag35
-rw-r--r--chromium/third_party/glslang/src/Test/doWhileLoop.frag16
-rw-r--r--chromium/third_party/glslang/src/Test/earlyReturnDiscard.frag102
-rw-r--r--chromium/third_party/glslang/src/Test/empty.frag0
-rw-r--r--chromium/third_party/glslang/src/Test/empty2.frag1
-rw-r--r--chromium/third_party/glslang/src/Test/empty3.frag1
-rw-r--r--chromium/third_party/glslang/src/Test/errors.frag4
-rw-r--r--chromium/third_party/glslang/src/Test/es-link1.frag8
-rw-r--r--chromium/third_party/glslang/src/Test/es-link2.frag8
-rw-r--r--chromium/third_party/glslang/src/Test/flowControl.frag23
-rw-r--r--chromium/third_party/glslang/src/Test/forLoop.frag41
-rw-r--r--chromium/third_party/glslang/src/Test/forwardRef.frag37
-rw-r--r--chromium/third_party/glslang/src/Test/functionCall.frag44
-rw-r--r--chromium/third_party/glslang/src/Test/functionSemantics.frag70
-rwxr-xr-xchromium/third_party/glslang/src/Test/glslangValidator2
-rw-r--r--chromium/third_party/glslang/src/Test/hlsl.assoc.frag11
-rw-r--r--chromium/third_party/glslang/src/Test/hlsl.attribute.frag13
-rw-r--r--chromium/third_party/glslang/src/Test/hlsl.cast.frag4
-rw-r--r--chromium/third_party/glslang/src/Test/hlsl.doLoop.frag6
-rw-r--r--chromium/third_party/glslang/src/Test/hlsl.float1.frag7
-rw-r--r--chromium/third_party/glslang/src/Test/hlsl.float4.frag11
-rw-r--r--chromium/third_party/glslang/src/Test/hlsl.forLoop.frag8
-rw-r--r--chromium/third_party/glslang/src/Test/hlsl.frag12
-rw-r--r--chromium/third_party/glslang/src/Test/hlsl.if.frag28
-rw-r--r--chromium/third_party/glslang/src/Test/hlsl.intrinsics.frag407
-rw-r--r--chromium/third_party/glslang/src/Test/hlsl.intrinsics.negative.frag137
-rw-r--r--chromium/third_party/glslang/src/Test/hlsl.intrinsics.negative.vert196
-rw-r--r--chromium/third_party/glslang/src/Test/hlsl.intrinsics.vert372
-rw-r--r--chromium/third_party/glslang/src/Test/hlsl.matType.frag10
-rw-r--r--chromium/third_party/glslang/src/Test/hlsl.max.frag4
-rw-r--r--chromium/third_party/glslang/src/Test/hlsl.precedence.frag9
-rw-r--r--chromium/third_party/glslang/src/Test/hlsl.precedence2.frag9
-rw-r--r--chromium/third_party/glslang/src/Test/hlsl.scope.frag30
-rw-r--r--chromium/third_party/glslang/src/Test/hlsl.sin.frag4
-rw-r--r--chromium/third_party/glslang/src/Test/hlsl.struct.frag39
-rw-r--r--chromium/third_party/glslang/src/Test/hlsl.void.frag8
-rw-r--r--chromium/third_party/glslang/src/Test/hlsl.whileLoop.frag7
-rw-r--r--chromium/third_party/glslang/src/Test/length.frag18
-rw-r--r--chromium/third_party/glslang/src/Test/lineContinuation.vert151
-rw-r--r--chromium/third_party/glslang/src/Test/lineContinuation100.vert56
-rw-r--r--chromium/third_party/glslang/src/Test/link1.frag38
-rw-r--r--chromium/third_party/glslang/src/Test/link2.frag36
-rw-r--r--chromium/third_party/glslang/src/Test/link3.frag9
-rw-r--r--chromium/third_party/glslang/src/Test/localAggregates.frag72
-rw-r--r--chromium/third_party/glslang/src/Test/loops.frag320
-rw-r--r--chromium/third_party/glslang/src/Test/loopsArtificial.frag96
-rw-r--r--chromium/third_party/glslang/src/Test/mains.frag9
-rw-r--r--chromium/third_party/glslang/src/Test/mains1.frag5
-rw-r--r--chromium/third_party/glslang/src/Test/mains2.frag5
-rw-r--r--chromium/third_party/glslang/src/Test/makeDoc3
-rw-r--r--chromium/third_party/glslang/src/Test/matrix.frag55
-rw-r--r--chromium/third_party/glslang/src/Test/matrix2.frag50
-rw-r--r--chromium/third_party/glslang/src/Test/matrixError.vert22
-rw-r--r--chromium/third_party/glslang/src/Test/max_vertices_0.geom12
-rw-r--r--chromium/third_party/glslang/src/Test/negativeArraySize.comp10
-rw-r--r--chromium/third_party/glslang/src/Test/newTexture.frag75
-rw-r--r--chromium/third_party/glslang/src/Test/noMain.vert5
-rw-r--r--chromium/third_party/glslang/src/Test/noMain1.geom7
-rw-r--r--chromium/third_party/glslang/src/Test/noMain2.geom7
-rw-r--r--chromium/third_party/glslang/src/Test/nonSquare.vert25
-rw-r--r--chromium/third_party/glslang/src/Test/nonVulkan.frag9
-rw-r--r--chromium/third_party/glslang/src/Test/numeral.frag103
-rw-r--r--chromium/third_party/glslang/src/Test/pointCoord.frag15
-rw-r--r--chromium/third_party/glslang/src/Test/precise.tesc109
-rw-r--r--chromium/third_party/glslang/src/Test/precise_struct_block.vert89
-rw-r--r--chromium/third_party/glslang/src/Test/precision.frag76
-rw-r--r--chromium/third_party/glslang/src/Test/precision.vert25
-rw-r--r--chromium/third_party/glslang/src/Test/prepost.frag38
-rw-r--r--chromium/third_party/glslang/src/Test/preprocessor.cpp_style___FILE__.vert36
-rw-r--r--chromium/third_party/glslang/src/Test/preprocessor.cpp_style_line_directive.vert36
-rw-r--r--chromium/third_party/glslang/src/Test/preprocessor.defined.vert2
-rw-r--r--chromium/third_party/glslang/src/Test/preprocessor.edge_cases.vert15
-rw-r--r--chromium/third_party/glslang/src/Test/preprocessor.eof_missing.vert1
-rw-r--r--chromium/third_party/glslang/src/Test/preprocessor.errors.vert20
-rw-r--r--chromium/third_party/glslang/src/Test/preprocessor.extensions.vert12
-rw-r--r--chromium/third_party/glslang/src/Test/preprocessor.function_macro.vert20
-rw-r--r--chromium/third_party/glslang/src/Test/preprocessor.include.disabled.vert7
-rw-r--r--chromium/third_party/glslang/src/Test/preprocessor.include.enabled.vert7
-rw-r--r--chromium/third_party/glslang/src/Test/preprocessor.line.frag4
-rw-r--r--chromium/third_party/glslang/src/Test/preprocessor.line.vert39
-rw-r--r--chromium/third_party/glslang/src/Test/preprocessor.many.endif.vert10
-rw-r--r--chromium/third_party/glslang/src/Test/preprocessor.pragma.vert11
-rw-r--r--chromium/third_party/glslang/src/Test/preprocessor.simple.vert22
-rw-r--r--chromium/third_party/glslang/src/Test/preprocessor.success_if_parse_would_fail.vert4
-rw-r--r--chromium/third_party/glslang/src/Test/recurse1.frag48
-rw-r--r--chromium/third_party/glslang/src/Test/recurse1.vert44
-rw-r--r--chromium/third_party/glslang/src/Test/recurse2.frag28
-rw-r--r--chromium/third_party/glslang/src/Test/reflection.vert182
-rwxr-xr-xchromium/third_party/glslang/src/Test/runtests130
-rw-r--r--chromium/third_party/glslang/src/Test/sample.frag41
-rw-r--r--chromium/third_party/glslang/src/Test/sample.frag.out15
-rw-r--r--chromium/third_party/glslang/src/Test/sample.vert43
-rw-r--r--chromium/third_party/glslang/src/Test/sample.vert.out20
-rw-r--r--chromium/third_party/glslang/src/Test/simpleFunctionCall.frag15
-rw-r--r--chromium/third_party/glslang/src/Test/specExamples.frag237
-rw-r--r--chromium/third_party/glslang/src/Test/specExamples.vert196
-rw-r--r--chromium/third_party/glslang/src/Test/spv.100ops.frag27
-rw-r--r--chromium/third_party/glslang/src/Test/spv.130.frag93
-rw-r--r--chromium/third_party/glslang/src/Test/spv.140.frag46
-rw-r--r--chromium/third_party/glslang/src/Test/spv.150.geom39
-rw-r--r--chromium/third_party/glslang/src/Test/spv.150.vert38
-rw-r--r--chromium/third_party/glslang/src/Test/spv.300BuiltIns.vert14
-rw-r--r--chromium/third_party/glslang/src/Test/spv.300layout.frag22
-rw-r--r--chromium/third_party/glslang/src/Test/spv.300layout.vert49
-rw-r--r--chromium/third_party/glslang/src/Test/spv.300layoutp.vert49
-rw-r--r--chromium/third_party/glslang/src/Test/spv.310.comp37
-rw-r--r--chromium/third_party/glslang/src/Test/spv.330.geom26
-rw-r--r--chromium/third_party/glslang/src/Test/spv.400.frag263
-rw-r--r--chromium/third_party/glslang/src/Test/spv.400.tesc43
-rw-r--r--chromium/third_party/glslang/src/Test/spv.400.tese52
-rw-r--r--chromium/third_party/glslang/src/Test/spv.420.geom43
-rw-r--r--chromium/third_party/glslang/src/Test/spv.430.vert37
-rw-r--r--chromium/third_party/glslang/src/Test/spv.AofA.frag43
-rw-r--r--chromium/third_party/glslang/src/Test/spv.Operations.frag138
-rw-r--r--chromium/third_party/glslang/src/Test/spv.accessChain.frag94
-rw-r--r--chromium/third_party/glslang/src/Test/spv.aggOps.frag51
-rw-r--r--chromium/third_party/glslang/src/Test/spv.always-discard.frag36
-rw-r--r--chromium/third_party/glslang/src/Test/spv.always-discard2.frag19
-rw-r--r--chromium/third_party/glslang/src/Test/spv.atomic.comp47
-rw-r--r--chromium/third_party/glslang/src/Test/spv.bitCast.frag45
-rw-r--r--chromium/third_party/glslang/src/Test/spv.bool.vert17
-rw-r--r--chromium/third_party/glslang/src/Test/spv.boolInBlock.frag31
-rw-r--r--chromium/third_party/glslang/src/Test/spv.branch-return.vert10
-rw-r--r--chromium/third_party/glslang/src/Test/spv.conditionalDiscard.frag14
-rw-r--r--chromium/third_party/glslang/src/Test/spv.conversion.frag112
-rw-r--r--chromium/third_party/glslang/src/Test/spv.dataOut.frag8
-rw-r--r--chromium/third_party/glslang/src/Test/spv.dataOutIndirect.frag12
-rw-r--r--chromium/third_party/glslang/src/Test/spv.dataOutIndirect.vert12
-rw-r--r--chromium/third_party/glslang/src/Test/spv.deepRvalue.frag36
-rw-r--r--chromium/third_party/glslang/src/Test/spv.depthOut.frag11
-rw-r--r--chromium/third_party/glslang/src/Test/spv.discard-dce.frag35
-rw-r--r--chromium/third_party/glslang/src/Test/spv.do-simple.vert7
-rw-r--r--chromium/third_party/glslang/src/Test/spv.do-while-continue-break.vert20
-rw-r--r--chromium/third_party/glslang/src/Test/spv.doWhileLoop.frag16
-rw-r--r--chromium/third_party/glslang/src/Test/spv.double.comp25
-rw-r--r--chromium/third_party/glslang/src/Test/spv.earlyReturnDiscard.frag102
-rw-r--r--chromium/third_party/glslang/src/Test/spv.flowControl.frag23
-rw-r--r--chromium/third_party/glslang/src/Test/spv.for-complex-condition.vert7
-rw-r--r--chromium/third_party/glslang/src/Test/spv.for-continue-break.vert20
-rw-r--r--chromium/third_party/glslang/src/Test/spv.for-nobody.vert7
-rw-r--r--chromium/third_party/glslang/src/Test/spv.for-notest.vert6
-rw-r--r--chromium/third_party/glslang/src/Test/spv.for-simple.vert8
-rw-r--r--chromium/third_party/glslang/src/Test/spv.forLoop.frag41
-rw-r--r--chromium/third_party/glslang/src/Test/spv.forwardFun.frag39
-rw-r--r--chromium/third_party/glslang/src/Test/spv.functionCall.frag44
-rw-r--r--chromium/third_party/glslang/src/Test/spv.functionSemantics.frag63
-rw-r--r--chromium/third_party/glslang/src/Test/spv.image.frag93
-rw-r--r--chromium/third_party/glslang/src/Test/spv.int64.frag228
-rw-r--r--chromium/third_party/glslang/src/Test/spv.intOps.vert72
-rw-r--r--chromium/third_party/glslang/src/Test/spv.interpOps.frag32
-rw-r--r--chromium/third_party/glslang/src/Test/spv.layoutNested.vert76
-rw-r--r--chromium/third_party/glslang/src/Test/spv.length.frag14
-rw-r--r--chromium/third_party/glslang/src/Test/spv.localAggregates.frag72
-rw-r--r--chromium/third_party/glslang/src/Test/spv.loops.frag302
-rw-r--r--chromium/third_party/glslang/src/Test/spv.loopsArtificial.frag67
-rw-r--r--chromium/third_party/glslang/src/Test/spv.matFun.vert28
-rw-r--r--chromium/third_party/glslang/src/Test/spv.matrix.frag46
-rw-r--r--chromium/third_party/glslang/src/Test/spv.matrix2.frag50
-rw-r--r--chromium/third_party/glslang/src/Test/spv.memoryQualifier.frag38
-rw-r--r--chromium/third_party/glslang/src/Test/spv.merge-unreachable.frag7
-rw-r--r--chromium/third_party/glslang/src/Test/spv.newTexture.frag72
-rw-r--r--chromium/third_party/glslang/src/Test/spv.noDeadDecorations.vert13
-rw-r--r--chromium/third_party/glslang/src/Test/spv.nonSquare.vert25
-rw-r--r--chromium/third_party/glslang/src/Test/spv.precise.tesc24
-rw-r--r--chromium/third_party/glslang/src/Test/spv.precise.tese36
-rw-r--r--chromium/third_party/glslang/src/Test/spv.precision.frag60
-rw-r--r--chromium/third_party/glslang/src/Test/spv.prepost.frag38
-rw-r--r--chromium/third_party/glslang/src/Test/spv.pushConstant.vert17
-rw-r--r--chromium/third_party/glslang/src/Test/spv.qualifiers.vert19
-rw-r--r--chromium/third_party/glslang/src/Test/spv.queryL.frag64
-rw-r--r--chromium/third_party/glslang/src/Test/spv.separate.frag95
-rw-r--r--chromium/third_party/glslang/src/Test/spv.set.vert14
-rw-r--r--chromium/third_party/glslang/src/Test/spv.shaderBallot.comp59
-rw-r--r--chromium/third_party/glslang/src/Test/spv.shaderGroupVote.comp21
-rw-r--r--chromium/third_party/glslang/src/Test/spv.shiftOps.frag18
-rwxr-xr-xchromium/third_party/glslang/src/Test/spv.shortCircuit.frag50
-rw-r--r--chromium/third_party/glslang/src/Test/spv.simpleFunctionCall.frag13
-rw-r--r--chromium/third_party/glslang/src/Test/spv.simpleMat.vert19
-rw-r--r--chromium/third_party/glslang/src/Test/spv.sparseTexture.frag91
-rw-r--r--chromium/third_party/glslang/src/Test/spv.sparseTextureClamp.frag70
-rw-r--r--chromium/third_party/glslang/src/Test/spv.specConstant.comp13
-rw-r--r--chromium/third_party/glslang/src/Test/spv.specConstant.vert51
-rw-r--r--chromium/third_party/glslang/src/Test/spv.specConstantComposite.vert98
-rw-r--r--chromium/third_party/glslang/src/Test/spv.specConstantOperations.vert110
-rw-r--r--chromium/third_party/glslang/src/Test/spv.structAssignment.frag39
-rw-r--r--chromium/third_party/glslang/src/Test/spv.structDeref.frag71
-rw-r--r--chromium/third_party/glslang/src/Test/spv.structure.frag31
-rw-r--r--chromium/third_party/glslang/src/Test/spv.subpass.frag29
-rw-r--r--chromium/third_party/glslang/src/Test/spv.switch.frag142
-rw-r--r--chromium/third_party/glslang/src/Test/spv.swizzle.frag52
-rw-r--r--chromium/third_party/glslang/src/Test/spv.test.frag22
-rw-r--r--chromium/third_party/glslang/src/Test/spv.test.vert14
-rw-r--r--chromium/third_party/glslang/src/Test/spv.texture.frag73
-rw-r--r--chromium/third_party/glslang/src/Test/spv.texture.vert39
-rw-r--r--chromium/third_party/glslang/src/Test/spv.types.frag78
-rw-r--r--chromium/third_party/glslang/src/Test/spv.uint.frag99
-rw-r--r--chromium/third_party/glslang/src/Test/spv.uniformArray.frag17
-rw-r--r--chromium/third_party/glslang/src/Test/spv.variableArrayIndex.frag49
-rw-r--r--chromium/third_party/glslang/src/Test/spv.varyingArray.frag19
-rw-r--r--chromium/third_party/glslang/src/Test/spv.varyingArrayIndirect.frag21
-rw-r--r--chromium/third_party/glslang/src/Test/spv.voidFunction.frag34
-rw-r--r--chromium/third_party/glslang/src/Test/spv.while-continue-break.vert20
-rw-r--r--chromium/third_party/glslang/src/Test/spv.while-simple.vert7
-rw-r--r--chromium/third_party/glslang/src/Test/spv.whileLoop.frag16
-rw-r--r--chromium/third_party/glslang/src/Test/structAssignment.frag39
-rw-r--r--chromium/third_party/glslang/src/Test/structDeref.frag71
-rw-r--r--chromium/third_party/glslang/src/Test/structure.frag31
-rw-r--r--chromium/third_party/glslang/src/Test/switch.frag158
-rw-r--r--chromium/third_party/glslang/src/Test/swizzle.frag52
-rw-r--r--chromium/third_party/glslang/src/Test/syntaxError.frag16
-rw-r--r--chromium/third_party/glslang/src/Test/test-hlsl-spirv-list4
-rw-r--r--chromium/third_party/glslang/src/Test/test-preprocessor-list16
-rw-r--r--chromium/third_party/glslang/src/Test/test-spirv-list115
-rw-r--r--chromium/third_party/glslang/src/Test/test.frag22
-rw-r--r--chromium/third_party/glslang/src/Test/testlist134
-rw-r--r--chromium/third_party/glslang/src/Test/texture.frag73
-rw-r--r--chromium/third_party/glslang/src/Test/tokenLength.vert72
-rw-r--r--chromium/third_party/glslang/src/Test/types.frag81
-rw-r--r--chromium/third_party/glslang/src/Test/uint.frag105
-rw-r--r--chromium/third_party/glslang/src/Test/uniformArray.frag16
-rw-r--r--chromium/third_party/glslang/src/Test/variableArrayIndex.frag48
-rw-r--r--chromium/third_party/glslang/src/Test/varyingArray.frag19
-rw-r--r--chromium/third_party/glslang/src/Test/varyingArrayIndirect.frag21
-rw-r--r--chromium/third_party/glslang/src/Test/versionsClean.frag45
-rw-r--r--chromium/third_party/glslang/src/Test/versionsClean.vert43
-rw-r--r--chromium/third_party/glslang/src/Test/versionsErrors.frag46
-rw-r--r--chromium/third_party/glslang/src/Test/versionsErrors.vert46
-rw-r--r--chromium/third_party/glslang/src/Test/voidFunction.frag34
-rw-r--r--chromium/third_party/glslang/src/Test/vulkan.ast.vert42
-rw-r--r--chromium/third_party/glslang/src/Test/vulkan.comp12
-rw-r--r--chromium/third_party/glslang/src/Test/vulkan.frag75
-rw-r--r--chromium/third_party/glslang/src/Test/vulkan.vert47
-rw-r--r--chromium/third_party/glslang/src/Test/whileLoop.frag16
-rw-r--r--chromium/third_party/glslang/src/glslang/CMakeLists.txt91
-rw-r--r--chromium/third_party/glslang/src/glslang/GenericCodeGen/CodeGen.cpp76
-rw-r--r--chromium/third_party/glslang/src/glslang/GenericCodeGen/Link.cpp91
-rw-r--r--chromium/third_party/glslang/src/glslang/Include/BaseTypes.h315
-rw-r--r--chromium/third_party/glslang/src/glslang/Include/Common.h257
-rw-r--r--chromium/third_party/glslang/src/glslang/Include/ConstantUnion.h617
-rw-r--r--chromium/third_party/glslang/src/glslang/Include/InfoSink.h145
-rw-r--r--chromium/third_party/glslang/src/glslang/Include/InitializeGlobals.h47
-rw-r--r--chromium/third_party/glslang/src/glslang/Include/PoolAlloc.h325
-rw-r--r--chromium/third_party/glslang/src/glslang/Include/ResourceLimits.h140
-rw-r--r--chromium/third_party/glslang/src/glslang/Include/ShHandle.h174
-rw-r--r--chromium/third_party/glslang/src/glslang/Include/Types.h1714
-rw-r--r--chromium/third_party/glslang/src/glslang/Include/arrays.h318
-rw-r--r--chromium/third_party/glslang/src/glslang/Include/intermediate.h1090
-rw-r--r--chromium/third_party/glslang/src/glslang/Include/revision.h6
-rw-r--r--chromium/third_party/glslang/src/glslang/Include/revision.template13
-rw-r--r--chromium/third_party/glslang/src/glslang/MachineIndependent/Constant.cpp965
-rw-r--r--chromium/third_party/glslang/src/glslang/MachineIndependent/InfoSink.cpp109
-rw-r--r--chromium/third_party/glslang/src/glslang/MachineIndependent/Initialize.cpp4312
-rw-r--r--chromium/third_party/glslang/src/glslang/MachineIndependent/Initialize.h113
-rw-r--r--chromium/third_party/glslang/src/glslang/MachineIndependent/IntermTraverse.cpp302
-rw-r--r--chromium/third_party/glslang/src/glslang/MachineIndependent/Intermediate.cpp1980
-rw-r--r--chromium/third_party/glslang/src/glslang/MachineIndependent/ParseHelper.cpp6164
-rw-r--r--chromium/third_party/glslang/src/glslang/MachineIndependent/ParseHelper.h388
-rw-r--r--chromium/third_party/glslang/src/glslang/MachineIndependent/PoolAlloc.cpp347
-rw-r--r--chromium/third_party/glslang/src/glslang/MachineIndependent/RemoveTree.cpp118
-rw-r--r--chromium/third_party/glslang/src/glslang/MachineIndependent/RemoveTree.h39
-rw-r--r--chromium/third_party/glslang/src/glslang/MachineIndependent/Scan.cpp1331
-rw-r--r--chromium/third_party/glslang/src/glslang/MachineIndependent/Scan.h265
-rw-r--r--chromium/third_party/glslang/src/glslang/MachineIndependent/ScanContext.h86
-rw-r--r--chromium/third_party/glslang/src/glslang/MachineIndependent/ShaderLang.cpp1623
-rw-r--r--chromium/third_party/glslang/src/glslang/MachineIndependent/SymbolTable.cpp351
-rw-r--r--chromium/third_party/glslang/src/glslang/MachineIndependent/SymbolTable.h694
-rw-r--r--chromium/third_party/glslang/src/glslang/MachineIndependent/Versions.cpp677
-rw-r--r--chromium/third_party/glslang/src/glslang/MachineIndependent/Versions.h185
-rw-r--r--chromium/third_party/glslang/src/glslang/MachineIndependent/gl_types.h160
-rw-r--r--chromium/third_party/glslang/src/glslang/MachineIndependent/glslang.y2703
-rw-r--r--chromium/third_party/glslang/src/glslang/MachineIndependent/glslang_tab.cpp7685
-rw-r--r--chromium/third_party/glslang/src/glslang/MachineIndependent/glslang_tab.cpp.h369
-rw-r--r--chromium/third_party/glslang/src/glslang/MachineIndependent/intermOut.cpp864
-rw-r--r--chromium/third_party/glslang/src/glslang/MachineIndependent/limits.cpp198
-rw-r--r--chromium/third_party/glslang/src/glslang/MachineIndependent/linkValidate.cpp1050
-rw-r--r--chromium/third_party/glslang/src/glslang/MachineIndependent/localintermediate.h396
-rw-r--r--chromium/third_party/glslang/src/glslang/MachineIndependent/parseConst.cpp210
-rwxr-xr-xchromium/third_party/glslang/src/glslang/MachineIndependent/parseVersions.h135
-rw-r--r--chromium/third_party/glslang/src/glslang/MachineIndependent/preprocessor/Pp.cpp1151
-rw-r--r--chromium/third_party/glslang/src/glslang/MachineIndependent/preprocessor/PpAtom.cpp192
-rw-r--r--chromium/third_party/glslang/src/glslang/MachineIndependent/preprocessor/PpContext.cpp122
-rw-r--r--chromium/third_party/glslang/src/glslang/MachineIndependent/preprocessor/PpContext.h570
-rw-r--r--chromium/third_party/glslang/src/glslang/MachineIndependent/preprocessor/PpMemory.cpp162
-rw-r--r--chromium/third_party/glslang/src/glslang/MachineIndependent/preprocessor/PpScanner.cpp778
-rw-r--r--chromium/third_party/glslang/src/glslang/MachineIndependent/preprocessor/PpSymbols.cpp135
-rw-r--r--chromium/third_party/glslang/src/glslang/MachineIndependent/preprocessor/PpTokens.cpp278
-rw-r--r--chromium/third_party/glslang/src/glslang/MachineIndependent/preprocessor/PpTokens.h171
-rw-r--r--chromium/third_party/glslang/src/glslang/MachineIndependent/propagateNoContraction.cpp859
-rw-r--r--chromium/third_party/glslang/src/glslang/MachineIndependent/propagateNoContraction.h53
-rw-r--r--chromium/third_party/glslang/src/glslang/MachineIndependent/reflection.cpp761
-rw-r--r--chromium/third_party/glslang/src/glslang/MachineIndependent/reflection.h134
-rw-r--r--chromium/third_party/glslang/src/glslang/OSDependent/Unix/CMakeLists.txt5
-rw-r--r--chromium/third_party/glslang/src/glslang/OSDependent/Unix/ossource.cpp190
-rw-r--r--chromium/third_party/glslang/src/glslang/OSDependent/Windows/CMakeLists.txt17
-rw-r--r--chromium/third_party/glslang/src/glslang/OSDependent/Windows/main.cpp74
-rw-r--r--chromium/third_party/glslang/src/glslang/OSDependent/Windows/ossource.cpp163
-rw-r--r--chromium/third_party/glslang/src/glslang/OSDependent/osinclude.h66
-rw-r--r--chromium/third_party/glslang/src/glslang/Public/ShaderLang.h485
-rwxr-xr-xchromium/third_party/glslang/src/glslang/updateGrammar3
-rw-r--r--chromium/third_party/glslang/src/gtests/AST.FromFile.cpp195
-rw-r--r--chromium/third_party/glslang/src/gtests/BuiltInResource.FromFile.cpp57
-rw-r--r--chromium/third_party/glslang/src/gtests/CMakeLists.txt40
-rw-r--r--chromium/third_party/glslang/src/gtests/Config.FromFile.cpp107
-rw-r--r--chromium/third_party/glslang/src/gtests/Hlsl.FromFile.cpp102
-rw-r--r--chromium/third_party/glslang/src/gtests/Initializer.h87
-rw-r--r--chromium/third_party/glslang/src/gtests/Link.FromFile.cpp108
-rw-r--r--chromium/third_party/glslang/src/gtests/Pp.FromFile.cpp74
-rw-r--r--chromium/third_party/glslang/src/gtests/README.md26
-rw-r--r--chromium/third_party/glslang/src/gtests/Settings.cpp41
-rw-r--r--chromium/third_party/glslang/src/gtests/Settings.h54
-rw-r--r--chromium/third_party/glslang/src/gtests/Spv.FromFile.cpp210
-rw-r--r--chromium/third_party/glslang/src/gtests/TestFixture.cpp134
-rw-r--r--chromium/third_party/glslang/src/gtests/TestFixture.h341
-rw-r--r--chromium/third_party/glslang/src/gtests/main.cpp63
-rwxr-xr-xchromium/third_party/glslang/src/hlsl/CMakeLists.txt26
-rwxr-xr-xchromium/third_party/glslang/src/hlsl/hlslGrammar.cpp1684
-rwxr-xr-xchromium/third_party/glslang/src/hlsl/hlslGrammar.h98
-rwxr-xr-xchromium/third_party/glslang/src/hlsl/hlslOpMap.cpp171
-rwxr-xr-xchromium/third_party/glslang/src/hlsl/hlslOpMap.h69
-rwxr-xr-xchromium/third_party/glslang/src/hlsl/hlslParseHelper.cpp3805
-rwxr-xr-xchromium/third_party/glslang/src/hlsl/hlslParseHelper.h229
-rwxr-xr-xchromium/third_party/glslang/src/hlsl/hlslParseables.cpp663
-rwxr-xr-xchromium/third_party/glslang/src/hlsl/hlslParseables.h61
-rwxr-xr-xchromium/third_party/glslang/src/hlsl/hlslScanContext.cpp635
-rwxr-xr-xchromium/third_party/glslang/src/hlsl/hlslScanContext.h109
-rwxr-xr-xchromium/third_party/glslang/src/hlsl/hlslTokenStream.cpp106
-rwxr-xr-xchromium/third_party/glslang/src/hlsl/hlslTokenStream.h82
-rwxr-xr-xchromium/third_party/glslang/src/hlsl/hlslTokens.h281
-rwxr-xr-xchromium/third_party/glslang/src/make-revision10
-rw-r--r--chromium/third_party/icu/README.chromium9
-rw-r--r--chromium/third_party/icu/patches/win7_tz.patch44
-rw-r--r--chromium/third_party/icu/source/common/wintz.cpp6
-rw-r--r--chromium/third_party/icu/source/common/wintz.h2
-rw-r--r--chromium/third_party/pdfium/fxjs/cjs_document.cpp5
-rw-r--r--chromium/third_party/skia/infra/bots/android_bin.isolate11
-rw-r--r--chromium/third_party/skia/infra/bots/assets.isolate7
-rw-r--r--chromium/third_party/skia/infra/bots/calmbench.isolate10
-rw-r--r--chromium/third_party/skia/infra/bots/empty.isolate1
-rw-r--r--chromium/third_party/skia/infra/bots/infrabots.isolate7
-rw-r--r--chromium/third_party/skia/infra/bots/ios_bin.isolate25
-rw-r--r--chromium/third_party/skia/infra/bots/isolate_android_sdk_linux.isolate7
-rw-r--r--chromium/third_party/skia/infra/bots/isolate_gcloud_linux.isolate7
-rw-r--r--chromium/third_party/skia/infra/bots/isolate_go.isolate7
-rw-r--r--chromium/third_party/skia/infra/bots/perf_skia_bundled.isolate14
-rw-r--r--chromium/third_party/skia/infra/bots/resources.isolate7
-rw-r--r--chromium/third_party/skia/infra/bots/skpbench_skia_bundled.isolate12
-rw-r--r--chromium/third_party/skia/infra/bots/swarm_recipe.isolate11
-rw-r--r--chromium/third_party/skia/infra/bots/test_skia_bundled.isolate14
-rw-r--r--chromium/tools/swarming_client/example/payload/hello_world.isolate10
-rw-r--r--chromium/tools/swarming_client/tools/spam.isolate14
-rw-r--r--chromium/ui/webui/resources/js/i18n_behavior.js3
-rw-r--r--chromium/v8/include/v8-version.h2
-rw-r--r--chromium/v8/src/builtins/array-splice.tq103
-rw-r--r--chromium/v8/src/builtins/base.tq32
-rw-r--r--chromium/v8/src/code-stub-assembler.cc173
-rw-r--r--chromium/v8/src/code-stub-assembler.h23
-rw-r--r--chromium/v8/src/compiler/representation-change.cc2
-rw-r--r--chromium/v8/tools/__init__.py4
-rw-r--r--chromium/v8/tools/unittests/__init__.py4
-rwxr-xr-xchromium/v8/tools/unittests/v8_presubmit_test.py91
-rwxr-xr-xchromium/v8/tools/v8_presubmit.py194
814 files changed, 174541 insertions, 352 deletions
diff --git a/chromium/DEPS b/chromium/DEPS
index 9d2b3cb6e8d..29f4674bd7d 100644
--- a/chromium/DEPS
+++ b/chromium/DEPS
@@ -38,7 +38,7 @@ gclient_gn_args = [
vars = {
- "buildspec_platforms": "win, linux64, chromeos, win64, android, mac64",
+ "buildspec_platforms": "win, ios, linux64, chromeos, win64, android, mac64",
# Variable that can be used to support multiple build scenarios, like having
# Chromium specific targets in a client project's GN file or sync dependencies
# conditionally etc.
@@ -110,11 +110,11 @@ vars = {
# Three lines of non-changing comments so that
# the commit queue can handle CLs rolling V8
# and whatever else without interference from each other.
- 'v8_revision': 'd77b970954effa1843af951e6b1026ba52142ca4',
+ 'v8_revision': '6136a1bcb3c56fe51be0ccad91046c2093a88d57',
# Three lines of non-changing comments so that
# the commit queue can handle CLs rolling swarming_client
# and whatever else without interference from each other.
- 'swarming_revision': '486c9b53c4d54dd4b95bb6ce0e31160e600dfc11',
+ 'swarming_revision': '0e3e1c4dc4e79f25a5b58fcbc135dc93183c0c54',
# Three lines of non-changing comments so that
# the commit queue can handle CLs rolling ANGLE
# and whatever else without interference from each other.
@@ -130,7 +130,7 @@ vars = {
# Three lines of non-changing comments so that
# the commit queue can handle CLs rolling PDFium
# and whatever else without interference from each other.
- 'pdfium_revision': '5fe886fd17a413b39214ffdd7b2fba5326b88011',
+ 'pdfium_revision': '2ebef1487e139dfe1f44998f312ed59f80202c82',
# Three lines of non-changing comments so that
# the commit queue can handle CLs rolling openmax_dl
# and whatever else without interference from each other.
@@ -380,7 +380,15 @@ deps = {
'packages': [
{
'package': 'infra/tools/luci/isolate/${{platform}}',
- 'version': 'git_revision:bc125484b8513898f17bc2501ac5e95330f44a3b',
+ 'version': 'git_revision:f140d0c3c6acecf6ca6cd8d66ddad9421158ab40',
+ },
+ {
+ 'package': 'infra/tools/luci/isolated/${{platform}}',
+ 'version': 'git_revision:f140d0c3c6acecf6ca6cd8d66ddad9421158ab40',
+ },
+ {
+ 'package': 'infra/tools/luci/swarming/${{platform}}',
+ 'version': 'git_revision:f140d0c3c6acecf6ca6cd8d66ddad9421158ab40',
},
],
'dep_type': 'cipd',
@@ -662,7 +670,7 @@ deps = {
},
'src/third_party/ffmpeg':
- Var('chromium_git') + '/chromium/third_party/ffmpeg.git' + '@' + '458e9fd3f8e8c913a739389c65dfaf1f77ee9106',
+ Var('chromium_git') + '/chromium/third_party/ffmpeg.git' + '@' + '8ffab7d32469e1ad3614eb6fcabfb6ae184acaf7',
'src/third_party/flac':
Var('chromium_git') + '/chromium/deps/flac.git' + '@' + 'af862024c8c8fa0ae07ced05e89013d881b00596',
@@ -768,7 +776,7 @@ deps = {
Var('chromium_git') + '/chromium/deps/hunspell_dictionaries.git' + '@' + 'a9bac57ce6c9d390a52ebaad3259f5fdb871210e',
'src/third_party/icu':
- Var('chromium_git') + '/chromium/deps/icu.git' + '@' + '5841b97d994b2e3aa67629c555e2226361e09272',
+ Var('chromium_git') + '/chromium/deps/icu.git' + '@' + '6939c54120cb37a5e5c49f73a8ab28e952440d9b',
'src/third_party/icu4j': {
'packages': [
@@ -1139,7 +1147,7 @@ deps = {
Var('chromium_git') + '/v8/v8.git' + '@' + Var('v8_revision'),
'src-internal': {
- 'url': 'https://chrome-internal.googlesource.com/chrome/src-internal.git@94d6ff130fc7ba14e320257e6cd42792fbf402cd',
+ 'url': 'https://chrome-internal.googlesource.com/chrome/src-internal.git@81d6b43c6e6fdf4ae3a5288f72946415a71bf728',
'condition': 'checkout_src_internal',
},
diff --git a/chromium/build/util/LASTCHANGE b/chromium/build/util/LASTCHANGE
index ae2b4c61ab1..0626cbccf80 100644
--- a/chromium/build/util/LASTCHANGE
+++ b/chromium/build/util/LASTCHANGE
@@ -1 +1 @@
-LASTCHANGE=9fbcd5e5587a15760c757f51523fee52a6cff5b3-refs/branch-heads/3578@{#887}
+LASTCHANGE=cc99454a94d72bc0ae0a87712cf0c6a106e03903-refs/branch-heads/3578@{#947}
diff --git a/chromium/build/util/LASTCHANGE.committime b/chromium/build/util/LASTCHANGE.committime
index f6fc47c3b22..5dc3d81ed37 100644
--- a/chromium/build/util/LASTCHANGE.committime
+++ b/chromium/build/util/LASTCHANGE.committime
@@ -1 +1 @@
-1544429582 \ No newline at end of file
+1548292276 \ No newline at end of file
diff --git a/chromium/chrome/VERSION b/chromium/chrome/VERSION
index 41fd442d600..207f2ac0baf 100644
--- a/chromium/chrome/VERSION
+++ b/chromium/chrome/VERSION
@@ -1,4 +1,4 @@
MAJOR=71
MINOR=0
BUILD=3578
-PATCH=93
+PATCH=140
diff --git a/chromium/chrome/browser/extensions/api/tab_capture/tab_capture_api.cc b/chromium/chrome/browser/extensions/api/tab_capture/tab_capture_api.cc
index 05371efe486..df456f2dbf6 100644
--- a/chromium/chrome/browser/extensions/api/tab_capture/tab_capture_api.cc
+++ b/chromium/chrome/browser/extensions/api/tab_capture/tab_capture_api.cc
@@ -234,7 +234,7 @@ ExtensionFunction::ResponseAction TabCaptureCaptureFunction::Run() {
const bool match_incognito_profile = include_incognito_information();
Browser* target_browser =
GetLastActiveBrowser(profile, match_incognito_profile);
- if (!target_browser || target_browser->type() != Browser::TYPE_TABBED)
+ if (!target_browser)
return RespondNow(Error(kFindingTabError));
content::WebContents* target_contents =
@@ -421,7 +421,7 @@ ExtensionFunction::ResponseAction TabCaptureGetMediaStreamIdFunction::Run() {
const bool match_incognito_profile = include_incognito_information();
Browser* target_browser =
GetLastActiveBrowser(profile, match_incognito_profile);
- if (!target_browser || target_browser->type() != Browser::TYPE_TABBED)
+ if (!target_browser)
return RespondNow(Error(kFindingTabError));
target_contents = target_browser->tab_strip_model()->GetActiveWebContents();
diff --git a/chromium/components/variations/service/variations_service.cc b/chromium/components/variations/service/variations_service.cc
index ee424577f3f..ed586d13ed1 100644
--- a/chromium/components/variations/service/variations_service.cc
+++ b/chromium/components/variations/service/variations_service.cc
@@ -417,6 +417,14 @@ void VariationsService::EnsureLocaleEquals(const std::string& locale) {
// Chrome OS may switch language on the fly.
DCHECK_EQ(locale, field_trial_creator_.application_locale());
#else
+
+#if defined(OS_ANDROID)
+ // TODO(asvitkine): Speculative early return to silence CHECK failures on
+ // Android, see crbug.com/912320.
+ if (locale.empty())
+ return;
+#endif
+
// Uses a CHECK rather than a DCHECK to ensure that issues are caught since
// problems in this area may only appear in the wild due to official builds
// and end user machines.
diff --git a/chromium/content/browser/service_worker/service_worker_database.cc b/chromium/content/browser/service_worker/service_worker_database.cc
index 4f39ee07144..22ea65c9ed8 100644
--- a/chromium/content/browser/service_worker/service_worker_database.cc
+++ b/chromium/content/browser/service_worker/service_worker_database.cc
@@ -397,6 +397,8 @@ ServiceWorkerDatabase::Status ServiceWorkerDatabase::GetRegistrationsForOrigin(
return status;
std::string prefix = CreateRegistrationKeyPrefix(origin);
+
+ // Read all registrations.
{
std::unique_ptr<leveldb::Iterator> itr(
db_->NewIterator(leveldb::ReadOptions()));
@@ -421,21 +423,34 @@ ServiceWorkerDatabase::Status ServiceWorkerDatabase::GetRegistrationsForOrigin(
break;
}
registrations->push_back(registration);
+ }
+ }
- if (opt_resources_list) {
- std::vector<ResourceRecord> resources;
- status = ReadResourceRecords(registration, &resources);
- if (status != STATUS_OK) {
- registrations->clear();
- opt_resources_list->clear();
- break;
- }
- opt_resources_list->push_back(resources);
+ // Count reading all registrations as one "read operation" for UMA
+ // purposes.
+ HandleReadResult(FROM_HERE, status);
+ if (status != STATUS_OK)
+ return status;
+
+ // Read the resources if requested. This must be done after the loop with
+ // leveldb::Iterator above, because it calls ReadResouceRecords() which
+ // deletes |db_| on failure, and iterators must be destroyed before the
+ // database.
+ if (opt_resources_list) {
+ for (const auto& registration : *registrations) {
+ std::vector<ResourceRecord> resources;
+ // NOTE: ReadResourceRecords already calls HandleReadResult() on its own,
+ // so to avoid double-counting the UMA, don't call it again after this.
+ status = ReadResourceRecords(registration, &resources);
+ if (status != STATUS_OK) {
+ registrations->clear();
+ opt_resources_list->clear();
+ break;
}
+ opt_resources_list->push_back(resources);
}
}
- HandleReadResult(FROM_HERE, status);
return status;
}
diff --git a/chromium/content/browser/service_worker/service_worker_database_unittest.cc b/chromium/content/browser/service_worker/service_worker_database_unittest.cc
index 011e30bfbad..033225edb83 100644
--- a/chromium/content/browser/service_worker/service_worker_database_unittest.cc
+++ b/chromium/content/browser/service_worker/service_worker_database_unittest.cc
@@ -14,6 +14,7 @@
#include "base/macros.h"
#include "base/stl_util.h"
#include "base/strings/string_number_conversions.h"
+#include "base/test/metrics/histogram_tester.h"
#include "content/browser/service_worker/service_worker_database.pb.h"
#include "content/common/service_worker/service_worker_types.h"
#include "testing/gmock/include/gmock/gmock.h"
@@ -2040,4 +2041,64 @@ TEST(ServiceWorkerDatabaseTest, Corruption_NoMainResource) {
EXPECT_TRUE(resources_out.empty());
}
+// Tests that GetRegistrationsForOrigin() detects corruption without crashing.
+// It must delete the database after freeing the iterator it uses to read all
+// registrations. Regression test for https://crbug.com/909024.
+TEST(ServiceWorkerDatabaseTest, Corruption_GetRegistrationsForOrigin) {
+ std::unique_ptr<ServiceWorkerDatabase> database(CreateDatabaseInMemory());
+ ServiceWorkerDatabase::RegistrationData deleted_version;
+ std::vector<int64_t> newly_purgeable_resources;
+ std::vector<Resource> resources;
+ GURL origin("https://example.com");
+
+ // Write a normal registration.
+ RegistrationData data1;
+ data1.registration_id = 1;
+ data1.scope = URL(origin, "/foo");
+ data1.script = URL(origin, "/resource1");
+ data1.version_id = 1;
+ data1.resources_total_size_bytes = 2016;
+ resources = {CreateResource(1, URL(origin, "/resource1"), 2016)};
+ ASSERT_EQ(ServiceWorkerDatabase::STATUS_OK,
+ database->WriteRegistration(data1, resources, &deleted_version,
+ &newly_purgeable_resources));
+
+ // Write a corrupt registration.
+ RegistrationData data2;
+ data2.registration_id = 2;
+ data2.scope = URL(origin, "/foo");
+ data2.script = URL(origin, "/resource2");
+ data2.version_id = 2;
+ data2.resources_total_size_bytes = 2016;
+ // Simulate that "/resource2" wasn't correctly written in the database by
+ // not adding it.
+ resources = {CreateResource(3, URL(origin, "/resource3"), 2016)};
+ ASSERT_EQ(ServiceWorkerDatabase::STATUS_OK,
+ database->WriteRegistration(data2, resources, &deleted_version,
+ &newly_purgeable_resources));
+
+ // Call GetRegistrationsForOrigin(). It should detect corruption, and not
+ // crash.
+ base::HistogramTester histogram_tester;
+ std::vector<RegistrationData> registrations;
+ std::vector<std::vector<ServiceWorkerDatabase::ResourceRecord>>
+ resources_list;
+ EXPECT_EQ(ServiceWorkerDatabase::STATUS_ERROR_CORRUPTED,
+ database->GetRegistrationsForOrigin(origin, &registrations,
+ &resources_list));
+ EXPECT_TRUE(registrations.empty());
+ EXPECT_TRUE(resources_list.empty());
+
+ // There should be three "read" operations logged:
+ // 1. Reading all registration data.
+ // 2. Reading the resources of the first registration.
+ // 3. Reading the resources of the second registration. This one fails.
+ histogram_tester.ExpectTotalCount("ServiceWorker.Database.ReadResult", 3);
+ histogram_tester.ExpectBucketCount("ServiceWorker.Database.ReadResult",
+ ServiceWorkerDatabase::STATUS_OK, 2);
+ histogram_tester.ExpectBucketCount(
+ "ServiceWorker.Database.ReadResult",
+ ServiceWorkerDatabase::STATUS_ERROR_CORRUPTED, 1);
+}
+
} // namespace content
diff --git a/chromium/gpu/config/gpu_lists_version.h b/chromium/gpu/config/gpu_lists_version.h
index 6ea16db5d0c..dbce208552e 100644
--- a/chromium/gpu/config/gpu_lists_version.h
+++ b/chromium/gpu/config/gpu_lists_version.h
@@ -3,6 +3,6 @@
#ifndef GPU_CONFIG_GPU_LISTS_VERSION_H_
#define GPU_CONFIG_GPU_LISTS_VERSION_H_
-#define GPU_LISTS_VERSION "9fbcd5e5587a15760c757f51523fee52a6cff5b3"
+#define GPU_LISTS_VERSION "cc99454a94d72bc0ae0a87712cf0c6a106e03903"
#endif // GPU_CONFIG_GPU_LISTS_VERSION_H_
diff --git a/chromium/net/http/http_proxy_client_socket_pool_unittest.cc b/chromium/net/http/http_proxy_client_socket_pool_unittest.cc
index 2825f643022..51636757982 100644
--- a/chromium/net/http/http_proxy_client_socket_pool_unittest.cc
+++ b/chromium/net/http/http_proxy_client_socket_pool_unittest.cc
@@ -354,9 +354,6 @@ TEST_P(HttpProxyClientSocketPoolTest, HaveAuth) {
// so we skip this test for SPDY
if (GetParam() == SPDY)
return;
- std::string proxy_host_port = GetParam() == HTTP
- ? (kHttpProxyHost + std::string(":80"))
- : (kHttpsProxyHost + std::string(":443"));
std::string request =
"CONNECT www.google.com:443 HTTP/1.1\r\n"
"Host: www.google.com:443\r\n"
@@ -382,9 +379,6 @@ TEST_P(HttpProxyClientSocketPoolTest, HaveAuth) {
}
TEST_P(HttpProxyClientSocketPoolTest, AsyncHaveAuth) {
- std::string proxy_host_port = GetParam() == HTTP
- ? (kHttpProxyHost + std::string(":80"))
- : (kHttpsProxyHost + std::string(":443"));
std::string request =
"CONNECT www.google.com:443 HTTP/1.1\r\n"
"Host: www.google.com:443\r\n"
@@ -892,6 +886,10 @@ TEST_P(HttpProxyClientSocketPoolTest,
// returned underlying TCP sockets.
#if defined(OS_ANDROID)
TEST_P(HttpProxyClientSocketPoolTest, Tag) {
+ // Socket tagging only supports Android without data reduction proxy, so only
+ // HTTP proxies are supported.
+ if (GetParam() != HTTP)
+ return;
Initialize(base::span<MockRead>(), base::span<MockWrite>(),
base::span<MockRead>(), base::span<MockWrite>());
SocketTag tag1(SocketTag::UNSET_UID, 0x12345678);
@@ -924,6 +922,57 @@ TEST_P(HttpProxyClientSocketPoolTest, Tag) {
handle_.socket()->Disconnect();
handle_.Reset();
}
+
+TEST_P(HttpProxyClientSocketPoolTest, TagWithProxy) {
+ // Socket tagging only supports Android without data reduction proxy, so only
+ // HTTP proxies are supported.
+ if (GetParam() != HTTP)
+ return;
+ std::string request =
+ "CONNECT www.google.com:443 HTTP/1.1\r\n"
+ "Host: www.google.com:443\r\n"
+ "Proxy-Connection: keep-alive\r\n"
+ "Proxy-Authorization: Basic Zm9vOmJhcg==\r\n\r\n";
+ MockWrite writes[] = {
+ MockWrite(SYNCHRONOUS, 0, request.c_str()),
+ };
+ MockRead reads[] = {
+ MockRead(SYNCHRONOUS, 1, "HTTP/1.1 200 Connection Established\r\n\r\n"),
+ };
+
+ Initialize(reads, writes, base::span<MockRead>(), base::span<MockWrite>());
+ AddAuthToCache();
+
+ SocketTag tag1(SocketTag::UNSET_UID, 0x12345678);
+ SocketTag tag2(getuid(), 0x87654321);
+
+ // Verify requested socket is tagged properly.
+ int rv =
+ handle_.Init("a", CreateTunnelParams(), LOW, tag1,
+ ClientSocketPool::RespectLimits::ENABLED,
+ CompletionOnceCallback(), pool_.get(), NetLogWithSource());
+ EXPECT_THAT(rv, IsOk());
+ EXPECT_TRUE(handle_.is_initialized());
+ ASSERT_TRUE(handle_.socket());
+ EXPECT_TRUE(handle_.socket()->IsConnected());
+ EXPECT_EQ(socket_factory()->GetLastProducedTCPSocket()->tag(), tag1);
+ EXPECT_TRUE(
+ socket_factory()->GetLastProducedTCPSocket()->tagged_before_connected());
+
+ // Verify reused socket is retagged properly.
+ StreamSocket* socket = handle_.socket();
+ handle_.Reset();
+ rv = handle_.Init("a", CreateNoTunnelParams(), LOW, tag2,
+ ClientSocketPool::RespectLimits::ENABLED,
+ CompletionOnceCallback(), pool_.get(), NetLogWithSource());
+ EXPECT_THAT(rv, IsOk());
+ EXPECT_TRUE(handle_.socket());
+ EXPECT_TRUE(handle_.socket()->IsConnected());
+ EXPECT_EQ(handle_.socket(), socket);
+ EXPECT_EQ(socket_factory()->GetLastProducedTCPSocket()->tag(), tag2);
+ handle_.socket()->Disconnect();
+ handle_.Reset();
+}
#endif
} // namespace net
diff --git a/chromium/net/http/http_proxy_client_socket_wrapper.cc b/chromium/net/http/http_proxy_client_socket_wrapper.cc
index f1cad81680a..b8361830009 100644
--- a/chromium/net/http/http_proxy_client_socket_wrapper.cc
+++ b/chromium/net/http/http_proxy_client_socket_wrapper.cc
@@ -285,12 +285,25 @@ int64_t HttpProxyClientSocketWrapper::GetTotalReceivedBytes() const {
}
void HttpProxyClientSocketWrapper::ApplySocketTag(const SocketTag& tag) {
- // HttpProxyClientSocketPool only tags once connected, when transport_socket_
- // is set. Socket tagging is not supported with tunneling. Socket tagging is
- // also not supported with proxy auth so ApplySocketTag() won't be called with
- // a specific (non-default) tag when transport_socket_ is cleared by
- // RestartWithAuth().
- if (tunnel_ || !transport_socket_) {
+ // Applying a socket tag to an HttpProxyClientSocketWrapper is done by simply
+ // applying the socket tag to the underlying socket.
+
+ // In the case of a connection to the proxy using HTTP/2 or HTTP/3 where the
+ // underlying socket may multiplex multiple streams, applying this request's
+ // socket tag to the multiplexed session would incorrectly apply the socket
+ // tag to all mutliplexed streams. In reality this would hit the CHECK(false)
+ // in QuicProxyClientSocket::ApplySocketTag() or
+ // SpdyProxyClientSocket::ApplySocketTag(). Fortunately socket tagging is only
+ // supported on Android without the data reduction proxy, so only simple HTTP
+ // proxies are supported, so proxies won't be using HTTP/2 or HTTP/3. Detect
+ // this case (|ssl_params_| must be set for HTTP/2 and HTTP/3 proxies) and
+ // enforce that a specific (non-default) tag isn't being applied.
+ if (ssl_params_ ||
+ // Android also doesn't support proxy auth, so RestartWithAuth() should't
+ // be called so |transport_socket_| shouldn't be cleared. If
+ // |transport_socket_| is cleared, enforce that a specific (non-default)
+ // tag isn't being applied.
+ !transport_socket_) {
CHECK(tag == SocketTag());
} else {
transport_socket_->ApplySocketTag(tag);
diff --git a/chromium/third_party/blink/renderer/bindings/core/v8/js_based_event_listener.cc b/chromium/third_party/blink/renderer/bindings/core/v8/js_based_event_listener.cc
index 96b6a228e46..8a01fe1b3fd 100644
--- a/chromium/third_party/blink/renderer/bindings/core/v8/js_based_event_listener.cc
+++ b/chromium/third_party/blink/renderer/bindings/core/v8/js_based_event_listener.cc
@@ -81,7 +81,7 @@ void JSBasedEventListener::handleEvent(
// difference but the advantage that we can use listener's |ScriptState|
// after it get compiled.
// https://html.spec.whatwg.org/multipage/webappapis.html#event-handler-value
- v8::Local<v8::Value> listener = GetListenerObject(*event->target());
+ v8::Local<v8::Value> listener = GetListenerObject(*event->currentTarget());
if (listener.IsEmpty() || !listener->IsObject())
return;
diff --git a/chromium/third_party/blink/renderer/bindings/core/v8/js_event_handler.cc b/chromium/third_party/blink/renderer/bindings/core/v8/js_event_handler.cc
index 5efd94e1e60..022c4e3cbe8 100644
--- a/chromium/third_party/blink/renderer/bindings/core/v8/js_event_handler.cc
+++ b/chromium/third_party/blink/renderer/bindings/core/v8/js_event_handler.cc
@@ -40,7 +40,8 @@ void JSEventHandler::CallListenerFunction(EventTarget& event_target,
// Step 1. Let callback be the result of getting the current value of the
// event handler given eventTarget and name.
// Step 2. If callback is null, then return.
- v8::Local<v8::Value> listener_value = GetListenerObject(event_target);
+ v8::Local<v8::Value> listener_value =
+ GetListenerObject(*event.currentTarget());
if (listener_value.IsEmpty() || listener_value->IsNull())
return;
DCHECK(HasCompiledHandler());
diff --git a/chromium/third_party/catapult/telemetry/telemetry.isolate b/chromium/third_party/catapult/telemetry/telemetry.isolate
deleted file mode 100644
index 829efecde29..00000000000
--- a/chromium/third_party/catapult/telemetry/telemetry.isolate
+++ /dev/null
@@ -1,19 +0,0 @@
-# Copyright (c) 2015 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-{
- 'conditions': [
- ['OS=="android" or OS=="linux" or OS=="mac" or OS=="win"', {
- 'variables': {
- 'files': [
- # For now, just include the whole catapult directory.
- # TODO(nednguyen, aiolos): only include what telemetry needs.
- # https://github.com/catapult-project/catapult/issues/1953
- '../',
- # For Telemetry's screenshot support.
- '<(PRODUCT_DIR)/bitmaptools<(EXECUTABLE_SUFFIX)',
- ],
- },
- }],
- ]
-}
diff --git a/chromium/third_party/ffmpeg/libavformat/mov.c b/chromium/third_party/ffmpeg/libavformat/mov.c
index 76525e208ee..c656437a8c8 100644
--- a/chromium/third_party/ffmpeg/libavformat/mov.c
+++ b/chromium/third_party/ffmpeg/libavformat/mov.c
@@ -1326,6 +1326,10 @@ static int update_frag_index(MOVContext *c, int64_t offset)
return -1;
for (i = 0; i < c->fc->nb_streams; i++) {
+ // Avoid building frag index if streams lack track id.
+ if (c->fc->streams[i]->id < 0)
+ return AVERROR_INVALIDDATA;
+
frag_stream_info[i].id = c->fc->streams[i]->id;
frag_stream_info[i].sidx_pts = AV_NOPTS_VALUE;
frag_stream_info[i].tfdt_dts = AV_NOPTS_VALUE;
@@ -4180,7 +4184,7 @@ static int mov_read_trak(MOVContext *c, AVIOContext *pb, MOVAtom atom)
st = avformat_new_stream(c->fc, NULL);
if (!st) return AVERROR(ENOMEM);
- st->id = c->fc->nb_streams;
+ st->id = -1;
sc = av_mallocz(sizeof(MOVStreamContext));
if (!sc) return AVERROR(ENOMEM);
@@ -4464,6 +4468,11 @@ static int mov_read_tkhd(MOVContext *c, AVIOContext *pb, MOVAtom atom)
st = c->fc->streams[c->fc->nb_streams-1];
sc = st->priv_data;
+ // Each stream (trak) should have exactly 1 tkhd. This catches bad files and
+ // avoids corrupting AVStreams mapped to an earlier tkhd.
+ if (st->id != -1)
+ return AVERROR_INVALIDDATA;
+
version = avio_r8(pb);
flags = avio_rb24(pb);
st->disposition |= (flags & MOV_TKHD_FLAG_ENABLED) ? AV_DISPOSITION_DEFAULT : 0;
@@ -4730,6 +4739,7 @@ static int mov_read_trun(MOVContext *c, AVIOContext *pb, MOVAtom atom)
break;
}
}
+ av_assert0(index_entry_pos <= st->nb_index_entries);
avio_r8(pb); /* version */
flags = avio_rb24(pb);
diff --git a/chromium/third_party/glslang/src/.appveyor.yml b/chromium/third_party/glslang/src/.appveyor.yml
new file mode 100644
index 00000000000..64e7ae64aff
--- /dev/null
+++ b/chromium/third_party/glslang/src/.appveyor.yml
@@ -0,0 +1,40 @@
+# Windows Build Configuration for AppVeyor
+# http://www.appveyor.com/docs/appveyor-yml
+
+# build version format
+version: "{build}"
+
+os: Visual Studio 2013
+
+platform:
+ - Any CPU
+
+configuration:
+ - Debug
+ - Release
+
+branches:
+ only:
+ - master
+
+clone_depth: 5
+
+matrix:
+ fast_finish: true # Show final status immediately if a test fails.
+
+# scripts that run after cloning repository
+install:
+ - git clone https://github.com/google/googletest.git External/googletest
+
+build:
+ parallel: true # enable MSBuild parallel builds
+ verbosity: minimal
+
+build_script:
+ - mkdir build && cd build
+ - cmake .. -DCMAKE_INSTALL_PREFIX=install
+ - cmake --build . --config %CONFIGURATION% --target install
+
+test_script:
+ - ctest -C %CONFIGURATION% --output-on-failure
+ - cd ../Test && bash runtests
diff --git a/chromium/third_party/glslang/src/.clang-format b/chromium/third_party/glslang/src/.clang-format
new file mode 100644
index 00000000000..daf87985eb7
--- /dev/null
+++ b/chromium/third_party/glslang/src/.clang-format
@@ -0,0 +1,12 @@
+Language: Cpp
+IndentWidth: 4
+BreakBeforeBraces: Custom
+BraceWrapping: { AfterFunction: true, AfterControlStatement: true }
+IndentCaseLabels: false
+ReflowComments: false
+ColumnLimit: 120
+AccessModifierOffset: -4
+AlignTrailingComments: true
+AllowShortBlocksOnASingleLine: false
+AllowShortIfStatementsOnASingleLine: false
+AllowShortLoopsOnASingleLine: false
diff --git a/chromium/third_party/glslang/src/.travis.yml b/chromium/third_party/glslang/src/.travis.yml
new file mode 100644
index 00000000000..4a88dce5a9a
--- /dev/null
+++ b/chromium/third_party/glslang/src/.travis.yml
@@ -0,0 +1,60 @@
+# Linux and Mac Build Configuration for Travis
+
+language: cpp
+
+os:
+ - linux
+ - osx
+
+# Use Ubuntu 14.04 LTS (Trusty) as the Linux testing environment.
+sudo: required
+dist: trusty
+
+env:
+ - GLSLANG_BUILD_TYPE=Release
+ - GLSLANG_BUILD_TYPE=Debug
+
+compiler:
+ - clang
+ - gcc
+
+matrix:
+ fast_finish: true # Show final status immediately if a test fails.
+ exclude:
+ # Skip GCC builds on Mac OS X.
+ - os: osx
+ compiler: gcc
+
+cache:
+ apt: true
+
+branches:
+ only:
+ - master
+
+addons:
+ apt:
+ packages:
+ - clang-3.6
+ - ninja-build
+
+install:
+ # Install ninja on Mac OS X.
+ - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update && brew install ninja; fi
+ # Make sure that clang-3.6 is selected.
+ - if [[ "$TRAVIS_OS_NAME" == "linux" && "$CC" == "clang" ]]; then
+ export CC=clang-3.6 CXX=clang++-3.6;
+ fi
+
+before_script:
+ - git clone https://github.com/google/googletest.git External/googletest
+
+script:
+ - mkdir build && cd build
+ # We need to install the compiled binaries so the paths in the runtests script can resolve correctly.
+ - cmake -GNinja -DCMAKE_BUILD_TYPE=${GLSLANG_BUILD_TYPE} -DCMAKE_INSTALL_PREFIX=`pwd`/install ..
+ - ninja install
+ # Run Google-Test-based tests.
+ - ctest --output-on-failure
+ # Run runtests-based tests.
+ - cd ../Test && ./runtests
diff --git a/chromium/third_party/glslang/src/CMakeLists.txt b/chromium/third_party/glslang/src/CMakeLists.txt
new file mode 100644
index 00000000000..f2f23559733
--- /dev/null
+++ b/chromium/third_party/glslang/src/CMakeLists.txt
@@ -0,0 +1,46 @@
+cmake_minimum_required(VERSION 2.8.12)
+set_property(GLOBAL PROPERTY USE_FOLDERS ON)
+
+enable_testing()
+
+set(CMAKE_INSTALL_PREFIX "install" CACHE STRING "prefix")
+
+project(glslang)
+
+if(WIN32)
+ set(CMAKE_DEBUG_POSTFIX "d")
+ include(ChooseMSVCCRT.cmake)
+ add_definitions(-DGLSLANG_OSINCLUDE_WIN32)
+elseif(UNIX)
+ add_definitions(-fPIC)
+ add_definitions(-DGLSLANG_OSINCLUDE_UNIX)
+else(WIN32)
+ message("unknown platform")
+endif(WIN32)
+
+if(CMAKE_COMPILER_IS_GNUCXX)
+ add_definitions(-std=c++11)
+elseif(${CMAKE_CXX_COMPILER_ID} MATCHES "Clang")
+ add_definitions(-std=c++11)
+endif()
+
+function(glslang_set_link_args TARGET)
+ # For MinGW compiles, statically link against the GCC and C++ runtimes.
+ # This avoids the need to ship those runtimes as DLLs.
+ if(WIN32)
+ if(${CMAKE_CXX_COMPILER_ID} MATCHES "GNU")
+ set_target_properties(${TARGET} PROPERTIES
+ LINK_FLAGS "-static -static-libgcc -static-libstdc++")
+ endif()
+ endif(WIN32)
+endfunction(glslang_set_link_args)
+
+# We depend on these for later projects, so they should come first.
+add_subdirectory(External)
+
+add_subdirectory(glslang)
+add_subdirectory(OGLCompilersDLL)
+add_subdirectory(StandAlone)
+add_subdirectory(SPIRV)
+add_subdirectory(hlsl)
+add_subdirectory(gtests)
diff --git a/chromium/third_party/glslang/src/ChooseMSVCCRT.cmake b/chromium/third_party/glslang/src/ChooseMSVCCRT.cmake
new file mode 100644
index 00000000000..209788174ff
--- /dev/null
+++ b/chromium/third_party/glslang/src/ChooseMSVCCRT.cmake
@@ -0,0 +1,105 @@
+# The macro choose_msvc_crt() takes a list of possible
+# C runtimes to choose from, in the form of compiler flags,
+# to present to the user. (MTd for /MTd, etc)
+#
+# The macro is invoked at the end of the file.
+#
+# CMake already sets CRT flags in the CMAKE_CXX_FLAGS_* and
+# CMAKE_C_FLAGS_* variables by default. To let the user
+# override that for each build type:
+# 1. Detect which CRT is already selected, and reflect this in
+# LLVM_USE_CRT_* so the user can have a better idea of what
+# changes they're making.
+# 2. Replace the flags in both variables with the new flag via a regex.
+# 3. set() the variables back into the cache so the changes
+# are user-visible.
+
+### Helper macros: ###
+macro(make_crt_regex regex crts)
+ set(${regex} "")
+ foreach(crt ${${crts}})
+ # Trying to match the beginning or end of the string with stuff
+ # like [ ^]+ didn't work, so use a bunch of parentheses instead.
+ set(${regex} "${${regex}}|(^| +)/${crt}($| +)")
+ endforeach(crt)
+ string(REGEX REPLACE "^\\|" "" ${regex} "${${regex}}")
+endmacro(make_crt_regex)
+
+macro(get_current_crt crt_current regex flagsvar)
+ # Find the selected-by-CMake CRT for each build type, if any.
+ # Strip off the leading slash and any whitespace.
+ string(REGEX MATCH "${${regex}}" ${crt_current} "${${flagsvar}}")
+ string(REPLACE "/" " " ${crt_current} "${${crt_current}}")
+ string(STRIP "${${crt_current}}" ${crt_current})
+endmacro(get_current_crt)
+
+# Replaces or adds a flag to a variable.
+# Expects 'flag' to be padded with spaces.
+macro(set_flag_in_var flagsvar regex flag)
+ string(REGEX MATCH "${${regex}}" current_flag "${${flagsvar}}")
+ if("${current_flag}" STREQUAL "")
+ set(${flagsvar} "${${flagsvar}}${${flag}}")
+ else()
+ string(REGEX REPLACE "${${regex}}" "${${flag}}" ${flagsvar} "${${flagsvar}}")
+ endif()
+ string(STRIP "${${flagsvar}}" ${flagsvar})
+ # Make sure this change gets reflected in the cache/gui.
+ # CMake requires the docstring parameter whenever set() touches the cache,
+ # so get the existing docstring and re-use that.
+ get_property(flagsvar_docs CACHE ${flagsvar} PROPERTY HELPSTRING)
+ set(${flagsvar} "${${flagsvar}}" CACHE STRING "${flagsvar_docs}" FORCE)
+endmacro(set_flag_in_var)
+
+
+macro(choose_msvc_crt MSVC_CRT)
+ if(LLVM_USE_CRT)
+ message(FATAL_ERROR
+ "LLVM_USE_CRT is deprecated. Use the CMAKE_BUILD_TYPE-specific
+variables (LLVM_USE_CRT_DEBUG, etc) instead.")
+ endif()
+
+ make_crt_regex(MSVC_CRT_REGEX ${MSVC_CRT})
+
+ foreach(build_type ${CMAKE_CONFIGURATION_TYPES} ${CMAKE_BUILD_TYPE})
+ string(TOUPPER "${build_type}" build)
+ if (NOT LLVM_USE_CRT_${build})
+ get_current_crt(LLVM_USE_CRT_${build}
+ MSVC_CRT_REGEX
+ CMAKE_CXX_FLAGS_${build})
+ set(LLVM_USE_CRT_${build}
+ "${LLVM_USE_CRT_${build}}"
+ CACHE STRING "Specify VC++ CRT to use for ${build_type} configurations."
+ FORCE)
+ set_property(CACHE LLVM_USE_CRT_${build}
+ PROPERTY STRINGS ;${${MSVC_CRT}})
+ endif(NOT LLVM_USE_CRT_${build})
+ endforeach(build_type)
+
+ foreach(build_type ${CMAKE_CONFIGURATION_TYPES} ${CMAKE_BUILD_TYPE})
+ string(TOUPPER "${build_type}" build)
+ if ("${LLVM_USE_CRT_${build}}" STREQUAL "")
+ set(flag_string " ")
+ else()
+ set(flag_string " /${LLVM_USE_CRT_${build}} ")
+ list(FIND ${MSVC_CRT} ${LLVM_USE_CRT_${build}} idx)
+ if (idx LESS 0)
+ message(FATAL_ERROR
+ "Invalid value for LLVM_USE_CRT_${build}: ${LLVM_USE_CRT_${build}}. Valid options are one of: ${${MSVC_CRT}}")
+ endif (idx LESS 0)
+ message(STATUS "Using ${build_type} VC++ CRT: ${LLVM_USE_CRT_${build}}")
+ endif()
+ foreach(lang C CXX)
+ set_flag_in_var(CMAKE_${lang}_FLAGS_${build} MSVC_CRT_REGEX flag_string)
+ endforeach(lang)
+ endforeach(build_type)
+endmacro(choose_msvc_crt MSVC_CRT)
+
+
+# List of valid CRTs for MSVC
+set(MSVC_CRT
+ MD
+ MDd
+ MT
+ MTd)
+
+choose_msvc_crt(MSVC_CRT)
diff --git a/chromium/third_party/glslang/src/External/CMakeLists.txt b/chromium/third_party/glslang/src/External/CMakeLists.txt
new file mode 100644
index 00000000000..5180ea56931
--- /dev/null
+++ b/chromium/third_party/glslang/src/External/CMakeLists.txt
@@ -0,0 +1,34 @@
+# Suppress all warnings from external projects.
+set_property(DIRECTORY APPEND PROPERTY COMPILE_OPTIONS -w)
+
+if (TARGET gmock)
+ message(STATUS "Google Mock already configured - use it")
+elseif(IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/googletest)
+ # We need to make sure Google Test does not mess up with the
+ # global CRT settings on Windows.
+ if(WIN32)
+ set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)
+ endif(WIN32)
+ add_subdirectory(googletest)
+ set(GTEST_TARGETS
+ gtest
+ gtest_main
+ gmock
+ gmock_main
+ )
+ foreach(target ${GTEST_TARGETS})
+ set_property(TARGET ${target} PROPERTY FOLDER gtest)
+ endforeach()
+ mark_as_advanced(gmock_build_tests
+ BUILD_GMOCK
+ BUILD_GTEST
+ BUILD_SHARED_LIBS
+ gtest_build_samples
+ gtest_build_tests
+ gtest_disable_pthreads
+ gtest_force_shared_crt
+ gtest_hide_internal_symbols)
+else()
+ message(STATUS
+ "Google Mock was not found - tests based on that will not build")
+endif()
diff --git a/chromium/third_party/glslang/src/OGLCompilersDLL/CMakeLists.txt b/chromium/third_party/glslang/src/OGLCompilersDLL/CMakeLists.txt
new file mode 100644
index 00000000000..4954db94584
--- /dev/null
+++ b/chromium/third_party/glslang/src/OGLCompilersDLL/CMakeLists.txt
@@ -0,0 +1,11 @@
+set(SOURCES InitializeDll.cpp InitializeDll.h)
+
+add_library(OGLCompiler STATIC ${SOURCES})
+set_property(TARGET OGLCompiler PROPERTY FOLDER glslang)
+
+if(WIN32)
+ source_group("Source" FILES ${SOURCES})
+endif(WIN32)
+
+install(TARGETS OGLCompiler
+ ARCHIVE DESTINATION lib)
diff --git a/chromium/third_party/glslang/src/OGLCompilersDLL/InitializeDll.cpp b/chromium/third_party/glslang/src/OGLCompilersDLL/InitializeDll.cpp
new file mode 100644
index 00000000000..cc2b742ed50
--- /dev/null
+++ b/chromium/third_party/glslang/src/OGLCompilersDLL/InitializeDll.cpp
@@ -0,0 +1,155 @@
+//
+//Copyright (C) 2002-2005 3Dlabs Inc. Ltd.
+//All rights reserved.
+//
+//Redistribution and use in source and binary forms, with or without
+//modification, are permitted provided that the following conditions
+//are met:
+//
+// Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 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.
+//
+// Neither the name of 3Dlabs Inc. Ltd. nor the names of its
+// contributors may be used to endorse or promote products derived
+// from this software without specific prior written permission.
+//
+//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+//"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 THE
+//COPYRIGHT HOLDERS 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.
+//
+
+#define SH_EXPORTING
+
+#include <assert.h>
+
+#include "InitializeDll.h"
+#include "../glslang/Include/InitializeGlobals.h"
+
+#include "../glslang/Public/ShaderLang.h"
+
+namespace glslang {
+
+OS_TLSIndex ThreadInitializeIndex = OS_INVALID_TLS_INDEX;
+
+bool InitProcess()
+{
+ glslang::GetGlobalLock();
+
+ if (ThreadInitializeIndex != OS_INVALID_TLS_INDEX) {
+ //
+ // Function is re-entrant.
+ //
+
+ glslang::ReleaseGlobalLock();
+ return true;
+ }
+
+ ThreadInitializeIndex = OS_AllocTLSIndex();
+
+ if (ThreadInitializeIndex == OS_INVALID_TLS_INDEX) {
+ assert(0 && "InitProcess(): Failed to allocate TLS area for init flag");
+
+ glslang::ReleaseGlobalLock();
+ return false;
+ }
+
+ if (! InitializePoolIndex()) {
+ assert(0 && "InitProcess(): Failed to initialize global pool");
+
+ glslang::ReleaseGlobalLock();
+ return false;
+ }
+
+ if (! InitThread()) {
+ assert(0 && "InitProcess(): Failed to initialize thread");
+
+ glslang::ReleaseGlobalLock();
+ return false;
+ }
+
+ glslang::ReleaseGlobalLock();
+ return true;
+}
+
+
+bool InitThread()
+{
+ //
+ // This function is re-entrant
+ //
+ if (ThreadInitializeIndex == OS_INVALID_TLS_INDEX) {
+ assert(0 && "InitThread(): Process hasn't been initalised.");
+ return false;
+ }
+
+ if (OS_GetTLSValue(ThreadInitializeIndex) != 0)
+ return true;
+
+ InitializeMemoryPools();
+
+ if (! OS_SetTLSValue(ThreadInitializeIndex, (void *)1)) {
+ assert(0 && "InitThread(): Unable to set init flag.");
+ return false;
+ }
+
+ return true;
+}
+
+
+bool DetachThread()
+{
+ bool success = true;
+
+ if (ThreadInitializeIndex == OS_INVALID_TLS_INDEX)
+ return true;
+
+ //
+ // Function is re-entrant and this thread may not have been initialized.
+ //
+ if (OS_GetTLSValue(ThreadInitializeIndex) != 0) {
+ if (!OS_SetTLSValue(ThreadInitializeIndex, (void *)0)) {
+ assert(0 && "DetachThread(): Unable to clear init flag.");
+ success = false;
+ }
+
+ FreeGlobalPools();
+
+ }
+
+ return success;
+}
+
+bool DetachProcess()
+{
+ bool success = true;
+
+ if (ThreadInitializeIndex == OS_INVALID_TLS_INDEX)
+ return true;
+
+ ShFinalize();
+
+ success = DetachThread();
+
+ FreePoolIndex();
+
+ OS_FreeTLSIndex(ThreadInitializeIndex);
+ ThreadInitializeIndex = OS_INVALID_TLS_INDEX;
+
+ return success;
+}
+
+} // end namespace glslang
diff --git a/chromium/third_party/glslang/src/OGLCompilersDLL/InitializeDll.h b/chromium/third_party/glslang/src/OGLCompilersDLL/InitializeDll.h
new file mode 100644
index 00000000000..2d24557435d
--- /dev/null
+++ b/chromium/third_party/glslang/src/OGLCompilersDLL/InitializeDll.h
@@ -0,0 +1,50 @@
+//
+//Copyright (C) 2002-2005 3Dlabs Inc. Ltd.
+//All rights reserved.
+//
+//Redistribution and use in source and binary forms, with or without
+//modification, are permitted provided that the following conditions
+//are met:
+//
+// Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 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.
+//
+// Neither the name of 3Dlabs Inc. Ltd. nor the names of its
+// contributors may be used to endorse or promote products derived
+// from this software without specific prior written permission.
+//
+//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+//"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 THE
+//COPYRIGHT HOLDERS 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.
+//
+#ifndef __INITIALIZEDLL_H
+#define __INITIALIZEDLL_H
+
+
+#include "../glslang/OSDependent/osinclude.h"
+
+namespace glslang {
+
+bool InitProcess();
+bool InitThread();
+bool DetachThread();
+bool DetachProcess();
+
+} // end namespace glslang
+
+#endif // __INITIALIZEDLL_H
+
diff --git a/chromium/third_party/glslang/src/README-spirv-remap.txt b/chromium/third_party/glslang/src/README-spirv-remap.txt
new file mode 100644
index 00000000000..8e3259f8951
--- /dev/null
+++ b/chromium/third_party/glslang/src/README-spirv-remap.txt
@@ -0,0 +1,137 @@
+
+VERSION
+--------------------------------------------------------------------------------
+spirv-remap 0.97
+
+INTRO:
+--------------------------------------------------------------------------------
+spirv-remap is a utility to improve compression of SPIR-V binary files via
+entropy reduction, plus optional stripping of debug information and
+load/store optimization. It transforms SPIR-V to SPIR-V, remapping IDs. The
+resulting modules have an increased ID range (IDs are not as tightly packed
+around zero), but will compress better when multiple modules are compressed
+together, since compressor's dictionary can find better cross module
+commonality.
+
+Remapping is accomplished via canonicalization. Thus, modules can be
+compressed one at a time with no loss of quality relative to operating on
+many modules at once. The command line tool operates on multiple modules
+only in the trivial repetition sense, for ease of use. The remapper API
+only accepts a single module at a time.
+
+There are two modes of use: command line, and a C++11 API. Both are
+described below.
+
+spirv-remap is currently in an alpha state. Although there are no known
+remapping defects, it has only been exercised on one real world game shader
+workload.
+
+
+FEEDBACK
+--------------------------------------------------------------------------------
+Report defects, enhancements requests, code improvements, etc to:
+ spvremapper@lunarg.com
+
+
+COMMAND LINE USAGE:
+--------------------------------------------------------------------------------
+Examples are given with a verbosity of one (-v), but more verbosity can be
+had via -vv, -vvv, etc, or an integer parameter to --verbose, such as
+"--verbose 4". With no verbosity, the command is silent and returns 0 on
+success, and a positive integer error on failure.
+
+Pre-built binaries for several OSs are available. Examples presented are
+for Linux. Command line arguments can be provided in any order.
+
+1. Basic ID remapping
+
+Perform ID remapping on all shaders in "*.spv", writing new files with
+the same basenames to /tmp/out_dir.
+
+ spirv-remap -v --map all --input *.spv --output /tmp/out_dir
+
+2. Perform all possible size reductions
+
+ spirv-remap-linux-64 -v --do-everything --input *.spv --output /tmp/out_dir
+
+Note that --do-everything is a synonym for:
+
+ --map all --dce all --opt all --strip all
+
+API USAGE:
+--------------------------------------------------------------------------------
+
+The public interface to the remapper is defined in SPIRV/SPVRemapper.h as follows:
+
+namespace spv {
+
+class spirvbin_t
+{
+public:
+ enum Options { ... };
+ spirvbin_t(int verbose = 0); // construct
+
+ // remap an existing binary in memory
+ void remap(std::vector<std::uint32_t>& spv, std::uint32_t opts = DO_EVERYTHING);
+
+ // Type for error/log handler functions
+ typedef std::function<void(const std::string&)> errorfn_t;
+ typedef std::function<void(const std::string&)> logfn_t;
+
+ // Register error/log handling functions (can be c/c++ fn, lambda fn, or functor)
+ static void registerErrorHandler(errorfn_t handler) { errorHandler = handler; }
+ static void registerLogHandler(logfn_t handler) { logHandler = handler; }
+};
+
+} // namespace spv
+
+The class definition is in SPVRemapper.cpp.
+
+remap() accepts an std::vector of SPIR-V words, modifies them per the
+request given in 'opts', and leaves the 'spv' container with the result.
+It is safe to instantiate one spirvbin_t per thread and process a different
+SPIR-V in each.
+
+The "opts" parameter to remap() accepts a bit mask of desired remapping
+options. See REMAPPING AND OPTIMIZATION OPTIONS.
+
+On error, the function supplied to registerErrorHandler() will be invoked.
+This can be a standard C/C++ function, a lambda function, or a functor.
+The default handler simply calls exit(5); The error handler is a static
+members, so need only be set up once, not once per spirvbin_t instance.
+
+Log messages are supplied to registerLogHandler(). By default, log
+messages are eaten silently. The log handler is also a static member.
+
+BUILD DEPENDENCIES:
+--------------------------------------------------------------------------------
+ 1. C++11 compatible compiler
+ 2. cmake
+ 3. glslang
+
+
+BUILDING
+--------------------------------------------------------------------------------
+The standalone remapper is built along side glslangValidator through its
+normal build process.
+
+
+REMAPPING AND OPTIMIZATION OPTIONS
+--------------------------------------------------------------------------------
+API:
+ These are bits defined under spv::spirvbin_t::, and can be
+ bitwise or-ed together as desired.
+
+ MAP_TYPES = canonicalize type IDs
+ MAP_NAMES = canonicalize named data
+ MAP_FUNCS = canonicalize function bodies
+ DCE_FUNCS = remove dead functions
+ DCE_VARS = remove dead variables
+ DCE_TYPES = remove dead types
+ OPT_LOADSTORE = optimize unneeded load/stores
+ MAP_ALL = (MAP_TYPES | MAP_NAMES | MAP_FUNCS)
+ DCE_ALL = (DCE_FUNCS | DCE_VARS | DCE_TYPES)
+ OPT_ALL = (OPT_LOADSTORE)
+ ALL_BUT_STRIP = (MAP_ALL | DCE_ALL | OPT_ALL)
+ DO_EVERYTHING = (STRIP | ALL_BUT_STRIP)
+
diff --git a/chromium/third_party/glslang/src/README.md b/chromium/third_party/glslang/src/README.md
new file mode 100644
index 00000000000..7a14f56afb8
--- /dev/null
+++ b/chromium/third_party/glslang/src/README.md
@@ -0,0 +1,297 @@
+Also see the Khronos landing page for glslang as a reference front end:
+
+https://www.khronos.org/opengles/sdk/tools/Reference-Compiler/
+
+The above page includes where to get binaries, and is kept up to date
+regarding the feature level of glslang.
+
+glslang
+=======
+
+[![Build Status](https://travis-ci.org/KhronosGroup/glslang.svg?branch=master)](https://travis-ci.org/KhronosGroup/glslang)
+[![Build status](https://ci.appveyor.com/api/projects/status/q6fi9cb0qnhkla68/branch/master?svg=true)](https://ci.appveyor.com/project/Khronoswebmaster/glslang/branch/master)
+
+An OpenGL and OpenGL ES shader front end and validator.
+
+There are two components:
+
+1. A front-end library for programmatic parsing of GLSL/ESSL into an AST.
+
+2. A standalone wrapper, `glslangValidator`, that can be used as a shader
+ validation tool.
+
+How to add a feature protected by a version/extension/stage/profile: See the
+comment in `glslang/MachineIndependent/Versions.cpp`.
+
+Things left to do: See `Todo.txt`
+
+Execution of Standalone Wrapper
+-------------------------------
+
+To use the standalone binary form, execute `glslangValidator`, and it will print
+a usage statement. Basic operation is to give it a file containing a shader,
+and it will print out warnings/errors and optionally an AST.
+
+The applied stage-specific rules are based on the file extension:
+* `.vert` for a vertex shader
+* `.tesc` for a tessellation control shader
+* `.tese` for a tessellation evaluation shader
+* `.geom` for a geometry shader
+* `.frag` for a fragment shader
+* `.comp` for a compute shader
+
+There is also a non-shader extension
+* `.conf` for a configuration file of limits, see usage statement for example
+
+Building
+--------
+
+### Dependencies
+
+* [CMake][cmake]: for generating compilation targets.
+* [bison][bison]: _optional_, but needed when changing the grammar (glslang.y).
+* [googletest][googletest]: _optional_, but should use if making any changes to glslang.
+
+### Build steps
+
+#### 1) Check-Out External Projects
+
+```bash
+cd <the directory glslang was cloned to, External will be a subdirectory>
+git clone https://github.com/google/googletest.git External/googletest
+```
+
+#### 2) Configure
+
+Assume the source directory is `$SOURCE_DIR` and
+the build directory is `$BUILD_DIR`:
+
+For building on Linux (assuming using the Ninja generator):
+
+```bash
+cd $BUILD_DIR
+
+cmake -GNinja -DCMAKE_BUILD_TYPE={Debug|Release|RelWithDebInfo} \
+ -DCMAKE_INSTALL_PREFIX=`pwd`/install $SOURCE_DIR
+```
+
+For building on Windows:
+
+```bash
+cmake $SOURCE_DIR -DCMAKE_INSTALL_PREFIX=`pwd`/install
+# The CMAKE_INSTALL_PREFIX part is for testing (explained later).
+```
+
+The CMake GUI also works for Windows (version 3.4.1 tested).
+
+#### 3) Build and Install
+
+```bash
+# for Linux:
+ninja install
+
+# for Windows:
+cmake --build . --config {Release|Debug|MinSizeRel|RelWithDebInfo} \
+ --target install
+```
+
+If using MSVC, after running CMake to configure, use the
+Configuration Manager to check the `INSTALL` project.
+
+### If you need to change the GLSL grammar
+
+The grammar in `glslang/MachineIndependent/glslang.y` has to be recompiled with
+bison if it changes, the output files are committed to the repo to avoid every
+developer needing to have bison configured to compile the project when grammar
+changes are quite infrequent. For windows you can get binaries from
+[GnuWin32][bison-gnu-win32].
+
+The command to rebuild is:
+
+```bash
+bison --defines=MachineIndependent/glslang_tab.cpp.h
+ -t MachineIndependent/glslang.y
+ -o MachineIndependent/glslang_tab.cpp
+```
+
+The above command is also available in the bash script at
+`glslang/updateGrammar`.
+
+Testing
+-------
+
+Right now, there are two test harnesses existing in glslang: one is [Google
+Test](gtests/), one is the [`runtests` script](Test/runtests). The former
+runs unit tests and single-shader single-threaded integration tests, while
+the latter runs multiple-shader linking tests and multi-threaded tests.
+
+### Running tests
+
+The [`runtests` script](Test/runtests) requires compiled binaries to be
+installed into `$BUILD_DIR/install`. Please make sure you have supplied the
+correct configuration to CMake (using `-DCMAKE_INSTALL_PREFIX`) when building;
+otherwise, you may want to modify the path in the `runtests` script.
+
+Running Google Test-backed tests:
+
+```bash
+cd $BUILD_DIR
+
+# for Linux:
+ctest
+
+# for Windows:
+ctest -C {Debug|Release|RelWithDebInfo|MinSizeRel}
+
+# or, run the test binary directly
+# (which gives more fine-grained control like filtering):
+<dir-to-glslangtests-in-build-dir>/glslangtests
+```
+
+Running `runtests` script-backed tests:
+
+```bash
+cd $SOURCE_DIR/Test && ./runtests
+```
+
+### Contributing tests
+
+Test results should always be included with a pull request that modifies
+functionality.
+
+If you are writing unit tests, please use the Google Test framework and
+place the tests under the `gtests/` directory.
+
+Integration tests are placed in the `Test/` directory. It contains test input
+and a subdirectory `baseResults/` that contains the expected results of the
+tests. Both the tests and `baseResults/` are under source-code control.
+
+Google Test runs those integration tests by reading the test input, compiling
+them, and then compare against the expected results in `baseResults/`. The
+integration tests to run via Google Test is registered in various
+`gtests/*.FromFile.cpp` source files. `glslangtests` provides a command-line
+option `--update-mode`, which, if supplied, will overwrite the golden files
+under the `baseResults/` directory with real output from that invocation.
+For more information, please check `gtests/` directory's
+[README](gtests/README.md).
+
+For the `runtests` script, it will generate current results in the
+`localResults/` directory and `diff` them against the `baseResults/`.
+The integration tests to run via the `runtests` script is registered
+via various `Test/test-*` text files and `Test/testlist`.
+When you want to update the tracked test results, they need to be
+copied from `localResults/` to `baseResults/`. This can be done by
+the `bump` shell script.
+
+The list of files tested comes from `testlist`, and lists input shaders
+in this directory, which must all be public for this to work. However,
+you can add your own private list of tests, not tracked here, by using
+`localtestlist` to list non-tracked tests. This is automatically read
+by `runtests` and included in the `diff` and `bump` process.
+
+Programmatic Interfaces
+-----------------------
+
+Another piece of software can programmatically translate shaders to an AST
+using one of two different interfaces:
+* A new C++ class-oriented interface, or
+* The original C functional interface
+
+The `main()` in `StandAlone/StandAlone.cpp` shows examples using both styles.
+
+### C++ Class Interface (new, preferred)
+
+This interface is in roughly the last 1/3 of `ShaderLang.h`. It is in the
+glslang namespace and contains the following.
+
+```cxx
+const char* GetEsslVersionString();
+const char* GetGlslVersionString();
+bool InitializeProcess();
+void FinalizeProcess();
+
+class TShader
+ bool parse(...);
+ void setStrings(...);
+ const char* getInfoLog();
+
+class TProgram
+ void addShader(...);
+ bool link(...);
+ const char* getInfoLog();
+ Reflection queries
+```
+
+See `ShaderLang.h` and the usage of it in `StandAlone/StandAlone.cpp` for more
+details.
+
+### C Functional Interface (orignal)
+
+This interface is in roughly the first 2/3 of `ShaderLang.h`, and referred to
+as the `Sh*()` interface, as all the entry points start `Sh`.
+
+The `Sh*()` interface takes a "compiler" call-back object, which it calls after
+building call back that is passed the AST and can then execute a backend on it.
+
+The following is a simplified resulting run-time call stack:
+
+```c
+ShCompile(shader, compiler) -> compiler(AST) -> <back end>
+```
+
+In practice, `ShCompile()` takes shader strings, default version, and
+warning/error and other options for controlling compilation.
+
+Basic Internal Operation
+------------------------
+
+* Initial lexical analysis is done by the preprocessor in
+ `MachineIndependent/Preprocessor`, and then refined by a GLSL scanner
+ in `MachineIndependent/Scan.cpp`. There is currently no use of flex.
+
+* Code is parsed using bison on `MachineIndependent/glslang.y` with the
+ aid of a symbol table and an AST. The symbol table is not passed on to
+ the back-end; the intermediate representation stands on its own.
+ The tree is built by the grammar productions, many of which are
+ offloaded into `ParseHelper.cpp`, and by `Intermediate.cpp`.
+
+* The intermediate representation is very high-level, and represented
+ as an in-memory tree. This serves to lose no information from the
+ original program, and to have efficient transfer of the result from
+ parsing to the back-end. In the AST, constants are propogated and
+ folded, and a very small amount of dead code is eliminated.
+
+ To aid linking and reflection, the last top-level branch in the AST
+ lists all global symbols.
+
+* The primary algorithm of the back-end compiler is to traverse the
+ tree (high-level intermediate representation), and create an internal
+ object code representation. There is an example of how to do this
+ in `MachineIndependent/intermOut.cpp`.
+
+* Reduction of the tree to a linear byte-code style low-level intermediate
+ representation is likely a good way to generate fully optimized code.
+
+* There is currently some dead old-style linker-type code still lying around.
+
+* Memory pool: parsing uses types derived from C++ `std` types, using a
+ custom allocator that puts them in a memory pool. This makes allocation
+ of individual container/contents just few cycles and deallocation free.
+ This pool is popped after the AST is made and processed.
+
+ The use is simple: if you are going to call `new`, there are three cases:
+
+ - the object comes from the pool (its base class has the macro
+ `POOL_ALLOCATOR_NEW_DELETE` in it) and you do not have to call `delete`
+
+ - it is a `TString`, in which case call `NewPoolTString()`, which gets
+ it from the pool, and there is no corresponding `delete`
+
+ - the object does not come from the pool, and you have to do normal
+ C++ memory management of what you `new`
+
+
+[cmake]: https://cmake.org/
+[bison]: https://www.gnu.org/software/bison/
+[googletest]: https://github.com/google/googletest
+[bison-gnu-win32]: http://gnuwin32.sourceforge.net/packages/bison.htm
diff --git a/chromium/third_party/glslang/src/SPIRV/CMakeLists.txt b/chromium/third_party/glslang/src/SPIRV/CMakeLists.txt
new file mode 100755
index 00000000000..5c169b141ad
--- /dev/null
+++ b/chromium/third_party/glslang/src/SPIRV/CMakeLists.txt
@@ -0,0 +1,29 @@
+set(SOURCES
+ GlslangToSpv.cpp
+ InReadableOrder.cpp
+ Logger.cpp
+ SpvBuilder.cpp
+ SPVRemapper.cpp
+ doc.cpp
+ disassemble.cpp)
+
+set(HEADERS
+ spirv.hpp
+ GLSL.std.450.h
+ GlslangToSpv.h
+ Logger.h
+ SpvBuilder.h
+ SPVRemapper.h
+ spvIR.h
+ doc.h
+ disassemble.h)
+
+add_library(SPIRV STATIC ${SOURCES} ${HEADERS})
+set_property(TARGET SPIRV PROPERTY FOLDER glslang)
+
+if(WIN32)
+ source_group("Source" FILES ${SOURCES} ${HEADERS})
+endif(WIN32)
+
+install(TARGETS SPIRV
+ ARCHIVE DESTINATION lib)
diff --git a/chromium/third_party/glslang/src/SPIRV/GLSL.std.450.h b/chromium/third_party/glslang/src/SPIRV/GLSL.std.450.h
new file mode 100755
index 00000000000..df31092bec0
--- /dev/null
+++ b/chromium/third_party/glslang/src/SPIRV/GLSL.std.450.h
@@ -0,0 +1,131 @@
+/*
+** Copyright (c) 2014-2016 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a copy
+** of this software and/or associated documentation files (the "Materials"),
+** to deal in the Materials without restriction, including without limitation
+** the rights to use, copy, modify, merge, publish, distribute, sublicense,
+** and/or sell copies of the Materials, and to permit persons to whom the
+** Materials are furnished to do so, subject to the following conditions:
+**
+** The above copyright notice and this permission notice shall be included in
+** all copies or substantial portions of the Materials.
+**
+** MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS KHRONOS
+** STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS SPECIFICATIONS AND
+** HEADER INFORMATION ARE LOCATED AT https://www.khronos.org/registry/
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+** OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+** FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+** THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+** LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+** FROM,OUT OF OR IN CONNECTION WITH THE MATERIALS OR THE USE OR OTHER DEALINGS
+** IN THE MATERIALS.
+*/
+
+#ifndef GLSLstd450_H
+#define GLSLstd450_H
+
+static const int GLSLstd450Version = 100;
+static const int GLSLstd450Revision = 1;
+
+enum GLSLstd450 {
+ GLSLstd450Bad = 0, // Don't use
+
+ GLSLstd450Round = 1,
+ GLSLstd450RoundEven = 2,
+ GLSLstd450Trunc = 3,
+ GLSLstd450FAbs = 4,
+ GLSLstd450SAbs = 5,
+ GLSLstd450FSign = 6,
+ GLSLstd450SSign = 7,
+ GLSLstd450Floor = 8,
+ GLSLstd450Ceil = 9,
+ GLSLstd450Fract = 10,
+
+ GLSLstd450Radians = 11,
+ GLSLstd450Degrees = 12,
+ GLSLstd450Sin = 13,
+ GLSLstd450Cos = 14,
+ GLSLstd450Tan = 15,
+ GLSLstd450Asin = 16,
+ GLSLstd450Acos = 17,
+ GLSLstd450Atan = 18,
+ GLSLstd450Sinh = 19,
+ GLSLstd450Cosh = 20,
+ GLSLstd450Tanh = 21,
+ GLSLstd450Asinh = 22,
+ GLSLstd450Acosh = 23,
+ GLSLstd450Atanh = 24,
+ GLSLstd450Atan2 = 25,
+
+ GLSLstd450Pow = 26,
+ GLSLstd450Exp = 27,
+ GLSLstd450Log = 28,
+ GLSLstd450Exp2 = 29,
+ GLSLstd450Log2 = 30,
+ GLSLstd450Sqrt = 31,
+ GLSLstd450InverseSqrt = 32,
+
+ GLSLstd450Determinant = 33,
+ GLSLstd450MatrixInverse = 34,
+
+ GLSLstd450Modf = 35, // second operand needs an OpVariable to write to
+ GLSLstd450ModfStruct = 36, // no OpVariable operand
+ GLSLstd450FMin = 37,
+ GLSLstd450UMin = 38,
+ GLSLstd450SMin = 39,
+ GLSLstd450FMax = 40,
+ GLSLstd450UMax = 41,
+ GLSLstd450SMax = 42,
+ GLSLstd450FClamp = 43,
+ GLSLstd450UClamp = 44,
+ GLSLstd450SClamp = 45,
+ GLSLstd450FMix = 46,
+ GLSLstd450IMix = 47, // Reserved
+ GLSLstd450Step = 48,
+ GLSLstd450SmoothStep = 49,
+
+ GLSLstd450Fma = 50,
+ GLSLstd450Frexp = 51, // second operand needs an OpVariable to write to
+ GLSLstd450FrexpStruct = 52, // no OpVariable operand
+ GLSLstd450Ldexp = 53,
+
+ GLSLstd450PackSnorm4x8 = 54,
+ GLSLstd450PackUnorm4x8 = 55,
+ GLSLstd450PackSnorm2x16 = 56,
+ GLSLstd450PackUnorm2x16 = 57,
+ GLSLstd450PackHalf2x16 = 58,
+ GLSLstd450PackDouble2x32 = 59,
+ GLSLstd450UnpackSnorm2x16 = 60,
+ GLSLstd450UnpackUnorm2x16 = 61,
+ GLSLstd450UnpackHalf2x16 = 62,
+ GLSLstd450UnpackSnorm4x8 = 63,
+ GLSLstd450UnpackUnorm4x8 = 64,
+ GLSLstd450UnpackDouble2x32 = 65,
+
+ GLSLstd450Length = 66,
+ GLSLstd450Distance = 67,
+ GLSLstd450Cross = 68,
+ GLSLstd450Normalize = 69,
+ GLSLstd450FaceForward = 70,
+ GLSLstd450Reflect = 71,
+ GLSLstd450Refract = 72,
+
+ GLSLstd450FindILsb = 73,
+ GLSLstd450FindSMsb = 74,
+ GLSLstd450FindUMsb = 75,
+
+ GLSLstd450InterpolateAtCentroid = 76,
+ GLSLstd450InterpolateAtSample = 77,
+ GLSLstd450InterpolateAtOffset = 78,
+
+ GLSLstd450NMin = 79,
+ GLSLstd450NMax = 80,
+ GLSLstd450NClamp = 81,
+
+ GLSLstd450Count
+};
+
+#endif // #ifndef GLSLstd450_H
diff --git a/chromium/third_party/glslang/src/SPIRV/GlslangToSpv.cpp b/chromium/third_party/glslang/src/SPIRV/GlslangToSpv.cpp
new file mode 100755
index 00000000000..0324468cb35
--- /dev/null
+++ b/chromium/third_party/glslang/src/SPIRV/GlslangToSpv.cpp
@@ -0,0 +1,4389 @@
+//
+//Copyright (C) 2014-2016 LunarG, Inc.
+//Copyright (C) 2015-2016 Google, 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:
+//
+// Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 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.
+//
+// Neither the name of 3Dlabs Inc. Ltd. nor the names of its
+// contributors may be used to endorse or promote products derived
+// from this software without specific prior written permission.
+//
+//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+//"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 THE
+//COPYRIGHT HOLDERS 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.
+
+//
+// Visit the nodes in the glslang intermediate tree representation to
+// translate them to SPIR-V.
+//
+
+#include "spirv.hpp"
+#include "GlslangToSpv.h"
+#include "SpvBuilder.h"
+namespace spv {
+ #include "GLSL.std.450.h"
+}
+
+// Glslang includes
+#include "../glslang/MachineIndependent/localintermediate.h"
+#include "../glslang/MachineIndependent/SymbolTable.h"
+#include "../glslang/Include/Common.h"
+
+#include <fstream>
+#include <list>
+#include <map>
+#include <stack>
+#include <string>
+#include <vector>
+
+namespace {
+
+// For low-order part of the generator's magic number. Bump up
+// when there is a change in the style (e.g., if SSA form changes,
+// or a different instruction sequence to do something gets used).
+const int GeneratorVersion = 1;
+
+namespace {
+class SpecConstantOpModeGuard {
+public:
+ SpecConstantOpModeGuard(spv::Builder* builder)
+ : builder_(builder) {
+ previous_flag_ = builder->isInSpecConstCodeGenMode();
+ }
+ ~SpecConstantOpModeGuard() {
+ previous_flag_ ? builder_->setToSpecConstCodeGenMode()
+ : builder_->setToNormalCodeGenMode();
+ }
+ void turnOnSpecConstantOpMode() {
+ builder_->setToSpecConstCodeGenMode();
+ }
+
+private:
+ spv::Builder* builder_;
+ bool previous_flag_;
+};
+}
+
+//
+// The main holder of information for translating glslang to SPIR-V.
+//
+// Derives from the AST walking base class.
+//
+class TGlslangToSpvTraverser : public glslang::TIntermTraverser {
+public:
+ TGlslangToSpvTraverser(const glslang::TIntermediate*, spv::SpvBuildLogger* logger);
+ virtual ~TGlslangToSpvTraverser();
+
+ bool visitAggregate(glslang::TVisit, glslang::TIntermAggregate*);
+ bool visitBinary(glslang::TVisit, glslang::TIntermBinary*);
+ void visitConstantUnion(glslang::TIntermConstantUnion*);
+ bool visitSelection(glslang::TVisit, glslang::TIntermSelection*);
+ bool visitSwitch(glslang::TVisit, glslang::TIntermSwitch*);
+ void visitSymbol(glslang::TIntermSymbol* symbol);
+ bool visitUnary(glslang::TVisit, glslang::TIntermUnary*);
+ bool visitLoop(glslang::TVisit, glslang::TIntermLoop*);
+ bool visitBranch(glslang::TVisit visit, glslang::TIntermBranch*);
+
+ void dumpSpv(std::vector<unsigned int>& out);
+
+protected:
+ spv::Decoration TranslateAuxiliaryStorageDecoration(const glslang::TQualifier& qualifier);
+ spv::BuiltIn TranslateBuiltInDecoration(glslang::TBuiltInVariable, bool memberDeclaration);
+ spv::ImageFormat TranslateImageFormat(const glslang::TType& type);
+ spv::Id createSpvVariable(const glslang::TIntermSymbol*);
+ spv::Id getSampledType(const glslang::TSampler&);
+ spv::Id convertGlslangToSpvType(const glslang::TType& type);
+ spv::Id convertGlslangToSpvType(const glslang::TType& type, glslang::TLayoutPacking, const glslang::TQualifier&);
+ spv::Id makeArraySizeId(const glslang::TArraySizes&, int dim);
+ spv::Id accessChainLoad(const glslang::TType& type);
+ void accessChainStore(const glslang::TType& type, spv::Id rvalue);
+ glslang::TLayoutPacking getExplicitLayout(const glslang::TType& type) const;
+ int getArrayStride(const glslang::TType& arrayType, glslang::TLayoutPacking, glslang::TLayoutMatrix);
+ int getMatrixStride(const glslang::TType& matrixType, glslang::TLayoutPacking, glslang::TLayoutMatrix);
+ void updateMemberOffset(const glslang::TType& structType, const glslang::TType& memberType, int& currentOffset, int& nextOffset, glslang::TLayoutPacking, glslang::TLayoutMatrix);
+ void declareUseOfStructMember(const glslang::TTypeList& members, int glslangMember);
+
+ bool isShaderEntrypoint(const glslang::TIntermAggregate* node);
+ void makeFunctions(const glslang::TIntermSequence&);
+ void makeGlobalInitializers(const glslang::TIntermSequence&);
+ void visitFunctions(const glslang::TIntermSequence&);
+ void handleFunctionEntry(const glslang::TIntermAggregate* node);
+ void translateArguments(const glslang::TIntermAggregate& node, std::vector<spv::Id>& arguments);
+ void translateArguments(glslang::TIntermUnary& node, std::vector<spv::Id>& arguments);
+ spv::Id createImageTextureFunctionCall(glslang::TIntermOperator* node);
+ spv::Id handleUserFunctionCall(const glslang::TIntermAggregate*);
+
+ spv::Id createBinaryOperation(glslang::TOperator op, spv::Decoration precision, spv::Decoration noContraction, spv::Id typeId, spv::Id left, spv::Id right, glslang::TBasicType typeProxy, bool reduceComparison = true);
+ spv::Id createBinaryMatrixOperation(spv::Op, spv::Decoration precision, spv::Decoration noContraction, spv::Id typeId, spv::Id left, spv::Id right);
+ spv::Id createUnaryOperation(glslang::TOperator op, spv::Decoration precision, spv::Decoration noContraction, spv::Id typeId, spv::Id operand,glslang::TBasicType typeProxy);
+ spv::Id createUnaryMatrixOperation(spv::Op, spv::Decoration precision, spv::Decoration noContraction, spv::Id typeId, spv::Id operand,glslang::TBasicType typeProxy);
+ spv::Id createConversion(glslang::TOperator op, spv::Decoration precision, spv::Decoration noContraction, spv::Id destTypeId, spv::Id operand, glslang::TBasicType typeProxy);
+ spv::Id makeSmearedConstant(spv::Id constant, int vectorSize);
+ spv::Id createAtomicOperation(glslang::TOperator op, spv::Decoration precision, spv::Id typeId, std::vector<spv::Id>& operands, glslang::TBasicType typeProxy);
+ spv::Id createInvocationsOperation(glslang::TOperator, spv::Id typeId, spv::Id operand);
+ spv::Id createMiscOperation(glslang::TOperator op, spv::Decoration precision, spv::Id typeId, std::vector<spv::Id>& operands, glslang::TBasicType typeProxy);
+ spv::Id createNoArgOperation(glslang::TOperator op);
+ spv::Id getSymbolId(const glslang::TIntermSymbol* node);
+ void addDecoration(spv::Id id, spv::Decoration dec);
+ void addDecoration(spv::Id id, spv::Decoration dec, unsigned value);
+ void addMemberDecoration(spv::Id id, int member, spv::Decoration dec);
+ void addMemberDecoration(spv::Id id, int member, spv::Decoration dec, unsigned value);
+ spv::Id createSpvConstant(const glslang::TIntermTyped&);
+ spv::Id createSpvConstantFromConstUnionArray(const glslang::TType& type, const glslang::TConstUnionArray&, int& nextConst, bool specConstant);
+ bool isTrivialLeaf(const glslang::TIntermTyped* node);
+ bool isTrivial(const glslang::TIntermTyped* node);
+ spv::Id createShortCircuit(glslang::TOperator, glslang::TIntermTyped& left, glslang::TIntermTyped& right);
+
+ spv::Function* shaderEntry;
+ spv::Instruction* entryPoint;
+ int sequenceDepth;
+
+ spv::SpvBuildLogger* logger;
+
+ // There is a 1:1 mapping between a spv builder and a module; this is thread safe
+ spv::Builder builder;
+ bool inMain;
+ bool mainTerminated;
+ bool linkageOnly; // true when visiting the set of objects in the AST present only for establishing interface, whether or not they were statically used
+ std::set<spv::Id> iOSet; // all input/output variables from either static use or declaration of interface
+ const glslang::TIntermediate* glslangIntermediate;
+ spv::Id stdBuiltins;
+
+ std::unordered_map<int, spv::Id> symbolValues;
+ std::unordered_set<int> constReadOnlyParameters; // set of formal function parameters that have glslang qualifier constReadOnly, so we know they are not local function "const" that are write-once
+ std::unordered_map<std::string, spv::Function*> functionMap;
+ std::unordered_map<const glslang::TTypeList*, spv::Id> structMap[glslang::ElpCount][glslang::ElmCount];
+ std::unordered_map<const glslang::TTypeList*, std::vector<int> > memberRemapper; // for mapping glslang block indices to spv indices (e.g., due to hidden members)
+ std::stack<bool> breakForLoop; // false means break for switch
+};
+
+//
+// Helper functions for translating glslang representations to SPIR-V enumerants.
+//
+
+// Translate glslang profile to SPIR-V source language.
+spv::SourceLanguage TranslateSourceLanguage(glslang::EShSource source, EProfile profile)
+{
+ switch (source) {
+ case glslang::EShSourceGlsl:
+ switch (profile) {
+ case ENoProfile:
+ case ECoreProfile:
+ case ECompatibilityProfile:
+ return spv::SourceLanguageGLSL;
+ case EEsProfile:
+ return spv::SourceLanguageESSL;
+ default:
+ return spv::SourceLanguageUnknown;
+ }
+ case glslang::EShSourceHlsl:
+ return spv::SourceLanguageHLSL;
+ default:
+ return spv::SourceLanguageUnknown;
+ }
+}
+
+// Translate glslang language (stage) to SPIR-V execution model.
+spv::ExecutionModel TranslateExecutionModel(EShLanguage stage)
+{
+ switch (stage) {
+ case EShLangVertex: return spv::ExecutionModelVertex;
+ case EShLangTessControl: return spv::ExecutionModelTessellationControl;
+ case EShLangTessEvaluation: return spv::ExecutionModelTessellationEvaluation;
+ case EShLangGeometry: return spv::ExecutionModelGeometry;
+ case EShLangFragment: return spv::ExecutionModelFragment;
+ case EShLangCompute: return spv::ExecutionModelGLCompute;
+ default:
+ assert(0);
+ return spv::ExecutionModelFragment;
+ }
+}
+
+// Translate glslang type to SPIR-V storage class.
+spv::StorageClass TranslateStorageClass(const glslang::TType& type)
+{
+ if (type.getQualifier().isPipeInput())
+ return spv::StorageClassInput;
+ else if (type.getQualifier().isPipeOutput())
+ return spv::StorageClassOutput;
+ else if (type.getBasicType() == glslang::EbtSampler)
+ return spv::StorageClassUniformConstant;
+ else if (type.getBasicType() == glslang::EbtAtomicUint)
+ return spv::StorageClassAtomicCounter;
+ else if (type.getQualifier().isUniformOrBuffer()) {
+ if (type.getQualifier().layoutPushConstant)
+ return spv::StorageClassPushConstant;
+ if (type.getBasicType() == glslang::EbtBlock)
+ return spv::StorageClassUniform;
+ else
+ return spv::StorageClassUniformConstant;
+ // TODO: how are we distuingishing between default and non-default non-writable uniforms? Do default uniforms even exist?
+ } else {
+ switch (type.getQualifier().storage) {
+ case glslang::EvqShared: return spv::StorageClassWorkgroup; break;
+ case glslang::EvqGlobal: return spv::StorageClassPrivate;
+ case glslang::EvqConstReadOnly: return spv::StorageClassFunction;
+ case glslang::EvqTemporary: return spv::StorageClassFunction;
+ default:
+ assert(0);
+ return spv::StorageClassFunction;
+ }
+ }
+}
+
+// Translate glslang sampler type to SPIR-V dimensionality.
+spv::Dim TranslateDimensionality(const glslang::TSampler& sampler)
+{
+ switch (sampler.dim) {
+ case glslang::Esd1D: return spv::Dim1D;
+ case glslang::Esd2D: return spv::Dim2D;
+ case glslang::Esd3D: return spv::Dim3D;
+ case glslang::EsdCube: return spv::DimCube;
+ case glslang::EsdRect: return spv::DimRect;
+ case glslang::EsdBuffer: return spv::DimBuffer;
+ case glslang::EsdSubpass: return spv::DimSubpassData;
+ default:
+ assert(0);
+ return spv::Dim2D;
+ }
+}
+
+// Translate glslang type to SPIR-V precision decorations.
+spv::Decoration TranslatePrecisionDecoration(const glslang::TType& type)
+{
+ switch (type.getQualifier().precision) {
+ case glslang::EpqLow: return spv::DecorationRelaxedPrecision;
+ case glslang::EpqMedium: return spv::DecorationRelaxedPrecision;
+ default:
+ return spv::NoPrecision;
+ }
+}
+
+// Translate glslang type to SPIR-V block decorations.
+spv::Decoration TranslateBlockDecoration(const glslang::TType& type)
+{
+ if (type.getBasicType() == glslang::EbtBlock) {
+ switch (type.getQualifier().storage) {
+ case glslang::EvqUniform: return spv::DecorationBlock;
+ case glslang::EvqBuffer: return spv::DecorationBufferBlock;
+ case glslang::EvqVaryingIn: return spv::DecorationBlock;
+ case glslang::EvqVaryingOut: return spv::DecorationBlock;
+ default:
+ assert(0);
+ break;
+ }
+ }
+
+ return (spv::Decoration)spv::BadValue;
+}
+
+// Translate glslang type to SPIR-V memory decorations.
+void TranslateMemoryDecoration(const glslang::TQualifier& qualifier, std::vector<spv::Decoration>& memory)
+{
+ if (qualifier.coherent)
+ memory.push_back(spv::DecorationCoherent);
+ if (qualifier.volatil)
+ memory.push_back(spv::DecorationVolatile);
+ if (qualifier.restrict)
+ memory.push_back(spv::DecorationRestrict);
+ if (qualifier.readonly)
+ memory.push_back(spv::DecorationNonWritable);
+ if (qualifier.writeonly)
+ memory.push_back(spv::DecorationNonReadable);
+}
+
+// Translate glslang type to SPIR-V layout decorations.
+spv::Decoration TranslateLayoutDecoration(const glslang::TType& type, glslang::TLayoutMatrix matrixLayout)
+{
+ if (type.isMatrix()) {
+ switch (matrixLayout) {
+ case glslang::ElmRowMajor:
+ return spv::DecorationRowMajor;
+ case glslang::ElmColumnMajor:
+ return spv::DecorationColMajor;
+ default:
+ // opaque layouts don't need a majorness
+ return (spv::Decoration)spv::BadValue;
+ }
+ } else {
+ switch (type.getBasicType()) {
+ default:
+ return (spv::Decoration)spv::BadValue;
+ break;
+ case glslang::EbtBlock:
+ switch (type.getQualifier().storage) {
+ case glslang::EvqUniform:
+ case glslang::EvqBuffer:
+ switch (type.getQualifier().layoutPacking) {
+ case glslang::ElpShared: return spv::DecorationGLSLShared;
+ case glslang::ElpPacked: return spv::DecorationGLSLPacked;
+ default:
+ return (spv::Decoration)spv::BadValue;
+ }
+ case glslang::EvqVaryingIn:
+ case glslang::EvqVaryingOut:
+ assert(type.getQualifier().layoutPacking == glslang::ElpNone);
+ return (spv::Decoration)spv::BadValue;
+ default:
+ assert(0);
+ return (spv::Decoration)spv::BadValue;
+ }
+ }
+ }
+}
+
+// Translate glslang type to SPIR-V interpolation decorations.
+// Returns spv::Decoration(spv::BadValue) when no decoration
+// should be applied.
+spv::Decoration TranslateInterpolationDecoration(const glslang::TQualifier& qualifier)
+{
+ if (qualifier.smooth)
+ // Smooth decoration doesn't exist in SPIR-V 1.0
+ return (spv::Decoration)spv::BadValue;
+ else if (qualifier.nopersp)
+ return spv::DecorationNoPerspective;
+ else if (qualifier.flat)
+ return spv::DecorationFlat;
+ else
+ return (spv::Decoration)spv::BadValue;
+}
+
+// Translate glslang type to SPIR-V auxiliary storage decorations.
+// Returns spv::Decoration(spv::BadValue) when no decoration
+// should be applied.
+spv::Decoration TGlslangToSpvTraverser::TranslateAuxiliaryStorageDecoration(const glslang::TQualifier& qualifier)
+{
+ if (qualifier.patch)
+ return spv::DecorationPatch;
+ else if (qualifier.centroid)
+ return spv::DecorationCentroid;
+ else if (qualifier.sample) {
+ builder.addCapability(spv::CapabilitySampleRateShading);
+ return spv::DecorationSample;
+ } else
+ return (spv::Decoration)spv::BadValue;
+}
+
+// If glslang type is invariant, return SPIR-V invariant decoration.
+spv::Decoration TranslateInvariantDecoration(const glslang::TQualifier& qualifier)
+{
+ if (qualifier.invariant)
+ return spv::DecorationInvariant;
+ else
+ return (spv::Decoration)spv::BadValue;
+}
+
+// If glslang type is noContraction, return SPIR-V NoContraction decoration.
+spv::Decoration TranslateNoContractionDecoration(const glslang::TQualifier& qualifier)
+{
+ if (qualifier.noContraction)
+ return spv::DecorationNoContraction;
+ else
+ return (spv::Decoration)spv::BadValue;
+}
+
+// Translate a glslang built-in variable to a SPIR-V built in decoration. Also generate
+// associated capabilities when required. For some built-in variables, a capability
+// is generated only when using the variable in an executable instruction, but not when
+// just declaring a struct member variable with it. This is true for PointSize,
+// ClipDistance, and CullDistance.
+spv::BuiltIn TGlslangToSpvTraverser::TranslateBuiltInDecoration(glslang::TBuiltInVariable builtIn, bool memberDeclaration)
+{
+ switch (builtIn) {
+ case glslang::EbvPointSize:
+ // Defer adding the capability until the built-in is actually used.
+ if (!memberDeclaration) {
+ switch (glslangIntermediate->getStage()) {
+ case EShLangGeometry:
+ builder.addCapability(spv::CapabilityGeometryPointSize);
+ break;
+ case EShLangTessControl:
+ case EShLangTessEvaluation:
+ builder.addCapability(spv::CapabilityTessellationPointSize);
+ break;
+ default:
+ break;
+ }
+ }
+ return spv::BuiltInPointSize;
+
+ // These *Distance capabilities logically belong here, but if the member is declared and
+ // then never used, consumers of SPIR-V prefer the capability not be declared.
+ // They are now generated when used, rather than here when declared.
+ // Potentially, the specification should be more clear what the minimum
+ // use needed is to trigger the capability.
+ //
+ case glslang::EbvClipDistance:
+ if (!memberDeclaration)
+ builder.addCapability(spv::CapabilityClipDistance);
+ return spv::BuiltInClipDistance;
+
+ case glslang::EbvCullDistance:
+ if (!memberDeclaration)
+ builder.addCapability(spv::CapabilityCullDistance);
+ return spv::BuiltInCullDistance;
+
+ case glslang::EbvViewportIndex:
+ builder.addCapability(spv::CapabilityMultiViewport);
+ return spv::BuiltInViewportIndex;
+
+ case glslang::EbvSampleId:
+ builder.addCapability(spv::CapabilitySampleRateShading);
+ return spv::BuiltInSampleId;
+
+ case glslang::EbvSamplePosition:
+ builder.addCapability(spv::CapabilitySampleRateShading);
+ return spv::BuiltInSamplePosition;
+
+ case glslang::EbvSampleMask:
+ builder.addCapability(spv::CapabilitySampleRateShading);
+ return spv::BuiltInSampleMask;
+
+ case glslang::EbvPosition: return spv::BuiltInPosition;
+ case glslang::EbvVertexId: return spv::BuiltInVertexId;
+ case glslang::EbvInstanceId: return spv::BuiltInInstanceId;
+ case glslang::EbvVertexIndex: return spv::BuiltInVertexIndex;
+ case glslang::EbvInstanceIndex: return spv::BuiltInInstanceIndex;
+ case glslang::EbvBaseVertex:
+ case glslang::EbvBaseInstance:
+ case glslang::EbvDrawId:
+ // TODO: Add SPIR-V builtin ID.
+ logger->missingFunctionality("shader draw parameters");
+ return (spv::BuiltIn)spv::BadValue;
+ case glslang::EbvPrimitiveId: return spv::BuiltInPrimitiveId;
+ case glslang::EbvInvocationId: return spv::BuiltInInvocationId;
+ case glslang::EbvLayer: return spv::BuiltInLayer;
+ case glslang::EbvTessLevelInner: return spv::BuiltInTessLevelInner;
+ case glslang::EbvTessLevelOuter: return spv::BuiltInTessLevelOuter;
+ case glslang::EbvTessCoord: return spv::BuiltInTessCoord;
+ case glslang::EbvPatchVertices: return spv::BuiltInPatchVertices;
+ case glslang::EbvFragCoord: return spv::BuiltInFragCoord;
+ case glslang::EbvPointCoord: return spv::BuiltInPointCoord;
+ case glslang::EbvFace: return spv::BuiltInFrontFacing;
+ case glslang::EbvFragDepth: return spv::BuiltInFragDepth;
+ case glslang::EbvHelperInvocation: return spv::BuiltInHelperInvocation;
+ case glslang::EbvNumWorkGroups: return spv::BuiltInNumWorkgroups;
+ case glslang::EbvWorkGroupSize: return spv::BuiltInWorkgroupSize;
+ case glslang::EbvWorkGroupId: return spv::BuiltInWorkgroupId;
+ case glslang::EbvLocalInvocationId: return spv::BuiltInLocalInvocationId;
+ case glslang::EbvLocalInvocationIndex: return spv::BuiltInLocalInvocationIndex;
+ case glslang::EbvGlobalInvocationId: return spv::BuiltInGlobalInvocationId;
+ case glslang::EbvSubGroupSize:
+ case glslang::EbvSubGroupInvocation:
+ case glslang::EbvSubGroupEqMask:
+ case glslang::EbvSubGroupGeMask:
+ case glslang::EbvSubGroupGtMask:
+ case glslang::EbvSubGroupLeMask:
+ case glslang::EbvSubGroupLtMask:
+ // TODO: Add SPIR-V builtin ID.
+ logger->missingFunctionality("shader ballot");
+ return (spv::BuiltIn)spv::BadValue;
+ default: return (spv::BuiltIn)spv::BadValue;
+ }
+}
+
+// Translate glslang image layout format to SPIR-V image format.
+spv::ImageFormat TGlslangToSpvTraverser::TranslateImageFormat(const glslang::TType& type)
+{
+ assert(type.getBasicType() == glslang::EbtSampler);
+
+ // Check for capabilities
+ switch (type.getQualifier().layoutFormat) {
+ case glslang::ElfRg32f:
+ case glslang::ElfRg16f:
+ case glslang::ElfR11fG11fB10f:
+ case glslang::ElfR16f:
+ case glslang::ElfRgba16:
+ case glslang::ElfRgb10A2:
+ case glslang::ElfRg16:
+ case glslang::ElfRg8:
+ case glslang::ElfR16:
+ case glslang::ElfR8:
+ case glslang::ElfRgba16Snorm:
+ case glslang::ElfRg16Snorm:
+ case glslang::ElfRg8Snorm:
+ case glslang::ElfR16Snorm:
+ case glslang::ElfR8Snorm:
+
+ case glslang::ElfRg32i:
+ case glslang::ElfRg16i:
+ case glslang::ElfRg8i:
+ case glslang::ElfR16i:
+ case glslang::ElfR8i:
+
+ case glslang::ElfRgb10a2ui:
+ case glslang::ElfRg32ui:
+ case glslang::ElfRg16ui:
+ case glslang::ElfRg8ui:
+ case glslang::ElfR16ui:
+ case glslang::ElfR8ui:
+ builder.addCapability(spv::CapabilityStorageImageExtendedFormats);
+ break;
+
+ default:
+ break;
+ }
+
+ // do the translation
+ switch (type.getQualifier().layoutFormat) {
+ case glslang::ElfNone: return spv::ImageFormatUnknown;
+ case glslang::ElfRgba32f: return spv::ImageFormatRgba32f;
+ case glslang::ElfRgba16f: return spv::ImageFormatRgba16f;
+ case glslang::ElfR32f: return spv::ImageFormatR32f;
+ case glslang::ElfRgba8: return spv::ImageFormatRgba8;
+ case glslang::ElfRgba8Snorm: return spv::ImageFormatRgba8Snorm;
+ case glslang::ElfRg32f: return spv::ImageFormatRg32f;
+ case glslang::ElfRg16f: return spv::ImageFormatRg16f;
+ case glslang::ElfR11fG11fB10f: return spv::ImageFormatR11fG11fB10f;
+ case glslang::ElfR16f: return spv::ImageFormatR16f;
+ case glslang::ElfRgba16: return spv::ImageFormatRgba16;
+ case glslang::ElfRgb10A2: return spv::ImageFormatRgb10A2;
+ case glslang::ElfRg16: return spv::ImageFormatRg16;
+ case glslang::ElfRg8: return spv::ImageFormatRg8;
+ case glslang::ElfR16: return spv::ImageFormatR16;
+ case glslang::ElfR8: return spv::ImageFormatR8;
+ case glslang::ElfRgba16Snorm: return spv::ImageFormatRgba16Snorm;
+ case glslang::ElfRg16Snorm: return spv::ImageFormatRg16Snorm;
+ case glslang::ElfRg8Snorm: return spv::ImageFormatRg8Snorm;
+ case glslang::ElfR16Snorm: return spv::ImageFormatR16Snorm;
+ case glslang::ElfR8Snorm: return spv::ImageFormatR8Snorm;
+ case glslang::ElfRgba32i: return spv::ImageFormatRgba32i;
+ case glslang::ElfRgba16i: return spv::ImageFormatRgba16i;
+ case glslang::ElfRgba8i: return spv::ImageFormatRgba8i;
+ case glslang::ElfR32i: return spv::ImageFormatR32i;
+ case glslang::ElfRg32i: return spv::ImageFormatRg32i;
+ case glslang::ElfRg16i: return spv::ImageFormatRg16i;
+ case glslang::ElfRg8i: return spv::ImageFormatRg8i;
+ case glslang::ElfR16i: return spv::ImageFormatR16i;
+ case glslang::ElfR8i: return spv::ImageFormatR8i;
+ case glslang::ElfRgba32ui: return spv::ImageFormatRgba32ui;
+ case glslang::ElfRgba16ui: return spv::ImageFormatRgba16ui;
+ case glslang::ElfRgba8ui: return spv::ImageFormatRgba8ui;
+ case glslang::ElfR32ui: return spv::ImageFormatR32ui;
+ case glslang::ElfRg32ui: return spv::ImageFormatRg32ui;
+ case glslang::ElfRg16ui: return spv::ImageFormatRg16ui;
+ case glslang::ElfRgb10a2ui: return spv::ImageFormatRgb10a2ui;
+ case glslang::ElfRg8ui: return spv::ImageFormatRg8ui;
+ case glslang::ElfR16ui: return spv::ImageFormatR16ui;
+ case glslang::ElfR8ui: return spv::ImageFormatR8ui;
+ default: return (spv::ImageFormat)spv::BadValue;
+ }
+}
+
+// Return whether or not the given type is something that should be tied to a
+// descriptor set.
+bool IsDescriptorResource(const glslang::TType& type)
+{
+ // uniform and buffer blocks are included, unless it is a push_constant
+ if (type.getBasicType() == glslang::EbtBlock)
+ return type.getQualifier().isUniformOrBuffer() && ! type.getQualifier().layoutPushConstant;
+
+ // non block...
+ // basically samplerXXX/subpass/sampler/texture are all included
+ // if they are the global-scope-class, not the function parameter
+ // (or local, if they ever exist) class.
+ if (type.getBasicType() == glslang::EbtSampler)
+ return type.getQualifier().isUniformOrBuffer();
+
+ // None of the above.
+ return false;
+}
+
+void InheritQualifiers(glslang::TQualifier& child, const glslang::TQualifier& parent)
+{
+ if (child.layoutMatrix == glslang::ElmNone)
+ child.layoutMatrix = parent.layoutMatrix;
+
+ if (parent.invariant)
+ child.invariant = true;
+ if (parent.nopersp)
+ child.nopersp = true;
+ if (parent.flat)
+ child.flat = true;
+ if (parent.centroid)
+ child.centroid = true;
+ if (parent.patch)
+ child.patch = true;
+ if (parent.sample)
+ child.sample = true;
+ if (parent.coherent)
+ child.coherent = true;
+ if (parent.volatil)
+ child.volatil = true;
+ if (parent.restrict)
+ child.restrict = true;
+ if (parent.readonly)
+ child.readonly = true;
+ if (parent.writeonly)
+ child.writeonly = true;
+}
+
+bool HasNonLayoutQualifiers(const glslang::TQualifier& qualifier)
+{
+ // This should list qualifiers that simultaneous satisfy:
+ // - struct members can inherit from a struct declaration
+ // - effect decorations on the struct members (note smooth does not, and expecting something like volatile to effect the whole object)
+ // - are not part of the offset/st430/etc or row/column-major layout
+ return qualifier.invariant || qualifier.nopersp || qualifier.flat || qualifier.centroid || qualifier.patch || qualifier.sample || qualifier.hasLocation();
+}
+
+//
+// Implement the TGlslangToSpvTraverser class.
+//
+
+TGlslangToSpvTraverser::TGlslangToSpvTraverser(const glslang::TIntermediate* glslangIntermediate, spv::SpvBuildLogger* buildLogger)
+ : TIntermTraverser(true, false, true), shaderEntry(0), sequenceDepth(0), logger(buildLogger),
+ builder((glslang::GetKhronosToolId() << 16) | GeneratorVersion, logger),
+ inMain(false), mainTerminated(false), linkageOnly(false),
+ glslangIntermediate(glslangIntermediate)
+{
+ spv::ExecutionModel executionModel = TranslateExecutionModel(glslangIntermediate->getStage());
+
+ builder.clearAccessChain();
+ builder.setSource(TranslateSourceLanguage(glslangIntermediate->getSource(), glslangIntermediate->getProfile()), glslangIntermediate->getVersion());
+ stdBuiltins = builder.import("GLSL.std.450");
+ builder.setMemoryModel(spv::AddressingModelLogical, spv::MemoryModelGLSL450);
+ shaderEntry = builder.makeEntrypoint(glslangIntermediate->getEntryPoint().c_str());
+ entryPoint = builder.addEntryPoint(executionModel, shaderEntry, glslangIntermediate->getEntryPoint().c_str());
+
+ // Add the source extensions
+ const auto& sourceExtensions = glslangIntermediate->getRequestedExtensions();
+ for (auto it = sourceExtensions.begin(); it != sourceExtensions.end(); ++it)
+ builder.addSourceExtension(it->c_str());
+
+ // Add the top-level modes for this shader.
+
+ if (glslangIntermediate->getXfbMode()) {
+ builder.addCapability(spv::CapabilityTransformFeedback);
+ builder.addExecutionMode(shaderEntry, spv::ExecutionModeXfb);
+ }
+
+ unsigned int mode;
+ switch (glslangIntermediate->getStage()) {
+ case EShLangVertex:
+ builder.addCapability(spv::CapabilityShader);
+ break;
+
+ case EShLangTessControl:
+ builder.addCapability(spv::CapabilityTessellation);
+ builder.addExecutionMode(shaderEntry, spv::ExecutionModeOutputVertices, glslangIntermediate->getVertices());
+ break;
+
+ case EShLangTessEvaluation:
+ builder.addCapability(spv::CapabilityTessellation);
+ switch (glslangIntermediate->getInputPrimitive()) {
+ case glslang::ElgTriangles: mode = spv::ExecutionModeTriangles; break;
+ case glslang::ElgQuads: mode = spv::ExecutionModeQuads; break;
+ case glslang::ElgIsolines: mode = spv::ExecutionModeIsolines; break;
+ default: mode = spv::BadValue; break;
+ }
+ if (mode != spv::BadValue)
+ builder.addExecutionMode(shaderEntry, (spv::ExecutionMode)mode);
+
+ switch (glslangIntermediate->getVertexSpacing()) {
+ case glslang::EvsEqual: mode = spv::ExecutionModeSpacingEqual; break;
+ case glslang::EvsFractionalEven: mode = spv::ExecutionModeSpacingFractionalEven; break;
+ case glslang::EvsFractionalOdd: mode = spv::ExecutionModeSpacingFractionalOdd; break;
+ default: mode = spv::BadValue; break;
+ }
+ if (mode != spv::BadValue)
+ builder.addExecutionMode(shaderEntry, (spv::ExecutionMode)mode);
+
+ switch (glslangIntermediate->getVertexOrder()) {
+ case glslang::EvoCw: mode = spv::ExecutionModeVertexOrderCw; break;
+ case glslang::EvoCcw: mode = spv::ExecutionModeVertexOrderCcw; break;
+ default: mode = spv::BadValue; break;
+ }
+ if (mode != spv::BadValue)
+ builder.addExecutionMode(shaderEntry, (spv::ExecutionMode)mode);
+
+ if (glslangIntermediate->getPointMode())
+ builder.addExecutionMode(shaderEntry, spv::ExecutionModePointMode);
+ break;
+
+ case EShLangGeometry:
+ builder.addCapability(spv::CapabilityGeometry);
+ switch (glslangIntermediate->getInputPrimitive()) {
+ case glslang::ElgPoints: mode = spv::ExecutionModeInputPoints; break;
+ case glslang::ElgLines: mode = spv::ExecutionModeInputLines; break;
+ case glslang::ElgLinesAdjacency: mode = spv::ExecutionModeInputLinesAdjacency; break;
+ case glslang::ElgTriangles: mode = spv::ExecutionModeTriangles; break;
+ case glslang::ElgTrianglesAdjacency: mode = spv::ExecutionModeInputTrianglesAdjacency; break;
+ default: mode = spv::BadValue; break;
+ }
+ if (mode != spv::BadValue)
+ builder.addExecutionMode(shaderEntry, (spv::ExecutionMode)mode);
+
+ builder.addExecutionMode(shaderEntry, spv::ExecutionModeInvocations, glslangIntermediate->getInvocations());
+
+ switch (glslangIntermediate->getOutputPrimitive()) {
+ case glslang::ElgPoints: mode = spv::ExecutionModeOutputPoints; break;
+ case glslang::ElgLineStrip: mode = spv::ExecutionModeOutputLineStrip; break;
+ case glslang::ElgTriangleStrip: mode = spv::ExecutionModeOutputTriangleStrip; break;
+ default: mode = spv::BadValue; break;
+ }
+ if (mode != spv::BadValue)
+ builder.addExecutionMode(shaderEntry, (spv::ExecutionMode)mode);
+ builder.addExecutionMode(shaderEntry, spv::ExecutionModeOutputVertices, glslangIntermediate->getVertices());
+ break;
+
+ case EShLangFragment:
+ builder.addCapability(spv::CapabilityShader);
+ if (glslangIntermediate->getPixelCenterInteger())
+ builder.addExecutionMode(shaderEntry, spv::ExecutionModePixelCenterInteger);
+
+ if (glslangIntermediate->getOriginUpperLeft())
+ builder.addExecutionMode(shaderEntry, spv::ExecutionModeOriginUpperLeft);
+ else
+ builder.addExecutionMode(shaderEntry, spv::ExecutionModeOriginLowerLeft);
+
+ if (glslangIntermediate->getEarlyFragmentTests())
+ builder.addExecutionMode(shaderEntry, spv::ExecutionModeEarlyFragmentTests);
+
+ switch(glslangIntermediate->getDepth()) {
+ case glslang::EldGreater: mode = spv::ExecutionModeDepthGreater; break;
+ case glslang::EldLess: mode = spv::ExecutionModeDepthLess; break;
+ default: mode = spv::BadValue; break;
+ }
+ if (mode != spv::BadValue)
+ builder.addExecutionMode(shaderEntry, (spv::ExecutionMode)mode);
+
+ if (glslangIntermediate->getDepth() != glslang::EldUnchanged && glslangIntermediate->isDepthReplacing())
+ builder.addExecutionMode(shaderEntry, spv::ExecutionModeDepthReplacing);
+ break;
+
+ case EShLangCompute:
+ builder.addCapability(spv::CapabilityShader);
+ builder.addExecutionMode(shaderEntry, spv::ExecutionModeLocalSize, glslangIntermediate->getLocalSize(0),
+ glslangIntermediate->getLocalSize(1),
+ glslangIntermediate->getLocalSize(2));
+ break;
+
+ default:
+ break;
+ }
+
+}
+
+// Finish everything and dump
+void TGlslangToSpvTraverser::dumpSpv(std::vector<unsigned int>& out)
+{
+ // finish off the entry-point SPV instruction by adding the Input/Output <id>
+ for (auto it = iOSet.cbegin(); it != iOSet.cend(); ++it)
+ entryPoint->addIdOperand(*it);
+
+ builder.eliminateDeadDecorations();
+ builder.dump(out);
+}
+
+TGlslangToSpvTraverser::~TGlslangToSpvTraverser()
+{
+ if (! mainTerminated) {
+ spv::Block* lastMainBlock = shaderEntry->getLastBlock();
+ builder.setBuildPoint(lastMainBlock);
+ builder.leaveFunction();
+ }
+}
+
+//
+// Implement the traversal functions.
+//
+// Return true from interior nodes to have the external traversal
+// continue on to children. Return false if children were
+// already processed.
+//
+
+//
+// Symbols can turn into
+// - uniform/input reads
+// - output writes
+// - complex lvalue base setups: foo.bar[3].... , where we see foo and start up an access chain
+// - something simple that degenerates into the last bullet
+//
+void TGlslangToSpvTraverser::visitSymbol(glslang::TIntermSymbol* symbol)
+{
+ SpecConstantOpModeGuard spec_constant_op_mode_setter(&builder);
+ if (symbol->getType().getQualifier().isSpecConstant())
+ spec_constant_op_mode_setter.turnOnSpecConstantOpMode();
+
+ // getSymbolId() will set up all the IO decorations on the first call.
+ // Formal function parameters were mapped during makeFunctions().
+ spv::Id id = getSymbolId(symbol);
+
+ // Include all "static use" and "linkage only" interface variables on the OpEntryPoint instruction
+ if (builder.isPointer(id)) {
+ spv::StorageClass sc = builder.getStorageClass(id);
+ if (sc == spv::StorageClassInput || sc == spv::StorageClassOutput)
+ iOSet.insert(id);
+ }
+
+ // Only process non-linkage-only nodes for generating actual static uses
+ if (! linkageOnly || symbol->getQualifier().isSpecConstant()) {
+ // Prepare to generate code for the access
+
+ // L-value chains will be computed left to right. We're on the symbol now,
+ // which is the left-most part of the access chain, so now is "clear" time,
+ // followed by setting the base.
+ builder.clearAccessChain();
+
+ // For now, we consider all user variables as being in memory, so they are pointers,
+ // except for
+ // A) "const in" arguments to a function, which are an intermediate object.
+ // See comments in handleUserFunctionCall().
+ // B) Specialization constants (normal constant don't even come in as a variable),
+ // These are also pure R-values.
+ glslang::TQualifier qualifier = symbol->getQualifier();
+ if ((qualifier.storage == glslang::EvqConstReadOnly && constReadOnlyParameters.find(symbol->getId()) != constReadOnlyParameters.end()) ||
+ qualifier.isSpecConstant())
+ builder.setAccessChainRValue(id);
+ else
+ builder.setAccessChainLValue(id);
+ }
+}
+
+bool TGlslangToSpvTraverser::visitBinary(glslang::TVisit /* visit */, glslang::TIntermBinary* node)
+{
+ SpecConstantOpModeGuard spec_constant_op_mode_setter(&builder);
+ if (node->getType().getQualifier().isSpecConstant())
+ spec_constant_op_mode_setter.turnOnSpecConstantOpMode();
+
+ // First, handle special cases
+ switch (node->getOp()) {
+ case glslang::EOpAssign:
+ case glslang::EOpAddAssign:
+ case glslang::EOpSubAssign:
+ case glslang::EOpMulAssign:
+ case glslang::EOpVectorTimesMatrixAssign:
+ case glslang::EOpVectorTimesScalarAssign:
+ case glslang::EOpMatrixTimesScalarAssign:
+ case glslang::EOpMatrixTimesMatrixAssign:
+ case glslang::EOpDivAssign:
+ case glslang::EOpModAssign:
+ case glslang::EOpAndAssign:
+ case glslang::EOpInclusiveOrAssign:
+ case glslang::EOpExclusiveOrAssign:
+ case glslang::EOpLeftShiftAssign:
+ case glslang::EOpRightShiftAssign:
+ // A bin-op assign "a += b" means the same thing as "a = a + b"
+ // where a is evaluated before b. For a simple assignment, GLSL
+ // says to evaluate the left before the right. So, always, left
+ // node then right node.
+ {
+ // get the left l-value, save it away
+ builder.clearAccessChain();
+ node->getLeft()->traverse(this);
+ spv::Builder::AccessChain lValue = builder.getAccessChain();
+
+ // evaluate the right
+ builder.clearAccessChain();
+ node->getRight()->traverse(this);
+ spv::Id rValue = accessChainLoad(node->getRight()->getType());
+
+ if (node->getOp() != glslang::EOpAssign) {
+ // the left is also an r-value
+ builder.setAccessChain(lValue);
+ spv::Id leftRValue = accessChainLoad(node->getLeft()->getType());
+
+ // do the operation
+ rValue = createBinaryOperation(node->getOp(), TranslatePrecisionDecoration(node->getType()),
+ TranslateNoContractionDecoration(node->getType().getQualifier()),
+ convertGlslangToSpvType(node->getType()), leftRValue, rValue,
+ node->getType().getBasicType());
+
+ // these all need their counterparts in createBinaryOperation()
+ assert(rValue != spv::NoResult);
+ }
+
+ // store the result
+ builder.setAccessChain(lValue);
+ accessChainStore(node->getType(), rValue);
+
+ // assignments are expressions having an rValue after they are evaluated...
+ builder.clearAccessChain();
+ builder.setAccessChainRValue(rValue);
+ }
+ return false;
+ case glslang::EOpIndexDirect:
+ case glslang::EOpIndexDirectStruct:
+ {
+ // Get the left part of the access chain.
+ node->getLeft()->traverse(this);
+
+ // Add the next element in the chain
+
+ const int glslangIndex = node->getRight()->getAsConstantUnion()->getConstArray()[0].getIConst();
+ if (! node->getLeft()->getType().isArray() &&
+ node->getLeft()->getType().isVector() &&
+ node->getOp() == glslang::EOpIndexDirect) {
+ // This is essentially a hard-coded vector swizzle of size 1,
+ // so short circuit the access-chain stuff with a swizzle.
+ std::vector<unsigned> swizzle;
+ swizzle.push_back(glslangIndex);
+ builder.accessChainPushSwizzle(swizzle, convertGlslangToSpvType(node->getLeft()->getType()));
+ } else {
+ int spvIndex = glslangIndex;
+ if (node->getLeft()->getBasicType() == glslang::EbtBlock &&
+ node->getOp() == glslang::EOpIndexDirectStruct)
+ {
+ // This may be, e.g., an anonymous block-member selection, which generally need
+ // index remapping due to hidden members in anonymous blocks.
+ std::vector<int>& remapper = memberRemapper[node->getLeft()->getType().getStruct()];
+ assert(remapper.size() > 0);
+ spvIndex = remapper[glslangIndex];
+ }
+
+ // normal case for indexing array or structure or block
+ builder.accessChainPush(builder.makeIntConstant(spvIndex));
+
+ // Add capabilities here for accessing PointSize and clip/cull distance.
+ // We have deferred generation of associated capabilities until now.
+ if (node->getLeft()->getType().isStruct() && ! node->getLeft()->getType().isArray())
+ declareUseOfStructMember(*(node->getLeft()->getType().getStruct()), glslangIndex);
+ }
+ }
+ return false;
+ case glslang::EOpIndexIndirect:
+ {
+ // Structure or array or vector indirection.
+ // Will use native SPIR-V access-chain for struct and array indirection;
+ // matrices are arrays of vectors, so will also work for a matrix.
+ // Will use the access chain's 'component' for variable index into a vector.
+
+ // This adapter is building access chains left to right.
+ // Set up the access chain to the left.
+ node->getLeft()->traverse(this);
+
+ // save it so that computing the right side doesn't trash it
+ spv::Builder::AccessChain partial = builder.getAccessChain();
+
+ // compute the next index in the chain
+ builder.clearAccessChain();
+ node->getRight()->traverse(this);
+ spv::Id index = accessChainLoad(node->getRight()->getType());
+
+ // restore the saved access chain
+ builder.setAccessChain(partial);
+
+ if (! node->getLeft()->getType().isArray() && node->getLeft()->getType().isVector())
+ builder.accessChainPushComponent(index, convertGlslangToSpvType(node->getLeft()->getType()));
+ else
+ builder.accessChainPush(index);
+ }
+ return false;
+ case glslang::EOpVectorSwizzle:
+ {
+ node->getLeft()->traverse(this);
+ glslang::TIntermSequence& swizzleSequence = node->getRight()->getAsAggregate()->getSequence();
+ std::vector<unsigned> swizzle;
+ for (int i = 0; i < (int)swizzleSequence.size(); ++i)
+ swizzle.push_back(swizzleSequence[i]->getAsConstantUnion()->getConstArray()[0].getIConst());
+ builder.accessChainPushSwizzle(swizzle, convertGlslangToSpvType(node->getLeft()->getType()));
+ }
+ return false;
+ case glslang::EOpLogicalOr:
+ case glslang::EOpLogicalAnd:
+ {
+
+ // These may require short circuiting, but can sometimes be done as straight
+ // binary operations. The right operand must be short circuited if it has
+ // side effects, and should probably be if it is complex.
+ if (isTrivial(node->getRight()->getAsTyped()))
+ break; // handle below as a normal binary operation
+ // otherwise, we need to do dynamic short circuiting on the right operand
+ spv::Id result = createShortCircuit(node->getOp(), *node->getLeft()->getAsTyped(), *node->getRight()->getAsTyped());
+ builder.clearAccessChain();
+ builder.setAccessChainRValue(result);
+ }
+ return false;
+ default:
+ break;
+ }
+
+ // Assume generic binary op...
+
+ // get right operand
+ builder.clearAccessChain();
+ node->getLeft()->traverse(this);
+ spv::Id left = accessChainLoad(node->getLeft()->getType());
+
+ // get left operand
+ builder.clearAccessChain();
+ node->getRight()->traverse(this);
+ spv::Id right = accessChainLoad(node->getRight()->getType());
+
+ // get result
+ spv::Id result = createBinaryOperation(node->getOp(), TranslatePrecisionDecoration(node->getType()),
+ TranslateNoContractionDecoration(node->getType().getQualifier()),
+ convertGlslangToSpvType(node->getType()), left, right,
+ node->getLeft()->getType().getBasicType());
+
+ builder.clearAccessChain();
+ if (! result) {
+ logger->missingFunctionality("unknown glslang binary operation");
+ return true; // pick up a child as the place-holder result
+ } else {
+ builder.setAccessChainRValue(result);
+ return false;
+ }
+}
+
+bool TGlslangToSpvTraverser::visitUnary(glslang::TVisit /* visit */, glslang::TIntermUnary* node)
+{
+ SpecConstantOpModeGuard spec_constant_op_mode_setter(&builder);
+ if (node->getType().getQualifier().isSpecConstant())
+ spec_constant_op_mode_setter.turnOnSpecConstantOpMode();
+
+ spv::Id result = spv::NoResult;
+
+ // try texturing first
+ result = createImageTextureFunctionCall(node);
+ if (result != spv::NoResult) {
+ builder.clearAccessChain();
+ builder.setAccessChainRValue(result);
+
+ return false; // done with this node
+ }
+
+ // Non-texturing.
+
+ if (node->getOp() == glslang::EOpArrayLength) {
+ // Quite special; won't want to evaluate the operand.
+
+ // Normal .length() would have been constant folded by the front-end.
+ // So, this has to be block.lastMember.length().
+ // SPV wants "block" and member number as the operands, go get them.
+ assert(node->getOperand()->getType().isRuntimeSizedArray());
+ glslang::TIntermTyped* block = node->getOperand()->getAsBinaryNode()->getLeft();
+ block->traverse(this);
+ unsigned int member = node->getOperand()->getAsBinaryNode()->getRight()->getAsConstantUnion()->getConstArray()[0].getUConst();
+ spv::Id length = builder.createArrayLength(builder.accessChainGetLValue(), member);
+
+ builder.clearAccessChain();
+ builder.setAccessChainRValue(length);
+
+ return false;
+ }
+
+ // Start by evaluating the operand
+
+ builder.clearAccessChain();
+ node->getOperand()->traverse(this);
+
+ spv::Id operand = spv::NoResult;
+
+ if (node->getOp() == glslang::EOpAtomicCounterIncrement ||
+ node->getOp() == glslang::EOpAtomicCounterDecrement ||
+ node->getOp() == glslang::EOpAtomicCounter ||
+ node->getOp() == glslang::EOpInterpolateAtCentroid)
+ operand = builder.accessChainGetLValue(); // Special case l-value operands
+ else
+ operand = accessChainLoad(node->getOperand()->getType());
+
+ spv::Decoration precision = TranslatePrecisionDecoration(node->getType());
+ spv::Decoration noContraction = TranslateNoContractionDecoration(node->getType().getQualifier());
+
+ // it could be a conversion
+ if (! result)
+ result = createConversion(node->getOp(), precision, noContraction, convertGlslangToSpvType(node->getType()), operand, node->getOperand()->getBasicType());
+
+ // if not, then possibly an operation
+ if (! result)
+ result = createUnaryOperation(node->getOp(), precision, noContraction, convertGlslangToSpvType(node->getType()), operand, node->getOperand()->getBasicType());
+
+ if (result) {
+ builder.clearAccessChain();
+ builder.setAccessChainRValue(result);
+
+ return false; // done with this node
+ }
+
+ // it must be a special case, check...
+ switch (node->getOp()) {
+ case glslang::EOpPostIncrement:
+ case glslang::EOpPostDecrement:
+ case glslang::EOpPreIncrement:
+ case glslang::EOpPreDecrement:
+ {
+ // we need the integer value "1" or the floating point "1.0" to add/subtract
+ spv::Id one = 0;
+ if (node->getBasicType() == glslang::EbtFloat)
+ one = builder.makeFloatConstant(1.0F);
+ else if (node->getBasicType() == glslang::EbtInt64 || node->getBasicType() == glslang::EbtUint64)
+ one = builder.makeInt64Constant(1);
+ else
+ one = builder.makeIntConstant(1);
+ glslang::TOperator op;
+ if (node->getOp() == glslang::EOpPreIncrement ||
+ node->getOp() == glslang::EOpPostIncrement)
+ op = glslang::EOpAdd;
+ else
+ op = glslang::EOpSub;
+
+ spv::Id result = createBinaryOperation(op, TranslatePrecisionDecoration(node->getType()),
+ TranslateNoContractionDecoration(node->getType().getQualifier()),
+ convertGlslangToSpvType(node->getType()), operand, one,
+ node->getType().getBasicType());
+ assert(result != spv::NoResult);
+
+ // The result of operation is always stored, but conditionally the
+ // consumed result. The consumed result is always an r-value.
+ builder.accessChainStore(result);
+ builder.clearAccessChain();
+ if (node->getOp() == glslang::EOpPreIncrement ||
+ node->getOp() == glslang::EOpPreDecrement)
+ builder.setAccessChainRValue(result);
+ else
+ builder.setAccessChainRValue(operand);
+ }
+
+ return false;
+
+ case glslang::EOpEmitStreamVertex:
+ builder.createNoResultOp(spv::OpEmitStreamVertex, operand);
+ return false;
+ case glslang::EOpEndStreamPrimitive:
+ builder.createNoResultOp(spv::OpEndStreamPrimitive, operand);
+ return false;
+
+ default:
+ logger->missingFunctionality("unknown glslang unary");
+ return true; // pick up operand as placeholder result
+ }
+}
+
+bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TIntermAggregate* node)
+{
+ SpecConstantOpModeGuard spec_constant_op_mode_setter(&builder);
+ if (node->getType().getQualifier().isSpecConstant())
+ spec_constant_op_mode_setter.turnOnSpecConstantOpMode();
+
+ spv::Id result = spv::NoResult;
+
+ // try texturing
+ result = createImageTextureFunctionCall(node);
+ if (result != spv::NoResult) {
+ builder.clearAccessChain();
+ builder.setAccessChainRValue(result);
+
+ return false;
+ } else if (node->getOp() == glslang::EOpImageStore) {
+ // "imageStore" is a special case, which has no result
+ return false;
+ }
+
+ glslang::TOperator binOp = glslang::EOpNull;
+ bool reduceComparison = true;
+ bool isMatrix = false;
+ bool noReturnValue = false;
+ bool atomic = false;
+
+ assert(node->getOp());
+
+ spv::Decoration precision = TranslatePrecisionDecoration(node->getType());
+
+ switch (node->getOp()) {
+ case glslang::EOpSequence:
+ {
+ if (preVisit)
+ ++sequenceDepth;
+ else
+ --sequenceDepth;
+
+ if (sequenceDepth == 1) {
+ // If this is the parent node of all the functions, we want to see them
+ // early, so all call points have actual SPIR-V functions to reference.
+ // In all cases, still let the traverser visit the children for us.
+ makeFunctions(node->getAsAggregate()->getSequence());
+
+ // Also, we want all globals initializers to go into the entry of main(), before
+ // anything else gets there, so visit out of order, doing them all now.
+ makeGlobalInitializers(node->getAsAggregate()->getSequence());
+
+ // Initializers are done, don't want to visit again, but functions link objects need to be processed,
+ // so do them manually.
+ visitFunctions(node->getAsAggregate()->getSequence());
+
+ return false;
+ }
+
+ return true;
+ }
+ case glslang::EOpLinkerObjects:
+ {
+ if (visit == glslang::EvPreVisit)
+ linkageOnly = true;
+ else
+ linkageOnly = false;
+
+ return true;
+ }
+ case glslang::EOpComma:
+ {
+ // processing from left to right naturally leaves the right-most
+ // lying around in the access chain
+ glslang::TIntermSequence& glslangOperands = node->getSequence();
+ for (int i = 0; i < (int)glslangOperands.size(); ++i)
+ glslangOperands[i]->traverse(this);
+
+ return false;
+ }
+ case glslang::EOpFunction:
+ if (visit == glslang::EvPreVisit) {
+ if (isShaderEntrypoint(node)) {
+ inMain = true;
+ builder.setBuildPoint(shaderEntry->getLastBlock());
+ } else {
+ handleFunctionEntry(node);
+ }
+ } else {
+ if (inMain)
+ mainTerminated = true;
+ builder.leaveFunction();
+ inMain = false;
+ }
+
+ return true;
+ case glslang::EOpParameters:
+ // Parameters will have been consumed by EOpFunction processing, but not
+ // the body, so we still visited the function node's children, making this
+ // child redundant.
+ return false;
+ case glslang::EOpFunctionCall:
+ {
+ if (node->isUserDefined())
+ result = handleUserFunctionCall(node);
+ //assert(result); // this can happen for bad shaders because the call graph completeness checking is not yet done
+ if (result) {
+ builder.clearAccessChain();
+ builder.setAccessChainRValue(result);
+ } else
+ logger->missingFunctionality("missing user function; linker needs to catch that");
+
+ return false;
+ }
+ case glslang::EOpConstructMat2x2:
+ case glslang::EOpConstructMat2x3:
+ case glslang::EOpConstructMat2x4:
+ case glslang::EOpConstructMat3x2:
+ case glslang::EOpConstructMat3x3:
+ case glslang::EOpConstructMat3x4:
+ case glslang::EOpConstructMat4x2:
+ case glslang::EOpConstructMat4x3:
+ case glslang::EOpConstructMat4x4:
+ case glslang::EOpConstructDMat2x2:
+ case glslang::EOpConstructDMat2x3:
+ case glslang::EOpConstructDMat2x4:
+ case glslang::EOpConstructDMat3x2:
+ case glslang::EOpConstructDMat3x3:
+ case glslang::EOpConstructDMat3x4:
+ case glslang::EOpConstructDMat4x2:
+ case glslang::EOpConstructDMat4x3:
+ case glslang::EOpConstructDMat4x4:
+ isMatrix = true;
+ // fall through
+ case glslang::EOpConstructFloat:
+ case glslang::EOpConstructVec2:
+ case glslang::EOpConstructVec3:
+ case glslang::EOpConstructVec4:
+ case glslang::EOpConstructDouble:
+ case glslang::EOpConstructDVec2:
+ case glslang::EOpConstructDVec3:
+ case glslang::EOpConstructDVec4:
+ case glslang::EOpConstructBool:
+ case glslang::EOpConstructBVec2:
+ case glslang::EOpConstructBVec3:
+ case glslang::EOpConstructBVec4:
+ case glslang::EOpConstructInt:
+ case glslang::EOpConstructIVec2:
+ case glslang::EOpConstructIVec3:
+ case glslang::EOpConstructIVec4:
+ case glslang::EOpConstructUint:
+ case glslang::EOpConstructUVec2:
+ case glslang::EOpConstructUVec3:
+ case glslang::EOpConstructUVec4:
+ case glslang::EOpConstructInt64:
+ case glslang::EOpConstructI64Vec2:
+ case glslang::EOpConstructI64Vec3:
+ case glslang::EOpConstructI64Vec4:
+ case glslang::EOpConstructUint64:
+ case glslang::EOpConstructU64Vec2:
+ case glslang::EOpConstructU64Vec3:
+ case glslang::EOpConstructU64Vec4:
+ case glslang::EOpConstructStruct:
+ case glslang::EOpConstructTextureSampler:
+ {
+ std::vector<spv::Id> arguments;
+ translateArguments(*node, arguments);
+ spv::Id resultTypeId = convertGlslangToSpvType(node->getType());
+ spv::Id constructed;
+ if (node->getOp() == glslang::EOpConstructTextureSampler)
+ constructed = builder.createOp(spv::OpSampledImage, resultTypeId, arguments);
+ else if (node->getOp() == glslang::EOpConstructStruct || node->getType().isArray()) {
+ std::vector<spv::Id> constituents;
+ for (int c = 0; c < (int)arguments.size(); ++c)
+ constituents.push_back(arguments[c]);
+ constructed = builder.createCompositeConstruct(resultTypeId, constituents);
+ } else if (isMatrix)
+ constructed = builder.createMatrixConstructor(precision, arguments, resultTypeId);
+ else
+ constructed = builder.createConstructor(precision, arguments, resultTypeId);
+
+ builder.clearAccessChain();
+ builder.setAccessChainRValue(constructed);
+
+ return false;
+ }
+
+ // These six are component-wise compares with component-wise results.
+ // Forward on to createBinaryOperation(), requesting a vector result.
+ case glslang::EOpLessThan:
+ case glslang::EOpGreaterThan:
+ case glslang::EOpLessThanEqual:
+ case glslang::EOpGreaterThanEqual:
+ case glslang::EOpVectorEqual:
+ case glslang::EOpVectorNotEqual:
+ {
+ // Map the operation to a binary
+ binOp = node->getOp();
+ reduceComparison = false;
+ switch (node->getOp()) {
+ case glslang::EOpVectorEqual: binOp = glslang::EOpVectorEqual; break;
+ case glslang::EOpVectorNotEqual: binOp = glslang::EOpVectorNotEqual; break;
+ default: binOp = node->getOp(); break;
+ }
+
+ break;
+ }
+ case glslang::EOpMul:
+ // compontent-wise matrix multiply
+ binOp = glslang::EOpMul;
+ break;
+ case glslang::EOpOuterProduct:
+ // two vectors multiplied to make a matrix
+ binOp = glslang::EOpOuterProduct;
+ break;
+ case glslang::EOpDot:
+ {
+ // for scalar dot product, use multiply
+ glslang::TIntermSequence& glslangOperands = node->getSequence();
+ if (glslangOperands[0]->getAsTyped()->getVectorSize() == 1)
+ binOp = glslang::EOpMul;
+ break;
+ }
+ case glslang::EOpMod:
+ // when an aggregate, this is the floating-point mod built-in function,
+ // which can be emitted by the one in createBinaryOperation()
+ binOp = glslang::EOpMod;
+ break;
+ case glslang::EOpEmitVertex:
+ case glslang::EOpEndPrimitive:
+ case glslang::EOpBarrier:
+ case glslang::EOpMemoryBarrier:
+ case glslang::EOpMemoryBarrierAtomicCounter:
+ case glslang::EOpMemoryBarrierBuffer:
+ case glslang::EOpMemoryBarrierImage:
+ case glslang::EOpMemoryBarrierShared:
+ case glslang::EOpGroupMemoryBarrier:
+ noReturnValue = true;
+ // These all have 0 operands and will naturally finish up in the code below for 0 operands
+ break;
+
+ case glslang::EOpAtomicAdd:
+ case glslang::EOpAtomicMin:
+ case glslang::EOpAtomicMax:
+ case glslang::EOpAtomicAnd:
+ case glslang::EOpAtomicOr:
+ case glslang::EOpAtomicXor:
+ case glslang::EOpAtomicExchange:
+ case glslang::EOpAtomicCompSwap:
+ atomic = true;
+ break;
+
+ default:
+ break;
+ }
+
+ //
+ // See if it maps to a regular operation.
+ //
+ if (binOp != glslang::EOpNull) {
+ glslang::TIntermTyped* left = node->getSequence()[0]->getAsTyped();
+ glslang::TIntermTyped* right = node->getSequence()[1]->getAsTyped();
+ assert(left && right);
+
+ builder.clearAccessChain();
+ left->traverse(this);
+ spv::Id leftId = accessChainLoad(left->getType());
+
+ builder.clearAccessChain();
+ right->traverse(this);
+ spv::Id rightId = accessChainLoad(right->getType());
+
+ result = createBinaryOperation(binOp, precision, TranslateNoContractionDecoration(node->getType().getQualifier()),
+ convertGlslangToSpvType(node->getType()), leftId, rightId,
+ left->getType().getBasicType(), reduceComparison);
+
+ // code above should only make binOp that exists in createBinaryOperation
+ assert(result != spv::NoResult);
+ builder.clearAccessChain();
+ builder.setAccessChainRValue(result);
+
+ return false;
+ }
+
+ //
+ // Create the list of operands.
+ //
+ glslang::TIntermSequence& glslangOperands = node->getSequence();
+ std::vector<spv::Id> operands;
+ for (int arg = 0; arg < (int)glslangOperands.size(); ++arg) {
+ builder.clearAccessChain();
+ glslangOperands[arg]->traverse(this);
+
+ // special case l-value operands; there are just a few
+ bool lvalue = false;
+ switch (node->getOp()) {
+ case glslang::EOpFrexp:
+ case glslang::EOpModf:
+ if (arg == 1)
+ lvalue = true;
+ break;
+ case glslang::EOpInterpolateAtSample:
+ case glslang::EOpInterpolateAtOffset:
+ if (arg == 0)
+ lvalue = true;
+ break;
+ case glslang::EOpAtomicAdd:
+ case glslang::EOpAtomicMin:
+ case glslang::EOpAtomicMax:
+ case glslang::EOpAtomicAnd:
+ case glslang::EOpAtomicOr:
+ case glslang::EOpAtomicXor:
+ case glslang::EOpAtomicExchange:
+ case glslang::EOpAtomicCompSwap:
+ if (arg == 0)
+ lvalue = true;
+ break;
+ case glslang::EOpAddCarry:
+ case glslang::EOpSubBorrow:
+ if (arg == 2)
+ lvalue = true;
+ break;
+ case glslang::EOpUMulExtended:
+ case glslang::EOpIMulExtended:
+ if (arg >= 2)
+ lvalue = true;
+ break;
+ default:
+ break;
+ }
+ if (lvalue)
+ operands.push_back(builder.accessChainGetLValue());
+ else
+ operands.push_back(accessChainLoad(glslangOperands[arg]->getAsTyped()->getType()));
+ }
+
+ if (atomic) {
+ // Handle all atomics
+ result = createAtomicOperation(node->getOp(), precision, convertGlslangToSpvType(node->getType()), operands, node->getBasicType());
+ } else {
+ // Pass through to generic operations.
+ switch (glslangOperands.size()) {
+ case 0:
+ result = createNoArgOperation(node->getOp());
+ break;
+ case 1:
+ result = createUnaryOperation(
+ node->getOp(), precision,
+ TranslateNoContractionDecoration(node->getType().getQualifier()),
+ convertGlslangToSpvType(node->getType()), operands.front(),
+ glslangOperands[0]->getAsTyped()->getBasicType());
+ break;
+ default:
+ result = createMiscOperation(node->getOp(), precision, convertGlslangToSpvType(node->getType()), operands, node->getBasicType());
+ break;
+ }
+ }
+
+ if (noReturnValue)
+ return false;
+
+ if (! result) {
+ logger->missingFunctionality("unknown glslang aggregate");
+ return true; // pick up a child as a placeholder operand
+ } else {
+ builder.clearAccessChain();
+ builder.setAccessChainRValue(result);
+ return false;
+ }
+}
+
+bool TGlslangToSpvTraverser::visitSelection(glslang::TVisit /* visit */, glslang::TIntermSelection* node)
+{
+ // This path handles both if-then-else and ?:
+ // The if-then-else has a node type of void, while
+ // ?: has a non-void node type
+ spv::Id result = 0;
+ if (node->getBasicType() != glslang::EbtVoid) {
+ // don't handle this as just on-the-fly temporaries, because there will be two names
+ // and better to leave SSA to later passes
+ result = builder.createVariable(spv::StorageClassFunction, convertGlslangToSpvType(node->getType()));
+ }
+
+ // emit the condition before doing anything with selection
+ node->getCondition()->traverse(this);
+
+ // make an "if" based on the value created by the condition
+ spv::Builder::If ifBuilder(accessChainLoad(node->getCondition()->getType()), builder);
+
+ if (node->getTrueBlock()) {
+ // emit the "then" statement
+ node->getTrueBlock()->traverse(this);
+ if (result)
+ builder.createStore(accessChainLoad(node->getTrueBlock()->getAsTyped()->getType()), result);
+ }
+
+ if (node->getFalseBlock()) {
+ ifBuilder.makeBeginElse();
+ // emit the "else" statement
+ node->getFalseBlock()->traverse(this);
+ if (result)
+ builder.createStore(accessChainLoad(node->getFalseBlock()->getAsTyped()->getType()), result);
+ }
+
+ ifBuilder.makeEndIf();
+
+ if (result) {
+ // GLSL only has r-values as the result of a :?, but
+ // if we have an l-value, that can be more efficient if it will
+ // become the base of a complex r-value expression, because the
+ // next layer copies r-values into memory to use the access-chain mechanism
+ builder.clearAccessChain();
+ builder.setAccessChainLValue(result);
+ }
+
+ return false;
+}
+
+bool TGlslangToSpvTraverser::visitSwitch(glslang::TVisit /* visit */, glslang::TIntermSwitch* node)
+{
+ // emit and get the condition before doing anything with switch
+ node->getCondition()->traverse(this);
+ spv::Id selector = accessChainLoad(node->getCondition()->getAsTyped()->getType());
+
+ // browse the children to sort out code segments
+ int defaultSegment = -1;
+ std::vector<TIntermNode*> codeSegments;
+ glslang::TIntermSequence& sequence = node->getBody()->getSequence();
+ std::vector<int> caseValues;
+ std::vector<int> valueIndexToSegment(sequence.size()); // note: probably not all are used, it is an overestimate
+ for (glslang::TIntermSequence::iterator c = sequence.begin(); c != sequence.end(); ++c) {
+ TIntermNode* child = *c;
+ if (child->getAsBranchNode() && child->getAsBranchNode()->getFlowOp() == glslang::EOpDefault)
+ defaultSegment = (int)codeSegments.size();
+ else if (child->getAsBranchNode() && child->getAsBranchNode()->getFlowOp() == glslang::EOpCase) {
+ valueIndexToSegment[caseValues.size()] = (int)codeSegments.size();
+ caseValues.push_back(child->getAsBranchNode()->getExpression()->getAsConstantUnion()->getConstArray()[0].getIConst());
+ } else
+ codeSegments.push_back(child);
+ }
+
+ // handle the case where the last code segment is missing, due to no code
+ // statements between the last case and the end of the switch statement
+ if ((caseValues.size() && (int)codeSegments.size() == valueIndexToSegment[caseValues.size() - 1]) ||
+ (int)codeSegments.size() == defaultSegment)
+ codeSegments.push_back(nullptr);
+
+ // make the switch statement
+ std::vector<spv::Block*> segmentBlocks; // returned, as the blocks allocated in the call
+ builder.makeSwitch(selector, (int)codeSegments.size(), caseValues, valueIndexToSegment, defaultSegment, segmentBlocks);
+
+ // emit all the code in the segments
+ breakForLoop.push(false);
+ for (unsigned int s = 0; s < codeSegments.size(); ++s) {
+ builder.nextSwitchSegment(segmentBlocks, s);
+ if (codeSegments[s])
+ codeSegments[s]->traverse(this);
+ else
+ builder.addSwitchBreak();
+ }
+ breakForLoop.pop();
+
+ builder.endSwitch(segmentBlocks);
+
+ return false;
+}
+
+void TGlslangToSpvTraverser::visitConstantUnion(glslang::TIntermConstantUnion* node)
+{
+ int nextConst = 0;
+ spv::Id constant = createSpvConstantFromConstUnionArray(node->getType(), node->getConstArray(), nextConst, false);
+
+ builder.clearAccessChain();
+ builder.setAccessChainRValue(constant);
+}
+
+bool TGlslangToSpvTraverser::visitLoop(glslang::TVisit /* visit */, glslang::TIntermLoop* node)
+{
+ auto blocks = builder.makeNewLoop();
+ builder.createBranch(&blocks.head);
+ // Spec requires back edges to target header blocks, and every header block
+ // must dominate its merge block. Make a header block first to ensure these
+ // conditions are met. By definition, it will contain OpLoopMerge, followed
+ // by a block-ending branch. But we don't want to put any other body/test
+ // instructions in it, since the body/test may have arbitrary instructions,
+ // including merges of its own.
+ builder.setBuildPoint(&blocks.head);
+ builder.createLoopMerge(&blocks.merge, &blocks.continue_target, spv::LoopControlMaskNone);
+ if (node->testFirst() && node->getTest()) {
+ spv::Block& test = builder.makeNewBlock();
+ builder.createBranch(&test);
+
+ builder.setBuildPoint(&test);
+ node->getTest()->traverse(this);
+ spv::Id condition =
+ accessChainLoad(node->getTest()->getType());
+ builder.createConditionalBranch(condition, &blocks.body, &blocks.merge);
+
+ builder.setBuildPoint(&blocks.body);
+ breakForLoop.push(true);
+ if (node->getBody())
+ node->getBody()->traverse(this);
+ builder.createBranch(&blocks.continue_target);
+ breakForLoop.pop();
+
+ builder.setBuildPoint(&blocks.continue_target);
+ if (node->getTerminal())
+ node->getTerminal()->traverse(this);
+ builder.createBranch(&blocks.head);
+ } else {
+ builder.createBranch(&blocks.body);
+
+ breakForLoop.push(true);
+ builder.setBuildPoint(&blocks.body);
+ if (node->getBody())
+ node->getBody()->traverse(this);
+ builder.createBranch(&blocks.continue_target);
+ breakForLoop.pop();
+
+ builder.setBuildPoint(&blocks.continue_target);
+ if (node->getTerminal())
+ node->getTerminal()->traverse(this);
+ if (node->getTest()) {
+ node->getTest()->traverse(this);
+ spv::Id condition =
+ accessChainLoad(node->getTest()->getType());
+ builder.createConditionalBranch(condition, &blocks.head, &blocks.merge);
+ } else {
+ // TODO: unless there was a break/return/discard instruction
+ // somewhere in the body, this is an infinite loop, so we should
+ // issue a warning.
+ builder.createBranch(&blocks.head);
+ }
+ }
+ builder.setBuildPoint(&blocks.merge);
+ builder.closeLoop();
+ return false;
+}
+
+bool TGlslangToSpvTraverser::visitBranch(glslang::TVisit /* visit */, glslang::TIntermBranch* node)
+{
+ if (node->getExpression())
+ node->getExpression()->traverse(this);
+
+ switch (node->getFlowOp()) {
+ case glslang::EOpKill:
+ builder.makeDiscard();
+ break;
+ case glslang::EOpBreak:
+ if (breakForLoop.top())
+ builder.createLoopExit();
+ else
+ builder.addSwitchBreak();
+ break;
+ case glslang::EOpContinue:
+ builder.createLoopContinue();
+ break;
+ case glslang::EOpReturn:
+ if (node->getExpression())
+ builder.makeReturn(false, accessChainLoad(node->getExpression()->getType()));
+ else
+ builder.makeReturn(false);
+
+ builder.clearAccessChain();
+ break;
+
+ default:
+ assert(0);
+ break;
+ }
+
+ return false;
+}
+
+spv::Id TGlslangToSpvTraverser::createSpvVariable(const glslang::TIntermSymbol* node)
+{
+ // First, steer off constants, which are not SPIR-V variables, but
+ // can still have a mapping to a SPIR-V Id.
+ // This includes specialization constants.
+ if (node->getQualifier().isConstant()) {
+ return createSpvConstant(*node);
+ }
+
+ // Now, handle actual variables
+ spv::StorageClass storageClass = TranslateStorageClass(node->getType());
+ spv::Id spvType = convertGlslangToSpvType(node->getType());
+
+ const char* name = node->getName().c_str();
+ if (glslang::IsAnonymous(name))
+ name = "";
+
+ return builder.createVariable(storageClass, spvType, name);
+}
+
+// Return type Id of the sampled type.
+spv::Id TGlslangToSpvTraverser::getSampledType(const glslang::TSampler& sampler)
+{
+ switch (sampler.type) {
+ case glslang::EbtFloat: return builder.makeFloatType(32);
+ case glslang::EbtInt: return builder.makeIntType(32);
+ case glslang::EbtUint: return builder.makeUintType(32);
+ default:
+ assert(0);
+ return builder.makeFloatType(32);
+ }
+}
+
+// Convert from a glslang type to an SPV type, by calling into a
+// recursive version of this function. This establishes the inherited
+// layout state rooted from the top-level type.
+spv::Id TGlslangToSpvTraverser::convertGlslangToSpvType(const glslang::TType& type)
+{
+ return convertGlslangToSpvType(type, getExplicitLayout(type), type.getQualifier());
+}
+
+// Do full recursive conversion of an arbitrary glslang type to a SPIR-V Id.
+// explicitLayout can be kept the same throughout the hierarchical recursive walk.
+spv::Id TGlslangToSpvTraverser::convertGlslangToSpvType(const glslang::TType& type, glslang::TLayoutPacking explicitLayout, const glslang::TQualifier& qualifier)
+{
+ spv::Id spvType = spv::NoResult;
+
+ switch (type.getBasicType()) {
+ case glslang::EbtVoid:
+ spvType = builder.makeVoidType();
+ assert (! type.isArray());
+ break;
+ case glslang::EbtFloat:
+ spvType = builder.makeFloatType(32);
+ break;
+ case glslang::EbtDouble:
+ spvType = builder.makeFloatType(64);
+ break;
+ case glslang::EbtBool:
+ // "transparent" bool doesn't exist in SPIR-V. The GLSL convention is
+ // a 32-bit int where non-0 means true.
+ if (explicitLayout != glslang::ElpNone)
+ spvType = builder.makeUintType(32);
+ else
+ spvType = builder.makeBoolType();
+ break;
+ case glslang::EbtInt:
+ spvType = builder.makeIntType(32);
+ break;
+ case glslang::EbtUint:
+ spvType = builder.makeUintType(32);
+ break;
+ case glslang::EbtInt64:
+ builder.addCapability(spv::CapabilityInt64);
+ spvType = builder.makeIntType(64);
+ break;
+ case glslang::EbtUint64:
+ builder.addCapability(spv::CapabilityInt64);
+ spvType = builder.makeUintType(64);
+ break;
+ case glslang::EbtAtomicUint:
+ logger->tbdFunctionality("Is atomic_uint an opaque handle in the uniform storage class, or an addresses in the atomic storage class?");
+ spvType = builder.makeUintType(32);
+ break;
+ case glslang::EbtSampler:
+ {
+ const glslang::TSampler& sampler = type.getSampler();
+ if (sampler.sampler) {
+ // pure sampler
+ spvType = builder.makeSamplerType();
+ } else {
+ // an image is present, make its type
+ spvType = builder.makeImageType(getSampledType(sampler), TranslateDimensionality(sampler), sampler.shadow, sampler.arrayed, sampler.ms,
+ sampler.image ? 2 : 1, TranslateImageFormat(type));
+ if (sampler.combined) {
+ // already has both image and sampler, make the combined type
+ spvType = builder.makeSampledImageType(spvType);
+ }
+ }
+ }
+ break;
+ case glslang::EbtStruct:
+ case glslang::EbtBlock:
+ {
+ // If we've seen this struct type, return it
+ const glslang::TTypeList* glslangStruct = type.getStruct();
+ std::vector<spv::Id> structFields;
+
+ // Try to share structs for different layouts, but not yet for other
+ // kinds of qualification (primarily not yet including interpolant qualification).
+ if (! HasNonLayoutQualifiers(qualifier))
+ spvType = structMap[explicitLayout][qualifier.layoutMatrix][glslangStruct];
+ if (spvType != spv::NoResult)
+ break;
+
+ // else, we haven't seen it...
+
+ // Create a vector of struct types for SPIR-V to consume
+ int memberDelta = 0; // how much the member's index changes from glslang to SPIR-V, normally 0, except sometimes for blocks
+ if (type.getBasicType() == glslang::EbtBlock)
+ memberRemapper[glslangStruct].resize(glslangStruct->size());
+ int locationOffset = 0; // for use across struct members, when they are called recursively
+ for (int i = 0; i < (int)glslangStruct->size(); i++) {
+ glslang::TType& glslangType = *(*glslangStruct)[i].type;
+ if (glslangType.hiddenMember()) {
+ ++memberDelta;
+ if (type.getBasicType() == glslang::EbtBlock)
+ memberRemapper[glslangStruct][i] = -1;
+ } else {
+ if (type.getBasicType() == glslang::EbtBlock)
+ memberRemapper[glslangStruct][i] = i - memberDelta;
+ // modify just this child's view of the qualifier
+ glslang::TQualifier subQualifier = glslangType.getQualifier();
+ InheritQualifiers(subQualifier, qualifier);
+
+ // manually inherit location; it's more complex
+ if (! subQualifier.hasLocation() && qualifier.hasLocation())
+ subQualifier.layoutLocation = qualifier.layoutLocation + locationOffset;
+ if (qualifier.hasLocation())
+ locationOffset += glslangIntermediate->computeTypeLocationSize(glslangType);
+
+ // recurse
+ structFields.push_back(convertGlslangToSpvType(glslangType, explicitLayout, subQualifier));
+ }
+ }
+
+ // Make the SPIR-V type
+ spvType = builder.makeStructType(structFields, type.getTypeName().c_str());
+ if (! HasNonLayoutQualifiers(qualifier))
+ structMap[explicitLayout][qualifier.layoutMatrix][glslangStruct] = spvType;
+
+ // Name and decorate the non-hidden members
+ int offset = -1;
+ locationOffset = 0; // for use within the members of this struct, right now
+ for (int i = 0; i < (int)glslangStruct->size(); i++) {
+ glslang::TType& glslangType = *(*glslangStruct)[i].type;
+ int member = i;
+ if (type.getBasicType() == glslang::EbtBlock)
+ member = memberRemapper[glslangStruct][i];
+
+ // modify just this child's view of the qualifier
+ glslang::TQualifier subQualifier = glslangType.getQualifier();
+ InheritQualifiers(subQualifier, qualifier);
+
+ // using -1 above to indicate a hidden member
+ if (member >= 0) {
+ builder.addMemberName(spvType, member, glslangType.getFieldName().c_str());
+ addMemberDecoration(spvType, member, TranslateLayoutDecoration(glslangType, subQualifier.layoutMatrix));
+ addMemberDecoration(spvType, member, TranslatePrecisionDecoration(glslangType));
+ // Add interpolation and auxiliary storage decorations only to top-level members of Input and Output storage classes
+ if (type.getQualifier().storage == glslang::EvqVaryingIn || type.getQualifier().storage == glslang::EvqVaryingOut) {
+ addMemberDecoration(spvType, member, TranslateInterpolationDecoration(subQualifier));
+ addMemberDecoration(spvType, member, TranslateAuxiliaryStorageDecoration(subQualifier));
+ }
+ addMemberDecoration(spvType, member, TranslateInvariantDecoration(subQualifier));
+
+ if (qualifier.storage == glslang::EvqBuffer) {
+ std::vector<spv::Decoration> memory;
+ TranslateMemoryDecoration(subQualifier, memory);
+ for (unsigned int i = 0; i < memory.size(); ++i)
+ addMemberDecoration(spvType, member, memory[i]);
+ }
+
+ // compute location decoration; tricky based on whether inheritance is at play
+ // TODO: This algorithm (and it's cousin above doing almost the same thing) should
+ // probably move to the linker stage of the front end proper, and just have the
+ // answer sitting already distributed throughout the individual member locations.
+ int location = -1; // will only decorate if present or inherited
+ if (subQualifier.hasLocation()) { // no inheritance, or override of inheritance
+ // struct members should not have explicit locations
+ assert(type.getBasicType() != glslang::EbtStruct);
+ location = subQualifier.layoutLocation;
+ } else if (type.getBasicType() != glslang::EbtBlock) {
+ // If it is a not a Block, (...) Its members are assigned consecutive locations (...)
+ // The members, and their nested types, must not themselves have Location decorations.
+ }
+ else if (qualifier.hasLocation()) // inheritance
+ location = qualifier.layoutLocation + locationOffset;
+ if (qualifier.hasLocation()) // track for upcoming inheritance
+ locationOffset += glslangIntermediate->computeTypeLocationSize(glslangType);
+ if (location >= 0)
+ builder.addMemberDecoration(spvType, member, spv::DecorationLocation, location);
+
+ // component, XFB, others
+ if (glslangType.getQualifier().hasComponent())
+ builder.addMemberDecoration(spvType, member, spv::DecorationComponent, glslangType.getQualifier().layoutComponent);
+ if (glslangType.getQualifier().hasXfbOffset())
+ builder.addMemberDecoration(spvType, member, spv::DecorationOffset, glslangType.getQualifier().layoutXfbOffset);
+ else if (explicitLayout != glslang::ElpNone) {
+ // figure out what to do with offset, which is accumulating
+ int nextOffset;
+ updateMemberOffset(type, glslangType, offset, nextOffset, explicitLayout, subQualifier.layoutMatrix);
+ if (offset >= 0)
+ builder.addMemberDecoration(spvType, member, spv::DecorationOffset, offset);
+ offset = nextOffset;
+ }
+
+ if (glslangType.isMatrix() && explicitLayout != glslang::ElpNone)
+ builder.addMemberDecoration(spvType, member, spv::DecorationMatrixStride, getMatrixStride(glslangType, explicitLayout, subQualifier.layoutMatrix));
+
+ // built-in variable decorations
+ spv::BuiltIn builtIn = TranslateBuiltInDecoration(glslangType.getQualifier().builtIn, true);
+ if (builtIn != spv::BadValue)
+ addMemberDecoration(spvType, member, spv::DecorationBuiltIn, (int)builtIn);
+ }
+ }
+
+ // Decorate the structure
+ addDecoration(spvType, TranslateLayoutDecoration(type, qualifier.layoutMatrix));
+ addDecoration(spvType, TranslateBlockDecoration(type));
+ if (type.getQualifier().hasStream() && glslangIntermediate->isMultiStream()) {
+ builder.addCapability(spv::CapabilityGeometryStreams);
+ builder.addDecoration(spvType, spv::DecorationStream, type.getQualifier().layoutStream);
+ }
+ if (glslangIntermediate->getXfbMode()) {
+ builder.addCapability(spv::CapabilityTransformFeedback);
+ if (type.getQualifier().hasXfbStride())
+ builder.addDecoration(spvType, spv::DecorationXfbStride, type.getQualifier().layoutXfbStride);
+ if (type.getQualifier().hasXfbBuffer())
+ builder.addDecoration(spvType, spv::DecorationXfbBuffer, type.getQualifier().layoutXfbBuffer);
+ }
+ }
+ break;
+ default:
+ assert(0);
+ break;
+ }
+
+ if (type.isMatrix())
+ spvType = builder.makeMatrixType(spvType, type.getMatrixCols(), type.getMatrixRows());
+ else {
+ // If this variable has a vector element count greater than 1, create a SPIR-V vector
+ if (type.getVectorSize() > 1)
+ spvType = builder.makeVectorType(spvType, type.getVectorSize());
+ }
+
+ if (type.isArray()) {
+ int stride = 0; // keep this 0 unless doing an explicit layout; 0 will mean no decoration, no stride
+
+ // Do all but the outer dimension
+ if (type.getArraySizes()->getNumDims() > 1) {
+ // We need to decorate array strides for types needing explicit layout, except blocks.
+ if (explicitLayout != glslang::ElpNone && type.getBasicType() != glslang::EbtBlock) {
+ // Use a dummy glslang type for querying internal strides of
+ // arrays of arrays, but using just a one-dimensional array.
+ glslang::TType simpleArrayType(type, 0); // deference type of the array
+ while (simpleArrayType.getArraySizes().getNumDims() > 1)
+ simpleArrayType.getArraySizes().dereference();
+
+ // Will compute the higher-order strides here, rather than making a whole
+ // pile of types and doing repetitive recursion on their contents.
+ stride = getArrayStride(simpleArrayType, explicitLayout, qualifier.layoutMatrix);
+ }
+
+ // make the arrays
+ for (int dim = type.getArraySizes()->getNumDims() - 1; dim > 0; --dim) {
+ spvType = builder.makeArrayType(spvType, makeArraySizeId(*type.getArraySizes(), dim), stride);
+ if (stride > 0)
+ builder.addDecoration(spvType, spv::DecorationArrayStride, stride);
+ stride *= type.getArraySizes()->getDimSize(dim);
+ }
+ } else {
+ // single-dimensional array, and don't yet have stride
+
+ // We need to decorate array strides for types needing explicit layout, except blocks.
+ if (explicitLayout != glslang::ElpNone && type.getBasicType() != glslang::EbtBlock)
+ stride = getArrayStride(type, explicitLayout, qualifier.layoutMatrix);
+ }
+
+ // Do the outer dimension, which might not be known for a runtime-sized array
+ if (type.isRuntimeSizedArray()) {
+ spvType = builder.makeRuntimeArray(spvType);
+ } else {
+ assert(type.getOuterArraySize() > 0);
+ spvType = builder.makeArrayType(spvType, makeArraySizeId(*type.getArraySizes(), 0), stride);
+ }
+ if (stride > 0)
+ builder.addDecoration(spvType, spv::DecorationArrayStride, stride);
+ }
+
+ return spvType;
+}
+
+// Turn the expression forming the array size into an id.
+// This is not quite trivial, because of specialization constants.
+// Sometimes, a raw constant is turned into an Id, and sometimes
+// a specialization constant expression is.
+spv::Id TGlslangToSpvTraverser::makeArraySizeId(const glslang::TArraySizes& arraySizes, int dim)
+{
+ // First, see if this is sized with a node, meaning a specialization constant:
+ glslang::TIntermTyped* specNode = arraySizes.getDimNode(dim);
+ if (specNode != nullptr) {
+ builder.clearAccessChain();
+ specNode->traverse(this);
+ return accessChainLoad(specNode->getAsTyped()->getType());
+ }
+
+ // Otherwise, need a compile-time (front end) size, get it:
+ int size = arraySizes.getDimSize(dim);
+ assert(size > 0);
+ return builder.makeUintConstant(size);
+}
+
+// Wrap the builder's accessChainLoad to:
+// - localize handling of RelaxedPrecision
+// - use the SPIR-V inferred type instead of another conversion of the glslang type
+// (avoids unnecessary work and possible type punning for structures)
+// - do conversion of concrete to abstract type
+spv::Id TGlslangToSpvTraverser::accessChainLoad(const glslang::TType& type)
+{
+ spv::Id nominalTypeId = builder.accessChainGetInferredType();
+ spv::Id loadedId = builder.accessChainLoad(TranslatePrecisionDecoration(type), nominalTypeId);
+
+ // Need to convert to abstract types when necessary
+ if (type.getBasicType() == glslang::EbtBool) {
+ if (builder.isScalarType(nominalTypeId)) {
+ // Conversion for bool
+ spv::Id boolType = builder.makeBoolType();
+ if (nominalTypeId != boolType)
+ loadedId = builder.createBinOp(spv::OpINotEqual, boolType, loadedId, builder.makeUintConstant(0));
+ } else if (builder.isVectorType(nominalTypeId)) {
+ // Conversion for bvec
+ int vecSize = builder.getNumTypeComponents(nominalTypeId);
+ spv::Id bvecType = builder.makeVectorType(builder.makeBoolType(), vecSize);
+ if (nominalTypeId != bvecType)
+ loadedId = builder.createBinOp(spv::OpINotEqual, bvecType, loadedId, makeSmearedConstant(builder.makeUintConstant(0), vecSize));
+ }
+ }
+
+ return loadedId;
+}
+
+// Wrap the builder's accessChainStore to:
+// - do conversion of concrete to abstract type
+void TGlslangToSpvTraverser::accessChainStore(const glslang::TType& type, spv::Id rvalue)
+{
+ // Need to convert to abstract types when necessary
+ if (type.getBasicType() == glslang::EbtBool) {
+ spv::Id nominalTypeId = builder.accessChainGetInferredType();
+
+ if (builder.isScalarType(nominalTypeId)) {
+ // Conversion for bool
+ spv::Id boolType = builder.makeBoolType();
+ if (nominalTypeId != boolType) {
+ spv::Id zero = builder.makeUintConstant(0);
+ spv::Id one = builder.makeUintConstant(1);
+ rvalue = builder.createTriOp(spv::OpSelect, nominalTypeId, rvalue, one, zero);
+ }
+ } else if (builder.isVectorType(nominalTypeId)) {
+ // Conversion for bvec
+ int vecSize = builder.getNumTypeComponents(nominalTypeId);
+ spv::Id bvecType = builder.makeVectorType(builder.makeBoolType(), vecSize);
+ if (nominalTypeId != bvecType) {
+ spv::Id zero = makeSmearedConstant(builder.makeUintConstant(0), vecSize);
+ spv::Id one = makeSmearedConstant(builder.makeUintConstant(1), vecSize);
+ rvalue = builder.createTriOp(spv::OpSelect, nominalTypeId, rvalue, one, zero);
+ }
+ }
+ }
+
+ builder.accessChainStore(rvalue);
+}
+
+// Decide whether or not this type should be
+// decorated with offsets and strides, and if so
+// whether std140 or std430 rules should be applied.
+glslang::TLayoutPacking TGlslangToSpvTraverser::getExplicitLayout(const glslang::TType& type) const
+{
+ // has to be a block
+ if (type.getBasicType() != glslang::EbtBlock)
+ return glslang::ElpNone;
+
+ // has to be a uniform or buffer block
+ if (type.getQualifier().storage != glslang::EvqUniform &&
+ type.getQualifier().storage != glslang::EvqBuffer)
+ return glslang::ElpNone;
+
+ // return the layout to use
+ switch (type.getQualifier().layoutPacking) {
+ case glslang::ElpStd140:
+ case glslang::ElpStd430:
+ return type.getQualifier().layoutPacking;
+ default:
+ return glslang::ElpNone;
+ }
+}
+
+// Given an array type, returns the integer stride required for that array
+int TGlslangToSpvTraverser::getArrayStride(const glslang::TType& arrayType, glslang::TLayoutPacking explicitLayout, glslang::TLayoutMatrix matrixLayout)
+{
+ int size;
+ int stride;
+ glslangIntermediate->getBaseAlignment(arrayType, size, stride, explicitLayout == glslang::ElpStd140, matrixLayout == glslang::ElmRowMajor);
+
+ return stride;
+}
+
+// Given a matrix type, or array (of array) of matrixes type, returns the integer stride required for that matrix
+// when used as a member of an interface block
+int TGlslangToSpvTraverser::getMatrixStride(const glslang::TType& matrixType, glslang::TLayoutPacking explicitLayout, glslang::TLayoutMatrix matrixLayout)
+{
+ glslang::TType elementType;
+ elementType.shallowCopy(matrixType);
+ elementType.clearArraySizes();
+
+ int size;
+ int stride;
+ glslangIntermediate->getBaseAlignment(elementType, size, stride, explicitLayout == glslang::ElpStd140, matrixLayout == glslang::ElmRowMajor);
+
+ return stride;
+}
+
+// Given a member type of a struct, realign the current offset for it, and compute
+// the next (not yet aligned) offset for the next member, which will get aligned
+// on the next call.
+// 'currentOffset' should be passed in already initialized, ready to modify, and reflecting
+// the migration of data from nextOffset -> currentOffset. It should be -1 on the first call.
+// -1 means a non-forced member offset (no decoration needed).
+void TGlslangToSpvTraverser::updateMemberOffset(const glslang::TType& /*structType*/, const glslang::TType& memberType, int& currentOffset, int& nextOffset,
+ glslang::TLayoutPacking explicitLayout, glslang::TLayoutMatrix matrixLayout)
+{
+ // this will get a positive value when deemed necessary
+ nextOffset = -1;
+
+ // override anything in currentOffset with user-set offset
+ if (memberType.getQualifier().hasOffset())
+ currentOffset = memberType.getQualifier().layoutOffset;
+
+ // It could be that current linker usage in glslang updated all the layoutOffset,
+ // in which case the following code does not matter. But, that's not quite right
+ // once cross-compilation unit GLSL validation is done, as the original user
+ // settings are needed in layoutOffset, and then the following will come into play.
+
+ if (explicitLayout == glslang::ElpNone) {
+ if (! memberType.getQualifier().hasOffset())
+ currentOffset = -1;
+
+ return;
+ }
+
+ // Getting this far means we need explicit offsets
+ if (currentOffset < 0)
+ currentOffset = 0;
+
+ // Now, currentOffset is valid (either 0, or from a previous nextOffset),
+ // but possibly not yet correctly aligned.
+
+ int memberSize;
+ int dummyStride;
+ int memberAlignment = glslangIntermediate->getBaseAlignment(memberType, memberSize, dummyStride, explicitLayout == glslang::ElpStd140, matrixLayout == glslang::ElmRowMajor);
+ glslang::RoundToPow2(currentOffset, memberAlignment);
+ nextOffset = currentOffset + memberSize;
+}
+
+void TGlslangToSpvTraverser::declareUseOfStructMember(const glslang::TTypeList& members, int glslangMember)
+{
+ const glslang::TBuiltInVariable glslangBuiltIn = members[glslangMember].type->getQualifier().builtIn;
+ switch (glslangBuiltIn)
+ {
+ case glslang::EbvClipDistance:
+ case glslang::EbvCullDistance:
+ case glslang::EbvPointSize:
+ // Generate the associated capability. Delegate to TranslateBuiltInDecoration.
+ // Alternately, we could just call this for any glslang built-in, since the
+ // capability already guards against duplicates.
+ TranslateBuiltInDecoration(glslangBuiltIn, false);
+ break;
+ default:
+ // Capabilities were already generated when the struct was declared.
+ break;
+ }
+}
+
+bool TGlslangToSpvTraverser::isShaderEntrypoint(const glslang::TIntermAggregate* node)
+{
+ // have to ignore mangling and just look at the base name
+ size_t firstOpen = node->getName().find('(');
+ return node->getName().compare(0, firstOpen, glslangIntermediate->getEntryPoint().c_str()) == 0;
+}
+
+// Make all the functions, skeletally, without actually visiting their bodies.
+void TGlslangToSpvTraverser::makeFunctions(const glslang::TIntermSequence& glslFunctions)
+{
+ for (int f = 0; f < (int)glslFunctions.size(); ++f) {
+ glslang::TIntermAggregate* glslFunction = glslFunctions[f]->getAsAggregate();
+ if (! glslFunction || glslFunction->getOp() != glslang::EOpFunction || isShaderEntrypoint(glslFunction))
+ continue;
+
+ // We're on a user function. Set up the basic interface for the function now,
+ // so that it's available to call.
+ // Translating the body will happen later.
+ //
+ // Typically (except for a "const in" parameter), an address will be passed to the
+ // function. What it is an address of varies:
+ //
+ // - "in" parameters not marked as "const" can be written to without modifying the argument,
+ // so that write needs to be to a copy, hence the address of a copy works.
+ //
+ // - "const in" parameters can just be the r-value, as no writes need occur.
+ //
+ // - "out" and "inout" arguments can't be done as direct pointers, because GLSL has
+ // copy-in/copy-out semantics. They can be handled though with a pointer to a copy.
+
+ std::vector<spv::Id> paramTypes;
+ std::vector<spv::Decoration> paramPrecisions;
+ glslang::TIntermSequence& parameters = glslFunction->getSequence()[0]->getAsAggregate()->getSequence();
+
+ for (int p = 0; p < (int)parameters.size(); ++p) {
+ const glslang::TType& paramType = parameters[p]->getAsTyped()->getType();
+ spv::Id typeId = convertGlslangToSpvType(paramType);
+ if (paramType.isOpaque())
+ typeId = builder.makePointer(TranslateStorageClass(paramType), typeId);
+ else if (paramType.getQualifier().storage != glslang::EvqConstReadOnly)
+ typeId = builder.makePointer(spv::StorageClassFunction, typeId);
+ else
+ constReadOnlyParameters.insert(parameters[p]->getAsSymbolNode()->getId());
+ paramPrecisions.push_back(TranslatePrecisionDecoration(paramType));
+ paramTypes.push_back(typeId);
+ }
+
+ spv::Block* functionBlock;
+ spv::Function *function = builder.makeFunctionEntry(TranslatePrecisionDecoration(glslFunction->getType()),
+ convertGlslangToSpvType(glslFunction->getType()),
+ glslFunction->getName().c_str(), paramTypes, paramPrecisions, &functionBlock);
+
+ // Track function to emit/call later
+ functionMap[glslFunction->getName().c_str()] = function;
+
+ // Set the parameter id's
+ for (int p = 0; p < (int)parameters.size(); ++p) {
+ symbolValues[parameters[p]->getAsSymbolNode()->getId()] = function->getParamId(p);
+ // give a name too
+ builder.addName(function->getParamId(p), parameters[p]->getAsSymbolNode()->getName().c_str());
+ }
+ }
+}
+
+// Process all the initializers, while skipping the functions and link objects
+void TGlslangToSpvTraverser::makeGlobalInitializers(const glslang::TIntermSequence& initializers)
+{
+ builder.setBuildPoint(shaderEntry->getLastBlock());
+ for (int i = 0; i < (int)initializers.size(); ++i) {
+ glslang::TIntermAggregate* initializer = initializers[i]->getAsAggregate();
+ if (initializer && initializer->getOp() != glslang::EOpFunction && initializer->getOp() != glslang::EOpLinkerObjects) {
+
+ // We're on a top-level node that's not a function. Treat as an initializer, whose
+ // code goes into the beginning of main.
+ initializer->traverse(this);
+ }
+ }
+}
+
+// Process all the functions, while skipping initializers.
+void TGlslangToSpvTraverser::visitFunctions(const glslang::TIntermSequence& glslFunctions)
+{
+ for (int f = 0; f < (int)glslFunctions.size(); ++f) {
+ glslang::TIntermAggregate* node = glslFunctions[f]->getAsAggregate();
+ if (node && (node->getOp() == glslang::EOpFunction || node->getOp() == glslang ::EOpLinkerObjects))
+ node->traverse(this);
+ }
+}
+
+void TGlslangToSpvTraverser::handleFunctionEntry(const glslang::TIntermAggregate* node)
+{
+ // SPIR-V functions should already be in the functionMap from the prepass
+ // that called makeFunctions().
+ spv::Function* function = functionMap[node->getName().c_str()];
+ spv::Block* functionBlock = function->getEntryBlock();
+ builder.setBuildPoint(functionBlock);
+}
+
+void TGlslangToSpvTraverser::translateArguments(const glslang::TIntermAggregate& node, std::vector<spv::Id>& arguments)
+{
+ const glslang::TIntermSequence& glslangArguments = node.getSequence();
+
+ glslang::TSampler sampler = {};
+ bool cubeCompare = false;
+ if (node.isTexture() || node.isImage()) {
+ sampler = glslangArguments[0]->getAsTyped()->getType().getSampler();
+ cubeCompare = sampler.dim == glslang::EsdCube && sampler.arrayed && sampler.shadow;
+ }
+
+ for (int i = 0; i < (int)glslangArguments.size(); ++i) {
+ builder.clearAccessChain();
+ glslangArguments[i]->traverse(this);
+
+ // Special case l-value operands
+ bool lvalue = false;
+ switch (node.getOp()) {
+ case glslang::EOpImageAtomicAdd:
+ case glslang::EOpImageAtomicMin:
+ case glslang::EOpImageAtomicMax:
+ case glslang::EOpImageAtomicAnd:
+ case glslang::EOpImageAtomicOr:
+ case glslang::EOpImageAtomicXor:
+ case glslang::EOpImageAtomicExchange:
+ case glslang::EOpImageAtomicCompSwap:
+ if (i == 0)
+ lvalue = true;
+ break;
+ case glslang::EOpSparseImageLoad:
+ if ((sampler.ms && i == 3) || (! sampler.ms && i == 2))
+ lvalue = true;
+ break;
+ case glslang::EOpSparseTexture:
+ if ((cubeCompare && i == 3) || (! cubeCompare && i == 2))
+ lvalue = true;
+ break;
+ case glslang::EOpSparseTextureClamp:
+ if ((cubeCompare && i == 4) || (! cubeCompare && i == 3))
+ lvalue = true;
+ break;
+ case glslang::EOpSparseTextureLod:
+ case glslang::EOpSparseTextureOffset:
+ if (i == 3)
+ lvalue = true;
+ break;
+ case glslang::EOpSparseTextureFetch:
+ if ((sampler.dim != glslang::EsdRect && i == 3) || (sampler.dim == glslang::EsdRect && i == 2))
+ lvalue = true;
+ break;
+ case glslang::EOpSparseTextureFetchOffset:
+ if ((sampler.dim != glslang::EsdRect && i == 4) || (sampler.dim == glslang::EsdRect && i == 3))
+ lvalue = true;
+ break;
+ case glslang::EOpSparseTextureLodOffset:
+ case glslang::EOpSparseTextureGrad:
+ case glslang::EOpSparseTextureOffsetClamp:
+ if (i == 4)
+ lvalue = true;
+ break;
+ case glslang::EOpSparseTextureGradOffset:
+ case glslang::EOpSparseTextureGradClamp:
+ if (i == 5)
+ lvalue = true;
+ break;
+ case glslang::EOpSparseTextureGradOffsetClamp:
+ if (i == 6)
+ lvalue = true;
+ break;
+ case glslang::EOpSparseTextureGather:
+ if ((sampler.shadow && i == 3) || (! sampler.shadow && i == 2))
+ lvalue = true;
+ break;
+ case glslang::EOpSparseTextureGatherOffset:
+ case glslang::EOpSparseTextureGatherOffsets:
+ if ((sampler.shadow && i == 4) || (! sampler.shadow && i == 3))
+ lvalue = true;
+ break;
+ default:
+ break;
+ }
+
+ if (lvalue)
+ arguments.push_back(builder.accessChainGetLValue());
+ else
+ arguments.push_back(accessChainLoad(glslangArguments[i]->getAsTyped()->getType()));
+ }
+}
+
+void TGlslangToSpvTraverser::translateArguments(glslang::TIntermUnary& node, std::vector<spv::Id>& arguments)
+{
+ builder.clearAccessChain();
+ node.getOperand()->traverse(this);
+ arguments.push_back(accessChainLoad(node.getOperand()->getType()));
+}
+
+spv::Id TGlslangToSpvTraverser::createImageTextureFunctionCall(glslang::TIntermOperator* node)
+{
+ if (! node->isImage() && ! node->isTexture()) {
+ return spv::NoResult;
+ }
+
+ // Process a GLSL texturing op (will be SPV image)
+ const glslang::TSampler sampler = node->getAsAggregate() ? node->getAsAggregate()->getSequence()[0]->getAsTyped()->getType().getSampler()
+ : node->getAsUnaryNode()->getOperand()->getAsTyped()->getType().getSampler();
+ std::vector<spv::Id> arguments;
+ if (node->getAsAggregate())
+ translateArguments(*node->getAsAggregate(), arguments);
+ else
+ translateArguments(*node->getAsUnaryNode(), arguments);
+ spv::Decoration precision = TranslatePrecisionDecoration(node->getType());
+
+ spv::Builder::TextureParameters params = { };
+ params.sampler = arguments[0];
+
+ glslang::TCrackedTextureOp cracked;
+ node->crackTexture(sampler, cracked);
+
+ // Check for queries
+ if (cracked.query) {
+ // a sampled image needs to have the image extracted first
+ if (builder.isSampledImage(params.sampler))
+ params.sampler = builder.createUnaryOp(spv::OpImage, builder.getImageType(params.sampler), params.sampler);
+ switch (node->getOp()) {
+ case glslang::EOpImageQuerySize:
+ case glslang::EOpTextureQuerySize:
+ if (arguments.size() > 1) {
+ params.lod = arguments[1];
+ return builder.createTextureQueryCall(spv::OpImageQuerySizeLod, params);
+ } else
+ return builder.createTextureQueryCall(spv::OpImageQuerySize, params);
+ case glslang::EOpImageQuerySamples:
+ case glslang::EOpTextureQuerySamples:
+ return builder.createTextureQueryCall(spv::OpImageQuerySamples, params);
+ case glslang::EOpTextureQueryLod:
+ params.coords = arguments[1];
+ return builder.createTextureQueryCall(spv::OpImageQueryLod, params);
+ case glslang::EOpTextureQueryLevels:
+ return builder.createTextureQueryCall(spv::OpImageQueryLevels, params);
+ case glslang::EOpSparseTexelsResident:
+ return builder.createUnaryOp(spv::OpImageSparseTexelsResident, builder.makeBoolType(), arguments[0]);
+ default:
+ assert(0);
+ break;
+ }
+ }
+
+ // Check for image functions other than queries
+ if (node->isImage()) {
+ std::vector<spv::Id> operands;
+ auto opIt = arguments.begin();
+ operands.push_back(*(opIt++));
+
+ // Handle subpass operations
+ // TODO: GLSL should change to have the "MS" only on the type rather than the
+ // built-in function.
+ if (cracked.subpass) {
+ // add on the (0,0) coordinate
+ spv::Id zero = builder.makeIntConstant(0);
+ std::vector<spv::Id> comps;
+ comps.push_back(zero);
+ comps.push_back(zero);
+ operands.push_back(builder.makeCompositeConstant(builder.makeVectorType(builder.makeIntType(32), 2), comps));
+ if (sampler.ms) {
+ operands.push_back(spv::ImageOperandsSampleMask);
+ operands.push_back(*(opIt++));
+ }
+ return builder.createOp(spv::OpImageRead, convertGlslangToSpvType(node->getType()), operands);
+ }
+
+ operands.push_back(*(opIt++));
+ if (node->getOp() == glslang::EOpImageLoad) {
+ if (sampler.ms) {
+ operands.push_back(spv::ImageOperandsSampleMask);
+ operands.push_back(*opIt);
+ }
+ if (builder.getImageTypeFormat(builder.getImageType(operands.front())) == spv::ImageFormatUnknown)
+ builder.addCapability(spv::CapabilityStorageImageReadWithoutFormat);
+ return builder.createOp(spv::OpImageRead, convertGlslangToSpvType(node->getType()), operands);
+ } else if (node->getOp() == glslang::EOpImageStore) {
+ if (sampler.ms) {
+ operands.push_back(*(opIt + 1));
+ operands.push_back(spv::ImageOperandsSampleMask);
+ operands.push_back(*opIt);
+ } else
+ operands.push_back(*opIt);
+ builder.createNoResultOp(spv::OpImageWrite, operands);
+ if (builder.getImageTypeFormat(builder.getImageType(operands.front())) == spv::ImageFormatUnknown)
+ builder.addCapability(spv::CapabilityStorageImageWriteWithoutFormat);
+ return spv::NoResult;
+ } else if (node->getOp() == glslang::EOpSparseImageLoad) {
+ builder.addCapability(spv::CapabilitySparseResidency);
+ if (builder.getImageTypeFormat(builder.getImageType(operands.front())) == spv::ImageFormatUnknown)
+ builder.addCapability(spv::CapabilityStorageImageReadWithoutFormat);
+
+ if (sampler.ms) {
+ operands.push_back(spv::ImageOperandsSampleMask);
+ operands.push_back(*opIt++);
+ }
+
+ // Create the return type that was a special structure
+ spv::Id texelOut = *opIt;
+ spv::Id typeId0 = convertGlslangToSpvType(node->getType());
+ spv::Id typeId1 = builder.getDerefTypeId(texelOut);
+ spv::Id resultTypeId = builder.makeStructResultType(typeId0, typeId1);
+
+ spv::Id resultId = builder.createOp(spv::OpImageSparseRead, resultTypeId, operands);
+
+ // Decode the return type
+ builder.createStore(builder.createCompositeExtract(resultId, typeId1, 1), texelOut);
+ return builder.createCompositeExtract(resultId, typeId0, 0);
+ } else {
+ // Process image atomic operations
+
+ // GLSL "IMAGE_PARAMS" will involve in constructing an image texel pointer and this pointer,
+ // as the first source operand, is required by SPIR-V atomic operations.
+ operands.push_back(sampler.ms ? *(opIt++) : builder.makeUintConstant(0)); // For non-MS, the value should be 0
+
+ spv::Id resultTypeId = builder.makePointer(spv::StorageClassImage, convertGlslangToSpvType(node->getType()));
+ spv::Id pointer = builder.createOp(spv::OpImageTexelPointer, resultTypeId, operands);
+
+ std::vector<spv::Id> operands;
+ operands.push_back(pointer);
+ for (; opIt != arguments.end(); ++opIt)
+ operands.push_back(*opIt);
+
+ return createAtomicOperation(node->getOp(), precision, convertGlslangToSpvType(node->getType()), operands, node->getBasicType());
+ }
+ }
+
+ // Check for texture functions other than queries
+ bool sparse = node->isSparseTexture();
+ bool cubeCompare = sampler.dim == glslang::EsdCube && sampler.arrayed && sampler.shadow;
+
+ // check for bias argument
+ bool bias = false;
+ if (! cracked.lod && ! cracked.gather && ! cracked.grad && ! cracked.fetch && ! cubeCompare) {
+ int nonBiasArgCount = 2;
+ if (cracked.offset)
+ ++nonBiasArgCount;
+ if (cracked.grad)
+ nonBiasArgCount += 2;
+ if (cracked.lodClamp)
+ ++nonBiasArgCount;
+ if (sparse)
+ ++nonBiasArgCount;
+
+ if ((int)arguments.size() > nonBiasArgCount)
+ bias = true;
+ }
+
+ // See if the sampler param should really be just the SPV image part
+ if (cracked.fetch) {
+ // a fetch needs to have the image extracted first
+ if (builder.isSampledImage(params.sampler))
+ params.sampler = builder.createUnaryOp(spv::OpImage, builder.getImageType(params.sampler), params.sampler);
+ }
+
+ // set the rest of the arguments
+
+ params.coords = arguments[1];
+ int extraArgs = 0;
+ bool noImplicitLod = false;
+
+ // sort out where Dref is coming from
+ if (cubeCompare) {
+ params.Dref = arguments[2];
+ ++extraArgs;
+ } else if (sampler.shadow && cracked.gather) {
+ params.Dref = arguments[2];
+ ++extraArgs;
+ } else if (sampler.shadow) {
+ std::vector<spv::Id> indexes;
+ int comp;
+ if (cracked.proj)
+ comp = 2; // "The resulting 3rd component of P in the shadow forms is used as Dref"
+ else
+ comp = builder.getNumComponents(params.coords) - 1;
+ indexes.push_back(comp);
+ params.Dref = builder.createCompositeExtract(params.coords, builder.getScalarTypeId(builder.getTypeId(params.coords)), indexes);
+ }
+ if (cracked.lod) {
+ params.lod = arguments[2];
+ ++extraArgs;
+ } else if (glslangIntermediate->getStage() != EShLangFragment) {
+ // we need to invent the default lod for an explicit lod instruction for a non-fragment stage
+ noImplicitLod = true;
+ }
+ if (sampler.ms) {
+ params.sample = arguments[2]; // For MS, "sample" should be specified
+ ++extraArgs;
+ }
+ if (cracked.grad) {
+ params.gradX = arguments[2 + extraArgs];
+ params.gradY = arguments[3 + extraArgs];
+ extraArgs += 2;
+ }
+ if (cracked.offset) {
+ params.offset = arguments[2 + extraArgs];
+ ++extraArgs;
+ } else if (cracked.offsets) {
+ params.offsets = arguments[2 + extraArgs];
+ ++extraArgs;
+ }
+ if (cracked.lodClamp) {
+ params.lodClamp = arguments[2 + extraArgs];
+ ++extraArgs;
+ }
+ if (sparse) {
+ params.texelOut = arguments[2 + extraArgs];
+ ++extraArgs;
+ }
+ if (bias) {
+ params.bias = arguments[2 + extraArgs];
+ ++extraArgs;
+ }
+ if (cracked.gather && ! sampler.shadow) {
+ // default component is 0, if missing, otherwise an argument
+ if (2 + extraArgs < (int)arguments.size()) {
+ params.comp = arguments[2 + extraArgs];
+ ++extraArgs;
+ } else {
+ params.comp = builder.makeIntConstant(0);
+ }
+ }
+
+ return builder.createTextureCall(precision, convertGlslangToSpvType(node->getType()), sparse, cracked.fetch, cracked.proj, cracked.gather, noImplicitLod, params);
+}
+
+spv::Id TGlslangToSpvTraverser::handleUserFunctionCall(const glslang::TIntermAggregate* node)
+{
+ // Grab the function's pointer from the previously created function
+ spv::Function* function = functionMap[node->getName().c_str()];
+ if (! function)
+ return 0;
+
+ const glslang::TIntermSequence& glslangArgs = node->getSequence();
+ const glslang::TQualifierList& qualifiers = node->getQualifierList();
+
+ // See comments in makeFunctions() for details about the semantics for parameter passing.
+ //
+ // These imply we need a four step process:
+ // 1. Evaluate the arguments
+ // 2. Allocate and make copies of in, out, and inout arguments
+ // 3. Make the call
+ // 4. Copy back the results
+
+ // 1. Evaluate the arguments
+ std::vector<spv::Builder::AccessChain> lValues;
+ std::vector<spv::Id> rValues;
+ std::vector<const glslang::TType*> argTypes;
+ for (int a = 0; a < (int)glslangArgs.size(); ++a) {
+ const glslang::TType& paramType = glslangArgs[a]->getAsTyped()->getType();
+ // build l-value
+ builder.clearAccessChain();
+ glslangArgs[a]->traverse(this);
+ argTypes.push_back(&paramType);
+ // keep outputs as and opaque objects l-values, evaluate input-only as r-values
+ if (qualifiers[a] != glslang::EvqConstReadOnly || paramType.isOpaque()) {
+ // save l-value
+ lValues.push_back(builder.getAccessChain());
+ } else {
+ // process r-value
+ rValues.push_back(accessChainLoad(*argTypes.back()));
+ }
+ }
+
+ // 2. Allocate space for anything needing a copy, and if it's "in" or "inout"
+ // copy the original into that space.
+ //
+ // Also, build up the list of actual arguments to pass in for the call
+ int lValueCount = 0;
+ int rValueCount = 0;
+ std::vector<spv::Id> spvArgs;
+ for (int a = 0; a < (int)glslangArgs.size(); ++a) {
+ const glslang::TType& paramType = glslangArgs[a]->getAsTyped()->getType();
+ spv::Id arg;
+ if (paramType.isOpaque()) {
+ builder.setAccessChain(lValues[lValueCount]);
+ arg = builder.accessChainGetLValue();
+ ++lValueCount;
+ } else if (qualifiers[a] != glslang::EvqConstReadOnly) {
+ // need space to hold the copy
+ arg = builder.createVariable(spv::StorageClassFunction, convertGlslangToSpvType(paramType), "param");
+ if (qualifiers[a] == glslang::EvqIn || qualifiers[a] == glslang::EvqInOut) {
+ // need to copy the input into output space
+ builder.setAccessChain(lValues[lValueCount]);
+ spv::Id copy = accessChainLoad(*argTypes[a]);
+ builder.createStore(copy, arg);
+ }
+ ++lValueCount;
+ } else {
+ arg = rValues[rValueCount];
+ ++rValueCount;
+ }
+ spvArgs.push_back(arg);
+ }
+
+ // 3. Make the call.
+ spv::Id result = builder.createFunctionCall(function, spvArgs);
+ builder.setPrecision(result, TranslatePrecisionDecoration(node->getType()));
+
+ // 4. Copy back out an "out" arguments.
+ lValueCount = 0;
+ for (int a = 0; a < (int)glslangArgs.size(); ++a) {
+ if (qualifiers[a] != glslang::EvqConstReadOnly) {
+ if (qualifiers[a] == glslang::EvqOut || qualifiers[a] == glslang::EvqInOut) {
+ spv::Id copy = builder.createLoad(spvArgs[a]);
+ builder.setAccessChain(lValues[lValueCount]);
+ accessChainStore(glslangArgs[a]->getAsTyped()->getType(), copy);
+ }
+ ++lValueCount;
+ }
+ }
+
+ return result;
+}
+
+// Translate AST operation to SPV operation, already having SPV-based operands/types.
+spv::Id TGlslangToSpvTraverser::createBinaryOperation(glslang::TOperator op, spv::Decoration precision,
+ spv::Decoration noContraction,
+ spv::Id typeId, spv::Id left, spv::Id right,
+ glslang::TBasicType typeProxy, bool reduceComparison)
+{
+ bool isUnsigned = typeProxy == glslang::EbtUint || typeProxy == glslang::EbtUint64;
+ bool isFloat = typeProxy == glslang::EbtFloat || typeProxy == glslang::EbtDouble;
+ bool isBool = typeProxy == glslang::EbtBool;
+
+ spv::Op binOp = spv::OpNop;
+ bool needMatchingVectors = true; // for non-matrix ops, would a scalar need to smear to match a vector?
+ bool comparison = false;
+
+ switch (op) {
+ case glslang::EOpAdd:
+ case glslang::EOpAddAssign:
+ if (isFloat)
+ binOp = spv::OpFAdd;
+ else
+ binOp = spv::OpIAdd;
+ break;
+ case glslang::EOpSub:
+ case glslang::EOpSubAssign:
+ if (isFloat)
+ binOp = spv::OpFSub;
+ else
+ binOp = spv::OpISub;
+ break;
+ case glslang::EOpMul:
+ case glslang::EOpMulAssign:
+ if (isFloat)
+ binOp = spv::OpFMul;
+ else
+ binOp = spv::OpIMul;
+ break;
+ case glslang::EOpVectorTimesScalar:
+ case glslang::EOpVectorTimesScalarAssign:
+ if (isFloat && (builder.isVector(left) || builder.isVector(right))) {
+ if (builder.isVector(right))
+ std::swap(left, right);
+ assert(builder.isScalar(right));
+ needMatchingVectors = false;
+ binOp = spv::OpVectorTimesScalar;
+ } else
+ binOp = spv::OpIMul;
+ break;
+ case glslang::EOpVectorTimesMatrix:
+ case glslang::EOpVectorTimesMatrixAssign:
+ binOp = spv::OpVectorTimesMatrix;
+ break;
+ case glslang::EOpMatrixTimesVector:
+ binOp = spv::OpMatrixTimesVector;
+ break;
+ case glslang::EOpMatrixTimesScalar:
+ case glslang::EOpMatrixTimesScalarAssign:
+ binOp = spv::OpMatrixTimesScalar;
+ break;
+ case glslang::EOpMatrixTimesMatrix:
+ case glslang::EOpMatrixTimesMatrixAssign:
+ binOp = spv::OpMatrixTimesMatrix;
+ break;
+ case glslang::EOpOuterProduct:
+ binOp = spv::OpOuterProduct;
+ needMatchingVectors = false;
+ break;
+
+ case glslang::EOpDiv:
+ case glslang::EOpDivAssign:
+ if (isFloat)
+ binOp = spv::OpFDiv;
+ else if (isUnsigned)
+ binOp = spv::OpUDiv;
+ else
+ binOp = spv::OpSDiv;
+ break;
+ case glslang::EOpMod:
+ case glslang::EOpModAssign:
+ if (isFloat)
+ binOp = spv::OpFMod;
+ else if (isUnsigned)
+ binOp = spv::OpUMod;
+ else
+ binOp = spv::OpSMod;
+ break;
+ case glslang::EOpRightShift:
+ case glslang::EOpRightShiftAssign:
+ if (isUnsigned)
+ binOp = spv::OpShiftRightLogical;
+ else
+ binOp = spv::OpShiftRightArithmetic;
+ break;
+ case glslang::EOpLeftShift:
+ case glslang::EOpLeftShiftAssign:
+ binOp = spv::OpShiftLeftLogical;
+ break;
+ case glslang::EOpAnd:
+ case glslang::EOpAndAssign:
+ binOp = spv::OpBitwiseAnd;
+ break;
+ case glslang::EOpLogicalAnd:
+ needMatchingVectors = false;
+ binOp = spv::OpLogicalAnd;
+ break;
+ case glslang::EOpInclusiveOr:
+ case glslang::EOpInclusiveOrAssign:
+ binOp = spv::OpBitwiseOr;
+ break;
+ case glslang::EOpLogicalOr:
+ needMatchingVectors = false;
+ binOp = spv::OpLogicalOr;
+ break;
+ case glslang::EOpExclusiveOr:
+ case glslang::EOpExclusiveOrAssign:
+ binOp = spv::OpBitwiseXor;
+ break;
+ case glslang::EOpLogicalXor:
+ needMatchingVectors = false;
+ binOp = spv::OpLogicalNotEqual;
+ break;
+
+ case glslang::EOpLessThan:
+ case glslang::EOpGreaterThan:
+ case glslang::EOpLessThanEqual:
+ case glslang::EOpGreaterThanEqual:
+ case glslang::EOpEqual:
+ case glslang::EOpNotEqual:
+ case glslang::EOpVectorEqual:
+ case glslang::EOpVectorNotEqual:
+ comparison = true;
+ break;
+ default:
+ break;
+ }
+
+ // handle mapped binary operations (should be non-comparison)
+ if (binOp != spv::OpNop) {
+ assert(comparison == false);
+ if (builder.isMatrix(left) || builder.isMatrix(right))
+ return createBinaryMatrixOperation(binOp, precision, noContraction, typeId, left, right);
+
+ // No matrix involved; make both operands be the same number of components, if needed
+ if (needMatchingVectors)
+ builder.promoteScalar(precision, left, right);
+
+ spv::Id result = builder.createBinOp(binOp, typeId, left, right);
+ addDecoration(result, noContraction);
+ return builder.setPrecision(result, precision);
+ }
+
+ if (! comparison)
+ return 0;
+
+ // Handle comparison instructions
+
+ if (reduceComparison && (builder.isVector(left) || builder.isMatrix(left) || builder.isAggregate(left))) {
+ assert(op == glslang::EOpEqual || op == glslang::EOpNotEqual);
+
+ return builder.createCompositeCompare(precision, left, right, op == glslang::EOpEqual);
+ }
+
+ switch (op) {
+ case glslang::EOpLessThan:
+ if (isFloat)
+ binOp = spv::OpFOrdLessThan;
+ else if (isUnsigned)
+ binOp = spv::OpULessThan;
+ else
+ binOp = spv::OpSLessThan;
+ break;
+ case glslang::EOpGreaterThan:
+ if (isFloat)
+ binOp = spv::OpFOrdGreaterThan;
+ else if (isUnsigned)
+ binOp = spv::OpUGreaterThan;
+ else
+ binOp = spv::OpSGreaterThan;
+ break;
+ case glslang::EOpLessThanEqual:
+ if (isFloat)
+ binOp = spv::OpFOrdLessThanEqual;
+ else if (isUnsigned)
+ binOp = spv::OpULessThanEqual;
+ else
+ binOp = spv::OpSLessThanEqual;
+ break;
+ case glslang::EOpGreaterThanEqual:
+ if (isFloat)
+ binOp = spv::OpFOrdGreaterThanEqual;
+ else if (isUnsigned)
+ binOp = spv::OpUGreaterThanEqual;
+ else
+ binOp = spv::OpSGreaterThanEqual;
+ break;
+ case glslang::EOpEqual:
+ case glslang::EOpVectorEqual:
+ if (isFloat)
+ binOp = spv::OpFOrdEqual;
+ else if (isBool)
+ binOp = spv::OpLogicalEqual;
+ else
+ binOp = spv::OpIEqual;
+ break;
+ case glslang::EOpNotEqual:
+ case glslang::EOpVectorNotEqual:
+ if (isFloat)
+ binOp = spv::OpFOrdNotEqual;
+ else if (isBool)
+ binOp = spv::OpLogicalNotEqual;
+ else
+ binOp = spv::OpINotEqual;
+ break;
+ default:
+ break;
+ }
+
+ if (binOp != spv::OpNop) {
+ spv::Id result = builder.createBinOp(binOp, typeId, left, right);
+ addDecoration(result, noContraction);
+ return builder.setPrecision(result, precision);
+ }
+
+ return 0;
+}
+
+//
+// Translate AST matrix operation to SPV operation, already having SPV-based operands/types.
+// These can be any of:
+//
+// matrix * scalar
+// scalar * matrix
+// matrix * matrix linear algebraic
+// matrix * vector
+// vector * matrix
+// matrix * matrix componentwise
+// matrix op matrix op in {+, -, /}
+// matrix op scalar op in {+, -, /}
+// scalar op matrix op in {+, -, /}
+//
+spv::Id TGlslangToSpvTraverser::createBinaryMatrixOperation(spv::Op op, spv::Decoration precision, spv::Decoration noContraction, spv::Id typeId, spv::Id left, spv::Id right)
+{
+ bool firstClass = true;
+
+ // First, handle first-class matrix operations (* and matrix/scalar)
+ switch (op) {
+ case spv::OpFDiv:
+ if (builder.isMatrix(left) && builder.isScalar(right)) {
+ // turn matrix / scalar into a multiply...
+ right = builder.createBinOp(spv::OpFDiv, builder.getTypeId(right), builder.makeFloatConstant(1.0F), right);
+ op = spv::OpMatrixTimesScalar;
+ } else
+ firstClass = false;
+ break;
+ case spv::OpMatrixTimesScalar:
+ if (builder.isMatrix(right))
+ std::swap(left, right);
+ assert(builder.isScalar(right));
+ break;
+ case spv::OpVectorTimesMatrix:
+ assert(builder.isVector(left));
+ assert(builder.isMatrix(right));
+ break;
+ case spv::OpMatrixTimesVector:
+ assert(builder.isMatrix(left));
+ assert(builder.isVector(right));
+ break;
+ case spv::OpMatrixTimesMatrix:
+ assert(builder.isMatrix(left));
+ assert(builder.isMatrix(right));
+ break;
+ default:
+ firstClass = false;
+ break;
+ }
+
+ if (firstClass) {
+ spv::Id result = builder.createBinOp(op, typeId, left, right);
+ addDecoration(result, noContraction);
+ return builder.setPrecision(result, precision);
+ }
+
+ // Handle component-wise +, -, *, %, and / for all combinations of type.
+ // The result type of all of them is the same type as the (a) matrix operand.
+ // The algorithm is to:
+ // - break the matrix(es) into vectors
+ // - smear any scalar to a vector
+ // - do vector operations
+ // - make a matrix out the vector results
+ switch (op) {
+ case spv::OpFAdd:
+ case spv::OpFSub:
+ case spv::OpFDiv:
+ case spv::OpFMod:
+ case spv::OpFMul:
+ {
+ // one time set up...
+ bool leftMat = builder.isMatrix(left);
+ bool rightMat = builder.isMatrix(right);
+ unsigned int numCols = leftMat ? builder.getNumColumns(left) : builder.getNumColumns(right);
+ int numRows = leftMat ? builder.getNumRows(left) : builder.getNumRows(right);
+ spv::Id scalarType = builder.getScalarTypeId(typeId);
+ spv::Id vecType = builder.makeVectorType(scalarType, numRows);
+ std::vector<spv::Id> results;
+ spv::Id smearVec = spv::NoResult;
+ if (builder.isScalar(left))
+ smearVec = builder.smearScalar(precision, left, vecType);
+ else if (builder.isScalar(right))
+ smearVec = builder.smearScalar(precision, right, vecType);
+
+ // do each vector op
+ for (unsigned int c = 0; c < numCols; ++c) {
+ std::vector<unsigned int> indexes;
+ indexes.push_back(c);
+ spv::Id leftVec = leftMat ? builder.createCompositeExtract( left, vecType, indexes) : smearVec;
+ spv::Id rightVec = rightMat ? builder.createCompositeExtract(right, vecType, indexes) : smearVec;
+ spv::Id result = builder.createBinOp(op, vecType, leftVec, rightVec);
+ addDecoration(result, noContraction);
+ results.push_back(builder.setPrecision(result, precision));
+ }
+
+ // put the pieces together
+ return builder.setPrecision(builder.createCompositeConstruct(typeId, results), precision);
+ }
+ default:
+ assert(0);
+ return spv::NoResult;
+ }
+}
+
+spv::Id TGlslangToSpvTraverser::createUnaryOperation(glslang::TOperator op, spv::Decoration precision, spv::Decoration noContraction, spv::Id typeId, spv::Id operand, glslang::TBasicType typeProxy)
+{
+ spv::Op unaryOp = spv::OpNop;
+ int libCall = -1;
+ bool isUnsigned = typeProxy == glslang::EbtUint || typeProxy == glslang::EbtUint64;
+ bool isFloat = typeProxy == glslang::EbtFloat || typeProxy == glslang::EbtDouble;
+
+ switch (op) {
+ case glslang::EOpNegative:
+ if (isFloat) {
+ unaryOp = spv::OpFNegate;
+ if (builder.isMatrixType(typeId))
+ return createUnaryMatrixOperation(unaryOp, precision, noContraction, typeId, operand, typeProxy);
+ } else
+ unaryOp = spv::OpSNegate;
+ break;
+
+ case glslang::EOpLogicalNot:
+ case glslang::EOpVectorLogicalNot:
+ unaryOp = spv::OpLogicalNot;
+ break;
+ case glslang::EOpBitwiseNot:
+ unaryOp = spv::OpNot;
+ break;
+
+ case glslang::EOpDeterminant:
+ libCall = spv::GLSLstd450Determinant;
+ break;
+ case glslang::EOpMatrixInverse:
+ libCall = spv::GLSLstd450MatrixInverse;
+ break;
+ case glslang::EOpTranspose:
+ unaryOp = spv::OpTranspose;
+ break;
+
+ case glslang::EOpRadians:
+ libCall = spv::GLSLstd450Radians;
+ break;
+ case glslang::EOpDegrees:
+ libCall = spv::GLSLstd450Degrees;
+ break;
+ case glslang::EOpSin:
+ libCall = spv::GLSLstd450Sin;
+ break;
+ case glslang::EOpCos:
+ libCall = spv::GLSLstd450Cos;
+ break;
+ case glslang::EOpTan:
+ libCall = spv::GLSLstd450Tan;
+ break;
+ case glslang::EOpAcos:
+ libCall = spv::GLSLstd450Acos;
+ break;
+ case glslang::EOpAsin:
+ libCall = spv::GLSLstd450Asin;
+ break;
+ case glslang::EOpAtan:
+ libCall = spv::GLSLstd450Atan;
+ break;
+
+ case glslang::EOpAcosh:
+ libCall = spv::GLSLstd450Acosh;
+ break;
+ case glslang::EOpAsinh:
+ libCall = spv::GLSLstd450Asinh;
+ break;
+ case glslang::EOpAtanh:
+ libCall = spv::GLSLstd450Atanh;
+ break;
+ case glslang::EOpTanh:
+ libCall = spv::GLSLstd450Tanh;
+ break;
+ case glslang::EOpCosh:
+ libCall = spv::GLSLstd450Cosh;
+ break;
+ case glslang::EOpSinh:
+ libCall = spv::GLSLstd450Sinh;
+ break;
+
+ case glslang::EOpLength:
+ libCall = spv::GLSLstd450Length;
+ break;
+ case glslang::EOpNormalize:
+ libCall = spv::GLSLstd450Normalize;
+ break;
+
+ case glslang::EOpExp:
+ libCall = spv::GLSLstd450Exp;
+ break;
+ case glslang::EOpLog:
+ libCall = spv::GLSLstd450Log;
+ break;
+ case glslang::EOpExp2:
+ libCall = spv::GLSLstd450Exp2;
+ break;
+ case glslang::EOpLog2:
+ libCall = spv::GLSLstd450Log2;
+ break;
+ case glslang::EOpSqrt:
+ libCall = spv::GLSLstd450Sqrt;
+ break;
+ case glslang::EOpInverseSqrt:
+ libCall = spv::GLSLstd450InverseSqrt;
+ break;
+
+ case glslang::EOpFloor:
+ libCall = spv::GLSLstd450Floor;
+ break;
+ case glslang::EOpTrunc:
+ libCall = spv::GLSLstd450Trunc;
+ break;
+ case glslang::EOpRound:
+ libCall = spv::GLSLstd450Round;
+ break;
+ case glslang::EOpRoundEven:
+ libCall = spv::GLSLstd450RoundEven;
+ break;
+ case glslang::EOpCeil:
+ libCall = spv::GLSLstd450Ceil;
+ break;
+ case glslang::EOpFract:
+ libCall = spv::GLSLstd450Fract;
+ break;
+
+ case glslang::EOpIsNan:
+ unaryOp = spv::OpIsNan;
+ break;
+ case glslang::EOpIsInf:
+ unaryOp = spv::OpIsInf;
+ break;
+ case glslang::EOpIsFinite:
+ unaryOp = spv::OpIsFinite;
+ break;
+
+ case glslang::EOpFloatBitsToInt:
+ case glslang::EOpFloatBitsToUint:
+ case glslang::EOpIntBitsToFloat:
+ case glslang::EOpUintBitsToFloat:
+ case glslang::EOpDoubleBitsToInt64:
+ case glslang::EOpDoubleBitsToUint64:
+ case glslang::EOpInt64BitsToDouble:
+ case glslang::EOpUint64BitsToDouble:
+ unaryOp = spv::OpBitcast;
+ break;
+
+ case glslang::EOpPackSnorm2x16:
+ libCall = spv::GLSLstd450PackSnorm2x16;
+ break;
+ case glslang::EOpUnpackSnorm2x16:
+ libCall = spv::GLSLstd450UnpackSnorm2x16;
+ break;
+ case glslang::EOpPackUnorm2x16:
+ libCall = spv::GLSLstd450PackUnorm2x16;
+ break;
+ case glslang::EOpUnpackUnorm2x16:
+ libCall = spv::GLSLstd450UnpackUnorm2x16;
+ break;
+ case glslang::EOpPackHalf2x16:
+ libCall = spv::GLSLstd450PackHalf2x16;
+ break;
+ case glslang::EOpUnpackHalf2x16:
+ libCall = spv::GLSLstd450UnpackHalf2x16;
+ break;
+ case glslang::EOpPackSnorm4x8:
+ libCall = spv::GLSLstd450PackSnorm4x8;
+ break;
+ case glslang::EOpUnpackSnorm4x8:
+ libCall = spv::GLSLstd450UnpackSnorm4x8;
+ break;
+ case glslang::EOpPackUnorm4x8:
+ libCall = spv::GLSLstd450PackUnorm4x8;
+ break;
+ case glslang::EOpUnpackUnorm4x8:
+ libCall = spv::GLSLstd450UnpackUnorm4x8;
+ break;
+ case glslang::EOpPackDouble2x32:
+ libCall = spv::GLSLstd450PackDouble2x32;
+ break;
+ case glslang::EOpUnpackDouble2x32:
+ libCall = spv::GLSLstd450UnpackDouble2x32;
+ break;
+
+ case glslang::EOpPackInt2x32:
+ case glslang::EOpUnpackInt2x32:
+ case glslang::EOpPackUint2x32:
+ case glslang::EOpUnpackUint2x32:
+ logger->missingFunctionality("shader int64");
+ libCall = spv::GLSLstd450Bad; // TODO: This is a placeholder.
+ break;
+
+ case glslang::EOpDPdx:
+ unaryOp = spv::OpDPdx;
+ break;
+ case glslang::EOpDPdy:
+ unaryOp = spv::OpDPdy;
+ break;
+ case glslang::EOpFwidth:
+ unaryOp = spv::OpFwidth;
+ break;
+ case glslang::EOpDPdxFine:
+ builder.addCapability(spv::CapabilityDerivativeControl);
+ unaryOp = spv::OpDPdxFine;
+ break;
+ case glslang::EOpDPdyFine:
+ builder.addCapability(spv::CapabilityDerivativeControl);
+ unaryOp = spv::OpDPdyFine;
+ break;
+ case glslang::EOpFwidthFine:
+ builder.addCapability(spv::CapabilityDerivativeControl);
+ unaryOp = spv::OpFwidthFine;
+ break;
+ case glslang::EOpDPdxCoarse:
+ builder.addCapability(spv::CapabilityDerivativeControl);
+ unaryOp = spv::OpDPdxCoarse;
+ break;
+ case glslang::EOpDPdyCoarse:
+ builder.addCapability(spv::CapabilityDerivativeControl);
+ unaryOp = spv::OpDPdyCoarse;
+ break;
+ case glslang::EOpFwidthCoarse:
+ builder.addCapability(spv::CapabilityDerivativeControl);
+ unaryOp = spv::OpFwidthCoarse;
+ break;
+ case glslang::EOpInterpolateAtCentroid:
+ builder.addCapability(spv::CapabilityInterpolationFunction);
+ libCall = spv::GLSLstd450InterpolateAtCentroid;
+ break;
+ case glslang::EOpAny:
+ unaryOp = spv::OpAny;
+ break;
+ case glslang::EOpAll:
+ unaryOp = spv::OpAll;
+ break;
+
+ case glslang::EOpAbs:
+ if (isFloat)
+ libCall = spv::GLSLstd450FAbs;
+ else
+ libCall = spv::GLSLstd450SAbs;
+ break;
+ case glslang::EOpSign:
+ if (isFloat)
+ libCall = spv::GLSLstd450FSign;
+ else
+ libCall = spv::GLSLstd450SSign;
+ break;
+
+ case glslang::EOpAtomicCounterIncrement:
+ case glslang::EOpAtomicCounterDecrement:
+ case glslang::EOpAtomicCounter:
+ {
+ // Handle all of the atomics in one place, in createAtomicOperation()
+ std::vector<spv::Id> operands;
+ operands.push_back(operand);
+ return createAtomicOperation(op, precision, typeId, operands, typeProxy);
+ }
+
+ case glslang::EOpBitFieldReverse:
+ unaryOp = spv::OpBitReverse;
+ break;
+ case glslang::EOpBitCount:
+ unaryOp = spv::OpBitCount;
+ break;
+ case glslang::EOpFindLSB:
+ libCall = spv::GLSLstd450FindILsb;
+ break;
+ case glslang::EOpFindMSB:
+ if (isUnsigned)
+ libCall = spv::GLSLstd450FindUMsb;
+ else
+ libCall = spv::GLSLstd450FindSMsb;
+ break;
+
+ case glslang::EOpBallot:
+ case glslang::EOpReadFirstInvocation:
+ logger->missingFunctionality("shader ballot");
+ libCall = spv::GLSLstd450Bad;
+ break;
+
+ case glslang::EOpAnyInvocation:
+ case glslang::EOpAllInvocations:
+ case glslang::EOpAllInvocationsEqual:
+ return createInvocationsOperation(op, typeId, operand);
+
+ default:
+ return 0;
+ }
+
+ spv::Id id;
+ if (libCall >= 0) {
+ std::vector<spv::Id> args;
+ args.push_back(operand);
+ id = builder.createBuiltinCall(typeId, stdBuiltins, libCall, args);
+ } else {
+ id = builder.createUnaryOp(unaryOp, typeId, operand);
+ }
+
+ addDecoration(id, noContraction);
+ return builder.setPrecision(id, precision);
+}
+
+// Create a unary operation on a matrix
+spv::Id TGlslangToSpvTraverser::createUnaryMatrixOperation(spv::Op op, spv::Decoration precision, spv::Decoration noContraction, spv::Id typeId, spv::Id operand, glslang::TBasicType /* typeProxy */)
+{
+ // Handle unary operations vector by vector.
+ // The result type is the same type as the original type.
+ // The algorithm is to:
+ // - break the matrix into vectors
+ // - apply the operation to each vector
+ // - make a matrix out the vector results
+
+ // get the types sorted out
+ int numCols = builder.getNumColumns(operand);
+ int numRows = builder.getNumRows(operand);
+ spv::Id srcVecType = builder.makeVectorType(builder.getScalarTypeId(builder.getTypeId(operand)), numRows);
+ spv::Id destVecType = builder.makeVectorType(builder.getScalarTypeId(typeId), numRows);
+ std::vector<spv::Id> results;
+
+ // do each vector op
+ for (int c = 0; c < numCols; ++c) {
+ std::vector<unsigned int> indexes;
+ indexes.push_back(c);
+ spv::Id srcVec = builder.createCompositeExtract(operand, srcVecType, indexes);
+ spv::Id destVec = builder.createUnaryOp(op, destVecType, srcVec);
+ addDecoration(destVec, noContraction);
+ results.push_back(builder.setPrecision(destVec, precision));
+ }
+
+ // put the pieces together
+ return builder.setPrecision(builder.createCompositeConstruct(typeId, results), precision);
+}
+
+spv::Id TGlslangToSpvTraverser::createConversion(glslang::TOperator op, spv::Decoration precision, spv::Decoration noContraction, spv::Id destType, spv::Id operand, glslang::TBasicType typeProxy)
+{
+ spv::Op convOp = spv::OpNop;
+ spv::Id zero = 0;
+ spv::Id one = 0;
+ spv::Id type = 0;
+
+ int vectorSize = builder.isVectorType(destType) ? builder.getNumTypeComponents(destType) : 0;
+
+ switch (op) {
+ case glslang::EOpConvIntToBool:
+ case glslang::EOpConvUintToBool:
+ case glslang::EOpConvInt64ToBool:
+ case glslang::EOpConvUint64ToBool:
+ zero = (op == glslang::EOpConvInt64ToBool ||
+ op == glslang::EOpConvUint64ToBool) ? builder.makeUint64Constant(0) : builder.makeUintConstant(0);
+ zero = makeSmearedConstant(zero, vectorSize);
+ return builder.createBinOp(spv::OpINotEqual, destType, operand, zero);
+
+ case glslang::EOpConvFloatToBool:
+ zero = builder.makeFloatConstant(0.0F);
+ zero = makeSmearedConstant(zero, vectorSize);
+ return builder.createBinOp(spv::OpFOrdNotEqual, destType, operand, zero);
+
+ case glslang::EOpConvDoubleToBool:
+ zero = builder.makeDoubleConstant(0.0);
+ zero = makeSmearedConstant(zero, vectorSize);
+ return builder.createBinOp(spv::OpFOrdNotEqual, destType, operand, zero);
+
+ case glslang::EOpConvBoolToFloat:
+ convOp = spv::OpSelect;
+ zero = builder.makeFloatConstant(0.0);
+ one = builder.makeFloatConstant(1.0);
+ break;
+ case glslang::EOpConvBoolToDouble:
+ convOp = spv::OpSelect;
+ zero = builder.makeDoubleConstant(0.0);
+ one = builder.makeDoubleConstant(1.0);
+ break;
+ case glslang::EOpConvBoolToInt:
+ case glslang::EOpConvBoolToInt64:
+ zero = (op == glslang::EOpConvBoolToInt64) ? builder.makeInt64Constant(0) : builder.makeIntConstant(0);
+ one = (op == glslang::EOpConvBoolToInt64) ? builder.makeInt64Constant(1) : builder.makeIntConstant(1);
+ convOp = spv::OpSelect;
+ break;
+ case glslang::EOpConvBoolToUint:
+ case glslang::EOpConvBoolToUint64:
+ zero = (op == glslang::EOpConvBoolToUint64) ? builder.makeUint64Constant(0) : builder.makeUintConstant(0);
+ one = (op == glslang::EOpConvBoolToUint64) ? builder.makeUint64Constant(1) : builder.makeUintConstant(1);
+ convOp = spv::OpSelect;
+ break;
+
+ case glslang::EOpConvIntToFloat:
+ case glslang::EOpConvIntToDouble:
+ case glslang::EOpConvInt64ToFloat:
+ case glslang::EOpConvInt64ToDouble:
+ convOp = spv::OpConvertSToF;
+ break;
+
+ case glslang::EOpConvUintToFloat:
+ case glslang::EOpConvUintToDouble:
+ case glslang::EOpConvUint64ToFloat:
+ case glslang::EOpConvUint64ToDouble:
+ convOp = spv::OpConvertUToF;
+ break;
+
+ case glslang::EOpConvDoubleToFloat:
+ case glslang::EOpConvFloatToDouble:
+ convOp = spv::OpFConvert;
+ if (builder.isMatrixType(destType))
+ return createUnaryMatrixOperation(convOp, precision, noContraction, destType, operand, typeProxy);
+ break;
+
+ case glslang::EOpConvFloatToInt:
+ case glslang::EOpConvDoubleToInt:
+ case glslang::EOpConvFloatToInt64:
+ case glslang::EOpConvDoubleToInt64:
+ convOp = spv::OpConvertFToS;
+ break;
+
+ case glslang::EOpConvUintToInt:
+ case glslang::EOpConvIntToUint:
+ case glslang::EOpConvUint64ToInt64:
+ case glslang::EOpConvInt64ToUint64:
+ if (builder.isInSpecConstCodeGenMode()) {
+ // Build zero scalar or vector for OpIAdd.
+ zero = (op == glslang::EOpConvUintToInt64 ||
+ op == glslang::EOpConvIntToUint64) ? builder.makeUint64Constant(0) : builder.makeUintConstant(0);
+ zero = makeSmearedConstant(zero, vectorSize);
+ // Use OpIAdd, instead of OpBitcast to do the conversion when
+ // generating for OpSpecConstantOp instruction.
+ return builder.createBinOp(spv::OpIAdd, destType, operand, zero);
+ }
+ // For normal run-time conversion instruction, use OpBitcast.
+ convOp = spv::OpBitcast;
+ break;
+
+ case glslang::EOpConvFloatToUint:
+ case glslang::EOpConvDoubleToUint:
+ case glslang::EOpConvFloatToUint64:
+ case glslang::EOpConvDoubleToUint64:
+ convOp = spv::OpConvertFToU;
+ break;
+
+ case glslang::EOpConvIntToInt64:
+ case glslang::EOpConvInt64ToInt:
+ convOp = spv::OpSConvert;
+ break;
+
+ case glslang::EOpConvUintToUint64:
+ case glslang::EOpConvUint64ToUint:
+ convOp = spv::OpUConvert;
+ break;
+
+ case glslang::EOpConvIntToUint64:
+ case glslang::EOpConvInt64ToUint:
+ case glslang::EOpConvUint64ToInt:
+ case glslang::EOpConvUintToInt64:
+ // OpSConvert/OpUConvert + OpBitCast
+ switch (op) {
+ case glslang::EOpConvIntToUint64:
+ convOp = spv::OpSConvert;
+ type = builder.makeIntType(64);
+ break;
+ case glslang::EOpConvInt64ToUint:
+ convOp = spv::OpSConvert;
+ type = builder.makeIntType(32);
+ break;
+ case glslang::EOpConvUint64ToInt:
+ convOp = spv::OpUConvert;
+ type = builder.makeUintType(32);
+ break;
+ case glslang::EOpConvUintToInt64:
+ convOp = spv::OpUConvert;
+ type = builder.makeUintType(64);
+ break;
+ default:
+ assert(0);
+ break;
+ }
+
+ if (vectorSize > 0)
+ type = builder.makeVectorType(type, vectorSize);
+
+ operand = builder.createUnaryOp(convOp, type, operand);
+
+ if (builder.isInSpecConstCodeGenMode()) {
+ // Build zero scalar or vector for OpIAdd.
+ zero = (op == glslang::EOpConvIntToUint64 ||
+ op == glslang::EOpConvUintToInt64) ? builder.makeUint64Constant(0) : builder.makeUintConstant(0);
+ zero = makeSmearedConstant(zero, vectorSize);
+ // Use OpIAdd, instead of OpBitcast to do the conversion when
+ // generating for OpSpecConstantOp instruction.
+ return builder.createBinOp(spv::OpIAdd, destType, operand, zero);
+ }
+ // For normal run-time conversion instruction, use OpBitcast.
+ convOp = spv::OpBitcast;
+ break;
+ default:
+ break;
+ }
+
+ spv::Id result = 0;
+ if (convOp == spv::OpNop)
+ return result;
+
+ if (convOp == spv::OpSelect) {
+ zero = makeSmearedConstant(zero, vectorSize);
+ one = makeSmearedConstant(one, vectorSize);
+ result = builder.createTriOp(convOp, destType, operand, one, zero);
+ } else
+ result = builder.createUnaryOp(convOp, destType, operand);
+
+ return builder.setPrecision(result, precision);
+}
+
+spv::Id TGlslangToSpvTraverser::makeSmearedConstant(spv::Id constant, int vectorSize)
+{
+ if (vectorSize == 0)
+ return constant;
+
+ spv::Id vectorTypeId = builder.makeVectorType(builder.getTypeId(constant), vectorSize);
+ std::vector<spv::Id> components;
+ for (int c = 0; c < vectorSize; ++c)
+ components.push_back(constant);
+ return builder.makeCompositeConstant(vectorTypeId, components);
+}
+
+// For glslang ops that map to SPV atomic opCodes
+spv::Id TGlslangToSpvTraverser::createAtomicOperation(glslang::TOperator op, spv::Decoration /*precision*/, spv::Id typeId, std::vector<spv::Id>& operands, glslang::TBasicType typeProxy)
+{
+ spv::Op opCode = spv::OpNop;
+
+ switch (op) {
+ case glslang::EOpAtomicAdd:
+ case glslang::EOpImageAtomicAdd:
+ opCode = spv::OpAtomicIAdd;
+ break;
+ case glslang::EOpAtomicMin:
+ case glslang::EOpImageAtomicMin:
+ opCode = typeProxy == glslang::EbtUint ? spv::OpAtomicUMin : spv::OpAtomicSMin;
+ break;
+ case glslang::EOpAtomicMax:
+ case glslang::EOpImageAtomicMax:
+ opCode = typeProxy == glslang::EbtUint ? spv::OpAtomicUMax : spv::OpAtomicSMax;
+ break;
+ case glslang::EOpAtomicAnd:
+ case glslang::EOpImageAtomicAnd:
+ opCode = spv::OpAtomicAnd;
+ break;
+ case glslang::EOpAtomicOr:
+ case glslang::EOpImageAtomicOr:
+ opCode = spv::OpAtomicOr;
+ break;
+ case glslang::EOpAtomicXor:
+ case glslang::EOpImageAtomicXor:
+ opCode = spv::OpAtomicXor;
+ break;
+ case glslang::EOpAtomicExchange:
+ case glslang::EOpImageAtomicExchange:
+ opCode = spv::OpAtomicExchange;
+ break;
+ case glslang::EOpAtomicCompSwap:
+ case glslang::EOpImageAtomicCompSwap:
+ opCode = spv::OpAtomicCompareExchange;
+ break;
+ case glslang::EOpAtomicCounterIncrement:
+ opCode = spv::OpAtomicIIncrement;
+ break;
+ case glslang::EOpAtomicCounterDecrement:
+ opCode = spv::OpAtomicIDecrement;
+ break;
+ case glslang::EOpAtomicCounter:
+ opCode = spv::OpAtomicLoad;
+ break;
+ default:
+ assert(0);
+ break;
+ }
+
+ // Sort out the operands
+ // - mapping from glslang -> SPV
+ // - there are extra SPV operands with no glslang source
+ // - compare-exchange swaps the value and comparator
+ // - compare-exchange has an extra memory semantics
+ std::vector<spv::Id> spvAtomicOperands; // hold the spv operands
+ auto opIt = operands.begin(); // walk the glslang operands
+ spvAtomicOperands.push_back(*(opIt++));
+ spvAtomicOperands.push_back(builder.makeUintConstant(spv::ScopeDevice)); // TBD: what is the correct scope?
+ spvAtomicOperands.push_back(builder.makeUintConstant(spv::MemorySemanticsMaskNone)); // TBD: what are the correct memory semantics?
+ if (opCode == spv::OpAtomicCompareExchange) {
+ // There are 2 memory semantics for compare-exchange. And the operand order of "comparator" and "new value" in GLSL
+ // differs from that in SPIR-V. Hence, special processing is required.
+ spvAtomicOperands.push_back(builder.makeUintConstant(spv::MemorySemanticsMaskNone));
+ spvAtomicOperands.push_back(*(opIt + 1));
+ spvAtomicOperands.push_back(*opIt);
+ opIt += 2;
+ }
+
+ // Add the rest of the operands, skipping any that were dealt with above.
+ for (; opIt != operands.end(); ++opIt)
+ spvAtomicOperands.push_back(*opIt);
+
+ return builder.createOp(opCode, typeId, spvAtomicOperands);
+}
+
+// Create group invocation operations.
+spv::Id TGlslangToSpvTraverser::createInvocationsOperation(glslang::TOperator op, spv::Id typeId, spv::Id operand)
+{
+ builder.addCapability(spv::CapabilityGroups);
+
+ std::vector<spv::Id> operands;
+ operands.push_back(builder.makeUintConstant(spv::ScopeSubgroup));
+ operands.push_back(operand);
+
+ switch (op) {
+ case glslang::EOpAnyInvocation:
+ case glslang::EOpAllInvocations:
+ return builder.createOp(op == glslang::EOpAnyInvocation ? spv::OpGroupAny : spv::OpGroupAll, typeId, operands);
+
+ case glslang::EOpAllInvocationsEqual:
+ {
+ spv::Id groupAll = builder.createOp(spv::OpGroupAll, typeId, operands);
+ spv::Id groupAny = builder.createOp(spv::OpGroupAny, typeId, operands);
+
+ return builder.createBinOp(spv::OpLogicalOr, typeId, groupAll,
+ builder.createUnaryOp(spv::OpLogicalNot, typeId, groupAny));
+ }
+ default:
+ logger->missingFunctionality("invocation operation");
+ return spv::NoResult;
+ }
+}
+
+spv::Id TGlslangToSpvTraverser::createMiscOperation(glslang::TOperator op, spv::Decoration precision, spv::Id typeId, std::vector<spv::Id>& operands, glslang::TBasicType typeProxy)
+{
+ bool isUnsigned = typeProxy == glslang::EbtUint || typeProxy == glslang::EbtUint64;
+ bool isFloat = typeProxy == glslang::EbtFloat || typeProxy == glslang::EbtDouble;
+
+ spv::Op opCode = spv::OpNop;
+ int libCall = -1;
+ size_t consumedOperands = operands.size();
+ spv::Id typeId0 = 0;
+ if (consumedOperands > 0)
+ typeId0 = builder.getTypeId(operands[0]);
+ spv::Id frexpIntType = 0;
+
+ switch (op) {
+ case glslang::EOpMin:
+ if (isFloat)
+ libCall = spv::GLSLstd450FMin;
+ else if (isUnsigned)
+ libCall = spv::GLSLstd450UMin;
+ else
+ libCall = spv::GLSLstd450SMin;
+ builder.promoteScalar(precision, operands.front(), operands.back());
+ break;
+ case glslang::EOpModf:
+ libCall = spv::GLSLstd450Modf;
+ break;
+ case glslang::EOpMax:
+ if (isFloat)
+ libCall = spv::GLSLstd450FMax;
+ else if (isUnsigned)
+ libCall = spv::GLSLstd450UMax;
+ else
+ libCall = spv::GLSLstd450SMax;
+ builder.promoteScalar(precision, operands.front(), operands.back());
+ break;
+ case glslang::EOpPow:
+ libCall = spv::GLSLstd450Pow;
+ break;
+ case glslang::EOpDot:
+ opCode = spv::OpDot;
+ break;
+ case glslang::EOpAtan:
+ libCall = spv::GLSLstd450Atan2;
+ break;
+
+ case glslang::EOpClamp:
+ if (isFloat)
+ libCall = spv::GLSLstd450FClamp;
+ else if (isUnsigned)
+ libCall = spv::GLSLstd450UClamp;
+ else
+ libCall = spv::GLSLstd450SClamp;
+ builder.promoteScalar(precision, operands.front(), operands[1]);
+ builder.promoteScalar(precision, operands.front(), operands[2]);
+ break;
+ case glslang::EOpMix:
+ if (! builder.isBoolType(builder.getScalarTypeId(builder.getTypeId(operands.back())))) {
+ assert(isFloat);
+ libCall = spv::GLSLstd450FMix;
+ } else {
+ opCode = spv::OpSelect;
+ std::swap(operands.front(), operands.back());
+ }
+ builder.promoteScalar(precision, operands.front(), operands.back());
+ break;
+ case glslang::EOpStep:
+ libCall = spv::GLSLstd450Step;
+ builder.promoteScalar(precision, operands.front(), operands.back());
+ break;
+ case glslang::EOpSmoothStep:
+ libCall = spv::GLSLstd450SmoothStep;
+ builder.promoteScalar(precision, operands[0], operands[2]);
+ builder.promoteScalar(precision, operands[1], operands[2]);
+ break;
+
+ case glslang::EOpDistance:
+ libCall = spv::GLSLstd450Distance;
+ break;
+ case glslang::EOpCross:
+ libCall = spv::GLSLstd450Cross;
+ break;
+ case glslang::EOpFaceForward:
+ libCall = spv::GLSLstd450FaceForward;
+ break;
+ case glslang::EOpReflect:
+ libCall = spv::GLSLstd450Reflect;
+ break;
+ case glslang::EOpRefract:
+ libCall = spv::GLSLstd450Refract;
+ break;
+ case glslang::EOpInterpolateAtSample:
+ builder.addCapability(spv::CapabilityInterpolationFunction);
+ libCall = spv::GLSLstd450InterpolateAtSample;
+ break;
+ case glslang::EOpInterpolateAtOffset:
+ builder.addCapability(spv::CapabilityInterpolationFunction);
+ libCall = spv::GLSLstd450InterpolateAtOffset;
+ break;
+ case glslang::EOpAddCarry:
+ opCode = spv::OpIAddCarry;
+ typeId = builder.makeStructResultType(typeId0, typeId0);
+ consumedOperands = 2;
+ break;
+ case glslang::EOpSubBorrow:
+ opCode = spv::OpISubBorrow;
+ typeId = builder.makeStructResultType(typeId0, typeId0);
+ consumedOperands = 2;
+ break;
+ case glslang::EOpUMulExtended:
+ opCode = spv::OpUMulExtended;
+ typeId = builder.makeStructResultType(typeId0, typeId0);
+ consumedOperands = 2;
+ break;
+ case glslang::EOpIMulExtended:
+ opCode = spv::OpSMulExtended;
+ typeId = builder.makeStructResultType(typeId0, typeId0);
+ consumedOperands = 2;
+ break;
+ case glslang::EOpBitfieldExtract:
+ if (isUnsigned)
+ opCode = spv::OpBitFieldUExtract;
+ else
+ opCode = spv::OpBitFieldSExtract;
+ break;
+ case glslang::EOpBitfieldInsert:
+ opCode = spv::OpBitFieldInsert;
+ break;
+
+ case glslang::EOpFma:
+ libCall = spv::GLSLstd450Fma;
+ break;
+ case glslang::EOpFrexp:
+ libCall = spv::GLSLstd450FrexpStruct;
+ if (builder.getNumComponents(operands[0]) == 1)
+ frexpIntType = builder.makeIntegerType(32, true);
+ else
+ frexpIntType = builder.makeVectorType(builder.makeIntegerType(32, true), builder.getNumComponents(operands[0]));
+ typeId = builder.makeStructResultType(typeId0, frexpIntType);
+ consumedOperands = 1;
+ break;
+ case glslang::EOpLdexp:
+ libCall = spv::GLSLstd450Ldexp;
+ break;
+
+ case glslang::EOpReadInvocation:
+ logger->missingFunctionality("shader ballot");
+ libCall = spv::GLSLstd450Bad;
+ break;
+
+ default:
+ return 0;
+ }
+
+ spv::Id id = 0;
+ if (libCall >= 0) {
+ // Use an extended instruction from the standard library.
+ // Construct the call arguments, without modifying the original operands vector.
+ // We might need the remaining arguments, e.g. in the EOpFrexp case.
+ std::vector<spv::Id> callArguments(operands.begin(), operands.begin() + consumedOperands);
+ id = builder.createBuiltinCall(typeId, stdBuiltins, libCall, callArguments);
+ } else {
+ switch (consumedOperands) {
+ case 0:
+ // should all be handled by visitAggregate and createNoArgOperation
+ assert(0);
+ return 0;
+ case 1:
+ // should all be handled by createUnaryOperation
+ assert(0);
+ return 0;
+ case 2:
+ id = builder.createBinOp(opCode, typeId, operands[0], operands[1]);
+ break;
+ default:
+ // anything 3 or over doesn't have l-value operands, so all should be consumed
+ assert(consumedOperands == operands.size());
+ id = builder.createOp(opCode, typeId, operands);
+ break;
+ }
+ }
+
+ // Decode the return types that were structures
+ switch (op) {
+ case glslang::EOpAddCarry:
+ case glslang::EOpSubBorrow:
+ builder.createStore(builder.createCompositeExtract(id, typeId0, 1), operands[2]);
+ id = builder.createCompositeExtract(id, typeId0, 0);
+ break;
+ case glslang::EOpUMulExtended:
+ case glslang::EOpIMulExtended:
+ builder.createStore(builder.createCompositeExtract(id, typeId0, 0), operands[3]);
+ builder.createStore(builder.createCompositeExtract(id, typeId0, 1), operands[2]);
+ break;
+ case glslang::EOpFrexp:
+ assert(operands.size() == 2);
+ builder.createStore(builder.createCompositeExtract(id, frexpIntType, 1), operands[1]);
+ id = builder.createCompositeExtract(id, typeId0, 0);
+ break;
+ default:
+ break;
+ }
+
+ return builder.setPrecision(id, precision);
+}
+
+// Intrinsics with no arguments, no return value, and no precision.
+spv::Id TGlslangToSpvTraverser::createNoArgOperation(glslang::TOperator op)
+{
+ // TODO: get the barrier operands correct
+
+ switch (op) {
+ case glslang::EOpEmitVertex:
+ builder.createNoResultOp(spv::OpEmitVertex);
+ return 0;
+ case glslang::EOpEndPrimitive:
+ builder.createNoResultOp(spv::OpEndPrimitive);
+ return 0;
+ case glslang::EOpBarrier:
+ if (glslangIntermediate->getProfile() != EEsProfile)
+ builder.createMemoryBarrier(spv::ScopeDevice, spv::MemorySemanticsAllMemory);
+ builder.createControlBarrier(spv::ScopeDevice, spv::ScopeDevice, spv::MemorySemanticsMaskNone);
+ return 0;
+ case glslang::EOpMemoryBarrier:
+ builder.createMemoryBarrier(spv::ScopeDevice, spv::MemorySemanticsAllMemory);
+ return 0;
+ case glslang::EOpMemoryBarrierAtomicCounter:
+ builder.createMemoryBarrier(spv::ScopeDevice, spv::MemorySemanticsAtomicCounterMemoryMask);
+ return 0;
+ case glslang::EOpMemoryBarrierBuffer:
+ builder.createMemoryBarrier(spv::ScopeDevice, spv::MemorySemanticsUniformMemoryMask);
+ return 0;
+ case glslang::EOpMemoryBarrierImage:
+ builder.createMemoryBarrier(spv::ScopeDevice, spv::MemorySemanticsImageMemoryMask);
+ return 0;
+ case glslang::EOpMemoryBarrierShared:
+ builder.createMemoryBarrier(spv::ScopeDevice, spv::MemorySemanticsWorkgroupMemoryMask);
+ return 0;
+ case glslang::EOpGroupMemoryBarrier:
+ builder.createMemoryBarrier(spv::ScopeDevice, spv::MemorySemanticsCrossWorkgroupMemoryMask);
+ return 0;
+ default:
+ logger->missingFunctionality("unknown operation with no arguments");
+ return 0;
+ }
+}
+
+spv::Id TGlslangToSpvTraverser::getSymbolId(const glslang::TIntermSymbol* symbol)
+{
+ auto iter = symbolValues.find(symbol->getId());
+ spv::Id id;
+ if (symbolValues.end() != iter) {
+ id = iter->second;
+ return id;
+ }
+
+ // it was not found, create it
+ id = createSpvVariable(symbol);
+ symbolValues[symbol->getId()] = id;
+
+ if (! symbol->getType().isStruct()) {
+ addDecoration(id, TranslatePrecisionDecoration(symbol->getType()));
+ addDecoration(id, TranslateInterpolationDecoration(symbol->getType().getQualifier()));
+ addDecoration(id, TranslateAuxiliaryStorageDecoration(symbol->getType().getQualifier()));
+ if (symbol->getType().getQualifier().hasSpecConstantId())
+ addDecoration(id, spv::DecorationSpecId, symbol->getType().getQualifier().layoutSpecConstantId);
+ if (symbol->getQualifier().hasIndex())
+ builder.addDecoration(id, spv::DecorationIndex, symbol->getQualifier().layoutIndex);
+ if (symbol->getQualifier().hasComponent())
+ builder.addDecoration(id, spv::DecorationComponent, symbol->getQualifier().layoutComponent);
+ if (glslangIntermediate->getXfbMode()) {
+ builder.addCapability(spv::CapabilityTransformFeedback);
+ if (symbol->getQualifier().hasXfbStride())
+ builder.addDecoration(id, spv::DecorationXfbStride, symbol->getQualifier().layoutXfbStride);
+ if (symbol->getQualifier().hasXfbBuffer())
+ builder.addDecoration(id, spv::DecorationXfbBuffer, symbol->getQualifier().layoutXfbBuffer);
+ if (symbol->getQualifier().hasXfbOffset())
+ builder.addDecoration(id, spv::DecorationOffset, symbol->getQualifier().layoutXfbOffset);
+ }
+ }
+
+ if (symbol->getQualifier().hasLocation())
+ builder.addDecoration(id, spv::DecorationLocation, symbol->getQualifier().layoutLocation);
+ addDecoration(id, TranslateInvariantDecoration(symbol->getType().getQualifier()));
+ if (symbol->getQualifier().hasStream() && glslangIntermediate->isMultiStream()) {
+ builder.addCapability(spv::CapabilityGeometryStreams);
+ builder.addDecoration(id, spv::DecorationStream, symbol->getQualifier().layoutStream);
+ }
+ if (symbol->getQualifier().hasSet())
+ builder.addDecoration(id, spv::DecorationDescriptorSet, symbol->getQualifier().layoutSet);
+ else if (IsDescriptorResource(symbol->getType())) {
+ // default to 0
+ builder.addDecoration(id, spv::DecorationDescriptorSet, 0);
+ }
+ if (symbol->getQualifier().hasBinding())
+ builder.addDecoration(id, spv::DecorationBinding, symbol->getQualifier().layoutBinding);
+ if (symbol->getQualifier().hasAttachment())
+ builder.addDecoration(id, spv::DecorationInputAttachmentIndex, symbol->getQualifier().layoutAttachment);
+ if (glslangIntermediate->getXfbMode()) {
+ builder.addCapability(spv::CapabilityTransformFeedback);
+ if (symbol->getQualifier().hasXfbStride())
+ builder.addDecoration(id, spv::DecorationXfbStride, symbol->getQualifier().layoutXfbStride);
+ if (symbol->getQualifier().hasXfbBuffer())
+ builder.addDecoration(id, spv::DecorationXfbBuffer, symbol->getQualifier().layoutXfbBuffer);
+ }
+
+ if (symbol->getType().isImage()) {
+ std::vector<spv::Decoration> memory;
+ TranslateMemoryDecoration(symbol->getType().getQualifier(), memory);
+ for (unsigned int i = 0; i < memory.size(); ++i)
+ addDecoration(id, memory[i]);
+ }
+
+ // built-in variable decorations
+ spv::BuiltIn builtIn = TranslateBuiltInDecoration(symbol->getQualifier().builtIn, false);
+ if (builtIn != spv::BadValue)
+ addDecoration(id, spv::DecorationBuiltIn, (int)builtIn);
+
+ return id;
+}
+
+// If 'dec' is valid, add no-operand decoration to an object
+void TGlslangToSpvTraverser::addDecoration(spv::Id id, spv::Decoration dec)
+{
+ if (dec != spv::BadValue)
+ builder.addDecoration(id, dec);
+}
+
+// If 'dec' is valid, add a one-operand decoration to an object
+void TGlslangToSpvTraverser::addDecoration(spv::Id id, spv::Decoration dec, unsigned value)
+{
+ if (dec != spv::BadValue)
+ builder.addDecoration(id, dec, value);
+}
+
+// If 'dec' is valid, add a no-operand decoration to a struct member
+void TGlslangToSpvTraverser::addMemberDecoration(spv::Id id, int member, spv::Decoration dec)
+{
+ if (dec != spv::BadValue)
+ builder.addMemberDecoration(id, (unsigned)member, dec);
+}
+
+// If 'dec' is valid, add a one-operand decoration to a struct member
+void TGlslangToSpvTraverser::addMemberDecoration(spv::Id id, int member, spv::Decoration dec, unsigned value)
+{
+ if (dec != spv::BadValue)
+ builder.addMemberDecoration(id, (unsigned)member, dec, value);
+}
+
+// Make a full tree of instructions to build a SPIR-V specialization constant,
+// or regular constant if possible.
+//
+// TBD: this is not yet done, nor verified to be the best design, it does do the leaf symbols though
+//
+// Recursively walk the nodes. The nodes form a tree whose leaves are
+// regular constants, which themselves are trees that createSpvConstant()
+// recursively walks. So, this function walks the "top" of the tree:
+// - emit specialization constant-building instructions for specConstant
+// - when running into a non-spec-constant, switch to createSpvConstant()
+spv::Id TGlslangToSpvTraverser::createSpvConstant(const glslang::TIntermTyped& node)
+{
+ assert(node.getQualifier().isConstant());
+
+ // Handle front-end constants first (non-specialization constants).
+ if (! node.getQualifier().specConstant) {
+ // hand off to the non-spec-constant path
+ assert(node.getAsConstantUnion() != nullptr || node.getAsSymbolNode() != nullptr);
+ int nextConst = 0;
+ return createSpvConstantFromConstUnionArray(node.getType(), node.getAsConstantUnion() ? node.getAsConstantUnion()->getConstArray() : node.getAsSymbolNode()->getConstArray(),
+ nextConst, false);
+ }
+
+ // We now know we have a specialization constant to build
+
+ // gl_WorkGroupSize is a special case until the front-end handles hierarchical specialization constants,
+ // even then, it's specialization ids are handled by special case syntax in GLSL: layout(local_size_x = ...
+ if (node.getType().getQualifier().builtIn == glslang::EbvWorkGroupSize) {
+ std::vector<spv::Id> dimConstId;
+ for (int dim = 0; dim < 3; ++dim) {
+ bool specConst = (glslangIntermediate->getLocalSizeSpecId(dim) != glslang::TQualifier::layoutNotSet);
+ dimConstId.push_back(builder.makeUintConstant(glslangIntermediate->getLocalSize(dim), specConst));
+ if (specConst)
+ addDecoration(dimConstId.back(), spv::DecorationSpecId, glslangIntermediate->getLocalSizeSpecId(dim));
+ }
+ return builder.makeCompositeConstant(builder.makeVectorType(builder.makeUintType(32), 3), dimConstId, true);
+ }
+
+ // An AST node labelled as specialization constant should be a symbol node.
+ // Its initializer should either be a sub tree with constant nodes, or a constant union array.
+ if (auto* sn = node.getAsSymbolNode()) {
+ if (auto* sub_tree = sn->getConstSubtree()) {
+ // Traverse the constant constructor sub tree like generating normal run-time instructions.
+ // During the AST traversal, if the node is marked as 'specConstant', SpecConstantOpModeGuard
+ // will set the builder into spec constant op instruction generating mode.
+ sub_tree->traverse(this);
+ return accessChainLoad(sub_tree->getType());
+ } else if (auto* const_union_array = &sn->getConstArray()){
+ int nextConst = 0;
+ return createSpvConstantFromConstUnionArray(sn->getType(), *const_union_array, nextConst, true);
+ }
+ }
+
+ // Neither a front-end constant node, nor a specialization constant node with constant union array or
+ // constant sub tree as initializer.
+ logger->missingFunctionality("Neither a front-end constant nor a spec constant.");
+ exit(1);
+ return spv::NoResult;
+}
+
+// Use 'consts' as the flattened glslang source of scalar constants to recursively
+// build the aggregate SPIR-V constant.
+//
+// If there are not enough elements present in 'consts', 0 will be substituted;
+// an empty 'consts' can be used to create a fully zeroed SPIR-V constant.
+//
+spv::Id TGlslangToSpvTraverser::createSpvConstantFromConstUnionArray(const glslang::TType& glslangType, const glslang::TConstUnionArray& consts, int& nextConst, bool specConstant)
+{
+ // vector of constants for SPIR-V
+ std::vector<spv::Id> spvConsts;
+
+ // Type is used for struct and array constants
+ spv::Id typeId = convertGlslangToSpvType(glslangType);
+
+ if (glslangType.isArray()) {
+ glslang::TType elementType(glslangType, 0);
+ for (int i = 0; i < glslangType.getOuterArraySize(); ++i)
+ spvConsts.push_back(createSpvConstantFromConstUnionArray(elementType, consts, nextConst, false));
+ } else if (glslangType.isMatrix()) {
+ glslang::TType vectorType(glslangType, 0);
+ for (int col = 0; col < glslangType.getMatrixCols(); ++col)
+ spvConsts.push_back(createSpvConstantFromConstUnionArray(vectorType, consts, nextConst, false));
+ } else if (glslangType.getStruct()) {
+ glslang::TVector<glslang::TTypeLoc>::const_iterator iter;
+ for (iter = glslangType.getStruct()->begin(); iter != glslangType.getStruct()->end(); ++iter)
+ spvConsts.push_back(createSpvConstantFromConstUnionArray(*iter->type, consts, nextConst, false));
+ } else if (glslangType.getVectorSize() > 1) {
+ for (unsigned int i = 0; i < (unsigned int)glslangType.getVectorSize(); ++i) {
+ bool zero = nextConst >= consts.size();
+ switch (glslangType.getBasicType()) {
+ case glslang::EbtInt:
+ spvConsts.push_back(builder.makeIntConstant(zero ? 0 : consts[nextConst].getIConst()));
+ break;
+ case glslang::EbtUint:
+ spvConsts.push_back(builder.makeUintConstant(zero ? 0 : consts[nextConst].getUConst()));
+ break;
+ case glslang::EbtInt64:
+ spvConsts.push_back(builder.makeInt64Constant(zero ? 0 : consts[nextConst].getI64Const()));
+ break;
+ case glslang::EbtUint64:
+ spvConsts.push_back(builder.makeUint64Constant(zero ? 0 : consts[nextConst].getU64Const()));
+ break;
+ case glslang::EbtFloat:
+ spvConsts.push_back(builder.makeFloatConstant(zero ? 0.0F : (float)consts[nextConst].getDConst()));
+ break;
+ case glslang::EbtDouble:
+ spvConsts.push_back(builder.makeDoubleConstant(zero ? 0.0 : consts[nextConst].getDConst()));
+ break;
+ case glslang::EbtBool:
+ spvConsts.push_back(builder.makeBoolConstant(zero ? false : consts[nextConst].getBConst()));
+ break;
+ default:
+ assert(0);
+ break;
+ }
+ ++nextConst;
+ }
+ } else {
+ // we have a non-aggregate (scalar) constant
+ bool zero = nextConst >= consts.size();
+ spv::Id scalar = 0;
+ switch (glslangType.getBasicType()) {
+ case glslang::EbtInt:
+ scalar = builder.makeIntConstant(zero ? 0 : consts[nextConst].getIConst(), specConstant);
+ break;
+ case glslang::EbtUint:
+ scalar = builder.makeUintConstant(zero ? 0 : consts[nextConst].getUConst(), specConstant);
+ break;
+ case glslang::EbtInt64:
+ scalar = builder.makeInt64Constant(zero ? 0 : consts[nextConst].getI64Const(), specConstant);
+ break;
+ case glslang::EbtUint64:
+ scalar = builder.makeUint64Constant(zero ? 0 : consts[nextConst].getU64Const(), specConstant);
+ break;
+ case glslang::EbtFloat:
+ scalar = builder.makeFloatConstant(zero ? 0.0F : (float)consts[nextConst].getDConst(), specConstant);
+ break;
+ case glslang::EbtDouble:
+ scalar = builder.makeDoubleConstant(zero ? 0.0 : consts[nextConst].getDConst(), specConstant);
+ break;
+ case glslang::EbtBool:
+ scalar = builder.makeBoolConstant(zero ? false : consts[nextConst].getBConst(), specConstant);
+ break;
+ default:
+ assert(0);
+ break;
+ }
+ ++nextConst;
+ return scalar;
+ }
+
+ return builder.makeCompositeConstant(typeId, spvConsts);
+}
+
+// Return true if the node is a constant or symbol whose reading has no
+// non-trivial observable cost or effect.
+bool TGlslangToSpvTraverser::isTrivialLeaf(const glslang::TIntermTyped* node)
+{
+ // don't know what this is
+ if (node == nullptr)
+ return false;
+
+ // a constant is safe
+ if (node->getAsConstantUnion() != nullptr)
+ return true;
+
+ // not a symbol means non-trivial
+ if (node->getAsSymbolNode() == nullptr)
+ return false;
+
+ // a symbol, depends on what's being read
+ switch (node->getType().getQualifier().storage) {
+ case glslang::EvqTemporary:
+ case glslang::EvqGlobal:
+ case glslang::EvqIn:
+ case glslang::EvqInOut:
+ case glslang::EvqConst:
+ case glslang::EvqConstReadOnly:
+ case glslang::EvqUniform:
+ return true;
+ default:
+ return false;
+ }
+}
+
+// A node is trivial if it is a single operation with no side effects.
+// Error on the side of saying non-trivial.
+// Return true if trivial.
+bool TGlslangToSpvTraverser::isTrivial(const glslang::TIntermTyped* node)
+{
+ if (node == nullptr)
+ return false;
+
+ // symbols and constants are trivial
+ if (isTrivialLeaf(node))
+ return true;
+
+ // otherwise, it needs to be a simple operation or one or two leaf nodes
+
+ // not a simple operation
+ const glslang::TIntermBinary* binaryNode = node->getAsBinaryNode();
+ const glslang::TIntermUnary* unaryNode = node->getAsUnaryNode();
+ if (binaryNode == nullptr && unaryNode == nullptr)
+ return false;
+
+ // not on leaf nodes
+ if (binaryNode && (! isTrivialLeaf(binaryNode->getLeft()) || ! isTrivialLeaf(binaryNode->getRight())))
+ return false;
+
+ if (unaryNode && ! isTrivialLeaf(unaryNode->getOperand())) {
+ return false;
+ }
+
+ switch (node->getAsOperator()->getOp()) {
+ case glslang::EOpLogicalNot:
+ case glslang::EOpConvIntToBool:
+ case glslang::EOpConvUintToBool:
+ case glslang::EOpConvFloatToBool:
+ case glslang::EOpConvDoubleToBool:
+ case glslang::EOpEqual:
+ case glslang::EOpNotEqual:
+ case glslang::EOpLessThan:
+ case glslang::EOpGreaterThan:
+ case glslang::EOpLessThanEqual:
+ case glslang::EOpGreaterThanEqual:
+ case glslang::EOpIndexDirect:
+ case glslang::EOpIndexDirectStruct:
+ case glslang::EOpLogicalXor:
+ case glslang::EOpAny:
+ case glslang::EOpAll:
+ return true;
+ default:
+ return false;
+ }
+}
+
+// Emit short-circuiting code, where 'right' is never evaluated unless
+// the left side is true (for &&) or false (for ||).
+spv::Id TGlslangToSpvTraverser::createShortCircuit(glslang::TOperator op, glslang::TIntermTyped& left, glslang::TIntermTyped& right)
+{
+ spv::Id boolTypeId = builder.makeBoolType();
+
+ // emit left operand
+ builder.clearAccessChain();
+ left.traverse(this);
+ spv::Id leftId = accessChainLoad(left.getType());
+
+ // Operands to accumulate OpPhi operands
+ std::vector<spv::Id> phiOperands;
+ // accumulate left operand's phi information
+ phiOperands.push_back(leftId);
+ phiOperands.push_back(builder.getBuildPoint()->getId());
+
+ // Make the two kinds of operation symmetric with a "!"
+ // || => emit "if (! left) result = right"
+ // && => emit "if ( left) result = right"
+ //
+ // TODO: this runtime "not" for || could be avoided by adding functionality
+ // to 'builder' to have an "else" without an "then"
+ if (op == glslang::EOpLogicalOr)
+ leftId = builder.createUnaryOp(spv::OpLogicalNot, boolTypeId, leftId);
+
+ // make an "if" based on the left value
+ spv::Builder::If ifBuilder(leftId, builder);
+
+ // emit right operand as the "then" part of the "if"
+ builder.clearAccessChain();
+ right.traverse(this);
+ spv::Id rightId = accessChainLoad(right.getType());
+
+ // accumulate left operand's phi information
+ phiOperands.push_back(rightId);
+ phiOperands.push_back(builder.getBuildPoint()->getId());
+
+ // finish the "if"
+ ifBuilder.makeEndIf();
+
+ // phi together the two results
+ return builder.createOp(spv::OpPhi, boolTypeId, phiOperands);
+}
+
+}; // end anonymous namespace
+
+namespace glslang {
+
+void GetSpirvVersion(std::string& version)
+{
+ const int bufSize = 100;
+ char buf[bufSize];
+ snprintf(buf, bufSize, "0x%08x, Revision %d", spv::Version, spv::Revision);
+ version = buf;
+}
+
+// Write SPIR-V out to a binary file
+void OutputSpv(const std::vector<unsigned int>& spirv, const char* baseName)
+{
+ std::ofstream out;
+ out.open(baseName, std::ios::binary | std::ios::out);
+ for (int i = 0; i < (int)spirv.size(); ++i) {
+ unsigned int word = spirv[i];
+ out.write((const char*)&word, 4);
+ }
+ out.close();
+}
+
+//
+// Set up the glslang traversal
+//
+void GlslangToSpv(const glslang::TIntermediate& intermediate, std::vector<unsigned int>& spirv)
+{
+ spv::SpvBuildLogger logger;
+ GlslangToSpv(intermediate, spirv, &logger);
+}
+
+void GlslangToSpv(const glslang::TIntermediate& intermediate, std::vector<unsigned int>& spirv, spv::SpvBuildLogger* logger)
+{
+ TIntermNode* root = intermediate.getTreeRoot();
+
+ if (root == 0)
+ return;
+
+ glslang::GetThreadPoolAllocator().push();
+
+ TGlslangToSpvTraverser it(&intermediate, logger);
+
+ root->traverse(&it);
+
+ it.dumpSpv(spirv);
+
+ glslang::GetThreadPoolAllocator().pop();
+}
+
+}; // end namespace glslang
diff --git a/chromium/third_party/glslang/src/SPIRV/GlslangToSpv.h b/chromium/third_party/glslang/src/SPIRV/GlslangToSpv.h
new file mode 100644
index 00000000000..8d006f387f7
--- /dev/null
+++ b/chromium/third_party/glslang/src/SPIRV/GlslangToSpv.h
@@ -0,0 +1,49 @@
+//
+//Copyright (C) 2014 LunarG, 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:
+//
+// Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 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.
+//
+// Neither the name of 3Dlabs Inc. Ltd. nor the names of its
+// contributors may be used to endorse or promote products derived
+// from this software without specific prior written permission.
+//
+//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+//"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 THE
+//COPYRIGHT HOLDERS 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.
+
+#include "../glslang/Include/intermediate.h"
+
+#include <string>
+#include <vector>
+
+#include "Logger.h"
+
+namespace glslang {
+
+void GetSpirvVersion(std::string&);
+void GlslangToSpv(const glslang::TIntermediate& intermediate, std::vector<unsigned int>& spirv);
+void GlslangToSpv(const glslang::TIntermediate& intermediate, std::vector<unsigned int>& spirv, spv::SpvBuildLogger* logger);
+void OutputSpv(const std::vector<unsigned int>& spirv, const char* baseName);
+
+}
diff --git a/chromium/third_party/glslang/src/SPIRV/InReadableOrder.cpp b/chromium/third_party/glslang/src/SPIRV/InReadableOrder.cpp
new file mode 100644
index 00000000000..86aae6d057f
--- /dev/null
+++ b/chromium/third_party/glslang/src/SPIRV/InReadableOrder.cpp
@@ -0,0 +1,113 @@
+//
+//Copyright (C) 2016 Google, 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:
+//
+// Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 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.
+//
+// Neither the name of 3Dlabs Inc. Ltd. nor the names of its
+// contributors may be used to endorse or promote products derived
+// from this software without specific prior written permission.
+//
+//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+//"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 THE
+//COPYRIGHT HOLDERS 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.
+
+// The SPIR-V spec requires code blocks to appear in an order satisfying the
+// dominator-tree direction (ie, dominator before the dominated). This is,
+// actually, easy to achieve: any pre-order CFG traversal algorithm will do it.
+// Because such algorithms visit a block only after traversing some path to it
+// from the root, they necessarily visit the block's idom first.
+//
+// But not every graph-traversal algorithm outputs blocks in an order that
+// appears logical to human readers. The problem is that unrelated branches may
+// be interspersed with each other, and merge blocks may come before some of the
+// branches being merged.
+//
+// A good, human-readable order of blocks may be achieved by performing
+// depth-first search but delaying merge nodes until after all their branches
+// have been visited. This is implemented below by the inReadableOrder()
+// function.
+
+#include "spvIR.h"
+
+#include <cassert>
+#include <unordered_map>
+
+using spv::Block;
+using spv::Id;
+
+namespace {
+// Traverses CFG in a readable order, invoking a pre-set callback on each block.
+// Use by calling visit() on the root block.
+class ReadableOrderTraverser {
+public:
+ explicit ReadableOrderTraverser(std::function<void(Block*)> callback) : callback_(callback) {}
+ // Visits the block if it hasn't been visited already and isn't currently
+ // being delayed. Invokes callback(block), then descends into its
+ // successors. Delays merge-block and continue-block processing until all
+ // the branches have been completed.
+ void visit(Block* block)
+ {
+ assert(block);
+ if (visited_[block] || delayed_[block])
+ return;
+ callback_(block);
+ visited_[block] = true;
+ Block* mergeBlock = nullptr;
+ Block* continueBlock = nullptr;
+ auto mergeInst = block->getMergeInstruction();
+ if (mergeInst) {
+ Id mergeId = mergeInst->getIdOperand(0);
+ mergeBlock = block->getParent().getParent().getInstruction(mergeId)->getBlock();
+ delayed_[mergeBlock] = true;
+ if (mergeInst->getOpCode() == spv::OpLoopMerge) {
+ Id continueId = mergeInst->getIdOperand(1);
+ continueBlock =
+ block->getParent().getParent().getInstruction(continueId)->getBlock();
+ delayed_[continueBlock] = true;
+ }
+ }
+ const auto successors = block->getSuccessors();
+ for (auto it = successors.cbegin(); it != successors.cend(); ++it)
+ visit(*it);
+ if (continueBlock) {
+ delayed_[continueBlock] = false;
+ visit(continueBlock);
+ }
+ if (mergeBlock) {
+ delayed_[mergeBlock] = false;
+ visit(mergeBlock);
+ }
+ }
+
+private:
+ std::function<void(Block*)> callback_;
+ // Whether a block has already been visited or is being delayed.
+ std::unordered_map<Block *, bool> visited_, delayed_;
+};
+}
+
+void spv::inReadableOrder(Block* root, std::function<void(Block*)> callback)
+{
+ ReadableOrderTraverser(callback).visit(root);
+}
diff --git a/chromium/third_party/glslang/src/SPIRV/Logger.cpp b/chromium/third_party/glslang/src/SPIRV/Logger.cpp
new file mode 100644
index 00000000000..48bd4e3ade6
--- /dev/null
+++ b/chromium/third_party/glslang/src/SPIRV/Logger.cpp
@@ -0,0 +1,68 @@
+//
+// Copyright (C) 2016 Google, 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:
+//
+// Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 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.
+//
+// Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived
+// from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "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 THE
+// COPYRIGHT HOLDERS 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.
+
+#include "Logger.h"
+
+#include <algorithm>
+#include <iterator>
+#include <sstream>
+
+namespace spv {
+
+void SpvBuildLogger::tbdFunctionality(const std::string& f)
+{
+ if (std::find(std::begin(tbdFeatures), std::end(tbdFeatures), f) == std::end(tbdFeatures))
+ tbdFeatures.push_back(f);
+}
+
+void SpvBuildLogger::missingFunctionality(const std::string& f)
+{
+ if (std::find(std::begin(missingFeatures), std::end(missingFeatures), f) == std::end(missingFeatures))
+ missingFeatures.push_back(f);
+}
+
+std::string SpvBuildLogger::getAllMessages() const {
+ std::ostringstream messages;
+ for (auto it = tbdFeatures.cbegin(); it != tbdFeatures.cend(); ++it)
+ messages << "TBD functionality: " << *it << "\n";
+ for (auto it = missingFeatures.cbegin(); it != missingFeatures.cend(); ++it)
+ messages << "Missing functionality: " << *it << "\n";
+ for (auto it = warnings.cbegin(); it != warnings.cend(); ++it)
+ messages << "warning: " << *it << "\n";
+ for (auto it = errors.cbegin(); it != errors.cend(); ++it)
+ messages << "error: " << *it << "\n";
+ return messages.str();
+}
+
+} // end spv namespace
diff --git a/chromium/third_party/glslang/src/SPIRV/Logger.h b/chromium/third_party/glslang/src/SPIRV/Logger.h
new file mode 100644
index 00000000000..2e4ddaf517b
--- /dev/null
+++ b/chromium/third_party/glslang/src/SPIRV/Logger.h
@@ -0,0 +1,74 @@
+//
+// Copyright (C) 2016 Google, 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:
+//
+// Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 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.
+//
+// Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived
+// from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "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 THE
+// COPYRIGHT HOLDERS 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.
+
+#ifndef GLSLANG_SPIRV_LOGGER_H
+#define GLSLANG_SPIRV_LOGGER_H
+
+#include <string>
+#include <vector>
+
+namespace spv {
+
+// A class for holding all SPIR-V build status messages, including
+// missing/TBD functionalities, warnings, and errors.
+class SpvBuildLogger {
+public:
+ SpvBuildLogger() {}
+
+ // Registers a TBD functionality.
+ void tbdFunctionality(const std::string& f);
+ // Registers a missing functionality.
+ void missingFunctionality(const std::string& f);
+
+ // Logs a warning.
+ void warning(const std::string& w) { warnings.push_back(w); }
+ // Logs an error.
+ void error(const std::string& e) { errors.push_back(e); }
+
+ // Returns all messages accumulated in the order of:
+ // TBD functionalities, missing functionalities, warnings, errors.
+ std::string getAllMessages() const;
+
+private:
+ SpvBuildLogger(const SpvBuildLogger&);
+
+ std::vector<std::string> tbdFeatures;
+ std::vector<std::string> missingFeatures;
+ std::vector<std::string> warnings;
+ std::vector<std::string> errors;
+};
+
+} // end spv namespace
+
+#endif // GLSLANG_SPIRV_LOGGER_H
diff --git a/chromium/third_party/glslang/src/SPIRV/SPVRemapper.cpp b/chromium/third_party/glslang/src/SPIRV/SPVRemapper.cpp
new file mode 100755
index 00000000000..1bbd58924f9
--- /dev/null
+++ b/chromium/third_party/glslang/src/SPIRV/SPVRemapper.cpp
@@ -0,0 +1,1241 @@
+//
+//Copyright (C) 2015 LunarG, 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:
+//
+// Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 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.
+//
+// Neither the name of 3Dlabs Inc. Ltd. nor the names of its
+// contributors may be used to endorse or promote products derived
+// from this software without specific prior written permission.
+//
+//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+//"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 THE
+//COPYRIGHT HOLDERS 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.
+//
+
+#include "SPVRemapper.h"
+#include "doc.h"
+
+#if !defined (use_cpp11)
+// ... not supported before C++11
+#else // defined (use_cpp11)
+
+#include <algorithm>
+#include <cassert>
+#include "../glslang/Include/Common.h"
+
+namespace spv {
+
+ // By default, just abort on error. Can be overridden via RegisterErrorHandler
+ spirvbin_t::errorfn_t spirvbin_t::errorHandler = [](const std::string&) { exit(5); };
+ // By default, eat log messages. Can be overridden via RegisterLogHandler
+ spirvbin_t::logfn_t spirvbin_t::logHandler = [](const std::string&) { };
+
+ // This can be overridden to provide other message behavior if needed
+ void spirvbin_t::msg(int minVerbosity, int indent, const std::string& txt) const
+ {
+ if (verbose >= minVerbosity)
+ logHandler(std::string(indent, ' ') + txt);
+ }
+
+ // hash opcode, with special handling for OpExtInst
+ std::uint32_t spirvbin_t::asOpCodeHash(unsigned word)
+ {
+ const spv::Op opCode = asOpCode(word);
+
+ std::uint32_t offset = 0;
+
+ switch (opCode) {
+ case spv::OpExtInst:
+ offset += asId(word + 4); break;
+ default:
+ break;
+ }
+
+ return opCode * 19 + offset; // 19 = small prime
+ }
+
+ spirvbin_t::range_t spirvbin_t::literalRange(spv::Op opCode) const
+ {
+ static const int maxCount = 1<<30;
+
+ switch (opCode) {
+ case spv::OpTypeFloat: // fall through...
+ case spv::OpTypePointer: return range_t(2, 3);
+ case spv::OpTypeInt: return range_t(2, 4);
+ // TODO: case spv::OpTypeImage:
+ // TODO: case spv::OpTypeSampledImage:
+ case spv::OpTypeSampler: return range_t(3, 8);
+ case spv::OpTypeVector: // fall through
+ case spv::OpTypeMatrix: // ...
+ case spv::OpTypePipe: return range_t(3, 4);
+ case spv::OpConstant: return range_t(3, maxCount);
+ default: return range_t(0, 0);
+ }
+ }
+
+ spirvbin_t::range_t spirvbin_t::typeRange(spv::Op opCode) const
+ {
+ static const int maxCount = 1<<30;
+
+ if (isConstOp(opCode))
+ return range_t(1, 2);
+
+ switch (opCode) {
+ case spv::OpTypeVector: // fall through
+ case spv::OpTypeMatrix: // ...
+ case spv::OpTypeSampler: // ...
+ case spv::OpTypeArray: // ...
+ case spv::OpTypeRuntimeArray: // ...
+ case spv::OpTypePipe: return range_t(2, 3);
+ case spv::OpTypeStruct: // fall through
+ case spv::OpTypeFunction: return range_t(2, maxCount);
+ case spv::OpTypePointer: return range_t(3, 4);
+ default: return range_t(0, 0);
+ }
+ }
+
+ spirvbin_t::range_t spirvbin_t::constRange(spv::Op opCode) const
+ {
+ static const int maxCount = 1<<30;
+
+ switch (opCode) {
+ case spv::OpTypeArray: // fall through...
+ case spv::OpTypeRuntimeArray: return range_t(3, 4);
+ case spv::OpConstantComposite: return range_t(3, maxCount);
+ default: return range_t(0, 0);
+ }
+ }
+
+ // Is this an opcode we should remove when using --strip?
+ bool spirvbin_t::isStripOp(spv::Op opCode) const
+ {
+ switch (opCode) {
+ case spv::OpSource:
+ case spv::OpSourceExtension:
+ case spv::OpName:
+ case spv::OpMemberName:
+ case spv::OpLine: return true;
+ default: return false;
+ }
+ }
+
+ bool spirvbin_t::isFlowCtrl(spv::Op opCode) const
+ {
+ switch (opCode) {
+ case spv::OpBranchConditional:
+ case spv::OpBranch:
+ case spv::OpSwitch:
+ case spv::OpLoopMerge:
+ case spv::OpSelectionMerge:
+ case spv::OpLabel:
+ case spv::OpFunction:
+ case spv::OpFunctionEnd: return true;
+ default: return false;
+ }
+ }
+
+ bool spirvbin_t::isTypeOp(spv::Op opCode) const
+ {
+ switch (opCode) {
+ case spv::OpTypeVoid:
+ case spv::OpTypeBool:
+ case spv::OpTypeInt:
+ case spv::OpTypeFloat:
+ case spv::OpTypeVector:
+ case spv::OpTypeMatrix:
+ case spv::OpTypeImage:
+ case spv::OpTypeSampler:
+ case spv::OpTypeArray:
+ case spv::OpTypeRuntimeArray:
+ case spv::OpTypeStruct:
+ case spv::OpTypeOpaque:
+ case spv::OpTypePointer:
+ case spv::OpTypeFunction:
+ case spv::OpTypeEvent:
+ case spv::OpTypeDeviceEvent:
+ case spv::OpTypeReserveId:
+ case spv::OpTypeQueue:
+ case spv::OpTypeSampledImage:
+ case spv::OpTypePipe: return true;
+ default: return false;
+ }
+ }
+
+ bool spirvbin_t::isConstOp(spv::Op opCode) const
+ {
+ switch (opCode) {
+ case spv::OpConstantNull: error("unimplemented constant type");
+ case spv::OpConstantSampler: error("unimplemented constant type");
+
+ case spv::OpConstantTrue:
+ case spv::OpConstantFalse:
+ case spv::OpConstantComposite:
+ case spv::OpConstant: return true;
+ default: return false;
+ }
+ }
+
+ const auto inst_fn_nop = [](spv::Op, unsigned) { return false; };
+ const auto op_fn_nop = [](spv::Id&) { };
+
+ // g++ doesn't like these defined in the class proper in an anonymous namespace.
+ // Dunno why. Also MSVC doesn't like the constexpr keyword. Also dunno why.
+ // Defining them externally seems to please both compilers, so, here they are.
+ const spv::Id spirvbin_t::unmapped = spv::Id(-10000);
+ const spv::Id spirvbin_t::unused = spv::Id(-10001);
+ const int spirvbin_t::header_size = 5;
+
+ spv::Id spirvbin_t::nextUnusedId(spv::Id id)
+ {
+ while (isNewIdMapped(id)) // search for an unused ID
+ ++id;
+
+ return id;
+ }
+
+ spv::Id spirvbin_t::localId(spv::Id id, spv::Id newId)
+ {
+ assert(id != spv::NoResult && newId != spv::NoResult);
+
+ if (id >= idMapL.size())
+ idMapL.resize(id+1, unused);
+
+ if (newId != unmapped && newId != unused) {
+ if (isOldIdUnused(id))
+ error(std::string("ID unused in module: ") + std::to_string(id));
+
+ if (!isOldIdUnmapped(id))
+ error(std::string("ID already mapped: ") + std::to_string(id) + " -> "
+ + std::to_string(localId(id)));
+
+ if (isNewIdMapped(newId))
+ error(std::string("ID already used in module: ") + std::to_string(newId));
+
+ msg(4, 4, std::string("map: ") + std::to_string(id) + " -> " + std::to_string(newId));
+ setMapped(newId);
+ largestNewId = std::max(largestNewId, newId);
+ }
+
+ return idMapL[id] = newId;
+ }
+
+ // Parse a literal string from the SPIR binary and return it as an std::string
+ // Due to C++11 RValue references, this doesn't copy the result string.
+ std::string spirvbin_t::literalString(unsigned word) const
+ {
+ std::string literal;
+
+ literal.reserve(16);
+
+ const char* bytes = reinterpret_cast<const char*>(spv.data() + word);
+
+ while (bytes && *bytes)
+ literal += *bytes++;
+
+ return literal;
+ }
+
+
+ void spirvbin_t::applyMap()
+ {
+ msg(3, 2, std::string("Applying map: "));
+
+ // Map local IDs through the ID map
+ process(inst_fn_nop, // ignore instructions
+ [this](spv::Id& id) {
+ id = localId(id);
+ assert(id != unused && id != unmapped);
+ }
+ );
+ }
+
+
+ // Find free IDs for anything we haven't mapped
+ void spirvbin_t::mapRemainder()
+ {
+ msg(3, 2, std::string("Remapping remainder: "));
+
+ spv::Id unusedId = 1; // can't use 0: that's NoResult
+ spirword_t maxBound = 0;
+
+ for (spv::Id id = 0; id < idMapL.size(); ++id) {
+ if (isOldIdUnused(id))
+ continue;
+
+ // Find a new mapping for any used but unmapped IDs
+ if (isOldIdUnmapped(id))
+ localId(id, unusedId = nextUnusedId(unusedId));
+
+ if (isOldIdUnmapped(id))
+ error(std::string("old ID not mapped: ") + std::to_string(id));
+
+ // Track max bound
+ maxBound = std::max(maxBound, localId(id) + 1);
+ }
+
+ bound(maxBound); // reset header ID bound to as big as it now needs to be
+ }
+
+ void spirvbin_t::stripDebug()
+ {
+ if ((options & STRIP) == 0)
+ return;
+
+ // build local Id and name maps
+ process(
+ [&](spv::Op opCode, unsigned start) {
+ // remember opcodes we want to strip later
+ if (isStripOp(opCode))
+ stripInst(start);
+ return true;
+ },
+ op_fn_nop);
+ }
+
+ void spirvbin_t::buildLocalMaps()
+ {
+ msg(2, 2, std::string("build local maps: "));
+
+ mapped.clear();
+ idMapL.clear();
+// preserve nameMap, so we don't clear that.
+ fnPos.clear();
+ fnPosDCE.clear();
+ fnCalls.clear();
+ typeConstPos.clear();
+ typeConstPosR.clear();
+ entryPoint = spv::NoResult;
+ largestNewId = 0;
+
+ idMapL.resize(bound(), unused);
+
+ int fnStart = 0;
+ spv::Id fnRes = spv::NoResult;
+
+ // build local Id and name maps
+ process(
+ [&](spv::Op opCode, unsigned start) {
+ // remember opcodes we want to strip later
+ if ((options & STRIP) && isStripOp(opCode))
+ stripInst(start);
+
+ if (opCode == spv::Op::OpName) {
+ const spv::Id target = asId(start+1);
+ const std::string name = literalString(start+2);
+ nameMap[name] = target;
+
+ } else if (opCode == spv::Op::OpFunctionCall) {
+ ++fnCalls[asId(start + 3)];
+ } else if (opCode == spv::Op::OpEntryPoint) {
+ entryPoint = asId(start + 2);
+ } else if (opCode == spv::Op::OpFunction) {
+ if (fnStart != 0)
+ error("nested function found");
+ fnStart = start;
+ fnRes = asId(start + 2);
+ } else if (opCode == spv::Op::OpFunctionEnd) {
+ assert(fnRes != spv::NoResult);
+ if (fnStart == 0)
+ error("function end without function start");
+ fnPos[fnRes] = range_t(fnStart, start + asWordCount(start));
+ fnStart = 0;
+ } else if (isConstOp(opCode)) {
+ assert(asId(start + 2) != spv::NoResult);
+ typeConstPos.insert(start);
+ typeConstPosR[asId(start + 2)] = start;
+ } else if (isTypeOp(opCode)) {
+ assert(asId(start + 1) != spv::NoResult);
+ typeConstPos.insert(start);
+ typeConstPosR[asId(start + 1)] = start;
+ }
+
+ return false;
+ },
+
+ [this](spv::Id& id) { localId(id, unmapped); }
+ );
+ }
+
+ // Validate the SPIR header
+ void spirvbin_t::validate() const
+ {
+ msg(2, 2, std::string("validating: "));
+
+ if (spv.size() < header_size)
+ error("file too short: ");
+
+ if (magic() != spv::MagicNumber)
+ error("bad magic number");
+
+ // field 1 = version
+ // field 2 = generator magic
+ // field 3 = result <id> bound
+
+ if (schemaNum() != 0)
+ error("bad schema, must be 0");
+ }
+
+
+ int spirvbin_t::processInstruction(unsigned word, instfn_t instFn, idfn_t idFn)
+ {
+ const auto instructionStart = word;
+ const unsigned wordCount = asWordCount(instructionStart);
+ const spv::Op opCode = asOpCode(instructionStart);
+ const int nextInst = word++ + wordCount;
+
+ if (nextInst > int(spv.size()))
+ error("spir instruction terminated too early");
+
+ // Base for computing number of operands; will be updated as more is learned
+ unsigned numOperands = wordCount - 1;
+
+ if (instFn(opCode, instructionStart))
+ return nextInst;
+
+ // Read type and result ID from instruction desc table
+ if (spv::InstructionDesc[opCode].hasType()) {
+ idFn(asId(word++));
+ --numOperands;
+ }
+
+ if (spv::InstructionDesc[opCode].hasResult()) {
+ idFn(asId(word++));
+ --numOperands;
+ }
+
+ // Extended instructions: currently, assume everything is an ID.
+ // TODO: add whatever data we need for exceptions to that
+ if (opCode == spv::OpExtInst) {
+ word += 2; // instruction set, and instruction from set
+ numOperands -= 2;
+
+ for (unsigned op=0; op < numOperands; ++op)
+ idFn(asId(word++)); // ID
+
+ return nextInst;
+ }
+
+ // Store IDs from instruction in our map
+ for (int op = 0; numOperands > 0; ++op, --numOperands) {
+ switch (spv::InstructionDesc[opCode].operands.getClass(op)) {
+ case spv::OperandId:
+ idFn(asId(word++));
+ break;
+
+ case spv::OperandVariableIds:
+ for (unsigned i = 0; i < numOperands; ++i)
+ idFn(asId(word++));
+ return nextInst;
+
+ case spv::OperandVariableLiterals:
+ // for clarity
+ // if (opCode == spv::OpDecorate && asDecoration(word - 1) == spv::DecorationBuiltIn) {
+ // ++word;
+ // --numOperands;
+ // }
+ // word += numOperands;
+ return nextInst;
+
+ case spv::OperandVariableLiteralId:
+ while (numOperands > 0) {
+ ++word; // immediate
+ idFn(asId(word++)); // ID
+ numOperands -= 2;
+ }
+ return nextInst;
+
+ case spv::OperandLiteralString: {
+ const int stringWordCount = literalStringWords(literalString(word));
+ word += stringWordCount;
+ numOperands -= (stringWordCount-1); // -1 because for() header post-decrements
+ break;
+ }
+
+ // Execution mode might have extra literal operands. Skip them.
+ case spv::OperandExecutionMode:
+ return nextInst;
+
+ // Single word operands we simply ignore, as they hold no IDs
+ case spv::OperandLiteralNumber:
+ case spv::OperandSource:
+ case spv::OperandExecutionModel:
+ case spv::OperandAddressing:
+ case spv::OperandMemory:
+ case spv::OperandStorage:
+ case spv::OperandDimensionality:
+ case spv::OperandSamplerAddressingMode:
+ case spv::OperandSamplerFilterMode:
+ case spv::OperandSamplerImageFormat:
+ case spv::OperandImageChannelOrder:
+ case spv::OperandImageChannelDataType:
+ case spv::OperandImageOperands:
+ case spv::OperandFPFastMath:
+ case spv::OperandFPRoundingMode:
+ case spv::OperandLinkageType:
+ case spv::OperandAccessQualifier:
+ case spv::OperandFuncParamAttr:
+ case spv::OperandDecoration:
+ case spv::OperandBuiltIn:
+ case spv::OperandSelect:
+ case spv::OperandLoop:
+ case spv::OperandFunction:
+ case spv::OperandMemorySemantics:
+ case spv::OperandMemoryAccess:
+ case spv::OperandScope:
+ case spv::OperandGroupOperation:
+ case spv::OperandKernelEnqueueFlags:
+ case spv::OperandKernelProfilingInfo:
+ case spv::OperandCapability:
+ ++word;
+ break;
+
+ default:
+ assert(0 && "Unhandled Operand Class");
+ break;
+ }
+ }
+
+ return nextInst;
+ }
+
+ // Make a pass over all the instructions and process them given appropriate functions
+ spirvbin_t& spirvbin_t::process(instfn_t instFn, idfn_t idFn, unsigned begin, unsigned end)
+ {
+ // For efficiency, reserve name map space. It can grow if needed.
+ nameMap.reserve(32);
+
+ // If begin or end == 0, use defaults
+ begin = (begin == 0 ? header_size : begin);
+ end = (end == 0 ? unsigned(spv.size()) : end);
+
+ // basic parsing and InstructionDesc table borrowed from SpvDisassemble.cpp...
+ unsigned nextInst = unsigned(spv.size());
+
+ for (unsigned word = begin; word < end; word = nextInst)
+ nextInst = processInstruction(word, instFn, idFn);
+
+ return *this;
+ }
+
+ // Apply global name mapping to a single module
+ void spirvbin_t::mapNames()
+ {
+ static const std::uint32_t softTypeIdLimit = 3011; // small prime. TODO: get from options
+ static const std::uint32_t firstMappedID = 3019; // offset into ID space
+
+ for (const auto& name : nameMap) {
+ std::uint32_t hashval = 1911;
+ for (const char c : name.first)
+ hashval = hashval * 1009 + c;
+
+ if (isOldIdUnmapped(name.second))
+ localId(name.second, nextUnusedId(hashval % softTypeIdLimit + firstMappedID));
+ }
+ }
+
+ // Map fn contents to IDs of similar functions in other modules
+ void spirvbin_t::mapFnBodies()
+ {
+ static const std::uint32_t softTypeIdLimit = 19071; // small prime. TODO: get from options
+ static const std::uint32_t firstMappedID = 6203; // offset into ID space
+
+ // Initial approach: go through some high priority opcodes first and assign them
+ // hash values.
+
+ spv::Id fnId = spv::NoResult;
+ std::vector<unsigned> instPos;
+ instPos.reserve(unsigned(spv.size()) / 16); // initial estimate; can grow if needed.
+
+ // Build local table of instruction start positions
+ process(
+ [&](spv::Op, unsigned start) { instPos.push_back(start); return true; },
+ op_fn_nop);
+
+ // Window size for context-sensitive canonicalization values
+ // Empirical best size from a single data set. TODO: Would be a good tunable.
+ // We essentially perform a little convolution around each instruction,
+ // to capture the flavor of nearby code, to hopefully match to similar
+ // code in other modules.
+ static const unsigned windowSize = 2;
+
+ for (unsigned entry = 0; entry < unsigned(instPos.size()); ++entry) {
+ const unsigned start = instPos[entry];
+ const spv::Op opCode = asOpCode(start);
+
+ if (opCode == spv::OpFunction)
+ fnId = asId(start + 2);
+
+ if (opCode == spv::OpFunctionEnd)
+ fnId = spv::NoResult;
+
+ if (fnId != spv::NoResult) { // if inside a function
+ if (spv::InstructionDesc[opCode].hasResult()) {
+ const unsigned word = start + (spv::InstructionDesc[opCode].hasType() ? 2 : 1);
+ const spv::Id resId = asId(word);
+ std::uint32_t hashval = fnId * 17; // small prime
+
+ for (unsigned i = entry-1; i >= entry-windowSize; --i) {
+ if (asOpCode(instPos[i]) == spv::OpFunction)
+ break;
+ hashval = hashval * 30103 + asOpCodeHash(instPos[i]); // 30103 = semiarbitrary prime
+ }
+
+ for (unsigned i = entry; i <= entry + windowSize; ++i) {
+ if (asOpCode(instPos[i]) == spv::OpFunctionEnd)
+ break;
+ hashval = hashval * 30103 + asOpCodeHash(instPos[i]); // 30103 = semiarbitrary prime
+ }
+
+ if (isOldIdUnmapped(resId))
+ localId(resId, nextUnusedId(hashval % softTypeIdLimit + firstMappedID));
+ }
+ }
+ }
+
+ spv::Op thisOpCode(spv::OpNop);
+ std::unordered_map<int, int> opCounter;
+ int idCounter(0);
+ fnId = spv::NoResult;
+
+ process(
+ [&](spv::Op opCode, unsigned start) {
+ switch (opCode) {
+ case spv::OpFunction:
+ // Reset counters at each function
+ idCounter = 0;
+ opCounter.clear();
+ fnId = asId(start + 2);
+ break;
+
+ case spv::OpImageSampleImplicitLod:
+ case spv::OpImageSampleExplicitLod:
+ case spv::OpImageSampleDrefImplicitLod:
+ case spv::OpImageSampleDrefExplicitLod:
+ case spv::OpImageSampleProjImplicitLod:
+ case spv::OpImageSampleProjExplicitLod:
+ case spv::OpImageSampleProjDrefImplicitLod:
+ case spv::OpImageSampleProjDrefExplicitLod:
+ case spv::OpDot:
+ case spv::OpCompositeExtract:
+ case spv::OpCompositeInsert:
+ case spv::OpVectorShuffle:
+ case spv::OpLabel:
+ case spv::OpVariable:
+
+ case spv::OpAccessChain:
+ case spv::OpLoad:
+ case spv::OpStore:
+ case spv::OpCompositeConstruct:
+ case spv::OpFunctionCall:
+ ++opCounter[opCode];
+ idCounter = 0;
+ thisOpCode = opCode;
+ break;
+ default:
+ thisOpCode = spv::OpNop;
+ }
+
+ return false;
+ },
+
+ [&](spv::Id& id) {
+ if (thisOpCode != spv::OpNop) {
+ ++idCounter;
+ const std::uint32_t hashval = opCounter[thisOpCode] * thisOpCode * 50047 + idCounter + fnId * 117;
+
+ if (isOldIdUnmapped(id))
+ localId(id, nextUnusedId(hashval % softTypeIdLimit + firstMappedID));
+ }
+ });
+ }
+
+ // EXPERIMENTAL: forward IO and uniform load/stores into operands
+ // This produces invalid Schema-0 SPIRV
+ void spirvbin_t::forwardLoadStores()
+ {
+ idset_t fnLocalVars; // set of function local vars
+ idmap_t idMap; // Map of load result IDs to what they load
+
+ // EXPERIMENTAL: Forward input and access chain loads into consumptions
+ process(
+ [&](spv::Op opCode, unsigned start) {
+ // Add inputs and uniforms to the map
+ if ((opCode == spv::OpVariable && asWordCount(start) == 4) &&
+ (spv[start+3] == spv::StorageClassUniform ||
+ spv[start+3] == spv::StorageClassUniformConstant ||
+ spv[start+3] == spv::StorageClassInput))
+ fnLocalVars.insert(asId(start+2));
+
+ if (opCode == spv::OpAccessChain && fnLocalVars.count(asId(start+3)) > 0)
+ fnLocalVars.insert(asId(start+2));
+
+ if (opCode == spv::OpLoad && fnLocalVars.count(asId(start+3)) > 0) {
+ idMap[asId(start+2)] = asId(start+3);
+ stripInst(start);
+ }
+
+ return false;
+ },
+
+ [&](spv::Id& id) { if (idMap.find(id) != idMap.end()) id = idMap[id]; }
+ );
+
+ // EXPERIMENTAL: Implicit output stores
+ fnLocalVars.clear();
+ idMap.clear();
+
+ process(
+ [&](spv::Op opCode, unsigned start) {
+ // Add inputs and uniforms to the map
+ if ((opCode == spv::OpVariable && asWordCount(start) == 4) &&
+ (spv[start+3] == spv::StorageClassOutput))
+ fnLocalVars.insert(asId(start+2));
+
+ if (opCode == spv::OpStore && fnLocalVars.count(asId(start+1)) > 0) {
+ idMap[asId(start+2)] = asId(start+1);
+ stripInst(start);
+ }
+
+ return false;
+ },
+ op_fn_nop);
+
+ process(
+ inst_fn_nop,
+ [&](spv::Id& id) { if (idMap.find(id) != idMap.end()) id = idMap[id]; }
+ );
+
+ strip(); // strip out data we decided to eliminate
+ }
+
+ // optimize loads and stores
+ void spirvbin_t::optLoadStore()
+ {
+ idset_t fnLocalVars; // candidates for removal (only locals)
+ idmap_t idMap; // Map of load result IDs to what they load
+ blockmap_t blockMap; // Map of IDs to blocks they first appear in
+ int blockNum = 0; // block count, to avoid crossing flow control
+
+ // Find all the function local pointers stored at most once, and not via access chains
+ process(
+ [&](spv::Op opCode, unsigned start) {
+ const int wordCount = asWordCount(start);
+
+ // Count blocks, so we can avoid crossing flow control
+ if (isFlowCtrl(opCode))
+ ++blockNum;
+
+ // Add local variables to the map
+ if ((opCode == spv::OpVariable && spv[start+3] == spv::StorageClassFunction && asWordCount(start) == 4)) {
+ fnLocalVars.insert(asId(start+2));
+ return true;
+ }
+
+ // Ignore process vars referenced via access chain
+ if ((opCode == spv::OpAccessChain || opCode == spv::OpInBoundsAccessChain) && fnLocalVars.count(asId(start+3)) > 0) {
+ fnLocalVars.erase(asId(start+3));
+ idMap.erase(asId(start+3));
+ return true;
+ }
+
+ if (opCode == spv::OpLoad && fnLocalVars.count(asId(start+3)) > 0) {
+ const spv::Id varId = asId(start+3);
+
+ // Avoid loads before stores
+ if (idMap.find(varId) == idMap.end()) {
+ fnLocalVars.erase(varId);
+ idMap.erase(varId);
+ }
+
+ // don't do for volatile references
+ if (wordCount > 4 && (spv[start+4] & spv::MemoryAccessVolatileMask)) {
+ fnLocalVars.erase(varId);
+ idMap.erase(varId);
+ }
+
+ // Handle flow control
+ if (blockMap.find(varId) == blockMap.end()) {
+ blockMap[varId] = blockNum; // track block we found it in.
+ } else if (blockMap[varId] != blockNum) {
+ fnLocalVars.erase(varId); // Ignore if crosses flow control
+ idMap.erase(varId);
+ }
+
+ return true;
+ }
+
+ if (opCode == spv::OpStore && fnLocalVars.count(asId(start+1)) > 0) {
+ const spv::Id varId = asId(start+1);
+
+ if (idMap.find(varId) == idMap.end()) {
+ idMap[varId] = asId(start+2);
+ } else {
+ // Remove if it has more than one store to the same pointer
+ fnLocalVars.erase(varId);
+ idMap.erase(varId);
+ }
+
+ // don't do for volatile references
+ if (wordCount > 3 && (spv[start+3] & spv::MemoryAccessVolatileMask)) {
+ fnLocalVars.erase(asId(start+3));
+ idMap.erase(asId(start+3));
+ }
+
+ // Handle flow control
+ if (blockMap.find(varId) == blockMap.end()) {
+ blockMap[varId] = blockNum; // track block we found it in.
+ } else if (blockMap[varId] != blockNum) {
+ fnLocalVars.erase(varId); // Ignore if crosses flow control
+ idMap.erase(varId);
+ }
+
+ return true;
+ }
+
+ return false;
+ },
+
+ // If local var id used anywhere else, don't eliminate
+ [&](spv::Id& id) {
+ if (fnLocalVars.count(id) > 0) {
+ fnLocalVars.erase(id);
+ idMap.erase(id);
+ }
+ }
+ );
+
+ process(
+ [&](spv::Op opCode, unsigned start) {
+ if (opCode == spv::OpLoad && fnLocalVars.count(asId(start+3)) > 0)
+ idMap[asId(start+2)] = idMap[asId(start+3)];
+ return false;
+ },
+ op_fn_nop);
+
+ // Chase replacements to their origins, in case there is a chain such as:
+ // 2 = store 1
+ // 3 = load 2
+ // 4 = store 3
+ // 5 = load 4
+ // We want to replace uses of 5 with 1.
+ for (const auto& idPair : idMap) {
+ spv::Id id = idPair.first;
+ while (idMap.find(id) != idMap.end()) // Chase to end of chain
+ id = idMap[id];
+
+ idMap[idPair.first] = id; // replace with final result
+ }
+
+ // Remove the load/store/variables for the ones we've discovered
+ process(
+ [&](spv::Op opCode, unsigned start) {
+ if ((opCode == spv::OpLoad && fnLocalVars.count(asId(start+3)) > 0) ||
+ (opCode == spv::OpStore && fnLocalVars.count(asId(start+1)) > 0) ||
+ (opCode == spv::OpVariable && fnLocalVars.count(asId(start+2)) > 0)) {
+
+ stripInst(start);
+ return true;
+ }
+
+ return false;
+ },
+
+ [&](spv::Id& id) {
+ if (idMap.find(id) != idMap.end()) id = idMap[id];
+ }
+ );
+
+ strip(); // strip out data we decided to eliminate
+ }
+
+ // remove bodies of uncalled functions
+ void spirvbin_t::dceFuncs()
+ {
+ msg(3, 2, std::string("Removing Dead Functions: "));
+
+ // TODO: There are more efficient ways to do this.
+ bool changed = true;
+
+ while (changed) {
+ changed = false;
+
+ for (auto fn = fnPos.begin(); fn != fnPos.end(); ) {
+ if (fn->first == entryPoint) { // don't DCE away the entry point!
+ ++fn;
+ continue;
+ }
+
+ const auto call_it = fnCalls.find(fn->first);
+
+ if (call_it == fnCalls.end() || call_it->second == 0) {
+ changed = true;
+ stripRange.push_back(fn->second);
+ fnPosDCE.insert(*fn);
+
+ // decrease counts of called functions
+ process(
+ [&](spv::Op opCode, unsigned start) {
+ if (opCode == spv::Op::OpFunctionCall) {
+ const auto call_it = fnCalls.find(asId(start + 3));
+ if (call_it != fnCalls.end()) {
+ if (--call_it->second <= 0)
+ fnCalls.erase(call_it);
+ }
+ }
+
+ return true;
+ },
+ op_fn_nop,
+ fn->second.first,
+ fn->second.second);
+
+ fn = fnPos.erase(fn);
+ } else ++fn;
+ }
+ }
+ }
+
+ // remove unused function variables + decorations
+ void spirvbin_t::dceVars()
+ {
+ msg(3, 2, std::string("DCE Vars: "));
+
+ std::unordered_map<spv::Id, int> varUseCount;
+
+ // Count function variable use
+ process(
+ [&](spv::Op opCode, unsigned start) {
+ if (opCode == spv::OpVariable) {
+ ++varUseCount[asId(start+2)];
+ return true;
+ } else if (opCode == spv::OpEntryPoint) {
+ const int wordCount = asWordCount(start);
+ for (int i = 4; i < wordCount; i++) {
+ ++varUseCount[asId(start+i)];
+ }
+ return true;
+ } else
+ return false;
+ },
+
+ [&](spv::Id& id) { if (varUseCount[id]) ++varUseCount[id]; }
+ );
+
+ // Remove single-use function variables + associated decorations and names
+ process(
+ [&](spv::Op opCode, unsigned start) {
+ if ((opCode == spv::OpVariable && varUseCount[asId(start+2)] == 1) ||
+ (opCode == spv::OpDecorate && varUseCount[asId(start+1)] == 1) ||
+ (opCode == spv::OpName && varUseCount[asId(start+1)] == 1)) {
+ stripInst(start);
+ }
+ return true;
+ },
+ op_fn_nop);
+ }
+
+ // remove unused types
+ void spirvbin_t::dceTypes()
+ {
+ std::vector<bool> isType(bound(), false);
+
+ // for speed, make O(1) way to get to type query (map is log(n))
+ for (const auto typeStart : typeConstPos)
+ isType[asTypeConstId(typeStart)] = true;
+
+ std::unordered_map<spv::Id, int> typeUseCount;
+
+ // Count total type usage
+ process(inst_fn_nop,
+ [&](spv::Id& id) { if (isType[id]) ++typeUseCount[id]; }
+ );
+
+ // Remove types from deleted code
+ for (const auto& fn : fnPosDCE)
+ process(inst_fn_nop,
+ [&](spv::Id& id) { if (isType[id]) --typeUseCount[id]; },
+ fn.second.first, fn.second.second);
+
+ // Remove single reference types
+ for (const auto typeStart : typeConstPos) {
+ const spv::Id typeId = asTypeConstId(typeStart);
+ if (typeUseCount[typeId] == 1) {
+ --typeUseCount[typeId];
+ stripInst(typeStart);
+ }
+ }
+ }
+
+
+#ifdef NOTDEF
+ bool spirvbin_t::matchType(const spirvbin_t::globaltypes_t& globalTypes, spv::Id lt, spv::Id gt) const
+ {
+ // Find the local type id "lt" and global type id "gt"
+ const auto lt_it = typeConstPosR.find(lt);
+ if (lt_it == typeConstPosR.end())
+ return false;
+
+ const auto typeStart = lt_it->second;
+
+ // Search for entry in global table
+ const auto gtype = globalTypes.find(gt);
+ if (gtype == globalTypes.end())
+ return false;
+
+ const auto& gdata = gtype->second;
+
+ // local wordcount and opcode
+ const int wordCount = asWordCount(typeStart);
+ const spv::Op opCode = asOpCode(typeStart);
+
+ // no type match if opcodes don't match, or operand count doesn't match
+ if (opCode != opOpCode(gdata[0]) || wordCount != opWordCount(gdata[0]))
+ return false;
+
+ const unsigned numOperands = wordCount - 2; // all types have a result
+
+ const auto cmpIdRange = [&](range_t range) {
+ for (int x=range.first; x<std::min(range.second, wordCount); ++x)
+ if (!matchType(globalTypes, asId(typeStart+x), gdata[x]))
+ return false;
+ return true;
+ };
+
+ const auto cmpConst = [&]() { return cmpIdRange(constRange(opCode)); };
+ const auto cmpSubType = [&]() { return cmpIdRange(typeRange(opCode)); };
+
+ // Compare literals in range [start,end)
+ const auto cmpLiteral = [&]() {
+ const auto range = literalRange(opCode);
+ return std::equal(spir.begin() + typeStart + range.first,
+ spir.begin() + typeStart + std::min(range.second, wordCount),
+ gdata.begin() + range.first);
+ };
+
+ assert(isTypeOp(opCode) || isConstOp(opCode));
+
+ switch (opCode) {
+ case spv::OpTypeOpaque: // TODO: disable until we compare the literal strings.
+ case spv::OpTypeQueue: return false;
+ case spv::OpTypeEvent: // fall through...
+ case spv::OpTypeDeviceEvent: // ...
+ case spv::OpTypeReserveId: return false;
+ // for samplers, we don't handle the optional parameters yet
+ case spv::OpTypeSampler: return cmpLiteral() && cmpConst() && cmpSubType() && wordCount == 8;
+ default: return cmpLiteral() && cmpConst() && cmpSubType();
+ }
+ }
+
+
+ // Look for an equivalent type in the globalTypes map
+ spv::Id spirvbin_t::findType(const spirvbin_t::globaltypes_t& globalTypes, spv::Id lt) const
+ {
+ // Try a recursive type match on each in turn, and return a match if we find one
+ for (const auto& gt : globalTypes)
+ if (matchType(globalTypes, lt, gt.first))
+ return gt.first;
+
+ return spv::NoType;
+ }
+#endif // NOTDEF
+
+ // Return start position in SPV of given type. error if not found.
+ unsigned spirvbin_t::typePos(spv::Id id) const
+ {
+ const auto tid_it = typeConstPosR.find(id);
+ if (tid_it == typeConstPosR.end())
+ error("type ID not found");
+
+ return tid_it->second;
+ }
+
+ // Hash types to canonical values. This can return ID collisions (it's a bit
+ // inevitable): it's up to the caller to handle that gracefully.
+ std::uint32_t spirvbin_t::hashType(unsigned typeStart) const
+ {
+ const unsigned wordCount = asWordCount(typeStart);
+ const spv::Op opCode = asOpCode(typeStart);
+
+ switch (opCode) {
+ case spv::OpTypeVoid: return 0;
+ case spv::OpTypeBool: return 1;
+ case spv::OpTypeInt: return 3 + (spv[typeStart+3]);
+ case spv::OpTypeFloat: return 5;
+ case spv::OpTypeVector:
+ return 6 + hashType(typePos(spv[typeStart+2])) * (spv[typeStart+3] - 1);
+ case spv::OpTypeMatrix:
+ return 30 + hashType(typePos(spv[typeStart+2])) * (spv[typeStart+3] - 1);
+ case spv::OpTypeImage:
+ return 120 + hashType(typePos(spv[typeStart+2])) +
+ spv[typeStart+3] + // dimensionality
+ spv[typeStart+4] * 8 * 16 + // depth
+ spv[typeStart+5] * 4 * 16 + // arrayed
+ spv[typeStart+6] * 2 * 16 + // multisampled
+ spv[typeStart+7] * 1 * 16; // format
+ case spv::OpTypeSampler:
+ return 500;
+ case spv::OpTypeSampledImage:
+ return 502;
+ case spv::OpTypeArray:
+ return 501 + hashType(typePos(spv[typeStart+2])) * spv[typeStart+3];
+ case spv::OpTypeRuntimeArray:
+ return 5000 + hashType(typePos(spv[typeStart+2]));
+ case spv::OpTypeStruct:
+ {
+ std::uint32_t hash = 10000;
+ for (unsigned w=2; w < wordCount; ++w)
+ hash += w * hashType(typePos(spv[typeStart+w]));
+ return hash;
+ }
+
+ case spv::OpTypeOpaque: return 6000 + spv[typeStart+2];
+ case spv::OpTypePointer: return 100000 + hashType(typePos(spv[typeStart+3]));
+ case spv::OpTypeFunction:
+ {
+ std::uint32_t hash = 200000;
+ for (unsigned w=2; w < wordCount; ++w)
+ hash += w * hashType(typePos(spv[typeStart+w]));
+ return hash;
+ }
+
+ case spv::OpTypeEvent: return 300000;
+ case spv::OpTypeDeviceEvent: return 300001;
+ case spv::OpTypeReserveId: return 300002;
+ case spv::OpTypeQueue: return 300003;
+ case spv::OpTypePipe: return 300004;
+
+ case spv::OpConstantNull: return 300005;
+ case spv::OpConstantSampler: return 300006;
+
+ case spv::OpConstantTrue: return 300007;
+ case spv::OpConstantFalse: return 300008;
+ case spv::OpConstantComposite:
+ {
+ std::uint32_t hash = 300011 + hashType(typePos(spv[typeStart+1]));
+ for (unsigned w=3; w < wordCount; ++w)
+ hash += w * hashType(typePos(spv[typeStart+w]));
+ return hash;
+ }
+ case spv::OpConstant:
+ {
+ std::uint32_t hash = 400011 + hashType(typePos(spv[typeStart+1]));
+ for (unsigned w=3; w < wordCount; ++w)
+ hash += w * spv[typeStart+w];
+ return hash;
+ }
+
+ default:
+ error("unknown type opcode");
+ return 0;
+ }
+ }
+
+ void spirvbin_t::mapTypeConst()
+ {
+ globaltypes_t globalTypeMap;
+
+ msg(3, 2, std::string("Remapping Consts & Types: "));
+
+ static const std::uint32_t softTypeIdLimit = 3011; // small prime. TODO: get from options
+ static const std::uint32_t firstMappedID = 8; // offset into ID space
+
+ for (auto& typeStart : typeConstPos) {
+ const spv::Id resId = asTypeConstId(typeStart);
+ const std::uint32_t hashval = hashType(typeStart);
+
+ if (isOldIdUnmapped(resId))
+ localId(resId, nextUnusedId(hashval % softTypeIdLimit + firstMappedID));
+ }
+ }
+
+
+ // Strip a single binary by removing ranges given in stripRange
+ void spirvbin_t::strip()
+ {
+ if (stripRange.empty()) // nothing to do
+ return;
+
+ // Sort strip ranges in order of traversal
+ std::sort(stripRange.begin(), stripRange.end());
+
+ // Allocate a new binary big enough to hold old binary
+ // We'll step this iterator through the strip ranges as we go through the binary
+ auto strip_it = stripRange.begin();
+
+ int strippedPos = 0;
+ for (unsigned word = 0; word < unsigned(spv.size()); ++word) {
+ if (strip_it != stripRange.end() && word >= strip_it->second)
+ ++strip_it;
+
+ if (strip_it == stripRange.end() || word < strip_it->first || word >= strip_it->second)
+ spv[strippedPos++] = spv[word];
+ }
+
+ spv.resize(strippedPos);
+ stripRange.clear();
+
+ buildLocalMaps();
+ }
+
+ // Strip a single binary by removing ranges given in stripRange
+ void spirvbin_t::remap(std::uint32_t opts)
+ {
+ options = opts;
+
+ // Set up opcode tables from SpvDoc
+ spv::Parameterize();
+
+ validate(); // validate header
+ buildLocalMaps();
+
+ msg(3, 4, std::string("ID bound: ") + std::to_string(bound()));
+
+ strip(); // strip out data we decided to eliminate
+
+ if (options & OPT_LOADSTORE) optLoadStore();
+ if (options & OPT_FWD_LS) forwardLoadStores();
+ if (options & DCE_FUNCS) dceFuncs();
+ if (options & DCE_VARS) dceVars();
+ if (options & DCE_TYPES) dceTypes();
+ if (options & MAP_TYPES) mapTypeConst();
+ if (options & MAP_NAMES) mapNames();
+ if (options & MAP_FUNCS) mapFnBodies();
+
+ mapRemainder(); // map any unmapped IDs
+ applyMap(); // Now remap each shader to the new IDs we've come up with
+ strip(); // strip out data we decided to eliminate
+ }
+
+ // remap from a memory image
+ void spirvbin_t::remap(std::vector<std::uint32_t>& in_spv, std::uint32_t opts)
+ {
+ spv.swap(in_spv);
+ remap(opts);
+ spv.swap(in_spv);
+ }
+
+} // namespace SPV
+
+#endif // defined (use_cpp11)
+
diff --git a/chromium/third_party/glslang/src/SPIRV/SPVRemapper.h b/chromium/third_party/glslang/src/SPIRV/SPVRemapper.h
new file mode 100755
index 00000000000..e5e8e1bde14
--- /dev/null
+++ b/chromium/third_party/glslang/src/SPIRV/SPVRemapper.h
@@ -0,0 +1,288 @@
+//
+//Copyright (C) 2015 LunarG, 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:
+//
+// Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 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.
+//
+// Neither the name of 3Dlabs Inc. Ltd. nor the names of its
+// contributors may be used to endorse or promote products derived
+// from this software without specific prior written permission.
+//
+//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+//"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 THE
+//COPYRIGHT HOLDERS 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.
+//
+
+#ifndef SPIRVREMAPPER_H
+#define SPIRVREMAPPER_H
+
+#include <string>
+#include <vector>
+#include <stdlib.h>
+
+namespace spv {
+
+// MSVC defines __cplusplus as an older value, even when it supports almost all of 11.
+// We handle that here by making our own symbol.
+#if __cplusplus >= 201103L || _MSC_VER >= 1700
+# define use_cpp11 1
+#endif
+
+class spirvbin_base_t
+{
+public:
+ enum Options {
+ NONE = 0,
+ STRIP = (1<<0),
+ MAP_TYPES = (1<<1),
+ MAP_NAMES = (1<<2),
+ MAP_FUNCS = (1<<3),
+ DCE_FUNCS = (1<<4),
+ DCE_VARS = (1<<5),
+ DCE_TYPES = (1<<6),
+ OPT_LOADSTORE = (1<<7),
+ OPT_FWD_LS = (1<<8), // EXPERIMENTAL: PRODUCES INVALID SCHEMA-0 SPIRV
+ MAP_ALL = (MAP_TYPES | MAP_NAMES | MAP_FUNCS),
+ DCE_ALL = (DCE_FUNCS | DCE_VARS | DCE_TYPES),
+ OPT_ALL = (OPT_LOADSTORE),
+
+ ALL_BUT_STRIP = (MAP_ALL | DCE_ALL | OPT_ALL),
+ DO_EVERYTHING = (STRIP | ALL_BUT_STRIP)
+ };
+};
+
+} // namespace SPV
+
+#if !defined (use_cpp11)
+#include <stdio.h>
+
+namespace spv {
+class spirvbin_t : public spirvbin_base_t
+{
+public:
+ spirvbin_t(int /*verbose = 0*/) { }
+
+ void remap(std::vector<unsigned int>& /*spv*/, unsigned int /*opts = 0*/)
+ {
+ printf("Tool not compiled for C++11, which is required for SPIR-V remapping.\n");
+ exit(5);
+ }
+};
+
+} // namespace SPV
+
+#else // defined (use_cpp11)
+
+#include <functional>
+#include <cstdint>
+#include <unordered_map>
+#include <unordered_set>
+#include <map>
+#include <set>
+#include <cassert>
+
+#include "spirv.hpp"
+#include "spvIR.h"
+
+namespace spv {
+
+// class to hold SPIR-V binary data for remapping, DCE, and debug stripping
+class spirvbin_t : public spirvbin_base_t
+{
+public:
+ spirvbin_t(int verbose = 0) : entryPoint(spv::NoResult), largestNewId(0), verbose(verbose) { }
+
+ // remap on an existing binary in memory
+ void remap(std::vector<std::uint32_t>& spv, std::uint32_t opts = DO_EVERYTHING);
+
+ // Type for error/log handler functions
+ typedef std::function<void(const std::string&)> errorfn_t;
+ typedef std::function<void(const std::string&)> logfn_t;
+
+ // Register error/log handling functions (can be lambda fn / functor / etc)
+ static void registerErrorHandler(errorfn_t handler) { errorHandler = handler; }
+ static void registerLogHandler(logfn_t handler) { logHandler = handler; }
+
+protected:
+ // This can be overridden to provide other message behavior if needed
+ virtual void msg(int minVerbosity, int indent, const std::string& txt) const;
+
+private:
+ // Local to global, or global to local ID map
+ typedef std::unordered_map<spv::Id, spv::Id> idmap_t;
+ typedef std::unordered_set<spv::Id> idset_t;
+ typedef std::unordered_map<spv::Id, int> blockmap_t;
+
+ void remap(std::uint32_t opts = DO_EVERYTHING);
+
+ // Map of names to IDs
+ typedef std::unordered_map<std::string, spv::Id> namemap_t;
+
+ typedef std::uint32_t spirword_t;
+
+ typedef std::pair<unsigned, unsigned> range_t;
+ typedef std::function<void(spv::Id&)> idfn_t;
+ typedef std::function<bool(spv::Op, unsigned start)> instfn_t;
+
+ // Special Values for ID map:
+ static const spv::Id unmapped; // unchanged from default value
+ static const spv::Id unused; // unused ID
+ static const int header_size; // SPIR header = 5 words
+
+ class id_iterator_t;
+
+ // For mapping type entries between different shaders
+ typedef std::vector<spirword_t> typeentry_t;
+ typedef std::map<spv::Id, typeentry_t> globaltypes_t;
+
+ // A set that preserves position order, and a reverse map
+ typedef std::set<int> posmap_t;
+ typedef std::unordered_map<spv::Id, int> posmap_rev_t;
+
+ // handle error
+ void error(const std::string& txt) const { errorHandler(txt); }
+
+ bool isConstOp(spv::Op opCode) const;
+ bool isTypeOp(spv::Op opCode) const;
+ bool isStripOp(spv::Op opCode) const;
+ bool isFlowCtrl(spv::Op opCode) const;
+ range_t literalRange(spv::Op opCode) const;
+ range_t typeRange(spv::Op opCode) const;
+ range_t constRange(spv::Op opCode) const;
+
+ spv::Id& asId(unsigned word) { return spv[word]; }
+ const spv::Id& asId(unsigned word) const { return spv[word]; }
+ spv::Op asOpCode(unsigned word) const { return opOpCode(spv[word]); }
+ std::uint32_t asOpCodeHash(unsigned word);
+ spv::Decoration asDecoration(unsigned word) const { return spv::Decoration(spv[word]); }
+ unsigned asWordCount(unsigned word) const { return opWordCount(spv[word]); }
+ spv::Id asTypeConstId(unsigned word) const { return asId(word + (isTypeOp(asOpCode(word)) ? 1 : 2)); }
+ unsigned typePos(spv::Id id) const;
+
+ static unsigned opWordCount(spirword_t data) { return data >> spv::WordCountShift; }
+ static spv::Op opOpCode(spirword_t data) { return spv::Op(data & spv::OpCodeMask); }
+
+ // Header access & set methods
+ spirword_t magic() const { return spv[0]; } // return magic number
+ spirword_t bound() const { return spv[3]; } // return Id bound from header
+ spirword_t bound(spirword_t b) { return spv[3] = b; };
+ spirword_t genmagic() const { return spv[2]; } // generator magic
+ spirword_t genmagic(spirword_t m) { return spv[2] = m; }
+ spirword_t schemaNum() const { return spv[4]; } // schema number from header
+
+ // Mapping fns: get
+ spv::Id localId(spv::Id id) const { return idMapL[id]; }
+
+ // Mapping fns: set
+ inline spv::Id localId(spv::Id id, spv::Id newId);
+ void countIds(spv::Id id);
+
+ // Return next unused new local ID.
+ // NOTE: boost::dynamic_bitset would be more efficient due to find_next(),
+ // which std::vector<bool> doens't have.
+ inline spv::Id nextUnusedId(spv::Id id);
+
+ void buildLocalMaps();
+ std::string literalString(unsigned word) const; // Return literal as a std::string
+ int literalStringWords(const std::string& str) const { return (int(str.size())+4)/4; }
+
+ bool isNewIdMapped(spv::Id newId) const { return isMapped(newId); }
+ bool isOldIdUnmapped(spv::Id oldId) const { return localId(oldId) == unmapped; }
+ bool isOldIdUnused(spv::Id oldId) const { return localId(oldId) == unused; }
+ bool isOldIdMapped(spv::Id oldId) const { return !isOldIdUnused(oldId) && !isOldIdUnmapped(oldId); }
+ bool isFunction(spv::Id oldId) const { return fnPos.find(oldId) != fnPos.end(); }
+
+ // bool matchType(const globaltypes_t& globalTypes, spv::Id lt, spv::Id gt) const;
+ // spv::Id findType(const globaltypes_t& globalTypes, spv::Id lt) const;
+ std::uint32_t hashType(unsigned typeStart) const;
+
+ spirvbin_t& process(instfn_t, idfn_t, unsigned begin = 0, unsigned end = 0);
+ int processInstruction(unsigned word, instfn_t, idfn_t);
+
+ void validate() const;
+ void mapTypeConst();
+ void mapFnBodies();
+ void optLoadStore();
+ void dceFuncs();
+ void dceVars();
+ void dceTypes();
+ void mapNames();
+ void foldIds(); // fold IDs to smallest space
+ void forwardLoadStores(); // load store forwarding (EXPERIMENTAL)
+ void offsetIds(); // create relative offset IDs
+
+ void applyMap(); // remap per local name map
+ void mapRemainder(); // map any IDs we haven't touched yet
+ void stripDebug(); // strip debug info
+ void strip(); // remove debug symbols
+
+ std::vector<spirword_t> spv; // SPIR words
+
+ namemap_t nameMap; // ID names from OpName
+
+ // Since we want to also do binary ops, we can't use std::vector<bool>. we could use
+ // boost::dynamic_bitset, but we're trying to avoid a boost dependency.
+ typedef std::uint64_t bits_t;
+ std::vector<bits_t> mapped; // which new IDs have been mapped
+ static const int mBits = sizeof(bits_t) * 4;
+
+ bool isMapped(spv::Id id) const { return id < maxMappedId() && ((mapped[id/mBits] & (1LL<<(id%mBits))) != 0); }
+ void setMapped(spv::Id id) { resizeMapped(id); mapped[id/mBits] |= (1LL<<(id%mBits)); }
+ void resizeMapped(spv::Id id) { if (id >= maxMappedId()) mapped.resize(id/mBits+1, 0); }
+ size_t maxMappedId() const { return mapped.size() * mBits; }
+
+ // Add a strip range for a given instruction starting at 'start'
+ // Note: avoiding brace initializers to please older versions os MSVC.
+ void stripInst(unsigned start) { stripRange.push_back(range_t(start, start + asWordCount(start))); }
+
+ // Function start and end. use unordered_map because we'll have
+ // many fewer functions than IDs.
+ std::unordered_map<spv::Id, range_t> fnPos;
+ std::unordered_map<spv::Id, range_t> fnPosDCE; // deleted functions
+
+ // Which functions are called, anywhere in the module, with a call count
+ std::unordered_map<spv::Id, int> fnCalls;
+
+ posmap_t typeConstPos; // word positions that define types & consts (ordered)
+ posmap_rev_t typeConstPosR; // reverse map from IDs to positions
+
+ std::vector<spv::Id> idMapL; // ID {M}ap from {L}ocal to {G}lobal IDs
+
+ spv::Id entryPoint; // module entry point
+ spv::Id largestNewId; // biggest new ID we have mapped anything to
+
+ // Sections of the binary to strip, given as [begin,end)
+ std::vector<range_t> stripRange;
+
+ // processing options:
+ std::uint32_t options;
+ int verbose; // verbosity level
+
+ static errorfn_t errorHandler;
+ static logfn_t logHandler;
+};
+
+} // namespace SPV
+
+#endif // defined (use_cpp11)
+#endif // SPIRVREMAPPER_H
diff --git a/chromium/third_party/glslang/src/SPIRV/SpvBuilder.cpp b/chromium/third_party/glslang/src/SPIRV/SpvBuilder.cpp
new file mode 100644
index 00000000000..152a463962a
--- /dev/null
+++ b/chromium/third_party/glslang/src/SPIRV/SpvBuilder.cpp
@@ -0,0 +1,2491 @@
+//
+//Copyright (C) 2014-2015 LunarG, Inc.
+//Copyright (C) 2015-2016 Google, 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:
+//
+// Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 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.
+//
+// Neither the name of 3Dlabs Inc. Ltd. nor the names of its
+// contributors may be used to endorse or promote products derived
+// from this software without specific prior written permission.
+//
+//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+//"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 THE
+//COPYRIGHT HOLDERS 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.
+
+//
+// Helper for making SPIR-V IR. Generally, this is documented in the header
+// SpvBuilder.h.
+//
+
+#include <assert.h>
+#include <stdlib.h>
+
+#include <unordered_set>
+#include <algorithm>
+
+#include "SpvBuilder.h"
+
+#ifndef _WIN32
+ #include <cstdio>
+#endif
+
+namespace spv {
+
+Builder::Builder(unsigned int magicNumber, SpvBuildLogger* buildLogger) :
+ source(SourceLanguageUnknown),
+ sourceVersion(0),
+ addressModel(AddressingModelLogical),
+ memoryModel(MemoryModelGLSL450),
+ builderNumber(magicNumber),
+ buildPoint(0),
+ uniqueId(0),
+ mainFunction(0),
+ generatingOpCodeForSpecConst(false),
+ logger(buildLogger)
+{
+ clearAccessChain();
+}
+
+Builder::~Builder()
+{
+}
+
+Id Builder::import(const char* name)
+{
+ Instruction* import = new Instruction(getUniqueId(), NoType, OpExtInstImport);
+ import->addStringOperand(name);
+
+ imports.push_back(std::unique_ptr<Instruction>(import));
+ return import->getResultId();
+}
+
+// For creating new groupedTypes (will return old type if the requested one was already made).
+Id Builder::makeVoidType()
+{
+ Instruction* type;
+ if (groupedTypes[OpTypeVoid].size() == 0) {
+ type = new Instruction(getUniqueId(), NoType, OpTypeVoid);
+ groupedTypes[OpTypeVoid].push_back(type);
+ constantsTypesGlobals.push_back(std::unique_ptr<Instruction>(type));
+ module.mapInstruction(type);
+ } else
+ type = groupedTypes[OpTypeVoid].back();
+
+ return type->getResultId();
+}
+
+Id Builder::makeBoolType()
+{
+ Instruction* type;
+ if (groupedTypes[OpTypeBool].size() == 0) {
+ type = new Instruction(getUniqueId(), NoType, OpTypeBool);
+ groupedTypes[OpTypeBool].push_back(type);
+ constantsTypesGlobals.push_back(std::unique_ptr<Instruction>(type));
+ module.mapInstruction(type);
+ } else
+ type = groupedTypes[OpTypeBool].back();
+
+ return type->getResultId();
+}
+
+Id Builder::makeSamplerType()
+{
+ Instruction* type;
+ if (groupedTypes[OpTypeSampler].size() == 0) {
+ type = new Instruction(getUniqueId(), NoType, OpTypeSampler);
+ groupedTypes[OpTypeSampler].push_back(type);
+ constantsTypesGlobals.push_back(std::unique_ptr<Instruction>(type));
+ module.mapInstruction(type);
+ } else
+ type = groupedTypes[OpTypeSampler].back();
+
+ return type->getResultId();
+}
+
+Id Builder::makePointer(StorageClass storageClass, Id pointee)
+{
+ // try to find it
+ Instruction* type;
+ for (int t = 0; t < (int)groupedTypes[OpTypePointer].size(); ++t) {
+ type = groupedTypes[OpTypePointer][t];
+ if (type->getImmediateOperand(0) == (unsigned)storageClass &&
+ type->getIdOperand(1) == pointee)
+ return type->getResultId();
+ }
+
+ // not found, make it
+ type = new Instruction(getUniqueId(), NoType, OpTypePointer);
+ type->addImmediateOperand(storageClass);
+ type->addIdOperand(pointee);
+ groupedTypes[OpTypePointer].push_back(type);
+ constantsTypesGlobals.push_back(std::unique_ptr<Instruction>(type));
+ module.mapInstruction(type);
+
+ return type->getResultId();
+}
+
+Id Builder::makeIntegerType(int width, bool hasSign)
+{
+ // try to find it
+ Instruction* type;
+ for (int t = 0; t < (int)groupedTypes[OpTypeInt].size(); ++t) {
+ type = groupedTypes[OpTypeInt][t];
+ if (type->getImmediateOperand(0) == (unsigned)width &&
+ type->getImmediateOperand(1) == (hasSign ? 1u : 0u))
+ return type->getResultId();
+ }
+
+ // not found, make it
+ type = new Instruction(getUniqueId(), NoType, OpTypeInt);
+ type->addImmediateOperand(width);
+ type->addImmediateOperand(hasSign ? 1 : 0);
+ groupedTypes[OpTypeInt].push_back(type);
+ constantsTypesGlobals.push_back(std::unique_ptr<Instruction>(type));
+ module.mapInstruction(type);
+
+ // deal with capabilities
+ switch (width) {
+ case 16:
+ addCapability(CapabilityInt16);
+ break;
+ case 64:
+ addCapability(CapabilityInt64);
+ break;
+ default:
+ break;
+ }
+
+ return type->getResultId();
+}
+
+Id Builder::makeFloatType(int width)
+{
+ // try to find it
+ Instruction* type;
+ for (int t = 0; t < (int)groupedTypes[OpTypeFloat].size(); ++t) {
+ type = groupedTypes[OpTypeFloat][t];
+ if (type->getImmediateOperand(0) == (unsigned)width)
+ return type->getResultId();
+ }
+
+ // not found, make it
+ type = new Instruction(getUniqueId(), NoType, OpTypeFloat);
+ type->addImmediateOperand(width);
+ groupedTypes[OpTypeFloat].push_back(type);
+ constantsTypesGlobals.push_back(std::unique_ptr<Instruction>(type));
+ module.mapInstruction(type);
+
+ // deal with capabilities
+ switch (width) {
+ case 16:
+ addCapability(CapabilityFloat16);
+ break;
+ case 64:
+ addCapability(CapabilityFloat64);
+ break;
+ default:
+ break;
+ }
+
+ return type->getResultId();
+}
+
+// Make a struct without checking for duplication.
+// See makeStructResultType() for non-decorated structs
+// needed as the result of some instructions, which does
+// check for duplicates.
+Id Builder::makeStructType(const std::vector<Id>& members, const char* name)
+{
+ // Don't look for previous one, because in the general case,
+ // structs can be duplicated except for decorations.
+
+ // not found, make it
+ Instruction* type = new Instruction(getUniqueId(), NoType, OpTypeStruct);
+ for (int op = 0; op < (int)members.size(); ++op)
+ type->addIdOperand(members[op]);
+ groupedTypes[OpTypeStruct].push_back(type);
+ constantsTypesGlobals.push_back(std::unique_ptr<Instruction>(type));
+ module.mapInstruction(type);
+ addName(type->getResultId(), name);
+
+ return type->getResultId();
+}
+
+// Make a struct for the simple results of several instructions,
+// checking for duplication.
+Id Builder::makeStructResultType(Id type0, Id type1)
+{
+ // try to find it
+ Instruction* type;
+ for (int t = 0; t < (int)groupedTypes[OpTypeStruct].size(); ++t) {
+ type = groupedTypes[OpTypeStruct][t];
+ if (type->getNumOperands() != 2)
+ continue;
+ if (type->getIdOperand(0) != type0 ||
+ type->getIdOperand(1) != type1)
+ continue;
+ return type->getResultId();
+ }
+
+ // not found, make it
+ std::vector<spv::Id> members;
+ members.push_back(type0);
+ members.push_back(type1);
+
+ return makeStructType(members, "ResType");
+}
+
+Id Builder::makeVectorType(Id component, int size)
+{
+ // try to find it
+ Instruction* type;
+ for (int t = 0; t < (int)groupedTypes[OpTypeVector].size(); ++t) {
+ type = groupedTypes[OpTypeVector][t];
+ if (type->getIdOperand(0) == component &&
+ type->getImmediateOperand(1) == (unsigned)size)
+ return type->getResultId();
+ }
+
+ // not found, make it
+ type = new Instruction(getUniqueId(), NoType, OpTypeVector);
+ type->addIdOperand(component);
+ type->addImmediateOperand(size);
+ groupedTypes[OpTypeVector].push_back(type);
+ constantsTypesGlobals.push_back(std::unique_ptr<Instruction>(type));
+ module.mapInstruction(type);
+
+ return type->getResultId();
+}
+
+Id Builder::makeMatrixType(Id component, int cols, int rows)
+{
+ assert(cols <= maxMatrixSize && rows <= maxMatrixSize);
+
+ Id column = makeVectorType(component, rows);
+
+ // try to find it
+ Instruction* type;
+ for (int t = 0; t < (int)groupedTypes[OpTypeMatrix].size(); ++t) {
+ type = groupedTypes[OpTypeMatrix][t];
+ if (type->getIdOperand(0) == column &&
+ type->getImmediateOperand(1) == (unsigned)cols)
+ return type->getResultId();
+ }
+
+ // not found, make it
+ type = new Instruction(getUniqueId(), NoType, OpTypeMatrix);
+ type->addIdOperand(column);
+ type->addImmediateOperand(cols);
+ groupedTypes[OpTypeMatrix].push_back(type);
+ constantsTypesGlobals.push_back(std::unique_ptr<Instruction>(type));
+ module.mapInstruction(type);
+
+ return type->getResultId();
+}
+
+// TODO: performance: track arrays per stride
+// If a stride is supplied (non-zero) make an array.
+// If no stride (0), reuse previous array types.
+// 'size' is an Id of a constant or specialization constant of the array size
+Id Builder::makeArrayType(Id element, Id sizeId, int stride)
+{
+ Instruction* type;
+ if (stride == 0) {
+ // try to find existing type
+ for (int t = 0; t < (int)groupedTypes[OpTypeArray].size(); ++t) {
+ type = groupedTypes[OpTypeArray][t];
+ if (type->getIdOperand(0) == element &&
+ type->getIdOperand(1) == sizeId)
+ return type->getResultId();
+ }
+ }
+
+ // not found, make it
+ type = new Instruction(getUniqueId(), NoType, OpTypeArray);
+ type->addIdOperand(element);
+ type->addIdOperand(sizeId);
+ groupedTypes[OpTypeArray].push_back(type);
+ constantsTypesGlobals.push_back(std::unique_ptr<Instruction>(type));
+ module.mapInstruction(type);
+
+ return type->getResultId();
+}
+
+Id Builder::makeRuntimeArray(Id element)
+{
+ Instruction* type = new Instruction(getUniqueId(), NoType, OpTypeRuntimeArray);
+ type->addIdOperand(element);
+ constantsTypesGlobals.push_back(std::unique_ptr<Instruction>(type));
+ module.mapInstruction(type);
+
+ return type->getResultId();
+}
+
+Id Builder::makeFunctionType(Id returnType, const std::vector<Id>& paramTypes)
+{
+ // try to find it
+ Instruction* type;
+ for (int t = 0; t < (int)groupedTypes[OpTypeFunction].size(); ++t) {
+ type = groupedTypes[OpTypeFunction][t];
+ if (type->getIdOperand(0) != returnType || (int)paramTypes.size() != type->getNumOperands() - 1)
+ continue;
+ bool mismatch = false;
+ for (int p = 0; p < (int)paramTypes.size(); ++p) {
+ if (paramTypes[p] != type->getIdOperand(p + 1)) {
+ mismatch = true;
+ break;
+ }
+ }
+ if (! mismatch)
+ return type->getResultId();
+ }
+
+ // not found, make it
+ type = new Instruction(getUniqueId(), NoType, OpTypeFunction);
+ type->addIdOperand(returnType);
+ for (int p = 0; p < (int)paramTypes.size(); ++p)
+ type->addIdOperand(paramTypes[p]);
+ groupedTypes[OpTypeFunction].push_back(type);
+ constantsTypesGlobals.push_back(std::unique_ptr<Instruction>(type));
+ module.mapInstruction(type);
+
+ return type->getResultId();
+}
+
+Id Builder::makeImageType(Id sampledType, Dim dim, bool depth, bool arrayed, bool ms, unsigned sampled, ImageFormat format)
+{
+ // try to find it
+ Instruction* type;
+ for (int t = 0; t < (int)groupedTypes[OpTypeImage].size(); ++t) {
+ type = groupedTypes[OpTypeImage][t];
+ if (type->getIdOperand(0) == sampledType &&
+ type->getImmediateOperand(1) == (unsigned int)dim &&
+ type->getImmediateOperand(2) == ( depth ? 1u : 0u) &&
+ type->getImmediateOperand(3) == (arrayed ? 1u : 0u) &&
+ type->getImmediateOperand(4) == ( ms ? 1u : 0u) &&
+ type->getImmediateOperand(5) == sampled &&
+ type->getImmediateOperand(6) == (unsigned int)format)
+ return type->getResultId();
+ }
+
+ // not found, make it
+ type = new Instruction(getUniqueId(), NoType, OpTypeImage);
+ type->addIdOperand(sampledType);
+ type->addImmediateOperand( dim);
+ type->addImmediateOperand( depth ? 1 : 0);
+ type->addImmediateOperand(arrayed ? 1 : 0);
+ type->addImmediateOperand( ms ? 1 : 0);
+ type->addImmediateOperand(sampled);
+ type->addImmediateOperand((unsigned int)format);
+
+ groupedTypes[OpTypeImage].push_back(type);
+ constantsTypesGlobals.push_back(std::unique_ptr<Instruction>(type));
+ module.mapInstruction(type);
+
+ // deal with capabilities
+ switch (dim) {
+ case DimBuffer:
+ if (sampled)
+ addCapability(CapabilitySampledBuffer);
+ else
+ addCapability(CapabilityImageBuffer);
+ break;
+ case Dim1D:
+ if (sampled)
+ addCapability(CapabilitySampled1D);
+ else
+ addCapability(CapabilityImage1D);
+ break;
+ case DimCube:
+ if (arrayed) {
+ if (sampled)
+ addCapability(CapabilitySampledCubeArray);
+ else
+ addCapability(CapabilityImageCubeArray);
+ }
+ break;
+ case DimRect:
+ if (sampled)
+ addCapability(CapabilitySampledRect);
+ else
+ addCapability(CapabilityImageRect);
+ break;
+ case DimSubpassData:
+ addCapability(CapabilityInputAttachment);
+ break;
+ default:
+ break;
+ }
+
+ if (ms) {
+ if (arrayed)
+ addCapability(CapabilityImageMSArray);
+ if (! sampled)
+ addCapability(CapabilityStorageImageMultisample);
+ }
+
+ return type->getResultId();
+}
+
+Id Builder::makeSampledImageType(Id imageType)
+{
+ // try to find it
+ Instruction* type;
+ for (int t = 0; t < (int)groupedTypes[OpTypeSampledImage].size(); ++t) {
+ type = groupedTypes[OpTypeSampledImage][t];
+ if (type->getIdOperand(0) == imageType)
+ return type->getResultId();
+ }
+
+ // not found, make it
+ type = new Instruction(getUniqueId(), NoType, OpTypeSampledImage);
+ type->addIdOperand(imageType);
+
+ groupedTypes[OpTypeSampledImage].push_back(type);
+ constantsTypesGlobals.push_back(std::unique_ptr<Instruction>(type));
+ module.mapInstruction(type);
+
+ return type->getResultId();
+}
+
+Id Builder::getDerefTypeId(Id resultId) const
+{
+ Id typeId = getTypeId(resultId);
+ assert(isPointerType(typeId));
+
+ return module.getInstruction(typeId)->getImmediateOperand(1);
+}
+
+Op Builder::getMostBasicTypeClass(Id typeId) const
+{
+ Instruction* instr = module.getInstruction(typeId);
+
+ Op typeClass = instr->getOpCode();
+ switch (typeClass)
+ {
+ case OpTypeVoid:
+ case OpTypeBool:
+ case OpTypeInt:
+ case OpTypeFloat:
+ case OpTypeStruct:
+ return typeClass;
+ case OpTypeVector:
+ case OpTypeMatrix:
+ case OpTypeArray:
+ case OpTypeRuntimeArray:
+ return getMostBasicTypeClass(instr->getIdOperand(0));
+ case OpTypePointer:
+ return getMostBasicTypeClass(instr->getIdOperand(1));
+ default:
+ assert(0);
+ return OpTypeFloat;
+ }
+}
+
+int Builder::getNumTypeConstituents(Id typeId) const
+{
+ Instruction* instr = module.getInstruction(typeId);
+
+ switch (instr->getOpCode())
+ {
+ case OpTypeBool:
+ case OpTypeInt:
+ case OpTypeFloat:
+ return 1;
+ case OpTypeVector:
+ case OpTypeMatrix:
+ return instr->getImmediateOperand(1);
+ case OpTypeArray:
+ {
+ Id lengthId = instr->getImmediateOperand(1);
+ return module.getInstruction(lengthId)->getImmediateOperand(0);
+ }
+ case OpTypeStruct:
+ return instr->getNumOperands();
+ default:
+ assert(0);
+ return 1;
+ }
+}
+
+// Return the lowest-level type of scalar that an homogeneous composite is made out of.
+// Typically, this is just to find out if something is made out of ints or floats.
+// However, it includes returning a structure, if say, it is an array of structure.
+Id Builder::getScalarTypeId(Id typeId) const
+{
+ Instruction* instr = module.getInstruction(typeId);
+
+ Op typeClass = instr->getOpCode();
+ switch (typeClass)
+ {
+ case OpTypeVoid:
+ case OpTypeBool:
+ case OpTypeInt:
+ case OpTypeFloat:
+ case OpTypeStruct:
+ return instr->getResultId();
+ case OpTypeVector:
+ case OpTypeMatrix:
+ case OpTypeArray:
+ case OpTypeRuntimeArray:
+ case OpTypePointer:
+ return getScalarTypeId(getContainedTypeId(typeId));
+ default:
+ assert(0);
+ return NoResult;
+ }
+}
+
+// Return the type of 'member' of a composite.
+Id Builder::getContainedTypeId(Id typeId, int member) const
+{
+ Instruction* instr = module.getInstruction(typeId);
+
+ Op typeClass = instr->getOpCode();
+ switch (typeClass)
+ {
+ case OpTypeVector:
+ case OpTypeMatrix:
+ case OpTypeArray:
+ case OpTypeRuntimeArray:
+ return instr->getIdOperand(0);
+ case OpTypePointer:
+ return instr->getIdOperand(1);
+ case OpTypeStruct:
+ return instr->getIdOperand(member);
+ default:
+ assert(0);
+ return NoResult;
+ }
+}
+
+// Return the immediately contained type of a given composite type.
+Id Builder::getContainedTypeId(Id typeId) const
+{
+ return getContainedTypeId(typeId, 0);
+}
+
+// See if a scalar constant of this type has already been created, so it
+// can be reused rather than duplicated. (Required by the specification).
+Id Builder::findScalarConstant(Op typeClass, Op opcode, Id typeId, unsigned value) const
+{
+ Instruction* constant;
+ for (int i = 0; i < (int)groupedConstants[typeClass].size(); ++i) {
+ constant = groupedConstants[typeClass][i];
+ if (constant->getOpCode() == opcode &&
+ constant->getTypeId() == typeId &&
+ constant->getImmediateOperand(0) == value)
+ return constant->getResultId();
+ }
+
+ return 0;
+}
+
+// Version of findScalarConstant (see above) for scalars that take two operands (e.g. a 'double' or 'int64').
+Id Builder::findScalarConstant(Op typeClass, Op opcode, Id typeId, unsigned v1, unsigned v2) const
+{
+ Instruction* constant;
+ for (int i = 0; i < (int)groupedConstants[typeClass].size(); ++i) {
+ constant = groupedConstants[typeClass][i];
+ if (constant->getOpCode() == opcode &&
+ constant->getTypeId() == typeId &&
+ constant->getImmediateOperand(0) == v1 &&
+ constant->getImmediateOperand(1) == v2)
+ return constant->getResultId();
+ }
+
+ return 0;
+}
+
+// Return true if consuming 'opcode' means consuming a constant.
+// "constant" here means after final transform to executable code,
+// the value consumed will be a constant, so includes specialization.
+bool Builder::isConstantOpCode(Op opcode) const
+{
+ switch (opcode) {
+ case OpUndef:
+ case OpConstantTrue:
+ case OpConstantFalse:
+ case OpConstant:
+ case OpConstantComposite:
+ case OpConstantSampler:
+ case OpConstantNull:
+ case OpSpecConstantTrue:
+ case OpSpecConstantFalse:
+ case OpSpecConstant:
+ case OpSpecConstantComposite:
+ case OpSpecConstantOp:
+ return true;
+ default:
+ return false;
+ }
+}
+
+// Return true if consuming 'opcode' means consuming a specialization constant.
+bool Builder::isSpecConstantOpCode(Op opcode) const
+{
+ switch (opcode) {
+ case OpSpecConstantTrue:
+ case OpSpecConstantFalse:
+ case OpSpecConstant:
+ case OpSpecConstantComposite:
+ case OpSpecConstantOp:
+ return true;
+ default:
+ return false;
+ }
+}
+
+Id Builder::makeBoolConstant(bool b, bool specConstant)
+{
+ Id typeId = makeBoolType();
+ Instruction* constant;
+ Op opcode = specConstant ? (b ? OpSpecConstantTrue : OpSpecConstantFalse) : (b ? OpConstantTrue : OpConstantFalse);
+
+ // See if we already made it. Applies only to regular constants, because specialization constants
+ // must remain distinct for the purpose of applying a SpecId decoration.
+ if (! specConstant) {
+ Id existing = 0;
+ for (int i = 0; i < (int)groupedConstants[OpTypeBool].size(); ++i) {
+ constant = groupedConstants[OpTypeBool][i];
+ if (constant->getTypeId() == typeId && constant->getOpCode() == opcode)
+ existing = constant->getResultId();
+ }
+
+ if (existing)
+ return existing;
+ }
+
+ // Make it
+ Instruction* c = new Instruction(getUniqueId(), typeId, opcode);
+ constantsTypesGlobals.push_back(std::unique_ptr<Instruction>(c));
+ groupedConstants[OpTypeBool].push_back(c);
+ module.mapInstruction(c);
+
+ return c->getResultId();
+}
+
+Id Builder::makeIntConstant(Id typeId, unsigned value, bool specConstant)
+{
+ Op opcode = specConstant ? OpSpecConstant : OpConstant;
+
+ // See if we already made it. Applies only to regular constants, because specialization constants
+ // must remain distinct for the purpose of applying a SpecId decoration.
+ if (! specConstant) {
+ Id existing = findScalarConstant(OpTypeInt, opcode, typeId, value);
+ if (existing)
+ return existing;
+ }
+
+ Instruction* c = new Instruction(getUniqueId(), typeId, opcode);
+ c->addImmediateOperand(value);
+ constantsTypesGlobals.push_back(std::unique_ptr<Instruction>(c));
+ groupedConstants[OpTypeInt].push_back(c);
+ module.mapInstruction(c);
+
+ return c->getResultId();
+}
+
+Id Builder::makeInt64Constant(Id typeId, unsigned long long value, bool specConstant)
+{
+ Op opcode = specConstant ? OpSpecConstant : OpConstant;
+
+ unsigned op1 = value & 0xFFFFFFFF;
+ unsigned op2 = value >> 32;
+
+ // See if we already made it. Applies only to regular constants, because specialization constants
+ // must remain distinct for the purpose of applying a SpecId decoration.
+ if (! specConstant) {
+ Id existing = findScalarConstant(OpTypeInt, opcode, typeId, op1, op2);
+ if (existing)
+ return existing;
+ }
+
+ Instruction* c = new Instruction(getUniqueId(), typeId, opcode);
+ c->addImmediateOperand(op1);
+ c->addImmediateOperand(op2);
+ constantsTypesGlobals.push_back(std::unique_ptr<Instruction>(c));
+ groupedConstants[OpTypeInt].push_back(c);
+ module.mapInstruction(c);
+
+ return c->getResultId();
+}
+
+Id Builder::makeFloatConstant(float f, bool specConstant)
+{
+ Op opcode = specConstant ? OpSpecConstant : OpConstant;
+ Id typeId = makeFloatType(32);
+ union { float fl; unsigned int ui; } u;
+ u.fl = f;
+ unsigned value = u.ui;
+
+ // See if we already made it. Applies only to regular constants, because specialization constants
+ // must remain distinct for the purpose of applying a SpecId decoration.
+ if (! specConstant) {
+ Id existing = findScalarConstant(OpTypeFloat, opcode, typeId, value);
+ if (existing)
+ return existing;
+ }
+
+ Instruction* c = new Instruction(getUniqueId(), typeId, opcode);
+ c->addImmediateOperand(value);
+ constantsTypesGlobals.push_back(std::unique_ptr<Instruction>(c));
+ groupedConstants[OpTypeFloat].push_back(c);
+ module.mapInstruction(c);
+
+ return c->getResultId();
+}
+
+Id Builder::makeDoubleConstant(double d, bool specConstant)
+{
+ Op opcode = specConstant ? OpSpecConstant : OpConstant;
+ Id typeId = makeFloatType(64);
+ union { double db; unsigned long long ull; } u;
+ u.db = d;
+ unsigned long long value = u.ull;
+ unsigned op1 = value & 0xFFFFFFFF;
+ unsigned op2 = value >> 32;
+
+ // See if we already made it. Applies only to regular constants, because specialization constants
+ // must remain distinct for the purpose of applying a SpecId decoration.
+ if (! specConstant) {
+ Id existing = findScalarConstant(OpTypeFloat, opcode, typeId, op1, op2);
+ if (existing)
+ return existing;
+ }
+
+ Instruction* c = new Instruction(getUniqueId(), typeId, opcode);
+ c->addImmediateOperand(op1);
+ c->addImmediateOperand(op2);
+ constantsTypesGlobals.push_back(std::unique_ptr<Instruction>(c));
+ groupedConstants[OpTypeFloat].push_back(c);
+ module.mapInstruction(c);
+
+ return c->getResultId();
+}
+
+Id Builder::findCompositeConstant(Op typeClass, std::vector<Id>& comps) const
+{
+ Instruction* constant = 0;
+ bool found = false;
+ for (int i = 0; i < (int)groupedConstants[typeClass].size(); ++i) {
+ constant = groupedConstants[typeClass][i];
+
+ // same shape?
+ if (constant->getNumOperands() != (int)comps.size())
+ continue;
+
+ // same contents?
+ bool mismatch = false;
+ for (int op = 0; op < constant->getNumOperands(); ++op) {
+ if (constant->getIdOperand(op) != comps[op]) {
+ mismatch = true;
+ break;
+ }
+ }
+ if (! mismatch) {
+ found = true;
+ break;
+ }
+ }
+
+ return found ? constant->getResultId() : NoResult;
+}
+
+// Comments in header
+Id Builder::makeCompositeConstant(Id typeId, std::vector<Id>& members, bool specConstant)
+{
+ Op opcode = specConstant ? OpSpecConstantComposite : OpConstantComposite;
+ assert(typeId);
+ Op typeClass = getTypeClass(typeId);
+
+ switch (typeClass) {
+ case OpTypeVector:
+ case OpTypeArray:
+ case OpTypeStruct:
+ case OpTypeMatrix:
+ break;
+ default:
+ assert(0);
+ return makeFloatConstant(0.0);
+ }
+
+ if (! specConstant) {
+ Id existing = findCompositeConstant(typeClass, members);
+ if (existing)
+ return existing;
+ }
+
+ Instruction* c = new Instruction(getUniqueId(), typeId, opcode);
+ for (int op = 0; op < (int)members.size(); ++op)
+ c->addIdOperand(members[op]);
+ constantsTypesGlobals.push_back(std::unique_ptr<Instruction>(c));
+ groupedConstants[typeClass].push_back(c);
+ module.mapInstruction(c);
+
+ return c->getResultId();
+}
+
+Instruction* Builder::addEntryPoint(ExecutionModel model, Function* function, const char* name)
+{
+ Instruction* entryPoint = new Instruction(OpEntryPoint);
+ entryPoint->addImmediateOperand(model);
+ entryPoint->addIdOperand(function->getId());
+ entryPoint->addStringOperand(name);
+
+ entryPoints.push_back(std::unique_ptr<Instruction>(entryPoint));
+
+ return entryPoint;
+}
+
+// Currently relying on the fact that all 'value' of interest are small non-negative values.
+void Builder::addExecutionMode(Function* entryPoint, ExecutionMode mode, int value1, int value2, int value3)
+{
+ Instruction* instr = new Instruction(OpExecutionMode);
+ instr->addIdOperand(entryPoint->getId());
+ instr->addImmediateOperand(mode);
+ if (value1 >= 0)
+ instr->addImmediateOperand(value1);
+ if (value2 >= 0)
+ instr->addImmediateOperand(value2);
+ if (value3 >= 0)
+ instr->addImmediateOperand(value3);
+
+ executionModes.push_back(std::unique_ptr<Instruction>(instr));
+}
+
+void Builder::addName(Id id, const char* string)
+{
+ Instruction* name = new Instruction(OpName);
+ name->addIdOperand(id);
+ name->addStringOperand(string);
+
+ names.push_back(std::unique_ptr<Instruction>(name));
+}
+
+void Builder::addMemberName(Id id, int memberNumber, const char* string)
+{
+ Instruction* name = new Instruction(OpMemberName);
+ name->addIdOperand(id);
+ name->addImmediateOperand(memberNumber);
+ name->addStringOperand(string);
+
+ names.push_back(std::unique_ptr<Instruction>(name));
+}
+
+void Builder::addLine(Id target, Id fileName, int lineNum, int column)
+{
+ Instruction* line = new Instruction(OpLine);
+ line->addIdOperand(target);
+ line->addIdOperand(fileName);
+ line->addImmediateOperand(lineNum);
+ line->addImmediateOperand(column);
+
+ lines.push_back(std::unique_ptr<Instruction>(line));
+}
+
+void Builder::addDecoration(Id id, Decoration decoration, int num)
+{
+ if (decoration == (spv::Decoration)spv::BadValue)
+ return;
+ Instruction* dec = new Instruction(OpDecorate);
+ dec->addIdOperand(id);
+ dec->addImmediateOperand(decoration);
+ if (num >= 0)
+ dec->addImmediateOperand(num);
+
+ decorations.push_back(std::unique_ptr<Instruction>(dec));
+}
+
+void Builder::addMemberDecoration(Id id, unsigned int member, Decoration decoration, int num)
+{
+ Instruction* dec = new Instruction(OpMemberDecorate);
+ dec->addIdOperand(id);
+ dec->addImmediateOperand(member);
+ dec->addImmediateOperand(decoration);
+ if (num >= 0)
+ dec->addImmediateOperand(num);
+
+ decorations.push_back(std::unique_ptr<Instruction>(dec));
+}
+
+// Comments in header
+Function* Builder::makeEntrypoint(const char* entryPoint)
+{
+ assert(! mainFunction);
+
+ Block* entry;
+ std::vector<Id> params;
+ std::vector<Decoration> precisions;
+
+ mainFunction = makeFunctionEntry(NoPrecision, makeVoidType(), entryPoint, params, precisions, &entry);
+
+ return mainFunction;
+}
+
+// Comments in header
+Function* Builder::makeFunctionEntry(Decoration precision, Id returnType, const char* name,
+ const std::vector<Id>& paramTypes, const std::vector<Decoration>& precisions, Block **entry)
+{
+ // Make the function and initial instructions in it
+ Id typeId = makeFunctionType(returnType, paramTypes);
+ Id firstParamId = paramTypes.size() == 0 ? 0 : getUniqueIds((int)paramTypes.size());
+ Function* function = new Function(getUniqueId(), returnType, typeId, firstParamId, module);
+
+ // Set up the precisions
+ setPrecision(function->getId(), precision);
+ for (unsigned p = 0; p < (unsigned)precisions.size(); ++p)
+ setPrecision(firstParamId + p, precisions[p]);
+
+ // CFG
+ if (entry) {
+ *entry = new Block(getUniqueId(), *function);
+ function->addBlock(*entry);
+ setBuildPoint(*entry);
+ }
+
+ if (name)
+ addName(function->getId(), name);
+
+ functions.push_back(std::unique_ptr<Function>(function));
+
+ return function;
+}
+
+// Comments in header
+void Builder::makeReturn(bool implicit, Id retVal)
+{
+ if (retVal) {
+ Instruction* inst = new Instruction(NoResult, NoType, OpReturnValue);
+ inst->addIdOperand(retVal);
+ buildPoint->addInstruction(std::unique_ptr<Instruction>(inst));
+ } else
+ buildPoint->addInstruction(std::unique_ptr<Instruction>(new Instruction(NoResult, NoType, OpReturn)));
+
+ if (! implicit)
+ createAndSetNoPredecessorBlock("post-return");
+}
+
+// Comments in header
+void Builder::leaveFunction()
+{
+ Block* block = buildPoint;
+ Function& function = buildPoint->getParent();
+ assert(block);
+
+ // If our function did not contain a return, add a return void now.
+ if (! block->isTerminated()) {
+ if (function.getReturnType() == makeVoidType())
+ makeReturn(true);
+ else {
+ makeReturn(true, createUndefined(function.getReturnType()));
+ }
+ }
+}
+
+// Comments in header
+void Builder::makeDiscard()
+{
+ buildPoint->addInstruction(std::unique_ptr<Instruction>(new Instruction(OpKill)));
+ createAndSetNoPredecessorBlock("post-discard");
+}
+
+// Comments in header
+Id Builder::createVariable(StorageClass storageClass, Id type, const char* name)
+{
+ Id pointerType = makePointer(storageClass, type);
+ Instruction* inst = new Instruction(getUniqueId(), pointerType, OpVariable);
+ inst->addImmediateOperand(storageClass);
+
+ switch (storageClass) {
+ case StorageClassFunction:
+ // Validation rules require the declaration in the entry block
+ buildPoint->getParent().addLocalVariable(std::unique_ptr<Instruction>(inst));
+ break;
+
+ default:
+ constantsTypesGlobals.push_back(std::unique_ptr<Instruction>(inst));
+ module.mapInstruction(inst);
+ break;
+ }
+
+ if (name)
+ addName(inst->getResultId(), name);
+
+ return inst->getResultId();
+}
+
+// Comments in header
+Id Builder::createUndefined(Id type)
+{
+ Instruction* inst = new Instruction(getUniqueId(), type, OpUndef);
+ buildPoint->addInstruction(std::unique_ptr<Instruction>(inst));
+ return inst->getResultId();
+}
+
+// Comments in header
+void Builder::createStore(Id rValue, Id lValue)
+{
+ Instruction* store = new Instruction(OpStore);
+ store->addIdOperand(lValue);
+ store->addIdOperand(rValue);
+ buildPoint->addInstruction(std::unique_ptr<Instruction>(store));
+}
+
+// Comments in header
+Id Builder::createLoad(Id lValue)
+{
+ Instruction* load = new Instruction(getUniqueId(), getDerefTypeId(lValue), OpLoad);
+ load->addIdOperand(lValue);
+ buildPoint->addInstruction(std::unique_ptr<Instruction>(load));
+
+ return load->getResultId();
+}
+
+// Comments in header
+Id Builder::createAccessChain(StorageClass storageClass, Id base, std::vector<Id>& offsets)
+{
+ // Figure out the final resulting type.
+ spv::Id typeId = getTypeId(base);
+ assert(isPointerType(typeId) && offsets.size() > 0);
+ typeId = getContainedTypeId(typeId);
+ for (int i = 0; i < (int)offsets.size(); ++i) {
+ if (isStructType(typeId)) {
+ assert(isConstantScalar(offsets[i]));
+ typeId = getContainedTypeId(typeId, getConstantScalar(offsets[i]));
+ } else
+ typeId = getContainedTypeId(typeId, offsets[i]);
+ }
+ typeId = makePointer(storageClass, typeId);
+
+ // Make the instruction
+ Instruction* chain = new Instruction(getUniqueId(), typeId, OpAccessChain);
+ chain->addIdOperand(base);
+ for (int i = 0; i < (int)offsets.size(); ++i)
+ chain->addIdOperand(offsets[i]);
+ buildPoint->addInstruction(std::unique_ptr<Instruction>(chain));
+
+ return chain->getResultId();
+}
+
+Id Builder::createArrayLength(Id base, unsigned int member)
+{
+ Instruction* length = new Instruction(getUniqueId(), makeIntType(32), OpArrayLength);
+ length->addIdOperand(base);
+ length->addImmediateOperand(member);
+ buildPoint->addInstruction(std::unique_ptr<Instruction>(length));
+
+ return length->getResultId();
+}
+
+Id Builder::createCompositeExtract(Id composite, Id typeId, unsigned index)
+{
+ // Generate code for spec constants if in spec constant operation
+ // generation mode.
+ if (generatingOpCodeForSpecConst) {
+ return createSpecConstantOp(OpCompositeExtract, typeId, std::vector<Id>(1, composite), std::vector<Id>(1, index));
+ }
+ Instruction* extract = new Instruction(getUniqueId(), typeId, OpCompositeExtract);
+ extract->addIdOperand(composite);
+ extract->addImmediateOperand(index);
+ buildPoint->addInstruction(std::unique_ptr<Instruction>(extract));
+
+ return extract->getResultId();
+}
+
+Id Builder::createCompositeExtract(Id composite, Id typeId, std::vector<unsigned>& indexes)
+{
+ // Generate code for spec constants if in spec constant operation
+ // generation mode.
+ if (generatingOpCodeForSpecConst) {
+ return createSpecConstantOp(OpCompositeExtract, typeId, std::vector<Id>(1, composite), indexes);
+ }
+ Instruction* extract = new Instruction(getUniqueId(), typeId, OpCompositeExtract);
+ extract->addIdOperand(composite);
+ for (int i = 0; i < (int)indexes.size(); ++i)
+ extract->addImmediateOperand(indexes[i]);
+ buildPoint->addInstruction(std::unique_ptr<Instruction>(extract));
+
+ return extract->getResultId();
+}
+
+Id Builder::createCompositeInsert(Id object, Id composite, Id typeId, unsigned index)
+{
+ Instruction* insert = new Instruction(getUniqueId(), typeId, OpCompositeInsert);
+ insert->addIdOperand(object);
+ insert->addIdOperand(composite);
+ insert->addImmediateOperand(index);
+ buildPoint->addInstruction(std::unique_ptr<Instruction>(insert));
+
+ return insert->getResultId();
+}
+
+Id Builder::createCompositeInsert(Id object, Id composite, Id typeId, std::vector<unsigned>& indexes)
+{
+ Instruction* insert = new Instruction(getUniqueId(), typeId, OpCompositeInsert);
+ insert->addIdOperand(object);
+ insert->addIdOperand(composite);
+ for (int i = 0; i < (int)indexes.size(); ++i)
+ insert->addImmediateOperand(indexes[i]);
+ buildPoint->addInstruction(std::unique_ptr<Instruction>(insert));
+
+ return insert->getResultId();
+}
+
+Id Builder::createVectorExtractDynamic(Id vector, Id typeId, Id componentIndex)
+{
+ Instruction* extract = new Instruction(getUniqueId(), typeId, OpVectorExtractDynamic);
+ extract->addIdOperand(vector);
+ extract->addIdOperand(componentIndex);
+ buildPoint->addInstruction(std::unique_ptr<Instruction>(extract));
+
+ return extract->getResultId();
+}
+
+Id Builder::createVectorInsertDynamic(Id vector, Id typeId, Id component, Id componentIndex)
+{
+ Instruction* insert = new Instruction(getUniqueId(), typeId, OpVectorInsertDynamic);
+ insert->addIdOperand(vector);
+ insert->addIdOperand(component);
+ insert->addIdOperand(componentIndex);
+ buildPoint->addInstruction(std::unique_ptr<Instruction>(insert));
+
+ return insert->getResultId();
+}
+
+// An opcode that has no operands, no result id, and no type
+void Builder::createNoResultOp(Op opCode)
+{
+ Instruction* op = new Instruction(opCode);
+ buildPoint->addInstruction(std::unique_ptr<Instruction>(op));
+}
+
+// An opcode that has one operand, no result id, and no type
+void Builder::createNoResultOp(Op opCode, Id operand)
+{
+ Instruction* op = new Instruction(opCode);
+ op->addIdOperand(operand);
+ buildPoint->addInstruction(std::unique_ptr<Instruction>(op));
+}
+
+// An opcode that has one operand, no result id, and no type
+void Builder::createNoResultOp(Op opCode, const std::vector<Id>& operands)
+{
+ Instruction* op = new Instruction(opCode);
+ for (auto it = operands.cbegin(); it != operands.cend(); ++it)
+ op->addIdOperand(*it);
+ buildPoint->addInstruction(std::unique_ptr<Instruction>(op));
+}
+
+void Builder::createControlBarrier(Scope execution, Scope memory, MemorySemanticsMask semantics)
+{
+ Instruction* op = new Instruction(OpControlBarrier);
+ op->addImmediateOperand(makeUintConstant(execution));
+ op->addImmediateOperand(makeUintConstant(memory));
+ op->addImmediateOperand(makeUintConstant(semantics));
+ buildPoint->addInstruction(std::unique_ptr<Instruction>(op));
+}
+
+void Builder::createMemoryBarrier(unsigned executionScope, unsigned memorySemantics)
+{
+ Instruction* op = new Instruction(OpMemoryBarrier);
+ op->addImmediateOperand(makeUintConstant(executionScope));
+ op->addImmediateOperand(makeUintConstant(memorySemantics));
+ buildPoint->addInstruction(std::unique_ptr<Instruction>(op));
+}
+
+// An opcode that has one operands, a result id, and a type
+Id Builder::createUnaryOp(Op opCode, Id typeId, Id operand)
+{
+ // Generate code for spec constants if in spec constant operation
+ // generation mode.
+ if (generatingOpCodeForSpecConst) {
+ return createSpecConstantOp(opCode, typeId, std::vector<Id>(1, operand), std::vector<Id>());
+ }
+ Instruction* op = new Instruction(getUniqueId(), typeId, opCode);
+ op->addIdOperand(operand);
+ buildPoint->addInstruction(std::unique_ptr<Instruction>(op));
+
+ return op->getResultId();
+}
+
+Id Builder::createBinOp(Op opCode, Id typeId, Id left, Id right)
+{
+ // Generate code for spec constants if in spec constant operation
+ // generation mode.
+ if (generatingOpCodeForSpecConst) {
+ std::vector<Id> operands(2);
+ operands[0] = left; operands[1] = right;
+ return createSpecConstantOp(opCode, typeId, operands, std::vector<Id>());
+ }
+ Instruction* op = new Instruction(getUniqueId(), typeId, opCode);
+ op->addIdOperand(left);
+ op->addIdOperand(right);
+ buildPoint->addInstruction(std::unique_ptr<Instruction>(op));
+
+ return op->getResultId();
+}
+
+Id Builder::createTriOp(Op opCode, Id typeId, Id op1, Id op2, Id op3)
+{
+ // Generate code for spec constants if in spec constant operation
+ // generation mode.
+ if (generatingOpCodeForSpecConst) {
+ std::vector<Id> operands(3);
+ operands[0] = op1;
+ operands[1] = op2;
+ operands[2] = op3;
+ return createSpecConstantOp(
+ opCode, typeId, operands, std::vector<Id>());
+ }
+ Instruction* op = new Instruction(getUniqueId(), typeId, opCode);
+ op->addIdOperand(op1);
+ op->addIdOperand(op2);
+ op->addIdOperand(op3);
+ buildPoint->addInstruction(std::unique_ptr<Instruction>(op));
+
+ return op->getResultId();
+}
+
+Id Builder::createOp(Op opCode, Id typeId, const std::vector<Id>& operands)
+{
+ Instruction* op = new Instruction(getUniqueId(), typeId, opCode);
+ for (auto it = operands.cbegin(); it != operands.cend(); ++it)
+ op->addIdOperand(*it);
+ buildPoint->addInstruction(std::unique_ptr<Instruction>(op));
+
+ return op->getResultId();
+}
+
+Id Builder::createSpecConstantOp(Op opCode, Id typeId, const std::vector<Id>& operands, const std::vector<unsigned>& literals)
+{
+ Instruction* op = new Instruction(getUniqueId(), typeId, OpSpecConstantOp);
+ op->addImmediateOperand((unsigned) opCode);
+ for (auto it = operands.cbegin(); it != operands.cend(); ++it)
+ op->addIdOperand(*it);
+ for (auto it = literals.cbegin(); it != literals.cend(); ++it)
+ op->addImmediateOperand(*it);
+ module.mapInstruction(op);
+ constantsTypesGlobals.push_back(std::unique_ptr<Instruction>(op));
+
+ return op->getResultId();
+}
+
+Id Builder::createFunctionCall(spv::Function* function, std::vector<spv::Id>& args)
+{
+ Instruction* op = new Instruction(getUniqueId(), function->getReturnType(), OpFunctionCall);
+ op->addIdOperand(function->getId());
+ for (int a = 0; a < (int)args.size(); ++a)
+ op->addIdOperand(args[a]);
+ buildPoint->addInstruction(std::unique_ptr<Instruction>(op));
+
+ return op->getResultId();
+}
+
+// Comments in header
+Id Builder::createRvalueSwizzle(Decoration precision, Id typeId, Id source, std::vector<unsigned>& channels)
+{
+ if (channels.size() == 1)
+ return setPrecision(createCompositeExtract(source, typeId, channels.front()), precision);
+
+ if (generatingOpCodeForSpecConst) {
+ std::vector<Id> operands(2);
+ operands[0] = operands[1] = source;
+ return setPrecision(createSpecConstantOp(OpVectorShuffle, typeId, operands, channels), precision);
+ }
+ Instruction* swizzle = new Instruction(getUniqueId(), typeId, OpVectorShuffle);
+ assert(isVector(source));
+ swizzle->addIdOperand(source);
+ swizzle->addIdOperand(source);
+ for (int i = 0; i < (int)channels.size(); ++i)
+ swizzle->addImmediateOperand(channels[i]);
+ buildPoint->addInstruction(std::unique_ptr<Instruction>(swizzle));
+
+ return setPrecision(swizzle->getResultId(), precision);
+}
+
+// Comments in header
+Id Builder::createLvalueSwizzle(Id typeId, Id target, Id source, std::vector<unsigned>& channels)
+{
+ assert(getNumComponents(source) == (int)channels.size());
+ if (channels.size() == 1 && getNumComponents(source) == 1)
+ return createCompositeInsert(source, target, typeId, channels.front());
+
+ Instruction* swizzle = new Instruction(getUniqueId(), typeId, OpVectorShuffle);
+ assert(isVector(source));
+ assert(isVector(target));
+ swizzle->addIdOperand(target);
+ swizzle->addIdOperand(source);
+
+ // Set up an identity shuffle from the base value to the result value
+ unsigned int components[4];
+ int numTargetComponents = getNumComponents(target);
+ for (int i = 0; i < numTargetComponents; ++i)
+ components[i] = i;
+
+ // Punch in the l-value swizzle
+ for (int i = 0; i < (int)channels.size(); ++i)
+ components[channels[i]] = numTargetComponents + i;
+
+ // finish the instruction with these components selectors
+ for (int i = 0; i < numTargetComponents; ++i)
+ swizzle->addImmediateOperand(components[i]);
+ buildPoint->addInstruction(std::unique_ptr<Instruction>(swizzle));
+
+ return swizzle->getResultId();
+}
+
+// Comments in header
+void Builder::promoteScalar(Decoration precision, Id& left, Id& right)
+{
+ int direction = getNumComponents(right) - getNumComponents(left);
+
+ if (direction > 0)
+ left = smearScalar(precision, left, makeVectorType(getTypeId(left), getNumComponents(right)));
+ else if (direction < 0)
+ right = smearScalar(precision, right, makeVectorType(getTypeId(right), getNumComponents(left)));
+
+ return;
+}
+
+// Comments in header
+Id Builder::smearScalar(Decoration precision, Id scalar, Id vectorType)
+{
+ assert(getNumComponents(scalar) == 1);
+ assert(getTypeId(scalar) == getScalarTypeId(vectorType));
+
+ int numComponents = getNumTypeComponents(vectorType);
+ if (numComponents == 1)
+ return scalar;
+
+ Instruction* smear = nullptr;
+ if (generatingOpCodeForSpecConst) {
+ auto members = std::vector<spv::Id>(numComponents, scalar);
+ // Sometime even in spec-constant-op mode, the temporary vector created by
+ // promoting a scalar might not be a spec constant. This should depend on
+ // the scalar.
+ // e.g.:
+ // const vec2 spec_const_result = a_spec_const_vec2 + a_front_end_const_scalar;
+ // In such cases, the temporary vector created from a_front_end_const_scalar
+ // is not a spec constant vector, even though the binary operation node is marked
+ // as 'specConstant' and we are in spec-constant-op mode.
+ auto result_id = makeCompositeConstant(vectorType, members, isSpecConstant(scalar));
+ smear = module.getInstruction(result_id);
+ } else {
+ smear = new Instruction(getUniqueId(), vectorType, OpCompositeConstruct);
+ for (int c = 0; c < numComponents; ++c)
+ smear->addIdOperand(scalar);
+ buildPoint->addInstruction(std::unique_ptr<Instruction>(smear));
+ }
+
+ return setPrecision(smear->getResultId(), precision);
+}
+
+// Comments in header
+Id Builder::createBuiltinCall(Id resultType, Id builtins, int entryPoint, std::vector<Id>& args)
+{
+ Instruction* inst = new Instruction(getUniqueId(), resultType, OpExtInst);
+ inst->addIdOperand(builtins);
+ inst->addImmediateOperand(entryPoint);
+ for (int arg = 0; arg < (int)args.size(); ++arg)
+ inst->addIdOperand(args[arg]);
+
+ buildPoint->addInstruction(std::unique_ptr<Instruction>(inst));
+
+ return inst->getResultId();
+}
+
+// Accept all parameters needed to create a texture instruction.
+// Create the correct instruction based on the inputs, and make the call.
+Id Builder::createTextureCall(Decoration precision, Id resultType, bool sparse, bool fetch, bool proj, bool gather, bool noImplicitLod, const TextureParameters& parameters)
+{
+ static const int maxTextureArgs = 10;
+ Id texArgs[maxTextureArgs] = {};
+
+ //
+ // Set up the fixed arguments
+ //
+ int numArgs = 0;
+ bool explicitLod = false;
+ texArgs[numArgs++] = parameters.sampler;
+ texArgs[numArgs++] = parameters.coords;
+ if (parameters.Dref)
+ texArgs[numArgs++] = parameters.Dref;
+ if (parameters.comp)
+ texArgs[numArgs++] = parameters.comp;
+
+ //
+ // Set up the optional arguments
+ //
+ int optArgNum = numArgs; // track which operand, if it exists, is the mask of optional arguments
+ ++numArgs; // speculatively make room for the mask operand
+ ImageOperandsMask mask = ImageOperandsMaskNone; // the mask operand
+ if (parameters.bias) {
+ mask = (ImageOperandsMask)(mask | ImageOperandsBiasMask);
+ texArgs[numArgs++] = parameters.bias;
+ }
+ if (parameters.lod) {
+ mask = (ImageOperandsMask)(mask | ImageOperandsLodMask);
+ texArgs[numArgs++] = parameters.lod;
+ explicitLod = true;
+ } else if (parameters.gradX) {
+ mask = (ImageOperandsMask)(mask | ImageOperandsGradMask);
+ texArgs[numArgs++] = parameters.gradX;
+ texArgs[numArgs++] = parameters.gradY;
+ explicitLod = true;
+ } else if (noImplicitLod && ! fetch && ! gather) {
+ // have to explicitly use lod of 0 if not allowed to have them be implicit, and
+ // we would otherwise be about to issue an implicit instruction
+ mask = (ImageOperandsMask)(mask | ImageOperandsLodMask);
+ texArgs[numArgs++] = makeFloatConstant(0.0);
+ explicitLod = true;
+ }
+ if (parameters.offset) {
+ if (isConstant(parameters.offset))
+ mask = (ImageOperandsMask)(mask | ImageOperandsConstOffsetMask);
+ else {
+ addCapability(CapabilityImageGatherExtended);
+ mask = (ImageOperandsMask)(mask | ImageOperandsOffsetMask);
+ }
+ texArgs[numArgs++] = parameters.offset;
+ }
+ if (parameters.offsets) {
+ mask = (ImageOperandsMask)(mask | ImageOperandsConstOffsetsMask);
+ texArgs[numArgs++] = parameters.offsets;
+ }
+ if (parameters.sample) {
+ mask = (ImageOperandsMask)(mask | ImageOperandsSampleMask);
+ texArgs[numArgs++] = parameters.sample;
+ }
+ if (parameters.lodClamp) {
+ // capability if this bit is used
+ addCapability(CapabilityMinLod);
+
+ mask = (ImageOperandsMask)(mask | ImageOperandsMinLodMask);
+ texArgs[numArgs++] = parameters.lodClamp;
+ }
+ if (mask == ImageOperandsMaskNone)
+ --numArgs; // undo speculative reservation for the mask argument
+ else
+ texArgs[optArgNum] = mask;
+
+ //
+ // Set up the instruction
+ //
+ Op opCode = OpNop; // All paths below need to set this
+ if (fetch) {
+ if (sparse)
+ opCode = OpImageSparseFetch;
+ else
+ opCode = OpImageFetch;
+ } else if (gather) {
+ if (parameters.Dref)
+ if (sparse)
+ opCode = OpImageSparseDrefGather;
+ else
+ opCode = OpImageDrefGather;
+ else
+ if (sparse)
+ opCode = OpImageSparseGather;
+ else
+ opCode = OpImageGather;
+ } else if (explicitLod) {
+ if (parameters.Dref) {
+ if (proj)
+ if (sparse)
+ opCode = OpImageSparseSampleProjDrefExplicitLod;
+ else
+ opCode = OpImageSampleProjDrefExplicitLod;
+ else
+ if (sparse)
+ opCode = OpImageSparseSampleDrefExplicitLod;
+ else
+ opCode = OpImageSampleDrefExplicitLod;
+ } else {
+ if (proj)
+ if (sparse)
+ opCode = OpImageSparseSampleProjExplicitLod;
+ else
+ opCode = OpImageSampleProjExplicitLod;
+ else
+ if (sparse)
+ opCode = OpImageSparseSampleExplicitLod;
+ else
+ opCode = OpImageSampleExplicitLod;
+ }
+ } else {
+ if (parameters.Dref) {
+ if (proj)
+ if (sparse)
+ opCode = OpImageSparseSampleProjDrefImplicitLod;
+ else
+ opCode = OpImageSampleProjDrefImplicitLod;
+ else
+ if (sparse)
+ opCode = OpImageSparseSampleDrefImplicitLod;
+ else
+ opCode = OpImageSampleDrefImplicitLod;
+ } else {
+ if (proj)
+ if (sparse)
+ opCode = OpImageSparseSampleProjImplicitLod;
+ else
+ opCode = OpImageSampleProjImplicitLod;
+ else
+ if (sparse)
+ opCode = OpImageSparseSampleImplicitLod;
+ else
+ opCode = OpImageSampleImplicitLod;
+ }
+ }
+
+ // See if the result type is expecting a smeared result.
+ // This happens when a legacy shadow*() call is made, which
+ // gets a vec4 back instead of a float.
+ Id smearedType = resultType;
+ if (! isScalarType(resultType)) {
+ switch (opCode) {
+ case OpImageSampleDrefImplicitLod:
+ case OpImageSampleDrefExplicitLod:
+ case OpImageSampleProjDrefImplicitLod:
+ case OpImageSampleProjDrefExplicitLod:
+ resultType = getScalarTypeId(resultType);
+ break;
+ default:
+ break;
+ }
+ }
+
+ Id typeId0 = 0;
+ Id typeId1 = 0;
+
+ if (sparse) {
+ typeId0 = resultType;
+ typeId1 = getDerefTypeId(parameters.texelOut);
+ resultType = makeStructResultType(typeId0, typeId1);
+ }
+
+ // Build the SPIR-V instruction
+ Instruction* textureInst = new Instruction(getUniqueId(), resultType, opCode);
+ for (int op = 0; op < optArgNum; ++op)
+ textureInst->addIdOperand(texArgs[op]);
+ if (optArgNum < numArgs)
+ textureInst->addImmediateOperand(texArgs[optArgNum]);
+ for (int op = optArgNum + 1; op < numArgs; ++op)
+ textureInst->addIdOperand(texArgs[op]);
+ setPrecision(textureInst->getResultId(), precision);
+ buildPoint->addInstruction(std::unique_ptr<Instruction>(textureInst));
+
+ Id resultId = textureInst->getResultId();
+
+ if (sparse) {
+ // set capability
+ addCapability(CapabilitySparseResidency);
+
+ // Decode the return type that was a special structure
+ createStore(createCompositeExtract(resultId, typeId1, 1), parameters.texelOut);
+ resultId = createCompositeExtract(resultId, typeId0, 0);
+ setPrecision(resultId, precision);
+ } else {
+ // When a smear is needed, do it, as per what was computed
+ // above when resultType was changed to a scalar type.
+ if (resultType != smearedType)
+ resultId = smearScalar(precision, resultId, smearedType);
+ }
+
+ return resultId;
+}
+
+// Comments in header
+Id Builder::createTextureQueryCall(Op opCode, const TextureParameters& parameters)
+{
+ // All these need a capability
+ addCapability(CapabilityImageQuery);
+
+ // Figure out the result type
+ Id resultType = 0;
+ switch (opCode) {
+ case OpImageQuerySize:
+ case OpImageQuerySizeLod:
+ {
+ int numComponents = 0;
+ switch (getTypeDimensionality(getImageType(parameters.sampler))) {
+ case Dim1D:
+ case DimBuffer:
+ numComponents = 1;
+ break;
+ case Dim2D:
+ case DimCube:
+ case DimRect:
+ case DimSubpassData:
+ numComponents = 2;
+ break;
+ case Dim3D:
+ numComponents = 3;
+ break;
+
+ default:
+ assert(0);
+ break;
+ }
+ if (isArrayedImageType(getImageType(parameters.sampler)))
+ ++numComponents;
+ if (numComponents == 1)
+ resultType = makeIntType(32);
+ else
+ resultType = makeVectorType(makeIntType(32), numComponents);
+
+ break;
+ }
+ case OpImageQueryLod:
+ resultType = makeVectorType(makeFloatType(32), 2);
+ break;
+ case OpImageQueryLevels:
+ case OpImageQuerySamples:
+ resultType = makeIntType(32);
+ break;
+ default:
+ assert(0);
+ break;
+ }
+
+ Instruction* query = new Instruction(getUniqueId(), resultType, opCode);
+ query->addIdOperand(parameters.sampler);
+ if (parameters.coords)
+ query->addIdOperand(parameters.coords);
+ if (parameters.lod)
+ query->addIdOperand(parameters.lod);
+ buildPoint->addInstruction(std::unique_ptr<Instruction>(query));
+
+ return query->getResultId();
+}
+
+// External comments in header.
+// Operates recursively to visit the composite's hierarchy.
+Id Builder::createCompositeCompare(Decoration precision, Id value1, Id value2, bool equal)
+{
+ Id boolType = makeBoolType();
+ Id valueType = getTypeId(value1);
+
+ Id resultId = NoResult;
+
+ int numConstituents = getNumTypeConstituents(valueType);
+
+ // Scalars and Vectors
+
+ if (isScalarType(valueType) || isVectorType(valueType)) {
+ assert(valueType == getTypeId(value2));
+ // These just need a single comparison, just have
+ // to figure out what it is.
+ Op op;
+ switch (getMostBasicTypeClass(valueType)) {
+ case OpTypeFloat:
+ op = equal ? OpFOrdEqual : OpFOrdNotEqual;
+ break;
+ case OpTypeInt:
+ default:
+ op = equal ? OpIEqual : OpINotEqual;
+ break;
+ case OpTypeBool:
+ op = equal ? OpLogicalEqual : OpLogicalNotEqual;
+ precision = NoPrecision;
+ break;
+ }
+
+ if (isScalarType(valueType)) {
+ // scalar
+ resultId = createBinOp(op, boolType, value1, value2);
+ } else {
+ // vector
+ resultId = createBinOp(op, makeVectorType(boolType, numConstituents), value1, value2);
+ setPrecision(resultId, precision);
+ // reduce vector compares...
+ resultId = createUnaryOp(equal ? OpAll : OpAny, boolType, resultId);
+ }
+
+ return setPrecision(resultId, precision);
+ }
+
+ // Only structs, arrays, and matrices should be left.
+ // They share in common the reduction operation across their constituents.
+ assert(isAggregateType(valueType) || isMatrixType(valueType));
+
+ // Compare each pair of constituents
+ for (int constituent = 0; constituent < numConstituents; ++constituent) {
+ std::vector<unsigned> indexes(1, constituent);
+ Id constituentType1 = getContainedTypeId(getTypeId(value1), constituent);
+ Id constituentType2 = getContainedTypeId(getTypeId(value2), constituent);
+ Id constituent1 = createCompositeExtract(value1, constituentType1, indexes);
+ Id constituent2 = createCompositeExtract(value2, constituentType2, indexes);
+
+ Id subResultId = createCompositeCompare(precision, constituent1, constituent2, equal);
+
+ if (constituent == 0)
+ resultId = subResultId;
+ else
+ resultId = setPrecision(createBinOp(equal ? OpLogicalAnd : OpLogicalOr, boolType, resultId, subResultId), precision);
+ }
+
+ return resultId;
+}
+
+// OpCompositeConstruct
+Id Builder::createCompositeConstruct(Id typeId, std::vector<Id>& constituents)
+{
+ assert(isAggregateType(typeId) || (getNumTypeConstituents(typeId) > 1 && getNumTypeConstituents(typeId) == (int)constituents.size()));
+
+ if (generatingOpCodeForSpecConst) {
+ // Sometime, even in spec-constant-op mode, the constant composite to be
+ // constructed may not be a specialization constant.
+ // e.g.:
+ // const mat2 m2 = mat2(a_spec_const, a_front_end_const, another_front_end_const, third_front_end_const);
+ // The first column vector should be a spec constant one, as a_spec_const is a spec constant.
+ // The second column vector should NOT be spec constant, as it does not contain any spec constants.
+ // To handle such cases, we check the constituents of the constant vector to determine whether this
+ // vector should be created as a spec constant.
+ return makeCompositeConstant(typeId, constituents,
+ std::any_of(constituents.begin(), constituents.end(),
+ [&](spv::Id id) { return isSpecConstant(id); }));
+ }
+
+ Instruction* op = new Instruction(getUniqueId(), typeId, OpCompositeConstruct);
+ for (int c = 0; c < (int)constituents.size(); ++c)
+ op->addIdOperand(constituents[c]);
+ buildPoint->addInstruction(std::unique_ptr<Instruction>(op));
+
+ return op->getResultId();
+}
+
+// Vector or scalar constructor
+Id Builder::createConstructor(Decoration precision, const std::vector<Id>& sources, Id resultTypeId)
+{
+ Id result = NoResult;
+ unsigned int numTargetComponents = getNumTypeComponents(resultTypeId);
+ unsigned int targetComponent = 0;
+
+ // Special case: when calling a vector constructor with a single scalar
+ // argument, smear the scalar
+ if (sources.size() == 1 && isScalar(sources[0]) && numTargetComponents > 1)
+ return smearScalar(precision, sources[0], resultTypeId);
+
+ Id scalarTypeId = getScalarTypeId(resultTypeId);
+ std::vector<Id> constituents; // accumulate the arguments for OpCompositeConstruct
+ for (unsigned int i = 0; i < sources.size(); ++i) {
+ assert(! isAggregate(sources[i]));
+ unsigned int sourceSize = getNumComponents(sources[i]);
+ unsigned int sourcesToUse = sourceSize;
+ if (sourcesToUse + targetComponent > numTargetComponents)
+ sourcesToUse = numTargetComponents - targetComponent;
+
+ for (unsigned int s = 0; s < sourcesToUse; ++s) {
+ Id arg = sources[i];
+ if (sourceSize > 1) {
+ std::vector<unsigned> swiz;
+ swiz.push_back(s);
+ arg = createRvalueSwizzle(precision, scalarTypeId, arg, swiz);
+ }
+
+ if (numTargetComponents > 1)
+ constituents.push_back(arg);
+ else
+ result = arg;
+ ++targetComponent;
+ }
+
+ if (targetComponent >= numTargetComponents)
+ break;
+ }
+
+ if (constituents.size() > 0)
+ result = createCompositeConstruct(resultTypeId, constituents);
+
+ return setPrecision(result, precision);
+}
+
+// Comments in header
+Id Builder::createMatrixConstructor(Decoration precision, const std::vector<Id>& sources, Id resultTypeId)
+{
+ Id componentTypeId = getScalarTypeId(resultTypeId);
+ int numCols = getTypeNumColumns(resultTypeId);
+ int numRows = getTypeNumRows(resultTypeId);
+
+ Instruction* instr = module.getInstruction(componentTypeId);
+ Id bitCount = instr->getIdOperand(0);
+
+ // Will use a two step process
+ // 1. make a compile-time 2D array of values
+ // 2. construct a matrix from that array
+
+ // Step 1.
+
+ // initialize the array to the identity matrix
+ Id ids[maxMatrixSize][maxMatrixSize];
+ Id one = (bitCount == 64 ? makeDoubleConstant(1.0) : makeFloatConstant(1.0));
+ Id zero = (bitCount == 64 ? makeDoubleConstant(0.0) : makeFloatConstant(0.0));
+ for (int col = 0; col < 4; ++col) {
+ for (int row = 0; row < 4; ++row) {
+ if (col == row)
+ ids[col][row] = one;
+ else
+ ids[col][row] = zero;
+ }
+ }
+
+ // modify components as dictated by the arguments
+ if (sources.size() == 1 && isScalar(sources[0])) {
+ // a single scalar; resets the diagonals
+ for (int col = 0; col < 4; ++col)
+ ids[col][col] = sources[0];
+ } else if (isMatrix(sources[0])) {
+ // constructing from another matrix; copy over the parts that exist in both the argument and constructee
+ Id matrix = sources[0];
+ int minCols = std::min(numCols, getNumColumns(matrix));
+ int minRows = std::min(numRows, getNumRows(matrix));
+ for (int col = 0; col < minCols; ++col) {
+ std::vector<unsigned> indexes;
+ indexes.push_back(col);
+ for (int row = 0; row < minRows; ++row) {
+ indexes.push_back(row);
+ ids[col][row] = createCompositeExtract(matrix, componentTypeId, indexes);
+ indexes.pop_back();
+ setPrecision(ids[col][row], precision);
+ }
+ }
+ } else {
+ // fill in the matrix in column-major order with whatever argument components are available
+ int row = 0;
+ int col = 0;
+
+ for (int arg = 0; arg < (int)sources.size(); ++arg) {
+ Id argComp = sources[arg];
+ for (int comp = 0; comp < getNumComponents(sources[arg]); ++comp) {
+ if (getNumComponents(sources[arg]) > 1) {
+ argComp = createCompositeExtract(sources[arg], componentTypeId, comp);
+ setPrecision(argComp, precision);
+ }
+ ids[col][row++] = argComp;
+ if (row == numRows) {
+ row = 0;
+ col++;
+ }
+ }
+ }
+ }
+
+
+ // Step 2: Construct a matrix from that array.
+ // First make the column vectors, then make the matrix.
+
+ // make the column vectors
+ Id columnTypeId = getContainedTypeId(resultTypeId);
+ std::vector<Id> matrixColumns;
+ for (int col = 0; col < numCols; ++col) {
+ std::vector<Id> vectorComponents;
+ for (int row = 0; row < numRows; ++row)
+ vectorComponents.push_back(ids[col][row]);
+ Id column = createCompositeConstruct(columnTypeId, vectorComponents);
+ setPrecision(column, precision);
+ matrixColumns.push_back(column);
+ }
+
+ // make the matrix
+ return setPrecision(createCompositeConstruct(resultTypeId, matrixColumns), precision);
+}
+
+// Comments in header
+Builder::If::If(Id cond, Builder& gb) :
+ builder(gb),
+ condition(cond),
+ elseBlock(0)
+{
+ function = &builder.getBuildPoint()->getParent();
+
+ // make the blocks, but only put the then-block into the function,
+ // the else-block and merge-block will be added later, in order, after
+ // earlier code is emitted
+ thenBlock = new Block(builder.getUniqueId(), *function);
+ mergeBlock = new Block(builder.getUniqueId(), *function);
+
+ // Save the current block, so that we can add in the flow control split when
+ // makeEndIf is called.
+ headerBlock = builder.getBuildPoint();
+
+ function->addBlock(thenBlock);
+ builder.setBuildPoint(thenBlock);
+}
+
+// Comments in header
+void Builder::If::makeBeginElse()
+{
+ // Close out the "then" by having it jump to the mergeBlock
+ builder.createBranch(mergeBlock);
+
+ // Make the first else block and add it to the function
+ elseBlock = new Block(builder.getUniqueId(), *function);
+ function->addBlock(elseBlock);
+
+ // Start building the else block
+ builder.setBuildPoint(elseBlock);
+}
+
+// Comments in header
+void Builder::If::makeEndIf()
+{
+ // jump to the merge block
+ builder.createBranch(mergeBlock);
+
+ // Go back to the headerBlock and make the flow control split
+ builder.setBuildPoint(headerBlock);
+ builder.createSelectionMerge(mergeBlock, SelectionControlMaskNone);
+ if (elseBlock)
+ builder.createConditionalBranch(condition, thenBlock, elseBlock);
+ else
+ builder.createConditionalBranch(condition, thenBlock, mergeBlock);
+
+ // add the merge block to the function
+ function->addBlock(mergeBlock);
+ builder.setBuildPoint(mergeBlock);
+}
+
+// Comments in header
+void Builder::makeSwitch(Id selector, int numSegments, std::vector<int>& caseValues, std::vector<int>& valueIndexToSegment, int defaultSegment,
+ std::vector<Block*>& segmentBlocks)
+{
+ Function& function = buildPoint->getParent();
+
+ // make all the blocks
+ for (int s = 0; s < numSegments; ++s)
+ segmentBlocks.push_back(new Block(getUniqueId(), function));
+
+ Block* mergeBlock = new Block(getUniqueId(), function);
+
+ // make and insert the switch's selection-merge instruction
+ createSelectionMerge(mergeBlock, SelectionControlMaskNone);
+
+ // make the switch instruction
+ Instruction* switchInst = new Instruction(NoResult, NoType, OpSwitch);
+ switchInst->addIdOperand(selector);
+ auto defaultOrMerge = (defaultSegment >= 0) ? segmentBlocks[defaultSegment] : mergeBlock;
+ switchInst->addIdOperand(defaultOrMerge->getId());
+ defaultOrMerge->addPredecessor(buildPoint);
+ for (int i = 0; i < (int)caseValues.size(); ++i) {
+ switchInst->addImmediateOperand(caseValues[i]);
+ switchInst->addIdOperand(segmentBlocks[valueIndexToSegment[i]]->getId());
+ segmentBlocks[valueIndexToSegment[i]]->addPredecessor(buildPoint);
+ }
+ buildPoint->addInstruction(std::unique_ptr<Instruction>(switchInst));
+
+ // push the merge block
+ switchMerges.push(mergeBlock);
+}
+
+// Comments in header
+void Builder::addSwitchBreak()
+{
+ // branch to the top of the merge block stack
+ createBranch(switchMerges.top());
+ createAndSetNoPredecessorBlock("post-switch-break");
+}
+
+// Comments in header
+void Builder::nextSwitchSegment(std::vector<Block*>& segmentBlock, int nextSegment)
+{
+ int lastSegment = nextSegment - 1;
+ if (lastSegment >= 0) {
+ // Close out previous segment by jumping, if necessary, to next segment
+ if (! buildPoint->isTerminated())
+ createBranch(segmentBlock[nextSegment]);
+ }
+ Block* block = segmentBlock[nextSegment];
+ block->getParent().addBlock(block);
+ setBuildPoint(block);
+}
+
+// Comments in header
+void Builder::endSwitch(std::vector<Block*>& /*segmentBlock*/)
+{
+ // Close out previous segment by jumping, if necessary, to next segment
+ if (! buildPoint->isTerminated())
+ addSwitchBreak();
+
+ switchMerges.top()->getParent().addBlock(switchMerges.top());
+ setBuildPoint(switchMerges.top());
+
+ switchMerges.pop();
+}
+
+Block& Builder::makeNewBlock()
+{
+ Function& function = buildPoint->getParent();
+ auto block = new Block(getUniqueId(), function);
+ function.addBlock(block);
+ return *block;
+}
+
+Builder::LoopBlocks& Builder::makeNewLoop()
+{
+ // Older MSVC versions don't allow inlining of blocks below.
+ LoopBlocks blocks = {makeNewBlock(), makeNewBlock(), makeNewBlock(), makeNewBlock()};
+ loops.push(blocks);
+ return loops.top();
+}
+
+void Builder::createLoopContinue()
+{
+ createBranch(&loops.top().continue_target);
+ // Set up a block for dead code.
+ createAndSetNoPredecessorBlock("post-loop-continue");
+}
+
+void Builder::createLoopExit()
+{
+ createBranch(&loops.top().merge);
+ // Set up a block for dead code.
+ createAndSetNoPredecessorBlock("post-loop-break");
+}
+
+void Builder::closeLoop()
+{
+ loops.pop();
+}
+
+void Builder::clearAccessChain()
+{
+ accessChain.base = NoResult;
+ accessChain.indexChain.clear();
+ accessChain.instr = NoResult;
+ accessChain.swizzle.clear();
+ accessChain.component = NoResult;
+ accessChain.preSwizzleBaseType = NoType;
+ accessChain.isRValue = false;
+}
+
+// Comments in header
+void Builder::accessChainPushSwizzle(std::vector<unsigned>& swizzle, Id preSwizzleBaseType)
+{
+ // swizzles can be stacked in GLSL, but simplified to a single
+ // one here; the base type doesn't change
+ if (accessChain.preSwizzleBaseType == NoType)
+ accessChain.preSwizzleBaseType = preSwizzleBaseType;
+
+ // if needed, propagate the swizzle for the current access chain
+ if (accessChain.swizzle.size()) {
+ std::vector<unsigned> oldSwizzle = accessChain.swizzle;
+ accessChain.swizzle.resize(0);
+ for (unsigned int i = 0; i < swizzle.size(); ++i) {
+ accessChain.swizzle.push_back(oldSwizzle[swizzle[i]]);
+ }
+ } else
+ accessChain.swizzle = swizzle;
+
+ // determine if we need to track this swizzle anymore
+ simplifyAccessChainSwizzle();
+}
+
+// Comments in header
+void Builder::accessChainStore(Id rvalue)
+{
+ assert(accessChain.isRValue == false);
+
+ transferAccessChainSwizzle(true);
+ Id base = collapseAccessChain();
+
+ if (accessChain.swizzle.size() && accessChain.component != NoResult)
+ logger->missingFunctionality("simultaneous l-value swizzle and dynamic component selection");
+
+ // If swizzle still exists, it is out-of-order or not full, we must load the target vector,
+ // extract and insert elements to perform writeMask and/or swizzle.
+ Id source = NoResult;
+ if (accessChain.swizzle.size()) {
+ Id tempBaseId = createLoad(base);
+ source = createLvalueSwizzle(getTypeId(tempBaseId), tempBaseId, rvalue, accessChain.swizzle);
+ }
+
+ // dynamic component selection
+ if (accessChain.component != NoResult) {
+ Id tempBaseId = (source == NoResult) ? createLoad(base) : source;
+ source = createVectorInsertDynamic(tempBaseId, getTypeId(tempBaseId), rvalue, accessChain.component);
+ }
+
+ if (source == NoResult)
+ source = rvalue;
+
+ createStore(source, base);
+}
+
+// Comments in header
+Id Builder::accessChainLoad(Decoration precision, Id resultType)
+{
+ Id id;
+
+ if (accessChain.isRValue) {
+ // transfer access chain, but keep it static, so we can stay in registers
+ transferAccessChainSwizzle(false);
+ if (accessChain.indexChain.size() > 0) {
+ Id swizzleBase = accessChain.preSwizzleBaseType != NoType ? accessChain.preSwizzleBaseType : resultType;
+
+ // if all the accesses are constants, we can use OpCompositeExtract
+ std::vector<unsigned> indexes;
+ bool constant = true;
+ for (int i = 0; i < (int)accessChain.indexChain.size(); ++i) {
+ if (isConstantScalar(accessChain.indexChain[i]))
+ indexes.push_back(getConstantScalar(accessChain.indexChain[i]));
+ else {
+ constant = false;
+ break;
+ }
+ }
+
+ if (constant)
+ id = createCompositeExtract(accessChain.base, swizzleBase, indexes);
+ else {
+ // make a new function variable for this r-value
+ Id lValue = createVariable(StorageClassFunction, getTypeId(accessChain.base), "indexable");
+
+ // store into it
+ createStore(accessChain.base, lValue);
+
+ // move base to the new variable
+ accessChain.base = lValue;
+ accessChain.isRValue = false;
+
+ // load through the access chain
+ id = createLoad(collapseAccessChain());
+ }
+ setPrecision(id, precision);
+ } else
+ id = accessChain.base; // no precision, it was set when this was defined
+ } else {
+ transferAccessChainSwizzle(true);
+ // load through the access chain
+ id = createLoad(collapseAccessChain());
+ setPrecision(id, precision);
+ }
+
+ // Done, unless there are swizzles to do
+ if (accessChain.swizzle.size() == 0 && accessChain.component == NoResult)
+ return id;
+
+ // Do remaining swizzling
+ // First, static swizzling
+ if (accessChain.swizzle.size()) {
+ // static swizzle
+ Id swizzledType = getScalarTypeId(getTypeId(id));
+ if (accessChain.swizzle.size() > 1)
+ swizzledType = makeVectorType(swizzledType, (int)accessChain.swizzle.size());
+ id = createRvalueSwizzle(precision, swizzledType, id, accessChain.swizzle);
+ }
+
+ // dynamic single-component selection
+ if (accessChain.component != NoResult)
+ id = setPrecision(createVectorExtractDynamic(id, resultType, accessChain.component), precision);
+
+ return id;
+}
+
+Id Builder::accessChainGetLValue()
+{
+ assert(accessChain.isRValue == false);
+
+ transferAccessChainSwizzle(true);
+ Id lvalue = collapseAccessChain();
+
+ // If swizzle exists, it is out-of-order or not full, we must load the target vector,
+ // extract and insert elements to perform writeMask and/or swizzle. This does not
+ // go with getting a direct l-value pointer.
+ assert(accessChain.swizzle.size() == 0);
+ assert(accessChain.component == NoResult);
+
+ return lvalue;
+}
+
+// comment in header
+Id Builder::accessChainGetInferredType()
+{
+ // anything to operate on?
+ if (accessChain.base == NoResult)
+ return NoType;
+ Id type = getTypeId(accessChain.base);
+
+ // do initial dereference
+ if (! accessChain.isRValue)
+ type = getContainedTypeId(type);
+
+ // dereference each index
+ for (auto it = accessChain.indexChain.cbegin(); it != accessChain.indexChain.cend(); ++it) {
+ if (isStructType(type))
+ type = getContainedTypeId(type, getConstantScalar(*it));
+ else
+ type = getContainedTypeId(type);
+ }
+
+ // dereference swizzle
+ if (accessChain.swizzle.size() == 1)
+ type = getContainedTypeId(type);
+ else if (accessChain.swizzle.size() > 1)
+ type = makeVectorType(getContainedTypeId(type), (int)accessChain.swizzle.size());
+
+ // dereference component selection
+ if (accessChain.component)
+ type = getContainedTypeId(type);
+
+ return type;
+}
+
+// comment in header
+void Builder::eliminateDeadDecorations() {
+ std::unordered_set<const Block*> reachable_blocks;
+ std::unordered_set<Id> unreachable_definitions;
+ // Collect IDs defined in unreachable blocks. For each function, label the
+ // reachable blocks first. Then for each unreachable block, collect the
+ // result IDs of the instructions in it.
+ for (std::vector<Function*>::const_iterator fi = module.getFunctions().cbegin();
+ fi != module.getFunctions().cend(); fi++) {
+ Function* f = *fi;
+ Block* entry = f->getEntryBlock();
+ inReadableOrder(entry, [&reachable_blocks](const Block* b) {
+ reachable_blocks.insert(b);
+ });
+ for (std::vector<Block*>::const_iterator bi = f->getBlocks().cbegin();
+ bi != f->getBlocks().cend(); bi++) {
+ Block* b = *bi;
+ if (!reachable_blocks.count(b)) {
+ for (std::vector<std::unique_ptr<Instruction> >::const_iterator
+ ii = b->getInstructions().cbegin();
+ ii != b->getInstructions().cend(); ii++) {
+ Instruction* i = ii->get();
+ unreachable_definitions.insert(i->getResultId());
+ }
+ }
+ }
+ }
+ decorations.erase(std::remove_if(decorations.begin(), decorations.end(),
+ [&unreachable_definitions](std::unique_ptr<Instruction>& I) -> bool {
+ Instruction* inst = I.get();
+ Id decoration_id = inst->getIdOperand(0);
+ return unreachable_definitions.count(decoration_id) != 0;
+ }),
+ decorations.end());
+}
+
+void Builder::dump(std::vector<unsigned int>& out) const
+{
+ // Header, before first instructions:
+ out.push_back(MagicNumber);
+ out.push_back(Version);
+ out.push_back(builderNumber);
+ out.push_back(uniqueId + 1);
+ out.push_back(0);
+
+ // Capabilities
+ for (auto it = capabilities.cbegin(); it != capabilities.cend(); ++it) {
+ Instruction capInst(0, 0, OpCapability);
+ capInst.addImmediateOperand(*it);
+ capInst.dump(out);
+ }
+
+ // TBD: OpExtension ...
+
+ dumpInstructions(out, imports);
+ Instruction memInst(0, 0, OpMemoryModel);
+ memInst.addImmediateOperand(addressModel);
+ memInst.addImmediateOperand(memoryModel);
+ memInst.dump(out);
+
+ // Instructions saved up while building:
+ dumpInstructions(out, entryPoints);
+ dumpInstructions(out, executionModes);
+
+ // Debug instructions
+ if (source != SourceLanguageUnknown) {
+ Instruction sourceInst(0, 0, OpSource);
+ sourceInst.addImmediateOperand(source);
+ sourceInst.addImmediateOperand(sourceVersion);
+ sourceInst.dump(out);
+ }
+ for (int e = 0; e < (int)extensions.size(); ++e) {
+ Instruction extInst(0, 0, OpSourceExtension);
+ extInst.addStringOperand(extensions[e]);
+ extInst.dump(out);
+ }
+ dumpInstructions(out, names);
+ dumpInstructions(out, lines);
+
+ // Annotation instructions
+ dumpInstructions(out, decorations);
+
+ dumpInstructions(out, constantsTypesGlobals);
+ dumpInstructions(out, externals);
+
+ // The functions
+ module.dump(out);
+}
+
+//
+// Protected methods.
+//
+
+// Turn the described access chain in 'accessChain' into an instruction
+// computing its address. This *cannot* include complex swizzles, which must
+// be handled after this is called, but it does include swizzles that select
+// an individual element, as a single address of a scalar type can be
+// computed by an OpAccessChain instruction.
+Id Builder::collapseAccessChain()
+{
+ assert(accessChain.isRValue == false);
+
+ if (accessChain.indexChain.size() > 0) {
+ if (accessChain.instr == 0) {
+ StorageClass storageClass = (StorageClass)module.getStorageClass(getTypeId(accessChain.base));
+ accessChain.instr = createAccessChain(storageClass, accessChain.base, accessChain.indexChain);
+ }
+
+ return accessChain.instr;
+ } else
+ return accessChain.base;
+
+ // note that non-trivial swizzling is left pending...
+}
+
+// clear out swizzle if it is redundant, that is reselecting the same components
+// that would be present without the swizzle.
+void Builder::simplifyAccessChainSwizzle()
+{
+ // If the swizzle has fewer components than the vector, it is subsetting, and must stay
+ // to preserve that fact.
+ if (getNumTypeComponents(accessChain.preSwizzleBaseType) > (int)accessChain.swizzle.size())
+ return;
+
+ // if components are out of order, it is a swizzle
+ for (unsigned int i = 0; i < accessChain.swizzle.size(); ++i) {
+ if (i != accessChain.swizzle[i])
+ return;
+ }
+
+ // otherwise, there is no need to track this swizzle
+ accessChain.swizzle.clear();
+ if (accessChain.component == NoResult)
+ accessChain.preSwizzleBaseType = NoType;
+}
+
+// To the extent any swizzling can become part of the chain
+// of accesses instead of a post operation, make it so.
+// If 'dynamic' is true, include transferring a non-static component index,
+// otherwise, only transfer static indexes.
+//
+// Also, Boolean vectors are likely to be special. While
+// for external storage, they should only be integer types,
+// function-local bool vectors could use sub-word indexing,
+// so keep that as a separate Insert/Extract on a loaded vector.
+void Builder::transferAccessChainSwizzle(bool dynamic)
+{
+ // too complex?
+ if (accessChain.swizzle.size() > 1)
+ return;
+
+ // non existent?
+ if (accessChain.swizzle.size() == 0 && accessChain.component == NoResult)
+ return;
+
+ // single component...
+
+ // skip doing it for Boolean vectors
+ if (isBoolType(getContainedTypeId(accessChain.preSwizzleBaseType)))
+ return;
+
+ if (accessChain.swizzle.size() == 1) {
+ // handle static component
+ accessChain.indexChain.push_back(makeUintConstant(accessChain.swizzle.front()));
+ accessChain.swizzle.clear();
+ // note, the only valid remaining dynamic access would be to this one
+ // component, so don't bother even looking at accessChain.component
+ accessChain.preSwizzleBaseType = NoType;
+ accessChain.component = NoResult;
+ } else if (dynamic && accessChain.component != NoResult) {
+ // handle dynamic component
+ accessChain.indexChain.push_back(accessChain.component);
+ accessChain.preSwizzleBaseType = NoType;
+ accessChain.component = NoResult;
+ }
+}
+
+// Utility method for creating a new block and setting the insert point to
+// be in it. This is useful for flow-control operations that need a "dummy"
+// block proceeding them (e.g. instructions after a discard, etc).
+void Builder::createAndSetNoPredecessorBlock(const char* /*name*/)
+{
+ Block* block = new Block(getUniqueId(), buildPoint->getParent());
+ block->setUnreachable();
+ buildPoint->getParent().addBlock(block);
+ setBuildPoint(block);
+
+ //if (name)
+ // addName(block->getId(), name);
+}
+
+// Comments in header
+void Builder::createBranch(Block* block)
+{
+ Instruction* branch = new Instruction(OpBranch);
+ branch->addIdOperand(block->getId());
+ buildPoint->addInstruction(std::unique_ptr<Instruction>(branch));
+ block->addPredecessor(buildPoint);
+}
+
+void Builder::createSelectionMerge(Block* mergeBlock, unsigned int control)
+{
+ Instruction* merge = new Instruction(OpSelectionMerge);
+ merge->addIdOperand(mergeBlock->getId());
+ merge->addImmediateOperand(control);
+ buildPoint->addInstruction(std::unique_ptr<Instruction>(merge));
+}
+
+void Builder::createLoopMerge(Block* mergeBlock, Block* continueBlock, unsigned int control)
+{
+ Instruction* merge = new Instruction(OpLoopMerge);
+ merge->addIdOperand(mergeBlock->getId());
+ merge->addIdOperand(continueBlock->getId());
+ merge->addImmediateOperand(control);
+ buildPoint->addInstruction(std::unique_ptr<Instruction>(merge));
+}
+
+void Builder::createConditionalBranch(Id condition, Block* thenBlock, Block* elseBlock)
+{
+ Instruction* branch = new Instruction(OpBranchConditional);
+ branch->addIdOperand(condition);
+ branch->addIdOperand(thenBlock->getId());
+ branch->addIdOperand(elseBlock->getId());
+ buildPoint->addInstruction(std::unique_ptr<Instruction>(branch));
+ thenBlock->addPredecessor(buildPoint);
+ elseBlock->addPredecessor(buildPoint);
+}
+
+void Builder::dumpInstructions(std::vector<unsigned int>& out, const std::vector<std::unique_ptr<Instruction> >& instructions) const
+{
+ for (int i = 0; i < (int)instructions.size(); ++i) {
+ instructions[i]->dump(out);
+ }
+}
+
+}; // end spv namespace
diff --git a/chromium/third_party/glslang/src/SPIRV/SpvBuilder.h b/chromium/third_party/glslang/src/SPIRV/SpvBuilder.h
new file mode 100755
index 00000000000..01cd60381fc
--- /dev/null
+++ b/chromium/third_party/glslang/src/SPIRV/SpvBuilder.h
@@ -0,0 +1,588 @@
+//
+//Copyright (C) 2014-2015 LunarG, Inc.
+//Copyright (C) 2015-2016 Google, 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:
+//
+// Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 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.
+//
+// Neither the name of 3Dlabs Inc. Ltd. nor the names of its
+// contributors may be used to endorse or promote products derived
+// from this software without specific prior written permission.
+//
+//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+//"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 THE
+//COPYRIGHT HOLDERS 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.
+
+//
+// "Builder" is an interface to fully build SPIR-V IR. Allocate one of
+// these to build (a thread safe) internal SPIR-V representation (IR),
+// and then dump it as a binary stream according to the SPIR-V specification.
+//
+// A Builder has a 1:1 relationship with a SPIR-V module.
+//
+
+#pragma once
+#ifndef SpvBuilder_H
+#define SpvBuilder_H
+
+#include "Logger.h"
+#include "spirv.hpp"
+#include "spvIR.h"
+
+#include <algorithm>
+#include <map>
+#include <memory>
+#include <set>
+#include <sstream>
+#include <stack>
+
+namespace spv {
+
+class Builder {
+public:
+ Builder(unsigned int userNumber, SpvBuildLogger* logger);
+ virtual ~Builder();
+
+ static const int maxMatrixSize = 4;
+
+ void setSource(spv::SourceLanguage lang, int version)
+ {
+ source = lang;
+ sourceVersion = version;
+ }
+ void addSourceExtension(const char* ext) { extensions.push_back(ext); }
+ Id import(const char*);
+ void setMemoryModel(spv::AddressingModel addr, spv::MemoryModel mem)
+ {
+ addressModel = addr;
+ memoryModel = mem;
+ }
+
+ void addCapability(spv::Capability cap) { capabilities.insert(cap); }
+
+ // To get a new <id> for anything needing a new one.
+ Id getUniqueId() { return ++uniqueId; }
+
+ // To get a set of new <id>s, e.g., for a set of function parameters
+ Id getUniqueIds(int numIds)
+ {
+ Id id = uniqueId + 1;
+ uniqueId += numIds;
+ return id;
+ }
+
+ // For creating new types (will return old type if the requested one was already made).
+ Id makeVoidType();
+ Id makeBoolType();
+ Id makePointer(StorageClass, Id type);
+ Id makeIntegerType(int width, bool hasSign); // generic
+ Id makeIntType(int width) { return makeIntegerType(width, true); }
+ Id makeUintType(int width) { return makeIntegerType(width, false); }
+ Id makeFloatType(int width);
+ Id makeStructType(const std::vector<Id>& members, const char*);
+ Id makeStructResultType(Id type0, Id type1);
+ Id makeVectorType(Id component, int size);
+ Id makeMatrixType(Id component, int cols, int rows);
+ Id makeArrayType(Id element, Id sizeId, int stride); // 0 stride means no stride decoration
+ Id makeRuntimeArray(Id element);
+ Id makeFunctionType(Id returnType, const std::vector<Id>& paramTypes);
+ Id makeImageType(Id sampledType, Dim, bool depth, bool arrayed, bool ms, unsigned sampled, ImageFormat format);
+ Id makeSamplerType();
+ Id makeSampledImageType(Id imageType);
+
+ // For querying about types.
+ Id getTypeId(Id resultId) const { return module.getTypeId(resultId); }
+ Id getDerefTypeId(Id resultId) const;
+ Op getOpCode(Id id) const { return module.getInstruction(id)->getOpCode(); }
+ Op getTypeClass(Id typeId) const { return getOpCode(typeId); }
+ Op getMostBasicTypeClass(Id typeId) const;
+ int getNumComponents(Id resultId) const { return getNumTypeComponents(getTypeId(resultId)); }
+ int getNumTypeConstituents(Id typeId) const;
+ int getNumTypeComponents(Id typeId) const { return getNumTypeConstituents(typeId); }
+ Id getScalarTypeId(Id typeId) const;
+ Id getContainedTypeId(Id typeId) const;
+ Id getContainedTypeId(Id typeId, int) const;
+ StorageClass getTypeStorageClass(Id typeId) const { return module.getStorageClass(typeId); }
+ ImageFormat getImageTypeFormat(Id typeId) const { return (ImageFormat)module.getInstruction(typeId)->getImmediateOperand(6); }
+
+ bool isPointer(Id resultId) const { return isPointerType(getTypeId(resultId)); }
+ bool isScalar(Id resultId) const { return isScalarType(getTypeId(resultId)); }
+ bool isVector(Id resultId) const { return isVectorType(getTypeId(resultId)); }
+ bool isMatrix(Id resultId) const { return isMatrixType(getTypeId(resultId)); }
+ bool isAggregate(Id resultId) const { return isAggregateType(getTypeId(resultId)); }
+ bool isSampledImage(Id resultId) const { return isSampledImageType(getTypeId(resultId)); }
+
+ bool isBoolType(Id typeId) const { return groupedTypes[OpTypeBool].size() > 0 && typeId == groupedTypes[OpTypeBool].back()->getResultId(); }
+ bool isPointerType(Id typeId) const { return getTypeClass(typeId) == OpTypePointer; }
+ bool isScalarType(Id typeId) const { return getTypeClass(typeId) == OpTypeFloat || getTypeClass(typeId) == OpTypeInt || getTypeClass(typeId) == OpTypeBool; }
+ bool isVectorType(Id typeId) const { return getTypeClass(typeId) == OpTypeVector; }
+ bool isMatrixType(Id typeId) const { return getTypeClass(typeId) == OpTypeMatrix; }
+ bool isStructType(Id typeId) const { return getTypeClass(typeId) == OpTypeStruct; }
+ bool isArrayType(Id typeId) const { return getTypeClass(typeId) == OpTypeArray; }
+ bool isAggregateType(Id typeId) const { return isArrayType(typeId) || isStructType(typeId); }
+ bool isImageType(Id typeId) const { return getTypeClass(typeId) == OpTypeImage; }
+ bool isSamplerType(Id typeId) const { return getTypeClass(typeId) == OpTypeSampler; }
+ bool isSampledImageType(Id typeId) const { return getTypeClass(typeId) == OpTypeSampledImage; }
+
+ bool isConstantOpCode(Op opcode) const;
+ bool isSpecConstantOpCode(Op opcode) const;
+ bool isConstant(Id resultId) const { return isConstantOpCode(getOpCode(resultId)); }
+ bool isConstantScalar(Id resultId) const { return getOpCode(resultId) == OpConstant; }
+ bool isSpecConstant(Id resultId) const { return isSpecConstantOpCode(getOpCode(resultId)); }
+ unsigned int getConstantScalar(Id resultId) const { return module.getInstruction(resultId)->getImmediateOperand(0); }
+ StorageClass getStorageClass(Id resultId) const { return getTypeStorageClass(getTypeId(resultId)); }
+
+ int getTypeNumColumns(Id typeId) const
+ {
+ assert(isMatrixType(typeId));
+ return getNumTypeConstituents(typeId);
+ }
+ int getNumColumns(Id resultId) const { return getTypeNumColumns(getTypeId(resultId)); }
+ int getTypeNumRows(Id typeId) const
+ {
+ assert(isMatrixType(typeId));
+ return getNumTypeComponents(getContainedTypeId(typeId));
+ }
+ int getNumRows(Id resultId) const { return getTypeNumRows(getTypeId(resultId)); }
+
+ Dim getTypeDimensionality(Id typeId) const
+ {
+ assert(isImageType(typeId));
+ return (Dim)module.getInstruction(typeId)->getImmediateOperand(1);
+ }
+ Id getImageType(Id resultId) const
+ {
+ Id typeId = getTypeId(resultId);
+ assert(isImageType(typeId) || isSampledImageType(typeId));
+ return isSampledImageType(typeId) ? module.getInstruction(typeId)->getIdOperand(0) : typeId;
+ }
+ bool isArrayedImageType(Id typeId) const
+ {
+ assert(isImageType(typeId));
+ return module.getInstruction(typeId)->getImmediateOperand(3) != 0;
+ }
+
+ // For making new constants (will return old constant if the requested one was already made).
+ Id makeBoolConstant(bool b, bool specConstant = false);
+ Id makeIntConstant(int i, bool specConstant = false) { return makeIntConstant(makeIntType(32), (unsigned)i, specConstant); }
+ Id makeUintConstant(unsigned u, bool specConstant = false) { return makeIntConstant(makeUintType(32), u, specConstant); }
+ Id makeInt64Constant(long long i, bool specConstant = false) { return makeInt64Constant(makeIntType(64), (unsigned long long)i, specConstant); }
+ Id makeUint64Constant(unsigned long long u, bool specConstant = false) { return makeInt64Constant(makeUintType(64), u, specConstant); }
+ Id makeFloatConstant(float f, bool specConstant = false);
+ Id makeDoubleConstant(double d, bool specConstant = false);
+
+ // Turn the array of constants into a proper spv constant of the requested type.
+ Id makeCompositeConstant(Id type, std::vector<Id>& comps, bool specConst = false);
+
+ // Methods for adding information outside the CFG.
+ Instruction* addEntryPoint(ExecutionModel, Function*, const char* name);
+ void addExecutionMode(Function*, ExecutionMode mode, int value1 = -1, int value2 = -1, int value3 = -1);
+ void addName(Id, const char* name);
+ void addMemberName(Id, int member, const char* name);
+ void addLine(Id target, Id fileName, int line, int column);
+ void addDecoration(Id, Decoration, int num = -1);
+ void addMemberDecoration(Id, unsigned int member, Decoration, int num = -1);
+
+ // At the end of what block do the next create*() instructions go?
+ void setBuildPoint(Block* bp) { buildPoint = bp; }
+ Block* getBuildPoint() const { return buildPoint; }
+
+ // Make the entry-point function. The returned pointer is only valid
+ // for the lifetime of this builder.
+ Function* makeEntrypoint(const char*);
+
+ // Make a shader-style function, and create its entry block if entry is non-zero.
+ // Return the function, pass back the entry.
+ // The returned pointer is only valid for the lifetime of this builder.
+ Function* makeFunctionEntry(Decoration precision, Id returnType, const char* name, const std::vector<Id>& paramTypes,
+ const std::vector<Decoration>& precisions, Block **entry = 0);
+
+ // Create a return. An 'implicit' return is one not appearing in the source
+ // code. In the case of an implicit return, no post-return block is inserted.
+ void makeReturn(bool implicit, Id retVal = 0);
+
+ // Generate all the code needed to finish up a function.
+ void leaveFunction();
+
+ // Create a discard.
+ void makeDiscard();
+
+ // Create a global or function local or IO variable.
+ Id createVariable(StorageClass, Id type, const char* name = 0);
+
+ // Create an intermediate with an undefined value.
+ Id createUndefined(Id type);
+
+ // Store into an Id and return the l-value
+ void createStore(Id rValue, Id lValue);
+
+ // Load from an Id and return it
+ Id createLoad(Id lValue);
+
+ // Create an OpAccessChain instruction
+ Id createAccessChain(StorageClass, Id base, std::vector<Id>& offsets);
+
+ // Create an OpArrayLength instruction
+ Id createArrayLength(Id base, unsigned int member);
+
+ // Create an OpCompositeExtract instruction
+ Id createCompositeExtract(Id composite, Id typeId, unsigned index);
+ Id createCompositeExtract(Id composite, Id typeId, std::vector<unsigned>& indexes);
+ Id createCompositeInsert(Id object, Id composite, Id typeId, unsigned index);
+ Id createCompositeInsert(Id object, Id composite, Id typeId, std::vector<unsigned>& indexes);
+
+ Id createVectorExtractDynamic(Id vector, Id typeId, Id componentIndex);
+ Id createVectorInsertDynamic(Id vector, Id typeId, Id component, Id componentIndex);
+
+ void createNoResultOp(Op);
+ void createNoResultOp(Op, Id operand);
+ void createNoResultOp(Op, const std::vector<Id>& operands);
+ void createControlBarrier(Scope execution, Scope memory, MemorySemanticsMask);
+ void createMemoryBarrier(unsigned executionScope, unsigned memorySemantics);
+ Id createUnaryOp(Op, Id typeId, Id operand);
+ Id createBinOp(Op, Id typeId, Id operand1, Id operand2);
+ Id createTriOp(Op, Id typeId, Id operand1, Id operand2, Id operand3);
+ Id createOp(Op, Id typeId, const std::vector<Id>& operands);
+ Id createFunctionCall(spv::Function*, std::vector<spv::Id>&);
+ Id createSpecConstantOp(Op, Id typeId, const std::vector<spv::Id>& operands, const std::vector<unsigned>& literals);
+
+ // Take an rvalue (source) and a set of channels to extract from it to
+ // make a new rvalue, which is returned.
+ Id createRvalueSwizzle(Decoration precision, Id typeId, Id source, std::vector<unsigned>& channels);
+
+ // Take a copy of an lvalue (target) and a source of components, and set the
+ // source components into the lvalue where the 'channels' say to put them.
+ // An updated version of the target is returned.
+ // (No true lvalue or stores are used.)
+ Id createLvalueSwizzle(Id typeId, Id target, Id source, std::vector<unsigned>& channels);
+
+ // If both the id and precision are valid, the id
+ // gets tagged with the requested precision.
+ // The passed in id is always the returned id, to simplify use patterns.
+ Id setPrecision(Id id, Decoration precision)
+ {
+ if (precision != NoPrecision && id != NoResult)
+ addDecoration(id, precision);
+
+ return id;
+ }
+
+ // Can smear a scalar to a vector for the following forms:
+ // - promoteScalar(scalar, vector) // smear scalar to width of vector
+ // - promoteScalar(vector, scalar) // smear scalar to width of vector
+ // - promoteScalar(pointer, scalar) // smear scalar to width of what pointer points to
+ // - promoteScalar(scalar, scalar) // do nothing
+ // Other forms are not allowed.
+ //
+ // Generally, the type of 'scalar' does not need to be the same type as the components in 'vector'.
+ // The type of the created vector is a vector of components of the same type as the scalar.
+ //
+ // Note: One of the arguments will change, with the result coming back that way rather than
+ // through the return value.
+ void promoteScalar(Decoration precision, Id& left, Id& right);
+
+ // Make a value by smearing the scalar to fill the type.
+ // vectorType should be the correct type for making a vector of scalarVal.
+ // (No conversions are done.)
+ Id smearScalar(Decoration precision, Id scalarVal, Id vectorType);
+
+ // Create a call to a built-in function.
+ Id createBuiltinCall(Id resultType, Id builtins, int entryPoint, std::vector<Id>& args);
+
+ // List of parameters used to create a texture operation
+ struct TextureParameters {
+ Id sampler;
+ Id coords;
+ Id bias;
+ Id lod;
+ Id Dref;
+ Id offset;
+ Id offsets;
+ Id gradX;
+ Id gradY;
+ Id sample;
+ Id comp;
+ Id texelOut;
+ Id lodClamp;
+ };
+
+ // Select the correct texture operation based on all inputs, and emit the correct instruction
+ Id createTextureCall(Decoration precision, Id resultType, bool sparse, bool fetch, bool proj, bool gather, bool noImplicit, const TextureParameters&);
+
+ // Emit the OpTextureQuery* instruction that was passed in.
+ // Figure out the right return value and type, and return it.
+ Id createTextureQueryCall(Op, const TextureParameters&);
+
+ Id createSamplePositionCall(Decoration precision, Id, Id);
+
+ Id createBitFieldExtractCall(Decoration precision, Id, Id, Id, bool isSigned);
+ Id createBitFieldInsertCall(Decoration precision, Id, Id, Id, Id);
+
+ // Reduction comparison for composites: For equal and not-equal resulting in a scalar.
+ Id createCompositeCompare(Decoration precision, Id, Id, bool /* true if for equal, false if for not-equal */);
+
+ // OpCompositeConstruct
+ Id createCompositeConstruct(Id typeId, std::vector<Id>& constituents);
+
+ // vector or scalar constructor
+ Id createConstructor(Decoration precision, const std::vector<Id>& sources, Id resultTypeId);
+
+ // matrix constructor
+ Id createMatrixConstructor(Decoration precision, const std::vector<Id>& sources, Id constructee);
+
+ // Helper to use for building nested control flow with if-then-else.
+ class If {
+ public:
+ If(Id condition, Builder& builder);
+ ~If() {}
+
+ void makeBeginElse();
+ void makeEndIf();
+
+ private:
+ If(const If&);
+ If& operator=(If&);
+
+ Builder& builder;
+ Id condition;
+ Function* function;
+ Block* headerBlock;
+ Block* thenBlock;
+ Block* elseBlock;
+ Block* mergeBlock;
+ };
+
+ // Make a switch statement. A switch has 'numSegments' of pieces of code, not containing
+ // any case/default labels, all separated by one or more case/default labels. Each possible
+ // case value v is a jump to the caseValues[v] segment. The defaultSegment is also in this
+ // number space. How to compute the value is given by 'condition', as in switch(condition).
+ //
+ // The SPIR-V Builder will maintain the stack of post-switch merge blocks for nested switches.
+ //
+ // Use a defaultSegment < 0 if there is no default segment (to branch to post switch).
+ //
+ // Returns the right set of basic blocks to start each code segment with, so that the caller's
+ // recursion stack can hold the memory for it.
+ //
+ void makeSwitch(Id condition, int numSegments, std::vector<int>& caseValues, std::vector<int>& valueToSegment, int defaultSegment,
+ std::vector<Block*>& segmentBB); // return argument
+
+ // Add a branch to the innermost switch's merge block.
+ void addSwitchBreak();
+
+ // Move to the next code segment, passing in the return argument in makeSwitch()
+ void nextSwitchSegment(std::vector<Block*>& segmentBB, int segment);
+
+ // Finish off the innermost switch.
+ void endSwitch(std::vector<Block*>& segmentBB);
+
+ struct LoopBlocks {
+ Block &head, &body, &merge, &continue_target;
+ };
+
+ // Start a new loop and prepare the builder to generate code for it. Until
+ // closeLoop() is called for this loop, createLoopContinue() and
+ // createLoopExit() will target its corresponding blocks.
+ LoopBlocks& makeNewLoop();
+
+ // Create a new block in the function containing the build point. Memory is
+ // owned by the function object.
+ Block& makeNewBlock();
+
+ // Add a branch to the continue_target of the current (innermost) loop.
+ void createLoopContinue();
+
+ // Add an exit (e.g. "break") from the innermost loop that we're currently
+ // in.
+ void createLoopExit();
+
+ // Close the innermost loop that you're in
+ void closeLoop();
+
+ //
+ // Access chain design for an R-Value vs. L-Value:
+ //
+ // There is a single access chain the builder is building at
+ // any particular time. Such a chain can be used to either to a load or
+ // a store, when desired.
+ //
+ // Expressions can be r-values, l-values, or both, or only r-values:
+ // a[b.c].d = .... // l-value
+ // ... = a[b.c].d; // r-value, that also looks like an l-value
+ // ++a[b.c].d; // r-value and l-value
+ // (x + y)[2]; // r-value only, can't possibly be l-value
+ //
+ // Computing an r-value means generating code. Hence,
+ // r-values should only be computed when they are needed, not speculatively.
+ //
+ // Computing an l-value means saving away information for later use in the compiler,
+ // no code is generated until the l-value is later dereferenced. It is okay
+ // to speculatively generate an l-value, just not okay to speculatively dereference it.
+ //
+ // The base of the access chain (the left-most variable or expression
+ // from which everything is based) can be set either as an l-value
+ // or as an r-value. Most efficient would be to set an l-value if one
+ // is available. If an expression was evaluated, the resulting r-value
+ // can be set as the chain base.
+ //
+ // The users of this single access chain can save and restore if they
+ // want to nest or manage multiple chains.
+ //
+
+ struct AccessChain {
+ Id base; // for l-values, pointer to the base object, for r-values, the base object
+ std::vector<Id> indexChain;
+ Id instr; // cache the instruction that generates this access chain
+ std::vector<unsigned> swizzle; // each std::vector element selects the next GLSL component number
+ Id component; // a dynamic component index, can coexist with a swizzle, done after the swizzle, NoResult if not present
+ Id preSwizzleBaseType; // dereferenced type, before swizzle or component is applied; NoType unless a swizzle or component is present
+ bool isRValue; // true if 'base' is an r-value, otherwise, base is an l-value
+ };
+
+ //
+ // the SPIR-V builder maintains a single active chain that
+ // the following methods operated on
+ //
+
+ // for external save and restore
+ AccessChain getAccessChain() { return accessChain; }
+ void setAccessChain(AccessChain newChain) { accessChain = newChain; }
+
+ // clear accessChain
+ void clearAccessChain();
+
+ // set new base as an l-value base
+ void setAccessChainLValue(Id lValue)
+ {
+ assert(isPointer(lValue));
+ accessChain.base = lValue;
+ }
+
+ // set new base value as an r-value
+ void setAccessChainRValue(Id rValue)
+ {
+ accessChain.isRValue = true;
+ accessChain.base = rValue;
+ }
+
+ // push offset onto the end of the chain
+ void accessChainPush(Id offset)
+ {
+ accessChain.indexChain.push_back(offset);
+ }
+
+ // push new swizzle onto the end of any existing swizzle, merging into a single swizzle
+ void accessChainPushSwizzle(std::vector<unsigned>& swizzle, Id preSwizzleBaseType);
+
+ // push a variable component selection onto the access chain; supporting only one, so unsided
+ void accessChainPushComponent(Id component, Id preSwizzleBaseType)
+ {
+ accessChain.component = component;
+ if (accessChain.preSwizzleBaseType == NoType)
+ accessChain.preSwizzleBaseType = preSwizzleBaseType;
+ }
+
+ // use accessChain and swizzle to store value
+ void accessChainStore(Id rvalue);
+
+ // use accessChain and swizzle to load an r-value
+ Id accessChainLoad(Decoration precision, Id ResultType);
+
+ // get the direct pointer for an l-value
+ Id accessChainGetLValue();
+
+ // Get the inferred SPIR-V type of the result of the current access chain,
+ // based on the type of the base and the chain of dereferences.
+ Id accessChainGetInferredType();
+
+ // Remove OpDecorate instructions whose operands are defined in unreachable
+ // blocks.
+ void eliminateDeadDecorations();
+ void dump(std::vector<unsigned int>&) const;
+
+ void createBranch(Block* block);
+ void createConditionalBranch(Id condition, Block* thenBlock, Block* elseBlock);
+ void createLoopMerge(Block* mergeBlock, Block* continueBlock, unsigned int control);
+
+ // Sets to generate opcode for specialization constants.
+ void setToSpecConstCodeGenMode() { generatingOpCodeForSpecConst = true; }
+ // Sets to generate opcode for non-specialization constants (normal mode).
+ void setToNormalCodeGenMode() { generatingOpCodeForSpecConst = false; }
+ // Check if the builder is generating code for spec constants.
+ bool isInSpecConstCodeGenMode() { return generatingOpCodeForSpecConst; }
+
+ protected:
+ Id makeIntConstant(Id typeId, unsigned value, bool specConstant);
+ Id makeInt64Constant(Id typeId, unsigned long long value, bool specConstant);
+ Id findScalarConstant(Op typeClass, Op opcode, Id typeId, unsigned value) const;
+ Id findScalarConstant(Op typeClass, Op opcode, Id typeId, unsigned v1, unsigned v2) const;
+ Id findCompositeConstant(Op typeClass, std::vector<Id>& comps) const;
+ Id collapseAccessChain();
+ void transferAccessChainSwizzle(bool dynamic);
+ void simplifyAccessChainSwizzle();
+ void createAndSetNoPredecessorBlock(const char*);
+ void createSelectionMerge(Block* mergeBlock, unsigned int control);
+ void dumpInstructions(std::vector<unsigned int>&, const std::vector<std::unique_ptr<Instruction> >&) const;
+
+ SourceLanguage source;
+ int sourceVersion;
+ std::vector<const char*> extensions;
+ AddressingModel addressModel;
+ MemoryModel memoryModel;
+ std::set<spv::Capability> capabilities;
+ int builderNumber;
+ Module module;
+ Block* buildPoint;
+ Id uniqueId;
+ Function* mainFunction;
+ bool generatingOpCodeForSpecConst;
+ AccessChain accessChain;
+
+ // special blocks of instructions for output
+ std::vector<std::unique_ptr<Instruction> > imports;
+ std::vector<std::unique_ptr<Instruction> > entryPoints;
+ std::vector<std::unique_ptr<Instruction> > executionModes;
+ std::vector<std::unique_ptr<Instruction> > names;
+ std::vector<std::unique_ptr<Instruction> > lines;
+ std::vector<std::unique_ptr<Instruction> > decorations;
+ std::vector<std::unique_ptr<Instruction> > constantsTypesGlobals;
+ std::vector<std::unique_ptr<Instruction> > externals;
+ std::vector<std::unique_ptr<Function> > functions;
+
+ // not output, internally used for quick & dirty canonical (unique) creation
+ std::vector<Instruction*> groupedConstants[OpConstant]; // all types appear before OpConstant
+ std::vector<Instruction*> groupedTypes[OpConstant];
+
+ // stack of switches
+ std::stack<Block*> switchMerges;
+
+ // Our loop stack.
+ std::stack<LoopBlocks> loops;
+
+ // The stream for outputing warnings and errors.
+ SpvBuildLogger* logger;
+}; // end Builder class
+
+}; // end spv namespace
+
+#endif // SpvBuilder_H
diff --git a/chromium/third_party/glslang/src/SPIRV/disassemble.cpp b/chromium/third_party/glslang/src/SPIRV/disassemble.cpp
new file mode 100644
index 00000000000..75688cb9a9a
--- /dev/null
+++ b/chromium/third_party/glslang/src/SPIRV/disassemble.cpp
@@ -0,0 +1,573 @@
+//
+//Copyright (C) 2014-2015 LunarG, 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:
+//
+// Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 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.
+//
+// Neither the name of 3Dlabs Inc. Ltd. nor the names of its
+// contributors may be used to endorse or promote products derived
+// from this software without specific prior written permission.
+//
+//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+//"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 THE
+//COPYRIGHT HOLDERS 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.
+
+//
+// Disassembler for SPIR-V.
+//
+
+#include <stdlib.h>
+#include <string.h>
+#include <assert.h>
+#include <iomanip>
+#include <stack>
+#include <sstream>
+#include <cstring>
+
+namespace spv {
+ // Include C-based headers that don't have a namespace
+ #include "GLSL.std.450.h"
+}
+const char* GlslStd450DebugNames[spv::GLSLstd450Count];
+
+#include "disassemble.h"
+#include "doc.h"
+
+namespace spv {
+
+static void Kill(std::ostream& out, const char* message)
+{
+ out << std::endl << "Disassembly failed: " << message << std::endl;
+ exit(1);
+}
+
+// used to identify the extended instruction library imported when printing
+enum ExtInstSet {
+ GLSL450Inst,
+ OpenCLExtInst,
+};
+
+// Container class for a single instance of a SPIR-V stream, with methods for disassembly.
+class SpirvStream {
+public:
+ SpirvStream(std::ostream& out, const std::vector<unsigned int>& stream) : out(out), stream(stream), word(0), nextNestedControl(0) { }
+ virtual ~SpirvStream() { }
+
+ void validate();
+ void processInstructions();
+
+protected:
+ SpirvStream(const SpirvStream&);
+ SpirvStream& operator=(const SpirvStream&);
+ Op getOpCode(int id) const { return idInstruction[id] ? (Op)(stream[idInstruction[id]] & OpCodeMask) : OpNop; }
+
+ // Output methods
+ void outputIndent();
+ void formatId(Id id, std::stringstream&);
+ void outputResultId(Id id);
+ void outputTypeId(Id id);
+ void outputId(Id id);
+ void outputMask(OperandClass operandClass, unsigned mask);
+ void disassembleImmediates(int numOperands);
+ void disassembleIds(int numOperands);
+ int disassembleString();
+ void disassembleInstruction(Id resultId, Id typeId, Op opCode, int numOperands);
+
+ // Data
+ std::ostream& out; // where to write the disassembly
+ const std::vector<unsigned int>& stream; // the actual word stream
+ int size; // the size of the word stream
+ int word; // the next word of the stream to read
+
+ // map each <id> to the instruction that created it
+ Id bound;
+ std::vector<unsigned int> idInstruction; // the word offset into the stream where the instruction for result [id] starts; 0 if not yet seen (forward reference or function parameter)
+
+ std::vector<std::string> idDescriptor; // the best text string known for explaining the <id>
+
+ // schema
+ unsigned int schema;
+
+ // stack of structured-merge points
+ std::stack<Id> nestedControl;
+ Id nextNestedControl; // need a slight delay for when we are nested
+};
+
+void SpirvStream::validate()
+{
+ size = (int)stream.size();
+ if (size < 4)
+ Kill(out, "stream is too short");
+
+ // Magic number
+ if (stream[word++] != MagicNumber) {
+ out << "Bad magic number";
+ return;
+ }
+
+ // Version
+ out << "// Module Version " << std::hex << stream[word++] << std::endl;
+
+ // Generator's magic number
+ out << "// Generated by (magic number): " << std::hex << stream[word++] << std::dec << std::endl;
+
+ // Result <id> bound
+ bound = stream[word++];
+ idInstruction.resize(bound);
+ idDescriptor.resize(bound);
+ out << "// Id's are bound by " << bound << std::endl;
+ out << std::endl;
+
+ // Reserved schema, must be 0 for now
+ schema = stream[word++];
+ if (schema != 0)
+ Kill(out, "bad schema, must be 0");
+}
+
+// Loop over all the instructions, in order, processing each.
+// Boiler plate for each is handled here directly, the rest is dispatched.
+void SpirvStream::processInstructions()
+{
+ // Instructions
+ while (word < size) {
+ int instructionStart = word;
+
+ // Instruction wordCount and opcode
+ unsigned int firstWord = stream[word];
+ unsigned wordCount = firstWord >> WordCountShift;
+ Op opCode = (Op)(firstWord & OpCodeMask);
+ int nextInst = word + wordCount;
+ ++word;
+
+ // Presence of full instruction
+ if (nextInst > size)
+ Kill(out, "stream instruction terminated too early");
+
+ // Base for computing number of operands; will be updated as more is learned
+ unsigned numOperands = wordCount - 1;
+
+ // Type <id>
+ Id typeId = 0;
+ if (InstructionDesc[opCode].hasType()) {
+ typeId = stream[word++];
+ --numOperands;
+ }
+
+ // Result <id>
+ Id resultId = 0;
+ if (InstructionDesc[opCode].hasResult()) {
+ resultId = stream[word++];
+ --numOperands;
+
+ // save instruction for future reference
+ idInstruction[resultId] = instructionStart;
+ }
+
+ outputResultId(resultId);
+ outputTypeId(typeId);
+ outputIndent();
+
+ // Hand off the Op and all its operands
+ disassembleInstruction(resultId, typeId, opCode, numOperands);
+ if (word != nextInst) {
+ out << " ERROR, incorrect number of operands consumed. At " << word << " instead of " << nextInst << " instruction start was " << instructionStart;
+ word = nextInst;
+ }
+ out << std::endl;
+ }
+}
+
+void SpirvStream::outputIndent()
+{
+ for (int i = 0; i < (int)nestedControl.size(); ++i)
+ out << " ";
+}
+
+void SpirvStream::formatId(Id id, std::stringstream& idStream)
+{
+ if (id >= bound)
+ Kill(out, "Bad <id>");
+
+ if (id != 0) {
+ idStream << id;
+ if (idDescriptor[id].size() > 0)
+ idStream << "(" << idDescriptor[id] << ")";
+ }
+}
+
+void SpirvStream::outputResultId(Id id)
+{
+ const int width = 16;
+ std::stringstream idStream;
+ formatId(id, idStream);
+ out << std::setw(width) << std::right << idStream.str();
+ if (id != 0)
+ out << ":";
+ else
+ out << " ";
+
+ if (nestedControl.size() && id == nestedControl.top())
+ nestedControl.pop();
+}
+
+void SpirvStream::outputTypeId(Id id)
+{
+ const int width = 12;
+ std::stringstream idStream;
+ formatId(id, idStream);
+ out << std::setw(width) << std::right << idStream.str() << " ";
+}
+
+void SpirvStream::outputId(Id id)
+{
+ if (id >= bound)
+ Kill(out, "Bad <id>");
+
+ out << id;
+ if (idDescriptor[id].size() > 0)
+ out << "(" << idDescriptor[id] << ")";
+}
+
+void SpirvStream::outputMask(OperandClass operandClass, unsigned mask)
+{
+ if (mask == 0)
+ out << "None";
+ else {
+ for (int m = 0; m < OperandClassParams[operandClass].ceiling; ++m) {
+ if (mask & (1 << m))
+ out << OperandClassParams[operandClass].getName(m) << " ";
+ }
+ }
+}
+
+void SpirvStream::disassembleImmediates(int numOperands)
+{
+ for (int i = 0; i < numOperands; ++i) {
+ out << stream[word++];
+ if (i < numOperands - 1)
+ out << " ";
+ }
+}
+
+void SpirvStream::disassembleIds(int numOperands)
+{
+ for (int i = 0; i < numOperands; ++i) {
+ outputId(stream[word++]);
+ if (i < numOperands - 1)
+ out << " ";
+ }
+}
+
+// return the number of operands consumed by the string
+int SpirvStream::disassembleString()
+{
+ int startWord = word;
+
+ out << " \"";
+
+ const char* wordString;
+ bool done = false;
+ do {
+ unsigned int content = stream[word];
+ wordString = (const char*)&content;
+ for (int charCount = 0; charCount < 4; ++charCount) {
+ if (*wordString == 0) {
+ done = true;
+ break;
+ }
+ out << *(wordString++);
+ }
+ ++word;
+ } while (! done);
+
+ out << "\"";
+
+ return word - startWord;
+}
+
+void SpirvStream::disassembleInstruction(Id resultId, Id /*typeId*/, Op opCode, int numOperands)
+{
+ // Process the opcode
+
+ out << (OpcodeString(opCode) + 2); // leave out the "Op"
+
+ if (opCode == OpLoopMerge || opCode == OpSelectionMerge)
+ nextNestedControl = stream[word];
+ else if (opCode == OpBranchConditional || opCode == OpSwitch) {
+ if (nextNestedControl) {
+ nestedControl.push(nextNestedControl);
+ nextNestedControl = 0;
+ }
+ } else if (opCode == OpExtInstImport) {
+ idDescriptor[resultId] = (const char*)(&stream[word]);
+ }
+ else {
+ if (idDescriptor[resultId].size() == 0) {
+ switch (opCode) {
+ case OpTypeInt:
+ idDescriptor[resultId] = "int";
+ break;
+ case OpTypeFloat:
+ idDescriptor[resultId] = "float";
+ break;
+ case OpTypeBool:
+ idDescriptor[resultId] = "bool";
+ break;
+ case OpTypeStruct:
+ idDescriptor[resultId] = "struct";
+ break;
+ case OpTypePointer:
+ idDescriptor[resultId] = "ptr";
+ break;
+ case OpTypeVector:
+ if (idDescriptor[stream[word]].size() > 0)
+ idDescriptor[resultId].append(idDescriptor[stream[word]].begin(), idDescriptor[stream[word]].begin() + 1);
+ idDescriptor[resultId].append("vec");
+ switch (stream[word + 1]) {
+ case 2: idDescriptor[resultId].append("2"); break;
+ case 3: idDescriptor[resultId].append("3"); break;
+ case 4: idDescriptor[resultId].append("4"); break;
+ case 8: idDescriptor[resultId].append("8"); break;
+ case 16: idDescriptor[resultId].append("16"); break;
+ case 32: idDescriptor[resultId].append("32"); break;
+ default: break;
+ }
+ break;
+ default:
+ break;
+ }
+ }
+ }
+
+ // Process the operands. Note, a new context-dependent set could be
+ // swapped in mid-traversal.
+
+ // Handle images specially, so can put out helpful strings.
+ if (opCode == OpTypeImage) {
+ out << " ";
+ disassembleIds(1);
+ out << " " << DimensionString((Dim)stream[word++]);
+ out << (stream[word++] != 0 ? " depth" : "");
+ out << (stream[word++] != 0 ? " array" : "");
+ out << (stream[word++] != 0 ? " multi-sampled" : "");
+ switch (stream[word++]) {
+ case 0: out << " runtime"; break;
+ case 1: out << " sampled"; break;
+ case 2: out << " nonsampled"; break;
+ }
+ out << " format:" << ImageFormatString((ImageFormat)stream[word++]);
+
+ if (numOperands == 8) {
+ out << " " << AccessQualifierString(stream[word++]);
+ }
+ return;
+ }
+
+ // Handle all the parameterized operands
+ for (int op = 0; op < InstructionDesc[opCode].operands.getNum() && numOperands > 0; ++op) {
+ out << " ";
+ OperandClass operandClass = InstructionDesc[opCode].operands.getClass(op);
+ switch (operandClass) {
+ case OperandId:
+ case OperandScope:
+ case OperandMemorySemantics:
+ disassembleIds(1);
+ --numOperands;
+ // Get names for printing "(XXX)" for readability, *after* this id
+ if (opCode == OpName)
+ idDescriptor[stream[word - 1]] = (const char*)(&stream[word]);
+ break;
+ case OperandVariableIds:
+ disassembleIds(numOperands);
+ return;
+ case OperandImageOperands:
+ outputMask(OperandImageOperands, stream[word++]);
+ --numOperands;
+ disassembleIds(numOperands);
+ return;
+ case OperandOptionalLiteral:
+ case OperandVariableLiterals:
+ if ((opCode == OpDecorate && stream[word - 1] == DecorationBuiltIn) ||
+ (opCode == OpMemberDecorate && stream[word - 1] == DecorationBuiltIn)) {
+ out << BuiltInString(stream[word++]);
+ --numOperands;
+ ++op;
+ }
+ disassembleImmediates(numOperands);
+ return;
+ case OperandVariableIdLiteral:
+ while (numOperands > 0) {
+ out << std::endl;
+ outputResultId(0);
+ outputTypeId(0);
+ outputIndent();
+ out << " Type ";
+ disassembleIds(1);
+ out << ", member ";
+ disassembleImmediates(1);
+ numOperands -= 2;
+ }
+ return;
+ case OperandVariableLiteralId:
+ while (numOperands > 0) {
+ out << std::endl;
+ outputResultId(0);
+ outputTypeId(0);
+ outputIndent();
+ out << " case ";
+ disassembleImmediates(1);
+ out << ": ";
+ disassembleIds(1);
+ numOperands -= 2;
+ }
+ return;
+ case OperandLiteralNumber:
+ disassembleImmediates(1);
+ --numOperands;
+ if (opCode == OpExtInst) {
+ ExtInstSet extInstSet = GLSL450Inst;
+ if (0 == memcmp("OpenCL", (const char*)(idDescriptor[stream[word-2]].c_str()), 6)) {
+ extInstSet = OpenCLExtInst;
+ }
+ unsigned entrypoint = stream[word - 1];
+ if (extInstSet == GLSL450Inst) {
+ if (entrypoint < GLSLstd450Count) {
+ out << "(" << GlslStd450DebugNames[entrypoint] << ")";
+ }
+ }
+ }
+ break;
+ case OperandOptionalLiteralString:
+ case OperandLiteralString:
+ numOperands -= disassembleString();
+ break;
+ default:
+ assert(operandClass >= OperandSource && operandClass < OperandOpcode);
+
+ if (OperandClassParams[operandClass].bitmask)
+ outputMask(operandClass, stream[word++]);
+ else
+ out << OperandClassParams[operandClass].getName(stream[word++]);
+ --numOperands;
+
+ break;
+ }
+ }
+
+ return;
+}
+
+static void GLSLstd450GetDebugNames(const char** names)
+{
+ for (int i = 0; i < GLSLstd450Count; ++i)
+ names[i] = "Unknown";
+
+ names[GLSLstd450Round] = "Round";
+ names[GLSLstd450RoundEven] = "RoundEven";
+ names[GLSLstd450Trunc] = "Trunc";
+ names[GLSLstd450FAbs] = "FAbs";
+ names[GLSLstd450SAbs] = "SAbs";
+ names[GLSLstd450FSign] = "FSign";
+ names[GLSLstd450SSign] = "SSign";
+ names[GLSLstd450Floor] = "Floor";
+ names[GLSLstd450Ceil] = "Ceil";
+ names[GLSLstd450Fract] = "Fract";
+ names[GLSLstd450Radians] = "Radians";
+ names[GLSLstd450Degrees] = "Degrees";
+ names[GLSLstd450Sin] = "Sin";
+ names[GLSLstd450Cos] = "Cos";
+ names[GLSLstd450Tan] = "Tan";
+ names[GLSLstd450Asin] = "Asin";
+ names[GLSLstd450Acos] = "Acos";
+ names[GLSLstd450Atan] = "Atan";
+ names[GLSLstd450Sinh] = "Sinh";
+ names[GLSLstd450Cosh] = "Cosh";
+ names[GLSLstd450Tanh] = "Tanh";
+ names[GLSLstd450Asinh] = "Asinh";
+ names[GLSLstd450Acosh] = "Acosh";
+ names[GLSLstd450Atanh] = "Atanh";
+ names[GLSLstd450Atan2] = "Atan2";
+ names[GLSLstd450Pow] = "Pow";
+ names[GLSLstd450Exp] = "Exp";
+ names[GLSLstd450Log] = "Log";
+ names[GLSLstd450Exp2] = "Exp2";
+ names[GLSLstd450Log2] = "Log2";
+ names[GLSLstd450Sqrt] = "Sqrt";
+ names[GLSLstd450InverseSqrt] = "InverseSqrt";
+ names[GLSLstd450Determinant] = "Determinant";
+ names[GLSLstd450MatrixInverse] = "MatrixInverse";
+ names[GLSLstd450Modf] = "Modf";
+ names[GLSLstd450ModfStruct] = "ModfStruct";
+ names[GLSLstd450FMin] = "FMin";
+ names[GLSLstd450SMin] = "SMin";
+ names[GLSLstd450UMin] = "UMin";
+ names[GLSLstd450FMax] = "FMax";
+ names[GLSLstd450SMax] = "SMax";
+ names[GLSLstd450UMax] = "UMax";
+ names[GLSLstd450FClamp] = "FClamp";
+ names[GLSLstd450SClamp] = "SClamp";
+ names[GLSLstd450UClamp] = "UClamp";
+ names[GLSLstd450FMix] = "FMix";
+ names[GLSLstd450Step] = "Step";
+ names[GLSLstd450SmoothStep] = "SmoothStep";
+ names[GLSLstd450Fma] = "Fma";
+ names[GLSLstd450Frexp] = "Frexp";
+ names[GLSLstd450FrexpStruct] = "FrexpStruct";
+ names[GLSLstd450Ldexp] = "Ldexp";
+ names[GLSLstd450PackSnorm4x8] = "PackSnorm4x8";
+ names[GLSLstd450PackUnorm4x8] = "PackUnorm4x8";
+ names[GLSLstd450PackSnorm2x16] = "PackSnorm2x16";
+ names[GLSLstd450PackUnorm2x16] = "PackUnorm2x16";
+ names[GLSLstd450PackHalf2x16] = "PackHalf2x16";
+ names[GLSLstd450PackDouble2x32] = "PackDouble2x32";
+ names[GLSLstd450UnpackSnorm2x16] = "UnpackSnorm2x16";
+ names[GLSLstd450UnpackUnorm2x16] = "UnpackUnorm2x16";
+ names[GLSLstd450UnpackHalf2x16] = "UnpackHalf2x16";
+ names[GLSLstd450UnpackSnorm4x8] = "UnpackSnorm4x8";
+ names[GLSLstd450UnpackUnorm4x8] = "UnpackUnorm4x8";
+ names[GLSLstd450UnpackDouble2x32] = "UnpackDouble2x32";
+ names[GLSLstd450Length] = "Length";
+ names[GLSLstd450Distance] = "Distance";
+ names[GLSLstd450Cross] = "Cross";
+ names[GLSLstd450Normalize] = "Normalize";
+ names[GLSLstd450FaceForward] = "FaceForward";
+ names[GLSLstd450Reflect] = "Reflect";
+ names[GLSLstd450Refract] = "Refract";
+ names[GLSLstd450FindILsb] = "FindILsb";
+ names[GLSLstd450FindSMsb] = "FindSMsb";
+ names[GLSLstd450FindUMsb] = "FindUMsb";
+ names[GLSLstd450InterpolateAtCentroid] = "InterpolateAtCentroid";
+ names[GLSLstd450InterpolateAtSample] = "InterpolateAtSample";
+ names[GLSLstd450InterpolateAtOffset] = "InterpolateAtOffset";
+}
+
+void Disassemble(std::ostream& out, const std::vector<unsigned int>& stream)
+{
+ SpirvStream SpirvStream(out, stream);
+ spv::Parameterize();
+ GLSLstd450GetDebugNames(GlslStd450DebugNames);
+ SpirvStream.validate();
+ SpirvStream.processInstructions();
+}
+
+}; // end namespace spv
diff --git a/chromium/third_party/glslang/src/SPIRV/disassemble.h b/chromium/third_party/glslang/src/SPIRV/disassemble.h
new file mode 100755
index 00000000000..f5d0bc23bed
--- /dev/null
+++ b/chromium/third_party/glslang/src/SPIRV/disassemble.h
@@ -0,0 +1,52 @@
+//
+//Copyright (C) 2014-2015 LunarG, 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:
+//
+// Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 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.
+//
+// Neither the name of 3Dlabs Inc. Ltd. nor the names of its
+// contributors may be used to endorse or promote products derived
+// from this software without specific prior written permission.
+//
+//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+//"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 THE
+//COPYRIGHT HOLDERS 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.
+
+//
+// Disassembler for SPIR-V.
+//
+
+#pragma once
+#ifndef disassembler_H
+#define disassembler_H
+
+#include <iostream>
+#include <vector>
+
+namespace spv {
+
+ void Disassemble(std::ostream& out, const std::vector<unsigned int>&);
+
+}; // end namespace spv
+
+#endif // disassembler_H
diff --git a/chromium/third_party/glslang/src/SPIRV/doc.cpp b/chromium/third_party/glslang/src/SPIRV/doc.cpp
new file mode 100755
index 00000000000..fed3ec42715
--- /dev/null
+++ b/chromium/third_party/glslang/src/SPIRV/doc.cpp
@@ -0,0 +1,2708 @@
+//
+//Copyright (C) 2014-2015 LunarG, 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:
+//
+// Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 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.
+//
+// Neither the name of 3Dlabs Inc. Ltd. nor the names of its
+// contributors may be used to endorse or promote products derived
+// from this software without specific prior written permission.
+//
+//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+//"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 THE
+//COPYRIGHT HOLDERS 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.
+
+//
+// 1) Programatically fill in instruction/operand information.
+// This can be used for disassembly, printing documentation, etc.
+//
+// 2) Print documentation from this parameterization.
+//
+
+#include "doc.h"
+
+#include <stdio.h>
+#include <string.h>
+#include <algorithm>
+
+namespace spv {
+
+//
+// Whole set of functions that translate enumerants to their text strings for
+// the specification (or their sanitized versions for auto-generating the
+// spirv headers.
+//
+// Also, the ceilings are declared next to these, to help keep them in sync.
+// Ceilings should be
+// - one more than the maximum value an enumerant takes on, for non-mask enumerants
+// (for non-sparse enums, this is the number of enumurants)
+// - the number of bits consumed by the set of masks
+// (for non-sparse mask enums, this is the number of enumurants)
+//
+
+const int SourceLanguageCeiling = 6; // HLSL todo: need official enumerant
+
+const char* SourceString(int source)
+{
+ switch (source) {
+ case 0: return "Unknown";
+ case 1: return "ESSL";
+ case 2: return "GLSL";
+ case 3: return "OpenCL_C";
+ case 4: return "OpenCL_CPP";
+ case 5: return "HLSL";
+
+ case SourceLanguageCeiling:
+ default: return "Bad";
+ }
+}
+
+const int ExecutionModelCeiling = 7;
+
+const char* ExecutionModelString(int model)
+{
+ switch (model) {
+ case 0: return "Vertex";
+ case 1: return "TessellationControl";
+ case 2: return "TessellationEvaluation";
+ case 3: return "Geometry";
+ case 4: return "Fragment";
+ case 5: return "GLCompute";
+ case 6: return "Kernel";
+
+ case ExecutionModelCeiling:
+ default: return "Bad";
+ }
+}
+
+const int AddressingModelCeiling = 3;
+
+const char* AddressingString(int addr)
+{
+ switch (addr) {
+ case 0: return "Logical";
+ case 1: return "Physical32";
+ case 2: return "Physical64";
+
+ case AddressingModelCeiling:
+ default: return "Bad";
+ }
+}
+
+const int MemoryModelCeiling = 3;
+
+const char* MemoryString(int mem)
+{
+ switch (mem) {
+ case 0: return "Simple";
+ case 1: return "GLSL450";
+ case 2: return "OpenCL";
+
+ case MemoryModelCeiling:
+ default: return "Bad";
+ }
+}
+
+const int ExecutionModeCeiling = 33;
+
+const char* ExecutionModeString(int mode)
+{
+ switch (mode) {
+ case 0: return "Invocations";
+ case 1: return "SpacingEqual";
+ case 2: return "SpacingFractionalEven";
+ case 3: return "SpacingFractionalOdd";
+ case 4: return "VertexOrderCw";
+ case 5: return "VertexOrderCcw";
+ case 6: return "PixelCenterInteger";
+ case 7: return "OriginUpperLeft";
+ case 8: return "OriginLowerLeft";
+ case 9: return "EarlyFragmentTests";
+ case 10: return "PointMode";
+ case 11: return "Xfb";
+ case 12: return "DepthReplacing";
+ case 13: return "Bad";
+ case 14: return "DepthGreater";
+ case 15: return "DepthLess";
+ case 16: return "DepthUnchanged";
+ case 17: return "LocalSize";
+ case 18: return "LocalSizeHint";
+ case 19: return "InputPoints";
+ case 20: return "InputLines";
+ case 21: return "InputLinesAdjacency";
+ case 22: return "Triangles";
+ case 23: return "InputTrianglesAdjacency";
+ case 24: return "Quads";
+ case 25: return "Isolines";
+ case 26: return "OutputVertices";
+ case 27: return "OutputPoints";
+ case 28: return "OutputLineStrip";
+ case 29: return "OutputTriangleStrip";
+ case 30: return "VecTypeHint";
+ case 31: return "ContractionOff";
+ case 32: return "Bad";
+
+ case ExecutionModeCeiling:
+ default: return "Bad";
+ }
+}
+
+const int StorageClassCeiling = 12;
+
+const char* StorageClassString(int StorageClass)
+{
+ switch (StorageClass) {
+ case 0: return "UniformConstant";
+ case 1: return "Input";
+ case 2: return "Uniform";
+ case 3: return "Output";
+ case 4: return "Workgroup";
+ case 5: return "CrossWorkgroup";
+ case 6: return "Private";
+ case 7: return "Function";
+ case 8: return "Generic";
+ case 9: return "PushConstant";
+ case 10: return "AtomicCounter";
+ case 11: return "Image";
+
+ case StorageClassCeiling:
+ default: return "Bad";
+ }
+}
+
+const int DecorationCeiling = 45;
+
+const char* DecorationString(int decoration)
+{
+ switch (decoration) {
+ case 0: return "RelaxedPrecision";
+ case 1: return "SpecId";
+ case 2: return "Block";
+ case 3: return "BufferBlock";
+ case 4: return "RowMajor";
+ case 5: return "ColMajor";
+ case 6: return "ArrayStride";
+ case 7: return "MatrixStride";
+ case 8: return "GLSLShared";
+ case 9: return "GLSLPacked";
+ case 10: return "CPacked";
+ case 11: return "BuiltIn";
+ case 12: return "Bad";
+ case 13: return "NoPerspective";
+ case 14: return "Flat";
+ case 15: return "Patch";
+ case 16: return "Centroid";
+ case 17: return "Sample";
+ case 18: return "Invariant";
+ case 19: return "Restrict";
+ case 20: return "Aliased";
+ case 21: return "Volatile";
+ case 22: return "Constant";
+ case 23: return "Coherent";
+ case 24: return "NonWritable";
+ case 25: return "NonReadable";
+ case 26: return "Uniform";
+ case 27: return "Bad";
+ case 28: return "SaturatedConversion";
+ case 29: return "Stream";
+ case 30: return "Location";
+ case 31: return "Component";
+ case 32: return "Index";
+ case 33: return "Binding";
+ case 34: return "DescriptorSet";
+ case 35: return "Offset";
+ case 36: return "XfbBuffer";
+ case 37: return "XfbStride";
+ case 38: return "FuncParamAttr";
+ case 39: return "FP Rounding Mode";
+ case 40: return "FP Fast Math Mode";
+ case 41: return "Linkage Attributes";
+ case 42: return "NoContraction";
+ case 43: return "InputAttachmentIndex";
+ case 44: return "Alignment";
+
+ case DecorationCeiling:
+ default: return "Bad";
+ }
+}
+
+const int BuiltInCeiling = 44;
+
+const char* BuiltInString(int builtIn)
+{
+ switch (builtIn) {
+ case 0: return "Position";
+ case 1: return "PointSize";
+ case 2: return "Bad";
+ case 3: return "ClipDistance";
+ case 4: return "CullDistance";
+ case 5: return "VertexId";
+ case 6: return "InstanceId";
+ case 7: return "PrimitiveId";
+ case 8: return "InvocationId";
+ case 9: return "Layer";
+ case 10: return "ViewportIndex";
+ case 11: return "TessLevelOuter";
+ case 12: return "TessLevelInner";
+ case 13: return "TessCoord";
+ case 14: return "PatchVertices";
+ case 15: return "FragCoord";
+ case 16: return "PointCoord";
+ case 17: return "FrontFacing";
+ case 18: return "SampleId";
+ case 19: return "SamplePosition";
+ case 20: return "SampleMask";
+ case 21: return "Bad";
+ case 22: return "FragDepth";
+ case 23: return "HelperInvocation";
+ case 24: return "NumWorkgroups";
+ case 25: return "WorkgroupSize";
+ case 26: return "WorkgroupId";
+ case 27: return "LocalInvocationId";
+ case 28: return "GlobalInvocationId";
+ case 29: return "LocalInvocationIndex";
+ case 30: return "WorkDim";
+ case 31: return "GlobalSize";
+ case 32: return "EnqueuedWorkgroupSize";
+ case 33: return "GlobalOffset";
+ case 34: return "GlobalLinearId";
+ case 35: return "Bad";
+ case 36: return "SubgroupSize";
+ case 37: return "SubgroupMaxSize";
+ case 38: return "NumSubgroups";
+ case 39: return "NumEnqueuedSubgroups";
+ case 40: return "SubgroupId";
+ case 41: return "SubgroupLocalInvocationId";
+ case 42: return "VertexIndex"; // TBD: put next to VertexId?
+ case 43: return "InstanceIndex"; // TBD: put next to InstanceId?
+
+ case BuiltInCeiling:
+ default: return "Bad";
+ }
+}
+
+const int DimensionCeiling = 7;
+
+const char* DimensionString(int dim)
+{
+ switch (dim) {
+ case 0: return "1D";
+ case 1: return "2D";
+ case 2: return "3D";
+ case 3: return "Cube";
+ case 4: return "Rect";
+ case 5: return "Buffer";
+ case 6: return "SubpassData";
+
+ case DimensionCeiling:
+ default: return "Bad";
+ }
+}
+
+const int SamplerAddressingModeCeiling = 5;
+
+const char* SamplerAddressingModeString(int mode)
+{
+ switch (mode) {
+ case 0: return "None";
+ case 1: return "ClampToEdge";
+ case 2: return "Clamp";
+ case 3: return "Repeat";
+ case 4: return "RepeatMirrored";
+
+ case SamplerAddressingModeCeiling:
+ default: return "Bad";
+ }
+}
+
+const int SamplerFilterModeCeiling = 2;
+
+const char* SamplerFilterModeString(int mode)
+{
+ switch (mode) {
+ case 0: return "Nearest";
+ case 1: return "Linear";
+
+ case SamplerFilterModeCeiling:
+ default: return "Bad";
+ }
+}
+
+const int ImageFormatCeiling = 40;
+
+const char* ImageFormatString(int format)
+{
+ switch (format) {
+ case 0: return "Unknown";
+
+ // ES/Desktop float
+ case 1: return "Rgba32f";
+ case 2: return "Rgba16f";
+ case 3: return "R32f";
+ case 4: return "Rgba8";
+ case 5: return "Rgba8Snorm";
+
+ // Desktop float
+ case 6: return "Rg32f";
+ case 7: return "Rg16f";
+ case 8: return "R11fG11fB10f";
+ case 9: return "R16f";
+ case 10: return "Rgba16";
+ case 11: return "Rgb10A2";
+ case 12: return "Rg16";
+ case 13: return "Rg8";
+ case 14: return "R16";
+ case 15: return "R8";
+ case 16: return "Rgba16Snorm";
+ case 17: return "Rg16Snorm";
+ case 18: return "Rg8Snorm";
+ case 19: return "R16Snorm";
+ case 20: return "R8Snorm";
+
+ // ES/Desktop int
+ case 21: return "Rgba32i";
+ case 22: return "Rgba16i";
+ case 23: return "Rgba8i";
+ case 24: return "R32i";
+
+ // Desktop int
+ case 25: return "Rg32i";
+ case 26: return "Rg16i";
+ case 27: return "Rg8i";
+ case 28: return "R16i";
+ case 29: return "R8i";
+
+ // ES/Desktop uint
+ case 30: return "Rgba32ui";
+ case 31: return "Rgba16ui";
+ case 32: return "Rgba8ui";
+ case 33: return "R32ui";
+
+ // Desktop uint
+ case 34: return "Rgb10a2ui";
+ case 35: return "Rg32ui";
+ case 36: return "Rg16ui";
+ case 37: return "Rg8ui";
+ case 38: return "R16ui";
+ case 39: return "R8ui";
+
+ case ImageFormatCeiling:
+ default:
+ return "Bad";
+ }
+}
+
+const int ImageChannelOrderCeiling = 19;
+
+const char* ImageChannelOrderString(int format)
+{
+ switch (format) {
+ case 0: return "R";
+ case 1: return "A";
+ case 2: return "RG";
+ case 3: return "RA";
+ case 4: return "RGB";
+ case 5: return "RGBA";
+ case 6: return "BGRA";
+ case 7: return "ARGB";
+ case 8: return "Intensity";
+ case 9: return "Luminance";
+ case 10: return "Rx";
+ case 11: return "RGx";
+ case 12: return "RGBx";
+ case 13: return "Depth";
+ case 14: return "DepthStencil";
+ case 15: return "sRGB";
+ case 16: return "sRGBx";
+ case 17: return "sRGBA";
+ case 18: return "sBGRA";
+
+ case ImageChannelOrderCeiling:
+ default:
+ return "Bad";
+ }
+}
+
+const int ImageChannelDataTypeCeiling = 17;
+
+const char* ImageChannelDataTypeString(int type)
+{
+ switch (type)
+ {
+ case 0: return "SnormInt8";
+ case 1: return "SnormInt16";
+ case 2: return "UnormInt8";
+ case 3: return "UnormInt16";
+ case 4: return "UnormShort565";
+ case 5: return "UnormShort555";
+ case 6: return "UnormInt101010";
+ case 7: return "SignedInt8";
+ case 8: return "SignedInt16";
+ case 9: return "SignedInt32";
+ case 10: return "UnsignedInt8";
+ case 11: return "UnsignedInt16";
+ case 12: return "UnsignedInt32";
+ case 13: return "HalfFloat";
+ case 14: return "Float";
+ case 15: return "UnormInt24";
+ case 16: return "UnormInt101010_2";
+
+ case ImageChannelDataTypeCeiling:
+ default:
+ return "Bad";
+ }
+}
+
+const int ImageOperandsCeiling = 8;
+
+const char* ImageOperandsString(int format)
+{
+ switch (format) {
+ case 0: return "Bias";
+ case 1: return "Lod";
+ case 2: return "Grad";
+ case 3: return "ConstOffset";
+ case 4: return "Offset";
+ case 5: return "ConstOffsets";
+ case 6: return "Sample";
+ case 7: return "MinLod";
+
+ case ImageOperandsCeiling:
+ default:
+ return "Bad";
+ }
+}
+
+const int FPFastMathCeiling = 5;
+
+const char* FPFastMathString(int mode)
+{
+ switch (mode) {
+ case 0: return "NotNaN";
+ case 1: return "NotInf";
+ case 2: return "NSZ";
+ case 3: return "AllowRecip";
+ case 4: return "Fast";
+
+ case FPFastMathCeiling:
+ default: return "Bad";
+ }
+}
+
+const int FPRoundingModeCeiling = 4;
+
+const char* FPRoundingModeString(int mode)
+{
+ switch (mode) {
+ case 0: return "RTE";
+ case 1: return "RTZ";
+ case 2: return "RTP";
+ case 3: return "RTN";
+
+ case FPRoundingModeCeiling:
+ default: return "Bad";
+ }
+}
+
+const int LinkageTypeCeiling = 2;
+
+const char* LinkageTypeString(int type)
+{
+ switch (type) {
+ case 0: return "Export";
+ case 1: return "Import";
+
+ case LinkageTypeCeiling:
+ default: return "Bad";
+ }
+}
+
+const int FuncParamAttrCeiling = 8;
+
+const char* FuncParamAttrString(int attr)
+{
+ switch (attr) {
+ case 0: return "Zext";
+ case 1: return "Sext";
+ case 2: return "ByVal";
+ case 3: return "Sret";
+ case 4: return "NoAlias";
+ case 5: return "NoCapture";
+ case 6: return "NoWrite";
+ case 7: return "NoReadWrite";
+
+ case FuncParamAttrCeiling:
+ default: return "Bad";
+ }
+}
+
+const int AccessQualifierCeiling = 3;
+
+const char* AccessQualifierString(int attr)
+{
+ switch (attr) {
+ case 0: return "ReadOnly";
+ case 1: return "WriteOnly";
+ case 2: return "ReadWrite";
+
+ case AccessQualifierCeiling:
+ default: return "Bad";
+ }
+}
+
+const int SelectControlCeiling = 2;
+
+const char* SelectControlString(int cont)
+{
+ switch (cont) {
+ case 0: return "Flatten";
+ case 1: return "DontFlatten";
+
+ case SelectControlCeiling:
+ default: return "Bad";
+ }
+}
+
+const int LoopControlCeiling = 2;
+
+const char* LoopControlString(int cont)
+{
+ switch (cont) {
+ case 0: return "Unroll";
+ case 1: return "DontUnroll";
+
+ case LoopControlCeiling:
+ default: return "Bad";
+ }
+}
+
+const int FunctionControlCeiling = 4;
+
+const char* FunctionControlString(int cont)
+{
+ switch (cont) {
+ case 0: return "Inline";
+ case 1: return "DontInline";
+ case 2: return "Pure";
+ case 3: return "Const";
+
+ case FunctionControlCeiling:
+ default: return "Bad";
+ }
+}
+
+const int MemorySemanticsCeiling = 12;
+
+const char* MemorySemanticsString(int mem)
+{
+ // Note: No bits set (None) means "Relaxed"
+ switch (mem) {
+ case 0: return "Bad"; // Note: this is a placeholder for 'Consume'
+ case 1: return "Acquire";
+ case 2: return "Release";
+ case 3: return "AcquireRelease";
+ case 4: return "SequentiallyConsistent";
+ case 5: return "Bad"; // Note: reserved for future expansion
+ case 6: return "UniformMemory";
+ case 7: return "SubgroupMemory";
+ case 8: return "WorkgroupMemory";
+ case 9: return "CrossWorkgroupMemory";
+ case 10: return "AtomicCounterMemory";
+ case 11: return "ImageMemory";
+
+ case MemorySemanticsCeiling:
+ default: return "Bad";
+ }
+}
+
+const int MemoryAccessCeiling = 3;
+
+const char* MemoryAccessString(int mem)
+{
+ switch (mem) {
+ case 0: return "Volatile";
+ case 1: return "Aligned";
+ case 2: return "Nontemporal";
+
+ case MemoryAccessCeiling:
+ default: return "Bad";
+ }
+}
+
+const int ScopeCeiling = 5;
+
+const char* ScopeString(int mem)
+{
+ switch (mem) {
+ case 0: return "CrossDevice";
+ case 1: return "Device";
+ case 2: return "Workgroup";
+ case 3: return "Subgroup";
+ case 4: return "Invocation";
+
+ case ScopeCeiling:
+ default: return "Bad";
+ }
+}
+
+const int GroupOperationCeiling = 3;
+
+const char* GroupOperationString(int gop)
+{
+
+ switch (gop)
+ {
+ case 0: return "Reduce";
+ case 1: return "InclusiveScan";
+ case 2: return "ExclusiveScan";
+
+ case GroupOperationCeiling:
+ default: return "Bad";
+ }
+}
+
+const int KernelEnqueueFlagsCeiling = 3;
+
+const char* KernelEnqueueFlagsString(int flag)
+{
+ switch (flag)
+ {
+ case 0: return "NoWait";
+ case 1: return "WaitKernel";
+ case 2: return "WaitWorkGroup";
+
+ case KernelEnqueueFlagsCeiling:
+ default: return "Bad";
+ }
+}
+
+const int KernelProfilingInfoCeiling = 1;
+
+const char* KernelProfilingInfoString(int info)
+{
+ switch (info)
+ {
+ case 0: return "CmdExecTime";
+
+ case KernelProfilingInfoCeiling:
+ default: return "Bad";
+ }
+}
+
+const int CapabilityCeiling = 58;
+
+const char* CapabilityString(int info)
+{
+ switch (info)
+ {
+ case 0: return "Matrix";
+ case 1: return "Shader";
+ case 2: return "Geometry";
+ case 3: return "Tessellation";
+ case 4: return "Addresses";
+ case 5: return "Linkage";
+ case 6: return "Kernel";
+ case 7: return "Vector16";
+ case 8: return "Float16Buffer";
+ case 9: return "Float16";
+ case 10: return "Float64";
+ case 11: return "Int64";
+ case 12: return "Int64Atomics";
+ case 13: return "ImageBasic";
+ case 14: return "ImageReadWrite";
+ case 15: return "ImageMipmap";
+ case 16: return "Bad";
+ case 17: return "Pipes";
+ case 18: return "Groups";
+ case 19: return "DeviceEnqueue";
+ case 20: return "LiteralSampler";
+ case 21: return "AtomicStorage";
+ case 22: return "Int16";
+ case 23: return "TessellationPointSize";
+ case 24: return "GeometryPointSize";
+ case 25: return "ImageGatherExtended";
+ case 26: return "Bad";
+ case 27: return "StorageImageMultisample";
+ case 28: return "UniformBufferArrayDynamicIndexing";
+ case 29: return "SampledImageArrayDynamicIndexing";
+ case 30: return "StorageBufferArrayDynamicIndexing";
+ case 31: return "StorageImageArrayDynamicIndexing";
+ case 32: return "ClipDistance";
+ case 33: return "CullDistance";
+ case 34: return "ImageCubeArray";
+ case 35: return "SampleRateShading";
+ case 36: return "ImageRect";
+ case 37: return "SampledRect";
+ case 38: return "GenericPointer";
+ case 39: return "Int8";
+ case 40: return "InputAttachment";
+ case 41: return "SparseResidency";
+ case 42: return "MinLod";
+ case 43: return "Sampled1D";
+ case 44: return "Image1D";
+ case 45: return "SampledCubeArray";
+ case 46: return "SampledBuffer";
+ case 47: return "ImageBuffer";
+ case 48: return "ImageMSArray";
+ case 49: return "StorageImageExtendedFormats";
+ case 50: return "ImageQuery";
+ case 51: return "DerivativeControl";
+ case 52: return "InterpolationFunction";
+ case 53: return "TransformFeedback";
+ case 54: return "GeometryStreams";
+ case 55: return "StorageImageReadWithoutFormat";
+ case 56: return "StorageImageWriteWithoutFormat";
+ case 57: return "MultiViewport";
+
+ case CapabilityCeiling:
+ default: return "Bad";
+ }
+}
+
+const char* OpcodeString(int op)
+{
+ switch (op) {
+ case 0: return "OpNop";
+ case 1: return "OpUndef";
+ case 2: return "OpSourceContinued";
+ case 3: return "OpSource";
+ case 4: return "OpSourceExtension";
+ case 5: return "OpName";
+ case 6: return "OpMemberName";
+ case 7: return "OpString";
+ case 8: return "OpLine";
+ case 9: return "Bad";
+ case 10: return "OpExtension";
+ case 11: return "OpExtInstImport";
+ case 12: return "OpExtInst";
+ case 13: return "Bad";
+ case 14: return "OpMemoryModel";
+ case 15: return "OpEntryPoint";
+ case 16: return "OpExecutionMode";
+ case 17: return "OpCapability";
+ case 18: return "Bad";
+ case 19: return "OpTypeVoid";
+ case 20: return "OpTypeBool";
+ case 21: return "OpTypeInt";
+ case 22: return "OpTypeFloat";
+ case 23: return "OpTypeVector";
+ case 24: return "OpTypeMatrix";
+ case 25: return "OpTypeImage";
+ case 26: return "OpTypeSampler";
+ case 27: return "OpTypeSampledImage";
+ case 28: return "OpTypeArray";
+ case 29: return "OpTypeRuntimeArray";
+ case 30: return "OpTypeStruct";
+ case 31: return "OpTypeOpaque";
+ case 32: return "OpTypePointer";
+ case 33: return "OpTypeFunction";
+ case 34: return "OpTypeEvent";
+ case 35: return "OpTypeDeviceEvent";
+ case 36: return "OpTypeReserveId";
+ case 37: return "OpTypeQueue";
+ case 38: return "OpTypePipe";
+ case 39: return "OpTypeForwardPointer";
+ case 40: return "Bad";
+ case 41: return "OpConstantTrue";
+ case 42: return "OpConstantFalse";
+ case 43: return "OpConstant";
+ case 44: return "OpConstantComposite";
+ case 45: return "OpConstantSampler";
+ case 46: return "OpConstantNull";
+ case 47: return "Bad";
+ case 48: return "OpSpecConstantTrue";
+ case 49: return "OpSpecConstantFalse";
+ case 50: return "OpSpecConstant";
+ case 51: return "OpSpecConstantComposite";
+ case 52: return "OpSpecConstantOp";
+ case 53: return "Bad";
+ case 54: return "OpFunction";
+ case 55: return "OpFunctionParameter";
+ case 56: return "OpFunctionEnd";
+ case 57: return "OpFunctionCall";
+ case 58: return "Bad";
+ case 59: return "OpVariable";
+ case 60: return "OpImageTexelPointer";
+ case 61: return "OpLoad";
+ case 62: return "OpStore";
+ case 63: return "OpCopyMemory";
+ case 64: return "OpCopyMemorySized";
+ case 65: return "OpAccessChain";
+ case 66: return "OpInBoundsAccessChain";
+ case 67: return "OpPtrAccessChain";
+ case 68: return "OpArrayLength";
+ case 69: return "OpGenericPtrMemSemantics";
+ case 70: return "OpInBoundsPtrAccessChain";
+ case 71: return "OpDecorate";
+ case 72: return "OpMemberDecorate";
+ case 73: return "OpDecorationGroup";
+ case 74: return "OpGroupDecorate";
+ case 75: return "OpGroupMemberDecorate";
+ case 76: return "Bad";
+ case 77: return "OpVectorExtractDynamic";
+ case 78: return "OpVectorInsertDynamic";
+ case 79: return "OpVectorShuffle";
+ case 80: return "OpCompositeConstruct";
+ case 81: return "OpCompositeExtract";
+ case 82: return "OpCompositeInsert";
+ case 83: return "OpCopyObject";
+ case 84: return "OpTranspose";
+ case 85: return "Bad";
+ case 86: return "OpSampledImage";
+ case 87: return "OpImageSampleImplicitLod";
+ case 88: return "OpImageSampleExplicitLod";
+ case 89: return "OpImageSampleDrefImplicitLod";
+ case 90: return "OpImageSampleDrefExplicitLod";
+ case 91: return "OpImageSampleProjImplicitLod";
+ case 92: return "OpImageSampleProjExplicitLod";
+ case 93: return "OpImageSampleProjDrefImplicitLod";
+ case 94: return "OpImageSampleProjDrefExplicitLod";
+ case 95: return "OpImageFetch";
+ case 96: return "OpImageGather";
+ case 97: return "OpImageDrefGather";
+ case 98: return "OpImageRead";
+ case 99: return "OpImageWrite";
+ case 100: return "OpImage";
+ case 101: return "OpImageQueryFormat";
+ case 102: return "OpImageQueryOrder";
+ case 103: return "OpImageQuerySizeLod";
+ case 104: return "OpImageQuerySize";
+ case 105: return "OpImageQueryLod";
+ case 106: return "OpImageQueryLevels";
+ case 107: return "OpImageQuerySamples";
+ case 108: return "Bad";
+ case 109: return "OpConvertFToU";
+ case 110: return "OpConvertFToS";
+ case 111: return "OpConvertSToF";
+ case 112: return "OpConvertUToF";
+ case 113: return "OpUConvert";
+ case 114: return "OpSConvert";
+ case 115: return "OpFConvert";
+ case 116: return "OpQuantizeToF16";
+ case 117: return "OpConvertPtrToU";
+ case 118: return "OpSatConvertSToU";
+ case 119: return "OpSatConvertUToS";
+ case 120: return "OpConvertUToPtr";
+ case 121: return "OpPtrCastToGeneric";
+ case 122: return "OpGenericCastToPtr";
+ case 123: return "OpGenericCastToPtrExplicit";
+ case 124: return "OpBitcast";
+ case 125: return "Bad";
+ case 126: return "OpSNegate";
+ case 127: return "OpFNegate";
+ case 128: return "OpIAdd";
+ case 129: return "OpFAdd";
+ case 130: return "OpISub";
+ case 131: return "OpFSub";
+ case 132: return "OpIMul";
+ case 133: return "OpFMul";
+ case 134: return "OpUDiv";
+ case 135: return "OpSDiv";
+ case 136: return "OpFDiv";
+ case 137: return "OpUMod";
+ case 138: return "OpSRem";
+ case 139: return "OpSMod";
+ case 140: return "OpFRem";
+ case 141: return "OpFMod";
+ case 142: return "OpVectorTimesScalar";
+ case 143: return "OpMatrixTimesScalar";
+ case 144: return "OpVectorTimesMatrix";
+ case 145: return "OpMatrixTimesVector";
+ case 146: return "OpMatrixTimesMatrix";
+ case 147: return "OpOuterProduct";
+ case 148: return "OpDot";
+ case 149: return "OpIAddCarry";
+ case 150: return "OpISubBorrow";
+ case 151: return "OpUMulExtended";
+ case 152: return "OpSMulExtended";
+ case 153: return "Bad";
+ case 154: return "OpAny";
+ case 155: return "OpAll";
+ case 156: return "OpIsNan";
+ case 157: return "OpIsInf";
+ case 158: return "OpIsFinite";
+ case 159: return "OpIsNormal";
+ case 160: return "OpSignBitSet";
+ case 161: return "OpLessOrGreater";
+ case 162: return "OpOrdered";
+ case 163: return "OpUnordered";
+ case 164: return "OpLogicalEqual";
+ case 165: return "OpLogicalNotEqual";
+ case 166: return "OpLogicalOr";
+ case 167: return "OpLogicalAnd";
+ case 168: return "OpLogicalNot";
+ case 169: return "OpSelect";
+ case 170: return "OpIEqual";
+ case 171: return "OpINotEqual";
+ case 172: return "OpUGreaterThan";
+ case 173: return "OpSGreaterThan";
+ case 174: return "OpUGreaterThanEqual";
+ case 175: return "OpSGreaterThanEqual";
+ case 176: return "OpULessThan";
+ case 177: return "OpSLessThan";
+ case 178: return "OpULessThanEqual";
+ case 179: return "OpSLessThanEqual";
+ case 180: return "OpFOrdEqual";
+ case 181: return "OpFUnordEqual";
+ case 182: return "OpFOrdNotEqual";
+ case 183: return "OpFUnordNotEqual";
+ case 184: return "OpFOrdLessThan";
+ case 185: return "OpFUnordLessThan";
+ case 186: return "OpFOrdGreaterThan";
+ case 187: return "OpFUnordGreaterThan";
+ case 188: return "OpFOrdLessThanEqual";
+ case 189: return "OpFUnordLessThanEqual";
+ case 190: return "OpFOrdGreaterThanEqual";
+ case 191: return "OpFUnordGreaterThanEqual";
+ case 192: return "Bad";
+ case 193: return "Bad";
+ case 194: return "OpShiftRightLogical";
+ case 195: return "OpShiftRightArithmetic";
+ case 196: return "OpShiftLeftLogical";
+ case 197: return "OpBitwiseOr";
+ case 198: return "OpBitwiseXor";
+ case 199: return "OpBitwiseAnd";
+ case 200: return "OpNot";
+ case 201: return "OpBitFieldInsert";
+ case 202: return "OpBitFieldSExtract";
+ case 203: return "OpBitFieldUExtract";
+ case 204: return "OpBitReverse";
+ case 205: return "OpBitCount";
+ case 206: return "Bad";
+ case 207: return "OpDPdx";
+ case 208: return "OpDPdy";
+ case 209: return "OpFwidth";
+ case 210: return "OpDPdxFine";
+ case 211: return "OpDPdyFine";
+ case 212: return "OpFwidthFine";
+ case 213: return "OpDPdxCoarse";
+ case 214: return "OpDPdyCoarse";
+ case 215: return "OpFwidthCoarse";
+ case 216: return "Bad";
+ case 217: return "Bad";
+ case 218: return "OpEmitVertex";
+ case 219: return "OpEndPrimitive";
+ case 220: return "OpEmitStreamVertex";
+ case 221: return "OpEndStreamPrimitive";
+ case 222: return "Bad";
+ case 223: return "Bad";
+ case 224: return "OpControlBarrier";
+ case 225: return "OpMemoryBarrier";
+ case 226: return "Bad";
+ case 227: return "OpAtomicLoad";
+ case 228: return "OpAtomicStore";
+ case 229: return "OpAtomicExchange";
+ case 230: return "OpAtomicCompareExchange";
+ case 231: return "OpAtomicCompareExchangeWeak";
+ case 232: return "OpAtomicIIncrement";
+ case 233: return "OpAtomicIDecrement";
+ case 234: return "OpAtomicIAdd";
+ case 235: return "OpAtomicISub";
+ case 236: return "OpAtomicSMin";
+ case 237: return "OpAtomicUMin";
+ case 238: return "OpAtomicSMax";
+ case 239: return "OpAtomicUMax";
+ case 240: return "OpAtomicAnd";
+ case 241: return "OpAtomicOr";
+ case 242: return "OpAtomicXor";
+ case 243: return "Bad";
+ case 244: return "Bad";
+ case 245: return "OpPhi";
+ case 246: return "OpLoopMerge";
+ case 247: return "OpSelectionMerge";
+ case 248: return "OpLabel";
+ case 249: return "OpBranch";
+ case 250: return "OpBranchConditional";
+ case 251: return "OpSwitch";
+ case 252: return "OpKill";
+ case 253: return "OpReturn";
+ case 254: return "OpReturnValue";
+ case 255: return "OpUnreachable";
+ case 256: return "OpLifetimeStart";
+ case 257: return "OpLifetimeStop";
+ case 258: return "Bad";
+ case 259: return "OpGroupAsyncCopy";
+ case 260: return "OpGroupWaitEvents";
+ case 261: return "OpGroupAll";
+ case 262: return "OpGroupAny";
+ case 263: return "OpGroupBroadcast";
+ case 264: return "OpGroupIAdd";
+ case 265: return "OpGroupFAdd";
+ case 266: return "OpGroupFMin";
+ case 267: return "OpGroupUMin";
+ case 268: return "OpGroupSMin";
+ case 269: return "OpGroupFMax";
+ case 270: return "OpGroupUMax";
+ case 271: return "OpGroupSMax";
+ case 272: return "Bad";
+ case 273: return "Bad";
+ case 274: return "OpReadPipe";
+ case 275: return "OpWritePipe";
+ case 276: return "OpReservedReadPipe";
+ case 277: return "OpReservedWritePipe";
+ case 278: return "OpReserveReadPipePackets";
+ case 279: return "OpReserveWritePipePackets";
+ case 280: return "OpCommitReadPipe";
+ case 281: return "OpCommitWritePipe";
+ case 282: return "OpIsValidReserveId";
+ case 283: return "OpGetNumPipePackets";
+ case 284: return "OpGetMaxPipePackets";
+ case 285: return "OpGroupReserveReadPipePackets";
+ case 286: return "OpGroupReserveWritePipePackets";
+ case 287: return "OpGroupCommitReadPipe";
+ case 288: return "OpGroupCommitWritePipe";
+ case 289: return "Bad";
+ case 290: return "Bad";
+ case 291: return "OpEnqueueMarker";
+ case 292: return "OpEnqueueKernel";
+ case 293: return "OpGetKernelNDrangeSubGroupCount";
+ case 294: return "OpGetKernelNDrangeMaxSubGroupSize";
+ case 295: return "OpGetKernelWorkGroupSize";
+ case 296: return "OpGetKernelPreferredWorkGroupSizeMultiple";
+ case 297: return "OpRetainEvent";
+ case 298: return "OpReleaseEvent";
+ case 299: return "OpCreateUserEvent";
+ case 300: return "OpIsValidEvent";
+ case 301: return "OpSetUserEventStatus";
+ case 302: return "OpCaptureEventProfilingInfo";
+ case 303: return "OpGetDefaultQueue";
+ case 304: return "OpBuildNDRange";
+ case 305: return "OpImageSparseSampleImplicitLod";
+ case 306: return "OpImageSparseSampleExplicitLod";
+ case 307: return "OpImageSparseSampleDrefImplicitLod";
+ case 308: return "OpImageSparseSampleDrefExplicitLod";
+ case 309: return "OpImageSparseSampleProjImplicitLod";
+ case 310: return "OpImageSparseSampleProjExplicitLod";
+ case 311: return "OpImageSparseSampleProjDrefImplicitLod";
+ case 312: return "OpImageSparseSampleProjDrefExplicitLod";
+ case 313: return "OpImageSparseFetch";
+ case 314: return "OpImageSparseGather";
+ case 315: return "OpImageSparseDrefGather";
+ case 316: return "OpImageSparseTexelsResident";
+ case 317: return "OpNoLine";
+ case 318: return "OpAtomicFlagTestAndSet";
+ case 319: return "OpAtomicFlagClear";
+ case 320: return "OpImageSparseRead";
+
+ case OpcodeCeiling:
+ default:
+ return "Bad";
+ }
+}
+
+// The set of objects that hold all the instruction/operand
+// parameterization information.
+InstructionParameters InstructionDesc[OpcodeCeiling];
+OperandParameters ExecutionModeOperands[ExecutionModeCeiling];
+OperandParameters DecorationOperands[DecorationCeiling];
+
+EnumDefinition OperandClassParams[OperandCount];
+EnumParameters ExecutionModelParams[ExecutionModelCeiling];
+EnumParameters AddressingParams[AddressingModelCeiling];
+EnumParameters MemoryParams[MemoryModelCeiling];
+EnumParameters ExecutionModeParams[ExecutionModeCeiling];
+EnumParameters StorageParams[StorageClassCeiling];
+EnumParameters SamplerAddressingModeParams[SamplerAddressingModeCeiling];
+EnumParameters SamplerFilterModeParams[SamplerFilterModeCeiling];
+EnumParameters ImageFormatParams[ImageFormatCeiling];
+EnumParameters ImageChannelOrderParams[ImageChannelOrderCeiling];
+EnumParameters ImageChannelDataTypeParams[ImageChannelDataTypeCeiling];
+EnumParameters ImageOperandsParams[ImageOperandsCeiling];
+EnumParameters FPFastMathParams[FPFastMathCeiling];
+EnumParameters FPRoundingModeParams[FPRoundingModeCeiling];
+EnumParameters LinkageTypeParams[LinkageTypeCeiling];
+EnumParameters DecorationParams[DecorationCeiling];
+EnumParameters BuiltInParams[BuiltInCeiling];
+EnumParameters DimensionalityParams[DimensionCeiling];
+EnumParameters FuncParamAttrParams[FuncParamAttrCeiling];
+EnumParameters AccessQualifierParams[AccessQualifierCeiling];
+EnumParameters GroupOperationParams[GroupOperationCeiling];
+EnumParameters LoopControlParams[FunctionControlCeiling];
+EnumParameters SelectionControlParams[SelectControlCeiling];
+EnumParameters FunctionControlParams[FunctionControlCeiling];
+EnumParameters MemorySemanticsParams[MemorySemanticsCeiling];
+EnumParameters MemoryAccessParams[MemoryAccessCeiling];
+EnumParameters ScopeParams[ScopeCeiling];
+EnumParameters KernelEnqueueFlagsParams[KernelEnqueueFlagsCeiling];
+EnumParameters KernelProfilingInfoParams[KernelProfilingInfoCeiling];
+EnumParameters CapabilityParams[CapabilityCeiling];
+
+// Set up all the parameterizing descriptions of the opcodes, operands, etc.
+void Parameterize()
+{
+ // only do this once.
+ static bool initialized = false;
+ if (initialized)
+ return;
+ initialized = true;
+
+ // Exceptions to having a result <id> and a resulting type <id>.
+ // (Everything is initialized to have both).
+
+ InstructionDesc[OpNop].setResultAndType(false, false);
+ InstructionDesc[OpSource].setResultAndType(false, false);
+ InstructionDesc[OpSourceContinued].setResultAndType(false, false);
+ InstructionDesc[OpSourceExtension].setResultAndType(false, false);
+ InstructionDesc[OpExtension].setResultAndType(false, false);
+ InstructionDesc[OpExtInstImport].setResultAndType(true, false);
+ InstructionDesc[OpCapability].setResultAndType(false, false);
+ InstructionDesc[OpMemoryModel].setResultAndType(false, false);
+ InstructionDesc[OpEntryPoint].setResultAndType(false, false);
+ InstructionDesc[OpExecutionMode].setResultAndType(false, false);
+ InstructionDesc[OpTypeVoid].setResultAndType(true, false);
+ InstructionDesc[OpTypeBool].setResultAndType(true, false);
+ InstructionDesc[OpTypeInt].setResultAndType(true, false);
+ InstructionDesc[OpTypeFloat].setResultAndType(true, false);
+ InstructionDesc[OpTypeVector].setResultAndType(true, false);
+ InstructionDesc[OpTypeMatrix].setResultAndType(true, false);
+ InstructionDesc[OpTypeImage].setResultAndType(true, false);
+ InstructionDesc[OpTypeSampler].setResultAndType(true, false);
+ InstructionDesc[OpTypeSampledImage].setResultAndType(true, false);
+ InstructionDesc[OpTypeArray].setResultAndType(true, false);
+ InstructionDesc[OpTypeRuntimeArray].setResultAndType(true, false);
+ InstructionDesc[OpTypeStruct].setResultAndType(true, false);
+ InstructionDesc[OpTypeOpaque].setResultAndType(true, false);
+ InstructionDesc[OpTypePointer].setResultAndType(true, false);
+ InstructionDesc[OpTypeForwardPointer].setResultAndType(false, false);
+ InstructionDesc[OpTypeFunction].setResultAndType(true, false);
+ InstructionDesc[OpTypeEvent].setResultAndType(true, false);
+ InstructionDesc[OpTypeDeviceEvent].setResultAndType(true, false);
+ InstructionDesc[OpTypeReserveId].setResultAndType(true, false);
+ InstructionDesc[OpTypeQueue].setResultAndType(true, false);
+ InstructionDesc[OpTypePipe].setResultAndType(true, false);
+ InstructionDesc[OpFunctionEnd].setResultAndType(false, false);
+ InstructionDesc[OpStore].setResultAndType(false, false);
+ InstructionDesc[OpImageWrite].setResultAndType(false, false);
+ InstructionDesc[OpDecorationGroup].setResultAndType(true, false);
+ InstructionDesc[OpDecorate].setResultAndType(false, false);
+ InstructionDesc[OpMemberDecorate].setResultAndType(false, false);
+ InstructionDesc[OpGroupDecorate].setResultAndType(false, false);
+ InstructionDesc[OpGroupMemberDecorate].setResultAndType(false, false);
+ InstructionDesc[OpName].setResultAndType(false, false);
+ InstructionDesc[OpMemberName].setResultAndType(false, false);
+ InstructionDesc[OpString].setResultAndType(true, false);
+ InstructionDesc[OpLine].setResultAndType(false, false);
+ InstructionDesc[OpNoLine].setResultAndType(false, false);
+ InstructionDesc[OpCopyMemory].setResultAndType(false, false);
+ InstructionDesc[OpCopyMemorySized].setResultAndType(false, false);
+ InstructionDesc[OpEmitVertex].setResultAndType(false, false);
+ InstructionDesc[OpEndPrimitive].setResultAndType(false, false);
+ InstructionDesc[OpEmitStreamVertex].setResultAndType(false, false);
+ InstructionDesc[OpEndStreamPrimitive].setResultAndType(false, false);
+ InstructionDesc[OpControlBarrier].setResultAndType(false, false);
+ InstructionDesc[OpMemoryBarrier].setResultAndType(false, false);
+ InstructionDesc[OpAtomicStore].setResultAndType(false, false);
+ InstructionDesc[OpLoopMerge].setResultAndType(false, false);
+ InstructionDesc[OpSelectionMerge].setResultAndType(false, false);
+ InstructionDesc[OpLabel].setResultAndType(true, false);
+ InstructionDesc[OpBranch].setResultAndType(false, false);
+ InstructionDesc[OpBranchConditional].setResultAndType(false, false);
+ InstructionDesc[OpSwitch].setResultAndType(false, false);
+ InstructionDesc[OpKill].setResultAndType(false, false);
+ InstructionDesc[OpReturn].setResultAndType(false, false);
+ InstructionDesc[OpReturnValue].setResultAndType(false, false);
+ InstructionDesc[OpUnreachable].setResultAndType(false, false);
+ InstructionDesc[OpLifetimeStart].setResultAndType(false, false);
+ InstructionDesc[OpLifetimeStop].setResultAndType(false, false);
+ InstructionDesc[OpCommitReadPipe].setResultAndType(false, false);
+ InstructionDesc[OpCommitWritePipe].setResultAndType(false, false);
+ InstructionDesc[OpGroupCommitWritePipe].setResultAndType(false, false);
+ InstructionDesc[OpGroupCommitReadPipe].setResultAndType(false, false);
+ InstructionDesc[OpCaptureEventProfilingInfo].setResultAndType(false, false);
+ InstructionDesc[OpSetUserEventStatus].setResultAndType(false, false);
+ InstructionDesc[OpRetainEvent].setResultAndType(false, false);
+ InstructionDesc[OpReleaseEvent].setResultAndType(false, false);
+ InstructionDesc[OpGroupWaitEvents].setResultAndType(false, false);
+ InstructionDesc[OpAtomicFlagClear].setResultAndType(false, false);
+
+ // Specific additional context-dependent operands
+
+ ExecutionModeOperands[ExecutionModeInvocations].push(OperandLiteralNumber, "'Number of <<Invocation,invocations>>'");
+
+ ExecutionModeOperands[ExecutionModeLocalSize].push(OperandLiteralNumber, "'x size'");
+ ExecutionModeOperands[ExecutionModeLocalSize].push(OperandLiteralNumber, "'y size'");
+ ExecutionModeOperands[ExecutionModeLocalSize].push(OperandLiteralNumber, "'z size'");
+
+ ExecutionModeOperands[ExecutionModeLocalSizeHint].push(OperandLiteralNumber, "'x size'");
+ ExecutionModeOperands[ExecutionModeLocalSizeHint].push(OperandLiteralNumber, "'y size'");
+ ExecutionModeOperands[ExecutionModeLocalSizeHint].push(OperandLiteralNumber, "'z size'");
+
+ ExecutionModeOperands[ExecutionModeOutputVertices].push(OperandLiteralNumber, "'Vertex count'");
+ ExecutionModeOperands[ExecutionModeVecTypeHint].push(OperandLiteralNumber, "'Vector type'");
+
+ DecorationOperands[DecorationStream].push(OperandLiteralNumber, "'Stream Number'");
+ DecorationOperands[DecorationLocation].push(OperandLiteralNumber, "'Location'");
+ DecorationOperands[DecorationComponent].push(OperandLiteralNumber, "'Component'");
+ DecorationOperands[DecorationIndex].push(OperandLiteralNumber, "'Index'");
+ DecorationOperands[DecorationBinding].push(OperandLiteralNumber, "'Binding Point'");
+ DecorationOperands[DecorationDescriptorSet].push(OperandLiteralNumber, "'Descriptor Set'");
+ DecorationOperands[DecorationOffset].push(OperandLiteralNumber, "'Byte Offset'");
+ DecorationOperands[DecorationXfbBuffer].push(OperandLiteralNumber, "'XFB Buffer Number'");
+ DecorationOperands[DecorationXfbStride].push(OperandLiteralNumber, "'XFB Stride'");
+ DecorationOperands[DecorationArrayStride].push(OperandLiteralNumber, "'Array Stride'");
+ DecorationOperands[DecorationMatrixStride].push(OperandLiteralNumber, "'Matrix Stride'");
+ DecorationOperands[DecorationBuiltIn].push(OperandLiteralNumber, "See <<BuiltIn,*BuiltIn*>>");
+ DecorationOperands[DecorationFPRoundingMode].push(OperandFPRoundingMode, "'Floating-Point Rounding Mode'");
+ DecorationOperands[DecorationFPFastMathMode].push(OperandFPFastMath, "'Fast-Math Mode'");
+ DecorationOperands[DecorationLinkageAttributes].push(OperandLiteralString, "'Name'");
+ DecorationOperands[DecorationLinkageAttributes].push(OperandLinkageType, "'Linkage Type'");
+ DecorationOperands[DecorationFuncParamAttr].push(OperandFuncParamAttr, "'Function Parameter Attribute'");
+ DecorationOperands[DecorationSpecId].push(OperandLiteralNumber, "'Specialization Constant ID'");
+ DecorationOperands[DecorationInputAttachmentIndex].push(OperandLiteralNumber, "'Attachment Index'");
+ DecorationOperands[DecorationAlignment].push(OperandLiteralNumber, "'Alignment'");
+
+ OperandClassParams[OperandSource].set(SourceLanguageCeiling, SourceString, 0);
+ OperandClassParams[OperandExecutionModel].set(ExecutionModelCeiling, ExecutionModelString, ExecutionModelParams);
+ OperandClassParams[OperandAddressing].set(AddressingModelCeiling, AddressingString, AddressingParams);
+ OperandClassParams[OperandMemory].set(MemoryModelCeiling, MemoryString, MemoryParams);
+ OperandClassParams[OperandExecutionMode].set(ExecutionModeCeiling, ExecutionModeString, ExecutionModeParams);
+ OperandClassParams[OperandExecutionMode].setOperands(ExecutionModeOperands);
+ OperandClassParams[OperandStorage].set(StorageClassCeiling, StorageClassString, StorageParams);
+ OperandClassParams[OperandDimensionality].set(DimensionCeiling, DimensionString, DimensionalityParams);
+ OperandClassParams[OperandSamplerAddressingMode].set(SamplerAddressingModeCeiling, SamplerAddressingModeString, SamplerAddressingModeParams);
+ OperandClassParams[OperandSamplerFilterMode].set(SamplerFilterModeCeiling, SamplerFilterModeString, SamplerFilterModeParams);
+ OperandClassParams[OperandSamplerImageFormat].set(ImageFormatCeiling, ImageFormatString, ImageFormatParams);
+ OperandClassParams[OperandImageChannelOrder].set(ImageChannelOrderCeiling, ImageChannelOrderString, ImageChannelOrderParams);
+ OperandClassParams[OperandImageChannelDataType].set(ImageChannelDataTypeCeiling, ImageChannelDataTypeString, ImageChannelDataTypeParams);
+ OperandClassParams[OperandImageOperands].set(ImageOperandsCeiling, ImageOperandsString, ImageOperandsParams, true);
+ OperandClassParams[OperandFPFastMath].set(FPFastMathCeiling, FPFastMathString, FPFastMathParams, true);
+ OperandClassParams[OperandFPRoundingMode].set(FPRoundingModeCeiling, FPRoundingModeString, FPRoundingModeParams);
+ OperandClassParams[OperandLinkageType].set(LinkageTypeCeiling, LinkageTypeString, LinkageTypeParams);
+ OperandClassParams[OperandFuncParamAttr].set(FuncParamAttrCeiling, FuncParamAttrString, FuncParamAttrParams);
+ OperandClassParams[OperandAccessQualifier].set(AccessQualifierCeiling, AccessQualifierString, AccessQualifierParams);
+ OperandClassParams[OperandDecoration].set(DecorationCeiling, DecorationString, DecorationParams);
+ OperandClassParams[OperandDecoration].setOperands(DecorationOperands);
+ OperandClassParams[OperandBuiltIn].set(BuiltInCeiling, BuiltInString, BuiltInParams);
+ OperandClassParams[OperandSelect].set(SelectControlCeiling, SelectControlString, SelectionControlParams, true);
+ OperandClassParams[OperandLoop].set(LoopControlCeiling, LoopControlString, LoopControlParams, true);
+ OperandClassParams[OperandFunction].set(FunctionControlCeiling, FunctionControlString, FunctionControlParams, true);
+ OperandClassParams[OperandMemorySemantics].set(MemorySemanticsCeiling, MemorySemanticsString, MemorySemanticsParams, true);
+ OperandClassParams[OperandMemoryAccess].set(MemoryAccessCeiling, MemoryAccessString, MemoryAccessParams, true);
+ OperandClassParams[OperandScope].set(ScopeCeiling, ScopeString, ScopeParams);
+ OperandClassParams[OperandGroupOperation].set(GroupOperationCeiling, GroupOperationString, GroupOperationParams);
+ OperandClassParams[OperandKernelEnqueueFlags].set(KernelEnqueueFlagsCeiling, KernelEnqueueFlagsString, KernelEnqueueFlagsParams);
+ OperandClassParams[OperandKernelProfilingInfo].set(KernelProfilingInfoCeiling, KernelProfilingInfoString, KernelProfilingInfoParams, true);
+ OperandClassParams[OperandCapability].set(CapabilityCeiling, CapabilityString, CapabilityParams);
+ OperandClassParams[OperandOpcode].set(OpcodeCeiling, OpcodeString, 0);
+
+ CapabilityParams[CapabilityShader].caps.push_back(CapabilityMatrix);
+ CapabilityParams[CapabilityGeometry].caps.push_back(CapabilityShader);
+ CapabilityParams[CapabilityTessellation].caps.push_back(CapabilityShader);
+ CapabilityParams[CapabilityVector16].caps.push_back(CapabilityKernel);
+ CapabilityParams[CapabilityFloat16Buffer].caps.push_back(CapabilityKernel);
+ CapabilityParams[CapabilityInt64Atomics].caps.push_back(CapabilityInt64);
+ CapabilityParams[CapabilityImageBasic].caps.push_back(CapabilityKernel);
+ CapabilityParams[CapabilityImageReadWrite].caps.push_back(CapabilityImageBasic);
+ CapabilityParams[CapabilityImageMipmap].caps.push_back(CapabilityImageBasic);
+ CapabilityParams[CapabilityPipes].caps.push_back(CapabilityKernel);
+ CapabilityParams[CapabilityDeviceEnqueue].caps.push_back(CapabilityKernel);
+ CapabilityParams[CapabilityLiteralSampler].caps.push_back(CapabilityKernel);
+ CapabilityParams[CapabilityAtomicStorage].caps.push_back(CapabilityShader);
+ CapabilityParams[CapabilitySampleRateShading].caps.push_back(CapabilityShader);
+ CapabilityParams[CapabilityTessellationPointSize].caps.push_back(CapabilityTessellation);
+ CapabilityParams[CapabilityGeometryPointSize].caps.push_back(CapabilityGeometry);
+ CapabilityParams[CapabilityImageGatherExtended].caps.push_back(CapabilityShader);
+ CapabilityParams[CapabilityStorageImageExtendedFormats].caps.push_back(CapabilityShader);
+ CapabilityParams[CapabilityStorageImageMultisample].caps.push_back(CapabilityShader);
+ CapabilityParams[CapabilityUniformBufferArrayDynamicIndexing].caps.push_back(CapabilityShader);
+ CapabilityParams[CapabilitySampledImageArrayDynamicIndexing].caps.push_back(CapabilityShader);
+ CapabilityParams[CapabilityStorageBufferArrayDynamicIndexing].caps.push_back(CapabilityShader);
+ CapabilityParams[CapabilityStorageImageArrayDynamicIndexing].caps.push_back(CapabilityShader);
+ CapabilityParams[CapabilityClipDistance].caps.push_back(CapabilityShader);
+ CapabilityParams[CapabilityCullDistance].caps.push_back(CapabilityShader);
+ CapabilityParams[CapabilityGenericPointer].caps.push_back(CapabilityAddresses);
+ CapabilityParams[CapabilityInt8].caps.push_back(CapabilityKernel);
+ CapabilityParams[CapabilityInputAttachment].caps.push_back(CapabilityShader);
+ CapabilityParams[CapabilityMinLod].caps.push_back(CapabilityShader);
+ CapabilityParams[CapabilitySparseResidency].caps.push_back(CapabilityShader);
+ CapabilityParams[CapabilitySampled1D].caps.push_back(CapabilityShader);
+ CapabilityParams[CapabilitySampledRect].caps.push_back(CapabilityShader);
+ CapabilityParams[CapabilitySampledBuffer].caps.push_back(CapabilityShader);
+ CapabilityParams[CapabilitySampledCubeArray].caps.push_back(CapabilityShader);
+ CapabilityParams[CapabilityImageMSArray].caps.push_back(CapabilityShader);
+ CapabilityParams[CapabilityImage1D].caps.push_back(CapabilitySampled1D);
+ CapabilityParams[CapabilityImageRect].caps.push_back(CapabilitySampledRect);
+ CapabilityParams[CapabilityImageBuffer].caps.push_back(CapabilitySampledBuffer);
+ CapabilityParams[CapabilityImageCubeArray].caps.push_back(CapabilitySampledCubeArray);
+ CapabilityParams[CapabilityImageQuery].caps.push_back(CapabilityShader);
+ CapabilityParams[CapabilityDerivativeControl].caps.push_back(CapabilityShader);
+ CapabilityParams[CapabilityInterpolationFunction].caps.push_back(CapabilityShader);
+ CapabilityParams[CapabilityTransformFeedback].caps.push_back(CapabilityShader);
+ CapabilityParams[CapabilityGeometryStreams].caps.push_back(CapabilityGeometry);
+ CapabilityParams[CapabilityStorageImageReadWithoutFormat].caps.push_back(CapabilityShader);
+ CapabilityParams[CapabilityStorageImageWriteWithoutFormat].caps.push_back(CapabilityShader);
+ CapabilityParams[CapabilityMultiViewport].caps.push_back(CapabilityGeometry);
+
+ AddressingParams[AddressingModelPhysical32].caps.push_back(CapabilityAddresses);
+ AddressingParams[AddressingModelPhysical64].caps.push_back(CapabilityAddresses);
+
+ MemoryParams[MemoryModelSimple].caps.push_back(CapabilityShader);
+ MemoryParams[MemoryModelGLSL450].caps.push_back(CapabilityShader);
+ MemoryParams[MemoryModelOpenCL].caps.push_back(CapabilityKernel);
+
+ MemorySemanticsParams[MemorySemanticsUniformMemoryShift].caps.push_back(CapabilityShader);
+ MemorySemanticsParams[MemorySemanticsAtomicCounterMemoryShift].caps.push_back(CapabilityAtomicStorage);
+
+ ExecutionModelParams[ExecutionModelVertex].caps.push_back(CapabilityShader);
+ ExecutionModelParams[ExecutionModelTessellationControl].caps.push_back(CapabilityTessellation);
+ ExecutionModelParams[ExecutionModelTessellationEvaluation].caps.push_back(CapabilityTessellation);
+ ExecutionModelParams[ExecutionModelGeometry].caps.push_back(CapabilityGeometry);
+ ExecutionModelParams[ExecutionModelFragment].caps.push_back(CapabilityShader);
+ ExecutionModelParams[ExecutionModelGLCompute].caps.push_back(CapabilityShader);
+ ExecutionModelParams[ExecutionModelKernel].caps.push_back(CapabilityKernel);
+
+ // Storage capabilites
+ StorageParams[StorageClassInput].caps.push_back(CapabilityShader);
+ StorageParams[StorageClassUniform].caps.push_back(CapabilityShader);
+ StorageParams[StorageClassOutput].caps.push_back(CapabilityShader);
+ StorageParams[StorageClassPrivate].caps.push_back(CapabilityShader);
+ StorageParams[StorageClassGeneric].caps.push_back(CapabilityKernel);
+ StorageParams[StorageClassAtomicCounter].caps.push_back(CapabilityAtomicStorage);
+ StorageParams[StorageClassPushConstant].caps.push_back(CapabilityShader);
+
+ // Sampler Filter & Addressing mode capabilities
+ SamplerAddressingModeParams[SamplerAddressingModeNone].caps.push_back(CapabilityKernel);
+ SamplerAddressingModeParams[SamplerAddressingModeClampToEdge].caps.push_back(CapabilityKernel);
+ SamplerAddressingModeParams[SamplerAddressingModeClamp].caps.push_back(CapabilityKernel);
+ SamplerAddressingModeParams[SamplerAddressingModeRepeat].caps.push_back(CapabilityKernel);
+ SamplerAddressingModeParams[SamplerAddressingModeRepeatMirrored].caps.push_back(CapabilityKernel);
+
+ SamplerFilterModeParams[SamplerFilterModeNearest].caps.push_back(CapabilityKernel);
+ SamplerFilterModeParams[SamplerFilterModeLinear].caps.push_back(CapabilityKernel);
+
+ // image format capabilities
+
+ // ES/Desktop float
+ ImageFormatParams[ImageFormatRgba32f].caps.push_back(CapabilityShader);
+ ImageFormatParams[ImageFormatRgba16f].caps.push_back(CapabilityShader);
+ ImageFormatParams[ImageFormatR32f].caps.push_back(CapabilityShader);
+ ImageFormatParams[ImageFormatRgba8].caps.push_back(CapabilityShader);
+ ImageFormatParams[ImageFormatRgba8Snorm].caps.push_back(CapabilityShader);
+
+ // Desktop float
+ ImageFormatParams[ImageFormatRg32f].caps.push_back(CapabilityStorageImageExtendedFormats);
+ ImageFormatParams[ImageFormatRg16f].caps.push_back(CapabilityStorageImageExtendedFormats);
+ ImageFormatParams[ImageFormatR11fG11fB10f].caps.push_back(CapabilityStorageImageExtendedFormats);
+ ImageFormatParams[ImageFormatR16f].caps.push_back(CapabilityStorageImageExtendedFormats);
+ ImageFormatParams[ImageFormatRgba16].caps.push_back(CapabilityStorageImageExtendedFormats);
+ ImageFormatParams[ImageFormatRgb10A2].caps.push_back(CapabilityStorageImageExtendedFormats);
+ ImageFormatParams[ImageFormatRg16].caps.push_back(CapabilityStorageImageExtendedFormats);
+ ImageFormatParams[ImageFormatRg8].caps.push_back(CapabilityStorageImageExtendedFormats);
+ ImageFormatParams[ImageFormatR16].caps.push_back(CapabilityStorageImageExtendedFormats);
+ ImageFormatParams[ImageFormatR8].caps.push_back(CapabilityStorageImageExtendedFormats);
+ ImageFormatParams[ImageFormatRgba16Snorm].caps.push_back(CapabilityStorageImageExtendedFormats);
+ ImageFormatParams[ImageFormatRg16Snorm].caps.push_back(CapabilityStorageImageExtendedFormats);
+ ImageFormatParams[ImageFormatRg8Snorm].caps.push_back(CapabilityStorageImageExtendedFormats);
+ ImageFormatParams[ImageFormatR16Snorm].caps.push_back(CapabilityStorageImageExtendedFormats);
+ ImageFormatParams[ImageFormatR8Snorm].caps.push_back(CapabilityStorageImageExtendedFormats);
+
+ // ES/Desktop int
+ ImageFormatParams[ImageFormatRgba32i].caps.push_back(CapabilityShader);
+ ImageFormatParams[ImageFormatRgba16i].caps.push_back(CapabilityShader);
+ ImageFormatParams[ImageFormatRgba8i].caps.push_back(CapabilityShader);
+ ImageFormatParams[ImageFormatR32i].caps.push_back(CapabilityShader);
+
+ // Desktop int
+ ImageFormatParams[ImageFormatRg32i].caps.push_back(CapabilityStorageImageExtendedFormats);
+ ImageFormatParams[ImageFormatRg16i].caps.push_back(CapabilityStorageImageExtendedFormats);
+ ImageFormatParams[ImageFormatRg8i].caps.push_back(CapabilityStorageImageExtendedFormats);
+ ImageFormatParams[ImageFormatR16i].caps.push_back(CapabilityStorageImageExtendedFormats);
+ ImageFormatParams[ImageFormatR8i].caps.push_back(CapabilityStorageImageExtendedFormats);
+
+ // ES/Desktop uint
+ ImageFormatParams[ImageFormatRgba32ui].caps.push_back(CapabilityShader);
+ ImageFormatParams[ImageFormatRgba16ui].caps.push_back(CapabilityShader);
+ ImageFormatParams[ImageFormatRgba8ui].caps.push_back(CapabilityShader);
+ ImageFormatParams[ImageFormatR32ui].caps.push_back(CapabilityShader);
+
+ // Desktop uint
+ ImageFormatParams[ImageFormatRgb10a2ui].caps.push_back(CapabilityStorageImageExtendedFormats);
+ ImageFormatParams[ImageFormatRg32ui].caps.push_back(CapabilityStorageImageExtendedFormats);
+ ImageFormatParams[ImageFormatRg16ui].caps.push_back(CapabilityStorageImageExtendedFormats);
+ ImageFormatParams[ImageFormatRg8ui].caps.push_back(CapabilityStorageImageExtendedFormats);
+ ImageFormatParams[ImageFormatR16ui].caps.push_back(CapabilityStorageImageExtendedFormats);
+ ImageFormatParams[ImageFormatR8ui].caps.push_back(CapabilityStorageImageExtendedFormats);
+
+ // image channel order capabilities
+ for (int i = 0; i < ImageChannelOrderCeiling; ++i) {
+ ImageChannelOrderParams[i].caps.push_back(CapabilityKernel);
+ }
+
+ // image channel type capabilities
+ for (int i = 0; i < ImageChannelDataTypeCeiling; ++i) {
+ ImageChannelDataTypeParams[i].caps.push_back(CapabilityKernel);
+ }
+
+ // image lookup operands
+ ImageOperandsParams[ImageOperandsBiasShift].caps.push_back(CapabilityShader);
+ ImageOperandsParams[ImageOperandsOffsetShift].caps.push_back(CapabilityImageGatherExtended);
+ ImageOperandsParams[ImageOperandsMinLodShift].caps.push_back(CapabilityMinLod);
+
+ // fast math flags capabilities
+ for (int i = 0; i < FPFastMathCeiling; ++i) {
+ FPFastMathParams[i].caps.push_back(CapabilityKernel);
+ }
+
+ // fp rounding mode capabilities
+ for (int i = 0; i < FPRoundingModeCeiling; ++i) {
+ FPRoundingModeParams[i].caps.push_back(CapabilityKernel);
+ }
+
+ // linkage types
+ for (int i = 0; i < LinkageTypeCeiling; ++i) {
+ LinkageTypeParams[i].caps.push_back(CapabilityLinkage);
+ }
+
+ // function argument types
+ for (int i = 0; i < FuncParamAttrCeiling; ++i) {
+ FuncParamAttrParams[i].caps.push_back(CapabilityKernel);
+ }
+
+ // function argument types
+ for (int i = 0; i < AccessQualifierCeiling; ++i) {
+ AccessQualifierParams[i].caps.push_back(CapabilityKernel);
+ }
+
+ ExecutionModeParams[ExecutionModeInvocations].caps.push_back(CapabilityGeometry);
+ ExecutionModeParams[ExecutionModeSpacingEqual].caps.push_back(CapabilityTessellation);
+ ExecutionModeParams[ExecutionModeSpacingFractionalEven].caps.push_back(CapabilityTessellation);
+ ExecutionModeParams[ExecutionModeSpacingFractionalOdd].caps.push_back(CapabilityTessellation);
+ ExecutionModeParams[ExecutionModeVertexOrderCw].caps.push_back(CapabilityTessellation);
+ ExecutionModeParams[ExecutionModeVertexOrderCcw].caps.push_back(CapabilityTessellation);
+ ExecutionModeParams[ExecutionModePixelCenterInteger].caps.push_back(CapabilityShader);
+ ExecutionModeParams[ExecutionModeOriginUpperLeft].caps.push_back(CapabilityShader);
+ ExecutionModeParams[ExecutionModeOriginLowerLeft].caps.push_back(CapabilityShader);
+ ExecutionModeParams[ExecutionModeEarlyFragmentTests].caps.push_back(CapabilityShader);
+ ExecutionModeParams[ExecutionModePointMode].caps.push_back(CapabilityTessellation);
+ ExecutionModeParams[ExecutionModeXfb].caps.push_back(CapabilityTransformFeedback);
+ ExecutionModeParams[ExecutionModeDepthReplacing].caps.push_back(CapabilityShader);
+ ExecutionModeParams[ExecutionModeDepthGreater].caps.push_back(CapabilityShader);
+ ExecutionModeParams[ExecutionModeDepthLess].caps.push_back(CapabilityShader);
+ ExecutionModeParams[ExecutionModeDepthUnchanged].caps.push_back(CapabilityShader);
+ ExecutionModeParams[ExecutionModeLocalSizeHint].caps.push_back(CapabilityKernel);
+ ExecutionModeParams[ExecutionModeInputPoints].caps.push_back(CapabilityGeometry);
+ ExecutionModeParams[ExecutionModeInputLines].caps.push_back(CapabilityGeometry);
+ ExecutionModeParams[ExecutionModeInputLinesAdjacency].caps.push_back(CapabilityGeometry);
+ ExecutionModeParams[ExecutionModeTriangles].caps.push_back(CapabilityGeometry);
+ ExecutionModeParams[ExecutionModeTriangles].caps.push_back(CapabilityTessellation);
+ ExecutionModeParams[ExecutionModeInputTrianglesAdjacency].caps.push_back(CapabilityGeometry);
+ ExecutionModeParams[ExecutionModeQuads].caps.push_back(CapabilityTessellation);
+ ExecutionModeParams[ExecutionModeIsolines].caps.push_back(CapabilityTessellation);
+ ExecutionModeParams[ExecutionModeOutputVertices].caps.push_back(CapabilityGeometry);
+ ExecutionModeParams[ExecutionModeOutputVertices].caps.push_back(CapabilityTessellation);
+ ExecutionModeParams[ExecutionModeOutputPoints].caps.push_back(CapabilityGeometry);
+ ExecutionModeParams[ExecutionModeOutputLineStrip].caps.push_back(CapabilityGeometry);
+ ExecutionModeParams[ExecutionModeOutputTriangleStrip].caps.push_back(CapabilityGeometry);
+ ExecutionModeParams[ExecutionModeVecTypeHint].caps.push_back(CapabilityKernel);
+ ExecutionModeParams[ExecutionModeContractionOff].caps.push_back(CapabilityKernel);
+
+ DecorationParams[DecorationRelaxedPrecision].caps.push_back(CapabilityShader);
+ DecorationParams[DecorationBlock].caps.push_back(CapabilityShader);
+ DecorationParams[DecorationBufferBlock].caps.push_back(CapabilityShader);
+ DecorationParams[DecorationRowMajor].caps.push_back(CapabilityMatrix);
+ DecorationParams[DecorationColMajor].caps.push_back(CapabilityMatrix);
+ DecorationParams[DecorationGLSLShared].caps.push_back(CapabilityShader);
+ DecorationParams[DecorationGLSLPacked].caps.push_back(CapabilityShader);
+ DecorationParams[DecorationNoPerspective].caps.push_back(CapabilityShader);
+ DecorationParams[DecorationFlat].caps.push_back(CapabilityShader);
+ DecorationParams[DecorationPatch].caps.push_back(CapabilityTessellation);
+ DecorationParams[DecorationCentroid].caps.push_back(CapabilityShader);
+ DecorationParams[DecorationSample].caps.push_back(CapabilitySampleRateShading);
+ DecorationParams[DecorationInvariant].caps.push_back(CapabilityShader);
+ DecorationParams[DecorationConstant].caps.push_back(CapabilityKernel);
+ DecorationParams[DecorationUniform].caps.push_back(CapabilityShader);
+ DecorationParams[DecorationCPacked].caps.push_back(CapabilityKernel);
+ DecorationParams[DecorationSaturatedConversion].caps.push_back(CapabilityKernel);
+ DecorationParams[DecorationStream].caps.push_back(CapabilityGeometryStreams);
+ DecorationParams[DecorationLocation].caps.push_back(CapabilityShader);
+ DecorationParams[DecorationComponent].caps.push_back(CapabilityShader);
+ DecorationParams[DecorationOffset].caps.push_back(CapabilityShader);
+ DecorationParams[DecorationIndex].caps.push_back(CapabilityShader);
+ DecorationParams[DecorationBinding].caps.push_back(CapabilityShader);
+ DecorationParams[DecorationDescriptorSet].caps.push_back(CapabilityShader);
+ DecorationParams[DecorationXfbBuffer].caps.push_back(CapabilityTransformFeedback);
+ DecorationParams[DecorationXfbStride].caps.push_back(CapabilityTransformFeedback);
+ DecorationParams[DecorationArrayStride].caps.push_back(CapabilityShader);
+ DecorationParams[DecorationMatrixStride].caps.push_back(CapabilityMatrix);
+ DecorationParams[DecorationFuncParamAttr].caps.push_back(CapabilityKernel);
+ DecorationParams[DecorationFPRoundingMode].caps.push_back(CapabilityKernel);
+ DecorationParams[DecorationFPFastMathMode].caps.push_back(CapabilityKernel);
+ DecorationParams[DecorationLinkageAttributes].caps.push_back(CapabilityLinkage);
+ DecorationParams[DecorationSpecId].caps.push_back(CapabilityShader);
+ DecorationParams[DecorationNoContraction].caps.push_back(CapabilityShader);
+ DecorationParams[DecorationInputAttachmentIndex].caps.push_back(CapabilityInputAttachment);
+ DecorationParams[DecorationAlignment].caps.push_back(CapabilityKernel);
+
+ BuiltInParams[BuiltInPosition].caps.push_back(CapabilityShader);
+ BuiltInParams[BuiltInPointSize].caps.push_back(CapabilityShader);
+ BuiltInParams[BuiltInClipDistance].caps.push_back(CapabilityClipDistance);
+ BuiltInParams[BuiltInCullDistance].caps.push_back(CapabilityCullDistance);
+
+ BuiltInParams[BuiltInVertexId].caps.push_back(CapabilityShader);
+ BuiltInParams[BuiltInVertexId].desc = "Vertex ID, which takes on values 0, 1, 2, . . . .";
+
+ BuiltInParams[BuiltInInstanceId].caps.push_back(CapabilityShader);
+ BuiltInParams[BuiltInInstanceId].desc = "Instance ID, which takes on values 0, 1, 2, . . . .";
+
+ BuiltInParams[BuiltInVertexIndex].caps.push_back(CapabilityShader);
+ BuiltInParams[BuiltInVertexIndex].desc = "Vertex index, which takes on values base, base+1, base+2, . . . .";
+
+ BuiltInParams[BuiltInInstanceIndex].caps.push_back(CapabilityShader);
+ BuiltInParams[BuiltInInstanceIndex].desc = "Instance index, which takes on values base, base+1, base+2, . . . .";
+
+ BuiltInParams[BuiltInPrimitiveId].caps.push_back(CapabilityGeometry);
+ BuiltInParams[BuiltInPrimitiveId].caps.push_back(CapabilityTessellation);
+ BuiltInParams[BuiltInInvocationId].caps.push_back(CapabilityGeometry);
+ BuiltInParams[BuiltInInvocationId].caps.push_back(CapabilityTessellation);
+ BuiltInParams[BuiltInLayer].caps.push_back(CapabilityGeometry);
+ BuiltInParams[BuiltInViewportIndex].caps.push_back(CapabilityMultiViewport);
+ BuiltInParams[BuiltInTessLevelOuter].caps.push_back(CapabilityTessellation);
+ BuiltInParams[BuiltInTessLevelInner].caps.push_back(CapabilityTessellation);
+ BuiltInParams[BuiltInTessCoord].caps.push_back(CapabilityTessellation);
+ BuiltInParams[BuiltInPatchVertices].caps.push_back(CapabilityTessellation);
+ BuiltInParams[BuiltInFragCoord].caps.push_back(CapabilityShader);
+ BuiltInParams[BuiltInPointCoord].caps.push_back(CapabilityShader);
+ BuiltInParams[BuiltInFrontFacing].caps.push_back(CapabilityShader);
+ BuiltInParams[BuiltInSampleId].caps.push_back(CapabilitySampleRateShading);
+ BuiltInParams[BuiltInSamplePosition].caps.push_back(CapabilitySampleRateShading);
+ BuiltInParams[BuiltInSampleMask].caps.push_back(CapabilitySampleRateShading);
+ BuiltInParams[BuiltInFragDepth].caps.push_back(CapabilityShader);
+ BuiltInParams[BuiltInHelperInvocation].caps.push_back(CapabilityShader);
+ BuiltInParams[BuiltInWorkDim].caps.push_back(CapabilityKernel);
+ BuiltInParams[BuiltInGlobalSize].caps.push_back(CapabilityKernel);
+ BuiltInParams[BuiltInEnqueuedWorkgroupSize].caps.push_back(CapabilityKernel);
+ BuiltInParams[BuiltInGlobalOffset].caps.push_back(CapabilityKernel);
+ BuiltInParams[BuiltInGlobalLinearId].caps.push_back(CapabilityKernel);
+
+ BuiltInParams[BuiltInSubgroupSize].caps.push_back(CapabilityKernel);
+ BuiltInParams[BuiltInSubgroupMaxSize].caps.push_back(CapabilityKernel);
+ BuiltInParams[BuiltInNumSubgroups].caps.push_back(CapabilityKernel);
+ BuiltInParams[BuiltInNumEnqueuedSubgroups].caps.push_back(CapabilityKernel);
+ BuiltInParams[BuiltInSubgroupId].caps.push_back(CapabilityKernel);
+ BuiltInParams[BuiltInSubgroupLocalInvocationId].caps.push_back(CapabilityKernel);
+
+ DimensionalityParams[Dim1D].caps.push_back(CapabilitySampled1D);
+ DimensionalityParams[DimCube].caps.push_back(CapabilityShader);
+ DimensionalityParams[DimRect].caps.push_back(CapabilitySampledRect);
+ DimensionalityParams[DimBuffer].caps.push_back(CapabilitySampledBuffer);
+ DimensionalityParams[DimSubpassData].caps.push_back(CapabilityInputAttachment);
+
+ // Group Operations
+ for (int i = 0; i < GroupOperationCeiling; ++i) {
+ GroupOperationParams[i].caps.push_back(CapabilityKernel);
+ }
+
+ // Enqueue flags
+ for (int i = 0; i < KernelEnqueueFlagsCeiling; ++i) {
+ KernelEnqueueFlagsParams[i].caps.push_back(CapabilityKernel);
+ }
+
+ // Profiling info
+ KernelProfilingInfoParams[0].caps.push_back(CapabilityKernel);
+
+ // set name of operator, an initial set of <id> style operands, and the description
+
+ InstructionDesc[OpSource].operands.push(OperandSource, "");
+ InstructionDesc[OpSource].operands.push(OperandLiteralNumber, "'Version'");
+ InstructionDesc[OpSource].operands.push(OperandId, "'File'", true);
+ InstructionDesc[OpSource].operands.push(OperandLiteralString, "'Source'", true);
+
+ InstructionDesc[OpSourceContinued].operands.push(OperandLiteralString, "'Continued Source'");
+
+ InstructionDesc[OpSourceExtension].operands.push(OperandLiteralString, "'Extension'");
+
+ InstructionDesc[OpName].operands.push(OperandId, "'Target'");
+ InstructionDesc[OpName].operands.push(OperandLiteralString, "'Name'");
+
+ InstructionDesc[OpMemberName].operands.push(OperandId, "'Type'");
+ InstructionDesc[OpMemberName].operands.push(OperandLiteralNumber, "'Member'");
+ InstructionDesc[OpMemberName].operands.push(OperandLiteralString, "'Name'");
+
+ InstructionDesc[OpString].operands.push(OperandLiteralString, "'String'");
+
+ InstructionDesc[OpLine].operands.push(OperandId, "'File'");
+ InstructionDesc[OpLine].operands.push(OperandLiteralNumber, "'Line'");
+ InstructionDesc[OpLine].operands.push(OperandLiteralNumber, "'Column'");
+
+ InstructionDesc[OpExtension].operands.push(OperandLiteralString, "'Name'");
+
+ InstructionDesc[OpExtInstImport].operands.push(OperandLiteralString, "'Name'");
+
+ InstructionDesc[OpCapability].operands.push(OperandCapability, "'Capability'");
+
+ InstructionDesc[OpMemoryModel].operands.push(OperandAddressing, "");
+ InstructionDesc[OpMemoryModel].operands.push(OperandMemory, "");
+
+ InstructionDesc[OpEntryPoint].operands.push(OperandExecutionModel, "");
+ InstructionDesc[OpEntryPoint].operands.push(OperandId, "'Entry Point'");
+ InstructionDesc[OpEntryPoint].operands.push(OperandLiteralString, "'Name'");
+ InstructionDesc[OpEntryPoint].operands.push(OperandVariableIds, "'Interface'");
+
+ InstructionDesc[OpExecutionMode].operands.push(OperandId, "'Entry Point'");
+ InstructionDesc[OpExecutionMode].operands.push(OperandExecutionMode, "'Mode'");
+ InstructionDesc[OpExecutionMode].operands.push(OperandOptionalLiteral, "See <<Execution_Mode,Execution Mode>>");
+
+ InstructionDesc[OpTypeInt].operands.push(OperandLiteralNumber, "'Width'");
+ InstructionDesc[OpTypeInt].operands.push(OperandLiteralNumber, "'Signedness'");
+
+ InstructionDesc[OpTypeFloat].operands.push(OperandLiteralNumber, "'Width'");
+
+ InstructionDesc[OpTypeVector].operands.push(OperandId, "'Component Type'");
+ InstructionDesc[OpTypeVector].operands.push(OperandLiteralNumber, "'Component Count'");
+
+ InstructionDesc[OpTypeMatrix].capabilities.push_back(CapabilityMatrix);
+ InstructionDesc[OpTypeMatrix].operands.push(OperandId, "'Column Type'");
+ InstructionDesc[OpTypeMatrix].operands.push(OperandLiteralNumber, "'Column Count'");
+
+ InstructionDesc[OpTypeImage].operands.push(OperandId, "'Sampled Type'");
+ InstructionDesc[OpTypeImage].operands.push(OperandDimensionality, "");
+ InstructionDesc[OpTypeImage].operands.push(OperandLiteralNumber, "'Depth'");
+ InstructionDesc[OpTypeImage].operands.push(OperandLiteralNumber, "'Arrayed'");
+ InstructionDesc[OpTypeImage].operands.push(OperandLiteralNumber, "'MS'");
+ InstructionDesc[OpTypeImage].operands.push(OperandLiteralNumber, "'Sampled'");
+ InstructionDesc[OpTypeImage].operands.push(OperandSamplerImageFormat, "");
+ InstructionDesc[OpTypeImage].operands.push(OperandAccessQualifier, "", true);
+
+ InstructionDesc[OpTypeSampledImage].operands.push(OperandId, "'Image Type'");
+
+ InstructionDesc[OpTypeArray].operands.push(OperandId, "'Element Type'");
+ InstructionDesc[OpTypeArray].operands.push(OperandId, "'Length'");
+
+ InstructionDesc[OpTypeRuntimeArray].capabilities.push_back(CapabilityShader);
+ InstructionDesc[OpTypeRuntimeArray].operands.push(OperandId, "'Element Type'");
+
+ InstructionDesc[OpTypeStruct].operands.push(OperandVariableIds, "'Member 0 type', +\n'member 1 type', +\n...");
+
+ InstructionDesc[OpTypeOpaque].capabilities.push_back(CapabilityKernel);
+ InstructionDesc[OpTypeOpaque].operands.push(OperandLiteralString, "The name of the opaque type.");
+
+ InstructionDesc[OpTypePointer].operands.push(OperandStorage, "");
+ InstructionDesc[OpTypePointer].operands.push(OperandId, "'Type'");
+
+ InstructionDesc[OpTypeForwardPointer].capabilities.push_back(CapabilityAddresses);
+ InstructionDesc[OpTypeForwardPointer].operands.push(OperandId, "'Pointer Type'");
+ InstructionDesc[OpTypeForwardPointer].operands.push(OperandStorage, "");
+
+ InstructionDesc[OpTypeEvent].capabilities.push_back(CapabilityKernel);
+
+ InstructionDesc[OpTypeDeviceEvent].capabilities.push_back(CapabilityDeviceEnqueue);
+
+ InstructionDesc[OpTypeReserveId].capabilities.push_back(CapabilityPipes);
+
+ InstructionDesc[OpTypeQueue].capabilities.push_back(CapabilityDeviceEnqueue);
+
+ InstructionDesc[OpTypePipe].operands.push(OperandAccessQualifier, "'Qualifier'");
+ InstructionDesc[OpTypePipe].capabilities.push_back(CapabilityPipes);
+
+ InstructionDesc[OpTypeFunction].operands.push(OperandId, "'Return Type'");
+ InstructionDesc[OpTypeFunction].operands.push(OperandVariableIds, "'Parameter 0 Type', +\n'Parameter 1 Type', +\n...");
+
+ InstructionDesc[OpConstant].operands.push(OperandVariableLiterals, "'Value'");
+
+ InstructionDesc[OpConstantComposite].operands.push(OperandVariableIds, "'Constituents'");
+
+ InstructionDesc[OpConstantSampler].capabilities.push_back(CapabilityLiteralSampler);
+ InstructionDesc[OpConstantSampler].operands.push(OperandSamplerAddressingMode, "");
+ InstructionDesc[OpConstantSampler].operands.push(OperandLiteralNumber, "'Param'");
+ InstructionDesc[OpConstantSampler].operands.push(OperandSamplerFilterMode, "");
+
+ InstructionDesc[OpSpecConstant].operands.push(OperandVariableLiterals, "'Value'");
+
+ InstructionDesc[OpSpecConstantComposite].operands.push(OperandVariableIds, "'Constituents'");
+
+ InstructionDesc[OpSpecConstantOp].operands.push(OperandLiteralNumber, "'Opcode'");
+ InstructionDesc[OpSpecConstantOp].operands.push(OperandVariableIds, "'Operands'");
+
+ InstructionDesc[OpVariable].operands.push(OperandStorage, "");
+ InstructionDesc[OpVariable].operands.push(OperandId, "'Initializer'", true);
+
+ InstructionDesc[OpFunction].operands.push(OperandFunction, "");
+ InstructionDesc[OpFunction].operands.push(OperandId, "'Function Type'");
+
+ InstructionDesc[OpFunctionCall].operands.push(OperandId, "'Function'");
+ InstructionDesc[OpFunctionCall].operands.push(OperandVariableIds, "'Argument 0', +\n'Argument 1', +\n...");
+
+ InstructionDesc[OpExtInst].operands.push(OperandId, "'Set'");
+ InstructionDesc[OpExtInst].operands.push(OperandLiteralNumber, "'Instruction'");
+ InstructionDesc[OpExtInst].operands.push(OperandVariableIds, "'Operand 1', +\n'Operand 2', +\n...");
+
+ InstructionDesc[OpLoad].operands.push(OperandId, "'Pointer'");
+ InstructionDesc[OpLoad].operands.push(OperandMemoryAccess, "", true);
+
+ InstructionDesc[OpStore].operands.push(OperandId, "'Pointer'");
+ InstructionDesc[OpStore].operands.push(OperandId, "'Object'");
+ InstructionDesc[OpStore].operands.push(OperandMemoryAccess, "", true);
+
+ InstructionDesc[OpPhi].operands.push(OperandVariableIds, "'Variable, Parent, ...'");
+
+ InstructionDesc[OpDecorate].operands.push(OperandId, "'Target'");
+ InstructionDesc[OpDecorate].operands.push(OperandDecoration, "");
+ InstructionDesc[OpDecorate].operands.push(OperandVariableLiterals, "See <<Decoration,'Decoration'>>.");
+
+ InstructionDesc[OpMemberDecorate].operands.push(OperandId, "'Structure Type'");
+ InstructionDesc[OpMemberDecorate].operands.push(OperandLiteralNumber, "'Member'");
+ InstructionDesc[OpMemberDecorate].operands.push(OperandDecoration, "");
+ InstructionDesc[OpMemberDecorate].operands.push(OperandVariableLiterals, "See <<Decoration,'Decoration'>>.");
+
+ InstructionDesc[OpGroupDecorate].operands.push(OperandId, "'Decoration Group'");
+ InstructionDesc[OpGroupDecorate].operands.push(OperandVariableIds, "'Targets'");
+
+ InstructionDesc[OpGroupMemberDecorate].operands.push(OperandId, "'Decoration Group'");
+ InstructionDesc[OpGroupMemberDecorate].operands.push(OperandVariableIdLiteral, "'Targets'");
+
+ InstructionDesc[OpVectorExtractDynamic].operands.push(OperandId, "'Vector'");
+ InstructionDesc[OpVectorExtractDynamic].operands.push(OperandId, "'Index'");
+
+ InstructionDesc[OpVectorInsertDynamic].operands.push(OperandId, "'Vector'");
+ InstructionDesc[OpVectorInsertDynamic].operands.push(OperandId, "'Component'");
+ InstructionDesc[OpVectorInsertDynamic].operands.push(OperandId, "'Index'");
+
+ InstructionDesc[OpVectorShuffle].operands.push(OperandId, "'Vector 1'");
+ InstructionDesc[OpVectorShuffle].operands.push(OperandId, "'Vector 2'");
+ InstructionDesc[OpVectorShuffle].operands.push(OperandVariableLiterals, "'Components'");
+
+ InstructionDesc[OpCompositeConstruct].operands.push(OperandVariableIds, "'Constituents'");
+
+ InstructionDesc[OpCompositeExtract].operands.push(OperandId, "'Composite'");
+ InstructionDesc[OpCompositeExtract].operands.push(OperandVariableLiterals, "'Indexes'");
+
+ InstructionDesc[OpCompositeInsert].operands.push(OperandId, "'Object'");
+ InstructionDesc[OpCompositeInsert].operands.push(OperandId, "'Composite'");
+ InstructionDesc[OpCompositeInsert].operands.push(OperandVariableLiterals, "'Indexes'");
+
+ InstructionDesc[OpCopyObject].operands.push(OperandId, "'Operand'");
+
+ InstructionDesc[OpCopyMemory].operands.push(OperandId, "'Target'");
+ InstructionDesc[OpCopyMemory].operands.push(OperandId, "'Source'");
+ InstructionDesc[OpCopyMemory].operands.push(OperandMemoryAccess, "", true);
+
+ InstructionDesc[OpCopyMemorySized].operands.push(OperandId, "'Target'");
+ InstructionDesc[OpCopyMemorySized].operands.push(OperandId, "'Source'");
+ InstructionDesc[OpCopyMemorySized].operands.push(OperandId, "'Size'");
+ InstructionDesc[OpCopyMemorySized].operands.push(OperandMemoryAccess, "", true);
+
+ InstructionDesc[OpCopyMemorySized].capabilities.push_back(CapabilityAddresses);
+
+ InstructionDesc[OpSampledImage].operands.push(OperandId, "'Image'");
+ InstructionDesc[OpSampledImage].operands.push(OperandId, "'Sampler'");
+
+ InstructionDesc[OpImage].operands.push(OperandId, "'Sampled Image'");
+
+ InstructionDesc[OpImageRead].operands.push(OperandId, "'Image'");
+ InstructionDesc[OpImageRead].operands.push(OperandId, "'Coordinate'");
+ InstructionDesc[OpImageRead].operands.push(OperandImageOperands, "", true);
+ InstructionDesc[OpImageRead].operands.push(OperandVariableIds, "", true);
+
+ InstructionDesc[OpImageWrite].operands.push(OperandId, "'Image'");
+ InstructionDesc[OpImageWrite].operands.push(OperandId, "'Coordinate'");
+ InstructionDesc[OpImageWrite].operands.push(OperandId, "'Texel'");
+ InstructionDesc[OpImageWrite].operands.push(OperandImageOperands, "", true);
+ InstructionDesc[OpImageWrite].operands.push(OperandVariableIds, "", true);
+
+ InstructionDesc[OpImageSampleImplicitLod].operands.push(OperandId, "'Sampled Image'");
+ InstructionDesc[OpImageSampleImplicitLod].operands.push(OperandId, "'Coordinate'");
+ InstructionDesc[OpImageSampleImplicitLod].operands.push(OperandImageOperands, "", true);
+ InstructionDesc[OpImageSampleImplicitLod].operands.push(OperandVariableIds, "", true);
+ InstructionDesc[OpImageSampleImplicitLod].capabilities.push_back(CapabilityShader);
+
+ InstructionDesc[OpImageSampleExplicitLod].operands.push(OperandId, "'Sampled Image'");
+ InstructionDesc[OpImageSampleExplicitLod].operands.push(OperandId, "'Coordinate'");
+ InstructionDesc[OpImageSampleExplicitLod].operands.push(OperandImageOperands, "", true);
+ InstructionDesc[OpImageSampleExplicitLod].operands.push(OperandVariableIds, "", true);
+
+ InstructionDesc[OpImageSampleDrefImplicitLod].operands.push(OperandId, "'Sampled Image'");
+ InstructionDesc[OpImageSampleDrefImplicitLod].operands.push(OperandId, "'Coordinate'");
+ InstructionDesc[OpImageSampleDrefImplicitLod].operands.push(OperandId, "'D~ref~'");
+ InstructionDesc[OpImageSampleDrefImplicitLod].operands.push(OperandImageOperands, "", true);
+ InstructionDesc[OpImageSampleDrefImplicitLod].operands.push(OperandVariableIds, "", true);
+ InstructionDesc[OpImageSampleDrefImplicitLod].capabilities.push_back(CapabilityShader);
+
+ InstructionDesc[OpImageSampleDrefExplicitLod].operands.push(OperandId, "'Sampled Image'");
+ InstructionDesc[OpImageSampleDrefExplicitLod].operands.push(OperandId, "'Coordinate'");
+ InstructionDesc[OpImageSampleDrefExplicitLod].operands.push(OperandId, "'D~ref~'");
+ InstructionDesc[OpImageSampleDrefExplicitLod].operands.push(OperandImageOperands, "", true);
+ InstructionDesc[OpImageSampleDrefExplicitLod].operands.push(OperandVariableIds, "", true);
+ InstructionDesc[OpImageSampleDrefExplicitLod].capabilities.push_back(CapabilityShader);
+
+ InstructionDesc[OpImageSampleProjImplicitLod].operands.push(OperandId, "'Sampled Image'");
+ InstructionDesc[OpImageSampleProjImplicitLod].operands.push(OperandId, "'Coordinate'");
+ InstructionDesc[OpImageSampleProjImplicitLod].operands.push(OperandImageOperands, "", true);
+ InstructionDesc[OpImageSampleProjImplicitLod].operands.push(OperandVariableIds, "", true);
+ InstructionDesc[OpImageSampleProjImplicitLod].capabilities.push_back(CapabilityShader);
+
+ InstructionDesc[OpImageSampleProjExplicitLod].operands.push(OperandId, "'Sampled Image'");
+ InstructionDesc[OpImageSampleProjExplicitLod].operands.push(OperandId, "'Coordinate'");
+ InstructionDesc[OpImageSampleProjExplicitLod].operands.push(OperandImageOperands, "", true);
+ InstructionDesc[OpImageSampleProjExplicitLod].operands.push(OperandVariableIds, "", true);
+ InstructionDesc[OpImageSampleProjExplicitLod].capabilities.push_back(CapabilityShader);
+
+ InstructionDesc[OpImageSampleProjDrefImplicitLod].operands.push(OperandId, "'Sampled Image'");
+ InstructionDesc[OpImageSampleProjDrefImplicitLod].operands.push(OperandId, "'Coordinate'");
+ InstructionDesc[OpImageSampleProjDrefImplicitLod].operands.push(OperandId, "'D~ref~'");
+ InstructionDesc[OpImageSampleProjDrefImplicitLod].operands.push(OperandImageOperands, "", true);
+ InstructionDesc[OpImageSampleProjDrefImplicitLod].operands.push(OperandVariableIds, "", true);
+ InstructionDesc[OpImageSampleProjDrefImplicitLod].capabilities.push_back(CapabilityShader);
+
+ InstructionDesc[OpImageSampleProjDrefExplicitLod].operands.push(OperandId, "'Sampled Image'");
+ InstructionDesc[OpImageSampleProjDrefExplicitLod].operands.push(OperandId, "'Coordinate'");
+ InstructionDesc[OpImageSampleProjDrefExplicitLod].operands.push(OperandId, "'D~ref~'");
+ InstructionDesc[OpImageSampleProjDrefExplicitLod].operands.push(OperandImageOperands, "", true);
+ InstructionDesc[OpImageSampleProjDrefExplicitLod].operands.push(OperandVariableIds, "", true);
+ InstructionDesc[OpImageSampleProjDrefExplicitLod].capabilities.push_back(CapabilityShader);
+
+ InstructionDesc[OpImageFetch].operands.push(OperandId, "'Image'");
+ InstructionDesc[OpImageFetch].operands.push(OperandId, "'Coordinate'");
+ InstructionDesc[OpImageFetch].operands.push(OperandImageOperands, "", true);
+ InstructionDesc[OpImageFetch].operands.push(OperandVariableIds, "", true);
+
+ InstructionDesc[OpImageGather].operands.push(OperandId, "'Sampled Image'");
+ InstructionDesc[OpImageGather].operands.push(OperandId, "'Coordinate'");
+ InstructionDesc[OpImageGather].operands.push(OperandId, "'Component'");
+ InstructionDesc[OpImageGather].operands.push(OperandImageOperands, "", true);
+ InstructionDesc[OpImageGather].operands.push(OperandVariableIds, "", true);
+ InstructionDesc[OpImageGather].capabilities.push_back(CapabilityShader);
+
+ InstructionDesc[OpImageDrefGather].operands.push(OperandId, "'Sampled Image'");
+ InstructionDesc[OpImageDrefGather].operands.push(OperandId, "'Coordinate'");
+ InstructionDesc[OpImageDrefGather].operands.push(OperandId, "'D~ref~'");
+ InstructionDesc[OpImageDrefGather].operands.push(OperandImageOperands, "", true);
+ InstructionDesc[OpImageDrefGather].operands.push(OperandVariableIds, "", true);
+ InstructionDesc[OpImageDrefGather].capabilities.push_back(CapabilityShader);
+
+ InstructionDesc[OpImageSparseSampleImplicitLod].operands.push(OperandId, "'Sampled Image'");
+ InstructionDesc[OpImageSparseSampleImplicitLod].operands.push(OperandId, "'Coordinate'");
+ InstructionDesc[OpImageSparseSampleImplicitLod].operands.push(OperandImageOperands, "", true);
+ InstructionDesc[OpImageSparseSampleImplicitLod].operands.push(OperandVariableIds, "", true);
+ InstructionDesc[OpImageSparseSampleImplicitLod].capabilities.push_back(CapabilitySparseResidency);
+
+ InstructionDesc[OpImageSparseSampleExplicitLod].operands.push(OperandId, "'Sampled Image'");
+ InstructionDesc[OpImageSparseSampleExplicitLod].operands.push(OperandId, "'Coordinate'");
+ InstructionDesc[OpImageSparseSampleExplicitLod].operands.push(OperandImageOperands, "", true);
+ InstructionDesc[OpImageSparseSampleExplicitLod].operands.push(OperandVariableIds, "", true);
+ InstructionDesc[OpImageSparseSampleExplicitLod].capabilities.push_back(CapabilitySparseResidency);
+
+ InstructionDesc[OpImageSparseSampleDrefImplicitLod].operands.push(OperandId, "'Sampled Image'");
+ InstructionDesc[OpImageSparseSampleDrefImplicitLod].operands.push(OperandId, "'Coordinate'");
+ InstructionDesc[OpImageSparseSampleDrefImplicitLod].operands.push(OperandId, "'D~ref~'");
+ InstructionDesc[OpImageSparseSampleDrefImplicitLod].operands.push(OperandImageOperands, "", true);
+ InstructionDesc[OpImageSparseSampleDrefImplicitLod].operands.push(OperandVariableIds, "", true);
+ InstructionDesc[OpImageSparseSampleDrefImplicitLod].capabilities.push_back(CapabilitySparseResidency);
+
+ InstructionDesc[OpImageSparseSampleDrefExplicitLod].operands.push(OperandId, "'Sampled Image'");
+ InstructionDesc[OpImageSparseSampleDrefExplicitLod].operands.push(OperandId, "'Coordinate'");
+ InstructionDesc[OpImageSparseSampleDrefExplicitLod].operands.push(OperandId, "'D~ref~'");
+ InstructionDesc[OpImageSparseSampleDrefExplicitLod].operands.push(OperandImageOperands, "", true);
+ InstructionDesc[OpImageSparseSampleDrefExplicitLod].operands.push(OperandVariableIds, "", true);
+ InstructionDesc[OpImageSparseSampleDrefExplicitLod].capabilities.push_back(CapabilitySparseResidency);
+
+ InstructionDesc[OpImageSparseSampleProjImplicitLod].operands.push(OperandId, "'Sampled Image'");
+ InstructionDesc[OpImageSparseSampleProjImplicitLod].operands.push(OperandId, "'Coordinate'");
+ InstructionDesc[OpImageSparseSampleProjImplicitLod].operands.push(OperandImageOperands, "", true);
+ InstructionDesc[OpImageSparseSampleProjImplicitLod].operands.push(OperandVariableIds, "", true);
+ InstructionDesc[OpImageSparseSampleProjImplicitLod].capabilities.push_back(CapabilitySparseResidency);
+
+ InstructionDesc[OpImageSparseSampleProjExplicitLod].operands.push(OperandId, "'Sampled Image'");
+ InstructionDesc[OpImageSparseSampleProjExplicitLod].operands.push(OperandId, "'Coordinate'");
+ InstructionDesc[OpImageSparseSampleProjExplicitLod].operands.push(OperandImageOperands, "", true);
+ InstructionDesc[OpImageSparseSampleProjExplicitLod].operands.push(OperandVariableIds, "", true);
+ InstructionDesc[OpImageSparseSampleProjExplicitLod].capabilities.push_back(CapabilitySparseResidency);
+
+ InstructionDesc[OpImageSparseSampleProjDrefImplicitLod].operands.push(OperandId, "'Sampled Image'");
+ InstructionDesc[OpImageSparseSampleProjDrefImplicitLod].operands.push(OperandId, "'Coordinate'");
+ InstructionDesc[OpImageSparseSampleProjDrefImplicitLod].operands.push(OperandId, "'D~ref~'");
+ InstructionDesc[OpImageSparseSampleProjDrefImplicitLod].operands.push(OperandImageOperands, "", true);
+ InstructionDesc[OpImageSparseSampleProjDrefImplicitLod].operands.push(OperandVariableIds, "", true);
+ InstructionDesc[OpImageSparseSampleProjDrefImplicitLod].capabilities.push_back(CapabilitySparseResidency);
+
+ InstructionDesc[OpImageSparseSampleProjDrefExplicitLod].operands.push(OperandId, "'Sampled Image'");
+ InstructionDesc[OpImageSparseSampleProjDrefExplicitLod].operands.push(OperandId, "'Coordinate'");
+ InstructionDesc[OpImageSparseSampleProjDrefExplicitLod].operands.push(OperandId, "'D~ref~'");
+ InstructionDesc[OpImageSparseSampleProjDrefExplicitLod].operands.push(OperandImageOperands, "", true);
+ InstructionDesc[OpImageSparseSampleProjDrefExplicitLod].operands.push(OperandVariableIds, "", true);
+ InstructionDesc[OpImageSparseSampleProjDrefExplicitLod].capabilities.push_back(CapabilitySparseResidency);
+
+ InstructionDesc[OpImageSparseFetch].operands.push(OperandId, "'Image'");
+ InstructionDesc[OpImageSparseFetch].operands.push(OperandId, "'Coordinate'");
+ InstructionDesc[OpImageSparseFetch].operands.push(OperandImageOperands, "", true);
+ InstructionDesc[OpImageSparseFetch].operands.push(OperandVariableIds, "", true);
+ InstructionDesc[OpImageSparseFetch].capabilities.push_back(CapabilitySparseResidency);
+
+ InstructionDesc[OpImageSparseGather].operands.push(OperandId, "'Sampled Image'");
+ InstructionDesc[OpImageSparseGather].operands.push(OperandId, "'Coordinate'");
+ InstructionDesc[OpImageSparseGather].operands.push(OperandId, "'Component'");
+ InstructionDesc[OpImageSparseGather].operands.push(OperandImageOperands, "", true);
+ InstructionDesc[OpImageSparseGather].operands.push(OperandVariableIds, "", true);
+ InstructionDesc[OpImageSparseGather].capabilities.push_back(CapabilitySparseResidency);
+
+ InstructionDesc[OpImageSparseDrefGather].operands.push(OperandId, "'Sampled Image'");
+ InstructionDesc[OpImageSparseDrefGather].operands.push(OperandId, "'Coordinate'");
+ InstructionDesc[OpImageSparseDrefGather].operands.push(OperandId, "'D~ref~'");
+ InstructionDesc[OpImageSparseDrefGather].operands.push(OperandImageOperands, "", true);
+ InstructionDesc[OpImageSparseDrefGather].operands.push(OperandVariableIds, "", true);
+ InstructionDesc[OpImageSparseDrefGather].capabilities.push_back(CapabilitySparseResidency);
+
+ InstructionDesc[OpImageSparseRead].operands.push(OperandId, "'Image'");
+ InstructionDesc[OpImageSparseRead].operands.push(OperandId, "'Coordinate'");
+ InstructionDesc[OpImageSparseRead].operands.push(OperandImageOperands, "", true);
+ InstructionDesc[OpImageSparseRead].operands.push(OperandVariableIds, "", true);
+ InstructionDesc[OpImageSparseRead].capabilities.push_back(CapabilitySparseResidency);
+
+ InstructionDesc[OpImageSparseTexelsResident].operands.push(OperandId, "'Resident Code'");
+ InstructionDesc[OpImageSparseTexelsResident].capabilities.push_back(CapabilitySparseResidency);
+
+ InstructionDesc[OpImageQuerySizeLod].operands.push(OperandId, "'Image'");
+ InstructionDesc[OpImageQuerySizeLod].operands.push(OperandId, "'Level of Detail'");
+ InstructionDesc[OpImageQuerySizeLod].capabilities.push_back(CapabilityKernel);
+ InstructionDesc[OpImageQuerySizeLod].capabilities.push_back(CapabilityImageQuery);
+
+ InstructionDesc[OpImageQuerySize].operands.push(OperandId, "'Image'");
+ InstructionDesc[OpImageQuerySize].capabilities.push_back(CapabilityKernel);
+ InstructionDesc[OpImageQuerySize].capabilities.push_back(CapabilityImageQuery);
+
+ InstructionDesc[OpImageQueryLod].operands.push(OperandId, "'Image'");
+ InstructionDesc[OpImageQueryLod].operands.push(OperandId, "'Coordinate'");
+ InstructionDesc[OpImageQueryLod].capabilities.push_back(CapabilityImageQuery);
+
+ InstructionDesc[OpImageQueryLevels].operands.push(OperandId, "'Image'");
+ InstructionDesc[OpImageQueryLevels].capabilities.push_back(CapabilityKernel);
+ InstructionDesc[OpImageQueryLevels].capabilities.push_back(CapabilityImageQuery);
+
+ InstructionDesc[OpImageQuerySamples].operands.push(OperandId, "'Image'");
+ InstructionDesc[OpImageQuerySamples].capabilities.push_back(CapabilityKernel);
+ InstructionDesc[OpImageQuerySamples].capabilities.push_back(CapabilityImageQuery);
+
+ InstructionDesc[OpImageQueryFormat].operands.push(OperandId, "'Image'");
+ InstructionDesc[OpImageQueryFormat].capabilities.push_back(CapabilityKernel);
+
+ InstructionDesc[OpImageQueryOrder].operands.push(OperandId, "'Image'");
+ InstructionDesc[OpImageQueryOrder].capabilities.push_back(CapabilityKernel);
+
+ InstructionDesc[OpAccessChain].operands.push(OperandId, "'Base'");
+ InstructionDesc[OpAccessChain].operands.push(OperandVariableIds, "'Indexes'");
+
+ InstructionDesc[OpInBoundsAccessChain].operands.push(OperandId, "'Base'");
+ InstructionDesc[OpInBoundsAccessChain].operands.push(OperandVariableIds, "'Indexes'");
+
+ InstructionDesc[OpPtrAccessChain].operands.push(OperandId, "'Base'");
+ InstructionDesc[OpPtrAccessChain].operands.push(OperandId, "'Element'");
+ InstructionDesc[OpPtrAccessChain].operands.push(OperandVariableIds, "'Indexes'");
+ InstructionDesc[OpPtrAccessChain].capabilities.push_back(CapabilityAddresses);
+
+ InstructionDesc[OpInBoundsPtrAccessChain].operands.push(OperandId, "'Base'");
+ InstructionDesc[OpInBoundsPtrAccessChain].operands.push(OperandId, "'Element'");
+ InstructionDesc[OpInBoundsPtrAccessChain].operands.push(OperandVariableIds, "'Indexes'");
+ InstructionDesc[OpInBoundsPtrAccessChain].capabilities.push_back(CapabilityAddresses);
+
+ InstructionDesc[OpSNegate].operands.push(OperandId, "'Operand'");
+
+ InstructionDesc[OpFNegate].operands.push(OperandId, "'Operand'");
+
+ InstructionDesc[OpNot].operands.push(OperandId, "'Operand'");
+
+ InstructionDesc[OpAny].operands.push(OperandId, "'Vector'");
+
+ InstructionDesc[OpAll].operands.push(OperandId, "'Vector'");
+
+ InstructionDesc[OpConvertFToU].operands.push(OperandId, "'Float Value'");
+
+ InstructionDesc[OpConvertFToS].operands.push(OperandId, "'Float Value'");
+
+ InstructionDesc[OpConvertSToF].operands.push(OperandId, "'Signed Value'");
+
+ InstructionDesc[OpConvertUToF].operands.push(OperandId, "'Unsigned Value'");
+
+ InstructionDesc[OpUConvert].operands.push(OperandId, "'Unsigned Value'");
+
+ InstructionDesc[OpSConvert].operands.push(OperandId, "'Signed Value'");
+
+ InstructionDesc[OpFConvert].operands.push(OperandId, "'Float Value'");
+
+ InstructionDesc[OpSatConvertSToU].operands.push(OperandId, "'Signed Value'");
+ InstructionDesc[OpSatConvertSToU].capabilities.push_back(CapabilityKernel);
+
+ InstructionDesc[OpSatConvertUToS].operands.push(OperandId, "'Unsigned Value'");
+ InstructionDesc[OpSatConvertUToS].capabilities.push_back(CapabilityKernel);
+
+ InstructionDesc[OpConvertPtrToU].operands.push(OperandId, "'Pointer'");
+ InstructionDesc[OpConvertPtrToU].capabilities.push_back(CapabilityAddresses);
+
+ InstructionDesc[OpConvertUToPtr].operands.push(OperandId, "'Integer Value'");
+ InstructionDesc[OpConvertUToPtr].capabilities.push_back(CapabilityAddresses);
+
+ InstructionDesc[OpPtrCastToGeneric].operands.push(OperandId, "'Pointer'");
+ InstructionDesc[OpPtrCastToGeneric].capabilities.push_back(CapabilityKernel);
+
+ InstructionDesc[OpGenericCastToPtr].operands.push(OperandId, "'Pointer'");
+ InstructionDesc[OpGenericCastToPtr].capabilities.push_back(CapabilityKernel);
+
+ InstructionDesc[OpGenericCastToPtrExplicit].operands.push(OperandId, "'Pointer'");
+ InstructionDesc[OpGenericCastToPtrExplicit].operands.push(OperandStorage, "'Storage'");
+ InstructionDesc[OpGenericCastToPtrExplicit].capabilities.push_back(CapabilityKernel);
+
+ InstructionDesc[OpGenericPtrMemSemantics].operands.push(OperandId, "'Pointer'");
+ InstructionDesc[OpGenericPtrMemSemantics].capabilities.push_back(CapabilityKernel);
+
+ InstructionDesc[OpBitcast].operands.push(OperandId, "'Operand'");
+
+ InstructionDesc[OpQuantizeToF16].operands.push(OperandId, "'Value'");
+
+ InstructionDesc[OpTranspose].capabilities.push_back(CapabilityMatrix);
+ InstructionDesc[OpTranspose].operands.push(OperandId, "'Matrix'");
+
+ InstructionDesc[OpIsNan].operands.push(OperandId, "'x'");
+
+ InstructionDesc[OpIsInf].operands.push(OperandId, "'x'");
+
+ InstructionDesc[OpIsFinite].capabilities.push_back(CapabilityKernel);
+ InstructionDesc[OpIsFinite].operands.push(OperandId, "'x'");
+
+ InstructionDesc[OpIsNormal].capabilities.push_back(CapabilityKernel);
+ InstructionDesc[OpIsNormal].operands.push(OperandId, "'x'");
+
+ InstructionDesc[OpSignBitSet].capabilities.push_back(CapabilityKernel);
+ InstructionDesc[OpSignBitSet].operands.push(OperandId, "'x'");
+
+ InstructionDesc[OpLessOrGreater].capabilities.push_back(CapabilityKernel);
+ InstructionDesc[OpLessOrGreater].operands.push(OperandId, "'x'");
+ InstructionDesc[OpLessOrGreater].operands.push(OperandId, "'y'");
+
+ InstructionDesc[OpOrdered].capabilities.push_back(CapabilityKernel);
+ InstructionDesc[OpOrdered].operands.push(OperandId, "'x'");
+ InstructionDesc[OpOrdered].operands.push(OperandId, "'y'");
+
+ InstructionDesc[OpUnordered].capabilities.push_back(CapabilityKernel);
+ InstructionDesc[OpUnordered].operands.push(OperandId, "'x'");
+ InstructionDesc[OpUnordered].operands.push(OperandId, "'y'");
+
+ InstructionDesc[OpArrayLength].operands.push(OperandId, "'Structure'");
+ InstructionDesc[OpArrayLength].operands.push(OperandLiteralNumber, "'Array member'");
+ InstructionDesc[OpArrayLength].capabilities.push_back(CapabilityShader);
+
+ InstructionDesc[OpIAdd].operands.push(OperandId, "'Operand 1'");
+ InstructionDesc[OpIAdd].operands.push(OperandId, "'Operand 2'");
+
+ InstructionDesc[OpFAdd].operands.push(OperandId, "'Operand 1'");
+ InstructionDesc[OpFAdd].operands.push(OperandId, "'Operand 2'");
+
+ InstructionDesc[OpISub].operands.push(OperandId, "'Operand 1'");
+ InstructionDesc[OpISub].operands.push(OperandId, "'Operand 2'");
+
+ InstructionDesc[OpFSub].operands.push(OperandId, "'Operand 1'");
+ InstructionDesc[OpFSub].operands.push(OperandId, "'Operand 2'");
+
+ InstructionDesc[OpIMul].operands.push(OperandId, "'Operand 1'");
+ InstructionDesc[OpIMul].operands.push(OperandId, "'Operand 2'");
+
+ InstructionDesc[OpFMul].operands.push(OperandId, "'Operand 1'");
+ InstructionDesc[OpFMul].operands.push(OperandId, "'Operand 2'");
+
+ InstructionDesc[OpUDiv].operands.push(OperandId, "'Operand 1'");
+ InstructionDesc[OpUDiv].operands.push(OperandId, "'Operand 2'");
+
+ InstructionDesc[OpSDiv].operands.push(OperandId, "'Operand 1'");
+ InstructionDesc[OpSDiv].operands.push(OperandId, "'Operand 2'");
+
+ InstructionDesc[OpFDiv].operands.push(OperandId, "'Operand 1'");
+ InstructionDesc[OpFDiv].operands.push(OperandId, "'Operand 2'");
+
+ InstructionDesc[OpUMod].operands.push(OperandId, "'Operand 1'");
+ InstructionDesc[OpUMod].operands.push(OperandId, "'Operand 2'");
+
+ InstructionDesc[OpSRem].operands.push(OperandId, "'Operand 1'");
+ InstructionDesc[OpSRem].operands.push(OperandId, "'Operand 2'");
+
+ InstructionDesc[OpSMod].operands.push(OperandId, "'Operand 1'");
+ InstructionDesc[OpSMod].operands.push(OperandId, "'Operand 2'");
+
+ InstructionDesc[OpFRem].operands.push(OperandId, "'Operand 1'");
+ InstructionDesc[OpFRem].operands.push(OperandId, "'Operand 2'");
+
+ InstructionDesc[OpFMod].operands.push(OperandId, "'Operand 1'");
+ InstructionDesc[OpFMod].operands.push(OperandId, "'Operand 2'");
+
+ InstructionDesc[OpVectorTimesScalar].operands.push(OperandId, "'Vector'");
+ InstructionDesc[OpVectorTimesScalar].operands.push(OperandId, "'Scalar'");
+
+ InstructionDesc[OpMatrixTimesScalar].capabilities.push_back(CapabilityMatrix);
+ InstructionDesc[OpMatrixTimesScalar].operands.push(OperandId, "'Matrix'");
+ InstructionDesc[OpMatrixTimesScalar].operands.push(OperandId, "'Scalar'");
+
+ InstructionDesc[OpVectorTimesMatrix].capabilities.push_back(CapabilityMatrix);
+ InstructionDesc[OpVectorTimesMatrix].operands.push(OperandId, "'Vector'");
+ InstructionDesc[OpVectorTimesMatrix].operands.push(OperandId, "'Matrix'");
+
+ InstructionDesc[OpMatrixTimesVector].capabilities.push_back(CapabilityMatrix);
+ InstructionDesc[OpMatrixTimesVector].operands.push(OperandId, "'Matrix'");
+ InstructionDesc[OpMatrixTimesVector].operands.push(OperandId, "'Vector'");
+
+ InstructionDesc[OpMatrixTimesMatrix].capabilities.push_back(CapabilityMatrix);
+ InstructionDesc[OpMatrixTimesMatrix].operands.push(OperandId, "'LeftMatrix'");
+ InstructionDesc[OpMatrixTimesMatrix].operands.push(OperandId, "'RightMatrix'");
+
+ InstructionDesc[OpOuterProduct].capabilities.push_back(CapabilityMatrix);
+ InstructionDesc[OpOuterProduct].operands.push(OperandId, "'Vector 1'");
+ InstructionDesc[OpOuterProduct].operands.push(OperandId, "'Vector 2'");
+
+ InstructionDesc[OpDot].operands.push(OperandId, "'Vector 1'");
+ InstructionDesc[OpDot].operands.push(OperandId, "'Vector 2'");
+
+ InstructionDesc[OpIAddCarry].operands.push(OperandId, "'Operand 1'");
+ InstructionDesc[OpIAddCarry].operands.push(OperandId, "'Operand 2'");
+
+ InstructionDesc[OpISubBorrow].operands.push(OperandId, "'Operand 1'");
+ InstructionDesc[OpISubBorrow].operands.push(OperandId, "'Operand 2'");
+
+ InstructionDesc[OpUMulExtended].operands.push(OperandId, "'Operand 1'");
+ InstructionDesc[OpUMulExtended].operands.push(OperandId, "'Operand 2'");
+
+ InstructionDesc[OpSMulExtended].operands.push(OperandId, "'Operand 1'");
+ InstructionDesc[OpSMulExtended].operands.push(OperandId, "'Operand 2'");
+
+ InstructionDesc[OpShiftRightLogical].operands.push(OperandId, "'Base'");
+ InstructionDesc[OpShiftRightLogical].operands.push(OperandId, "'Shift'");
+
+ InstructionDesc[OpShiftRightArithmetic].operands.push(OperandId, "'Base'");
+ InstructionDesc[OpShiftRightArithmetic].operands.push(OperandId, "'Shift'");
+
+ InstructionDesc[OpShiftLeftLogical].operands.push(OperandId, "'Base'");
+ InstructionDesc[OpShiftLeftLogical].operands.push(OperandId, "'Shift'");
+
+ InstructionDesc[OpLogicalOr].operands.push(OperandId, "'Operand 1'");
+ InstructionDesc[OpLogicalOr].operands.push(OperandId, "'Operand 2'");
+
+ InstructionDesc[OpLogicalAnd].operands.push(OperandId, "'Operand 1'");
+ InstructionDesc[OpLogicalAnd].operands.push(OperandId, "'Operand 2'");
+
+ InstructionDesc[OpLogicalEqual].operands.push(OperandId, "'Operand 1'");
+ InstructionDesc[OpLogicalEqual].operands.push(OperandId, "'Operand 2'");
+
+ InstructionDesc[OpLogicalNotEqual].operands.push(OperandId, "'Operand 1'");
+ InstructionDesc[OpLogicalNotEqual].operands.push(OperandId, "'Operand 2'");
+
+ InstructionDesc[OpLogicalNot].operands.push(OperandId, "'Operand'");
+
+ InstructionDesc[OpBitwiseOr].operands.push(OperandId, "'Operand 1'");
+ InstructionDesc[OpBitwiseOr].operands.push(OperandId, "'Operand 2'");
+
+ InstructionDesc[OpBitwiseXor].operands.push(OperandId, "'Operand 1'");
+ InstructionDesc[OpBitwiseXor].operands.push(OperandId, "'Operand 2'");
+
+ InstructionDesc[OpBitwiseAnd].operands.push(OperandId, "'Operand 1'");
+ InstructionDesc[OpBitwiseAnd].operands.push(OperandId, "'Operand 2'");
+
+ InstructionDesc[OpBitFieldInsert].capabilities.push_back(CapabilityShader);
+ InstructionDesc[OpBitFieldInsert].operands.push(OperandId, "'Base'");
+ InstructionDesc[OpBitFieldInsert].operands.push(OperandId, "'Insert'");
+ InstructionDesc[OpBitFieldInsert].operands.push(OperandId, "'Offset'");
+ InstructionDesc[OpBitFieldInsert].operands.push(OperandId, "'Count'");
+
+ InstructionDesc[OpBitFieldSExtract].capabilities.push_back(CapabilityShader);
+ InstructionDesc[OpBitFieldSExtract].operands.push(OperandId, "'Base'");
+ InstructionDesc[OpBitFieldSExtract].operands.push(OperandId, "'Offset'");
+ InstructionDesc[OpBitFieldSExtract].operands.push(OperandId, "'Count'");
+
+ InstructionDesc[OpBitFieldUExtract].capabilities.push_back(CapabilityShader);
+ InstructionDesc[OpBitFieldUExtract].operands.push(OperandId, "'Base'");
+ InstructionDesc[OpBitFieldUExtract].operands.push(OperandId, "'Offset'");
+ InstructionDesc[OpBitFieldUExtract].operands.push(OperandId, "'Count'");
+
+ InstructionDesc[OpBitReverse].capabilities.push_back(CapabilityShader);
+ InstructionDesc[OpBitReverse].operands.push(OperandId, "'Base'");
+
+ InstructionDesc[OpBitCount].operands.push(OperandId, "'Base'");
+
+ InstructionDesc[OpSelect].operands.push(OperandId, "'Condition'");
+ InstructionDesc[OpSelect].operands.push(OperandId, "'Object 1'");
+ InstructionDesc[OpSelect].operands.push(OperandId, "'Object 2'");
+
+ InstructionDesc[OpIEqual].operands.push(OperandId, "'Operand 1'");
+ InstructionDesc[OpIEqual].operands.push(OperandId, "'Operand 2'");
+
+ InstructionDesc[OpFOrdEqual].operands.push(OperandId, "'Operand 1'");
+ InstructionDesc[OpFOrdEqual].operands.push(OperandId, "'Operand 2'");
+
+ InstructionDesc[OpFUnordEqual].operands.push(OperandId, "'Operand 1'");
+ InstructionDesc[OpFUnordEqual].operands.push(OperandId, "'Operand 2'");
+
+ InstructionDesc[OpINotEqual].operands.push(OperandId, "'Operand 1'");
+ InstructionDesc[OpINotEqual].operands.push(OperandId, "'Operand 2'");
+
+ InstructionDesc[OpFOrdNotEqual].operands.push(OperandId, "'Operand 1'");
+ InstructionDesc[OpFOrdNotEqual].operands.push(OperandId, "'Operand 2'");
+
+ InstructionDesc[OpFUnordNotEqual].operands.push(OperandId, "'Operand 1'");
+ InstructionDesc[OpFUnordNotEqual].operands.push(OperandId, "'Operand 2'");
+
+ InstructionDesc[OpULessThan].operands.push(OperandId, "'Operand 1'");
+ InstructionDesc[OpULessThan].operands.push(OperandId, "'Operand 2'");
+
+ InstructionDesc[OpSLessThan].operands.push(OperandId, "'Operand 1'");
+ InstructionDesc[OpSLessThan].operands.push(OperandId, "'Operand 2'");
+
+ InstructionDesc[OpFOrdLessThan].operands.push(OperandId, "'Operand 1'");
+ InstructionDesc[OpFOrdLessThan].operands.push(OperandId, "'Operand 2'");
+
+ InstructionDesc[OpFUnordLessThan].operands.push(OperandId, "'Operand 1'");
+ InstructionDesc[OpFUnordLessThan].operands.push(OperandId, "'Operand 2'");
+
+ InstructionDesc[OpUGreaterThan].operands.push(OperandId, "'Operand 1'");
+ InstructionDesc[OpUGreaterThan].operands.push(OperandId, "'Operand 2'");
+
+ InstructionDesc[OpSGreaterThan].operands.push(OperandId, "'Operand 1'");
+ InstructionDesc[OpSGreaterThan].operands.push(OperandId, "'Operand 2'");
+
+ InstructionDesc[OpFOrdGreaterThan].operands.push(OperandId, "'Operand 1'");
+ InstructionDesc[OpFOrdGreaterThan].operands.push(OperandId, "'Operand 2'");
+
+ InstructionDesc[OpFUnordGreaterThan].operands.push(OperandId, "'Operand 1'");
+ InstructionDesc[OpFUnordGreaterThan].operands.push(OperandId, "'Operand 2'");
+
+ InstructionDesc[OpULessThanEqual].operands.push(OperandId, "'Operand 1'");
+ InstructionDesc[OpULessThanEqual].operands.push(OperandId, "'Operand 2'");
+
+ InstructionDesc[OpSLessThanEqual].operands.push(OperandId, "'Operand 1'");
+ InstructionDesc[OpSLessThanEqual].operands.push(OperandId, "'Operand 2'");
+
+ InstructionDesc[OpFOrdLessThanEqual].operands.push(OperandId, "'Operand 1'");
+ InstructionDesc[OpFOrdLessThanEqual].operands.push(OperandId, "'Operand 2'");
+
+ InstructionDesc[OpFUnordLessThanEqual].operands.push(OperandId, "'Operand 1'");
+ InstructionDesc[OpFUnordLessThanEqual].operands.push(OperandId, "'Operand 2'");
+
+ InstructionDesc[OpUGreaterThanEqual].operands.push(OperandId, "'Operand 1'");
+ InstructionDesc[OpUGreaterThanEqual].operands.push(OperandId, "'Operand 2'");
+
+ InstructionDesc[OpSGreaterThanEqual].operands.push(OperandId, "'Operand 1'");
+ InstructionDesc[OpSGreaterThanEqual].operands.push(OperandId, "'Operand 2'");
+
+ InstructionDesc[OpFOrdGreaterThanEqual].operands.push(OperandId, "'Operand 1'");
+ InstructionDesc[OpFOrdGreaterThanEqual].operands.push(OperandId, "'Operand 2'");
+
+ InstructionDesc[OpFUnordGreaterThanEqual].operands.push(OperandId, "'Operand 1'");
+ InstructionDesc[OpFUnordGreaterThanEqual].operands.push(OperandId, "'Operand 2'");
+
+ InstructionDesc[OpDPdx].capabilities.push_back(CapabilityShader);
+ InstructionDesc[OpDPdx].operands.push(OperandId, "'P'");
+
+ InstructionDesc[OpDPdy].capabilities.push_back(CapabilityShader);
+ InstructionDesc[OpDPdy].operands.push(OperandId, "'P'");
+
+ InstructionDesc[OpFwidth].capabilities.push_back(CapabilityShader);
+ InstructionDesc[OpFwidth].operands.push(OperandId, "'P'");
+
+ InstructionDesc[OpDPdxFine].capabilities.push_back(CapabilityDerivativeControl);
+ InstructionDesc[OpDPdxFine].operands.push(OperandId, "'P'");
+
+ InstructionDesc[OpDPdyFine].capabilities.push_back(CapabilityDerivativeControl);
+ InstructionDesc[OpDPdyFine].operands.push(OperandId, "'P'");
+
+ InstructionDesc[OpFwidthFine].capabilities.push_back(CapabilityDerivativeControl);
+ InstructionDesc[OpFwidthFine].operands.push(OperandId, "'P'");
+
+ InstructionDesc[OpDPdxCoarse].capabilities.push_back(CapabilityDerivativeControl);
+ InstructionDesc[OpDPdxCoarse].operands.push(OperandId, "'P'");
+
+ InstructionDesc[OpDPdyCoarse].capabilities.push_back(CapabilityDerivativeControl);
+ InstructionDesc[OpDPdyCoarse].operands.push(OperandId, "'P'");
+
+ InstructionDesc[OpFwidthCoarse].capabilities.push_back(CapabilityDerivativeControl);
+ InstructionDesc[OpFwidthCoarse].operands.push(OperandId, "'P'");
+
+ InstructionDesc[OpEmitVertex].capabilities.push_back(CapabilityGeometry);
+
+ InstructionDesc[OpEndPrimitive].capabilities.push_back(CapabilityGeometry);
+
+ InstructionDesc[OpEmitStreamVertex].operands.push(OperandId, "'Stream'");
+ InstructionDesc[OpEmitStreamVertex].capabilities.push_back(CapabilityGeometryStreams);
+
+ InstructionDesc[OpEndStreamPrimitive].operands.push(OperandId, "'Stream'");
+ InstructionDesc[OpEndStreamPrimitive].capabilities.push_back(CapabilityGeometryStreams);
+
+ InstructionDesc[OpControlBarrier].operands.push(OperandScope, "'Execution'");
+ InstructionDesc[OpControlBarrier].operands.push(OperandScope, "'Memory'");
+ InstructionDesc[OpControlBarrier].operands.push(OperandMemorySemantics, "'Semantics'");
+
+ InstructionDesc[OpMemoryBarrier].operands.push(OperandScope, "'Memory'");
+ InstructionDesc[OpMemoryBarrier].operands.push(OperandMemorySemantics, "'Semantics'");
+
+ InstructionDesc[OpImageTexelPointer].operands.push(OperandId, "'Image'");
+ InstructionDesc[OpImageTexelPointer].operands.push(OperandId, "'Coordinate'");
+ InstructionDesc[OpImageTexelPointer].operands.push(OperandId, "'Sample'");
+
+ InstructionDesc[OpAtomicLoad].operands.push(OperandId, "'Pointer'");
+ InstructionDesc[OpAtomicLoad].operands.push(OperandScope, "'Scope'");
+ InstructionDesc[OpAtomicLoad].operands.push(OperandMemorySemantics, "'Semantics'");
+
+ InstructionDesc[OpAtomicStore].operands.push(OperandId, "'Pointer'");
+ InstructionDesc[OpAtomicStore].operands.push(OperandScope, "'Scope'");
+ InstructionDesc[OpAtomicStore].operands.push(OperandMemorySemantics, "'Semantics'");
+ InstructionDesc[OpAtomicStore].operands.push(OperandId, "'Value'");
+
+ InstructionDesc[OpAtomicExchange].operands.push(OperandId, "'Pointer'");
+ InstructionDesc[OpAtomicExchange].operands.push(OperandScope, "'Scope'");
+ InstructionDesc[OpAtomicExchange].operands.push(OperandMemorySemantics, "'Semantics'");
+ InstructionDesc[OpAtomicExchange].operands.push(OperandId, "'Value'");
+
+ InstructionDesc[OpAtomicCompareExchange].operands.push(OperandId, "'Pointer'");
+ InstructionDesc[OpAtomicCompareExchange].operands.push(OperandScope, "'Scope'");
+ InstructionDesc[OpAtomicCompareExchange].operands.push(OperandMemorySemantics, "'Equal'");
+ InstructionDesc[OpAtomicCompareExchange].operands.push(OperandMemorySemantics, "'Unequal'");
+ InstructionDesc[OpAtomicCompareExchange].operands.push(OperandId, "'Value'");
+ InstructionDesc[OpAtomicCompareExchange].operands.push(OperandId, "'Comparator'");
+
+ InstructionDesc[OpAtomicCompareExchangeWeak].operands.push(OperandId, "'Pointer'");
+ InstructionDesc[OpAtomicCompareExchangeWeak].operands.push(OperandScope, "'Scope'");
+ InstructionDesc[OpAtomicCompareExchangeWeak].operands.push(OperandMemorySemantics, "'Equal'");
+ InstructionDesc[OpAtomicCompareExchangeWeak].operands.push(OperandMemorySemantics, "'Unequal'");
+ InstructionDesc[OpAtomicCompareExchangeWeak].operands.push(OperandId, "'Value'");
+ InstructionDesc[OpAtomicCompareExchangeWeak].operands.push(OperandId, "'Comparator'");
+ InstructionDesc[OpAtomicCompareExchangeWeak].capabilities.push_back(CapabilityKernel);
+
+ InstructionDesc[OpAtomicIIncrement].operands.push(OperandId, "'Pointer'");
+ InstructionDesc[OpAtomicIIncrement].operands.push(OperandScope, "'Scope'");
+ InstructionDesc[OpAtomicIIncrement].operands.push(OperandMemorySemantics, "'Semantics'");
+
+ InstructionDesc[OpAtomicIDecrement].operands.push(OperandId, "'Pointer'");
+ InstructionDesc[OpAtomicIDecrement].operands.push(OperandScope, "'Scope'");
+ InstructionDesc[OpAtomicIDecrement].operands.push(OperandMemorySemantics, "'Semantics'");
+
+ InstructionDesc[OpAtomicIAdd].operands.push(OperandId, "'Pointer'");
+ InstructionDesc[OpAtomicIAdd].operands.push(OperandScope, "'Scope'");
+ InstructionDesc[OpAtomicIAdd].operands.push(OperandMemorySemantics, "'Semantics'");
+ InstructionDesc[OpAtomicIAdd].operands.push(OperandId, "'Value'");
+
+ InstructionDesc[OpAtomicISub].operands.push(OperandId, "'Pointer'");
+ InstructionDesc[OpAtomicISub].operands.push(OperandScope, "'Scope'");
+ InstructionDesc[OpAtomicISub].operands.push(OperandMemorySemantics, "'Semantics'");
+ InstructionDesc[OpAtomicISub].operands.push(OperandId, "'Value'");
+
+ InstructionDesc[OpAtomicUMin].operands.push(OperandId, "'Pointer'");
+ InstructionDesc[OpAtomicUMin].operands.push(OperandScope, "'Scope'");
+ InstructionDesc[OpAtomicUMin].operands.push(OperandMemorySemantics, "'Semantics'");
+ InstructionDesc[OpAtomicUMin].operands.push(OperandId, "'Value'");
+
+ InstructionDesc[OpAtomicUMax].operands.push(OperandId, "'Pointer'");
+ InstructionDesc[OpAtomicUMax].operands.push(OperandScope, "'Scope'");
+ InstructionDesc[OpAtomicUMax].operands.push(OperandMemorySemantics, "'Semantics'");
+ InstructionDesc[OpAtomicUMax].operands.push(OperandId, "'Value'");
+
+ InstructionDesc[OpAtomicSMin].operands.push(OperandId, "'Pointer'");
+ InstructionDesc[OpAtomicSMin].operands.push(OperandScope, "'Scope'");
+ InstructionDesc[OpAtomicSMin].operands.push(OperandMemorySemantics, "'Semantics'");
+ InstructionDesc[OpAtomicSMin].operands.push(OperandId, "'Value'");
+
+ InstructionDesc[OpAtomicSMax].operands.push(OperandId, "'Pointer'");
+ InstructionDesc[OpAtomicSMax].operands.push(OperandScope, "'Scope'");
+ InstructionDesc[OpAtomicSMax].operands.push(OperandMemorySemantics, "'Semantics'");
+ InstructionDesc[OpAtomicSMax].operands.push(OperandId, "'Value'");
+
+ InstructionDesc[OpAtomicAnd].operands.push(OperandId, "'Pointer'");
+ InstructionDesc[OpAtomicAnd].operands.push(OperandScope, "'Scope'");
+ InstructionDesc[OpAtomicAnd].operands.push(OperandMemorySemantics, "'Semantics'");
+ InstructionDesc[OpAtomicAnd].operands.push(OperandId, "'Value'");
+
+ InstructionDesc[OpAtomicOr].operands.push(OperandId, "'Pointer'");
+ InstructionDesc[OpAtomicOr].operands.push(OperandScope, "'Scope'");
+ InstructionDesc[OpAtomicOr].operands.push(OperandMemorySemantics, "'Semantics'");
+ InstructionDesc[OpAtomicOr].operands.push(OperandId, "'Value'");
+
+ InstructionDesc[OpAtomicXor].operands.push(OperandId, "'Pointer'");
+ InstructionDesc[OpAtomicXor].operands.push(OperandScope, "'Scope'");
+ InstructionDesc[OpAtomicXor].operands.push(OperandMemorySemantics, "'Semantics'");
+ InstructionDesc[OpAtomicXor].operands.push(OperandId, "'Value'");
+
+ InstructionDesc[OpAtomicFlagTestAndSet].operands.push(OperandId, "'Pointer'");
+ InstructionDesc[OpAtomicFlagTestAndSet].operands.push(OperandScope, "'Scope'");
+ InstructionDesc[OpAtomicFlagTestAndSet].operands.push(OperandMemorySemantics, "'Semantics'");
+ InstructionDesc[OpAtomicFlagTestAndSet].capabilities.push_back(CapabilityKernel);
+
+ InstructionDesc[OpAtomicFlagClear].operands.push(OperandId, "'Pointer'");
+ InstructionDesc[OpAtomicFlagClear].operands.push(OperandScope, "'Scope'");
+ InstructionDesc[OpAtomicFlagClear].operands.push(OperandMemorySemantics, "'Semantics'");
+ InstructionDesc[OpAtomicFlagClear].capabilities.push_back(CapabilityKernel);
+
+ InstructionDesc[OpLoopMerge].operands.push(OperandId, "'Merge Block'");
+ InstructionDesc[OpLoopMerge].operands.push(OperandId, "'Continue Target'");
+ InstructionDesc[OpLoopMerge].operands.push(OperandLoop, "");
+
+ InstructionDesc[OpSelectionMerge].operands.push(OperandId, "'Merge Block'");
+ InstructionDesc[OpSelectionMerge].operands.push(OperandSelect, "");
+
+ InstructionDesc[OpBranch].operands.push(OperandId, "'Target Label'");
+
+ InstructionDesc[OpBranchConditional].operands.push(OperandId, "'Condition'");
+ InstructionDesc[OpBranchConditional].operands.push(OperandId, "'True Label'");
+ InstructionDesc[OpBranchConditional].operands.push(OperandId, "'False Label'");
+ InstructionDesc[OpBranchConditional].operands.push(OperandVariableLiterals, "'Branch weights'");
+
+ InstructionDesc[OpSwitch].operands.push(OperandId, "'Selector'");
+ InstructionDesc[OpSwitch].operands.push(OperandId, "'Default'");
+ InstructionDesc[OpSwitch].operands.push(OperandVariableLiteralId, "'Target'");
+
+ InstructionDesc[OpKill].capabilities.push_back(CapabilityShader);
+
+ InstructionDesc[OpReturnValue].operands.push(OperandId, "'Value'");
+
+ InstructionDesc[OpLifetimeStart].operands.push(OperandId, "'Pointer'");
+ InstructionDesc[OpLifetimeStart].operands.push(OperandLiteralNumber, "'Size'");
+ InstructionDesc[OpLifetimeStart].capabilities.push_back(CapabilityKernel);
+
+ InstructionDesc[OpLifetimeStop].operands.push(OperandId, "'Pointer'");
+ InstructionDesc[OpLifetimeStop].operands.push(OperandLiteralNumber, "'Size'");
+ InstructionDesc[OpLifetimeStop].capabilities.push_back(CapabilityKernel);
+
+ InstructionDesc[OpGroupAsyncCopy].capabilities.push_back(CapabilityKernel);
+ InstructionDesc[OpGroupAsyncCopy].operands.push(OperandScope, "'Execution'");
+ InstructionDesc[OpGroupAsyncCopy].operands.push(OperandId, "'Destination'");
+ InstructionDesc[OpGroupAsyncCopy].operands.push(OperandId, "'Source'");
+ InstructionDesc[OpGroupAsyncCopy].operands.push(OperandId, "'Num Elements'");
+ InstructionDesc[OpGroupAsyncCopy].operands.push(OperandId, "'Stride'");
+ InstructionDesc[OpGroupAsyncCopy].operands.push(OperandId, "'Event'");
+
+ InstructionDesc[OpGroupWaitEvents].capabilities.push_back(CapabilityKernel);
+ InstructionDesc[OpGroupWaitEvents].operands.push(OperandScope, "'Execution'");
+ InstructionDesc[OpGroupWaitEvents].operands.push(OperandId, "'Num Events'");
+ InstructionDesc[OpGroupWaitEvents].operands.push(OperandId, "'Events List'");
+
+ InstructionDesc[OpGroupAll].capabilities.push_back(CapabilityGroups);
+ InstructionDesc[OpGroupAll].operands.push(OperandScope, "'Execution'");
+ InstructionDesc[OpGroupAll].operands.push(OperandId, "'Predicate'");
+
+ InstructionDesc[OpGroupAny].capabilities.push_back(CapabilityGroups);
+ InstructionDesc[OpGroupAny].operands.push(OperandScope, "'Execution'");
+ InstructionDesc[OpGroupAny].operands.push(OperandId, "'Predicate'");
+
+ InstructionDesc[OpGroupBroadcast].capabilities.push_back(CapabilityGroups);
+ InstructionDesc[OpGroupBroadcast].operands.push(OperandScope, "'Execution'");
+ InstructionDesc[OpGroupBroadcast].operands.push(OperandId, "'Value'");
+ InstructionDesc[OpGroupBroadcast].operands.push(OperandId, "'LocalId'");
+
+ InstructionDesc[OpGroupIAdd].capabilities.push_back(CapabilityGroups);
+ InstructionDesc[OpGroupIAdd].operands.push(OperandScope, "'Execution'");
+ InstructionDesc[OpGroupIAdd].operands.push(OperandGroupOperation, "'Operation'");
+ InstructionDesc[OpGroupIAdd].operands.push(OperandId, "'X'");
+
+ InstructionDesc[OpGroupFAdd].capabilities.push_back(CapabilityGroups);
+ InstructionDesc[OpGroupFAdd].operands.push(OperandScope, "'Execution'");
+ InstructionDesc[OpGroupFAdd].operands.push(OperandGroupOperation, "'Operation'");
+ InstructionDesc[OpGroupFAdd].operands.push(OperandId, "'X'");
+
+ InstructionDesc[OpGroupUMin].capabilities.push_back(CapabilityGroups);
+ InstructionDesc[OpGroupUMin].operands.push(OperandScope, "'Execution'");
+ InstructionDesc[OpGroupUMin].operands.push(OperandGroupOperation, "'Operation'");
+ InstructionDesc[OpGroupUMin].operands.push(OperandId, "'X'");
+
+ InstructionDesc[OpGroupSMin].capabilities.push_back(CapabilityGroups);
+ InstructionDesc[OpGroupSMin].operands.push(OperandScope, "'Execution'");
+ InstructionDesc[OpGroupSMin].operands.push(OperandGroupOperation, "'Operation'");
+ InstructionDesc[OpGroupSMin].operands.push(OperandId, "X");
+
+ InstructionDesc[OpGroupFMin].capabilities.push_back(CapabilityGroups);
+ InstructionDesc[OpGroupFMin].operands.push(OperandScope, "'Execution'");
+ InstructionDesc[OpGroupFMin].operands.push(OperandGroupOperation, "'Operation'");
+ InstructionDesc[OpGroupFMin].operands.push(OperandId, "X");
+
+ InstructionDesc[OpGroupUMax].capabilities.push_back(CapabilityGroups);
+ InstructionDesc[OpGroupUMax].operands.push(OperandScope, "'Execution'");
+ InstructionDesc[OpGroupUMax].operands.push(OperandGroupOperation, "'Operation'");
+ InstructionDesc[OpGroupUMax].operands.push(OperandId, "X");
+
+ InstructionDesc[OpGroupSMax].capabilities.push_back(CapabilityGroups);
+ InstructionDesc[OpGroupSMax].operands.push(OperandScope, "'Execution'");
+ InstructionDesc[OpGroupSMax].operands.push(OperandGroupOperation, "'Operation'");
+ InstructionDesc[OpGroupSMax].operands.push(OperandId, "X");
+
+ InstructionDesc[OpGroupFMax].capabilities.push_back(CapabilityGroups);
+ InstructionDesc[OpGroupFMax].operands.push(OperandScope, "'Execution'");
+ InstructionDesc[OpGroupFMax].operands.push(OperandGroupOperation, "'Operation'");
+ InstructionDesc[OpGroupFMax].operands.push(OperandId, "X");
+
+ InstructionDesc[OpReadPipe].capabilities.push_back(CapabilityPipes);
+ InstructionDesc[OpReadPipe].operands.push(OperandId, "'Pipe'");
+ InstructionDesc[OpReadPipe].operands.push(OperandId, "'Pointer'");
+ InstructionDesc[OpReadPipe].operands.push(OperandId, "'Packet Size'");
+ InstructionDesc[OpReadPipe].operands.push(OperandId, "'Packet Alignment'");
+
+ InstructionDesc[OpWritePipe].capabilities.push_back(CapabilityPipes);
+ InstructionDesc[OpWritePipe].operands.push(OperandId, "'Pipe'");
+ InstructionDesc[OpWritePipe].operands.push(OperandId, "'Pointer'");
+ InstructionDesc[OpWritePipe].operands.push(OperandId, "'Packet Size'");
+ InstructionDesc[OpWritePipe].operands.push(OperandId, "'Packet Alignment'");
+
+ InstructionDesc[OpReservedReadPipe].capabilities.push_back(CapabilityPipes);
+ InstructionDesc[OpReservedReadPipe].operands.push(OperandId, "'Pipe'");
+ InstructionDesc[OpReservedReadPipe].operands.push(OperandId, "'Reserve Id'");
+ InstructionDesc[OpReservedReadPipe].operands.push(OperandId, "'Index'");
+ InstructionDesc[OpReservedReadPipe].operands.push(OperandId, "'Pointer'");
+ InstructionDesc[OpReservedReadPipe].operands.push(OperandId, "'Packet Size'");
+ InstructionDesc[OpReservedReadPipe].operands.push(OperandId, "'Packet Alignment'");
+
+ InstructionDesc[OpReservedWritePipe].capabilities.push_back(CapabilityPipes);
+ InstructionDesc[OpReservedWritePipe].operands.push(OperandId, "'Pipe'");
+ InstructionDesc[OpReservedWritePipe].operands.push(OperandId, "'Reserve Id'");
+ InstructionDesc[OpReservedWritePipe].operands.push(OperandId, "'Index'");
+ InstructionDesc[OpReservedWritePipe].operands.push(OperandId, "'Pointer'");
+ InstructionDesc[OpReservedWritePipe].operands.push(OperandId, "'Packet Size'");
+ InstructionDesc[OpReservedWritePipe].operands.push(OperandId, "'Packet Alignment'");
+
+ InstructionDesc[OpReserveReadPipePackets].capabilities.push_back(CapabilityPipes);
+ InstructionDesc[OpReserveReadPipePackets].operands.push(OperandId, "'Pipe'");
+ InstructionDesc[OpReserveReadPipePackets].operands.push(OperandId, "'Num Packets'");
+ InstructionDesc[OpReserveReadPipePackets].operands.push(OperandId, "'Packet Size'");
+ InstructionDesc[OpReserveReadPipePackets].operands.push(OperandId, "'Packet Alignment'");
+
+ InstructionDesc[OpReserveWritePipePackets].capabilities.push_back(CapabilityPipes);
+ InstructionDesc[OpReserveWritePipePackets].operands.push(OperandId, "'Pipe'");
+ InstructionDesc[OpReserveWritePipePackets].operands.push(OperandId, "'Num Packets'");
+ InstructionDesc[OpReserveWritePipePackets].operands.push(OperandId, "'Packet Size'");
+ InstructionDesc[OpReserveWritePipePackets].operands.push(OperandId, "'Packet Alignment'");
+
+ InstructionDesc[OpCommitReadPipe].capabilities.push_back(CapabilityPipes);
+ InstructionDesc[OpCommitReadPipe].operands.push(OperandId, "'Pipe'");
+ InstructionDesc[OpCommitReadPipe].operands.push(OperandId, "'Reserve Id'");
+ InstructionDesc[OpCommitReadPipe].operands.push(OperandId, "'Packet Size'");
+ InstructionDesc[OpCommitReadPipe].operands.push(OperandId, "'Packet Alignment'");
+
+ InstructionDesc[OpCommitWritePipe].capabilities.push_back(CapabilityPipes);
+ InstructionDesc[OpCommitWritePipe].operands.push(OperandId, "'Pipe'");
+ InstructionDesc[OpCommitWritePipe].operands.push(OperandId, "'Reserve Id'");
+ InstructionDesc[OpCommitWritePipe].operands.push(OperandId, "'Packet Size'");
+ InstructionDesc[OpCommitWritePipe].operands.push(OperandId, "'Packet Alignment'");
+
+ InstructionDesc[OpIsValidReserveId].capabilities.push_back(CapabilityPipes);
+ InstructionDesc[OpIsValidReserveId].operands.push(OperandId, "'Reserve Id'");
+
+ InstructionDesc[OpGetNumPipePackets].capabilities.push_back(CapabilityPipes);
+ InstructionDesc[OpGetNumPipePackets].operands.push(OperandId, "'Pipe'");
+ InstructionDesc[OpGetNumPipePackets].operands.push(OperandId, "'Packet Size'");
+ InstructionDesc[OpGetNumPipePackets].operands.push(OperandId, "'Packet Alignment'");
+
+ InstructionDesc[OpGetMaxPipePackets].capabilities.push_back(CapabilityPipes);
+ InstructionDesc[OpGetMaxPipePackets].operands.push(OperandId, "'Pipe'");
+ InstructionDesc[OpGetMaxPipePackets].operands.push(OperandId, "'Packet Size'");
+ InstructionDesc[OpGetMaxPipePackets].operands.push(OperandId, "'Packet Alignment'");
+
+ InstructionDesc[OpGroupReserveReadPipePackets].capabilities.push_back(CapabilityPipes);
+ InstructionDesc[OpGroupReserveReadPipePackets].operands.push(OperandScope, "'Execution'");
+ InstructionDesc[OpGroupReserveReadPipePackets].operands.push(OperandId, "'Pipe'");
+ InstructionDesc[OpGroupReserveReadPipePackets].operands.push(OperandId, "'Num Packets'");
+ InstructionDesc[OpGroupReserveReadPipePackets].operands.push(OperandId, "'Packet Size'");
+ InstructionDesc[OpGroupReserveReadPipePackets].operands.push(OperandId, "'Packet Alignment'");
+
+ InstructionDesc[OpGroupReserveWritePipePackets].capabilities.push_back(CapabilityPipes);
+ InstructionDesc[OpGroupReserveWritePipePackets].operands.push(OperandScope, "'Execution'");
+ InstructionDesc[OpGroupReserveWritePipePackets].operands.push(OperandId, "'Pipe'");
+ InstructionDesc[OpGroupReserveWritePipePackets].operands.push(OperandId, "'Num Packets'");
+ InstructionDesc[OpGroupReserveWritePipePackets].operands.push(OperandId, "'Packet Size'");
+ InstructionDesc[OpGroupReserveWritePipePackets].operands.push(OperandId, "'Packet Alignment'");
+
+ InstructionDesc[OpGroupCommitReadPipe].capabilities.push_back(CapabilityPipes);
+ InstructionDesc[OpGroupCommitReadPipe].operands.push(OperandScope, "'Execution'");
+ InstructionDesc[OpGroupCommitReadPipe].operands.push(OperandId, "'Pipe'");
+ InstructionDesc[OpGroupCommitReadPipe].operands.push(OperandId, "'Reserve Id'");
+ InstructionDesc[OpGroupCommitReadPipe].operands.push(OperandId, "'Packet Size'");
+ InstructionDesc[OpGroupCommitReadPipe].operands.push(OperandId, "'Packet Alignment'");
+
+ InstructionDesc[OpGroupCommitWritePipe].capabilities.push_back(CapabilityPipes);
+ InstructionDesc[OpGroupCommitWritePipe].operands.push(OperandScope, "'Execution'");
+ InstructionDesc[OpGroupCommitWritePipe].operands.push(OperandId, "'Pipe'");
+ InstructionDesc[OpGroupCommitWritePipe].operands.push(OperandId, "'Reserve Id'");
+ InstructionDesc[OpGroupCommitWritePipe].operands.push(OperandId, "'Packet Size'");
+ InstructionDesc[OpGroupCommitWritePipe].operands.push(OperandId, "'Packet Alignment'");
+
+ InstructionDesc[OpBuildNDRange].capabilities.push_back(CapabilityDeviceEnqueue);
+ InstructionDesc[OpBuildNDRange].operands.push(OperandId, "'GlobalWorkSize'");
+ InstructionDesc[OpBuildNDRange].operands.push(OperandId, "'LocalWorkSize'");
+ InstructionDesc[OpBuildNDRange].operands.push(OperandId, "'GlobalWorkOffset'");
+
+ InstructionDesc[OpGetDefaultQueue].capabilities.push_back(CapabilityDeviceEnqueue);
+
+ InstructionDesc[OpCaptureEventProfilingInfo].capabilities.push_back(CapabilityDeviceEnqueue);
+
+ InstructionDesc[OpCaptureEventProfilingInfo].operands.push(OperandId, "'Event'");
+ InstructionDesc[OpCaptureEventProfilingInfo].operands.push(OperandId, "'Profiling Info'");
+ InstructionDesc[OpCaptureEventProfilingInfo].operands.push(OperandId, "'Value'");
+
+ InstructionDesc[OpSetUserEventStatus].capabilities.push_back(CapabilityDeviceEnqueue);
+
+ InstructionDesc[OpSetUserEventStatus].operands.push(OperandId, "'Event'");
+ InstructionDesc[OpSetUserEventStatus].operands.push(OperandId, "'Status'");
+
+ InstructionDesc[OpIsValidEvent].capabilities.push_back(CapabilityDeviceEnqueue);
+ InstructionDesc[OpIsValidEvent].operands.push(OperandId, "'Event'");
+
+ InstructionDesc[OpCreateUserEvent].capabilities.push_back(CapabilityDeviceEnqueue);
+
+ InstructionDesc[OpRetainEvent].capabilities.push_back(CapabilityDeviceEnqueue);
+ InstructionDesc[OpRetainEvent].operands.push(OperandId, "'Event'");
+
+ InstructionDesc[OpReleaseEvent].capabilities.push_back(CapabilityDeviceEnqueue);
+ InstructionDesc[OpReleaseEvent].operands.push(OperandId, "'Event'");
+
+ InstructionDesc[OpGetKernelWorkGroupSize].capabilities.push_back(CapabilityDeviceEnqueue);
+ InstructionDesc[OpGetKernelWorkGroupSize].operands.push(OperandId, "'Invoke'");
+ InstructionDesc[OpGetKernelWorkGroupSize].operands.push(OperandId, "'Param'");
+ InstructionDesc[OpGetKernelWorkGroupSize].operands.push(OperandId, "'Param Size'");
+ InstructionDesc[OpGetKernelWorkGroupSize].operands.push(OperandId, "'Param Align'");
+
+ InstructionDesc[OpGetKernelPreferredWorkGroupSizeMultiple].capabilities.push_back(CapabilityDeviceEnqueue);
+ InstructionDesc[OpGetKernelPreferredWorkGroupSizeMultiple].operands.push(OperandId, "'Invoke'");
+ InstructionDesc[OpGetKernelPreferredWorkGroupSizeMultiple].operands.push(OperandId, "'Param'");
+ InstructionDesc[OpGetKernelPreferredWorkGroupSizeMultiple].operands.push(OperandId, "'Param Size'");
+ InstructionDesc[OpGetKernelPreferredWorkGroupSizeMultiple].operands.push(OperandId, "'Param Align'");
+
+ InstructionDesc[OpGetKernelNDrangeSubGroupCount].capabilities.push_back(CapabilityDeviceEnqueue);
+ InstructionDesc[OpGetKernelNDrangeSubGroupCount].operands.push(OperandId, "'ND Range'");
+ InstructionDesc[OpGetKernelNDrangeSubGroupCount].operands.push(OperandId, "'Invoke'");
+ InstructionDesc[OpGetKernelNDrangeSubGroupCount].operands.push(OperandId, "'Param'");
+ InstructionDesc[OpGetKernelNDrangeSubGroupCount].operands.push(OperandId, "'Param Size'");
+ InstructionDesc[OpGetKernelNDrangeSubGroupCount].operands.push(OperandId, "'Param Align'");
+
+ InstructionDesc[OpGetKernelNDrangeMaxSubGroupSize].capabilities.push_back(CapabilityDeviceEnqueue);
+ InstructionDesc[OpGetKernelNDrangeMaxSubGroupSize].operands.push(OperandId, "'ND Range'");
+ InstructionDesc[OpGetKernelNDrangeMaxSubGroupSize].operands.push(OperandId, "'Invoke'");
+ InstructionDesc[OpGetKernelNDrangeMaxSubGroupSize].operands.push(OperandId, "'Param'");
+ InstructionDesc[OpGetKernelNDrangeMaxSubGroupSize].operands.push(OperandId, "'Param Size'");
+ InstructionDesc[OpGetKernelNDrangeMaxSubGroupSize].operands.push(OperandId, "'Param Align'");
+
+ InstructionDesc[OpEnqueueKernel].capabilities.push_back(CapabilityDeviceEnqueue);
+ InstructionDesc[OpEnqueueKernel].operands.push(OperandId, "'Queue'");
+ InstructionDesc[OpEnqueueKernel].operands.push(OperandId, "'Flags'");
+ InstructionDesc[OpEnqueueKernel].operands.push(OperandId, "'ND Range'");
+ InstructionDesc[OpEnqueueKernel].operands.push(OperandId, "'Num Events'");
+ InstructionDesc[OpEnqueueKernel].operands.push(OperandId, "'Wait Events'");
+ InstructionDesc[OpEnqueueKernel].operands.push(OperandId, "'Ret Event'");
+ InstructionDesc[OpEnqueueKernel].operands.push(OperandId, "'Invoke'");
+ InstructionDesc[OpEnqueueKernel].operands.push(OperandId, "'Param'");
+ InstructionDesc[OpEnqueueKernel].operands.push(OperandId, "'Param Size'");
+ InstructionDesc[OpEnqueueKernel].operands.push(OperandId, "'Param Align'");
+ InstructionDesc[OpEnqueueKernel].operands.push(OperandVariableIds, "'Local Size'");
+
+ InstructionDesc[OpEnqueueMarker].capabilities.push_back(CapabilityDeviceEnqueue);
+ InstructionDesc[OpEnqueueMarker].operands.push(OperandId, "'Queue'");
+ InstructionDesc[OpEnqueueMarker].operands.push(OperandId, "'Num Events'");
+ InstructionDesc[OpEnqueueMarker].operands.push(OperandId, "'Wait Events'");
+ InstructionDesc[OpEnqueueMarker].operands.push(OperandId, "'Ret Event'");
+}
+
+}; // end spv namespace
diff --git a/chromium/third_party/glslang/src/SPIRV/doc.h b/chromium/third_party/glslang/src/SPIRV/doc.h
new file mode 100644
index 00000000000..cf9e059bcda
--- /dev/null
+++ b/chromium/third_party/glslang/src/SPIRV/doc.h
@@ -0,0 +1,260 @@
+//
+//Copyright (C) 2014-2015 LunarG, 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:
+//
+// Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 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.
+//
+// Neither the name of 3Dlabs Inc. Ltd. nor the names of its
+// contributors may be used to endorse or promote products derived
+// from this software without specific prior written permission.
+//
+//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+//"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 THE
+//COPYRIGHT HOLDERS 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.
+
+//
+// Parameterize the SPIR-V enumerants.
+//
+
+#include "spirv.hpp"
+
+#include <vector>
+
+namespace spv {
+
+// Fill in all the parameters
+void Parameterize();
+
+// Return the English names of all the enums.
+const char* SourceString(int);
+const char* AddressingString(int);
+const char* MemoryString(int);
+const char* ExecutionModelString(int);
+const char* ExecutionModeString(int);
+const char* StorageClassString(int);
+const char* DecorationString(int);
+const char* BuiltInString(int);
+const char* DimensionString(int);
+const char* SelectControlString(int);
+const char* LoopControlString(int);
+const char* FunctionControlString(int);
+const char* SamplerAddressingModeString(int);
+const char* SamplerFilterModeString(int);
+const char* ImageFormatString(int);
+const char* ImageChannelOrderString(int);
+const char* ImageChannelTypeString(int);
+const char* ImageChannelDataTypeString(int type);
+const char* ImageOperandsString(int format);
+const char* ImageOperands(int);
+const char* FPFastMathString(int);
+const char* FPRoundingModeString(int);
+const char* LinkageTypeString(int);
+const char* FuncParamAttrString(int);
+const char* AccessQualifierString(int);
+const char* MemorySemanticsString(int);
+const char* MemoryAccessString(int);
+const char* ExecutionScopeString(int);
+const char* GroupOperationString(int);
+const char* KernelEnqueueFlagsString(int);
+const char* KernelProfilingInfoString(int);
+const char* CapabilityString(int);
+const char* OpcodeString(int);
+const char* ScopeString(int mem);
+
+// For grouping opcodes into subsections
+enum OpcodeClass {
+ OpClassMisc,
+ OpClassDebug,
+ OpClassAnnotate,
+ OpClassExtension,
+ OpClassMode,
+ OpClassType,
+ OpClassConstant,
+ OpClassMemory,
+ OpClassFunction,
+ OpClassImage,
+ OpClassConvert,
+ OpClassComposite,
+ OpClassArithmetic,
+ OpClassBit,
+ OpClassRelationalLogical,
+ OpClassDerivative,
+ OpClassFlowControl,
+ OpClassAtomic,
+ OpClassPrimitive,
+ OpClassBarrier,
+ OpClassGroup,
+ OpClassDeviceSideEnqueue,
+ OpClassPipe,
+
+ OpClassCount,
+ OpClassMissing // all instructions start out as missing
+};
+
+// For parameterizing operands.
+enum OperandClass {
+ OperandNone,
+ OperandId,
+ OperandVariableIds,
+ OperandOptionalLiteral,
+ OperandOptionalLiteralString,
+ OperandVariableLiterals,
+ OperandVariableIdLiteral,
+ OperandVariableLiteralId,
+ OperandLiteralNumber,
+ OperandLiteralString,
+ OperandSource,
+ OperandExecutionModel,
+ OperandAddressing,
+ OperandMemory,
+ OperandExecutionMode,
+ OperandStorage,
+ OperandDimensionality,
+ OperandSamplerAddressingMode,
+ OperandSamplerFilterMode,
+ OperandSamplerImageFormat,
+ OperandImageChannelOrder,
+ OperandImageChannelDataType,
+ OperandImageOperands,
+ OperandFPFastMath,
+ OperandFPRoundingMode,
+ OperandLinkageType,
+ OperandAccessQualifier,
+ OperandFuncParamAttr,
+ OperandDecoration,
+ OperandBuiltIn,
+ OperandSelect,
+ OperandLoop,
+ OperandFunction,
+ OperandMemorySemantics,
+ OperandMemoryAccess,
+ OperandScope,
+ OperandGroupOperation,
+ OperandKernelEnqueueFlags,
+ OperandKernelProfilingInfo,
+ OperandCapability,
+
+ OperandOpcode,
+
+ OperandCount
+};
+
+// Any specific enum can have a set of capabilities that allow it:
+typedef std::vector<Capability> EnumCaps;
+
+// Parameterize a set of operands with their OperandClass(es) and descriptions.
+class OperandParameters {
+public:
+ OperandParameters() { }
+ void push(OperandClass oc, const char* d, bool opt = false)
+ {
+ opClass.push_back(oc);
+ desc.push_back(d);
+ optional.push_back(opt);
+ }
+ void setOptional();
+ OperandClass getClass(int op) const { return opClass[op]; }
+ const char* getDesc(int op) const { return desc[op]; }
+ bool isOptional(int op) const { return optional[op]; }
+ int getNum() const { return (int)opClass.size(); }
+
+protected:
+ std::vector<OperandClass> opClass;
+ std::vector<const char*> desc;
+ std::vector<bool> optional;
+};
+
+// Parameterize an enumerant
+class EnumParameters {
+public:
+ EnumParameters() : desc(0) { }
+ EnumCaps caps;
+ const char* desc;
+};
+
+// Parameterize a set of enumerants that form an enum
+class EnumDefinition : public EnumParameters {
+public:
+ EnumDefinition() :
+ ceiling(0), bitmask(false), getName(0), enumParams(0), operandParams(0) { }
+ void set(int ceil, const char* (*name)(int), EnumParameters* ep, bool mask = false)
+ {
+ ceiling = ceil;
+ getName = name;
+ bitmask = mask;
+ enumParams = ep;
+ }
+ void setOperands(OperandParameters* op) { operandParams = op; }
+ int ceiling; // ceiling of enumerants
+ bool bitmask; // true if these enumerants combine into a bitmask
+ const char* (*getName)(int); // a function that returns the name for each enumerant value (or shift)
+ EnumParameters* enumParams; // parameters for each individual enumerant
+ OperandParameters* operandParams; // sets of operands
+};
+
+// Parameterize an instruction's logical format, including its known set of operands,
+// per OperandParameters above.
+class InstructionParameters {
+public:
+ InstructionParameters() :
+ opDesc("TBD"),
+ opClass(OpClassMissing),
+ typePresent(true), // most normal, only exceptions have to be spelled out
+ resultPresent(true) // most normal, only exceptions have to be spelled out
+ { }
+
+ void setResultAndType(bool r, bool t)
+ {
+ resultPresent = r;
+ typePresent = t;
+ }
+
+ bool hasResult() const { return resultPresent != 0; }
+ bool hasType() const { return typePresent != 0; }
+
+ const char* opDesc;
+ EnumCaps capabilities;
+ OpcodeClass opClass;
+ OperandParameters operands;
+
+protected:
+ int typePresent : 1;
+ int resultPresent : 1;
+};
+
+const int OpcodeCeiling = 321;
+
+// The set of objects that hold all the instruction/operand
+// parameterization information.
+extern InstructionParameters InstructionDesc[];
+
+// These hold definitions of the enumerants used for operands
+extern EnumDefinition OperandClassParams[];
+
+const char* GetOperandDesc(OperandClass operand);
+void PrintImmediateRow(int imm, const char* name, const EnumParameters* enumParams, bool caps, bool hex = false);
+const char* AccessQualifierString(int attr);
+
+void PrintOperands(const OperandParameters& operands, int reservedOperands);
+
+}; // end namespace spv
diff --git a/chromium/third_party/glslang/src/SPIRV/spirv.hpp b/chromium/third_party/glslang/src/SPIRV/spirv.hpp
new file mode 100755
index 00000000000..94d7f41ba60
--- /dev/null
+++ b/chromium/third_party/glslang/src/SPIRV/spirv.hpp
@@ -0,0 +1,880 @@
+// Copyright (c) 2014-2016 The Khronos Group Inc.
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and/or associated documentation files (the "Materials"),
+// to deal in the Materials without restriction, including without limitation
+// the rights to use, copy, modify, merge, publish, distribute, sublicense,
+// and/or sell copies of the Materials, and to permit persons to whom the
+// Materials are furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Materials.
+//
+// MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS KHRONOS
+// STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS SPECIFICATIONS AND
+// HEADER INFORMATION ARE LOCATED AT https://www.khronos.org/registry/
+//
+// THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+// FROM,OUT OF OR IN CONNECTION WITH THE MATERIALS OR THE USE OR OTHER DEALINGS
+// IN THE MATERIALS.
+
+// This header is automatically generated by the same tool that creates
+// the Binary Section of the SPIR-V specification.
+
+// Enumeration tokens for SPIR-V, in various styles:
+// C, C++, C++11, JSON, Lua, Python
+//
+// - C will have tokens with a "Spv" prefix, e.g.: SpvSourceLanguageGLSL
+// - C++ will have tokens in the "spv" name space, e.g.: spv::SourceLanguageGLSL
+// - C++11 will use enum classes in the spv namespace, e.g.: spv::SourceLanguage::GLSL
+// - Lua will use tables, e.g.: spv.SourceLanguage.GLSL
+// - Python will use dictionaries, e.g.: spv['SourceLanguage']['GLSL']
+//
+// Some tokens act like mask values, which can be OR'd together,
+// while others are mutually exclusive. The mask-like ones have
+// "Mask" in their name, and a parallel enum that has the shift
+// amount (1 << x) for each corresponding enumerant.
+
+#ifndef spirv_HPP
+#define spirv_HPP
+
+namespace spv {
+
+typedef unsigned int Id;
+
+#define SPV_VERSION 0x10000
+#define SPV_REVISION 3
+
+static const unsigned int MagicNumber = 0x07230203;
+static const unsigned int Version = 0x00010000;
+static const unsigned int Revision = 3;
+static const unsigned int OpCodeMask = 0xffff;
+static const unsigned int WordCountShift = 16;
+
+enum SourceLanguage {
+ SourceLanguageUnknown = 0,
+ SourceLanguageESSL = 1,
+ SourceLanguageGLSL = 2,
+ SourceLanguageOpenCL_C = 3,
+ SourceLanguageOpenCL_CPP = 4,
+ SourceLanguageHLSL = 5,
+};
+
+enum ExecutionModel {
+ ExecutionModelVertex = 0,
+ ExecutionModelTessellationControl = 1,
+ ExecutionModelTessellationEvaluation = 2,
+ ExecutionModelGeometry = 3,
+ ExecutionModelFragment = 4,
+ ExecutionModelGLCompute = 5,
+ ExecutionModelKernel = 6,
+};
+
+enum AddressingModel {
+ AddressingModelLogical = 0,
+ AddressingModelPhysical32 = 1,
+ AddressingModelPhysical64 = 2,
+};
+
+enum MemoryModel {
+ MemoryModelSimple = 0,
+ MemoryModelGLSL450 = 1,
+ MemoryModelOpenCL = 2,
+};
+
+enum ExecutionMode {
+ ExecutionModeInvocations = 0,
+ ExecutionModeSpacingEqual = 1,
+ ExecutionModeSpacingFractionalEven = 2,
+ ExecutionModeSpacingFractionalOdd = 3,
+ ExecutionModeVertexOrderCw = 4,
+ ExecutionModeVertexOrderCcw = 5,
+ ExecutionModePixelCenterInteger = 6,
+ ExecutionModeOriginUpperLeft = 7,
+ ExecutionModeOriginLowerLeft = 8,
+ ExecutionModeEarlyFragmentTests = 9,
+ ExecutionModePointMode = 10,
+ ExecutionModeXfb = 11,
+ ExecutionModeDepthReplacing = 12,
+ ExecutionModeDepthGreater = 14,
+ ExecutionModeDepthLess = 15,
+ ExecutionModeDepthUnchanged = 16,
+ ExecutionModeLocalSize = 17,
+ ExecutionModeLocalSizeHint = 18,
+ ExecutionModeInputPoints = 19,
+ ExecutionModeInputLines = 20,
+ ExecutionModeInputLinesAdjacency = 21,
+ ExecutionModeTriangles = 22,
+ ExecutionModeInputTrianglesAdjacency = 23,
+ ExecutionModeQuads = 24,
+ ExecutionModeIsolines = 25,
+ ExecutionModeOutputVertices = 26,
+ ExecutionModeOutputPoints = 27,
+ ExecutionModeOutputLineStrip = 28,
+ ExecutionModeOutputTriangleStrip = 29,
+ ExecutionModeVecTypeHint = 30,
+ ExecutionModeContractionOff = 31,
+};
+
+enum StorageClass {
+ StorageClassUniformConstant = 0,
+ StorageClassInput = 1,
+ StorageClassUniform = 2,
+ StorageClassOutput = 3,
+ StorageClassWorkgroup = 4,
+ StorageClassCrossWorkgroup = 5,
+ StorageClassPrivate = 6,
+ StorageClassFunction = 7,
+ StorageClassGeneric = 8,
+ StorageClassPushConstant = 9,
+ StorageClassAtomicCounter = 10,
+ StorageClassImage = 11,
+};
+
+enum Dim {
+ Dim1D = 0,
+ Dim2D = 1,
+ Dim3D = 2,
+ DimCube = 3,
+ DimRect = 4,
+ DimBuffer = 5,
+ DimSubpassData = 6,
+};
+
+enum SamplerAddressingMode {
+ SamplerAddressingModeNone = 0,
+ SamplerAddressingModeClampToEdge = 1,
+ SamplerAddressingModeClamp = 2,
+ SamplerAddressingModeRepeat = 3,
+ SamplerAddressingModeRepeatMirrored = 4,
+};
+
+enum SamplerFilterMode {
+ SamplerFilterModeNearest = 0,
+ SamplerFilterModeLinear = 1,
+};
+
+enum ImageFormat {
+ ImageFormatUnknown = 0,
+ ImageFormatRgba32f = 1,
+ ImageFormatRgba16f = 2,
+ ImageFormatR32f = 3,
+ ImageFormatRgba8 = 4,
+ ImageFormatRgba8Snorm = 5,
+ ImageFormatRg32f = 6,
+ ImageFormatRg16f = 7,
+ ImageFormatR11fG11fB10f = 8,
+ ImageFormatR16f = 9,
+ ImageFormatRgba16 = 10,
+ ImageFormatRgb10A2 = 11,
+ ImageFormatRg16 = 12,
+ ImageFormatRg8 = 13,
+ ImageFormatR16 = 14,
+ ImageFormatR8 = 15,
+ ImageFormatRgba16Snorm = 16,
+ ImageFormatRg16Snorm = 17,
+ ImageFormatRg8Snorm = 18,
+ ImageFormatR16Snorm = 19,
+ ImageFormatR8Snorm = 20,
+ ImageFormatRgba32i = 21,
+ ImageFormatRgba16i = 22,
+ ImageFormatRgba8i = 23,
+ ImageFormatR32i = 24,
+ ImageFormatRg32i = 25,
+ ImageFormatRg16i = 26,
+ ImageFormatRg8i = 27,
+ ImageFormatR16i = 28,
+ ImageFormatR8i = 29,
+ ImageFormatRgba32ui = 30,
+ ImageFormatRgba16ui = 31,
+ ImageFormatRgba8ui = 32,
+ ImageFormatR32ui = 33,
+ ImageFormatRgb10a2ui = 34,
+ ImageFormatRg32ui = 35,
+ ImageFormatRg16ui = 36,
+ ImageFormatRg8ui = 37,
+ ImageFormatR16ui = 38,
+ ImageFormatR8ui = 39,
+};
+
+enum ImageChannelOrder {
+ ImageChannelOrderR = 0,
+ ImageChannelOrderA = 1,
+ ImageChannelOrderRG = 2,
+ ImageChannelOrderRA = 3,
+ ImageChannelOrderRGB = 4,
+ ImageChannelOrderRGBA = 5,
+ ImageChannelOrderBGRA = 6,
+ ImageChannelOrderARGB = 7,
+ ImageChannelOrderIntensity = 8,
+ ImageChannelOrderLuminance = 9,
+ ImageChannelOrderRx = 10,
+ ImageChannelOrderRGx = 11,
+ ImageChannelOrderRGBx = 12,
+ ImageChannelOrderDepth = 13,
+ ImageChannelOrderDepthStencil = 14,
+ ImageChannelOrdersRGB = 15,
+ ImageChannelOrdersRGBx = 16,
+ ImageChannelOrdersRGBA = 17,
+ ImageChannelOrdersBGRA = 18,
+};
+
+enum ImageChannelDataType {
+ ImageChannelDataTypeSnormInt8 = 0,
+ ImageChannelDataTypeSnormInt16 = 1,
+ ImageChannelDataTypeUnormInt8 = 2,
+ ImageChannelDataTypeUnormInt16 = 3,
+ ImageChannelDataTypeUnormShort565 = 4,
+ ImageChannelDataTypeUnormShort555 = 5,
+ ImageChannelDataTypeUnormInt101010 = 6,
+ ImageChannelDataTypeSignedInt8 = 7,
+ ImageChannelDataTypeSignedInt16 = 8,
+ ImageChannelDataTypeSignedInt32 = 9,
+ ImageChannelDataTypeUnsignedInt8 = 10,
+ ImageChannelDataTypeUnsignedInt16 = 11,
+ ImageChannelDataTypeUnsignedInt32 = 12,
+ ImageChannelDataTypeHalfFloat = 13,
+ ImageChannelDataTypeFloat = 14,
+ ImageChannelDataTypeUnormInt24 = 15,
+ ImageChannelDataTypeUnormInt101010_2 = 16,
+};
+
+enum ImageOperandsShift {
+ ImageOperandsBiasShift = 0,
+ ImageOperandsLodShift = 1,
+ ImageOperandsGradShift = 2,
+ ImageOperandsConstOffsetShift = 3,
+ ImageOperandsOffsetShift = 4,
+ ImageOperandsConstOffsetsShift = 5,
+ ImageOperandsSampleShift = 6,
+ ImageOperandsMinLodShift = 7,
+};
+
+enum ImageOperandsMask {
+ ImageOperandsMaskNone = 0,
+ ImageOperandsBiasMask = 0x00000001,
+ ImageOperandsLodMask = 0x00000002,
+ ImageOperandsGradMask = 0x00000004,
+ ImageOperandsConstOffsetMask = 0x00000008,
+ ImageOperandsOffsetMask = 0x00000010,
+ ImageOperandsConstOffsetsMask = 0x00000020,
+ ImageOperandsSampleMask = 0x00000040,
+ ImageOperandsMinLodMask = 0x00000080,
+};
+
+enum FPFastMathModeShift {
+ FPFastMathModeNotNaNShift = 0,
+ FPFastMathModeNotInfShift = 1,
+ FPFastMathModeNSZShift = 2,
+ FPFastMathModeAllowRecipShift = 3,
+ FPFastMathModeFastShift = 4,
+};
+
+enum FPFastMathModeMask {
+ FPFastMathModeMaskNone = 0,
+ FPFastMathModeNotNaNMask = 0x00000001,
+ FPFastMathModeNotInfMask = 0x00000002,
+ FPFastMathModeNSZMask = 0x00000004,
+ FPFastMathModeAllowRecipMask = 0x00000008,
+ FPFastMathModeFastMask = 0x00000010,
+};
+
+enum FPRoundingMode {
+ FPRoundingModeRTE = 0,
+ FPRoundingModeRTZ = 1,
+ FPRoundingModeRTP = 2,
+ FPRoundingModeRTN = 3,
+};
+
+enum LinkageType {
+ LinkageTypeExport = 0,
+ LinkageTypeImport = 1,
+};
+
+enum AccessQualifier {
+ AccessQualifierReadOnly = 0,
+ AccessQualifierWriteOnly = 1,
+ AccessQualifierReadWrite = 2,
+};
+
+enum FunctionParameterAttribute {
+ FunctionParameterAttributeZext = 0,
+ FunctionParameterAttributeSext = 1,
+ FunctionParameterAttributeByVal = 2,
+ FunctionParameterAttributeSret = 3,
+ FunctionParameterAttributeNoAlias = 4,
+ FunctionParameterAttributeNoCapture = 5,
+ FunctionParameterAttributeNoWrite = 6,
+ FunctionParameterAttributeNoReadWrite = 7,
+};
+
+enum Decoration {
+ DecorationRelaxedPrecision = 0,
+ DecorationSpecId = 1,
+ DecorationBlock = 2,
+ DecorationBufferBlock = 3,
+ DecorationRowMajor = 4,
+ DecorationColMajor = 5,
+ DecorationArrayStride = 6,
+ DecorationMatrixStride = 7,
+ DecorationGLSLShared = 8,
+ DecorationGLSLPacked = 9,
+ DecorationCPacked = 10,
+ DecorationBuiltIn = 11,
+ DecorationNoPerspective = 13,
+ DecorationFlat = 14,
+ DecorationPatch = 15,
+ DecorationCentroid = 16,
+ DecorationSample = 17,
+ DecorationInvariant = 18,
+ DecorationRestrict = 19,
+ DecorationAliased = 20,
+ DecorationVolatile = 21,
+ DecorationConstant = 22,
+ DecorationCoherent = 23,
+ DecorationNonWritable = 24,
+ DecorationNonReadable = 25,
+ DecorationUniform = 26,
+ DecorationSaturatedConversion = 28,
+ DecorationStream = 29,
+ DecorationLocation = 30,
+ DecorationComponent = 31,
+ DecorationIndex = 32,
+ DecorationBinding = 33,
+ DecorationDescriptorSet = 34,
+ DecorationOffset = 35,
+ DecorationXfbBuffer = 36,
+ DecorationXfbStride = 37,
+ DecorationFuncParamAttr = 38,
+ DecorationFPRoundingMode = 39,
+ DecorationFPFastMathMode = 40,
+ DecorationLinkageAttributes = 41,
+ DecorationNoContraction = 42,
+ DecorationInputAttachmentIndex = 43,
+ DecorationAlignment = 44,
+};
+
+enum BuiltIn {
+ BuiltInPosition = 0,
+ BuiltInPointSize = 1,
+ BuiltInClipDistance = 3,
+ BuiltInCullDistance = 4,
+ BuiltInVertexId = 5,
+ BuiltInInstanceId = 6,
+ BuiltInPrimitiveId = 7,
+ BuiltInInvocationId = 8,
+ BuiltInLayer = 9,
+ BuiltInViewportIndex = 10,
+ BuiltInTessLevelOuter = 11,
+ BuiltInTessLevelInner = 12,
+ BuiltInTessCoord = 13,
+ BuiltInPatchVertices = 14,
+ BuiltInFragCoord = 15,
+ BuiltInPointCoord = 16,
+ BuiltInFrontFacing = 17,
+ BuiltInSampleId = 18,
+ BuiltInSamplePosition = 19,
+ BuiltInSampleMask = 20,
+ BuiltInFragDepth = 22,
+ BuiltInHelperInvocation = 23,
+ BuiltInNumWorkgroups = 24,
+ BuiltInWorkgroupSize = 25,
+ BuiltInWorkgroupId = 26,
+ BuiltInLocalInvocationId = 27,
+ BuiltInGlobalInvocationId = 28,
+ BuiltInLocalInvocationIndex = 29,
+ BuiltInWorkDim = 30,
+ BuiltInGlobalSize = 31,
+ BuiltInEnqueuedWorkgroupSize = 32,
+ BuiltInGlobalOffset = 33,
+ BuiltInGlobalLinearId = 34,
+ BuiltInSubgroupSize = 36,
+ BuiltInSubgroupMaxSize = 37,
+ BuiltInNumSubgroups = 38,
+ BuiltInNumEnqueuedSubgroups = 39,
+ BuiltInSubgroupId = 40,
+ BuiltInSubgroupLocalInvocationId = 41,
+ BuiltInVertexIndex = 42,
+ BuiltInInstanceIndex = 43,
+};
+
+enum SelectionControlShift {
+ SelectionControlFlattenShift = 0,
+ SelectionControlDontFlattenShift = 1,
+};
+
+enum SelectionControlMask {
+ SelectionControlMaskNone = 0,
+ SelectionControlFlattenMask = 0x00000001,
+ SelectionControlDontFlattenMask = 0x00000002,
+};
+
+enum LoopControlShift {
+ LoopControlUnrollShift = 0,
+ LoopControlDontUnrollShift = 1,
+};
+
+enum LoopControlMask {
+ LoopControlMaskNone = 0,
+ LoopControlUnrollMask = 0x00000001,
+ LoopControlDontUnrollMask = 0x00000002,
+};
+
+enum FunctionControlShift {
+ FunctionControlInlineShift = 0,
+ FunctionControlDontInlineShift = 1,
+ FunctionControlPureShift = 2,
+ FunctionControlConstShift = 3,
+};
+
+enum FunctionControlMask {
+ FunctionControlMaskNone = 0,
+ FunctionControlInlineMask = 0x00000001,
+ FunctionControlDontInlineMask = 0x00000002,
+ FunctionControlPureMask = 0x00000004,
+ FunctionControlConstMask = 0x00000008,
+};
+
+enum MemorySemanticsShift {
+ MemorySemanticsAcquireShift = 1,
+ MemorySemanticsReleaseShift = 2,
+ MemorySemanticsAcquireReleaseShift = 3,
+ MemorySemanticsSequentiallyConsistentShift = 4,
+ MemorySemanticsUniformMemoryShift = 6,
+ MemorySemanticsSubgroupMemoryShift = 7,
+ MemorySemanticsWorkgroupMemoryShift = 8,
+ MemorySemanticsCrossWorkgroupMemoryShift = 9,
+ MemorySemanticsAtomicCounterMemoryShift = 10,
+ MemorySemanticsImageMemoryShift = 11,
+};
+
+enum MemorySemanticsMask {
+ MemorySemanticsMaskNone = 0,
+ MemorySemanticsAcquireMask = 0x00000002,
+ MemorySemanticsReleaseMask = 0x00000004,
+ MemorySemanticsAcquireReleaseMask = 0x00000008,
+ MemorySemanticsSequentiallyConsistentMask = 0x00000010,
+ MemorySemanticsUniformMemoryMask = 0x00000040,
+ MemorySemanticsSubgroupMemoryMask = 0x00000080,
+ MemorySemanticsWorkgroupMemoryMask = 0x00000100,
+ MemorySemanticsCrossWorkgroupMemoryMask = 0x00000200,
+ MemorySemanticsAtomicCounterMemoryMask = 0x00000400,
+ MemorySemanticsImageMemoryMask = 0x00000800,
+};
+
+enum MemoryAccessShift {
+ MemoryAccessVolatileShift = 0,
+ MemoryAccessAlignedShift = 1,
+ MemoryAccessNontemporalShift = 2,
+};
+
+enum MemoryAccessMask {
+ MemoryAccessMaskNone = 0,
+ MemoryAccessVolatileMask = 0x00000001,
+ MemoryAccessAlignedMask = 0x00000002,
+ MemoryAccessNontemporalMask = 0x00000004,
+};
+
+enum Scope {
+ ScopeCrossDevice = 0,
+ ScopeDevice = 1,
+ ScopeWorkgroup = 2,
+ ScopeSubgroup = 3,
+ ScopeInvocation = 4,
+};
+
+enum GroupOperation {
+ GroupOperationReduce = 0,
+ GroupOperationInclusiveScan = 1,
+ GroupOperationExclusiveScan = 2,
+};
+
+enum KernelEnqueueFlags {
+ KernelEnqueueFlagsNoWait = 0,
+ KernelEnqueueFlagsWaitKernel = 1,
+ KernelEnqueueFlagsWaitWorkGroup = 2,
+};
+
+enum KernelProfilingInfoShift {
+ KernelProfilingInfoCmdExecTimeShift = 0,
+};
+
+enum KernelProfilingInfoMask {
+ KernelProfilingInfoMaskNone = 0,
+ KernelProfilingInfoCmdExecTimeMask = 0x00000001,
+};
+
+enum Capability {
+ CapabilityMatrix = 0,
+ CapabilityShader = 1,
+ CapabilityGeometry = 2,
+ CapabilityTessellation = 3,
+ CapabilityAddresses = 4,
+ CapabilityLinkage = 5,
+ CapabilityKernel = 6,
+ CapabilityVector16 = 7,
+ CapabilityFloat16Buffer = 8,
+ CapabilityFloat16 = 9,
+ CapabilityFloat64 = 10,
+ CapabilityInt64 = 11,
+ CapabilityInt64Atomics = 12,
+ CapabilityImageBasic = 13,
+ CapabilityImageReadWrite = 14,
+ CapabilityImageMipmap = 15,
+ CapabilityPipes = 17,
+ CapabilityGroups = 18,
+ CapabilityDeviceEnqueue = 19,
+ CapabilityLiteralSampler = 20,
+ CapabilityAtomicStorage = 21,
+ CapabilityInt16 = 22,
+ CapabilityTessellationPointSize = 23,
+ CapabilityGeometryPointSize = 24,
+ CapabilityImageGatherExtended = 25,
+ CapabilityStorageImageMultisample = 27,
+ CapabilityUniformBufferArrayDynamicIndexing = 28,
+ CapabilitySampledImageArrayDynamicIndexing = 29,
+ CapabilityStorageBufferArrayDynamicIndexing = 30,
+ CapabilityStorageImageArrayDynamicIndexing = 31,
+ CapabilityClipDistance = 32,
+ CapabilityCullDistance = 33,
+ CapabilityImageCubeArray = 34,
+ CapabilitySampleRateShading = 35,
+ CapabilityImageRect = 36,
+ CapabilitySampledRect = 37,
+ CapabilityGenericPointer = 38,
+ CapabilityInt8 = 39,
+ CapabilityInputAttachment = 40,
+ CapabilitySparseResidency = 41,
+ CapabilityMinLod = 42,
+ CapabilitySampled1D = 43,
+ CapabilityImage1D = 44,
+ CapabilitySampledCubeArray = 45,
+ CapabilitySampledBuffer = 46,
+ CapabilityImageBuffer = 47,
+ CapabilityImageMSArray = 48,
+ CapabilityStorageImageExtendedFormats = 49,
+ CapabilityImageQuery = 50,
+ CapabilityDerivativeControl = 51,
+ CapabilityInterpolationFunction = 52,
+ CapabilityTransformFeedback = 53,
+ CapabilityGeometryStreams = 54,
+ CapabilityStorageImageReadWithoutFormat = 55,
+ CapabilityStorageImageWriteWithoutFormat = 56,
+ CapabilityMultiViewport = 57,
+};
+
+enum Op {
+ OpNop = 0,
+ OpUndef = 1,
+ OpSourceContinued = 2,
+ OpSource = 3,
+ OpSourceExtension = 4,
+ OpName = 5,
+ OpMemberName = 6,
+ OpString = 7,
+ OpLine = 8,
+ OpExtension = 10,
+ OpExtInstImport = 11,
+ OpExtInst = 12,
+ OpMemoryModel = 14,
+ OpEntryPoint = 15,
+ OpExecutionMode = 16,
+ OpCapability = 17,
+ OpTypeVoid = 19,
+ OpTypeBool = 20,
+ OpTypeInt = 21,
+ OpTypeFloat = 22,
+ OpTypeVector = 23,
+ OpTypeMatrix = 24,
+ OpTypeImage = 25,
+ OpTypeSampler = 26,
+ OpTypeSampledImage = 27,
+ OpTypeArray = 28,
+ OpTypeRuntimeArray = 29,
+ OpTypeStruct = 30,
+ OpTypeOpaque = 31,
+ OpTypePointer = 32,
+ OpTypeFunction = 33,
+ OpTypeEvent = 34,
+ OpTypeDeviceEvent = 35,
+ OpTypeReserveId = 36,
+ OpTypeQueue = 37,
+ OpTypePipe = 38,
+ OpTypeForwardPointer = 39,
+ OpConstantTrue = 41,
+ OpConstantFalse = 42,
+ OpConstant = 43,
+ OpConstantComposite = 44,
+ OpConstantSampler = 45,
+ OpConstantNull = 46,
+ OpSpecConstantTrue = 48,
+ OpSpecConstantFalse = 49,
+ OpSpecConstant = 50,
+ OpSpecConstantComposite = 51,
+ OpSpecConstantOp = 52,
+ OpFunction = 54,
+ OpFunctionParameter = 55,
+ OpFunctionEnd = 56,
+ OpFunctionCall = 57,
+ OpVariable = 59,
+ OpImageTexelPointer = 60,
+ OpLoad = 61,
+ OpStore = 62,
+ OpCopyMemory = 63,
+ OpCopyMemorySized = 64,
+ OpAccessChain = 65,
+ OpInBoundsAccessChain = 66,
+ OpPtrAccessChain = 67,
+ OpArrayLength = 68,
+ OpGenericPtrMemSemantics = 69,
+ OpInBoundsPtrAccessChain = 70,
+ OpDecorate = 71,
+ OpMemberDecorate = 72,
+ OpDecorationGroup = 73,
+ OpGroupDecorate = 74,
+ OpGroupMemberDecorate = 75,
+ OpVectorExtractDynamic = 77,
+ OpVectorInsertDynamic = 78,
+ OpVectorShuffle = 79,
+ OpCompositeConstruct = 80,
+ OpCompositeExtract = 81,
+ OpCompositeInsert = 82,
+ OpCopyObject = 83,
+ OpTranspose = 84,
+ OpSampledImage = 86,
+ OpImageSampleImplicitLod = 87,
+ OpImageSampleExplicitLod = 88,
+ OpImageSampleDrefImplicitLod = 89,
+ OpImageSampleDrefExplicitLod = 90,
+ OpImageSampleProjImplicitLod = 91,
+ OpImageSampleProjExplicitLod = 92,
+ OpImageSampleProjDrefImplicitLod = 93,
+ OpImageSampleProjDrefExplicitLod = 94,
+ OpImageFetch = 95,
+ OpImageGather = 96,
+ OpImageDrefGather = 97,
+ OpImageRead = 98,
+ OpImageWrite = 99,
+ OpImage = 100,
+ OpImageQueryFormat = 101,
+ OpImageQueryOrder = 102,
+ OpImageQuerySizeLod = 103,
+ OpImageQuerySize = 104,
+ OpImageQueryLod = 105,
+ OpImageQueryLevels = 106,
+ OpImageQuerySamples = 107,
+ OpConvertFToU = 109,
+ OpConvertFToS = 110,
+ OpConvertSToF = 111,
+ OpConvertUToF = 112,
+ OpUConvert = 113,
+ OpSConvert = 114,
+ OpFConvert = 115,
+ OpQuantizeToF16 = 116,
+ OpConvertPtrToU = 117,
+ OpSatConvertSToU = 118,
+ OpSatConvertUToS = 119,
+ OpConvertUToPtr = 120,
+ OpPtrCastToGeneric = 121,
+ OpGenericCastToPtr = 122,
+ OpGenericCastToPtrExplicit = 123,
+ OpBitcast = 124,
+ OpSNegate = 126,
+ OpFNegate = 127,
+ OpIAdd = 128,
+ OpFAdd = 129,
+ OpISub = 130,
+ OpFSub = 131,
+ OpIMul = 132,
+ OpFMul = 133,
+ OpUDiv = 134,
+ OpSDiv = 135,
+ OpFDiv = 136,
+ OpUMod = 137,
+ OpSRem = 138,
+ OpSMod = 139,
+ OpFRem = 140,
+ OpFMod = 141,
+ OpVectorTimesScalar = 142,
+ OpMatrixTimesScalar = 143,
+ OpVectorTimesMatrix = 144,
+ OpMatrixTimesVector = 145,
+ OpMatrixTimesMatrix = 146,
+ OpOuterProduct = 147,
+ OpDot = 148,
+ OpIAddCarry = 149,
+ OpISubBorrow = 150,
+ OpUMulExtended = 151,
+ OpSMulExtended = 152,
+ OpAny = 154,
+ OpAll = 155,
+ OpIsNan = 156,
+ OpIsInf = 157,
+ OpIsFinite = 158,
+ OpIsNormal = 159,
+ OpSignBitSet = 160,
+ OpLessOrGreater = 161,
+ OpOrdered = 162,
+ OpUnordered = 163,
+ OpLogicalEqual = 164,
+ OpLogicalNotEqual = 165,
+ OpLogicalOr = 166,
+ OpLogicalAnd = 167,
+ OpLogicalNot = 168,
+ OpSelect = 169,
+ OpIEqual = 170,
+ OpINotEqual = 171,
+ OpUGreaterThan = 172,
+ OpSGreaterThan = 173,
+ OpUGreaterThanEqual = 174,
+ OpSGreaterThanEqual = 175,
+ OpULessThan = 176,
+ OpSLessThan = 177,
+ OpULessThanEqual = 178,
+ OpSLessThanEqual = 179,
+ OpFOrdEqual = 180,
+ OpFUnordEqual = 181,
+ OpFOrdNotEqual = 182,
+ OpFUnordNotEqual = 183,
+ OpFOrdLessThan = 184,
+ OpFUnordLessThan = 185,
+ OpFOrdGreaterThan = 186,
+ OpFUnordGreaterThan = 187,
+ OpFOrdLessThanEqual = 188,
+ OpFUnordLessThanEqual = 189,
+ OpFOrdGreaterThanEqual = 190,
+ OpFUnordGreaterThanEqual = 191,
+ OpShiftRightLogical = 194,
+ OpShiftRightArithmetic = 195,
+ OpShiftLeftLogical = 196,
+ OpBitwiseOr = 197,
+ OpBitwiseXor = 198,
+ OpBitwiseAnd = 199,
+ OpNot = 200,
+ OpBitFieldInsert = 201,
+ OpBitFieldSExtract = 202,
+ OpBitFieldUExtract = 203,
+ OpBitReverse = 204,
+ OpBitCount = 205,
+ OpDPdx = 207,
+ OpDPdy = 208,
+ OpFwidth = 209,
+ OpDPdxFine = 210,
+ OpDPdyFine = 211,
+ OpFwidthFine = 212,
+ OpDPdxCoarse = 213,
+ OpDPdyCoarse = 214,
+ OpFwidthCoarse = 215,
+ OpEmitVertex = 218,
+ OpEndPrimitive = 219,
+ OpEmitStreamVertex = 220,
+ OpEndStreamPrimitive = 221,
+ OpControlBarrier = 224,
+ OpMemoryBarrier = 225,
+ OpAtomicLoad = 227,
+ OpAtomicStore = 228,
+ OpAtomicExchange = 229,
+ OpAtomicCompareExchange = 230,
+ OpAtomicCompareExchangeWeak = 231,
+ OpAtomicIIncrement = 232,
+ OpAtomicIDecrement = 233,
+ OpAtomicIAdd = 234,
+ OpAtomicISub = 235,
+ OpAtomicSMin = 236,
+ OpAtomicUMin = 237,
+ OpAtomicSMax = 238,
+ OpAtomicUMax = 239,
+ OpAtomicAnd = 240,
+ OpAtomicOr = 241,
+ OpAtomicXor = 242,
+ OpPhi = 245,
+ OpLoopMerge = 246,
+ OpSelectionMerge = 247,
+ OpLabel = 248,
+ OpBranch = 249,
+ OpBranchConditional = 250,
+ OpSwitch = 251,
+ OpKill = 252,
+ OpReturn = 253,
+ OpReturnValue = 254,
+ OpUnreachable = 255,
+ OpLifetimeStart = 256,
+ OpLifetimeStop = 257,
+ OpGroupAsyncCopy = 259,
+ OpGroupWaitEvents = 260,
+ OpGroupAll = 261,
+ OpGroupAny = 262,
+ OpGroupBroadcast = 263,
+ OpGroupIAdd = 264,
+ OpGroupFAdd = 265,
+ OpGroupFMin = 266,
+ OpGroupUMin = 267,
+ OpGroupSMin = 268,
+ OpGroupFMax = 269,
+ OpGroupUMax = 270,
+ OpGroupSMax = 271,
+ OpReadPipe = 274,
+ OpWritePipe = 275,
+ OpReservedReadPipe = 276,
+ OpReservedWritePipe = 277,
+ OpReserveReadPipePackets = 278,
+ OpReserveWritePipePackets = 279,
+ OpCommitReadPipe = 280,
+ OpCommitWritePipe = 281,
+ OpIsValidReserveId = 282,
+ OpGetNumPipePackets = 283,
+ OpGetMaxPipePackets = 284,
+ OpGroupReserveReadPipePackets = 285,
+ OpGroupReserveWritePipePackets = 286,
+ OpGroupCommitReadPipe = 287,
+ OpGroupCommitWritePipe = 288,
+ OpEnqueueMarker = 291,
+ OpEnqueueKernel = 292,
+ OpGetKernelNDrangeSubGroupCount = 293,
+ OpGetKernelNDrangeMaxSubGroupSize = 294,
+ OpGetKernelWorkGroupSize = 295,
+ OpGetKernelPreferredWorkGroupSizeMultiple = 296,
+ OpRetainEvent = 297,
+ OpReleaseEvent = 298,
+ OpCreateUserEvent = 299,
+ OpIsValidEvent = 300,
+ OpSetUserEventStatus = 301,
+ OpCaptureEventProfilingInfo = 302,
+ OpGetDefaultQueue = 303,
+ OpBuildNDRange = 304,
+ OpImageSparseSampleImplicitLod = 305,
+ OpImageSparseSampleExplicitLod = 306,
+ OpImageSparseSampleDrefImplicitLod = 307,
+ OpImageSparseSampleDrefExplicitLod = 308,
+ OpImageSparseSampleProjImplicitLod = 309,
+ OpImageSparseSampleProjExplicitLod = 310,
+ OpImageSparseSampleProjDrefImplicitLod = 311,
+ OpImageSparseSampleProjDrefExplicitLod = 312,
+ OpImageSparseFetch = 313,
+ OpImageSparseGather = 314,
+ OpImageSparseDrefGather = 315,
+ OpImageSparseTexelsResident = 316,
+ OpNoLine = 317,
+ OpAtomicFlagTestAndSet = 318,
+ OpAtomicFlagClear = 319,
+ OpImageSparseRead = 320,
+};
+
+// Overload operator| for mask bit combining
+
+inline ImageOperandsMask operator|(ImageOperandsMask a, ImageOperandsMask b) { return ImageOperandsMask(unsigned(a) | unsigned(b)); }
+inline FPFastMathModeMask operator|(FPFastMathModeMask a, FPFastMathModeMask b) { return FPFastMathModeMask(unsigned(a) | unsigned(b)); }
+inline SelectionControlMask operator|(SelectionControlMask a, SelectionControlMask b) { return SelectionControlMask(unsigned(a) | unsigned(b)); }
+inline LoopControlMask operator|(LoopControlMask a, LoopControlMask b) { return LoopControlMask(unsigned(a) | unsigned(b)); }
+inline FunctionControlMask operator|(FunctionControlMask a, FunctionControlMask b) { return FunctionControlMask(unsigned(a) | unsigned(b)); }
+inline MemorySemanticsMask operator|(MemorySemanticsMask a, MemorySemanticsMask b) { return MemorySemanticsMask(unsigned(a) | unsigned(b)); }
+inline MemoryAccessMask operator|(MemoryAccessMask a, MemoryAccessMask b) { return MemoryAccessMask(unsigned(a) | unsigned(b)); }
+inline KernelProfilingInfoMask operator|(KernelProfilingInfoMask a, KernelProfilingInfoMask b) { return KernelProfilingInfoMask(unsigned(a) | unsigned(b)); }
+
+} // end namespace spv
+
+#endif // #ifndef spirv_HPP
diff --git a/chromium/third_party/glslang/src/SPIRV/spvIR.h b/chromium/third_party/glslang/src/SPIRV/spvIR.h
new file mode 100755
index 00000000000..7c9fb9877de
--- /dev/null
+++ b/chromium/third_party/glslang/src/SPIRV/spvIR.h
@@ -0,0 +1,404 @@
+//
+//Copyright (C) 2014 LunarG, 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:
+//
+// Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 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.
+//
+// Neither the name of 3Dlabs Inc. Ltd. nor the names of its
+// contributors may be used to endorse or promote products derived
+// from this software without specific prior written permission.
+//
+//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+//"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 THE
+//COPYRIGHT HOLDERS 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.
+
+// SPIRV-IR
+//
+// Simple in-memory representation (IR) of SPIRV. Just for holding
+// Each function's CFG of blocks. Has this hierarchy:
+// - Module, which is a list of
+// - Function, which is a list of
+// - Block, which is a list of
+// - Instruction
+//
+
+#pragma once
+#ifndef spvIR_H
+#define spvIR_H
+
+#include "spirv.hpp"
+
+#include <algorithm>
+#include <cassert>
+#include <functional>
+#include <iostream>
+#include <memory>
+#include <vector>
+
+namespace spv {
+
+class Block;
+class Function;
+class Module;
+
+const Id NoResult = 0;
+const Id NoType = 0;
+
+const unsigned int BadValue = 0xFFFFFFFF;
+const Decoration NoPrecision = (Decoration)BadValue;
+const MemorySemanticsMask MemorySemanticsAllMemory =
+ (MemorySemanticsMask)(MemorySemanticsAcquireMask |
+ MemorySemanticsReleaseMask |
+ MemorySemanticsAcquireReleaseMask |
+ MemorySemanticsSequentiallyConsistentMask |
+ MemorySemanticsUniformMemoryMask |
+ MemorySemanticsSubgroupMemoryMask |
+ MemorySemanticsWorkgroupMemoryMask |
+ MemorySemanticsCrossWorkgroupMemoryMask |
+ MemorySemanticsAtomicCounterMemoryMask |
+ MemorySemanticsImageMemoryMask);
+
+//
+// SPIR-V IR instruction.
+//
+
+class Instruction {
+public:
+ Instruction(Id resultId, Id typeId, Op opCode) : resultId(resultId), typeId(typeId), opCode(opCode), block(nullptr) { }
+ explicit Instruction(Op opCode) : resultId(NoResult), typeId(NoType), opCode(opCode), block(nullptr) { }
+ virtual ~Instruction() {}
+ void addIdOperand(Id id) { operands.push_back(id); }
+ void addImmediateOperand(unsigned int immediate) { operands.push_back(immediate); }
+ void addStringOperand(const char* str)
+ {
+ originalString = str;
+ unsigned int word;
+ char* wordString = (char*)&word;
+ char* wordPtr = wordString;
+ int charCount = 0;
+ char c;
+ do {
+ c = *(str++);
+ *(wordPtr++) = c;
+ ++charCount;
+ if (charCount == 4) {
+ addImmediateOperand(word);
+ wordPtr = wordString;
+ charCount = 0;
+ }
+ } while (c != 0);
+
+ // deal with partial last word
+ if (charCount > 0) {
+ // pad with 0s
+ for (; charCount < 4; ++charCount)
+ *(wordPtr++) = 0;
+ addImmediateOperand(word);
+ }
+ }
+ void setBlock(Block* b) { block = b; }
+ Block* getBlock() const { return block; }
+ Op getOpCode() const { return opCode; }
+ int getNumOperands() const { return (int)operands.size(); }
+ Id getResultId() const { return resultId; }
+ Id getTypeId() const { return typeId; }
+ Id getIdOperand(int op) const { return operands[op]; }
+ unsigned int getImmediateOperand(int op) const { return operands[op]; }
+ const char* getStringOperand() const { return originalString.c_str(); }
+
+ // Write out the binary form.
+ void dump(std::vector<unsigned int>& out) const
+ {
+ // Compute the wordCount
+ unsigned int wordCount = 1;
+ if (typeId)
+ ++wordCount;
+ if (resultId)
+ ++wordCount;
+ wordCount += (unsigned int)operands.size();
+
+ // Write out the beginning of the instruction
+ out.push_back(((wordCount) << WordCountShift) | opCode);
+ if (typeId)
+ out.push_back(typeId);
+ if (resultId)
+ out.push_back(resultId);
+
+ // Write out the operands
+ for (int op = 0; op < (int)operands.size(); ++op)
+ out.push_back(operands[op]);
+ }
+
+protected:
+ Instruction(const Instruction&);
+ Id resultId;
+ Id typeId;
+ Op opCode;
+ std::vector<Id> operands;
+ std::string originalString; // could be optimized away; convenience for getting string operand
+ Block* block;
+};
+
+//
+// SPIR-V IR block.
+//
+
+class Block {
+public:
+ Block(Id id, Function& parent);
+ virtual ~Block()
+ {
+ }
+
+ Id getId() { return instructions.front()->getResultId(); }
+
+ Function& getParent() const { return parent; }
+ void addInstruction(std::unique_ptr<Instruction> inst);
+ void addPredecessor(Block* pred) { predecessors.push_back(pred); pred->successors.push_back(this);}
+ void addLocalVariable(std::unique_ptr<Instruction> inst) { localVariables.push_back(std::move(inst)); }
+ const std::vector<Block*>& getPredecessors() const { return predecessors; }
+ const std::vector<Block*>& getSuccessors() const { return successors; }
+ const std::vector<std::unique_ptr<Instruction> >& getInstructions() const {
+ return instructions;
+ }
+ void setUnreachable() { unreachable = true; }
+ bool isUnreachable() const { return unreachable; }
+ // Returns the block's merge instruction, if one exists (otherwise null).
+ const Instruction* getMergeInstruction() const {
+ if (instructions.size() < 2) return nullptr;
+ const Instruction* nextToLast = (instructions.cend() - 2)->get();
+ switch (nextToLast->getOpCode()) {
+ case OpSelectionMerge:
+ case OpLoopMerge:
+ return nextToLast;
+ default:
+ return nullptr;
+ }
+ return nullptr;
+ }
+
+ bool isTerminated() const
+ {
+ switch (instructions.back()->getOpCode()) {
+ case OpBranch:
+ case OpBranchConditional:
+ case OpSwitch:
+ case OpKill:
+ case OpReturn:
+ case OpReturnValue:
+ return true;
+ default:
+ return false;
+ }
+ }
+
+ void dump(std::vector<unsigned int>& out) const
+ {
+ instructions[0]->dump(out);
+ for (int i = 0; i < (int)localVariables.size(); ++i)
+ localVariables[i]->dump(out);
+ for (int i = 1; i < (int)instructions.size(); ++i)
+ instructions[i]->dump(out);
+ }
+
+protected:
+ Block(const Block&);
+ Block& operator=(Block&);
+
+ // To enforce keeping parent and ownership in sync:
+ friend Function;
+
+ std::vector<std::unique_ptr<Instruction> > instructions;
+ std::vector<Block*> predecessors, successors;
+ std::vector<std::unique_ptr<Instruction> > localVariables;
+ Function& parent;
+
+ // track whether this block is known to be uncreachable (not necessarily
+ // true for all unreachable blocks, but should be set at least
+ // for the extraneous ones introduced by the builder).
+ bool unreachable;
+};
+
+// Traverses the control-flow graph rooted at root in an order suited for
+// readable code generation. Invokes callback at every node in the traversal
+// order.
+void inReadableOrder(Block* root, std::function<void(Block*)> callback);
+
+//
+// SPIR-V IR Function.
+//
+
+class Function {
+public:
+ Function(Id id, Id resultType, Id functionType, Id firstParam, Module& parent);
+ virtual ~Function()
+ {
+ for (int i = 0; i < (int)parameterInstructions.size(); ++i)
+ delete parameterInstructions[i];
+
+ for (int i = 0; i < (int)blocks.size(); ++i)
+ delete blocks[i];
+ }
+ Id getId() const { return functionInstruction.getResultId(); }
+ Id getParamId(int p) { return parameterInstructions[p]->getResultId(); }
+
+ void addBlock(Block* block) { blocks.push_back(block); }
+ void removeBlock(Block* block)
+ {
+ auto found = find(blocks.begin(), blocks.end(), block);
+ assert(found != blocks.end());
+ blocks.erase(found);
+ delete block;
+ }
+
+ Module& getParent() const { return parent; }
+ Block* getEntryBlock() const { return blocks.front(); }
+ Block* getLastBlock() const { return blocks.back(); }
+ const std::vector<Block*>& getBlocks() const { return blocks; }
+ void addLocalVariable(std::unique_ptr<Instruction> inst);
+ Id getReturnType() const { return functionInstruction.getTypeId(); }
+ void dump(std::vector<unsigned int>& out) const
+ {
+ // OpFunction
+ functionInstruction.dump(out);
+
+ // OpFunctionParameter
+ for (int p = 0; p < (int)parameterInstructions.size(); ++p)
+ parameterInstructions[p]->dump(out);
+
+ // Blocks
+ inReadableOrder(blocks[0], [&out](const Block* b) { b->dump(out); });
+ Instruction end(0, 0, OpFunctionEnd);
+ end.dump(out);
+ }
+
+protected:
+ Function(const Function&);
+ Function& operator=(Function&);
+
+ Module& parent;
+ Instruction functionInstruction;
+ std::vector<Instruction*> parameterInstructions;
+ std::vector<Block*> blocks;
+};
+
+//
+// SPIR-V IR Module.
+//
+
+class Module {
+public:
+ Module() {}
+ virtual ~Module()
+ {
+ // TODO delete things
+ }
+
+ void addFunction(Function *fun) { functions.push_back(fun); }
+
+ void mapInstruction(Instruction *instruction)
+ {
+ spv::Id resultId = instruction->getResultId();
+ // map the instruction's result id
+ if (resultId >= idToInstruction.size())
+ idToInstruction.resize(resultId + 16);
+ idToInstruction[resultId] = instruction;
+ }
+
+ Instruction* getInstruction(Id id) const { return idToInstruction[id]; }
+ const std::vector<Function*>& getFunctions() const { return functions; }
+ spv::Id getTypeId(Id resultId) const { return idToInstruction[resultId]->getTypeId(); }
+ StorageClass getStorageClass(Id typeId) const
+ {
+ assert(idToInstruction[typeId]->getOpCode() == spv::OpTypePointer);
+ return (StorageClass)idToInstruction[typeId]->getImmediateOperand(0);
+ }
+
+ void dump(std::vector<unsigned int>& out) const
+ {
+ for (int f = 0; f < (int)functions.size(); ++f)
+ functions[f]->dump(out);
+ }
+
+protected:
+ Module(const Module&);
+ std::vector<Function*> functions;
+
+ // map from result id to instruction having that result id
+ std::vector<Instruction*> idToInstruction;
+
+ // map from a result id to its type id
+};
+
+//
+// Implementation (it's here due to circular type definitions).
+//
+
+// Add both
+// - the OpFunction instruction
+// - all the OpFunctionParameter instructions
+__inline Function::Function(Id id, Id resultType, Id functionType, Id firstParamId, Module& parent)
+ : parent(parent), functionInstruction(id, resultType, OpFunction)
+{
+ // OpFunction
+ functionInstruction.addImmediateOperand(FunctionControlMaskNone);
+ functionInstruction.addIdOperand(functionType);
+ parent.mapInstruction(&functionInstruction);
+ parent.addFunction(this);
+
+ // OpFunctionParameter
+ Instruction* typeInst = parent.getInstruction(functionType);
+ int numParams = typeInst->getNumOperands() - 1;
+ for (int p = 0; p < numParams; ++p) {
+ Instruction* param = new Instruction(firstParamId + p, typeInst->getIdOperand(p + 1), OpFunctionParameter);
+ parent.mapInstruction(param);
+ parameterInstructions.push_back(param);
+ }
+}
+
+__inline void Function::addLocalVariable(std::unique_ptr<Instruction> inst)
+{
+ Instruction* raw_instruction = inst.get();
+ blocks[0]->addLocalVariable(std::move(inst));
+ parent.mapInstruction(raw_instruction);
+}
+
+__inline Block::Block(Id id, Function& parent) : parent(parent), unreachable(false)
+{
+ instructions.push_back(std::unique_ptr<Instruction>(new Instruction(id, NoType, OpLabel)));
+ instructions.back()->setBlock(this);
+ parent.getParent().mapInstruction(instructions.back().get());
+}
+
+__inline void Block::addInstruction(std::unique_ptr<Instruction> inst)
+{
+ Instruction* raw_instruction = inst.get();
+ instructions.push_back(std::move(inst));
+ raw_instruction->setBlock(this);
+ if (raw_instruction->getResultId())
+ parent.getParent().mapInstruction(raw_instruction);
+}
+
+}; // end spv namespace
+
+#endif // spvIR_H
diff --git a/chromium/third_party/glslang/src/StandAlone/CMakeLists.txt b/chromium/third_party/glslang/src/StandAlone/CMakeLists.txt
new file mode 100644
index 00000000000..d69351ef3c5
--- /dev/null
+++ b/chromium/third_party/glslang/src/StandAlone/CMakeLists.txt
@@ -0,0 +1,48 @@
+add_library(glslang-default-resource-limits
+ ${CMAKE_CURRENT_SOURCE_DIR}/ResourceLimits.cpp
+)
+set_property(TARGET glslang-default-resource-limits PROPERTY FOLDER glslang)
+
+target_include_directories(glslang-default-resource-limits
+ PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}
+ PUBLIC ${PROJECT_SOURCE_DIR}
+)
+
+set(SOURCES StandAlone.cpp)
+set(REMAPPER_SOURCES spirv-remap.cpp)
+
+add_executable(glslangValidator ${SOURCES})
+add_executable(spirv-remap ${REMAPPER_SOURCES})
+set_property(TARGET glslangValidator PROPERTY FOLDER tools)
+set_property(TARGET spirv-remap PROPERTY FOLDER tools)
+glslang_set_link_args(glslangValidator)
+glslang_set_link_args(spirv-remap)
+
+set(LIBRARIES
+ glslang
+ OGLCompiler
+ OSDependent
+ HLSL
+ SPIRV
+ glslang-default-resource-limits)
+
+if(WIN32)
+ set(LIBRARIES ${LIBRARIES} psapi)
+elseif(UNIX)
+ if(NOT ANDROID)
+ set(LIBRARIES ${LIBRARIES} pthread)
+ endif()
+endif(WIN32)
+
+target_link_libraries(glslangValidator ${LIBRARIES})
+target_link_libraries(spirv-remap ${LIBRARIES})
+
+if(WIN32)
+ source_group("Source" FILES ${SOURCES})
+endif(WIN32)
+
+install(TARGETS glslangValidator
+ RUNTIME DESTINATION bin)
+
+install(TARGETS spirv-remap
+ RUNTIME DESTINATION bin)
diff --git a/chromium/third_party/glslang/src/StandAlone/ResourceLimits.cpp b/chromium/third_party/glslang/src/StandAlone/ResourceLimits.cpp
new file mode 100644
index 00000000000..80491980503
--- /dev/null
+++ b/chromium/third_party/glslang/src/StandAlone/ResourceLimits.cpp
@@ -0,0 +1,444 @@
+//
+// Copyright (C) 2016 Google, 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:
+//
+// Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 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.
+//
+// Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived
+// from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "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 THE
+// COPYRIGHT HOLDERS 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.
+
+#include <cstdlib>
+#include <cstring>
+#include <sstream>
+
+#include "ResourceLimits.h"
+
+namespace glslang {
+
+const TBuiltInResource DefaultTBuiltInResource = {
+ /* .MaxLights = */ 32,
+ /* .MaxClipPlanes = */ 6,
+ /* .MaxTextureUnits = */ 32,
+ /* .MaxTextureCoords = */ 32,
+ /* .MaxVertexAttribs = */ 64,
+ /* .MaxVertexUniformComponents = */ 4096,
+ /* .MaxVaryingFloats = */ 64,
+ /* .MaxVertexTextureImageUnits = */ 32,
+ /* .MaxCombinedTextureImageUnits = */ 80,
+ /* .MaxTextureImageUnits = */ 32,
+ /* .MaxFragmentUniformComponents = */ 4096,
+ /* .MaxDrawBuffers = */ 32,
+ /* .MaxVertexUniformVectors = */ 128,
+ /* .MaxVaryingVectors = */ 8,
+ /* .MaxFragmentUniformVectors = */ 16,
+ /* .MaxVertexOutputVectors = */ 16,
+ /* .MaxFragmentInputVectors = */ 15,
+ /* .MinProgramTexelOffset = */ -8,
+ /* .MaxProgramTexelOffset = */ 7,
+ /* .MaxClipDistances = */ 8,
+ /* .MaxComputeWorkGroupCountX = */ 65535,
+ /* .MaxComputeWorkGroupCountY = */ 65535,
+ /* .MaxComputeWorkGroupCountZ = */ 65535,
+ /* .MaxComputeWorkGroupSizeX = */ 1024,
+ /* .MaxComputeWorkGroupSizeY = */ 1024,
+ /* .MaxComputeWorkGroupSizeZ = */ 64,
+ /* .MaxComputeUniformComponents = */ 1024,
+ /* .MaxComputeTextureImageUnits = */ 16,
+ /* .MaxComputeImageUniforms = */ 8,
+ /* .MaxComputeAtomicCounters = */ 8,
+ /* .MaxComputeAtomicCounterBuffers = */ 1,
+ /* .MaxVaryingComponents = */ 60,
+ /* .MaxVertexOutputComponents = */ 64,
+ /* .MaxGeometryInputComponents = */ 64,
+ /* .MaxGeometryOutputComponents = */ 128,
+ /* .MaxFragmentInputComponents = */ 128,
+ /* .MaxImageUnits = */ 8,
+ /* .MaxCombinedImageUnitsAndFragmentOutputs = */ 8,
+ /* .MaxCombinedShaderOutputResources = */ 8,
+ /* .MaxImageSamples = */ 0,
+ /* .MaxVertexImageUniforms = */ 0,
+ /* .MaxTessControlImageUniforms = */ 0,
+ /* .MaxTessEvaluationImageUniforms = */ 0,
+ /* .MaxGeometryImageUniforms = */ 0,
+ /* .MaxFragmentImageUniforms = */ 8,
+ /* .MaxCombinedImageUniforms = */ 8,
+ /* .MaxGeometryTextureImageUnits = */ 16,
+ /* .MaxGeometryOutputVertices = */ 256,
+ /* .MaxGeometryTotalOutputComponents = */ 1024,
+ /* .MaxGeometryUniformComponents = */ 1024,
+ /* .MaxGeometryVaryingComponents = */ 64,
+ /* .MaxTessControlInputComponents = */ 128,
+ /* .MaxTessControlOutputComponents = */ 128,
+ /* .MaxTessControlTextureImageUnits = */ 16,
+ /* .MaxTessControlUniformComponents = */ 1024,
+ /* .MaxTessControlTotalOutputComponents = */ 4096,
+ /* .MaxTessEvaluationInputComponents = */ 128,
+ /* .MaxTessEvaluationOutputComponents = */ 128,
+ /* .MaxTessEvaluationTextureImageUnits = */ 16,
+ /* .MaxTessEvaluationUniformComponents = */ 1024,
+ /* .MaxTessPatchComponents = */ 120,
+ /* .MaxPatchVertices = */ 32,
+ /* .MaxTessGenLevel = */ 64,
+ /* .MaxViewports = */ 16,
+ /* .MaxVertexAtomicCounters = */ 0,
+ /* .MaxTessControlAtomicCounters = */ 0,
+ /* .MaxTessEvaluationAtomicCounters = */ 0,
+ /* .MaxGeometryAtomicCounters = */ 0,
+ /* .MaxFragmentAtomicCounters = */ 8,
+ /* .MaxCombinedAtomicCounters = */ 8,
+ /* .MaxAtomicCounterBindings = */ 1,
+ /* .MaxVertexAtomicCounterBuffers = */ 0,
+ /* .MaxTessControlAtomicCounterBuffers = */ 0,
+ /* .MaxTessEvaluationAtomicCounterBuffers = */ 0,
+ /* .MaxGeometryAtomicCounterBuffers = */ 0,
+ /* .MaxFragmentAtomicCounterBuffers = */ 1,
+ /* .MaxCombinedAtomicCounterBuffers = */ 1,
+ /* .MaxAtomicCounterBufferSize = */ 16384,
+ /* .MaxTransformFeedbackBuffers = */ 4,
+ /* .MaxTransformFeedbackInterleavedComponents = */ 64,
+ /* .MaxCullDistances = */ 8,
+ /* .MaxCombinedClipAndCullDistances = */ 8,
+ /* .MaxSamples = */ 4,
+ /* .limits = */ {
+ /* .nonInductiveForLoops = */ 1,
+ /* .whileLoops = */ 1,
+ /* .doWhileLoops = */ 1,
+ /* .generalUniformIndexing = */ 1,
+ /* .generalAttributeMatrixVectorIndexing = */ 1,
+ /* .generalVaryingIndexing = */ 1,
+ /* .generalSamplerIndexing = */ 1,
+ /* .generalVariableIndexing = */ 1,
+ /* .generalConstantMatrixVectorIndexing = */ 1,
+ }};
+
+std::string GetDefaultTBuiltInResourceString()
+{
+ std::ostringstream ostream;
+
+ ostream << "MaxLights " << DefaultTBuiltInResource.maxLights << "\n"
+ << "MaxClipPlanes " << DefaultTBuiltInResource.maxClipPlanes << "\n"
+ << "MaxTextureUnits " << DefaultTBuiltInResource.maxTextureUnits << "\n"
+ << "MaxTextureCoords " << DefaultTBuiltInResource.maxTextureCoords << "\n"
+ << "MaxVertexAttribs " << DefaultTBuiltInResource.maxVertexAttribs << "\n"
+ << "MaxVertexUniformComponents " << DefaultTBuiltInResource.maxVertexUniformComponents << "\n"
+ << "MaxVaryingFloats " << DefaultTBuiltInResource.maxVaryingFloats << "\n"
+ << "MaxVertexTextureImageUnits " << DefaultTBuiltInResource.maxVertexTextureImageUnits << "\n"
+ << "MaxCombinedTextureImageUnits " << DefaultTBuiltInResource.maxCombinedTextureImageUnits << "\n"
+ << "MaxTextureImageUnits " << DefaultTBuiltInResource.maxTextureImageUnits << "\n"
+ << "MaxFragmentUniformComponents " << DefaultTBuiltInResource.maxFragmentUniformComponents << "\n"
+ << "MaxDrawBuffers " << DefaultTBuiltInResource.maxDrawBuffers << "\n"
+ << "MaxVertexUniformVectors " << DefaultTBuiltInResource.maxVertexUniformVectors << "\n"
+ << "MaxVaryingVectors " << DefaultTBuiltInResource.maxVaryingVectors << "\n"
+ << "MaxFragmentUniformVectors " << DefaultTBuiltInResource.maxFragmentUniformVectors << "\n"
+ << "MaxVertexOutputVectors " << DefaultTBuiltInResource.maxVertexOutputVectors << "\n"
+ << "MaxFragmentInputVectors " << DefaultTBuiltInResource.maxFragmentInputVectors << "\n"
+ << "MinProgramTexelOffset " << DefaultTBuiltInResource.minProgramTexelOffset << "\n"
+ << "MaxProgramTexelOffset " << DefaultTBuiltInResource.maxProgramTexelOffset << "\n"
+ << "MaxClipDistances " << DefaultTBuiltInResource.maxClipDistances << "\n"
+ << "MaxComputeWorkGroupCountX " << DefaultTBuiltInResource.maxComputeWorkGroupCountX << "\n"
+ << "MaxComputeWorkGroupCountY " << DefaultTBuiltInResource.maxComputeWorkGroupCountY << "\n"
+ << "MaxComputeWorkGroupCountZ " << DefaultTBuiltInResource.maxComputeWorkGroupCountZ << "\n"
+ << "MaxComputeWorkGroupSizeX " << DefaultTBuiltInResource.maxComputeWorkGroupSizeX << "\n"
+ << "MaxComputeWorkGroupSizeY " << DefaultTBuiltInResource.maxComputeWorkGroupSizeY << "\n"
+ << "MaxComputeWorkGroupSizeZ " << DefaultTBuiltInResource.maxComputeWorkGroupSizeZ << "\n"
+ << "MaxComputeUniformComponents " << DefaultTBuiltInResource.maxComputeUniformComponents << "\n"
+ << "MaxComputeTextureImageUnits " << DefaultTBuiltInResource.maxComputeTextureImageUnits << "\n"
+ << "MaxComputeImageUniforms " << DefaultTBuiltInResource.maxComputeImageUniforms << "\n"
+ << "MaxComputeAtomicCounters " << DefaultTBuiltInResource.maxComputeAtomicCounters << "\n"
+ << "MaxComputeAtomicCounterBuffers " << DefaultTBuiltInResource.maxComputeAtomicCounterBuffers << "\n"
+ << "MaxVaryingComponents " << DefaultTBuiltInResource.maxVaryingComponents << "\n"
+ << "MaxVertexOutputComponents " << DefaultTBuiltInResource.maxVertexOutputComponents << "\n"
+ << "MaxGeometryInputComponents " << DefaultTBuiltInResource.maxGeometryInputComponents << "\n"
+ << "MaxGeometryOutputComponents " << DefaultTBuiltInResource.maxGeometryOutputComponents << "\n"
+ << "MaxFragmentInputComponents " << DefaultTBuiltInResource.maxFragmentInputComponents << "\n"
+ << "MaxImageUnits " << DefaultTBuiltInResource.maxImageUnits << "\n"
+ << "MaxCombinedImageUnitsAndFragmentOutputs " << DefaultTBuiltInResource.maxCombinedImageUnitsAndFragmentOutputs << "\n"
+ << "MaxCombinedShaderOutputResources " << DefaultTBuiltInResource.maxCombinedShaderOutputResources << "\n"
+ << "MaxImageSamples " << DefaultTBuiltInResource.maxImageSamples << "\n"
+ << "MaxVertexImageUniforms " << DefaultTBuiltInResource.maxVertexImageUniforms << "\n"
+ << "MaxTessControlImageUniforms " << DefaultTBuiltInResource.maxTessControlImageUniforms << "\n"
+ << "MaxTessEvaluationImageUniforms " << DefaultTBuiltInResource.maxTessEvaluationImageUniforms << "\n"
+ << "MaxGeometryImageUniforms " << DefaultTBuiltInResource.maxGeometryImageUniforms << "\n"
+ << "MaxFragmentImageUniforms " << DefaultTBuiltInResource.maxFragmentImageUniforms << "\n"
+ << "MaxCombinedImageUniforms " << DefaultTBuiltInResource.maxCombinedImageUniforms << "\n"
+ << "MaxGeometryTextureImageUnits " << DefaultTBuiltInResource.maxGeometryTextureImageUnits << "\n"
+ << "MaxGeometryOutputVertices " << DefaultTBuiltInResource.maxGeometryOutputVertices << "\n"
+ << "MaxGeometryTotalOutputComponents " << DefaultTBuiltInResource.maxGeometryTotalOutputComponents << "\n"
+ << "MaxGeometryUniformComponents " << DefaultTBuiltInResource.maxGeometryUniformComponents << "\n"
+ << "MaxGeometryVaryingComponents " << DefaultTBuiltInResource.maxGeometryVaryingComponents << "\n"
+ << "MaxTessControlInputComponents " << DefaultTBuiltInResource.maxTessControlInputComponents << "\n"
+ << "MaxTessControlOutputComponents " << DefaultTBuiltInResource.maxTessControlOutputComponents << "\n"
+ << "MaxTessControlTextureImageUnits " << DefaultTBuiltInResource.maxTessControlTextureImageUnits << "\n"
+ << "MaxTessControlUniformComponents " << DefaultTBuiltInResource.maxTessControlUniformComponents << "\n"
+ << "MaxTessControlTotalOutputComponents " << DefaultTBuiltInResource.maxTessControlTotalOutputComponents << "\n"
+ << "MaxTessEvaluationInputComponents " << DefaultTBuiltInResource.maxTessEvaluationInputComponents << "\n"
+ << "MaxTessEvaluationOutputComponents " << DefaultTBuiltInResource.maxTessEvaluationOutputComponents << "\n"
+ << "MaxTessEvaluationTextureImageUnits " << DefaultTBuiltInResource.maxTessEvaluationTextureImageUnits << "\n"
+ << "MaxTessEvaluationUniformComponents " << DefaultTBuiltInResource.maxTessEvaluationUniformComponents << "\n"
+ << "MaxTessPatchComponents " << DefaultTBuiltInResource.maxTessPatchComponents << "\n"
+ << "MaxPatchVertices " << DefaultTBuiltInResource.maxPatchVertices << "\n"
+ << "MaxTessGenLevel " << DefaultTBuiltInResource.maxTessGenLevel << "\n"
+ << "MaxViewports " << DefaultTBuiltInResource.maxViewports << "\n"
+ << "MaxVertexAtomicCounters " << DefaultTBuiltInResource.maxVertexAtomicCounters << "\n"
+ << "MaxTessControlAtomicCounters " << DefaultTBuiltInResource.maxTessControlAtomicCounters << "\n"
+ << "MaxTessEvaluationAtomicCounters " << DefaultTBuiltInResource.maxTessEvaluationAtomicCounters << "\n"
+ << "MaxGeometryAtomicCounters " << DefaultTBuiltInResource.maxGeometryAtomicCounters << "\n"
+ << "MaxFragmentAtomicCounters " << DefaultTBuiltInResource.maxFragmentAtomicCounters << "\n"
+ << "MaxCombinedAtomicCounters " << DefaultTBuiltInResource.maxCombinedAtomicCounters << "\n"
+ << "MaxAtomicCounterBindings " << DefaultTBuiltInResource.maxAtomicCounterBindings << "\n"
+ << "MaxVertexAtomicCounterBuffers " << DefaultTBuiltInResource.maxVertexAtomicCounterBuffers << "\n"
+ << "MaxTessControlAtomicCounterBuffers " << DefaultTBuiltInResource.maxTessControlAtomicCounterBuffers << "\n"
+ << "MaxTessEvaluationAtomicCounterBuffers " << DefaultTBuiltInResource.maxTessEvaluationAtomicCounterBuffers << "\n"
+ << "MaxGeometryAtomicCounterBuffers " << DefaultTBuiltInResource.maxGeometryAtomicCounterBuffers << "\n"
+ << "MaxFragmentAtomicCounterBuffers " << DefaultTBuiltInResource.maxFragmentAtomicCounterBuffers << "\n"
+ << "MaxCombinedAtomicCounterBuffers " << DefaultTBuiltInResource.maxCombinedAtomicCounterBuffers << "\n"
+ << "MaxAtomicCounterBufferSize " << DefaultTBuiltInResource.maxAtomicCounterBufferSize << "\n"
+ << "MaxTransformFeedbackBuffers " << DefaultTBuiltInResource.maxTransformFeedbackBuffers << "\n"
+ << "MaxTransformFeedbackInterleavedComponents " << DefaultTBuiltInResource.maxTransformFeedbackInterleavedComponents << "\n"
+ << "MaxCullDistances " << DefaultTBuiltInResource.maxCullDistances << "\n"
+ << "MaxCombinedClipAndCullDistances " << DefaultTBuiltInResource.maxCombinedClipAndCullDistances << "\n"
+ << "MaxSamples " << DefaultTBuiltInResource.maxSamples << "\n"
+
+ << "nonInductiveForLoops " << DefaultTBuiltInResource.limits.nonInductiveForLoops << "\n"
+ << "whileLoops " << DefaultTBuiltInResource.limits.whileLoops << "\n"
+ << "doWhileLoops " << DefaultTBuiltInResource.limits.doWhileLoops << "\n"
+ << "generalUniformIndexing " << DefaultTBuiltInResource.limits.generalUniformIndexing << "\n"
+ << "generalAttributeMatrixVectorIndexing " << DefaultTBuiltInResource.limits.generalAttributeMatrixVectorIndexing << "\n"
+ << "generalVaryingIndexing " << DefaultTBuiltInResource.limits.generalVaryingIndexing << "\n"
+ << "generalSamplerIndexing " << DefaultTBuiltInResource.limits.generalSamplerIndexing << "\n"
+ << "generalVariableIndexing " << DefaultTBuiltInResource.limits.generalVariableIndexing << "\n"
+ << "generalConstantMatrixVectorIndexing " << DefaultTBuiltInResource.limits.generalConstantMatrixVectorIndexing << "\n"
+ ;
+
+ return ostream.str();
+}
+
+void DecodeResourceLimits(TBuiltInResource* resources, char* config) {
+ const char* delims = " \t\n\r";
+ const char* token = strtok(config, delims);
+ while (token) {
+ const char* valueStr = strtok(0, delims);
+ if (valueStr == 0 || ! (valueStr[0] == '-' || (valueStr[0] >= '0' && valueStr[0] <= '9'))) {
+ printf("Error: '%s' bad .conf file. Each name must be followed by one number.\n", valueStr ? valueStr : "");
+ return;
+ }
+ int value = atoi(valueStr);
+
+ if (strcmp(token, "MaxLights") == 0)
+ resources->maxLights = value;
+ else if (strcmp(token, "MaxClipPlanes") == 0)
+ resources->maxClipPlanes = value;
+ else if (strcmp(token, "MaxTextureUnits") == 0)
+ resources->maxTextureUnits = value;
+ else if (strcmp(token, "MaxTextureCoords") == 0)
+ resources->maxTextureCoords = value;
+ else if (strcmp(token, "MaxVertexAttribs") == 0)
+ resources->maxVertexAttribs = value;
+ else if (strcmp(token, "MaxVertexUniformComponents") == 0)
+ resources->maxVertexUniformComponents = value;
+ else if (strcmp(token, "MaxVaryingFloats") == 0)
+ resources->maxVaryingFloats = value;
+ else if (strcmp(token, "MaxVertexTextureImageUnits") == 0)
+ resources->maxVertexTextureImageUnits = value;
+ else if (strcmp(token, "MaxCombinedTextureImageUnits") == 0)
+ resources->maxCombinedTextureImageUnits = value;
+ else if (strcmp(token, "MaxTextureImageUnits") == 0)
+ resources->maxTextureImageUnits = value;
+ else if (strcmp(token, "MaxFragmentUniformComponents") == 0)
+ resources->maxFragmentUniformComponents = value;
+ else if (strcmp(token, "MaxDrawBuffers") == 0)
+ resources->maxDrawBuffers = value;
+ else if (strcmp(token, "MaxVertexUniformVectors") == 0)
+ resources->maxVertexUniformVectors = value;
+ else if (strcmp(token, "MaxVaryingVectors") == 0)
+ resources->maxVaryingVectors = value;
+ else if (strcmp(token, "MaxFragmentUniformVectors") == 0)
+ resources->maxFragmentUniformVectors = value;
+ else if (strcmp(token, "MaxVertexOutputVectors") == 0)
+ resources->maxVertexOutputVectors = value;
+ else if (strcmp(token, "MaxFragmentInputVectors") == 0)
+ resources->maxFragmentInputVectors = value;
+ else if (strcmp(token, "MinProgramTexelOffset") == 0)
+ resources->minProgramTexelOffset = value;
+ else if (strcmp(token, "MaxProgramTexelOffset") == 0)
+ resources->maxProgramTexelOffset = value;
+ else if (strcmp(token, "MaxClipDistances") == 0)
+ resources->maxClipDistances = value;
+ else if (strcmp(token, "MaxComputeWorkGroupCountX") == 0)
+ resources->maxComputeWorkGroupCountX = value;
+ else if (strcmp(token, "MaxComputeWorkGroupCountY") == 0)
+ resources->maxComputeWorkGroupCountY = value;
+ else if (strcmp(token, "MaxComputeWorkGroupCountZ") == 0)
+ resources->maxComputeWorkGroupCountZ = value;
+ else if (strcmp(token, "MaxComputeWorkGroupSizeX") == 0)
+ resources->maxComputeWorkGroupSizeX = value;
+ else if (strcmp(token, "MaxComputeWorkGroupSizeY") == 0)
+ resources->maxComputeWorkGroupSizeY = value;
+ else if (strcmp(token, "MaxComputeWorkGroupSizeZ") == 0)
+ resources->maxComputeWorkGroupSizeZ = value;
+ else if (strcmp(token, "MaxComputeUniformComponents") == 0)
+ resources->maxComputeUniformComponents = value;
+ else if (strcmp(token, "MaxComputeTextureImageUnits") == 0)
+ resources->maxComputeTextureImageUnits = value;
+ else if (strcmp(token, "MaxComputeImageUniforms") == 0)
+ resources->maxComputeImageUniforms = value;
+ else if (strcmp(token, "MaxComputeAtomicCounters") == 0)
+ resources->maxComputeAtomicCounters = value;
+ else if (strcmp(token, "MaxComputeAtomicCounterBuffers") == 0)
+ resources->maxComputeAtomicCounterBuffers = value;
+ else if (strcmp(token, "MaxVaryingComponents") == 0)
+ resources->maxVaryingComponents = value;
+ else if (strcmp(token, "MaxVertexOutputComponents") == 0)
+ resources->maxVertexOutputComponents = value;
+ else if (strcmp(token, "MaxGeometryInputComponents") == 0)
+ resources->maxGeometryInputComponents = value;
+ else if (strcmp(token, "MaxGeometryOutputComponents") == 0)
+ resources->maxGeometryOutputComponents = value;
+ else if (strcmp(token, "MaxFragmentInputComponents") == 0)
+ resources->maxFragmentInputComponents = value;
+ else if (strcmp(token, "MaxImageUnits") == 0)
+ resources->maxImageUnits = value;
+ else if (strcmp(token, "MaxCombinedImageUnitsAndFragmentOutputs") == 0)
+ resources->maxCombinedImageUnitsAndFragmentOutputs = value;
+ else if (strcmp(token, "MaxCombinedShaderOutputResources") == 0)
+ resources->maxCombinedShaderOutputResources = value;
+ else if (strcmp(token, "MaxImageSamples") == 0)
+ resources->maxImageSamples = value;
+ else if (strcmp(token, "MaxVertexImageUniforms") == 0)
+ resources->maxVertexImageUniforms = value;
+ else if (strcmp(token, "MaxTessControlImageUniforms") == 0)
+ resources->maxTessControlImageUniforms = value;
+ else if (strcmp(token, "MaxTessEvaluationImageUniforms") == 0)
+ resources->maxTessEvaluationImageUniforms = value;
+ else if (strcmp(token, "MaxGeometryImageUniforms") == 0)
+ resources->maxGeometryImageUniforms = value;
+ else if (strcmp(token, "MaxFragmentImageUniforms") == 0)
+ resources->maxFragmentImageUniforms = value;
+ else if (strcmp(token, "MaxCombinedImageUniforms") == 0)
+ resources->maxCombinedImageUniforms = value;
+ else if (strcmp(token, "MaxGeometryTextureImageUnits") == 0)
+ resources->maxGeometryTextureImageUnits = value;
+ else if (strcmp(token, "MaxGeometryOutputVertices") == 0)
+ resources->maxGeometryOutputVertices = value;
+ else if (strcmp(token, "MaxGeometryTotalOutputComponents") == 0)
+ resources->maxGeometryTotalOutputComponents = value;
+ else if (strcmp(token, "MaxGeometryUniformComponents") == 0)
+ resources->maxGeometryUniformComponents = value;
+ else if (strcmp(token, "MaxGeometryVaryingComponents") == 0)
+ resources->maxGeometryVaryingComponents = value;
+ else if (strcmp(token, "MaxTessControlInputComponents") == 0)
+ resources->maxTessControlInputComponents = value;
+ else if (strcmp(token, "MaxTessControlOutputComponents") == 0)
+ resources->maxTessControlOutputComponents = value;
+ else if (strcmp(token, "MaxTessControlTextureImageUnits") == 0)
+ resources->maxTessControlTextureImageUnits = value;
+ else if (strcmp(token, "MaxTessControlUniformComponents") == 0)
+ resources->maxTessControlUniformComponents = value;
+ else if (strcmp(token, "MaxTessControlTotalOutputComponents") == 0)
+ resources->maxTessControlTotalOutputComponents = value;
+ else if (strcmp(token, "MaxTessEvaluationInputComponents") == 0)
+ resources->maxTessEvaluationInputComponents = value;
+ else if (strcmp(token, "MaxTessEvaluationOutputComponents") == 0)
+ resources->maxTessEvaluationOutputComponents = value;
+ else if (strcmp(token, "MaxTessEvaluationTextureImageUnits") == 0)
+ resources->maxTessEvaluationTextureImageUnits = value;
+ else if (strcmp(token, "MaxTessEvaluationUniformComponents") == 0)
+ resources->maxTessEvaluationUniformComponents = value;
+ else if (strcmp(token, "MaxTessPatchComponents") == 0)
+ resources->maxTessPatchComponents = value;
+ else if (strcmp(token, "MaxPatchVertices") == 0)
+ resources->maxPatchVertices = value;
+ else if (strcmp(token, "MaxTessGenLevel") == 0)
+ resources->maxTessGenLevel = value;
+ else if (strcmp(token, "MaxViewports") == 0)
+ resources->maxViewports = value;
+ else if (strcmp(token, "MaxVertexAtomicCounters") == 0)
+ resources->maxVertexAtomicCounters = value;
+ else if (strcmp(token, "MaxTessControlAtomicCounters") == 0)
+ resources->maxTessControlAtomicCounters = value;
+ else if (strcmp(token, "MaxTessEvaluationAtomicCounters") == 0)
+ resources->maxTessEvaluationAtomicCounters = value;
+ else if (strcmp(token, "MaxGeometryAtomicCounters") == 0)
+ resources->maxGeometryAtomicCounters = value;
+ else if (strcmp(token, "MaxFragmentAtomicCounters") == 0)
+ resources->maxFragmentAtomicCounters = value;
+ else if (strcmp(token, "MaxCombinedAtomicCounters") == 0)
+ resources->maxCombinedAtomicCounters = value;
+ else if (strcmp(token, "MaxAtomicCounterBindings") == 0)
+ resources->maxAtomicCounterBindings = value;
+ else if (strcmp(token, "MaxVertexAtomicCounterBuffers") == 0)
+ resources->maxVertexAtomicCounterBuffers = value;
+ else if (strcmp(token, "MaxTessControlAtomicCounterBuffers") == 0)
+ resources->maxTessControlAtomicCounterBuffers = value;
+ else if (strcmp(token, "MaxTessEvaluationAtomicCounterBuffers") == 0)
+ resources->maxTessEvaluationAtomicCounterBuffers = value;
+ else if (strcmp(token, "MaxGeometryAtomicCounterBuffers") == 0)
+ resources->maxGeometryAtomicCounterBuffers = value;
+ else if (strcmp(token, "MaxFragmentAtomicCounterBuffers") == 0)
+ resources->maxFragmentAtomicCounterBuffers = value;
+ else if (strcmp(token, "MaxCombinedAtomicCounterBuffers") == 0)
+ resources->maxCombinedAtomicCounterBuffers = value;
+ else if (strcmp(token, "MaxAtomicCounterBufferSize") == 0)
+ resources->maxAtomicCounterBufferSize = value;
+ else if (strcmp(token, "MaxTransformFeedbackBuffers") == 0)
+ resources->maxTransformFeedbackBuffers = value;
+ else if (strcmp(token, "MaxTransformFeedbackInterleavedComponents") == 0)
+ resources->maxTransformFeedbackInterleavedComponents = value;
+ else if (strcmp(token, "MaxCullDistances") == 0)
+ resources->maxCullDistances = value;
+ else if (strcmp(token, "MaxCombinedClipAndCullDistances") == 0)
+ resources->maxCombinedClipAndCullDistances = value;
+ else if (strcmp(token, "MaxSamples") == 0)
+ resources->maxSamples = value;
+
+ else if (strcmp(token, "nonInductiveForLoops") == 0)
+ resources->limits.nonInductiveForLoops = (value != 0);
+ else if (strcmp(token, "whileLoops") == 0)
+ resources->limits.whileLoops = (value != 0);
+ else if (strcmp(token, "doWhileLoops") == 0)
+ resources->limits.doWhileLoops = (value != 0);
+ else if (strcmp(token, "generalUniformIndexing") == 0)
+ resources->limits.generalUniformIndexing = (value != 0);
+ else if (strcmp(token, "generalAttributeMatrixVectorIndexing") == 0)
+ resources->limits.generalAttributeMatrixVectorIndexing = (value != 0);
+ else if (strcmp(token, "generalVaryingIndexing") == 0)
+ resources->limits.generalVaryingIndexing = (value != 0);
+ else if (strcmp(token, "generalSamplerIndexing") == 0)
+ resources->limits.generalSamplerIndexing = (value != 0);
+ else if (strcmp(token, "generalVariableIndexing") == 0)
+ resources->limits.generalVariableIndexing = (value != 0);
+ else if (strcmp(token, "generalConstantMatrixVectorIndexing") == 0)
+ resources->limits.generalConstantMatrixVectorIndexing = (value != 0);
+ else
+ printf("Warning: unrecognized limit (%s) in configuration file.\n", token);
+
+ token = strtok(0, delims);
+ }
+}
+
+} // end namespace glslang
diff --git a/chromium/third_party/glslang/src/StandAlone/ResourceLimits.h b/chromium/third_party/glslang/src/StandAlone/ResourceLimits.h
new file mode 100644
index 00000000000..9c3eb3e9fb5
--- /dev/null
+++ b/chromium/third_party/glslang/src/StandAlone/ResourceLimits.h
@@ -0,0 +1,57 @@
+//
+// Copyright (C) 2016 Google, 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:
+//
+// Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 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.
+//
+// Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived
+// from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "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 THE
+// COPYRIGHT HOLDERS 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.
+
+#ifndef _STAND_ALONE_RESOURCE_LIMITS_INCLUDED_
+#define _STAND_ALONE_RESOURCE_LIMITS_INCLUDED_
+
+#include <string>
+
+#include "glslang/Include/ResourceLimits.h"
+
+namespace glslang {
+
+// These are the default resources for TBuiltInResources, used for both
+// - parsing this string for the case where the user didn't supply one,
+// - dumping out a template for user construction of a config file.
+extern const TBuiltInResource DefaultTBuiltInResource;
+
+// Returns the DefaultTBuiltInResource as a human-readable string.
+std::string GetDefaultTBuiltInResourceString();
+
+// Decodes the resource limits from |config| to |resources|.
+void DecodeResourceLimits(TBuiltInResource* resources, char* config);
+
+} // end namespace glslang
+
+#endif // _STAND_ALONE_RESOURCE_LIMITS_INCLUDED_
diff --git a/chromium/third_party/glslang/src/StandAlone/StandAlone.cpp b/chromium/third_party/glslang/src/StandAlone/StandAlone.cpp
new file mode 100644
index 00000000000..3fd7e7d2ada
--- /dev/null
+++ b/chromium/third_party/glslang/src/StandAlone/StandAlone.cpp
@@ -0,0 +1,891 @@
+//
+//Copyright (C) 2002-2005 3Dlabs Inc. Ltd.
+//Copyright (C) 2013 LunarG, 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:
+//
+// Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 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.
+//
+// Neither the name of 3Dlabs Inc. Ltd. nor the names of its
+// contributors may be used to endorse or promote products derived
+// from this software without specific prior written permission.
+//
+//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+//"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 THE
+//COPYRIGHT HOLDERS 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.
+//
+
+// this only applies to the standalone wrapper, not the front end in general
+#define _CRT_SECURE_NO_WARNINGS
+
+#include "ResourceLimits.h"
+#include "Worklist.h"
+#include "./../glslang/Include/ShHandle.h"
+#include "./../glslang/Include/revision.h"
+#include "./../glslang/Public/ShaderLang.h"
+#include "../SPIRV/GlslangToSpv.h"
+#include "../SPIRV/GLSL.std.450.h"
+#include "../SPIRV/doc.h"
+#include "../SPIRV/disassemble.h"
+#include <string.h>
+#include <stdlib.h>
+#include <math.h>
+
+#include "../glslang/OSDependent/osinclude.h"
+
+extern "C" {
+ SH_IMPORT_EXPORT void ShOutputHtml();
+}
+
+// Command-line options
+enum TOptions {
+ EOptionNone = 0x0000,
+ EOptionIntermediate = 0x0001,
+ EOptionSuppressInfolog = 0x0002,
+ EOptionMemoryLeakMode = 0x0004,
+ EOptionRelaxedErrors = 0x0008,
+ EOptionGiveWarnings = 0x0010,
+ EOptionLinkProgram = 0x0020,
+ EOptionMultiThreaded = 0x0040,
+ EOptionDumpConfig = 0x0080,
+ EOptionDumpReflection = 0x0100,
+ EOptionSuppressWarnings = 0x0200,
+ EOptionDumpVersions = 0x0400,
+ EOptionSpv = 0x0800,
+ EOptionHumanReadableSpv = 0x1000,
+ EOptionVulkanRules = 0x2000,
+ EOptionDefaultDesktop = 0x4000,
+ EOptionOutputPreprocessed = 0x8000,
+ EOptionReadHlsl = 0x10000,
+};
+
+//
+// Return codes from main/exit().
+//
+enum TFailCode {
+ ESuccess = 0,
+ EFailUsage,
+ EFailCompile,
+ EFailLink,
+ EFailCompilerCreate,
+ EFailThreadCreate,
+ EFailLinkerCreate
+};
+
+//
+// Forward declarations.
+//
+EShLanguage FindLanguage(const std::string& name);
+void CompileFile(const char* fileName, ShHandle);
+void usage();
+void FreeFileData(char** data);
+char** ReadFileData(const char* fileName);
+void InfoLogMsg(const char* msg, const char* name, const int num);
+
+// Globally track if any compile or link failure.
+bool CompileFailed = false;
+bool LinkFailed = false;
+
+// Use to test breaking up a single shader file into multiple strings.
+// Set in ReadFileData().
+int NumShaderStrings;
+
+TBuiltInResource Resources;
+std::string ConfigFile;
+
+//
+// Parse either a .conf file provided by the user or the default from glslang::DefaultTBuiltInResource
+//
+void ProcessConfigFile()
+{
+ char** configStrings = 0;
+ char* config = 0;
+ if (ConfigFile.size() > 0) {
+ configStrings = ReadFileData(ConfigFile.c_str());
+ if (configStrings)
+ config = *configStrings;
+ else {
+ printf("Error opening configuration file; will instead use the default configuration\n");
+ usage();
+ }
+ }
+
+ if (config == 0) {
+ Resources = glslang::DefaultTBuiltInResource;
+ return;
+ }
+
+ glslang::DecodeResourceLimits(&Resources, config);
+
+ if (configStrings)
+ FreeFileData(configStrings);
+ else
+ delete[] config;
+}
+
+// thread-safe list of shaders to asynchronously grab and compile
+glslang::TWorklist Worklist;
+
+// array of unique places to leave the shader names and infologs for the asynchronous compiles
+glslang::TWorkItem** Work = 0;
+int NumWorkItems = 0;
+
+int Options = 0;
+const char* ExecutableName = nullptr;
+const char* binaryFileName = nullptr;
+const char* entryPointName = nullptr;
+
+//
+// Create the default name for saving a binary if -o is not provided.
+//
+const char* GetBinaryName(EShLanguage stage)
+{
+ const char* name;
+ if (binaryFileName == nullptr) {
+ switch (stage) {
+ case EShLangVertex: name = "vert.spv"; break;
+ case EShLangTessControl: name = "tesc.spv"; break;
+ case EShLangTessEvaluation: name = "tese.spv"; break;
+ case EShLangGeometry: name = "geom.spv"; break;
+ case EShLangFragment: name = "frag.spv"; break;
+ case EShLangCompute: name = "comp.spv"; break;
+ default: name = "unknown"; break;
+ }
+ } else
+ name = binaryFileName;
+
+ return name;
+}
+
+//
+// *.conf => this is a config file that can set limits/resources
+//
+bool SetConfigFile(const std::string& name)
+{
+ if (name.size() < 5)
+ return false;
+
+ if (name.compare(name.size() - 5, 5, ".conf") == 0) {
+ ConfigFile = name;
+ return true;
+ }
+
+ return false;
+}
+
+//
+// Give error and exit with failure code.
+//
+void Error(const char* message)
+{
+ printf("%s: Error %s (use -h for usage)\n", ExecutableName, message);
+ exit(EFailUsage);
+}
+
+//
+// Do all command-line argument parsing. This includes building up the work-items
+// to be processed later, and saving all the command-line options.
+//
+// Does not return (it exits) if command-line is fatally flawed.
+//
+void ProcessArguments(int argc, char* argv[])
+{
+ ExecutableName = argv[0];
+ NumWorkItems = argc; // will include some empties where the '-' options were, but it doesn't matter, they'll be 0
+ Work = new glslang::TWorkItem*[NumWorkItems];
+ for (int w = 0; w < NumWorkItems; ++w)
+ Work[w] = 0;
+
+ argc--;
+ argv++;
+ for (; argc >= 1; argc--, argv++) {
+ if (argv[0][0] == '-') {
+ switch (argv[0][1]) {
+ case 'H':
+ Options |= EOptionHumanReadableSpv;
+ // fall through to -V
+ case 'V':
+ Options |= EOptionSpv;
+ Options |= EOptionVulkanRules;
+ Options |= EOptionLinkProgram;
+ break;
+ case 'G':
+ Options |= EOptionSpv;
+ Options |= EOptionLinkProgram;
+ break;
+ case 'E':
+ Options |= EOptionOutputPreprocessed;
+ break;
+ case 'c':
+ Options |= EOptionDumpConfig;
+ break;
+ case 'd':
+ Options |= EOptionDefaultDesktop;
+ break;
+ case 'D':
+ Options |= EOptionReadHlsl;
+ break;
+ case 'e':
+ // HLSL todo: entry point handle needs much more sophistication.
+ // This is okay for one compilation unit with one entry point.
+ entryPointName = argv[1];
+ if (argc > 0) {
+ argc--;
+ argv++;
+ } else
+ Error("no <entry-point> provided for -e");
+ break;
+ case 'h':
+ usage();
+ break;
+ case 'i':
+ Options |= EOptionIntermediate;
+ break;
+ case 'l':
+ Options |= EOptionLinkProgram;
+ break;
+ case 'm':
+ Options |= EOptionMemoryLeakMode;
+ break;
+ case 'o':
+ binaryFileName = argv[1];
+ if (argc > 0) {
+ argc--;
+ argv++;
+ } else
+ Error("no <file> provided for -o");
+ break;
+ case 'q':
+ Options |= EOptionDumpReflection;
+ break;
+ case 'r':
+ Options |= EOptionRelaxedErrors;
+ break;
+ case 's':
+ Options |= EOptionSuppressInfolog;
+ break;
+ case 't':
+ #ifdef _WIN32
+ Options |= EOptionMultiThreaded;
+ #endif
+ break;
+ case 'v':
+ Options |= EOptionDumpVersions;
+ break;
+ case 'w':
+ Options |= EOptionSuppressWarnings;
+ break;
+ default:
+ usage();
+ break;
+ }
+ } else {
+ std::string name(argv[0]);
+ if (! SetConfigFile(name)) {
+ Work[argc] = new glslang::TWorkItem(name);
+ Worklist.add(Work[argc]);
+ }
+ }
+ }
+
+ // Make sure that -E is not specified alongside linking (which includes SPV generation)
+ if ((Options & EOptionOutputPreprocessed) && (Options & EOptionLinkProgram))
+ Error("can't use -E when linking is selected");
+
+ // -o makes no sense if there is no target binary
+ if (binaryFileName && (Options & EOptionSpv) == 0)
+ Error("no binary generation requested (e.g., -V)");
+}
+
+//
+// Translate the meaningful subset of command-line options to parser-behavior options.
+//
+void SetMessageOptions(EShMessages& messages)
+{
+ if (Options & EOptionRelaxedErrors)
+ messages = (EShMessages)(messages | EShMsgRelaxedErrors);
+ if (Options & EOptionIntermediate)
+ messages = (EShMessages)(messages | EShMsgAST);
+ if (Options & EOptionSuppressWarnings)
+ messages = (EShMessages)(messages | EShMsgSuppressWarnings);
+ if (Options & EOptionSpv)
+ messages = (EShMessages)(messages | EShMsgSpvRules);
+ if (Options & EOptionVulkanRules)
+ messages = (EShMessages)(messages | EShMsgVulkanRules);
+ if (Options & EOptionOutputPreprocessed)
+ messages = (EShMessages)(messages | EShMsgOnlyPreprocessor);
+ if (Options & EOptionReadHlsl)
+ messages = (EShMessages)(messages | EShMsgReadHlsl);
+}
+
+//
+// Thread entry point, for non-linking asynchronous mode.
+//
+// Return 0 for failure, 1 for success.
+//
+unsigned int CompileShaders(void*)
+{
+ glslang::TWorkItem* workItem;
+ while (Worklist.remove(workItem)) {
+ ShHandle compiler = ShConstructCompiler(FindLanguage(workItem->name), Options);
+ if (compiler == 0)
+ return 0;
+
+ CompileFile(workItem->name.c_str(), compiler);
+
+ if (! (Options & EOptionSuppressInfolog))
+ workItem->results = ShGetInfoLog(compiler);
+
+ ShDestruct(compiler);
+ }
+
+ return 0;
+}
+
+// Outputs the given string, but only if it is non-null and non-empty.
+// This prevents erroneous newlines from appearing.
+void PutsIfNonEmpty(const char* str)
+{
+ if (str && str[0]) {
+ puts(str);
+ }
+}
+
+// Outputs the given string to stderr, but only if it is non-null and non-empty.
+// This prevents erroneous newlines from appearing.
+void StderrIfNonEmpty(const char* str)
+{
+ if (str && str[0]) {
+ fprintf(stderr, "%s\n", str);
+ }
+}
+
+// Simple bundling of what makes a compilation unit for ease in passing around,
+// and separation of handling file IO versus API (programmatic) compilation.
+struct ShaderCompUnit {
+ EShLanguage stage;
+ std::string fileName;
+ char** text; // memory owned/managed externally
+};
+
+//
+// For linking mode: Will independently parse each compilation unit, but then put them
+// in the same program and link them together, making at most one linked module per
+// pipeline stage.
+//
+// Uses the new C++ interface instead of the old handle-based interface.
+//
+
+void CompileAndLinkShaderUnits(std::vector<ShaderCompUnit> compUnits)
+{
+ // keep track of what to free
+ std::list<glslang::TShader*> shaders;
+
+ EShMessages messages = EShMsgDefault;
+ SetMessageOptions(messages);
+
+ //
+ // Per-shader processing...
+ //
+
+ glslang::TProgram& program = *new glslang::TProgram;
+ for (auto it = compUnits.cbegin(); it != compUnits.cend(); ++it) {
+ const auto &compUnit = *it;
+ glslang::TShader* shader = new glslang::TShader(compUnit.stage);
+ shader->setStrings(compUnit.text, 1);
+ if (entryPointName) // HLSL todo: this needs to be tracked per compUnits
+ shader->setEntryPoint(entryPointName);
+ shaders.push_back(shader);
+
+ const int defaultVersion = Options & EOptionDefaultDesktop? 110: 100;
+
+ if (Options & EOptionOutputPreprocessed) {
+ std::string str;
+ glslang::TShader::ForbidInclude includer;
+ if (shader->preprocess(&Resources, defaultVersion, ENoProfile, false, false,
+ messages, &str, includer)) {
+ PutsIfNonEmpty(str.c_str());
+ } else {
+ CompileFailed = true;
+ }
+ StderrIfNonEmpty(shader->getInfoLog());
+ StderrIfNonEmpty(shader->getInfoDebugLog());
+ continue;
+ }
+ if (! shader->parse(&Resources, defaultVersion, false, messages))
+ CompileFailed = true;
+
+ program.addShader(shader);
+
+ if (! (Options & EOptionSuppressInfolog) &&
+ ! (Options & EOptionMemoryLeakMode)) {
+ PutsIfNonEmpty(compUnit.fileName.c_str());
+ PutsIfNonEmpty(shader->getInfoLog());
+ PutsIfNonEmpty(shader->getInfoDebugLog());
+ }
+ }
+
+ //
+ // Program-level processing...
+ //
+
+ // Link
+ if (! (Options & EOptionOutputPreprocessed) && ! program.link(messages))
+ LinkFailed = true;
+
+ // Report
+ if (! (Options & EOptionSuppressInfolog) &&
+ ! (Options & EOptionMemoryLeakMode)) {
+ PutsIfNonEmpty(program.getInfoLog());
+ PutsIfNonEmpty(program.getInfoDebugLog());
+ }
+
+ // Reflect
+ if (Options & EOptionDumpReflection) {
+ program.buildReflection();
+ program.dumpReflection();
+ }
+
+ // Dump SPIR-V
+ if (Options & EOptionSpv) {
+ if (CompileFailed || LinkFailed)
+ printf("SPIR-V is not generated for failed compile or link\n");
+ else {
+ for (int stage = 0; stage < EShLangCount; ++stage) {
+ if (program.getIntermediate((EShLanguage)stage)) {
+ std::vector<unsigned int> spirv;
+ std::string warningsErrors;
+ spv::SpvBuildLogger logger;
+ glslang::GlslangToSpv(*program.getIntermediate((EShLanguage)stage), spirv, &logger);
+
+ // Dump the spv to a file or stdout, etc., but only if not doing
+ // memory/perf testing, as it's not internal to programmatic use.
+ if (! (Options & EOptionMemoryLeakMode)) {
+ printf("%s", logger.getAllMessages().c_str());
+ glslang::OutputSpv(spirv, GetBinaryName((EShLanguage)stage));
+ if (Options & EOptionHumanReadableSpv) {
+ spv::Disassemble(std::cout, spirv);
+ }
+ }
+ }
+ }
+ }
+ }
+
+ // Free everything up, program has to go before the shaders
+ // because it might have merged stuff from the shaders, and
+ // the stuff from the shaders has to have its destructors called
+ // before the pools holding the memory in the shaders is freed.
+ delete &program;
+ while (shaders.size() > 0) {
+ delete shaders.back();
+ shaders.pop_back();
+ }
+}
+
+//
+// Do file IO part of compile and link, handing off the pure
+// API/programmatic mode to CompileAndLinkShaderUnits(), which can
+// be put in a loop for testing memory footprint and performance.
+//
+// This is just for linking mode: meaning all the shaders will be put into the
+// the same program linked together.
+//
+// This means there are a limited number of work items (not multi-threading mode)
+// and that the point is testing at the linking level. Hence, to enable
+// performance and memory testing, the actual compile/link can be put in
+// a loop, independent of processing the work items and file IO.
+//
+void CompileAndLinkShaderFiles()
+{
+ std::vector<ShaderCompUnit> compUnits;
+
+ // Transfer all the work items from to a simple list of
+ // of compilation units. (We don't care about the thread
+ // work-item distribution properties in this path, which
+ // is okay due to the limited number of shaders, know since
+ // they are all getting linked together.)
+ glslang::TWorkItem* workItem;
+ while (Worklist.remove(workItem)) {
+ ShaderCompUnit compUnit = {
+ FindLanguage(workItem->name),
+ workItem->name,
+ ReadFileData(workItem->name.c_str())
+ };
+
+ if (! compUnit.text) {
+ usage();
+ return;
+ }
+
+ compUnits.push_back(compUnit);
+ }
+
+ // Actual call to programmatic processing of compile and link,
+ // in a loop for testing memory and performance. This part contains
+ // all the perf/memory that a programmatic consumer will care about.
+ for (int i = 0; i < ((Options & EOptionMemoryLeakMode) ? 100 : 1); ++i) {
+ for (int j = 0; j < ((Options & EOptionMemoryLeakMode) ? 100 : 1); ++j)
+ CompileAndLinkShaderUnits(compUnits);
+
+ if (Options & EOptionMemoryLeakMode)
+ glslang::OS_DumpMemoryCounters();
+ }
+
+ for (auto it = compUnits.begin(); it != compUnits.end(); ++it)
+ FreeFileData(it->text);
+}
+
+int C_DECL main(int argc, char* argv[])
+{
+ ProcessArguments(argc, argv);
+
+ if (Options & EOptionDumpConfig) {
+ printf("%s", glslang::GetDefaultTBuiltInResourceString().c_str());
+ if (Worklist.empty())
+ return ESuccess;
+ }
+
+ if (Options & EOptionDumpVersions) {
+ printf("Glslang Version: %s %s\n", GLSLANG_REVISION, GLSLANG_DATE);
+ printf("ESSL Version: %s\n", glslang::GetEsslVersionString());
+ printf("GLSL Version: %s\n", glslang::GetGlslVersionString());
+ std::string spirvVersion;
+ glslang::GetSpirvVersion(spirvVersion);
+ printf("SPIR-V Version %s\n", spirvVersion.c_str());
+ printf("GLSL.std.450 Version %d, Revision %d\n", GLSLstd450Version, GLSLstd450Revision);
+ printf("Khronos Tool ID %d\n", glslang::GetKhronosToolId());
+ if (Worklist.empty())
+ return ESuccess;
+ }
+
+ if (Worklist.empty()) {
+ usage();
+ }
+
+ ProcessConfigFile();
+
+ //
+ // Two modes:
+ // 1) linking all arguments together, single-threaded, new C++ interface
+ // 2) independent arguments, can be tackled by multiple asynchronous threads, for testing thread safety, using the old handle interface
+ //
+ if (Options & EOptionLinkProgram ||
+ Options & EOptionOutputPreprocessed) {
+ glslang::InitializeProcess();
+ CompileAndLinkShaderFiles();
+ glslang::FinalizeProcess();
+ for (int w = 0; w < NumWorkItems; ++w) {
+ if (Work[w]) {
+ delete Work[w];
+ }
+ }
+ } else {
+ ShInitialize();
+
+ bool printShaderNames = Worklist.size() > 1;
+
+ if (Options & EOptionMultiThreaded) {
+ const int NumThreads = 16;
+ void* threads[NumThreads];
+ for (int t = 0; t < NumThreads; ++t) {
+ threads[t] = glslang::OS_CreateThread(&CompileShaders);
+ if (! threads[t]) {
+ printf("Failed to create thread\n");
+ return EFailThreadCreate;
+ }
+ }
+ glslang::OS_WaitForAllThreads(threads, NumThreads);
+ } else
+ CompileShaders(0);
+
+ // Print out all the resulting infologs
+ for (int w = 0; w < NumWorkItems; ++w) {
+ if (Work[w]) {
+ if (printShaderNames || Work[w]->results.size() > 0)
+ PutsIfNonEmpty(Work[w]->name.c_str());
+ PutsIfNonEmpty(Work[w]->results.c_str());
+ delete Work[w];
+ }
+ }
+
+ ShFinalize();
+ }
+
+ delete[] Work;
+
+ if (CompileFailed)
+ return EFailCompile;
+ if (LinkFailed)
+ return EFailLink;
+
+ return 0;
+}
+
+//
+// Deduce the language from the filename. Files must end in one of the
+// following extensions:
+//
+// .vert = vertex
+// .tesc = tessellation control
+// .tese = tessellation evaluation
+// .geom = geometry
+// .frag = fragment
+// .comp = compute
+//
+EShLanguage FindLanguage(const std::string& name)
+{
+ size_t ext = name.rfind('.');
+ if (ext == std::string::npos) {
+ usage();
+ return EShLangVertex;
+ }
+
+ std::string suffix = name.substr(ext + 1, std::string::npos);
+ if (suffix == "vert")
+ return EShLangVertex;
+ else if (suffix == "tesc")
+ return EShLangTessControl;
+ else if (suffix == "tese")
+ return EShLangTessEvaluation;
+ else if (suffix == "geom")
+ return EShLangGeometry;
+ else if (suffix == "frag")
+ return EShLangFragment;
+ else if (suffix == "comp")
+ return EShLangCompute;
+
+ usage();
+ return EShLangVertex;
+}
+
+//
+// Read a file's data into a string, and compile it using the old interface ShCompile,
+// for non-linkable results.
+//
+void CompileFile(const char* fileName, ShHandle compiler)
+{
+ int ret = 0;
+ char** shaderStrings = ReadFileData(fileName);
+ if (! shaderStrings) {
+ usage();
+ }
+
+ int* lengths = new int[NumShaderStrings];
+
+ // move to length-based strings, rather than null-terminated strings
+ for (int s = 0; s < NumShaderStrings; ++s)
+ lengths[s] = (int)strlen(shaderStrings[s]);
+
+ if (! shaderStrings) {
+ CompileFailed = true;
+ return;
+ }
+
+ EShMessages messages = EShMsgDefault;
+ SetMessageOptions(messages);
+
+ for (int i = 0; i < ((Options & EOptionMemoryLeakMode) ? 100 : 1); ++i) {
+ for (int j = 0; j < ((Options & EOptionMemoryLeakMode) ? 100 : 1); ++j) {
+ //ret = ShCompile(compiler, shaderStrings, NumShaderStrings, lengths, EShOptNone, &Resources, Options, (Options & EOptionDefaultDesktop) ? 110 : 100, false, messages);
+ ret = ShCompile(compiler, shaderStrings, NumShaderStrings, nullptr, EShOptNone, &Resources, Options, (Options & EOptionDefaultDesktop) ? 110 : 100, false, messages);
+ //const char* multi[12] = { "# ve", "rsion", " 300 e", "s", "\n#err",
+ // "or should be l", "ine 1", "string 5\n", "float glo", "bal",
+ // ";\n#error should be line 2\n void main() {", "global = 2.3;}" };
+ //const char* multi[7] = { "/", "/", "\\", "\n", "\n", "#", "version 300 es" };
+ //ret = ShCompile(compiler, multi, 7, nullptr, EShOptNone, &Resources, Options, (Options & EOptionDefaultDesktop) ? 110 : 100, false, messages);
+ }
+
+ if (Options & EOptionMemoryLeakMode)
+ glslang::OS_DumpMemoryCounters();
+ }
+
+ delete [] lengths;
+ FreeFileData(shaderStrings);
+
+ if (ret == 0)
+ CompileFailed = true;
+}
+
+//
+// print usage to stdout
+//
+void usage()
+{
+ printf("Usage: glslangValidator [option]... [file]...\n"
+ "\n"
+ "Where: each 'file' ends in .<stage>, where <stage> is one of\n"
+ " .conf to provide an optional config file that replaces the default configuration\n"
+ " (see -c option below for generating a template)\n"
+ " .vert for a vertex shader\n"
+ " .tesc for a tessellation control shader\n"
+ " .tese for a tessellation evaluation shader\n"
+ " .geom for a geometry shader\n"
+ " .frag for a fragment shader\n"
+ " .comp for a compute shader\n"
+ "\n"
+ "Compilation warnings and errors will be printed to stdout.\n"
+ "\n"
+ "To get other information, use one of the following options:\n"
+ "Each option must be specified separately.\n"
+ " -V create SPIR-V binary, under Vulkan semantics; turns on -l;\n"
+ " default file name is <stage>.spv (-o overrides this)\n"
+ " (unless -o is specified, which overrides the default file name)\n"
+ " -G create SPIR-V binary, under OpenGL semantics; turns on -l;\n"
+ " default file name is <stage>.spv (-o overrides this)\n"
+ " -H print human readable form of SPIR-V; turns on -V\n"
+ " -E print pre-processed GLSL; cannot be used with -l;\n"
+ " errors will appear on stderr.\n"
+ " -c configuration dump;\n"
+ " creates the default configuration file (redirect to a .conf file)\n"
+ " -d default to desktop (#version 110) when there is no shader #version\n"
+ " (default is ES version 100)\n"
+ " -D input is HLSL\n"
+ " -e specify entry-point name\n"
+ " -h print this usage message\n"
+ " -i intermediate tree (glslang AST) is printed out\n"
+ " -l link all input files together to form a single module\n"
+ " -m memory leak mode\n"
+ " -o <file> save binary into <file>, requires a binary option (e.g., -V)\n"
+ " -q dump reflection query database\n"
+ " -r relaxed semantic error-checking mode\n"
+ " -s silent mode\n"
+ " -t multi-threaded mode\n"
+ " -v print version strings\n"
+ " -w suppress warnings (except as required by #extension : warn)\n"
+ );
+
+ exit(EFailUsage);
+}
+
+#if !defined _MSC_VER && !defined MINGW_HAS_SECURE_API
+
+#include <errno.h>
+
+int fopen_s(
+ FILE** pFile,
+ const char* filename,
+ const char* mode
+)
+{
+ if (!pFile || !filename || !mode) {
+ return EINVAL;
+ }
+
+ FILE* f = fopen(filename, mode);
+ if (! f) {
+ if (errno != 0) {
+ return errno;
+ } else {
+ return ENOENT;
+ }
+ }
+ *pFile = f;
+
+ return 0;
+}
+
+#endif
+
+//
+// Malloc a string of sufficient size and read a string into it.
+//
+char** ReadFileData(const char* fileName)
+{
+ FILE *in = nullptr;
+ int errorCode = fopen_s(&in, fileName, "r");
+
+ int count = 0;
+ const int maxSourceStrings = 5; // for testing splitting shader/tokens across multiple strings
+ char** return_data = (char**)malloc(sizeof(char *) * (maxSourceStrings+1)); // freed in FreeFileData()
+
+ if (errorCode || in == nullptr)
+ Error("unable to open input file");
+
+ while (fgetc(in) != EOF)
+ count++;
+
+ fseek(in, 0, SEEK_SET);
+
+ char *fdata = (char*)malloc(count+2); // freed before return of this function
+ if (! fdata)
+ Error("can't allocate memory");
+
+ if ((int)fread(fdata, 1, count, in) != count) {
+ free(fdata);
+ Error("can't read input file");
+ }
+
+ fdata[count] = '\0';
+ fclose(in);
+
+ if (count == 0) {
+ // recover from empty file
+ return_data[0] = (char*)malloc(count+2); // freed in FreeFileData()
+ return_data[0][0]='\0';
+ NumShaderStrings = 0;
+ free(fdata);
+
+ return return_data;
+ } else
+ NumShaderStrings = 1; // Set to larger than 1 for testing multiple strings
+
+ // compute how to split up the file into multiple strings, for testing multiple strings
+ int len = (int)(ceil)((float)count/(float)NumShaderStrings);
+ int ptr_len = 0;
+ int i = 0;
+ while (count > 0) {
+ return_data[i] = (char*)malloc(len + 2); // freed in FreeFileData()
+ memcpy(return_data[i], fdata + ptr_len, len);
+ return_data[i][len] = '\0';
+ count -= len;
+ ptr_len += len;
+ if (count < len) {
+ if (count == 0) {
+ NumShaderStrings = i + 1;
+ break;
+ }
+ len = count;
+ }
+ ++i;
+ }
+
+ free(fdata);
+
+ return return_data;
+}
+
+void FreeFileData(char** data)
+{
+ for(int i = 0; i < NumShaderStrings; i++)
+ free(data[i]);
+
+ free(data);
+}
+
+void InfoLogMsg(const char* msg, const char* name, const int num)
+{
+ if (num >= 0 )
+ printf("#### %s %s %d INFO LOG ####\n", msg, name, num);
+ else
+ printf("#### %s %s INFO LOG ####\n", msg, name);
+}
diff --git a/chromium/third_party/glslang/src/StandAlone/Worklist.h b/chromium/third_party/glslang/src/StandAlone/Worklist.h
new file mode 100644
index 00000000000..57dc0db7b29
--- /dev/null
+++ b/chromium/third_party/glslang/src/StandAlone/Worklist.h
@@ -0,0 +1,98 @@
+//
+//Copyright (C) 2013 LunarG, 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:
+//
+// Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 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.
+//
+// Neither the name of 3Dlabs Inc. Ltd. nor the names of its
+// contributors may be used to endorse or promote products derived
+// from this software without specific prior written permission.
+//
+//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+//"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 THE
+//COPYRIGHT HOLDERS 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.
+//
+#ifndef WORKLIST_H_INCLUDED
+#define WORKLIST_H_INCLUDED
+
+#include "../glslang/OSDependent/osinclude.h"
+#include <string>
+#include <list>
+
+namespace glslang {
+
+ class TWorkItem {
+ public:
+ TWorkItem() { }
+ explicit TWorkItem(const std::string& s) :
+ name(s) { }
+ std::string name;
+ std::string results;
+ std::string resultsIndex;
+ };
+
+ class TWorklist {
+ public:
+ TWorklist() { }
+ virtual ~TWorklist() { }
+
+ void add(TWorkItem* item)
+ {
+ GetGlobalLock();
+
+ worklist.push_back(item);
+
+ ReleaseGlobalLock();
+ }
+
+ bool remove(TWorkItem*& item)
+ {
+ GetGlobalLock();
+
+ if (worklist.empty())
+ return false;
+ item = worklist.front();
+ worklist.pop_front();
+
+ ReleaseGlobalLock();
+
+ return true;
+ }
+
+ int size()
+ {
+ return (int)worklist.size();
+ }
+
+ bool empty()
+ {
+ return worklist.empty();
+ }
+
+ protected:
+ std::list<TWorkItem*> worklist;
+ };
+
+} // end namespace glslang
+
+#endif // WORKLIST_H_INCLUDED
diff --git a/chromium/third_party/glslang/src/StandAlone/spirv-remap.cpp b/chromium/third_party/glslang/src/StandAlone/spirv-remap.cpp
new file mode 100644
index 00000000000..f35b58eda99
--- /dev/null
+++ b/chromium/third_party/glslang/src/StandAlone/spirv-remap.cpp
@@ -0,0 +1,344 @@
+//
+//Copyright (C) 2015 LunarG, 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:
+//
+// Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 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.
+//
+// Neither the name of 3Dlabs Inc. Ltd. nor the names of its
+// contributors may be used to endorse or promote products derived
+// from this software without specific prior written permission.
+//
+//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+//"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 THE
+//COPYRIGHT HOLDERS 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.
+//
+
+#include <iostream>
+#include <fstream>
+#include <cstring>
+#include <stdexcept>
+
+#include "../SPIRV/SPVRemapper.h"
+
+namespace {
+
+ typedef unsigned int SpvWord;
+
+ // Poor man's basename: given a complete path, return file portion.
+ // E.g:
+ // Linux: /foo/bar/test -> test
+ // Win: c:\foo\bar\test -> test
+ // It's not very efficient, but that doesn't matter for our minimal-duty use.
+ // Using boost::filesystem would be better in many ways, but want to avoid that dependency.
+
+ // OS dependent path separator (avoiding boost::filesystem dependency)
+#if defined(_WIN32)
+ char path_sep_char() { return '\\'; }
+#else
+ char path_sep_char() { return '/'; }
+#endif
+
+ std::string basename(const std::string filename)
+ {
+ const size_t sepLoc = filename.find_last_of(path_sep_char());
+
+ return (sepLoc == filename.npos) ? filename : filename.substr(sepLoc+1);
+ }
+
+ void errHandler(const std::string& str) {
+ std::cout << str << std::endl;
+ exit(5);
+ }
+
+ void logHandler(const std::string& str) {
+ std::cout << str << std::endl;
+ }
+
+ // Read word stream from disk
+ void read(std::vector<SpvWord>& spv, const std::string& inFilename, int verbosity)
+ {
+ std::ifstream fp;
+
+ if (verbosity > 0)
+ logHandler(std::string(" reading: ") + inFilename);
+
+ spv.clear();
+ fp.open(inFilename, std::fstream::in | std::fstream::binary);
+
+ if (fp.fail())
+ errHandler("error opening file for read: ");
+
+ // Reserve space (for efficiency, not for correctness)
+ fp.seekg(0, fp.end);
+ spv.reserve(size_t(fp.tellg()) / sizeof(SpvWord));
+ fp.seekg(0, fp.beg);
+
+ while (!fp.eof()) {
+ SpvWord inWord;
+ fp.read((char *)&inWord, sizeof(inWord));
+
+ if (!fp.eof()) {
+ spv.push_back(inWord);
+ if (fp.fail())
+ errHandler(std::string("error reading file: ") + inFilename);
+ }
+ }
+ }
+
+ void write(std::vector<SpvWord>& spv, const std::string& outFile, int verbosity)
+ {
+ if (outFile.empty())
+ errHandler("missing output filename.");
+
+ std::ofstream fp;
+
+ if (verbosity > 0)
+ logHandler(std::string(" writing: ") + outFile);
+
+ fp.open(outFile, std::fstream::out | std::fstream::binary);
+
+ if (fp.fail())
+ errHandler(std::string("error opening file for write: ") + outFile);
+
+ for (auto it = spv.cbegin(); it != spv.cend(); ++it) {
+ SpvWord word = *it;
+ fp.write((char *)&word, sizeof(word));
+ if (fp.fail())
+ errHandler(std::string("error writing file: ") + outFile);
+ }
+
+ // file is closed by destructor
+ }
+
+ // Print helpful usage message to stdout, and exit
+ void usage(const char* const name, const char* const msg = 0)
+ {
+ if (msg)
+ std::cout << msg << std::endl << std::endl;
+
+ std::cout << "Usage: " << std::endl;
+
+ std::cout << " " << basename(name)
+ << " [-v[v[...]] | --verbose [int]]"
+ << " [--map (all|types|names|funcs)]"
+ << " [--dce (all|types|funcs)]"
+ << " [--opt (all|loadstore)]"
+ << " [--strip-all | --strip all | -s]"
+ << " [--do-everything]"
+ << " --input | -i file1 [file2...] --output|-o DESTDIR"
+ << std::endl;
+
+ std::cout << " " << basename(name) << " [--version | -V]" << std::endl;
+ std::cout << " " << basename(name) << " [--help | -?]" << std::endl;
+
+ exit(5);
+ }
+
+ // grind through each SPIR in turn
+ void execute(const std::vector<std::string>& inputFile, const std::string& outputDir,
+ int opts, int verbosity)
+ {
+ for (auto it = inputFile.cbegin(); it != inputFile.cend(); ++it) {
+ const std::string &filename = *it;
+ std::vector<SpvWord> spv;
+ read(spv, filename, verbosity);
+ spv::spirvbin_t(verbosity).remap(spv, opts);
+
+ const std::string outfile = outputDir + path_sep_char() + basename(filename);
+
+ write(spv, outfile, verbosity);
+ }
+
+ if (verbosity > 0)
+ std::cout << "Done: " << inputFile.size() << " file(s) processed" << std::endl;
+ }
+
+ // Parse command line options
+ void parseCmdLine(int argc, char** argv, std::vector<std::string>& inputFile,
+ std::string& outputDir,
+ int& options,
+ int& verbosity)
+ {
+ if (argc < 2)
+ usage(argv[0]);
+
+ verbosity = 0;
+ options = spv::spirvbin_t::NONE;
+
+ // Parse command line.
+ // boost::program_options would be quite a bit nicer, but we don't want to
+ // introduce a dependency on boost.
+ for (int a=1; a<argc; ) {
+ const std::string arg = argv[a];
+
+ if (arg == "--output" || arg == "-o") {
+ // Output directory
+ if (++a >= argc)
+ usage(argv[0], "--output requires an argument");
+ if (!outputDir.empty())
+ usage(argv[0], "--output can be provided only once");
+
+ outputDir = argv[a++];
+
+ // Remove trailing directory separator characters
+ while (!outputDir.empty() && outputDir.back() == path_sep_char())
+ outputDir.pop_back();
+
+ }
+ else if (arg == "-vv") { verbosity = 2; ++a; } // verbosity shortcuts
+ else if (arg == "-vvv") { verbosity = 3; ++a; } // ...
+ else if (arg == "-vvvv") { verbosity = 4; ++a; } // ...
+ else if (arg == "-vvvvv") { verbosity = 5; ++a; } // ...
+
+ else if (arg == "--verbose" || arg == "-v") {
+ ++a;
+ verbosity = 1;
+
+ if (a < argc) {
+ char* end_ptr = 0;
+ int verb = ::strtol(argv[a], &end_ptr, 10);
+ // If we have not read to the end of the string or
+ // the string contained no elements, then we do not want to
+ // store the value.
+ if (*end_ptr == '\0' && end_ptr != argv[a]) {
+ verbosity = verb;
+ ++a;
+ }
+ }
+ }
+ else if (arg == "--version" || arg == "-V") {
+ std::cout << basename(argv[0]) << " version 0.97 " << __DATE__ << " " << __TIME__ << std::endl;
+ exit(0);
+ } else if (arg == "--input" || arg == "-i") {
+ // Collect input files
+ for (++a; a < argc && argv[a][0] != '-'; ++a)
+ inputFile.push_back(argv[a]);
+ } else if (arg == "--do-everything") {
+ ++a;
+ options = options | spv::spirvbin_t::DO_EVERYTHING;
+ } else if (arg == "--strip-all" || arg == "-s") {
+ ++a;
+ options = options | spv::spirvbin_t::STRIP;
+ } else if (arg == "--strip") {
+ ++a;
+ if (strncmp(argv[a], "all", 3) == 0) {
+ options = options | spv::spirvbin_t::STRIP;
+ ++a;
+ }
+ } else if (arg == "--dce") {
+ // Parse comma (or colon, etc) separated list of things to dce
+ ++a;
+ for (const char* c = argv[a]; *c; ++c) {
+ if (strncmp(c, "all", 3) == 0) {
+ options = (options | spv::spirvbin_t::DCE_ALL);
+ c += 3;
+ } else if (strncmp(c, "*", 1) == 0) {
+ options = (options | spv::spirvbin_t::DCE_ALL);
+ c += 1;
+ } else if (strncmp(c, "funcs", 5) == 0) {
+ options = (options | spv::spirvbin_t::DCE_FUNCS);
+ c += 5;
+ } else if (strncmp(c, "types", 5) == 0) {
+ options = (options | spv::spirvbin_t::DCE_TYPES);
+ c += 5;
+ }
+ }
+ ++a;
+ } else if (arg == "--map") {
+ // Parse comma (or colon, etc) separated list of things to map
+ ++a;
+ for (const char* c = argv[a]; *c; ++c) {
+ if (strncmp(c, "all", 3) == 0) {
+ options = (options | spv::spirvbin_t::MAP_ALL);
+ c += 3;
+ } else if (strncmp(c, "*", 1) == 0) {
+ options = (options | spv::spirvbin_t::MAP_ALL);
+ c += 1;
+ } else if (strncmp(c, "types", 5) == 0) {
+ options = (options | spv::spirvbin_t::MAP_TYPES);
+ c += 5;
+ } else if (strncmp(c, "names", 5) == 0) {
+ options = (options | spv::spirvbin_t::MAP_NAMES);
+ c += 5;
+ } else if (strncmp(c, "funcs", 5) == 0) {
+ options = (options | spv::spirvbin_t::MAP_FUNCS);
+ c += 5;
+ }
+ }
+ ++a;
+ } else if (arg == "--opt") {
+ ++a;
+ for (const char* c = argv[a]; *c; ++c) {
+ if (strncmp(c, "all", 3) == 0) {
+ options = (options | spv::spirvbin_t::OPT_ALL);
+ c += 3;
+ } else if (strncmp(c, "*", 1) == 0) {
+ options = (options | spv::spirvbin_t::OPT_ALL);
+ c += 1;
+ } else if (strncmp(c, "loadstore", 9) == 0) {
+ options = (options | spv::spirvbin_t::OPT_LOADSTORE);
+ c += 9;
+ }
+ }
+ ++a;
+ } else if (arg == "--help" || arg == "-?") {
+ usage(argv[0]);
+ } else {
+ usage(argv[0], "Unknown command line option");
+ }
+ }
+ }
+
+} // namespace
+
+
+int main(int argc, char** argv)
+{
+ std::vector<std::string> inputFile;
+ std::string outputDir;
+ int opts;
+ int verbosity;
+
+#ifdef use_cpp11
+ // handle errors by exiting
+ spv::spirvbin_t::registerErrorHandler(errHandler);
+
+ // Log messages to std::cout
+ spv::spirvbin_t::registerLogHandler(logHandler);
+#endif
+
+ if (argc < 2)
+ usage(argv[0]);
+
+ parseCmdLine(argc, argv, inputFile, outputDir, opts, verbosity);
+
+ if (outputDir.empty())
+ usage(argv[0], "Output directory required");
+
+ std::string errmsg;
+
+ // Main operations: read, remap, and write.
+ execute(inputFile, outputDir, opts, verbosity);
+
+ // If we get here, everything went OK! Nothing more to be done.
+}
diff --git a/chromium/third_party/glslang/src/Test/100.conf b/chromium/third_party/glslang/src/Test/100.conf
new file mode 100644
index 00000000000..3899d34366f
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/100.conf
@@ -0,0 +1,28 @@
+MaxLights 32
+MaxClipPlanes 6
+MaxTextureUnits 32
+MaxTextureCoords 32
+MaxVertexAttribs 8
+MaxVertexUniformComponents 4096
+MaxVaryingFloats 64
+MaxVertexTextureImageUnits 0
+MaxCombinedTextureImageUnits 8
+MaxTextureImageUnits 8
+MaxFragmentUniformComponents 4096
+MaxDrawBuffers 1
+MaxVertexUniformVectors 16
+MaxVaryingVectors 8
+MaxFragmentUniformVectors 16
+MaxVertexOutputVectors 16
+MaxFragmentInputVectors 15
+MinProgramTexelOffset -8
+MaxProgramTexelOffset 7
+nonInductiveForLoops 0
+whileLoops 0
+doWhileLoops 0
+generalUniformIndexing 0
+generalAttributeMatrixVectorIndexing 0
+generalVaryingIndexing 0
+generalSamplerIndexing 0
+generalVariableIndexing 0
+generalConstantMatrixVectorIndexing 0
diff --git a/chromium/third_party/glslang/src/Test/100.frag b/chromium/third_party/glslang/src/Test/100.frag
new file mode 100644
index 00000000000..d536343560b
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/100.frag
@@ -0,0 +1,221 @@
+// okay
+#version 100
+int a[3] = { 2, 3, 4, }; // ERROR (lots)
+#version 100
+int uint;
+
+attribute vec4 v[3]; // ERROR
+
+float f = 2; // ERROR
+
+uniform block { // ERROR
+ int x;
+};
+
+void foo(float);
+
+void main()
+{
+ foo(3); // ERROR
+ int s = 1 << 4; // ERROR
+ s = 16 >> 2; // ERROR
+ if (a == a); // ERROR
+ int b, c;
+ b = c & 4; // ERROR
+ b = c % 4; // ERROR
+ b = c | 4; // ERROR
+ b >>= 2; // ERROR
+ b <<= 2; // ERROR
+ b %= 3; // ERROR
+
+ struct S {
+ float f;
+ float a[10];
+ } s1, s2;
+
+ s1 = s2; // ERROR
+ if (s1 == s2); // ERROR
+ if (s1 != s2); // ERROR
+
+ switch(b) { // ERROR
+ }
+}
+
+invariant gl_FragColor;
+float fa[]; // ERROR
+float f13;
+invariant f13; // ERROR
+struct S { int a; };
+invariant S; // ERROR, not an input or output
+invariant float fi; // ERROR
+varying vec4 av;
+invariant av; // okay in v100
+
+void foo10()
+{
+ invariant f; // ERROR
+ invariant float f2; // ERROR
+ float f3;
+ invariant f3; // ERROR
+}
+
+uniform vec2 uv2;
+invariant uv2; // ERROR
+invariant uniform vec3 uv3; // ERROR
+
+sampler2D glob2D; // ERROR
+void f11(sampler2D p2d)
+{
+ sampler2D v2D; // ERROR
+}
+varying sampler2D vary2D; // ERROR
+
+struct sp {
+ highp float f;
+ in float g; // ERROR
+ uniform float h; // ERROR
+ invariant float i; // ERROR
+};
+
+uniform sampler3D s3D; // ERROR
+
+#extension GL_OES_texture_3D : enable
+
+precision highp sampler3D;
+uniform sampler3D s3D2;
+
+void foo234()
+{
+ texture3D(s3D2, vec3(0.2), 0.2);
+ texture3DProj(s3D2, v[1], 0.4);
+ dFdx(v[0]); // ERROR
+ dFdy(3.2); // ERROR
+ fwidth(f13); // ERROR
+}
+
+#extension GL_OES_standard_derivatives : enable
+
+void foo236()
+{
+ dFdx(v[0]);
+ dFdy(3.2);
+ fwidth(f13);
+ gl_FragDepth = f13; // ERROR
+ gl_FragDepthEXT = f13; // ERROR
+}
+
+#extension GL_EXT_frag_depth : enable
+
+void foo239()
+{
+ gl_FragDepth = f13; // ERROR
+ gl_FragDepthEXT = f13;
+}
+
+#extension GL_OES_EGL_image_external : enable
+
+uniform samplerExternalOES sExt;
+
+void foo245()
+{
+ texture2D(sExt, vec2(0.2));
+ texture2DProj(sExt, vec3(f13));
+ texture2DProj(sExt, v[2]);
+}
+
+precision mediump samplerExternalOES;
+uniform samplerExternalOES mediumExt;
+uniform highp samplerExternalOES highExt;
+
+void foo246()
+{
+ texture2D(mediumExt, vec2(0.2));
+ texture2DProj(highExt, v[2]);
+ texture3D(sExt, vec3(f13)); // ERROR
+ texture2DProjLod(sExt, vec3(f13), f13); // ERROR
+ int a;
+ ~a; // ERROR
+ a | a; // ERROR
+ a & a; // ERROR
+}
+
+#extension GL_OES_EGL_image_external : disable
+uniform sampler2D s2Dg;
+
+int foo203940(int a, float b, float a) // ERROR, a redefined
+{
+ texture2DProjGradEXT(s2Dg, vec3(f13), uv2, uv2); // ERROR, extension not enabled
+ return a;
+}
+
+float f123 = 4.0f; // ERROR
+float f124 = 5e10F; // ERROR
+
+#extension GL_EXT_shader_texture_lod : enable
+
+uniform samplerCube sCube;
+
+void foo323433()
+{
+ texture2DLodEXT(s2Dg, uv2, f13);
+ texture2DProjGradEXT(s2Dg, vec3(f13), uv2, uv2);
+ texture2DGradEXT(s2Dg, uv2, uv2, uv2);
+ textureCubeGradEXT(sCube, vec3(f13), vec3(f13), vec3(f13));
+}
+
+int fgfg(float f, mediump int i);
+int fgfg(float f, highp int i) { return 2; } // ERROR, precision qualifier difference
+
+int fffg(float f);
+int fffg(float f); // ERROR, can't have multiple prototypes
+
+int gggf(float f);
+int gggf(float f) { return 2; }
+
+int agggf(float f) { return 2; }
+int agggf(float f);
+int agggf(float f); // ERROR, second prototype
+
+varying struct SSS { float f; } s; // ERROR
+
+int vf(void);
+int vf2();
+int vf3(void v); // ERROR
+int vf4(int, void); // ERROR
+int vf5(int, void v); // ERROR
+
+void badswizzle()
+{
+ vec3 a[5];
+ a.y; // ERROR, no array swizzle
+ a.zy; // ERROR, no array swizzle
+ a.nothing; // ERROR
+ a.length(); // ERROR, not this version
+ a.method(); // ERROR
+}
+
+float fooinit();
+
+float fooinittest()
+{
+ return fooinit();
+}
+
+// Test extra-function initializers
+const float fi1 = 3.0;
+const float fi2 = 4.0;
+const float fi3 = 5.0;
+
+float fooinit()
+{
+ return fi1 + fi2 + fi3; // should make a constant of 12.0
+}
+
+int init1 = gl_FrontFacing ? 1 : 2; // ERROR, non-const initializer
+
+#pragma STDGL invariant(all)
+
+#line 3000
+#error line of this error should be 3000
+
+uniform samplerExternalOES badExt; // syntax ERROR
diff --git a/chromium/third_party/glslang/src/Test/100Limits.vert b/chromium/third_party/glslang/src/Test/100Limits.vert
new file mode 100644
index 00000000000..e42f7684507
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/100Limits.vert
@@ -0,0 +1,76 @@
+#version 100
+
+int ga, gb;
+float f;
+
+uniform sampler2D fsa[3];
+uniform float fua[10];
+attribute mat3 am3;
+attribute vec2 av2;
+varying vec4 va[4];
+
+const mat2 m2 = mat2(1.0);
+const vec3 v3 = vec3(2.0);
+
+void foo(inout float a) {}
+
+int bar()
+{
+ return 1;
+}
+
+void main()
+{
+ while (ga < gb) { }
+
+ do { } while (false);
+
+ for ( ; ; ); // ERROR
+ for ( ; ga==gb; ); // ERROR
+ for ( ; ; f++); // ERROR
+ for ( ga = 0; ; ); // ERROR
+ for ( bool a = false; ; ); // ERROR
+ for (float a = 0.0; a == sin(f); ); // ERROR
+ for ( int a = 0; a < 10; a *= 2); // ERROR
+ for ( int a = 0; a <= 20; a++) --a; // ERROR
+ for ( int a = 0; a <= 20; a++) { if (ga==0) a = 4; } // ERROR
+ for (float a = 0.0; a <= 20.0; a += 2.0);
+ for (float a = 0.0; a != 20.0; a -= 2.0) { if (ga==0) ga = 4; }
+ for (float a = 0.0; a == 20.0; a--) for (float a = 0.0; a == 20.0; a--); // two different 'a's, everything okay
+ for (float a = 0.0; a <= 20.0; a += 2.0);
+ for (float a = 0.0; a <= 20.0; a += 2.0);
+ for (float a = 0.0; a > 2.0 * 20.0; a += v3.y);
+ for (float a = 0.0; a >= 20.0; a += 2.0) foo(a); // ERROR
+
+ int ia[9];
+
+ fsa[ga]; // ERROR
+ fua[ga];
+ am3[ga]; // ERROR
+ av2[ga]; // ERROR
+ va[2+ga]; // ERROR
+ m2[ga]; // ERROR
+ v3[ga/2]; // ERROR
+ ia[ga]; // ERROR
+
+ for (int a = 3; a >= 0; a--) {
+ fsa[a];
+ fua[a+2];
+ am3[3*a];
+ av2[3*a];
+ va[a-1];
+ m2[a/2];
+ v3[a];
+ ia[a];
+ ia[bar()]; // ERROR
+ }
+
+ fsa[2];
+ fua[3];
+ am3[2];
+ av2[1];
+ va[1];
+ m2[1];
+ v3[1];
+ ia[3];
+}
diff --git a/chromium/third_party/glslang/src/Test/100scope.vert b/chromium/third_party/glslang/src/Test/100scope.vert
new file mode 100644
index 00000000000..7ffa7be9d78
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/100scope.vert
@@ -0,0 +1,76 @@
+#version 100
+
+int f(int a, int b, int c)
+{
+ int a = b; // ERROR, redefinition
+
+ {
+ float a = float(a) + 1.0;
+ }
+
+ return a;
+}
+
+int f(int a, int b, int c); // okay to redeclare
+
+bool b;
+float b(int a); // ERROR: redefinition
+
+float c(int a);
+bool c; // ERROR: redefinition
+
+float f; // ERROR: redefinition
+float tan; // okay, built-in is in an outer scope
+float sin(float x); // ERROR: can't redefine built-in functions
+float cos(float x) // ERROR: can't redefine built-in functions
+{
+ return 1.0;
+}
+bool radians(bool x) // okay, can overload built-in functions
+{
+ return true;
+}
+
+invariant gl_Position;
+
+void main()
+{
+ int g(); // ERROR: no local function declarations
+ g();
+
+ float sin; // okay
+ sin;
+ sin(0.7); // ERROR, use of hidden function
+ f(1,2,3);
+
+ float f; // hides f()
+ f = 3.0;
+
+ gl_Position = vec4(f);
+
+ for (int f = 0; f < 10; ++f)
+ ++f;
+
+ int x = 1;
+ {
+ float x = 2.0, /* 2nd x visible here */ y = x; // y is initialized to 2
+ int z = z; // ERROR: z not previously defined.
+ }
+ {
+ int x = x; // x is initialized to '1'
+ }
+
+ struct S
+ {
+ int x;
+ };
+ {
+ S S = S(0); // 'S' is only visible as a struct and constructor
+ S.x; // 'S' is now visible as a variable
+ }
+
+ int degrees;
+ degrees(3.2); // ERROR, use of hidden built-in function
+}
+
+varying struct SSS { float f; } s; // ERROR
diff --git a/chromium/third_party/glslang/src/Test/110scope.vert b/chromium/third_party/glslang/src/Test/110scope.vert
new file mode 100644
index 00000000000..76133efe752
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/110scope.vert
@@ -0,0 +1,74 @@
+#version 110
+
+int f(int a, int b, int c)
+{
+ int a = b; // ERROR, redefinition
+
+ {
+ float a = float(a) + 1.0; // okay
+ }
+
+ return a;
+}
+
+int f(int a, int b, int c); // okay to redeclare
+
+bool b;
+float b(int a); // okay, b and b() are different
+
+float c(int a);
+bool c; // okay, and c() are different
+
+float f; // okay f and f() are different
+float tan; // okay, hides built-in function
+float sin(float x); // okay, can redefine built-in functions
+float cos(float x) // okay, can redefine built-in functions
+{
+ return 1.0;
+}
+bool radians(bool x) // okay, can overload built-in functions
+{
+ return true;
+}
+
+int gi = f(1,2,3); // ERROR, can't call user-defined function from global scope
+
+void main()
+{
+ int g(); // okay
+ g();
+
+ float sin; // okay
+ sin;
+ sin(0.7); // okay
+ f(1,2,3);
+
+ float f;
+ f = 3.0;
+
+ gl_Position = vec4(f);
+
+ for (int f = 0; f < 10; ++f)
+ ++f;
+
+ int x = 1;
+ {
+ float x = 2.0, /* 2nd x visible here */ y = x; // y is initialized to 2
+ int z = z; // ERROR: z not previously defined.
+ }
+ {
+ int x = x; // x is initialized to '1'
+ }
+
+ struct S
+ {
+ int x;
+ };
+ {
+ S S = S(0); // 'S' is only visible as a struct and constructor
+ S.x; // 'S' is now visible as a variable
+ }
+
+ int degrees;
+ degrees(3.2);
+}
diff --git a/chromium/third_party/glslang/src/Test/120.frag b/chromium/third_party/glslang/src/Test/120.frag
new file mode 100644
index 00000000000..9035aed7b41
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/120.frag
@@ -0,0 +1,238 @@
+#version 120
+
+float lowp;
+float mediump;
+float highp;
+
+float precision;
+
+in vec4 i;
+out vec4 o;
+
+uniform sampler2D s2D;
+centroid varying vec2 centTexCoord;
+
+uniform mat4x2 m;
+
+struct s {
+ float f;
+};
+
+void main()
+{
+ mat2x3 m23 = mat2x3(m);
+
+ int a;
+ bool b;
+ s sv = s(a);
+ float[2] ia = float[2](3, i.y);
+ float f1 = 1;
+ float f = a;
+ f = a;
+ ivec3 iv3;
+ vec3 v3 = iv3;
+ f = f + a;
+ f = a - f;
+ f += a;
+ f = a - f;
+ v3 *= iv3;
+ v3 = iv3 / 2.0f;
+ v3 = 3.0 * iv3;
+ v3 = 2 * v3;
+ v3 = v3 - 2;
+ if (f < a ||
+ a <= f ||
+ f > a ||
+ f >= a ||
+ a == f ||
+ f != a);
+ f = b ? a : f;
+ f = b ? f : a;
+ f = b ? a : a;
+ s news = sv;
+
+ i.xy + i.xyz; // ERROR
+ m * i.xyz; // ERROR
+ m + i; // ERROR
+ int aoeu = 1.0; // ERROR
+ f = b; // ERROR
+ f = a + b; // ERROR
+ f = b * a; // ERROR
+ b = a; // ERROR
+ b = b + f; // ERROR
+ f |= b; // ERROR
+
+ gl_FragColor = texture2D(s2D, centTexCoord);
+
+ float flat;
+ float smooth;
+ float noperspective;
+ float uvec2;
+ float uvec3;
+ float uvec4;
+ //packed; // ERROR, reserved word
+
+ {
+ mat4 m;
+ vec4 v;
+ bool b;
+ gl_FragColor += b ? v : m; // ERROR, types don't match around ":"
+ }
+
+ gl_FragColor.xr; // ERROR, swizzlers not from same field space
+ gl_FragColor.xyxyx.xy; // ERROR, cannot make a vec5, even temporarily
+ centTexCoord.z; // ERROR, swizzler out of range
+ (a,b) = true; // ERROR, not an l-value
+}
+
+float imageBuffer;
+float uimage2DRect;
+
+int main() {} // ERROR
+void main(int a) {} // ERROR
+
+const int a; // ERROR
+
+int foo(in float a);
+int foo(out float a) // ERROR
+{
+ return 3.2; // ERROR
+ foo(a); // ERROR
+}
+
+bool gen(vec3 v)
+{
+ if (abs(v[0]) < 1e-4F && abs(v[1]) < 1e-4)
+ return true;
+}
+
+void v1()
+{
+}
+
+void v2()
+{
+ return v1(); // ERROR, no expression allowed, even though void
+}
+
+void atest()
+{
+ vec4 v = gl_TexCoord[1];
+ v += gl_TexCoord[3];
+}
+
+varying vec4 gl_TexCoord[6]; // okay, assigning a size
+varying vec4 gl_TexCoord[5]; // ERROR, changing size
+
+mat2x2 m22;
+mat2x3 m23;
+mat2x4 m24;
+
+mat3x2 m32;
+mat3x3 m33;
+mat3x4 m34;
+
+mat4x2 m42;
+mat4x3 m43;
+mat4x4 m44;
+
+void foo123()
+{
+ mat2 r2 = matrixCompMult(m22, m22);
+ mat3 r3 = matrixCompMult(m33, m33);
+ mat4 r4 = matrixCompMult(m44, m44);
+
+ mat2x3 r23 = matrixCompMult(m23, m23);
+ mat2x4 r24 = matrixCompMult(m24, m24);
+ mat3x2 r32 = matrixCompMult(m32, m32);
+ mat3x4 r34 = matrixCompMult(m34, m34);
+ mat4x2 r42 = matrixCompMult(m42, m42);
+ mat4x3 r43 = matrixCompMult(m43, m43);
+
+ mat3x2 rfoo1 = matrixCompMult(m23, m32); // ERROR
+ mat3x4 rfoo2 = matrixCompMult(m34, m44); // ERROR
+}
+
+void matConst()
+{
+ vec2 v2;
+ vec3 v3;
+ mat4 m4b1 = mat4(v2, v3); // ERROR, not enough
+ mat4 m4b2 = mat4(v2, v3, v3, v3, v3, v2, v2); // ERROR, too much
+ mat4 m4g = mat4(v2, v3, v3, v3, v3, v3);
+ mat4 m4 = mat4(v2, v3, v3, v3, v3, v2);
+ mat3 m3 = mat3(m4);
+ mat3 m3b1 = mat3(m4, v2); // ERROR, extra arg
+ mat3 m3b2 = mat3(m4, m4); // ERROR, extra arg
+ mat3x2 m32 = mat3x2(m4);
+ mat4 m4c = mat4(m32);
+ mat3 m3s = mat3(v2.x);
+
+ mat3 m3a1[2] = mat3[2](m3s, m3s);
+ mat3 m3a2[2] = mat3[2](m3s, m3s, m3s); // ERROR, too many args
+}
+
+uniform sampler3D s3D;
+uniform sampler1D s1D;
+uniform sampler2DShadow s2DS;
+
+void foo2323()
+{
+ vec4 v;
+ vec2 v2;
+ float f;
+ v = texture2DLod(s2D, v2, f); // ERROR
+ v = texture3DProjLod(s3D, v, f); // ERROR
+ v = texture1DProjLod(s1D, v, f); // ERROR
+ v = shadow2DProjLod(s2DS, v, f); // ERROR
+
+ v = texture1DGradARB(s1D, f, f, f); // ERROR
+ v = texture2DProjGradARB(s2D, v, v2, v2); // ERROR
+ v = shadow2DProjGradARB(s2DS, v, v2, v2); // ERROR
+}
+
+#extension GL_ARB_shader_texture_lod : require
+
+void foo2324()
+{
+ vec4 v;
+ vec2 v2;
+ float f;
+ v = texture2DLod(s2D, v2, f);
+ v = texture3DProjLod(s3D, v, f);
+ v = texture1DProjLod(s1D, v, f);
+ v = shadow2DProjLod(s2DS, v, f);
+
+ v = texture1DGradARB(s1D, f, f, f);
+ v = texture2DProjGradARB(s2D, v, v2, v2);
+ v = shadow2DProjGradARB(s2DS, v, v2, v2);
+ v = shadow2DRectProjGradARB(s2DS, v, v2, v2); // ERROR
+}
+
+uniform sampler2DRect s2DRbad; // ERROR
+
+void foo121111()
+{
+ vec2 v2;
+ vec4 v = texture2DRect(s2DRbad, v2);
+}
+
+#extension GL_ARB_texture_rectangle : enable
+
+uniform sampler2DRect s2DR;
+uniform sampler2DRectShadow s2DRS;
+
+void foo12111()
+{
+ vec2 v2;
+ vec3 v3;
+ vec4 v4;
+ vec4 v;
+ v = texture2DRect(s2DR, v2);
+ v = texture2DRectProj(s2DR, v3);
+ v = texture2DRectProj(s2DR, v4);
+ v = shadow2DRect(s2DRS, v3);
+ v = shadow2DRectProj(s2DRS, v4);
+
+ v = shadow2DRectProjGradARB(s2DRS, v, v2, v2);
+}
diff --git a/chromium/third_party/glslang/src/Test/120.vert b/chromium/third_party/glslang/src/Test/120.vert
new file mode 100644
index 00000000000..436a8f632ee
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/120.vert
@@ -0,0 +1,201 @@
+#version 120
+
+in vec4 i; // ERROR
+out vec4 o; // ERROR
+
+attribute vec2 attv2;
+attribute vec4 attv4;
+uniform sampler2D s2D;
+invariant varying vec2 centTexCoord;
+invariant gl_Position;
+centroid gl_Position; // ERROR
+centroid centroid foo; // ERROR
+invariant gl_Position, gl_PointSize;
+
+void main()
+{
+ centTexCoord = attv2;
+ gl_Position = attv4;
+
+ gl_ClipVertex = attv4;
+ gl_ClipDistance[1] = 0.2; // ERROR
+
+ vec3[12] a;
+ vec4[a.length()] b;
+ gl_Position = b[b.length()-1];
+
+ float f[];
+ int a1 = f.length(); // ERROR
+ float f[7];
+ int aa = f.length();
+ int a2 = f.length; // ERROR
+ int a3 = f.length(a); // ERROR
+ int a4 = f.flizbit; // ERROR
+ int a4 = f.flizbit(); // ERROR
+ float md[2][4]; // ERROR
+ float[2] md2[4]; // ERROR
+ float[2][4] md3; // ERROR
+ float md5, md6[2][3]; // ERROR
+ float[2] md4, md7[4]; // ERROR
+ float md9[2][3] = float[2][3](1, 2, 3, 4, 5, 6); // ERROR
+ float md10, md11[2][3] = float[2][3](1, 2, 3, 4, 5, 6); // ERROR
+
+ gl_PointSize = 3.8;
+}
+
+uniform float initted = 3.4; // okay
+
+const float concall = sin(0.3);
+
+int[2][3] foo( // ERROR
+ float[2][3] a, // ERROR
+ float[2] b[3], // ERROR
+ float c[2][3]); // ERROR
+
+int overloadA(in float f);
+int overloadA(out float f); // ERROR, different qualifiers
+float overloadA(float); // ERROR, different return value for same signature
+float overloadA(out float f, int);
+float overloadA(int i);
+
+void overloadB(float, const in float) { }
+
+vec2 overloadC(int, int);
+vec2 overloadC(const in int, float);
+vec2 overloadC(float, int);
+vec2 overloadC(vec2, vec2);
+
+vec3 overloadD(int, float);
+vec3 overloadD(float, in int);
+
+vec3 overloadE(float[2]);
+vec3 overloadE(mat2 m);
+vec3 overloadE(vec2 v);
+
+vec3 overloadF(int);
+vec3 overloadF(float);
+
+void foo()
+{
+ float f;
+ int i;
+
+ overloadB(f, f);
+ overloadB(f, 2);
+ overloadB(1, i);
+
+ overloadC(1); // ERROR
+ overloadC(1, i);
+ overloadC(vec2(1), vec2(2));
+ overloadC(f, 3.0); // ERROR, no way
+ overloadC(ivec2(1), vec2(2));
+
+ overloadD(i, f);
+ overloadD(f, i);
+ overloadD(i, i); // ERROR, ambiguous
+
+ int overloadB; // hiding
+ overloadB(1, i); // ERROR
+
+ sin(1);
+ texture2D(s2D, ivec2(0));
+ clamp(attv4, 0, 1);
+ clamp(ivec4(attv4), 0, 1);
+
+ int a[2];
+ overloadC(a, 3); // ERROR
+ overloadE(a); // ERROR
+ overloadE(3.3); // ERROR
+ overloadE(vec2(3.3));
+ overloadE(mat2(0.5));
+ overloadE(ivec4(1)); // ERROR
+ overloadE(ivec2(1));
+
+ float b[2];
+ overloadE(b);
+
+ overloadF(1, 1); // ERROR
+ overloadF(1);
+}
+
+varying vec4 gl_TexCoord[35]; // ERROR, size too big
+
+// tests for output conversions
+void outFun(in float, out ivec2, in int, out float);
+int outFunRet(in float, out int, const in int, out ivec4);
+ivec2 outFunRet(in float, out ivec4, in int, out ivec4);
+
+void foo2()
+{
+ vec2 v2;
+ vec4 v4;
+ float f;
+ int i;
+
+ outFun(i, v2, i, f);
+ outFunRet(i, f, i, v4);
+ float ret = outFunRet(i, f, i, v4);
+ vec2 ret2 = outFunRet(i, v4, i, v4);
+ bool b = any(lessThan(v4, attv4)); // tests aggregate arg to unary built-in
+}
+
+void noise()
+{
+ float f1 = noise1(1.0);
+ vec2 f2 = noise2(vec2(1.0));
+ vec3 f3 = noise3(vec3(1.0));
+ vec4 f4 = noise4(vec4(1.0));
+}
+
+// version 130 features
+
+uniform int c;
+
+attribute ivec2 x;
+attribute vec2 v2a;
+attribute float c1D;
+attribute vec2 c2D;
+attribute vec3 c3D;
+
+uniform vec4 v4;
+
+void foo213()
+{
+ float f = 3;
+ switch (c) { // ERRORs...
+ case 1:
+ f = sin(f);
+ break;
+ case 2:
+ f = f * f;
+ default:
+ f = 3.0;
+ }
+
+ int i;
+ i << 3 | 0x8A >> 1 & 0xFF; // ERRORs...
+
+ vec3 modfOut, modfIn;
+ vec3 v11 = modf(modfIn, modfOut); // ERRORS...
+ float t = trunc(f);
+ vec2 v12 = round(v2a);
+ vec2 v13 = roundEven(v2a);
+ bvec2 b10 = isnan(v2a);
+ bvec4 b11 = isinf(v4);
+
+ sinh(c1D) + // ERRORS...
+ cosh(c1D) * tanh(c2D);
+ asinh(c4D) + acosh(c4D);
+ atanh(c3D);
+
+ int id = gl_VertexID; // ERROR
+ gl_ClipDistance[1] = 0.3; // ERROR
+}
+
+// token pasting (ERRORS...)
+
+#define mac abc##def
+int mac;
+
+#define macr(A,B) A ## B
+int macr(qrs,tuv);
diff --git a/chromium/third_party/glslang/src/Test/130.frag b/chromium/third_party/glslang/src/Test/130.frag
new file mode 100644
index 00000000000..3e394110b55
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/130.frag
@@ -0,0 +1,169 @@
+#version 130
+
+lowp vec3 a;
+mediump float b;
+highp int c;
+
+precision highp float;
+
+in vec4 i;
+out vec4 o;
+
+flat in float fflat;
+smooth in float fsmooth;
+noperspective in float fnop;
+
+void main()
+{
+ float clip = gl_ClipDistance[3];
+}
+
+uniform samplerCube sampC;
+
+void foo()
+{
+ vec4 s = textureGather(sampC, vec3(0.2));
+}
+
+#extension GL_ARB_texture_gather : enable
+
+void bar()
+{
+ vec4 s = textureGather(sampC, vec3(0.2));
+}
+
+flat in vec3 gl_Color; // ERROR, type
+in vec4 gl_Color;
+flat in vec4 gl_Color;
+flat in vec4 gl_Color[2]; // ERROR, array
+vec4 gl_Color; // ERROR, storage
+
+#extension GL_ARB_texture_gather : warn
+
+void bar2()
+{
+ vec4 s = textureGather(sampC, vec3(0.2));
+
+ uvec3 uv3;
+ bvec3 b3;
+ b3 = lessThan(uv3, uv3);
+ b3 = equal(uv3, uv3);
+ const bvec2 bl1 = greaterThanEqual(uvec2(2, 3), uvec2(3,3));
+ const bvec2 bl2 = equal(uvec2(2, 3), uvec2(3,3));
+ const bvec2 bl3 = equal(bl1, bl2); // yes, equal
+ int a1[int(bl3.x)];
+ int a2[int(bl3.y)];
+ a1[0]; // size 1
+ a2[0]; // size 1
+ const bvec4 bl4 = notEqual(greaterThan(uvec4(1,2,3,4), uvec4(0,2,0,6)), lessThanEqual(uvec4(7,8,9,10), uvec4(6, 8, 0, 11))); // compare (t,f,t,f) with (f,t,f,t)
+ int a3[int(bl4.x)+int(bl4.y)+int(bl4.z)+int(bl4.w)];
+ a3[3]; // size 4
+ b3 != b3;
+ b3 < b3; // ERROR
+ uv3 > uv3; // ERROR
+ uvec2(2, 3) >= uvec2(3,3); // ERROR
+ int(bl4) <= int(bl4); // true
+ int(bl4.x) > int(bl4.y); // false
+}
+
+#extension GL_ARB_texture_gather : enable
+#extension GL_ARB_texture_rectangle : enable
+
+uniform sampler2D samp2D;
+uniform sampler2DShadow samp2DS;
+uniform sampler2DRect samp2DR;
+uniform sampler2DArray samp2DA;
+
+void bar23()
+{
+ vec4 s;
+ s = textureGatherOffset(sampC, vec3(0.3), ivec2(1)); // ERROR
+ s = textureGatherOffset(samp2DR, vec2(0.3), ivec2(1)); // ERROR
+ s = textureGatherOffset(samp2D, vec2(0.3), ivec2(1));
+ s = textureGatherOffset(samp2DA, vec3(0.3), ivec2(1));
+ s = textureGatherOffset(samp2DS, vec2(0.3), 1.3, ivec2(1)); // ERROR
+ s = textureGatherOffset(samp2D, vec2(0.3), ivec2(1), 2); // ERROR
+}
+
+#extension GL_ARB_gpu_shader5 : enable
+
+void bar234()
+{
+ vec4 s;
+ s = textureGatherOffset(samp2D, vec2(0.3), ivec2(1));
+ s = textureGatherOffset(samp2DA, vec3(0.3), ivec2(1));
+ s = textureGatherOffset(samp2DR, vec2(0.3), ivec2(1));
+ s = textureGatherOffset(samp2DS, vec2(0.3), 1.3, ivec2(1));
+ s = textureGatherOffset(samp2D, vec2(0.3), ivec2(1), 2);
+}
+
+#extension GL_ARB_texture_cube_map_array : enable
+
+uniform samplerCubeArray Sca;
+uniform isamplerCubeArray Isca;
+uniform usamplerCubeArray Usca;
+uniform samplerCubeArrayShadow Scas;
+
+void bar235()
+{
+ ivec3 a = textureSize(Sca, 3);
+ vec4 b = texture(Sca, i);
+ ivec4 c = texture(Isca, i, 0.7);
+ uvec4 d = texture(Usca, i);
+
+ b = textureLod(Sca, i, 1.7);
+ a = textureSize(Scas, a.x);
+ float f = texture(Scas, i, b.y);
+ c = textureGrad(Isca, i, vec3(0.1), vec3(0.2));
+}
+
+int \
+ x; // ERROR until 420pack is turned on
+
+#extension GL_ARB_shading_language_420pack : enable
+
+const int ai[3] = { 10, 23, 32 };
+layout(binding=0) uniform blockname { int a; } instanceName; // ERROR
+uniform layout(binding=0) sampler2D bounds;
+
+void bar23444()
+{
+ mat4x3 m43; \
+ float a1 = m43[3].y;
+ vec3 v3;
+ int a2 = m43.length();
+ a2 += m43[1].length();
+ a2 += v3.length();
+ const float b = 2 * a1;
+ a.x = gl_MinProgramTexelOffset + gl_MaxProgramTexelOffset;
+ bool boolb;
+ boolb.length(); // ERROR
+ m43[3][1].length(); // ERROR
+ v3.length; // ERROR
+ v3.length(b); // ERROR
+}
+
+in float gl_FogFragCoord;
+
+#extension GL_ARB_separate_shader_objects : enable
+
+in float gl_FogFragCoord;
+in int gl_FogFragCoord; // ERROR
+
+layout(early_fragment_tests) in; // ERROR
+layout(r32i) uniform iimage2D iimg2Dbad; // ERROR
+
+#extension GL_ARB_shader_image_load_store : enable
+
+layout(early_fragment_tests) in;
+
+layout(r32i) uniform iimage2D iimg2D;
+
+void qux2()
+{
+ int i;
+ imageAtomicCompSwap(iimg2D, ivec2(i,i), i, i);
+ ivec4 pos = imageLoad(iimg2D, ivec2(i,i));
+}
+
+layout(early_fragment_tests) out; // ERROR
diff --git a/chromium/third_party/glslang/src/Test/130.vert b/chromium/third_party/glslang/src/Test/130.vert
new file mode 100644
index 00000000000..287ba6a024a
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/130.vert
@@ -0,0 +1,78 @@
+#version 130
+
+uniform int c;
+uniform usampler2D us2D;
+
+in ivec2 x;
+in vec2 v2a;
+in float c1D;
+in vec2 c2D;
+in vec3 c3D;
+smooth vec4 c4D; // ??
+
+uniform vec4 v4;
+
+void main()
+{
+ float f = 3;
+ switch (c) { // full switch testing in switch.frag
+ case 1:
+ f = sin(f);
+ break;
+ case 2:
+ f = f * f;
+ default:
+ f = 3.0;
+ }
+
+ uint i;
+ i = texture(us2D, x).w; // full uint testing in uint.frag
+ i << 3u | 0x8Au >> 1u & 0xFFu;
+
+ vec3 modfOut, modfIn;
+ vec3 v11 = modf(modfIn, modfOut);
+ float t = trunc(f);
+ vec2 v12 = round(v2a);
+ vec2 v13 = roundEven(v2a);
+ bvec2 b10 = isnan(v2a);
+ bvec4 b11 = isinf(v4);
+
+ sinh(c1D) +
+ cosh(c1D) * tanh(c2D);
+ asinh(c4D) + acosh(c4D);
+ atanh(c3D);
+
+ int id = gl_VertexID;
+ gl_ClipDistance[1] = 0.3;
+}
+
+// version 140 features
+
+//uniform isamplerBuffer sbuf;
+
+//layout(std140) uniform blockName {
+// int anonMem;
+//};
+
+void foo88()
+{
+ int id = gl_InstanceID; // ERROR
+ //id += anonMem;
+ id += texelFetch(id, 8);
+
+ gl_ClipVertex; // these are all present...
+ gl_Color;
+ gl_LightSource[0];
+ gl_DepthRange.far;
+ gl_TexCoord;
+ gl_FogFragCoord;
+ gl_FrontColor;
+}
+
+// token pasting
+
+#define mac abc##def
+int mac;
+
+#define macr(A,B) A##B
+int macr(qrs,tuv);
diff --git a/chromium/third_party/glslang/src/Test/140.frag b/chromium/third_party/glslang/src/Test/140.frag
new file mode 100644
index 00000000000..2bc2f59fe0c
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/140.frag
@@ -0,0 +1,53 @@
+#version 140
+
+varying vec4 v;
+
+in vec4 i;
+out vec4 o;
+
+in float gl_ClipDistance[5];
+
+void main()
+{
+ float clip = gl_ClipDistance[2];
+}
+#ifdef GL_ES
+#error GL_ES is set
+#else
+#error GL_ES is not set
+#endif
+
+in struct S { float f; } s; // ERROR
+
+float patch = 3.1;
+
+layout(location=3) in vec4 vl; // ERROR
+
+layout(location = 3) out vec4 factorBad; // ERROR
+
+#extension GL_ARB_explicit_attrib_location : enable
+
+layout(location = 5) out vec4 factor;
+
+#extension GL_ARB_separate_shader_objects : enable
+
+layout(location=4) in vec4 vl2;
+
+float fooi();
+
+void foo()
+{
+ vec2 r1 = modf(v.xy, v.zw); // ERROR, v.zw not l-value
+ vec2 r2 = modf(o.xy, o.zw);
+ o.z = fooi();
+}
+
+// Test extra-function initializers
+
+float i1 = gl_FrontFacing ? -2.0 : 2.0;
+float i2 = 102;
+
+float fooi()
+{
+ return i1 + i2;
+}
diff --git a/chromium/third_party/glslang/src/Test/140.vert b/chromium/third_party/glslang/src/Test/140.vert
new file mode 100644
index 00000000000..31689fba29d
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/140.vert
@@ -0,0 +1,59 @@
+#version 140
+
+uniform isamplerBuffer sbuf;
+
+layout(std140) uniform blockName {
+ int anonMem;
+};
+
+void main()
+{
+ int id = gl_InstanceID;
+ id += anonMem;
+ id += texelFetch(sbuf, 8).w;
+ gl_ClipVertex; // could be ERROR, but compiling under compatibility profile
+ gl_Color; // could be ERROR, but compiling under compatibility profile
+ gl_LightSource[0]; // could be ERROR, but compiling under compatibility profile
+ gl_DepthRange.far;
+ gl_TexCoord; // could be ERROR, but compiling under compatibility profile
+ gl_FogFragCoord; // could be ERROR, but compiling under compatibility profile
+ gl_FrontColor; // could be ERROR, but compiling under compatibility profile
+}
+
+out vec4 gl_Position; // ERROR
+
+layout(location = 9) in vec4 locBad; // ERROR
+
+#extension GL_ARB_explicit_attrib_location : enable
+
+layout(location = 9) in vec4 loc;
+
+#extension GL_ARB_separate_shader_objects : enable
+
+out vec4 gl_Position;
+in vec4 gl_Position; // ERROR
+out vec3 gl_Position; // ERROR
+
+out float gl_PointSize;
+out vec4 gl_ClipVertex;
+out float gl_FogFragCoord;
+
+uniform sampler2DRect s2dr;
+uniform sampler2DRectShadow s2drs;
+in ivec2 itloc2;
+in vec2 tloc2;
+in vec3 tloc3;
+in vec4 tloc4;
+
+void foo()
+{
+ vec4 v = texelFetch(s2dr, itloc2);
+ v += texelFetch(s2dr, itloc2, 0.2); // ERROR, no lod
+ v += texture(s2dr, tloc2);
+ v += texture(s2dr, tloc2, 0.3); // ERROR, no bias
+ v += texture(s2drs, tloc3);
+ v += textureProj(s2dr, tloc3);
+ v += textureProj(s2dr, tloc4);
+ v += textureProjGradOffset(s2dr, tloc4, ivec2(0.0), ivec2(0.0), ivec2(1,2));
+ v += textureProjGradOffset(s2drs, tloc4, ivec2(0.0), ivec2(0.0), ivec2(1,2));
+}
diff --git a/chromium/third_party/glslang/src/Test/150.frag b/chromium/third_party/glslang/src/Test/150.frag
new file mode 100644
index 00000000000..41c988d77f4
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/150.frag
@@ -0,0 +1,50 @@
+#version 150 core
+
+in vec4 gl_FragCoord;
+layout(origin_upper_left, pixel_center_integer) in vec4 gl_FragCoord; // ERROR
+layout(pixel_center_integer) in vec4 gl_FragCoord; // ERROR
+layout(origin_upper_left) in vec4 foo; // ERROR
+layout(origin_upper_left, pixel_center_integer) in vec4 gl_FragCoord;
+
+void main()
+{
+ vec4 c = gl_FragCoord;
+}
+
+layout(origin_upper_left, pixel_center_integer) in vec4 gl_FragCoord; // ERROR, declared after use
+
+in struct S { float f; } s;
+
+float patch = 3.1;
+
+uniform sampler2DMS sms;
+uniform isampler2DMS isms;
+uniform usampler2DMS usms;
+uniform sampler2DMSArray smsa;
+uniform isampler2DMSArray ismsa;
+uniform usampler2DMSArray usmsa;
+
+flat in ivec2 p2;
+flat in ivec3 p3;
+flat in int samp;
+
+void barWxyz()
+{
+ ivec2 t11 = textureSize( sms);
+ ivec2 t12 = textureSize(isms);
+ ivec2 t13 = textureSize(usms);
+ ivec3 t21 = textureSize( smsa);
+ ivec3 t22 = textureSize(ismsa);
+ ivec3 t23 = textureSize(usmsa);
+ vec4 t31 = texelFetch( sms, p2, samp);
+ ivec4 t32 = texelFetch(isms, p2, samp);
+ uvec4 t33 = texelFetch(usms, p2, 3);
+ vec4 t41 = texelFetch( smsa, p3, samp);
+ ivec4 t42 = texelFetch(ismsa, ivec3(2), samp);
+ uvec4 t43 = texelFetch(usmsa, p3, samp);
+}
+
+int primitiveID()
+{
+ return gl_PrimitiveID;
+}
diff --git a/chromium/third_party/glslang/src/Test/150.geom b/chromium/third_party/glslang/src/Test/150.geom
new file mode 100644
index 00000000000..d2ff4eb15f0
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/150.geom
@@ -0,0 +1,139 @@
+#version 150 core
+
+in fromVertex {
+ in vec3 color;
+} fromV[];
+
+out toFragment {
+ out vec3 color;
+} toF;
+
+out fromVertex { // okay to reuse a block name for another block name
+ vec3 color;
+};
+
+out fooB {
+ vec2 color;
+} fromVertex; // ERROR, cannot reuse block name as block instance
+
+int fromVertex; // ERROR, cannot reuse a block name for something else
+
+out fooC {
+ vec2 color;
+} fooC; // ERROR, cannot have same name for block and instance name
+
+void main()
+{
+ EmitVertex();
+ EndPrimitive();
+ EmitStreamVertex(1); // ERROR
+ EndStreamPrimitive(0); // ERROR
+
+ color = fromV[0].color;
+ gl_ClipDistance[3] = gl_in[1].gl_ClipDistance[2];
+ gl_Position = gl_in[0].gl_Position;
+ gl_PointSize = gl_in[3].gl_PointSize;
+ gl_PrimitiveID = gl_PrimitiveIDIn;
+ gl_Layer = 2;
+}
+
+out vec4 ov0; // stream should be 0
+layout(stream = 4) out vec4 ov4;
+out vec4 o1v0; // stream should be 0
+
+layout(stream = 3) uniform; // ERROR
+layout(stream = 3) in; // ERROR
+layout(stream = 3) uniform int ua; // ERROR
+layout(stream = 3) uniform ubb { int ua; } ibb; // ERROR
+
+layout(line_strip, points, triangle_strip, stream = 3, points, triangle_strip) out; // just means "stream = 3, triangle_strip"
+layout(stream = 3, triangle_strip) out;
+out vec4 ov3; // stream should be 3
+
+layout(stream = 6) out ooutb { vec4 a; } ouuaa6;
+
+layout(stream = 6) out ooutb2 {
+ layout(stream = 6) vec4 a;
+} ouua6;
+
+layout(stream = 7) out ooutb3 {
+ layout(stream = 6) vec4 a; // ERROR
+} ouua7;
+
+out vec4 ov2s3; // stream should be 3
+
+layout(max_vertices = 200) out;
+layout(max_vertices = 300) out; // ERROR, too big
+void foo(layout(max_vertices = 4) int a) // ERROR
+{
+ ouuaa6.a = vec4(1.0);
+}
+
+layout(line_strip, points, triangle_strip, stream = 3, points) out; // ERROR, changing output primitive
+layout(line_strip, points, stream = 3) out; // ERROR, changing output primitive
+layout(triangle_strip) in; // ERROR, not an input primitive
+layout(triangle_strip) uniform; // ERROR
+layout(triangle_strip) out vec4 badv4; // ERROR, not on a variable
+layout(triangle_strip) in vec4 bad2v4[]; // ERROR, not on a variable or input
+layout(invocations = 3) out outbn { int a; }; // 2 ERROR, not on a block, not until 4.0
+out outbn2 {
+ layout(invocations = 3) int a; // 2 ERRORs, not on a block member, not until 4.0
+ layout(max_vertices = 3) int b; // ERROR, not on a block member
+ layout(triangle_strip) int c; // ERROR, not on a block member
+} outbi;
+
+layout(lines) out; // ERROR, not on output
+layout(lines_adjacency) in;
+layout(triangles) in; // ERROR, can't change it
+layout(triangles_adjacency) in; // ERROR, can't change it
+layout(invocations = 4) in; // ERROR, not until 4.0
+
+in inbn {
+ layout(stream = 2) int a; // ERROR, stream on input
+} inbi[];
+
+in sameName {
+ int a15;
+} insn[];
+
+out sameName {
+ float f15;
+};
+
+uniform sameName {
+ bool b15;
+};
+
+float summ = gl_MaxVertexAttribs +
+ gl_MaxVertexUniformComponents +
+ gl_MaxVaryingFloats +
+ gl_MaxVaryingComponents +
+ gl_MaxVertexOutputComponents +
+ gl_MaxGeometryInputComponents +
+ gl_MaxGeometryOutputComponents +
+ gl_MaxFragmentInputComponents +
+ gl_MaxVertexTextureImageUnits +
+ gl_MaxCombinedTextureImageUnits +
+ gl_MaxTextureImageUnits +
+ gl_MaxFragmentUniformComponents +
+ gl_MaxDrawBuffers +
+ gl_MaxClipDistances +
+ gl_MaxGeometryTextureImageUnits +
+ gl_MaxGeometryOutputVertices +
+ gl_MaxGeometryTotalOutputComponents +
+ gl_MaxGeometryUniformComponents +
+ gl_MaxGeometryVaryingComponents;
+
+void fooe1()
+{
+ gl_ViewportIndex = gl_MaxViewports - 1;
+}
+
+#extension GL_ARB_viewport_array : enable
+
+void fooe2()
+{
+ gl_ViewportIndex = gl_MaxViewports - 1;
+}
+
+out int gl_ViewportIndex;
diff --git a/chromium/third_party/glslang/src/Test/150.tesc b/chromium/third_party/glslang/src/Test/150.tesc
new file mode 100644
index 00000000000..0acfe32c5b1
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/150.tesc
@@ -0,0 +1,34 @@
+#version 150
+
+#extension GL_ARB_tessellation_shader : enable
+
+layout(vertices = 4) out;
+int outa[gl_out.length()];
+
+patch out vec4 patchOut;
+
+void main()
+{
+ barrier();
+
+ int a = gl_MaxTessControlInputComponents +
+ gl_MaxTessControlOutputComponents +
+ gl_MaxTessControlTextureImageUnits +
+ gl_MaxTessControlUniformComponents +
+ gl_MaxTessControlTotalOutputComponents;
+
+ vec4 p = gl_in[1].gl_Position;
+ float ps = gl_in[1].gl_PointSize;
+ float cd = gl_in[1].gl_ClipDistance[2];
+
+ int pvi = gl_PatchVerticesIn;
+ int pid = gl_PrimitiveID;
+ int iid = gl_InvocationID;
+
+ gl_out[gl_InvocationID].gl_Position = p;
+ gl_out[gl_InvocationID].gl_PointSize = ps;
+ gl_out[gl_InvocationID].gl_ClipDistance[1] = cd;
+
+ gl_TessLevelOuter[3] = 3.2;
+ gl_TessLevelInner[1] = 1.3;
+}
diff --git a/chromium/third_party/glslang/src/Test/150.tese b/chromium/third_party/glslang/src/Test/150.tese
new file mode 100644
index 00000000000..f609697ddbf
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/150.tese
@@ -0,0 +1,35 @@
+#version 150
+
+#extension GL_ARB_tessellation_shader : enable
+
+layout(quads, cw) in;
+layout(fractional_odd_spacing) in;
+layout(point_mode) in;
+patch in vec4 patchIn;
+
+void main()
+{
+ barrier(); // ERROR
+
+ int a = gl_MaxTessEvaluationInputComponents +
+ gl_MaxTessEvaluationOutputComponents +
+ gl_MaxTessEvaluationTextureImageUnits +
+ gl_MaxTessEvaluationUniformComponents +
+ gl_MaxTessPatchComponents +
+ gl_MaxPatchVertices +
+ gl_MaxTessGenLevel;
+
+ vec4 p = gl_in[1].gl_Position;
+ float ps = gl_in[1].gl_PointSize;
+ float cd = gl_in[1].gl_ClipDistance[2];
+
+ int pvi = gl_PatchVerticesIn;
+ int pid = gl_PrimitiveID;
+ vec3 tc = gl_TessCoord;
+ float tlo = gl_TessLevelOuter[3];
+ float tli = gl_TessLevelInner[1];
+
+ gl_Position = p;
+ gl_PointSize = ps;
+ gl_ClipDistance[2] = cd;
+}
diff --git a/chromium/third_party/glslang/src/Test/150.vert b/chromium/third_party/glslang/src/Test/150.vert
new file mode 100644
index 00000000000..602c9931620
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/150.vert
@@ -0,0 +1,25 @@
+#version 150 core
+
+in vec4 iv4;
+
+uniform float ps;
+
+invariant gl_Position;
+
+void main()
+{
+ gl_Position = iv4;
+ gl_PointSize = ps;
+ gl_ClipDistance[2] = iv4.x;
+ gl_ClipVertex = iv4;
+}
+
+out float gl_ClipDistance[4];
+
+uniform foob {
+ int a[];
+};
+int a[5]; // ERROR, resizing user-block member
+
+#line 3000
+#error line of this error should be 3001
diff --git a/chromium/third_party/glslang/src/Test/300.frag b/chromium/third_party/glslang/src/Test/300.frag
new file mode 100644
index 00000000000..ca2e2cb3e56
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/300.frag
@@ -0,0 +1,161 @@
+#version 300 es
+void nodef1(float f); // ERROR, no default precision
+uniform sampler2D s2D;
+uniform lowp sampler3D s3D;
+uniform samplerCube sCube;
+uniform lowp samplerCubeShadow sCubeShadow;
+uniform lowp sampler2DShadow s2DShadow;
+uniform lowp sampler2DArray s2DArray;
+uniform lowp sampler2DArrayShadow s2DArrayShadow;
+
+uniform lowp isampler2D is2D;
+uniform lowp isampler3D is3D;
+uniform lowp isamplerCube isCube;
+uniform lowp isampler2DArray is2DArray;
+
+uniform lowp usampler2D us2D;
+uniform lowp usampler3D us3D;
+uniform lowp usamplerCube usCube;
+uniform lowp usampler2DArray us2DArray;
+precision lowp float;
+in float c1D;
+in vec2 c2D;
+in vec3 c3D;
+smooth vec4 c4D;
+
+flat in int ic1D;
+flat in ivec2 ic2D;
+flat in ivec3 ic3D;
+flat in ivec4 ic4D;
+noperspective in vec4 badv; // ERROR
+in sampler2D bads; // ERROR
+precision lowp uint; // ERROR
+
+struct s {
+ int i;
+ sampler2D s;
+};
+
+in s badout; // ERROR, can't contain a sampler
+ // ERROR, can't have int in struct without flat
+struct S2 {
+ vec3 c;
+ float f;
+};
+
+in S2 s2;
+
+out vec3 sc;
+out float sf;
+
+uniform sampler2D arrayedSampler[5];
+
+void main()
+{
+ float f;
+ vec4 v;
+ v = texture(s2D, c2D);
+ v = textureProj(s3D, c4D);
+ v = textureLod(s2DArray, c3D, 1.2);
+ f = textureOffset(s2DShadow, c3D, ic2D, c1D); // ERROR, offset argument not constant
+ v = texelFetch(s3D, ic3D, ic1D);
+ v = texelFetchOffset(arrayedSampler[2], ic2D, 4, ic2D); // ERROR, offset argument not constant
+ f = textureLodOffset(s2DShadow, c3D, c1D, ic2D);
+ v = textureProjLodOffset(s2D, c3D, c1D, ic2D);
+ v = textureGrad(sCube, c3D, c3D, c3D);
+ f = textureGradOffset(s2DArrayShadow, c4D, c2D, c2D, ic2D);
+ v = textureProjGrad(s3D, c4D, c3D, c3D);
+ v = textureProjGradOffset(s2D, c3D, c2D, c2D, ic2D);
+ v = texture(arrayedSampler[ic1D], c2D); // ERROR
+
+ ivec4 iv;
+ iv = texture(is2D, c2D);
+ iv = textureProjOffset(is2D, c4D, ic2D);
+ iv = textureProjLod(is2D, c3D, c1D);
+ iv = textureProjGrad(is2D, c3D, c2D, c2D);
+ iv = texture(is3D, c3D, 4.2);
+ iv = textureLod(isCube, c3D, c1D);
+ iv = texelFetch(is2DArray, ic3D, ic1D);
+
+ iv.xy = textureSize(sCubeShadow, 2);
+
+ float precise;
+ double boo; // ERROR
+ dvec2 boo2; // ERROR
+ dvec3 boo3; // ERROR
+ dvec4 boo4; // ERROR
+
+ f += gl_FragCoord.y;
+ gl_FragDepth = f;
+
+ sc = s2.c;
+ sf = s2.f;
+
+ sinh(c1D) +
+ cosh(c1D) * tanh(c2D);
+ asinh(c4D) + acosh(c4D);
+ atanh(c3D);
+}
+
+uniform multi {
+ int[2] a[3]; // ERROR
+ int[2][3] b; // ERROR
+ int c[2][3]; // ERROR
+} multiInst[2][3]; // ERROR
+
+out vec4 colors[4];
+
+void foo()
+{
+ colors[2] = c4D;
+ colors[ic1D] = c4D; // ERROR
+}
+
+uniform s st1;
+uniform s st2;
+
+void foo13(s inSt2)
+{
+ if (st1 == st2); // ERROR
+ if (st1 != st2); // ERROR
+ st1.s == st2.s; // ERROR
+ inSt2 = st1; // ERROR
+ inSt2 == st1; // ERROR
+}
+
+void foo23()
+{
+ textureOffset(s2DShadow, c3D, ivec2(-8, 7), c1D);
+ textureOffset(s2DShadow, c3D, ivec2(-9, 8), c1D);
+}
+
+void foo324(void)
+{
+ float p = pow(3.2, 4.6);
+ p += sin(0.4);
+ p += distance(vec2(10.0, 11.0), vec2(13.0, 15.0)); // 5
+ p += dot(vec3(2,3,5), vec3(-2,-1,4)); // 13
+ vec3 c3 = cross(vec3(3,-3,1), vec3(4,9,2)); // (-15, -2, 39)
+ c3 += faceforward(vec3(1,2,3), vec3(2,3,5), vec3(-2,-1,4)); // (-1,-2,-3)
+ c3 += faceforward(vec3(1,2,3), vec3(-2,-3,-5), vec3(-2,-1,4)); // (1,2,3)
+ vec2 c2 = reflect(vec2(1,3), vec2(0,1)); // (1,-3)
+ c2 += refract(vec2(1,3), vec2(0,1), 1.0); // (1,-3)
+ c2 += refract(vec2(1,3), vec2(0,1), 3.0);
+ c2 += refract(vec2(1,0.1), vec2(0,1), 5.0); // (0,0)
+ mat3x2 m32 = outerProduct(vec2(2,3), vec3(5,7,11));// rows: (10, 14, 22), (15, 21, 33)
+}
+
+uniform mediump; // ERROR
+
+layout(early_fragment_tests) in; // ERROR
+
+#ifndef GL_FRAGMENT_PRECISION_HIGH
+#error missing GL_FRAGMENT_PRECISION_HIGH
+#endif
+
+invariant in; // ERROR
+invariant in vec4; // ERROR
+invariant in vec4 fooinv; // ERROR
+
+float imageBuffer; // ERROR, reserved
+float uimage2DRect; // ERROR, reserved
diff --git a/chromium/third_party/glslang/src/Test/300.vert b/chromium/third_party/glslang/src/Test/300.vert
new file mode 100644
index 00000000000..83b9bb112aa
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/300.vert
@@ -0,0 +1,187 @@
+#version 300 es
+
+uniform mat4x3 m43;
+uniform mat3x3 m33;
+uniform mat4x4 m44;
+
+in vec3 v3;
+varying vec2 v2; // ERROR, varying reserved
+in vec4 bad[10]; // ERROR, no arrayed inputs
+highp in vec4 badorder; // ERROR, incorrect qualifier order
+out invariant vec4 badorder2; // ERROR, incorrect qualifier order
+in centroid vec4 badorder4; // ERROR, incorrect qualifier order
+out flat vec4 badorder3; // ERROR, incorrect qualifier order
+void bar(in const float a); // ERROR, incorrect qualifier order
+void bar2(highp in float b); // ERROR, incorrect qualifier order
+smooth flat out vec4 rep; // ERROR, replicating interpolation qualification
+centroid sample out vec4 rep2; // ERROR, replicating auxiliary qualification
+in uniform vec4 rep3; // ERROR, replicating storage qualification
+
+struct S {
+ vec3 c;
+ float f;
+};
+
+out S s;
+
+void main()
+{
+ int id = gl_VertexID + gl_InstanceID;
+
+ int c0 = gl_MaxVertexAttribs;
+ int c1 = gl_MaxVertexUniformVectors;
+ int c2 = gl_MaxVertexOutputVectors;
+ int c3 = gl_MaxFragmentInputVectors;
+ int c4 = gl_MaxVertexTextureImageUnits;
+ int c5 = gl_MaxCombinedTextureImageUnits;
+ int c6 = gl_MaxTextureImageUnits;
+ int c7 = gl_MaxFragmentUniformVectors;
+ int c8 = gl_MaxDrawBuffers;
+ int c9 = gl_MinProgramTexelOffset;
+ int c10 = gl_MaxProgramTexelOffset;
+
+ mat3x4 tm = transpose(m43);
+ highp float dm = determinant(m44);
+ mat3x3 im = inverse(m33);
+
+ mat3x2 op = outerProduct(v2, v3);
+
+ gl_Position = m44[2];
+ gl_PointSize = v2.y;
+
+ s.c = v3;
+ s.f = dm;
+
+#ifdef GL_ES
+#error GL_ES is set
+#else
+#error GL_ES is not set
+#endif
+}
+
+float badsize[]; // ERROR
+float[] badsize2; // ERROR
+uniform ub {
+ int a[]; // ERROR
+} ubInst[]; // ERROR
+void foo(int a[]); // ERROR
+float okayA[] = float[](3.0f, 4.0F); // Okay
+
+out vec3 newV;
+void newVFun()
+{
+ newV = v3;
+}
+
+invariant newV; // ERROR, variable already used
+in vec4 invIn;
+invariant invIn; // ERROR, in v300
+out S s2;
+invariant s2;
+invariant out S s3;
+flat out int;
+
+uniform ub2 {
+ float f;
+} a;
+
+uniform ub2 { // ERROR redeclaration of block name (same instance name)
+ float g;
+} a;
+
+uniform ub2 { // ERROR redeclaration of block name (different instance name)
+ float f;
+} c;
+
+uniform ub2 { // ERROR redeclaration of block name (no instance name)
+ float f123;
+};
+
+uniform ub3 {
+ bool b23;
+};
+
+uniform ub3 { // ERROR redeclaration of block name (no instance name in first or declared)
+ bool b234;
+};
+
+precision lowp sampler3D;
+precision lowp sampler2DShadow;
+precision lowp sampler2DArrayShadow;
+
+uniform sampler2D s2D;
+uniform sampler3D s3D;
+uniform sampler2DShadow s2DS;
+uniform sampler2DArrayShadow s2DAS;
+in vec2 c2D;
+
+void foo23()
+{
+ ivec2 x1 = textureSize(s2D, 2);
+ textureSize(s2D); // ERROR, no lod
+ ivec3 x3 = textureSize(s2DAS, -1);
+ textureSize(s2DAS); // ERROR, no lod
+ vec4 x4 = texture(s2D, c2D);
+ texture(s2D, c2D, 0.2); // ERROR, bias
+ vec4 x5 = textureProjOffset(s3D, vec4(0.2), ivec3(1));
+ textureProjOffset(s3D, vec4(0.2), ivec3(1), .03); // ERROR, bias
+ float x6 = textureProjGradOffset(s2DS, invIn, vec2(4.2), vec2(5.3), ivec2(1));
+}
+
+int fgfg(float f, mediump int i);
+int fgfg(float f, highp int i); // ERROR, precision qualifier difference
+
+int fgfgh(float f, const in mediump int i);
+int fgfgh(float f, in mediump int i); // ERROR, precision qualifier difference
+
+void foo2349()
+{
+ float[] x = float[] (1.0, 2.0, 3.0);
+ float[] y = x;
+ float[3] z = x;
+ float[3] w;
+ w = y;
+}
+
+int[] foo213234(); // ERROR
+int foo234234(float[]); // ERROR
+int foo234235(vec2[] v); // ERROR
+precision highp float[2]; // ERROR
+
+int fffg(float f);
+int fffg(float f);
+
+int gggf(float f);
+int gggf(float f) { return 2; }
+int gggf(float f);
+
+int agggf(float f) { return 2; }
+int agggf(float f);
+
+out struct Ssss { float f; } ssss;
+
+uniform Bblock {
+ int a;
+} Binst;
+int Bfoo;
+
+layout(std140) Binst; // ERROR
+layout(std140) Bblock; // ERROR
+layout(std140) Bfoo; // ERROR
+
+layout(std430) uniform B430 { int a; } B430i; // ERROR
+
+struct SNA {
+ int a[]; // ERROR
+};
+
+void fooDeeparray()
+{
+ float[] x = float[] (1.0, 2.0, 3.0),
+ y = float[] (1.0, 2.0, 3.0, 4.0);
+ float xp[3], yp[4];
+ xp = x;
+ yp = y;
+ xp = y; // ERROR, wrong size
+ yp = x; // ERROR, wrong size
+}
diff --git a/chromium/third_party/glslang/src/Test/300BuiltIns.frag b/chromium/third_party/glslang/src/Test/300BuiltIns.frag
new file mode 100644
index 00000000000..89233e2651e
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/300BuiltIns.frag
@@ -0,0 +1,76 @@
+#version 300 es
+
+int imax, imin;
+uint umax, umin;
+
+vec3 x, y; // ERROR, needs default precision
+bvec3 bv;
+
+uint uy;
+uvec2 uv2c;
+uvec2 uv2y;
+uvec2 uv2x;
+uvec4 uv4y;
+
+ivec3 iv3a;
+ivec3 iv3b;
+
+ivec4 iv4a;
+ivec4 iv4b;
+
+float f;
+
+vec2 v2a, v2b;
+vec4 v4;
+
+void main()
+{
+ // 1.3 int
+ vec3 v = mix(x, y, bv);
+ ivec4 iv10 = abs(iv4a);
+ ivec4 iv11 = sign(iv4a);
+ ivec4 iv12 = min(iv4a, iv4b);
+ ivec4 iv13 = min(iv4a, imin);
+ uvec2 u = min(uv2x, uv2y);
+ uvec4 uv = min(uv4y, uy);
+ ivec3 iv14 = max(iv3a, iv3b);
+ ivec4 iv15 = max(iv4a, imax);
+ uvec2 u10 = max(uv2x, uv2y);
+ uvec2 u11 = max(uv2x, uy);
+ ivec4 iv16 = clamp(iv4a, iv4a, iv4b);
+ ivec4 iv17 = clamp(iv4a, imin, imax);
+ uvec2 u12 = clamp(uv2x, uv2y, uv2c);
+ uvec4 uv10 = clamp(uv4y, umin, umax);
+
+ // 1.3 float
+ vec3 modfOut;
+ vec3 v11 = modf(x, modfOut);
+
+ float t = trunc(f);
+ vec2 v12 = round(v2a);
+ vec2 v13 = roundEven(v2a);
+ bvec2 b10 = isnan(v2a);
+ bvec4 b11 = isinf(v4);
+
+ // 3.3 float
+ int i = floatBitsToInt(f);
+ uvec4 uv11 = floatBitsToUint(v4);
+ vec4 v14 = intBitsToFloat(iv4a);
+ vec2 v15 = uintBitsToFloat(uv2c);
+
+ // 4.0 pack
+ uint u19 = packSnorm2x16(v2a);
+ vec2 v20 = unpackSnorm2x16(uy);
+ uint u15 = packUnorm2x16(v2a);
+ vec2 v16 = unpackUnorm2x16(uy);
+ uint u17 = packHalf2x16(v2b);
+ vec2 v18 = unpackHalf2x16(uy);
+
+ // not present
+ noise2(v18); // ERROR, not present
+
+ float t__; // ERROR, no __ until revision 310
+
+ // ERROR, no __ until revision 310
+ #define __D
+}
diff --git a/chromium/third_party/glslang/src/Test/300block.frag b/chromium/third_party/glslang/src/Test/300block.frag
new file mode 100644
index 00000000000..9820e2a9454
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/300block.frag
@@ -0,0 +1,58 @@
+#version 300 es
+
+precision mediump float;
+
+struct S {
+ vec4 u;
+ uvec4 v;
+ lowp isampler3D sampler;
+ vec3 w;
+ struct T1 { // ERROR
+ int a;
+ } t;
+};
+
+uniform S s;
+
+uniform fooBlock {
+ uvec4 bv;
+ uniform mat2 bm2;
+ lowp isampler2D sampler; // ERROR
+ struct T2 { // ERROR
+ int a;
+ } t;
+ S fbs; // ERROR, contains a sampler
+};
+
+uniform barBlock {
+ uvec4 nbv;
+ int ni;
+} inst;
+
+uniform barBlockArray {
+ uvec4 nbv;
+ int ni;
+} insts[4];
+
+uniform unreferenced {
+ float f;
+ uint u;
+};
+
+void main()
+{
+ texture(s.sampler, vec3(inst.ni, bv.y, insts[2].nbv.z));
+ insts[s.v.x]; // ERROR
+ fooBlock; // ERROR
+ mat4(s); // ERROR
+ int insts;
+ float barBlock;
+ mat4(barBlock);
+ mat4(unreferenced); // ERROR, bad type
+ ++s; // ERROR
+ inst - 1; // ERROR
+ ++barBlock;
+ 2 * barBlockArray; // ERROR
+}
+
+int fooBlock; // ERROR, redef.
diff --git a/chromium/third_party/glslang/src/Test/300layout.frag b/chromium/third_party/glslang/src/Test/300layout.frag
new file mode 100644
index 00000000000..32a6b02672c
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/300layout.frag
@@ -0,0 +1,19 @@
+#version 300 es
+precision mediump float;
+in vec4 pos;
+layout (location = 2) in vec4 color; // ERROR
+
+layout(location = 1) out vec4 c;
+layout(location = 3) out vec4 p;
+layout(location = 4) out vec4 q[2];
+
+void main()
+{
+ c = color;
+ p = pos;
+ q[1] = pos;
+}
+
+layout(location = 40) out float ca[4]; // ERROR, overlap, ERROR too big
+layout(location = 41) out float cb[2]; // ERROR, overlap, ERROR too big
+layout(location = 39) out float cc[6]; // ERROR, overlap, ERROR too big
diff --git a/chromium/third_party/glslang/src/Test/300layout.vert b/chromium/third_party/glslang/src/Test/300layout.vert
new file mode 100644
index 00000000000..06d1206dc18
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/300layout.vert
@@ -0,0 +1,57 @@
+#version 300 es
+
+struct s { vec4 v; };
+
+layout(location = 7) in vec3 c;
+layout(LocatioN = 3) in vec4 p;
+layout(LocatioN = 9) in vec4 q[4]; // ERROR, no array
+layout(LocatioN = 10) in s r[4]; // ERROR, no struct, ERROR, location overlap
+out vec4 pos;
+out vec3 color;
+
+layout(shared, column_major) uniform mat4 badm4; // ERROR
+layout(shared, column_major, row_major) uniform; // default is now shared and row_major
+
+layout(std140) uniform Transform { // layout of this block is std140
+ mat4 M1; // row_major
+ layout(column_major) mat4 M2; // column major
+ mat3 N1; // row_major
+ centroid float badf; // ERROR
+ in float badg; // ERROR
+ layout(std140) float bad1;
+ layout(shared) float bad2;
+ layout(packed) float bad3;
+} tblock;
+
+uniform T2 { // layout of this block is shared
+ bool b;
+ mat4 t2m;
+};
+
+layout(column_major) uniform T3 { // shared and column_major
+ mat4 M3; // column_major
+ layout(row_major) mat4 M4; // row major
+ mat3 N2; // column_major
+ int b; // ERROR, redefinition (needs to be last member of block for testing, following members are skipped)
+};
+
+out badout { // ERROR
+ float f;
+};
+
+layout (location = 10) out vec4 badoutA; // ERROR
+
+void main()
+{
+ pos = p * (tblock.M1 + tblock.M2 + M4 + M3 + t2m);
+ color = c * tblock.N1;
+}
+
+shared vec4 compute_only; // ERROR
+
+layout(packed) uniform;
+
+layout(packed) uniform float aoeuntaoeu; // ERROR, packed on variable
+
+layout(location = 40) in float cd;
+layout(location = 37) in mat4x3 ce; // ERROR, overlap
diff --git a/chromium/third_party/glslang/src/Test/300link.frag b/chromium/third_party/glslang/src/Test/300link.frag
new file mode 100644
index 00000000000..b80d172d396
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/300link.frag
@@ -0,0 +1,8 @@
+#version 300 es
+
+precision highp float;
+
+out vec4 color1;
+out vec4 color2;
+
+void main() {}
diff --git a/chromium/third_party/glslang/src/Test/300link2.frag b/chromium/third_party/glslang/src/Test/300link2.frag
new file mode 100644
index 00000000000..d8ed3352e0e
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/300link2.frag
@@ -0,0 +1,11 @@
+#version 300 es
+precision mediump float;
+in vec4 pos;
+
+layout(location = 1) out vec4 c;
+layout(location = 5) out vec4 p;
+layout(location = 9) out vec4 q[2];
+
+void main()
+{
+}
diff --git a/chromium/third_party/glslang/src/Test/300link3.frag b/chromium/third_party/glslang/src/Test/300link3.frag
new file mode 100644
index 00000000000..e35dcc93a8f
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/300link3.frag
@@ -0,0 +1,7 @@
+#version 300 es
+
+precision highp float;
+
+out vec4 color1;
+
+void main() {}
diff --git a/chromium/third_party/glslang/src/Test/300operations.frag b/chromium/third_party/glslang/src/Test/300operations.frag
new file mode 100644
index 00000000000..5992987aa51
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/300operations.frag
@@ -0,0 +1,135 @@
+#version 300 es
+
+uniform block {
+ mediump float f;
+} instanceName;
+
+struct S {
+ int i;
+} s;
+
+float a[5];
+
+void main()
+{
+ bool b;
+ float f;
+ int i;
+ uint u;
+ bvec3 b3;
+ vec3 v3;
+ ivec3 iv3;
+ uvec3 uv3;
+ vec4 v4;
+ ivec4 iv4;
+ uvec4 uv4;
+ mat2 m2;
+ mat4 m4;
+
+ // These are all errors:
+ instanceName + instanceName;
+ s + s;
+ i + f;
+ u + f;
+ u + i;
+ iv3 *= iv4;
+ iv4 / uv4;
+ i - v3;
+ iv3 + uv3;
+ a * a;
+ b / b;
+
+ f % f;
+ i % f;
+ f % u;
+ instanceName++;
+ ++s;
+ a--;
+ ++b3;
+
+ iv3 < uv3;
+ m2 > m2;
+ m2 != m4;
+ i >= u;
+ a <= a;
+ b > b;
+
+ b && b3;
+ b3 ^^ b3;
+ b3 || b;
+ i && i;
+ u || u;
+ m2 ^^ m2;
+
+ !u;
+ !i;
+ !m2;
+ !v3;
+ !a;
+
+ ~f;
+ ~m4;
+ ~v3;
+ ~a;
+ ~instanceName;
+
+ i << iv3;
+ u << uv3;
+ i >> f;
+ f >> i;
+ m4 >> i;
+ a >> u;
+ iv3 >> iv4;
+
+ i & u;
+ u &= uv3;
+ i | uv3;
+ u & f;
+ m2 | m2;
+ s ^ s;
+ (f = f) = f;
+
+ // These are all okay:
+ f * v4;
+ u + u;
+ uv4 / u;
+ iv3 -= iv3;
+
+ i %= 3;
+ uv3 % 4u;
+ --m2;
+ iv4++;
+
+ m4 != m4;
+ m2 == m2;
+ i <= i;
+ a == a;
+ s != s;
+
+ b && b;
+ b || b;
+ b ^^ b;
+
+ !b, uv3;
+
+ ~i;
+ ~u;
+ ~uv3;
+ ~iv3;
+
+ uv3 <<= i;
+ i >> i;
+ u << u;
+ iv3 >> iv3;
+
+ i & i;
+ u | u;
+ iv3 ^ iv3;
+ u & uv3;
+ uv3 | u;
+ uv3 &= u;
+ int arr[0x222 & 0xf];
+ arr[1]; // size 2
+ int arr2[(uvec2(0, 0x2) | 0x1u).y];
+ arr2[2]; // size 3
+}
diff --git a/chromium/third_party/glslang/src/Test/300scope.vert b/chromium/third_party/glslang/src/Test/300scope.vert
new file mode 100644
index 00000000000..162e99822c8
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/300scope.vert
@@ -0,0 +1,74 @@
+#version 300 es
+
+int f(int a, int b, int c)
+{
+ int a = b; // ERROR, redefinition
+
+ {
+ float a = float(a) + 1.0;
+ }
+
+ return a;
+}
+
+int f(int a, int b, int c); // okay to redeclare
+
+bool b;
+float b(int a); // ERROR: redefinition
+
+float c(int a);
+bool c; // ERROR: redefinition
+
+float f; // ERROR: redefinition
+float tan; // ERROR: redefines built-in function
+float sin(float x); // ERROR: can't redefine built-in functions
+float cos(float x) // ERROR: can't redefine built-in functions
+{
+ return 1.0;
+}
+bool radians(bool x) // ERROR: can't overload built-in functions
+{
+ return true;
+}
+
+invariant gl_Position;
+
+void main()
+{
+ int g(); // ERROR: no local function declarations
+ g();
+
+ float sin; // okay
+ sin;
+ sin(0.7); // ERROR, use of hidden function
+ f(1,2,3);
+
+ float f; // hides f()
+ f = 3.0;
+
+ gl_Position = vec4(f);
+
+ for (int f = 0; f < 10; ++f)
+ ++f;
+
+ int x = 1;
+ {
+ float x = 2.0, /* 2nd x visible here */ y = x; // y is initialized to 2
+ int z = z; // ERROR: z not previously defined.
+ }
+ {
+ int x = x; // x is initialized to '1'
+ }
+
+ struct S
+ {
+ int x;
+ };
+ {
+ S S = S(0); // 'S' is only visible as a struct and constructor
+ S.x; // 'S' is now visible as a variable
+ }
+
+ int degrees;
+ degrees(3.2); // ERROR, use of hidden built-in function
+}
diff --git a/chromium/third_party/glslang/src/Test/310.comp b/chromium/third_party/glslang/src/Test/310.comp
new file mode 100644
index 00000000000..143053ba633
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/310.comp
@@ -0,0 +1,240 @@
+#version 310 es
+
+layout(local_size_x = 2) in;
+layout(local_size_x = 16) in; // ERROR, changing
+layout(local_size_z = 4096) in; // ERROR, too large
+layout(local_size_x = 2) in;
+
+const int total = gl_MaxComputeWorkGroupCount.y
+ + gl_MaxComputeUniformComponents
+ + gl_MaxComputeTextureImageUnits
+ + gl_MaxComputeImageUniforms
+ + gl_MaxComputeAtomicCounters
+ + gl_MaxComputeAtomicCounterBuffers;
+
+buffer ShaderStorageBlock
+{
+ int value;
+ float values[];
+};
+
+buffer InvalidShaderStorageBlock
+{
+ float values[]; // ERROR
+ int value;
+} invalid;
+
+void main()
+{
+ barrier();
+ memoryBarrier();
+ memoryBarrierAtomicCounter();
+ memoryBarrierBuffer();
+ memoryBarrierShared();
+ memoryBarrierImage();
+ groupMemoryBarrier();
+ value = int(values[gl_LocalInvocationIndex]);
+}
+
+layout(location = 2) in vec3 v3; // ERROR
+in float f; // ERROR
+out float fo; // ERROR
+
+shared vec4 s;
+layout(location = 2) shared vec4 sl; // ERROR
+shared float fs = 4.2; // ERROR
+
+layout(local_size_x = 2, local_size_y = 3, local_size_z = 4) out; // ERROR
+
+int arrX[gl_WorkGroupSize.x];
+int arrY[gl_WorkGroupSize.y];
+int arrZ[gl_WorkGroupSize.z];
+
+readonly buffer roblock
+{
+ int value;
+ float values[];
+} ro;
+
+void foo()
+{
+ ro.values[2] = 4.7; // ERROR, readonly
+ ro.values.length();
+ ++s;
+}
+
+buffer vec4 v; // ERROR
+
+uniform usampler2D us2dbad; // ERROR, default precision
+
+precision highp usampler2D;
+precision highp iimage2DArray;
+precision highp iimage2D;
+
+uniform usampler2D us2d;
+
+uniform iimage2DArray ii2dabad; // ERROR, not writeonly
+uniform writeonly iimage2DArray ii2da;
+
+layout(r32i) uniform iimage2D iimg2D;
+layout(rgba32i) uniform readonly iimage2D iimg2Drgba;
+layout(rgba32f) uniform readonly image2D img2Drgba;
+layout(r32ui) uniform uimage2D uimg2D;
+
+void qux()
+{
+ int i = 4;
+ imageAtomicCompSwap(iimg2D, ivec2(i,i), i, i);// ERROR no longer in 310
+ imageAtomicAdd(uimg2D, ivec2(i,i), uint(i)); // ERROR no longer in 310
+ imageAtomicMin(iimg2Drgba, ivec2(i,i), i); // ERROR no longer in 310 // ERROR iimg2Drgba does not have r32i layout
+ imageAtomicMax(img2Drgba, ivec2(i,i), i); // ERROR no longer in 310 // ERROR img2Drgba is not integer image
+ ivec4 pos = imageLoad(iimg2D, ivec2(i,i));
+ imageStore(ii2da, ivec3(i,i,i), ivec4(0));
+ imageLoad(img2Drgba, ivec2(i,i));
+ imageLoad(ii2da, ivec3(i,i,i)); // ERROR, drops writeonly
+}
+
+volatile float vol; // ERROR, not an image
+readonly int vol2; // ERROR, not an image
+
+void passr(coherent readonly iimage2D image)
+{
+}
+
+layout(r32i) coherent readonly uniform iimage2D qualim1;
+layout(r32i) coherent restrict readonly uniform iimage2D qualim2;
+
+void passrc()
+{
+ passr(qualim1);
+ passr(qualim2); // ERROR, drops restrict
+ passr(iimg2D);
+}
+
+layout(rg8i) uniform readonly uimage2D i1bad; // ERROR, type mismatch
+layout(rgba32i) uniform readonly image2D i2bad; // ERROR, type mismatch
+layout(rgba32f) uniform readonly uimage2D i3bad; // ERROR, type mismatch
+layout(r8_snorm) uniform readonly iimage2D i4bad; // ERROR, type mismatch
+layout(rgba32ui) uniform readonly iimage2D i5bad; // ERROR, type mismatch
+layout(r8ui) uniform readonly iimage2D i6bad; // ERROR, type mismatch
+
+layout(binding = 0) uniform atomic_uint counter;
+
+uint func(atomic_uint c)
+{
+ return atomicCounterIncrement(c);
+}
+
+uint func2(out atomic_uint c) // ERROR, output
+{
+ return counter; // ERROR, type mismatch
+ return atomicCounter(counter);
+}
+
+void mainAC()
+{
+ atomic_uint non_uniform_counter; // ERROR
+ uint val = atomicCounter(counter);
+ atomicCounterDecrement(counter);
+}
+
+layout(binding = 1) uniform mediump atomic_uint counterBad; // ERROR, not highp
+
+layout(binding = 2, offset = 4) uniform atomic_uint countArr[4];
+uniform int i;
+
+void opac()
+{
+ int a[3];
+ a[counter]; // ERROR, non-integer
+ countArr[2];
+ countArr[i];
+}
+
+shared int atomi;
+shared uint atomu;
+
+void atoms()
+{
+ int origi = atomicAdd(atomi, 3);
+ uint origu = atomicAnd(atomu, 7u);
+ origi = atomicExchange(atomi, 4);
+ origu = atomicCompSwap(atomu, 10u, 8u);
+}
+
+precision highp atomic_uint;
+precision lowp atomic_uint; // ERROR
+
+precise int pfoo; // ERROR, reserved
+
+dmat2x4 dm; // ERROR
+uniform samplerCubeArray sca; // ERROR
+uniform iimage2DRect i2dr; // ERROR
+uniform image2DMS i2dms; // ERROR
+uniform uimage2DMSArray u2dmsa; // ERROR
+
+layout(r32f) coherent volatile restrict readonly writeonly uniform image2D okay1;
+layout(r32i) coherent volatile restrict readonly uniform iimage2D okay2;
+layout(r32ui) coherent volatile restrict writeonly uniform uimage2D okay3;
+layout(r32f) coherent volatile restrict uniform image2D okay4;
+
+layout(rgba32f) coherent volatile restrict uniform image2D badQ1; // ERROR, bad qualifiers
+layout(rgba8i) coherent volatile restrict uniform iimage2D badQ2; // ERROR, bad qualifiers
+layout(rgba16ui) coherent volatile restrict uniform uimage2D badQ3; // ERROR, bad qualifiers
+
+writeonly buffer woblock
+{
+ int value;
+ float values[];
+} wo;
+
+void foowo()
+{
+ float g;
+ g = wo.values[2]; // ERROR, writeonly
+ float f = wo.values[2]; // ERROR, writeonly
+ ++wo.values[2]; // ERROR, writeonly
+ wo.values[2]--; // ERROR, writeonly
+ f + wo.values[2]; // ERROR, writeonly
+ wo.values[2] - f; // ERROR, writeonly
+ bool b;
+ b ? f : wo.values[2]; // ERROR, writeonly
+ b ? wo.values[2] : f; // ERROR, writeonly
+ if (f == wo.values[2]) // ERROR, writeonly
+ ++f;
+ if (f >= wo.values[2]) // ERROR, writeonly
+ ++f;
+ f = vec3(wo.values[2]).x; // ERROR, writeonly
+ ~wo.value; // ERROR, writeonly
+ wo.values[2] = 3.4;
+}
+
+buffer multioblock
+{
+ readonly int value;
+ writeonly float values[];
+} multio;
+
+void foomultio()
+{
+ float g;
+ g = wo.values[2]; // ERROR, writeonly
+ ~wo.value;
+ wo.values[2] = 3.4;
+ wo.value = 2; // ERROR, readonly
+}
+
+in inb { // ERROR
+ int a;
+} inbi;
+
+out outb { // ERROR
+ int a;
+} outbi;
+
+float t__; // ERROR, no __ until revision 310
+
+ // ERROR, no __ until revision 310
+#define __D
+
+shared vec4 arr[2][3][4];
diff --git a/chromium/third_party/glslang/src/Test/310.frag b/chromium/third_party/glslang/src/Test/310.frag
new file mode 100644
index 00000000000..2290ce17c76
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/310.frag
@@ -0,0 +1,431 @@
+#version 310 es
+highp float nodef3(float); // ERROR, no default precision
+precision mediump float;
+precision highp usampler2D;
+precision highp sampler2D;
+precision highp isampler2DArray;
+
+layout(origin_upper_left, pixel_center_integer) in vec4 gl_FragCoord; // ERROR, not supported
+
+layout(location = 2) in vec3 v3;
+layout(location = 2) in mat4 yi; // ERROR, locations conflict with xi
+
+uniform sampler2D arrayedSampler[5];
+uniform usampler2D usamp2d;
+uniform usampler2DRect samp2dr; // ERROR, reserved
+uniform isampler2DArray isamp2DA;
+
+in vec2 c2D;
+uniform int i;
+
+void main()
+{
+ vec4 v = texture(arrayedSampler[i], c2D); // ERROR
+
+ ivec2 offsets[4];
+ const ivec2 constOffsets[4] = ivec2[4](ivec2(1,2), ivec2(3,4), ivec2(15,16), ivec2(-2,0));
+ uvec4 uv4 = textureGatherOffsets(samp2dr, c2D, offsets, 2); // ERROR, not supported
+ vec4 v4 = textureGather(arrayedSampler[0], c2D);
+ ivec4 iv4 = textureGatherOffset(isamp2DA, vec3(0.1), ivec2(1), 3);
+ iv4 = textureGatherOffset(isamp2DA, vec3(0.1), ivec2(1), i); // ERROR, last argument not const
+ iv4 = textureGatherOffset(isamp2DA, vec3(0.1), ivec2(1), 4); // ERROR, last argument out of range
+ iv4 = textureGatherOffset(isamp2DA, vec3(0.1), ivec2(1), 1+2);
+ iv4 = textureGatherOffset(isamp2DA, vec3(0.1), ivec2(0.5));
+ iv4 = textureGatherOffset(isamp2DA, vec3(0.1), ivec2(i)); // ERROR, offset not constant
+}
+
+out vec4 outp;
+void foo23()
+{
+ const ivec2[3] offsets = ivec2[3](ivec2(1,2), ivec2(3,4), ivec2(15,16));
+
+ textureProjGradOffset(usamp2d, outp, vec2(0.0), vec2(0.0), ivec2(c2D)); // ERROR, offset not constant
+ textureProjGradOffset(usamp2d, outp, vec2(0.0), vec2(0.0), offsets[1]);
+ textureProjGradOffset(usamp2d, outp, vec2(0.0), vec2(0.0), offsets[2]); // ERROR, offset out of range
+ textureProjGradOffset(usamp2d, outp, vec2(0.0), vec2(0.0), ivec2(-10, 20)); // ERROR, offset out of range
+
+ if (gl_HelperInvocation)
+ ++outp;
+
+ int sum = gl_MaxVertexImageUniforms +
+ gl_MaxFragmentImageUniforms +
+ gl_MaxComputeImageUniforms +
+ gl_MaxCombinedImageUniforms +
+ gl_MaxCombinedShaderOutputResources;
+
+ bool b1, b2, b3, b;
+
+ b1 = mix(b2, b3, b);
+ uvec3 um3 = mix(uvec3(i), uvec3(i), bvec3(b));
+ ivec4 im4 = mix(ivec4(i), ivec4(i), bvec4(b));
+}
+
+layout(binding=3) uniform sampler2D s1;
+layout(binding=3) uniform sampler2D s2; // ERROR: overlapping bindings? Don't see that in the 310 spec.
+layout(binding=2) uniform writeonly image2D i2D;
+layout(binding=4) uniform readonly image3D i3D;
+layout(binding=5) uniform imageCube iCube;
+layout(binding=6) uniform image2DArray i2DA;
+layout(binding=6) uniform coherent volatile restrict image2D i2Dqualified;
+
+layout(binding = 1) uniform bb {
+ int foo;
+ layout(binding = 2) float f; // ERROR
+} bbi;
+
+in centroid vec4 centroidIn;
+layout(location = 200000) uniform vec4 bigl; // ERROR, location too big
+
+layout(early_fragment_tests) in;
+
+layout(location = 40) out vec4 bigout1; // ERROR, too big
+layout(location = 40) out vec4 bigout2; // ERROR, overlap
+layout(location = -2) out vec4 neg; // ERROR, negative
+
+layout(std430) buffer b430 {
+ int i;
+} b430i;
+
+layout(shared) uniform bshar {
+ int i;
+} bshari;
+
+in smooth vec4 smoothIn;
+in flat int flatIn;
+
+uniform sampler2DMS s2dms;
+
+void foots()
+{
+ highp ivec2 v2 = textureSize(s1, 2);
+ highp ivec3 v3 = textureSize(isamp2DA, 3);
+ v2 = textureSize(s2dms);
+ v2 = imageSize(i2D);
+ v3 = imageSize(i3D);
+ v2 = imageSize(iCube);
+ v3 = imageSize(i2DA);
+ v2 = imageSize(i2Dqualified);
+}
+
+out bool bout; // ERROR
+out image2D imageOut; // ERROR
+out mat2x3 mout; // ERROR
+
+in bool inb; // ERROR
+in sampler2D ino; // ERROR
+in float ina[4];
+in float inaa[4][2]; // ERROR
+struct S { float f; };
+in S ins;
+in S[4] inasa; // ERROR
+in S insa[4]; // ERROR
+struct SA { float f[4]; };
+in SA inSA; // ERROR
+struct SS { float f; S s; };
+in SS inSS; // ERROR
+
+#ifndef GL_EXT_shader_io_blocks
+#error GL_EXT_shader_io_blocks not defined
+#endif
+
+#extension GL_EXT_shader_io_blocks : enable
+
+out outbname { int a; } outbinst; // ERROR, not out block in fragment shader
+
+in inbname {
+ int a;
+ vec4 v;
+ struct { int b; } s; // ERROR, nested struct definition
+} inbinst;
+
+in inbname2 {
+ layout(location = 12) int aAnon;
+ layout(location = 13) centroid in vec4 vAnon;
+};
+
+in layout(location = 13) vec4 aliased; // ERROR, aliased
+
+in inbname2 { // ERROR, reuse of block name
+ int aAnon;
+ centroid in vec4 vAnon;
+};
+
+in badmember { // ERROR, aAnon already in global scope
+ int aAnon;
+};
+
+int inbname; // ERROR, redefinition of block name
+
+vec4 vAnon; // ERROR, anon in global scope; redefinition
+
+in arrayed {
+ float f;
+} arrayedInst[4];
+
+void fooIO()
+{
+ vec4 v = inbinst.v + vAnon;
+ v *= arrayedInst[2].f;
+ v *= arrayedInst[i].f;
+}
+
+in vec4 gl_FragCoord;
+layout(origin_upper_left, pixel_center_integer) in vec4 gl_FragCoord; // ERROR, non-ES
+
+layout(early_fragment_tests) in;
+out float gl_FragDepth;
+layout(depth_any) out float gl_FragDepth; // ERROR, non-ES
+
+void foo_IO()
+{
+ gl_FragDepth = 0.2; // ERROR, early_fragment_tests declared
+ gl_Layer; // ERROR, not present
+ gl_PrimitiveID; // ERROR, not present
+ bool f = gl_FrontFacing;
+}
+
+out float gl_FragDepth;
+
+#extension GL_OES_geometry_shader : enable
+
+void foo_GS()
+{
+ highp int l = gl_Layer;
+ highp int p = gl_PrimitiveID;
+}
+
+in vec2 inf, ing;
+uniform ivec2 offsets[4];
+uniform sampler2D sArray[4];
+uniform int sIndex;
+layout(binding = 0) uniform atomic_uint auArray[2];
+uniform ubName { int i; } ubInst[4];
+buffer bbName { int i; } bbInst[4];
+uniform writeonly image2D iArray[5];
+const ivec2 constOffsets[4] = ivec2[4](ivec2(0.1), ivec2(0.2), ivec2(0.3), ivec2(0.4));
+
+void pfooBad()
+{
+ precise vec2 h; // ERROR reserved
+ h = fma(inf, ing, h); // ERROR, not available
+ textureGatherOffset(sArray[0], vec2(0.1), ivec2(inf)); // ERROR, offset not constant
+ textureGatherOffsets(sArray[0], vec2(0.1), constOffsets); // ERROR, not available
+}
+
+#extension GL_OES_gpu_shader5 : enable
+
+void pfoo()
+{
+ precise vec2 h;
+ h = fma(inf, ing, h);
+ textureGatherOffset(sArray[0], vec2(0.1), ivec2(inf));
+ textureGatherOffsets(sArray[0], vec2(0.1), constOffsets);
+ textureGatherOffsets(sArray[0], vec2(0.1), offsets); // ERROR, offset not constant
+}
+
+#extension GL_EXT_texture_cube_map_array : enable
+
+precision highp imageCubeArray ;
+precision highp iimageCubeArray ;
+precision highp uimageCubeArray ;
+
+precision highp samplerCubeArray ;
+precision highp samplerCubeArrayShadow;
+precision highp isamplerCubeArray ;
+precision highp usamplerCubeArray ;
+
+uniform writeonly imageCubeArray CA1;
+uniform writeonly iimageCubeArray CA2;
+uniform writeonly uimageCubeArray CA3;
+
+#ifdef GL_EXT_texture_cube_map_array
+uniform samplerCubeArray CA4;
+uniform samplerCubeArrayShadow CA5;
+uniform isamplerCubeArray CA6;
+uniform usamplerCubeArray CA7;
+#endif
+
+void CAT()
+{
+ highp vec4 b4 = texture(CA4, vec4(0.5), 0.24);
+ highp ivec4 b6 = texture(CA6, vec4(0.5), 0.26);
+ highp uvec4 b7 = texture(CA7, vec4(0.5), 0.27);
+}
+
+void badSample()
+{
+ lowp int a1 = gl_SampleID; // ERROR, need extension
+ mediump vec2 a2 = gl_SamplePosition; // ERROR, need extension
+ highp int a3 = gl_SampleMaskIn[0]; // ERROR, need extension
+ gl_SampleMask[0] = a3; // ERROR, need extension
+ mediump int n = gl_NumSamples; // ERROR, need extension
+}
+
+#ifdef GL_OES_sample_variables
+#extension GL_OES_sample_variables : enable
+#endif
+
+void goodSample()
+{
+ lowp int a1 = gl_SampleID;
+ mediump vec2 a2 = gl_SamplePosition;
+ highp int a3 = gl_SampleMaskIn[0];
+ gl_SampleMask[0] = a3;
+ mediump int n1 = gl_MaxSamples;
+ mediump int n2 = gl_NumSamples;
+}
+
+uniform layout(r32f) highp image2D im2Df;
+uniform layout(r32ui) highp uimage2D im2Du;
+uniform layout(r32i) highp iimage2D im2Di;
+uniform ivec2 P;
+
+void badImageAtom()
+{
+ float datf;
+ int dati;
+ uint datu;
+
+ imageAtomicAdd( im2Di, P, dati); // ERROR, need extension
+ imageAtomicAdd( im2Du, P, datu); // ERROR, need extension
+ imageAtomicMin( im2Di, P, dati); // ERROR, need extension
+ imageAtomicMin( im2Du, P, datu); // ERROR, need extension
+ imageAtomicMax( im2Di, P, dati); // ERROR, need extension
+ imageAtomicMax( im2Du, P, datu); // ERROR, need extension
+ imageAtomicAnd( im2Di, P, dati); // ERROR, need extension
+ imageAtomicAnd( im2Du, P, datu); // ERROR, need extension
+ imageAtomicOr( im2Di, P, dati); // ERROR, need extension
+ imageAtomicOr( im2Du, P, datu); // ERROR, need extension
+ imageAtomicXor( im2Di, P, dati); // ERROR, need extension
+ imageAtomicXor( im2Du, P, datu); // ERROR, need extension
+ imageAtomicExchange(im2Di, P, dati); // ERROR, need extension
+ imageAtomicExchange(im2Du, P, datu); // ERROR, need extension
+ imageAtomicExchange(im2Df, P, datf); // ERROR, need extension
+ imageAtomicCompSwap(im2Di, P, 3, dati); // ERROR, need extension
+ imageAtomicCompSwap(im2Du, P, 5u, datu); // ERROR, need extension
+}
+
+#ifdef GL_OES_shader_image_atomic
+#extension GL_OES_shader_image_atomic : enable
+#endif
+
+uniform layout(rgba32f) highp image2D badIm2Df; // ERROR, needs readonly or writeonly
+uniform layout(rgba8ui) highp uimage2D badIm2Du; // ERROR, needs readonly or writeonly
+uniform layout(rgba16i) highp iimage2D badIm2Di; // ERROR, needs readonly or writeonly
+
+void goodImageAtom()
+{
+ float datf;
+ int dati;
+ uint datu;
+
+ imageAtomicAdd( im2Di, P, dati);
+ imageAtomicAdd( im2Du, P, datu);
+ imageAtomicMin( im2Di, P, dati);
+ imageAtomicMin( im2Du, P, datu);
+ imageAtomicMax( im2Di, P, dati);
+ imageAtomicMax( im2Du, P, datu);
+ imageAtomicAnd( im2Di, P, dati);
+ imageAtomicAnd( im2Du, P, datu);
+ imageAtomicOr( im2Di, P, dati);
+ imageAtomicOr( im2Du, P, datu);
+ imageAtomicXor( im2Di, P, dati);
+ imageAtomicXor( im2Du, P, datu);
+ imageAtomicExchange(im2Di, P, dati);
+ imageAtomicExchange(im2Du, P, datu);
+ imageAtomicExchange(im2Df, P, datf);
+ imageAtomicCompSwap(im2Di, P, 3, dati);
+ imageAtomicCompSwap(im2Du, P, 5u, datu);
+
+ imageAtomicMax(badIm2Di, P, dati); // ERROR, not an allowed layout() on the image
+ imageAtomicMax(badIm2Du, P, datu); // ERROR, not an allowed layout() on the image
+ imageAtomicExchange(badIm2Df, P, datf); // ERROR, not an allowed layout() on the image
+}
+
+sample in vec4 colorSampInBad; // ERROR, reserved
+centroid out vec4 colorCentroidBad; // ERROR
+flat out vec4 colorBadFlat; // ERROR
+smooth out vec4 colorBadSmooth; // ERROR
+noperspective out vec4 colorBadNo; // ERROR
+flat centroid in vec2 colorfc;
+in float scalarIn;
+
+void badInterp()
+{
+ interpolateAtCentroid(colorfc); // ERROR, need extension
+ interpolateAtSample(colorfc, 1); // ERROR, need extension
+ interpolateAtOffset(colorfc, vec2(0.2)); // ERROR, need extension
+}
+
+#if defined GL_OES_shader_multisample_interpolation
+#extension GL_OES_shader_multisample_interpolation : enable
+#endif
+
+sample in vec4 colorSampIn;
+sample out vec4 colorSampleBad; // ERROR
+flat sample in vec4 colorfsi;
+sample in vec3 sampInArray[4];
+
+void interp()
+{
+ float res;
+ vec2 res2;
+ vec3 res3;
+ vec4 res4;
+
+ res2 = interpolateAtCentroid(colorfc);
+ res4 = interpolateAtCentroid(colorSampIn);
+ res4 = interpolateAtCentroid(colorfsi);
+ res = interpolateAtCentroid(scalarIn);
+ res3 = interpolateAtCentroid(sampInArray); // ERROR
+ res3 = interpolateAtCentroid(sampInArray[2]);
+ res2 = interpolateAtCentroid(sampInArray[2].xy); // ERROR
+
+ res3 = interpolateAtSample(sampInArray, 1); // ERROR
+ res3 = interpolateAtSample(sampInArray[i], 0);
+ res2 = interpolateAtSample(sampInArray[2].xy, 2); // ERROR
+ res = interpolateAtSample(scalarIn, 1);
+
+ res3 = interpolateAtOffset(sampInArray, vec2(0.2)); // ERROR
+ res3 = interpolateAtOffset(sampInArray[2], vec2(0.2));
+ res2 = interpolateAtOffset(sampInArray[2].xy, vec2(0.2)); // ERROR, no swizzle
+ res = interpolateAtOffset(scalarIn + scalarIn, vec2(0.2)); // ERROR, no binary ops other than dereference
+ res = interpolateAtOffset(scalarIn, vec2(0.2));
+
+ float f;
+ res = interpolateAtCentroid(f); // ERROR, not interpolant
+ res4 = interpolateAtSample(outp, 0); // ERROR, not interpolant
+}
+
+layout(blend_support_softlight) out; // ERROR, need extension
+
+#ifdef GL_KHR_blend_equation_advanced
+#extension GL_KHR_blend_equation_advanced : enable
+#endif
+
+layout(blend_support_multiply) out;
+layout(blend_support_screen) out;
+layout(blend_support_overlay) out;
+layout(blend_support_darken, blend_support_lighten) out;
+layout(blend_support_colordodge) layout(blend_support_colorburn) out;
+layout(blend_support_hardlight) out;
+layout(blend_support_softlight) out;
+layout(blend_support_difference) out;
+layout(blend_support_exclusion) out;
+layout(blend_support_hsl_hue) out;
+layout(blend_support_hsl_saturation) out;
+layout(blend_support_hsl_color) out;
+layout(blend_support_hsl_luminosity) out;
+layout(blend_support_all_equations) out;
+
+layout(blend_support_hsl_luminosity) out; // okay to repeat
+
+layout(blend_support_hsl_luminosity) in; // ERROR, only on "out"
+layout(blend_support_hsl_luminosity) out vec4; // ERROR, only on standalone
+layout(blend_support_hsl_luminosity) out vec4 badout; // ERROR, only on standalone
+layout(blend_support_hsl_luminosity) struct badS {int i;}; // ERROR, only on standalone
+layout(blend_support_hsl_luminosity) void blendFoo() { } // ERROR, only on standalone
+void blendFoo(layout(blend_support_hsl_luminosity) vec3 v) { } // ERROR, only on standalone
+layout(blend_support_flizbit) out; // ERROR, no flizbit
+
+out vec4 outAA[2][2]; // ERROR
diff --git a/chromium/third_party/glslang/src/Test/310.geom b/chromium/third_party/glslang/src/Test/310.geom
new file mode 100644
index 00000000000..f93bdbfa427
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/310.geom
@@ -0,0 +1,152 @@
+#version 310 es
+
+#ifdef GL_EXT_geometry_shader
+#extension GL_EXT_geometry_shader : enable
+#else
+#error no GL_EXT_geometry_shader
+#endif
+
+#ifndef GL_OES_geometry_shader
+#error no GL_OES_geometry_shader
+#endif
+
+precision mediump float;
+
+in fromVertex {
+ in vec3 color;
+} fromV[];
+
+in vec4 nonBlockUnsized[];
+
+out toFragment {
+ out vec3 color;
+} toF;
+
+out fromVertex { // okay to reuse a block name for another block name
+ vec3 color;
+};
+
+out fooB { // ERROR, cannot reuse block name as block instance
+ vec2 color;
+} fromVertex;
+
+int fromVertex; // ERROR, cannot reuse a block name for something else
+
+out fooC { // ERROR, cannot have same name for block and instance name
+ vec2 color;
+} fooC;
+
+void main()
+{
+ EmitVertex();
+ EndPrimitive();
+ EmitStreamVertex(1); // ERROR
+ EndStreamPrimitive(0); // ERROR
+
+ color = fromV[0].color;
+ gl_ClipDistance[3] = // ERROR, no ClipDistance
+ gl_in[1].gl_ClipDistance[2]; // ERROR, no ClipDistance
+ gl_Position = gl_in[0].gl_Position;
+
+ gl_PrimitiveID = gl_PrimitiveIDIn;
+ gl_Layer = 2;
+}
+
+layout(stream = 4) out vec4 ov4; // ERROR, no streams
+
+layout(line_strip, points, triangle_strip, points, triangle_strip) out; // just means triangle_strip"
+
+out ooutb { vec4 a; } ouuaa6;
+
+layout(max_vertices = 200) out;
+layout(max_vertices = 300) out; // ERROR, too big
+void foo(layout(max_vertices = 4) int a) // ERROR
+{
+ ouuaa6.a = vec4(1.0);
+}
+
+layout(line_strip, points, triangle_strip, points) out; // ERROR, changing output primitive
+layout(line_strip, points) out; // ERROR, changing output primitive
+layout(triangle_strip) in; // ERROR, not an input primitive
+layout(triangle_strip) uniform; // ERROR
+layout(triangle_strip) out vec4 badv4; // ERROR, not on a variable
+layout(triangle_strip) in vec4 bad2v4[]; // ERROR, not on a variable or input
+layout(invocations = 3) out outbn { int a; }; // 2 ERROR, not on a block, not until 4.0
+out outbn2 {
+ layout(invocations = 3) int a; // 2 ERRORs, not on a block member, not until 4.0
+ layout(max_vertices = 3) int b; // ERROR, not on a block member
+ layout(triangle_strip) int c; // ERROR, not on a block member
+} outbi;
+
+layout(lines) out; // ERROR, not on output
+layout(lines_adjacency) in;
+layout(triangles) in; // ERROR, can't change it
+layout(triangles_adjacency) in; // ERROR, can't change it
+layout(invocations = 4) in;
+
+in sameName {
+ int a15;
+} insn[];
+
+out sameName {
+ float f15;
+};
+
+uniform sameName {
+ bool b15;
+};
+
+const int summ = gl_MaxVertexAttribs +
+ gl_MaxGeometryInputComponents +
+ gl_MaxGeometryOutputComponents +
+ gl_MaxGeometryImageUniforms +
+ gl_MaxGeometryTextureImageUnits +
+ gl_MaxGeometryOutputVertices +
+ gl_MaxGeometryTotalOutputComponents +
+ gl_MaxGeometryUniformComponents +
+ gl_MaxGeometryAtomicCounters +
+ gl_MaxGeometryAtomicCounterBuffers +
+ gl_MaxVertexTextureImageUnits +
+ gl_MaxCombinedTextureImageUnits +
+ gl_MaxTextureImageUnits +
+ gl_MaxDrawBuffers;
+
+void fooe1()
+{
+ gl_ViewportIndex; // ERROR, not in ES
+ gl_MaxViewports; // ERROR, not in ES
+ insn.length(); // 4: lines_adjacency
+ int inv = gl_InvocationID;
+}
+
+in vec4 explArray[4];
+in vec4 explArrayBad[5]; // ERROR, wrong size
+in vec4 nonArrayed; // ERROR, not an array
+flat out vec3 myColor1;
+centroid out vec3 myColor2;
+centroid in vec3 centr[];
+sample out vec4 perSampleColor; // ERROR without sample extensions
+
+layout(max_vertices = 200) out; // matching redecl
+
+layout(location = 7, component = 2) in float comp[]; // ERROR, es has no component
+
+void notHere()
+{
+ gl_MaxGeometryVaryingComponents; // ERROR, not in ES
+ gl_VerticesIn; // ERROR, not in ES
+}
+
+void pointSize1()
+{
+ highp float ps = gl_in[3].gl_PointSize; // ERROR, need point_size extension
+ gl_PointSize = ps; // ERROR, need point_size extension
+}
+
+#extension GL_OES_geometry_point_size : enable
+
+void pointSize2()
+{
+ highp float ps = gl_in[3].gl_PointSize;
+ gl_PointSize = ps;
+}
diff --git a/chromium/third_party/glslang/src/Test/310.tesc b/chromium/third_party/glslang/src/Test/310.tesc
new file mode 100644
index 00000000000..f3df4b27279
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/310.tesc
@@ -0,0 +1,169 @@
+#version 310 es
+
+#extension GL_OES_tessellation_shader : enable
+
+layout(vertices = 4) out;
+out int outa[gl_out.length()];
+
+layout(quads) in; // ERROR
+layout(ccw) out; // ERROR
+layout(fractional_even_spacing) in; // ERROR
+
+patch in vec4 patchIn; // ERROR
+patch out vec4 patchOut;
+
+void main()
+{
+ barrier();
+
+ int a = gl_MaxTessControlInputComponents +
+ gl_MaxTessControlOutputComponents +
+ gl_MaxTessControlTextureImageUnits +
+ gl_MaxTessControlUniformComponents +
+ gl_MaxTessControlTotalOutputComponents;
+
+ vec4 p = gl_in[1].gl_Position;
+ float ps = gl_in[1].gl_PointSize; // ERROR, need point_size extension
+ float cd = gl_in[1].gl_ClipDistance[2]; // ERROR, not in ES
+
+ int pvi = gl_PatchVerticesIn;
+ int pid = gl_PrimitiveID;
+ int iid = gl_InvocationID;
+
+ gl_out[gl_InvocationID].gl_Position = p;
+ gl_out[gl_InvocationID].gl_PointSize = ps; // ERROR, need point_size extension
+ gl_out[gl_InvocationID].gl_ClipDistance[1] = cd; // ERROR, not in ES
+
+ gl_TessLevelOuter[3] = 3.2;
+ gl_TessLevelInner[1] = 1.3;
+
+ if (a > 10)
+ barrier(); // ERROR
+ else
+ barrier(); // ERROR
+
+ barrier();
+
+ do {
+ barrier(); // ERROR
+ } while (a > 10);
+
+ switch (a) {
+ default:
+ barrier(); // ERROR
+ break;
+ }
+ a < 12 ? a : (barrier(), a); // ERROR
+ {
+ barrier();
+ }
+
+ return;
+
+ barrier(); // ERROR
+}
+
+layout(vertices = 4) in; // ERROR, not on in
+layout(vertices = 5) out; // ERROR, changing #
+
+void foo()
+{
+ gl_out[4].gl_Position; // ERROR, out of range
+
+ barrier(); // ERROR, not in main
+}
+
+in vec2 ina; // ERROR, not array
+in vec2 inb[];
+in vec2 inc[18]; // ERROR, wrong size
+in vec2 ind[gl_MaxPatchVertices];
+patch out float implA[]; // ERROR, not sized
+
+#extension GL_ARB_separate_shader_objects : enable
+
+layout(location = 3) in vec4 ivla[];
+layout(location = 4) in vec4 ivlb[];
+layout(location = 4) in vec4 ivlc[]; // ERROR, overlapping
+
+layout(location = 3) out vec4 ovla[];
+layout(location = 4) out vec4 ovlb[];
+layout(location = 4) out vec4 ovlc[]; // ERROR, overlapping
+
+void foop()
+{
+ precise float d; // ERROR without gpu_shader5
+ d = fma(d, d, d); // ERROR without gpu_shader5
+}
+
+patch out pinbn {
+ int a;
+} pinbi;
+
+centroid out vec3 myColor2[];
+centroid in vec3 centr[];
+sample out vec4 perSampleColor[]; // ERROR without sample extensions
+
+layout(vertices = 4) out float badlay[]; // ERROR, not on a variable
+out float misSized[5]; // ERROR, size doesn't match
+out float okaySize[4];
+
+#extension GL_OES_tessellation_point_size : enable
+
+void pointSize2()
+{
+ float ps = gl_in[1].gl_PointSize;
+ gl_out[gl_InvocationID].gl_PointSize = ps;
+}
+
+#extension GL_OES_gpu_shader5 : enable
+
+precise vec3 pv3;
+
+void goodfoop()
+{
+ precise float d;
+
+ pv3 *= pv3;
+ pv3 = fma(pv3, pv3, pv3);
+ d = fma(d, d, d);
+}
+
+void bbBad()
+{
+ gl_BoundingBoxOES; // ERROR without GL_OES_primitive_bounding_box
+}
+
+#extension GL_OES_primitive_bounding_box : enable
+
+void bb()
+{
+ gl_BoundingBoxOES[0] = vec4(0.0);
+ gl_BoundingBoxOES[1] = vec4(1.0);
+ gl_BoundingBoxOES[2] = vec4(2.0); // ERROR, overflow
+}
+
+out patch badpatchBName { // ERROR, array size required
+ float f;
+} badpatchIName[];
+
+out patch patchBName {
+ float f;
+} patchIName[4];
+
+void outputtingOutparam(out int a)
+{
+ a = 2;
+}
+
+void outputting()
+{
+ outa[gl_InvocationID] = 2;
+ outa[1] = 2; // ERROR, not gl_InvocationID
+ gl_out[0].gl_Position = vec4(1.0); // ERROR, not gl_InvocationID
+ outa[1];
+ gl_out[0];
+ outputtingOutparam(outa[0]); // ERROR, not gl_InvocationID
+ outputtingOutparam(outa[gl_InvocationID]);
+ patchIName[1].f = 3.14;
+ outa[(gl_InvocationID)] = 2;
+}
diff --git a/chromium/third_party/glslang/src/Test/310.tese b/chromium/third_party/glslang/src/Test/310.tese
new file mode 100644
index 00000000000..94030127d1d
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/310.tese
@@ -0,0 +1,128 @@
+#version 310 es
+
+#extension GL_EXT_tessellation_shader : enable
+#extension GL_OES_tessellation_shader : enable
+#extension GL_EXT_tessellation_shader : disable
+
+layout(vertices = 4) out; // ERROR
+layout(quads, cw) in;
+layout(triangles) in; // ERROR
+layout(isolines) in; // ERROR
+
+layout(ccw) in; // ERROR
+layout(cw) in;
+
+layout(fractional_odd_spacing) in;
+layout(equal_spacing) in; // ERROR
+layout(fractional_even_spacing) in; // ERROR
+
+layout(point_mode) in;
+
+patch in vec4 patchIn;
+patch out vec4 patchOut; // ERROR
+
+void main()
+{
+ barrier(); // ERROR
+
+ int a = gl_MaxTessEvaluationInputComponents +
+ gl_MaxTessEvaluationOutputComponents +
+ gl_MaxTessEvaluationTextureImageUnits +
+ gl_MaxTessEvaluationUniformComponents +
+ gl_MaxTessPatchComponents +
+ gl_MaxPatchVertices +
+ gl_MaxTessGenLevel;
+
+ vec4 p = gl_in[1].gl_Position;
+ float ps = gl_in[1].gl_PointSize; // ERROR, need point_size extension
+ float cd = gl_in[1].gl_ClipDistance[2]; // ERROR, not in ES
+
+ int pvi = gl_PatchVerticesIn;
+ int pid = gl_PrimitiveID;
+ vec3 tc = gl_TessCoord;
+ float tlo = gl_TessLevelOuter[3];
+ float tli = gl_TessLevelInner[1];
+
+ gl_Position = p;
+ gl_PointSize = ps; // ERROR, need point_size extension
+ gl_ClipDistance[2] = cd; // ERROR, not in ES
+}
+
+smooth patch in vec4 badp1; // ERROR
+flat patch in vec4 badp2; // ERROR
+noperspective patch in vec4 badp3; // ERROR
+patch sample in vec3 badp4; // ERROR
+
+#extension GL_ARB_separate_shader_objects : enable
+
+in gl_PerVertex // ERROR, no size
+{
+ vec4 gl_Position;
+} gl_in[];
+
+in gl_PerVertex // ERROR, second redeclaration of gl_in
+{
+ vec4 gl_Position;
+} gl_in[];
+
+layout(quads, cw) out; // ERROR
+layout(triangles) out; // ERROR
+layout(isolines) out; // ERROR
+layout(cw) out; // ERROR
+layout(fractional_odd_spacing) out; // ERROR
+layout(equal_spacing) out; // ERROR
+layout(fractional_even_spacing) out; // ERROR
+layout(point_mode) out; // ERROR
+
+in vec2 ina; // ERROR, not array
+in vec2 inb[];
+in vec2 inc[18]; // ERROR, wrong size
+in vec2 ind[gl_MaxPatchVertices];
+
+in testbla { // ERROR, not array
+ int f;
+} bla;
+
+in testblb {
+ int f;
+} blb[];
+
+in testblc { // ERROR wrong size
+ int f;
+} blc[18];
+
+in testbld {
+ int f;
+} bld[gl_MaxPatchVertices];
+
+layout(location = 23) in vec4 ivla[];
+layout(location = 24) in vec4 ivlb[];
+layout(location = 24) in vec4 ivlc[]; // ERROR, overlap
+
+layout(location = 23) out vec4 ovla[2];
+layout(location = 24) out vec4 ovlb[2]; // ERROR, overlap
+
+in float gl_TessLevelOuter[4]; // ERROR, can't redeclare
+
+patch in pinbn {
+ int a;
+} pinbi;
+
+centroid out vec3 myColor2;
+centroid in vec3 centr[];
+sample out vec4 perSampleColor; // ERROR without sample extensions
+
+#extension GL_OES_tessellation_point_size : enable
+
+void pointSize2()
+{
+ float ps = gl_in[1].gl_PointSize; // ERROR, not in the redeclaration, but no error on use of gl_PointSize
+ gl_PointSize = ps;
+}
+
+#extension GL_EXT_primitive_bounding_box : enable
+
+void bbbad()
+{
+ gl_BoundingBoxOES; // ERROR, wrong stage
+}
diff --git a/chromium/third_party/glslang/src/Test/310.vert b/chromium/third_party/glslang/src/Test/310.vert
new file mode 100644
index 00000000000..61998fd8b38
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/310.vert
@@ -0,0 +1,403 @@
+#version 310 es
+
+shared vec4 s; // ERROR
+layout(local_size_x = 2) out; // ERROR
+buffer vec4 v; // ERROR
+in int ini;
+layout(location = 2) uniform mat4 x;
+layout(location = 3) uniform mat4 y;
+layout(location = 2) out mat4 xi;
+layout(location = 3) out mat4 yi; // ERROR, locations conflict with xi
+
+void main()
+{
+ uvec2 u2;
+ u2 = uaddCarry(u2, u2, u2);
+ uint u1;
+ u1 = usubBorrow(u1, u1, u1);
+ uvec4 u4;
+ umulExtended(u4, u4, u4, u4);
+ ivec4 i4;
+ imulExtended(i4, i4, i4, i4);
+ int i1;
+ i1 = bitfieldExtract(i1, 4, 5);
+ uvec3 u3;
+ u3 = bitfieldExtract(u3, 4, 5);
+ ivec3 i3;
+ i3 = bitfieldInsert(i3, i3, 4, 5);
+ u1 = bitfieldInsert(u1, u1, 4, 5);
+ ivec2 i2;
+ i2 = bitfieldReverse(i2);
+ u4 = bitfieldReverse(u4);
+ i1 = bitCount(i1);
+ i3 = bitCount(u3);
+ i2 = findLSB(i2);
+ i4 = findLSB(u4);
+ i1 = findMSB(i1);
+ i2 = findMSB(u2);
+
+ vec3 v3;
+ v3 = frexp(v3, i3);
+ vec2 v2;
+ v2 = ldexp(v2, i2);
+
+ mediump vec4 v4;
+ u1 = packUnorm4x8(v4);
+ u1 = packSnorm4x8(v4);
+ v4 = unpackUnorm4x8(u1);
+ v4 = unpackSnorm4x8(u1);
+}
+
+precision highp sampler2DMS;
+precision highp isampler2DMS;
+precision highp usampler2DMS;
+
+uniform sampler2DMS s2dms;
+uniform isampler2DMS is2dms;
+uniform usampler2DMS us2dms;
+uniform usampler2DMSArray us2dmsa; // ERROR
+
+void foo()
+{
+ ivec2 v2;
+ v2 = textureSize(s2dms);
+ v2 = textureSize(us2dms);
+ vec4 v4 = texelFetch(s2dms, v2, 2);
+ ivec4 iv4 = texelFetch(is2dms, v2, 2);
+ textureSamples(s2dms); // ERROR
+ float f;
+ frexp(f, ini); // ERROR, i not writable
+}
+
+out bool outb; // ERROR
+out sampler2D outo; // ERROR
+out float outa[4];
+out float outaa[4][2]; // ERROR
+struct S { float f; };
+out S outs;
+out S[4] outasa; // ERROR
+out S outsa[4]; // ERROR
+struct SA { float f[4]; };
+out SA outSA; // ERROR
+struct SS { float f; S s; };
+out SS outSS; // ERROR
+
+layout(std430) uniform U430 { int a; } U430i; // ERROR
+layout(std430) buffer B430 { int a; } B430i;
+
+#ifndef GL_OES_shader_io_blocks
+#error GL_OES_shader_io_blocks not defined
+#endif
+
+#extension GL_OES_shader_io_blocks : enable
+
+out outbname {
+ int a;
+ out vec4 v;
+ highp sampler2D s; // ERROR, opaque type
+} outbinst;
+
+out outbname2 {
+ layout(location = 12) int aAnon;
+ layout(location = 13) vec4 vAnon;
+};
+
+layout(location = 12) out highp int aliased; // ERROR, aliasing location
+
+in inbname { int a; } inbinst; // ERROR, no in block in vertex shader
+
+out gl_PerVertex { // ERROR, has extra member
+ highp vec4 gl_Position;
+ highp vec4 t;
+};
+
+void foo_IO()
+{
+ int sum = gl_VertexID +
+ gl_InstanceID;
+ gl_Position = vec4(1.0);
+ gl_PointSize = 2.0; // ERROR, removed by redeclaration
+}
+
+out gl_PerVertex { // ERROR, already used and already redeclared
+ highp vec4 gl_Position;
+ highp vec4 t;
+};
+
+smooth out smo { // ERROR, no smooth on a block
+ int i;
+} smon;
+
+flat out fmo { // ERROR, no flat on a block
+ int i;
+} fmon;
+
+centroid out cmo { // ERROR, no centroid on a block
+ int i;
+} cmon;
+
+invariant out imo { // ERROR, no invariant on a block
+ int i;
+} imon;
+
+in vec2 inf, ing;
+uniform ivec2 offsets[4];
+uniform sampler2D sArray[4];
+uniform int sIndex;
+layout(binding = 0) uniform atomic_uint auArray[2];
+uniform ubName { int i; } ubInst[4];
+buffer bbName { int i; } bbInst[4];
+uniform writeonly image2D iArray[5];
+const ivec2 constOffsets[4] = ivec2[4](ivec2(0.1), ivec2(0.2), ivec2(0.3), ivec2(0.4));
+
+void pfooBad()
+{
+ precise vec2 h; // ERROR reserved
+ h = fma(inf, ing, h); // ERROR, not available
+ sArray[sIndex + 1]; // ERRRO, not supported
+ auArray[sIndex + 1];
+ ubInst[1];
+ bbInst[2];
+ ubInst[sIndex + 1]; // ERRRO, not supported
+ bbInst[sIndex]; // ERRRO, not supported
+ iArray[2];
+ iArray[sIndex * 2]; // ERRRO, not supported
+ textureGatherOffset(sArray[0], vec2(0.1), ivec2(inf)); // ERROR, offset not constant
+ textureGatherOffsets(sArray[0], vec2(0.1), constOffsets); // ERROR, not available
+}
+
+#extension GL_OES_gpu_shader5 : enable
+
+void pfoo()
+{
+ precise vec2 h;
+ h = fma(inf, ing, h);
+ sArray[sIndex + 1];
+ ubInst[sIndex + 1];
+ bbInst[sIndex - 2]; // ERROR, still not supported
+ iArray[2];
+ iArray[sIndex - 2];
+ textureGatherOffset(sArray[0], vec2(0.1), ivec2(inf));
+ textureGatherOffsets(sArray[0], vec2(0.1), constOffsets);
+ textureGatherOffsets(sArray[0], vec2(0.1), offsets); // ERROR, offset not constant
+}
+
+uniform samplerBuffer badSamp1; // ERROR, reserved
+uniform isamplerBuffer badSamp2; // ERROR, reserved
+uniform usamplerBuffer badSamp3; // ERROR, reserved
+uniform writeonly imageBuffer badSamp4; // ERROR, reserved
+uniform writeonly iimageBuffer badSamp5; // ERROR, reserved
+uniform writeonly uimageBuffer badSamp6; // ERROR, reserved
+
+#extension GL_OES_texture_buffer : enable
+#extension GL_EXT_texture_buffer : enable
+
+uniform samplerBuffer noPreSamp1; // ERROR, no default precision
+uniform isamplerBuffer noPreSamp2; // ERROR, no default precision
+uniform usamplerBuffer noPreSamp3; // ERROR, no default precision
+uniform writeonly imageBuffer noPreSamp4; // ERROR, no default precision
+uniform writeonly iimageBuffer noPreSamp5; // ERROR, no default precision
+uniform writeonly uimageBuffer noPreSamp6; // ERROR, no default precision
+
+precision highp samplerBuffer;
+precision highp isamplerBuffer;
+precision highp usamplerBuffer;
+precision highp imageBuffer;
+precision highp iimageBuffer;
+precision highp uimageBuffer;
+
+#ifdef GL_OES_texture_buffer
+uniform samplerBuffer bufSamp1;
+uniform isamplerBuffer bufSamp2;
+uniform usamplerBuffer bufSamp3;
+#endif
+#ifdef GL_EXT_texture_buffer
+uniform writeonly imageBuffer bufSamp4;
+uniform writeonly iimageBuffer bufSamp5;
+uniform writeonly uimageBuffer bufSamp6;
+#endif
+
+void bufferT()
+{
+ highp int s1 = textureSize(bufSamp1);
+ highp int s2 = textureSize(bufSamp2);
+ highp int s3 = textureSize(bufSamp3);
+
+ highp int s4 = imageSize(bufSamp4);
+ highp int s5 = imageSize(bufSamp5);
+ highp int s6 = imageSize(bufSamp6);
+
+ highp vec4 f1 = texelFetch(bufSamp1, s1);
+ highp ivec4 f2 = texelFetch(bufSamp2, s2);
+ highp uvec4 f3 = texelFetch(bufSamp3, s3);
+}
+
+uniform writeonly imageCubeArray badCA1; // ERROR, reserved
+uniform writeonly iimageCubeArray badCA2; // ERROR, reserved
+uniform writeonly uimageCubeArray badCA3; // ERROR, reserved
+
+uniform samplerCubeArray badCA4; // ERROR, reserved
+uniform samplerCubeArrayShadow badCA5; // ERROR, reserved
+uniform isamplerCubeArray badCA6; // ERROR, reserved
+uniform usamplerCubeArray badCA7; // ERROR, reserved
+
+#extension GL_OES_texture_cube_map_array : enable
+
+uniform writeonly imageCubeArray noPreCA1; // ERROR, no default precision
+uniform writeonly iimageCubeArray noPreCA2; // ERROR, no default precision
+uniform writeonly uimageCubeArray noPreCA3; // ERROR, no default precision
+
+uniform samplerCubeArray noPreCA4; // ERROR, no default precision
+uniform samplerCubeArrayShadow noPreCA5; // ERROR, no default precision
+uniform isamplerCubeArray noPreCA6; // ERROR, no default precision
+uniform usamplerCubeArray noPreCA7; // ERROR, no default precision
+
+precision highp imageCubeArray ;
+precision highp iimageCubeArray ;
+precision highp uimageCubeArray ;
+
+precision highp samplerCubeArray ;
+precision highp samplerCubeArrayShadow;
+precision highp isamplerCubeArray ;
+precision highp usamplerCubeArray ;
+
+uniform writeonly imageCubeArray CA1;
+uniform writeonly iimageCubeArray CA2;
+uniform writeonly uimageCubeArray CA3;
+
+layout(rgba16f) uniform readonly imageCubeArray rCA1;
+layout(rgba32i) uniform readonly iimageCubeArray rCA2;
+layout(r32ui) uniform readonly uimageCubeArray rCA3;
+
+#ifdef GL_OES_texture_cube_map_array
+uniform samplerCubeArray CA4;
+uniform samplerCubeArrayShadow CA5;
+uniform isamplerCubeArray CA6;
+uniform usamplerCubeArray CA7;
+#endif
+
+void CAT()
+{
+ highp ivec3 s4 = textureSize(CA4, 1);
+ highp ivec3 s5 = textureSize(CA5, 1);
+ highp ivec3 s6 = textureSize(CA6, 1);
+ highp ivec3 s7 = textureSize(CA7, 1);
+
+ highp vec4 t4 = texture(CA4, vec4(0.5));
+ highp float t5 = texture(CA5, vec4(0.5), 3.0);
+ highp ivec4 t6 = texture(CA6, vec4(0.5));
+ highp uvec4 t7 = texture(CA7, vec4(0.5));
+
+ highp vec4 L4 = textureLod(CA4, vec4(0.5), 0.24);
+ highp ivec4 L6 = textureLod(CA6, vec4(0.5), 0.26);
+ highp uvec4 L7 = textureLod(CA7, vec4(0.5), 0.27);
+
+ highp vec4 g4 = textureGrad(CA4, vec4(0.5), vec3(0.1), vec3(0.2));
+ highp ivec4 g6 = textureGrad(CA6, vec4(0.5), vec3(0.1), vec3(0.2));
+ highp uvec4 g7 = textureGrad(CA7, vec4(0.5), vec3(0.1), vec3(0.2));
+
+ highp vec4 gath4 = textureGather(CA4, vec4(0.5));
+ highp vec4 gathC4 = textureGather(CA4, vec4(0.5), 2);
+ highp ivec4 gath6 = textureGather(CA6, vec4(0.5));
+ highp ivec4 gathC6 = textureGather(CA6, vec4(0.5), 1);
+ highp uvec4 gath7 = textureGather(CA7, vec4(0.5));
+ highp uvec4 gathC7 = textureGather(CA7, vec4(0.5), 0);
+
+ highp vec4 gath5 = textureGather(CA5, vec4(0.5), 2.5);
+
+ highp ivec3 s1 = imageSize(CA1);
+ highp ivec3 s2 = imageSize(CA2);
+ highp ivec3 s3 = imageSize(CA3);
+
+ imageStore(CA1, s3, vec4(1));
+ imageStore(CA2, s3, ivec4(1));
+ imageStore(CA3, s3, uvec4(1));
+
+ highp vec4 cl1 = imageLoad(rCA1, s3);
+ highp ivec4 cl2 = imageLoad(rCA2, s3);
+ highp uvec4 cl3 = imageLoad(rCA3, s3);
+}
+
+uniform sampler2DMSArray bad2DMS; // ERROR, reserved
+uniform isampler2DMSArray bad2DMSi; // ERROR, reserved
+uniform usampler2DMSArray bad2DMSu; // ERROR, reserved
+
+#extension GL_OES_texture_storage_multisample_2d_array : enable
+
+#ifdef GL_OES_texture_storage_multisample_2d_array
+
+uniform sampler2DMSArray noPrec2DMS; // ERROR, no default
+uniform isampler2DMSArray noPrec2DMSi; // ERROR, no default
+uniform usampler2DMSArray noPrec2DMSu; // ERROR, no default
+
+#endif
+
+precision highp sampler2DMSArray;
+precision highp isampler2DMSArray;
+precision highp usampler2DMSArray;
+
+uniform sampler2DMSArray samp2DMSA;
+uniform isampler2DMSArray samp2DMSAi;
+uniform usampler2DMSArray samp2DMSAu;
+
+void MSA()
+{
+ vec4 tf = texelFetch(samp2DMSA, ivec3(5), 2);
+ ivec4 tfi = texelFetch(samp2DMSAi, ivec3(5), 2);
+ uvec4 tfu = texelFetch(samp2DMSAu, ivec3(5), 2);
+
+ ivec3 tfs = textureSize(samp2DMSA);
+ ivec3 tfsi = textureSize(samp2DMSAi);
+ ivec3 tfsb = textureSize(samp2DMSAi, 4); // ERROR, no lod
+ ivec3 tfsu = textureSize(samp2DMSAu);
+}
+
+#ifdef GL_OES_shader_image_atomic
+#extension GL_OES_shader_image_atomic : enable
+#endif
+
+uniform layout(r32f) highp image2D im2Df;
+uniform layout(r32ui) highp uimage2D im2Du;
+uniform layout(r32i) highp iimage2D im2Di;
+uniform ivec2 P;
+
+void goodImageAtom()
+{
+ float datf;
+ int dati;
+ uint datu;
+
+ imageAtomicAdd( im2Di, P, dati);
+ imageAtomicAdd( im2Du, P, datu);
+ imageAtomicMin( im2Di, P, dati);
+ imageAtomicMin( im2Du, P, datu);
+ imageAtomicMax( im2Di, P, dati);
+ imageAtomicMax( im2Du, P, datu);
+ imageAtomicAnd( im2Di, P, dati);
+ imageAtomicAnd( im2Du, P, datu);
+ imageAtomicOr( im2Di, P, dati);
+ imageAtomicOr( im2Du, P, datu);
+ imageAtomicXor( im2Di, P, dati);
+ imageAtomicXor( im2Du, P, datu);
+ imageAtomicExchange(im2Di, P, dati);
+ imageAtomicExchange(im2Du, P, datu);
+ imageAtomicExchange(im2Df, P, datf);
+ imageAtomicCompSwap(im2Di, P, 3, dati);
+ imageAtomicCompSwap(im2Du, P, 5u, datu);
+}
+
+sample out vec4 colorSampInBad; // ERROR, reserved
+
+#extension GL_OES_shader_multisample_interpolation : enable
+
+sample out vec4 colorSample;
+flat sample out vec4 colorfsi;
+sample out vec3 sampInArray[4];
+in vec4 inv4;
+
+void badInterp()
+{
+ interpolateAtCentroid(inv4); // ERROR, wrong stage
+ interpolateAtSample(inv4, 1); // ERROR, need extension
+ interpolateAtOffset(inv4, vec2(0.2)); // ERROR, need extension
+}
diff --git a/chromium/third_party/glslang/src/Test/310AofA.vert b/chromium/third_party/glslang/src/Test/310AofA.vert
new file mode 100644
index 00000000000..7e4da1dcae5
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/310AofA.vert
@@ -0,0 +1,115 @@
+#version 310 es
+
+// Check name mangling of functions with parameters that are multi-dimensional arrays.
+
+#define NX 2
+#define NY 3
+#define NZ 4
+void f(bool a, float b, uint[4] c, int[NY][NX] d) {
+}
+
+void main() {
+ int[NY][NX] d;
+ f(false, 12.1, uint[NZ](uint(0),uint(1),uint(1),uint(2)), d);
+}
+
+buffer b {
+ float u[]; // ERROR
+ vec4 v[];
+} name[3];
+
+uniform ub {
+ float u;
+ vec4 v[]; // ERROR
+} uname[3];
+
+buffer b2 {
+ float u;
+ vec4 v[][]; // ERROR
+} name2[3];
+
+buffer b3 {
+ float u;
+ vec4 v[][7];
+} name3[3];
+
+// General arrays of arrays
+
+float[4][5][6] many[1][2][3];
+
+float gu[][7]; // ERROR, size required
+float g4[4][7];
+float g5[5][7];
+
+float[4][7] foo(float a[5][7])
+{
+ float r[7];
+ r = a[2];
+ float[](a[0], a[1], r, a[3]); // ERROR, too few dims
+ float[4][7][4](a[0], a[1], r, a[3]); // ERROR, too many dims
+ return float[4][7](a[0], a[1], r, a[3]);
+ return float[][](a[0], a[1], r, a[3]);
+ return float[][7](a[0], a[1], a[2], a[3]);
+}
+
+void bar(float[5][7]) {}
+
+void foo2()
+{
+ {
+ float gu[3][4][2];
+
+ gu[2][4][1] = 4.0; // ERROR, overflow
+ }
+ vec4 ca4[3][2] = vec4[][](vec4[2](vec4(0.0), vec4(1.0)),
+ vec4[2](vec4(0.0), vec4(1.0)),
+ vec4[2](vec4(0.0), vec4(1.0)));
+ vec4 caim[][2] = vec4[][](vec4[2](vec4(4.0), vec4(2.0)),
+ vec4[2](vec4(4.0), vec4(2.0)),
+ vec4[2](vec4(4.0), vec4(2.0)));
+ vec4 caim2[][] = vec4[][](vec4[2](vec4(4.0), vec4(2.0)),
+ vec4[2](vec4(4.0), vec4(2.0)),
+ vec4[2](vec4(4.0), vec4(2.0)));
+ vec4 caim3[3][] = vec4[][](vec4[2](vec4(4.0), vec4(2.0)),
+ vec4[2](vec4(4.0), vec4(2.0)),
+ vec4[2](vec4(4.0), vec4(2.0)));
+
+ g4 = foo(g5);
+ g5 = g4; // ERROR, wrong types
+ gu = g4; // ERROR, not yet sized
+
+ foo(gu); // ERROR, not yet sized
+ bar(g5);
+
+ if (foo(g5) == g4)
+ ;
+ if (foo(g5) == g5) // ERROR, different types
+ ;
+
+ float u[5][7];
+ u[5][2] = 5.0; // ERROR
+ foo(u);
+
+ vec4 badAss[3];
+ name[1].v[-1]; // ERROR
+ name[1].v[1] = vec4(4.3);
+ name[1].v = badAss; // ERROR, bad assignemnt
+
+ name3[0].v[1].length(); // 7
+ name3[0].v.length(); // run time
+}
+
+struct badS {
+ int sa[]; // ERROR
+ int a[][]; // ERROR
+ int b[][2]; // ERROR
+ int c[2][]; // ERROR
+ int d[][4]; // ERROR
+};
+
+in float inArray[2][3]; // ERROR
+out float outArray[2][3]; // ERROR
+
+uniform ubaa {
+ int a;
+} ubaaname[2][3]; // ERROR
diff --git a/chromium/third_party/glslang/src/Test/310implicitSizeArrayError.vert b/chromium/third_party/glslang/src/Test/310implicitSizeArrayError.vert
new file mode 100644
index 00000000000..f9a3461a367
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/310implicitSizeArrayError.vert
@@ -0,0 +1,8 @@
+#version 310 es
+layout (location=0) uniform Block {
+ highp int a[];
+} uni;
+layout (location=0) out highp int o;
+void main() {
+ o = uni.a[2];
+}
diff --git a/chromium/third_party/glslang/src/Test/330.frag b/chromium/third_party/glslang/src/Test/330.frag
new file mode 100644
index 00000000000..8b0cb25f545
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/330.frag
@@ -0,0 +1,152 @@
+#version 330 compatibility
+
+in vec4 inVar;
+layout(location=0, index=0) out vec4 outVar;
+
+varying vec4 varyingVar;
+
+void main()
+{
+ gl_FragColor = varyingVar; // link ERROR: user output was used
+ gl_FragData[1] = inVar; // link ERROR: user output was used
+ int buffer = 4;
+}
+
+#extension GL_ARB_separate_shader_objects : enable
+
+in gl_PerFragment {
+ vec4 gl_Color;
+};
+
+void foo()
+{
+ vec4 c = gl_Color;
+ outVar = inVar;
+}
+
+in gl_block { // ERROR
+ int gl_i;
+} gl_name;
+
+in myBlock {
+ int gl_i; // ERROR
+} gl_name; // ERROR
+
+in gl_PerVertex { // ERROR
+ vec4 gl_FragCoord;
+} gl_in[];
+
+in gl_PerVertex { // ERROR
+ vec4 gl_FragCoord;
+}; // ERROR
+
+const int start = 6;
+layout(location = -2) in vec4 v1; // ERROR
+layout(location = start + 2) in vec4 v2; // ERROR
+layout(location = 4.7e10) in vec4 v20; // ERROR
+layout(location = +60) in float v21; // ERROR
+layout(location = (2)) in float v22; // ERROR
+
+struct S {
+ float f1;
+ layout(location = 3) float f2; // ERROR
+};
+
+layout(location = 1) in inblock { // ERROR
+ float f1;
+ layout(location = 3) float f2; // ERROR
+};
+
+layout(location = 1) uniform ublock { // ERROR
+ float f1;
+ layout(location = 3) float f2; // ERROR
+} uinst;
+
+#extension GL_ARB_enhanced_layouts : enable
+
+layout(location = start) in vec4 v3;
+layout(location = -2) in vec4 v4; // ERROR
+layout(location = -start) in vec4 v5; // ERROR
+layout(location = start*start - 2 - 4) in vec4 v6;
+layout(location = +61) in float v23;
+layout(location = (62)) in float v24;
+
+struct S2 {
+ float f1;
+ layout(location = 3) float f2; // ERROR
+};
+
+layout(location = 28) in inblock2 {
+ bool b1;
+ float f1;
+ layout(location = 25) float f2;
+ vec4 f3;
+ layout(location = 21) S2 s2;
+ vec4 f4;
+ vec4 f5;
+} ininst2;
+
+layout(location = 13) uniform ublock2 { // ERROR
+ float f1;
+ layout(location = 3) float f2; // ERROR
+} uinst2;
+
+in inblock3 { // ERROR, mix of location internal with no location external
+ float f1;
+ layout(location = 40) float f2;
+} in3;
+
+in ublock4 {
+ layout(location = 50) float f1;
+ layout(location = 51) float f2;
+} in4;
+
+layout(location = 33) in struct SS {
+ vec3 a; // gets location 33
+ mat2 b; // gets locations 34 and 35
+ vec4 c[2]; // gets locations 36 and 37
+ layout (location = 38) vec2 A; // ERROR, can't use on struct member
+} s;
+
+layout(location = 44) in block {
+ vec4 d; // gets location 44
+ vec4 e; // gets location 45
+ layout(location = 47) vec4 f; // gets location 47
+ vec4 g; // gets location 48
+ layout (location = 41) vec4 h; // gets location 41
+ vec4 i; // gets location 42
+ vec4 j; // gets location 43
+ vec4 k; // ERROR, location 44 already used
+};
+
+layout(index=0) out vec4 outVar2; // ERROR: missing explicit location
+layout(location=0, index=1) out vec4 outVar3; // no error even though location is overlapping
+layout(location=0, index=1) out vec4 outVar4; // ERROR overlapping
+layout(location=27, index=0) in vec4 indexIn; // ERROR, not on in
+layout(location=0, index=0) in; // ERROR, not just on in
+layout(location=0, index=0) out; // ERROR, need a variable
+layout(location=26, index=0) out indexBlock { int a; } indexBlockI; // ERROR, not on a block
+
+uniform sampler1D samp1D;
+uniform sampler2DShadow samp2Ds;
+
+void qlod()
+{
+ vec2 lod;
+ float pf;
+ vec2 pf2;
+ vec3 pf3;
+
+ lod = textureQueryLod(samp1D, pf); // ERROR, not until 400
+ lod = textureQueryLod(samp2Ds, pf2); // ERROR, not until 400
+}
+
+int precise; // okay, not a keyword yet
+struct SKeyMem { int precise; } KeyMem; // okay, not a keyword yet
+
+void fooKeyMem()
+{
+ KeyMem.precise;
+}
+
+layout(location=28, index=2) out vec4 outIndex2; // ERROR index out of range \ No newline at end of file
diff --git a/chromium/third_party/glslang/src/Test/330comp.frag b/chromium/third_party/glslang/src/Test/330comp.frag
new file mode 100644
index 00000000000..50b037da66a
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/330comp.frag
@@ -0,0 +1,12 @@
+#version 330 compatibility
+
+in vec4 inVar;
+out vec4 outVar;
+
+varying vec4 varyingVar;
+
+void main()
+{
+ gl_FragColor = varyingVar;
+ gl_FragData[1] = inVar * gl_ModelViewMatrix;
+}
diff --git a/chromium/third_party/glslang/src/Test/400.frag b/chromium/third_party/glslang/src/Test/400.frag
new file mode 100644
index 00000000000..ed8882c5b90
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/400.frag
@@ -0,0 +1,197 @@
+#version 400 core
+
+in vec2 c2D;
+flat in int i;
+out vec4 outp;
+uniform sampler2D arrayedSampler[5];
+uniform usampler2DRect samp2dr;
+uniform isampler2DArray isamp2DA;
+
+void main()
+{
+ vec4 v;
+ v = texture(arrayedSampler[i], c2D);
+ outp.x = gl_ClipDistance[1];
+
+ ivec2 offsets[4];
+ const ivec2 constOffsets[4] = ivec2[4](ivec2(1,2), ivec2(3,4), ivec2(15,16), ivec2(-2,0));
+ uvec4 uv4 = textureGatherOffsets(samp2dr, c2D, offsets, 2); // ERROR, offsets not constant
+ uv4 = textureGatherOffsets(samp2dr, c2D, constOffsets, 2);
+ vec4 v4 = textureGather(arrayedSampler[0], c2D);
+ ivec4 iv4 = textureGatherOffset(isamp2DA, vec3(0.1), ivec2(1), 3);
+ iv4 = textureGatherOffset(isamp2DA, vec3(0.1), ivec2(1), i); // ERROR, last argument not const
+ iv4 = textureGatherOffset(isamp2DA, vec3(0.1), ivec2(1), 4); // ERROR, last argument out of range
+ iv4 = textureGatherOffset(isamp2DA, vec3(0.1), ivec2(1), 1+2);
+ iv4 = textureGatherOffset(isamp2DA, vec3(0.1), ivec2(i));
+
+ vec4 c = gl_FragCoord;
+}
+
+layout(location = 4) in vec4 vl; // ERROR, not supported
+
+#ifdef GL_ARB_separate_shader_objects
+#extension GL_ARB_separate_shader_objects : enable
+#endif
+
+layout(location = 6) in vec4 vl2;
+
+layout(location = 3) uniform vec3 uv3;
+
+layout(location = 5) in vec4 gl_Color; // ERROR, layout
+noperspective in float gl_ClipDistance[4]; // ERROR, can't change qualifier
+
+layout(origin_upper_left, pixel_center_integer) in vec4 gl_FragCoord; // ERROR, declared after use
+
+uniform sampler2DRectShadow u2drs;
+
+void foo23()
+{
+ const ivec2[3] offsets = ivec2[3](ivec2(1,2), ivec2(3,4), ivec2(15,16));
+
+ textureProjGradOffset(u2drs, outp, vec2(0.0), vec2(0.0), ivec2(c2D)); // ERROR, offset not constant
+ textureProjGradOffset(u2drs, outp, vec2(0.0), vec2(0.0), offsets[1]);
+ textureProjGradOffset(u2drs, outp, vec2(0.0), vec2(0.0), offsets[2]); // ERROR, offset out of range
+ textureProjGradOffset(u2drs, outp, vec2(0.0), vec2(0.0), ivec2(-10, 20)); // ERROR, offset out of range
+}
+
+patch in vec4 patchIn; // ERROR
+patch out vec4 patchOut; // ERROR
+
+void foo24()
+{
+ dvec3 df, di;
+ df = modf(dvec3(outp.xyz), di);
+}
+
+in float in1;
+in vec2 in2;
+in vec3 in3;
+in vec4 in4;
+
+void foodc1()
+{
+ vec2 v2 = dFdxFine(in2); // ERROR
+ vec3 v3 = dFdyCoarse(in3); // ERROR
+ vec4 v4 = fwidthCoarse(in4) + fwidthFine(in4); // ERROR
+}
+
+#extension GL_ARB_derivative_control : enable
+
+void foodc2()
+{
+ vec2 v2 = dFdxFine(in2);
+ vec3 v3 = dFdyCoarse(in3);
+ vec4 v4 = fwidthCoarse(in4) + fwidthFine(in4);
+
+ uint u1;
+ ivec3 i3;
+ ivec2 i2;
+ v2 = frexp(v2, i2);
+ v3 = ldexp(v3, i3);
+
+ u1 = packUnorm4x8(v4);
+ u1 = packSnorm4x8(v4);
+ v4 = unpackUnorm4x8(u1);
+ v4 = unpackSnorm4x8(u1);
+
+ double d;
+ uvec2 u2;
+ d = packDouble2x32(u2);
+ u2 = unpackDouble2x32(d);
+}
+
+sample in vec4 colorSampIn;
+sample out vec4 colorSampleBad; // ERROR
+noperspective in vec4 colorfsi;
+sample in vec3 sampInArray[4];
+smooth in float scalarIn;
+flat centroid in vec2 colorfc;
+
+struct S {
+ float x;
+};
+
+in S s1;
+sample S s2;
+
+void interp()
+{
+ interpolateAtCentroid(colorfc);
+ interpolateAtCentroid(colorSampIn);
+ interpolateAtCentroid(colorfsi);
+ interpolateAtCentroid(scalarIn);
+ interpolateAtCentroid(sampInArray); // ERROR
+ interpolateAtCentroid(sampInArray[2]);
+ interpolateAtCentroid(sampInArray[2].xy); // ERROR
+
+ interpolateAtSample(sampInArray, 1); // ERROR
+ interpolateAtSample(sampInArray[i], 0);
+ interpolateAtSample(s1.x, 2);
+ interpolateAtSample(scalarIn, 1);
+
+ interpolateAtOffset(sampInArray, vec2(0.2)); // ERROR
+ interpolateAtOffset(sampInArray[2], vec2(0.2));
+ interpolateAtOffset(sampInArray[2].xy, vec2(0.2)); // ERROR, no swizzle
+ interpolateAtOffset(scalarIn + scalarIn, vec2(0.2)); // ERROR, no binary ops other than dereference
+ interpolateAtOffset(s2.x, vec2(0.2)); // ERROR
+
+ float f;
+ interpolateAtCentroid(f); // ERROR, not interpolant
+ interpolateAtSample(outp, 0); // ERROR, not interpolant
+}
+
+uniform sampler1D samp1D;
+uniform isampler2D isamp2D;
+uniform usampler3D usamp3D;
+uniform samplerCube sampCube;
+uniform isampler1DArray isamp1DA;
+uniform usampler2DArray usamp2DA;
+uniform isamplerCubeArray isampCubeA;
+
+uniform sampler1DShadow samp1Ds;
+uniform sampler2DShadow samp2Ds;
+uniform samplerCubeShadow sampCubes;
+uniform sampler1DArrayShadow samp1DAs;
+uniform sampler2DArrayShadow samp2DAs;
+uniform samplerCubeArrayShadow sampCubeAs;
+
+uniform samplerBuffer sampBuf;
+uniform sampler2DRect sampRect;
+
+void qlod()
+{
+ vec2 lod;
+ float pf;
+ vec2 pf2;
+ vec3 pf3;
+
+ lod = textureQueryLod(samp1D, pf);
+ lod = textureQueryLod(isamp2D, pf2);
+ lod = textureQueryLod(usamp3D, pf3);
+ lod = textureQueryLod(sampCube, pf3);
+ lod = textureQueryLod(isamp1DA, pf);
+ lod = textureQueryLod(usamp2DA, pf2);
+ lod = textureQueryLod(isampCubeA, pf3);
+
+ lod = textureQueryLod(samp1Ds, pf);
+ lod = textureQueryLod(samp2Ds, pf2);
+ lod = textureQueryLod(sampCubes, pf3);
+ lod = textureQueryLod(samp1DAs, pf);
+ lod = textureQueryLod(samp2DAs, pf2);
+ lod = textureQueryLod(sampCubeAs, pf3);
+
+ lod = textureQueryLod(sampBuf, pf); // ERROR
+ lod = textureQueryLod(sampRect, pf2); // ERROR
+}
+
+struct SKeyMem { int precise; } KeyMem; // ERROR, keyword can't be a member
+
+uniform uint uu;
+out int iout;
+
+void bitwiseConv()
+{
+ iout = uu & i;
+ iout += uu ^ i;
+ iout += i | uu;
+}
diff --git a/chromium/third_party/glslang/src/Test/400.geom b/chromium/third_party/glslang/src/Test/400.geom
new file mode 100644
index 00000000000..752e0d60b8d
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/400.geom
@@ -0,0 +1,330 @@
+#version 400 core
+
+void main()
+{
+ EmitStreamVertex(1);
+ EndStreamPrimitive(0);
+ EmitVertex();
+ EndPrimitive();
+ int id = gl_InvocationID;
+}
+
+layout(invocations = 4) in outbn { int a; } bn[]; // ERROR, not on a block
+layout(max_vertices = 127) out;
+layout(invocations = 4) in;
+
+#extension GL_ARB_separate_shader_objects : enable
+
+in gl_PerVertex { // testing input arrays with a block redeclaration, see 420.geom for without
+ vec4 gl_Position;
+ layout(std140, location = 3) patch float gl_PointSize; // ERRORs...
+} gl_in[];
+
+void foo()
+{
+ gl_in.length(); // ERROR
+ gl_in[1].gl_Position;
+}
+
+in vec4 color[];
+in vec4 color2[];
+in vec4 colorS[3];
+in vec4 colorBad[4];
+
+void foo2()
+{
+ color.length(); // ERROR
+ colorS.length();
+}
+
+layout(triangles) in; // give ERROR just for colorBad
+
+in vec4 color[3];
+in vec4 color2[3];
+in vec4 colorbad2[2]; // ERROR
+
+void foo3()
+{
+ gl_in.length();
+ color.length();
+ color2.length();
+ colorS.length();
+}
+
+layout(location = 4) in vec4 cva[3];
+layout(location = 5) in vec4 cvb[3];
+layout(location = 2) in mat3 cmc[3]; // ERROR, collision
+
+patch in vec4 patchIn[]; // ERROR
+patch out vec4 patchOut; // ERROR
+
+in float scalar; // ERROR, no array
+
+layout(max_vertices = 127, invocations = 4) out; // ERROR
+layout(invocations = 4, max_vertices = 127) in; // ERROR
+layout(max_vertices = 127, invocations = 4) uniform; // 2 ERRORs
+
+in inblockscalar {
+ int a;
+} inbls; // ERROR, not an array
+
+in inblocka {
+ int a;
+} inbla[17]; // ERROR, wrong array size
+
+void bits()
+{
+ uvec2 u2;
+ u2 = uaddCarry(u2, u2, u2);
+ uint u1;
+ u1 = usubBorrow(u1, u1, u1);
+ uvec4 u4;
+ umulExtended(u4, u4, u4, u4);
+ ivec4 i4;
+ imulExtended(i4, i4, i4, i4);
+ int i1;
+ i1 = bitfieldExtract(i1, 4, 5);
+ uvec3 u3;
+ u3 = bitfieldExtract(u3, 4, 5);
+ ivec3 i3;
+ i3 = bitfieldInsert(i3, i3, 4, 5);
+ u1 = bitfieldInsert(u1, u1, 4, 5);
+ ivec2 i2;
+ i2 = bitfieldReverse(i2);
+ u4 = bitfieldReverse(u4);
+ i1 = bitCount(i1);
+ i3 = bitCount(u3);
+ i2 = findLSB(i2);
+ i4 = findLSB(u4);
+ i1 = findMSB(i1);
+ i2 = findMSB(u2);
+}
+
+layout(location = 7, index = 1) out vec4 indexedOut;
+
+uniform sampler1D samp1D;
+uniform sampler2DShadow samp2Ds;
+
+void qlod()
+{
+ vec2 lod;
+ float pf;
+ vec2 pf2;
+ vec3 pf3;
+
+ lod = textureQueryLod(samp1D, pf); // ERROR, only in fragment
+ lod = textureQueryLod(samp2Ds, pf2); // ERROR, only in fragment
+}
+
+void doubles()
+{
+ double doublev;
+ dvec2 dvec2v;
+ dvec3 dvec3v;
+ dvec4 dvec4v;
+
+ bool boolv;
+ bvec2 bvec2v;
+ bvec3 bvec3v;
+ bvec4 bvec4v;
+
+ doublev = sqrt(2.9);
+ dvec2v = sqrt(dvec2(2.7));
+ dvec3v = sqrt(dvec3(2.0));
+ dvec4v = sqrt(dvec4(2.1));
+
+ doublev += inversesqrt(doublev);
+ dvec2v += inversesqrt(dvec2v);
+ dvec3v += inversesqrt(dvec3v);
+ dvec4v += inversesqrt(dvec4v);
+
+ doublev += abs(doublev);
+ dvec2v += abs(dvec2v);
+ dvec3v += abs(dvec3v);
+ dvec4v += abs(dvec4v);
+
+ doublev += sign(doublev);
+ dvec2v += sign(dvec2v);
+ dvec3v += sign(dvec3v);
+ dvec4v += sign(dvec4v);
+
+ doublev += floor(doublev);
+ dvec2v += floor(dvec2v);
+ dvec3v += floor(dvec3v);
+ dvec4v += floor(dvec4v);
+
+ doublev += trunc(doublev);
+ dvec2v += trunc(dvec2v);
+ dvec3v += trunc(dvec3v);
+ dvec4v += trunc(dvec4v);
+
+ doublev += round(doublev);
+ dvec2v += round(dvec2v);
+ dvec3v += round(dvec3v);
+ dvec4v += round(dvec4v);
+
+ doublev += roundEven(doublev);
+ dvec2v += roundEven(dvec2v);
+ dvec3v += roundEven(dvec3v);
+ dvec4v += roundEven(dvec4v);
+
+ doublev += ceil(doublev);
+ dvec2v += ceil(dvec2v);
+ dvec3v += ceil(dvec3v);
+ dvec4v += ceil(dvec4v);
+
+ doublev += fract(doublev);
+ dvec2v += fract(dvec2v);
+ dvec3v += fract(dvec3v);
+ dvec4v += fract(dvec4v);
+
+ doublev += mod(doublev, doublev);
+ dvec2v += mod(dvec2v, doublev);
+ dvec3v += mod(dvec3v, doublev);
+ dvec4v += mod(dvec4v, doublev);
+ dvec2v += mod(dvec2v, dvec2v);
+ dvec3v += mod(dvec3v, dvec3v);
+ dvec4v += mod(dvec4v, dvec4v);
+
+ doublev += modf(doublev, doublev);
+ dvec2v += modf(dvec2v, dvec2v);
+ dvec3v += modf(dvec3v, dvec3v);
+ dvec4v += modf(dvec4v, dvec4v);
+
+ doublev += min(doublev, doublev);
+ dvec2v += min(dvec2v, doublev);
+ dvec3v += min(dvec3v, doublev);
+ dvec4v += min(dvec4v, doublev);
+ dvec2v += min(dvec2v, dvec2v);
+ dvec3v += min(dvec3v, dvec3v);
+ dvec4v += min(dvec4v, dvec4v);
+
+ doublev += max(doublev, doublev);
+ dvec2v += max(dvec2v, doublev);
+ dvec3v += max(dvec3v, doublev);
+ dvec4v += max(dvec4v, doublev);
+ dvec2v += max(dvec2v, dvec2v);
+ dvec3v += max(dvec3v, dvec3v);
+ dvec4v += max(dvec4v, dvec4v);
+
+ doublev += clamp(doublev, doublev, doublev);
+ dvec2v += clamp(dvec2v, doublev, doublev);
+ dvec3v += clamp(dvec3v, doublev, doublev);
+ dvec4v += clamp(dvec4v, doublev, doublev);
+ dvec2v += clamp(dvec2v, dvec2v, dvec2v);
+ dvec3v += clamp(dvec3v, dvec3v, dvec3v);
+ dvec4v += clamp(dvec4v, dvec4v, dvec4v);
+
+ doublev += mix(doublev, doublev, doublev);
+ dvec2v += mix(dvec2v, dvec2v, doublev);
+ dvec3v += mix(dvec3v, dvec3v, doublev);
+ dvec4v += mix(dvec4v, dvec4v, doublev);
+ dvec2v += mix(dvec2v, dvec2v, dvec2v);
+ dvec3v += mix(dvec3v, dvec3v, dvec3v);
+ dvec4v += mix(dvec4v, dvec4v, dvec4v);
+ doublev += mix(doublev, doublev, boolv);
+ dvec2v += mix(dvec2v, dvec2v, bvec2v);
+ dvec3v += mix(dvec3v, dvec3v, bvec3v);
+ dvec4v += mix(dvec4v, dvec4v, bvec4v);
+
+ doublev += step(doublev, doublev);
+ dvec2v += step(dvec2v, dvec2v);
+ dvec3v += step(dvec3v, dvec3v);
+ dvec4v += step(dvec4v, dvec4v);
+ dvec2v += step(doublev, dvec2v);
+ dvec3v += step(doublev, dvec3v);
+ dvec4v += step(doublev, dvec4v);
+
+ doublev += smoothstep(doublev, doublev, doublev);
+ dvec2v += smoothstep(dvec2v, dvec2v, dvec2v);
+ dvec3v += smoothstep(dvec3v, dvec3v, dvec3v);
+ dvec4v += smoothstep(dvec4v, dvec4v, dvec4v);
+ dvec2v += smoothstep(doublev, doublev, dvec2v);
+ dvec3v += smoothstep(doublev, doublev, dvec3v);
+ dvec4v += smoothstep(doublev, doublev, dvec4v);
+
+ boolv = isnan(doublev);
+ bvec2v = isnan(dvec2v);
+ bvec3v = isnan(dvec3v);
+ bvec4v = isnan(dvec4v);
+
+ boolv = boolv ? isinf(doublev) : false;
+ bvec2v = boolv ? isinf(dvec2v) : bvec2(false);
+ bvec3v = boolv ? isinf(dvec3v) : bvec3(false);
+ bvec4v = boolv ? isinf(dvec4v) : bvec4(false);
+
+ doublev += length(doublev);
+ doublev += length(dvec2v);
+ doublev += length(dvec3v);
+ doublev += length(dvec4v);
+
+ doublev += distance(doublev, doublev);
+ doublev += distance(dvec2v, dvec2v);
+ doublev += distance(dvec3v, dvec3v);
+ doublev += distance(dvec4v, dvec4v);
+
+ doublev += dot(doublev, doublev);
+ doublev += dot(dvec2v, dvec2v);
+ doublev += dot(dvec3v, dvec3v);
+ doublev += dot(dvec4v, dvec4v);
+
+ dvec3v += cross(dvec3v, dvec3v);
+
+ doublev += normalize(doublev);
+ dvec2v += normalize(dvec2v);
+ dvec3v += normalize(dvec3v);
+ dvec4v += normalize(dvec4v);
+
+ doublev += faceforward(doublev, doublev, doublev);
+ dvec2v += faceforward(dvec2v, dvec2v, dvec2v);
+ dvec3v += faceforward(dvec3v, dvec3v, dvec3v);
+ dvec4v += faceforward(dvec4v, dvec4v, dvec4v);
+
+ doublev += reflect(doublev, doublev);
+ dvec2v += reflect(dvec2v, dvec2v);
+ dvec3v += reflect(dvec3v, dvec3v);
+ dvec4v += reflect(dvec4v, dvec4v);
+
+ doublev += refract(doublev, doublev, doublev);
+ dvec2v += refract(dvec2v, dvec2v, doublev);
+ dvec3v += refract(dvec3v, dvec3v, doublev);
+ dvec4v += refract(dvec4v, dvec4v, doublev);
+
+ dmat2 dmat2v = outerProduct(dvec2v, dvec2v);
+ dmat3 dmat3v = outerProduct(dvec3v, dvec3v);
+ dmat4 dmat4v = outerProduct(dvec4v, dvec4v);
+ dmat2x3 dmat2x3v = outerProduct(dvec3v, dvec2v);
+ dmat3x2 dmat3x2v = outerProduct(dvec2v, dvec3v);
+ dmat2x4 dmat2x4v = outerProduct(dvec4v, dvec2v);
+ dmat4x2 dmat4x2v = outerProduct(dvec2v, dvec4v);
+ dmat3x4 dmat3x4v = outerProduct(dvec4v, dvec3v);
+ dmat4x3 dmat4x3v = outerProduct(dvec3v, dvec4v);
+
+ dmat2v *= matrixCompMult(dmat2v, dmat2v);
+ dmat3v *= matrixCompMult(dmat3v, dmat3v);
+ dmat4v *= matrixCompMult(dmat4v, dmat4v);
+ dmat2x3v = matrixCompMult(dmat2x3v, dmat2x3v);
+ dmat2x4v = matrixCompMult(dmat2x4v, dmat2x4v);
+ dmat3x2v = matrixCompMult(dmat3x2v, dmat3x2v);
+ dmat3x4v = matrixCompMult(dmat3x4v, dmat3x4v);
+ dmat4x2v = matrixCompMult(dmat4x2v, dmat4x2v);
+ dmat4x3v = matrixCompMult(dmat4x3v, dmat4x3v);
+
+ dmat2v *= transpose(dmat2v);
+ dmat3v *= transpose(dmat3v);
+ dmat4v *= transpose(dmat4v);
+ dmat2x3v = transpose(dmat3x2v);
+ dmat3x2v = transpose(dmat2x3v);
+ dmat2x4v = transpose(dmat4x2v);
+ dmat4x2v = transpose(dmat2x4v);
+ dmat3x4v = transpose(dmat4x3v);
+ dmat4x3v = transpose(dmat3x4v);
+
+ doublev += determinant(dmat2v);
+ doublev += determinant(dmat3v);
+ doublev += determinant(dmat4v);
+
+ dmat2v *= inverse(dmat2v);
+ dmat3v *= inverse(dmat3v);
+ dmat4v *= inverse(dmat4v);
+}
diff --git a/chromium/third_party/glslang/src/Test/400.tesc b/chromium/third_party/glslang/src/Test/400.tesc
new file mode 100644
index 00000000000..8bfc6979871
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/400.tesc
@@ -0,0 +1,105 @@
+#version 400 core
+
+layout(vertices = 4) out;
+int outa[gl_out.length()];
+
+layout(quads) in; // ERROR
+layout(ccw) out; // ERROR
+layout(fractional_even_spacing) in; // ERROR
+
+patch in vec4 patchIn; // ERROR
+patch out vec4 patchOut;
+
+void main()
+{
+ barrier();
+
+ int a = gl_MaxTessControlInputComponents +
+ gl_MaxTessControlOutputComponents +
+ gl_MaxTessControlTextureImageUnits +
+ gl_MaxTessControlUniformComponents +
+ gl_MaxTessControlTotalOutputComponents;
+
+ vec4 p = gl_in[1].gl_Position;
+ float ps = gl_in[1].gl_PointSize;
+ float cd = gl_in[1].gl_ClipDistance[2];
+
+ int pvi = gl_PatchVerticesIn;
+ int pid = gl_PrimitiveID;
+ int iid = gl_InvocationID;
+
+ gl_out[gl_InvocationID].gl_Position = p;
+ gl_out[gl_InvocationID].gl_PointSize = ps;
+ gl_out[gl_InvocationID].gl_ClipDistance[1] = cd;
+
+ gl_TessLevelOuter[3] = 3.2;
+ gl_TessLevelInner[1] = 1.3;
+
+ if (a > 10)
+ barrier(); // ERROR
+ else
+ barrier(); // ERROR
+
+ barrier();
+
+ do {
+ barrier(); // ERROR
+ } while (a > 10);
+
+ switch (a) {
+ default:
+ barrier(); // ERROR
+ break;
+ }
+ a < 12 ? a : (barrier(), a); // ERROR
+ {
+ barrier();
+ }
+
+ return;
+
+ barrier(); // ERROR
+}
+
+layout(vertices = 4) in; // ERROR
+layout(vertices = 5) out; // ERROR
+
+void foo()
+{
+ gl_out[4].gl_PointSize; // ERROR
+
+ barrier(); // ERROR
+}
+
+in vec2 ina; // ERROR, not array
+in vec2 inb[];
+in vec2 inc[18]; // ERROR, wrong size
+in vec2 ind[gl_MaxPatchVertices];
+
+#extension GL_ARB_separate_shader_objects : enable
+
+layout(location = 3) in vec4 ivla[];
+layout(location = 4) in vec4 ivlb[];
+layout(location = 4) in vec4 ivlc[]; // ERROR, overlapping
+
+layout(location = 3) out vec4 ovla[];
+layout(location = 4) out vec4 ovlb[];
+layout(location = 4) out vec4 ovlc[]; // ERROR, overlapping
+
+precise vec3 pv3;
+
+void foop()
+{
+ precise double d;
+
+ pv3 *= pv3;
+ pv3 = fma(pv3, pv3, pv3);
+ d = fma(d, d, d);
+}
+
+patch out pinbn {
+ int a;
+} pinbi;
+
+invariant precise out vec4 badOrder[]; // ERROR, precise must appear first
+void badp(out precise float f); // ERROR, precise must appear first
diff --git a/chromium/third_party/glslang/src/Test/400.tese b/chromium/third_party/glslang/src/Test/400.tese
new file mode 100644
index 00000000000..7f7792ec9c2
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/400.tese
@@ -0,0 +1,105 @@
+#version 400 core
+
+layout(vertices = 4) out; // ERROR
+layout(quads, cw) in;
+layout(triangles) in; // ERROR
+layout(isolines) in; // ERROR
+
+layout(ccw) in; // ERROR
+layout(cw) in;
+
+layout(fractional_odd_spacing) in;
+layout(equal_spacing) in; // ERROR
+layout(fractional_even_spacing) in; // ERROR
+
+layout(point_mode) in;
+
+patch in vec4 patchIn;
+patch out vec4 patchOut; // ERROR
+
+void main()
+{
+ barrier(); // ERROR
+
+ int a = gl_MaxTessEvaluationInputComponents +
+ gl_MaxTessEvaluationOutputComponents +
+ gl_MaxTessEvaluationTextureImageUnits +
+ gl_MaxTessEvaluationUniformComponents +
+ gl_MaxTessPatchComponents +
+ gl_MaxPatchVertices +
+ gl_MaxTessGenLevel;
+
+ vec4 p = gl_in[1].gl_Position;
+ float ps = gl_in[1].gl_PointSize;
+ float cd = gl_in[1].gl_ClipDistance[2];
+
+ int pvi = gl_PatchVerticesIn;
+ int pid = gl_PrimitiveID;
+ vec3 tc = gl_TessCoord;
+ float tlo = gl_TessLevelOuter[3];
+ float tli = gl_TessLevelInner[1];
+
+ gl_Position = p;
+ gl_PointSize = ps;
+ gl_ClipDistance[2] = cd;
+}
+
+smooth patch in vec4 badp1; // ERROR
+flat patch in vec4 badp2; // ERROR
+noperspective patch in vec4 badp3; // ERROR
+patch sample in vec3 badp4; // ERROR
+
+#extension GL_ARB_separate_shader_objects : enable
+
+in gl_PerVertex // ERROR, no size
+{
+ float gl_ClipDistance[1];
+} gl_in[];
+
+in gl_PerVertex // ERROR, second redeclaration of gl_in
+{
+ float gl_ClipDistance[1];
+} gl_in[];
+
+layout(quads, cw) out; // ERROR
+layout(triangles) out; // ERROR
+layout(isolines) out; // ERROR
+layout(cw) out; // ERROR
+layout(fractional_odd_spacing) out; // ERROR
+layout(equal_spacing) out; // ERROR
+layout(fractional_even_spacing) out; // ERROR
+layout(point_mode) out; // ERROR
+
+in vec2 ina; // ERROR, not array
+in vec2 inb[];
+in vec2 inc[18]; // ERROR, wrong size
+in vec2 ind[gl_MaxPatchVertices];
+
+in testbla {
+ int f;
+} bla; // ERROR, not array
+
+in testblb {
+ int f;
+} blb[];
+
+in testblc {
+ int f;
+} blc[18]; // ERROR wrong size
+
+in testbld {
+ int f;
+} bld[gl_MaxPatchVertices];
+
+layout(location = 23) in vec4 ivla[];
+layout(location = 24) in vec4 ivlb[];
+layout(location = 24) in vec4 ivlc[]; // ERROR
+
+layout(location = 23) out vec4 ovla[2];
+layout(location = 24) out vec4 ovlb[2]; // ERROR
+
+in float gl_TessLevelOuter[4]; // ERROR, can't redeclare
+
+patch in pinbn {
+ int a;
+} pinbi;
diff --git a/chromium/third_party/glslang/src/Test/400.vert b/chromium/third_party/glslang/src/Test/400.vert
new file mode 100644
index 00000000000..2c3dd0424fe
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/400.vert
@@ -0,0 +1,9 @@
+#version 400 core
+
+in double d; // ERROR, no doubles
+in dvec3 d3; // ERROR, no doubles
+in dmat4 dm4; // ERROR, no doubles
+
+void main()
+{
+}
diff --git a/chromium/third_party/glslang/src/Test/410.geom b/chromium/third_party/glslang/src/Test/410.geom
new file mode 100644
index 00000000000..7aadc390199
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/410.geom
@@ -0,0 +1,39 @@
+#version 410 core
+
+void main()
+{
+ gl_ViewportIndex = 7;
+}
+
+in gl_PerVertex {
+ float gl_PointSize;
+} myIn[]; // ERROR, can't redeclare a different name
+
+in gl_PerVertex {
+ float gl_PointSize;
+} gl_myIn[]; // ERROR, can't redeclare a different name
+
+in gl_PerVertex {
+ float gl_PointSize;
+} gl_in[];
+
+in gl_PerVertex {
+ float gl_PointSize;
+} gl_in[]; // ERROR, can't do it again
+
+out gl_PerVertex {
+ float gl_PointSize;
+};
+
+void foo()
+{
+ float p = gl_in[1].gl_PointSize; // use of redeclared
+ gl_PointSize = p; // use of redeclared
+ vec4 v = gl_in[1].gl_Position; // ERROR, not included in the redeclaration
+ gl_Position = vec4(1.0); // ERROR, not included in the redeclaration
+}
+
+float foo5()
+{
+ return 4; // implicit conversion of return type
+}
diff --git a/chromium/third_party/glslang/src/Test/410.tesc b/chromium/third_party/glslang/src/Test/410.tesc
new file mode 100644
index 00000000000..edb2af96b0a
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/410.tesc
@@ -0,0 +1,11 @@
+#version 400 core
+
+// no layout(vertices = ...) out;
+int outa[gl_out.length()]; // ERROR
+
+patch out vec4 patchOut;
+
+void main()
+{
+
+}
diff --git a/chromium/third_party/glslang/src/Test/410.vert b/chromium/third_party/glslang/src/Test/410.vert
new file mode 100644
index 00000000000..0ecf4768ae5
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/410.vert
@@ -0,0 +1,9 @@
+#version 410 core
+
+in double d;
+in dvec3 d3;
+in dmat4 dm4;
+
+void main()
+{
+}
diff --git a/chromium/third_party/glslang/src/Test/420.comp b/chromium/third_party/glslang/src/Test/420.comp
new file mode 100755
index 00000000000..b189310b78f
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/420.comp
@@ -0,0 +1,30 @@
+#version 420
+
+layout(local_size_x = 2) in; // ERROR, no compute
+
+#extension GL_ARB_compute_shader : enable
+
+layout(local_size_x = 2, local_size_y = 4, local_size_z = 6) in;
+
+shared vec3 sfoo;
+
+void main()
+{
+ sfoo = vec3(gl_WorkGroupSize.x, gl_WorkGroupSize.y, gl_WorkGroupSize.z);
+ sfoo += gl_WorkGroupSize + gl_NumWorkGroups + gl_WorkGroupID + gl_LocalInvocationID + gl_GlobalInvocationID;
+ sfoo *= gl_LocalInvocationIndex;
+ sfoo += gl_MaxComputeWorkGroupCount + gl_MaxComputeWorkGroupSize;
+ sfoo *= gl_MaxComputeUniformComponents +
+ gl_MaxComputeTextureImageUnits +
+ gl_MaxComputeImageUniforms +
+ gl_MaxComputeAtomicCounters +
+ gl_MaxComputeAtomicCounterBuffers;
+
+ barrier();
+ memoryBarrier();
+ memoryBarrierAtomicCounter();
+ memoryBarrierBuffer();
+ memoryBarrierImage();
+ memoryBarrierShared();
+ groupMemoryBarrier();
+} \ No newline at end of file
diff --git a/chromium/third_party/glslang/src/Test/420.frag b/chromium/third_party/glslang/src/Test/420.frag
new file mode 100644
index 00000000000..98ddf3d2e52
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/420.frag
@@ -0,0 +1,12 @@
+#version 420 core
+
+layout(depth_any) out float gl_FragDepth;
+layout(depth_greater) out float gl_FragDepth; // ERROR: redeclaration with different qualifier
+
+void main()
+{
+ gl_FragDepth = 0.3;
+}
+
+layout(depth_less) in float depth; // ERROR: depth_less only applies to gl_FragDepth
+layout(depth_any) out float gl_FragDepth; // ERROR, done after use
diff --git a/chromium/third_party/glslang/src/Test/420.geom b/chromium/third_party/glslang/src/Test/420.geom
new file mode 100644
index 00000000000..8195a11a56b
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/420.geom
@@ -0,0 +1,55 @@
+#version 420 core
+
+// testing input arrays without a gl_in[] block redeclaration, see 400.geom for with
+
+int i;
+
+void foo()
+{
+ gl_in.length(); // ERROR
+ gl_in[1].gl_Position;
+ gl_in[i].gl_Position; // ERROR
+}
+
+layout(triangles) in;
+
+in vec4 color3[3];
+
+void foo3()
+{
+ gl_in.length();
+ gl_in[i].gl_Position;
+ color3.length();
+}
+
+uniform sampler2D s2D;
+in vec2 coord[];
+uniform vec4 v4;
+
+void foo4()
+{
+ const ivec2 offsets[5] =
+ {
+ ivec2(0,1),
+ ivec2(1,-2),
+ ivec2(0,3),
+ ivec2(-3,0),
+ ivec2(2,1)
+ };
+
+ vec4 v = textureGatherOffset(s2D, coord[0], offsets[i].xy);
+
+ offsets[i].xy = ivec2(3); // ERROR
+ v4.x = 3.2; // ERROR
+ v4.xy; // should have non-uniform type
+}
+
+out gl_PerVertex {
+ float gl_PointSize[1]; // ERROR, adding array
+ float gl_ClipDistance; // ERROR, removing array
+};
+
+float foo5()
+{
+ return i; // implicit conversion of return type
+}
diff --git a/chromium/third_party/glslang/src/Test/420.tesc b/chromium/third_party/glslang/src/Test/420.tesc
new file mode 100644
index 00000000000..7271d7f91c2
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/420.tesc
@@ -0,0 +1,43 @@
+#version 420 core
+
+#extension GL_ARB_separate_shader_objects : enable
+
+layout(vertices = 4) out;
+
+out gl_PerVertex {
+ vec4 gl_Position;
+} gl_out[3]; // ERROR, wrong size
+
+out int a[gl_out.length()];
+out int outb[5]; // ERROR, wrong size
+out int outc[];
+
+void main()
+{
+ vec4 p = gl_in[1].gl_Position;
+ float ps = gl_in[1].gl_PointSize;
+ float cd = gl_in[1].gl_ClipDistance[2];
+
+ int pvi = gl_PatchVerticesIn;
+ int pid = gl_PrimitiveID;
+ int iid = gl_InvocationID;
+
+ gl_out[gl_InvocationID].gl_Position = p;
+ gl_out[gl_InvocationID].gl_PointSize = ps; // ERROR
+}
+
+out float outf; // ERROR, no array
+
+layout (location = 0) in dmat2x4 vs_tcs_first[];
+layout (location = 12) in dmat2x4 vs_tcs_last[];
+
+void foo()
+{
+ if ((dmat2x4(dvec4(-0.625, -0.5, -0.375lf, -0.25), dvec4(-0.375, -0.25, -0.125, 0)) != vs_tcs_first[0]) ||
+ (dmat2x4(dvec4(0.375, 0.5, 0.625, 0.75), dvec4(0.625, 0.75, 0.875, -0.625)) != vs_tcs_last[0]))
+ {
+ ;
+ }
+}
+
+layout(vertices = 0) out; // ERROR, can't be 0
diff --git a/chromium/third_party/glslang/src/Test/420.tese b/chromium/third_party/glslang/src/Test/420.tese
new file mode 100644
index 00000000000..99c086ae8e9
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/420.tese
@@ -0,0 +1,78 @@
+#version 420 core
+
+const mat2x2 a = mat2( vec2( 1.0, 0.0 ), vec2( 0.0, 1.0 ) );
+mat2x2 b = { vec2( 1.0, 0.0 ), vec2( 0.0, 1.0 ) };
+const mat2x2 c = { { 1.0, 0.0, }, { 0.0, 1.0 } };
+
+float a2[2] = { 3.4, 4.2, 5.0 }; // illegal
+vec2 b2 = { 1.0, 2.0, 3.0 }; // illegal
+mat3x3 c2 = { vec3(0.0), vec3(1.0), vec3(2.0), vec3(3.0) }; // illegal
+mat2x2 d = { 1.0, 0.0, 0.0, 1.0 }; // illegal, can't flatten nesting
+
+struct {
+ float a;
+ int b;
+} e = { 1.2, 2, };
+
+struct {
+ float a;
+ int b;
+} e2 = { 1, 3 }; // legal, first initializer is converted
+
+struct {
+ float a;
+ int b;
+} e3 = { 1.2, 2, 3 }; // illegal
+
+int a3 = true; // illegal
+vec4 b3[2] = { vec4(0.0), 1.0 }; // illegal
+vec4 b4[2] = vec4[2](vec4(0.0), mat2x2(1.0)); // illegal
+mat4x2 c3 = { vec3(0.0), vec3(1.0) }; // illegal
+
+struct S1 {
+ vec4 a;
+ vec4 b;
+};
+
+struct {
+ float s;
+ float t;
+} d2[] = { S1(vec4(0.0), vec4(1.1)) }; // illegal
+
+float b5[] = { 3.4, 4.2, 5.0, 5.2, 1.1 };
+
+struct S3 {
+ float f;
+ mat2x3 m23;
+};
+
+struct S4 {
+ uvec2 uv2;
+ S3 s[2];
+};
+
+const S4 constructed = S4(uvec2(1, 2),
+ S3[2](S3(3.0, mat2x3(4.0)),
+ S3(5.0, mat2x3(6.0))));
+
+const S4 curlybad1 = { {1, 2},
+ { {3, {4.0, 0, 0.0}, {0.0, 4.0, 0.0 } }, // ERROR, the mat2x3 isn't isolated
+ {5.0, {6, 0.0, 0.0}, {0.0, 6.0, 0.0 } } } };
+
+const S4 curlyInit = { {1, 2},
+ { {3, { {4.0, 0, 0.0}, {0.0, 4.0, 0.0 } } },
+ {5.0, { {6, 0.0, 0.0}, {0.0, 6.0, 0.0 } } } } };
+
+float vc1, vc2, vc3;
+vec3 av3 = vec3(vc1, vc2, vc3);
+vec3 bv3 = { vc1, vc2, vc3 };
+
+void main()
+{
+ memoryBarrier();
+
+ if (constructed == curlybad1)
+ ;
+ if (constructed == curlyInit)
+ ;
+}
diff --git a/chromium/third_party/glslang/src/Test/420.vert b/chromium/third_party/glslang/src/Test/420.vert
new file mode 100644
index 00000000000..d3e583cab20
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/420.vert
@@ -0,0 +1,159 @@
+#version 420 core
+#version 420 core
+varying vec2 v2; // ERROR, varying reserved
+in vec4 bad[10];
+highp in vec4 badorder;
+out invariant vec4 badorder2;
+in centroid vec4 badorder4; // ERROR, no centroid input to vertex stage
+out flat vec4 badorder3;
+void bar(in const float a);
+void bar2(highp in float b);
+smooth flat out vec4 rep; // ERROR, replicating interpolation qualification
+centroid sample out vec4 rep2; // ERROR, replicating auxiliary qualification
+in uniform vec4 rep3; // ERROR, replicating storage qualification
+
+int anonconst;
+const int aconst = 5;
+const int a = aconst;
+const int b = anonconst; // ERROR at global scope
+
+const int foo() // ERROR, no const functions
+{
+ const int a = aconst;
+ const int b = anonconst;
+ const int c = a; // still compile-time const
+ const int d = b; // not a compile-time const
+ float x[c]; // okay
+ float y[d]; // ERROR
+
+ return b;
+}
+
+void main()
+{
+ int i;
+ if (i == 3)
+ int j = i;
+ else
+ int k = j; // ERROR, j is undeclared
+ int m = k; // ERROR, k is undeclared
+ int n = j; // ERROR, j is undeclared
+
+ while (true)
+ int jj;
+ int kk = jj; // ERROR, jj is undeclared
+}
+
+const float cx = 4.20;
+const float dx = 4.20;
+
+void bar(in highp volatile vec4 v)
+{
+ int s;
+ s.x; // okay
+ s.y; // ERROR
+ if (bad[0].x == cx.x)
+ ;
+ if (cx.x == dx.x)
+ badorder3 = bad[0];
+
+ float f;
+ vec3 smeared = f.xxx;
+ f.xxxxx; // ERROR
+ f.xxy; // ERROR
+}
+
+layout(binding = 3) uniform; // ERROR
+layout(binding = 3) uniform boundblock { int aoeu; } boundInst;
+layout(binding = 7) uniform anonblock { int aoeu; } ;
+layout(location = 1) in; // ERROR
+layout(binding = 1) in inblock { int aoeua; }; // ERROR
+layout(binding = 100000) uniform anonblock2 { int aooeu; } ;
+layout(binding = 4) uniform sampler2D sampb1;
+layout(binding = 5) uniform sampler2D sampb2[10];
+layout(binding = 80) uniform sampler2D sampb3; // ERROR, binding too big
+layout(binding = 31) uniform sampler2D sampb4;
+layout(binding = 79) uniform sampler2D sampb5[2]; // ERROR, binding too big
+
+int fgfg(float f, mediump int i);
+int fgfg(float f, highp int i);
+
+out gl_PerVertex {
+ float gl_ClipDistance[4];
+};
+
+patch in vec4 patchIn; // ERROR
+patch out vec4 patchOut; // ERROR
+
+void bar23444()
+{
+ mat4x3 m43; \
+ float a1 = m43[3].y;
+ vec3 v3;
+ int a2 = m43.length();
+ a2 += m43[1].length();
+ a2 += v3.length();
+ const float b = 2 * a1;
+ int a = gl_MinProgramTexelOffset + gl_MaxProgramTexelOffset;
+}
+
+const int comma0 = (2, 3); // ERROR
+int comma1[(2, 3)]; // ERROR
+
+layout(r32i) uniform iimage2D iimg2D;
+layout(rgba32i) uniform iimage2D iimg2Drgba;
+layout(rgba32f) uniform image2D img2Drgba;
+layout(r32ui) uniform uimage2D uimg2D;
+uniform image2DMS img2DMS; // ERROR image variables not declared writeonly must have format layout qualifier
+uniform writeonly image2DMS img2DMSWO;
+void qux()
+{
+ int i = aoeu;
+ imageAtomicCompSwap(iimg2D, ivec2(i,i), i, i);
+ imageAtomicAdd(uimg2D, ivec2(i,i), uint(i));
+ imageAtomicMin(iimg2Drgba, ivec2(i,i), i); // ERROR iimg2Drgba does not have r32i layout
+ imageAtomicMax(img2Drgba, ivec2(i,i), i); // ERROR img2Drgba is not integer image
+ ivec4 pos = imageLoad(iimg2D, ivec2(i,i));
+ vec4 col = imageLoad(img2DMS, ivec2(i,i), i);
+ imageStore(img2DMSWO, ivec2(i,i), i, vec4(0));
+ imageLoad(img2DMSWO, ivec2(i,i), i); // ERROR, drops writeonly
+}
+
+volatile float vol; // ERROR, not an image
+readonly int vol2; // ERROR, not an image
+
+void passr(coherent readonly iimage2D image)
+{
+}
+
+layout(r32i) coherent readonly uniform iimage2D qualim1;
+layout(r32i) coherent volatile readonly uniform iimage2D qualim2;
+
+void passrc()
+{
+ passr(qualim1);
+ passr(qualim2); // ERROR, drops volatile
+ passr(iimg2D);
+}
+
+layout(rg8i) uniform uimage2D i1bad; // ERROR, type mismatch
+layout(rgba32i) uniform image2D i2bad; // ERROR, type mismatch
+layout(rgba32f) uniform uimage2D i3bad; // ERROR, type mismatch
+layout(r8_snorm) uniform iimage2D i4bad; // ERROR, type mismatch
+layout(rgba32ui) uniform iimage2D i5bad; // ERROR, type mismatch
+layout(r8ui) uniform iimage2D i6bad; // ERROR, type mismatch
+
+uniform offcheck {
+ layout(offset = 16) int foo; // ERROR
+} offcheckI;
+
+uniform sampler1D samp1D;
+uniform sampler1DShadow samp1Ds;
+
+void qlod()
+{
+ int levels;
+
+ levels = textureQueryLevels(samp1D); // ERROR, not until 430
+ levels = textureQueryLevels(samp1Ds); // ERROR, not until 430
+} \ No newline at end of file
diff --git a/chromium/third_party/glslang/src/Test/420_size_gl_in.geom b/chromium/third_party/glslang/src/Test/420_size_gl_in.geom
new file mode 100644
index 00000000000..0fc1cd96ca3
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/420_size_gl_in.geom
@@ -0,0 +1,21 @@
+#version 420 core
+
+// testing input arrays without a gl_in[] block redeclaration, see 400.geom for with
+
+int i;
+
+layout(triangles) in;
+in vec4 colorun[];
+in vec4 color3[3];
+
+void foo()
+{
+ gl_in.length();
+ gl_in[1].gl_Position;
+ gl_in.length();
+ gl_in[i].gl_Position; // should be sized to 3 by 'triangles'
+}
+
+in gl_PerVertex { // ERROR, already used
+ vec4 gl_Position;
+} gl_in[];
diff --git a/chromium/third_party/glslang/src/Test/430.comp b/chromium/third_party/glslang/src/Test/430.comp
new file mode 100644
index 00000000000..a27fe647e76
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/430.comp
@@ -0,0 +1,87 @@
+#version 430 core
+
+layout(local_size_x = 2) in;
+layout(local_size_x = 16) in; // ERROR, changing
+layout(local_size_z = 4096) in; // ERROR, too large
+layout(local_size_x = 2) in;
+
+const int total = gl_MaxComputeWorkGroupCount.y
+ + gl_MaxComputeUniformComponents
+ + gl_MaxComputeTextureImageUnits
+ + gl_MaxComputeImageUniforms
+ + gl_MaxComputeAtomicCounters
+ + gl_MaxComputeAtomicCounterBuffers;
+
+buffer ShaderStorageBlock
+{
+ int value;
+ float values[];
+};
+
+buffer InvalidShaderStorageBlock
+{
+ float values[];
+ int value;
+} invalid;
+
+void main()
+{
+ barrier();
+ memoryBarrier();
+ memoryBarrierAtomicCounter();
+ memoryBarrierBuffer();
+ memoryBarrierShared();
+ memoryBarrierImage();
+ groupMemoryBarrier();
+ value = int(values[gl_LocalInvocationIndex]);
+
+ int a;
+ if (a > 10)
+ barrier();
+}
+
+layout(location = 2) in vec3 v3; // ERROR
+in float f; // ERROR
+out float fo; // ERROR
+
+shared vec4 s;
+layout(location = 2) shared vec4 sl; // ERROR
+shared float fs = 4.2; // ERROR
+
+layout(local_size_x = 2, local_size_y = 3, local_size_z = 4) out; // ERROR
+
+int arrX[gl_WorkGroupSize.x];
+int arrY[gl_WorkGroupSize.y];
+int arrZ[gl_WorkGroupSize.z];
+
+readonly buffer roblock
+{
+ int value;
+ float values[];
+} ro;
+
+void foo()
+{
+ ro.values[2] = 4.7; // ERROR, readonly
+ ro.values.length();
+ barrier();
+}
+
+uniform double roll;
+uniform writeonly image2D destTex;
+void fooaoeu() {
+ ivec2 storePos = ivec2(gl_GlobalInvocationID.xy);
+ double localCoef = length(vec2(ivec2(gl_LocalInvocationID.xy)-8)/8.0);
+ dvec4 aa = dvec4(0.4, 0.2, 0.3, 0.4);
+ double globalCoef = 1.0;
+ int i = globalCoef; // ERROR, can't convert from double to int
+ double di = i;
+}
+
+in inb { // ERROR
+ int a;
+} inbi;
+
+out outb { // ERROR
+ int a;
+} outbi;
diff --git a/chromium/third_party/glslang/src/Test/430.vert b/chromium/third_party/glslang/src/Test/430.vert
new file mode 100644
index 00000000000..13d180639e2
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/430.vert
@@ -0,0 +1,223 @@
+#version 430 core
+
+layout(location = 3) vec4 v4; // ERROR
+
+layout(location = 4) uniform vec4 uv4;
+
+layout(location = 2) in inb1 { vec4 v; } b1; // ERROR
+layout(location = 2) out outb1 { vec4 v; } b2; // ERROR
+
+out gl_PerVertex {
+ float gl_ClipDistance[];
+};
+
+void foo()
+{
+ gl_ClipDistance[2] = 3.7;
+}
+
+struct sp {
+ highp float f;
+ in float g; // ERROR
+ uniform float h; // ERROR
+ invariant float i; // ERROR
+ volatile float j; // ERROR
+ layout(row_major) mat3 m3; // ERROR
+};
+
+void foo3(invariant vec4 v4, // ERROR
+ volatile vec3 v3,
+ layout(location = 3) vec2 v2, // ERROR
+ centroid vec3 cv3) // ERROR
+{
+}
+
+struct S {
+ mat3x2 m[7]; // needs 7*3 locations
+ float f; // needs 1 location
+}; // needs 22 locations
+
+layout(location = 10) out S cs[2]; // 10 through 10 + 2 * 22 - 1 = 53
+layout(location = 54) out float cf;
+layout(location = 53) out float cg; // ERROR, collision at 31
+
+layout(location = 10) in vec4 alias1;
+layout(location = 10) in vec4 alias2; // okay for vertex input on desktop
+
+out float gl_ClipDistance[17]; // ERROR, size too big
+
+// enhanced_layouts (most tests are in 440.*)
+
+layout(location = start*start - 2 - 4) in vec4 v6e; // ERROR
+
+layout(location = 28) in inblock2e {
+ layout(location = 25) float f2; // ERROR
+} ininst2e;
+
+in ublock4e {
+ layout(location = 50) float f1; // ERROR
+ layout(location = 51) float f2; // ERROR
+} in4e;
+
+layout(align=16, std140) uniform ubl4e { int a; } inst4e;// ERROR
+
+layout(align=32) uniform ubl9e { // ERROR
+ layout(offset=12, align=4) float f; // ERROR
+ layout(offset=20) float g; // ERROR
+} inst9e;
+
+layout(std140) uniform blocke {
+ vec4 a;
+ layout(offset = 32) vec3 b; // ERROR
+} spinste;
+
+int aconste[gl_MaxTransformFeedbackBuffers]; // ERROR
+int bconste[gl_MaxTransformFeedbackInterleavedComponents]; // ERROR
+
+out bblck2 {
+ layout(xfb_offset=64) vec4 bbv; // ERROR
+} bbinst2;
+
+layout(xfb_buffer = 3, xfb_stride = 64) out; // ERROR
+
+layout(xfb_buffer=2, xfb_offset=48, xfb_stride=80) out vec4 bge; // ERROR
+layout( xfb_offset=32, xfb_stride=64) out vec4 bhe; // ERROR
+
+layout(xfb_stride=80, xfb_buffer=2, xfb_offset=16) out bblck4e { // ERROR
+ vec4 bbv1;
+ vec4 bbv2;
+} bbinst4e;
+
+out bblck5e {
+ layout(xfb_offset=0) vec4 bbv1; // ERROR
+ layout(xfb_stride=64, xfb_buffer=3, xfb_offset=48) vec4 bbv2; // ERROR
+} bbinst5e;
+
+#extension GL_ARB_enhanced_layouts : enable
+
+layout(align=16, std140) uniform ubl4 { int a; } inst4;
+layout(std430) uniform;
+
+layout(align=32) uniform ubl9 {
+ layout(offset=12, align=4) float f;
+ layout(offset=20) float g;
+} inst9;
+
+layout(std140) uniform block {
+ vec4 a; // a takes offsets 0-15
+ layout(offset = 32) vec3 b; // b takes offsets 32-43
+} spinst;
+
+int aconst[gl_MaxTransformFeedbackBuffers];
+int bconst[gl_MaxTransformFeedbackInterleavedComponents];
+
+const int start2 = 5;
+layout(location = start2 * start2 - 2 - 4) in vec4 v6;
+
+layout(location = 28) in inblock2 { // ERROR, input block in vertex shader, other errors are valid checks still...
+ bool b1;
+ float f1;
+ layout(location = 25) float f2;
+} ininst2;
+
+in ublock4 { // ERROR, input block in vertex shader, other errors are valid checks still...
+ layout(location = 50) float f1;
+ layout(location = 51) float f2;
+} in4;
+
+out bblck2g {
+ layout(xfb_offset=64) vec4 bbv;
+} bbinst2g;
+
+layout(xfb_buffer = 1, xfb_stride = 80) out; // default buffer is 3
+
+layout(xfb_buffer=1, xfb_offset=48, xfb_stride=80) out vec4 bg;
+layout( xfb_offset=32, xfb_stride=80) out vec4 bh;
+
+layout(xfb_stride=80, xfb_buffer=1, xfb_offset=16) out bblck4 {
+ vec4 bbv1;
+} bbinst4;
+
+out bblck5 {
+ layout(xfb_offset=0) vec4 bbv1;
+ layout(xfb_stride=80, xfb_buffer=1, xfb_offset=64) vec4 bbv2;
+} bbinst5;
+
+shared vec4 sharedv; // ERROR
+
+void fooBarrier()
+{
+ barrier(); // ERROR
+ memoryBarrier();
+ memoryBarrierAtomicCounter();
+ memoryBarrierBuffer();
+ memoryBarrierShared(); // ERROR
+ memoryBarrierImage();
+ groupMemoryBarrier(); // ERROR
+}
+
+buffer vec4 v; // ERROR
+
+uniform sampler2DMS s2dms;
+uniform usampler2DMSArray us2dmsa;
+layout(rgba32i) uniform iimage2DMS ii2dms;
+layout(rgba32f) uniform image2DMSArray i2dmsa;
+
+void fooq()
+{
+ int s = textureSamples(s2dms); // ERROR
+ s += textureSamples(us2dmsa); // ERROR
+ s += imageSamples(ii2dms); // ERROR
+ s += imageSamples(i2dmsa); // ERROR
+}
+
+#extension GL_ARB_shader_texture_image_samples : enable
+
+void fooq2()
+{
+ int s = textureSamples(s2dms);
+ s += textureSamples(us2dmsa);
+ s += imageSamples(ii2dms);
+ s += imageSamples(i2dmsa);
+}
+
+uniform sampler1D samp1D;
+uniform usampler2D usamp2D;
+uniform isampler3D isamp3D;
+uniform isamplerCube isampCube;
+uniform isampler1DArray isamp1DA;
+uniform sampler2DArray samp2DA;
+uniform usamplerCubeArray usampCubeA;
+
+uniform sampler1DShadow samp1Ds;
+uniform sampler2DShadow samp2Ds;
+uniform samplerCubeShadow sampCubes;
+uniform sampler1DArrayShadow samp1DAs;
+uniform sampler2DArrayShadow samp2DAs;
+uniform samplerCubeArrayShadow sampCubeAs;
+
+uniform samplerBuffer sampBuf;
+uniform sampler2DRect sampRect;
+
+void qlod()
+{
+ int levels;
+
+ levels = textureQueryLevels(samp1D);
+ levels = textureQueryLevels(usamp2D);
+ levels = textureQueryLevels(isamp3D);
+ levels = textureQueryLevels(isampCube);
+ levels = textureQueryLevels(isamp1DA);
+ levels = textureQueryLevels(samp2DA);
+ levels = textureQueryLevels(usampCubeA);
+
+ levels = textureQueryLevels(samp1Ds);
+ levels = textureQueryLevels(samp2Ds);
+ levels = textureQueryLevels(sampCubes);
+ levels = textureQueryLevels(samp1DAs);
+ levels = textureQueryLevels(samp2DAs);
+ levels = textureQueryLevels(sampCubeAs);
+
+ levels = textureQueryLevels(sampBuf); // ERROR
+ levels = textureQueryLevels(sampRect); // ERROR
+}
diff --git a/chromium/third_party/glslang/src/Test/430AofA.frag b/chromium/third_party/glslang/src/Test/430AofA.frag
new file mode 100644
index 00000000000..c081ea80023
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/430AofA.frag
@@ -0,0 +1,108 @@
+#version 430
+
+float[4][5][6] many[1][2][3];
+
+float gu[][7];
+float gimp[][]; // ERROR, implicit inner
+float g4[4][7];
+float g5[5][7];
+
+float[4][7] foo(float a[5][7])
+{
+ float r[7];
+ r = a[2];
+ float[](a[0], a[1], r, a[3]); // ERROR, too few dims
+ float[4][7][4](a[0], a[1], r, a[3]); // ERROR, too many dims
+ return float[4][7](a[0], a[1], r, a[3]);
+ return float[][](a[0], a[1], r, a[3]);
+ return float[][7](a[0], a[1], a[2], a[3]);
+}
+
+void bar(float[5][7]) {}
+
+void main()
+{
+ {
+ float gu[3][4][2];
+
+ gu[2][4][1] = 4.0; // ERROR, overflow
+ }
+ vec4 ca4[3][2] = vec4[][](vec4[2](vec4(0.0), vec4(1.0)),
+ vec4[2](vec4(0.0), vec4(1.0)),
+ vec4[2](vec4(0.0), vec4(1.0)));
+ vec4 caim[][2] = vec4[][](vec4[2](vec4(4.0), vec4(2.0)),
+ vec4[2](vec4(4.0), vec4(2.0)),
+ vec4[2](vec4(4.0), vec4(2.0)));
+ vec4 caim2[][] = vec4[][](vec4[2](vec4(4.0), vec4(2.0)),
+ vec4[2](vec4(4.0), vec4(2.0)),
+ vec4[2](vec4(4.0), vec4(2.0)));
+ vec4 caim3[3][] = vec4[][](vec4[2](vec4(4.0), vec4(2.0)),
+ vec4[2](vec4(4.0), vec4(2.0)),
+ vec4[2](vec4(4.0), vec4(2.0)));
+
+ vec4 a4[3][2] = {vec4[](vec4(0.0), vec4(1.0)),
+ vec4[2](vec4(0.0), vec4(1.0)),
+ vec4[2](vec4(0.0), vec4(1.0)) };
+ vec4 aim[][2] = {vec4[2](vec4(4.0), vec4(2.0)),
+ vec4[](vec4(4.0), vec4(2.0)),
+ vec4[2](vec4(4.0), vec4(2.0)) };
+ vec4 aim2[][] = {vec4[2](vec4(4.0), vec4(2.0)),
+ vec4[2](vec4(4.0), vec4(2.0)),
+ vec4[](vec4(4.0), vec4(2.0)) };
+ vec4 aim3[3][] = {vec4[2](vec4(4.0), vec4(2.0)),
+ vec4[2](vec4(4.0), vec4(2.0)),
+ vec4[2](vec4(4.0), vec4(2.0)) };
+
+ vec4 bad2[3][] = {vec4[2](vec4(4.0), vec4(2.0)), // ERROR
+ vec4[3](vec4(4.0), vec4(2.0), vec4(5.0)),
+ vec4[2](vec4(4.0), vec4(2.0)) };
+
+ vec4 bad3[3][] = {vec4[3](vec4(4.0), vec4(2.0), vec4(5.0)), // ERROR
+ vec4[2](vec4(4.0), vec4(2.0)),
+ vec4[2](vec4(4.0), vec4(2.0)) };
+
+ vec4 bad4[4][] = {vec4[2](vec4(4.0), vec4(2.0)), // ERROR
+ vec4[2](vec4(4.0), vec4(2.0)),
+ vec4[2](vec4(4.0), vec4(2.0)) };
+
+
+ g4 = foo(g5);
+ g5 = g4; // ERROR, wrong types
+ gu = g4; // ERROR, not yet sized
+
+ foo(gu); // ERROR, not yet sized
+ bar(g5);
+
+ if (foo(g5) == g4)
+ ;
+ if (foo(g5) == g5) // ERROR, different types
+ ;
+
+ float u[][7];
+ u[2][2] = 3.0;
+ float u[5][7];
+ u[5][2] = 5.0; // ERROR
+ foo(u);
+}
+
+void foo3()
+{
+ float resize1[][5][7];
+ resize1.length(); // ERROR
+ resize1[1][4][5] = 2.0;
+ resize1.length(); // ERROR
+ float resize1[3][5][7];
+ resize1.length(); // 3 in AST
+ resize1[1].length(); // 5 in AST
+ resize1[1][1].length(); // 7 in AST
+ resize1[1][1][1].length(); // ERROR
+
+ float resize2[][5][7];
+ float resize2[3][4][7]; // ERROR, inner dim change
+
+ float resize3[][5][7];
+ float resize3[3][5][9]; // ERROR, inner dim changed
+
+ float resize4[][5][7];
+ int resize4[3][5][7]; // ERROR, element type
+}
diff --git a/chromium/third_party/glslang/src/Test/430scope.vert b/chromium/third_party/glslang/src/Test/430scope.vert
new file mode 100644
index 00000000000..7efa1623d60
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/430scope.vert
@@ -0,0 +1,74 @@
+#version 430 core
+
+int f(int a, int b, int c)
+{
+ int a = b; // ERROR, redefinition
+
+ {
+ float a = float(a) + 1.0; // okay
+ }
+
+ return a;
+}
+
+int f(int a, int b, int c); // okay to redeclare
+
+bool b;
+float b(int a); // ERROR: redefinition
+
+float c(int a);
+bool c; // ERROR: redefinition
+
+float f; // ERROR: redefinition
+float tan; // okay, hides built-in function
+float sin(float x); // okay, can redefine built-in functions
+float cos(float x) // okay, can redefine built-in functions
+{
+ return 1.0;
+}
+bool radians(bool x) // okay, can overload built-in functions
+{
+ return true;
+}
+
+invariant gl_Position;
+
+void main()
+{
+ int g(); // okay
+ g();
+
+ float sin; // okay
+ sin;
+ sin(0.7); // ERROR, use of hidden function
+ f(1,2,3);
+
+ float f; // hides f()
+ f = 3.0;
+
+ gl_Position = vec4(f);
+
+ for (int f = 0; f < 10; ++f)
+ ++f;
+
+ int x = 1;
+ {
+ float x = 2.0, /* 2nd x visible here */ y = x; // y is initialized to 2
+ int z = z; // ERROR: z not previously defined.
+ }
+ {
+ int x = x; // x is initialized to '1'
+ }
+
+ struct S
+ {
+ int x;
+ };
+ {
+ S S = S(0); // 'S' is only visible as a struct and constructor
+ S.x; // 'S' is now visible as a variable
+ }
+
+ int degrees;
+ degrees(3.2); // ERROR, use of hidden built-in function
+}
diff --git a/chromium/third_party/glslang/src/Test/440.frag b/chromium/third_party/glslang/src/Test/440.frag
new file mode 100644
index 00000000000..143c0caad8d
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/440.frag
@@ -0,0 +1,153 @@
+#version 440
+
+// Note 'location'-only tests for enhanced layouts are in 330.frag
+// Generic 'component' tests are in 440.vert
+
+// a consumes components 2 and 3 of location 4
+layout(location = 4, component = 2) in vec2 a;
+
+// b consumes component 1 of location 4
+layout(location = 4, component = 1) in float b;
+layout(location = 4, component = 2) in vec2 h; // ERROR, component overlap not okay for fragment in
+
+layout(location = 3, component = 2) in vec3 c; // ERROR: c overflows components 2 and 3
+
+// e consumes beginning (components 0, 1 and 2) of each of 6 slots
+layout(location = 20, component = 0) in vec3 e[6];
+
+// f consumes last component of the same 6 slots
+layout(location = 20, component = 3) in float f[6];
+
+layout(location = 30, component = 3) out int be;
+layout(location = 30, component = 0) out vec3 bf; // ERROR, not the same basic type
+
+writeonly uniform; // ERROR
+readonly in; // ERROR
+flat out; // ERROR
+mediump uniform;
+
+layout(offset=12) uniform; // ERROR
+layout(offset=12) in; // ERROR
+layout(offset=12) out; // ERROR
+
+layout(align=16) uniform; // ERROR
+layout(align=16) in; // ERROR
+layout(align=16) out; // ERROR
+
+layout(offset=12) uniform ubl1 { int a; } inst1; // ERROR
+layout(offset=12) in inbl2 { int a; } inst2; // ERROR
+layout(offset=12) out inbl3 { int a; } inst3; // ERROR
+
+layout(align=16, std140) uniform ubl4 { int a; } inst4;
+layout(align=16) uniform ubl8 { int a; } inst8; // ERROR, no packing
+layout(align=16) in inbl5 { int a; } inst5; // ERROR
+layout(align=16) out inbl6 { int a; } inst6; // ERROR
+
+layout(offset=12) uniform vec4 v1; // ERROR
+layout(offset=12) in vec4 v2; // ERROR
+layout(offset=12) out vec4 v3; // ERROR
+
+layout(align=16) uniform vec4 v4; // ERROR
+layout(align=16) in vec4 v5; // ERROR
+layout(align=16) out vec4 v6; // ERROR
+
+layout(std140) in; // ERROR
+layout(std140) uniform vec4 v7; // ERROR
+
+layout(align=48) uniform ubl7 { // ERROR, not power of 2
+ layout(offset=12, align=4) float f; // ERROR, no packing
+} inst7;
+
+in ibl10 {
+ layout(offset=12) float f; // ERROR
+ layout(align=4) float g; // ERROR
+} inst10;
+
+layout(std430) uniform;
+
+layout(align=32) uniform ubl9 {
+ float e;
+ layout(offset=12, align=4) float f;
+ layout(offset=20) float g;
+ float h;
+} inst9;
+
+uniform ubl11 {
+ layout(offset=12, align=4) float f;
+ float g;
+} inst11;
+
+layout(std140) uniform block {
+ vec4 a; // a takes offsets 0-15
+ layout(offset = 32) vec3 b; // b takes offsets 32-43
+ layout(offset = 40) vec2 c; // ERROR, lies within previous member
+ layout(align = 6) double g; // ERROR, 6 is not a power of 2
+ layout(offset=68) double h; // ERROR, offset not aligned
+} specExampleErrors;
+
+layout(std140) uniform block2 {
+ vec4 a; // a takes offsets 0-15
+ layout(offset = 32) vec3 b; // b takes offsets 32-43
+ layout(offset = 48) vec2 d; // d takes offsets 48-55
+ layout(align = 16) float e; // e takes offsets 64-67
+ layout(align = 2) double f; // f takes offsets 72-79
+ layout(offset = 80) float h; // h takes offsets 80-83
+ layout(align = 64) dvec3 i; // i takes offsets 128-151
+ layout(offset = 164, align = 8) float j; // j takes offsets 168-171
+} specExample;
+
+layout(std430) buffer block430 {
+ vec4 a; // a takes offsets 0-15
+ layout(offset = 32) vec3 b; // b takes offsets 32-43
+ layout(offset = 40) vec2 c; // ERROR, lies within previous member
+ layout(align = 6) double g; // ERROR, 6 is not a power of 2
+ layout(offset=68) double h; // ERROR, offset not aligned
+ layout(align = 0) double i; // ERROR, 0 not a power of 2
+} specExampleErrors430;
+
+layout(std430) buffer block2430 {
+ vec4 a; // a takes offsets 0-15
+ layout(offset = 32) vec3 b; // b takes offsets 32-43
+ layout(offset = 48) vec2 d; // d takes offsets 48-55
+ layout(align = 16) float e; // e takes offsets 64-67
+ layout(align = 2) double f; // f takes offsets 72-79
+ layout(offset = 80) float h; // h takes offsets 80-83
+ layout(align = 64) dvec3 i; // i takes offsets 128-151
+ layout(offset = 164, align = 8) float j; // j takes offsets 168-171
+} specExample430;
+
+layout(std430, align = 128) buffer block24300 {
+ vec4 a;
+ vec3 b;
+ vec2 d;
+ float e;
+ double f;
+ float h;
+ dvec3 i;
+} specExample4300;
+
+layout(std430, align = 128) buffer block24301 {
+ vec4 a;
+ vec3 b;
+ vec2 d;
+ layout(offset=388) float e;
+ layout(align=8) double f;
+ float h;
+ dvec3 i;
+} specExample4301;
+
+int aconst[gl_MaxTransformFeedbackBuffers];
+int bconst[gl_MaxTransformFeedbackInterleavedComponents];
+
+sample in vec3 sampInArray[4];
+
+void interp()
+{
+ interpolateAtCentroid(sampInArray[2].xy);
+ interpolateAtSample(sampInArray[2].x.x, 2);
+}
+
+int layer()
+{
+ return gl_Layer;
+}
diff --git a/chromium/third_party/glslang/src/Test/440.vert b/chromium/third_party/glslang/src/Test/440.vert
new file mode 100644
index 00000000000..d0a055dae97
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/440.vert
@@ -0,0 +1,177 @@
+#version 440
+
+// Note 'location' tests for enhanced layouts are in 330.frag
+
+layout(location = 2, component = 2) in vec2 a;
+layout(location = 2, component = 1) in float b;
+
+layout(location = 3, component = 2) in vec3 c; // ERROR: c overflows components 2 and 3
+
+layout(location = 0, component = 3) in float d[4];
+
+layout(location = 4, component = 0) in vec3 e[5];
+layout(location = 4, component = 3) in float f[5];
+
+layout(location = 9, component = 4) in float g[6]; // ERROR, component too big
+
+layout(location = 4, component = 2) in vec2 h; // component overlap okay for vertex in
+
+layout(location = 3, component = 2) out vec2 i;
+layout(location = 3, component = 0) out vec2 j;
+
+layout(location = 4, component = 2) out vec2 k;
+layout(location = 4, component = 2) out vec2 m; // ERROR, component overlap
+
+layout(location = 2, component = 2) out vec2 n;
+layout(location = 2, component = 0) out vec3 p; // ERROR, component overlap
+
+layout(location = 10, component = 3) out float q[6];
+layout(location = 10, component = 0) out vec3 r[6];
+
+layout(location = 15, component = 3) out float s; // ERROR, overlap
+layout(location = 10, component = 1) out float t; // ERROR, overlap
+
+layout(location = 20, component = 2) out float u;
+layout(location = 20, component = 0) out float v;
+layout(location = 20, component = 3) out float w;
+layout(location = 20, component = 1) out vec2 x; // ERROR, overlap
+
+layout(location = 30, component = 3) out vec2 y; // ERROR, goes to component 4
+layout(location = 31, component = 1) out vec4 z; // ERROR, goes to component 4
+
+layout(location = 32, component = 1) out mat4 ba; // ERROR
+layout(location = 33, component = 1) out struct S {int a;} Ss; // ERROR
+layout(location = 34, component = 1) out bn { int a;} bb; // ERROR
+
+layout(component = 1) out float bc; // ERROR, no location
+
+out blockname {
+ layout(location = 40, component = 2) out float u;
+ layout(location = 40, component = 0) out float v;
+ layout(location = 40, component = 3) out float w;
+ layout(location = 40, component = 1) out vec2 x; // ERROR, overlap
+
+ layout(location = 41, component = 3) out vec2 y; // ERROR, goes to component 4
+ layout(location = 42, component = 1) out vec4 z; // ERROR, goes to component 4
+
+ layout(location = 42, component = 1) out mat4 ba; // ERROR
+ layout(location = 43, component = 1) out S Ss; // ERROR
+} bd;
+
+layout(location = 1, component = 1) out; // ERROR, no global setting
+
+layout(location = 50, component = 3) out int be;
+layout(location = 50, component = 0) out vec3 bf;
+
+out bblck1 {
+ vec4 bbv;
+} bbinst1;
+
+out bblck2 {
+ layout(xfb_offset=64) vec4 bbv;
+} bbinst2;
+
+layout(xfb_buffer = 3, xfb_stride = 64) out; // default buffer is 3
+
+out bblck3 {
+ layout(xfb_offset=16) vec4 bbv; // in xfb_buffer 3
+} bbinst3;
+
+uniform ubblck3 {
+ layout(xfb_offset=16) vec4 bbv; // ERROR, not in a uniform
+} ubbinst3;
+
+layout(xfb_buffer=2, xfb_offset=48, xfb_stride=80) out vec4 bg;
+layout( xfb_offset=32, xfb_stride=64) out vec4 bh;
+
+layout(xfb_offset=48) out; // ERROR
+
+layout(xfb_stride=80, xfb_buffer=2, xfb_offset=16) out bblck4 {
+ vec4 bbv1;
+ vec4 bbv2;
+} bbinst4;
+
+out bblck5 {
+ layout(xfb_offset=0) vec4 bbv1;
+ layout(xfb_stride=64, xfb_buffer=3, xfb_offset=48) vec4 bbv2;
+ layout(xfb_buffer=2) vec4 bbv3; // ERROR, wrong buffer
+} bbinst5;
+
+out layout(xfb_buffer=2) bblck6 {
+ layout(xfb_offset=0) vec4 bbv1;
+ layout(xfb_stride=64, xfb_buffer=3, xfb_offset=32) vec4 bbv2; // ERROR, overlap 32 from bh, and buffer contradiction
+ layout(xfb_buffer=2, xfb_offset=0) vec4 bbv3; // ERROR, overlap 0 from bbinst5
+ layout(xfb_buffer=2) vec4 bbv5;
+ layout(xfb_offset=24) float bbf6; // ERROR, overlap 24 from bbv1 in bbinst4
+} bbinst6;
+
+layout(xfb_stride=48) out; // ERROR, stride of buffer 3
+
+layout(xfb_buffer=1) out; // default buffer is 1
+layout(xfb_offset=4) out float bj;
+layout(xfb_offset=0) out ivec2 bk; // ERROR, overlap 4
+
+layout(xfb_buffer=3, xfb_stride=48) out; // ERROR, stride of buffer 3 (default is now 3)
+layout(xfb_stride=48) out float bl; // ERROR, stride of buffer 3
+
+layout(xfb_stride=48) out bblck7 { // ERROR, stride of buffer 3
+ layout(xfb_stride=64) vec4 bbv1;
+ layout(xfb_stride=32) vec4 bbv2; // ERROR, stride of buffer 3
+} bbinst7;
+
+struct S5 {
+ int i; // 4 bytes plus 4 byte hole
+ double d; // 8 bytes
+ float f; // 4 bytes
+}; // total size = 20
+
+struct T {
+ bool b; // 4 plus 4 byte hole
+ S5 s; // 20
+ vec2 v2; // 8
+}; // total size = 36
+
+out layout(xfb_buffer=0, xfb_offset=0, xfb_stride=92) bblck8 { // ERROR, stride not multiple of 8
+ bool b; // offset 0
+ T t; // offset 8, size 40
+ int i; // offset 40 + 4 = 48
+ mat3x3 m3; // offset 52
+ float f; // offset 52 + 9*4 = 88
+ float g; // ERROR, overflow stride
+} bbinst8;
+
+out layout(xfb_buffer=4) bblck9 {
+ layout(xfb_offset=1) bool b; // ERROR
+ layout(xfb_offset=12) T t; // ERROR
+ layout(xfb_offset=52) mat3x3 m3; // non-multiple of 8 okay
+ layout(xfb_offset=90) int i; // ERROR
+ layout(xfb_offset=98) double d; // ERROR
+ layout(xfb_offset=108) S s; // non-multiple of 8 okay
+} bbinst9;
+
+layout(xfb_buffer=5, xfb_stride=6) out; // link ERROR, stride not multiple of 4
+layout(xfb_offset=0) out float bm;
+
+layout(xfb_buffer=6, xfb_stride=2000) out; // ERROR, stride too big
+
+out layout(xfb_buffer=7, xfb_offset=0) bblck10 { // link ERROR, implicit stride too big
+ dmat4x4 m1;
+ dmat4x4 m2;
+ float f;
+} bbinst10;
+
+int drawParamsBad()
+{
+ return gl_BaseVertexARB + gl_BaseInstanceARB + gl_DrawIDARB; // ERROR, extension not requested
+}
+
+#extension GL_ARB_shader_draw_parameters: enable
+
+int drawParams()
+{
+ return gl_BaseVertexARB + gl_BaseInstanceARB + gl_DrawIDARB;
+ gl_BaseVertexARB = 3; // ERROR, can't write to shader 'in'
+ gl_BaseInstanceARB = 3; // ERROR, can't write to shader 'in'
+ gl_DrawIDARB = 3; // ERROR, can't write to shader 'in'
+ glBaseInstanceARB; // ERROR, not defined
+}
diff --git a/chromium/third_party/glslang/src/Test/450.comp b/chromium/third_party/glslang/src/Test/450.comp
new file mode 100644
index 00000000000..4872fb92a0a
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/450.comp
@@ -0,0 +1 @@
+#version 450 core
diff --git a/chromium/third_party/glslang/src/Test/450.frag b/chromium/third_party/glslang/src/Test/450.frag
new file mode 100644
index 00000000000..e9c67466f26
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/450.frag
@@ -0,0 +1,56 @@
+#version 450 core
+
+in float in1;
+in vec2 in2;
+in vec3 in3;
+in vec4 in4;
+
+void main()
+{
+ vec2 v2 = dFdxFine(in2);
+ vec3 v3 = dFdyCoarse(in3);
+ vec4 v4 = fwidth(in4);
+ v4 = dFdyFine(in4);
+ v3 = dFdyFine(in3);
+ float f = dFdx(in1) + dFdxFine(in1) + dFdxCoarse(in1);
+ v4 = fwidthCoarse(in4) + fwidthFine(in4);
+
+ float cull = gl_CullDistance[2];
+ float consts = gl_MaxCullDistances + gl_MaxCombinedClipAndCullDistances + gl_MaxSamples;
+
+ if (gl_HelperInvocation)
+ ++v4;
+
+ int sum = gl_MaxVertexImageUniforms +
+ gl_MaxFragmentImageUniforms +
+ gl_MaxComputeImageUniforms +
+ gl_MaxCombinedImageUniforms +
+ gl_MaxCombinedShaderOutputResources;
+
+ bool b1, b3, b;
+ uint uin;
+ bvec2 b2 = mix(bvec2(b1), bvec2(b3), bvec2(b));
+ uint um = mix(uin, uin, b);
+ ivec3 im3 = mix(ivec3(uin), ivec3(uin), bvec3(b));
+}
+
+uniform sampler2DMS s2dms;
+uniform usampler2DMSArray us2dmsa;
+layout(rgba32i) uniform iimage2DMS ii2dms;
+layout(rgba32f) uniform image2DMSArray i2dmsa;
+
+void foo()
+{
+ int s = textureSamples(s2dms);
+ s += textureSamples(us2dmsa);
+ s += imageSamples(ii2dms);
+ s += imageSamples(i2dmsa);
+ float f = imageAtomicExchange(i2dmsa, ivec3(in3), 2, 4.5);
+}
+
+in float gl_CullDistance[6];
+
+float cull(int i)
+{
+ return (i >= 6) ? gl_CullDistance[5] : gl_CullDistance[i];
+}
diff --git a/chromium/third_party/glslang/src/Test/450.geom b/chromium/third_party/glslang/src/Test/450.geom
new file mode 100644
index 00000000000..a74a9f99479
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/450.geom
@@ -0,0 +1,14 @@
+#version 450 core
+
+in gl_PerVertex {
+ float gl_CullDistance[3];
+} gl_in[];
+
+out gl_PerVertex {
+ float gl_CullDistance[3];
+};
+
+void main()
+{
+ gl_CullDistance[2] = gl_in[1].gl_CullDistance[2];
+}
diff --git a/chromium/third_party/glslang/src/Test/450.tesc b/chromium/third_party/glslang/src/Test/450.tesc
new file mode 100644
index 00000000000..161f80230b1
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/450.tesc
@@ -0,0 +1,14 @@
+#version 450 core
+
+in gl_PerVertex {
+ float gl_CullDistance[3];
+} gl_in[gl_MaxPatchVertices];
+
+out gl_PerVertex {
+ float gl_CullDistance[3];
+} gl_out[4];
+
+void main()
+{
+ gl_out[gl_InvocationID].gl_CullDistance[2] = gl_in[1].gl_CullDistance[2];
+}
diff --git a/chromium/third_party/glslang/src/Test/450.tese b/chromium/third_party/glslang/src/Test/450.tese
new file mode 100644
index 00000000000..cfc142751e0
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/450.tese
@@ -0,0 +1,14 @@
+#version 450 core
+
+in gl_PerVertex {
+ float gl_CullDistance[3];
+} gl_in[gl_MaxPatchVertices];
+
+out gl_PerVertex {
+ float gl_CullDistance[3];
+};
+
+void main()
+{
+ gl_CullDistance[2] = gl_in[1].gl_CullDistance[2];
+}
diff --git a/chromium/third_party/glslang/src/Test/450.vert b/chromium/third_party/glslang/src/Test/450.vert
new file mode 100644
index 00000000000..3844a5e176d
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/450.vert
@@ -0,0 +1,23 @@
+#version 450 core
+
+out gl_PerVertex {
+ float gl_CullDistance[3];
+};
+
+void main()
+{
+ gl_CullDistance[2] = 4.5;
+}
+
+out bool outb; // ERROR
+out sampler2D outo; // ERROR
+out float outa[4];
+out float outaa[4][2];
+struct S { float f; };
+out S outs;
+out S[4] outasa;
+out S outsa[4];
+struct SA { float f[4]; };
+out SA outSA;
+struct SS { float f; S s; };
+out SS outSS;
diff --git a/chromium/third_party/glslang/src/Test/Operations.frag b/chromium/third_party/glslang/src/Test/Operations.frag
new file mode 100644
index 00000000000..1ae33903da9
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/Operations.frag
@@ -0,0 +1,166 @@
+#version 130
+
+uniform ivec4 uiv4;
+uniform vec4 uv4;
+uniform bool ub;
+uniform bvec4 ub41, ub42;
+uniform float uf;
+uniform int ui;
+
+
+uniform uvec4 uuv4;
+uniform uint uui;
+
+
+void main()
+{
+ vec4 v;
+ float f;
+ bool b;
+ bvec4 bv4;
+ int i;
+
+ uint u;
+
+
+ // floating point
+ v = radians(uv4);
+ v += degrees(v);
+ v += (i = ui*ui, sin(v));
+ v += cos(v);
+ v += tan(v);
+ v += asin(v);
+ v += acos(v);
+
+ v += atan(v);
+ v += sinh(v);
+ v += cosh(v);
+ v += tanh(v);
+ v += asinh(v);
+ v += acosh(v);
+ v += atanh(v);
+
+ v += pow(v, v);
+ v += exp(v);
+ v += log(v);
+ v += exp2(v);
+ v += log2(v);
+ v += sqrt(v);
+ v += inversesqrt(v);
+ v += abs(v);
+ v += sign(v);
+ v += floor(v);
+
+
+ v += trunc(v);
+ v += round(v);
+ v += roundEven(v);
+
+
+ v += ceil(v);
+ v += fract(v);
+ v += mod(v, v);
+ v += mod(v, v.x);
+
+
+ v += modf(v, v);
+
+
+ v += min(v, uv4);
+ v += max(v, uv4);
+ v += clamp(v, uv4, uv4);
+ v += mix(v,v,v);
+
+
+ v += mix(v,v,bv4);
+ v += intBitsToFloat(ivec4(i));
+ v += uintBitsToFloat(uv4);
+ v += fma(v,v,v);
+ v += frexp(v);
+ v += ldexp(v);
+ v += unpackUnorm2x16(v);
+ v += unpackUnorm4x8(v);
+ v += unpackSnorm4x8(v);
+
+
+ v += step(v,v);
+ v += smoothstep(v,v,v);
+ v += step(uf,v);
+ v += smoothstep(uf,uf,v);
+ v += normalize(v);
+ v += faceforward(v, v, v);
+ v += reflect(v, v);
+ v += refract(v, v, uf);
+ v += dFdx(v);
+ v += dFdy(v);
+ v += fwidth(v);
+ //noise*(v);
+
+
+ // signed integer
+ i += abs(ui);
+ i += sign(i);
+ i += min(i, ui);
+ i += max(i, ui);
+ i += clamp(i, ui, ui);
+
+ floatsBitsToInt(v);
+ packUnorm2x16(v);
+ packUnorm4x8(v);
+ packSnorm4x8(v);
+
+ // unsigned integer
+ u = abs(uui);
+ u += sign(u);
+ u += min(u, uui);
+ u += max(u, uui);
+ u += clamp(u, uui, uui);
+ u += floatsBitToInt(v);
+ u += packUnorm2x16(v);
+ u += packUnorm4x8(v);
+ i += uui & i; // ERRORs, no int/uint conversions before 400
+ i += uui ^ i;
+ i += i | uui;
+
+ // bool
+
+ b = isnan(uf);
+ b = isinf(v.y);
+
+ b = any(lessThan(v, uv4));
+ b = (b && any(lessThanEqual(v, uv4)));
+ b = (b && any(greaterThan(v, uv4)));
+ b = (b && any(greaterThanEqual(v, uv4)));
+ b = (b && any(equal(ub41, ub42)));
+ b = (b && any(notEqual(ub41, ub42)));
+ b = (b && any(ub41));
+ b = (b && all(ub41));
+ b = (b && any(not(ub41)));
+
+ i = ((i + ui) * i - ui) / i;
+ i = i % ui;
+ if (i == ui || i != ui && i == ui ^^ i != 2)
+ ++i;
+
+ f = ((uf + uf) * uf - uf) / uf;
+
+ f += length(v);
+ f += distance(v, v);
+ f += dot(v, v);
+ f += dot(f, uf);
+ f += cross(v.xyz, v.xyz).x;
+
+ if (f == uf || f != uf && f != 2.0)
+ ++f;
+
+ i &= ui;
+ i |= 0x42;
+ i ^= ui;
+ i %= 17;
+ i >>= 2;
+ i <<= ui;
+ i = ~i;
+ b = !b;
+
+ gl_FragColor = b ? vec4(i) + vec4(f) + v : v;
+}
diff --git a/chromium/third_party/glslang/src/Test/aggOps.frag b/chromium/third_party/glslang/src/Test/aggOps.frag
new file mode 100644
index 00000000000..7e8fa21679d
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/aggOps.frag
@@ -0,0 +1,51 @@
+#version 130
+
+uniform sampler2D sampler;
+varying mediump vec2 coord;
+
+varying vec4 u, w;
+
+struct s1 {
+ int i;
+ float f;
+};
+
+struct s2 {
+ int i;
+ float f;
+ s1 s1_1;
+};
+
+uniform s1 foo1;
+uniform s2 foo2a;
+uniform s2 foo2b;
+
+void main()
+{
+ vec4 v;
+ s1 a[3], b[3];
+ a = s1[3](s1(int(u.x), u.y), s1(int(u.z), u.w), s1(14, 14.0));
+ b = s1[3](s1(17, 17.0), s1(int(w.x), w.y), s1(int(w.z), w.w));
+
+ if (foo2a == foo2b)
+ v = texture2D(sampler, coord);
+ else
+ v = texture2D(sampler, 2.0*coord);
+
+ if (u == v)
+ v *= 3.0;
+
+ if (u != v)
+ v *= 4.0;
+
+ if (coord == v.yw)
+ v *= 5.0;
+
+ if (a == b)
+ v *= 6.0;
+
+ if (a != b)
+ v *= 7.0;
+
+ gl_FragColor = v;
+}
diff --git a/chromium/third_party/glslang/src/Test/always-discard.frag b/chromium/third_party/glslang/src/Test/always-discard.frag
new file mode 100644
index 00000000000..9ec493a5874
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/always-discard.frag
@@ -0,0 +1,36 @@
+#version 110
+varying vec2 tex_coord;
+
+void main (void)
+{
+ vec4 white = vec4(1.0);
+ vec4 black = vec4(0.2);
+ vec4 color = white;
+
+ // First, cut out our circle
+ float x = tex_coord.x*2.0 - 1.0;
+ float y = tex_coord.y*2.0 - 1.0;
+
+ float radius = sqrt(x*x + y*y);
+ if (radius > 1.0) {
+ if (radius > 1.1) {
+ ++color;
+ }
+
+ gl_FragColor = color;
+
+ if (radius > 1.2) {
+ ++color;
+ }
+
+ }
+
+ discard;
+
+ // If we're near an edge, darken us a tiny bit
+ if (radius >= 0.75)
+ color -= abs(pow(radius, 16.0)/2.0);
+
+ gl_FragColor = color;
+
+}
diff --git a/chromium/third_party/glslang/src/Test/always-discard2.frag b/chromium/third_party/glslang/src/Test/always-discard2.frag
new file mode 100644
index 00000000000..4d9e957f888
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/always-discard2.frag
@@ -0,0 +1,19 @@
+#version 110
+varying vec2 tex_coord;
+
+void main (void)
+{
+ vec4 white = vec4(1.0);
+ vec4 black = vec4(0.2);
+ vec4 color = white;
+
+ // First, cut out our circle
+ float x = tex_coord.x*2.0 - 1.0;
+ float y = tex_coord.y*2.0 - 1.0;
+
+ discard;
+
+
+ gl_FragColor = color;
+
+}
diff --git a/chromium/third_party/glslang/src/Test/array.frag b/chromium/third_party/glslang/src/Test/array.frag
new file mode 100644
index 00000000000..7f0e43210d8
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/array.frag
@@ -0,0 +1,106 @@
+#version 130
+
+float gu[];
+float g4[4];
+float g5[5];
+
+uniform int a;
+
+float[4] foo(float a[5])
+{
+ return float[](a[0], a[1], a[2], a[3]);
+}
+
+void bar(float[5]) {}
+
+void main()
+{
+ {
+ float gu[2]; // okay, new scope
+
+ gu[2] = 4.0; // ERROR, overflow
+ }
+
+ gu[2] = 4.0; // okay
+
+ gu[3] = 3.0;
+ gu[a] = 5.0; // ERROR
+
+ g4 = foo(g5);
+ g5 = g4; // ERROR
+ gu = g4; // ERROR
+
+ foo(gu); // ERROR
+ bar(g5);
+
+ if (float[4](1.0, 2.0, 3.0, 4.0) == g4)
+ gu[0] = 2.0;
+
+ float u[];
+ u[2] = 3.0; // okay
+ float u[5];
+ u[5] = 5.0; // ERROR
+ foo(u); // okay
+
+ gl_FragData[1000] = vec4(1.0); // ERROR
+ gl_FragData[-1] = vec4(1.0); // ERROR
+ gl_FragData[3] = vec4(1.0);
+
+ const int ca[] = int[](3, 2);
+ int sum = ca[0];
+ sum += ca[1];
+ sum += ca[2]; // ERROR
+
+ const int ca3[3] = int[](3, 2); // ERROR
+ int ica[] = int[](3, 2);
+ int ica3[3] = int[](3, 2); // ERROR
+ ica[3.1] = 3; // ERROR
+ ica[u[1]] = 4; // ERROR
+}
+
+int[] foo213234(); // ERROR
+int foo234234(float[]); // ERROR
+int foo234235(vec2[] v); // ERROR
+
+vec3 guns[];
+float f = guns[7];
+
+void foo()
+{
+ int uns[];
+ uns[3] = 40;
+ uns[1] = 30;
+ guns[2] = vec3(2.4);
+
+ float unsf[];
+ bar(unsf); // ERROR
+}
+
+float[] foo2() // ERROR
+{
+ float f[];
+ return f;
+ float g[9];
+ return g; // ERROR
+}
+
+float gUnusedUnsized[];
+
+void foo3()
+{
+ float resize1[];
+ resize1[2] = 4.0;
+ resize1.length(); // ERROR
+ float resize1[3];
+ resize1.length();
+
+ float resize2[];
+ resize2[5] = 4.0;
+ float resize2[5]; // should be ERROR, but is not
+ resize2.length();
+ resize2[5] = 4.0; // ERROR
+}
+
+int[] i = int[](); // ERROR, need constructor arguments
+float emptyA[];
+float b = vec4(emptyA); // ERROR, array can't be a constructor argument
diff --git a/chromium/third_party/glslang/src/Test/array100.frag b/chromium/third_party/glslang/src/Test/array100.frag
new file mode 100644
index 00000000000..b77aedf6e54
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/array100.frag
@@ -0,0 +1,70 @@
+#version 100
+
+float gu[]; // ERROR
+float g4[4];
+float g5[5];
+
+uniform int a;
+
+float[4] foo(float[5] a) // ERROR // ERROR
+{
+ return float[](a[0], a[1], a[2], a[3]); // ERROR
+}
+
+void bar(float[5]) {}
+
+void main()
+{
+ {
+ float gu[2]; // okay, new scope
+
+ gu[2] = 4.0; // ERROR, overflow
+ }
+
+ g4 = foo(g5); // ERROR
+ g5 = g4; // ERROR
+ gu = g4; // ERROR
+
+ foo(gu); // ERROR
+ bar(g5);
+
+ if (float[4](1.0, 2.0, 3.0, 4.0) == g4) // ERROR
+ gu[0] = 2.0;
+
+ float u[5];
+ u[5] = 5.0; // ERROR
+ foo(u); // okay
+
+ gl_FragData[1000] = vec4(1.0); // ERROR
+ gl_FragData[-1] = vec4(1.0); // ERROR
+ gl_FragData[3] = vec4(1.0);
+}
+
+struct SA {
+ vec3 v3;
+ vec2 v2[4];
+};
+
+struct SB {
+ vec4 v4;
+ SA sa;
+};
+
+SB bar9()
+{
+ SB s;
+ return s; // ERROR
+}
+
+void bar10(SB s) // okay
+{
+}
+
+void bar11()
+{
+ SB s1, s2;
+ s1 = s2; // ERROR
+ bar10(s1);
+ s2 = bar9(); // ERROR
+ SB initSb = s1; // ERROR
+}
diff --git a/chromium/third_party/glslang/src/Test/atomic_uint.frag b/chromium/third_party/glslang/src/Test/atomic_uint.frag
new file mode 100644
index 00000000000..1234435695c
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/atomic_uint.frag
@@ -0,0 +1,48 @@
+#version 420 core
+
+layout(binding = 0) uniform atomic_uint counter;
+
+uint func(atomic_uint c)
+{
+ return atomicCounterIncrement(c);
+}
+
+uint func2(out atomic_uint c) // ERROR
+{
+ return counter; // ERROR, type mismatch
+ return atomicCounter(counter);
+}
+
+void main()
+{
+ atomic_uint non_uniform_counter; // ERROR
+ uint val = atomicCounter(counter);
+ atomicCounterDecrement(counter);
+}
+
+layout(binding = 1, offset = 3) uniform atomic_uint countArr[4];
+uniform int i;
+
+void opac()
+{
+ counter + counter; // ERROR
+ -counter; // ERROR
+ int a[3];
+ a[counter]; // ERROR
+ countArr[2];
+ countArr[i];
+ counter = 4; // ERROR
+}
+
+in atomic_uint acin; // ERROR
+atomic_uint acg; // ERROR
+uniform atomic_uint;
+uniform atomic_uint aNoBind; // ERROR, no binding
+layout(binding=0, offset=32) uniform atomic_uint aOffset;
+layout(binding=0, offset=4) uniform atomic_uint;
+layout(binding=0) uniform atomic_uint bar3; // offset is 4
+layout(binding=0) uniform atomic_uint ac[3]; // offset = 8
+layout(binding=0) uniform atomic_uint ad; // offset = 20
+layout(offset=8) uniform atomic_uint bar4; // ERROR, no binding
+layout(binding = 0, offset = 12) uniform atomic_uint overlap; // ERROR, overlapping offsets
+layout(binding = 20) uniform atomic_uint bigBind; // ERROR, binding too big
diff --git a/chromium/third_party/glslang/src/Test/badChars.frag b/chromium/third_party/glslang/src/Test/badChars.frag
new file mode 100644
index 00000000000..d67bf3a5e0b
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/badChars.frag
@@ -0,0 +1,6 @@
+#ifþ
+#endif
+#error AÿB
+#if
+#endif
+int aÿ
diff --git a/chromium/third_party/glslang/src/Test/baseResults/100.frag.out b/chromium/third_party/glslang/src/Test/baseResults/100.frag.out
new file mode 100644
index 00000000000..7af716d84b7
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/100.frag.out
@@ -0,0 +1,734 @@
+100.frag
+ERROR: 0:3: '{ } style initializers' : not supported with this profile: es
+ERROR: 0:3: 'initializer' : not supported for this version or the enabled extensions
+ERROR: 0:3: 'array initializer' : not supported for this version or the enabled extensions
+ERROR: 0:4: '#version' : must occur first in shader
+ERROR: 0:7: 'attribute' : not supported in this stage: fragment
+ERROR: 0:7: 'float' : type requires declaration of default precision qualifier
+ERROR: 0:9: '=' : cannot convert from 'const int' to 'global mediump float'
+ERROR: 0:11: 'uniform block' : not supported for this version or the enabled extensions
+ERROR: 0:19: 'foo' : no matching overloaded function found
+ERROR: 0:20: 'bit shift left' : not supported for this version or the enabled extensions
+ERROR: 0:21: 'bit shift right' : not supported for this version or the enabled extensions
+ERROR: 0:22: 'array comparison' : not supported for this version or the enabled extensions
+ERROR: 0:24: 'bitwise and' : not supported for this version or the enabled extensions
+ERROR: 0:25: '%' : not supported for this version or the enabled extensions
+ERROR: 0:26: 'bitwise inclusive or' : not supported for this version or the enabled extensions
+ERROR: 0:27: 'bit-shift right assign' : not supported for this version or the enabled extensions
+ERROR: 0:28: 'bit-shift left assign' : not supported for this version or the enabled extensions
+ERROR: 0:29: '%=' : not supported for this version or the enabled extensions
+ERROR: 0:36: 'array assignment' : not supported for this version or the enabled extensions
+ERROR: 0:37: 'array comparison' : not supported for this version or the enabled extensions
+ERROR: 0:38: 'array comparison' : not supported for this version or the enabled extensions
+ERROR: 0:40: 'switch' : Reserved word.
+ERROR: 0:40: 'switch statements' : not supported for this version or the enabled extensions
+ERROR: 0:45: '' : array size required
+ERROR: 0:47: 'invariant' : can only apply to an output, or to an input in a non-vertex stage
+
+ERROR: 0:49: 'invariant' : can only apply to an output, or to an input in a non-vertex stage
+
+ERROR: 0:50: 'invariant' : can only apply to an output, or to an input in a non-vertex stage
+
+ERROR: 0:56: 'invariant' : not allowed in nested scope
+ERROR: 0:56: 'invariant' : can only apply to an output, or to an input in a non-vertex stage
+
+ERROR: 0:57: 'invariant' : not allowed in nested scope
+ERROR: 0:57: 'invariant' : can only apply to an output, or to an input in a non-vertex stage
+
+ERROR: 0:59: 'invariant' : not allowed in nested scope
+ERROR: 0:59: 'invariant' : can only apply to an output, or to an input in a non-vertex stage
+
+ERROR: 0:63: 'invariant' : can only apply to an output, or to an input in a non-vertex stage
+
+ERROR: 0:64: 'invariant' : can only apply to an output, or to an input in a non-vertex stage
+
+ERROR: 0:66: 'sampler2D' : sampler/image types can only be used in uniform variables or function parameters: glob2D
+ERROR: 0:69: 'sampler2D' : sampler/image types can only be used in uniform variables or function parameters: v2D
+ERROR: 0:71: 'sampler2D' : sampler/image types can only be used in uniform variables or function parameters: vary2D
+ERROR: 0:75: 'in for stage inputs' : not supported for this version or the enabled extensions
+ERROR: 0:77: 'invariant' : can only apply to an output, or to an input in a non-vertex stage
+
+ERROR: 0:75: 'g' : cannot use storage or interpolation qualifiers on structure members
+ERROR: 0:76: 'h' : cannot use storage or interpolation qualifiers on structure members
+ERROR: 0:77: 'i' : cannot use invariant qualifier on structure members
+ERROR: 0:80: 'sampler3D' : Reserved word.
+ERROR: 0:80: 'sampler/image' : type requires declaration of default precision qualifier
+ERROR: 0:91: 'dFdx' : required extension not requested: GL_OES_standard_derivatives
+ERROR: 0:92: 'dFdy' : required extension not requested: GL_OES_standard_derivatives
+ERROR: 0:93: 'fwidth' : required extension not requested: GL_OES_standard_derivatives
+ERROR: 0:103: 'gl_FragDepth' : undeclared identifier
+ERROR: 0:104: 'gl_FragDepthEXT' : required extension not requested: GL_EXT_frag_depth
+ERROR: 0:111: 'gl_FragDepth' : undeclared identifier
+ERROR: 0:134: 'texture3D' : no matching overloaded function found
+ERROR: 0:135: 'texture2DProjLod' : no matching overloaded function found
+ERROR: 0:137: 'bitwise not' : not supported for this version or the enabled extensions
+ERROR: 0:138: 'bitwise inclusive or' : not supported for this version or the enabled extensions
+ERROR: 0:139: 'bitwise and' : not supported for this version or the enabled extensions
+ERROR: 0:145: 'a' : redefinition
+ERROR: 0:147: 'texture2DProjGradEXT' : required extension not requested: GL_EXT_shader_texture_lod
+ERROR: 0:151: 'floating-point suffix' : not supported for this version or the enabled extensions
+ERROR: 0:152: 'floating-point suffix' : not supported for this version or the enabled extensions
+ERROR: 0:167: 'highp' : overloaded functions must have the same parameter precision qualifiers for argument 2
+ERROR: 0:170: 'multiple prototypes for same function' : not supported for this version or the enabled extensions
+ERROR: 0:177: 'multiple prototypes for same function' : not supported for this version or the enabled extensions
+ERROR: 0:179: 'fragment-shader struct input' : not supported for this version or the enabled extensions
+ERROR: 0:183: 'v' : illegal use of type 'void'
+ERROR: 0:184: 'void' : cannot be an argument type except for '(void)'
+ERROR: 0:185: 'v' : illegal use of type 'void'
+ERROR: 0:185: 'void' : cannot be an argument type except for '(void)'
+ERROR: 0:190: '.' : cannot apply to an array: y
+ERROR: 0:191: '.' : cannot apply to an array: zy
+ERROR: 0:192: '.' : cannot apply to an array: nothing
+ERROR: 0:193: '.length' : not supported for this version or the enabled extensions
+ERROR: 0:194: '.' : cannot apply to an array: method
+ERROR: 0:194: 'a' : can't use function syntax on variable
+ERROR: 0:214: 'non-constant global initializer' : not supported with this profile: es
+ERROR: 0:3000: '#error' : line of this error should be 3000
+ERROR: 0:3002: '' : syntax error
+ERROR: 77 compilation errors. No code generated.
+
+
+Shader version: 100
+Requested GL_EXT_frag_depth
+Requested GL_EXT_shader_texture_lod
+Requested GL_OES_EGL_image_external
+Requested GL_OES_standard_derivatives
+Requested GL_OES_texture_3D
+ERROR: node is still EOpNull!
+0:3 Sequence
+0:3 move second child to first child (temp 3-element array of mediump int)
+0:3 'a' (global 3-element array of mediump int)
+0:3 Constant:
+0:3 2 (const int)
+0:3 3 (const int)
+0:3 4 (const int)
+0:17 Function Definition: main( (global void)
+0:17 Function Parameters:
+0:19 Sequence
+0:19 Constant:
+0:19 0.000000
+0:20 Sequence
+0:20 move second child to first child (temp mediump int)
+0:20 's' (temp mediump int)
+0:20 Constant:
+0:20 16 (const int)
+0:21 move second child to first child (temp mediump int)
+0:21 's' (temp mediump int)
+0:21 Constant:
+0:21 4 (const int)
+0:22 Test condition and select (temp void)
+0:22 Condition
+0:22 Compare Equal (temp bool)
+0:22 'a' (global 3-element array of mediump int)
+0:22 'a' (global 3-element array of mediump int)
+0:22 true case is null
+0:24 move second child to first child (temp mediump int)
+0:24 'b' (temp mediump int)
+0:24 bitwise and (temp mediump int)
+0:24 'c' (temp mediump int)
+0:24 Constant:
+0:24 4 (const int)
+0:25 move second child to first child (temp mediump int)
+0:25 'b' (temp mediump int)
+0:25 mod (temp mediump int)
+0:25 'c' (temp mediump int)
+0:25 Constant:
+0:25 4 (const int)
+0:26 move second child to first child (temp mediump int)
+0:26 'b' (temp mediump int)
+0:26 inclusive-or (temp mediump int)
+0:26 'c' (temp mediump int)
+0:26 Constant:
+0:26 4 (const int)
+0:27 right shift second child into first child (temp mediump int)
+0:27 'b' (temp mediump int)
+0:27 Constant:
+0:27 2 (const int)
+0:28 left shift second child into first child (temp mediump int)
+0:28 'b' (temp mediump int)
+0:28 Constant:
+0:28 2 (const int)
+0:29 mod second child into first child (temp mediump int)
+0:29 'b' (temp mediump int)
+0:29 Constant:
+0:29 3 (const int)
+0:36 move second child to first child (temp structure{temp mediump float f, temp 10-element array of mediump float a})
+0:36 's1' (temp structure{temp mediump float f, temp 10-element array of mediump float a})
+0:36 's2' (temp structure{temp mediump float f, temp 10-element array of mediump float a})
+0:37 Test condition and select (temp void)
+0:37 Condition
+0:37 Compare Equal (temp bool)
+0:37 's1' (temp structure{temp mediump float f, temp 10-element array of mediump float a})
+0:37 's2' (temp structure{temp mediump float f, temp 10-element array of mediump float a})
+0:37 true case is null
+0:38 Test condition and select (temp void)
+0:38 Condition
+0:38 Compare Not Equal (temp bool)
+0:38 's1' (temp structure{temp mediump float f, temp 10-element array of mediump float a})
+0:38 's2' (temp structure{temp mediump float f, temp 10-element array of mediump float a})
+0:38 true case is null
+0:40 'b' (temp mediump int)
+0:54 Function Definition: foo10( (global void)
+0:54 Function Parameters:
+0:67 Function Definition: f11(s21; (global void)
+0:67 Function Parameters:
+0:67 'p2d' (in lowp sampler2D)
+0:87 Function Definition: foo234( (global void)
+0:87 Function Parameters:
+0:89 Sequence
+0:89 texture (global highp 4-component vector of float)
+0:89 's3D2' (uniform highp sampler3D)
+0:89 Constant:
+0:89 0.200000
+0:89 0.200000
+0:89 0.200000
+0:89 Constant:
+0:89 0.200000
+0:90 textureProj (global highp 4-component vector of float)
+0:90 's3D2' (uniform highp sampler3D)
+0:90 direct index (smooth temp mediump 4-component vector of float)
+0:90 'v' (smooth in 3-element array of mediump 4-component vector of float)
+0:90 Constant:
+0:90 1 (const int)
+0:90 Constant:
+0:90 0.400000
+0:91 dPdx (global mediump 4-component vector of float)
+0:91 direct index (smooth temp mediump 4-component vector of float)
+0:91 'v' (smooth in 3-element array of mediump 4-component vector of float)
+0:91 Constant:
+0:91 0 (const int)
+0:92 Constant:
+0:92 0.000000
+0:93 fwidth (global mediump float)
+0:93 'f13' (invariant global mediump float)
+0:98 Function Definition: foo236( (global void)
+0:98 Function Parameters:
+0:100 Sequence
+0:100 dPdx (global mediump 4-component vector of float)
+0:100 direct index (smooth temp mediump 4-component vector of float)
+0:100 'v' (smooth in 3-element array of mediump 4-component vector of float)
+0:100 Constant:
+0:100 0 (const int)
+0:101 Constant:
+0:101 0.000000
+0:102 fwidth (global mediump float)
+0:102 'f13' (invariant global mediump float)
+0:103 move second child to first child (temp mediump float)
+0:103 'gl_FragDepth' (temp mediump float)
+0:103 'f13' (invariant global mediump float)
+0:104 move second child to first child (temp highp float)
+0:104 'gl_FragDepthEXT' (gl_FragDepth highp float FragDepth)
+0:104 'f13' (invariant global mediump float)
+0:109 Function Definition: foo239( (global void)
+0:109 Function Parameters:
+0:111 Sequence
+0:111 move second child to first child (temp mediump float)
+0:111 'gl_FragDepth' (temp mediump float)
+0:111 'f13' (invariant global mediump float)
+0:112 move second child to first child (temp highp float)
+0:112 'gl_FragDepthEXT' (gl_FragDepth highp float FragDepth)
+0:112 'f13' (invariant global mediump float)
+0:119 Function Definition: foo245( (global void)
+0:119 Function Parameters:
+0:121 Sequence
+0:121 texture (global lowp 4-component vector of float)
+0:121 'sExt' (uniform lowp samplerExternalOES)
+0:121 Constant:
+0:121 0.200000
+0:121 0.200000
+0:122 textureProj (global lowp 4-component vector of float)
+0:122 'sExt' (uniform lowp samplerExternalOES)
+0:122 Construct vec3 (temp lowp 3-component vector of float)
+0:122 'f13' (invariant global mediump float)
+0:123 textureProj (global lowp 4-component vector of float)
+0:123 'sExt' (uniform lowp samplerExternalOES)
+0:123 direct index (smooth temp mediump 4-component vector of float)
+0:123 'v' (smooth in 3-element array of mediump 4-component vector of float)
+0:123 Constant:
+0:123 2 (const int)
+0:130 Function Definition: foo246( (global void)
+0:130 Function Parameters:
+0:132 Sequence
+0:132 texture (global mediump 4-component vector of float)
+0:132 'mediumExt' (uniform mediump samplerExternalOES)
+0:132 Constant:
+0:132 0.200000
+0:132 0.200000
+0:133 textureProj (global highp 4-component vector of float)
+0:133 'highExt' (uniform highp samplerExternalOES)
+0:133 direct index (smooth temp mediump 4-component vector of float)
+0:133 'v' (smooth in 3-element array of mediump 4-component vector of float)
+0:133 Constant:
+0:133 2 (const int)
+0:134 Constant:
+0:134 0.000000
+0:135 Constant:
+0:135 0.000000
+0:137 Bitwise not (temp mediump int)
+0:137 'a' (temp mediump int)
+0:138 inclusive-or (temp mediump int)
+0:138 'a' (temp mediump int)
+0:138 'a' (temp mediump int)
+0:139 bitwise and (temp mediump int)
+0:139 'a' (temp mediump int)
+0:139 'a' (temp mediump int)
+0:145 Function Definition: foo203940(i1;f1;f1; (global mediump int)
+0:145 Function Parameters:
+0:145 'a' (in mediump int)
+0:145 'b' (in mediump float)
+0:147 Sequence
+0:147 textureProjGrad (global lowp 4-component vector of float)
+0:147 's2Dg' (uniform lowp sampler2D)
+0:147 Construct vec3 (temp mediump 3-component vector of float)
+0:147 'f13' (invariant global mediump float)
+0:147 'uv2' (invariant uniform mediump 2-component vector of float)
+0:147 'uv2' (invariant uniform mediump 2-component vector of float)
+0:148 Branch: Return with expression
+0:148 'a' (in mediump int)
+0:151 Sequence
+0:151 move second child to first child (temp mediump float)
+0:151 'f123' (global mediump float)
+0:151 Constant:
+0:151 4.000000
+0:152 Sequence
+0:152 move second child to first child (temp mediump float)
+0:152 'f124' (global mediump float)
+0:152 Constant:
+0:152 50000000000.000000
+0:158 Function Definition: foo323433( (global void)
+0:158 Function Parameters:
+0:160 Sequence
+0:160 textureLod (global lowp 4-component vector of float)
+0:160 's2Dg' (uniform lowp sampler2D)
+0:160 'uv2' (invariant uniform mediump 2-component vector of float)
+0:160 'f13' (invariant global mediump float)
+0:161 textureProjGrad (global lowp 4-component vector of float)
+0:161 's2Dg' (uniform lowp sampler2D)
+0:161 Construct vec3 (temp mediump 3-component vector of float)
+0:161 'f13' (invariant global mediump float)
+0:161 'uv2' (invariant uniform mediump 2-component vector of float)
+0:161 'uv2' (invariant uniform mediump 2-component vector of float)
+0:162 textureGrad (global lowp 4-component vector of float)
+0:162 's2Dg' (uniform lowp sampler2D)
+0:162 'uv2' (invariant uniform mediump 2-component vector of float)
+0:162 'uv2' (invariant uniform mediump 2-component vector of float)
+0:162 'uv2' (invariant uniform mediump 2-component vector of float)
+0:163 textureGrad (global lowp 4-component vector of float)
+0:163 'sCube' (uniform lowp samplerCube)
+0:163 Construct vec3 (temp lowp 3-component vector of float)
+0:163 'f13' (invariant global mediump float)
+0:163 Construct vec3 (temp lowp 3-component vector of float)
+0:163 'f13' (invariant global mediump float)
+0:163 Construct vec3 (temp lowp 3-component vector of float)
+0:163 'f13' (invariant global mediump float)
+0:167 Function Definition: fgfg(f1;i1; (global mediump int)
+0:167 Function Parameters:
+0:167 'f' (in mediump float)
+0:167 'i' (in highp int)
+0:167 Sequence
+0:167 Branch: Return with expression
+0:167 Constant:
+0:167 2 (const int)
+0:173 Function Definition: gggf(f1; (global mediump int)
+0:173 Function Parameters:
+0:173 'f' (in mediump float)
+0:173 Sequence
+0:173 Branch: Return with expression
+0:173 Constant:
+0:173 2 (const int)
+0:175 Function Definition: agggf(f1; (global mediump int)
+0:175 Function Parameters:
+0:175 'f' (in mediump float)
+0:175 Sequence
+0:175 Branch: Return with expression
+0:175 Constant:
+0:175 2 (const int)
+0:187 Function Definition: badswizzle( (global void)
+0:187 Function Parameters:
+0:? Sequence
+0:190 'a' (temp 5-element array of mediump 3-component vector of float)
+0:191 'a' (temp 5-element array of mediump 3-component vector of float)
+0:192 'a' (temp 5-element array of mediump 3-component vector of float)
+0:193 Constant:
+0:193 5 (const int)
+0:194 Constant:
+0:194 0.000000
+0:199 Function Definition: fooinittest( (global mediump float)
+0:199 Function Parameters:
+0:201 Sequence
+0:201 Branch: Return with expression
+0:201 Function Call: fooinit( (global mediump float)
+0:209 Function Definition: fooinit( (global mediump float)
+0:209 Function Parameters:
+0:211 Sequence
+0:211 Branch: Return with expression
+0:211 Constant:
+0:211 12.000000
+0:214 Sequence
+0:214 move second child to first child (temp mediump int)
+0:214 'init1' (global mediump int)
+0:214 Test condition and select (temp mediump int)
+0:214 Condition
+0:214 'gl_FrontFacing' (gl_FrontFacing bool Face)
+0:214 true case
+0:214 Constant:
+0:214 1 (const int)
+0:214 false case
+0:214 Constant:
+0:214 2 (const int)
+0:? Linker Objects
+0:? 'a' (global 3-element array of mediump int)
+0:? 'uint' (global mediump int)
+0:? 'v' (smooth in 3-element array of mediump 4-component vector of float)
+0:? 'f' (global mediump float)
+0:? 'anon@0' (layout(column_major shared ) uniform block{layout(column_major shared ) uniform mediump int x})
+0:? 'fa' (global implicitly-sized array of mediump float)
+0:? 'f13' (global mediump float)
+0:? 'fi' (invariant temp mediump float)
+0:? 'av' (smooth in mediump 4-component vector of float)
+0:? 'uv2' (uniform mediump 2-component vector of float)
+0:? 'uv3' (invariant uniform mediump 3-component vector of float)
+0:? 'glob2D' (global lowp sampler2D)
+0:? 'vary2D' (smooth in lowp sampler2D)
+0:? 's3D' (uniform mediump sampler3D)
+0:? 's3D2' (uniform highp sampler3D)
+0:? 'sExt' (uniform lowp samplerExternalOES)
+0:? 'mediumExt' (uniform mediump samplerExternalOES)
+0:? 'highExt' (uniform highp samplerExternalOES)
+0:? 's2Dg' (uniform lowp sampler2D)
+0:? 'f123' (global mediump float)
+0:? 'f124' (global mediump float)
+0:? 'sCube' (uniform lowp samplerCube)
+0:? 's' (smooth in structure{global mediump float f})
+0:? 'fi1' (const mediump float)
+0:? 3.000000
+0:? 'fi2' (const mediump float)
+0:? 4.000000
+0:? 'fi3' (const mediump float)
+0:? 5.000000
+0:? 'init1' (global mediump int)
+
+
+Linked fragment stage:
+
+
+Shader version: 100
+Requested GL_EXT_frag_depth
+Requested GL_EXT_shader_texture_lod
+Requested GL_OES_EGL_image_external
+Requested GL_OES_standard_derivatives
+Requested GL_OES_texture_3D
+ERROR: node is still EOpNull!
+0:3 Sequence
+0:3 move second child to first child (temp 3-element array of mediump int)
+0:3 'a' (global 3-element array of mediump int)
+0:3 Constant:
+0:3 2 (const int)
+0:3 3 (const int)
+0:3 4 (const int)
+0:17 Function Definition: main( (global void)
+0:17 Function Parameters:
+0:19 Sequence
+0:19 Constant:
+0:19 0.000000
+0:20 Sequence
+0:20 move second child to first child (temp mediump int)
+0:20 's' (temp mediump int)
+0:20 Constant:
+0:20 16 (const int)
+0:21 move second child to first child (temp mediump int)
+0:21 's' (temp mediump int)
+0:21 Constant:
+0:21 4 (const int)
+0:22 Test condition and select (temp void)
+0:22 Condition
+0:22 Compare Equal (temp bool)
+0:22 'a' (global 3-element array of mediump int)
+0:22 'a' (global 3-element array of mediump int)
+0:22 true case is null
+0:24 move second child to first child (temp mediump int)
+0:24 'b' (temp mediump int)
+0:24 bitwise and (temp mediump int)
+0:24 'c' (temp mediump int)
+0:24 Constant:
+0:24 4 (const int)
+0:25 move second child to first child (temp mediump int)
+0:25 'b' (temp mediump int)
+0:25 mod (temp mediump int)
+0:25 'c' (temp mediump int)
+0:25 Constant:
+0:25 4 (const int)
+0:26 move second child to first child (temp mediump int)
+0:26 'b' (temp mediump int)
+0:26 inclusive-or (temp mediump int)
+0:26 'c' (temp mediump int)
+0:26 Constant:
+0:26 4 (const int)
+0:27 right shift second child into first child (temp mediump int)
+0:27 'b' (temp mediump int)
+0:27 Constant:
+0:27 2 (const int)
+0:28 left shift second child into first child (temp mediump int)
+0:28 'b' (temp mediump int)
+0:28 Constant:
+0:28 2 (const int)
+0:29 mod second child into first child (temp mediump int)
+0:29 'b' (temp mediump int)
+0:29 Constant:
+0:29 3 (const int)
+0:36 move second child to first child (temp structure{temp mediump float f, temp 10-element array of mediump float a})
+0:36 's1' (temp structure{temp mediump float f, temp 10-element array of mediump float a})
+0:36 's2' (temp structure{temp mediump float f, temp 10-element array of mediump float a})
+0:37 Test condition and select (temp void)
+0:37 Condition
+0:37 Compare Equal (temp bool)
+0:37 's1' (temp structure{temp mediump float f, temp 10-element array of mediump float a})
+0:37 's2' (temp structure{temp mediump float f, temp 10-element array of mediump float a})
+0:37 true case is null
+0:38 Test condition and select (temp void)
+0:38 Condition
+0:38 Compare Not Equal (temp bool)
+0:38 's1' (temp structure{temp mediump float f, temp 10-element array of mediump float a})
+0:38 's2' (temp structure{temp mediump float f, temp 10-element array of mediump float a})
+0:38 true case is null
+0:40 'b' (temp mediump int)
+0:54 Function Definition: foo10( (global void)
+0:54 Function Parameters:
+0:67 Function Definition: f11(s21; (global void)
+0:67 Function Parameters:
+0:67 'p2d' (in lowp sampler2D)
+0:87 Function Definition: foo234( (global void)
+0:87 Function Parameters:
+0:89 Sequence
+0:89 texture (global highp 4-component vector of float)
+0:89 's3D2' (uniform highp sampler3D)
+0:89 Constant:
+0:89 0.200000
+0:89 0.200000
+0:89 0.200000
+0:89 Constant:
+0:89 0.200000
+0:90 textureProj (global highp 4-component vector of float)
+0:90 's3D2' (uniform highp sampler3D)
+0:90 direct index (smooth temp mediump 4-component vector of float)
+0:90 'v' (smooth in 3-element array of mediump 4-component vector of float)
+0:90 Constant:
+0:90 1 (const int)
+0:90 Constant:
+0:90 0.400000
+0:91 dPdx (global mediump 4-component vector of float)
+0:91 direct index (smooth temp mediump 4-component vector of float)
+0:91 'v' (smooth in 3-element array of mediump 4-component vector of float)
+0:91 Constant:
+0:91 0 (const int)
+0:92 Constant:
+0:92 0.000000
+0:93 fwidth (global mediump float)
+0:93 'f13' (invariant global mediump float)
+0:98 Function Definition: foo236( (global void)
+0:98 Function Parameters:
+0:100 Sequence
+0:100 dPdx (global mediump 4-component vector of float)
+0:100 direct index (smooth temp mediump 4-component vector of float)
+0:100 'v' (smooth in 3-element array of mediump 4-component vector of float)
+0:100 Constant:
+0:100 0 (const int)
+0:101 Constant:
+0:101 0.000000
+0:102 fwidth (global mediump float)
+0:102 'f13' (invariant global mediump float)
+0:103 move second child to first child (temp mediump float)
+0:103 'gl_FragDepth' (temp mediump float)
+0:103 'f13' (invariant global mediump float)
+0:104 move second child to first child (temp highp float)
+0:104 'gl_FragDepthEXT' (gl_FragDepth highp float FragDepth)
+0:104 'f13' (invariant global mediump float)
+0:109 Function Definition: foo239( (global void)
+0:109 Function Parameters:
+0:111 Sequence
+0:111 move second child to first child (temp mediump float)
+0:111 'gl_FragDepth' (temp mediump float)
+0:111 'f13' (invariant global mediump float)
+0:112 move second child to first child (temp highp float)
+0:112 'gl_FragDepthEXT' (gl_FragDepth highp float FragDepth)
+0:112 'f13' (invariant global mediump float)
+0:119 Function Definition: foo245( (global void)
+0:119 Function Parameters:
+0:121 Sequence
+0:121 texture (global lowp 4-component vector of float)
+0:121 'sExt' (uniform lowp samplerExternalOES)
+0:121 Constant:
+0:121 0.200000
+0:121 0.200000
+0:122 textureProj (global lowp 4-component vector of float)
+0:122 'sExt' (uniform lowp samplerExternalOES)
+0:122 Construct vec3 (temp lowp 3-component vector of float)
+0:122 'f13' (invariant global mediump float)
+0:123 textureProj (global lowp 4-component vector of float)
+0:123 'sExt' (uniform lowp samplerExternalOES)
+0:123 direct index (smooth temp mediump 4-component vector of float)
+0:123 'v' (smooth in 3-element array of mediump 4-component vector of float)
+0:123 Constant:
+0:123 2 (const int)
+0:130 Function Definition: foo246( (global void)
+0:130 Function Parameters:
+0:132 Sequence
+0:132 texture (global mediump 4-component vector of float)
+0:132 'mediumExt' (uniform mediump samplerExternalOES)
+0:132 Constant:
+0:132 0.200000
+0:132 0.200000
+0:133 textureProj (global highp 4-component vector of float)
+0:133 'highExt' (uniform highp samplerExternalOES)
+0:133 direct index (smooth temp mediump 4-component vector of float)
+0:133 'v' (smooth in 3-element array of mediump 4-component vector of float)
+0:133 Constant:
+0:133 2 (const int)
+0:134 Constant:
+0:134 0.000000
+0:135 Constant:
+0:135 0.000000
+0:137 Bitwise not (temp mediump int)
+0:137 'a' (temp mediump int)
+0:138 inclusive-or (temp mediump int)
+0:138 'a' (temp mediump int)
+0:138 'a' (temp mediump int)
+0:139 bitwise and (temp mediump int)
+0:139 'a' (temp mediump int)
+0:139 'a' (temp mediump int)
+0:145 Function Definition: foo203940(i1;f1;f1; (global mediump int)
+0:145 Function Parameters:
+0:145 'a' (in mediump int)
+0:145 'b' (in mediump float)
+0:147 Sequence
+0:147 textureProjGrad (global lowp 4-component vector of float)
+0:147 's2Dg' (uniform lowp sampler2D)
+0:147 Construct vec3 (temp mediump 3-component vector of float)
+0:147 'f13' (invariant global mediump float)
+0:147 'uv2' (invariant uniform mediump 2-component vector of float)
+0:147 'uv2' (invariant uniform mediump 2-component vector of float)
+0:148 Branch: Return with expression
+0:148 'a' (in mediump int)
+0:151 Sequence
+0:151 move second child to first child (temp mediump float)
+0:151 'f123' (global mediump float)
+0:151 Constant:
+0:151 4.000000
+0:152 Sequence
+0:152 move second child to first child (temp mediump float)
+0:152 'f124' (global mediump float)
+0:152 Constant:
+0:152 50000000000.000000
+0:158 Function Definition: foo323433( (global void)
+0:158 Function Parameters:
+0:160 Sequence
+0:160 textureLod (global lowp 4-component vector of float)
+0:160 's2Dg' (uniform lowp sampler2D)
+0:160 'uv2' (invariant uniform mediump 2-component vector of float)
+0:160 'f13' (invariant global mediump float)
+0:161 textureProjGrad (global lowp 4-component vector of float)
+0:161 's2Dg' (uniform lowp sampler2D)
+0:161 Construct vec3 (temp mediump 3-component vector of float)
+0:161 'f13' (invariant global mediump float)
+0:161 'uv2' (invariant uniform mediump 2-component vector of float)
+0:161 'uv2' (invariant uniform mediump 2-component vector of float)
+0:162 textureGrad (global lowp 4-component vector of float)
+0:162 's2Dg' (uniform lowp sampler2D)
+0:162 'uv2' (invariant uniform mediump 2-component vector of float)
+0:162 'uv2' (invariant uniform mediump 2-component vector of float)
+0:162 'uv2' (invariant uniform mediump 2-component vector of float)
+0:163 textureGrad (global lowp 4-component vector of float)
+0:163 'sCube' (uniform lowp samplerCube)
+0:163 Construct vec3 (temp lowp 3-component vector of float)
+0:163 'f13' (invariant global mediump float)
+0:163 Construct vec3 (temp lowp 3-component vector of float)
+0:163 'f13' (invariant global mediump float)
+0:163 Construct vec3 (temp lowp 3-component vector of float)
+0:163 'f13' (invariant global mediump float)
+0:167 Function Definition: fgfg(f1;i1; (global mediump int)
+0:167 Function Parameters:
+0:167 'f' (in mediump float)
+0:167 'i' (in highp int)
+0:167 Sequence
+0:167 Branch: Return with expression
+0:167 Constant:
+0:167 2 (const int)
+0:173 Function Definition: gggf(f1; (global mediump int)
+0:173 Function Parameters:
+0:173 'f' (in mediump float)
+0:173 Sequence
+0:173 Branch: Return with expression
+0:173 Constant:
+0:173 2 (const int)
+0:175 Function Definition: agggf(f1; (global mediump int)
+0:175 Function Parameters:
+0:175 'f' (in mediump float)
+0:175 Sequence
+0:175 Branch: Return with expression
+0:175 Constant:
+0:175 2 (const int)
+0:187 Function Definition: badswizzle( (global void)
+0:187 Function Parameters:
+0:? Sequence
+0:190 'a' (temp 5-element array of mediump 3-component vector of float)
+0:191 'a' (temp 5-element array of mediump 3-component vector of float)
+0:192 'a' (temp 5-element array of mediump 3-component vector of float)
+0:193 Constant:
+0:193 5 (const int)
+0:194 Constant:
+0:194 0.000000
+0:199 Function Definition: fooinittest( (global mediump float)
+0:199 Function Parameters:
+0:201 Sequence
+0:201 Branch: Return with expression
+0:201 Function Call: fooinit( (global mediump float)
+0:209 Function Definition: fooinit( (global mediump float)
+0:209 Function Parameters:
+0:211 Sequence
+0:211 Branch: Return with expression
+0:211 Constant:
+0:211 12.000000
+0:214 Sequence
+0:214 move second child to first child (temp mediump int)
+0:214 'init1' (global mediump int)
+0:214 Test condition and select (temp mediump int)
+0:214 Condition
+0:214 'gl_FrontFacing' (gl_FrontFacing bool Face)
+0:214 true case
+0:214 Constant:
+0:214 1 (const int)
+0:214 false case
+0:214 Constant:
+0:214 2 (const int)
+0:? Linker Objects
+0:? 'a' (global 3-element array of mediump int)
+0:? 'uint' (global mediump int)
+0:? 'v' (smooth in 3-element array of mediump 4-component vector of float)
+0:? 'f' (global mediump float)
+0:? 'anon@0' (layout(column_major shared ) uniform block{layout(column_major shared ) uniform mediump int x})
+0:? 'fa' (global 1-element array of mediump float)
+0:? 'f13' (global mediump float)
+0:? 'fi' (invariant temp mediump float)
+0:? 'av' (smooth in mediump 4-component vector of float)
+0:? 'uv2' (uniform mediump 2-component vector of float)
+0:? 'uv3' (invariant uniform mediump 3-component vector of float)
+0:? 'glob2D' (global lowp sampler2D)
+0:? 'vary2D' (smooth in lowp sampler2D)
+0:? 's3D' (uniform mediump sampler3D)
+0:? 's3D2' (uniform highp sampler3D)
+0:? 'sExt' (uniform lowp samplerExternalOES)
+0:? 'mediumExt' (uniform mediump samplerExternalOES)
+0:? 'highExt' (uniform highp samplerExternalOES)
+0:? 's2Dg' (uniform lowp sampler2D)
+0:? 'f123' (global mediump float)
+0:? 'f124' (global mediump float)
+0:? 'sCube' (uniform lowp samplerCube)
+0:? 's' (smooth in structure{global mediump float f})
+0:? 'fi1' (const mediump float)
+0:? 3.000000
+0:? 'fi2' (const mediump float)
+0:? 4.000000
+0:? 'fi3' (const mediump float)
+0:? 5.000000
+0:? 'init1' (global mediump int)
+
diff --git a/chromium/third_party/glslang/src/Test/baseResults/100Limits.vert.out b/chromium/third_party/glslang/src/Test/baseResults/100Limits.vert.out
new file mode 100644
index 00000000000..46c256075ac
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/100Limits.vert.out
@@ -0,0 +1,889 @@
+100Limits.vert
+Shader version: 100
+0:? Sequence
+0:15 Function Definition: foo(f1; (global void)
+0:15 Function Parameters:
+0:15 'a' (inout highp float)
+0:17 Function Definition: bar( (global highp int)
+0:17 Function Parameters:
+0:19 Sequence
+0:19 Branch: Return with expression
+0:19 Constant:
+0:19 1 (const int)
+0:22 Function Definition: main( (global void)
+0:22 Function Parameters:
+0:24 Sequence
+0:24 Loop with condition tested first
+0:24 Loop Condition
+0:24 Compare Less Than (temp bool)
+0:24 'ga' (global highp int)
+0:24 'gb' (global highp int)
+0:24 No loop body
+0:26 Loop with condition not tested first
+0:26 Loop Condition
+0:26 Constant:
+0:26 false (const bool)
+0:26 No loop body
+0:28 Sequence
+0:28 Loop with condition tested first
+0:28 No loop condition
+0:28 No loop body
+0:29 Sequence
+0:29 Loop with condition tested first
+0:29 Loop Condition
+0:29 Compare Equal (temp bool)
+0:29 'ga' (global highp int)
+0:29 'gb' (global highp int)
+0:29 No loop body
+0:30 Sequence
+0:30 Loop with condition tested first
+0:30 No loop condition
+0:30 No loop body
+0:30 Loop Terminal Expression
+0:30 Post-Increment (temp highp float)
+0:30 'f' (global highp float)
+0:31 Sequence
+0:31 move second child to first child (temp highp int)
+0:31 'ga' (global highp int)
+0:31 Constant:
+0:31 0 (const int)
+0:31 Loop with condition tested first
+0:31 No loop condition
+0:31 No loop body
+0:32 Sequence
+0:32 Sequence
+0:32 move second child to first child (temp bool)
+0:32 'a' (temp bool)
+0:32 Constant:
+0:32 false (const bool)
+0:32 Loop with condition tested first
+0:32 No loop condition
+0:32 No loop body
+0:33 Sequence
+0:33 Sequence
+0:33 move second child to first child (temp highp float)
+0:33 'a' (temp highp float)
+0:33 Constant:
+0:33 0.000000
+0:33 Loop with condition tested first
+0:33 Loop Condition
+0:33 Compare Equal (temp bool)
+0:33 'a' (temp highp float)
+0:33 sine (global highp float)
+0:33 'f' (global highp float)
+0:33 No loop body
+0:34 Sequence
+0:34 Sequence
+0:34 move second child to first child (temp highp int)
+0:34 'a' (temp highp int)
+0:34 Constant:
+0:34 0 (const int)
+0:34 Loop with condition tested first
+0:34 Loop Condition
+0:34 Compare Less Than (temp bool)
+0:34 'a' (temp highp int)
+0:34 Constant:
+0:34 10 (const int)
+0:34 No loop body
+0:34 Loop Terminal Expression
+0:34 multiply second child into first child (temp highp int)
+0:34 'a' (temp highp int)
+0:34 Constant:
+0:34 2 (const int)
+0:35 Sequence
+0:35 Sequence
+0:35 move second child to first child (temp highp int)
+0:35 'a' (temp highp int)
+0:35 Constant:
+0:35 0 (const int)
+0:35 Loop with condition tested first
+0:35 Loop Condition
+0:35 Compare Less Than or Equal (temp bool)
+0:35 'a' (temp highp int)
+0:35 Constant:
+0:35 20 (const int)
+0:35 Loop Body
+0:35 Pre-Decrement (temp highp int)
+0:35 'a' (temp highp int)
+0:35 Loop Terminal Expression
+0:35 Post-Increment (temp highp int)
+0:35 'a' (temp highp int)
+0:36 Sequence
+0:36 Sequence
+0:36 move second child to first child (temp highp int)
+0:36 'a' (temp highp int)
+0:36 Constant:
+0:36 0 (const int)
+0:36 Loop with condition tested first
+0:36 Loop Condition
+0:36 Compare Less Than or Equal (temp bool)
+0:36 'a' (temp highp int)
+0:36 Constant:
+0:36 20 (const int)
+0:36 Loop Body
+0:36 Sequence
+0:36 Test condition and select (temp void)
+0:36 Condition
+0:36 Compare Equal (temp bool)
+0:36 'ga' (global highp int)
+0:36 Constant:
+0:36 0 (const int)
+0:36 true case
+0:36 move second child to first child (temp highp int)
+0:36 'a' (temp highp int)
+0:36 Constant:
+0:36 4 (const int)
+0:36 Loop Terminal Expression
+0:36 Post-Increment (temp highp int)
+0:36 'a' (temp highp int)
+0:37 Sequence
+0:37 Sequence
+0:37 move second child to first child (temp highp float)
+0:37 'a' (temp highp float)
+0:37 Constant:
+0:37 0.000000
+0:37 Loop with condition tested first
+0:37 Loop Condition
+0:37 Compare Less Than or Equal (temp bool)
+0:37 'a' (temp highp float)
+0:37 Constant:
+0:37 20.000000
+0:37 No loop body
+0:37 Loop Terminal Expression
+0:37 add second child into first child (temp highp float)
+0:37 'a' (temp highp float)
+0:37 Constant:
+0:37 2.000000
+0:38 Sequence
+0:38 Sequence
+0:38 move second child to first child (temp highp float)
+0:38 'a' (temp highp float)
+0:38 Constant:
+0:38 0.000000
+0:38 Loop with condition tested first
+0:38 Loop Condition
+0:38 Compare Not Equal (temp bool)
+0:38 'a' (temp highp float)
+0:38 Constant:
+0:38 20.000000
+0:38 Loop Body
+0:38 Sequence
+0:38 Test condition and select (temp void)
+0:38 Condition
+0:38 Compare Equal (temp bool)
+0:38 'ga' (global highp int)
+0:38 Constant:
+0:38 0 (const int)
+0:38 true case
+0:38 move second child to first child (temp highp int)
+0:38 'ga' (global highp int)
+0:38 Constant:
+0:38 4 (const int)
+0:38 Loop Terminal Expression
+0:38 subtract second child into first child (temp highp float)
+0:38 'a' (temp highp float)
+0:38 Constant:
+0:38 2.000000
+0:39 Sequence
+0:39 Sequence
+0:39 move second child to first child (temp highp float)
+0:39 'a' (temp highp float)
+0:39 Constant:
+0:39 0.000000
+0:39 Loop with condition tested first
+0:39 Loop Condition
+0:39 Compare Equal (temp bool)
+0:39 'a' (temp highp float)
+0:39 Constant:
+0:39 20.000000
+0:39 Loop Body
+0:39 Sequence
+0:39 Sequence
+0:39 move second child to first child (temp highp float)
+0:39 'a' (temp highp float)
+0:39 Constant:
+0:39 0.000000
+0:39 Loop with condition tested first
+0:39 Loop Condition
+0:39 Compare Equal (temp bool)
+0:39 'a' (temp highp float)
+0:39 Constant:
+0:39 20.000000
+0:39 No loop body
+0:39 Loop Terminal Expression
+0:39 Post-Decrement (temp highp float)
+0:39 'a' (temp highp float)
+0:39 Loop Terminal Expression
+0:39 Post-Decrement (temp highp float)
+0:39 'a' (temp highp float)
+0:40 Sequence
+0:40 Sequence
+0:40 move second child to first child (temp highp float)
+0:40 'a' (temp highp float)
+0:40 Constant:
+0:40 0.000000
+0:40 Loop with condition tested first
+0:40 Loop Condition
+0:40 Compare Less Than or Equal (temp bool)
+0:40 'a' (temp highp float)
+0:40 Constant:
+0:40 20.000000
+0:40 No loop body
+0:40 Loop Terminal Expression
+0:40 add second child into first child (temp highp float)
+0:40 'a' (temp highp float)
+0:40 Constant:
+0:40 2.000000
+0:41 Sequence
+0:41 Sequence
+0:41 move second child to first child (temp highp float)
+0:41 'a' (temp highp float)
+0:41 Constant:
+0:41 0.000000
+0:41 Loop with condition tested first
+0:41 Loop Condition
+0:41 Compare Less Than or Equal (temp bool)
+0:41 'a' (temp highp float)
+0:41 Constant:
+0:41 20.000000
+0:41 No loop body
+0:41 Loop Terminal Expression
+0:41 add second child into first child (temp highp float)
+0:41 'a' (temp highp float)
+0:41 Constant:
+0:41 2.000000
+0:42 Sequence
+0:42 Sequence
+0:42 move second child to first child (temp highp float)
+0:42 'a' (temp highp float)
+0:42 Constant:
+0:42 0.000000
+0:42 Loop with condition tested first
+0:42 Loop Condition
+0:42 Compare Greater Than (temp bool)
+0:42 'a' (temp highp float)
+0:42 Constant:
+0:42 40.000000
+0:42 No loop body
+0:42 Loop Terminal Expression
+0:42 add second child into first child (temp highp float)
+0:42 'a' (temp highp float)
+0:42 Constant:
+0:42 2.000000
+0:43 Sequence
+0:43 Sequence
+0:43 move second child to first child (temp highp float)
+0:43 'a' (temp highp float)
+0:43 Constant:
+0:43 0.000000
+0:43 Loop with condition tested first
+0:43 Loop Condition
+0:43 Compare Greater Than or Equal (temp bool)
+0:43 'a' (temp highp float)
+0:43 Constant:
+0:43 20.000000
+0:43 Loop Body
+0:43 Function Call: foo(f1; (global void)
+0:43 'a' (temp highp float)
+0:43 Loop Terminal Expression
+0:43 add second child into first child (temp highp float)
+0:43 'a' (temp highp float)
+0:43 Constant:
+0:43 2.000000
+0:47 indirect index (temp lowp sampler2D)
+0:47 'fsa' (uniform 3-element array of lowp sampler2D)
+0:47 'ga' (global highp int)
+0:48 indirect index (temp highp float)
+0:48 'fua' (uniform 10-element array of highp float)
+0:48 'ga' (global highp int)
+0:49 indirect index (temp highp 3-component vector of float)
+0:49 'am3' (in highp 3X3 matrix of float)
+0:49 'ga' (global highp int)
+0:50 indirect index (temp highp float)
+0:50 'av2' (in highp 2-component vector of float)
+0:50 'ga' (global highp int)
+0:51 indirect index (smooth temp highp 4-component vector of float)
+0:51 'va' (smooth out 4-element array of highp 4-component vector of float)
+0:51 add (temp highp int)
+0:51 Constant:
+0:51 2 (const int)
+0:51 'ga' (global highp int)
+0:52 indirect index (temp highp 2-component vector of float)
+0:52 Constant:
+0:52 1.000000
+0:52 0.000000
+0:52 0.000000
+0:52 1.000000
+0:52 'ga' (global highp int)
+0:53 indirect index (temp highp float)
+0:53 Constant:
+0:53 2.000000
+0:53 2.000000
+0:53 2.000000
+0:53 divide (temp highp int)
+0:53 'ga' (global highp int)
+0:53 Constant:
+0:53 2 (const int)
+0:54 indirect index (temp highp int)
+0:54 'ia' (temp 9-element array of highp int)
+0:54 'ga' (global highp int)
+0:56 Sequence
+0:56 Sequence
+0:56 move second child to first child (temp highp int)
+0:56 'a' (temp highp int)
+0:56 Constant:
+0:56 3 (const int)
+0:56 Loop with condition tested first
+0:56 Loop Condition
+0:56 Compare Greater Than or Equal (temp bool)
+0:56 'a' (temp highp int)
+0:56 Constant:
+0:56 0 (const int)
+0:56 Loop Body
+0:57 Sequence
+0:57 indirect index (temp lowp sampler2D)
+0:57 'fsa' (uniform 3-element array of lowp sampler2D)
+0:57 'a' (temp highp int)
+0:58 indirect index (temp highp float)
+0:58 'fua' (uniform 10-element array of highp float)
+0:58 add (temp highp int)
+0:58 'a' (temp highp int)
+0:58 Constant:
+0:58 2 (const int)
+0:59 indirect index (temp highp 3-component vector of float)
+0:59 'am3' (in highp 3X3 matrix of float)
+0:59 component-wise multiply (temp highp int)
+0:59 Constant:
+0:59 3 (const int)
+0:59 'a' (temp highp int)
+0:60 indirect index (temp highp float)
+0:60 'av2' (in highp 2-component vector of float)
+0:60 component-wise multiply (temp highp int)
+0:60 Constant:
+0:60 3 (const int)
+0:60 'a' (temp highp int)
+0:61 indirect index (smooth temp highp 4-component vector of float)
+0:61 'va' (smooth out 4-element array of highp 4-component vector of float)
+0:61 subtract (temp highp int)
+0:61 'a' (temp highp int)
+0:61 Constant:
+0:61 1 (const int)
+0:62 indirect index (temp highp 2-component vector of float)
+0:62 Constant:
+0:62 1.000000
+0:62 0.000000
+0:62 0.000000
+0:62 1.000000
+0:62 divide (temp highp int)
+0:62 'a' (temp highp int)
+0:62 Constant:
+0:62 2 (const int)
+0:63 indirect index (temp highp float)
+0:63 Constant:
+0:63 2.000000
+0:63 2.000000
+0:63 2.000000
+0:63 'a' (temp highp int)
+0:64 indirect index (temp highp int)
+0:64 'ia' (temp 9-element array of highp int)
+0:64 'a' (temp highp int)
+0:65 indirect index (temp highp int)
+0:65 'ia' (temp 9-element array of highp int)
+0:65 Function Call: bar( (global highp int)
+0:56 Loop Terminal Expression
+0:56 Post-Decrement (temp highp int)
+0:56 'a' (temp highp int)
+0:68 direct index (temp lowp sampler2D)
+0:68 'fsa' (uniform 3-element array of lowp sampler2D)
+0:68 Constant:
+0:68 2 (const int)
+0:69 direct index (temp highp float)
+0:69 'fua' (uniform 10-element array of highp float)
+0:69 Constant:
+0:69 3 (const int)
+0:70 direct index (temp highp 3-component vector of float)
+0:70 'am3' (in highp 3X3 matrix of float)
+0:70 Constant:
+0:70 2 (const int)
+0:71 direct index (temp highp float)
+0:71 'av2' (in highp 2-component vector of float)
+0:71 Constant:
+0:71 1 (const int)
+0:72 direct index (smooth temp highp 4-component vector of float)
+0:72 'va' (smooth out 4-element array of highp 4-component vector of float)
+0:72 Constant:
+0:72 1 (const int)
+0:73 Constant:
+0:73 0.000000
+0:73 1.000000
+0:74 Constant:
+0:74 2.000000
+0:75 direct index (temp highp int)
+0:75 'ia' (temp 9-element array of highp int)
+0:75 Constant:
+0:75 3 (const int)
+0:? Linker Objects
+0:? 'ga' (global highp int)
+0:? 'gb' (global highp int)
+0:? 'f' (global highp float)
+0:? 'fsa' (uniform 3-element array of lowp sampler2D)
+0:? 'fua' (uniform 10-element array of highp float)
+0:? 'am3' (in highp 3X3 matrix of float)
+0:? 'av2' (in highp 2-component vector of float)
+0:? 'va' (smooth out 4-element array of highp 4-component vector of float)
+0:? 'm2' (const highp 2X2 matrix of float)
+0:? 1.000000
+0:? 0.000000
+0:? 0.000000
+0:? 1.000000
+0:? 'v3' (const highp 3-component vector of float)
+0:? 2.000000
+0:? 2.000000
+0:? 2.000000
+
+
+Linked vertex stage:
+
+
+Shader version: 100
+0:? Sequence
+0:15 Function Definition: foo(f1; (global void)
+0:15 Function Parameters:
+0:15 'a' (inout highp float)
+0:17 Function Definition: bar( (global highp int)
+0:17 Function Parameters:
+0:19 Sequence
+0:19 Branch: Return with expression
+0:19 Constant:
+0:19 1 (const int)
+0:22 Function Definition: main( (global void)
+0:22 Function Parameters:
+0:24 Sequence
+0:24 Loop with condition tested first
+0:24 Loop Condition
+0:24 Compare Less Than (temp bool)
+0:24 'ga' (global highp int)
+0:24 'gb' (global highp int)
+0:24 No loop body
+0:26 Loop with condition not tested first
+0:26 Loop Condition
+0:26 Constant:
+0:26 false (const bool)
+0:26 No loop body
+0:28 Sequence
+0:28 Loop with condition tested first
+0:28 No loop condition
+0:28 No loop body
+0:29 Sequence
+0:29 Loop with condition tested first
+0:29 Loop Condition
+0:29 Compare Equal (temp bool)
+0:29 'ga' (global highp int)
+0:29 'gb' (global highp int)
+0:29 No loop body
+0:30 Sequence
+0:30 Loop with condition tested first
+0:30 No loop condition
+0:30 No loop body
+0:30 Loop Terminal Expression
+0:30 Post-Increment (temp highp float)
+0:30 'f' (global highp float)
+0:31 Sequence
+0:31 move second child to first child (temp highp int)
+0:31 'ga' (global highp int)
+0:31 Constant:
+0:31 0 (const int)
+0:31 Loop with condition tested first
+0:31 No loop condition
+0:31 No loop body
+0:32 Sequence
+0:32 Sequence
+0:32 move second child to first child (temp bool)
+0:32 'a' (temp bool)
+0:32 Constant:
+0:32 false (const bool)
+0:32 Loop with condition tested first
+0:32 No loop condition
+0:32 No loop body
+0:33 Sequence
+0:33 Sequence
+0:33 move second child to first child (temp highp float)
+0:33 'a' (temp highp float)
+0:33 Constant:
+0:33 0.000000
+0:33 Loop with condition tested first
+0:33 Loop Condition
+0:33 Compare Equal (temp bool)
+0:33 'a' (temp highp float)
+0:33 sine (global highp float)
+0:33 'f' (global highp float)
+0:33 No loop body
+0:34 Sequence
+0:34 Sequence
+0:34 move second child to first child (temp highp int)
+0:34 'a' (temp highp int)
+0:34 Constant:
+0:34 0 (const int)
+0:34 Loop with condition tested first
+0:34 Loop Condition
+0:34 Compare Less Than (temp bool)
+0:34 'a' (temp highp int)
+0:34 Constant:
+0:34 10 (const int)
+0:34 No loop body
+0:34 Loop Terminal Expression
+0:34 multiply second child into first child (temp highp int)
+0:34 'a' (temp highp int)
+0:34 Constant:
+0:34 2 (const int)
+0:35 Sequence
+0:35 Sequence
+0:35 move second child to first child (temp highp int)
+0:35 'a' (temp highp int)
+0:35 Constant:
+0:35 0 (const int)
+0:35 Loop with condition tested first
+0:35 Loop Condition
+0:35 Compare Less Than or Equal (temp bool)
+0:35 'a' (temp highp int)
+0:35 Constant:
+0:35 20 (const int)
+0:35 Loop Body
+0:35 Pre-Decrement (temp highp int)
+0:35 'a' (temp highp int)
+0:35 Loop Terminal Expression
+0:35 Post-Increment (temp highp int)
+0:35 'a' (temp highp int)
+0:36 Sequence
+0:36 Sequence
+0:36 move second child to first child (temp highp int)
+0:36 'a' (temp highp int)
+0:36 Constant:
+0:36 0 (const int)
+0:36 Loop with condition tested first
+0:36 Loop Condition
+0:36 Compare Less Than or Equal (temp bool)
+0:36 'a' (temp highp int)
+0:36 Constant:
+0:36 20 (const int)
+0:36 Loop Body
+0:36 Sequence
+0:36 Test condition and select (temp void)
+0:36 Condition
+0:36 Compare Equal (temp bool)
+0:36 'ga' (global highp int)
+0:36 Constant:
+0:36 0 (const int)
+0:36 true case
+0:36 move second child to first child (temp highp int)
+0:36 'a' (temp highp int)
+0:36 Constant:
+0:36 4 (const int)
+0:36 Loop Terminal Expression
+0:36 Post-Increment (temp highp int)
+0:36 'a' (temp highp int)
+0:37 Sequence
+0:37 Sequence
+0:37 move second child to first child (temp highp float)
+0:37 'a' (temp highp float)
+0:37 Constant:
+0:37 0.000000
+0:37 Loop with condition tested first
+0:37 Loop Condition
+0:37 Compare Less Than or Equal (temp bool)
+0:37 'a' (temp highp float)
+0:37 Constant:
+0:37 20.000000
+0:37 No loop body
+0:37 Loop Terminal Expression
+0:37 add second child into first child (temp highp float)
+0:37 'a' (temp highp float)
+0:37 Constant:
+0:37 2.000000
+0:38 Sequence
+0:38 Sequence
+0:38 move second child to first child (temp highp float)
+0:38 'a' (temp highp float)
+0:38 Constant:
+0:38 0.000000
+0:38 Loop with condition tested first
+0:38 Loop Condition
+0:38 Compare Not Equal (temp bool)
+0:38 'a' (temp highp float)
+0:38 Constant:
+0:38 20.000000
+0:38 Loop Body
+0:38 Sequence
+0:38 Test condition and select (temp void)
+0:38 Condition
+0:38 Compare Equal (temp bool)
+0:38 'ga' (global highp int)
+0:38 Constant:
+0:38 0 (const int)
+0:38 true case
+0:38 move second child to first child (temp highp int)
+0:38 'ga' (global highp int)
+0:38 Constant:
+0:38 4 (const int)
+0:38 Loop Terminal Expression
+0:38 subtract second child into first child (temp highp float)
+0:38 'a' (temp highp float)
+0:38 Constant:
+0:38 2.000000
+0:39 Sequence
+0:39 Sequence
+0:39 move second child to first child (temp highp float)
+0:39 'a' (temp highp float)
+0:39 Constant:
+0:39 0.000000
+0:39 Loop with condition tested first
+0:39 Loop Condition
+0:39 Compare Equal (temp bool)
+0:39 'a' (temp highp float)
+0:39 Constant:
+0:39 20.000000
+0:39 Loop Body
+0:39 Sequence
+0:39 Sequence
+0:39 move second child to first child (temp highp float)
+0:39 'a' (temp highp float)
+0:39 Constant:
+0:39 0.000000
+0:39 Loop with condition tested first
+0:39 Loop Condition
+0:39 Compare Equal (temp bool)
+0:39 'a' (temp highp float)
+0:39 Constant:
+0:39 20.000000
+0:39 No loop body
+0:39 Loop Terminal Expression
+0:39 Post-Decrement (temp highp float)
+0:39 'a' (temp highp float)
+0:39 Loop Terminal Expression
+0:39 Post-Decrement (temp highp float)
+0:39 'a' (temp highp float)
+0:40 Sequence
+0:40 Sequence
+0:40 move second child to first child (temp highp float)
+0:40 'a' (temp highp float)
+0:40 Constant:
+0:40 0.000000
+0:40 Loop with condition tested first
+0:40 Loop Condition
+0:40 Compare Less Than or Equal (temp bool)
+0:40 'a' (temp highp float)
+0:40 Constant:
+0:40 20.000000
+0:40 No loop body
+0:40 Loop Terminal Expression
+0:40 add second child into first child (temp highp float)
+0:40 'a' (temp highp float)
+0:40 Constant:
+0:40 2.000000
+0:41 Sequence
+0:41 Sequence
+0:41 move second child to first child (temp highp float)
+0:41 'a' (temp highp float)
+0:41 Constant:
+0:41 0.000000
+0:41 Loop with condition tested first
+0:41 Loop Condition
+0:41 Compare Less Than or Equal (temp bool)
+0:41 'a' (temp highp float)
+0:41 Constant:
+0:41 20.000000
+0:41 No loop body
+0:41 Loop Terminal Expression
+0:41 add second child into first child (temp highp float)
+0:41 'a' (temp highp float)
+0:41 Constant:
+0:41 2.000000
+0:42 Sequence
+0:42 Sequence
+0:42 move second child to first child (temp highp float)
+0:42 'a' (temp highp float)
+0:42 Constant:
+0:42 0.000000
+0:42 Loop with condition tested first
+0:42 Loop Condition
+0:42 Compare Greater Than (temp bool)
+0:42 'a' (temp highp float)
+0:42 Constant:
+0:42 40.000000
+0:42 No loop body
+0:42 Loop Terminal Expression
+0:42 add second child into first child (temp highp float)
+0:42 'a' (temp highp float)
+0:42 Constant:
+0:42 2.000000
+0:43 Sequence
+0:43 Sequence
+0:43 move second child to first child (temp highp float)
+0:43 'a' (temp highp float)
+0:43 Constant:
+0:43 0.000000
+0:43 Loop with condition tested first
+0:43 Loop Condition
+0:43 Compare Greater Than or Equal (temp bool)
+0:43 'a' (temp highp float)
+0:43 Constant:
+0:43 20.000000
+0:43 Loop Body
+0:43 Function Call: foo(f1; (global void)
+0:43 'a' (temp highp float)
+0:43 Loop Terminal Expression
+0:43 add second child into first child (temp highp float)
+0:43 'a' (temp highp float)
+0:43 Constant:
+0:43 2.000000
+0:47 indirect index (temp lowp sampler2D)
+0:47 'fsa' (uniform 3-element array of lowp sampler2D)
+0:47 'ga' (global highp int)
+0:48 indirect index (temp highp float)
+0:48 'fua' (uniform 10-element array of highp float)
+0:48 'ga' (global highp int)
+0:49 indirect index (temp highp 3-component vector of float)
+0:49 'am3' (in highp 3X3 matrix of float)
+0:49 'ga' (global highp int)
+0:50 indirect index (temp highp float)
+0:50 'av2' (in highp 2-component vector of float)
+0:50 'ga' (global highp int)
+0:51 indirect index (smooth temp highp 4-component vector of float)
+0:51 'va' (smooth out 4-element array of highp 4-component vector of float)
+0:51 add (temp highp int)
+0:51 Constant:
+0:51 2 (const int)
+0:51 'ga' (global highp int)
+0:52 indirect index (temp highp 2-component vector of float)
+0:52 Constant:
+0:52 1.000000
+0:52 0.000000
+0:52 0.000000
+0:52 1.000000
+0:52 'ga' (global highp int)
+0:53 indirect index (temp highp float)
+0:53 Constant:
+0:53 2.000000
+0:53 2.000000
+0:53 2.000000
+0:53 divide (temp highp int)
+0:53 'ga' (global highp int)
+0:53 Constant:
+0:53 2 (const int)
+0:54 indirect index (temp highp int)
+0:54 'ia' (temp 9-element array of highp int)
+0:54 'ga' (global highp int)
+0:56 Sequence
+0:56 Sequence
+0:56 move second child to first child (temp highp int)
+0:56 'a' (temp highp int)
+0:56 Constant:
+0:56 3 (const int)
+0:56 Loop with condition tested first
+0:56 Loop Condition
+0:56 Compare Greater Than or Equal (temp bool)
+0:56 'a' (temp highp int)
+0:56 Constant:
+0:56 0 (const int)
+0:56 Loop Body
+0:57 Sequence
+0:57 indirect index (temp lowp sampler2D)
+0:57 'fsa' (uniform 3-element array of lowp sampler2D)
+0:57 'a' (temp highp int)
+0:58 indirect index (temp highp float)
+0:58 'fua' (uniform 10-element array of highp float)
+0:58 add (temp highp int)
+0:58 'a' (temp highp int)
+0:58 Constant:
+0:58 2 (const int)
+0:59 indirect index (temp highp 3-component vector of float)
+0:59 'am3' (in highp 3X3 matrix of float)
+0:59 component-wise multiply (temp highp int)
+0:59 Constant:
+0:59 3 (const int)
+0:59 'a' (temp highp int)
+0:60 indirect index (temp highp float)
+0:60 'av2' (in highp 2-component vector of float)
+0:60 component-wise multiply (temp highp int)
+0:60 Constant:
+0:60 3 (const int)
+0:60 'a' (temp highp int)
+0:61 indirect index (smooth temp highp 4-component vector of float)
+0:61 'va' (smooth out 4-element array of highp 4-component vector of float)
+0:61 subtract (temp highp int)
+0:61 'a' (temp highp int)
+0:61 Constant:
+0:61 1 (const int)
+0:62 indirect index (temp highp 2-component vector of float)
+0:62 Constant:
+0:62 1.000000
+0:62 0.000000
+0:62 0.000000
+0:62 1.000000
+0:62 divide (temp highp int)
+0:62 'a' (temp highp int)
+0:62 Constant:
+0:62 2 (const int)
+0:63 indirect index (temp highp float)
+0:63 Constant:
+0:63 2.000000
+0:63 2.000000
+0:63 2.000000
+0:63 'a' (temp highp int)
+0:64 indirect index (temp highp int)
+0:64 'ia' (temp 9-element array of highp int)
+0:64 'a' (temp highp int)
+0:65 indirect index (temp highp int)
+0:65 'ia' (temp 9-element array of highp int)
+0:65 Function Call: bar( (global highp int)
+0:56 Loop Terminal Expression
+0:56 Post-Decrement (temp highp int)
+0:56 'a' (temp highp int)
+0:68 direct index (temp lowp sampler2D)
+0:68 'fsa' (uniform 3-element array of lowp sampler2D)
+0:68 Constant:
+0:68 2 (const int)
+0:69 direct index (temp highp float)
+0:69 'fua' (uniform 10-element array of highp float)
+0:69 Constant:
+0:69 3 (const int)
+0:70 direct index (temp highp 3-component vector of float)
+0:70 'am3' (in highp 3X3 matrix of float)
+0:70 Constant:
+0:70 2 (const int)
+0:71 direct index (temp highp float)
+0:71 'av2' (in highp 2-component vector of float)
+0:71 Constant:
+0:71 1 (const int)
+0:72 direct index (smooth temp highp 4-component vector of float)
+0:72 'va' (smooth out 4-element array of highp 4-component vector of float)
+0:72 Constant:
+0:72 1 (const int)
+0:73 Constant:
+0:73 0.000000
+0:73 1.000000
+0:74 Constant:
+0:74 2.000000
+0:75 direct index (temp highp int)
+0:75 'ia' (temp 9-element array of highp int)
+0:75 Constant:
+0:75 3 (const int)
+0:? Linker Objects
+0:? 'ga' (global highp int)
+0:? 'gb' (global highp int)
+0:? 'f' (global highp float)
+0:? 'fsa' (uniform 3-element array of lowp sampler2D)
+0:? 'fua' (uniform 10-element array of highp float)
+0:? 'am3' (in highp 3X3 matrix of float)
+0:? 'av2' (in highp 2-component vector of float)
+0:? 'va' (smooth out 4-element array of highp 4-component vector of float)
+0:? 'm2' (const highp 2X2 matrix of float)
+0:? 1.000000
+0:? 0.000000
+0:? 0.000000
+0:? 1.000000
+0:? 'v3' (const highp 3-component vector of float)
+0:? 2.000000
+0:? 2.000000
+0:? 2.000000
+
diff --git a/chromium/third_party/glslang/src/Test/baseResults/100LimitsConf.vert.out b/chromium/third_party/glslang/src/Test/baseResults/100LimitsConf.vert.out
new file mode 100644
index 00000000000..e27c2cc70cf
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/100LimitsConf.vert.out
@@ -0,0 +1,28 @@
+100Limits.vert
+ERROR: 0:24: 'limitation' : while loops not available
+ERROR: 0:26: 'limitation' : do-while loops not available
+ERROR: 0:28: 'limitations' : inductive-loop init-declaration requires the form "type-specifier loop-index = constant-expression"
+ERROR: 0:29: 'limitations' : inductive-loop init-declaration requires the form "type-specifier loop-index = constant-expression"
+ERROR: 0:30: 'limitations' : inductive-loop init-declaration requires the form "type-specifier loop-index = constant-expression"
+ERROR: 0:31: 'limitations' : inductive-loop init-declaration requires the form "type-specifier loop-index = constant-expression"
+ERROR: 0:32: 'limitations' : inductive loop requires a scalar 'int' or 'float' loop index
+ERROR: 0:33: 'limitations' : inductive-loop condition requires the form "loop-index <comparison-op> constant-expression"
+ERROR: 0:34: 'limitations' : inductive-loop termination requires the form "loop-index++, loop-index--, loop-index += constant-expression, or loop-index -= constant-expression"
+ERROR: 0:35: 'limitations' : inductive loop index modified
+ERROR: 0:36: 'limitations' : inductive loop index modified
+ERROR: 0:43: 'limitations' : inductive loop index modified
+ERROR: 0:47: 'limitations' : Non-constant-index-expression
+ERROR: 0:49: 'limitations' : Non-constant-index-expression
+ERROR: 0:50: 'limitations' : Non-constant-index-expression
+ERROR: 0:51: 'limitations' : Non-constant-index-expression
+ERROR: 0:52: 'limitations' : Non-constant-index-expression
+ERROR: 0:53: 'limitations' : Non-constant-index-expression
+ERROR: 0:54: 'limitations' : Non-constant-index-expression
+ERROR: 0:65: 'limitations' : Non-constant-index-expression
+ERROR: 20 compilation errors. No code generated.
+
+
+
+Linked vertex stage:
+
+
diff --git a/chromium/third_party/glslang/src/Test/baseResults/100scope.vert.out b/chromium/third_party/glslang/src/Test/baseResults/100scope.vert.out
new file mode 100644
index 00000000000..2b542b0c679
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/100scope.vert.out
@@ -0,0 +1,240 @@
+100scope.vert
+ERROR: 0:5: 'a' : redefinition
+ERROR: 0:17: 'b' : function name is redeclaration of existing name
+ERROR: 0:20: 'c' : redefinition
+ERROR: 0:22: 'f' : redefinition
+ERROR: 0:24: 'redefinition of built-in function' : not supported with this profile: es
+ERROR: 0:24: 'highp' : overloaded functions must have the same parameter precision qualifiers for argument 1
+ERROR: 0:25: 'redefinition of built-in function' : not supported with this profile: es
+ERROR: 0:25: 'highp' : overloaded functions must have the same parameter precision qualifiers for argument 1
+ERROR: 0:38: 'local function declaration' : not supported with this profile: es
+ERROR: 0:43: 'sin' : can't use function syntax on variable
+ERROR: 0:57: 'z' : undeclared identifier
+ERROR: 0:57: 'z' : redefinition
+ERROR: 0:73: 'degrees' : can't use function syntax on variable
+ERROR: 0:76: 'vertex-shader struct output' : not supported for this version or the enabled extensions
+ERROR: 14 compilation errors. No code generated.
+
+
+Shader version: 100
+ERROR: node is still EOpNull!
+0:3 Function Definition: f(i1;i1;i1; (global highp int)
+0:3 Function Parameters:
+0:3 'a' (in highp int)
+0:3 'b' (in highp int)
+0:3 'c' (in highp int)
+0:? Sequence
+0:8 Sequence
+0:8 Sequence
+0:8 move second child to first child (temp highp float)
+0:8 'a' (temp highp float)
+0:8 add (temp highp float)
+0:8 Convert int to float (temp highp float)
+0:8 'a' (in highp int)
+0:8 Constant:
+0:8 1.000000
+0:11 Branch: Return with expression
+0:11 'a' (in highp int)
+0:25 Function Definition: cos(f1; (global highp float)
+0:25 Function Parameters:
+0:25 'x' (in highp float)
+0:27 Sequence
+0:27 Branch: Return with expression
+0:27 Constant:
+0:27 1.000000
+0:29 Function Definition: radians(b1; (global bool)
+0:29 Function Parameters:
+0:29 'x' (in bool)
+0:31 Sequence
+0:31 Branch: Return with expression
+0:31 Constant:
+0:31 true (const bool)
+0:36 Function Definition: main( (global void)
+0:36 Function Parameters:
+0:? Sequence
+0:39 Function Call: g( (temp highp int)
+0:42 'sin' (temp highp float)
+0:43 Constant:
+0:43 0.000000
+0:44 Function Call: f(i1;i1;i1; (global highp int)
+0:44 Constant:
+0:44 1 (const int)
+0:44 Constant:
+0:44 2 (const int)
+0:44 Constant:
+0:44 3 (const int)
+0:47 move second child to first child (temp highp float)
+0:47 'f' (temp highp float)
+0:47 Constant:
+0:47 3.000000
+0:49 move second child to first child (temp highp 4-component vector of float)
+0:49 'gl_Position' (invariant gl_Position highp 4-component vector of float Position)
+0:49 Construct vec4 (temp highp 4-component vector of float)
+0:49 'f' (temp highp float)
+0:51 Sequence
+0:51 Sequence
+0:51 move second child to first child (temp highp int)
+0:51 'f' (temp highp int)
+0:51 Constant:
+0:51 0 (const int)
+0:51 Loop with condition tested first
+0:51 Loop Condition
+0:51 Compare Less Than (temp bool)
+0:51 'f' (temp highp int)
+0:51 Constant:
+0:51 10 (const int)
+0:51 Loop Body
+0:52 Pre-Increment (temp highp int)
+0:52 'f' (temp highp int)
+0:51 Loop Terminal Expression
+0:51 Pre-Increment (temp highp int)
+0:51 'f' (temp highp int)
+0:54 Sequence
+0:54 move second child to first child (temp highp int)
+0:54 'x' (temp highp int)
+0:54 Constant:
+0:54 1 (const int)
+0:56 Sequence
+0:56 Sequence
+0:56 move second child to first child (temp highp float)
+0:56 'x' (temp highp float)
+0:56 Constant:
+0:56 2.000000
+0:56 move second child to first child (temp highp float)
+0:56 'y' (temp highp float)
+0:56 'x' (temp highp float)
+0:60 Sequence
+0:60 Sequence
+0:60 move second child to first child (temp highp int)
+0:60 'x' (temp highp int)
+0:60 'x' (temp highp int)
+0:68 Sequence
+0:68 Sequence
+0:68 move second child to first child (temp structure{temp highp int x})
+0:68 'S' (temp structure{temp highp int x})
+0:68 Constant:
+0:68 0 (const int)
+0:69 x: direct index for structure (temp highp int)
+0:69 'S' (temp structure{temp highp int x})
+0:69 Constant:
+0:69 0 (const int)
+0:73 Constant:
+0:73 0.000000
+0:? Linker Objects
+0:? 'b' (global bool)
+0:? 'tan' (global highp float)
+0:? 's' (smooth out structure{global highp float f})
+
+
+Linked vertex stage:
+
+
+Shader version: 100
+ERROR: node is still EOpNull!
+0:3 Function Definition: f(i1;i1;i1; (global highp int)
+0:3 Function Parameters:
+0:3 'a' (in highp int)
+0:3 'b' (in highp int)
+0:3 'c' (in highp int)
+0:? Sequence
+0:8 Sequence
+0:8 Sequence
+0:8 move second child to first child (temp highp float)
+0:8 'a' (temp highp float)
+0:8 add (temp highp float)
+0:8 Convert int to float (temp highp float)
+0:8 'a' (in highp int)
+0:8 Constant:
+0:8 1.000000
+0:11 Branch: Return with expression
+0:11 'a' (in highp int)
+0:25 Function Definition: cos(f1; (global highp float)
+0:25 Function Parameters:
+0:25 'x' (in highp float)
+0:27 Sequence
+0:27 Branch: Return with expression
+0:27 Constant:
+0:27 1.000000
+0:29 Function Definition: radians(b1; (global bool)
+0:29 Function Parameters:
+0:29 'x' (in bool)
+0:31 Sequence
+0:31 Branch: Return with expression
+0:31 Constant:
+0:31 true (const bool)
+0:36 Function Definition: main( (global void)
+0:36 Function Parameters:
+0:? Sequence
+0:39 Function Call: g( (temp highp int)
+0:42 'sin' (temp highp float)
+0:43 Constant:
+0:43 0.000000
+0:44 Function Call: f(i1;i1;i1; (global highp int)
+0:44 Constant:
+0:44 1 (const int)
+0:44 Constant:
+0:44 2 (const int)
+0:44 Constant:
+0:44 3 (const int)
+0:47 move second child to first child (temp highp float)
+0:47 'f' (temp highp float)
+0:47 Constant:
+0:47 3.000000
+0:49 move second child to first child (temp highp 4-component vector of float)
+0:49 'gl_Position' (invariant gl_Position highp 4-component vector of float Position)
+0:49 Construct vec4 (temp highp 4-component vector of float)
+0:49 'f' (temp highp float)
+0:51 Sequence
+0:51 Sequence
+0:51 move second child to first child (temp highp int)
+0:51 'f' (temp highp int)
+0:51 Constant:
+0:51 0 (const int)
+0:51 Loop with condition tested first
+0:51 Loop Condition
+0:51 Compare Less Than (temp bool)
+0:51 'f' (temp highp int)
+0:51 Constant:
+0:51 10 (const int)
+0:51 Loop Body
+0:52 Pre-Increment (temp highp int)
+0:52 'f' (temp highp int)
+0:51 Loop Terminal Expression
+0:51 Pre-Increment (temp highp int)
+0:51 'f' (temp highp int)
+0:54 Sequence
+0:54 move second child to first child (temp highp int)
+0:54 'x' (temp highp int)
+0:54 Constant:
+0:54 1 (const int)
+0:56 Sequence
+0:56 Sequence
+0:56 move second child to first child (temp highp float)
+0:56 'x' (temp highp float)
+0:56 Constant:
+0:56 2.000000
+0:56 move second child to first child (temp highp float)
+0:56 'y' (temp highp float)
+0:56 'x' (temp highp float)
+0:60 Sequence
+0:60 Sequence
+0:60 move second child to first child (temp highp int)
+0:60 'x' (temp highp int)
+0:60 'x' (temp highp int)
+0:68 Sequence
+0:68 Sequence
+0:68 move second child to first child (temp structure{temp highp int x})
+0:68 'S' (temp structure{temp highp int x})
+0:68 Constant:
+0:68 0 (const int)
+0:69 x: direct index for structure (temp highp int)
+0:69 'S' (temp structure{temp highp int x})
+0:69 Constant:
+0:69 0 (const int)
+0:73 Constant:
+0:73 0.000000
+0:? Linker Objects
+0:? 'b' (global bool)
+0:? 'tan' (global highp float)
+0:? 's' (smooth out structure{global highp float f})
+
diff --git a/chromium/third_party/glslang/src/Test/baseResults/110scope.vert.out b/chromium/third_party/glslang/src/Test/baseResults/110scope.vert.out
new file mode 100644
index 00000000000..5f41b86bae7
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/110scope.vert.out
@@ -0,0 +1,256 @@
+110scope.vert
+ERROR: 0:5: 'a' : redefinition
+ERROR: 0:34: 'f' : can't call user function from global scope
+ERROR: 0:57: 'z' : undeclared identifier
+ERROR: 0:57: 'z' : redefinition
+ERROR: 4 compilation errors. No code generated.
+
+
+Shader version: 110
+ERROR: node is still EOpNull!
+0:3 Function Definition: f(i1;i1;i1; (global int)
+0:3 Function Parameters:
+0:3 'a' (in int)
+0:3 'b' (in int)
+0:3 'c' (in int)
+0:? Sequence
+0:8 Sequence
+0:8 Sequence
+0:8 move second child to first child (temp float)
+0:8 'a' (temp float)
+0:8 add (temp float)
+0:8 Convert int to float (temp float)
+0:8 'a' (in int)
+0:8 Constant:
+0:8 1.000000
+0:11 Branch: Return with expression
+0:11 'a' (in int)
+0:25 Function Definition: cos(f1; (global float)
+0:25 Function Parameters:
+0:25 'x' (in float)
+0:27 Sequence
+0:27 Branch: Return with expression
+0:27 Constant:
+0:27 1.000000
+0:29 Function Definition: radians(b1; (global bool)
+0:29 Function Parameters:
+0:29 'x' (in bool)
+0:31 Sequence
+0:31 Branch: Return with expression
+0:31 Constant:
+0:31 true (const bool)
+0:34 Sequence
+0:34 move second child to first child (temp int)
+0:34 'gi' (global int)
+0:34 Function Call: f(i1;i1;i1; (global int)
+0:34 Constant:
+0:34 1 (const int)
+0:34 Constant:
+0:34 2 (const int)
+0:34 Constant:
+0:34 3 (const int)
+0:36 Function Definition: main( (global void)
+0:36 Function Parameters:
+0:? Sequence
+0:39 Function Call: g( (temp int)
+0:42 'sin' (temp float)
+0:43 Function Call: sin(f1; (global float)
+0:43 Constant:
+0:43 0.700000
+0:44 Function Call: f(i1;i1;i1; (global int)
+0:44 Constant:
+0:44 1 (const int)
+0:44 Constant:
+0:44 2 (const int)
+0:44 Constant:
+0:44 3 (const int)
+0:47 move second child to first child (temp float)
+0:47 'f' (temp float)
+0:47 Constant:
+0:47 3.000000
+0:49 move second child to first child (temp 4-component vector of float)
+0:49 'gl_Position' (gl_Position 4-component vector of float Position)
+0:49 Construct vec4 (temp 4-component vector of float)
+0:49 'f' (temp float)
+0:51 Sequence
+0:51 Sequence
+0:51 move second child to first child (temp int)
+0:51 'f' (temp int)
+0:51 Constant:
+0:51 0 (const int)
+0:51 Loop with condition tested first
+0:51 Loop Condition
+0:51 Compare Less Than (temp bool)
+0:51 'f' (temp int)
+0:51 Constant:
+0:51 10 (const int)
+0:51 Loop Body
+0:52 Pre-Increment (temp int)
+0:52 'f' (temp int)
+0:51 Loop Terminal Expression
+0:51 Pre-Increment (temp int)
+0:51 'f' (temp int)
+0:54 Sequence
+0:54 move second child to first child (temp int)
+0:54 'x' (temp int)
+0:54 Constant:
+0:54 1 (const int)
+0:56 Sequence
+0:56 Sequence
+0:56 move second child to first child (temp float)
+0:56 'x' (temp float)
+0:56 Constant:
+0:56 2.000000
+0:56 move second child to first child (temp float)
+0:56 'y' (temp float)
+0:56 'x' (temp float)
+0:60 Sequence
+0:60 Sequence
+0:60 move second child to first child (temp int)
+0:60 'x' (temp int)
+0:60 'x' (temp int)
+0:68 Sequence
+0:68 Sequence
+0:68 move second child to first child (temp structure{temp int x})
+0:68 'S' (temp structure{temp int x})
+0:68 Constant:
+0:68 0 (const int)
+0:69 x: direct index for structure (temp int)
+0:69 'S' (temp structure{temp int x})
+0:69 Constant:
+0:69 0 (const int)
+0:73 Constant:
+0:73 183.346494
+0:? Linker Objects
+0:? 'b' (global bool)
+0:? 'c' (global bool)
+0:? 'f' (global float)
+0:? 'tan' (global float)
+0:? 'gi' (global int)
+
+
+Linked vertex stage:
+
+
+Shader version: 110
+ERROR: node is still EOpNull!
+0:3 Function Definition: f(i1;i1;i1; (global int)
+0:3 Function Parameters:
+0:3 'a' (in int)
+0:3 'b' (in int)
+0:3 'c' (in int)
+0:? Sequence
+0:8 Sequence
+0:8 Sequence
+0:8 move second child to first child (temp float)
+0:8 'a' (temp float)
+0:8 add (temp float)
+0:8 Convert int to float (temp float)
+0:8 'a' (in int)
+0:8 Constant:
+0:8 1.000000
+0:11 Branch: Return with expression
+0:11 'a' (in int)
+0:25 Function Definition: cos(f1; (global float)
+0:25 Function Parameters:
+0:25 'x' (in float)
+0:27 Sequence
+0:27 Branch: Return with expression
+0:27 Constant:
+0:27 1.000000
+0:29 Function Definition: radians(b1; (global bool)
+0:29 Function Parameters:
+0:29 'x' (in bool)
+0:31 Sequence
+0:31 Branch: Return with expression
+0:31 Constant:
+0:31 true (const bool)
+0:34 Sequence
+0:34 move second child to first child (temp int)
+0:34 'gi' (global int)
+0:34 Function Call: f(i1;i1;i1; (global int)
+0:34 Constant:
+0:34 1 (const int)
+0:34 Constant:
+0:34 2 (const int)
+0:34 Constant:
+0:34 3 (const int)
+0:36 Function Definition: main( (global void)
+0:36 Function Parameters:
+0:? Sequence
+0:39 Function Call: g( (temp int)
+0:42 'sin' (temp float)
+0:43 Function Call: sin(f1; (global float)
+0:43 Constant:
+0:43 0.700000
+0:44 Function Call: f(i1;i1;i1; (global int)
+0:44 Constant:
+0:44 1 (const int)
+0:44 Constant:
+0:44 2 (const int)
+0:44 Constant:
+0:44 3 (const int)
+0:47 move second child to first child (temp float)
+0:47 'f' (temp float)
+0:47 Constant:
+0:47 3.000000
+0:49 move second child to first child (temp 4-component vector of float)
+0:49 'gl_Position' (gl_Position 4-component vector of float Position)
+0:49 Construct vec4 (temp 4-component vector of float)
+0:49 'f' (temp float)
+0:51 Sequence
+0:51 Sequence
+0:51 move second child to first child (temp int)
+0:51 'f' (temp int)
+0:51 Constant:
+0:51 0 (const int)
+0:51 Loop with condition tested first
+0:51 Loop Condition
+0:51 Compare Less Than (temp bool)
+0:51 'f' (temp int)
+0:51 Constant:
+0:51 10 (const int)
+0:51 Loop Body
+0:52 Pre-Increment (temp int)
+0:52 'f' (temp int)
+0:51 Loop Terminal Expression
+0:51 Pre-Increment (temp int)
+0:51 'f' (temp int)
+0:54 Sequence
+0:54 move second child to first child (temp int)
+0:54 'x' (temp int)
+0:54 Constant:
+0:54 1 (const int)
+0:56 Sequence
+0:56 Sequence
+0:56 move second child to first child (temp float)
+0:56 'x' (temp float)
+0:56 Constant:
+0:56 2.000000
+0:56 move second child to first child (temp float)
+0:56 'y' (temp float)
+0:56 'x' (temp float)
+0:60 Sequence
+0:60 Sequence
+0:60 move second child to first child (temp int)
+0:60 'x' (temp int)
+0:60 'x' (temp int)
+0:68 Sequence
+0:68 Sequence
+0:68 move second child to first child (temp structure{temp int x})
+0:68 'S' (temp structure{temp int x})
+0:68 Constant:
+0:68 0 (const int)
+0:69 x: direct index for structure (temp int)
+0:69 'S' (temp structure{temp int x})
+0:69 Constant:
+0:69 0 (const int)
+0:73 Constant:
+0:73 183.346494
+0:? Linker Objects
+0:? 'b' (global bool)
+0:? 'c' (global bool)
+0:? 'f' (global float)
+0:? 'tan' (global float)
+0:? 'gi' (global int)
+
diff --git a/chromium/third_party/glslang/src/Test/baseResults/120.frag.out b/chromium/third_party/glslang/src/Test/baseResults/120.frag.out
new file mode 100644
index 00000000000..0d10b0e9fbe
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/120.frag.out
@@ -0,0 +1,1193 @@
+120.frag
+ERROR: 0:9: 'in for stage inputs' : not supported for this version or the enabled extensions
+ERROR: 0:10: 'out for stage outputs' : not supported for this version or the enabled extensions
+ERROR: 0:54: '+' : wrong operand types: no operation '+' exists that takes a left-hand operand of type 'temp 2-component vector of float' and a right operand of type 'temp 3-component vector of float' (or there is no acceptable conversion)
+ERROR: 0:55: '*' : wrong operand types: no operation '*' exists that takes a left-hand operand of type 'uniform 4X2 matrix of float' and a right operand of type 'temp 3-component vector of float' (or there is no acceptable conversion)
+ERROR: 0:56: '+' : wrong operand types: no operation '+' exists that takes a left-hand operand of type 'uniform 4X2 matrix of float' and a right operand of type 'smooth in 4-component vector of float' (or there is no acceptable conversion)
+ERROR: 0:57: '=' : cannot convert from 'const float' to 'temp int'
+ERROR: 0:58: 'assign' : cannot convert from 'temp bool' to 'temp float'
+ERROR: 0:59: '+' : wrong operand types: no operation '+' exists that takes a left-hand operand of type 'temp int' and a right operand of type 'temp bool' (or there is no acceptable conversion)
+ERROR: 0:60: '*' : wrong operand types: no operation '*' exists that takes a left-hand operand of type 'temp bool' and a right operand of type 'temp int' (or there is no acceptable conversion)
+ERROR: 0:60: 'assign' : cannot convert from 'temp bool' to 'temp float'
+ERROR: 0:61: 'assign' : cannot convert from 'temp int' to 'temp bool'
+ERROR: 0:62: '+' : wrong operand types: no operation '+' exists that takes a left-hand operand of type 'temp bool' and a right operand of type 'temp float' (or there is no acceptable conversion)
+ERROR: 0:63: 'bitwise-or assign' : not supported for this version or the enabled extensions
+ERROR: 0:63: 'assign' : cannot convert from 'temp bool' to 'temp float'
+ERROR: 0:79: ':' : wrong operand types: no operation ':' exists that takes a left-hand operand of type 'temp 4-component vector of float' and a right operand of type 'temp 4X4 matrix of float' (or there is no acceptable conversion)
+ERROR: 0:79: 'assign' : cannot convert from 'temp 4X4 matrix of float' to 'fragColor 4-component vector of float FragColor'
+ERROR: 0:82: 'xr' : illegal - vector component fields not from the same set
+ERROR: 0:83: 'xyxyx' : illegal vector field selection
+ERROR: 0:83: 'scalar swizzle' : not supported for this version or the enabled extensions
+ERROR: 0:83: 'xy' : vector field selection out of range
+ERROR: 0:84: 'z' : vector field selection out of range
+ERROR: 0:85: 'assign' : l-value required
+ERROR: 0:91: 'int' : overloaded functions must have the same return type
+ERROR: 0:91: 'main' : function already has a body
+ERROR: 0:91: 'int' : main function cannot return a value
+ERROR: 0:92: 'main' : function cannot take any parameter(s)
+ERROR: 0:94: 'a' : variables with qualifier 'const' must be initialized
+ERROR: 0:97: 'out' : overloaded functions must have the same parameter storage qualifiers for argument 1
+ERROR: 0:99: 'return' : type does not match, or is not convertible to, the function's return type
+ERROR: 0:115: 'return' : void function cannot return a value
+ERROR: 0:125: 'gl_TexCoord' : redeclaration of array with size
+ERROR: 0:152: 'matrixCompMult' : no matching overloaded function found
+ERROR: 0:152: '=' : cannot convert from 'const float' to 'temp 3X2 matrix of float'
+ERROR: 0:153: 'matrixCompMult' : no matching overloaded function found
+ERROR: 0:153: '=' : cannot convert from 'const float' to 'temp 3X4 matrix of float'
+ERROR: 0:160: 'constructor' : not enough data provided for construction
+ERROR: 0:160: '=' : cannot convert from 'const float' to 'temp 4X4 matrix of float'
+ERROR: 0:161: 'constructor' : too many arguments
+ERROR: 0:161: '=' : cannot convert from 'const float' to 'temp 4X4 matrix of float'
+ERROR: 0:165: 'constructor' : matrix constructed from matrix can only have one argument
+ERROR: 0:166: 'constructor' : matrix constructed from matrix can only have one argument
+ERROR: 0:172: 'constructor' : array constructor needs one argument per array element
+ERROR: 0:172: '=' : cannot convert from 'const float' to 'temp 2-element array of 3X3 matrix of float'
+ERROR: 0:184: 'texture2DLod' : required extension not requested: GL_ARB_shader_texture_lod
+ERROR: 0:185: 'texture3DProjLod' : required extension not requested: GL_ARB_shader_texture_lod
+ERROR: 0:186: 'texture1DProjLod' : required extension not requested: GL_ARB_shader_texture_lod
+ERROR: 0:187: 'shadow2DProjLod' : required extension not requested: GL_ARB_shader_texture_lod
+ERROR: 0:189: 'texture1DGradARB' : required extension not requested: GL_ARB_shader_texture_lod
+ERROR: 0:190: 'texture2DProjGradARB' : required extension not requested: GL_ARB_shader_texture_lod
+ERROR: 0:191: 'shadow2DProjGradARB' : required extension not requested: GL_ARB_shader_texture_lod
+ERROR: 0:209: 'shadow2DRectProjGradARB' : no matching overloaded function found
+ERROR: 0:209: 'assign' : cannot convert from 'const float' to 'temp 4-component vector of float'
+ERROR: 0:212: 'sampler2DRect' : Reserved word.
+ERROR: 53 compilation errors. No code generated.
+
+
+Shader version: 120
+Requested GL_ARB_shader_texture_lod
+Requested GL_ARB_texture_rectangle
+ERROR: node is still EOpNull!
+0:21 Function Definition: main( (global void)
+0:21 Function Parameters:
+0:23 Sequence
+0:23 Sequence
+0:23 move second child to first child (temp 2X3 matrix of float)
+0:23 'm23' (temp 2X3 matrix of float)
+0:23 Construct mat2x3 (temp 2X3 matrix of float)
+0:23 'm' (uniform 4X2 matrix of float)
+0:27 Sequence
+0:27 move second child to first child (temp structure{global float f})
+0:27 'sv' (temp structure{global float f})
+0:27 Construct structure (temp structure{global float f})
+0:27 Convert int to float (temp float)
+0:27 'a' (temp int)
+0:28 Sequence
+0:28 move second child to first child (temp 2-element array of float)
+0:28 'ia' (temp 2-element array of float)
+0:28 Construct float (temp 2-element array of float)
+0:28 Constant:
+0:28 3.000000
+0:28 direct index (temp float)
+0:28 'i' (smooth in 4-component vector of float)
+0:28 Constant:
+0:28 1 (const int)
+0:29 Sequence
+0:29 move second child to first child (temp float)
+0:29 'f1' (temp float)
+0:29 Constant:
+0:29 1.000000
+0:30 Sequence
+0:30 move second child to first child (temp float)
+0:30 'f' (temp float)
+0:30 Convert int to float (temp float)
+0:30 'a' (temp int)
+0:31 move second child to first child (temp float)
+0:31 'f' (temp float)
+0:31 Convert int to float (temp float)
+0:31 'a' (temp int)
+0:33 Sequence
+0:33 move second child to first child (temp 3-component vector of float)
+0:33 'v3' (temp 3-component vector of float)
+0:33 Convert int to float (temp 3-component vector of float)
+0:33 'iv3' (temp 3-component vector of int)
+0:34 move second child to first child (temp float)
+0:34 'f' (temp float)
+0:34 add (temp float)
+0:34 'f' (temp float)
+0:34 Convert int to float (temp float)
+0:34 'a' (temp int)
+0:35 move second child to first child (temp float)
+0:35 'f' (temp float)
+0:35 subtract (temp float)
+0:35 Convert int to float (temp float)
+0:35 'a' (temp int)
+0:35 'f' (temp float)
+0:36 add second child into first child (temp float)
+0:36 'f' (temp float)
+0:36 Convert int to float (temp float)
+0:36 'a' (temp int)
+0:37 move second child to first child (temp float)
+0:37 'f' (temp float)
+0:37 subtract (temp float)
+0:37 Convert int to float (temp float)
+0:37 'a' (temp int)
+0:37 'f' (temp float)
+0:38 multiply second child into first child (temp 3-component vector of float)
+0:38 'v3' (temp 3-component vector of float)
+0:38 Convert int to float (temp 3-component vector of float)
+0:38 'iv3' (temp 3-component vector of int)
+0:39 move second child to first child (temp 3-component vector of float)
+0:39 'v3' (temp 3-component vector of float)
+0:39 divide (temp 3-component vector of float)
+0:39 Convert int to float (temp 3-component vector of float)
+0:39 'iv3' (temp 3-component vector of int)
+0:39 Constant:
+0:39 2.000000
+0:40 move second child to first child (temp 3-component vector of float)
+0:40 'v3' (temp 3-component vector of float)
+0:40 vector-scale (temp 3-component vector of float)
+0:40 Constant:
+0:40 3.000000
+0:40 Convert int to float (temp 3-component vector of float)
+0:40 'iv3' (temp 3-component vector of int)
+0:41 move second child to first child (temp 3-component vector of float)
+0:41 'v3' (temp 3-component vector of float)
+0:41 vector-scale (temp 3-component vector of float)
+0:41 Constant:
+0:41 2.000000
+0:41 'v3' (temp 3-component vector of float)
+0:42 move second child to first child (temp 3-component vector of float)
+0:42 'v3' (temp 3-component vector of float)
+0:42 subtract (temp 3-component vector of float)
+0:42 'v3' (temp 3-component vector of float)
+0:42 Constant:
+0:42 2.000000
+0:43 Test condition and select (temp void)
+0:43 Condition
+0:47 logical-or (temp bool)
+0:46 logical-or (temp bool)
+0:45 logical-or (temp bool)
+0:44 logical-or (temp bool)
+0:43 logical-or (temp bool)
+0:43 Compare Less Than (temp bool)
+0:43 'f' (temp float)
+0:43 Convert int to float (temp float)
+0:43 'a' (temp int)
+0:44 Compare Less Than or Equal (temp bool)
+0:44 Convert int to float (temp float)
+0:44 'a' (temp int)
+0:44 'f' (temp float)
+0:45 Compare Greater Than (temp bool)
+0:45 'f' (temp float)
+0:45 Convert int to float (temp float)
+0:45 'a' (temp int)
+0:46 Compare Greater Than or Equal (temp bool)
+0:46 'f' (temp float)
+0:46 Convert int to float (temp float)
+0:46 'a' (temp int)
+0:47 Compare Equal (temp bool)
+0:47 Convert int to float (temp float)
+0:47 'a' (temp int)
+0:47 'f' (temp float)
+0:48 Compare Not Equal (temp bool)
+0:48 'f' (temp float)
+0:48 Convert int to float (temp float)
+0:48 'a' (temp int)
+0:43 true case is null
+0:49 move second child to first child (temp float)
+0:49 'f' (temp float)
+0:49 Test condition and select (temp float)
+0:49 Condition
+0:49 'b' (temp bool)
+0:49 true case
+0:49 Convert int to float (temp float)
+0:49 'a' (temp int)
+0:49 false case
+0:49 'f' (temp float)
+0:50 move second child to first child (temp float)
+0:50 'f' (temp float)
+0:50 Test condition and select (temp float)
+0:50 Condition
+0:50 'b' (temp bool)
+0:50 true case
+0:50 'f' (temp float)
+0:50 false case
+0:50 Convert int to float (temp float)
+0:50 'a' (temp int)
+0:51 move second child to first child (temp float)
+0:51 'f' (temp float)
+0:51 Convert int to float (temp float)
+0:51 Test condition and select (temp int)
+0:51 Condition
+0:51 'b' (temp bool)
+0:51 true case
+0:51 'a' (temp int)
+0:51 false case
+0:51 'a' (temp int)
+0:52 Sequence
+0:52 move second child to first child (temp structure{global float f})
+0:52 'news' (temp structure{global float f})
+0:52 'sv' (temp structure{global float f})
+0:54 vector swizzle (temp 2-component vector of float)
+0:54 'i' (smooth in 4-component vector of float)
+0:54 Sequence
+0:54 Constant:
+0:54 0 (const int)
+0:54 Constant:
+0:54 1 (const int)
+0:55 'm' (uniform 4X2 matrix of float)
+0:56 'm' (uniform 4X2 matrix of float)
+0:58 'f' (temp float)
+0:59 move second child to first child (temp float)
+0:59 'f' (temp float)
+0:59 Convert int to float (temp float)
+0:59 'a' (temp int)
+0:60 'f' (temp float)
+0:61 'b' (temp bool)
+0:62 move second child to first child (temp bool)
+0:62 'b' (temp bool)
+0:62 'b' (temp bool)
+0:63 'f' (temp float)
+0:65 move second child to first child (temp 4-component vector of float)
+0:65 'gl_FragColor' (fragColor 4-component vector of float FragColor)
+0:65 texture (global 4-component vector of float)
+0:65 's2D' (uniform sampler2D)
+0:65 'centTexCoord' (centroid smooth in 2-component vector of float)
+0:? Sequence
+0:79 'gl_FragColor' (fragColor 4-component vector of float FragColor)
+0:82 direct index (temp float)
+0:82 'gl_FragColor' (fragColor 4-component vector of float FragColor)
+0:82 Constant:
+0:82 0 (const int)
+0:83 direct index (temp float)
+0:83 'gl_FragColor' (fragColor 4-component vector of float FragColor)
+0:83 Constant:
+0:83 0 (const int)
+0:84 direct index (temp float)
+0:84 'centTexCoord' (centroid smooth in 2-component vector of float)
+0:84 Constant:
+0:84 0 (const int)
+0:85 move second child to first child (temp bool)
+0:85 Comma (temp bool)
+0:85 'a' (temp int)
+0:85 'b' (temp bool)
+0:85 Constant:
+0:85 true (const bool)
+0:91 Function Definition: main( (global int)
+0:91 Function Parameters:
+0:92 Function Definition: main(i1; (global void)
+0:92 Function Parameters:
+0:92 'a' (in int)
+0:97 Function Definition: foo(f1; (global int)
+0:97 Function Parameters:
+0:97 'a' (out float)
+0:99 Sequence
+0:99 Branch: Return with expression
+0:99 Constant:
+0:99 3.200000
+0:100 Function Call: foo(f1; (global int)
+0:100 'a' (out float)
+0:103 Function Definition: gen(vf3; (global bool)
+0:103 Function Parameters:
+0:103 'v' (in 3-component vector of float)
+0:105 Sequence
+0:105 Test condition and select (temp void)
+0:105 Condition
+0:105 logical-and (temp bool)
+0:105 Compare Less Than (temp bool)
+0:105 Absolute value (global float)
+0:105 direct index (temp float)
+0:105 'v' (in 3-component vector of float)
+0:105 Constant:
+0:105 0 (const int)
+0:105 Constant:
+0:105 0.000100
+0:105 Compare Less Than (temp bool)
+0:105 Absolute value (global float)
+0:105 direct index (temp float)
+0:105 'v' (in 3-component vector of float)
+0:105 Constant:
+0:105 1 (const int)
+0:105 Constant:
+0:105 0.000100
+0:105 true case
+0:106 Branch: Return with expression
+0:106 Constant:
+0:106 true (const bool)
+0:109 Function Definition: v1( (global void)
+0:109 Function Parameters:
+0:113 Function Definition: v2( (global void)
+0:113 Function Parameters:
+0:115 Sequence
+0:115 Branch: Return
+0:118 Function Definition: atest( (global void)
+0:118 Function Parameters:
+0:120 Sequence
+0:120 Sequence
+0:120 move second child to first child (temp 4-component vector of float)
+0:120 'v' (temp 4-component vector of float)
+0:120 direct index (smooth temp 4-component vector of float TexCoord)
+0:120 'gl_TexCoord' (smooth in 6-element array of 4-component vector of float TexCoord)
+0:120 Constant:
+0:120 1 (const int)
+0:121 add second child into first child (temp 4-component vector of float)
+0:121 'v' (temp 4-component vector of float)
+0:121 direct index (smooth temp 4-component vector of float TexCoord)
+0:121 'gl_TexCoord' (smooth in 6-element array of 4-component vector of float TexCoord)
+0:121 Constant:
+0:121 3 (const int)
+0:139 Function Definition: foo123( (global void)
+0:139 Function Parameters:
+0:141 Sequence
+0:141 Sequence
+0:141 move second child to first child (temp 2X2 matrix of float)
+0:141 'r2' (temp 2X2 matrix of float)
+0:141 component-wise multiply (global 2X2 matrix of float)
+0:141 'm22' (global 2X2 matrix of float)
+0:141 'm22' (global 2X2 matrix of float)
+0:142 Sequence
+0:142 move second child to first child (temp 3X3 matrix of float)
+0:142 'r3' (temp 3X3 matrix of float)
+0:142 component-wise multiply (global 3X3 matrix of float)
+0:142 'm33' (global 3X3 matrix of float)
+0:142 'm33' (global 3X3 matrix of float)
+0:143 Sequence
+0:143 move second child to first child (temp 4X4 matrix of float)
+0:143 'r4' (temp 4X4 matrix of float)
+0:143 component-wise multiply (global 4X4 matrix of float)
+0:143 'm44' (global 4X4 matrix of float)
+0:143 'm44' (global 4X4 matrix of float)
+0:145 Sequence
+0:145 move second child to first child (temp 2X3 matrix of float)
+0:145 'r23' (temp 2X3 matrix of float)
+0:145 component-wise multiply (global 2X3 matrix of float)
+0:145 'm23' (global 2X3 matrix of float)
+0:145 'm23' (global 2X3 matrix of float)
+0:146 Sequence
+0:146 move second child to first child (temp 2X4 matrix of float)
+0:146 'r24' (temp 2X4 matrix of float)
+0:146 component-wise multiply (global 2X4 matrix of float)
+0:146 'm24' (global 2X4 matrix of float)
+0:146 'm24' (global 2X4 matrix of float)
+0:147 Sequence
+0:147 move second child to first child (temp 3X2 matrix of float)
+0:147 'r32' (temp 3X2 matrix of float)
+0:147 component-wise multiply (global 3X2 matrix of float)
+0:147 'm32' (global 3X2 matrix of float)
+0:147 'm32' (global 3X2 matrix of float)
+0:148 Sequence
+0:148 move second child to first child (temp 3X4 matrix of float)
+0:148 'r34' (temp 3X4 matrix of float)
+0:148 component-wise multiply (global 3X4 matrix of float)
+0:148 'm34' (global 3X4 matrix of float)
+0:148 'm34' (global 3X4 matrix of float)
+0:149 Sequence
+0:149 move second child to first child (temp 4X2 matrix of float)
+0:149 'r42' (temp 4X2 matrix of float)
+0:149 component-wise multiply (global 4X2 matrix of float)
+0:149 'm42' (global 4X2 matrix of float)
+0:149 'm42' (global 4X2 matrix of float)
+0:150 Sequence
+0:150 move second child to first child (temp 4X3 matrix of float)
+0:150 'r43' (temp 4X3 matrix of float)
+0:150 component-wise multiply (global 4X3 matrix of float)
+0:150 'm43' (global 4X3 matrix of float)
+0:150 'm43' (global 4X3 matrix of float)
+0:156 Function Definition: matConst( (global void)
+0:156 Function Parameters:
+0:? Sequence
+0:162 Sequence
+0:162 move second child to first child (temp 4X4 matrix of float)
+0:162 'm4g' (temp 4X4 matrix of float)
+0:162 Construct mat4 (temp 4X4 matrix of float)
+0:162 'v2' (temp 2-component vector of float)
+0:162 'v3' (temp 3-component vector of float)
+0:162 'v3' (temp 3-component vector of float)
+0:162 'v3' (temp 3-component vector of float)
+0:162 'v3' (temp 3-component vector of float)
+0:162 'v3' (temp 3-component vector of float)
+0:163 Sequence
+0:163 move second child to first child (temp 4X4 matrix of float)
+0:163 'm4' (temp 4X4 matrix of float)
+0:163 Construct mat4 (temp 4X4 matrix of float)
+0:163 'v2' (temp 2-component vector of float)
+0:163 'v3' (temp 3-component vector of float)
+0:163 'v3' (temp 3-component vector of float)
+0:163 'v3' (temp 3-component vector of float)
+0:163 'v3' (temp 3-component vector of float)
+0:163 'v2' (temp 2-component vector of float)
+0:164 Sequence
+0:164 move second child to first child (temp 3X3 matrix of float)
+0:164 'm3' (temp 3X3 matrix of float)
+0:164 Construct mat3 (temp 3X3 matrix of float)
+0:164 'm4' (temp 4X4 matrix of float)
+0:165 Sequence
+0:165 move second child to first child (temp 3X3 matrix of float)
+0:165 'm3b1' (temp 3X3 matrix of float)
+0:165 Construct mat3 (temp 3X3 matrix of float)
+0:165 'm4' (temp 4X4 matrix of float)
+0:165 'v2' (temp 2-component vector of float)
+0:166 Sequence
+0:166 move second child to first child (temp 3X3 matrix of float)
+0:166 'm3b2' (temp 3X3 matrix of float)
+0:166 Construct mat3 (temp 3X3 matrix of float)
+0:166 'm4' (temp 4X4 matrix of float)
+0:166 'm4' (temp 4X4 matrix of float)
+0:167 Sequence
+0:167 move second child to first child (temp 3X2 matrix of float)
+0:167 'm32' (temp 3X2 matrix of float)
+0:167 Construct mat3x2 (temp 3X2 matrix of float)
+0:167 'm4' (temp 4X4 matrix of float)
+0:168 Sequence
+0:168 move second child to first child (temp 4X4 matrix of float)
+0:168 'm4c' (temp 4X4 matrix of float)
+0:168 Construct mat4 (temp 4X4 matrix of float)
+0:168 'm32' (temp 3X2 matrix of float)
+0:169 Sequence
+0:169 move second child to first child (temp 3X3 matrix of float)
+0:169 'm3s' (temp 3X3 matrix of float)
+0:169 Construct mat3 (temp 3X3 matrix of float)
+0:169 direct index (temp float)
+0:169 'v2' (temp 2-component vector of float)
+0:169 Constant:
+0:169 0 (const int)
+0:171 Sequence
+0:171 move second child to first child (temp 2-element array of 3X3 matrix of float)
+0:171 'm3a1' (temp 2-element array of 3X3 matrix of float)
+0:171 Construct mat3 (temp 2-element array of 3X3 matrix of float)
+0:171 'm3s' (temp 3X3 matrix of float)
+0:171 'm3s' (temp 3X3 matrix of float)
+0:179 Function Definition: foo2323( (global void)
+0:179 Function Parameters:
+0:? Sequence
+0:184 move second child to first child (temp 4-component vector of float)
+0:184 'v' (temp 4-component vector of float)
+0:184 textureLod (global 4-component vector of float)
+0:184 's2D' (uniform sampler2D)
+0:184 'v2' (temp 2-component vector of float)
+0:184 'f' (temp float)
+0:185 move second child to first child (temp 4-component vector of float)
+0:185 'v' (temp 4-component vector of float)
+0:185 textureProjLod (global 4-component vector of float)
+0:185 's3D' (uniform sampler3D)
+0:185 'v' (temp 4-component vector of float)
+0:185 'f' (temp float)
+0:186 move second child to first child (temp 4-component vector of float)
+0:186 'v' (temp 4-component vector of float)
+0:186 textureProjLod (global 4-component vector of float)
+0:186 's1D' (uniform sampler1D)
+0:186 'v' (temp 4-component vector of float)
+0:186 'f' (temp float)
+0:187 move second child to first child (temp 4-component vector of float)
+0:187 'v' (temp 4-component vector of float)
+0:187 textureProjLod (global 4-component vector of float)
+0:187 's2DS' (uniform sampler2DShadow)
+0:187 'v' (temp 4-component vector of float)
+0:187 'f' (temp float)
+0:189 move second child to first child (temp 4-component vector of float)
+0:189 'v' (temp 4-component vector of float)
+0:189 textureGrad (global 4-component vector of float)
+0:189 's1D' (uniform sampler1D)
+0:189 'f' (temp float)
+0:189 'f' (temp float)
+0:189 'f' (temp float)
+0:190 move second child to first child (temp 4-component vector of float)
+0:190 'v' (temp 4-component vector of float)
+0:190 textureProjGrad (global 4-component vector of float)
+0:190 's2D' (uniform sampler2D)
+0:190 'v' (temp 4-component vector of float)
+0:190 'v2' (temp 2-component vector of float)
+0:190 'v2' (temp 2-component vector of float)
+0:191 move second child to first child (temp 4-component vector of float)
+0:191 'v' (temp 4-component vector of float)
+0:191 textureProjGrad (global 4-component vector of float)
+0:191 's2DS' (uniform sampler2DShadow)
+0:191 'v' (temp 4-component vector of float)
+0:191 'v2' (temp 2-component vector of float)
+0:191 'v2' (temp 2-component vector of float)
+0:196 Function Definition: foo2324( (global void)
+0:196 Function Parameters:
+0:? Sequence
+0:201 move second child to first child (temp 4-component vector of float)
+0:201 'v' (temp 4-component vector of float)
+0:201 textureLod (global 4-component vector of float)
+0:201 's2D' (uniform sampler2D)
+0:201 'v2' (temp 2-component vector of float)
+0:201 'f' (temp float)
+0:202 move second child to first child (temp 4-component vector of float)
+0:202 'v' (temp 4-component vector of float)
+0:202 textureProjLod (global 4-component vector of float)
+0:202 's3D' (uniform sampler3D)
+0:202 'v' (temp 4-component vector of float)
+0:202 'f' (temp float)
+0:203 move second child to first child (temp 4-component vector of float)
+0:203 'v' (temp 4-component vector of float)
+0:203 textureProjLod (global 4-component vector of float)
+0:203 's1D' (uniform sampler1D)
+0:203 'v' (temp 4-component vector of float)
+0:203 'f' (temp float)
+0:204 move second child to first child (temp 4-component vector of float)
+0:204 'v' (temp 4-component vector of float)
+0:204 textureProjLod (global 4-component vector of float)
+0:204 's2DS' (uniform sampler2DShadow)
+0:204 'v' (temp 4-component vector of float)
+0:204 'f' (temp float)
+0:206 move second child to first child (temp 4-component vector of float)
+0:206 'v' (temp 4-component vector of float)
+0:206 textureGrad (global 4-component vector of float)
+0:206 's1D' (uniform sampler1D)
+0:206 'f' (temp float)
+0:206 'f' (temp float)
+0:206 'f' (temp float)
+0:207 move second child to first child (temp 4-component vector of float)
+0:207 'v' (temp 4-component vector of float)
+0:207 textureProjGrad (global 4-component vector of float)
+0:207 's2D' (uniform sampler2D)
+0:207 'v' (temp 4-component vector of float)
+0:207 'v2' (temp 2-component vector of float)
+0:207 'v2' (temp 2-component vector of float)
+0:208 move second child to first child (temp 4-component vector of float)
+0:208 'v' (temp 4-component vector of float)
+0:208 textureProjGrad (global 4-component vector of float)
+0:208 's2DS' (uniform sampler2DShadow)
+0:208 'v' (temp 4-component vector of float)
+0:208 'v2' (temp 2-component vector of float)
+0:208 'v2' (temp 2-component vector of float)
+0:209 'v' (temp 4-component vector of float)
+0:214 Function Definition: foo121111( (global void)
+0:214 Function Parameters:
+0:? Sequence
+0:217 Sequence
+0:217 move second child to first child (temp 4-component vector of float)
+0:217 'v' (temp 4-component vector of float)
+0:217 texture (global 4-component vector of float)
+0:217 's2DRbad' (uniform sampler2DRect)
+0:217 'v2' (temp 2-component vector of float)
+0:225 Function Definition: foo12111( (global void)
+0:225 Function Parameters:
+0:? Sequence
+0:231 move second child to first child (temp 4-component vector of float)
+0:231 'v' (temp 4-component vector of float)
+0:231 texture (global 4-component vector of float)
+0:231 's2DR' (uniform sampler2DRect)
+0:231 'v2' (temp 2-component vector of float)
+0:232 move second child to first child (temp 4-component vector of float)
+0:232 'v' (temp 4-component vector of float)
+0:232 textureProj (global 4-component vector of float)
+0:232 's2DR' (uniform sampler2DRect)
+0:232 'v3' (temp 3-component vector of float)
+0:233 move second child to first child (temp 4-component vector of float)
+0:233 'v' (temp 4-component vector of float)
+0:233 textureProj (global 4-component vector of float)
+0:233 's2DR' (uniform sampler2DRect)
+0:233 'v4' (temp 4-component vector of float)
+0:234 move second child to first child (temp 4-component vector of float)
+0:234 'v' (temp 4-component vector of float)
+0:234 texture (global 4-component vector of float)
+0:234 's2DRS' (uniform sampler2DRectShadow)
+0:234 'v3' (temp 3-component vector of float)
+0:235 move second child to first child (temp 4-component vector of float)
+0:235 'v' (temp 4-component vector of float)
+0:235 textureProj (global 4-component vector of float)
+0:235 's2DRS' (uniform sampler2DRectShadow)
+0:235 'v4' (temp 4-component vector of float)
+0:237 move second child to first child (temp 4-component vector of float)
+0:237 'v' (temp 4-component vector of float)
+0:237 textureProjGrad (global 4-component vector of float)
+0:237 's2DRS' (uniform sampler2DRectShadow)
+0:237 'v' (temp 4-component vector of float)
+0:237 'v2' (temp 2-component vector of float)
+0:237 'v2' (temp 2-component vector of float)
+0:? Linker Objects
+0:? 'lowp' (global float)
+0:? 'mediump' (global float)
+0:? 'highp' (global float)
+0:? 'precision' (global float)
+0:? 'i' (smooth in 4-component vector of float)
+0:? 'o' (out 4-component vector of float)
+0:? 's2D' (uniform sampler2D)
+0:? 'centTexCoord' (centroid smooth in 2-component vector of float)
+0:? 'm' (uniform 4X2 matrix of float)
+0:? 'imageBuffer' (global float)
+0:? 'uimage2DRect' (global float)
+0:? 'a' (temp int)
+0:? 'gl_TexCoord' (smooth in 6-element array of 4-component vector of float TexCoord)
+0:? 'm22' (global 2X2 matrix of float)
+0:? 'm23' (global 2X3 matrix of float)
+0:? 'm24' (global 2X4 matrix of float)
+0:? 'm32' (global 3X2 matrix of float)
+0:? 'm33' (global 3X3 matrix of float)
+0:? 'm34' (global 3X4 matrix of float)
+0:? 'm42' (global 4X2 matrix of float)
+0:? 'm43' (global 4X3 matrix of float)
+0:? 'm44' (global 4X4 matrix of float)
+0:? 's3D' (uniform sampler3D)
+0:? 's1D' (uniform sampler1D)
+0:? 's2DS' (uniform sampler2DShadow)
+0:? 's2DRbad' (uniform sampler2DRect)
+0:? 's2DR' (uniform sampler2DRect)
+0:? 's2DRS' (uniform sampler2DRectShadow)
+
+
+Linked fragment stage:
+
+ERROR: Linking fragment stage: Recursion detected:
+ foo(f1; calling foo(f1;
+
+Shader version: 120
+Requested GL_ARB_shader_texture_lod
+Requested GL_ARB_texture_rectangle
+ERROR: node is still EOpNull!
+0:21 Function Definition: main( (global void)
+0:21 Function Parameters:
+0:23 Sequence
+0:23 Sequence
+0:23 move second child to first child (temp 2X3 matrix of float)
+0:23 'm23' (temp 2X3 matrix of float)
+0:23 Construct mat2x3 (temp 2X3 matrix of float)
+0:23 'm' (uniform 4X2 matrix of float)
+0:27 Sequence
+0:27 move second child to first child (temp structure{global float f})
+0:27 'sv' (temp structure{global float f})
+0:27 Construct structure (temp structure{global float f})
+0:27 Convert int to float (temp float)
+0:27 'a' (temp int)
+0:28 Sequence
+0:28 move second child to first child (temp 2-element array of float)
+0:28 'ia' (temp 2-element array of float)
+0:28 Construct float (temp 2-element array of float)
+0:28 Constant:
+0:28 3.000000
+0:28 direct index (temp float)
+0:28 'i' (smooth in 4-component vector of float)
+0:28 Constant:
+0:28 1 (const int)
+0:29 Sequence
+0:29 move second child to first child (temp float)
+0:29 'f1' (temp float)
+0:29 Constant:
+0:29 1.000000
+0:30 Sequence
+0:30 move second child to first child (temp float)
+0:30 'f' (temp float)
+0:30 Convert int to float (temp float)
+0:30 'a' (temp int)
+0:31 move second child to first child (temp float)
+0:31 'f' (temp float)
+0:31 Convert int to float (temp float)
+0:31 'a' (temp int)
+0:33 Sequence
+0:33 move second child to first child (temp 3-component vector of float)
+0:33 'v3' (temp 3-component vector of float)
+0:33 Convert int to float (temp 3-component vector of float)
+0:33 'iv3' (temp 3-component vector of int)
+0:34 move second child to first child (temp float)
+0:34 'f' (temp float)
+0:34 add (temp float)
+0:34 'f' (temp float)
+0:34 Convert int to float (temp float)
+0:34 'a' (temp int)
+0:35 move second child to first child (temp float)
+0:35 'f' (temp float)
+0:35 subtract (temp float)
+0:35 Convert int to float (temp float)
+0:35 'a' (temp int)
+0:35 'f' (temp float)
+0:36 add second child into first child (temp float)
+0:36 'f' (temp float)
+0:36 Convert int to float (temp float)
+0:36 'a' (temp int)
+0:37 move second child to first child (temp float)
+0:37 'f' (temp float)
+0:37 subtract (temp float)
+0:37 Convert int to float (temp float)
+0:37 'a' (temp int)
+0:37 'f' (temp float)
+0:38 multiply second child into first child (temp 3-component vector of float)
+0:38 'v3' (temp 3-component vector of float)
+0:38 Convert int to float (temp 3-component vector of float)
+0:38 'iv3' (temp 3-component vector of int)
+0:39 move second child to first child (temp 3-component vector of float)
+0:39 'v3' (temp 3-component vector of float)
+0:39 divide (temp 3-component vector of float)
+0:39 Convert int to float (temp 3-component vector of float)
+0:39 'iv3' (temp 3-component vector of int)
+0:39 Constant:
+0:39 2.000000
+0:40 move second child to first child (temp 3-component vector of float)
+0:40 'v3' (temp 3-component vector of float)
+0:40 vector-scale (temp 3-component vector of float)
+0:40 Constant:
+0:40 3.000000
+0:40 Convert int to float (temp 3-component vector of float)
+0:40 'iv3' (temp 3-component vector of int)
+0:41 move second child to first child (temp 3-component vector of float)
+0:41 'v3' (temp 3-component vector of float)
+0:41 vector-scale (temp 3-component vector of float)
+0:41 Constant:
+0:41 2.000000
+0:41 'v3' (temp 3-component vector of float)
+0:42 move second child to first child (temp 3-component vector of float)
+0:42 'v3' (temp 3-component vector of float)
+0:42 subtract (temp 3-component vector of float)
+0:42 'v3' (temp 3-component vector of float)
+0:42 Constant:
+0:42 2.000000
+0:43 Test condition and select (temp void)
+0:43 Condition
+0:47 logical-or (temp bool)
+0:46 logical-or (temp bool)
+0:45 logical-or (temp bool)
+0:44 logical-or (temp bool)
+0:43 logical-or (temp bool)
+0:43 Compare Less Than (temp bool)
+0:43 'f' (temp float)
+0:43 Convert int to float (temp float)
+0:43 'a' (temp int)
+0:44 Compare Less Than or Equal (temp bool)
+0:44 Convert int to float (temp float)
+0:44 'a' (temp int)
+0:44 'f' (temp float)
+0:45 Compare Greater Than (temp bool)
+0:45 'f' (temp float)
+0:45 Convert int to float (temp float)
+0:45 'a' (temp int)
+0:46 Compare Greater Than or Equal (temp bool)
+0:46 'f' (temp float)
+0:46 Convert int to float (temp float)
+0:46 'a' (temp int)
+0:47 Compare Equal (temp bool)
+0:47 Convert int to float (temp float)
+0:47 'a' (temp int)
+0:47 'f' (temp float)
+0:48 Compare Not Equal (temp bool)
+0:48 'f' (temp float)
+0:48 Convert int to float (temp float)
+0:48 'a' (temp int)
+0:43 true case is null
+0:49 move second child to first child (temp float)
+0:49 'f' (temp float)
+0:49 Test condition and select (temp float)
+0:49 Condition
+0:49 'b' (temp bool)
+0:49 true case
+0:49 Convert int to float (temp float)
+0:49 'a' (temp int)
+0:49 false case
+0:49 'f' (temp float)
+0:50 move second child to first child (temp float)
+0:50 'f' (temp float)
+0:50 Test condition and select (temp float)
+0:50 Condition
+0:50 'b' (temp bool)
+0:50 true case
+0:50 'f' (temp float)
+0:50 false case
+0:50 Convert int to float (temp float)
+0:50 'a' (temp int)
+0:51 move second child to first child (temp float)
+0:51 'f' (temp float)
+0:51 Convert int to float (temp float)
+0:51 Test condition and select (temp int)
+0:51 Condition
+0:51 'b' (temp bool)
+0:51 true case
+0:51 'a' (temp int)
+0:51 false case
+0:51 'a' (temp int)
+0:52 Sequence
+0:52 move second child to first child (temp structure{global float f})
+0:52 'news' (temp structure{global float f})
+0:52 'sv' (temp structure{global float f})
+0:54 vector swizzle (temp 2-component vector of float)
+0:54 'i' (smooth in 4-component vector of float)
+0:54 Sequence
+0:54 Constant:
+0:54 0 (const int)
+0:54 Constant:
+0:54 1 (const int)
+0:55 'm' (uniform 4X2 matrix of float)
+0:56 'm' (uniform 4X2 matrix of float)
+0:58 'f' (temp float)
+0:59 move second child to first child (temp float)
+0:59 'f' (temp float)
+0:59 Convert int to float (temp float)
+0:59 'a' (temp int)
+0:60 'f' (temp float)
+0:61 'b' (temp bool)
+0:62 move second child to first child (temp bool)
+0:62 'b' (temp bool)
+0:62 'b' (temp bool)
+0:63 'f' (temp float)
+0:65 move second child to first child (temp 4-component vector of float)
+0:65 'gl_FragColor' (fragColor 4-component vector of float FragColor)
+0:65 texture (global 4-component vector of float)
+0:65 's2D' (uniform sampler2D)
+0:65 'centTexCoord' (centroid smooth in 2-component vector of float)
+0:? Sequence
+0:79 'gl_FragColor' (fragColor 4-component vector of float FragColor)
+0:82 direct index (temp float)
+0:82 'gl_FragColor' (fragColor 4-component vector of float FragColor)
+0:82 Constant:
+0:82 0 (const int)
+0:83 direct index (temp float)
+0:83 'gl_FragColor' (fragColor 4-component vector of float FragColor)
+0:83 Constant:
+0:83 0 (const int)
+0:84 direct index (temp float)
+0:84 'centTexCoord' (centroid smooth in 2-component vector of float)
+0:84 Constant:
+0:84 0 (const int)
+0:85 move second child to first child (temp bool)
+0:85 Comma (temp bool)
+0:85 'a' (temp int)
+0:85 'b' (temp bool)
+0:85 Constant:
+0:85 true (const bool)
+0:91 Function Definition: main( (global int)
+0:91 Function Parameters:
+0:92 Function Definition: main(i1; (global void)
+0:92 Function Parameters:
+0:92 'a' (in int)
+0:97 Function Definition: foo(f1; (global int)
+0:97 Function Parameters:
+0:97 'a' (out float)
+0:99 Sequence
+0:99 Branch: Return with expression
+0:99 Constant:
+0:99 3.200000
+0:100 Function Call: foo(f1; (global int)
+0:100 'a' (out float)
+0:103 Function Definition: gen(vf3; (global bool)
+0:103 Function Parameters:
+0:103 'v' (in 3-component vector of float)
+0:105 Sequence
+0:105 Test condition and select (temp void)
+0:105 Condition
+0:105 logical-and (temp bool)
+0:105 Compare Less Than (temp bool)
+0:105 Absolute value (global float)
+0:105 direct index (temp float)
+0:105 'v' (in 3-component vector of float)
+0:105 Constant:
+0:105 0 (const int)
+0:105 Constant:
+0:105 0.000100
+0:105 Compare Less Than (temp bool)
+0:105 Absolute value (global float)
+0:105 direct index (temp float)
+0:105 'v' (in 3-component vector of float)
+0:105 Constant:
+0:105 1 (const int)
+0:105 Constant:
+0:105 0.000100
+0:105 true case
+0:106 Branch: Return with expression
+0:106 Constant:
+0:106 true (const bool)
+0:109 Function Definition: v1( (global void)
+0:109 Function Parameters:
+0:113 Function Definition: v2( (global void)
+0:113 Function Parameters:
+0:115 Sequence
+0:115 Branch: Return
+0:118 Function Definition: atest( (global void)
+0:118 Function Parameters:
+0:120 Sequence
+0:120 Sequence
+0:120 move second child to first child (temp 4-component vector of float)
+0:120 'v' (temp 4-component vector of float)
+0:120 direct index (smooth temp 4-component vector of float TexCoord)
+0:120 'gl_TexCoord' (smooth in 6-element array of 4-component vector of float TexCoord)
+0:120 Constant:
+0:120 1 (const int)
+0:121 add second child into first child (temp 4-component vector of float)
+0:121 'v' (temp 4-component vector of float)
+0:121 direct index (smooth temp 4-component vector of float TexCoord)
+0:121 'gl_TexCoord' (smooth in 6-element array of 4-component vector of float TexCoord)
+0:121 Constant:
+0:121 3 (const int)
+0:139 Function Definition: foo123( (global void)
+0:139 Function Parameters:
+0:141 Sequence
+0:141 Sequence
+0:141 move second child to first child (temp 2X2 matrix of float)
+0:141 'r2' (temp 2X2 matrix of float)
+0:141 component-wise multiply (global 2X2 matrix of float)
+0:141 'm22' (global 2X2 matrix of float)
+0:141 'm22' (global 2X2 matrix of float)
+0:142 Sequence
+0:142 move second child to first child (temp 3X3 matrix of float)
+0:142 'r3' (temp 3X3 matrix of float)
+0:142 component-wise multiply (global 3X3 matrix of float)
+0:142 'm33' (global 3X3 matrix of float)
+0:142 'm33' (global 3X3 matrix of float)
+0:143 Sequence
+0:143 move second child to first child (temp 4X4 matrix of float)
+0:143 'r4' (temp 4X4 matrix of float)
+0:143 component-wise multiply (global 4X4 matrix of float)
+0:143 'm44' (global 4X4 matrix of float)
+0:143 'm44' (global 4X4 matrix of float)
+0:145 Sequence
+0:145 move second child to first child (temp 2X3 matrix of float)
+0:145 'r23' (temp 2X3 matrix of float)
+0:145 component-wise multiply (global 2X3 matrix of float)
+0:145 'm23' (global 2X3 matrix of float)
+0:145 'm23' (global 2X3 matrix of float)
+0:146 Sequence
+0:146 move second child to first child (temp 2X4 matrix of float)
+0:146 'r24' (temp 2X4 matrix of float)
+0:146 component-wise multiply (global 2X4 matrix of float)
+0:146 'm24' (global 2X4 matrix of float)
+0:146 'm24' (global 2X4 matrix of float)
+0:147 Sequence
+0:147 move second child to first child (temp 3X2 matrix of float)
+0:147 'r32' (temp 3X2 matrix of float)
+0:147 component-wise multiply (global 3X2 matrix of float)
+0:147 'm32' (global 3X2 matrix of float)
+0:147 'm32' (global 3X2 matrix of float)
+0:148 Sequence
+0:148 move second child to first child (temp 3X4 matrix of float)
+0:148 'r34' (temp 3X4 matrix of float)
+0:148 component-wise multiply (global 3X4 matrix of float)
+0:148 'm34' (global 3X4 matrix of float)
+0:148 'm34' (global 3X4 matrix of float)
+0:149 Sequence
+0:149 move second child to first child (temp 4X2 matrix of float)
+0:149 'r42' (temp 4X2 matrix of float)
+0:149 component-wise multiply (global 4X2 matrix of float)
+0:149 'm42' (global 4X2 matrix of float)
+0:149 'm42' (global 4X2 matrix of float)
+0:150 Sequence
+0:150 move second child to first child (temp 4X3 matrix of float)
+0:150 'r43' (temp 4X3 matrix of float)
+0:150 component-wise multiply (global 4X3 matrix of float)
+0:150 'm43' (global 4X3 matrix of float)
+0:150 'm43' (global 4X3 matrix of float)
+0:156 Function Definition: matConst( (global void)
+0:156 Function Parameters:
+0:? Sequence
+0:162 Sequence
+0:162 move second child to first child (temp 4X4 matrix of float)
+0:162 'm4g' (temp 4X4 matrix of float)
+0:162 Construct mat4 (temp 4X4 matrix of float)
+0:162 'v2' (temp 2-component vector of float)
+0:162 'v3' (temp 3-component vector of float)
+0:162 'v3' (temp 3-component vector of float)
+0:162 'v3' (temp 3-component vector of float)
+0:162 'v3' (temp 3-component vector of float)
+0:162 'v3' (temp 3-component vector of float)
+0:163 Sequence
+0:163 move second child to first child (temp 4X4 matrix of float)
+0:163 'm4' (temp 4X4 matrix of float)
+0:163 Construct mat4 (temp 4X4 matrix of float)
+0:163 'v2' (temp 2-component vector of float)
+0:163 'v3' (temp 3-component vector of float)
+0:163 'v3' (temp 3-component vector of float)
+0:163 'v3' (temp 3-component vector of float)
+0:163 'v3' (temp 3-component vector of float)
+0:163 'v2' (temp 2-component vector of float)
+0:164 Sequence
+0:164 move second child to first child (temp 3X3 matrix of float)
+0:164 'm3' (temp 3X3 matrix of float)
+0:164 Construct mat3 (temp 3X3 matrix of float)
+0:164 'm4' (temp 4X4 matrix of float)
+0:165 Sequence
+0:165 move second child to first child (temp 3X3 matrix of float)
+0:165 'm3b1' (temp 3X3 matrix of float)
+0:165 Construct mat3 (temp 3X3 matrix of float)
+0:165 'm4' (temp 4X4 matrix of float)
+0:165 'v2' (temp 2-component vector of float)
+0:166 Sequence
+0:166 move second child to first child (temp 3X3 matrix of float)
+0:166 'm3b2' (temp 3X3 matrix of float)
+0:166 Construct mat3 (temp 3X3 matrix of float)
+0:166 'm4' (temp 4X4 matrix of float)
+0:166 'm4' (temp 4X4 matrix of float)
+0:167 Sequence
+0:167 move second child to first child (temp 3X2 matrix of float)
+0:167 'm32' (temp 3X2 matrix of float)
+0:167 Construct mat3x2 (temp 3X2 matrix of float)
+0:167 'm4' (temp 4X4 matrix of float)
+0:168 Sequence
+0:168 move second child to first child (temp 4X4 matrix of float)
+0:168 'm4c' (temp 4X4 matrix of float)
+0:168 Construct mat4 (temp 4X4 matrix of float)
+0:168 'm32' (temp 3X2 matrix of float)
+0:169 Sequence
+0:169 move second child to first child (temp 3X3 matrix of float)
+0:169 'm3s' (temp 3X3 matrix of float)
+0:169 Construct mat3 (temp 3X3 matrix of float)
+0:169 direct index (temp float)
+0:169 'v2' (temp 2-component vector of float)
+0:169 Constant:
+0:169 0 (const int)
+0:171 Sequence
+0:171 move second child to first child (temp 2-element array of 3X3 matrix of float)
+0:171 'm3a1' (temp 2-element array of 3X3 matrix of float)
+0:171 Construct mat3 (temp 2-element array of 3X3 matrix of float)
+0:171 'm3s' (temp 3X3 matrix of float)
+0:171 'm3s' (temp 3X3 matrix of float)
+0:179 Function Definition: foo2323( (global void)
+0:179 Function Parameters:
+0:? Sequence
+0:184 move second child to first child (temp 4-component vector of float)
+0:184 'v' (temp 4-component vector of float)
+0:184 textureLod (global 4-component vector of float)
+0:184 's2D' (uniform sampler2D)
+0:184 'v2' (temp 2-component vector of float)
+0:184 'f' (temp float)
+0:185 move second child to first child (temp 4-component vector of float)
+0:185 'v' (temp 4-component vector of float)
+0:185 textureProjLod (global 4-component vector of float)
+0:185 's3D' (uniform sampler3D)
+0:185 'v' (temp 4-component vector of float)
+0:185 'f' (temp float)
+0:186 move second child to first child (temp 4-component vector of float)
+0:186 'v' (temp 4-component vector of float)
+0:186 textureProjLod (global 4-component vector of float)
+0:186 's1D' (uniform sampler1D)
+0:186 'v' (temp 4-component vector of float)
+0:186 'f' (temp float)
+0:187 move second child to first child (temp 4-component vector of float)
+0:187 'v' (temp 4-component vector of float)
+0:187 textureProjLod (global 4-component vector of float)
+0:187 's2DS' (uniform sampler2DShadow)
+0:187 'v' (temp 4-component vector of float)
+0:187 'f' (temp float)
+0:189 move second child to first child (temp 4-component vector of float)
+0:189 'v' (temp 4-component vector of float)
+0:189 textureGrad (global 4-component vector of float)
+0:189 's1D' (uniform sampler1D)
+0:189 'f' (temp float)
+0:189 'f' (temp float)
+0:189 'f' (temp float)
+0:190 move second child to first child (temp 4-component vector of float)
+0:190 'v' (temp 4-component vector of float)
+0:190 textureProjGrad (global 4-component vector of float)
+0:190 's2D' (uniform sampler2D)
+0:190 'v' (temp 4-component vector of float)
+0:190 'v2' (temp 2-component vector of float)
+0:190 'v2' (temp 2-component vector of float)
+0:191 move second child to first child (temp 4-component vector of float)
+0:191 'v' (temp 4-component vector of float)
+0:191 textureProjGrad (global 4-component vector of float)
+0:191 's2DS' (uniform sampler2DShadow)
+0:191 'v' (temp 4-component vector of float)
+0:191 'v2' (temp 2-component vector of float)
+0:191 'v2' (temp 2-component vector of float)
+0:196 Function Definition: foo2324( (global void)
+0:196 Function Parameters:
+0:? Sequence
+0:201 move second child to first child (temp 4-component vector of float)
+0:201 'v' (temp 4-component vector of float)
+0:201 textureLod (global 4-component vector of float)
+0:201 's2D' (uniform sampler2D)
+0:201 'v2' (temp 2-component vector of float)
+0:201 'f' (temp float)
+0:202 move second child to first child (temp 4-component vector of float)
+0:202 'v' (temp 4-component vector of float)
+0:202 textureProjLod (global 4-component vector of float)
+0:202 's3D' (uniform sampler3D)
+0:202 'v' (temp 4-component vector of float)
+0:202 'f' (temp float)
+0:203 move second child to first child (temp 4-component vector of float)
+0:203 'v' (temp 4-component vector of float)
+0:203 textureProjLod (global 4-component vector of float)
+0:203 's1D' (uniform sampler1D)
+0:203 'v' (temp 4-component vector of float)
+0:203 'f' (temp float)
+0:204 move second child to first child (temp 4-component vector of float)
+0:204 'v' (temp 4-component vector of float)
+0:204 textureProjLod (global 4-component vector of float)
+0:204 's2DS' (uniform sampler2DShadow)
+0:204 'v' (temp 4-component vector of float)
+0:204 'f' (temp float)
+0:206 move second child to first child (temp 4-component vector of float)
+0:206 'v' (temp 4-component vector of float)
+0:206 textureGrad (global 4-component vector of float)
+0:206 's1D' (uniform sampler1D)
+0:206 'f' (temp float)
+0:206 'f' (temp float)
+0:206 'f' (temp float)
+0:207 move second child to first child (temp 4-component vector of float)
+0:207 'v' (temp 4-component vector of float)
+0:207 textureProjGrad (global 4-component vector of float)
+0:207 's2D' (uniform sampler2D)
+0:207 'v' (temp 4-component vector of float)
+0:207 'v2' (temp 2-component vector of float)
+0:207 'v2' (temp 2-component vector of float)
+0:208 move second child to first child (temp 4-component vector of float)
+0:208 'v' (temp 4-component vector of float)
+0:208 textureProjGrad (global 4-component vector of float)
+0:208 's2DS' (uniform sampler2DShadow)
+0:208 'v' (temp 4-component vector of float)
+0:208 'v2' (temp 2-component vector of float)
+0:208 'v2' (temp 2-component vector of float)
+0:209 'v' (temp 4-component vector of float)
+0:214 Function Definition: foo121111( (global void)
+0:214 Function Parameters:
+0:? Sequence
+0:217 Sequence
+0:217 move second child to first child (temp 4-component vector of float)
+0:217 'v' (temp 4-component vector of float)
+0:217 texture (global 4-component vector of float)
+0:217 's2DRbad' (uniform sampler2DRect)
+0:217 'v2' (temp 2-component vector of float)
+0:225 Function Definition: foo12111( (global void)
+0:225 Function Parameters:
+0:? Sequence
+0:231 move second child to first child (temp 4-component vector of float)
+0:231 'v' (temp 4-component vector of float)
+0:231 texture (global 4-component vector of float)
+0:231 's2DR' (uniform sampler2DRect)
+0:231 'v2' (temp 2-component vector of float)
+0:232 move second child to first child (temp 4-component vector of float)
+0:232 'v' (temp 4-component vector of float)
+0:232 textureProj (global 4-component vector of float)
+0:232 's2DR' (uniform sampler2DRect)
+0:232 'v3' (temp 3-component vector of float)
+0:233 move second child to first child (temp 4-component vector of float)
+0:233 'v' (temp 4-component vector of float)
+0:233 textureProj (global 4-component vector of float)
+0:233 's2DR' (uniform sampler2DRect)
+0:233 'v4' (temp 4-component vector of float)
+0:234 move second child to first child (temp 4-component vector of float)
+0:234 'v' (temp 4-component vector of float)
+0:234 texture (global 4-component vector of float)
+0:234 's2DRS' (uniform sampler2DRectShadow)
+0:234 'v3' (temp 3-component vector of float)
+0:235 move second child to first child (temp 4-component vector of float)
+0:235 'v' (temp 4-component vector of float)
+0:235 textureProj (global 4-component vector of float)
+0:235 's2DRS' (uniform sampler2DRectShadow)
+0:235 'v4' (temp 4-component vector of float)
+0:237 move second child to first child (temp 4-component vector of float)
+0:237 'v' (temp 4-component vector of float)
+0:237 textureProjGrad (global 4-component vector of float)
+0:237 's2DRS' (uniform sampler2DRectShadow)
+0:237 'v' (temp 4-component vector of float)
+0:237 'v2' (temp 2-component vector of float)
+0:237 'v2' (temp 2-component vector of float)
+0:? Linker Objects
+0:? 'lowp' (global float)
+0:? 'mediump' (global float)
+0:? 'highp' (global float)
+0:? 'precision' (global float)
+0:? 'i' (smooth in 4-component vector of float)
+0:? 'o' (out 4-component vector of float)
+0:? 's2D' (uniform sampler2D)
+0:? 'centTexCoord' (centroid smooth in 2-component vector of float)
+0:? 'm' (uniform 4X2 matrix of float)
+0:? 'imageBuffer' (global float)
+0:? 'uimage2DRect' (global float)
+0:? 'a' (temp int)
+0:? 'gl_TexCoord' (smooth in 6-element array of 4-component vector of float TexCoord)
+0:? 'm22' (global 2X2 matrix of float)
+0:? 'm23' (global 2X3 matrix of float)
+0:? 'm24' (global 2X4 matrix of float)
+0:? 'm32' (global 3X2 matrix of float)
+0:? 'm33' (global 3X3 matrix of float)
+0:? 'm34' (global 3X4 matrix of float)
+0:? 'm42' (global 4X2 matrix of float)
+0:? 'm43' (global 4X3 matrix of float)
+0:? 'm44' (global 4X4 matrix of float)
+0:? 's3D' (uniform sampler3D)
+0:? 's1D' (uniform sampler1D)
+0:? 's2DS' (uniform sampler2DShadow)
+0:? 's2DRbad' (uniform sampler2DRect)
+0:? 's2DR' (uniform sampler2DRect)
+0:? 's2DRS' (uniform sampler2DRectShadow)
+
diff --git a/chromium/third_party/glslang/src/Test/baseResults/120.vert.out b/chromium/third_party/glslang/src/Test/baseResults/120.vert.out
new file mode 100644
index 00000000000..6c63744fedc
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/120.vert.out
@@ -0,0 +1,783 @@
+120.vert
+ERROR: 0:3: 'in for stage inputs' : not supported for this version or the enabled extensions
+ERROR: 0:4: 'out for stage outputs' : not supported for this version or the enabled extensions
+ERROR: 0:11: 'gl_Position' : cannot add storage, auxiliary, memory, interpolation, layout, or precision qualifier to an existing variable
+ERROR: 0:12: '' : can only have one auxiliary qualifier (centroid, patch, and sample)
+ERROR: 0:12: '' : replicated qualifiers
+ERROR: 0:12: 'foo' : identifier not previously declared
+ERROR: 0:21: 'gl_ClipDistance' : undeclared identifier
+ERROR: 0:21: 'gl_ClipDistance' : left of '[' is not of type array, matrix, or vector
+ERROR: 0:21: 'assign' : l-value required (can't modify a const)
+ERROR: 0:28: 'length' : array must be declared with a size before using this method
+ERROR: 0:31: 'length' : incomplete method syntax
+ERROR: 0:32: 'length' : method does not accept any arguments
+ERROR: 0:33: '.' : cannot apply to an array: flizbit
+ERROR: 0:33: '=' : cannot convert from 'temp 7-element array of float' to 'temp int'
+ERROR: 0:34: '.' : cannot apply to an array: flizbit
+ERROR: 0:34: 'f' : can't use function syntax on variable
+ERROR: 0:34: 'a4' : redefinition
+ERROR: 0:35: 'arrays of arrays' : not supported with this profile: none
+ERROR: 0:36: 'arrays of arrays' : not supported with this profile: none
+ERROR: 0:37: 'arrays of arrays' : not supported with this profile: none
+ERROR: 0:38: 'arrays of arrays' : not supported with this profile: none
+ERROR: 0:39: 'arrays of arrays' : not supported with this profile: none
+ERROR: 0:40: 'arrays of arrays' : not supported with this profile: none
+ERROR: 0:40: 'constructor' : array constructor needs one argument per array element
+ERROR: 0:40: 'arrays of arrays' : not supported with this profile: none
+ERROR: 0:40: '=' : cannot convert from 'const float' to 'temp 2-element array of 3-element array of float'
+ERROR: 0:41: 'arrays of arrays' : not supported with this profile: none
+ERROR: 0:41: 'constructor' : array constructor needs one argument per array element
+ERROR: 0:41: 'arrays of arrays' : not supported with this profile: none
+ERROR: 0:41: '=' : cannot convert from 'const float' to 'temp 2-element array of 3-element array of float'
+ERROR: 0:50: 'arrays of arrays' : not supported with this profile: none
+ERROR: 0:51: 'arrays of arrays' : not supported with this profile: none
+ERROR: 0:52: 'arrays of arrays' : not supported with this profile: none
+ERROR: 0:53: 'arrays of arrays' : not supported with this profile: none
+ERROR: 0:56: 'out' : overloaded functions must have the same parameter storage qualifiers for argument 1
+ERROR: 0:57: 'float' : overloaded functions must have the same return type
+ERROR: 0:87: 'overloadC' : no matching overloaded function found
+ERROR: 0:90: 'overloadC' : no matching overloaded function found
+ERROR: 0:95: 'overloadD' : ambiguous function signature match: multiple signatures match under implicit type conversion
+ERROR: 0:98: 'overloadB' : can't use function syntax on variable
+ERROR: 0:106: 'overloadC' : no matching overloaded function found
+ERROR: 0:107: 'overloadE' : no matching overloaded function found
+ERROR: 0:108: 'overloadE' : no matching overloaded function found
+ERROR: 0:111: 'overloadE' : no matching overloaded function found
+ERROR: 0:117: 'overloadF' : no matching overloaded function found
+ERROR: 0:121: 'gl_TexCoord array size' : must be less than gl_MaxTextureCoords (32)
+ERROR: 0:165: 'switch' : Reserved word.
+ERROR: 0:171: 'default' : Reserved word.
+ERROR: 0:165: 'switch statements' : not supported for this version or the enabled extensions
+ERROR: 0:176: 'bit shift left' : not supported for this version or the enabled extensions
+ERROR: 0:176: 'bit shift right' : not supported for this version or the enabled extensions
+ERROR: 0:176: 'bitwise and' : not supported for this version or the enabled extensions
+ERROR: 0:176: 'bitwise inclusive or' : not supported for this version or the enabled extensions
+ERROR: 0:179: 'modf' : no matching overloaded function found
+ERROR: 0:179: '=' : cannot convert from 'const float' to 'temp 3-component vector of float'
+ERROR: 0:180: 'trunc' : no matching overloaded function found
+ERROR: 0:181: 'round' : no matching overloaded function found
+ERROR: 0:181: '=' : cannot convert from 'const float' to 'temp 2-component vector of float'
+ERROR: 0:182: 'roundEven' : no matching overloaded function found
+ERROR: 0:182: '=' : cannot convert from 'const float' to 'temp 2-component vector of float'
+ERROR: 0:183: 'isnan' : no matching overloaded function found
+ERROR: 0:183: '=' : cannot convert from 'const float' to 'temp 2-component vector of bool'
+ERROR: 0:184: 'isinf' : no matching overloaded function found
+ERROR: 0:184: '=' : cannot convert from 'const float' to 'temp 4-component vector of bool'
+ERROR: 0:186: 'sinh' : no matching overloaded function found
+ERROR: 0:187: 'cosh' : no matching overloaded function found
+ERROR: 0:187: 'tanh' : no matching overloaded function found
+ERROR: 0:188: 'c4D' : undeclared identifier
+ERROR: 0:188: 'asinh' : no matching overloaded function found
+ERROR: 0:188: 'acosh' : no matching overloaded function found
+ERROR: 0:189: 'atanh' : no matching overloaded function found
+ERROR: 0:191: 'gl_VertexID' : undeclared identifier
+ERROR: 0:191: '=' : cannot convert from 'temp float' to 'temp int'
+ERROR: 0:192: 'gl_ClipDistance' : undeclared identifier
+ERROR: 0:192: 'gl_ClipDistance' : left of '[' is not of type array, matrix, or vector
+ERROR: 0:192: 'assign' : l-value required (can't modify a const)
+ERROR: 0:198: 'token pasting (##)' : not supported for this version or the enabled extensions
+ERROR: 0:198: '##' : token pasting not implemented (internal error)
+ERROR: 0:198: '' : syntax error
+ERROR: 79 compilation errors. No code generated.
+
+
+Shader version: 120
+ERROR: node is still EOpNull!
+0:15 Function Definition: main( (global void)
+0:15 Function Parameters:
+0:17 Sequence
+0:17 move second child to first child (temp 2-component vector of float)
+0:17 'centTexCoord' (invariant smooth out 2-component vector of float)
+0:17 'attv2' (in 2-component vector of float)
+0:18 move second child to first child (temp 4-component vector of float)
+0:18 'gl_Position' (invariant gl_Position 4-component vector of float Position)
+0:18 'attv4' (in 4-component vector of float)
+0:20 move second child to first child (temp 4-component vector of float)
+0:20 'gl_ClipVertex' (gl_ClipVertex 4-component vector of float ClipVertex)
+0:20 'attv4' (in 4-component vector of float)
+0:21 move second child to first child (temp float)
+0:21 Constant:
+0:21 0.000000
+0:21 Constant:
+0:21 0.200000
+0:25 move second child to first child (temp 4-component vector of float)
+0:25 'gl_Position' (invariant gl_Position 4-component vector of float Position)
+0:25 direct index (temp 4-component vector of float)
+0:25 'b' (temp 12-element array of 4-component vector of float)
+0:25 Constant:
+0:25 11 (const int)
+0:28 Sequence
+0:28 move second child to first child (temp int)
+0:28 'a1' (temp int)
+0:28 Constant:
+0:28 1 (const int)
+0:30 Sequence
+0:30 move second child to first child (temp int)
+0:30 'aa' (temp int)
+0:30 Constant:
+0:30 7 (const int)
+0:31 Sequence
+0:31 move second child to first child (temp int)
+0:31 'a2' (temp int)
+0:32 Sequence
+0:32 move second child to first child (temp int)
+0:32 'a3' (temp int)
+0:32 Constant:
+0:32 1 (const int)
+0:43 move second child to first child (temp float)
+0:43 'gl_PointSize' (invariant gl_PointSize float PointSize)
+0:43 Constant:
+0:43 3.800000
+0:61 Function Definition: overloadB(f1;f1; (global void)
+0:61 Function Parameters:
+0:61 '' (in float)
+0:61 '' (const (read only) float)
+0:78 Function Definition: foo( (global void)
+0:78 Function Parameters:
+0:? Sequence
+0:83 Function Call: overloadB(f1;f1; (global void)
+0:83 'f' (temp float)
+0:83 'f' (temp float)
+0:84 Function Call: overloadB(f1;f1; (global void)
+0:84 'f' (temp float)
+0:84 Constant:
+0:84 2.000000
+0:85 Function Call: overloadB(f1;f1; (global void)
+0:85 Constant:
+0:85 1.000000
+0:85 Convert int to float (temp float)
+0:85 'i' (temp int)
+0:87 Constant:
+0:87 0.000000
+0:88 Function Call: overloadC(i1;i1; (global 2-component vector of float)
+0:88 Constant:
+0:88 1 (const int)
+0:88 'i' (temp int)
+0:89 Function Call: overloadC(vf2;vf2; (global 2-component vector of float)
+0:89 Constant:
+0:89 1.000000
+0:89 1.000000
+0:89 Constant:
+0:89 2.000000
+0:89 2.000000
+0:90 Constant:
+0:90 0.000000
+0:91 Function Call: overloadC(vf2;vf2; (global 2-component vector of float)
+0:91 Constant:
+0:91 1.000000
+0:91 1.000000
+0:91 Constant:
+0:91 2.000000
+0:91 2.000000
+0:93 Function Call: overloadD(i1;f1; (global 3-component vector of float)
+0:93 'i' (temp int)
+0:93 'f' (temp float)
+0:94 Function Call: overloadD(f1;i1; (global 3-component vector of float)
+0:94 'f' (temp float)
+0:94 'i' (temp int)
+0:95 Function Call: overloadD(f1;i1; (global 3-component vector of float)
+0:95 Convert int to float (temp float)
+0:95 'i' (temp int)
+0:95 'i' (temp int)
+0:98 Constant:
+0:98 0.000000
+0:100 Constant:
+0:100 0.841471
+0:101 texture (global 4-component vector of float)
+0:101 's2D' (uniform sampler2D)
+0:101 Constant:
+0:101 0.000000
+0:101 0.000000
+0:102 clamp (global 4-component vector of float)
+0:102 'attv4' (in 4-component vector of float)
+0:102 Constant:
+0:102 0.000000
+0:102 Constant:
+0:102 1.000000
+0:103 clamp (global 4-component vector of float)
+0:103 Convert int to float (temp 4-component vector of float)
+0:103 Convert float to int (temp 4-component vector of int)
+0:103 'attv4' (in 4-component vector of float)
+0:103 Constant:
+0:103 0.000000
+0:103 Constant:
+0:103 1.000000
+0:106 Constant:
+0:106 0.000000
+0:107 Constant:
+0:107 0.000000
+0:108 Constant:
+0:108 0.000000
+0:109 Function Call: overloadE(vf2; (global 3-component vector of float)
+0:109 Constant:
+0:109 3.300000
+0:109 3.300000
+0:110 Function Call: overloadE(mf22; (global 3-component vector of float)
+0:110 Constant:
+0:110 0.500000
+0:110 0.000000
+0:110 0.000000
+0:110 0.500000
+0:111 Constant:
+0:111 0.000000
+0:112 Function Call: overloadE(vf2; (global 3-component vector of float)
+0:112 Constant:
+0:112 1.000000
+0:112 1.000000
+0:115 Function Call: overloadE(f1[2]; (global 3-component vector of float)
+0:115 'b' (temp 2-element array of float)
+0:117 Constant:
+0:117 0.000000
+0:118 Function Call: overloadF(i1; (global 3-component vector of float)
+0:118 Constant:
+0:118 1 (const int)
+0:128 Function Definition: foo2( (global void)
+0:128 Function Parameters:
+0:? Sequence
+0:135 Comma (global void)
+0:135 Function Call: outFun(f1;vi2;i1;f1; (global void)
+0:135 Convert int to float (temp float)
+0:135 'i' (temp int)
+0:135 'tempArg' (temp 2-component vector of int)
+0:135 'i' (temp int)
+0:135 'f' (temp float)
+0:135 move second child to first child (temp 2-component vector of float)
+0:135 'v2' (temp 2-component vector of float)
+0:135 Convert int to float (temp 2-component vector of float)
+0:135 'tempArg' (temp 2-component vector of int)
+0:136 Comma (global int)
+0:136 move second child to first child (temp int)
+0:136 'tempReturn' (global int)
+0:136 Function Call: outFunRet(f1;i1;i1;vi4; (global int)
+0:136 Convert int to float (temp float)
+0:136 'i' (temp int)
+0:136 'tempArg' (temp int)
+0:136 'i' (temp int)
+0:136 'tempArg' (temp 4-component vector of int)
+0:136 move second child to first child (temp float)
+0:136 'f' (temp float)
+0:136 Convert int to float (temp float)
+0:136 'tempArg' (temp int)
+0:136 move second child to first child (temp 4-component vector of float)
+0:136 'v4' (temp 4-component vector of float)
+0:136 Convert int to float (temp 4-component vector of float)
+0:136 'tempArg' (temp 4-component vector of int)
+0:136 'tempReturn' (global int)
+0:137 Sequence
+0:137 move second child to first child (temp float)
+0:137 'ret' (temp float)
+0:137 Convert int to float (temp float)
+0:137 Comma (global int)
+0:137 move second child to first child (temp int)
+0:137 'tempReturn' (global int)
+0:137 Function Call: outFunRet(f1;i1;i1;vi4; (global int)
+0:137 Convert int to float (temp float)
+0:137 'i' (temp int)
+0:137 'tempArg' (temp int)
+0:137 'i' (temp int)
+0:137 'tempArg' (temp 4-component vector of int)
+0:137 move second child to first child (temp float)
+0:137 'f' (temp float)
+0:137 Convert int to float (temp float)
+0:137 'tempArg' (temp int)
+0:137 move second child to first child (temp 4-component vector of float)
+0:137 'v4' (temp 4-component vector of float)
+0:137 Convert int to float (temp 4-component vector of float)
+0:137 'tempArg' (temp 4-component vector of int)
+0:137 'tempReturn' (global int)
+0:138 Sequence
+0:138 move second child to first child (temp 2-component vector of float)
+0:138 'ret2' (temp 2-component vector of float)
+0:138 Convert int to float (temp 2-component vector of float)
+0:138 Comma (global 2-component vector of int)
+0:138 move second child to first child (temp 2-component vector of int)
+0:138 'tempReturn' (global 2-component vector of int)
+0:138 Function Call: outFunRet(f1;vi4;i1;vi4; (global 2-component vector of int)
+0:138 Convert int to float (temp float)
+0:138 'i' (temp int)
+0:138 'tempArg' (temp 4-component vector of int)
+0:138 'i' (temp int)
+0:138 'tempArg' (temp 4-component vector of int)
+0:138 move second child to first child (temp 4-component vector of float)
+0:138 'v4' (temp 4-component vector of float)
+0:138 Convert int to float (temp 4-component vector of float)
+0:138 'tempArg' (temp 4-component vector of int)
+0:138 move second child to first child (temp 4-component vector of float)
+0:138 'v4' (temp 4-component vector of float)
+0:138 Convert int to float (temp 4-component vector of float)
+0:138 'tempArg' (temp 4-component vector of int)
+0:138 'tempReturn' (global 2-component vector of int)
+0:139 Sequence
+0:139 move second child to first child (temp bool)
+0:139 'b' (temp bool)
+0:139 any (global bool)
+0:139 Compare Less Than (global 4-component vector of bool)
+0:139 'v4' (temp 4-component vector of float)
+0:139 'attv4' (in 4-component vector of float)
+0:142 Function Definition: noise( (global void)
+0:142 Function Parameters:
+0:144 Sequence
+0:144 Sequence
+0:144 move second child to first child (temp float)
+0:144 'f1' (temp float)
+0:144 noise (global float)
+0:144 Constant:
+0:144 1.000000
+0:145 Sequence
+0:145 move second child to first child (temp 2-component vector of float)
+0:145 'f2' (temp 2-component vector of float)
+0:145 noise (global 2-component vector of float)
+0:145 Constant:
+0:145 1.000000
+0:145 1.000000
+0:146 Sequence
+0:146 move second child to first child (temp 3-component vector of float)
+0:146 'f3' (temp 3-component vector of float)
+0:146 noise (global 3-component vector of float)
+0:146 Constant:
+0:146 1.000000
+0:146 1.000000
+0:146 1.000000
+0:147 Sequence
+0:147 move second child to first child (temp 4-component vector of float)
+0:147 'f4' (temp 4-component vector of float)
+0:147 noise (global 4-component vector of float)
+0:147 Constant:
+0:147 1.000000
+0:147 1.000000
+0:147 1.000000
+0:147 1.000000
+0:162 Function Definition: foo213( (global void)
+0:162 Function Parameters:
+0:164 Sequence
+0:164 Sequence
+0:164 move second child to first child (temp float)
+0:164 'f' (temp float)
+0:164 Constant:
+0:164 3.000000
+0:165 switch
+0:165 condition
+0:165 'c' (uniform int)
+0:165 body
+0:165 Sequence
+0:166 case: with expression
+0:166 Constant:
+0:166 1 (const int)
+0:? Sequence
+0:167 move second child to first child (temp float)
+0:167 'f' (temp float)
+0:167 sine (global float)
+0:167 'f' (temp float)
+0:168 Branch: Break
+0:169 case: with expression
+0:169 Constant:
+0:169 2 (const int)
+0:? Sequence
+0:170 move second child to first child (temp float)
+0:170 'f' (temp float)
+0:170 component-wise multiply (temp float)
+0:170 'f' (temp float)
+0:170 'f' (temp float)
+0:171 default:
+0:? Sequence
+0:172 move second child to first child (temp float)
+0:172 'f' (temp float)
+0:172 Constant:
+0:172 3.000000
+0:176 inclusive-or (temp int)
+0:176 left-shift (temp int)
+0:176 'i' (temp int)
+0:176 Constant:
+0:176 3 (const int)
+0:176 Constant:
+0:176 69 (const int)
+0:180 Sequence
+0:180 move second child to first child (temp float)
+0:180 't' (temp float)
+0:180 Constant:
+0:180 0.000000
+0:186 Constant:
+0:186 0.000000
+0:188 Constant:
+0:188 0.000000
+0:189 Constant:
+0:189 0.000000
+0:192 move second child to first child (temp float)
+0:192 Constant:
+0:192 0.000000
+0:192 Constant:
+0:192 0.300000
+0:? Linker Objects
+0:? 'i' (in 4-component vector of float)
+0:? 'o' (smooth out 4-component vector of float)
+0:? 'attv2' (in 2-component vector of float)
+0:? 'attv4' (in 4-component vector of float)
+0:? 's2D' (uniform sampler2D)
+0:? 'centTexCoord' (invariant smooth out 2-component vector of float)
+0:? 'initted' (uniform float)
+0:? 3.400000
+0:? 'concall' (const float)
+0:? 0.295520
+0:? 'gl_TexCoord' (smooth out 35-element array of 4-component vector of float TexCoord)
+0:? 'gl_TexCoord' (smooth out 35-element array of 4-component vector of float TexCoord)
+0:? 'c' (uniform int)
+0:? 'x' (in 2-component vector of int)
+0:? 'v2a' (in 2-component vector of float)
+0:? 'c1D' (in float)
+0:? 'c2D' (in 2-component vector of float)
+0:? 'c3D' (in 3-component vector of float)
+0:? 'v4' (uniform 4-component vector of float)
+0:? 'abc' (global int)
+
+
+Linked vertex stage:
+
+
+Shader version: 120
+ERROR: node is still EOpNull!
+0:15 Function Definition: main( (global void)
+0:15 Function Parameters:
+0:17 Sequence
+0:17 move second child to first child (temp 2-component vector of float)
+0:17 'centTexCoord' (invariant smooth out 2-component vector of float)
+0:17 'attv2' (in 2-component vector of float)
+0:18 move second child to first child (temp 4-component vector of float)
+0:18 'gl_Position' (invariant gl_Position 4-component vector of float Position)
+0:18 'attv4' (in 4-component vector of float)
+0:20 move second child to first child (temp 4-component vector of float)
+0:20 'gl_ClipVertex' (gl_ClipVertex 4-component vector of float ClipVertex)
+0:20 'attv4' (in 4-component vector of float)
+0:21 move second child to first child (temp float)
+0:21 Constant:
+0:21 0.000000
+0:21 Constant:
+0:21 0.200000
+0:25 move second child to first child (temp 4-component vector of float)
+0:25 'gl_Position' (invariant gl_Position 4-component vector of float Position)
+0:25 direct index (temp 4-component vector of float)
+0:25 'b' (temp 12-element array of 4-component vector of float)
+0:25 Constant:
+0:25 11 (const int)
+0:28 Sequence
+0:28 move second child to first child (temp int)
+0:28 'a1' (temp int)
+0:28 Constant:
+0:28 1 (const int)
+0:30 Sequence
+0:30 move second child to first child (temp int)
+0:30 'aa' (temp int)
+0:30 Constant:
+0:30 7 (const int)
+0:31 Sequence
+0:31 move second child to first child (temp int)
+0:31 'a2' (temp int)
+0:32 Sequence
+0:32 move second child to first child (temp int)
+0:32 'a3' (temp int)
+0:32 Constant:
+0:32 1 (const int)
+0:43 move second child to first child (temp float)
+0:43 'gl_PointSize' (invariant gl_PointSize float PointSize)
+0:43 Constant:
+0:43 3.800000
+0:61 Function Definition: overloadB(f1;f1; (global void)
+0:61 Function Parameters:
+0:61 '' (in float)
+0:61 '' (const (read only) float)
+0:78 Function Definition: foo( (global void)
+0:78 Function Parameters:
+0:? Sequence
+0:83 Function Call: overloadB(f1;f1; (global void)
+0:83 'f' (temp float)
+0:83 'f' (temp float)
+0:84 Function Call: overloadB(f1;f1; (global void)
+0:84 'f' (temp float)
+0:84 Constant:
+0:84 2.000000
+0:85 Function Call: overloadB(f1;f1; (global void)
+0:85 Constant:
+0:85 1.000000
+0:85 Convert int to float (temp float)
+0:85 'i' (temp int)
+0:87 Constant:
+0:87 0.000000
+0:88 Function Call: overloadC(i1;i1; (global 2-component vector of float)
+0:88 Constant:
+0:88 1 (const int)
+0:88 'i' (temp int)
+0:89 Function Call: overloadC(vf2;vf2; (global 2-component vector of float)
+0:89 Constant:
+0:89 1.000000
+0:89 1.000000
+0:89 Constant:
+0:89 2.000000
+0:89 2.000000
+0:90 Constant:
+0:90 0.000000
+0:91 Function Call: overloadC(vf2;vf2; (global 2-component vector of float)
+0:91 Constant:
+0:91 1.000000
+0:91 1.000000
+0:91 Constant:
+0:91 2.000000
+0:91 2.000000
+0:93 Function Call: overloadD(i1;f1; (global 3-component vector of float)
+0:93 'i' (temp int)
+0:93 'f' (temp float)
+0:94 Function Call: overloadD(f1;i1; (global 3-component vector of float)
+0:94 'f' (temp float)
+0:94 'i' (temp int)
+0:95 Function Call: overloadD(f1;i1; (global 3-component vector of float)
+0:95 Convert int to float (temp float)
+0:95 'i' (temp int)
+0:95 'i' (temp int)
+0:98 Constant:
+0:98 0.000000
+0:100 Constant:
+0:100 0.841471
+0:101 texture (global 4-component vector of float)
+0:101 's2D' (uniform sampler2D)
+0:101 Constant:
+0:101 0.000000
+0:101 0.000000
+0:102 clamp (global 4-component vector of float)
+0:102 'attv4' (in 4-component vector of float)
+0:102 Constant:
+0:102 0.000000
+0:102 Constant:
+0:102 1.000000
+0:103 clamp (global 4-component vector of float)
+0:103 Convert int to float (temp 4-component vector of float)
+0:103 Convert float to int (temp 4-component vector of int)
+0:103 'attv4' (in 4-component vector of float)
+0:103 Constant:
+0:103 0.000000
+0:103 Constant:
+0:103 1.000000
+0:106 Constant:
+0:106 0.000000
+0:107 Constant:
+0:107 0.000000
+0:108 Constant:
+0:108 0.000000
+0:109 Function Call: overloadE(vf2; (global 3-component vector of float)
+0:109 Constant:
+0:109 3.300000
+0:109 3.300000
+0:110 Function Call: overloadE(mf22; (global 3-component vector of float)
+0:110 Constant:
+0:110 0.500000
+0:110 0.000000
+0:110 0.000000
+0:110 0.500000
+0:111 Constant:
+0:111 0.000000
+0:112 Function Call: overloadE(vf2; (global 3-component vector of float)
+0:112 Constant:
+0:112 1.000000
+0:112 1.000000
+0:115 Function Call: overloadE(f1[2]; (global 3-component vector of float)
+0:115 'b' (temp 2-element array of float)
+0:117 Constant:
+0:117 0.000000
+0:118 Function Call: overloadF(i1; (global 3-component vector of float)
+0:118 Constant:
+0:118 1 (const int)
+0:128 Function Definition: foo2( (global void)
+0:128 Function Parameters:
+0:? Sequence
+0:135 Comma (global void)
+0:135 Function Call: outFun(f1;vi2;i1;f1; (global void)
+0:135 Convert int to float (temp float)
+0:135 'i' (temp int)
+0:135 'tempArg' (temp 2-component vector of int)
+0:135 'i' (temp int)
+0:135 'f' (temp float)
+0:135 move second child to first child (temp 2-component vector of float)
+0:135 'v2' (temp 2-component vector of float)
+0:135 Convert int to float (temp 2-component vector of float)
+0:135 'tempArg' (temp 2-component vector of int)
+0:136 Comma (global int)
+0:136 move second child to first child (temp int)
+0:136 'tempReturn' (global int)
+0:136 Function Call: outFunRet(f1;i1;i1;vi4; (global int)
+0:136 Convert int to float (temp float)
+0:136 'i' (temp int)
+0:136 'tempArg' (temp int)
+0:136 'i' (temp int)
+0:136 'tempArg' (temp 4-component vector of int)
+0:136 move second child to first child (temp float)
+0:136 'f' (temp float)
+0:136 Convert int to float (temp float)
+0:136 'tempArg' (temp int)
+0:136 move second child to first child (temp 4-component vector of float)
+0:136 'v4' (temp 4-component vector of float)
+0:136 Convert int to float (temp 4-component vector of float)
+0:136 'tempArg' (temp 4-component vector of int)
+0:136 'tempReturn' (global int)
+0:137 Sequence
+0:137 move second child to first child (temp float)
+0:137 'ret' (temp float)
+0:137 Convert int to float (temp float)
+0:137 Comma (global int)
+0:137 move second child to first child (temp int)
+0:137 'tempReturn' (global int)
+0:137 Function Call: outFunRet(f1;i1;i1;vi4; (global int)
+0:137 Convert int to float (temp float)
+0:137 'i' (temp int)
+0:137 'tempArg' (temp int)
+0:137 'i' (temp int)
+0:137 'tempArg' (temp 4-component vector of int)
+0:137 move second child to first child (temp float)
+0:137 'f' (temp float)
+0:137 Convert int to float (temp float)
+0:137 'tempArg' (temp int)
+0:137 move second child to first child (temp 4-component vector of float)
+0:137 'v4' (temp 4-component vector of float)
+0:137 Convert int to float (temp 4-component vector of float)
+0:137 'tempArg' (temp 4-component vector of int)
+0:137 'tempReturn' (global int)
+0:138 Sequence
+0:138 move second child to first child (temp 2-component vector of float)
+0:138 'ret2' (temp 2-component vector of float)
+0:138 Convert int to float (temp 2-component vector of float)
+0:138 Comma (global 2-component vector of int)
+0:138 move second child to first child (temp 2-component vector of int)
+0:138 'tempReturn' (global 2-component vector of int)
+0:138 Function Call: outFunRet(f1;vi4;i1;vi4; (global 2-component vector of int)
+0:138 Convert int to float (temp float)
+0:138 'i' (temp int)
+0:138 'tempArg' (temp 4-component vector of int)
+0:138 'i' (temp int)
+0:138 'tempArg' (temp 4-component vector of int)
+0:138 move second child to first child (temp 4-component vector of float)
+0:138 'v4' (temp 4-component vector of float)
+0:138 Convert int to float (temp 4-component vector of float)
+0:138 'tempArg' (temp 4-component vector of int)
+0:138 move second child to first child (temp 4-component vector of float)
+0:138 'v4' (temp 4-component vector of float)
+0:138 Convert int to float (temp 4-component vector of float)
+0:138 'tempArg' (temp 4-component vector of int)
+0:138 'tempReturn' (global 2-component vector of int)
+0:139 Sequence
+0:139 move second child to first child (temp bool)
+0:139 'b' (temp bool)
+0:139 any (global bool)
+0:139 Compare Less Than (global 4-component vector of bool)
+0:139 'v4' (temp 4-component vector of float)
+0:139 'attv4' (in 4-component vector of float)
+0:142 Function Definition: noise( (global void)
+0:142 Function Parameters:
+0:144 Sequence
+0:144 Sequence
+0:144 move second child to first child (temp float)
+0:144 'f1' (temp float)
+0:144 noise (global float)
+0:144 Constant:
+0:144 1.000000
+0:145 Sequence
+0:145 move second child to first child (temp 2-component vector of float)
+0:145 'f2' (temp 2-component vector of float)
+0:145 noise (global 2-component vector of float)
+0:145 Constant:
+0:145 1.000000
+0:145 1.000000
+0:146 Sequence
+0:146 move second child to first child (temp 3-component vector of float)
+0:146 'f3' (temp 3-component vector of float)
+0:146 noise (global 3-component vector of float)
+0:146 Constant:
+0:146 1.000000
+0:146 1.000000
+0:146 1.000000
+0:147 Sequence
+0:147 move second child to first child (temp 4-component vector of float)
+0:147 'f4' (temp 4-component vector of float)
+0:147 noise (global 4-component vector of float)
+0:147 Constant:
+0:147 1.000000
+0:147 1.000000
+0:147 1.000000
+0:147 1.000000
+0:162 Function Definition: foo213( (global void)
+0:162 Function Parameters:
+0:164 Sequence
+0:164 Sequence
+0:164 move second child to first child (temp float)
+0:164 'f' (temp float)
+0:164 Constant:
+0:164 3.000000
+0:165 switch
+0:165 condition
+0:165 'c' (uniform int)
+0:165 body
+0:165 Sequence
+0:166 case: with expression
+0:166 Constant:
+0:166 1 (const int)
+0:? Sequence
+0:167 move second child to first child (temp float)
+0:167 'f' (temp float)
+0:167 sine (global float)
+0:167 'f' (temp float)
+0:168 Branch: Break
+0:169 case: with expression
+0:169 Constant:
+0:169 2 (const int)
+0:? Sequence
+0:170 move second child to first child (temp float)
+0:170 'f' (temp float)
+0:170 component-wise multiply (temp float)
+0:170 'f' (temp float)
+0:170 'f' (temp float)
+0:171 default:
+0:? Sequence
+0:172 move second child to first child (temp float)
+0:172 'f' (temp float)
+0:172 Constant:
+0:172 3.000000
+0:176 inclusive-or (temp int)
+0:176 left-shift (temp int)
+0:176 'i' (temp int)
+0:176 Constant:
+0:176 3 (const int)
+0:176 Constant:
+0:176 69 (const int)
+0:180 Sequence
+0:180 move second child to first child (temp float)
+0:180 't' (temp float)
+0:180 Constant:
+0:180 0.000000
+0:186 Constant:
+0:186 0.000000
+0:188 Constant:
+0:188 0.000000
+0:189 Constant:
+0:189 0.000000
+0:192 move second child to first child (temp float)
+0:192 Constant:
+0:192 0.000000
+0:192 Constant:
+0:192 0.300000
+0:? Linker Objects
+0:? 'i' (in 4-component vector of float)
+0:? 'o' (smooth out 4-component vector of float)
+0:? 'attv2' (in 2-component vector of float)
+0:? 'attv4' (in 4-component vector of float)
+0:? 's2D' (uniform sampler2D)
+0:? 'centTexCoord' (invariant smooth out 2-component vector of float)
+0:? 'initted' (uniform float)
+0:? 3.400000
+0:? 'concall' (const float)
+0:? 0.295520
+0:? 'gl_TexCoord' (smooth out 35-element array of 4-component vector of float TexCoord)
+0:? 'gl_TexCoord' (smooth out 35-element array of 4-component vector of float TexCoord)
+0:? 'c' (uniform int)
+0:? 'x' (in 2-component vector of int)
+0:? 'v2a' (in 2-component vector of float)
+0:? 'c1D' (in float)
+0:? 'c2D' (in 2-component vector of float)
+0:? 'c3D' (in 3-component vector of float)
+0:? 'v4' (uniform 4-component vector of float)
+0:? 'abc' (global int)
+
diff --git a/chromium/third_party/glslang/src/Test/baseResults/130.frag.out b/chromium/third_party/glslang/src/Test/baseResults/130.frag.out
new file mode 100644
index 00000000000..b2b4dd06567
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/130.frag.out
@@ -0,0 +1,782 @@
+130.frag
+ERROR: 0:25: 'textureGather(...)' : not supported for this version or the enabled extensions
+ERROR: 0:35: 'redeclaration' : cannot change the type of gl_Color
+ERROR: 0:38: 'gl_Color' : redeclaring non-array as array
+ERROR: 0:39: 'redeclaration' : cannot change storage, memory, or auxiliary qualification of gl_Color
+WARNING: 0:45: extension GL_ARB_texture_gather is being used for textureGather(...)
+ERROR: 0:62: '<' : wrong operand types: no operation '<' exists that takes a left-hand operand of type 'temp 3-component vector of bool' and a right operand of type 'temp 3-component vector of bool' (or there is no acceptable conversion)
+ERROR: 0:63: '>' : wrong operand types: no operation '>' exists that takes a left-hand operand of type 'temp 3-component vector of uint' and a right operand of type 'temp 3-component vector of uint' (or there is no acceptable conversion)
+ERROR: 0:64: '>=' : wrong operand types: no operation '>=' exists that takes a left-hand operand of type 'const 2-component vector of uint' and a right operand of type 'const 2-component vector of uint' (or there is no acceptable conversion)
+ERROR: 0:80: 'textureGatherOffset' : no matching overloaded function found
+ERROR: 0:80: 'assign' : cannot convert from 'const float' to 'temp 4-component vector of float'
+ERROR: 0:81: 'textureGatherOffset(...)' : not supported for this version or the enabled extensions
+ERROR: 0:84: 'textureGatherOffset(...)' : not supported for this version or the enabled extensions
+ERROR: 0:85: 'textureGatherOffset(...)' : not supported for this version or the enabled extensions
+WARNING: 0:88: '#extension' : extension is only partially supported: GL_ARB_gpu_shader5
+ERROR: 0:120: 'line continuation' : not supported for this version or the enabled extensions
+ERROR: 0:126: 'uniform block' : not supported for this version or the enabled extensions
+ERROR: 0:140: 'length' : does not operate on this type: temp bool
+ERROR: 0:140: 'boolb' : can't use function syntax on variable
+ERROR: 0:141: 'length' : does not operate on this type: temp float
+ERROR: 0:141: '' : function call, method, or subroutine call expected
+ERROR: 0:141: '' : no matching overloaded function found
+ERROR: 0:142: 'length' : incomplete method syntax
+ERROR: 0:143: 'length' : method does not accept any arguments
+ERROR: 0:146: 'gl_FogFragCoord' : identifiers starting with "gl_" are reserved
+ERROR: 0:151: 'int' : must be qualified as flat in
+ERROR: 0:151: 'redeclaration' : cannot change the type of gl_FogFragCoord
+ERROR: 0:153: 'early_fragment_tests' : not supported for this version or the enabled extensions
+ERROR: 0:154: 'image load store' : not supported for this version or the enabled extensions
+ERROR: 0:154: 'iimage2D' : Reserved word.
+ERROR: 0:169: 'early_fragment_tests' : can only apply to 'in'
+ERROR: 28 compilation errors. No code generated.
+
+
+Shader version: 130
+Requested GL_ARB_gpu_shader5
+Requested GL_ARB_separate_shader_objects
+Requested GL_ARB_shader_image_load_store
+Requested GL_ARB_shading_language_420pack
+Requested GL_ARB_texture_cube_map_array
+Requested GL_ARB_texture_gather
+Requested GL_ARB_texture_rectangle
+using early_fragment_tests
+ERROR: node is still EOpNull!
+0:16 Function Definition: main( (global void)
+0:16 Function Parameters:
+0:18 Sequence
+0:18 Sequence
+0:18 move second child to first child (temp float)
+0:18 'clip' (temp float)
+0:18 direct index (smooth temp float ClipDistance)
+0:18 'gl_ClipDistance' (smooth in implicitly-sized array of float ClipDistance)
+0:18 Constant:
+0:18 3 (const int)
+0:23 Function Definition: foo( (global void)
+0:23 Function Parameters:
+0:25 Sequence
+0:25 Sequence
+0:25 move second child to first child (temp 4-component vector of float)
+0:25 's' (temp 4-component vector of float)
+0:25 textureGather (global 4-component vector of float)
+0:25 'sampC' (uniform samplerCube)
+0:25 Constant:
+0:25 0.200000
+0:25 0.200000
+0:25 0.200000
+0:30 Function Definition: bar( (global void)
+0:30 Function Parameters:
+0:32 Sequence
+0:32 Sequence
+0:32 move second child to first child (temp 4-component vector of float)
+0:32 's' (temp 4-component vector of float)
+0:32 textureGather (global 4-component vector of float)
+0:32 'sampC' (uniform samplerCube)
+0:32 Constant:
+0:32 0.200000
+0:32 0.200000
+0:32 0.200000
+0:43 Function Definition: bar2( (global void)
+0:43 Function Parameters:
+0:45 Sequence
+0:45 Sequence
+0:45 move second child to first child (temp 4-component vector of float)
+0:45 's' (temp 4-component vector of float)
+0:45 textureGather (global 4-component vector of float)
+0:45 'sampC' (uniform samplerCube)
+0:45 Constant:
+0:45 0.200000
+0:45 0.200000
+0:45 0.200000
+0:49 move second child to first child (temp 3-component vector of bool)
+0:49 'b3' (temp 3-component vector of bool)
+0:49 Compare Less Than (global 3-component vector of bool)
+0:49 'uv3' (temp 3-component vector of uint)
+0:49 'uv3' (temp 3-component vector of uint)
+0:50 move second child to first child (temp 3-component vector of bool)
+0:50 'b3' (temp 3-component vector of bool)
+0:50 Equal (global 3-component vector of bool)
+0:50 'uv3' (temp 3-component vector of uint)
+0:50 'uv3' (temp 3-component vector of uint)
+0:56 direct index (temp int)
+0:56 'a1' (temp 1-element array of int)
+0:56 Constant:
+0:56 0 (const int)
+0:57 direct index (temp int)
+0:57 'a2' (temp 1-element array of int)
+0:57 Constant:
+0:57 0 (const int)
+0:60 direct index (temp int)
+0:60 'a3' (temp 4-element array of int)
+0:60 Constant:
+0:60 3 (const int)
+0:61 Compare Not Equal (temp bool)
+0:61 'b3' (temp 3-component vector of bool)
+0:61 'b3' (temp 3-component vector of bool)
+0:62 Constant:
+0:62 false (const bool)
+0:63 Constant:
+0:63 false (const bool)
+0:64 Constant:
+0:64 false (const bool)
+0:65 Constant:
+0:65 true (const bool)
+0:66 Constant:
+0:66 false (const bool)
+0:77 Function Definition: bar23( (global void)
+0:77 Function Parameters:
+0:? Sequence
+0:80 's' (temp 4-component vector of float)
+0:81 move second child to first child (temp 4-component vector of float)
+0:81 's' (temp 4-component vector of float)
+0:81 textureGatherOffset (global 4-component vector of float)
+0:81 'samp2DR' (uniform sampler2DRect)
+0:81 Constant:
+0:81 0.300000
+0:81 0.300000
+0:81 Constant:
+0:81 1 (const int)
+0:81 1 (const int)
+0:82 move second child to first child (temp 4-component vector of float)
+0:82 's' (temp 4-component vector of float)
+0:82 textureGatherOffset (global 4-component vector of float)
+0:82 'samp2D' (uniform sampler2D)
+0:82 Constant:
+0:82 0.300000
+0:82 0.300000
+0:82 Constant:
+0:82 1 (const int)
+0:82 1 (const int)
+0:83 move second child to first child (temp 4-component vector of float)
+0:83 's' (temp 4-component vector of float)
+0:83 textureGatherOffset (global 4-component vector of float)
+0:83 'samp2DA' (uniform sampler2DArray)
+0:83 Constant:
+0:83 0.300000
+0:83 0.300000
+0:83 0.300000
+0:83 Constant:
+0:83 1 (const int)
+0:83 1 (const int)
+0:84 move second child to first child (temp 4-component vector of float)
+0:84 's' (temp 4-component vector of float)
+0:84 textureGatherOffset (global 4-component vector of float)
+0:84 'samp2DS' (uniform sampler2DShadow)
+0:84 Constant:
+0:84 0.300000
+0:84 0.300000
+0:84 Constant:
+0:84 1.300000
+0:84 Constant:
+0:84 1 (const int)
+0:84 1 (const int)
+0:85 move second child to first child (temp 4-component vector of float)
+0:85 's' (temp 4-component vector of float)
+0:85 textureGatherOffset (global 4-component vector of float)
+0:85 'samp2D' (uniform sampler2D)
+0:85 Constant:
+0:85 0.300000
+0:85 0.300000
+0:85 Constant:
+0:85 1 (const int)
+0:85 1 (const int)
+0:85 Constant:
+0:85 2 (const int)
+0:90 Function Definition: bar234( (global void)
+0:90 Function Parameters:
+0:? Sequence
+0:93 move second child to first child (temp 4-component vector of float)
+0:93 's' (temp 4-component vector of float)
+0:93 textureGatherOffset (global 4-component vector of float)
+0:93 'samp2D' (uniform sampler2D)
+0:93 Constant:
+0:93 0.300000
+0:93 0.300000
+0:93 Constant:
+0:93 1 (const int)
+0:93 1 (const int)
+0:94 move second child to first child (temp 4-component vector of float)
+0:94 's' (temp 4-component vector of float)
+0:94 textureGatherOffset (global 4-component vector of float)
+0:94 'samp2DA' (uniform sampler2DArray)
+0:94 Constant:
+0:94 0.300000
+0:94 0.300000
+0:94 0.300000
+0:94 Constant:
+0:94 1 (const int)
+0:94 1 (const int)
+0:95 move second child to first child (temp 4-component vector of float)
+0:95 's' (temp 4-component vector of float)
+0:95 textureGatherOffset (global 4-component vector of float)
+0:95 'samp2DR' (uniform sampler2DRect)
+0:95 Constant:
+0:95 0.300000
+0:95 0.300000
+0:95 Constant:
+0:95 1 (const int)
+0:95 1 (const int)
+0:96 move second child to first child (temp 4-component vector of float)
+0:96 's' (temp 4-component vector of float)
+0:96 textureGatherOffset (global 4-component vector of float)
+0:96 'samp2DS' (uniform sampler2DShadow)
+0:96 Constant:
+0:96 0.300000
+0:96 0.300000
+0:96 Constant:
+0:96 1.300000
+0:96 Constant:
+0:96 1 (const int)
+0:96 1 (const int)
+0:97 move second child to first child (temp 4-component vector of float)
+0:97 's' (temp 4-component vector of float)
+0:97 textureGatherOffset (global 4-component vector of float)
+0:97 'samp2D' (uniform sampler2D)
+0:97 Constant:
+0:97 0.300000
+0:97 0.300000
+0:97 Constant:
+0:97 1 (const int)
+0:97 1 (const int)
+0:97 Constant:
+0:97 2 (const int)
+0:107 Function Definition: bar235( (global void)
+0:107 Function Parameters:
+0:109 Sequence
+0:109 Sequence
+0:109 move second child to first child (temp 3-component vector of int)
+0:109 'a' (temp 3-component vector of int)
+0:109 textureSize (global 3-component vector of int)
+0:109 'Sca' (uniform samplerCubeArray)
+0:109 Constant:
+0:109 3 (const int)
+0:110 Sequence
+0:110 move second child to first child (temp 4-component vector of float)
+0:110 'b' (temp 4-component vector of float)
+0:110 texture (global 4-component vector of float)
+0:110 'Sca' (uniform samplerCubeArray)
+0:110 'i' (smooth in 4-component vector of float)
+0:111 Sequence
+0:111 move second child to first child (temp 4-component vector of int)
+0:111 'c' (temp 4-component vector of int)
+0:111 texture (global 4-component vector of int)
+0:111 'Isca' (uniform isamplerCubeArray)
+0:111 'i' (smooth in 4-component vector of float)
+0:111 Constant:
+0:111 0.700000
+0:112 Sequence
+0:112 move second child to first child (temp 4-component vector of uint)
+0:112 'd' (temp 4-component vector of uint)
+0:112 texture (global 4-component vector of uint)
+0:112 'Usca' (uniform usamplerCubeArray)
+0:112 'i' (smooth in 4-component vector of float)
+0:114 move second child to first child (temp 4-component vector of float)
+0:114 'b' (temp 4-component vector of float)
+0:114 textureLod (global 4-component vector of float)
+0:114 'Sca' (uniform samplerCubeArray)
+0:114 'i' (smooth in 4-component vector of float)
+0:114 Constant:
+0:114 1.700000
+0:115 move second child to first child (temp 3-component vector of int)
+0:115 'a' (temp 3-component vector of int)
+0:115 textureSize (global 3-component vector of int)
+0:115 'Scas' (uniform samplerCubeArrayShadow)
+0:115 direct index (temp int)
+0:115 'a' (temp 3-component vector of int)
+0:115 Constant:
+0:115 0 (const int)
+0:116 Sequence
+0:116 move second child to first child (temp float)
+0:116 'f' (temp float)
+0:116 texture (global float)
+0:116 'Scas' (uniform samplerCubeArrayShadow)
+0:116 'i' (smooth in 4-component vector of float)
+0:116 direct index (temp float)
+0:116 'b' (temp 4-component vector of float)
+0:116 Constant:
+0:116 1 (const int)
+0:117 move second child to first child (temp 4-component vector of int)
+0:117 'c' (temp 4-component vector of int)
+0:117 textureGrad (global 4-component vector of int)
+0:117 'Isca' (uniform isamplerCubeArray)
+0:117 'i' (smooth in 4-component vector of float)
+0:117 Constant:
+0:117 0.100000
+0:117 0.100000
+0:117 0.100000
+0:117 Constant:
+0:117 0.200000
+0:117 0.200000
+0:117 0.200000
+0:129 Function Definition: bar23444( (global void)
+0:129 Function Parameters:
+0:? Sequence
+0:132 Sequence
+0:132 move second child to first child (temp float)
+0:132 'a1' (temp float)
+0:132 direct index (temp float)
+0:132 direct index (temp 3-component vector of float)
+0:132 'm43' (temp 4X3 matrix of float)
+0:132 Constant:
+0:132 3 (const int)
+0:132 Constant:
+0:132 1 (const int)
+0:134 Sequence
+0:134 move second child to first child (temp int)
+0:134 'a2' (temp int)
+0:134 Constant:
+0:134 4 (const int)
+0:135 add second child into first child (temp int)
+0:135 'a2' (temp int)
+0:135 Constant:
+0:135 3 (const int)
+0:136 add second child into first child (temp int)
+0:136 'a2' (temp int)
+0:136 Constant:
+0:136 3 (const int)
+0:137 Sequence
+0:137 move second child to first child (temp float)
+0:137 'b' (const (read only) float)
+0:137 component-wise multiply (temp float)
+0:137 Constant:
+0:137 2.000000
+0:137 'a1' (temp float)
+0:138 move second child to first child (temp float)
+0:138 direct index (temp float)
+0:138 'a' (global 3-component vector of float)
+0:138 Constant:
+0:138 0 (const int)
+0:138 Constant:
+0:138 -1.000000
+0:140 Constant:
+0:140 0.000000
+0:141 Constant:
+0:141 0.000000
+0:143 Constant:
+0:143 1 (const int)
+0:162 Function Definition: qux2( (global void)
+0:162 Function Parameters:
+0:? Sequence
+0:165 imageAtomicCompSwap (global int)
+0:165 'iimg2D' (layout(r32i ) uniform iimage2D)
+0:165 Construct ivec2 (temp 2-component vector of int)
+0:165 'i' (temp int)
+0:165 'i' (temp int)
+0:165 'i' (temp int)
+0:165 'i' (temp int)
+0:166 Sequence
+0:166 move second child to first child (temp 4-component vector of int)
+0:166 'pos' (temp 4-component vector of int)
+0:166 imageLoad (global 4-component vector of int)
+0:166 'iimg2D' (layout(r32i ) uniform iimage2D)
+0:166 Construct ivec2 (temp 2-component vector of int)
+0:166 'i' (temp int)
+0:166 'i' (temp int)
+0:? Linker Objects
+0:? 'a' (global 3-component vector of float)
+0:? 'b' (global float)
+0:? 'c' (global int)
+0:? 'i' (smooth in 4-component vector of float)
+0:? 'o' (out 4-component vector of float)
+0:? 'fflat' (flat in float)
+0:? 'fsmooth' (smooth in float)
+0:? 'fnop' (noperspective in float)
+0:? 'gl_ClipDistance' (smooth in implicitly-sized array of float ClipDistance)
+0:? 'sampC' (uniform samplerCube)
+0:? 'gl_Color' (smooth in 4-component vector of float Color)
+0:? 'gl_Color' (flat in 4-component vector of float Color)
+0:? 'samp2D' (uniform sampler2D)
+0:? 'samp2DS' (uniform sampler2DShadow)
+0:? 'samp2DR' (uniform sampler2DRect)
+0:? 'samp2DA' (uniform sampler2DArray)
+0:? 'Sca' (uniform samplerCubeArray)
+0:? 'Isca' (uniform isamplerCubeArray)
+0:? 'Usca' (uniform usamplerCubeArray)
+0:? 'Scas' (uniform samplerCubeArrayShadow)
+0:? 'x' (global int)
+0:? 'ai' (const 3-element array of int)
+0:? 10 (const int)
+0:? 23 (const int)
+0:? 32 (const int)
+0:? 'instanceName' (layout(binding=0 column_major shared ) uniform block{layout(column_major shared ) uniform int a})
+0:? 'bounds' (layout(binding=0 ) uniform sampler2D)
+0:? 'gl_FogFragCoord' (smooth in float)
+0:? 'iimg2Dbad' (layout(r32i ) uniform iimage2D)
+0:? 'iimg2D' (layout(r32i ) uniform iimage2D)
+
+
+Linked fragment stage:
+
+
+Shader version: 130
+Requested GL_ARB_gpu_shader5
+Requested GL_ARB_separate_shader_objects
+Requested GL_ARB_shader_image_load_store
+Requested GL_ARB_shading_language_420pack
+Requested GL_ARB_texture_cube_map_array
+Requested GL_ARB_texture_gather
+Requested GL_ARB_texture_rectangle
+using early_fragment_tests
+ERROR: node is still EOpNull!
+0:16 Function Definition: main( (global void)
+0:16 Function Parameters:
+0:18 Sequence
+0:18 Sequence
+0:18 move second child to first child (temp float)
+0:18 'clip' (temp float)
+0:18 direct index (smooth temp float ClipDistance)
+0:18 'gl_ClipDistance' (smooth in 4-element array of float ClipDistance)
+0:18 Constant:
+0:18 3 (const int)
+0:23 Function Definition: foo( (global void)
+0:23 Function Parameters:
+0:25 Sequence
+0:25 Sequence
+0:25 move second child to first child (temp 4-component vector of float)
+0:25 's' (temp 4-component vector of float)
+0:25 textureGather (global 4-component vector of float)
+0:25 'sampC' (uniform samplerCube)
+0:25 Constant:
+0:25 0.200000
+0:25 0.200000
+0:25 0.200000
+0:30 Function Definition: bar( (global void)
+0:30 Function Parameters:
+0:32 Sequence
+0:32 Sequence
+0:32 move second child to first child (temp 4-component vector of float)
+0:32 's' (temp 4-component vector of float)
+0:32 textureGather (global 4-component vector of float)
+0:32 'sampC' (uniform samplerCube)
+0:32 Constant:
+0:32 0.200000
+0:32 0.200000
+0:32 0.200000
+0:43 Function Definition: bar2( (global void)
+0:43 Function Parameters:
+0:45 Sequence
+0:45 Sequence
+0:45 move second child to first child (temp 4-component vector of float)
+0:45 's' (temp 4-component vector of float)
+0:45 textureGather (global 4-component vector of float)
+0:45 'sampC' (uniform samplerCube)
+0:45 Constant:
+0:45 0.200000
+0:45 0.200000
+0:45 0.200000
+0:49 move second child to first child (temp 3-component vector of bool)
+0:49 'b3' (temp 3-component vector of bool)
+0:49 Compare Less Than (global 3-component vector of bool)
+0:49 'uv3' (temp 3-component vector of uint)
+0:49 'uv3' (temp 3-component vector of uint)
+0:50 move second child to first child (temp 3-component vector of bool)
+0:50 'b3' (temp 3-component vector of bool)
+0:50 Equal (global 3-component vector of bool)
+0:50 'uv3' (temp 3-component vector of uint)
+0:50 'uv3' (temp 3-component vector of uint)
+0:56 direct index (temp int)
+0:56 'a1' (temp 1-element array of int)
+0:56 Constant:
+0:56 0 (const int)
+0:57 direct index (temp int)
+0:57 'a2' (temp 1-element array of int)
+0:57 Constant:
+0:57 0 (const int)
+0:60 direct index (temp int)
+0:60 'a3' (temp 4-element array of int)
+0:60 Constant:
+0:60 3 (const int)
+0:61 Compare Not Equal (temp bool)
+0:61 'b3' (temp 3-component vector of bool)
+0:61 'b3' (temp 3-component vector of bool)
+0:62 Constant:
+0:62 false (const bool)
+0:63 Constant:
+0:63 false (const bool)
+0:64 Constant:
+0:64 false (const bool)
+0:65 Constant:
+0:65 true (const bool)
+0:66 Constant:
+0:66 false (const bool)
+0:77 Function Definition: bar23( (global void)
+0:77 Function Parameters:
+0:? Sequence
+0:80 's' (temp 4-component vector of float)
+0:81 move second child to first child (temp 4-component vector of float)
+0:81 's' (temp 4-component vector of float)
+0:81 textureGatherOffset (global 4-component vector of float)
+0:81 'samp2DR' (uniform sampler2DRect)
+0:81 Constant:
+0:81 0.300000
+0:81 0.300000
+0:81 Constant:
+0:81 1 (const int)
+0:81 1 (const int)
+0:82 move second child to first child (temp 4-component vector of float)
+0:82 's' (temp 4-component vector of float)
+0:82 textureGatherOffset (global 4-component vector of float)
+0:82 'samp2D' (uniform sampler2D)
+0:82 Constant:
+0:82 0.300000
+0:82 0.300000
+0:82 Constant:
+0:82 1 (const int)
+0:82 1 (const int)
+0:83 move second child to first child (temp 4-component vector of float)
+0:83 's' (temp 4-component vector of float)
+0:83 textureGatherOffset (global 4-component vector of float)
+0:83 'samp2DA' (uniform sampler2DArray)
+0:83 Constant:
+0:83 0.300000
+0:83 0.300000
+0:83 0.300000
+0:83 Constant:
+0:83 1 (const int)
+0:83 1 (const int)
+0:84 move second child to first child (temp 4-component vector of float)
+0:84 's' (temp 4-component vector of float)
+0:84 textureGatherOffset (global 4-component vector of float)
+0:84 'samp2DS' (uniform sampler2DShadow)
+0:84 Constant:
+0:84 0.300000
+0:84 0.300000
+0:84 Constant:
+0:84 1.300000
+0:84 Constant:
+0:84 1 (const int)
+0:84 1 (const int)
+0:85 move second child to first child (temp 4-component vector of float)
+0:85 's' (temp 4-component vector of float)
+0:85 textureGatherOffset (global 4-component vector of float)
+0:85 'samp2D' (uniform sampler2D)
+0:85 Constant:
+0:85 0.300000
+0:85 0.300000
+0:85 Constant:
+0:85 1 (const int)
+0:85 1 (const int)
+0:85 Constant:
+0:85 2 (const int)
+0:90 Function Definition: bar234( (global void)
+0:90 Function Parameters:
+0:? Sequence
+0:93 move second child to first child (temp 4-component vector of float)
+0:93 's' (temp 4-component vector of float)
+0:93 textureGatherOffset (global 4-component vector of float)
+0:93 'samp2D' (uniform sampler2D)
+0:93 Constant:
+0:93 0.300000
+0:93 0.300000
+0:93 Constant:
+0:93 1 (const int)
+0:93 1 (const int)
+0:94 move second child to first child (temp 4-component vector of float)
+0:94 's' (temp 4-component vector of float)
+0:94 textureGatherOffset (global 4-component vector of float)
+0:94 'samp2DA' (uniform sampler2DArray)
+0:94 Constant:
+0:94 0.300000
+0:94 0.300000
+0:94 0.300000
+0:94 Constant:
+0:94 1 (const int)
+0:94 1 (const int)
+0:95 move second child to first child (temp 4-component vector of float)
+0:95 's' (temp 4-component vector of float)
+0:95 textureGatherOffset (global 4-component vector of float)
+0:95 'samp2DR' (uniform sampler2DRect)
+0:95 Constant:
+0:95 0.300000
+0:95 0.300000
+0:95 Constant:
+0:95 1 (const int)
+0:95 1 (const int)
+0:96 move second child to first child (temp 4-component vector of float)
+0:96 's' (temp 4-component vector of float)
+0:96 textureGatherOffset (global 4-component vector of float)
+0:96 'samp2DS' (uniform sampler2DShadow)
+0:96 Constant:
+0:96 0.300000
+0:96 0.300000
+0:96 Constant:
+0:96 1.300000
+0:96 Constant:
+0:96 1 (const int)
+0:96 1 (const int)
+0:97 move second child to first child (temp 4-component vector of float)
+0:97 's' (temp 4-component vector of float)
+0:97 textureGatherOffset (global 4-component vector of float)
+0:97 'samp2D' (uniform sampler2D)
+0:97 Constant:
+0:97 0.300000
+0:97 0.300000
+0:97 Constant:
+0:97 1 (const int)
+0:97 1 (const int)
+0:97 Constant:
+0:97 2 (const int)
+0:107 Function Definition: bar235( (global void)
+0:107 Function Parameters:
+0:109 Sequence
+0:109 Sequence
+0:109 move second child to first child (temp 3-component vector of int)
+0:109 'a' (temp 3-component vector of int)
+0:109 textureSize (global 3-component vector of int)
+0:109 'Sca' (uniform samplerCubeArray)
+0:109 Constant:
+0:109 3 (const int)
+0:110 Sequence
+0:110 move second child to first child (temp 4-component vector of float)
+0:110 'b' (temp 4-component vector of float)
+0:110 texture (global 4-component vector of float)
+0:110 'Sca' (uniform samplerCubeArray)
+0:110 'i' (smooth in 4-component vector of float)
+0:111 Sequence
+0:111 move second child to first child (temp 4-component vector of int)
+0:111 'c' (temp 4-component vector of int)
+0:111 texture (global 4-component vector of int)
+0:111 'Isca' (uniform isamplerCubeArray)
+0:111 'i' (smooth in 4-component vector of float)
+0:111 Constant:
+0:111 0.700000
+0:112 Sequence
+0:112 move second child to first child (temp 4-component vector of uint)
+0:112 'd' (temp 4-component vector of uint)
+0:112 texture (global 4-component vector of uint)
+0:112 'Usca' (uniform usamplerCubeArray)
+0:112 'i' (smooth in 4-component vector of float)
+0:114 move second child to first child (temp 4-component vector of float)
+0:114 'b' (temp 4-component vector of float)
+0:114 textureLod (global 4-component vector of float)
+0:114 'Sca' (uniform samplerCubeArray)
+0:114 'i' (smooth in 4-component vector of float)
+0:114 Constant:
+0:114 1.700000
+0:115 move second child to first child (temp 3-component vector of int)
+0:115 'a' (temp 3-component vector of int)
+0:115 textureSize (global 3-component vector of int)
+0:115 'Scas' (uniform samplerCubeArrayShadow)
+0:115 direct index (temp int)
+0:115 'a' (temp 3-component vector of int)
+0:115 Constant:
+0:115 0 (const int)
+0:116 Sequence
+0:116 move second child to first child (temp float)
+0:116 'f' (temp float)
+0:116 texture (global float)
+0:116 'Scas' (uniform samplerCubeArrayShadow)
+0:116 'i' (smooth in 4-component vector of float)
+0:116 direct index (temp float)
+0:116 'b' (temp 4-component vector of float)
+0:116 Constant:
+0:116 1 (const int)
+0:117 move second child to first child (temp 4-component vector of int)
+0:117 'c' (temp 4-component vector of int)
+0:117 textureGrad (global 4-component vector of int)
+0:117 'Isca' (uniform isamplerCubeArray)
+0:117 'i' (smooth in 4-component vector of float)
+0:117 Constant:
+0:117 0.100000
+0:117 0.100000
+0:117 0.100000
+0:117 Constant:
+0:117 0.200000
+0:117 0.200000
+0:117 0.200000
+0:129 Function Definition: bar23444( (global void)
+0:129 Function Parameters:
+0:? Sequence
+0:132 Sequence
+0:132 move second child to first child (temp float)
+0:132 'a1' (temp float)
+0:132 direct index (temp float)
+0:132 direct index (temp 3-component vector of float)
+0:132 'm43' (temp 4X3 matrix of float)
+0:132 Constant:
+0:132 3 (const int)
+0:132 Constant:
+0:132 1 (const int)
+0:134 Sequence
+0:134 move second child to first child (temp int)
+0:134 'a2' (temp int)
+0:134 Constant:
+0:134 4 (const int)
+0:135 add second child into first child (temp int)
+0:135 'a2' (temp int)
+0:135 Constant:
+0:135 3 (const int)
+0:136 add second child into first child (temp int)
+0:136 'a2' (temp int)
+0:136 Constant:
+0:136 3 (const int)
+0:137 Sequence
+0:137 move second child to first child (temp float)
+0:137 'b' (const (read only) float)
+0:137 component-wise multiply (temp float)
+0:137 Constant:
+0:137 2.000000
+0:137 'a1' (temp float)
+0:138 move second child to first child (temp float)
+0:138 direct index (temp float)
+0:138 'a' (global 3-component vector of float)
+0:138 Constant:
+0:138 0 (const int)
+0:138 Constant:
+0:138 -1.000000
+0:140 Constant:
+0:140 0.000000
+0:141 Constant:
+0:141 0.000000
+0:143 Constant:
+0:143 1 (const int)
+0:162 Function Definition: qux2( (global void)
+0:162 Function Parameters:
+0:? Sequence
+0:165 imageAtomicCompSwap (global int)
+0:165 'iimg2D' (layout(r32i ) uniform iimage2D)
+0:165 Construct ivec2 (temp 2-component vector of int)
+0:165 'i' (temp int)
+0:165 'i' (temp int)
+0:165 'i' (temp int)
+0:165 'i' (temp int)
+0:166 Sequence
+0:166 move second child to first child (temp 4-component vector of int)
+0:166 'pos' (temp 4-component vector of int)
+0:166 imageLoad (global 4-component vector of int)
+0:166 'iimg2D' (layout(r32i ) uniform iimage2D)
+0:166 Construct ivec2 (temp 2-component vector of int)
+0:166 'i' (temp int)
+0:166 'i' (temp int)
+0:? Linker Objects
+0:? 'a' (global 3-component vector of float)
+0:? 'b' (global float)
+0:? 'c' (global int)
+0:? 'i' (smooth in 4-component vector of float)
+0:? 'o' (out 4-component vector of float)
+0:? 'fflat' (flat in float)
+0:? 'fsmooth' (smooth in float)
+0:? 'fnop' (noperspective in float)
+0:? 'gl_ClipDistance' (smooth in 4-element array of float ClipDistance)
+0:? 'sampC' (uniform samplerCube)
+0:? 'gl_Color' (smooth in 4-component vector of float Color)
+0:? 'gl_Color' (flat in 4-component vector of float Color)
+0:? 'samp2D' (uniform sampler2D)
+0:? 'samp2DS' (uniform sampler2DShadow)
+0:? 'samp2DR' (uniform sampler2DRect)
+0:? 'samp2DA' (uniform sampler2DArray)
+0:? 'Sca' (uniform samplerCubeArray)
+0:? 'Isca' (uniform isamplerCubeArray)
+0:? 'Usca' (uniform usamplerCubeArray)
+0:? 'Scas' (uniform samplerCubeArrayShadow)
+0:? 'x' (global int)
+0:? 'ai' (const 3-element array of int)
+0:? 10 (const int)
+0:? 23 (const int)
+0:? 32 (const int)
+0:? 'instanceName' (layout(binding=0 column_major shared ) uniform block{layout(column_major shared ) uniform int a})
+0:? 'bounds' (layout(binding=0 ) uniform sampler2D)
+0:? 'gl_FogFragCoord' (smooth in float)
+0:? 'iimg2Dbad' (layout(r32i ) uniform iimage2D)
+0:? 'iimg2D' (layout(r32i ) uniform iimage2D)
+
diff --git a/chromium/third_party/glslang/src/Test/baseResults/130.vert.out b/chromium/third_party/glslang/src/Test/baseResults/130.vert.out
new file mode 100644
index 00000000000..7cfeb19d8e3
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/130.vert.out
@@ -0,0 +1,303 @@
+130.vert
+ERROR: 0:59: 'gl_InstanceID' : undeclared identifier
+ERROR: 0:59: '=' : cannot convert from 'temp float' to 'temp int'
+ERROR: 0:61: 'texelFetch' : no matching overloaded function found
+ERROR: 0:61: 'assign' : cannot convert from 'const float' to 'temp int'
+ERROR: 0:75: '##' : token pasting not implemented (internal error)
+ERROR: 0:75: '' : syntax error
+ERROR: 6 compilation errors. No code generated.
+
+
+Shader version: 130
+ERROR: node is still EOpNull!
+0:15 Function Definition: main( (global void)
+0:15 Function Parameters:
+0:17 Sequence
+0:17 Sequence
+0:17 move second child to first child (temp float)
+0:17 'f' (temp float)
+0:17 Constant:
+0:17 3.000000
+0:18 switch
+0:18 condition
+0:18 'c' (uniform int)
+0:18 body
+0:18 Sequence
+0:19 case: with expression
+0:19 Constant:
+0:19 1 (const int)
+0:? Sequence
+0:20 move second child to first child (temp float)
+0:20 'f' (temp float)
+0:20 sine (global float)
+0:20 'f' (temp float)
+0:21 Branch: Break
+0:22 case: with expression
+0:22 Constant:
+0:22 2 (const int)
+0:? Sequence
+0:23 move second child to first child (temp float)
+0:23 'f' (temp float)
+0:23 component-wise multiply (temp float)
+0:23 'f' (temp float)
+0:23 'f' (temp float)
+0:24 default:
+0:? Sequence
+0:25 move second child to first child (temp float)
+0:25 'f' (temp float)
+0:25 Constant:
+0:25 3.000000
+0:29 move second child to first child (temp uint)
+0:29 'i' (temp uint)
+0:29 direct index (temp uint)
+0:29 texture (global 4-component vector of uint)
+0:29 'us2D' (uniform usampler2D)
+0:29 Convert int to float (temp 2-component vector of float)
+0:29 'x' (in 2-component vector of int)
+0:29 Constant:
+0:29 3 (const int)
+0:30 inclusive-or (temp uint)
+0:30 left-shift (temp uint)
+0:30 'i' (temp uint)
+0:30 Constant:
+0:30 3 (const uint)
+0:30 Constant:
+0:30 69 (const uint)
+0:33 Sequence
+0:33 move second child to first child (temp 3-component vector of float)
+0:33 'v11' (temp 3-component vector of float)
+0:33 modf (global 3-component vector of float)
+0:33 'modfIn' (temp 3-component vector of float)
+0:33 'modfOut' (temp 3-component vector of float)
+0:34 Sequence
+0:34 move second child to first child (temp float)
+0:34 't' (temp float)
+0:34 trunc (global float)
+0:34 'f' (temp float)
+0:35 Sequence
+0:35 move second child to first child (temp 2-component vector of float)
+0:35 'v12' (temp 2-component vector of float)
+0:35 round (global 2-component vector of float)
+0:35 'v2a' (in 2-component vector of float)
+0:36 Sequence
+0:36 move second child to first child (temp 2-component vector of float)
+0:36 'v13' (temp 2-component vector of float)
+0:36 roundEven (global 2-component vector of float)
+0:36 'v2a' (in 2-component vector of float)
+0:37 Sequence
+0:37 move second child to first child (temp 2-component vector of bool)
+0:37 'b10' (temp 2-component vector of bool)
+0:37 isnan (global 2-component vector of bool)
+0:37 'v2a' (in 2-component vector of float)
+0:38 Sequence
+0:38 move second child to first child (temp 4-component vector of bool)
+0:38 'b11' (temp 4-component vector of bool)
+0:38 isinf (global 4-component vector of bool)
+0:38 'v4' (uniform 4-component vector of float)
+0:40 add (temp 2-component vector of float)
+0:40 hyp. sine (global float)
+0:40 'c1D' (in float)
+0:41 vector-scale (temp 2-component vector of float)
+0:41 hyp. cosine (global float)
+0:41 'c1D' (in float)
+0:41 hyp. tangent (global 2-component vector of float)
+0:41 'c2D' (in 2-component vector of float)
+0:42 add (temp 4-component vector of float)
+0:42 arc hyp. sine (global 4-component vector of float)
+0:42 'c4D' (smooth temp 4-component vector of float)
+0:42 arc hyp. cosine (global 4-component vector of float)
+0:42 'c4D' (smooth temp 4-component vector of float)
+0:43 arc hyp. tangent (global 3-component vector of float)
+0:43 'c3D' (in 3-component vector of float)
+0:45 Sequence
+0:45 move second child to first child (temp int)
+0:45 'id' (temp int)
+0:45 'gl_VertexID' (gl_VertexId int VertexId)
+0:46 move second child to first child (temp float)
+0:46 direct index (smooth temp float ClipDistance)
+0:46 'gl_ClipDistance' (smooth out implicitly-sized array of float ClipDistance)
+0:46 Constant:
+0:46 1 (const int)
+0:46 Constant:
+0:46 0.300000
+0:57 Function Definition: foo88( (global void)
+0:57 Function Parameters:
+0:? Sequence
+0:61 'id' (temp int)
+0:63 'gl_ClipVertex' (gl_ClipVertex 4-component vector of float ClipVertex)
+0:64 'gl_Color' (in 4-component vector of float Color)
+0:65 direct index (temp structure{global 4-component vector of float ambient, global 4-component vector of float diffuse, global 4-component vector of float specular, global 4-component vector of float position, global 4-component vector of float halfVector, global 3-component vector of float spotDirection, global float spotExponent, global float spotCutoff, global float spotCosCutoff, global float constantAttenuation, global float linearAttenuation, global float quadraticAttenuation})
+0:65 'gl_LightSource' (uniform 32-element array of structure{global 4-component vector of float ambient, global 4-component vector of float diffuse, global 4-component vector of float specular, global 4-component vector of float position, global 4-component vector of float halfVector, global 3-component vector of float spotDirection, global float spotExponent, global float spotCutoff, global float spotCosCutoff, global float constantAttenuation, global float linearAttenuation, global float quadraticAttenuation})
+0:65 Constant:
+0:65 0 (const int)
+0:66 far: direct index for structure (global float)
+0:66 'gl_DepthRange' (uniform structure{global float near, global float far, global float diff})
+0:66 Constant:
+0:66 1 (const int)
+0:67 'gl_TexCoord' (smooth out implicitly-sized array of 4-component vector of float TexCoord)
+0:68 'gl_FogFragCoord' (smooth out float FogFragCoord)
+0:69 'gl_FrontColor' (smooth out 4-component vector of float FrontColor)
+0:? Linker Objects
+0:? 'c' (uniform int)
+0:? 'us2D' (uniform usampler2D)
+0:? 'x' (in 2-component vector of int)
+0:? 'v2a' (in 2-component vector of float)
+0:? 'c1D' (in float)
+0:? 'c2D' (in 2-component vector of float)
+0:? 'c3D' (in 3-component vector of float)
+0:? 'c4D' (smooth temp 4-component vector of float)
+0:? 'v4' (uniform 4-component vector of float)
+0:? 'gl_ClipDistance' (smooth out implicitly-sized array of float ClipDistance)
+0:? 'gl_TexCoord' (smooth out implicitly-sized array of 4-component vector of float TexCoord)
+0:? 'abc' (global int)
+0:? 'gl_VertexID' (gl_VertexId int VertexId)
+
+
+Linked vertex stage:
+
+ERROR: Linking vertex stage: Can only use one of gl_ClipDistance or gl_ClipVertex (gl_ClipDistance is preferred)
+
+Shader version: 130
+ERROR: node is still EOpNull!
+0:15 Function Definition: main( (global void)
+0:15 Function Parameters:
+0:17 Sequence
+0:17 Sequence
+0:17 move second child to first child (temp float)
+0:17 'f' (temp float)
+0:17 Constant:
+0:17 3.000000
+0:18 switch
+0:18 condition
+0:18 'c' (uniform int)
+0:18 body
+0:18 Sequence
+0:19 case: with expression
+0:19 Constant:
+0:19 1 (const int)
+0:? Sequence
+0:20 move second child to first child (temp float)
+0:20 'f' (temp float)
+0:20 sine (global float)
+0:20 'f' (temp float)
+0:21 Branch: Break
+0:22 case: with expression
+0:22 Constant:
+0:22 2 (const int)
+0:? Sequence
+0:23 move second child to first child (temp float)
+0:23 'f' (temp float)
+0:23 component-wise multiply (temp float)
+0:23 'f' (temp float)
+0:23 'f' (temp float)
+0:24 default:
+0:? Sequence
+0:25 move second child to first child (temp float)
+0:25 'f' (temp float)
+0:25 Constant:
+0:25 3.000000
+0:29 move second child to first child (temp uint)
+0:29 'i' (temp uint)
+0:29 direct index (temp uint)
+0:29 texture (global 4-component vector of uint)
+0:29 'us2D' (uniform usampler2D)
+0:29 Convert int to float (temp 2-component vector of float)
+0:29 'x' (in 2-component vector of int)
+0:29 Constant:
+0:29 3 (const int)
+0:30 inclusive-or (temp uint)
+0:30 left-shift (temp uint)
+0:30 'i' (temp uint)
+0:30 Constant:
+0:30 3 (const uint)
+0:30 Constant:
+0:30 69 (const uint)
+0:33 Sequence
+0:33 move second child to first child (temp 3-component vector of float)
+0:33 'v11' (temp 3-component vector of float)
+0:33 modf (global 3-component vector of float)
+0:33 'modfIn' (temp 3-component vector of float)
+0:33 'modfOut' (temp 3-component vector of float)
+0:34 Sequence
+0:34 move second child to first child (temp float)
+0:34 't' (temp float)
+0:34 trunc (global float)
+0:34 'f' (temp float)
+0:35 Sequence
+0:35 move second child to first child (temp 2-component vector of float)
+0:35 'v12' (temp 2-component vector of float)
+0:35 round (global 2-component vector of float)
+0:35 'v2a' (in 2-component vector of float)
+0:36 Sequence
+0:36 move second child to first child (temp 2-component vector of float)
+0:36 'v13' (temp 2-component vector of float)
+0:36 roundEven (global 2-component vector of float)
+0:36 'v2a' (in 2-component vector of float)
+0:37 Sequence
+0:37 move second child to first child (temp 2-component vector of bool)
+0:37 'b10' (temp 2-component vector of bool)
+0:37 isnan (global 2-component vector of bool)
+0:37 'v2a' (in 2-component vector of float)
+0:38 Sequence
+0:38 move second child to first child (temp 4-component vector of bool)
+0:38 'b11' (temp 4-component vector of bool)
+0:38 isinf (global 4-component vector of bool)
+0:38 'v4' (uniform 4-component vector of float)
+0:40 add (temp 2-component vector of float)
+0:40 hyp. sine (global float)
+0:40 'c1D' (in float)
+0:41 vector-scale (temp 2-component vector of float)
+0:41 hyp. cosine (global float)
+0:41 'c1D' (in float)
+0:41 hyp. tangent (global 2-component vector of float)
+0:41 'c2D' (in 2-component vector of float)
+0:42 add (temp 4-component vector of float)
+0:42 arc hyp. sine (global 4-component vector of float)
+0:42 'c4D' (smooth temp 4-component vector of float)
+0:42 arc hyp. cosine (global 4-component vector of float)
+0:42 'c4D' (smooth temp 4-component vector of float)
+0:43 arc hyp. tangent (global 3-component vector of float)
+0:43 'c3D' (in 3-component vector of float)
+0:45 Sequence
+0:45 move second child to first child (temp int)
+0:45 'id' (temp int)
+0:45 'gl_VertexID' (gl_VertexId int VertexId)
+0:46 move second child to first child (temp float)
+0:46 direct index (smooth temp float ClipDistance)
+0:46 'gl_ClipDistance' (smooth out 2-element array of float ClipDistance)
+0:46 Constant:
+0:46 1 (const int)
+0:46 Constant:
+0:46 0.300000
+0:57 Function Definition: foo88( (global void)
+0:57 Function Parameters:
+0:? Sequence
+0:61 'id' (temp int)
+0:63 'gl_ClipVertex' (gl_ClipVertex 4-component vector of float ClipVertex)
+0:64 'gl_Color' (in 4-component vector of float Color)
+0:65 direct index (temp structure{global 4-component vector of float ambient, global 4-component vector of float diffuse, global 4-component vector of float specular, global 4-component vector of float position, global 4-component vector of float halfVector, global 3-component vector of float spotDirection, global float spotExponent, global float spotCutoff, global float spotCosCutoff, global float constantAttenuation, global float linearAttenuation, global float quadraticAttenuation})
+0:65 'gl_LightSource' (uniform 32-element array of structure{global 4-component vector of float ambient, global 4-component vector of float diffuse, global 4-component vector of float specular, global 4-component vector of float position, global 4-component vector of float halfVector, global 3-component vector of float spotDirection, global float spotExponent, global float spotCutoff, global float spotCosCutoff, global float constantAttenuation, global float linearAttenuation, global float quadraticAttenuation})
+0:65 Constant:
+0:65 0 (const int)
+0:66 far: direct index for structure (global float)
+0:66 'gl_DepthRange' (uniform structure{global float near, global float far, global float diff})
+0:66 Constant:
+0:66 1 (const int)
+0:67 'gl_TexCoord' (smooth out 1-element array of 4-component vector of float TexCoord)
+0:68 'gl_FogFragCoord' (smooth out float FogFragCoord)
+0:69 'gl_FrontColor' (smooth out 4-component vector of float FrontColor)
+0:? Linker Objects
+0:? 'c' (uniform int)
+0:? 'us2D' (uniform usampler2D)
+0:? 'x' (in 2-component vector of int)
+0:? 'v2a' (in 2-component vector of float)
+0:? 'c1D' (in float)
+0:? 'c2D' (in 2-component vector of float)
+0:? 'c3D' (in 3-component vector of float)
+0:? 'c4D' (smooth temp 4-component vector of float)
+0:? 'v4' (uniform 4-component vector of float)
+0:? 'gl_ClipDistance' (smooth out 2-element array of float ClipDistance)
+0:? 'gl_TexCoord' (smooth out 1-element array of 4-component vector of float TexCoord)
+0:? 'abc' (global int)
+0:? 'gl_VertexID' (gl_VertexId int VertexId)
+
diff --git a/chromium/third_party/glslang/src/Test/baseResults/140.frag.out b/chromium/third_party/glslang/src/Test/baseResults/140.frag.out
new file mode 100644
index 00000000000..fbeee83a764
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/140.frag.out
@@ -0,0 +1,223 @@
+140.frag
+WARNING: 0:3: varying deprecated in version 130; may be removed in future release
+ERROR: 0:17: '#error' : GL_ES is not set
+ERROR: 0:20: 'fragment-shader struct input' : not supported for this version or the enabled extensions
+ERROR: 0:24: 'location' : not supported for this version or the enabled extensions
+ERROR: 0:24: 'location qualifier on input' : not supported for this version or the enabled extensions
+ERROR: 0:26: 'location' : not supported for this version or the enabled extensions
+ERROR: 0:26: 'location qualifier on output' : not supported for this version or the enabled extensions
+ERROR: 0:40: 'assign' : l-value required "v" (can't modify shader input)
+ERROR: 0:40: 'out' : Non-L-value cannot be passed for 'out' or 'inout' parameters.
+ERROR: 8 compilation errors. No code generated.
+
+
+Shader version: 140
+Requested GL_ARB_explicit_attrib_location
+Requested GL_ARB_separate_shader_objects
+ERROR: node is still EOpNull!
+0:10 Function Definition: main( (global void)
+0:10 Function Parameters:
+0:12 Sequence
+0:12 Sequence
+0:12 move second child to first child (temp float)
+0:12 'clip' (temp float)
+0:12 direct index (smooth temp float ClipDistance)
+0:12 'gl_ClipDistance' (smooth in 5-element array of float ClipDistance)
+0:12 Constant:
+0:12 2 (const int)
+0:22 Sequence
+0:22 move second child to first child (temp float)
+0:22 'patch' (global float)
+0:22 Constant:
+0:22 3.100000
+0:38 Function Definition: foo( (global void)
+0:38 Function Parameters:
+0:40 Sequence
+0:40 Sequence
+0:40 move second child to first child (temp 2-component vector of float)
+0:40 'r1' (temp 2-component vector of float)
+0:40 modf (global 2-component vector of float)
+0:40 vector swizzle (temp 2-component vector of float)
+0:40 'v' (smooth in 4-component vector of float)
+0:40 Sequence
+0:40 Constant:
+0:40 0 (const int)
+0:40 Constant:
+0:40 1 (const int)
+0:40 vector swizzle (temp 2-component vector of float)
+0:40 'v' (smooth in 4-component vector of float)
+0:40 Sequence
+0:40 Constant:
+0:40 2 (const int)
+0:40 Constant:
+0:40 3 (const int)
+0:41 Sequence
+0:41 move second child to first child (temp 2-component vector of float)
+0:41 'r2' (temp 2-component vector of float)
+0:41 modf (global 2-component vector of float)
+0:41 vector swizzle (temp 2-component vector of float)
+0:41 'o' (out 4-component vector of float)
+0:41 Sequence
+0:41 Constant:
+0:41 0 (const int)
+0:41 Constant:
+0:41 1 (const int)
+0:41 vector swizzle (temp 2-component vector of float)
+0:41 'o' (out 4-component vector of float)
+0:41 Sequence
+0:41 Constant:
+0:41 2 (const int)
+0:41 Constant:
+0:41 3 (const int)
+0:42 move second child to first child (temp float)
+0:42 direct index (temp float)
+0:42 'o' (out 4-component vector of float)
+0:42 Constant:
+0:42 2 (const int)
+0:42 Function Call: fooi( (global float)
+0:47 Sequence
+0:47 move second child to first child (temp float)
+0:47 'i1' (global float)
+0:47 Test condition and select (temp float)
+0:47 Condition
+0:47 'gl_FrontFacing' (gl_FrontFacing bool Face)
+0:47 true case
+0:47 Constant:
+0:47 -2.000000
+0:47 false case
+0:47 Constant:
+0:47 2.000000
+0:48 Sequence
+0:48 move second child to first child (temp float)
+0:48 'i2' (global float)
+0:48 Constant:
+0:48 102.000000
+0:50 Function Definition: fooi( (global float)
+0:50 Function Parameters:
+0:52 Sequence
+0:52 Branch: Return with expression
+0:52 add (temp float)
+0:52 'i1' (global float)
+0:52 'i2' (global float)
+0:? Linker Objects
+0:? 'v' (smooth in 4-component vector of float)
+0:? 'i' (smooth in 4-component vector of float)
+0:? 'o' (out 4-component vector of float)
+0:? 'gl_ClipDistance' (smooth in 5-element array of float ClipDistance)
+0:? 'gl_ClipDistance' (smooth in 5-element array of float ClipDistance)
+0:? 's' (smooth in structure{global float f})
+0:? 'patch' (global float)
+0:? 'vl' (layout(location=3 ) smooth in 4-component vector of float)
+0:? 'factorBad' (layout(location=3 ) out 4-component vector of float)
+0:? 'factor' (layout(location=5 ) out 4-component vector of float)
+0:? 'vl2' (layout(location=4 ) smooth in 4-component vector of float)
+0:? 'i1' (global float)
+0:? 'i2' (global float)
+
+
+Linked fragment stage:
+
+
+Shader version: 140
+Requested GL_ARB_explicit_attrib_location
+Requested GL_ARB_separate_shader_objects
+ERROR: node is still EOpNull!
+0:10 Function Definition: main( (global void)
+0:10 Function Parameters:
+0:12 Sequence
+0:12 Sequence
+0:12 move second child to first child (temp float)
+0:12 'clip' (temp float)
+0:12 direct index (smooth temp float ClipDistance)
+0:12 'gl_ClipDistance' (smooth in 5-element array of float ClipDistance)
+0:12 Constant:
+0:12 2 (const int)
+0:22 Sequence
+0:22 move second child to first child (temp float)
+0:22 'patch' (global float)
+0:22 Constant:
+0:22 3.100000
+0:38 Function Definition: foo( (global void)
+0:38 Function Parameters:
+0:40 Sequence
+0:40 Sequence
+0:40 move second child to first child (temp 2-component vector of float)
+0:40 'r1' (temp 2-component vector of float)
+0:40 modf (global 2-component vector of float)
+0:40 vector swizzle (temp 2-component vector of float)
+0:40 'v' (smooth in 4-component vector of float)
+0:40 Sequence
+0:40 Constant:
+0:40 0 (const int)
+0:40 Constant:
+0:40 1 (const int)
+0:40 vector swizzle (temp 2-component vector of float)
+0:40 'v' (smooth in 4-component vector of float)
+0:40 Sequence
+0:40 Constant:
+0:40 2 (const int)
+0:40 Constant:
+0:40 3 (const int)
+0:41 Sequence
+0:41 move second child to first child (temp 2-component vector of float)
+0:41 'r2' (temp 2-component vector of float)
+0:41 modf (global 2-component vector of float)
+0:41 vector swizzle (temp 2-component vector of float)
+0:41 'o' (out 4-component vector of float)
+0:41 Sequence
+0:41 Constant:
+0:41 0 (const int)
+0:41 Constant:
+0:41 1 (const int)
+0:41 vector swizzle (temp 2-component vector of float)
+0:41 'o' (out 4-component vector of float)
+0:41 Sequence
+0:41 Constant:
+0:41 2 (const int)
+0:41 Constant:
+0:41 3 (const int)
+0:42 move second child to first child (temp float)
+0:42 direct index (temp float)
+0:42 'o' (out 4-component vector of float)
+0:42 Constant:
+0:42 2 (const int)
+0:42 Function Call: fooi( (global float)
+0:47 Sequence
+0:47 move second child to first child (temp float)
+0:47 'i1' (global float)
+0:47 Test condition and select (temp float)
+0:47 Condition
+0:47 'gl_FrontFacing' (gl_FrontFacing bool Face)
+0:47 true case
+0:47 Constant:
+0:47 -2.000000
+0:47 false case
+0:47 Constant:
+0:47 2.000000
+0:48 Sequence
+0:48 move second child to first child (temp float)
+0:48 'i2' (global float)
+0:48 Constant:
+0:48 102.000000
+0:50 Function Definition: fooi( (global float)
+0:50 Function Parameters:
+0:52 Sequence
+0:52 Branch: Return with expression
+0:52 add (temp float)
+0:52 'i1' (global float)
+0:52 'i2' (global float)
+0:? Linker Objects
+0:? 'v' (smooth in 4-component vector of float)
+0:? 'i' (smooth in 4-component vector of float)
+0:? 'o' (out 4-component vector of float)
+0:? 'gl_ClipDistance' (smooth in 5-element array of float ClipDistance)
+0:? 'gl_ClipDistance' (smooth in 5-element array of float ClipDistance)
+0:? 's' (smooth in structure{global float f})
+0:? 'patch' (global float)
+0:? 'vl' (layout(location=3 ) smooth in 4-component vector of float)
+0:? 'factorBad' (layout(location=3 ) out 4-component vector of float)
+0:? 'factor' (layout(location=5 ) out 4-component vector of float)
+0:? 'vl2' (layout(location=4 ) smooth in 4-component vector of float)
+0:? 'i1' (global float)
+0:? 'i2' (global float)
+
diff --git a/chromium/third_party/glslang/src/Test/baseResults/140.vert.out b/chromium/third_party/glslang/src/Test/baseResults/140.vert.out
new file mode 100644
index 00000000000..634458cd11d
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/140.vert.out
@@ -0,0 +1,270 @@
+140.vert
+ERROR: 0:23: 'gl_Position' : identifiers starting with "gl_" are reserved
+ERROR: 0:25: 'location' : not supported for this version or the enabled extensions
+ERROR: 0:25: 'location qualifier on input' : not supported for this version or the enabled extensions
+ERROR: 0:34: 'redeclaration' : cannot change storage, memory, or auxiliary qualification of gl_Position
+ERROR: 0:34: 'redeclaration' : cannot change interpolation qualification of gl_Position
+ERROR: 0:35: 'redeclaration' : cannot change the type of gl_Position
+ERROR: 0:38: 'gl_ClipVertex' : cannot redeclare after use
+ERROR: 0:39: 'gl_FogFragCoord' : cannot redeclare after use
+ERROR: 0:51: 'texelFetch' : no matching overloaded function found
+ERROR: 0:53: 'texture' : no matching overloaded function found
+ERROR: 10 compilation errors. No code generated.
+
+
+Shader version: 140
+Requested GL_ARB_explicit_attrib_location
+Requested GL_ARB_separate_shader_objects
+ERROR: node is still EOpNull!
+0:9 Function Definition: main( (global void)
+0:9 Function Parameters:
+0:11 Sequence
+0:11 Sequence
+0:11 move second child to first child (temp int)
+0:11 'id' (temp int)
+0:11 'gl_InstanceID' (gl_InstanceId int InstanceId)
+0:12 add second child into first child (temp int)
+0:12 'id' (temp int)
+0:12 anonMem: direct index for structure (layout(column_major std140 offset=0 ) uniform int)
+0:12 'anon@0' (layout(column_major std140 ) uniform block{layout(column_major std140 offset=0 ) uniform int anonMem})
+0:12 Constant:
+0:12 0 (const uint)
+0:13 add second child into first child (temp int)
+0:13 'id' (temp int)
+0:13 direct index (temp int)
+0:13 textureFetch (global 4-component vector of int)
+0:13 'sbuf' (uniform isamplerBuffer)
+0:13 Constant:
+0:13 8 (const int)
+0:13 Constant:
+0:13 3 (const int)
+0:14 'gl_ClipVertex' (gl_ClipVertex 4-component vector of float ClipVertex)
+0:15 'gl_Color' (in 4-component vector of float Color)
+0:16 direct index (temp structure{global 4-component vector of float ambient, global 4-component vector of float diffuse, global 4-component vector of float specular, global 4-component vector of float position, global 4-component vector of float halfVector, global 3-component vector of float spotDirection, global float spotExponent, global float spotCutoff, global float spotCosCutoff, global float constantAttenuation, global float linearAttenuation, global float quadraticAttenuation})
+0:16 'gl_LightSource' (uniform 32-element array of structure{global 4-component vector of float ambient, global 4-component vector of float diffuse, global 4-component vector of float specular, global 4-component vector of float position, global 4-component vector of float halfVector, global 3-component vector of float spotDirection, global float spotExponent, global float spotCutoff, global float spotCosCutoff, global float constantAttenuation, global float linearAttenuation, global float quadraticAttenuation})
+0:16 Constant:
+0:16 0 (const int)
+0:17 far: direct index for structure (global float)
+0:17 'gl_DepthRange' (uniform structure{global float near, global float far, global float diff})
+0:17 Constant:
+0:17 1 (const int)
+0:18 'gl_TexCoord' (smooth out implicitly-sized array of 4-component vector of float TexCoord)
+0:19 'gl_FogFragCoord' (smooth out float FogFragCoord)
+0:20 'gl_FrontColor' (smooth out 4-component vector of float FrontColor)
+0:48 Function Definition: foo( (global void)
+0:48 Function Parameters:
+0:50 Sequence
+0:50 Sequence
+0:50 move second child to first child (temp 4-component vector of float)
+0:50 'v' (temp 4-component vector of float)
+0:50 textureFetch (global 4-component vector of float)
+0:50 's2dr' (uniform sampler2DRect)
+0:50 'itloc2' (in 2-component vector of int)
+0:51 add second child into first child (temp 4-component vector of float)
+0:51 'v' (temp 4-component vector of float)
+0:51 Constant:
+0:51 0.000000
+0:52 add second child into first child (temp 4-component vector of float)
+0:52 'v' (temp 4-component vector of float)
+0:52 texture (global 4-component vector of float)
+0:52 's2dr' (uniform sampler2DRect)
+0:52 'tloc2' (in 2-component vector of float)
+0:53 add second child into first child (temp 4-component vector of float)
+0:53 'v' (temp 4-component vector of float)
+0:53 Constant:
+0:53 0.000000
+0:54 add second child into first child (temp 4-component vector of float)
+0:54 'v' (temp 4-component vector of float)
+0:54 texture (global float)
+0:54 's2drs' (uniform sampler2DRectShadow)
+0:54 'tloc3' (in 3-component vector of float)
+0:55 add second child into first child (temp 4-component vector of float)
+0:55 'v' (temp 4-component vector of float)
+0:55 textureProj (global 4-component vector of float)
+0:55 's2dr' (uniform sampler2DRect)
+0:55 'tloc3' (in 3-component vector of float)
+0:56 add second child into first child (temp 4-component vector of float)
+0:56 'v' (temp 4-component vector of float)
+0:56 textureProj (global 4-component vector of float)
+0:56 's2dr' (uniform sampler2DRect)
+0:56 'tloc4' (in 4-component vector of float)
+0:57 add second child into first child (temp 4-component vector of float)
+0:57 'v' (temp 4-component vector of float)
+0:57 textureProjGradOffset (global 4-component vector of float)
+0:57 's2dr' (uniform sampler2DRect)
+0:57 'tloc4' (in 4-component vector of float)
+0:57 Constant:
+0:57 0.000000
+0:57 0.000000
+0:57 Constant:
+0:57 0.000000
+0:57 0.000000
+0:57 Constant:
+0:57 1 (const int)
+0:57 2 (const int)
+0:58 add second child into first child (temp 4-component vector of float)
+0:58 'v' (temp 4-component vector of float)
+0:58 textureProjGradOffset (global float)
+0:58 's2drs' (uniform sampler2DRectShadow)
+0:58 'tloc4' (in 4-component vector of float)
+0:58 Constant:
+0:58 0.000000
+0:58 0.000000
+0:58 Constant:
+0:58 0.000000
+0:58 0.000000
+0:58 Constant:
+0:58 1 (const int)
+0:58 2 (const int)
+0:? Linker Objects
+0:? 'sbuf' (uniform isamplerBuffer)
+0:? 'anon@0' (layout(column_major std140 ) uniform block{layout(column_major std140 offset=0 ) uniform int anonMem})
+0:? 'gl_TexCoord' (smooth out implicitly-sized array of 4-component vector of float TexCoord)
+0:? 'gl_Position' (smooth out 4-component vector of float)
+0:? 'locBad' (layout(location=9 ) in 4-component vector of float)
+0:? 'loc' (layout(location=9 ) in 4-component vector of float)
+0:? 'gl_PointSize' (gl_PointSize float PointSize)
+0:? 'gl_PointSize' (gl_PointSize float PointSize)
+0:? 'gl_ClipVertex' (gl_ClipVertex 4-component vector of float ClipVertex)
+0:? 'gl_ClipVertex' (gl_ClipVertex 4-component vector of float ClipVertex)
+0:? 'gl_FogFragCoord' (smooth out float FogFragCoord)
+0:? 'gl_FogFragCoord' (smooth out float FogFragCoord)
+0:? 's2dr' (uniform sampler2DRect)
+0:? 's2drs' (uniform sampler2DRectShadow)
+0:? 'itloc2' (in 2-component vector of int)
+0:? 'tloc2' (in 2-component vector of float)
+0:? 'tloc3' (in 3-component vector of float)
+0:? 'tloc4' (in 4-component vector of float)
+0:? 'gl_VertexID' (gl_VertexId int VertexId)
+0:? 'gl_InstanceID' (gl_InstanceId int InstanceId)
+
+
+Linked vertex stage:
+
+
+Shader version: 140
+Requested GL_ARB_explicit_attrib_location
+Requested GL_ARB_separate_shader_objects
+ERROR: node is still EOpNull!
+0:9 Function Definition: main( (global void)
+0:9 Function Parameters:
+0:11 Sequence
+0:11 Sequence
+0:11 move second child to first child (temp int)
+0:11 'id' (temp int)
+0:11 'gl_InstanceID' (gl_InstanceId int InstanceId)
+0:12 add second child into first child (temp int)
+0:12 'id' (temp int)
+0:12 anonMem: direct index for structure (layout(column_major std140 offset=0 ) uniform int)
+0:12 'anon@0' (layout(column_major std140 ) uniform block{layout(column_major std140 offset=0 ) uniform int anonMem})
+0:12 Constant:
+0:12 0 (const uint)
+0:13 add second child into first child (temp int)
+0:13 'id' (temp int)
+0:13 direct index (temp int)
+0:13 textureFetch (global 4-component vector of int)
+0:13 'sbuf' (uniform isamplerBuffer)
+0:13 Constant:
+0:13 8 (const int)
+0:13 Constant:
+0:13 3 (const int)
+0:14 'gl_ClipVertex' (gl_ClipVertex 4-component vector of float ClipVertex)
+0:15 'gl_Color' (in 4-component vector of float Color)
+0:16 direct index (temp structure{global 4-component vector of float ambient, global 4-component vector of float diffuse, global 4-component vector of float specular, global 4-component vector of float position, global 4-component vector of float halfVector, global 3-component vector of float spotDirection, global float spotExponent, global float spotCutoff, global float spotCosCutoff, global float constantAttenuation, global float linearAttenuation, global float quadraticAttenuation})
+0:16 'gl_LightSource' (uniform 32-element array of structure{global 4-component vector of float ambient, global 4-component vector of float diffuse, global 4-component vector of float specular, global 4-component vector of float position, global 4-component vector of float halfVector, global 3-component vector of float spotDirection, global float spotExponent, global float spotCutoff, global float spotCosCutoff, global float constantAttenuation, global float linearAttenuation, global float quadraticAttenuation})
+0:16 Constant:
+0:16 0 (const int)
+0:17 far: direct index for structure (global float)
+0:17 'gl_DepthRange' (uniform structure{global float near, global float far, global float diff})
+0:17 Constant:
+0:17 1 (const int)
+0:18 'gl_TexCoord' (smooth out 1-element array of 4-component vector of float TexCoord)
+0:19 'gl_FogFragCoord' (smooth out float FogFragCoord)
+0:20 'gl_FrontColor' (smooth out 4-component vector of float FrontColor)
+0:48 Function Definition: foo( (global void)
+0:48 Function Parameters:
+0:50 Sequence
+0:50 Sequence
+0:50 move second child to first child (temp 4-component vector of float)
+0:50 'v' (temp 4-component vector of float)
+0:50 textureFetch (global 4-component vector of float)
+0:50 's2dr' (uniform sampler2DRect)
+0:50 'itloc2' (in 2-component vector of int)
+0:51 add second child into first child (temp 4-component vector of float)
+0:51 'v' (temp 4-component vector of float)
+0:51 Constant:
+0:51 0.000000
+0:52 add second child into first child (temp 4-component vector of float)
+0:52 'v' (temp 4-component vector of float)
+0:52 texture (global 4-component vector of float)
+0:52 's2dr' (uniform sampler2DRect)
+0:52 'tloc2' (in 2-component vector of float)
+0:53 add second child into first child (temp 4-component vector of float)
+0:53 'v' (temp 4-component vector of float)
+0:53 Constant:
+0:53 0.000000
+0:54 add second child into first child (temp 4-component vector of float)
+0:54 'v' (temp 4-component vector of float)
+0:54 texture (global float)
+0:54 's2drs' (uniform sampler2DRectShadow)
+0:54 'tloc3' (in 3-component vector of float)
+0:55 add second child into first child (temp 4-component vector of float)
+0:55 'v' (temp 4-component vector of float)
+0:55 textureProj (global 4-component vector of float)
+0:55 's2dr' (uniform sampler2DRect)
+0:55 'tloc3' (in 3-component vector of float)
+0:56 add second child into first child (temp 4-component vector of float)
+0:56 'v' (temp 4-component vector of float)
+0:56 textureProj (global 4-component vector of float)
+0:56 's2dr' (uniform sampler2DRect)
+0:56 'tloc4' (in 4-component vector of float)
+0:57 add second child into first child (temp 4-component vector of float)
+0:57 'v' (temp 4-component vector of float)
+0:57 textureProjGradOffset (global 4-component vector of float)
+0:57 's2dr' (uniform sampler2DRect)
+0:57 'tloc4' (in 4-component vector of float)
+0:57 Constant:
+0:57 0.000000
+0:57 0.000000
+0:57 Constant:
+0:57 0.000000
+0:57 0.000000
+0:57 Constant:
+0:57 1 (const int)
+0:57 2 (const int)
+0:58 add second child into first child (temp 4-component vector of float)
+0:58 'v' (temp 4-component vector of float)
+0:58 textureProjGradOffset (global float)
+0:58 's2drs' (uniform sampler2DRectShadow)
+0:58 'tloc4' (in 4-component vector of float)
+0:58 Constant:
+0:58 0.000000
+0:58 0.000000
+0:58 Constant:
+0:58 0.000000
+0:58 0.000000
+0:58 Constant:
+0:58 1 (const int)
+0:58 2 (const int)
+0:? Linker Objects
+0:? 'sbuf' (uniform isamplerBuffer)
+0:? 'anon@0' (layout(column_major std140 ) uniform block{layout(column_major std140 offset=0 ) uniform int anonMem})
+0:? 'gl_TexCoord' (smooth out 1-element array of 4-component vector of float TexCoord)
+0:? 'gl_Position' (smooth out 4-component vector of float)
+0:? 'locBad' (layout(location=9 ) in 4-component vector of float)
+0:? 'loc' (layout(location=9 ) in 4-component vector of float)
+0:? 'gl_PointSize' (gl_PointSize float PointSize)
+0:? 'gl_PointSize' (gl_PointSize float PointSize)
+0:? 'gl_ClipVertex' (gl_ClipVertex 4-component vector of float ClipVertex)
+0:? 'gl_ClipVertex' (gl_ClipVertex 4-component vector of float ClipVertex)
+0:? 'gl_FogFragCoord' (smooth out float FogFragCoord)
+0:? 'gl_FogFragCoord' (smooth out float FogFragCoord)
+0:? 's2dr' (uniform sampler2DRect)
+0:? 's2drs' (uniform sampler2DRectShadow)
+0:? 'itloc2' (in 2-component vector of int)
+0:? 'tloc2' (in 2-component vector of float)
+0:? 'tloc3' (in 3-component vector of float)
+0:? 'tloc4' (in 4-component vector of float)
+0:? 'gl_VertexID' (gl_VertexId int VertexId)
+0:? 'gl_InstanceID' (gl_InstanceId int InstanceId)
+
diff --git a/chromium/third_party/glslang/src/Test/baseResults/150.frag.out b/chromium/third_party/glslang/src/Test/baseResults/150.frag.out
new file mode 100644
index 00000000000..082a8274c00
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/150.frag.out
@@ -0,0 +1,244 @@
+150.frag
+ERROR: 0:4: 'redeclaration' : cannot redeclare with different qualification: gl_FragCoord
+ERROR: 0:5: 'redeclaration' : cannot redeclare with different qualification: gl_FragCoord
+ERROR: 0:6: 'layout qualifier' : can only apply origin_upper_left and pixel_center_origin to gl_FragCoord
+ERROR: 0:14: 'gl_FragCoord' : cannot redeclare after use
+ERROR: 4 compilation errors. No code generated.
+
+
+Shader version: 150
+gl_FragCoord pixel center is integer
+gl_FragCoord origin is upper left
+ERROR: node is still EOpNull!
+0:9 Function Definition: main( (global void)
+0:9 Function Parameters:
+0:11 Sequence
+0:11 Sequence
+0:11 move second child to first child (temp 4-component vector of float)
+0:11 'c' (temp 4-component vector of float)
+0:11 'gl_FragCoord' (gl_FragCoord 4-component vector of float FragCoord)
+0:18 Sequence
+0:18 move second child to first child (temp float)
+0:18 'patch' (global float)
+0:18 Constant:
+0:18 3.100000
+0:31 Function Definition: barWxyz( (global void)
+0:31 Function Parameters:
+0:33 Sequence
+0:33 Sequence
+0:33 move second child to first child (temp 2-component vector of int)
+0:33 't11' (temp 2-component vector of int)
+0:33 textureSize (global 2-component vector of int)
+0:33 'sms' (uniform sampler2DMS)
+0:34 Sequence
+0:34 move second child to first child (temp 2-component vector of int)
+0:34 't12' (temp 2-component vector of int)
+0:34 textureSize (global 2-component vector of int)
+0:34 'isms' (uniform isampler2DMS)
+0:35 Sequence
+0:35 move second child to first child (temp 2-component vector of int)
+0:35 't13' (temp 2-component vector of int)
+0:35 textureSize (global 2-component vector of int)
+0:35 'usms' (uniform usampler2DMS)
+0:36 Sequence
+0:36 move second child to first child (temp 3-component vector of int)
+0:36 't21' (temp 3-component vector of int)
+0:36 textureSize (global 3-component vector of int)
+0:36 'smsa' (uniform sampler2DMSArray)
+0:37 Sequence
+0:37 move second child to first child (temp 3-component vector of int)
+0:37 't22' (temp 3-component vector of int)
+0:37 textureSize (global 3-component vector of int)
+0:37 'ismsa' (uniform isampler2DMSArray)
+0:38 Sequence
+0:38 move second child to first child (temp 3-component vector of int)
+0:38 't23' (temp 3-component vector of int)
+0:38 textureSize (global 3-component vector of int)
+0:38 'usmsa' (uniform usampler2DMSArray)
+0:39 Sequence
+0:39 move second child to first child (temp 4-component vector of float)
+0:39 't31' (temp 4-component vector of float)
+0:39 textureFetch (global 4-component vector of float)
+0:39 'sms' (uniform sampler2DMS)
+0:39 'p2' (flat in 2-component vector of int)
+0:39 'samp' (flat in int)
+0:40 Sequence
+0:40 move second child to first child (temp 4-component vector of int)
+0:40 't32' (temp 4-component vector of int)
+0:40 textureFetch (global 4-component vector of int)
+0:40 'isms' (uniform isampler2DMS)
+0:40 'p2' (flat in 2-component vector of int)
+0:40 'samp' (flat in int)
+0:41 Sequence
+0:41 move second child to first child (temp 4-component vector of uint)
+0:41 't33' (temp 4-component vector of uint)
+0:41 textureFetch (global 4-component vector of uint)
+0:41 'usms' (uniform usampler2DMS)
+0:41 'p2' (flat in 2-component vector of int)
+0:41 Constant:
+0:41 3 (const int)
+0:42 Sequence
+0:42 move second child to first child (temp 4-component vector of float)
+0:42 't41' (temp 4-component vector of float)
+0:42 textureFetch (global 4-component vector of float)
+0:42 'smsa' (uniform sampler2DMSArray)
+0:42 'p3' (flat in 3-component vector of int)
+0:42 'samp' (flat in int)
+0:43 Sequence
+0:43 move second child to first child (temp 4-component vector of int)
+0:43 't42' (temp 4-component vector of int)
+0:43 textureFetch (global 4-component vector of int)
+0:43 'ismsa' (uniform isampler2DMSArray)
+0:43 Constant:
+0:43 2 (const int)
+0:43 2 (const int)
+0:43 2 (const int)
+0:43 'samp' (flat in int)
+0:44 Sequence
+0:44 move second child to first child (temp 4-component vector of uint)
+0:44 't43' (temp 4-component vector of uint)
+0:44 textureFetch (global 4-component vector of uint)
+0:44 'usmsa' (uniform usampler2DMSArray)
+0:44 'p3' (flat in 3-component vector of int)
+0:44 'samp' (flat in int)
+0:47 Function Definition: primitiveID( (global int)
+0:47 Function Parameters:
+0:49 Sequence
+0:49 Branch: Return with expression
+0:49 'gl_PrimitiveID' (flat in int PrimitiveID)
+0:? Linker Objects
+0:? 'gl_FragCoord' (gl_FragCoord 4-component vector of float FragCoord)
+0:? 'gl_FragCoord' (gl_FragCoord 4-component vector of float FragCoord)
+0:? 'foo' (smooth in 4-component vector of float)
+0:? 's' (smooth in structure{global float f})
+0:? 'patch' (global float)
+0:? 'sms' (uniform sampler2DMS)
+0:? 'isms' (uniform isampler2DMS)
+0:? 'usms' (uniform usampler2DMS)
+0:? 'smsa' (uniform sampler2DMSArray)
+0:? 'ismsa' (uniform isampler2DMSArray)
+0:? 'usmsa' (uniform usampler2DMSArray)
+0:? 'p2' (flat in 2-component vector of int)
+0:? 'p3' (flat in 3-component vector of int)
+0:? 'samp' (flat in int)
+
+
+Linked fragment stage:
+
+
+Shader version: 150
+gl_FragCoord pixel center is integer
+gl_FragCoord origin is upper left
+ERROR: node is still EOpNull!
+0:9 Function Definition: main( (global void)
+0:9 Function Parameters:
+0:11 Sequence
+0:11 Sequence
+0:11 move second child to first child (temp 4-component vector of float)
+0:11 'c' (temp 4-component vector of float)
+0:11 'gl_FragCoord' (gl_FragCoord 4-component vector of float FragCoord)
+0:18 Sequence
+0:18 move second child to first child (temp float)
+0:18 'patch' (global float)
+0:18 Constant:
+0:18 3.100000
+0:31 Function Definition: barWxyz( (global void)
+0:31 Function Parameters:
+0:33 Sequence
+0:33 Sequence
+0:33 move second child to first child (temp 2-component vector of int)
+0:33 't11' (temp 2-component vector of int)
+0:33 textureSize (global 2-component vector of int)
+0:33 'sms' (uniform sampler2DMS)
+0:34 Sequence
+0:34 move second child to first child (temp 2-component vector of int)
+0:34 't12' (temp 2-component vector of int)
+0:34 textureSize (global 2-component vector of int)
+0:34 'isms' (uniform isampler2DMS)
+0:35 Sequence
+0:35 move second child to first child (temp 2-component vector of int)
+0:35 't13' (temp 2-component vector of int)
+0:35 textureSize (global 2-component vector of int)
+0:35 'usms' (uniform usampler2DMS)
+0:36 Sequence
+0:36 move second child to first child (temp 3-component vector of int)
+0:36 't21' (temp 3-component vector of int)
+0:36 textureSize (global 3-component vector of int)
+0:36 'smsa' (uniform sampler2DMSArray)
+0:37 Sequence
+0:37 move second child to first child (temp 3-component vector of int)
+0:37 't22' (temp 3-component vector of int)
+0:37 textureSize (global 3-component vector of int)
+0:37 'ismsa' (uniform isampler2DMSArray)
+0:38 Sequence
+0:38 move second child to first child (temp 3-component vector of int)
+0:38 't23' (temp 3-component vector of int)
+0:38 textureSize (global 3-component vector of int)
+0:38 'usmsa' (uniform usampler2DMSArray)
+0:39 Sequence
+0:39 move second child to first child (temp 4-component vector of float)
+0:39 't31' (temp 4-component vector of float)
+0:39 textureFetch (global 4-component vector of float)
+0:39 'sms' (uniform sampler2DMS)
+0:39 'p2' (flat in 2-component vector of int)
+0:39 'samp' (flat in int)
+0:40 Sequence
+0:40 move second child to first child (temp 4-component vector of int)
+0:40 't32' (temp 4-component vector of int)
+0:40 textureFetch (global 4-component vector of int)
+0:40 'isms' (uniform isampler2DMS)
+0:40 'p2' (flat in 2-component vector of int)
+0:40 'samp' (flat in int)
+0:41 Sequence
+0:41 move second child to first child (temp 4-component vector of uint)
+0:41 't33' (temp 4-component vector of uint)
+0:41 textureFetch (global 4-component vector of uint)
+0:41 'usms' (uniform usampler2DMS)
+0:41 'p2' (flat in 2-component vector of int)
+0:41 Constant:
+0:41 3 (const int)
+0:42 Sequence
+0:42 move second child to first child (temp 4-component vector of float)
+0:42 't41' (temp 4-component vector of float)
+0:42 textureFetch (global 4-component vector of float)
+0:42 'smsa' (uniform sampler2DMSArray)
+0:42 'p3' (flat in 3-component vector of int)
+0:42 'samp' (flat in int)
+0:43 Sequence
+0:43 move second child to first child (temp 4-component vector of int)
+0:43 't42' (temp 4-component vector of int)
+0:43 textureFetch (global 4-component vector of int)
+0:43 'ismsa' (uniform isampler2DMSArray)
+0:43 Constant:
+0:43 2 (const int)
+0:43 2 (const int)
+0:43 2 (const int)
+0:43 'samp' (flat in int)
+0:44 Sequence
+0:44 move second child to first child (temp 4-component vector of uint)
+0:44 't43' (temp 4-component vector of uint)
+0:44 textureFetch (global 4-component vector of uint)
+0:44 'usmsa' (uniform usampler2DMSArray)
+0:44 'p3' (flat in 3-component vector of int)
+0:44 'samp' (flat in int)
+0:47 Function Definition: primitiveID( (global int)
+0:47 Function Parameters:
+0:49 Sequence
+0:49 Branch: Return with expression
+0:49 'gl_PrimitiveID' (flat in int PrimitiveID)
+0:? Linker Objects
+0:? 'gl_FragCoord' (gl_FragCoord 4-component vector of float FragCoord)
+0:? 'gl_FragCoord' (gl_FragCoord 4-component vector of float FragCoord)
+0:? 'foo' (smooth in 4-component vector of float)
+0:? 's' (smooth in structure{global float f})
+0:? 'patch' (global float)
+0:? 'sms' (uniform sampler2DMS)
+0:? 'isms' (uniform isampler2DMS)
+0:? 'usms' (uniform usampler2DMS)
+0:? 'smsa' (uniform sampler2DMSArray)
+0:? 'ismsa' (uniform isampler2DMSArray)
+0:? 'usmsa' (uniform usampler2DMSArray)
+0:? 'p2' (flat in 2-component vector of int)
+0:? 'p3' (flat in 3-component vector of int)
+0:? 'samp' (flat in int)
+
diff --git a/chromium/third_party/glslang/src/Test/baseResults/150.geom.out b/chromium/third_party/glslang/src/Test/baseResults/150.geom.out
new file mode 100644
index 00000000000..48b7925fc4d
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/150.geom.out
@@ -0,0 +1,317 @@
+150.geom
+ERROR: 0:15: 'fromVertex' : block instance name redefinition
+ERROR: 0:19: 'fromVertex' : redefinition
+ERROR: 0:21: 'fooC' : block instance name redefinition
+ERROR: 0:29: 'EmitStreamVertex' : no matching overloaded function found
+ERROR: 0:30: 'EndStreamPrimitive' : no matching overloaded function found
+ERROR: 0:44: 'stream' : can only be used on an output
+ERROR: 0:45: 'stream' : can only be used on an output
+ERROR: 0:46: 'stream' : can only be used on an output
+ERROR: 0:47: 'stream' : can only be used on an output
+ERROR: 0:47: 'stream' : can only be used on an output
+ERROR: 0:60: 'stream' : member cannot contradict block
+ERROR: 0:66: 'max_vertices' : too large, must be less than gl_MaxGeometryOutputVertices
+ERROR: 0:66: 'max_vertices' : cannot change previously set layout value
+ERROR: 0:67: 'max_vertices' : can only apply to a standalone qualifier
+ERROR: 0:72: 'points' : cannot change previously set output primitive
+ERROR: 0:73: 'points' : cannot change previously set output primitive
+ERROR: 0:74: 'triangle_strip' : cannot apply to input
+ERROR: 0:75: 'triangle_strip' : cannot apply to: uniform
+ERROR: 0:76: 'triangle_strip' : can only apply to a standalone qualifier
+ERROR: 0:77: 'triangle_strip' : can only apply to a standalone qualifier
+ERROR: 0:78: 'invocations' : not supported for this version or the enabled extensions
+ERROR: 0:78: 'invocations' : can only apply to a standalone qualifier
+ERROR: 0:80: 'invocations' : not supported for this version or the enabled extensions
+ERROR: 0:80: 'invocations' : can only apply to a standalone qualifier
+ERROR: 0:81: 'max_vertices' : can only apply to a standalone qualifier
+ERROR: 0:82: 'triangle_strip' : can only apply to a standalone qualifier
+ERROR: 0:85: 'lines' : cannot apply to 'out'
+ERROR: 0:87: 'triangles' : cannot change previously set input primitive
+ERROR: 0:88: 'triangles_adjacency' : cannot change previously set input primitive
+ERROR: 0:89: 'invocations' : not supported for this version or the enabled extensions
+ERROR: 0:92: 'stream' : member cannot contradict block
+ERROR: 0:92: 'stream' : can only be used on an output
+ERROR: 0:129: 'gl_ViewportIndex' : required extension not requested: GL_ARB_viewport_array
+ERROR: 0:129: 'gl_MaxViewports' : required extension not requested: GL_ARB_viewport_array
+ERROR: 0:139: 'gl_ViewportIndex' : identifiers starting with "gl_" are reserved
+ERROR: 35 compilation errors. No code generated.
+
+
+Shader version: 150
+Requested GL_ARB_viewport_array
+invocations = 4
+max_vertices = 200
+input primitive = lines_adjacency
+output primitive = triangle_strip
+ERROR: node is still EOpNull!
+0:25 Function Definition: main( (global void)
+0:25 Function Parameters:
+0:27 Sequence
+0:27 EmitVertex (global void)
+0:28 EndPrimitive (global void)
+0:29 Constant:
+0:29 0.000000
+0:30 Constant:
+0:30 0.000000
+0:32 move second child to first child (temp 3-component vector of float)
+0:32 color: direct index for structure (layout(stream=0 ) out 3-component vector of float)
+0:32 'anon@0' (layout(stream=0 ) out block{layout(stream=0 ) out 3-component vector of float color})
+0:32 Constant:
+0:32 0 (const uint)
+0:32 color: direct index for structure (in 3-component vector of float)
+0:32 direct index (temp block{in 3-component vector of float color})
+0:32 'fromV' (in 4-element array of block{in 3-component vector of float color})
+0:32 Constant:
+0:32 0 (const int)
+0:32 Constant:
+0:32 0 (const int)
+0:33 move second child to first child (temp float)
+0:33 direct index (layout(stream=0 ) temp float ClipDistance)
+0:33 gl_ClipDistance: direct index for structure (layout(stream=0 ) out implicitly-sized array of float ClipDistance)
+0:33 'anon@1' (layout(stream=0 ) out block{layout(stream=0 ) gl_Position 4-component vector of float Position gl_Position, layout(stream=0 ) gl_PointSize float PointSize gl_PointSize, layout(stream=0 ) out implicitly-sized array of float ClipDistance gl_ClipDistance})
+0:33 Constant:
+0:33 2 (const uint)
+0:33 Constant:
+0:33 3 (const int)
+0:33 direct index (temp float ClipDistance)
+0:33 gl_ClipDistance: direct index for structure (in implicitly-sized array of float ClipDistance)
+0:33 direct index (temp block{in 4-component vector of float Position gl_Position, in float PointSize gl_PointSize, in implicitly-sized array of float ClipDistance gl_ClipDistance})
+0:33 'gl_in' (in 4-element array of block{in 4-component vector of float Position gl_Position, in float PointSize gl_PointSize, in implicitly-sized array of float ClipDistance gl_ClipDistance})
+0:33 Constant:
+0:33 1 (const int)
+0:33 Constant:
+0:33 2 (const int)
+0:33 Constant:
+0:33 2 (const int)
+0:34 move second child to first child (temp 4-component vector of float)
+0:34 gl_Position: direct index for structure (layout(stream=0 ) gl_Position 4-component vector of float Position)
+0:34 'anon@1' (layout(stream=0 ) out block{layout(stream=0 ) gl_Position 4-component vector of float Position gl_Position, layout(stream=0 ) gl_PointSize float PointSize gl_PointSize, layout(stream=0 ) out implicitly-sized array of float ClipDistance gl_ClipDistance})
+0:34 Constant:
+0:34 0 (const uint)
+0:34 gl_Position: direct index for structure (in 4-component vector of float Position)
+0:34 direct index (temp block{in 4-component vector of float Position gl_Position, in float PointSize gl_PointSize, in implicitly-sized array of float ClipDistance gl_ClipDistance})
+0:34 'gl_in' (in 4-element array of block{in 4-component vector of float Position gl_Position, in float PointSize gl_PointSize, in implicitly-sized array of float ClipDistance gl_ClipDistance})
+0:34 Constant:
+0:34 0 (const int)
+0:34 Constant:
+0:34 0 (const int)
+0:35 move second child to first child (temp float)
+0:35 gl_PointSize: direct index for structure (layout(stream=0 ) gl_PointSize float PointSize)
+0:35 'anon@1' (layout(stream=0 ) out block{layout(stream=0 ) gl_Position 4-component vector of float Position gl_Position, layout(stream=0 ) gl_PointSize float PointSize gl_PointSize, layout(stream=0 ) out implicitly-sized array of float ClipDistance gl_ClipDistance})
+0:35 Constant:
+0:35 1 (const uint)
+0:35 gl_PointSize: direct index for structure (in float PointSize)
+0:35 direct index (temp block{in 4-component vector of float Position gl_Position, in float PointSize gl_PointSize, in implicitly-sized array of float ClipDistance gl_ClipDistance})
+0:35 'gl_in' (in 4-element array of block{in 4-component vector of float Position gl_Position, in float PointSize gl_PointSize, in implicitly-sized array of float ClipDistance gl_ClipDistance})
+0:35 Constant:
+0:35 3 (const int)
+0:35 Constant:
+0:35 1 (const int)
+0:36 move second child to first child (temp int)
+0:36 'gl_PrimitiveID' (layout(stream=0 ) out int PrimitiveID)
+0:36 'gl_PrimitiveIDIn' (in int PrimitiveID)
+0:37 move second child to first child (temp int)
+0:37 'gl_Layer' (layout(stream=0 ) out int Layer)
+0:37 Constant:
+0:37 2 (const int)
+0:67 Function Definition: foo(i1; (global void)
+0:67 Function Parameters:
+0:67 'a' (in int)
+0:69 Sequence
+0:69 move second child to first child (temp 4-component vector of float)
+0:69 a: direct index for structure (layout(stream=6 ) out 4-component vector of float)
+0:69 'ouuaa6' (layout(stream=6 ) out block{layout(stream=6 ) out 4-component vector of float a})
+0:69 Constant:
+0:69 0 (const int)
+0:69 Constant:
+0:69 1.000000
+0:69 1.000000
+0:69 1.000000
+0:69 1.000000
+0:107 Sequence
+0:107 move second child to first child (temp float)
+0:107 'summ' (global float)
+0:107 Constant:
+0:107 11332.000000
+0:127 Function Definition: fooe1( (global void)
+0:127 Function Parameters:
+0:129 Sequence
+0:129 move second child to first child (temp int)
+0:129 'gl_ViewportIndex' (layout(stream=0 ) out int ViewportIndex)
+0:129 Constant:
+0:129 15 (const int)
+0:134 Function Definition: fooe2( (global void)
+0:134 Function Parameters:
+0:136 Sequence
+0:136 move second child to first child (temp int)
+0:136 'gl_ViewportIndex' (layout(stream=0 ) out int ViewportIndex)
+0:136 Constant:
+0:136 15 (const int)
+0:? Linker Objects
+0:? 'fromV' (in 4-element array of block{in 3-component vector of float color})
+0:? 'toF' (layout(stream=0 ) out block{layout(stream=0 ) out 3-component vector of float color})
+0:? 'anon@0' (layout(stream=0 ) out block{layout(stream=0 ) out 3-component vector of float color})
+0:? 'anon@1' (layout(stream=0 ) out block{layout(stream=0 ) gl_Position 4-component vector of float Position gl_Position, layout(stream=0 ) gl_PointSize float PointSize gl_PointSize, layout(stream=0 ) out implicitly-sized array of float ClipDistance gl_ClipDistance})
+0:? 'gl_in' (in 4-element array of block{in 4-component vector of float Position gl_Position, in float PointSize gl_PointSize, in implicitly-sized array of float ClipDistance gl_ClipDistance})
+0:? 'ov0' (layout(stream=0 ) out 4-component vector of float)
+0:? 'ov4' (layout(stream=4 ) out 4-component vector of float)
+0:? 'o1v0' (layout(stream=0 ) out 4-component vector of float)
+0:? 'ua' (layout(stream=3 ) uniform int)
+0:? 'ibb' (layout(stream=3 column_major shared ) uniform block{layout(stream=3 column_major shared ) uniform int ua})
+0:? 'ov3' (layout(stream=3 ) out 4-component vector of float)
+0:? 'ouuaa6' (layout(stream=6 ) out block{layout(stream=6 ) out 4-component vector of float a})
+0:? 'ouua6' (layout(stream=6 ) out block{layout(stream=6 ) out 4-component vector of float a})
+0:? 'ouua7' (layout(stream=7 ) out block{layout(stream=6 ) out 4-component vector of float a})
+0:? 'ov2s3' (layout(stream=3 ) out 4-component vector of float)
+0:? 'badv4' (layout(stream=3 ) out 4-component vector of float)
+0:? 'bad2v4' (in 4-element array of 4-component vector of float)
+0:? 'anon@2' (layout(stream=3 ) out block{layout(stream=3 ) out int a})
+0:? 'outbi' (layout(stream=3 ) out block{layout(stream=3 ) out int a, layout(stream=3 ) out int b, layout(stream=3 ) out int c})
+0:? 'inbi' (in 4-element array of block{layout(stream=2 ) in int a})
+0:? 'insn' (in 4-element array of block{in int a15})
+0:? 'anon@3' (layout(stream=3 ) out block{layout(stream=3 ) out float f15})
+0:? 'anon@4' (layout(column_major shared ) uniform block{layout(column_major shared ) uniform bool b15})
+0:? 'summ' (global float)
+0:? 'gl_ViewportIndex' (layout(stream=3 ) out int)
+
+
+Linked geometry stage:
+
+
+Shader version: 150
+Requested GL_ARB_viewport_array
+invocations = 4
+max_vertices = 200
+input primitive = lines_adjacency
+output primitive = triangle_strip
+ERROR: node is still EOpNull!
+0:25 Function Definition: main( (global void)
+0:25 Function Parameters:
+0:27 Sequence
+0:27 EmitVertex (global void)
+0:28 EndPrimitive (global void)
+0:29 Constant:
+0:29 0.000000
+0:30 Constant:
+0:30 0.000000
+0:32 move second child to first child (temp 3-component vector of float)
+0:32 color: direct index for structure (layout(stream=0 ) out 3-component vector of float)
+0:32 'anon@0' (layout(stream=0 ) out block{layout(stream=0 ) out 3-component vector of float color})
+0:32 Constant:
+0:32 0 (const uint)
+0:32 color: direct index for structure (in 3-component vector of float)
+0:32 direct index (temp block{in 3-component vector of float color})
+0:32 'fromV' (in 4-element array of block{in 3-component vector of float color})
+0:32 Constant:
+0:32 0 (const int)
+0:32 Constant:
+0:32 0 (const int)
+0:33 move second child to first child (temp float)
+0:33 direct index (layout(stream=0 ) temp float ClipDistance)
+0:33 gl_ClipDistance: direct index for structure (layout(stream=0 ) out 4-element array of float ClipDistance)
+0:33 'anon@1' (layout(stream=0 ) out block{layout(stream=0 ) gl_Position 4-component vector of float Position gl_Position, layout(stream=0 ) gl_PointSize float PointSize gl_PointSize, layout(stream=0 ) out 4-element array of float ClipDistance gl_ClipDistance})
+0:33 Constant:
+0:33 2 (const uint)
+0:33 Constant:
+0:33 3 (const int)
+0:33 direct index (temp float ClipDistance)
+0:33 gl_ClipDistance: direct index for structure (in 3-element array of float ClipDistance)
+0:33 direct index (temp block{in 4-component vector of float Position gl_Position, in float PointSize gl_PointSize, in 3-element array of float ClipDistance gl_ClipDistance})
+0:33 'gl_in' (in 4-element array of block{in 4-component vector of float Position gl_Position, in float PointSize gl_PointSize, in 3-element array of float ClipDistance gl_ClipDistance})
+0:33 Constant:
+0:33 1 (const int)
+0:33 Constant:
+0:33 2 (const int)
+0:33 Constant:
+0:33 2 (const int)
+0:34 move second child to first child (temp 4-component vector of float)
+0:34 gl_Position: direct index for structure (layout(stream=0 ) gl_Position 4-component vector of float Position)
+0:34 'anon@1' (layout(stream=0 ) out block{layout(stream=0 ) gl_Position 4-component vector of float Position gl_Position, layout(stream=0 ) gl_PointSize float PointSize gl_PointSize, layout(stream=0 ) out 4-element array of float ClipDistance gl_ClipDistance})
+0:34 Constant:
+0:34 0 (const uint)
+0:34 gl_Position: direct index for structure (in 4-component vector of float Position)
+0:34 direct index (temp block{in 4-component vector of float Position gl_Position, in float PointSize gl_PointSize, in 3-element array of float ClipDistance gl_ClipDistance})
+0:34 'gl_in' (in 4-element array of block{in 4-component vector of float Position gl_Position, in float PointSize gl_PointSize, in 3-element array of float ClipDistance gl_ClipDistance})
+0:34 Constant:
+0:34 0 (const int)
+0:34 Constant:
+0:34 0 (const int)
+0:35 move second child to first child (temp float)
+0:35 gl_PointSize: direct index for structure (layout(stream=0 ) gl_PointSize float PointSize)
+0:35 'anon@1' (layout(stream=0 ) out block{layout(stream=0 ) gl_Position 4-component vector of float Position gl_Position, layout(stream=0 ) gl_PointSize float PointSize gl_PointSize, layout(stream=0 ) out 4-element array of float ClipDistance gl_ClipDistance})
+0:35 Constant:
+0:35 1 (const uint)
+0:35 gl_PointSize: direct index for structure (in float PointSize)
+0:35 direct index (temp block{in 4-component vector of float Position gl_Position, in float PointSize gl_PointSize, in 3-element array of float ClipDistance gl_ClipDistance})
+0:35 'gl_in' (in 4-element array of block{in 4-component vector of float Position gl_Position, in float PointSize gl_PointSize, in 3-element array of float ClipDistance gl_ClipDistance})
+0:35 Constant:
+0:35 3 (const int)
+0:35 Constant:
+0:35 1 (const int)
+0:36 move second child to first child (temp int)
+0:36 'gl_PrimitiveID' (layout(stream=0 ) out int PrimitiveID)
+0:36 'gl_PrimitiveIDIn' (in int PrimitiveID)
+0:37 move second child to first child (temp int)
+0:37 'gl_Layer' (layout(stream=0 ) out int Layer)
+0:37 Constant:
+0:37 2 (const int)
+0:67 Function Definition: foo(i1; (global void)
+0:67 Function Parameters:
+0:67 'a' (in int)
+0:69 Sequence
+0:69 move second child to first child (temp 4-component vector of float)
+0:69 a: direct index for structure (layout(stream=6 ) out 4-component vector of float)
+0:69 'ouuaa6' (layout(stream=6 ) out block{layout(stream=6 ) out 4-component vector of float a})
+0:69 Constant:
+0:69 0 (const int)
+0:69 Constant:
+0:69 1.000000
+0:69 1.000000
+0:69 1.000000
+0:69 1.000000
+0:107 Sequence
+0:107 move second child to first child (temp float)
+0:107 'summ' (global float)
+0:107 Constant:
+0:107 11332.000000
+0:127 Function Definition: fooe1( (global void)
+0:127 Function Parameters:
+0:129 Sequence
+0:129 move second child to first child (temp int)
+0:129 'gl_ViewportIndex' (layout(stream=0 ) out int ViewportIndex)
+0:129 Constant:
+0:129 15 (const int)
+0:134 Function Definition: fooe2( (global void)
+0:134 Function Parameters:
+0:136 Sequence
+0:136 move second child to first child (temp int)
+0:136 'gl_ViewportIndex' (layout(stream=0 ) out int ViewportIndex)
+0:136 Constant:
+0:136 15 (const int)
+0:? Linker Objects
+0:? 'fromV' (in 4-element array of block{in 3-component vector of float color})
+0:? 'toF' (layout(stream=0 ) out block{layout(stream=0 ) out 3-component vector of float color})
+0:? 'anon@0' (layout(stream=0 ) out block{layout(stream=0 ) out 3-component vector of float color})
+0:? 'anon@1' (layout(stream=0 ) out block{layout(stream=0 ) gl_Position 4-component vector of float Position gl_Position, layout(stream=0 ) gl_PointSize float PointSize gl_PointSize, layout(stream=0 ) out 4-element array of float ClipDistance gl_ClipDistance})
+0:? 'gl_in' (in 4-element array of block{in 4-component vector of float Position gl_Position, in float PointSize gl_PointSize, in 3-element array of float ClipDistance gl_ClipDistance})
+0:? 'ov0' (layout(stream=0 ) out 4-component vector of float)
+0:? 'ov4' (layout(stream=4 ) out 4-component vector of float)
+0:? 'o1v0' (layout(stream=0 ) out 4-component vector of float)
+0:? 'ua' (layout(stream=3 ) uniform int)
+0:? 'ibb' (layout(stream=3 column_major shared ) uniform block{layout(stream=3 column_major shared ) uniform int ua})
+0:? 'ov3' (layout(stream=3 ) out 4-component vector of float)
+0:? 'ouuaa6' (layout(stream=6 ) out block{layout(stream=6 ) out 4-component vector of float a})
+0:? 'ouua6' (layout(stream=6 ) out block{layout(stream=6 ) out 4-component vector of float a})
+0:? 'ouua7' (layout(stream=7 ) out block{layout(stream=6 ) out 4-component vector of float a})
+0:? 'ov2s3' (layout(stream=3 ) out 4-component vector of float)
+0:? 'badv4' (layout(stream=3 ) out 4-component vector of float)
+0:? 'bad2v4' (in 4-element array of 4-component vector of float)
+0:? 'anon@2' (layout(stream=3 ) out block{layout(stream=3 ) out int a})
+0:? 'outbi' (layout(stream=3 ) out block{layout(stream=3 ) out int a, layout(stream=3 ) out int b, layout(stream=3 ) out int c})
+0:? 'inbi' (in 4-element array of block{layout(stream=2 ) in int a})
+0:? 'insn' (in 4-element array of block{in int a15})
+0:? 'anon@3' (layout(stream=3 ) out block{layout(stream=3 ) out float f15})
+0:? 'anon@4' (layout(column_major shared ) uniform block{layout(column_major shared ) uniform bool b15})
+0:? 'summ' (global float)
+0:? 'gl_ViewportIndex' (layout(stream=3 ) out int)
+
diff --git a/chromium/third_party/glslang/src/Test/baseResults/150.tesc.out b/chromium/third_party/glslang/src/Test/baseResults/150.tesc.out
new file mode 100644
index 00000000000..78020e1254a
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/150.tesc.out
@@ -0,0 +1,1659 @@
+150.tesc
+Shader version: 150
+Requested GL_ARB_tessellation_shader
+vertices = 4
+0:? Sequence
+0:10 Function Definition: main( (global void)
+0:10 Function Parameters:
+0:12 Sequence
+0:12 Barrier (global void)
+0:14 Sequence
+0:14 move second child to first child (temp int)
+0:14 'a' (temp int)
+0:14 Constant:
+0:14 5392 (const int)
+0:20 Sequence
+0:20 move second child to first child (temp 4-component vector of float)
+0:20 'p' (temp 4-component vector of float)
+0:20 gl_Position: direct index for structure (in 4-component vector of float Position)
+0:20 direct index (temp block{in 4-component vector of float Position gl_Position, in float PointSize gl_PointSize, in implicitly-sized array of float ClipDistance gl_ClipDistance})
+0:20 'gl_in' (in 32-element array of block{in 4-component vector of float Position gl_Position, in float PointSize gl_PointSize, in implicitly-sized array of float ClipDistance gl_ClipDistance})
+0:20 Constant:
+0:20 1 (const int)
+0:20 Constant:
+0:20 0 (const int)
+0:21 Sequence
+0:21 move second child to first child (temp float)
+0:21 'ps' (temp float)
+0:21 gl_PointSize: direct index for structure (in float PointSize)
+0:21 direct index (temp block{in 4-component vector of float Position gl_Position, in float PointSize gl_PointSize, in implicitly-sized array of float ClipDistance gl_ClipDistance})
+0:21 'gl_in' (in 32-element array of block{in 4-component vector of float Position gl_Position, in float PointSize gl_PointSize, in implicitly-sized array of float ClipDistance gl_ClipDistance})
+0:21 Constant:
+0:21 1 (const int)
+0:21 Constant:
+0:21 1 (const int)
+0:22 Sequence
+0:22 move second child to first child (temp float)
+0:22 'cd' (temp float)
+0:22 direct index (temp float ClipDistance)
+0:22 gl_ClipDistance: direct index for structure (in implicitly-sized array of float ClipDistance)
+0:22 direct index (temp block{in 4-component vector of float Position gl_Position, in float PointSize gl_PointSize, in implicitly-sized array of float ClipDistance gl_ClipDistance})
+0:22 'gl_in' (in 32-element array of block{in 4-component vector of float Position gl_Position, in float PointSize gl_PointSize, in implicitly-sized array of float ClipDistance gl_ClipDistance})
+0:22 Constant:
+0:22 1 (const int)
+0:22 Constant:
+0:22 2 (const int)
+0:22 Constant:
+0:22 2 (const int)
+0:24 Sequence
+0:24 move second child to first child (temp int)
+0:24 'pvi' (temp int)
+0:24 'gl_PatchVerticesIn' (in int PatchVertices)
+0:25 Sequence
+0:25 move second child to first child (temp int)
+0:25 'pid' (temp int)
+0:25 'gl_PrimitiveID' (in int PrimitiveID)
+0:26 Sequence
+0:26 move second child to first child (temp int)
+0:26 'iid' (temp int)
+0:26 'gl_InvocationID' (in int InvocationID)
+0:28 move second child to first child (temp 4-component vector of float)
+0:28 gl_Position: direct index for structure (out 4-component vector of float Position)
+0:28 indirect index (temp block{out 4-component vector of float Position gl_Position, out float PointSize gl_PointSize, out implicitly-sized array of float ClipDistance gl_ClipDistance})
+0:28 'gl_out' (out 4-element array of block{out 4-component vector of float Position gl_Position, out float PointSize gl_PointSize, out implicitly-sized array of float ClipDistance gl_ClipDistance})
+0:28 'gl_InvocationID' (in int InvocationID)
+0:28 Constant:
+0:28 0 (const int)
+0:28 'p' (temp 4-component vector of float)
+0:29 move second child to first child (temp float)
+0:29 gl_PointSize: direct index for structure (out float PointSize)
+0:29 indirect index (temp block{out 4-component vector of float Position gl_Position, out float PointSize gl_PointSize, out implicitly-sized array of float ClipDistance gl_ClipDistance})
+0:29 'gl_out' (out 4-element array of block{out 4-component vector of float Position gl_Position, out float PointSize gl_PointSize, out implicitly-sized array of float ClipDistance gl_ClipDistance})
+0:29 'gl_InvocationID' (in int InvocationID)
+0:29 Constant:
+0:29 1 (const int)
+0:29 'ps' (temp float)
+0:30 move second child to first child (temp float)
+0:30 direct index (temp float ClipDistance)
+0:30 gl_ClipDistance: direct index for structure (out implicitly-sized array of float ClipDistance)
+0:30 indirect index (temp block{out 4-component vector of float Position gl_Position, out float PointSize gl_PointSize, out implicitly-sized array of float ClipDistance gl_ClipDistance})
+0:30 'gl_out' (out 4-element array of block{out 4-component vector of float Position gl_Position, out float PointSize gl_PointSize, out implicitly-sized array of float ClipDistance gl_ClipDistance})
+0:30 'gl_InvocationID' (in int InvocationID)
+0:30 Constant:
+0:30 2 (const int)
+0:30 Constant:
+0:30 1 (const int)
+0:30 'cd' (temp float)
+0:32 move second child to first child (temp float)
+0:32 direct index (patch temp float TessLevelOuter)
+0:32 'gl_TessLevelOuter' (patch out 4-element array of float TessLevelOuter)
+0:32 Constant:
+0:32 3 (const int)
+0:32 Constant:
+0:32 3.200000
+0:33 move second child to first child (temp float)
+0:33 direct index (patch temp float TessLevelInner)
+0:33 'gl_TessLevelInner' (patch out 2-element array of float TessLevelInner)
+0:33 Constant:
+0:33 1 (const int)
+0:33 Constant:
+0:33 1.300000
+0:? Linker Objects
+0:? 'gl_out' (out 4-element array of block{out 4-component vector of float Position gl_Position, out float PointSize gl_PointSize, out implicitly-sized array of float ClipDistance gl_ClipDistance})
+0:? 'outa' (global 4-element array of int)
+0:? 'patchOut' (patch out 4-component vector of float)
+
+150.tese
+ERROR: 0:12: 'barrier' : no matching overloaded function found
+ERROR: 1 compilation errors. No code generated.
+
+
+Shader version: 150
+Requested GL_ARB_tessellation_shader
+input primitive = quads
+vertex spacing = fractional_odd_spacing
+triangle order = cw
+using point mode
+ERROR: node is still EOpNull!
+0:10 Function Definition: main( (global void)
+0:10 Function Parameters:
+0:12 Sequence
+0:12 Constant:
+0:12 0.000000
+0:14 Sequence
+0:14 move second child to first child (temp int)
+0:14 'a' (temp int)
+0:14 Constant:
+0:14 1512 (const int)
+0:22 Sequence
+0:22 move second child to first child (temp 4-component vector of float)
+0:22 'p' (temp 4-component vector of float)
+0:22 gl_Position: direct index for structure (in 4-component vector of float Position)
+0:22 direct index (temp block{in 4-component vector of float Position gl_Position, in float PointSize gl_PointSize, in implicitly-sized array of float ClipDistance gl_ClipDistance})
+0:22 'gl_in' (in 32-element array of block{in 4-component vector of float Position gl_Position, in float PointSize gl_PointSize, in implicitly-sized array of float ClipDistance gl_ClipDistance})
+0:22 Constant:
+0:22 1 (const int)
+0:22 Constant:
+0:22 0 (const int)
+0:23 Sequence
+0:23 move second child to first child (temp float)
+0:23 'ps' (temp float)
+0:23 gl_PointSize: direct index for structure (in float PointSize)
+0:23 direct index (temp block{in 4-component vector of float Position gl_Position, in float PointSize gl_PointSize, in implicitly-sized array of float ClipDistance gl_ClipDistance})
+0:23 'gl_in' (in 32-element array of block{in 4-component vector of float Position gl_Position, in float PointSize gl_PointSize, in implicitly-sized array of float ClipDistance gl_ClipDistance})
+0:23 Constant:
+0:23 1 (const int)
+0:23 Constant:
+0:23 1 (const int)
+0:24 Sequence
+0:24 move second child to first child (temp float)
+0:24 'cd' (temp float)
+0:24 direct index (temp float ClipDistance)
+0:24 gl_ClipDistance: direct index for structure (in implicitly-sized array of float ClipDistance)
+0:24 direct index (temp block{in 4-component vector of float Position gl_Position, in float PointSize gl_PointSize, in implicitly-sized array of float ClipDistance gl_ClipDistance})
+0:24 'gl_in' (in 32-element array of block{in 4-component vector of float Position gl_Position, in float PointSize gl_PointSize, in implicitly-sized array of float ClipDistance gl_ClipDistance})
+0:24 Constant:
+0:24 1 (const int)
+0:24 Constant:
+0:24 2 (const int)
+0:24 Constant:
+0:24 2 (const int)
+0:26 Sequence
+0:26 move second child to first child (temp int)
+0:26 'pvi' (temp int)
+0:26 'gl_PatchVerticesIn' (in int PatchVertices)
+0:27 Sequence
+0:27 move second child to first child (temp int)
+0:27 'pid' (temp int)
+0:27 'gl_PrimitiveID' (in int PrimitiveID)
+0:28 Sequence
+0:28 move second child to first child (temp 3-component vector of float)
+0:28 'tc' (temp 3-component vector of float)
+0:28 'gl_TessCoord' (in 3-component vector of float TessCoord)
+0:29 Sequence
+0:29 move second child to first child (temp float)
+0:29 'tlo' (temp float)
+0:29 direct index (patch temp float TessLevelOuter)
+0:29 'gl_TessLevelOuter' (patch in 4-element array of float TessLevelOuter)
+0:29 Constant:
+0:29 3 (const int)
+0:30 Sequence
+0:30 move second child to first child (temp float)
+0:30 'tli' (temp float)
+0:30 direct index (patch temp float TessLevelInner)
+0:30 'gl_TessLevelInner' (patch in 2-element array of float TessLevelInner)
+0:30 Constant:
+0:30 1 (const int)
+0:32 move second child to first child (temp 4-component vector of float)
+0:32 gl_Position: direct index for structure (gl_Position 4-component vector of float Position)
+0:32 'anon@0' (out block{gl_Position 4-component vector of float Position gl_Position, gl_PointSize float PointSize gl_PointSize, out implicitly-sized array of float ClipDistance gl_ClipDistance})
+0:32 Constant:
+0:32 0 (const uint)
+0:32 'p' (temp 4-component vector of float)
+0:33 move second child to first child (temp float)
+0:33 gl_PointSize: direct index for structure (gl_PointSize float PointSize)
+0:33 'anon@0' (out block{gl_Position 4-component vector of float Position gl_Position, gl_PointSize float PointSize gl_PointSize, out implicitly-sized array of float ClipDistance gl_ClipDistance})
+0:33 Constant:
+0:33 1 (const uint)
+0:33 'ps' (temp float)
+0:34 move second child to first child (temp float)
+0:34 direct index (temp float ClipDistance)
+0:34 gl_ClipDistance: direct index for structure (out implicitly-sized array of float ClipDistance)
+0:34 'anon@0' (out block{gl_Position 4-component vector of float Position gl_Position, gl_PointSize float PointSize gl_PointSize, out implicitly-sized array of float ClipDistance gl_ClipDistance})
+0:34 Constant:
+0:34 2 (const uint)
+0:34 Constant:
+0:34 2 (const int)
+0:34 'cd' (temp float)
+0:? Linker Objects
+0:? 'patchIn' (patch in 4-component vector of float)
+0:? 'anon@0' (out block{gl_Position 4-component vector of float Position gl_Position, gl_PointSize float PointSize gl_PointSize, out implicitly-sized array of float ClipDistance gl_ClipDistance})
+
+400.tesc
+Warning, version 400 is not yet complete; most version-specific features are present, but some are missing.
+ERROR: 0:6: 'quads' : unrecognized layout identifier, or qualifier requires assignment (e.g., binding = 4)
+ERROR: 0:7: 'ccw' : unrecognized layout identifier, or qualifier requires assignment (e.g., binding = 4)
+ERROR: 0:8: 'fractional_even_spacing' : unrecognized layout identifier, or qualifier requires assignment (e.g., binding = 4)
+ERROR: 0:10: 'patch' : can only use on output in tessellation-control shader
+ERROR: 0:39: '' : tessellation control barrier() cannot be placed within flow control
+ERROR: 0:41: '' : tessellation control barrier() cannot be placed within flow control
+ERROR: 0:46: '' : tessellation control barrier() cannot be placed within flow control
+ERROR: 0:51: '' : tessellation control barrier() cannot be placed within flow control
+ERROR: 0:54: '' : tessellation control barrier() cannot be placed within flow control
+ERROR: 0:61: '' : tessellation control barrier() cannot be placed after a return from main()
+ERROR: 0:64: 'vertices' : can only apply to 'out'
+ERROR: 0:65: 'vertices' : cannot change previously set layout value
+ERROR: 0:69: '[' : array index out of range '4'
+ERROR: 0:71: '' : tessellation control barrier() must be in main()
+ERROR: 0:74: 'in' : type must be an array: ina
+ERROR: 0:76: '[]' : tessellation input array size must be gl_MaxPatchVertices or implicitly sized
+ERROR: 0:83: 'location' : overlapping use of location 4
+ERROR: 0:87: 'location' : overlapping use of location 4
+ERROR: 0:104: '' : precise qualifier must appear first
+ERROR: 0:105: '' : precise qualifier must appear first
+ERROR: 0:105: '' : precise qualifier must appear first
+ERROR: 21 compilation errors. No code generated.
+
+
+Shader version: 400
+Requested GL_ARB_separate_shader_objects
+vertices = 4
+ERROR: node is still EOpNull!
+0:13 Function Definition: main( (global void)
+0:13 Function Parameters:
+0:15 Sequence
+0:15 Barrier (global void)
+0:17 Sequence
+0:17 move second child to first child (temp int)
+0:17 'a' (temp int)
+0:17 Constant:
+0:17 5392 (const int)
+0:23 Sequence
+0:23 move second child to first child (temp 4-component vector of float)
+0:23 'p' (temp 4-component vector of float)
+0:23 gl_Position: direct index for structure (in 4-component vector of float Position)
+0:23 direct index (temp block{in 4-component vector of float Position gl_Position, in float PointSize gl_PointSize, in implicitly-sized array of float ClipDistance gl_ClipDistance})
+0:23 'gl_in' (in 32-element array of block{in 4-component vector of float Position gl_Position, in float PointSize gl_PointSize, in implicitly-sized array of float ClipDistance gl_ClipDistance})
+0:23 Constant:
+0:23 1 (const int)
+0:23 Constant:
+0:23 0 (const int)
+0:24 Sequence
+0:24 move second child to first child (temp float)
+0:24 'ps' (temp float)
+0:24 gl_PointSize: direct index for structure (in float PointSize)
+0:24 direct index (temp block{in 4-component vector of float Position gl_Position, in float PointSize gl_PointSize, in implicitly-sized array of float ClipDistance gl_ClipDistance})
+0:24 'gl_in' (in 32-element array of block{in 4-component vector of float Position gl_Position, in float PointSize gl_PointSize, in implicitly-sized array of float ClipDistance gl_ClipDistance})
+0:24 Constant:
+0:24 1 (const int)
+0:24 Constant:
+0:24 1 (const int)
+0:25 Sequence
+0:25 move second child to first child (temp float)
+0:25 'cd' (temp float)
+0:25 direct index (temp float ClipDistance)
+0:25 gl_ClipDistance: direct index for structure (in implicitly-sized array of float ClipDistance)
+0:25 direct index (temp block{in 4-component vector of float Position gl_Position, in float PointSize gl_PointSize, in implicitly-sized array of float ClipDistance gl_ClipDistance})
+0:25 'gl_in' (in 32-element array of block{in 4-component vector of float Position gl_Position, in float PointSize gl_PointSize, in implicitly-sized array of float ClipDistance gl_ClipDistance})
+0:25 Constant:
+0:25 1 (const int)
+0:25 Constant:
+0:25 2 (const int)
+0:25 Constant:
+0:25 2 (const int)
+0:27 Sequence
+0:27 move second child to first child (temp int)
+0:27 'pvi' (temp int)
+0:27 'gl_PatchVerticesIn' (in int PatchVertices)
+0:28 Sequence
+0:28 move second child to first child (temp int)
+0:28 'pid' (temp int)
+0:28 'gl_PrimitiveID' (in int PrimitiveID)
+0:29 Sequence
+0:29 move second child to first child (temp int)
+0:29 'iid' (temp int)
+0:29 'gl_InvocationID' (in int InvocationID)
+0:31 move second child to first child (temp 4-component vector of float)
+0:31 gl_Position: direct index for structure (out 4-component vector of float Position)
+0:31 indirect index (temp block{out 4-component vector of float Position gl_Position, out float PointSize gl_PointSize, out implicitly-sized array of float ClipDistance gl_ClipDistance})
+0:31 'gl_out' (out 4-element array of block{out 4-component vector of float Position gl_Position, out float PointSize gl_PointSize, out implicitly-sized array of float ClipDistance gl_ClipDistance})
+0:31 'gl_InvocationID' (in int InvocationID)
+0:31 Constant:
+0:31 0 (const int)
+0:31 'p' (temp 4-component vector of float)
+0:32 move second child to first child (temp float)
+0:32 gl_PointSize: direct index for structure (out float PointSize)
+0:32 indirect index (temp block{out 4-component vector of float Position gl_Position, out float PointSize gl_PointSize, out implicitly-sized array of float ClipDistance gl_ClipDistance})
+0:32 'gl_out' (out 4-element array of block{out 4-component vector of float Position gl_Position, out float PointSize gl_PointSize, out implicitly-sized array of float ClipDistance gl_ClipDistance})
+0:32 'gl_InvocationID' (in int InvocationID)
+0:32 Constant:
+0:32 1 (const int)
+0:32 'ps' (temp float)
+0:33 move second child to first child (temp float)
+0:33 direct index (temp float ClipDistance)
+0:33 gl_ClipDistance: direct index for structure (out implicitly-sized array of float ClipDistance)
+0:33 indirect index (temp block{out 4-component vector of float Position gl_Position, out float PointSize gl_PointSize, out implicitly-sized array of float ClipDistance gl_ClipDistance})
+0:33 'gl_out' (out 4-element array of block{out 4-component vector of float Position gl_Position, out float PointSize gl_PointSize, out implicitly-sized array of float ClipDistance gl_ClipDistance})
+0:33 'gl_InvocationID' (in int InvocationID)
+0:33 Constant:
+0:33 2 (const int)
+0:33 Constant:
+0:33 1 (const int)
+0:33 'cd' (temp float)
+0:35 move second child to first child (temp float)
+0:35 direct index (patch temp float TessLevelOuter)
+0:35 'gl_TessLevelOuter' (patch out 4-element array of float TessLevelOuter)
+0:35 Constant:
+0:35 3 (const int)
+0:35 Constant:
+0:35 3.200000
+0:36 move second child to first child (temp float)
+0:36 direct index (patch temp float TessLevelInner)
+0:36 'gl_TessLevelInner' (patch out 2-element array of float TessLevelInner)
+0:36 Constant:
+0:36 1 (const int)
+0:36 Constant:
+0:36 1.300000
+0:38 Test condition and select (temp void)
+0:38 Condition
+0:38 Compare Greater Than (temp bool)
+0:38 'a' (temp int)
+0:38 Constant:
+0:38 10 (const int)
+0:38 true case
+0:39 Barrier (global void)
+0:38 false case
+0:41 Barrier (global void)
+0:43 Barrier (global void)
+0:47 Loop with condition not tested first
+0:47 Loop Condition
+0:47 Compare Greater Than (temp bool)
+0:47 'a' (temp int)
+0:47 Constant:
+0:47 10 (const int)
+0:47 Loop Body
+0:46 Sequence
+0:46 Barrier (global void)
+0:49 switch
+0:49 condition
+0:49 'a' (temp int)
+0:49 body
+0:49 Sequence
+0:50 default:
+0:? Sequence
+0:51 Barrier (global void)
+0:52 Branch: Break
+0:54 Test condition and select (temp int)
+0:54 Condition
+0:54 Compare Less Than (temp bool)
+0:54 'a' (temp int)
+0:54 Constant:
+0:54 12 (const int)
+0:54 true case
+0:54 'a' (temp int)
+0:54 false case
+0:54 Comma (temp int)
+0:54 Barrier (global void)
+0:54 'a' (temp int)
+0:56 Sequence
+0:56 Barrier (global void)
+0:59 Branch: Return
+0:61 Barrier (global void)
+0:67 Function Definition: foo( (global void)
+0:67 Function Parameters:
+0:69 Sequence
+0:69 gl_PointSize: direct index for structure (out float PointSize)
+0:69 direct index (temp block{out 4-component vector of float Position gl_Position, out float PointSize gl_PointSize, out implicitly-sized array of float ClipDistance gl_ClipDistance})
+0:69 'gl_out' (out 4-element array of block{out 4-component vector of float Position gl_Position, out float PointSize gl_PointSize, out implicitly-sized array of float ClipDistance gl_ClipDistance})
+0:69 Constant:
+0:69 4 (const int)
+0:69 Constant:
+0:69 1 (const int)
+0:71 Barrier (global void)
+0:91 Function Definition: foop( (global void)
+0:91 Function Parameters:
+0:? Sequence
+0:95 multiply second child into first child (temp 3-component vector of float)
+0:95 'pv3' (noContraction temp 3-component vector of float)
+0:95 'pv3' (noContraction temp 3-component vector of float)
+0:96 move second child to first child (temp 3-component vector of float)
+0:96 'pv3' (noContraction temp 3-component vector of float)
+0:96 fma (global 3-component vector of float)
+0:96 'pv3' (noContraction temp 3-component vector of float)
+0:96 'pv3' (noContraction temp 3-component vector of float)
+0:96 'pv3' (noContraction temp 3-component vector of float)
+0:97 move second child to first child (temp double)
+0:97 'd' (noContraction temp double)
+0:97 fma (global double)
+0:97 'd' (noContraction temp double)
+0:97 'd' (noContraction temp double)
+0:97 'd' (noContraction temp double)
+0:? Linker Objects
+0:? 'gl_out' (out 4-element array of block{out 4-component vector of float Position gl_Position, out float PointSize gl_PointSize, out implicitly-sized array of float ClipDistance gl_ClipDistance})
+0:? 'outa' (global 4-element array of int)
+0:? 'patchIn' (patch in 4-component vector of float)
+0:? 'patchOut' (patch out 4-component vector of float)
+0:? 'ina' (in 2-component vector of float)
+0:? 'inb' (in 32-element array of 2-component vector of float)
+0:? 'inc' (in 32-element array of 2-component vector of float)
+0:? 'ind' (in 32-element array of 2-component vector of float)
+0:? 'ivla' (layout(location=3 ) in 32-element array of 4-component vector of float)
+0:? 'ivlb' (layout(location=4 ) in 32-element array of 4-component vector of float)
+0:? 'ivlc' (layout(location=4 ) in 32-element array of 4-component vector of float)
+0:? 'ovla' (layout(location=3 ) out 4-element array of 4-component vector of float)
+0:? 'ovlb' (layout(location=4 ) out 4-element array of 4-component vector of float)
+0:? 'ovlc' (layout(location=4 ) out 4-element array of 4-component vector of float)
+0:? 'pv3' (noContraction temp 3-component vector of float)
+0:? 'pinbi' (patch out block{out int a})
+0:? 'badOrder' (invariant noContraction out 4-element array of 4-component vector of float)
+
+400.tese
+Warning, version 400 is not yet complete; most version-specific features are present, but some are missing.
+ERROR: 0:3: 'vertices' : there is no such layout identifier for this stage taking an assigned value
+ERROR: 0:5: 'triangles' : cannot change previously set input primitive
+ERROR: 0:6: 'isolines' : cannot change previously set input primitive
+ERROR: 0:8: 'ccw' : cannot change previously set vertex order
+ERROR: 0:12: 'equal_spacing' : cannot change previously set vertex spacing
+ERROR: 0:13: 'fractional_even_spacing' : cannot change previously set vertex spacing
+ERROR: 0:18: 'patch' : can only use on input in tessellation-evaluation shader
+ERROR: 0:22: 'barrier' : no matching overloaded function found
+ERROR: 0:47: 'patch' : cannot use interpolation qualifiers with patch
+ERROR: 0:48: 'patch' : cannot use interpolation qualifiers with patch
+ERROR: 0:49: 'patch' : cannot use interpolation qualifiers with patch
+ERROR: 0:50: '' : can only have one auxiliary qualifier (centroid, patch, and sample)
+ERROR: 0:54: 'gl_PerVertex' : block already declared with size, can't redeclare as implicitly-sized
+ERROR: 0:59: 'gl_PerVertex' : can only redeclare a built-in block once, and before any use
+ERROR: 0:64: 'quads' : cannot apply to 'out'
+ERROR: 0:64: 'cw' : can only apply to 'in'
+ERROR: 0:65: 'triangles' : cannot apply to 'out'
+ERROR: 0:66: 'isolines' : cannot apply to 'out'
+ERROR: 0:67: 'cw' : can only apply to 'in'
+ERROR: 0:68: 'fractional_odd_spacing' : can only apply to 'in'
+ERROR: 0:69: 'equal_spacing' : can only apply to 'in'
+ERROR: 0:70: 'fractional_even_spacing' : can only apply to 'in'
+ERROR: 0:71: 'point_mode' : can only apply to 'in'
+ERROR: 0:73: 'in' : type must be an array: ina
+ERROR: 0:75: '[]' : tessellation input array size must be gl_MaxPatchVertices or implicitly sized
+ERROR: 0:78: 'in' : type must be an array: bla
+ERROR: 0:86: '[]' : tessellation input array size must be gl_MaxPatchVertices or implicitly sized
+ERROR: 0:96: 'location' : overlapping use of location 24
+ERROR: 0:99: 'location' : overlapping use of location 24
+ERROR: 0:101: 'gl_TessLevelOuter' : identifiers starting with "gl_" are reserved
+ERROR: 30 compilation errors. No code generated.
+
+
+Shader version: 400
+Requested GL_ARB_separate_shader_objects
+input primitive = quads
+vertex spacing = fractional_odd_spacing
+triangle order = cw
+using point mode
+ERROR: node is still EOpNull!
+0:20 Function Definition: main( (global void)
+0:20 Function Parameters:
+0:22 Sequence
+0:22 Constant:
+0:22 0.000000
+0:24 Sequence
+0:24 move second child to first child (temp int)
+0:24 'a' (temp int)
+0:24 Constant:
+0:24 1512 (const int)
+0:32 Sequence
+0:32 move second child to first child (temp 4-component vector of float)
+0:32 'p' (temp 4-component vector of float)
+0:32 gl_Position: direct index for structure (in 4-component vector of float Position)
+0:32 direct index (temp block{in 4-component vector of float Position gl_Position, in float PointSize gl_PointSize, in implicitly-sized array of float ClipDistance gl_ClipDistance})
+0:32 'gl_in' (in 32-element array of block{in 4-component vector of float Position gl_Position, in float PointSize gl_PointSize, in implicitly-sized array of float ClipDistance gl_ClipDistance})
+0:32 Constant:
+0:32 1 (const int)
+0:32 Constant:
+0:32 0 (const int)
+0:33 Sequence
+0:33 move second child to first child (temp float)
+0:33 'ps' (temp float)
+0:33 gl_PointSize: direct index for structure (in float PointSize)
+0:33 direct index (temp block{in 4-component vector of float Position gl_Position, in float PointSize gl_PointSize, in implicitly-sized array of float ClipDistance gl_ClipDistance})
+0:33 'gl_in' (in 32-element array of block{in 4-component vector of float Position gl_Position, in float PointSize gl_PointSize, in implicitly-sized array of float ClipDistance gl_ClipDistance})
+0:33 Constant:
+0:33 1 (const int)
+0:33 Constant:
+0:33 1 (const int)
+0:34 Sequence
+0:34 move second child to first child (temp float)
+0:34 'cd' (temp float)
+0:34 direct index (temp float ClipDistance)
+0:34 gl_ClipDistance: direct index for structure (in implicitly-sized array of float ClipDistance)
+0:34 direct index (temp block{in 4-component vector of float Position gl_Position, in float PointSize gl_PointSize, in implicitly-sized array of float ClipDistance gl_ClipDistance})
+0:34 'gl_in' (in 32-element array of block{in 4-component vector of float Position gl_Position, in float PointSize gl_PointSize, in implicitly-sized array of float ClipDistance gl_ClipDistance})
+0:34 Constant:
+0:34 1 (const int)
+0:34 Constant:
+0:34 2 (const int)
+0:34 Constant:
+0:34 2 (const int)
+0:36 Sequence
+0:36 move second child to first child (temp int)
+0:36 'pvi' (temp int)
+0:36 'gl_PatchVerticesIn' (in int PatchVertices)
+0:37 Sequence
+0:37 move second child to first child (temp int)
+0:37 'pid' (temp int)
+0:37 'gl_PrimitiveID' (in int PrimitiveID)
+0:38 Sequence
+0:38 move second child to first child (temp 3-component vector of float)
+0:38 'tc' (temp 3-component vector of float)
+0:38 'gl_TessCoord' (in 3-component vector of float TessCoord)
+0:39 Sequence
+0:39 move second child to first child (temp float)
+0:39 'tlo' (temp float)
+0:39 direct index (patch temp float TessLevelOuter)
+0:39 'gl_TessLevelOuter' (patch in 4-element array of float TessLevelOuter)
+0:39 Constant:
+0:39 3 (const int)
+0:40 Sequence
+0:40 move second child to first child (temp float)
+0:40 'tli' (temp float)
+0:40 direct index (patch temp float TessLevelInner)
+0:40 'gl_TessLevelInner' (patch in 2-element array of float TessLevelInner)
+0:40 Constant:
+0:40 1 (const int)
+0:42 move second child to first child (temp 4-component vector of float)
+0:42 gl_Position: direct index for structure (gl_Position 4-component vector of float Position)
+0:42 'anon@0' (out block{gl_Position 4-component vector of float Position gl_Position, gl_PointSize float PointSize gl_PointSize, out implicitly-sized array of float ClipDistance gl_ClipDistance})
+0:42 Constant:
+0:42 0 (const uint)
+0:42 'p' (temp 4-component vector of float)
+0:43 move second child to first child (temp float)
+0:43 gl_PointSize: direct index for structure (gl_PointSize float PointSize)
+0:43 'anon@0' (out block{gl_Position 4-component vector of float Position gl_Position, gl_PointSize float PointSize gl_PointSize, out implicitly-sized array of float ClipDistance gl_ClipDistance})
+0:43 Constant:
+0:43 1 (const uint)
+0:43 'ps' (temp float)
+0:44 move second child to first child (temp float)
+0:44 direct index (temp float ClipDistance)
+0:44 gl_ClipDistance: direct index for structure (out implicitly-sized array of float ClipDistance)
+0:44 'anon@0' (out block{gl_Position 4-component vector of float Position gl_Position, gl_PointSize float PointSize gl_PointSize, out implicitly-sized array of float ClipDistance gl_ClipDistance})
+0:44 Constant:
+0:44 2 (const uint)
+0:44 Constant:
+0:44 2 (const int)
+0:44 'cd' (temp float)
+0:? Linker Objects
+0:? 'patchIn' (patch in 4-component vector of float)
+0:? 'patchOut' (patch out 4-component vector of float)
+0:? 'anon@0' (out block{gl_Position 4-component vector of float Position gl_Position, gl_PointSize float PointSize gl_PointSize, out implicitly-sized array of float ClipDistance gl_ClipDistance})
+0:? 'badp1' (smooth patch in 4-component vector of float)
+0:? 'badp2' (flat patch in 4-component vector of float)
+0:? 'badp3' (noperspective patch in 4-component vector of float)
+0:? 'badp4' (patch sample in 3-component vector of float)
+0:? 'gl_in' (in 32-element array of block{in 1-element array of float ClipDistance gl_ClipDistance})
+0:? 'ina' (in 2-component vector of float)
+0:? 'inb' (in 32-element array of 2-component vector of float)
+0:? 'inc' (in 32-element array of 2-component vector of float)
+0:? 'ind' (in 32-element array of 2-component vector of float)
+0:? 'bla' (in block{in int f})
+0:? 'blb' (in 32-element array of block{in int f})
+0:? 'blc' (in 32-element array of block{in int f})
+0:? 'bld' (in 32-element array of block{in int f})
+0:? 'ivla' (layout(location=23 ) in 32-element array of 4-component vector of float)
+0:? 'ivlb' (layout(location=24 ) in 32-element array of 4-component vector of float)
+0:? 'ivlc' (layout(location=24 ) in 32-element array of 4-component vector of float)
+0:? 'ovla' (layout(location=23 ) out 2-element array of 4-component vector of float)
+0:? 'ovlb' (layout(location=24 ) out 2-element array of 4-component vector of float)
+0:? 'pinbi' (patch in block{in int a})
+
+410.tesc
+Warning, version 400 is not yet complete; most version-specific features are present, but some are missing.
+ERROR: 0:4: 'length' : array must first be sized by a redeclaration or layout qualifier
+ERROR: 1 compilation errors. No code generated.
+
+
+Shader version: 400
+vertices = -1
+ERROR: node is still EOpNull!
+0:8 Function Definition: main( (global void)
+0:8 Function Parameters:
+0:? Linker Objects
+0:? 'gl_out' (out implicitly-sized array of block{out 4-component vector of float Position gl_Position, out float PointSize gl_PointSize, out implicitly-sized array of float ClipDistance gl_ClipDistance})
+0:? 'outa' (global 1-element array of int)
+0:? 'patchOut' (patch out 4-component vector of float)
+
+420.tesc
+Warning, version 420 is not yet complete; most version-specific features are present, but some are missing.
+ERROR: 0:7: 'vertices' : inconsistent output number of vertices for array size of gl_out
+ERROR: 0:11: 'vertices' : inconsistent output number of vertices for array size of a
+ERROR: 0:12: 'vertices' : inconsistent output number of vertices for array size of outb
+ERROR: 0:26: 'gl_PointSize' : no such field in structure
+ERROR: 0:26: 'assign' : cannot convert from 'temp float' to 'temp block{out 4-component vector of float Position gl_Position}'
+ERROR: 0:29: 'out' : type must be an array: outf
+ERROR: 0:43: 'vertices' : must be greater than 0
+ERROR: 7 compilation errors. No code generated.
+
+
+Shader version: 420
+Requested GL_ARB_separate_shader_objects
+vertices = 4
+ERROR: node is still EOpNull!
+0:15 Function Definition: main( (global void)
+0:15 Function Parameters:
+0:17 Sequence
+0:17 Sequence
+0:17 move second child to first child (temp 4-component vector of float)
+0:17 'p' (temp 4-component vector of float)
+0:17 gl_Position: direct index for structure (in 4-component vector of float Position)
+0:17 direct index (temp block{in 4-component vector of float Position gl_Position, in float PointSize gl_PointSize, in implicitly-sized array of float ClipDistance gl_ClipDistance})
+0:17 'gl_in' (in 32-element array of block{in 4-component vector of float Position gl_Position, in float PointSize gl_PointSize, in implicitly-sized array of float ClipDistance gl_ClipDistance})
+0:17 Constant:
+0:17 1 (const int)
+0:17 Constant:
+0:17 0 (const int)
+0:18 Sequence
+0:18 move second child to first child (temp float)
+0:18 'ps' (temp float)
+0:18 gl_PointSize: direct index for structure (in float PointSize)
+0:18 direct index (temp block{in 4-component vector of float Position gl_Position, in float PointSize gl_PointSize, in implicitly-sized array of float ClipDistance gl_ClipDistance})
+0:18 'gl_in' (in 32-element array of block{in 4-component vector of float Position gl_Position, in float PointSize gl_PointSize, in implicitly-sized array of float ClipDistance gl_ClipDistance})
+0:18 Constant:
+0:18 1 (const int)
+0:18 Constant:
+0:18 1 (const int)
+0:19 Sequence
+0:19 move second child to first child (temp float)
+0:19 'cd' (temp float)
+0:19 direct index (temp float ClipDistance)
+0:19 gl_ClipDistance: direct index for structure (in implicitly-sized array of float ClipDistance)
+0:19 direct index (temp block{in 4-component vector of float Position gl_Position, in float PointSize gl_PointSize, in implicitly-sized array of float ClipDistance gl_ClipDistance})
+0:19 'gl_in' (in 32-element array of block{in 4-component vector of float Position gl_Position, in float PointSize gl_PointSize, in implicitly-sized array of float ClipDistance gl_ClipDistance})
+0:19 Constant:
+0:19 1 (const int)
+0:19 Constant:
+0:19 2 (const int)
+0:19 Constant:
+0:19 2 (const int)
+0:21 Sequence
+0:21 move second child to first child (temp int)
+0:21 'pvi' (temp int)
+0:21 'gl_PatchVerticesIn' (in int PatchVertices)
+0:22 Sequence
+0:22 move second child to first child (temp int)
+0:22 'pid' (temp int)
+0:22 'gl_PrimitiveID' (in int PrimitiveID)
+0:23 Sequence
+0:23 move second child to first child (temp int)
+0:23 'iid' (temp int)
+0:23 'gl_InvocationID' (in int InvocationID)
+0:25 move second child to first child (temp 4-component vector of float)
+0:25 gl_Position: direct index for structure (out 4-component vector of float Position)
+0:25 indirect index (temp block{out 4-component vector of float Position gl_Position})
+0:25 'gl_out' (out 3-element array of block{out 4-component vector of float Position gl_Position})
+0:25 'gl_InvocationID' (in int InvocationID)
+0:25 Constant:
+0:25 0 (const int)
+0:25 'p' (temp 4-component vector of float)
+0:26 indirect index (temp block{out 4-component vector of float Position gl_Position})
+0:26 'gl_out' (out 3-element array of block{out 4-component vector of float Position gl_Position})
+0:26 'gl_InvocationID' (in int InvocationID)
+0:34 Function Definition: foo( (global void)
+0:34 Function Parameters:
+0:36 Sequence
+0:36 Test condition and select (temp void)
+0:36 Condition
+0:36 logical-or (temp bool)
+0:36 Compare Not Equal (temp bool)
+0:36 Constant:
+0:36 -0.625000
+0:36 -0.500000
+0:36 -0.375000
+0:36 -0.250000
+0:36 -0.375000
+0:36 -0.250000
+0:36 -0.125000
+0:36 0.000000
+0:36 direct index (layout(location=0 ) temp 2X4 matrix of double)
+0:36 'vs_tcs_first' (layout(location=0 ) in 32-element array of 2X4 matrix of double)
+0:36 Constant:
+0:36 0 (const int)
+0:37 Compare Not Equal (temp bool)
+0:37 Constant:
+0:37 0.375000
+0:37 0.500000
+0:37 0.625000
+0:37 0.750000
+0:37 0.625000
+0:37 0.750000
+0:37 0.875000
+0:37 -0.625000
+0:37 direct index (layout(location=12 ) temp 2X4 matrix of double)
+0:37 'vs_tcs_last' (layout(location=12 ) in 32-element array of 2X4 matrix of double)
+0:37 Constant:
+0:37 0 (const int)
+0:36 true case is null
+0:? Linker Objects
+0:? 'gl_out' (out 3-element array of block{out 4-component vector of float Position gl_Position})
+0:? 'a' (out 3-element array of int)
+0:? 'outb' (out 5-element array of int)
+0:? 'outc' (out 4-element array of int)
+0:? 'outf' (out float)
+0:? 'vs_tcs_first' (layout(location=0 ) in 32-element array of 2X4 matrix of double)
+0:? 'vs_tcs_last' (layout(location=12 ) in 32-element array of 2X4 matrix of double)
+
+420.tese
+Warning, version 420 is not yet complete; most version-specific features are present, but some are missing.
+ERROR: 0:7: '=' : cannot convert from 'const 3-element array of float' to 'global 2-element array of float'
+ERROR: 0:8: 'initializer list' : wrong vector size (or rows in a matrix column): temp 2-component vector of float
+ERROR: 0:9: 'initializer list' : wrong number of matrix columns: temp 3X3 matrix of float
+ERROR: 0:10: 'initializer list' : wrong number of matrix columns: temp 2X2 matrix of float
+ERROR: 0:25: 'initializer list' : wrong number of structure members
+ERROR: 0:27: '=' : cannot convert from 'const bool' to 'global int'
+ERROR: 0:28: 'constructor' : cannot convert parameter 2 from 'const float' to 'temp 4-component vector of float'
+ERROR: 0:29: 'constructor' : cannot convert parameter 2 from 'const 2X2 matrix of float' to 'const 4-component vector of float'
+ERROR: 0:29: 'const 2-element array of 4-component vector of float' : cannot construct with these arguments
+ERROR: 0:29: '=' : cannot convert from 'const float' to 'global 2-element array of 4-component vector of float'
+ERROR: 0:30: 'initializer list' : wrong number of matrix columns: temp 4X2 matrix of float
+ERROR: 0:40: 'constructor' : cannot convert parameter 1 from 'temp float' to 'temp structure{global float s, global float t}'
+ERROR: 0:58: 'initializer list' : wrong number of structure members
+ERROR: 13 compilation errors. No code generated.
+
+
+Shader version: 420
+input primitive = none
+vertex spacing = none
+triangle order = none
+ERROR: node is still EOpNull!
+0:4 Sequence
+0:4 move second child to first child (temp 2X2 matrix of float)
+0:4 'b' (global 2X2 matrix of float)
+0:4 Constant:
+0:4 1.000000
+0:4 0.000000
+0:4 0.000000
+0:4 1.000000
+0:15 Sequence
+0:15 move second child to first child (temp structure{global float a, global int b})
+0:15 'e' (global structure{global float a, global int b})
+0:15 Constant:
+0:15 1.200000
+0:15 2 (const int)
+0:20 Sequence
+0:20 move second child to first child (temp structure{global float a, global int b})
+0:20 'e2' (global structure{global float a, global int b})
+0:20 Constant:
+0:20 1.000000
+0:20 3 (const int)
+0:42 Sequence
+0:42 move second child to first child (temp 5-element array of float)
+0:42 'b5' (global 5-element array of float)
+0:42 Constant:
+0:42 3.400000
+0:42 4.200000
+0:42 5.000000
+0:42 5.200000
+0:42 1.100000
+0:67 Sequence
+0:67 move second child to first child (temp 3-component vector of float)
+0:67 'av3' (global 3-component vector of float)
+0:67 Construct vec3 (global 3-component vector of float)
+0:67 'vc1' (global float)
+0:67 'vc2' (global float)
+0:67 'vc3' (global float)
+0:68 Sequence
+0:68 move second child to first child (temp 3-component vector of float)
+0:68 'bv3' (global 3-component vector of float)
+0:68 Construct vec3 (temp 3-component vector of float)
+0:68 'vc1' (global float)
+0:68 'vc2' (global float)
+0:68 'vc3' (global float)
+0:70 Function Definition: main( (global void)
+0:70 Function Parameters:
+0:72 Sequence
+0:72 MemoryBarrier (global void)
+0:74 Test condition and select (temp void)
+0:74 Condition
+0:74 Compare Equal (temp bool)
+0:74 Constant:
+0:74 1 (const uint)
+0:74 2 (const uint)
+0:74 3.000000
+0:74 4.000000
+0:74 0.000000
+0:74 0.000000
+0:74 0.000000
+0:74 4.000000
+0:74 0.000000
+0:74 5.000000
+0:74 6.000000
+0:74 0.000000
+0:74 0.000000
+0:74 0.000000
+0:74 6.000000
+0:74 0.000000
+0:74 'curlybad1' (temp structure{global 2-component vector of uint uv2, global 2-element array of structure{global float f, global 2X3 matrix of float m23} s})
+0:74 true case is null
+0:76 Test condition and select (temp void)
+0:76 Condition
+0:76 Constant:
+0:76 true (const bool)
+0:76 true case is null
+0:? Linker Objects
+0:? 'a' (const 2X2 matrix of float)
+0:? 1.000000
+0:? 0.000000
+0:? 0.000000
+0:? 1.000000
+0:? 'b' (global 2X2 matrix of float)
+0:? 'c' (const 2X2 matrix of float)
+0:? 1.000000
+0:? 0.000000
+0:? 0.000000
+0:? 1.000000
+0:? 'a2' (global 2-element array of float)
+0:? 'b2' (global 2-component vector of float)
+0:? 'c2' (global 3X3 matrix of float)
+0:? 'd' (global 2X2 matrix of float)
+0:? 'e' (global structure{global float a, global int b})
+0:? 'e2' (global structure{global float a, global int b})
+0:? 'e3' (global structure{global float a, global int b})
+0:? 'a3' (global int)
+0:? 'b3' (global 2-element array of 4-component vector of float)
+0:? 'b4' (global 2-element array of 4-component vector of float)
+0:? 'c3' (global 4X2 matrix of float)
+0:? 'd2' (global implicitly-sized array of structure{global float s, global float t})
+0:? 'b5' (global 5-element array of float)
+0:? 'constructed' (const structure{global 2-component vector of uint uv2, global 2-element array of structure{global float f, global 2X3 matrix of float m23} s})
+0:? 1 (const uint)
+0:? 2 (const uint)
+0:? 3.000000
+0:? 4.000000
+0:? 0.000000
+0:? 0.000000
+0:? 0.000000
+0:? 4.000000
+0:? 0.000000
+0:? 5.000000
+0:? 6.000000
+0:? 0.000000
+0:? 0.000000
+0:? 0.000000
+0:? 6.000000
+0:? 0.000000
+0:? 'curlybad1' (temp structure{global 2-component vector of uint uv2, global 2-element array of structure{global float f, global 2X3 matrix of float m23} s})
+0:? 'curlyInit' (const structure{global 2-component vector of uint uv2, global 2-element array of structure{global float f, global 2X3 matrix of float m23} s})
+0:? 1 (const uint)
+0:? 2 (const uint)
+0:? 3.000000
+0:? 4.000000
+0:? 0.000000
+0:? 0.000000
+0:? 0.000000
+0:? 4.000000
+0:? 0.000000
+0:? 5.000000
+0:? 6.000000
+0:? 0.000000
+0:? 0.000000
+0:? 0.000000
+0:? 6.000000
+0:? 0.000000
+0:? 'vc1' (global float)
+0:? 'vc2' (global float)
+0:? 'vc3' (global float)
+0:? 'av3' (global 3-component vector of float)
+0:? 'bv3' (global 3-component vector of float)
+
+
+Linked tessellation control stage:
+
+ERROR: Linking tessellation control stage: Multiple function bodies in multiple compilation units for the same signature in the same stage:
+ main(
+ERROR: Linking tessellation control stage: Contradictory layout vertices values
+ERROR: Linking tessellation control stage: Multiple function bodies in multiple compilation units for the same signature in the same stage:
+ main(
+ERROR: Linking tessellation control stage: Multiple function bodies in multiple compilation units for the same signature in the same stage:
+ main(
+ERROR: Linking tessellation control stage: Types must match:
+ gl_out: "out 4-element array of block{out 4-component vector of float Position gl_Position, out float PointSize gl_PointSize, out implicitly-sized array of float ClipDistance gl_ClipDistance}" versus "out implicitly-sized array of block{out 4-component vector of float Position gl_Position, out float PointSize gl_PointSize, out implicitly-sized array of float ClipDistance gl_ClipDistance}"
+ERROR: Linking tessellation control stage: Types must match:
+ outa: "global 4-element array of int" versus "global 1-element array of int"
+ERROR: Linking tessellation control stage: Multiple function bodies in multiple compilation units for the same signature in the same stage:
+ main(
+ERROR: Linking tessellation control stage: Multiple function bodies in multiple compilation units for the same signature in the same stage:
+ main(
+ERROR: Linking tessellation control stage: Multiple function bodies in multiple compilation units for the same signature in the same stage:
+ foo(
+ERROR: Linking tessellation control stage: Multiple function bodies in multiple compilation units for the same signature in the same stage:
+ main(
+ERROR: Linking tessellation control stage: Types must match:
+ gl_out: "out 4-element array of block{out 4-component vector of float Position gl_Position, out float PointSize gl_PointSize, out implicitly-sized array of float ClipDistance gl_ClipDistance}" versus "out 3-element array of block{out 4-component vector of float Position gl_Position}"
+
+Linked tessellation evaluation stage:
+
+ERROR: Linking tessellation evaluation stage: Multiple function bodies in multiple compilation units for the same signature in the same stage:
+ main(
+ERROR: Linking tessellation evaluation stage: Contradictory input layout primitives
+ERROR: Linking tessellation evaluation stage: Contradictory input vertex spacing
+ERROR: Linking tessellation evaluation stage: Contradictory triangle ordering
+ERROR: Linking tessellation evaluation stage: Multiple function bodies in multiple compilation units for the same signature in the same stage:
+ main(
+ERROR: Linking tessellation evaluation stage: Multiple function bodies in multiple compilation units for the same signature in the same stage:
+ main(
+
+Shader version: 420
+Requested GL_ARB_separate_shader_objects
+Requested GL_ARB_tessellation_shader
+vertices = 4
+0:? Sequence
+0:10 Function Definition: main( (global void)
+0:10 Function Parameters:
+0:12 Sequence
+0:12 Barrier (global void)
+0:14 Sequence
+0:14 move second child to first child (temp int)
+0:14 'a' (temp int)
+0:14 Constant:
+0:14 5392 (const int)
+0:20 Sequence
+0:20 move second child to first child (temp 4-component vector of float)
+0:20 'p' (temp 4-component vector of float)
+0:20 gl_Position: direct index for structure (in 4-component vector of float Position)
+0:20 direct index (temp block{in 4-component vector of float Position gl_Position, in float PointSize gl_PointSize, in 3-element array of float ClipDistance gl_ClipDistance})
+0:20 'gl_in' (in 32-element array of block{in 4-component vector of float Position gl_Position, in float PointSize gl_PointSize, in 3-element array of float ClipDistance gl_ClipDistance})
+0:20 Constant:
+0:20 1 (const int)
+0:20 Constant:
+0:20 0 (const int)
+0:21 Sequence
+0:21 move second child to first child (temp float)
+0:21 'ps' (temp float)
+0:21 gl_PointSize: direct index for structure (in float PointSize)
+0:21 direct index (temp block{in 4-component vector of float Position gl_Position, in float PointSize gl_PointSize, in 3-element array of float ClipDistance gl_ClipDistance})
+0:21 'gl_in' (in 32-element array of block{in 4-component vector of float Position gl_Position, in float PointSize gl_PointSize, in 3-element array of float ClipDistance gl_ClipDistance})
+0:21 Constant:
+0:21 1 (const int)
+0:21 Constant:
+0:21 1 (const int)
+0:22 Sequence
+0:22 move second child to first child (temp float)
+0:22 'cd' (temp float)
+0:22 direct index (temp float ClipDistance)
+0:22 gl_ClipDistance: direct index for structure (in 3-element array of float ClipDistance)
+0:22 direct index (temp block{in 4-component vector of float Position gl_Position, in float PointSize gl_PointSize, in 3-element array of float ClipDistance gl_ClipDistance})
+0:22 'gl_in' (in 32-element array of block{in 4-component vector of float Position gl_Position, in float PointSize gl_PointSize, in 3-element array of float ClipDistance gl_ClipDistance})
+0:22 Constant:
+0:22 1 (const int)
+0:22 Constant:
+0:22 2 (const int)
+0:22 Constant:
+0:22 2 (const int)
+0:24 Sequence
+0:24 move second child to first child (temp int)
+0:24 'pvi' (temp int)
+0:24 'gl_PatchVerticesIn' (in int PatchVertices)
+0:25 Sequence
+0:25 move second child to first child (temp int)
+0:25 'pid' (temp int)
+0:25 'gl_PrimitiveID' (in int PrimitiveID)
+0:26 Sequence
+0:26 move second child to first child (temp int)
+0:26 'iid' (temp int)
+0:26 'gl_InvocationID' (in int InvocationID)
+0:28 move second child to first child (temp 4-component vector of float)
+0:28 gl_Position: direct index for structure (out 4-component vector of float Position)
+0:28 indirect index (temp block{out 4-component vector of float Position gl_Position, out float PointSize gl_PointSize, out 2-element array of float ClipDistance gl_ClipDistance})
+0:28 'gl_out' (out 4-element array of block{out 4-component vector of float Position gl_Position, out float PointSize gl_PointSize, out 2-element array of float ClipDistance gl_ClipDistance})
+0:28 'gl_InvocationID' (in int InvocationID)
+0:28 Constant:
+0:28 0 (const int)
+0:28 'p' (temp 4-component vector of float)
+0:29 move second child to first child (temp float)
+0:29 gl_PointSize: direct index for structure (out float PointSize)
+0:29 indirect index (temp block{out 4-component vector of float Position gl_Position, out float PointSize gl_PointSize, out 2-element array of float ClipDistance gl_ClipDistance})
+0:29 'gl_out' (out 4-element array of block{out 4-component vector of float Position gl_Position, out float PointSize gl_PointSize, out 2-element array of float ClipDistance gl_ClipDistance})
+0:29 'gl_InvocationID' (in int InvocationID)
+0:29 Constant:
+0:29 1 (const int)
+0:29 'ps' (temp float)
+0:30 move second child to first child (temp float)
+0:30 direct index (temp float ClipDistance)
+0:30 gl_ClipDistance: direct index for structure (out 2-element array of float ClipDistance)
+0:30 indirect index (temp block{out 4-component vector of float Position gl_Position, out float PointSize gl_PointSize, out 2-element array of float ClipDistance gl_ClipDistance})
+0:30 'gl_out' (out 4-element array of block{out 4-component vector of float Position gl_Position, out float PointSize gl_PointSize, out 2-element array of float ClipDistance gl_ClipDistance})
+0:30 'gl_InvocationID' (in int InvocationID)
+0:30 Constant:
+0:30 2 (const int)
+0:30 Constant:
+0:30 1 (const int)
+0:30 'cd' (temp float)
+0:32 move second child to first child (temp float)
+0:32 direct index (patch temp float TessLevelOuter)
+0:32 'gl_TessLevelOuter' (patch out 4-element array of float TessLevelOuter)
+0:32 Constant:
+0:32 3 (const int)
+0:32 Constant:
+0:32 3.200000
+0:33 move second child to first child (temp float)
+0:33 direct index (patch temp float TessLevelInner)
+0:33 'gl_TessLevelInner' (patch out 2-element array of float TessLevelInner)
+0:33 Constant:
+0:33 1 (const int)
+0:33 Constant:
+0:33 1.300000
+0:13 Function Definition: main( (global void)
+0:13 Function Parameters:
+0:15 Sequence
+0:15 Barrier (global void)
+0:17 Sequence
+0:17 move second child to first child (temp int)
+0:17 'a' (temp int)
+0:17 Constant:
+0:17 5392 (const int)
+0:23 Sequence
+0:23 move second child to first child (temp 4-component vector of float)
+0:23 'p' (temp 4-component vector of float)
+0:23 gl_Position: direct index for structure (in 4-component vector of float Position)
+0:23 direct index (temp block{in 4-component vector of float Position gl_Position, in float PointSize gl_PointSize, in 3-element array of float ClipDistance gl_ClipDistance})
+0:23 'gl_in' (in 32-element array of block{in 4-component vector of float Position gl_Position, in float PointSize gl_PointSize, in 3-element array of float ClipDistance gl_ClipDistance})
+0:23 Constant:
+0:23 1 (const int)
+0:23 Constant:
+0:23 0 (const int)
+0:24 Sequence
+0:24 move second child to first child (temp float)
+0:24 'ps' (temp float)
+0:24 gl_PointSize: direct index for structure (in float PointSize)
+0:24 direct index (temp block{in 4-component vector of float Position gl_Position, in float PointSize gl_PointSize, in 3-element array of float ClipDistance gl_ClipDistance})
+0:24 'gl_in' (in 32-element array of block{in 4-component vector of float Position gl_Position, in float PointSize gl_PointSize, in 3-element array of float ClipDistance gl_ClipDistance})
+0:24 Constant:
+0:24 1 (const int)
+0:24 Constant:
+0:24 1 (const int)
+0:25 Sequence
+0:25 move second child to first child (temp float)
+0:25 'cd' (temp float)
+0:25 direct index (temp float ClipDistance)
+0:25 gl_ClipDistance: direct index for structure (in 3-element array of float ClipDistance)
+0:25 direct index (temp block{in 4-component vector of float Position gl_Position, in float PointSize gl_PointSize, in 3-element array of float ClipDistance gl_ClipDistance})
+0:25 'gl_in' (in 32-element array of block{in 4-component vector of float Position gl_Position, in float PointSize gl_PointSize, in 3-element array of float ClipDistance gl_ClipDistance})
+0:25 Constant:
+0:25 1 (const int)
+0:25 Constant:
+0:25 2 (const int)
+0:25 Constant:
+0:25 2 (const int)
+0:27 Sequence
+0:27 move second child to first child (temp int)
+0:27 'pvi' (temp int)
+0:27 'gl_PatchVerticesIn' (in int PatchVertices)
+0:28 Sequence
+0:28 move second child to first child (temp int)
+0:28 'pid' (temp int)
+0:28 'gl_PrimitiveID' (in int PrimitiveID)
+0:29 Sequence
+0:29 move second child to first child (temp int)
+0:29 'iid' (temp int)
+0:29 'gl_InvocationID' (in int InvocationID)
+0:31 move second child to first child (temp 4-component vector of float)
+0:31 gl_Position: direct index for structure (out 4-component vector of float Position)
+0:31 indirect index (temp block{out 4-component vector of float Position gl_Position, out float PointSize gl_PointSize, out 2-element array of float ClipDistance gl_ClipDistance})
+0:31 'gl_out' (out 4-element array of block{out 4-component vector of float Position gl_Position, out float PointSize gl_PointSize, out 2-element array of float ClipDistance gl_ClipDistance})
+0:31 'gl_InvocationID' (in int InvocationID)
+0:31 Constant:
+0:31 0 (const int)
+0:31 'p' (temp 4-component vector of float)
+0:32 move second child to first child (temp float)
+0:32 gl_PointSize: direct index for structure (out float PointSize)
+0:32 indirect index (temp block{out 4-component vector of float Position gl_Position, out float PointSize gl_PointSize, out 2-element array of float ClipDistance gl_ClipDistance})
+0:32 'gl_out' (out 4-element array of block{out 4-component vector of float Position gl_Position, out float PointSize gl_PointSize, out 2-element array of float ClipDistance gl_ClipDistance})
+0:32 'gl_InvocationID' (in int InvocationID)
+0:32 Constant:
+0:32 1 (const int)
+0:32 'ps' (temp float)
+0:33 move second child to first child (temp float)
+0:33 direct index (temp float ClipDistance)
+0:33 gl_ClipDistance: direct index for structure (out 2-element array of float ClipDistance)
+0:33 indirect index (temp block{out 4-component vector of float Position gl_Position, out float PointSize gl_PointSize, out 2-element array of float ClipDistance gl_ClipDistance})
+0:33 'gl_out' (out 4-element array of block{out 4-component vector of float Position gl_Position, out float PointSize gl_PointSize, out 2-element array of float ClipDistance gl_ClipDistance})
+0:33 'gl_InvocationID' (in int InvocationID)
+0:33 Constant:
+0:33 2 (const int)
+0:33 Constant:
+0:33 1 (const int)
+0:33 'cd' (temp float)
+0:35 move second child to first child (temp float)
+0:35 direct index (patch temp float TessLevelOuter)
+0:35 'gl_TessLevelOuter' (patch out 4-element array of float TessLevelOuter)
+0:35 Constant:
+0:35 3 (const int)
+0:35 Constant:
+0:35 3.200000
+0:36 move second child to first child (temp float)
+0:36 direct index (patch temp float TessLevelInner)
+0:36 'gl_TessLevelInner' (patch out 2-element array of float TessLevelInner)
+0:36 Constant:
+0:36 1 (const int)
+0:36 Constant:
+0:36 1.300000
+0:38 Test condition and select (temp void)
+0:38 Condition
+0:38 Compare Greater Than (temp bool)
+0:38 'a' (temp int)
+0:38 Constant:
+0:38 10 (const int)
+0:38 true case
+0:39 Barrier (global void)
+0:38 false case
+0:41 Barrier (global void)
+0:43 Barrier (global void)
+0:47 Loop with condition not tested first
+0:47 Loop Condition
+0:47 Compare Greater Than (temp bool)
+0:47 'a' (temp int)
+0:47 Constant:
+0:47 10 (const int)
+0:47 Loop Body
+0:46 Sequence
+0:46 Barrier (global void)
+0:49 switch
+0:49 condition
+0:49 'a' (temp int)
+0:49 body
+0:49 Sequence
+0:50 default:
+0:? Sequence
+0:51 Barrier (global void)
+0:52 Branch: Break
+0:54 Test condition and select (temp int)
+0:54 Condition
+0:54 Compare Less Than (temp bool)
+0:54 'a' (temp int)
+0:54 Constant:
+0:54 12 (const int)
+0:54 true case
+0:54 'a' (temp int)
+0:54 false case
+0:54 Comma (temp int)
+0:54 Barrier (global void)
+0:54 'a' (temp int)
+0:56 Sequence
+0:56 Barrier (global void)
+0:59 Branch: Return
+0:61 Barrier (global void)
+0:67 Function Definition: foo( (global void)
+0:67 Function Parameters:
+0:69 Sequence
+0:69 gl_PointSize: direct index for structure (out float PointSize)
+0:69 direct index (temp block{out 4-component vector of float Position gl_Position, out float PointSize gl_PointSize, out 2-element array of float ClipDistance gl_ClipDistance})
+0:69 'gl_out' (out 4-element array of block{out 4-component vector of float Position gl_Position, out float PointSize gl_PointSize, out 2-element array of float ClipDistance gl_ClipDistance})
+0:69 Constant:
+0:69 4 (const int)
+0:69 Constant:
+0:69 1 (const int)
+0:71 Barrier (global void)
+0:91 Function Definition: foop( (global void)
+0:91 Function Parameters:
+0:? Sequence
+0:95 multiply second child into first child (temp 3-component vector of float)
+0:95 'pv3' (noContraction temp 3-component vector of float)
+0:95 'pv3' (noContraction temp 3-component vector of float)
+0:96 move second child to first child (temp 3-component vector of float)
+0:96 'pv3' (noContraction temp 3-component vector of float)
+0:96 fma (global 3-component vector of float)
+0:96 'pv3' (noContraction temp 3-component vector of float)
+0:96 'pv3' (noContraction temp 3-component vector of float)
+0:96 'pv3' (noContraction temp 3-component vector of float)
+0:97 move second child to first child (temp double)
+0:97 'd' (noContraction temp double)
+0:97 fma (global double)
+0:97 'd' (noContraction temp double)
+0:97 'd' (noContraction temp double)
+0:97 'd' (noContraction temp double)
+0:8 Function Definition: main( (global void)
+0:8 Function Parameters:
+0:15 Function Definition: main( (global void)
+0:15 Function Parameters:
+0:17 Sequence
+0:17 Sequence
+0:17 move second child to first child (temp 4-component vector of float)
+0:17 'p' (temp 4-component vector of float)
+0:17 gl_Position: direct index for structure (in 4-component vector of float Position)
+0:17 direct index (temp block{in 4-component vector of float Position gl_Position, in float PointSize gl_PointSize, in 3-element array of float ClipDistance gl_ClipDistance})
+0:17 'gl_in' (in 32-element array of block{in 4-component vector of float Position gl_Position, in float PointSize gl_PointSize, in 3-element array of float ClipDistance gl_ClipDistance})
+0:17 Constant:
+0:17 1 (const int)
+0:17 Constant:
+0:17 0 (const int)
+0:18 Sequence
+0:18 move second child to first child (temp float)
+0:18 'ps' (temp float)
+0:18 gl_PointSize: direct index for structure (in float PointSize)
+0:18 direct index (temp block{in 4-component vector of float Position gl_Position, in float PointSize gl_PointSize, in 3-element array of float ClipDistance gl_ClipDistance})
+0:18 'gl_in' (in 32-element array of block{in 4-component vector of float Position gl_Position, in float PointSize gl_PointSize, in 3-element array of float ClipDistance gl_ClipDistance})
+0:18 Constant:
+0:18 1 (const int)
+0:18 Constant:
+0:18 1 (const int)
+0:19 Sequence
+0:19 move second child to first child (temp float)
+0:19 'cd' (temp float)
+0:19 direct index (temp float ClipDistance)
+0:19 gl_ClipDistance: direct index for structure (in 3-element array of float ClipDistance)
+0:19 direct index (temp block{in 4-component vector of float Position gl_Position, in float PointSize gl_PointSize, in 3-element array of float ClipDistance gl_ClipDistance})
+0:19 'gl_in' (in 32-element array of block{in 4-component vector of float Position gl_Position, in float PointSize gl_PointSize, in 3-element array of float ClipDistance gl_ClipDistance})
+0:19 Constant:
+0:19 1 (const int)
+0:19 Constant:
+0:19 2 (const int)
+0:19 Constant:
+0:19 2 (const int)
+0:21 Sequence
+0:21 move second child to first child (temp int)
+0:21 'pvi' (temp int)
+0:21 'gl_PatchVerticesIn' (in int PatchVertices)
+0:22 Sequence
+0:22 move second child to first child (temp int)
+0:22 'pid' (temp int)
+0:22 'gl_PrimitiveID' (in int PrimitiveID)
+0:23 Sequence
+0:23 move second child to first child (temp int)
+0:23 'iid' (temp int)
+0:23 'gl_InvocationID' (in int InvocationID)
+0:25 move second child to first child (temp 4-component vector of float)
+0:25 gl_Position: direct index for structure (out 4-component vector of float Position)
+0:25 indirect index (temp block{out 4-component vector of float Position gl_Position})
+0:25 'gl_out' (out 3-element array of block{out 4-component vector of float Position gl_Position})
+0:25 'gl_InvocationID' (in int InvocationID)
+0:25 Constant:
+0:25 0 (const int)
+0:25 'p' (temp 4-component vector of float)
+0:26 indirect index (temp block{out 4-component vector of float Position gl_Position})
+0:26 'gl_out' (out 3-element array of block{out 4-component vector of float Position gl_Position})
+0:26 'gl_InvocationID' (in int InvocationID)
+0:34 Function Definition: foo( (global void)
+0:34 Function Parameters:
+0:36 Sequence
+0:36 Test condition and select (temp void)
+0:36 Condition
+0:36 logical-or (temp bool)
+0:36 Compare Not Equal (temp bool)
+0:36 Constant:
+0:36 -0.625000
+0:36 -0.500000
+0:36 -0.375000
+0:36 -0.250000
+0:36 -0.375000
+0:36 -0.250000
+0:36 -0.125000
+0:36 0.000000
+0:36 direct index (layout(location=0 ) temp 2X4 matrix of double)
+0:36 'vs_tcs_first' (layout(location=0 ) in 32-element array of 2X4 matrix of double)
+0:36 Constant:
+0:36 0 (const int)
+0:37 Compare Not Equal (temp bool)
+0:37 Constant:
+0:37 0.375000
+0:37 0.500000
+0:37 0.625000
+0:37 0.750000
+0:37 0.625000
+0:37 0.750000
+0:37 0.875000
+0:37 -0.625000
+0:37 direct index (layout(location=12 ) temp 2X4 matrix of double)
+0:37 'vs_tcs_last' (layout(location=12 ) in 32-element array of 2X4 matrix of double)
+0:37 Constant:
+0:37 0 (const int)
+0:36 true case is null
+0:? Linker Objects
+0:? 'gl_out' (out 4-element array of block{out 4-component vector of float Position gl_Position, out float PointSize gl_PointSize, out 2-element array of float ClipDistance gl_ClipDistance})
+0:? 'outa' (global 4-element array of int)
+0:? 'patchOut' (patch out 4-component vector of float)
+0:? 'patchIn' (patch in 4-component vector of float)
+0:? 'ina' (in 2-component vector of float)
+0:? 'inb' (in 32-element array of 2-component vector of float)
+0:? 'inc' (in 32-element array of 2-component vector of float)
+0:? 'ind' (in 32-element array of 2-component vector of float)
+0:? 'ivla' (layout(location=3 ) in 32-element array of 4-component vector of float)
+0:? 'ivlb' (layout(location=4 ) in 32-element array of 4-component vector of float)
+0:? 'ivlc' (layout(location=4 ) in 32-element array of 4-component vector of float)
+0:? 'ovla' (layout(location=3 ) out 4-element array of 4-component vector of float)
+0:? 'ovlb' (layout(location=4 ) out 4-element array of 4-component vector of float)
+0:? 'ovlc' (layout(location=4 ) out 4-element array of 4-component vector of float)
+0:? 'pv3' (noContraction temp 3-component vector of float)
+0:? 'pinbi' (patch out block{out int a})
+0:? 'badOrder' (invariant noContraction out 4-element array of 4-component vector of float)
+0:? 'a' (out 3-element array of int)
+0:? 'outb' (out 5-element array of int)
+0:? 'outc' (out 4-element array of int)
+0:? 'outf' (out float)
+0:? 'vs_tcs_first' (layout(location=0 ) in 32-element array of 2X4 matrix of double)
+0:? 'vs_tcs_last' (layout(location=12 ) in 32-element array of 2X4 matrix of double)
+Shader version: 420
+Requested GL_ARB_separate_shader_objects
+Requested GL_ARB_tessellation_shader
+input primitive = quads
+vertex spacing = fractional_odd_spacing
+triangle order = cw
+using point mode
+ERROR: node is still EOpNull!
+0:10 Function Definition: main( (global void)
+0:10 Function Parameters:
+0:12 Sequence
+0:12 Constant:
+0:12 0.000000
+0:14 Sequence
+0:14 move second child to first child (temp int)
+0:14 'a' (temp int)
+0:14 Constant:
+0:14 1512 (const int)
+0:22 Sequence
+0:22 move second child to first child (temp 4-component vector of float)
+0:22 'p' (temp 4-component vector of float)
+0:22 gl_Position: direct index for structure (in 4-component vector of float Position)
+0:22 direct index (temp block{in 4-component vector of float Position gl_Position, in float PointSize gl_PointSize, in 3-element array of float ClipDistance gl_ClipDistance})
+0:22 'gl_in' (in 32-element array of block{in 4-component vector of float Position gl_Position, in float PointSize gl_PointSize, in 3-element array of float ClipDistance gl_ClipDistance})
+0:22 Constant:
+0:22 1 (const int)
+0:22 Constant:
+0:22 0 (const int)
+0:23 Sequence
+0:23 move second child to first child (temp float)
+0:23 'ps' (temp float)
+0:23 gl_PointSize: direct index for structure (in float PointSize)
+0:23 direct index (temp block{in 4-component vector of float Position gl_Position, in float PointSize gl_PointSize, in 3-element array of float ClipDistance gl_ClipDistance})
+0:23 'gl_in' (in 32-element array of block{in 4-component vector of float Position gl_Position, in float PointSize gl_PointSize, in 3-element array of float ClipDistance gl_ClipDistance})
+0:23 Constant:
+0:23 1 (const int)
+0:23 Constant:
+0:23 1 (const int)
+0:24 Sequence
+0:24 move second child to first child (temp float)
+0:24 'cd' (temp float)
+0:24 direct index (temp float ClipDistance)
+0:24 gl_ClipDistance: direct index for structure (in 3-element array of float ClipDistance)
+0:24 direct index (temp block{in 4-component vector of float Position gl_Position, in float PointSize gl_PointSize, in 3-element array of float ClipDistance gl_ClipDistance})
+0:24 'gl_in' (in 32-element array of block{in 4-component vector of float Position gl_Position, in float PointSize gl_PointSize, in 3-element array of float ClipDistance gl_ClipDistance})
+0:24 Constant:
+0:24 1 (const int)
+0:24 Constant:
+0:24 2 (const int)
+0:24 Constant:
+0:24 2 (const int)
+0:26 Sequence
+0:26 move second child to first child (temp int)
+0:26 'pvi' (temp int)
+0:26 'gl_PatchVerticesIn' (in int PatchVertices)
+0:27 Sequence
+0:27 move second child to first child (temp int)
+0:27 'pid' (temp int)
+0:27 'gl_PrimitiveID' (in int PrimitiveID)
+0:28 Sequence
+0:28 move second child to first child (temp 3-component vector of float)
+0:28 'tc' (temp 3-component vector of float)
+0:28 'gl_TessCoord' (in 3-component vector of float TessCoord)
+0:29 Sequence
+0:29 move second child to first child (temp float)
+0:29 'tlo' (temp float)
+0:29 direct index (patch temp float TessLevelOuter)
+0:29 'gl_TessLevelOuter' (patch in 4-element array of float TessLevelOuter)
+0:29 Constant:
+0:29 3 (const int)
+0:30 Sequence
+0:30 move second child to first child (temp float)
+0:30 'tli' (temp float)
+0:30 direct index (patch temp float TessLevelInner)
+0:30 'gl_TessLevelInner' (patch in 2-element array of float TessLevelInner)
+0:30 Constant:
+0:30 1 (const int)
+0:32 move second child to first child (temp 4-component vector of float)
+0:32 gl_Position: direct index for structure (gl_Position 4-component vector of float Position)
+0:32 'anon@0' (out block{gl_Position 4-component vector of float Position gl_Position, gl_PointSize float PointSize gl_PointSize, out 3-element array of float ClipDistance gl_ClipDistance})
+0:32 Constant:
+0:32 0 (const uint)
+0:32 'p' (temp 4-component vector of float)
+0:33 move second child to first child (temp float)
+0:33 gl_PointSize: direct index for structure (gl_PointSize float PointSize)
+0:33 'anon@0' (out block{gl_Position 4-component vector of float Position gl_Position, gl_PointSize float PointSize gl_PointSize, out 3-element array of float ClipDistance gl_ClipDistance})
+0:33 Constant:
+0:33 1 (const uint)
+0:33 'ps' (temp float)
+0:34 move second child to first child (temp float)
+0:34 direct index (temp float ClipDistance)
+0:34 gl_ClipDistance: direct index for structure (out 3-element array of float ClipDistance)
+0:34 'anon@0' (out block{gl_Position 4-component vector of float Position gl_Position, gl_PointSize float PointSize gl_PointSize, out 3-element array of float ClipDistance gl_ClipDistance})
+0:34 Constant:
+0:34 2 (const uint)
+0:34 Constant:
+0:34 2 (const int)
+0:34 'cd' (temp float)
+0:20 Function Definition: main( (global void)
+0:20 Function Parameters:
+0:22 Sequence
+0:22 Constant:
+0:22 0.000000
+0:24 Sequence
+0:24 move second child to first child (temp int)
+0:24 'a' (temp int)
+0:24 Constant:
+0:24 1512 (const int)
+0:32 Sequence
+0:32 move second child to first child (temp 4-component vector of float)
+0:32 'p' (temp 4-component vector of float)
+0:32 gl_Position: direct index for structure (in 4-component vector of float Position)
+0:32 direct index (temp block{in 4-component vector of float Position gl_Position, in float PointSize gl_PointSize, in 3-element array of float ClipDistance gl_ClipDistance})
+0:32 'gl_in' (in 32-element array of block{in 4-component vector of float Position gl_Position, in float PointSize gl_PointSize, in 3-element array of float ClipDistance gl_ClipDistance})
+0:32 Constant:
+0:32 1 (const int)
+0:32 Constant:
+0:32 0 (const int)
+0:33 Sequence
+0:33 move second child to first child (temp float)
+0:33 'ps' (temp float)
+0:33 gl_PointSize: direct index for structure (in float PointSize)
+0:33 direct index (temp block{in 4-component vector of float Position gl_Position, in float PointSize gl_PointSize, in 3-element array of float ClipDistance gl_ClipDistance})
+0:33 'gl_in' (in 32-element array of block{in 4-component vector of float Position gl_Position, in float PointSize gl_PointSize, in 3-element array of float ClipDistance gl_ClipDistance})
+0:33 Constant:
+0:33 1 (const int)
+0:33 Constant:
+0:33 1 (const int)
+0:34 Sequence
+0:34 move second child to first child (temp float)
+0:34 'cd' (temp float)
+0:34 direct index (temp float ClipDistance)
+0:34 gl_ClipDistance: direct index for structure (in 3-element array of float ClipDistance)
+0:34 direct index (temp block{in 4-component vector of float Position gl_Position, in float PointSize gl_PointSize, in 3-element array of float ClipDistance gl_ClipDistance})
+0:34 'gl_in' (in 32-element array of block{in 4-component vector of float Position gl_Position, in float PointSize gl_PointSize, in 3-element array of float ClipDistance gl_ClipDistance})
+0:34 Constant:
+0:34 1 (const int)
+0:34 Constant:
+0:34 2 (const int)
+0:34 Constant:
+0:34 2 (const int)
+0:36 Sequence
+0:36 move second child to first child (temp int)
+0:36 'pvi' (temp int)
+0:36 'gl_PatchVerticesIn' (in int PatchVertices)
+0:37 Sequence
+0:37 move second child to first child (temp int)
+0:37 'pid' (temp int)
+0:37 'gl_PrimitiveID' (in int PrimitiveID)
+0:38 Sequence
+0:38 move second child to first child (temp 3-component vector of float)
+0:38 'tc' (temp 3-component vector of float)
+0:38 'gl_TessCoord' (in 3-component vector of float TessCoord)
+0:39 Sequence
+0:39 move second child to first child (temp float)
+0:39 'tlo' (temp float)
+0:39 direct index (patch temp float TessLevelOuter)
+0:39 'gl_TessLevelOuter' (patch in 4-element array of float TessLevelOuter)
+0:39 Constant:
+0:39 3 (const int)
+0:40 Sequence
+0:40 move second child to first child (temp float)
+0:40 'tli' (temp float)
+0:40 direct index (patch temp float TessLevelInner)
+0:40 'gl_TessLevelInner' (patch in 2-element array of float TessLevelInner)
+0:40 Constant:
+0:40 1 (const int)
+0:42 move second child to first child (temp 4-component vector of float)
+0:42 gl_Position: direct index for structure (gl_Position 4-component vector of float Position)
+0:42 'anon@0' (out block{gl_Position 4-component vector of float Position gl_Position, gl_PointSize float PointSize gl_PointSize, out 3-element array of float ClipDistance gl_ClipDistance})
+0:42 Constant:
+0:42 0 (const uint)
+0:42 'p' (temp 4-component vector of float)
+0:43 move second child to first child (temp float)
+0:43 gl_PointSize: direct index for structure (gl_PointSize float PointSize)
+0:43 'anon@0' (out block{gl_Position 4-component vector of float Position gl_Position, gl_PointSize float PointSize gl_PointSize, out 3-element array of float ClipDistance gl_ClipDistance})
+0:43 Constant:
+0:43 1 (const uint)
+0:43 'ps' (temp float)
+0:44 move second child to first child (temp float)
+0:44 direct index (temp float ClipDistance)
+0:44 gl_ClipDistance: direct index for structure (out 3-element array of float ClipDistance)
+0:44 'anon@0' (out block{gl_Position 4-component vector of float Position gl_Position, gl_PointSize float PointSize gl_PointSize, out 3-element array of float ClipDistance gl_ClipDistance})
+0:44 Constant:
+0:44 2 (const uint)
+0:44 Constant:
+0:44 2 (const int)
+0:44 'cd' (temp float)
+0:4 Sequence
+0:4 move second child to first child (temp 2X2 matrix of float)
+0:4 'b' (global 2X2 matrix of float)
+0:4 Constant:
+0:4 1.000000
+0:4 0.000000
+0:4 0.000000
+0:4 1.000000
+0:15 Sequence
+0:15 move second child to first child (temp structure{global float a, global int b})
+0:15 'e' (global structure{global float a, global int b})
+0:15 Constant:
+0:15 1.200000
+0:15 2 (const int)
+0:20 Sequence
+0:20 move second child to first child (temp structure{global float a, global int b})
+0:20 'e2' (global structure{global float a, global int b})
+0:20 Constant:
+0:20 1.000000
+0:20 3 (const int)
+0:42 Sequence
+0:42 move second child to first child (temp 5-element array of float)
+0:42 'b5' (global 5-element array of float)
+0:42 Constant:
+0:42 3.400000
+0:42 4.200000
+0:42 5.000000
+0:42 5.200000
+0:42 1.100000
+0:67 Sequence
+0:67 move second child to first child (temp 3-component vector of float)
+0:67 'av3' (global 3-component vector of float)
+0:67 Construct vec3 (global 3-component vector of float)
+0:67 'vc1' (global float)
+0:67 'vc2' (global float)
+0:67 'vc3' (global float)
+0:68 Sequence
+0:68 move second child to first child (temp 3-component vector of float)
+0:68 'bv3' (global 3-component vector of float)
+0:68 Construct vec3 (temp 3-component vector of float)
+0:68 'vc1' (global float)
+0:68 'vc2' (global float)
+0:68 'vc3' (global float)
+0:70 Function Definition: main( (global void)
+0:70 Function Parameters:
+0:72 Sequence
+0:72 MemoryBarrier (global void)
+0:74 Test condition and select (temp void)
+0:74 Condition
+0:74 Compare Equal (temp bool)
+0:74 Constant:
+0:74 1 (const uint)
+0:74 2 (const uint)
+0:74 3.000000
+0:74 4.000000
+0:74 0.000000
+0:74 0.000000
+0:74 0.000000
+0:74 4.000000
+0:74 0.000000
+0:74 5.000000
+0:74 6.000000
+0:74 0.000000
+0:74 0.000000
+0:74 0.000000
+0:74 6.000000
+0:74 0.000000
+0:74 'curlybad1' (temp structure{global 2-component vector of uint uv2, global 2-element array of structure{global float f, global 2X3 matrix of float m23} s})
+0:74 true case is null
+0:76 Test condition and select (temp void)
+0:76 Condition
+0:76 Constant:
+0:76 true (const bool)
+0:76 true case is null
+0:? Linker Objects
+0:? 'patchIn' (patch in 4-component vector of float)
+0:? 'anon@0' (out block{gl_Position 4-component vector of float Position gl_Position, gl_PointSize float PointSize gl_PointSize, out 3-element array of float ClipDistance gl_ClipDistance})
+0:? 'patchOut' (patch out 4-component vector of float)
+0:? 'badp1' (smooth patch in 4-component vector of float)
+0:? 'badp2' (flat patch in 4-component vector of float)
+0:? 'badp3' (noperspective patch in 4-component vector of float)
+0:? 'badp4' (patch sample in 3-component vector of float)
+0:? 'gl_in' (in 32-element array of block{in 1-element array of float ClipDistance gl_ClipDistance})
+0:? 'ina' (in 2-component vector of float)
+0:? 'inb' (in 32-element array of 2-component vector of float)
+0:? 'inc' (in 32-element array of 2-component vector of float)
+0:? 'ind' (in 32-element array of 2-component vector of float)
+0:? 'bla' (in block{in int f})
+0:? 'blb' (in 32-element array of block{in int f})
+0:? 'blc' (in 32-element array of block{in int f})
+0:? 'bld' (in 32-element array of block{in int f})
+0:? 'ivla' (layout(location=23 ) in 32-element array of 4-component vector of float)
+0:? 'ivlb' (layout(location=24 ) in 32-element array of 4-component vector of float)
+0:? 'ivlc' (layout(location=24 ) in 32-element array of 4-component vector of float)
+0:? 'ovla' (layout(location=23 ) out 2-element array of 4-component vector of float)
+0:? 'ovlb' (layout(location=24 ) out 2-element array of 4-component vector of float)
+0:? 'pinbi' (patch in block{in int a})
+0:? 'a' (const 2X2 matrix of float)
+0:? 1.000000
+0:? 0.000000
+0:? 0.000000
+0:? 1.000000
+0:? 'b' (global 2X2 matrix of float)
+0:? 'c' (const 2X2 matrix of float)
+0:? 1.000000
+0:? 0.000000
+0:? 0.000000
+0:? 1.000000
+0:? 'a2' (global 2-element array of float)
+0:? 'b2' (global 2-component vector of float)
+0:? 'c2' (global 3X3 matrix of float)
+0:? 'd' (global 2X2 matrix of float)
+0:? 'e' (global structure{global float a, global int b})
+0:? 'e2' (global structure{global float a, global int b})
+0:? 'e3' (global structure{global float a, global int b})
+0:? 'a3' (global int)
+0:? 'b3' (global 2-element array of 4-component vector of float)
+0:? 'b4' (global 2-element array of 4-component vector of float)
+0:? 'c3' (global 4X2 matrix of float)
+0:? 'd2' (global 1-element array of structure{global float s, global float t})
+0:? 'b5' (global 5-element array of float)
+0:? 'constructed' (const structure{global 2-component vector of uint uv2, global 2-element array of structure{global float f, global 2X3 matrix of float m23} s})
+0:? 1 (const uint)
+0:? 2 (const uint)
+0:? 3.000000
+0:? 4.000000
+0:? 0.000000
+0:? 0.000000
+0:? 0.000000
+0:? 4.000000
+0:? 0.000000
+0:? 5.000000
+0:? 6.000000
+0:? 0.000000
+0:? 0.000000
+0:? 0.000000
+0:? 6.000000
+0:? 0.000000
+0:? 'curlybad1' (temp structure{global 2-component vector of uint uv2, global 2-element array of structure{global float f, global 2X3 matrix of float m23} s})
+0:? 'curlyInit' (const structure{global 2-component vector of uint uv2, global 2-element array of structure{global float f, global 2X3 matrix of float m23} s})
+0:? 1 (const uint)
+0:? 2 (const uint)
+0:? 3.000000
+0:? 4.000000
+0:? 0.000000
+0:? 0.000000
+0:? 0.000000
+0:? 4.000000
+0:? 0.000000
+0:? 5.000000
+0:? 6.000000
+0:? 0.000000
+0:? 0.000000
+0:? 0.000000
+0:? 6.000000
+0:? 0.000000
+0:? 'vc1' (global float)
+0:? 'vc2' (global float)
+0:? 'vc3' (global float)
+0:? 'av3' (global 3-component vector of float)
+0:? 'bv3' (global 3-component vector of float)
+
diff --git a/chromium/third_party/glslang/src/Test/baseResults/150.vert.out b/chromium/third_party/glslang/src/Test/baseResults/150.vert.out
new file mode 100644
index 00000000000..a82e7896fec
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/150.vert.out
@@ -0,0 +1,95 @@
+150.vert
+ERROR: 0:22: 'a' : cannot redeclare a user-block member array
+ERROR: 0:3001: '#error' : line of this error should be 3001
+ERROR: 2 compilation errors. No code generated.
+
+
+Shader version: 150
+ERROR: node is still EOpNull!
+0:9 Function Definition: main( (global void)
+0:9 Function Parameters:
+0:11 Sequence
+0:11 move second child to first child (temp 4-component vector of float)
+0:11 gl_Position: direct index for structure (invariant gl_Position 4-component vector of float Position)
+0:11 'anon@0' (out block{invariant gl_Position 4-component vector of float Position gl_Position, gl_PointSize float PointSize gl_PointSize, out 4-element array of float ClipDistance gl_ClipDistance, gl_ClipVertex 4-component vector of float ClipVertex gl_ClipVertex, out 4-component vector of float FrontColor gl_FrontColor, out 4-component vector of float BackColor gl_BackColor, out 4-component vector of float FrontSecondaryColor gl_FrontSecondaryColor, out 4-component vector of float BackSecondaryColor gl_BackSecondaryColor, out implicitly-sized array of 4-component vector of float TexCoord gl_TexCoord, out float FogFragCoord gl_FogFragCoord})
+0:11 Constant:
+0:11 0 (const uint)
+0:11 'iv4' (in 4-component vector of float)
+0:12 move second child to first child (temp float)
+0:12 gl_PointSize: direct index for structure (gl_PointSize float PointSize)
+0:12 'anon@0' (out block{invariant gl_Position 4-component vector of float Position gl_Position, gl_PointSize float PointSize gl_PointSize, out 4-element array of float ClipDistance gl_ClipDistance, gl_ClipVertex 4-component vector of float ClipVertex gl_ClipVertex, out 4-component vector of float FrontColor gl_FrontColor, out 4-component vector of float BackColor gl_BackColor, out 4-component vector of float FrontSecondaryColor gl_FrontSecondaryColor, out 4-component vector of float BackSecondaryColor gl_BackSecondaryColor, out implicitly-sized array of 4-component vector of float TexCoord gl_TexCoord, out float FogFragCoord gl_FogFragCoord})
+0:12 Constant:
+0:12 1 (const uint)
+0:12 'ps' (uniform float)
+0:13 move second child to first child (temp float)
+0:13 direct index (temp float ClipDistance)
+0:13 gl_ClipDistance: direct index for structure (out 4-element array of float ClipDistance)
+0:13 'anon@0' (out block{invariant gl_Position 4-component vector of float Position gl_Position, gl_PointSize float PointSize gl_PointSize, out 4-element array of float ClipDistance gl_ClipDistance, gl_ClipVertex 4-component vector of float ClipVertex gl_ClipVertex, out 4-component vector of float FrontColor gl_FrontColor, out 4-component vector of float BackColor gl_BackColor, out 4-component vector of float FrontSecondaryColor gl_FrontSecondaryColor, out 4-component vector of float BackSecondaryColor gl_BackSecondaryColor, out implicitly-sized array of 4-component vector of float TexCoord gl_TexCoord, out float FogFragCoord gl_FogFragCoord})
+0:13 Constant:
+0:13 2 (const uint)
+0:13 Constant:
+0:13 2 (const int)
+0:13 direct index (temp float)
+0:13 'iv4' (in 4-component vector of float)
+0:13 Constant:
+0:13 0 (const int)
+0:14 move second child to first child (temp 4-component vector of float)
+0:14 gl_ClipVertex: direct index for structure (gl_ClipVertex 4-component vector of float ClipVertex)
+0:14 'anon@0' (out block{invariant gl_Position 4-component vector of float Position gl_Position, gl_PointSize float PointSize gl_PointSize, out 4-element array of float ClipDistance gl_ClipDistance, gl_ClipVertex 4-component vector of float ClipVertex gl_ClipVertex, out 4-component vector of float FrontColor gl_FrontColor, out 4-component vector of float BackColor gl_BackColor, out 4-component vector of float FrontSecondaryColor gl_FrontSecondaryColor, out 4-component vector of float BackSecondaryColor gl_BackSecondaryColor, out implicitly-sized array of 4-component vector of float TexCoord gl_TexCoord, out float FogFragCoord gl_FogFragCoord})
+0:14 Constant:
+0:14 3 (const uint)
+0:14 'iv4' (in 4-component vector of float)
+0:? Linker Objects
+0:? 'iv4' (in 4-component vector of float)
+0:? 'ps' (uniform float)
+0:? 'anon@1' (layout(column_major shared ) uniform block{layout(column_major shared ) uniform implicitly-sized array of int a})
+0:? 'gl_VertexID' (gl_VertexId int VertexId)
+0:? 'gl_InstanceID' (gl_InstanceId int InstanceId)
+
+
+Linked vertex stage:
+
+ERROR: Linking vertex stage: Can only use one of gl_ClipDistance or gl_ClipVertex (gl_ClipDistance is preferred)
+
+Shader version: 150
+ERROR: node is still EOpNull!
+0:9 Function Definition: main( (global void)
+0:9 Function Parameters:
+0:11 Sequence
+0:11 move second child to first child (temp 4-component vector of float)
+0:11 gl_Position: direct index for structure (invariant gl_Position 4-component vector of float Position)
+0:11 'anon@0' (out block{invariant gl_Position 4-component vector of float Position gl_Position, gl_PointSize float PointSize gl_PointSize, out 4-element array of float ClipDistance gl_ClipDistance, gl_ClipVertex 4-component vector of float ClipVertex gl_ClipVertex, out 4-component vector of float FrontColor gl_FrontColor, out 4-component vector of float BackColor gl_BackColor, out 4-component vector of float FrontSecondaryColor gl_FrontSecondaryColor, out 4-component vector of float BackSecondaryColor gl_BackSecondaryColor, out 1-element array of 4-component vector of float TexCoord gl_TexCoord, out float FogFragCoord gl_FogFragCoord})
+0:11 Constant:
+0:11 0 (const uint)
+0:11 'iv4' (in 4-component vector of float)
+0:12 move second child to first child (temp float)
+0:12 gl_PointSize: direct index for structure (gl_PointSize float PointSize)
+0:12 'anon@0' (out block{invariant gl_Position 4-component vector of float Position gl_Position, gl_PointSize float PointSize gl_PointSize, out 4-element array of float ClipDistance gl_ClipDistance, gl_ClipVertex 4-component vector of float ClipVertex gl_ClipVertex, out 4-component vector of float FrontColor gl_FrontColor, out 4-component vector of float BackColor gl_BackColor, out 4-component vector of float FrontSecondaryColor gl_FrontSecondaryColor, out 4-component vector of float BackSecondaryColor gl_BackSecondaryColor, out 1-element array of 4-component vector of float TexCoord gl_TexCoord, out float FogFragCoord gl_FogFragCoord})
+0:12 Constant:
+0:12 1 (const uint)
+0:12 'ps' (uniform float)
+0:13 move second child to first child (temp float)
+0:13 direct index (temp float ClipDistance)
+0:13 gl_ClipDistance: direct index for structure (out 4-element array of float ClipDistance)
+0:13 'anon@0' (out block{invariant gl_Position 4-component vector of float Position gl_Position, gl_PointSize float PointSize gl_PointSize, out 4-element array of float ClipDistance gl_ClipDistance, gl_ClipVertex 4-component vector of float ClipVertex gl_ClipVertex, out 4-component vector of float FrontColor gl_FrontColor, out 4-component vector of float BackColor gl_BackColor, out 4-component vector of float FrontSecondaryColor gl_FrontSecondaryColor, out 4-component vector of float BackSecondaryColor gl_BackSecondaryColor, out 1-element array of 4-component vector of float TexCoord gl_TexCoord, out float FogFragCoord gl_FogFragCoord})
+0:13 Constant:
+0:13 2 (const uint)
+0:13 Constant:
+0:13 2 (const int)
+0:13 direct index (temp float)
+0:13 'iv4' (in 4-component vector of float)
+0:13 Constant:
+0:13 0 (const int)
+0:14 move second child to first child (temp 4-component vector of float)
+0:14 gl_ClipVertex: direct index for structure (gl_ClipVertex 4-component vector of float ClipVertex)
+0:14 'anon@0' (out block{invariant gl_Position 4-component vector of float Position gl_Position, gl_PointSize float PointSize gl_PointSize, out 4-element array of float ClipDistance gl_ClipDistance, gl_ClipVertex 4-component vector of float ClipVertex gl_ClipVertex, out 4-component vector of float FrontColor gl_FrontColor, out 4-component vector of float BackColor gl_BackColor, out 4-component vector of float FrontSecondaryColor gl_FrontSecondaryColor, out 4-component vector of float BackSecondaryColor gl_BackSecondaryColor, out 1-element array of 4-component vector of float TexCoord gl_TexCoord, out float FogFragCoord gl_FogFragCoord})
+0:14 Constant:
+0:14 3 (const uint)
+0:14 'iv4' (in 4-component vector of float)
+0:? Linker Objects
+0:? 'iv4' (in 4-component vector of float)
+0:? 'ps' (uniform float)
+0:? 'anon@1' (layout(column_major shared ) uniform block{layout(column_major shared ) uniform 1-element array of int a})
+0:? 'gl_VertexID' (gl_VertexId int VertexId)
+0:? 'gl_InstanceID' (gl_InstanceId int InstanceId)
+
diff --git a/chromium/third_party/glslang/src/Test/baseResults/300.frag.out b/chromium/third_party/glslang/src/Test/baseResults/300.frag.out
new file mode 100644
index 00000000000..a0c2615de20
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/300.frag.out
@@ -0,0 +1,756 @@
+300.frag
+ERROR: 0:2: 'float' : type requires declaration of default precision qualifier
+ERROR: 0:30: 'noperspective' : Reserved word.
+ERROR: 0:30: 'noperspective' : not supported with this profile: es
+ERROR: 0:31: 'sampler2D' : sampler/image types can only be used in uniform variables or function parameters: bads
+ERROR: 0:32: 'uint' : cannot apply precision statement to this type; use 'float', 'int' or a sampler type
+ERROR: 0:39: 'structure' : must be qualified as flat in
+ERROR: 0:39: 'structure' : non-uniform struct contains a sampler or image: badout
+ERROR: 0:60: 'texel offset' : argument must be compile-time constant
+ERROR: 0:62: 'texel offset' : argument must be compile-time constant
+ERROR: 0:63: 'texel offset' : argument must be compile-time constant
+ERROR: 0:64: 'texel offset' : argument must be compile-time constant
+ERROR: 0:66: 'texel offset' : argument must be compile-time constant
+ERROR: 0:68: 'texel offset' : argument must be compile-time constant
+ERROR: 0:69: 'variable indexing sampler array' : not supported for this version or the enabled extensions
+ERROR: 0:73: 'texel offset' : argument must be compile-time constant
+ERROR: 0:83: 'double' : Reserved word.
+ERROR: 0:83: 'double' : not supported with this profile: es
+ERROR: 0:84: 'dvec2' : Reserved word.
+ERROR: 0:84: 'double vector' : not supported with this profile: es
+ERROR: 0:85: 'dvec3' : Reserved word.
+ERROR: 0:85: 'double vector' : not supported with this profile: es
+ERROR: 0:86: 'dvec4' : Reserved word.
+ERROR: 0:86: 'double vector' : not supported with this profile: es
+ERROR: 0:101: 'arrays of arrays' : not supported for this version or the enabled extensions
+ERROR: 0:102: 'arrays of arrays' : not supported for this version or the enabled extensions
+ERROR: 0:102: 'arrays of arrays' : not supported for this version or the enabled extensions
+ERROR: 0:103: 'arrays of arrays' : not supported for this version or the enabled extensions
+ERROR: 0:100: 'arrays of arrays' : not supported for this version or the enabled extensions
+ERROR: 0:100: 'array-of-array of block' : not supported with this profile: es
+ERROR: 0:111: 'variable indexing fragment shader ouput array' : not supported with this profile: es
+ERROR: 0:119: '==' : can't use with samplers or structs containing samplers
+ERROR: 0:120: '!=' : can't use with samplers or structs containing samplers
+ERROR: 0:121: '==' : can't use with samplers or structs containing samplers
+ERROR: 0:121: '==' : wrong operand types: no operation '==' exists that takes a left-hand operand of type 'global lowp sampler2D' and a right operand of type 'global lowp sampler2D' (or there is no acceptable conversion)
+ERROR: 0:122: '=' : can't use with samplers or structs containing samplers
+ERROR: 0:123: '==' : can't use with samplers or structs containing samplers
+ERROR: 0:129: 'texel offset' : value is out of range: [gl_MinProgramTexelOffset, gl_MaxProgramTexelOffset]
+ERROR: 0:129: 'texel offset' : value is out of range: [gl_MinProgramTexelOffset, gl_MaxProgramTexelOffset]
+ERROR: 0:148: 'qualifier' : cannot use auxiliary, memory, interpolation, or precision qualifier in a default qualifier declaration (declaration with no type)
+ERROR: 0:150: 'early_fragment_tests' : not supported for this version or the enabled extensions
+ERROR: 0:156: 'invariant' : can only apply to an output
+ERROR: 0:157: 'invariant' : can only apply to an output
+ERROR: 0:158: 'invariant' : can only apply to an output
+ERROR: 0:160: 'imageBuffer' : Reserved word.
+ERROR: 0:160: '' : syntax error
+ERROR: 45 compilation errors. No code generated.
+
+
+Shader version: 300
+using early_fragment_tests
+ERROR: node is still EOpNull!
+0:53 Function Definition: main( (global void)
+0:53 Function Parameters:
+0:? Sequence
+0:57 move second child to first child (temp lowp 4-component vector of float)
+0:57 'v' (temp lowp 4-component vector of float)
+0:57 texture (global lowp 4-component vector of float)
+0:57 's2D' (uniform lowp sampler2D)
+0:57 'c2D' (smooth in lowp 2-component vector of float)
+0:58 move second child to first child (temp lowp 4-component vector of float)
+0:58 'v' (temp lowp 4-component vector of float)
+0:58 textureProj (global lowp 4-component vector of float)
+0:58 's3D' (uniform lowp sampler3D)
+0:58 'c4D' (smooth temp lowp 4-component vector of float)
+0:59 move second child to first child (temp lowp 4-component vector of float)
+0:59 'v' (temp lowp 4-component vector of float)
+0:59 textureLod (global lowp 4-component vector of float)
+0:59 's2DArray' (uniform lowp sampler2DArray)
+0:59 'c3D' (smooth in lowp 3-component vector of float)
+0:59 Constant:
+0:59 1.200000
+0:60 move second child to first child (temp lowp float)
+0:60 'f' (temp lowp float)
+0:60 textureOffset (global lowp float)
+0:60 's2DShadow' (uniform lowp sampler2DShadow)
+0:60 'c3D' (smooth in lowp 3-component vector of float)
+0:60 'ic2D' (flat in mediump 2-component vector of int)
+0:60 'c1D' (smooth in lowp float)
+0:61 move second child to first child (temp lowp 4-component vector of float)
+0:61 'v' (temp lowp 4-component vector of float)
+0:61 textureFetch (global lowp 4-component vector of float)
+0:61 's3D' (uniform lowp sampler3D)
+0:61 'ic3D' (flat in mediump 3-component vector of int)
+0:61 'ic1D' (flat in mediump int)
+0:62 move second child to first child (temp lowp 4-component vector of float)
+0:62 'v' (temp lowp 4-component vector of float)
+0:62 textureFetchOffset (global lowp 4-component vector of float)
+0:62 direct index (temp lowp sampler2D)
+0:62 'arrayedSampler' (uniform 5-element array of lowp sampler2D)
+0:62 Constant:
+0:62 2 (const int)
+0:62 'ic2D' (flat in mediump 2-component vector of int)
+0:62 Constant:
+0:62 4 (const int)
+0:62 'ic2D' (flat in mediump 2-component vector of int)
+0:63 move second child to first child (temp lowp float)
+0:63 'f' (temp lowp float)
+0:63 textureLodOffset (global lowp float)
+0:63 's2DShadow' (uniform lowp sampler2DShadow)
+0:63 'c3D' (smooth in lowp 3-component vector of float)
+0:63 'c1D' (smooth in lowp float)
+0:63 'ic2D' (flat in mediump 2-component vector of int)
+0:64 move second child to first child (temp lowp 4-component vector of float)
+0:64 'v' (temp lowp 4-component vector of float)
+0:64 textureProjLodOffset (global lowp 4-component vector of float)
+0:64 's2D' (uniform lowp sampler2D)
+0:64 'c3D' (smooth in lowp 3-component vector of float)
+0:64 'c1D' (smooth in lowp float)
+0:64 'ic2D' (flat in mediump 2-component vector of int)
+0:65 move second child to first child (temp lowp 4-component vector of float)
+0:65 'v' (temp lowp 4-component vector of float)
+0:65 textureGrad (global lowp 4-component vector of float)
+0:65 'sCube' (uniform lowp samplerCube)
+0:65 'c3D' (smooth in lowp 3-component vector of float)
+0:65 'c3D' (smooth in lowp 3-component vector of float)
+0:65 'c3D' (smooth in lowp 3-component vector of float)
+0:66 move second child to first child (temp lowp float)
+0:66 'f' (temp lowp float)
+0:66 textureGradOffset (global lowp float)
+0:66 's2DArrayShadow' (uniform lowp sampler2DArrayShadow)
+0:66 'c4D' (smooth temp lowp 4-component vector of float)
+0:66 'c2D' (smooth in lowp 2-component vector of float)
+0:66 'c2D' (smooth in lowp 2-component vector of float)
+0:66 'ic2D' (flat in mediump 2-component vector of int)
+0:67 move second child to first child (temp lowp 4-component vector of float)
+0:67 'v' (temp lowp 4-component vector of float)
+0:67 textureProjGrad (global lowp 4-component vector of float)
+0:67 's3D' (uniform lowp sampler3D)
+0:67 'c4D' (smooth temp lowp 4-component vector of float)
+0:67 'c3D' (smooth in lowp 3-component vector of float)
+0:67 'c3D' (smooth in lowp 3-component vector of float)
+0:68 move second child to first child (temp lowp 4-component vector of float)
+0:68 'v' (temp lowp 4-component vector of float)
+0:68 textureProjGradOffset (global lowp 4-component vector of float)
+0:68 's2D' (uniform lowp sampler2D)
+0:68 'c3D' (smooth in lowp 3-component vector of float)
+0:68 'c2D' (smooth in lowp 2-component vector of float)
+0:68 'c2D' (smooth in lowp 2-component vector of float)
+0:68 'ic2D' (flat in mediump 2-component vector of int)
+0:69 move second child to first child (temp lowp 4-component vector of float)
+0:69 'v' (temp lowp 4-component vector of float)
+0:69 texture (global lowp 4-component vector of float)
+0:69 indirect index (temp lowp sampler2D)
+0:69 'arrayedSampler' (uniform 5-element array of lowp sampler2D)
+0:69 'ic1D' (flat in mediump int)
+0:69 'c2D' (smooth in lowp 2-component vector of float)
+0:72 move second child to first child (temp mediump 4-component vector of int)
+0:72 'iv' (temp mediump 4-component vector of int)
+0:72 texture (global lowp 4-component vector of int)
+0:72 'is2D' (uniform lowp isampler2D)
+0:72 'c2D' (smooth in lowp 2-component vector of float)
+0:73 move second child to first child (temp mediump 4-component vector of int)
+0:73 'iv' (temp mediump 4-component vector of int)
+0:73 textureProjOffset (global lowp 4-component vector of int)
+0:73 'is2D' (uniform lowp isampler2D)
+0:73 'c4D' (smooth temp lowp 4-component vector of float)
+0:73 'ic2D' (flat in mediump 2-component vector of int)
+0:74 move second child to first child (temp mediump 4-component vector of int)
+0:74 'iv' (temp mediump 4-component vector of int)
+0:74 textureProjLod (global lowp 4-component vector of int)
+0:74 'is2D' (uniform lowp isampler2D)
+0:74 'c3D' (smooth in lowp 3-component vector of float)
+0:74 'c1D' (smooth in lowp float)
+0:75 move second child to first child (temp mediump 4-component vector of int)
+0:75 'iv' (temp mediump 4-component vector of int)
+0:75 textureProjGrad (global lowp 4-component vector of int)
+0:75 'is2D' (uniform lowp isampler2D)
+0:75 'c3D' (smooth in lowp 3-component vector of float)
+0:75 'c2D' (smooth in lowp 2-component vector of float)
+0:75 'c2D' (smooth in lowp 2-component vector of float)
+0:76 move second child to first child (temp mediump 4-component vector of int)
+0:76 'iv' (temp mediump 4-component vector of int)
+0:76 texture (global lowp 4-component vector of int)
+0:76 'is3D' (uniform lowp isampler3D)
+0:76 'c3D' (smooth in lowp 3-component vector of float)
+0:76 Constant:
+0:76 4.200000
+0:77 move second child to first child (temp mediump 4-component vector of int)
+0:77 'iv' (temp mediump 4-component vector of int)
+0:77 textureLod (global lowp 4-component vector of int)
+0:77 'isCube' (uniform lowp isamplerCube)
+0:77 'c3D' (smooth in lowp 3-component vector of float)
+0:77 'c1D' (smooth in lowp float)
+0:78 move second child to first child (temp mediump 4-component vector of int)
+0:78 'iv' (temp mediump 4-component vector of int)
+0:78 textureFetch (global lowp 4-component vector of int)
+0:78 'is2DArray' (uniform lowp isampler2DArray)
+0:78 'ic3D' (flat in mediump 3-component vector of int)
+0:78 'ic1D' (flat in mediump int)
+0:80 move second child to first child (temp highp 2-component vector of int)
+0:80 vector swizzle (temp mediump 2-component vector of int)
+0:80 'iv' (temp mediump 4-component vector of int)
+0:80 Sequence
+0:80 Constant:
+0:80 0 (const int)
+0:80 Constant:
+0:80 1 (const int)
+0:80 textureSize (global highp 2-component vector of int)
+0:80 'sCubeShadow' (uniform lowp samplerCubeShadow)
+0:80 Constant:
+0:80 2 (const int)
+0:88 add second child into first child (temp highp float)
+0:88 'f' (temp lowp float)
+0:88 direct index (temp highp float)
+0:88 'gl_FragCoord' (gl_FragCoord highp 4-component vector of float FragCoord)
+0:88 Constant:
+0:88 1 (const int)
+0:89 move second child to first child (temp highp float)
+0:89 'gl_FragDepth' (gl_FragDepth highp float FragDepth)
+0:89 'f' (temp lowp float)
+0:91 move second child to first child (temp lowp 3-component vector of float)
+0:91 'sc' (out lowp 3-component vector of float)
+0:91 c: direct index for structure (global lowp 3-component vector of float)
+0:91 's2' (smooth in structure{global lowp 3-component vector of float c, global lowp float f})
+0:91 Constant:
+0:91 0 (const int)
+0:92 move second child to first child (temp lowp float)
+0:92 'sf' (out lowp float)
+0:92 f: direct index for structure (global lowp float)
+0:92 's2' (smooth in structure{global lowp 3-component vector of float c, global lowp float f})
+0:92 Constant:
+0:92 1 (const int)
+0:94 add (temp lowp 2-component vector of float)
+0:94 hyp. sine (global lowp float)
+0:94 'c1D' (smooth in lowp float)
+0:95 vector-scale (temp lowp 2-component vector of float)
+0:95 hyp. cosine (global lowp float)
+0:95 'c1D' (smooth in lowp float)
+0:95 hyp. tangent (global lowp 2-component vector of float)
+0:95 'c2D' (smooth in lowp 2-component vector of float)
+0:96 add (temp lowp 4-component vector of float)
+0:96 arc hyp. sine (global lowp 4-component vector of float)
+0:96 'c4D' (smooth temp lowp 4-component vector of float)
+0:96 arc hyp. cosine (global lowp 4-component vector of float)
+0:96 'c4D' (smooth temp lowp 4-component vector of float)
+0:97 arc hyp. tangent (global lowp 3-component vector of float)
+0:97 'c3D' (smooth in lowp 3-component vector of float)
+0:108 Function Definition: foo( (global void)
+0:108 Function Parameters:
+0:110 Sequence
+0:110 move second child to first child (temp lowp 4-component vector of float)
+0:110 direct index (temp lowp 4-component vector of float)
+0:110 'colors' (out 4-element array of lowp 4-component vector of float)
+0:110 Constant:
+0:110 2 (const int)
+0:110 'c4D' (smooth temp lowp 4-component vector of float)
+0:111 move second child to first child (temp lowp 4-component vector of float)
+0:111 indirect index (temp lowp 4-component vector of float)
+0:111 'colors' (out 4-element array of lowp 4-component vector of float)
+0:111 'ic1D' (flat in mediump int)
+0:111 'c4D' (smooth temp lowp 4-component vector of float)
+0:117 Function Definition: foo13(struct-s-i1-s211; (global void)
+0:117 Function Parameters:
+0:117 'inSt2' (in structure{global mediump int i, global lowp sampler2D s})
+0:119 Sequence
+0:119 Test condition and select (temp void)
+0:119 Condition
+0:119 Compare Equal (temp bool)
+0:119 'st1' (uniform structure{global mediump int i, global lowp sampler2D s})
+0:119 'st2' (uniform structure{global mediump int i, global lowp sampler2D s})
+0:119 true case is null
+0:120 Test condition and select (temp void)
+0:120 Condition
+0:120 Compare Not Equal (temp bool)
+0:120 'st1' (uniform structure{global mediump int i, global lowp sampler2D s})
+0:120 'st2' (uniform structure{global mediump int i, global lowp sampler2D s})
+0:120 true case is null
+0:121 Constant:
+0:121 false (const bool)
+0:122 move second child to first child (temp structure{global mediump int i, global lowp sampler2D s})
+0:122 'inSt2' (in structure{global mediump int i, global lowp sampler2D s})
+0:122 'st1' (uniform structure{global mediump int i, global lowp sampler2D s})
+0:123 Compare Equal (temp bool)
+0:123 'inSt2' (in structure{global mediump int i, global lowp sampler2D s})
+0:123 'st1' (uniform structure{global mediump int i, global lowp sampler2D s})
+0:126 Function Definition: foo23( (global void)
+0:126 Function Parameters:
+0:128 Sequence
+0:128 textureOffset (global lowp float)
+0:128 's2DShadow' (uniform lowp sampler2DShadow)
+0:128 'c3D' (smooth in lowp 3-component vector of float)
+0:128 Constant:
+0:128 -8 (const int)
+0:128 7 (const int)
+0:128 'c1D' (smooth in lowp float)
+0:129 textureOffset (global lowp float)
+0:129 's2DShadow' (uniform lowp sampler2DShadow)
+0:129 'c3D' (smooth in lowp 3-component vector of float)
+0:129 Constant:
+0:129 -9 (const int)
+0:129 8 (const int)
+0:129 'c1D' (smooth in lowp float)
+0:132 Function Definition: foo324( (global void)
+0:132 Function Parameters:
+0:134 Sequence
+0:134 Sequence
+0:134 move second child to first child (temp lowp float)
+0:134 'p' (temp lowp float)
+0:134 Constant:
+0:134 210.712306
+0:135 add second child into first child (temp lowp float)
+0:135 'p' (temp lowp float)
+0:135 Constant:
+0:135 0.389418
+0:136 add second child into first child (temp lowp float)
+0:136 'p' (temp lowp float)
+0:136 Constant:
+0:136 5.000000
+0:137 add second child into first child (temp lowp float)
+0:137 'p' (temp lowp float)
+0:137 Constant:
+0:137 13.000000
+0:138 Sequence
+0:138 move second child to first child (temp lowp 3-component vector of float)
+0:138 'c3' (temp lowp 3-component vector of float)
+0:138 Constant:
+0:138 -15.000000
+0:138 -2.000000
+0:138 39.000000
+0:139 add second child into first child (temp lowp 3-component vector of float)
+0:139 'c3' (temp lowp 3-component vector of float)
+0:139 Constant:
+0:139 -1.000000
+0:139 -2.000000
+0:139 -3.000000
+0:140 add second child into first child (temp lowp 3-component vector of float)
+0:140 'c3' (temp lowp 3-component vector of float)
+0:140 Constant:
+0:140 1.000000
+0:140 2.000000
+0:140 3.000000
+0:141 Sequence
+0:141 move second child to first child (temp lowp 2-component vector of float)
+0:141 'c2' (temp lowp 2-component vector of float)
+0:141 Constant:
+0:141 1.000000
+0:141 -3.000000
+0:142 add second child into first child (temp lowp 2-component vector of float)
+0:142 'c2' (temp lowp 2-component vector of float)
+0:142 Constant:
+0:142 1.000000
+0:142 -3.000000
+0:143 add second child into first child (temp lowp 2-component vector of float)
+0:143 'c2' (temp lowp 2-component vector of float)
+0:143 Constant:
+0:143 3.000000
+0:143 -8.544004
+0:144 add second child into first child (temp lowp 2-component vector of float)
+0:144 'c2' (temp lowp 2-component vector of float)
+0:144 Constant:
+0:144 0.000000
+0:144 0.000000
+0:145 Sequence
+0:145 move second child to first child (temp lowp 3X2 matrix of float)
+0:145 'm32' (temp lowp 3X2 matrix of float)
+0:145 Constant:
+0:145 10.000000
+0:145 15.000000
+0:145 14.000000
+0:145 21.000000
+0:145 22.000000
+0:145 33.000000
+0:? Linker Objects
+0:? 's2D' (uniform lowp sampler2D)
+0:? 's3D' (uniform lowp sampler3D)
+0:? 'sCube' (uniform lowp samplerCube)
+0:? 'sCubeShadow' (uniform lowp samplerCubeShadow)
+0:? 's2DShadow' (uniform lowp sampler2DShadow)
+0:? 's2DArray' (uniform lowp sampler2DArray)
+0:? 's2DArrayShadow' (uniform lowp sampler2DArrayShadow)
+0:? 'is2D' (uniform lowp isampler2D)
+0:? 'is3D' (uniform lowp isampler3D)
+0:? 'isCube' (uniform lowp isamplerCube)
+0:? 'is2DArray' (uniform lowp isampler2DArray)
+0:? 'us2D' (uniform lowp usampler2D)
+0:? 'us3D' (uniform lowp usampler3D)
+0:? 'usCube' (uniform lowp usamplerCube)
+0:? 'us2DArray' (uniform lowp usampler2DArray)
+0:? 'c1D' (smooth in lowp float)
+0:? 'c2D' (smooth in lowp 2-component vector of float)
+0:? 'c3D' (smooth in lowp 3-component vector of float)
+0:? 'c4D' (smooth temp lowp 4-component vector of float)
+0:? 'ic1D' (flat in mediump int)
+0:? 'ic2D' (flat in mediump 2-component vector of int)
+0:? 'ic3D' (flat in mediump 3-component vector of int)
+0:? 'ic4D' (flat in mediump 4-component vector of int)
+0:? 'badv' (noperspective in lowp 4-component vector of float)
+0:? 'bads' (smooth in lowp sampler2D)
+0:? 'badout' (smooth in structure{global mediump int i, global lowp sampler2D s})
+0:? 's2' (smooth in structure{global lowp 3-component vector of float c, global lowp float f})
+0:? 'sc' (out lowp 3-component vector of float)
+0:? 'sf' (out lowp float)
+0:? 'arrayedSampler' (uniform 5-element array of lowp sampler2D)
+0:? 'multiInst' (layout(column_major shared ) uniform 2-element array of 3-element array of block{layout(column_major shared ) uniform 2-element array of mediump int a, layout(column_major shared ) uniform 2-element array of 3-element array of mediump int b, layout(column_major shared ) uniform 2-element array of 3-element array of mediump int c})
+0:? 'colors' (out 4-element array of lowp 4-component vector of float)
+0:? 'st1' (uniform structure{global mediump int i, global lowp sampler2D s})
+0:? 'st2' (uniform structure{global mediump int i, global lowp sampler2D s})
+0:? 'fooinv' (invariant smooth in lowp 4-component vector of float)
+
+
+Linked fragment stage:
+
+ERROR: Linking fragment stage: when more than one fragment shader output, all must have location qualifiers
+
+Shader version: 300
+using early_fragment_tests
+ERROR: node is still EOpNull!
+0:53 Function Definition: main( (global void)
+0:53 Function Parameters:
+0:? Sequence
+0:57 move second child to first child (temp lowp 4-component vector of float)
+0:57 'v' (temp lowp 4-component vector of float)
+0:57 texture (global lowp 4-component vector of float)
+0:57 's2D' (uniform lowp sampler2D)
+0:57 'c2D' (smooth in lowp 2-component vector of float)
+0:58 move second child to first child (temp lowp 4-component vector of float)
+0:58 'v' (temp lowp 4-component vector of float)
+0:58 textureProj (global lowp 4-component vector of float)
+0:58 's3D' (uniform lowp sampler3D)
+0:58 'c4D' (smooth temp lowp 4-component vector of float)
+0:59 move second child to first child (temp lowp 4-component vector of float)
+0:59 'v' (temp lowp 4-component vector of float)
+0:59 textureLod (global lowp 4-component vector of float)
+0:59 's2DArray' (uniform lowp sampler2DArray)
+0:59 'c3D' (smooth in lowp 3-component vector of float)
+0:59 Constant:
+0:59 1.200000
+0:60 move second child to first child (temp lowp float)
+0:60 'f' (temp lowp float)
+0:60 textureOffset (global lowp float)
+0:60 's2DShadow' (uniform lowp sampler2DShadow)
+0:60 'c3D' (smooth in lowp 3-component vector of float)
+0:60 'ic2D' (flat in mediump 2-component vector of int)
+0:60 'c1D' (smooth in lowp float)
+0:61 move second child to first child (temp lowp 4-component vector of float)
+0:61 'v' (temp lowp 4-component vector of float)
+0:61 textureFetch (global lowp 4-component vector of float)
+0:61 's3D' (uniform lowp sampler3D)
+0:61 'ic3D' (flat in mediump 3-component vector of int)
+0:61 'ic1D' (flat in mediump int)
+0:62 move second child to first child (temp lowp 4-component vector of float)
+0:62 'v' (temp lowp 4-component vector of float)
+0:62 textureFetchOffset (global lowp 4-component vector of float)
+0:62 direct index (temp lowp sampler2D)
+0:62 'arrayedSampler' (uniform 5-element array of lowp sampler2D)
+0:62 Constant:
+0:62 2 (const int)
+0:62 'ic2D' (flat in mediump 2-component vector of int)
+0:62 Constant:
+0:62 4 (const int)
+0:62 'ic2D' (flat in mediump 2-component vector of int)
+0:63 move second child to first child (temp lowp float)
+0:63 'f' (temp lowp float)
+0:63 textureLodOffset (global lowp float)
+0:63 's2DShadow' (uniform lowp sampler2DShadow)
+0:63 'c3D' (smooth in lowp 3-component vector of float)
+0:63 'c1D' (smooth in lowp float)
+0:63 'ic2D' (flat in mediump 2-component vector of int)
+0:64 move second child to first child (temp lowp 4-component vector of float)
+0:64 'v' (temp lowp 4-component vector of float)
+0:64 textureProjLodOffset (global lowp 4-component vector of float)
+0:64 's2D' (uniform lowp sampler2D)
+0:64 'c3D' (smooth in lowp 3-component vector of float)
+0:64 'c1D' (smooth in lowp float)
+0:64 'ic2D' (flat in mediump 2-component vector of int)
+0:65 move second child to first child (temp lowp 4-component vector of float)
+0:65 'v' (temp lowp 4-component vector of float)
+0:65 textureGrad (global lowp 4-component vector of float)
+0:65 'sCube' (uniform lowp samplerCube)
+0:65 'c3D' (smooth in lowp 3-component vector of float)
+0:65 'c3D' (smooth in lowp 3-component vector of float)
+0:65 'c3D' (smooth in lowp 3-component vector of float)
+0:66 move second child to first child (temp lowp float)
+0:66 'f' (temp lowp float)
+0:66 textureGradOffset (global lowp float)
+0:66 's2DArrayShadow' (uniform lowp sampler2DArrayShadow)
+0:66 'c4D' (smooth temp lowp 4-component vector of float)
+0:66 'c2D' (smooth in lowp 2-component vector of float)
+0:66 'c2D' (smooth in lowp 2-component vector of float)
+0:66 'ic2D' (flat in mediump 2-component vector of int)
+0:67 move second child to first child (temp lowp 4-component vector of float)
+0:67 'v' (temp lowp 4-component vector of float)
+0:67 textureProjGrad (global lowp 4-component vector of float)
+0:67 's3D' (uniform lowp sampler3D)
+0:67 'c4D' (smooth temp lowp 4-component vector of float)
+0:67 'c3D' (smooth in lowp 3-component vector of float)
+0:67 'c3D' (smooth in lowp 3-component vector of float)
+0:68 move second child to first child (temp lowp 4-component vector of float)
+0:68 'v' (temp lowp 4-component vector of float)
+0:68 textureProjGradOffset (global lowp 4-component vector of float)
+0:68 's2D' (uniform lowp sampler2D)
+0:68 'c3D' (smooth in lowp 3-component vector of float)
+0:68 'c2D' (smooth in lowp 2-component vector of float)
+0:68 'c2D' (smooth in lowp 2-component vector of float)
+0:68 'ic2D' (flat in mediump 2-component vector of int)
+0:69 move second child to first child (temp lowp 4-component vector of float)
+0:69 'v' (temp lowp 4-component vector of float)
+0:69 texture (global lowp 4-component vector of float)
+0:69 indirect index (temp lowp sampler2D)
+0:69 'arrayedSampler' (uniform 5-element array of lowp sampler2D)
+0:69 'ic1D' (flat in mediump int)
+0:69 'c2D' (smooth in lowp 2-component vector of float)
+0:72 move second child to first child (temp mediump 4-component vector of int)
+0:72 'iv' (temp mediump 4-component vector of int)
+0:72 texture (global lowp 4-component vector of int)
+0:72 'is2D' (uniform lowp isampler2D)
+0:72 'c2D' (smooth in lowp 2-component vector of float)
+0:73 move second child to first child (temp mediump 4-component vector of int)
+0:73 'iv' (temp mediump 4-component vector of int)
+0:73 textureProjOffset (global lowp 4-component vector of int)
+0:73 'is2D' (uniform lowp isampler2D)
+0:73 'c4D' (smooth temp lowp 4-component vector of float)
+0:73 'ic2D' (flat in mediump 2-component vector of int)
+0:74 move second child to first child (temp mediump 4-component vector of int)
+0:74 'iv' (temp mediump 4-component vector of int)
+0:74 textureProjLod (global lowp 4-component vector of int)
+0:74 'is2D' (uniform lowp isampler2D)
+0:74 'c3D' (smooth in lowp 3-component vector of float)
+0:74 'c1D' (smooth in lowp float)
+0:75 move second child to first child (temp mediump 4-component vector of int)
+0:75 'iv' (temp mediump 4-component vector of int)
+0:75 textureProjGrad (global lowp 4-component vector of int)
+0:75 'is2D' (uniform lowp isampler2D)
+0:75 'c3D' (smooth in lowp 3-component vector of float)
+0:75 'c2D' (smooth in lowp 2-component vector of float)
+0:75 'c2D' (smooth in lowp 2-component vector of float)
+0:76 move second child to first child (temp mediump 4-component vector of int)
+0:76 'iv' (temp mediump 4-component vector of int)
+0:76 texture (global lowp 4-component vector of int)
+0:76 'is3D' (uniform lowp isampler3D)
+0:76 'c3D' (smooth in lowp 3-component vector of float)
+0:76 Constant:
+0:76 4.200000
+0:77 move second child to first child (temp mediump 4-component vector of int)
+0:77 'iv' (temp mediump 4-component vector of int)
+0:77 textureLod (global lowp 4-component vector of int)
+0:77 'isCube' (uniform lowp isamplerCube)
+0:77 'c3D' (smooth in lowp 3-component vector of float)
+0:77 'c1D' (smooth in lowp float)
+0:78 move second child to first child (temp mediump 4-component vector of int)
+0:78 'iv' (temp mediump 4-component vector of int)
+0:78 textureFetch (global lowp 4-component vector of int)
+0:78 'is2DArray' (uniform lowp isampler2DArray)
+0:78 'ic3D' (flat in mediump 3-component vector of int)
+0:78 'ic1D' (flat in mediump int)
+0:80 move second child to first child (temp highp 2-component vector of int)
+0:80 vector swizzle (temp mediump 2-component vector of int)
+0:80 'iv' (temp mediump 4-component vector of int)
+0:80 Sequence
+0:80 Constant:
+0:80 0 (const int)
+0:80 Constant:
+0:80 1 (const int)
+0:80 textureSize (global highp 2-component vector of int)
+0:80 'sCubeShadow' (uniform lowp samplerCubeShadow)
+0:80 Constant:
+0:80 2 (const int)
+0:88 add second child into first child (temp highp float)
+0:88 'f' (temp lowp float)
+0:88 direct index (temp highp float)
+0:88 'gl_FragCoord' (gl_FragCoord highp 4-component vector of float FragCoord)
+0:88 Constant:
+0:88 1 (const int)
+0:89 move second child to first child (temp highp float)
+0:89 'gl_FragDepth' (gl_FragDepth highp float FragDepth)
+0:89 'f' (temp lowp float)
+0:91 move second child to first child (temp lowp 3-component vector of float)
+0:91 'sc' (out lowp 3-component vector of float)
+0:91 c: direct index for structure (global lowp 3-component vector of float)
+0:91 's2' (smooth in structure{global lowp 3-component vector of float c, global lowp float f})
+0:91 Constant:
+0:91 0 (const int)
+0:92 move second child to first child (temp lowp float)
+0:92 'sf' (out lowp float)
+0:92 f: direct index for structure (global lowp float)
+0:92 's2' (smooth in structure{global lowp 3-component vector of float c, global lowp float f})
+0:92 Constant:
+0:92 1 (const int)
+0:94 add (temp lowp 2-component vector of float)
+0:94 hyp. sine (global lowp float)
+0:94 'c1D' (smooth in lowp float)
+0:95 vector-scale (temp lowp 2-component vector of float)
+0:95 hyp. cosine (global lowp float)
+0:95 'c1D' (smooth in lowp float)
+0:95 hyp. tangent (global lowp 2-component vector of float)
+0:95 'c2D' (smooth in lowp 2-component vector of float)
+0:96 add (temp lowp 4-component vector of float)
+0:96 arc hyp. sine (global lowp 4-component vector of float)
+0:96 'c4D' (smooth temp lowp 4-component vector of float)
+0:96 arc hyp. cosine (global lowp 4-component vector of float)
+0:96 'c4D' (smooth temp lowp 4-component vector of float)
+0:97 arc hyp. tangent (global lowp 3-component vector of float)
+0:97 'c3D' (smooth in lowp 3-component vector of float)
+0:108 Function Definition: foo( (global void)
+0:108 Function Parameters:
+0:110 Sequence
+0:110 move second child to first child (temp lowp 4-component vector of float)
+0:110 direct index (temp lowp 4-component vector of float)
+0:110 'colors' (out 4-element array of lowp 4-component vector of float)
+0:110 Constant:
+0:110 2 (const int)
+0:110 'c4D' (smooth temp lowp 4-component vector of float)
+0:111 move second child to first child (temp lowp 4-component vector of float)
+0:111 indirect index (temp lowp 4-component vector of float)
+0:111 'colors' (out 4-element array of lowp 4-component vector of float)
+0:111 'ic1D' (flat in mediump int)
+0:111 'c4D' (smooth temp lowp 4-component vector of float)
+0:117 Function Definition: foo13(struct-s-i1-s211; (global void)
+0:117 Function Parameters:
+0:117 'inSt2' (in structure{global mediump int i, global lowp sampler2D s})
+0:119 Sequence
+0:119 Test condition and select (temp void)
+0:119 Condition
+0:119 Compare Equal (temp bool)
+0:119 'st1' (uniform structure{global mediump int i, global lowp sampler2D s})
+0:119 'st2' (uniform structure{global mediump int i, global lowp sampler2D s})
+0:119 true case is null
+0:120 Test condition and select (temp void)
+0:120 Condition
+0:120 Compare Not Equal (temp bool)
+0:120 'st1' (uniform structure{global mediump int i, global lowp sampler2D s})
+0:120 'st2' (uniform structure{global mediump int i, global lowp sampler2D s})
+0:120 true case is null
+0:121 Constant:
+0:121 false (const bool)
+0:122 move second child to first child (temp structure{global mediump int i, global lowp sampler2D s})
+0:122 'inSt2' (in structure{global mediump int i, global lowp sampler2D s})
+0:122 'st1' (uniform structure{global mediump int i, global lowp sampler2D s})
+0:123 Compare Equal (temp bool)
+0:123 'inSt2' (in structure{global mediump int i, global lowp sampler2D s})
+0:123 'st1' (uniform structure{global mediump int i, global lowp sampler2D s})
+0:126 Function Definition: foo23( (global void)
+0:126 Function Parameters:
+0:128 Sequence
+0:128 textureOffset (global lowp float)
+0:128 's2DShadow' (uniform lowp sampler2DShadow)
+0:128 'c3D' (smooth in lowp 3-component vector of float)
+0:128 Constant:
+0:128 -8 (const int)
+0:128 7 (const int)
+0:128 'c1D' (smooth in lowp float)
+0:129 textureOffset (global lowp float)
+0:129 's2DShadow' (uniform lowp sampler2DShadow)
+0:129 'c3D' (smooth in lowp 3-component vector of float)
+0:129 Constant:
+0:129 -9 (const int)
+0:129 8 (const int)
+0:129 'c1D' (smooth in lowp float)
+0:132 Function Definition: foo324( (global void)
+0:132 Function Parameters:
+0:134 Sequence
+0:134 Sequence
+0:134 move second child to first child (temp lowp float)
+0:134 'p' (temp lowp float)
+0:134 Constant:
+0:134 210.712306
+0:135 add second child into first child (temp lowp float)
+0:135 'p' (temp lowp float)
+0:135 Constant:
+0:135 0.389418
+0:136 add second child into first child (temp lowp float)
+0:136 'p' (temp lowp float)
+0:136 Constant:
+0:136 5.000000
+0:137 add second child into first child (temp lowp float)
+0:137 'p' (temp lowp float)
+0:137 Constant:
+0:137 13.000000
+0:138 Sequence
+0:138 move second child to first child (temp lowp 3-component vector of float)
+0:138 'c3' (temp lowp 3-component vector of float)
+0:138 Constant:
+0:138 -15.000000
+0:138 -2.000000
+0:138 39.000000
+0:139 add second child into first child (temp lowp 3-component vector of float)
+0:139 'c3' (temp lowp 3-component vector of float)
+0:139 Constant:
+0:139 -1.000000
+0:139 -2.000000
+0:139 -3.000000
+0:140 add second child into first child (temp lowp 3-component vector of float)
+0:140 'c3' (temp lowp 3-component vector of float)
+0:140 Constant:
+0:140 1.000000
+0:140 2.000000
+0:140 3.000000
+0:141 Sequence
+0:141 move second child to first child (temp lowp 2-component vector of float)
+0:141 'c2' (temp lowp 2-component vector of float)
+0:141 Constant:
+0:141 1.000000
+0:141 -3.000000
+0:142 add second child into first child (temp lowp 2-component vector of float)
+0:142 'c2' (temp lowp 2-component vector of float)
+0:142 Constant:
+0:142 1.000000
+0:142 -3.000000
+0:143 add second child into first child (temp lowp 2-component vector of float)
+0:143 'c2' (temp lowp 2-component vector of float)
+0:143 Constant:
+0:143 3.000000
+0:143 -8.544004
+0:144 add second child into first child (temp lowp 2-component vector of float)
+0:144 'c2' (temp lowp 2-component vector of float)
+0:144 Constant:
+0:144 0.000000
+0:144 0.000000
+0:145 Sequence
+0:145 move second child to first child (temp lowp 3X2 matrix of float)
+0:145 'm32' (temp lowp 3X2 matrix of float)
+0:145 Constant:
+0:145 10.000000
+0:145 15.000000
+0:145 14.000000
+0:145 21.000000
+0:145 22.000000
+0:145 33.000000
+0:? Linker Objects
+0:? 's2D' (uniform lowp sampler2D)
+0:? 's3D' (uniform lowp sampler3D)
+0:? 'sCube' (uniform lowp samplerCube)
+0:? 'sCubeShadow' (uniform lowp samplerCubeShadow)
+0:? 's2DShadow' (uniform lowp sampler2DShadow)
+0:? 's2DArray' (uniform lowp sampler2DArray)
+0:? 's2DArrayShadow' (uniform lowp sampler2DArrayShadow)
+0:? 'is2D' (uniform lowp isampler2D)
+0:? 'is3D' (uniform lowp isampler3D)
+0:? 'isCube' (uniform lowp isamplerCube)
+0:? 'is2DArray' (uniform lowp isampler2DArray)
+0:? 'us2D' (uniform lowp usampler2D)
+0:? 'us3D' (uniform lowp usampler3D)
+0:? 'usCube' (uniform lowp usamplerCube)
+0:? 'us2DArray' (uniform lowp usampler2DArray)
+0:? 'c1D' (smooth in lowp float)
+0:? 'c2D' (smooth in lowp 2-component vector of float)
+0:? 'c3D' (smooth in lowp 3-component vector of float)
+0:? 'c4D' (smooth temp lowp 4-component vector of float)
+0:? 'ic1D' (flat in mediump int)
+0:? 'ic2D' (flat in mediump 2-component vector of int)
+0:? 'ic3D' (flat in mediump 3-component vector of int)
+0:? 'ic4D' (flat in mediump 4-component vector of int)
+0:? 'badv' (noperspective in lowp 4-component vector of float)
+0:? 'bads' (smooth in lowp sampler2D)
+0:? 'badout' (smooth in structure{global mediump int i, global lowp sampler2D s})
+0:? 's2' (smooth in structure{global lowp 3-component vector of float c, global lowp float f})
+0:? 'sc' (out lowp 3-component vector of float)
+0:? 'sf' (out lowp float)
+0:? 'arrayedSampler' (uniform 5-element array of lowp sampler2D)
+0:? 'multiInst' (layout(column_major shared ) uniform 2-element array of 3-element array of block{layout(column_major shared ) uniform 2-element array of mediump int a, layout(column_major shared ) uniform 2-element array of 3-element array of mediump int b, layout(column_major shared ) uniform 2-element array of 3-element array of mediump int c})
+0:? 'colors' (out 4-element array of lowp 4-component vector of float)
+0:? 'st1' (uniform structure{global mediump int i, global lowp sampler2D s})
+0:? 'st2' (uniform structure{global mediump int i, global lowp sampler2D s})
+0:? 'fooinv' (invariant smooth in lowp 4-component vector of float)
+
diff --git a/chromium/third_party/glslang/src/Test/baseResults/300.vert.out b/chromium/third_party/glslang/src/Test/baseResults/300.vert.out
new file mode 100644
index 00000000000..80745abedcd
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/300.vert.out
@@ -0,0 +1,612 @@
+300.vert
+ERROR: 0:8: 'varying' : Reserved word.
+ERROR: 0:8: 'varying' : no longer supported in es profile; removed in version 300
+ERROR: 0:9: 'vertex input arrays' : not supported with this profile: es
+ERROR: 0:10: '' : precision qualifier must appear as last qualifier
+ERROR: 0:11: '' : invariant qualifier must appear before interpolation, storage, and precision qualifiers
+ERROR: 0:12: '' : Auxiliary qualifiers (centroid, patch, and sample) must appear before storage and precision qualifiers
+ERROR: 0:12: '' : vertex input cannot be further qualified
+ERROR: 0:13: '' : interpolation qualifiers must appear before storage and precision qualifiers
+ERROR: 0:14: '' : in/out must appear before const
+ERROR: 0:15: '' : precision qualifier must appear as last qualifier
+ERROR: 0:16: '' : can only have one interpolation qualifier (flat, smooth, noperspective)
+ERROR: 0:17: 'sample' : Reserved word.
+ERROR: 0:17: '' : can only have one auxiliary qualifier (centroid, patch, and sample)
+ERROR: 0:18: 'uniform' : too many storage qualifiers
+ERROR: 0:56: '#error' : GL_ES is set
+ERROR: 0:62: '' : array size required
+ERROR: 0:63: '' : array size required
+ERROR: 0:64: '' : array size required
+ERROR: 0:65: '' : array size required
+ERROR: 0:67: '' : array size required
+ERROR: 0:76: 'invariant' : cannot change qualification after use
+ERROR: 0:78: 'invariant' : can only apply to an output
+ERROR: 0:88: 'ub2' : Cannot reuse block name within the same interface: uniform
+ERROR: 0:92: 'ub2' : Cannot reuse block name within the same interface: uniform
+ERROR: 0:96: 'ub2' : Cannot reuse block name within the same interface: uniform
+ERROR: 0:104: 'ub3' : Cannot reuse block name within the same interface: uniform
+ERROR: 0:121: 'textureSize' : no matching overloaded function found
+ERROR: 0:123: 'textureSize' : no matching overloaded function found
+ERROR: 0:125: 'texture' : no matching overloaded function found
+ERROR: 0:127: 'textureProjOffset' : no matching overloaded function found
+ERROR: 0:132: 'highp' : overloaded functions must have the same parameter precision qualifiers for argument 2
+ERROR: 0:135: 'in' : overloaded functions must have the same parameter storage qualifiers for argument 2
+ERROR: 0:146: '' : array size required
+ERROR: 0:147: '' : array size required
+ERROR: 0:148: '' : array size required
+ERROR: 0:149: 'float' : cannot apply precision statement to this type; use 'float', 'int' or a sampler type
+ERROR: 0:168: 'Binst' : cannot add storage, auxiliary, memory, interpolation, layout, or precision qualifier to an existing variable
+ERROR: 0:169: 'Bblock' : cannot add storage, auxiliary, memory, interpolation, layout, or precision qualifier to an existing variable
+ERROR: 0:170: 'Bfoo' : cannot add storage, auxiliary, memory, interpolation, layout, or precision qualifier to an existing variable
+ERROR: 0:172: 'std430' : not supported for this version or the enabled extensions
+ERROR: 0:172: 'std430' : requires the 'buffer' storage qualifier
+ERROR: 0:175: '' : array size required
+ERROR: 0:185: 'assign' : cannot convert from 'temp 4-element array of highp float' to 'temp 3-element array of highp float'
+ERROR: 0:186: 'assign' : cannot convert from 'temp 3-element array of highp float' to 'temp 4-element array of highp float'
+ERROR: 44 compilation errors. No code generated.
+
+
+Shader version: 300
+ERROR: node is still EOpNull!
+0:27 Function Definition: main( (global void)
+0:27 Function Parameters:
+0:29 Sequence
+0:29 Sequence
+0:29 move second child to first child (temp highp int)
+0:29 'id' (temp highp int)
+0:29 add (temp highp int)
+0:29 'gl_VertexID' (gl_VertexId highp int VertexId)
+0:29 'gl_InstanceID' (gl_InstanceId highp int InstanceId)
+0:31 Sequence
+0:31 move second child to first child (temp highp int)
+0:31 'c0' (temp highp int)
+0:31 Constant:
+0:31 64 (const int)
+0:32 Sequence
+0:32 move second child to first child (temp highp int)
+0:32 'c1' (temp highp int)
+0:32 Constant:
+0:32 128 (const int)
+0:33 Sequence
+0:33 move second child to first child (temp highp int)
+0:33 'c2' (temp highp int)
+0:33 Constant:
+0:33 16 (const int)
+0:34 Sequence
+0:34 move second child to first child (temp highp int)
+0:34 'c3' (temp highp int)
+0:34 Constant:
+0:34 15 (const int)
+0:35 Sequence
+0:35 move second child to first child (temp highp int)
+0:35 'c4' (temp highp int)
+0:35 Constant:
+0:35 32 (const int)
+0:36 Sequence
+0:36 move second child to first child (temp highp int)
+0:36 'c5' (temp highp int)
+0:36 Constant:
+0:36 80 (const int)
+0:37 Sequence
+0:37 move second child to first child (temp highp int)
+0:37 'c6' (temp highp int)
+0:37 Constant:
+0:37 32 (const int)
+0:38 Sequence
+0:38 move second child to first child (temp highp int)
+0:38 'c7' (temp highp int)
+0:38 Constant:
+0:38 16 (const int)
+0:39 Sequence
+0:39 move second child to first child (temp highp int)
+0:39 'c8' (temp highp int)
+0:39 Constant:
+0:39 32 (const int)
+0:40 Sequence
+0:40 move second child to first child (temp highp int)
+0:40 'c9' (temp highp int)
+0:40 Constant:
+0:40 -8 (const int)
+0:41 Sequence
+0:41 move second child to first child (temp highp int)
+0:41 'c10' (temp highp int)
+0:41 Constant:
+0:41 7 (const int)
+0:43 Sequence
+0:43 move second child to first child (temp highp 3X4 matrix of float)
+0:43 'tm' (temp highp 3X4 matrix of float)
+0:43 transpose (global highp 3X4 matrix of float)
+0:43 'm43' (uniform highp 4X3 matrix of float)
+0:44 Sequence
+0:44 move second child to first child (temp highp float)
+0:44 'dm' (temp highp float)
+0:44 determinant (global highp float)
+0:44 'm44' (uniform highp 4X4 matrix of float)
+0:45 Sequence
+0:45 move second child to first child (temp highp 3X3 matrix of float)
+0:45 'im' (temp highp 3X3 matrix of float)
+0:45 inverse (global highp 3X3 matrix of float)
+0:45 'm33' (uniform highp 3X3 matrix of float)
+0:47 Sequence
+0:47 move second child to first child (temp highp 3X2 matrix of float)
+0:47 'op' (temp highp 3X2 matrix of float)
+0:47 outer product (global highp 3X2 matrix of float)
+0:47 'v2' (smooth out highp 2-component vector of float)
+0:47 'v3' (in highp 3-component vector of float)
+0:49 move second child to first child (temp highp 4-component vector of float)
+0:49 'gl_Position' (gl_Position highp 4-component vector of float Position)
+0:49 direct index (temp highp 4-component vector of float)
+0:49 'm44' (uniform highp 4X4 matrix of float)
+0:49 Constant:
+0:49 2 (const int)
+0:50 move second child to first child (temp highp float)
+0:50 'gl_PointSize' (gl_PointSize highp float PointSize)
+0:50 direct index (temp highp float)
+0:50 'v2' (smooth out highp 2-component vector of float)
+0:50 Constant:
+0:50 1 (const int)
+0:52 move second child to first child (temp highp 3-component vector of float)
+0:52 c: direct index for structure (global highp 3-component vector of float)
+0:52 's' (smooth out structure{global highp 3-component vector of float c, global highp float f})
+0:52 Constant:
+0:52 0 (const int)
+0:52 'v3' (in highp 3-component vector of float)
+0:53 move second child to first child (temp highp float)
+0:53 f: direct index for structure (global highp float)
+0:53 's' (smooth out structure{global highp 3-component vector of float c, global highp float f})
+0:53 Constant:
+0:53 1 (const int)
+0:53 'dm' (temp highp float)
+0:68 Sequence
+0:68 move second child to first child (temp 2-element array of highp float)
+0:68 'okayA' (global 2-element array of highp float)
+0:68 Constant:
+0:68 3.000000
+0:68 4.000000
+0:71 Function Definition: newVFun( (global void)
+0:71 Function Parameters:
+0:73 Sequence
+0:73 move second child to first child (temp highp 3-component vector of float)
+0:73 'newV' (smooth out highp 3-component vector of float)
+0:73 'v3' (in highp 3-component vector of float)
+0:118 Function Definition: foo23( (global void)
+0:118 Function Parameters:
+0:120 Sequence
+0:120 Sequence
+0:120 move second child to first child (temp highp 2-component vector of int)
+0:120 'x1' (temp highp 2-component vector of int)
+0:120 textureSize (global highp 2-component vector of int)
+0:120 's2D' (uniform lowp sampler2D)
+0:120 Constant:
+0:120 2 (const int)
+0:121 Constant:
+0:121 0.000000
+0:122 Sequence
+0:122 move second child to first child (temp highp 3-component vector of int)
+0:122 'x3' (temp highp 3-component vector of int)
+0:122 textureSize (global highp 3-component vector of int)
+0:122 's2DAS' (uniform lowp sampler2DArrayShadow)
+0:122 Constant:
+0:122 -1 (const int)
+0:123 Constant:
+0:123 0.000000
+0:124 Sequence
+0:124 move second child to first child (temp highp 4-component vector of float)
+0:124 'x4' (temp highp 4-component vector of float)
+0:124 texture (global lowp 4-component vector of float)
+0:124 's2D' (uniform lowp sampler2D)
+0:124 'c2D' (in highp 2-component vector of float)
+0:125 Constant:
+0:125 0.000000
+0:126 Sequence
+0:126 move second child to first child (temp highp 4-component vector of float)
+0:126 'x5' (temp highp 4-component vector of float)
+0:126 textureProjOffset (global lowp 4-component vector of float)
+0:126 's3D' (uniform lowp sampler3D)
+0:126 Constant:
+0:126 0.200000
+0:126 0.200000
+0:126 0.200000
+0:126 0.200000
+0:126 Constant:
+0:126 1 (const int)
+0:126 1 (const int)
+0:126 1 (const int)
+0:127 Constant:
+0:127 0.000000
+0:128 Sequence
+0:128 move second child to first child (temp highp float)
+0:128 'x6' (temp highp float)
+0:128 textureProjGradOffset (global lowp float)
+0:128 's2DS' (uniform lowp sampler2DShadow)
+0:128 'invIn' (invariant in highp 4-component vector of float)
+0:128 Constant:
+0:128 4.200000
+0:128 4.200000
+0:128 Constant:
+0:128 5.300000
+0:128 5.300000
+0:128 Constant:
+0:128 1 (const int)
+0:128 1 (const int)
+0:137 Function Definition: foo2349( (global void)
+0:137 Function Parameters:
+0:139 Sequence
+0:139 Sequence
+0:139 move second child to first child (temp 3-element array of highp float)
+0:139 'x' (temp 3-element array of highp float)
+0:139 Constant:
+0:139 1.000000
+0:139 2.000000
+0:139 3.000000
+0:140 Sequence
+0:140 move second child to first child (temp 3-element array of highp float)
+0:140 'y' (temp 3-element array of highp float)
+0:140 'x' (temp 3-element array of highp float)
+0:141 Sequence
+0:141 move second child to first child (temp 3-element array of highp float)
+0:141 'z' (temp 3-element array of highp float)
+0:141 'x' (temp 3-element array of highp float)
+0:143 move second child to first child (temp 3-element array of highp float)
+0:143 'w' (temp 3-element array of highp float)
+0:143 'y' (temp 3-element array of highp float)
+0:155 Function Definition: gggf(f1; (global highp int)
+0:155 Function Parameters:
+0:155 'f' (in highp float)
+0:155 Sequence
+0:155 Branch: Return with expression
+0:155 Constant:
+0:155 2 (const int)
+0:158 Function Definition: agggf(f1; (global highp int)
+0:158 Function Parameters:
+0:158 'f' (in highp float)
+0:158 Sequence
+0:158 Branch: Return with expression
+0:158 Constant:
+0:158 2 (const int)
+0:178 Function Definition: fooDeeparray( (global void)
+0:178 Function Parameters:
+0:181 Sequence
+0:181 Sequence
+0:180 move second child to first child (temp 3-element array of highp float)
+0:180 'x' (temp 3-element array of highp float)
+0:180 Constant:
+0:180 1.000000
+0:180 2.000000
+0:180 3.000000
+0:181 move second child to first child (temp 4-element array of highp float)
+0:181 'y' (temp 4-element array of highp float)
+0:181 Constant:
+0:181 1.000000
+0:181 2.000000
+0:181 3.000000
+0:181 4.000000
+0:183 move second child to first child (temp 3-element array of highp float)
+0:183 'xp' (temp 3-element array of highp float)
+0:183 'x' (temp 3-element array of highp float)
+0:184 move second child to first child (temp 4-element array of highp float)
+0:184 'yp' (temp 4-element array of highp float)
+0:184 'y' (temp 4-element array of highp float)
+0:185 'xp' (temp 3-element array of highp float)
+0:186 'yp' (temp 4-element array of highp float)
+0:? Linker Objects
+0:? 'm43' (uniform highp 4X3 matrix of float)
+0:? 'm33' (uniform highp 3X3 matrix of float)
+0:? 'm44' (uniform highp 4X4 matrix of float)
+0:? 'v3' (in highp 3-component vector of float)
+0:? 'v2' (smooth out highp 2-component vector of float)
+0:? 'bad' (in 10-element array of highp 4-component vector of float)
+0:? 'badorder' (in highp 4-component vector of float)
+0:? 'badorder2' (invariant smooth out highp 4-component vector of float)
+0:? 'badorder4' (centroid in highp 4-component vector of float)
+0:? 'badorder3' (flat out highp 4-component vector of float)
+0:? 'rep' (smooth flat out highp 4-component vector of float)
+0:? 'rep2' (centroid smooth sample out highp 4-component vector of float)
+0:? 'rep3' (in highp 4-component vector of float)
+0:? 's' (smooth out structure{global highp 3-component vector of float c, global highp float f})
+0:? 'badsize' (global implicitly-sized array of highp float)
+0:? 'badsize2' (global implicitly-sized array of highp float)
+0:? 'ubInst' (layout(column_major shared ) uniform implicitly-sized array of block{layout(column_major shared ) uniform implicitly-sized array of highp int a})
+0:? 'okayA' (global 2-element array of highp float)
+0:? 'newV' (smooth out highp 3-component vector of float)
+0:? 'invIn' (in highp 4-component vector of float)
+0:? 's2' (smooth out structure{global highp 3-component vector of float c, global highp float f})
+0:? 's3' (invariant smooth out structure{global highp 3-component vector of float c, global highp float f})
+0:? 'a' (layout(column_major shared ) uniform block{layout(column_major shared ) uniform highp float f})
+0:? 'anon@0' (layout(column_major shared ) uniform block{layout(column_major shared ) uniform bool b23})
+0:? 's2D' (uniform lowp sampler2D)
+0:? 's3D' (uniform lowp sampler3D)
+0:? 's2DS' (uniform lowp sampler2DShadow)
+0:? 's2DAS' (uniform lowp sampler2DArrayShadow)
+0:? 'c2D' (in highp 2-component vector of float)
+0:? 'ssss' (smooth out structure{global highp float f})
+0:? 'Binst' (layout(column_major shared ) uniform block{layout(column_major shared ) uniform highp int a})
+0:? 'Bfoo' (global highp int)
+0:? 'B430i' (layout(column_major std430 ) uniform block{layout(column_major std430 offset=0 ) uniform highp int a})
+0:? 'gl_VertexID' (gl_VertexId highp int VertexId)
+0:? 'gl_InstanceID' (gl_InstanceId highp int InstanceId)
+
+
+Linked vertex stage:
+
+
+Shader version: 300
+ERROR: node is still EOpNull!
+0:27 Function Definition: main( (global void)
+0:27 Function Parameters:
+0:29 Sequence
+0:29 Sequence
+0:29 move second child to first child (temp highp int)
+0:29 'id' (temp highp int)
+0:29 add (temp highp int)
+0:29 'gl_VertexID' (gl_VertexId highp int VertexId)
+0:29 'gl_InstanceID' (gl_InstanceId highp int InstanceId)
+0:31 Sequence
+0:31 move second child to first child (temp highp int)
+0:31 'c0' (temp highp int)
+0:31 Constant:
+0:31 64 (const int)
+0:32 Sequence
+0:32 move second child to first child (temp highp int)
+0:32 'c1' (temp highp int)
+0:32 Constant:
+0:32 128 (const int)
+0:33 Sequence
+0:33 move second child to first child (temp highp int)
+0:33 'c2' (temp highp int)
+0:33 Constant:
+0:33 16 (const int)
+0:34 Sequence
+0:34 move second child to first child (temp highp int)
+0:34 'c3' (temp highp int)
+0:34 Constant:
+0:34 15 (const int)
+0:35 Sequence
+0:35 move second child to first child (temp highp int)
+0:35 'c4' (temp highp int)
+0:35 Constant:
+0:35 32 (const int)
+0:36 Sequence
+0:36 move second child to first child (temp highp int)
+0:36 'c5' (temp highp int)
+0:36 Constant:
+0:36 80 (const int)
+0:37 Sequence
+0:37 move second child to first child (temp highp int)
+0:37 'c6' (temp highp int)
+0:37 Constant:
+0:37 32 (const int)
+0:38 Sequence
+0:38 move second child to first child (temp highp int)
+0:38 'c7' (temp highp int)
+0:38 Constant:
+0:38 16 (const int)
+0:39 Sequence
+0:39 move second child to first child (temp highp int)
+0:39 'c8' (temp highp int)
+0:39 Constant:
+0:39 32 (const int)
+0:40 Sequence
+0:40 move second child to first child (temp highp int)
+0:40 'c9' (temp highp int)
+0:40 Constant:
+0:40 -8 (const int)
+0:41 Sequence
+0:41 move second child to first child (temp highp int)
+0:41 'c10' (temp highp int)
+0:41 Constant:
+0:41 7 (const int)
+0:43 Sequence
+0:43 move second child to first child (temp highp 3X4 matrix of float)
+0:43 'tm' (temp highp 3X4 matrix of float)
+0:43 transpose (global highp 3X4 matrix of float)
+0:43 'm43' (uniform highp 4X3 matrix of float)
+0:44 Sequence
+0:44 move second child to first child (temp highp float)
+0:44 'dm' (temp highp float)
+0:44 determinant (global highp float)
+0:44 'm44' (uniform highp 4X4 matrix of float)
+0:45 Sequence
+0:45 move second child to first child (temp highp 3X3 matrix of float)
+0:45 'im' (temp highp 3X3 matrix of float)
+0:45 inverse (global highp 3X3 matrix of float)
+0:45 'm33' (uniform highp 3X3 matrix of float)
+0:47 Sequence
+0:47 move second child to first child (temp highp 3X2 matrix of float)
+0:47 'op' (temp highp 3X2 matrix of float)
+0:47 outer product (global highp 3X2 matrix of float)
+0:47 'v2' (smooth out highp 2-component vector of float)
+0:47 'v3' (in highp 3-component vector of float)
+0:49 move second child to first child (temp highp 4-component vector of float)
+0:49 'gl_Position' (gl_Position highp 4-component vector of float Position)
+0:49 direct index (temp highp 4-component vector of float)
+0:49 'm44' (uniform highp 4X4 matrix of float)
+0:49 Constant:
+0:49 2 (const int)
+0:50 move second child to first child (temp highp float)
+0:50 'gl_PointSize' (gl_PointSize highp float PointSize)
+0:50 direct index (temp highp float)
+0:50 'v2' (smooth out highp 2-component vector of float)
+0:50 Constant:
+0:50 1 (const int)
+0:52 move second child to first child (temp highp 3-component vector of float)
+0:52 c: direct index for structure (global highp 3-component vector of float)
+0:52 's' (smooth out structure{global highp 3-component vector of float c, global highp float f})
+0:52 Constant:
+0:52 0 (const int)
+0:52 'v3' (in highp 3-component vector of float)
+0:53 move second child to first child (temp highp float)
+0:53 f: direct index for structure (global highp float)
+0:53 's' (smooth out structure{global highp 3-component vector of float c, global highp float f})
+0:53 Constant:
+0:53 1 (const int)
+0:53 'dm' (temp highp float)
+0:68 Sequence
+0:68 move second child to first child (temp 2-element array of highp float)
+0:68 'okayA' (global 2-element array of highp float)
+0:68 Constant:
+0:68 3.000000
+0:68 4.000000
+0:71 Function Definition: newVFun( (global void)
+0:71 Function Parameters:
+0:73 Sequence
+0:73 move second child to first child (temp highp 3-component vector of float)
+0:73 'newV' (smooth out highp 3-component vector of float)
+0:73 'v3' (in highp 3-component vector of float)
+0:118 Function Definition: foo23( (global void)
+0:118 Function Parameters:
+0:120 Sequence
+0:120 Sequence
+0:120 move second child to first child (temp highp 2-component vector of int)
+0:120 'x1' (temp highp 2-component vector of int)
+0:120 textureSize (global highp 2-component vector of int)
+0:120 's2D' (uniform lowp sampler2D)
+0:120 Constant:
+0:120 2 (const int)
+0:121 Constant:
+0:121 0.000000
+0:122 Sequence
+0:122 move second child to first child (temp highp 3-component vector of int)
+0:122 'x3' (temp highp 3-component vector of int)
+0:122 textureSize (global highp 3-component vector of int)
+0:122 's2DAS' (uniform lowp sampler2DArrayShadow)
+0:122 Constant:
+0:122 -1 (const int)
+0:123 Constant:
+0:123 0.000000
+0:124 Sequence
+0:124 move second child to first child (temp highp 4-component vector of float)
+0:124 'x4' (temp highp 4-component vector of float)
+0:124 texture (global lowp 4-component vector of float)
+0:124 's2D' (uniform lowp sampler2D)
+0:124 'c2D' (in highp 2-component vector of float)
+0:125 Constant:
+0:125 0.000000
+0:126 Sequence
+0:126 move second child to first child (temp highp 4-component vector of float)
+0:126 'x5' (temp highp 4-component vector of float)
+0:126 textureProjOffset (global lowp 4-component vector of float)
+0:126 's3D' (uniform lowp sampler3D)
+0:126 Constant:
+0:126 0.200000
+0:126 0.200000
+0:126 0.200000
+0:126 0.200000
+0:126 Constant:
+0:126 1 (const int)
+0:126 1 (const int)
+0:126 1 (const int)
+0:127 Constant:
+0:127 0.000000
+0:128 Sequence
+0:128 move second child to first child (temp highp float)
+0:128 'x6' (temp highp float)
+0:128 textureProjGradOffset (global lowp float)
+0:128 's2DS' (uniform lowp sampler2DShadow)
+0:128 'invIn' (invariant in highp 4-component vector of float)
+0:128 Constant:
+0:128 4.200000
+0:128 4.200000
+0:128 Constant:
+0:128 5.300000
+0:128 5.300000
+0:128 Constant:
+0:128 1 (const int)
+0:128 1 (const int)
+0:137 Function Definition: foo2349( (global void)
+0:137 Function Parameters:
+0:139 Sequence
+0:139 Sequence
+0:139 move second child to first child (temp 3-element array of highp float)
+0:139 'x' (temp 3-element array of highp float)
+0:139 Constant:
+0:139 1.000000
+0:139 2.000000
+0:139 3.000000
+0:140 Sequence
+0:140 move second child to first child (temp 3-element array of highp float)
+0:140 'y' (temp 3-element array of highp float)
+0:140 'x' (temp 3-element array of highp float)
+0:141 Sequence
+0:141 move second child to first child (temp 3-element array of highp float)
+0:141 'z' (temp 3-element array of highp float)
+0:141 'x' (temp 3-element array of highp float)
+0:143 move second child to first child (temp 3-element array of highp float)
+0:143 'w' (temp 3-element array of highp float)
+0:143 'y' (temp 3-element array of highp float)
+0:155 Function Definition: gggf(f1; (global highp int)
+0:155 Function Parameters:
+0:155 'f' (in highp float)
+0:155 Sequence
+0:155 Branch: Return with expression
+0:155 Constant:
+0:155 2 (const int)
+0:158 Function Definition: agggf(f1; (global highp int)
+0:158 Function Parameters:
+0:158 'f' (in highp float)
+0:158 Sequence
+0:158 Branch: Return with expression
+0:158 Constant:
+0:158 2 (const int)
+0:178 Function Definition: fooDeeparray( (global void)
+0:178 Function Parameters:
+0:181 Sequence
+0:181 Sequence
+0:180 move second child to first child (temp 3-element array of highp float)
+0:180 'x' (temp 3-element array of highp float)
+0:180 Constant:
+0:180 1.000000
+0:180 2.000000
+0:180 3.000000
+0:181 move second child to first child (temp 4-element array of highp float)
+0:181 'y' (temp 4-element array of highp float)
+0:181 Constant:
+0:181 1.000000
+0:181 2.000000
+0:181 3.000000
+0:181 4.000000
+0:183 move second child to first child (temp 3-element array of highp float)
+0:183 'xp' (temp 3-element array of highp float)
+0:183 'x' (temp 3-element array of highp float)
+0:184 move second child to first child (temp 4-element array of highp float)
+0:184 'yp' (temp 4-element array of highp float)
+0:184 'y' (temp 4-element array of highp float)
+0:185 'xp' (temp 3-element array of highp float)
+0:186 'yp' (temp 4-element array of highp float)
+0:? Linker Objects
+0:? 'm43' (uniform highp 4X3 matrix of float)
+0:? 'm33' (uniform highp 3X3 matrix of float)
+0:? 'm44' (uniform highp 4X4 matrix of float)
+0:? 'v3' (in highp 3-component vector of float)
+0:? 'v2' (smooth out highp 2-component vector of float)
+0:? 'bad' (in 10-element array of highp 4-component vector of float)
+0:? 'badorder' (in highp 4-component vector of float)
+0:? 'badorder2' (invariant smooth out highp 4-component vector of float)
+0:? 'badorder4' (centroid in highp 4-component vector of float)
+0:? 'badorder3' (flat out highp 4-component vector of float)
+0:? 'rep' (smooth flat out highp 4-component vector of float)
+0:? 'rep2' (centroid smooth sample out highp 4-component vector of float)
+0:? 'rep3' (in highp 4-component vector of float)
+0:? 's' (smooth out structure{global highp 3-component vector of float c, global highp float f})
+0:? 'badsize' (global 1-element array of highp float)
+0:? 'badsize2' (global 1-element array of highp float)
+0:? 'ubInst' (layout(column_major shared ) uniform 1-element array of block{layout(column_major shared ) uniform 1-element array of highp int a})
+0:? 'okayA' (global 2-element array of highp float)
+0:? 'newV' (smooth out highp 3-component vector of float)
+0:? 'invIn' (in highp 4-component vector of float)
+0:? 's2' (smooth out structure{global highp 3-component vector of float c, global highp float f})
+0:? 's3' (invariant smooth out structure{global highp 3-component vector of float c, global highp float f})
+0:? 'a' (layout(column_major shared ) uniform block{layout(column_major shared ) uniform highp float f})
+0:? 'anon@0' (layout(column_major shared ) uniform block{layout(column_major shared ) uniform bool b23})
+0:? 's2D' (uniform lowp sampler2D)
+0:? 's3D' (uniform lowp sampler3D)
+0:? 's2DS' (uniform lowp sampler2DShadow)
+0:? 's2DAS' (uniform lowp sampler2DArrayShadow)
+0:? 'c2D' (in highp 2-component vector of float)
+0:? 'ssss' (smooth out structure{global highp float f})
+0:? 'Binst' (layout(column_major shared ) uniform block{layout(column_major shared ) uniform highp int a})
+0:? 'Bfoo' (global highp int)
+0:? 'B430i' (layout(column_major std430 ) uniform block{layout(column_major std430 offset=0 ) uniform highp int a})
+0:? 'gl_VertexID' (gl_VertexId highp int VertexId)
+0:? 'gl_InstanceID' (gl_InstanceId highp int InstanceId)
+
diff --git a/chromium/third_party/glslang/src/Test/baseResults/300BuiltIns.frag.out b/chromium/third_party/glslang/src/Test/baseResults/300BuiltIns.frag.out
new file mode 100644
index 00000000000..2bb4cf5ebe0
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/300BuiltIns.frag.out
@@ -0,0 +1,418 @@
+300BuiltIns.frag
+ERROR: 0:6: 'float' : type requires declaration of default precision qualifier
+ERROR: 0:70: 'noise2' : no matching overloaded function found
+ERROR: 0:72: 't__' : identifiers containing consecutive underscores ("__") are reserved, and an error if version <= 300
+ERROR: 0:75: '#define' : names containing consecutive underscores are reserved, and an error if version <= 300: __D
+ERROR: 4 compilation errors. No code generated.
+
+
+Shader version: 300
+ERROR: node is still EOpNull!
+0:26 Function Definition: main( (global void)
+0:26 Function Parameters:
+0:29 Sequence
+0:29 Sequence
+0:29 move second child to first child (temp mediump 3-component vector of float)
+0:29 'v' (temp mediump 3-component vector of float)
+0:29 mix (global mediump 3-component vector of float)
+0:29 'x' (global mediump 3-component vector of float)
+0:29 'y' (global mediump 3-component vector of float)
+0:29 'bv' (global 3-component vector of bool)
+0:30 Sequence
+0:30 move second child to first child (temp mediump 4-component vector of int)
+0:30 'iv10' (temp mediump 4-component vector of int)
+0:30 Absolute value (global mediump 4-component vector of int)
+0:30 'iv4a' (global mediump 4-component vector of int)
+0:31 Sequence
+0:31 move second child to first child (temp mediump 4-component vector of int)
+0:31 'iv11' (temp mediump 4-component vector of int)
+0:31 Sign (global mediump 4-component vector of int)
+0:31 'iv4a' (global mediump 4-component vector of int)
+0:32 Sequence
+0:32 move second child to first child (temp mediump 4-component vector of int)
+0:32 'iv12' (temp mediump 4-component vector of int)
+0:32 min (global mediump 4-component vector of int)
+0:32 'iv4a' (global mediump 4-component vector of int)
+0:32 'iv4b' (global mediump 4-component vector of int)
+0:33 Sequence
+0:33 move second child to first child (temp mediump 4-component vector of int)
+0:33 'iv13' (temp mediump 4-component vector of int)
+0:33 min (global mediump 4-component vector of int)
+0:33 'iv4a' (global mediump 4-component vector of int)
+0:33 'imin' (global mediump int)
+0:34 Sequence
+0:34 move second child to first child (temp mediump 2-component vector of uint)
+0:34 'u' (temp mediump 2-component vector of uint)
+0:34 min (global mediump 2-component vector of uint)
+0:34 'uv2x' (global mediump 2-component vector of uint)
+0:34 'uv2y' (global mediump 2-component vector of uint)
+0:35 Sequence
+0:35 move second child to first child (temp mediump 4-component vector of uint)
+0:35 'uv' (temp mediump 4-component vector of uint)
+0:35 min (global mediump 4-component vector of uint)
+0:35 'uv4y' (global mediump 4-component vector of uint)
+0:35 'uy' (global mediump uint)
+0:36 Sequence
+0:36 move second child to first child (temp mediump 3-component vector of int)
+0:36 'iv14' (temp mediump 3-component vector of int)
+0:36 max (global mediump 3-component vector of int)
+0:36 'iv3a' (global mediump 3-component vector of int)
+0:36 'iv3b' (global mediump 3-component vector of int)
+0:37 Sequence
+0:37 move second child to first child (temp mediump 4-component vector of int)
+0:37 'iv15' (temp mediump 4-component vector of int)
+0:37 max (global mediump 4-component vector of int)
+0:37 'iv4a' (global mediump 4-component vector of int)
+0:37 'imax' (global mediump int)
+0:38 Sequence
+0:38 move second child to first child (temp mediump 2-component vector of uint)
+0:38 'u10' (temp mediump 2-component vector of uint)
+0:38 max (global mediump 2-component vector of uint)
+0:38 'uv2x' (global mediump 2-component vector of uint)
+0:38 'uv2y' (global mediump 2-component vector of uint)
+0:39 Sequence
+0:39 move second child to first child (temp mediump 2-component vector of uint)
+0:39 'u11' (temp mediump 2-component vector of uint)
+0:39 max (global mediump 2-component vector of uint)
+0:39 'uv2x' (global mediump 2-component vector of uint)
+0:39 'uy' (global mediump uint)
+0:40 Sequence
+0:40 move second child to first child (temp mediump 4-component vector of int)
+0:40 'iv16' (temp mediump 4-component vector of int)
+0:40 clamp (global mediump 4-component vector of int)
+0:40 'iv4a' (global mediump 4-component vector of int)
+0:40 'iv4a' (global mediump 4-component vector of int)
+0:40 'iv4b' (global mediump 4-component vector of int)
+0:41 Sequence
+0:41 move second child to first child (temp mediump 4-component vector of int)
+0:41 'iv17' (temp mediump 4-component vector of int)
+0:41 clamp (global mediump 4-component vector of int)
+0:41 'iv4a' (global mediump 4-component vector of int)
+0:41 'imin' (global mediump int)
+0:41 'imax' (global mediump int)
+0:42 Sequence
+0:42 move second child to first child (temp mediump 2-component vector of uint)
+0:42 'u12' (temp mediump 2-component vector of uint)
+0:42 clamp (global mediump 2-component vector of uint)
+0:42 'uv2x' (global mediump 2-component vector of uint)
+0:42 'uv2y' (global mediump 2-component vector of uint)
+0:42 'uv2c' (global mediump 2-component vector of uint)
+0:43 Sequence
+0:43 move second child to first child (temp mediump 4-component vector of uint)
+0:43 'uv10' (temp mediump 4-component vector of uint)
+0:43 clamp (global mediump 4-component vector of uint)
+0:43 'uv4y' (global mediump 4-component vector of uint)
+0:43 'umin' (global mediump uint)
+0:43 'umax' (global mediump uint)
+0:47 Sequence
+0:47 move second child to first child (temp mediump 3-component vector of float)
+0:47 'v11' (temp mediump 3-component vector of float)
+0:47 modf (global mediump 3-component vector of float)
+0:47 'x' (global mediump 3-component vector of float)
+0:47 'modfOut' (temp mediump 3-component vector of float)
+0:49 Sequence
+0:49 move second child to first child (temp mediump float)
+0:49 't' (temp mediump float)
+0:49 trunc (global mediump float)
+0:49 'f' (global mediump float)
+0:50 Sequence
+0:50 move second child to first child (temp mediump 2-component vector of float)
+0:50 'v12' (temp mediump 2-component vector of float)
+0:50 round (global mediump 2-component vector of float)
+0:50 'v2a' (global mediump 2-component vector of float)
+0:51 Sequence
+0:51 move second child to first child (temp mediump 2-component vector of float)
+0:51 'v13' (temp mediump 2-component vector of float)
+0:51 roundEven (global mediump 2-component vector of float)
+0:51 'v2a' (global mediump 2-component vector of float)
+0:52 Sequence
+0:52 move second child to first child (temp 2-component vector of bool)
+0:52 'b10' (temp 2-component vector of bool)
+0:52 isnan (global 2-component vector of bool)
+0:52 'v2a' (global mediump 2-component vector of float)
+0:53 Sequence
+0:53 move second child to first child (temp 4-component vector of bool)
+0:53 'b11' (temp 4-component vector of bool)
+0:53 isinf (global 4-component vector of bool)
+0:53 'v4' (global mediump 4-component vector of float)
+0:56 Sequence
+0:56 move second child to first child (temp mediump int)
+0:56 'i' (temp mediump int)
+0:56 floatBitsToInt (global mediump int)
+0:56 'f' (global mediump float)
+0:57 Sequence
+0:57 move second child to first child (temp mediump 4-component vector of uint)
+0:57 'uv11' (temp mediump 4-component vector of uint)
+0:57 floatBitsToUint (global mediump 4-component vector of uint)
+0:57 'v4' (global mediump 4-component vector of float)
+0:58 Sequence
+0:58 move second child to first child (temp mediump 4-component vector of float)
+0:58 'v14' (temp mediump 4-component vector of float)
+0:58 intBitsToFloat (global mediump 4-component vector of float)
+0:58 'iv4a' (global mediump 4-component vector of int)
+0:59 Sequence
+0:59 move second child to first child (temp mediump 2-component vector of float)
+0:59 'v15' (temp mediump 2-component vector of float)
+0:59 uintBitsToFloat (global mediump 2-component vector of float)
+0:59 'uv2c' (global mediump 2-component vector of uint)
+0:62 Sequence
+0:62 move second child to first child (temp highp uint)
+0:62 'u19' (temp mediump uint)
+0:62 packSnorm2x16 (global highp uint)
+0:62 'v2a' (global mediump 2-component vector of float)
+0:63 Sequence
+0:63 move second child to first child (temp highp 2-component vector of float)
+0:63 'v20' (temp mediump 2-component vector of float)
+0:63 unpackSnorm2x16 (global highp 2-component vector of float)
+0:63 'uy' (global mediump uint)
+0:64 Sequence
+0:64 move second child to first child (temp highp uint)
+0:64 'u15' (temp mediump uint)
+0:64 packUnorm2x16 (global highp uint)
+0:64 'v2a' (global mediump 2-component vector of float)
+0:65 Sequence
+0:65 move second child to first child (temp highp 2-component vector of float)
+0:65 'v16' (temp mediump 2-component vector of float)
+0:65 unpackUnorm2x16 (global highp 2-component vector of float)
+0:65 'uy' (global mediump uint)
+0:66 Sequence
+0:66 move second child to first child (temp highp uint)
+0:66 'u17' (temp mediump uint)
+0:66 packHalf2x16 (global highp uint)
+0:66 'v2b' (global mediump 2-component vector of float)
+0:67 Sequence
+0:67 move second child to first child (temp mediump 2-component vector of float)
+0:67 'v18' (temp mediump 2-component vector of float)
+0:67 unpackHalf2x16 (global mediump 2-component vector of float)
+0:67 'uy' (global mediump uint)
+0:70 Constant:
+0:70 0.000000
+0:? Linker Objects
+0:? 'imax' (global mediump int)
+0:? 'imin' (global mediump int)
+0:? 'umax' (global mediump uint)
+0:? 'umin' (global mediump uint)
+0:? 'x' (global mediump 3-component vector of float)
+0:? 'y' (global mediump 3-component vector of float)
+0:? 'bv' (global 3-component vector of bool)
+0:? 'uy' (global mediump uint)
+0:? 'uv2c' (global mediump 2-component vector of uint)
+0:? 'uv2y' (global mediump 2-component vector of uint)
+0:? 'uv2x' (global mediump 2-component vector of uint)
+0:? 'uv4y' (global mediump 4-component vector of uint)
+0:? 'iv3a' (global mediump 3-component vector of int)
+0:? 'iv3b' (global mediump 3-component vector of int)
+0:? 'iv4a' (global mediump 4-component vector of int)
+0:? 'iv4b' (global mediump 4-component vector of int)
+0:? 'f' (global mediump float)
+0:? 'v2a' (global mediump 2-component vector of float)
+0:? 'v2b' (global mediump 2-component vector of float)
+0:? 'v4' (global mediump 4-component vector of float)
+
+
+Linked fragment stage:
+
+
+Shader version: 300
+ERROR: node is still EOpNull!
+0:26 Function Definition: main( (global void)
+0:26 Function Parameters:
+0:29 Sequence
+0:29 Sequence
+0:29 move second child to first child (temp mediump 3-component vector of float)
+0:29 'v' (temp mediump 3-component vector of float)
+0:29 mix (global mediump 3-component vector of float)
+0:29 'x' (global mediump 3-component vector of float)
+0:29 'y' (global mediump 3-component vector of float)
+0:29 'bv' (global 3-component vector of bool)
+0:30 Sequence
+0:30 move second child to first child (temp mediump 4-component vector of int)
+0:30 'iv10' (temp mediump 4-component vector of int)
+0:30 Absolute value (global mediump 4-component vector of int)
+0:30 'iv4a' (global mediump 4-component vector of int)
+0:31 Sequence
+0:31 move second child to first child (temp mediump 4-component vector of int)
+0:31 'iv11' (temp mediump 4-component vector of int)
+0:31 Sign (global mediump 4-component vector of int)
+0:31 'iv4a' (global mediump 4-component vector of int)
+0:32 Sequence
+0:32 move second child to first child (temp mediump 4-component vector of int)
+0:32 'iv12' (temp mediump 4-component vector of int)
+0:32 min (global mediump 4-component vector of int)
+0:32 'iv4a' (global mediump 4-component vector of int)
+0:32 'iv4b' (global mediump 4-component vector of int)
+0:33 Sequence
+0:33 move second child to first child (temp mediump 4-component vector of int)
+0:33 'iv13' (temp mediump 4-component vector of int)
+0:33 min (global mediump 4-component vector of int)
+0:33 'iv4a' (global mediump 4-component vector of int)
+0:33 'imin' (global mediump int)
+0:34 Sequence
+0:34 move second child to first child (temp mediump 2-component vector of uint)
+0:34 'u' (temp mediump 2-component vector of uint)
+0:34 min (global mediump 2-component vector of uint)
+0:34 'uv2x' (global mediump 2-component vector of uint)
+0:34 'uv2y' (global mediump 2-component vector of uint)
+0:35 Sequence
+0:35 move second child to first child (temp mediump 4-component vector of uint)
+0:35 'uv' (temp mediump 4-component vector of uint)
+0:35 min (global mediump 4-component vector of uint)
+0:35 'uv4y' (global mediump 4-component vector of uint)
+0:35 'uy' (global mediump uint)
+0:36 Sequence
+0:36 move second child to first child (temp mediump 3-component vector of int)
+0:36 'iv14' (temp mediump 3-component vector of int)
+0:36 max (global mediump 3-component vector of int)
+0:36 'iv3a' (global mediump 3-component vector of int)
+0:36 'iv3b' (global mediump 3-component vector of int)
+0:37 Sequence
+0:37 move second child to first child (temp mediump 4-component vector of int)
+0:37 'iv15' (temp mediump 4-component vector of int)
+0:37 max (global mediump 4-component vector of int)
+0:37 'iv4a' (global mediump 4-component vector of int)
+0:37 'imax' (global mediump int)
+0:38 Sequence
+0:38 move second child to first child (temp mediump 2-component vector of uint)
+0:38 'u10' (temp mediump 2-component vector of uint)
+0:38 max (global mediump 2-component vector of uint)
+0:38 'uv2x' (global mediump 2-component vector of uint)
+0:38 'uv2y' (global mediump 2-component vector of uint)
+0:39 Sequence
+0:39 move second child to first child (temp mediump 2-component vector of uint)
+0:39 'u11' (temp mediump 2-component vector of uint)
+0:39 max (global mediump 2-component vector of uint)
+0:39 'uv2x' (global mediump 2-component vector of uint)
+0:39 'uy' (global mediump uint)
+0:40 Sequence
+0:40 move second child to first child (temp mediump 4-component vector of int)
+0:40 'iv16' (temp mediump 4-component vector of int)
+0:40 clamp (global mediump 4-component vector of int)
+0:40 'iv4a' (global mediump 4-component vector of int)
+0:40 'iv4a' (global mediump 4-component vector of int)
+0:40 'iv4b' (global mediump 4-component vector of int)
+0:41 Sequence
+0:41 move second child to first child (temp mediump 4-component vector of int)
+0:41 'iv17' (temp mediump 4-component vector of int)
+0:41 clamp (global mediump 4-component vector of int)
+0:41 'iv4a' (global mediump 4-component vector of int)
+0:41 'imin' (global mediump int)
+0:41 'imax' (global mediump int)
+0:42 Sequence
+0:42 move second child to first child (temp mediump 2-component vector of uint)
+0:42 'u12' (temp mediump 2-component vector of uint)
+0:42 clamp (global mediump 2-component vector of uint)
+0:42 'uv2x' (global mediump 2-component vector of uint)
+0:42 'uv2y' (global mediump 2-component vector of uint)
+0:42 'uv2c' (global mediump 2-component vector of uint)
+0:43 Sequence
+0:43 move second child to first child (temp mediump 4-component vector of uint)
+0:43 'uv10' (temp mediump 4-component vector of uint)
+0:43 clamp (global mediump 4-component vector of uint)
+0:43 'uv4y' (global mediump 4-component vector of uint)
+0:43 'umin' (global mediump uint)
+0:43 'umax' (global mediump uint)
+0:47 Sequence
+0:47 move second child to first child (temp mediump 3-component vector of float)
+0:47 'v11' (temp mediump 3-component vector of float)
+0:47 modf (global mediump 3-component vector of float)
+0:47 'x' (global mediump 3-component vector of float)
+0:47 'modfOut' (temp mediump 3-component vector of float)
+0:49 Sequence
+0:49 move second child to first child (temp mediump float)
+0:49 't' (temp mediump float)
+0:49 trunc (global mediump float)
+0:49 'f' (global mediump float)
+0:50 Sequence
+0:50 move second child to first child (temp mediump 2-component vector of float)
+0:50 'v12' (temp mediump 2-component vector of float)
+0:50 round (global mediump 2-component vector of float)
+0:50 'v2a' (global mediump 2-component vector of float)
+0:51 Sequence
+0:51 move second child to first child (temp mediump 2-component vector of float)
+0:51 'v13' (temp mediump 2-component vector of float)
+0:51 roundEven (global mediump 2-component vector of float)
+0:51 'v2a' (global mediump 2-component vector of float)
+0:52 Sequence
+0:52 move second child to first child (temp 2-component vector of bool)
+0:52 'b10' (temp 2-component vector of bool)
+0:52 isnan (global 2-component vector of bool)
+0:52 'v2a' (global mediump 2-component vector of float)
+0:53 Sequence
+0:53 move second child to first child (temp 4-component vector of bool)
+0:53 'b11' (temp 4-component vector of bool)
+0:53 isinf (global 4-component vector of bool)
+0:53 'v4' (global mediump 4-component vector of float)
+0:56 Sequence
+0:56 move second child to first child (temp mediump int)
+0:56 'i' (temp mediump int)
+0:56 floatBitsToInt (global mediump int)
+0:56 'f' (global mediump float)
+0:57 Sequence
+0:57 move second child to first child (temp mediump 4-component vector of uint)
+0:57 'uv11' (temp mediump 4-component vector of uint)
+0:57 floatBitsToUint (global mediump 4-component vector of uint)
+0:57 'v4' (global mediump 4-component vector of float)
+0:58 Sequence
+0:58 move second child to first child (temp mediump 4-component vector of float)
+0:58 'v14' (temp mediump 4-component vector of float)
+0:58 intBitsToFloat (global mediump 4-component vector of float)
+0:58 'iv4a' (global mediump 4-component vector of int)
+0:59 Sequence
+0:59 move second child to first child (temp mediump 2-component vector of float)
+0:59 'v15' (temp mediump 2-component vector of float)
+0:59 uintBitsToFloat (global mediump 2-component vector of float)
+0:59 'uv2c' (global mediump 2-component vector of uint)
+0:62 Sequence
+0:62 move second child to first child (temp highp uint)
+0:62 'u19' (temp mediump uint)
+0:62 packSnorm2x16 (global highp uint)
+0:62 'v2a' (global mediump 2-component vector of float)
+0:63 Sequence
+0:63 move second child to first child (temp highp 2-component vector of float)
+0:63 'v20' (temp mediump 2-component vector of float)
+0:63 unpackSnorm2x16 (global highp 2-component vector of float)
+0:63 'uy' (global mediump uint)
+0:64 Sequence
+0:64 move second child to first child (temp highp uint)
+0:64 'u15' (temp mediump uint)
+0:64 packUnorm2x16 (global highp uint)
+0:64 'v2a' (global mediump 2-component vector of float)
+0:65 Sequence
+0:65 move second child to first child (temp highp 2-component vector of float)
+0:65 'v16' (temp mediump 2-component vector of float)
+0:65 unpackUnorm2x16 (global highp 2-component vector of float)
+0:65 'uy' (global mediump uint)
+0:66 Sequence
+0:66 move second child to first child (temp highp uint)
+0:66 'u17' (temp mediump uint)
+0:66 packHalf2x16 (global highp uint)
+0:66 'v2b' (global mediump 2-component vector of float)
+0:67 Sequence
+0:67 move second child to first child (temp mediump 2-component vector of float)
+0:67 'v18' (temp mediump 2-component vector of float)
+0:67 unpackHalf2x16 (global mediump 2-component vector of float)
+0:67 'uy' (global mediump uint)
+0:70 Constant:
+0:70 0.000000
+0:? Linker Objects
+0:? 'imax' (global mediump int)
+0:? 'imin' (global mediump int)
+0:? 'umax' (global mediump uint)
+0:? 'umin' (global mediump uint)
+0:? 'x' (global mediump 3-component vector of float)
+0:? 'y' (global mediump 3-component vector of float)
+0:? 'bv' (global 3-component vector of bool)
+0:? 'uy' (global mediump uint)
+0:? 'uv2c' (global mediump 2-component vector of uint)
+0:? 'uv2y' (global mediump 2-component vector of uint)
+0:? 'uv2x' (global mediump 2-component vector of uint)
+0:? 'uv4y' (global mediump 4-component vector of uint)
+0:? 'iv3a' (global mediump 3-component vector of int)
+0:? 'iv3b' (global mediump 3-component vector of int)
+0:? 'iv4a' (global mediump 4-component vector of int)
+0:? 'iv4b' (global mediump 4-component vector of int)
+0:? 'f' (global mediump float)
+0:? 'v2a' (global mediump 2-component vector of float)
+0:? 'v2b' (global mediump 2-component vector of float)
+0:? 'v4' (global mediump 4-component vector of float)
+
diff --git a/chromium/third_party/glslang/src/Test/baseResults/300block.frag.out b/chromium/third_party/glslang/src/Test/baseResults/300block.frag.out
new file mode 100644
index 00000000000..224bd111b86
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/300block.frag.out
@@ -0,0 +1,153 @@
+300block.frag
+ERROR: 0:10: '' : cannot nest a structure definition inside a structure or block
+ERROR: 0:21: '' : cannot nest a structure definition inside a structure or block
+ERROR: 0:20: 'sampler' : member of block cannot be or contain a sampler, image, or atomic_uint type
+ERROR: 0:24: 'fbs' : member of block cannot be or contain a sampler, image, or atomic_uint type
+ERROR: 0:45: 'variable indexing uniform block array' : not supported for this version or the enabled extensions
+ERROR: 0:46: 'fooBlock' : cannot be used (maybe an instance name is needed)
+ERROR: 0:46: 'fooBlock' : undeclared identifier
+ERROR: 0:47: 'constructor' : not enough data provided for construction
+ERROR: 0:51: 'unreferenced' : cannot be used (maybe an instance name is needed)
+ERROR: 0:51: 'unreferenced' : undeclared identifier
+ERROR: 0:52: '++' : l-value required "s" (can't modify a uniform)
+ERROR: 0:52: '++' : wrong operand type no operation '++' exists that takes an operand of type uniform structure{global mediump 4-component vector of float u, global mediump 4-component vector of uint v, global lowp isampler3D sampler, global mediump 3-component vector of float w, global structure{global mediump int a} t} (or there is no acceptable conversion)
+ERROR: 0:53: '-' : wrong operand types: no operation '-' exists that takes a left-hand operand of type 'layout(column_major shared ) uniform block{layout(column_major shared ) uniform mediump 4-component vector of uint nbv, layout(column_major shared ) uniform mediump int ni}' and a right operand of type 'const int' (or there is no acceptable conversion)
+ERROR: 0:55: 'barBlockArray' : cannot be used (maybe an instance name is needed)
+ERROR: 0:55: 'barBlockArray' : undeclared identifier
+ERROR: 0:55: '*' : wrong operand types: no operation '*' exists that takes a left-hand operand of type 'const int' and a right operand of type 'temp float' (or there is no acceptable conversion)
+ERROR: 0:58: 'fooBlock' : redefinition
+ERROR: 17 compilation errors. No code generated.
+
+
+Shader version: 300
+ERROR: node is still EOpNull!
+0:42 Function Definition: main( (global void)
+0:42 Function Parameters:
+0:44 Sequence
+0:44 texture (global lowp 4-component vector of int)
+0:44 sampler: direct index for structure (global lowp isampler3D)
+0:44 's' (uniform structure{global mediump 4-component vector of float u, global mediump 4-component vector of uint v, global lowp isampler3D sampler, global mediump 3-component vector of float w, global structure{global mediump int a} t})
+0:44 Constant:
+0:44 2 (const int)
+0:44 Construct vec3 (temp lowp 3-component vector of float)
+0:44 Convert int to float (temp lowp float)
+0:44 ni: direct index for structure (layout(column_major shared ) uniform mediump int)
+0:44 'inst' (layout(column_major shared ) uniform block{layout(column_major shared ) uniform mediump 4-component vector of uint nbv, layout(column_major shared ) uniform mediump int ni})
+0:44 Constant:
+0:44 1 (const int)
+0:44 Convert uint to float (temp lowp float)
+0:44 direct index (temp mediump uint)
+0:44 bv: direct index for structure (layout(column_major shared ) uniform mediump 4-component vector of uint)
+0:44 'anon@0' (layout(column_major shared ) uniform block{layout(column_major shared ) uniform mediump 4-component vector of uint bv, layout(column_major shared ) uniform mediump 2X2 matrix of float bm2, layout(column_major shared ) uniform lowp isampler2D sampler, layout(column_major shared ) uniform structure{global mediump int a} t, layout(column_major shared ) uniform structure{global mediump 4-component vector of float u, global mediump 4-component vector of uint v, global lowp isampler3D sampler, global mediump 3-component vector of float w, global structure{global mediump int a} t} fbs})
+0:44 Constant:
+0:44 0 (const uint)
+0:44 Constant:
+0:44 1 (const int)
+0:44 Convert uint to float (temp lowp float)
+0:44 direct index (temp mediump uint)
+0:44 nbv: direct index for structure (layout(column_major shared ) uniform mediump 4-component vector of uint)
+0:44 direct index (layout(column_major shared ) temp block{layout(column_major shared ) uniform mediump 4-component vector of uint nbv, layout(column_major shared ) uniform mediump int ni})
+0:44 'insts' (layout(column_major shared ) uniform 4-element array of block{layout(column_major shared ) uniform mediump 4-component vector of uint nbv, layout(column_major shared ) uniform mediump int ni})
+0:44 Constant:
+0:44 2 (const int)
+0:44 Constant:
+0:44 0 (const int)
+0:44 Constant:
+0:44 2 (const int)
+0:45 indirect index (layout(column_major shared ) temp block{layout(column_major shared ) uniform mediump 4-component vector of uint nbv, layout(column_major shared ) uniform mediump int ni})
+0:45 'insts' (layout(column_major shared ) uniform 4-element array of block{layout(column_major shared ) uniform mediump 4-component vector of uint nbv, layout(column_major shared ) uniform mediump int ni})
+0:45 direct index (temp mediump uint)
+0:45 v: direct index for structure (global mediump 4-component vector of uint)
+0:45 's' (uniform structure{global mediump 4-component vector of float u, global mediump 4-component vector of uint v, global lowp isampler3D sampler, global mediump 3-component vector of float w, global structure{global mediump int a} t})
+0:45 Constant:
+0:45 1 (const int)
+0:45 Constant:
+0:45 0 (const int)
+0:46 'fooBlock' (temp float)
+0:47 Constant:
+0:47 0.000000
+0:50 Construct mat4 (temp 4X4 matrix of float)
+0:50 'barBlock' (temp mediump float)
+0:51 Construct mat4 (temp 4X4 matrix of float)
+0:51 'unreferenced' (temp float)
+0:52 's' (uniform structure{global mediump 4-component vector of float u, global mediump 4-component vector of uint v, global lowp isampler3D sampler, global mediump 3-component vector of float w, global structure{global mediump int a} t})
+0:53 'inst' (layout(column_major shared ) uniform block{layout(column_major shared ) uniform mediump 4-component vector of uint nbv, layout(column_major shared ) uniform mediump int ni})
+0:54 Pre-Increment (temp mediump float)
+0:54 'barBlock' (temp mediump float)
+0:55 Constant:
+0:55 2 (const int)
+0:? Linker Objects
+0:? 's' (uniform structure{global mediump 4-component vector of float u, global mediump 4-component vector of uint v, global lowp isampler3D sampler, global mediump 3-component vector of float w, global structure{global mediump int a} t})
+0:? 'anon@0' (layout(column_major shared ) uniform block{layout(column_major shared ) uniform mediump 4-component vector of uint bv, layout(column_major shared ) uniform mediump 2X2 matrix of float bm2, layout(column_major shared ) uniform lowp isampler2D sampler, layout(column_major shared ) uniform structure{global mediump int a} t, layout(column_major shared ) uniform structure{global mediump 4-component vector of float u, global mediump 4-component vector of uint v, global lowp isampler3D sampler, global mediump 3-component vector of float w, global structure{global mediump int a} t} fbs})
+0:? 'inst' (layout(column_major shared ) uniform block{layout(column_major shared ) uniform mediump 4-component vector of uint nbv, layout(column_major shared ) uniform mediump int ni})
+0:? 'insts' (layout(column_major shared ) uniform 4-element array of block{layout(column_major shared ) uniform mediump 4-component vector of uint nbv, layout(column_major shared ) uniform mediump int ni})
+0:? 'anon@1' (layout(column_major shared ) uniform block{layout(column_major shared ) uniform mediump float f, layout(column_major shared ) uniform mediump uint u})
+
+
+Linked fragment stage:
+
+
+Shader version: 300
+ERROR: node is still EOpNull!
+0:42 Function Definition: main( (global void)
+0:42 Function Parameters:
+0:44 Sequence
+0:44 texture (global lowp 4-component vector of int)
+0:44 sampler: direct index for structure (global lowp isampler3D)
+0:44 's' (uniform structure{global mediump 4-component vector of float u, global mediump 4-component vector of uint v, global lowp isampler3D sampler, global mediump 3-component vector of float w, global structure{global mediump int a} t})
+0:44 Constant:
+0:44 2 (const int)
+0:44 Construct vec3 (temp lowp 3-component vector of float)
+0:44 Convert int to float (temp lowp float)
+0:44 ni: direct index for structure (layout(column_major shared ) uniform mediump int)
+0:44 'inst' (layout(column_major shared ) uniform block{layout(column_major shared ) uniform mediump 4-component vector of uint nbv, layout(column_major shared ) uniform mediump int ni})
+0:44 Constant:
+0:44 1 (const int)
+0:44 Convert uint to float (temp lowp float)
+0:44 direct index (temp mediump uint)
+0:44 bv: direct index for structure (layout(column_major shared ) uniform mediump 4-component vector of uint)
+0:44 'anon@0' (layout(column_major shared ) uniform block{layout(column_major shared ) uniform mediump 4-component vector of uint bv, layout(column_major shared ) uniform mediump 2X2 matrix of float bm2, layout(column_major shared ) uniform lowp isampler2D sampler, layout(column_major shared ) uniform structure{global mediump int a} t, layout(column_major shared ) uniform structure{global mediump 4-component vector of float u, global mediump 4-component vector of uint v, global lowp isampler3D sampler, global mediump 3-component vector of float w, global structure{global mediump int a} t} fbs})
+0:44 Constant:
+0:44 0 (const uint)
+0:44 Constant:
+0:44 1 (const int)
+0:44 Convert uint to float (temp lowp float)
+0:44 direct index (temp mediump uint)
+0:44 nbv: direct index for structure (layout(column_major shared ) uniform mediump 4-component vector of uint)
+0:44 direct index (layout(column_major shared ) temp block{layout(column_major shared ) uniform mediump 4-component vector of uint nbv, layout(column_major shared ) uniform mediump int ni})
+0:44 'insts' (layout(column_major shared ) uniform 4-element array of block{layout(column_major shared ) uniform mediump 4-component vector of uint nbv, layout(column_major shared ) uniform mediump int ni})
+0:44 Constant:
+0:44 2 (const int)
+0:44 Constant:
+0:44 0 (const int)
+0:44 Constant:
+0:44 2 (const int)
+0:45 indirect index (layout(column_major shared ) temp block{layout(column_major shared ) uniform mediump 4-component vector of uint nbv, layout(column_major shared ) uniform mediump int ni})
+0:45 'insts' (layout(column_major shared ) uniform 4-element array of block{layout(column_major shared ) uniform mediump 4-component vector of uint nbv, layout(column_major shared ) uniform mediump int ni})
+0:45 direct index (temp mediump uint)
+0:45 v: direct index for structure (global mediump 4-component vector of uint)
+0:45 's' (uniform structure{global mediump 4-component vector of float u, global mediump 4-component vector of uint v, global lowp isampler3D sampler, global mediump 3-component vector of float w, global structure{global mediump int a} t})
+0:45 Constant:
+0:45 1 (const int)
+0:45 Constant:
+0:45 0 (const int)
+0:46 'fooBlock' (temp float)
+0:47 Constant:
+0:47 0.000000
+0:50 Construct mat4 (temp 4X4 matrix of float)
+0:50 'barBlock' (temp mediump float)
+0:51 Construct mat4 (temp 4X4 matrix of float)
+0:51 'unreferenced' (temp float)
+0:52 's' (uniform structure{global mediump 4-component vector of float u, global mediump 4-component vector of uint v, global lowp isampler3D sampler, global mediump 3-component vector of float w, global structure{global mediump int a} t})
+0:53 'inst' (layout(column_major shared ) uniform block{layout(column_major shared ) uniform mediump 4-component vector of uint nbv, layout(column_major shared ) uniform mediump int ni})
+0:54 Pre-Increment (temp mediump float)
+0:54 'barBlock' (temp mediump float)
+0:55 Constant:
+0:55 2 (const int)
+0:? Linker Objects
+0:? 's' (uniform structure{global mediump 4-component vector of float u, global mediump 4-component vector of uint v, global lowp isampler3D sampler, global mediump 3-component vector of float w, global structure{global mediump int a} t})
+0:? 'anon@0' (layout(column_major shared ) uniform block{layout(column_major shared ) uniform mediump 4-component vector of uint bv, layout(column_major shared ) uniform mediump 2X2 matrix of float bm2, layout(column_major shared ) uniform lowp isampler2D sampler, layout(column_major shared ) uniform structure{global mediump int a} t, layout(column_major shared ) uniform structure{global mediump 4-component vector of float u, global mediump 4-component vector of uint v, global lowp isampler3D sampler, global mediump 3-component vector of float w, global structure{global mediump int a} t} fbs})
+0:? 'inst' (layout(column_major shared ) uniform block{layout(column_major shared ) uniform mediump 4-component vector of uint nbv, layout(column_major shared ) uniform mediump int ni})
+0:? 'insts' (layout(column_major shared ) uniform 4-element array of block{layout(column_major shared ) uniform mediump 4-component vector of uint nbv, layout(column_major shared ) uniform mediump int ni})
+0:? 'anon@1' (layout(column_major shared ) uniform block{layout(column_major shared ) uniform mediump float f, layout(column_major shared ) uniform mediump uint u})
+
diff --git a/chromium/third_party/glslang/src/Test/baseResults/300layout.frag.out b/chromium/third_party/glslang/src/Test/baseResults/300layout.frag.out
new file mode 100644
index 00000000000..62a0b367d74
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/300layout.frag.out
@@ -0,0 +1,69 @@
+300layout.frag
+ERROR: 0:4: 'location qualifier on input' : not supported in this stage: fragment
+ERROR: 0:4: 'location qualifier on input' : not supported for this version or the enabled extensions
+ERROR: 0:17: 'location' : too large for fragment output
+ERROR: 0:18: 'location' : too large for fragment output
+ERROR: 0:18: 'location' : overlapping use of location 41
+ERROR: 0:19: 'location' : too large for fragment output
+ERROR: 0:19: 'location' : overlapping use of location 40
+ERROR: 7 compilation errors. No code generated.
+
+
+Shader version: 300
+ERROR: node is still EOpNull!
+0:10 Function Definition: main( (global void)
+0:10 Function Parameters:
+0:12 Sequence
+0:12 move second child to first child (temp mediump 4-component vector of float)
+0:12 'c' (layout(location=1 ) out mediump 4-component vector of float)
+0:12 'color' (layout(location=2 ) smooth in mediump 4-component vector of float)
+0:13 move second child to first child (temp mediump 4-component vector of float)
+0:13 'p' (layout(location=3 ) out mediump 4-component vector of float)
+0:13 'pos' (smooth in mediump 4-component vector of float)
+0:14 move second child to first child (temp mediump 4-component vector of float)
+0:14 direct index (layout(location=4 ) temp mediump 4-component vector of float)
+0:14 'q' (layout(location=4 ) out 2-element array of mediump 4-component vector of float)
+0:14 Constant:
+0:14 1 (const int)
+0:14 'pos' (smooth in mediump 4-component vector of float)
+0:? Linker Objects
+0:? 'pos' (smooth in mediump 4-component vector of float)
+0:? 'color' (layout(location=2 ) smooth in mediump 4-component vector of float)
+0:? 'c' (layout(location=1 ) out mediump 4-component vector of float)
+0:? 'p' (layout(location=3 ) out mediump 4-component vector of float)
+0:? 'q' (layout(location=4 ) out 2-element array of mediump 4-component vector of float)
+0:? 'ca' (layout(location=40 ) out 4-element array of mediump float)
+0:? 'cb' (layout(location=41 ) out 2-element array of mediump float)
+0:? 'cc' (layout(location=39 ) out 6-element array of mediump float)
+
+
+Linked fragment stage:
+
+
+Shader version: 300
+ERROR: node is still EOpNull!
+0:10 Function Definition: main( (global void)
+0:10 Function Parameters:
+0:12 Sequence
+0:12 move second child to first child (temp mediump 4-component vector of float)
+0:12 'c' (layout(location=1 ) out mediump 4-component vector of float)
+0:12 'color' (layout(location=2 ) smooth in mediump 4-component vector of float)
+0:13 move second child to first child (temp mediump 4-component vector of float)
+0:13 'p' (layout(location=3 ) out mediump 4-component vector of float)
+0:13 'pos' (smooth in mediump 4-component vector of float)
+0:14 move second child to first child (temp mediump 4-component vector of float)
+0:14 direct index (layout(location=4 ) temp mediump 4-component vector of float)
+0:14 'q' (layout(location=4 ) out 2-element array of mediump 4-component vector of float)
+0:14 Constant:
+0:14 1 (const int)
+0:14 'pos' (smooth in mediump 4-component vector of float)
+0:? Linker Objects
+0:? 'pos' (smooth in mediump 4-component vector of float)
+0:? 'color' (layout(location=2 ) smooth in mediump 4-component vector of float)
+0:? 'c' (layout(location=1 ) out mediump 4-component vector of float)
+0:? 'p' (layout(location=3 ) out mediump 4-component vector of float)
+0:? 'q' (layout(location=4 ) out 2-element array of mediump 4-component vector of float)
+0:? 'ca' (layout(location=40 ) out 4-element array of mediump float)
+0:? 'cb' (layout(location=41 ) out 2-element array of mediump float)
+0:? 'cc' (layout(location=39 ) out 6-element array of mediump float)
+
diff --git a/chromium/third_party/glslang/src/Test/baseResults/300layout.vert.out b/chromium/third_party/glslang/src/Test/baseResults/300layout.vert.out
new file mode 100644
index 00000000000..f69a989b1ff
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/300layout.vert.out
@@ -0,0 +1,147 @@
+300layout.vert
+ERROR: 0:7: 'vertex input arrays' : not supported with this profile: es
+ERROR: 0:8: 'in' : cannot be a structure or array
+ERROR: 0:8: 'vertex input arrays' : not supported with this profile: es
+ERROR: 0:8: 'location' : overlapping use of location 10
+ERROR: 0:12: 'layout' : cannot specify matrix layout on a variable declaration
+ERROR: 0:12: 'layout' : cannot specify packing on a variable declaration
+ERROR: 0:19: 'badf' : member of uniform or buffer block cannot have an auxiliary or interpolation qualifier
+ERROR: 0:20: 'badg' : member storage qualifier cannot contradict block storage qualifier
+ERROR: 0:21: 'bad1' : member of block cannot have a packing layout qualifier
+ERROR: 0:22: 'bad2' : member of block cannot have a packing layout qualifier
+ERROR: 0:23: 'bad3' : member of block cannot have a packing layout qualifier
+ERROR: 0:31: 'T3' : nameless block contains a member that already has a name at global scope
+ERROR: 0:38: 'vertex output block' : not supported for this version or the enabled extensions
+ERROR: 0:42: 'location qualifier on output' : not supported in this stage: vertex
+ERROR: 0:42: 'location qualifier on output' : not supported for this version or the enabled extensions
+ERROR: 0:50: 'shared' : not supported for this version or the enabled extensions
+ERROR: 0:50: 'shared' : not supported in this stage: vertex
+ERROR: 0:54: 'layout' : cannot specify packing on a variable declaration
+ERROR: 0:57: 'location' : overlapping use of location 40
+ERROR: 19 compilation errors. No code generated.
+
+
+Shader version: 300
+ERROR: node is still EOpNull!
+0:44 Function Definition: main( (global void)
+0:44 Function Parameters:
+0:46 Sequence
+0:46 move second child to first child (temp highp 4-component vector of float)
+0:46 'pos' (smooth out highp 4-component vector of float)
+0:46 vector-times-matrix (temp highp 4-component vector of float)
+0:46 'p' (layout(location=3 ) in highp 4-component vector of float)
+0:46 add (temp highp 4X4 matrix of float)
+0:46 add (temp highp 4X4 matrix of float)
+0:46 add (temp highp 4X4 matrix of float)
+0:46 add (temp highp 4X4 matrix of float)
+0:46 M1: direct index for structure (layout(row_major std140 offset=0 ) uniform highp 4X4 matrix of float)
+0:46 'tblock' (layout(row_major std140 ) uniform block{layout(row_major std140 offset=0 ) uniform highp 4X4 matrix of float M1, layout(column_major std140 offset=64 ) uniform highp 4X4 matrix of float M2, layout(row_major std140 offset=128 ) uniform highp 3X3 matrix of float N1, layout(row_major std140 offset=176 ) centroid uniform highp float badf, layout(row_major std140 offset=180 ) uniform highp float badg, layout(row_major std140 offset=184 ) uniform highp float bad1, layout(row_major shared offset=188 ) uniform highp float bad2, layout(row_major packed offset=192 ) uniform highp float bad3})
+0:46 Constant:
+0:46 0 (const int)
+0:46 M2: direct index for structure (layout(column_major std140 offset=64 ) uniform highp 4X4 matrix of float)
+0:46 'tblock' (layout(row_major std140 ) uniform block{layout(row_major std140 offset=0 ) uniform highp 4X4 matrix of float M1, layout(column_major std140 offset=64 ) uniform highp 4X4 matrix of float M2, layout(row_major std140 offset=128 ) uniform highp 3X3 matrix of float N1, layout(row_major std140 offset=176 ) centroid uniform highp float badf, layout(row_major std140 offset=180 ) uniform highp float badg, layout(row_major std140 offset=184 ) uniform highp float bad1, layout(row_major shared offset=188 ) uniform highp float bad2, layout(row_major packed offset=192 ) uniform highp float bad3})
+0:46 Constant:
+0:46 1 (const int)
+0:46 M4: direct index for structure (layout(row_major shared ) uniform highp 4X4 matrix of float)
+0:46 'anon@1' (layout(column_major shared ) uniform block{layout(column_major shared ) uniform highp 4X4 matrix of float M3, layout(row_major shared ) uniform highp 4X4 matrix of float M4, layout(column_major shared ) uniform highp 3X3 matrix of float N2, layout(column_major shared ) uniform highp int b})
+0:46 Constant:
+0:46 1 (const uint)
+0:46 M3: direct index for structure (layout(column_major shared ) uniform highp 4X4 matrix of float)
+0:46 'anon@1' (layout(column_major shared ) uniform block{layout(column_major shared ) uniform highp 4X4 matrix of float M3, layout(row_major shared ) uniform highp 4X4 matrix of float M4, layout(column_major shared ) uniform highp 3X3 matrix of float N2, layout(column_major shared ) uniform highp int b})
+0:46 Constant:
+0:46 0 (const uint)
+0:46 t2m: direct index for structure (layout(row_major shared ) uniform highp 4X4 matrix of float)
+0:46 'anon@0' (layout(row_major shared ) uniform block{layout(row_major shared ) uniform bool b, layout(row_major shared ) uniform highp 4X4 matrix of float t2m})
+0:46 Constant:
+0:46 1 (const uint)
+0:47 move second child to first child (temp highp 3-component vector of float)
+0:47 'color' (smooth out highp 3-component vector of float)
+0:47 vector-times-matrix (temp highp 3-component vector of float)
+0:47 'c' (layout(location=7 ) in highp 3-component vector of float)
+0:47 N1: direct index for structure (layout(row_major std140 offset=128 ) uniform highp 3X3 matrix of float)
+0:47 'tblock' (layout(row_major std140 ) uniform block{layout(row_major std140 offset=0 ) uniform highp 4X4 matrix of float M1, layout(column_major std140 offset=64 ) uniform highp 4X4 matrix of float M2, layout(row_major std140 offset=128 ) uniform highp 3X3 matrix of float N1, layout(row_major std140 offset=176 ) centroid uniform highp float badf, layout(row_major std140 offset=180 ) uniform highp float badg, layout(row_major std140 offset=184 ) uniform highp float bad1, layout(row_major shared offset=188 ) uniform highp float bad2, layout(row_major packed offset=192 ) uniform highp float bad3})
+0:47 Constant:
+0:47 2 (const int)
+0:? Linker Objects
+0:? 'c' (layout(location=7 ) in highp 3-component vector of float)
+0:? 'p' (layout(location=3 ) in highp 4-component vector of float)
+0:? 'q' (layout(location=9 ) in 4-element array of highp 4-component vector of float)
+0:? 'r' (layout(location=10 ) in 4-element array of structure{global highp 4-component vector of float v})
+0:? 'pos' (smooth out highp 4-component vector of float)
+0:? 'color' (smooth out highp 3-component vector of float)
+0:? 'badm4' (layout(column_major shared ) uniform highp 4X4 matrix of float)
+0:? 'tblock' (layout(row_major std140 ) uniform block{layout(row_major std140 offset=0 ) uniform highp 4X4 matrix of float M1, layout(column_major std140 offset=64 ) uniform highp 4X4 matrix of float M2, layout(row_major std140 offset=128 ) uniform highp 3X3 matrix of float N1, layout(row_major std140 offset=176 ) centroid uniform highp float badf, layout(row_major std140 offset=180 ) uniform highp float badg, layout(row_major std140 offset=184 ) uniform highp float bad1, layout(row_major shared offset=188 ) uniform highp float bad2, layout(row_major packed offset=192 ) uniform highp float bad3})
+0:? 'anon@0' (layout(row_major shared ) uniform block{layout(row_major shared ) uniform bool b, layout(row_major shared ) uniform highp 4X4 matrix of float t2m})
+0:? 'anon@2' (out block{out highp float f})
+0:? 'badoutA' (layout(location=10 ) smooth out highp 4-component vector of float)
+0:? 'compute_only' (shared highp 4-component vector of float)
+0:? 'aoeuntaoeu' (layout(packed ) uniform highp float)
+0:? 'cd' (layout(location=40 ) in highp float)
+0:? 'ce' (layout(location=37 ) in highp 4X3 matrix of float)
+0:? 'gl_VertexID' (gl_VertexId highp int VertexId)
+0:? 'gl_InstanceID' (gl_InstanceId highp int InstanceId)
+
+
+Linked vertex stage:
+
+
+Shader version: 300
+ERROR: node is still EOpNull!
+0:44 Function Definition: main( (global void)
+0:44 Function Parameters:
+0:46 Sequence
+0:46 move second child to first child (temp highp 4-component vector of float)
+0:46 'pos' (smooth out highp 4-component vector of float)
+0:46 vector-times-matrix (temp highp 4-component vector of float)
+0:46 'p' (layout(location=3 ) in highp 4-component vector of float)
+0:46 add (temp highp 4X4 matrix of float)
+0:46 add (temp highp 4X4 matrix of float)
+0:46 add (temp highp 4X4 matrix of float)
+0:46 add (temp highp 4X4 matrix of float)
+0:46 M1: direct index for structure (layout(row_major std140 offset=0 ) uniform highp 4X4 matrix of float)
+0:46 'tblock' (layout(row_major std140 ) uniform block{layout(row_major std140 offset=0 ) uniform highp 4X4 matrix of float M1, layout(column_major std140 offset=64 ) uniform highp 4X4 matrix of float M2, layout(row_major std140 offset=128 ) uniform highp 3X3 matrix of float N1, layout(row_major std140 offset=176 ) centroid uniform highp float badf, layout(row_major std140 offset=180 ) uniform highp float badg, layout(row_major std140 offset=184 ) uniform highp float bad1, layout(row_major shared offset=188 ) uniform highp float bad2, layout(row_major packed offset=192 ) uniform highp float bad3})
+0:46 Constant:
+0:46 0 (const int)
+0:46 M2: direct index for structure (layout(column_major std140 offset=64 ) uniform highp 4X4 matrix of float)
+0:46 'tblock' (layout(row_major std140 ) uniform block{layout(row_major std140 offset=0 ) uniform highp 4X4 matrix of float M1, layout(column_major std140 offset=64 ) uniform highp 4X4 matrix of float M2, layout(row_major std140 offset=128 ) uniform highp 3X3 matrix of float N1, layout(row_major std140 offset=176 ) centroid uniform highp float badf, layout(row_major std140 offset=180 ) uniform highp float badg, layout(row_major std140 offset=184 ) uniform highp float bad1, layout(row_major shared offset=188 ) uniform highp float bad2, layout(row_major packed offset=192 ) uniform highp float bad3})
+0:46 Constant:
+0:46 1 (const int)
+0:46 M4: direct index for structure (layout(row_major shared ) uniform highp 4X4 matrix of float)
+0:46 'anon@1' (layout(column_major shared ) uniform block{layout(column_major shared ) uniform highp 4X4 matrix of float M3, layout(row_major shared ) uniform highp 4X4 matrix of float M4, layout(column_major shared ) uniform highp 3X3 matrix of float N2, layout(column_major shared ) uniform highp int b})
+0:46 Constant:
+0:46 1 (const uint)
+0:46 M3: direct index for structure (layout(column_major shared ) uniform highp 4X4 matrix of float)
+0:46 'anon@1' (layout(column_major shared ) uniform block{layout(column_major shared ) uniform highp 4X4 matrix of float M3, layout(row_major shared ) uniform highp 4X4 matrix of float M4, layout(column_major shared ) uniform highp 3X3 matrix of float N2, layout(column_major shared ) uniform highp int b})
+0:46 Constant:
+0:46 0 (const uint)
+0:46 t2m: direct index for structure (layout(row_major shared ) uniform highp 4X4 matrix of float)
+0:46 'anon@0' (layout(row_major shared ) uniform block{layout(row_major shared ) uniform bool b, layout(row_major shared ) uniform highp 4X4 matrix of float t2m})
+0:46 Constant:
+0:46 1 (const uint)
+0:47 move second child to first child (temp highp 3-component vector of float)
+0:47 'color' (smooth out highp 3-component vector of float)
+0:47 vector-times-matrix (temp highp 3-component vector of float)
+0:47 'c' (layout(location=7 ) in highp 3-component vector of float)
+0:47 N1: direct index for structure (layout(row_major std140 offset=128 ) uniform highp 3X3 matrix of float)
+0:47 'tblock' (layout(row_major std140 ) uniform block{layout(row_major std140 offset=0 ) uniform highp 4X4 matrix of float M1, layout(column_major std140 offset=64 ) uniform highp 4X4 matrix of float M2, layout(row_major std140 offset=128 ) uniform highp 3X3 matrix of float N1, layout(row_major std140 offset=176 ) centroid uniform highp float badf, layout(row_major std140 offset=180 ) uniform highp float badg, layout(row_major std140 offset=184 ) uniform highp float bad1, layout(row_major shared offset=188 ) uniform highp float bad2, layout(row_major packed offset=192 ) uniform highp float bad3})
+0:47 Constant:
+0:47 2 (const int)
+0:? Linker Objects
+0:? 'c' (layout(location=7 ) in highp 3-component vector of float)
+0:? 'p' (layout(location=3 ) in highp 4-component vector of float)
+0:? 'q' (layout(location=9 ) in 4-element array of highp 4-component vector of float)
+0:? 'r' (layout(location=10 ) in 4-element array of structure{global highp 4-component vector of float v})
+0:? 'pos' (smooth out highp 4-component vector of float)
+0:? 'color' (smooth out highp 3-component vector of float)
+0:? 'badm4' (layout(column_major shared ) uniform highp 4X4 matrix of float)
+0:? 'tblock' (layout(row_major std140 ) uniform block{layout(row_major std140 offset=0 ) uniform highp 4X4 matrix of float M1, layout(column_major std140 offset=64 ) uniform highp 4X4 matrix of float M2, layout(row_major std140 offset=128 ) uniform highp 3X3 matrix of float N1, layout(row_major std140 offset=176 ) centroid uniform highp float badf, layout(row_major std140 offset=180 ) uniform highp float badg, layout(row_major std140 offset=184 ) uniform highp float bad1, layout(row_major shared offset=188 ) uniform highp float bad2, layout(row_major packed offset=192 ) uniform highp float bad3})
+0:? 'anon@0' (layout(row_major shared ) uniform block{layout(row_major shared ) uniform bool b, layout(row_major shared ) uniform highp 4X4 matrix of float t2m})
+0:? 'anon@2' (out block{out highp float f})
+0:? 'badoutA' (layout(location=10 ) smooth out highp 4-component vector of float)
+0:? 'compute_only' (shared highp 4-component vector of float)
+0:? 'aoeuntaoeu' (layout(packed ) uniform highp float)
+0:? 'cd' (layout(location=40 ) in highp float)
+0:? 'ce' (layout(location=37 ) in highp 4X3 matrix of float)
+0:? 'gl_VertexID' (gl_VertexId highp int VertexId)
+0:? 'gl_InstanceID' (gl_InstanceId highp int InstanceId)
+
diff --git a/chromium/third_party/glslang/src/Test/baseResults/300link.frag.out b/chromium/third_party/glslang/src/Test/baseResults/300link.frag.out
new file mode 100644
index 00000000000..0713d3df45c
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/300link.frag.out
@@ -0,0 +1,22 @@
+300link.frag
+Shader version: 300
+0:? Sequence
+0:8 Function Definition: main( (global void)
+0:8 Function Parameters:
+0:? Linker Objects
+0:? 'color1' (out highp 4-component vector of float)
+0:? 'color2' (out highp 4-component vector of float)
+
+
+Linked fragment stage:
+
+ERROR: Linking fragment stage: when more than one fragment shader output, all must have location qualifiers
+
+Shader version: 300
+0:? Sequence
+0:8 Function Definition: main( (global void)
+0:8 Function Parameters:
+0:? Linker Objects
+0:? 'color1' (out highp 4-component vector of float)
+0:? 'color2' (out highp 4-component vector of float)
+
diff --git a/chromium/third_party/glslang/src/Test/baseResults/300link2.frag.out b/chromium/third_party/glslang/src/Test/baseResults/300link2.frag.out
new file mode 100644
index 00000000000..aaf71dc4c15
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/300link2.frag.out
@@ -0,0 +1,25 @@
+300link2.frag
+Shader version: 300
+0:? Sequence
+0:9 Function Definition: main( (global void)
+0:9 Function Parameters:
+0:? Linker Objects
+0:? 'pos' (smooth in mediump 4-component vector of float)
+0:? 'c' (layout(location=1 ) out mediump 4-component vector of float)
+0:? 'p' (layout(location=5 ) out mediump 4-component vector of float)
+0:? 'q' (layout(location=9 ) out 2-element array of mediump 4-component vector of float)
+
+
+Linked fragment stage:
+
+
+Shader version: 300
+0:? Sequence
+0:9 Function Definition: main( (global void)
+0:9 Function Parameters:
+0:? Linker Objects
+0:? 'pos' (smooth in mediump 4-component vector of float)
+0:? 'c' (layout(location=1 ) out mediump 4-component vector of float)
+0:? 'p' (layout(location=5 ) out mediump 4-component vector of float)
+0:? 'q' (layout(location=9 ) out 2-element array of mediump 4-component vector of float)
+
diff --git a/chromium/third_party/glslang/src/Test/baseResults/300link3.frag.out b/chromium/third_party/glslang/src/Test/baseResults/300link3.frag.out
new file mode 100644
index 00000000000..3224695121e
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/300link3.frag.out
@@ -0,0 +1,19 @@
+300link3.frag
+Shader version: 300
+0:? Sequence
+0:7 Function Definition: main( (global void)
+0:7 Function Parameters:
+0:? Linker Objects
+0:? 'color1' (out highp 4-component vector of float)
+
+
+Linked fragment stage:
+
+
+Shader version: 300
+0:? Sequence
+0:7 Function Definition: main( (global void)
+0:7 Function Parameters:
+0:? Linker Objects
+0:? 'color1' (out highp 4-component vector of float)
+
diff --git a/chromium/third_party/glslang/src/Test/baseResults/300operations.frag.out b/chromium/third_party/glslang/src/Test/baseResults/300operations.frag.out
new file mode 100644
index 00000000000..ff7663e93ef
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/300operations.frag.out
@@ -0,0 +1,420 @@
+300operations.frag
+ERROR: 0:11: 'float' : type requires declaration of default precision qualifier
+ERROR: 0:30: '+' : wrong operand types: no operation '+' exists that takes a left-hand operand of type 'layout(column_major shared ) uniform block{layout(column_major shared ) uniform mediump float f}' and a right operand of type 'layout(column_major shared ) uniform block{layout(column_major shared ) uniform mediump float f}' (or there is no acceptable conversion)
+ERROR: 0:31: '+' : wrong operand types: no operation '+' exists that takes a left-hand operand of type 'global structure{global mediump int i}' and a right operand of type 'global structure{global mediump int i}' (or there is no acceptable conversion)
+ERROR: 0:32: '+' : wrong operand types: no operation '+' exists that takes a left-hand operand of type 'temp mediump int' and a right operand of type 'temp mediump float' (or there is no acceptable conversion)
+ERROR: 0:33: '+' : wrong operand types: no operation '+' exists that takes a left-hand operand of type 'temp mediump uint' and a right operand of type 'temp mediump float' (or there is no acceptable conversion)
+ERROR: 0:34: '+' : wrong operand types: no operation '+' exists that takes a left-hand operand of type 'temp mediump uint' and a right operand of type 'temp mediump int' (or there is no acceptable conversion)
+ERROR: 0:35: 'assign' : cannot convert from 'temp mediump 4-component vector of int' to 'temp mediump 3-component vector of int'
+ERROR: 0:36: '/' : wrong operand types: no operation '/' exists that takes a left-hand operand of type 'temp mediump 4-component vector of int' and a right operand of type 'temp mediump 4-component vector of uint' (or there is no acceptable conversion)
+ERROR: 0:37: '-' : wrong operand types: no operation '-' exists that takes a left-hand operand of type 'temp mediump int' and a right operand of type 'temp mediump 3-component vector of float' (or there is no acceptable conversion)
+ERROR: 0:38: '+' : wrong operand types: no operation '+' exists that takes a left-hand operand of type 'temp mediump 3-component vector of int' and a right operand of type 'temp mediump 3-component vector of uint' (or there is no acceptable conversion)
+ERROR: 0:39: '*' : wrong operand types: no operation '*' exists that takes a left-hand operand of type 'global 5-element array of mediump float' and a right operand of type 'global 5-element array of mediump float' (or there is no acceptable conversion)
+ERROR: 0:40: '/' : wrong operand types: no operation '/' exists that takes a left-hand operand of type 'temp bool' and a right operand of type 'temp bool' (or there is no acceptable conversion)
+ERROR: 0:42: '%' : wrong operand types: no operation '%' exists that takes a left-hand operand of type 'temp mediump float' and a right operand of type 'temp mediump float' (or there is no acceptable conversion)
+ERROR: 0:43: '%' : wrong operand types: no operation '%' exists that takes a left-hand operand of type 'temp mediump int' and a right operand of type 'temp mediump float' (or there is no acceptable conversion)
+ERROR: 0:44: '%' : wrong operand types: no operation '%' exists that takes a left-hand operand of type 'temp mediump float' and a right operand of type 'temp mediump uint' (or there is no acceptable conversion)
+ERROR: 0:45: '++' : l-value required "instanceName" (can't modify a uniform)
+ERROR: 0:45: '++' : wrong operand type no operation '++' exists that takes an operand of type layout(column_major shared ) uniform block{layout(column_major shared ) uniform mediump float f} (or there is no acceptable conversion)
+ERROR: 0:46: '++' : wrong operand type no operation '++' exists that takes an operand of type global structure{global mediump int i} (or there is no acceptable conversion)
+ERROR: 0:47: '--' : wrong operand type no operation '--' exists that takes an operand of type global 5-element array of mediump float (or there is no acceptable conversion)
+ERROR: 0:48: '++' : wrong operand type no operation '++' exists that takes an operand of type temp 3-component vector of bool (or there is no acceptable conversion)
+ERROR: 0:50: '<' : wrong operand types: no operation '<' exists that takes a left-hand operand of type 'temp mediump 3-component vector of int' and a right operand of type 'temp mediump 3-component vector of uint' (or there is no acceptable conversion)
+ERROR: 0:51: '>' : wrong operand types: no operation '>' exists that takes a left-hand operand of type 'temp mediump 2X2 matrix of float' and a right operand of type 'temp mediump 2X2 matrix of float' (or there is no acceptable conversion)
+ERROR: 0:52: '!=' : wrong operand types: no operation '!=' exists that takes a left-hand operand of type 'temp mediump 2X2 matrix of float' and a right operand of type 'temp mediump 4X4 matrix of float' (or there is no acceptable conversion)
+ERROR: 0:53: '>=' : wrong operand types: no operation '>=' exists that takes a left-hand operand of type 'temp mediump int' and a right operand of type 'temp mediump uint' (or there is no acceptable conversion)
+ERROR: 0:54: '<=' : wrong operand types: no operation '<=' exists that takes a left-hand operand of type 'global 5-element array of mediump float' and a right operand of type 'global 5-element array of mediump float' (or there is no acceptable conversion)
+ERROR: 0:55: '>' : wrong operand types: no operation '>' exists that takes a left-hand operand of type 'temp bool' and a right operand of type 'temp bool' (or there is no acceptable conversion)
+ERROR: 0:57: '&&' : wrong operand types: no operation '&&' exists that takes a left-hand operand of type 'temp bool' and a right operand of type 'temp 3-component vector of bool' (or there is no acceptable conversion)
+ERROR: 0:58: '^^' : wrong operand types: no operation '^^' exists that takes a left-hand operand of type 'temp 3-component vector of bool' and a right operand of type 'temp 3-component vector of bool' (or there is no acceptable conversion)
+ERROR: 0:59: '||' : wrong operand types: no operation '||' exists that takes a left-hand operand of type 'temp 3-component vector of bool' and a right operand of type 'temp bool' (or there is no acceptable conversion)
+ERROR: 0:60: '&&' : wrong operand types: no operation '&&' exists that takes a left-hand operand of type 'temp mediump int' and a right operand of type 'temp mediump int' (or there is no acceptable conversion)
+ERROR: 0:61: '||' : wrong operand types: no operation '||' exists that takes a left-hand operand of type 'temp mediump uint' and a right operand of type 'temp mediump uint' (or there is no acceptable conversion)
+ERROR: 0:62: '^^' : wrong operand types: no operation '^^' exists that takes a left-hand operand of type 'temp mediump 2X2 matrix of float' and a right operand of type 'temp mediump 2X2 matrix of float' (or there is no acceptable conversion)
+ERROR: 0:64: '!' : wrong operand type no operation '!' exists that takes an operand of type temp mediump uint (or there is no acceptable conversion)
+ERROR: 0:65: '!' : wrong operand type no operation '!' exists that takes an operand of type temp mediump int (or there is no acceptable conversion)
+ERROR: 0:66: '!' : wrong operand type no operation '!' exists that takes an operand of type temp mediump 2X2 matrix of float (or there is no acceptable conversion)
+ERROR: 0:67: '!' : wrong operand type no operation '!' exists that takes an operand of type temp mediump 3-component vector of float (or there is no acceptable conversion)
+ERROR: 0:68: '!' : wrong operand type no operation '!' exists that takes an operand of type global 5-element array of mediump float (or there is no acceptable conversion)
+ERROR: 0:70: '~' : wrong operand type no operation '~' exists that takes an operand of type temp mediump float (or there is no acceptable conversion)
+ERROR: 0:71: '~' : wrong operand type no operation '~' exists that takes an operand of type temp mediump 4X4 matrix of float (or there is no acceptable conversion)
+ERROR: 0:72: '~' : wrong operand type no operation '~' exists that takes an operand of type temp mediump 3-component vector of float (or there is no acceptable conversion)
+ERROR: 0:73: '~' : wrong operand type no operation '~' exists that takes an operand of type global 5-element array of mediump float (or there is no acceptable conversion)
+ERROR: 0:74: '~' : wrong operand type no operation '~' exists that takes an operand of type layout(column_major shared ) uniform block{layout(column_major shared ) uniform mediump float f} (or there is no acceptable conversion)
+ERROR: 0:76: '<<' : wrong operand types: no operation '<<' exists that takes a left-hand operand of type 'temp mediump int' and a right operand of type 'temp mediump 3-component vector of int' (or there is no acceptable conversion)
+ERROR: 0:77: '<<' : wrong operand types: no operation '<<' exists that takes a left-hand operand of type 'temp mediump uint' and a right operand of type 'temp mediump 3-component vector of uint' (or there is no acceptable conversion)
+ERROR: 0:78: '>>' : wrong operand types: no operation '>>' exists that takes a left-hand operand of type 'temp mediump int' and a right operand of type 'temp mediump float' (or there is no acceptable conversion)
+ERROR: 0:79: '>>' : wrong operand types: no operation '>>' exists that takes a left-hand operand of type 'temp mediump float' and a right operand of type 'temp mediump int' (or there is no acceptable conversion)
+ERROR: 0:80: '>>' : wrong operand types: no operation '>>' exists that takes a left-hand operand of type 'temp mediump 4X4 matrix of float' and a right operand of type 'temp mediump int' (or there is no acceptable conversion)
+ERROR: 0:81: '>>' : wrong operand types: no operation '>>' exists that takes a left-hand operand of type 'global 5-element array of mediump float' and a right operand of type 'temp mediump uint' (or there is no acceptable conversion)
+ERROR: 0:82: '>>' : wrong operand types: no operation '>>' exists that takes a left-hand operand of type 'temp mediump 3-component vector of int' and a right operand of type 'temp mediump 4-component vector of int' (or there is no acceptable conversion)
+ERROR: 0:84: '&' : wrong operand types: no operation '&' exists that takes a left-hand operand of type 'temp mediump int' and a right operand of type 'temp mediump uint' (or there is no acceptable conversion)
+ERROR: 0:85: 'assign' : cannot convert from 'temp mediump 3-component vector of uint' to 'temp mediump uint'
+ERROR: 0:86: '|' : wrong operand types: no operation '|' exists that takes a left-hand operand of type 'temp mediump int' and a right operand of type 'temp mediump 3-component vector of uint' (or there is no acceptable conversion)
+ERROR: 0:87: '&' : wrong operand types: no operation '&' exists that takes a left-hand operand of type 'temp mediump uint' and a right operand of type 'temp mediump float' (or there is no acceptable conversion)
+ERROR: 0:88: '|' : wrong operand types: no operation '|' exists that takes a left-hand operand of type 'temp mediump 2X2 matrix of float' and a right operand of type 'temp mediump 2X2 matrix of float' (or there is no acceptable conversion)
+ERROR: 0:89: '^' : wrong operand types: no operation '^' exists that takes a left-hand operand of type 'global structure{global mediump int i}' and a right operand of type 'global structure{global mediump int i}' (or there is no acceptable conversion)
+ERROR: 0:90: 'assign' : l-value required
+ERROR: 56 compilation errors. No code generated.
+
+
+Shader version: 300
+ERROR: node is still EOpNull!
+0:13 Function Definition: main( (global void)
+0:13 Function Parameters:
+0:? Sequence
+0:30 'instanceName' (layout(column_major shared ) uniform block{layout(column_major shared ) uniform mediump float f})
+0:31 's' (global structure{global mediump int i})
+0:32 'i' (temp mediump int)
+0:33 'u' (temp mediump uint)
+0:34 'u' (temp mediump uint)
+0:35 'iv3' (temp mediump 3-component vector of int)
+0:36 'iv4' (temp mediump 4-component vector of int)
+0:37 'i' (temp mediump int)
+0:38 'iv3' (temp mediump 3-component vector of int)
+0:39 'a' (global 5-element array of mediump float)
+0:40 'b' (temp bool)
+0:42 'f' (temp mediump float)
+0:43 'i' (temp mediump int)
+0:44 'f' (temp mediump float)
+0:45 'instanceName' (layout(column_major shared ) uniform block{layout(column_major shared ) uniform mediump float f})
+0:46 's' (global structure{global mediump int i})
+0:47 'a' (global 5-element array of mediump float)
+0:48 'b3' (temp 3-component vector of bool)
+0:50 Constant:
+0:50 false (const bool)
+0:51 Constant:
+0:51 false (const bool)
+0:52 Constant:
+0:52 false (const bool)
+0:53 Constant:
+0:53 false (const bool)
+0:54 Constant:
+0:54 false (const bool)
+0:55 Constant:
+0:55 false (const bool)
+0:57 Constant:
+0:57 false (const bool)
+0:58 Constant:
+0:58 false (const bool)
+0:59 Constant:
+0:59 false (const bool)
+0:60 Constant:
+0:60 false (const bool)
+0:61 Constant:
+0:61 false (const bool)
+0:62 Constant:
+0:62 false (const bool)
+0:64 'u' (temp mediump uint)
+0:65 'i' (temp mediump int)
+0:66 'm2' (temp mediump 2X2 matrix of float)
+0:67 'v3' (temp mediump 3-component vector of float)
+0:68 'a' (global 5-element array of mediump float)
+0:70 'f' (temp mediump float)
+0:71 'm4' (temp mediump 4X4 matrix of float)
+0:72 'v3' (temp mediump 3-component vector of float)
+0:73 'a' (global 5-element array of mediump float)
+0:74 'instanceName' (layout(column_major shared ) uniform block{layout(column_major shared ) uniform mediump float f})
+0:76 'i' (temp mediump int)
+0:77 'u' (temp mediump uint)
+0:78 'i' (temp mediump int)
+0:79 'f' (temp mediump float)
+0:80 'm4' (temp mediump 4X4 matrix of float)
+0:81 'a' (global 5-element array of mediump float)
+0:82 'iv3' (temp mediump 3-component vector of int)
+0:84 'i' (temp mediump int)
+0:85 'u' (temp mediump uint)
+0:86 'i' (temp mediump int)
+0:87 'u' (temp mediump uint)
+0:88 'm2' (temp mediump 2X2 matrix of float)
+0:89 's' (global structure{global mediump int i})
+0:90 move second child to first child (temp mediump float)
+0:90 move second child to first child (temp mediump float)
+0:90 'f' (temp mediump float)
+0:90 'f' (temp mediump float)
+0:90 'f' (temp mediump float)
+0:93 vector-scale (temp mediump 4-component vector of float)
+0:93 'f' (temp mediump float)
+0:93 'v4' (temp mediump 4-component vector of float)
+0:94 add (temp mediump uint)
+0:94 'u' (temp mediump uint)
+0:94 'u' (temp mediump uint)
+0:95 divide (temp mediump 4-component vector of uint)
+0:95 'uv4' (temp mediump 4-component vector of uint)
+0:95 'u' (temp mediump uint)
+0:96 subtract second child into first child (temp mediump 3-component vector of int)
+0:96 'iv3' (temp mediump 3-component vector of int)
+0:96 'iv3' (temp mediump 3-component vector of int)
+0:98 mod second child into first child (temp mediump int)
+0:98 'i' (temp mediump int)
+0:98 Constant:
+0:98 3 (const int)
+0:99 mod (temp mediump 3-component vector of uint)
+0:99 'uv3' (temp mediump 3-component vector of uint)
+0:99 Constant:
+0:99 4 (const uint)
+0:100 Pre-Decrement (temp mediump 2X2 matrix of float)
+0:100 'm2' (temp mediump 2X2 matrix of float)
+0:101 Post-Increment (temp mediump 4-component vector of int)
+0:101 'iv4' (temp mediump 4-component vector of int)
+0:103 Compare Not Equal (temp bool)
+0:103 'm4' (temp mediump 4X4 matrix of float)
+0:103 'm4' (temp mediump 4X4 matrix of float)
+0:104 Compare Equal (temp bool)
+0:104 'm2' (temp mediump 2X2 matrix of float)
+0:104 'm2' (temp mediump 2X2 matrix of float)
+0:105 Compare Less Than or Equal (temp bool)
+0:105 'i' (temp mediump int)
+0:105 'i' (temp mediump int)
+0:106 Compare Equal (temp bool)
+0:106 'a' (global 5-element array of mediump float)
+0:106 'a' (global 5-element array of mediump float)
+0:107 Compare Not Equal (temp bool)
+0:107 's' (global structure{global mediump int i})
+0:107 's' (global structure{global mediump int i})
+0:109 logical-and (temp bool)
+0:109 'b' (temp bool)
+0:109 'b' (temp bool)
+0:110 logical-or (temp bool)
+0:110 'b' (temp bool)
+0:110 'b' (temp bool)
+0:111 logical-xor (temp bool)
+0:111 'b' (temp bool)
+0:111 'b' (temp bool)
+0:113 Comma (temp mediump 3-component vector of uint)
+0:113 Negate conditional (temp bool)
+0:113 'b' (temp bool)
+0:113 'uv3' (temp mediump 3-component vector of uint)
+0:115 Bitwise not (temp mediump int)
+0:115 'i' (temp mediump int)
+0:116 Bitwise not (temp mediump uint)
+0:116 'u' (temp mediump uint)
+0:117 Bitwise not (temp mediump 3-component vector of uint)
+0:117 'uv3' (temp mediump 3-component vector of uint)
+0:118 Bitwise not (temp mediump 3-component vector of int)
+0:118 'iv3' (temp mediump 3-component vector of int)
+0:120 left shift second child into first child (temp mediump 3-component vector of uint)
+0:120 'uv3' (temp mediump 3-component vector of uint)
+0:120 'i' (temp mediump int)
+0:121 right-shift (temp mediump int)
+0:121 'i' (temp mediump int)
+0:121 'i' (temp mediump int)
+0:122 left-shift (temp mediump uint)
+0:122 'u' (temp mediump uint)
+0:122 'u' (temp mediump uint)
+0:123 right-shift (temp mediump 3-component vector of int)
+0:123 'iv3' (temp mediump 3-component vector of int)
+0:123 'iv3' (temp mediump 3-component vector of int)
+0:125 bitwise and (temp mediump int)
+0:125 'i' (temp mediump int)
+0:125 'i' (temp mediump int)
+0:126 inclusive-or (temp mediump uint)
+0:126 'u' (temp mediump uint)
+0:126 'u' (temp mediump uint)
+0:127 exclusive-or (temp mediump 3-component vector of int)
+0:127 'iv3' (temp mediump 3-component vector of int)
+0:127 'iv3' (temp mediump 3-component vector of int)
+0:128 bitwise and (temp mediump 3-component vector of uint)
+0:128 'u' (temp mediump uint)
+0:128 'uv3' (temp mediump 3-component vector of uint)
+0:129 inclusive-or (temp mediump 3-component vector of uint)
+0:129 'uv3' (temp mediump 3-component vector of uint)
+0:129 'u' (temp mediump uint)
+0:130 and second child into first child (temp mediump 3-component vector of uint)
+0:130 'uv3' (temp mediump 3-component vector of uint)
+0:130 'u' (temp mediump uint)
+0:132 direct index (temp mediump int)
+0:132 'arr' (temp 2-element array of mediump int)
+0:132 Constant:
+0:132 1 (const int)
+0:134 direct index (temp mediump int)
+0:134 'arr2' (temp 3-element array of mediump int)
+0:134 Constant:
+0:134 2 (const int)
+0:? Linker Objects
+0:? 'instanceName' (layout(column_major shared ) uniform block{layout(column_major shared ) uniform mediump float f})
+0:? 's' (global structure{global mediump int i})
+0:? 'a' (global 5-element array of mediump float)
+
+
+Linked fragment stage:
+
+
+Shader version: 300
+ERROR: node is still EOpNull!
+0:13 Function Definition: main( (global void)
+0:13 Function Parameters:
+0:? Sequence
+0:30 'instanceName' (layout(column_major shared ) uniform block{layout(column_major shared ) uniform mediump float f})
+0:31 's' (global structure{global mediump int i})
+0:32 'i' (temp mediump int)
+0:33 'u' (temp mediump uint)
+0:34 'u' (temp mediump uint)
+0:35 'iv3' (temp mediump 3-component vector of int)
+0:36 'iv4' (temp mediump 4-component vector of int)
+0:37 'i' (temp mediump int)
+0:38 'iv3' (temp mediump 3-component vector of int)
+0:39 'a' (global 5-element array of mediump float)
+0:40 'b' (temp bool)
+0:42 'f' (temp mediump float)
+0:43 'i' (temp mediump int)
+0:44 'f' (temp mediump float)
+0:45 'instanceName' (layout(column_major shared ) uniform block{layout(column_major shared ) uniform mediump float f})
+0:46 's' (global structure{global mediump int i})
+0:47 'a' (global 5-element array of mediump float)
+0:48 'b3' (temp 3-component vector of bool)
+0:50 Constant:
+0:50 false (const bool)
+0:51 Constant:
+0:51 false (const bool)
+0:52 Constant:
+0:52 false (const bool)
+0:53 Constant:
+0:53 false (const bool)
+0:54 Constant:
+0:54 false (const bool)
+0:55 Constant:
+0:55 false (const bool)
+0:57 Constant:
+0:57 false (const bool)
+0:58 Constant:
+0:58 false (const bool)
+0:59 Constant:
+0:59 false (const bool)
+0:60 Constant:
+0:60 false (const bool)
+0:61 Constant:
+0:61 false (const bool)
+0:62 Constant:
+0:62 false (const bool)
+0:64 'u' (temp mediump uint)
+0:65 'i' (temp mediump int)
+0:66 'm2' (temp mediump 2X2 matrix of float)
+0:67 'v3' (temp mediump 3-component vector of float)
+0:68 'a' (global 5-element array of mediump float)
+0:70 'f' (temp mediump float)
+0:71 'm4' (temp mediump 4X4 matrix of float)
+0:72 'v3' (temp mediump 3-component vector of float)
+0:73 'a' (global 5-element array of mediump float)
+0:74 'instanceName' (layout(column_major shared ) uniform block{layout(column_major shared ) uniform mediump float f})
+0:76 'i' (temp mediump int)
+0:77 'u' (temp mediump uint)
+0:78 'i' (temp mediump int)
+0:79 'f' (temp mediump float)
+0:80 'm4' (temp mediump 4X4 matrix of float)
+0:81 'a' (global 5-element array of mediump float)
+0:82 'iv3' (temp mediump 3-component vector of int)
+0:84 'i' (temp mediump int)
+0:85 'u' (temp mediump uint)
+0:86 'i' (temp mediump int)
+0:87 'u' (temp mediump uint)
+0:88 'm2' (temp mediump 2X2 matrix of float)
+0:89 's' (global structure{global mediump int i})
+0:90 move second child to first child (temp mediump float)
+0:90 move second child to first child (temp mediump float)
+0:90 'f' (temp mediump float)
+0:90 'f' (temp mediump float)
+0:90 'f' (temp mediump float)
+0:93 vector-scale (temp mediump 4-component vector of float)
+0:93 'f' (temp mediump float)
+0:93 'v4' (temp mediump 4-component vector of float)
+0:94 add (temp mediump uint)
+0:94 'u' (temp mediump uint)
+0:94 'u' (temp mediump uint)
+0:95 divide (temp mediump 4-component vector of uint)
+0:95 'uv4' (temp mediump 4-component vector of uint)
+0:95 'u' (temp mediump uint)
+0:96 subtract second child into first child (temp mediump 3-component vector of int)
+0:96 'iv3' (temp mediump 3-component vector of int)
+0:96 'iv3' (temp mediump 3-component vector of int)
+0:98 mod second child into first child (temp mediump int)
+0:98 'i' (temp mediump int)
+0:98 Constant:
+0:98 3 (const int)
+0:99 mod (temp mediump 3-component vector of uint)
+0:99 'uv3' (temp mediump 3-component vector of uint)
+0:99 Constant:
+0:99 4 (const uint)
+0:100 Pre-Decrement (temp mediump 2X2 matrix of float)
+0:100 'm2' (temp mediump 2X2 matrix of float)
+0:101 Post-Increment (temp mediump 4-component vector of int)
+0:101 'iv4' (temp mediump 4-component vector of int)
+0:103 Compare Not Equal (temp bool)
+0:103 'm4' (temp mediump 4X4 matrix of float)
+0:103 'm4' (temp mediump 4X4 matrix of float)
+0:104 Compare Equal (temp bool)
+0:104 'm2' (temp mediump 2X2 matrix of float)
+0:104 'm2' (temp mediump 2X2 matrix of float)
+0:105 Compare Less Than or Equal (temp bool)
+0:105 'i' (temp mediump int)
+0:105 'i' (temp mediump int)
+0:106 Compare Equal (temp bool)
+0:106 'a' (global 5-element array of mediump float)
+0:106 'a' (global 5-element array of mediump float)
+0:107 Compare Not Equal (temp bool)
+0:107 's' (global structure{global mediump int i})
+0:107 's' (global structure{global mediump int i})
+0:109 logical-and (temp bool)
+0:109 'b' (temp bool)
+0:109 'b' (temp bool)
+0:110 logical-or (temp bool)
+0:110 'b' (temp bool)
+0:110 'b' (temp bool)
+0:111 logical-xor (temp bool)
+0:111 'b' (temp bool)
+0:111 'b' (temp bool)
+0:113 Comma (temp mediump 3-component vector of uint)
+0:113 Negate conditional (temp bool)
+0:113 'b' (temp bool)
+0:113 'uv3' (temp mediump 3-component vector of uint)
+0:115 Bitwise not (temp mediump int)
+0:115 'i' (temp mediump int)
+0:116 Bitwise not (temp mediump uint)
+0:116 'u' (temp mediump uint)
+0:117 Bitwise not (temp mediump 3-component vector of uint)
+0:117 'uv3' (temp mediump 3-component vector of uint)
+0:118 Bitwise not (temp mediump 3-component vector of int)
+0:118 'iv3' (temp mediump 3-component vector of int)
+0:120 left shift second child into first child (temp mediump 3-component vector of uint)
+0:120 'uv3' (temp mediump 3-component vector of uint)
+0:120 'i' (temp mediump int)
+0:121 right-shift (temp mediump int)
+0:121 'i' (temp mediump int)
+0:121 'i' (temp mediump int)
+0:122 left-shift (temp mediump uint)
+0:122 'u' (temp mediump uint)
+0:122 'u' (temp mediump uint)
+0:123 right-shift (temp mediump 3-component vector of int)
+0:123 'iv3' (temp mediump 3-component vector of int)
+0:123 'iv3' (temp mediump 3-component vector of int)
+0:125 bitwise and (temp mediump int)
+0:125 'i' (temp mediump int)
+0:125 'i' (temp mediump int)
+0:126 inclusive-or (temp mediump uint)
+0:126 'u' (temp mediump uint)
+0:126 'u' (temp mediump uint)
+0:127 exclusive-or (temp mediump 3-component vector of int)
+0:127 'iv3' (temp mediump 3-component vector of int)
+0:127 'iv3' (temp mediump 3-component vector of int)
+0:128 bitwise and (temp mediump 3-component vector of uint)
+0:128 'u' (temp mediump uint)
+0:128 'uv3' (temp mediump 3-component vector of uint)
+0:129 inclusive-or (temp mediump 3-component vector of uint)
+0:129 'uv3' (temp mediump 3-component vector of uint)
+0:129 'u' (temp mediump uint)
+0:130 and second child into first child (temp mediump 3-component vector of uint)
+0:130 'uv3' (temp mediump 3-component vector of uint)
+0:130 'u' (temp mediump uint)
+0:132 direct index (temp mediump int)
+0:132 'arr' (temp 2-element array of mediump int)
+0:132 Constant:
+0:132 1 (const int)
+0:134 direct index (temp mediump int)
+0:134 'arr2' (temp 3-element array of mediump int)
+0:134 Constant:
+0:134 2 (const int)
+0:? Linker Objects
+0:? 'instanceName' (layout(column_major shared ) uniform block{layout(column_major shared ) uniform mediump float f})
+0:? 's' (global structure{global mediump int i})
+0:? 'a' (global 5-element array of mediump float)
+
diff --git a/chromium/third_party/glslang/src/Test/baseResults/300scope.vert.out b/chromium/third_party/glslang/src/Test/baseResults/300scope.vert.out
new file mode 100644
index 00000000000..2a9a945d01d
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/300scope.vert.out
@@ -0,0 +1,239 @@
+300scope.vert
+ERROR: 0:5: 'a' : redefinition
+ERROR: 0:17: 'b' : function name is redeclaration of existing name
+ERROR: 0:20: 'c' : redefinition
+ERROR: 0:22: 'f' : redefinition
+ERROR: 0:23: 'tan' : redefinition
+ERROR: 0:24: 'redefinition of built-in function' : not supported with this profile: es
+ERROR: 0:24: 'highp' : overloaded functions must have the same parameter precision qualifiers for argument 1
+ERROR: 0:24: 'sin' : function name is redeclaration of existing name
+ERROR: 0:25: 'redefinition of built-in function' : not supported with this profile: es
+ERROR: 0:25: 'highp' : overloaded functions must have the same parameter precision qualifiers for argument 1
+ERROR: 0:25: 'cos' : function name is redeclaration of existing name
+ERROR: 0:25: 'cos' : function already has a body
+ERROR: 0:27: 'return' : void function cannot return a value
+ERROR: 0:29: 'radians' : function name is redeclaration of existing name
+ERROR: 0:29: 'radians' : can't find function
+ERROR: 0:31: 'return' : void function cannot return a value
+ERROR: 0:38: 'local function declaration' : not supported with this profile: es
+ERROR: 0:43: 'sin' : can't use function syntax on variable
+ERROR: 0:57: 'z' : undeclared identifier
+ERROR: 0:57: 'z' : redefinition
+ERROR: 0:73: 'degrees' : can't use function syntax on variable
+ERROR: 21 compilation errors. No code generated.
+
+
+Shader version: 300
+ERROR: node is still EOpNull!
+0:3 Function Definition: f(i1;i1;i1; (global highp int)
+0:3 Function Parameters:
+0:3 'a' (in highp int)
+0:3 'b' (in highp int)
+0:3 'c' (in highp int)
+0:? Sequence
+0:8 Sequence
+0:8 Sequence
+0:8 move second child to first child (temp highp float)
+0:8 'a' (temp highp float)
+0:8 add (temp highp float)
+0:8 Convert int to float (temp highp float)
+0:8 'a' (in highp int)
+0:8 Constant:
+0:8 1.000000
+0:11 Branch: Return with expression
+0:11 'a' (in highp int)
+0:25 Function Definition: cos(f1; (global highp float)
+0:25 Function Parameters:
+0:25 'x' (in highp float)
+0:27 Sequence
+0:27 Branch: Return
+0:29 Function Definition: radians(b1; (global bool)
+0:29 Function Parameters:
+0:29 'x' (in bool)
+0:31 Sequence
+0:31 Branch: Return
+0:36 Function Definition: main( (global void)
+0:36 Function Parameters:
+0:? Sequence
+0:39 Function Call: g( (temp highp int)
+0:42 'sin' (temp highp float)
+0:43 Constant:
+0:43 0.000000
+0:44 Function Call: f(i1;i1;i1; (global highp int)
+0:44 Constant:
+0:44 1 (const int)
+0:44 Constant:
+0:44 2 (const int)
+0:44 Constant:
+0:44 3 (const int)
+0:47 move second child to first child (temp highp float)
+0:47 'f' (temp highp float)
+0:47 Constant:
+0:47 3.000000
+0:49 move second child to first child (temp highp 4-component vector of float)
+0:49 'gl_Position' (invariant gl_Position highp 4-component vector of float Position)
+0:49 Construct vec4 (temp highp 4-component vector of float)
+0:49 'f' (temp highp float)
+0:51 Sequence
+0:51 Sequence
+0:51 move second child to first child (temp highp int)
+0:51 'f' (temp highp int)
+0:51 Constant:
+0:51 0 (const int)
+0:51 Loop with condition tested first
+0:51 Loop Condition
+0:51 Compare Less Than (temp bool)
+0:51 'f' (temp highp int)
+0:51 Constant:
+0:51 10 (const int)
+0:51 Loop Body
+0:52 Pre-Increment (temp highp int)
+0:52 'f' (temp highp int)
+0:51 Loop Terminal Expression
+0:51 Pre-Increment (temp highp int)
+0:51 'f' (temp highp int)
+0:54 Sequence
+0:54 move second child to first child (temp highp int)
+0:54 'x' (temp highp int)
+0:54 Constant:
+0:54 1 (const int)
+0:56 Sequence
+0:56 Sequence
+0:56 move second child to first child (temp highp float)
+0:56 'x' (temp highp float)
+0:56 Constant:
+0:56 2.000000
+0:56 move second child to first child (temp highp float)
+0:56 'y' (temp highp float)
+0:56 'x' (temp highp float)
+0:60 Sequence
+0:60 Sequence
+0:60 move second child to first child (temp highp int)
+0:60 'x' (temp highp int)
+0:60 'x' (temp highp int)
+0:68 Sequence
+0:68 Sequence
+0:68 move second child to first child (temp structure{temp highp int x})
+0:68 'S' (temp structure{temp highp int x})
+0:68 Constant:
+0:68 0 (const int)
+0:69 x: direct index for structure (temp highp int)
+0:69 'S' (temp structure{temp highp int x})
+0:69 Constant:
+0:69 0 (const int)
+0:73 Constant:
+0:73 0.000000
+0:? Linker Objects
+0:? 'b' (global bool)
+0:? 'gl_VertexID' (gl_VertexId highp int VertexId)
+0:? 'gl_InstanceID' (gl_InstanceId highp int InstanceId)
+
+
+Linked vertex stage:
+
+
+Shader version: 300
+ERROR: node is still EOpNull!
+0:3 Function Definition: f(i1;i1;i1; (global highp int)
+0:3 Function Parameters:
+0:3 'a' (in highp int)
+0:3 'b' (in highp int)
+0:3 'c' (in highp int)
+0:? Sequence
+0:8 Sequence
+0:8 Sequence
+0:8 move second child to first child (temp highp float)
+0:8 'a' (temp highp float)
+0:8 add (temp highp float)
+0:8 Convert int to float (temp highp float)
+0:8 'a' (in highp int)
+0:8 Constant:
+0:8 1.000000
+0:11 Branch: Return with expression
+0:11 'a' (in highp int)
+0:25 Function Definition: cos(f1; (global highp float)
+0:25 Function Parameters:
+0:25 'x' (in highp float)
+0:27 Sequence
+0:27 Branch: Return
+0:29 Function Definition: radians(b1; (global bool)
+0:29 Function Parameters:
+0:29 'x' (in bool)
+0:31 Sequence
+0:31 Branch: Return
+0:36 Function Definition: main( (global void)
+0:36 Function Parameters:
+0:? Sequence
+0:39 Function Call: g( (temp highp int)
+0:42 'sin' (temp highp float)
+0:43 Constant:
+0:43 0.000000
+0:44 Function Call: f(i1;i1;i1; (global highp int)
+0:44 Constant:
+0:44 1 (const int)
+0:44 Constant:
+0:44 2 (const int)
+0:44 Constant:
+0:44 3 (const int)
+0:47 move second child to first child (temp highp float)
+0:47 'f' (temp highp float)
+0:47 Constant:
+0:47 3.000000
+0:49 move second child to first child (temp highp 4-component vector of float)
+0:49 'gl_Position' (invariant gl_Position highp 4-component vector of float Position)
+0:49 Construct vec4 (temp highp 4-component vector of float)
+0:49 'f' (temp highp float)
+0:51 Sequence
+0:51 Sequence
+0:51 move second child to first child (temp highp int)
+0:51 'f' (temp highp int)
+0:51 Constant:
+0:51 0 (const int)
+0:51 Loop with condition tested first
+0:51 Loop Condition
+0:51 Compare Less Than (temp bool)
+0:51 'f' (temp highp int)
+0:51 Constant:
+0:51 10 (const int)
+0:51 Loop Body
+0:52 Pre-Increment (temp highp int)
+0:52 'f' (temp highp int)
+0:51 Loop Terminal Expression
+0:51 Pre-Increment (temp highp int)
+0:51 'f' (temp highp int)
+0:54 Sequence
+0:54 move second child to first child (temp highp int)
+0:54 'x' (temp highp int)
+0:54 Constant:
+0:54 1 (const int)
+0:56 Sequence
+0:56 Sequence
+0:56 move second child to first child (temp highp float)
+0:56 'x' (temp highp float)
+0:56 Constant:
+0:56 2.000000
+0:56 move second child to first child (temp highp float)
+0:56 'y' (temp highp float)
+0:56 'x' (temp highp float)
+0:60 Sequence
+0:60 Sequence
+0:60 move second child to first child (temp highp int)
+0:60 'x' (temp highp int)
+0:60 'x' (temp highp int)
+0:68 Sequence
+0:68 Sequence
+0:68 move second child to first child (temp structure{temp highp int x})
+0:68 'S' (temp structure{temp highp int x})
+0:68 Constant:
+0:68 0 (const int)
+0:69 x: direct index for structure (temp highp int)
+0:69 'S' (temp structure{temp highp int x})
+0:69 Constant:
+0:69 0 (const int)
+0:73 Constant:
+0:73 0.000000
+0:? Linker Objects
+0:? 'b' (global bool)
+0:? 'gl_VertexID' (gl_VertexId highp int VertexId)
+0:? 'gl_InstanceID' (gl_InstanceId highp int InstanceId)
+
diff --git a/chromium/third_party/glslang/src/Test/baseResults/310.comp.out b/chromium/third_party/glslang/src/Test/baseResults/310.comp.out
new file mode 100644
index 00000000000..67129d1d370
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/310.comp.out
@@ -0,0 +1,934 @@
+310.comp
+Warning, version 310 is not yet complete; most version-specific features are present, but some are missing.
+ERROR: 0:4: 'local_size' : cannot change previously set size
+ERROR: 0:5: 'local_size' : too large; see gl_MaxComputeWorkGroupSize
+ERROR: 0:23: '' : array size required
+ERROR: 0:39: 'in' : global storage input qualifier cannot be used in a compute shader
+ERROR: 0:39: 'location qualifier on input' : not supported in this stage: compute
+ERROR: 0:40: 'in' : global storage input qualifier cannot be used in a compute shader
+ERROR: 0:41: 'out' : global storage output qualifier cannot be used in a compute shader
+ERROR: 0:44: 'shared' : cannot apply layout qualifiers to a shared variable
+ERROR: 0:44: 'location' : can only apply to uniform, buffer, in, or out storage qualifiers
+ERROR: 0:45: 'shared' : cannot initialize this type of qualifier
+ERROR: 0:47: 'local_size' : can only apply to 'in'
+ERROR: 0:47: 'local_size' : can only apply to 'in'
+ERROR: 0:47: 'local_size' : can only apply to 'in'
+ERROR: 0:61: 'assign' : l-value required "ro" (can't modify a readonly buffer)
+ERROR: 0:66: 'buffer' : buffers can be declared only as blocks
+ERROR: 0:68: 'sampler/image' : type requires declaration of default precision qualifier
+ERROR: 0:76: '' : image variables not declared 'writeonly' must have a format layout qualifier
+ERROR: 0:87: 'imageAtomicCompSwap' : required extension not requested: GL_OES_shader_image_atomic
+ERROR: 0:88: 'imageAtomicAdd' : required extension not requested: GL_OES_shader_image_atomic
+ERROR: 0:89: 'imageAtomicMin' : required extension not requested: GL_OES_shader_image_atomic
+ERROR: 0:89: 'readonly' : argument cannot drop memory qualifier when passed to formal parameter
+ERROR: 0:89: 'imageAtomicMin' : only supported on image with format r32i or r32ui
+ERROR: 0:90: 'imageAtomicMax' : no matching overloaded function found
+ERROR: 0:94: 'writeonly' : argument cannot drop memory qualifier when passed to formal parameter
+ERROR: 0:97: '' : memory qualifiers cannot be used on this type
+ERROR: 0:98: '' : memory qualifiers cannot be used on this type
+ERROR: 0:114: 'image load-store format' : not supported with this profile: es
+ERROR: 0:114: 'rg8i' : does not apply to unsigned integer images
+ERROR: 0:115: 'rgba32i' : does not apply to floating point images
+ERROR: 0:116: 'rgba32f' : does not apply to unsigned integer images
+ERROR: 0:117: 'image load-store format' : not supported with this profile: es
+ERROR: 0:117: 'r8_snorm' : does not apply to signed integer images
+ERROR: 0:118: 'rgba32ui' : does not apply to signed integer images
+ERROR: 0:119: 'image load-store format' : not supported with this profile: es
+ERROR: 0:119: 'r8ui' : does not apply to signed integer images
+ERROR: 0:128: 'atomic_uint' : samplers and atomic_uints cannot be output parameters
+ERROR: 0:130: 'return' : type does not match, or is not convertible to, the function's return type
+ERROR: 0:136: 'atomic_uint' : atomic_uints can only be used in uniform variables or function parameters: non_uniform_counter
+ERROR: 0:136: 'atomic_uint' : layout(binding=X) is required
+ERROR: 0:141: 'atomic_uint' : atomic counters can only be highp
+ERROR: 0:141: 'binding' : atomic_uint binding is too large; see gl_MaxAtomicCounterBindings
+ERROR: 0:143: 'binding' : atomic_uint binding is too large; see gl_MaxAtomicCounterBindings
+ERROR: 0:149: '[]' : scalar integer expression required
+ERROR: 0:166: 'precision' : can only apply highp to atomic_uint
+ERROR: 0:168: 'precise' : Reserved word.
+ERROR: 0:168: 'precise' : not supported for this version or the enabled extensions
+ERROR: 0:170: 'dmat2x4' : Reserved word.
+ERROR: 0:170: 'double matrix' : not supported with this profile: es
+ERROR: 0:171: 'samplerCubeArray' : Reserved word.
+ERROR: 0:171: 'sampler/image' : type requires declaration of default precision qualifier
+ERROR: 0:172: 'iimage2DRect' : Reserved word.
+ERROR: 0:172: 'sampler/image' : type requires declaration of default precision qualifier
+ERROR: 0:172: '' : image variables not declared 'writeonly' must have a format layout qualifier
+ERROR: 0:173: 'image2DMS' : Reserved word.
+ERROR: 0:173: '' : image variables not declared 'writeonly' must have a format layout qualifier
+ERROR: 0:174: 'uimage2DMSArray' : Reserved word.
+ERROR: 0:174: 'sampler/image' : type requires declaration of default precision qualifier
+ERROR: 0:174: '' : image variables not declared 'writeonly' must have a format layout qualifier
+ERROR: 0:181: 'rgba32f' : format requires readonly or writeonly memory qualifier
+ERROR: 0:182: 'rgba8i' : format requires readonly or writeonly memory qualifier
+ERROR: 0:183: 'rgba16ui' : format requires readonly or writeonly memory qualifier
+ERROR: 0:194: 'assign' : can't read from writeonly object: wo
+ERROR: 0:195: 'initializer' : can't read from writeonly object: wo
+ERROR: 0:196: '++' : can't read from writeonly object: wo
+ERROR: 0:197: '--' : can't read from writeonly object: wo
+ERROR: 0:198: '+' : can't read from writeonly object: wo
+ERROR: 0:199: '-' : can't read from writeonly object: wo
+ERROR: 0:201: ':' : can't read from writeonly object: wo
+ERROR: 0:202: ':' : can't read from writeonly object: wo
+ERROR: 0:203: '==' : can't read from writeonly object: wo
+ERROR: 0:205: '>=' : can't read from writeonly object: wo
+ERROR: 0:207: 'constructor' : can't read from writeonly object: wo
+ERROR: 0:208: '~' : can't read from writeonly object: wo
+ERROR: 0:221: 'assign' : can't read from writeonly object: wo
+ERROR: 0:222: '~' : can't read from writeonly object: wo
+ERROR: 0:227: 'input block' : not supported in this stage: compute
+ERROR: 0:231: 'output block' : not supported in this stage: compute
+WARNING: 0:235: 't__' : identifiers containing consecutive underscores ("__") are reserved
+WARNING: 0:238: '#define' : names containing consecutive underscores are reserved: __D
+ERROR: 77 compilation errors. No code generated.
+
+
+Shader version: 310
+local_size = (2, 1, 4096)
+ERROR: node is still EOpNull!
+0:27 Function Definition: main( (global void)
+0:27 Function Parameters:
+0:29 Sequence
+0:29 Barrier (global void)
+0:30 MemoryBarrier (global void)
+0:31 MemoryBarrierAtomicCounter (global void)
+0:32 MemoryBarrierBuffer (global void)
+0:33 MemoryBarrierShared (global void)
+0:34 MemoryBarrierImage (global void)
+0:35 GroupMemoryBarrier (global void)
+0:36 move second child to first child (temp highp int)
+0:36 value: direct index for structure (layout(column_major shared ) buffer highp int)
+0:36 'anon@0' (layout(column_major shared ) buffer block{layout(column_major shared ) buffer highp int value, layout(column_major shared ) buffer implicitly-sized array of highp float values})
+0:36 Constant:
+0:36 0 (const uint)
+0:36 Convert float to int (temp highp int)
+0:36 indirect index (layout(column_major shared ) temp highp float)
+0:36 values: direct index for structure (layout(column_major shared ) buffer implicitly-sized array of highp float)
+0:36 'anon@0' (layout(column_major shared ) buffer block{layout(column_major shared ) buffer highp int value, layout(column_major shared ) buffer implicitly-sized array of highp float values})
+0:36 Constant:
+0:36 1 (const uint)
+0:36 'gl_LocalInvocationIndex' (in highp uint LocalInvocationIndex)
+0:59 Function Definition: foo( (global void)
+0:59 Function Parameters:
+0:61 Sequence
+0:61 move second child to first child (temp highp float)
+0:61 direct index (layout(column_major shared ) temp highp float)
+0:61 values: direct index for structure (layout(column_major shared ) buffer implicitly-sized array of highp float)
+0:61 'ro' (layout(column_major shared ) readonly buffer block{layout(column_major shared ) buffer highp int value, layout(column_major shared ) buffer implicitly-sized array of highp float values})
+0:61 Constant:
+0:61 1 (const int)
+0:61 Constant:
+0:61 2 (const int)
+0:61 Constant:
+0:61 4.700000
+0:62 array length (temp highp int)
+0:62 values: direct index for structure (layout(column_major shared ) buffer implicitly-sized array of highp float)
+0:62 'ro' (layout(column_major shared ) readonly buffer block{layout(column_major shared ) buffer highp int value, layout(column_major shared ) buffer implicitly-sized array of highp float values})
+0:62 Constant:
+0:62 1 (const int)
+0:63 Pre-Increment (temp highp 4-component vector of float)
+0:63 's' (shared highp 4-component vector of float)
+0:84 Function Definition: qux( (global void)
+0:84 Function Parameters:
+0:86 Sequence
+0:86 Sequence
+0:86 move second child to first child (temp highp int)
+0:86 'i' (temp highp int)
+0:86 Constant:
+0:86 4 (const int)
+0:87 imageAtomicCompSwap (global highp int)
+0:87 'iimg2D' (layout(r32i ) uniform highp iimage2D)
+0:87 Construct ivec2 (temp highp 2-component vector of int)
+0:87 'i' (temp highp int)
+0:87 'i' (temp highp int)
+0:87 'i' (temp highp int)
+0:87 'i' (temp highp int)
+0:88 imageAtomicAdd (global highp uint)
+0:88 'uimg2D' (layout(r32ui ) uniform highp uimage2D)
+0:88 Construct ivec2 (temp highp 2-component vector of int)
+0:88 'i' (temp highp int)
+0:88 'i' (temp highp int)
+0:88 Convert int to uint (temp highp uint)
+0:88 'i' (temp highp int)
+0:89 imageAtomicMin (global highp int)
+0:89 'iimg2Drgba' (layout(rgba32i ) readonly uniform highp iimage2D)
+0:89 Construct ivec2 (temp highp 2-component vector of int)
+0:89 'i' (temp highp int)
+0:89 'i' (temp highp int)
+0:89 'i' (temp highp int)
+0:90 Constant:
+0:90 0.000000
+0:91 Sequence
+0:91 move second child to first child (temp highp 4-component vector of int)
+0:91 'pos' (temp highp 4-component vector of int)
+0:91 imageLoad (global highp 4-component vector of int)
+0:91 'iimg2D' (layout(r32i ) uniform highp iimage2D)
+0:91 Construct ivec2 (temp highp 2-component vector of int)
+0:91 'i' (temp highp int)
+0:91 'i' (temp highp int)
+0:92 imageStore (global highp void)
+0:92 'ii2da' (writeonly uniform highp iimage2DArray)
+0:92 Construct ivec3 (temp 3-component vector of int)
+0:92 'i' (temp highp int)
+0:92 'i' (temp highp int)
+0:92 'i' (temp highp int)
+0:92 Constant:
+0:92 0 (const int)
+0:92 0 (const int)
+0:92 0 (const int)
+0:92 0 (const int)
+0:93 imageLoad (global highp 4-component vector of float)
+0:93 'img2Drgba' (layout(rgba32f ) readonly uniform lowp image2D)
+0:93 Construct ivec2 (temp highp 2-component vector of int)
+0:93 'i' (temp highp int)
+0:93 'i' (temp highp int)
+0:94 imageLoad (global highp 4-component vector of int)
+0:94 'ii2da' (writeonly uniform highp iimage2DArray)
+0:94 Construct ivec3 (temp highp 3-component vector of int)
+0:94 'i' (temp highp int)
+0:94 'i' (temp highp int)
+0:94 'i' (temp highp int)
+0:100 Function Definition: passr(iI21; (global void)
+0:100 Function Parameters:
+0:100 'image' (coherent readonly in highp iimage2D)
+0:107 Function Definition: passrc( (global void)
+0:107 Function Parameters:
+0:109 Sequence
+0:109 Function Call: passr(iI21; (global void)
+0:109 'qualim1' (layout(r32i ) coherent readonly uniform highp iimage2D)
+0:110 Function Call: passr(iI21; (global void)
+0:110 'qualim2' (layout(r32i ) coherent restrict readonly uniform highp iimage2D)
+0:111 Function Call: passr(iI21; (global void)
+0:111 'iimg2D' (layout(r32i ) uniform highp iimage2D)
+0:123 Function Definition: func(au1; (global highp uint)
+0:123 Function Parameters:
+0:123 'c' (in highp atomic_uint)
+0:125 Sequence
+0:125 Branch: Return with expression
+0:125 AtomicCounterIncrement (global highp uint)
+0:125 'c' (in highp atomic_uint)
+0:128 Function Definition: func2(au1; (global highp uint)
+0:128 Function Parameters:
+0:128 'c' (out highp atomic_uint)
+0:130 Sequence
+0:130 Branch: Return with expression
+0:130 'counter' (layout(binding=0 offset=0 ) uniform highp atomic_uint)
+0:131 Branch: Return with expression
+0:131 AtomicCounter (global highp uint)
+0:131 'counter' (layout(binding=0 offset=0 ) uniform highp atomic_uint)
+0:134 Function Definition: mainAC( (global void)
+0:134 Function Parameters:
+0:? Sequence
+0:137 Sequence
+0:137 move second child to first child (temp highp uint)
+0:137 'val' (temp highp uint)
+0:137 AtomicCounter (global highp uint)
+0:137 'counter' (layout(binding=0 offset=0 ) uniform highp atomic_uint)
+0:138 AtomicCounterDecrement (global highp uint)
+0:138 'counter' (layout(binding=0 offset=0 ) uniform highp atomic_uint)
+0:146 Function Definition: opac( (global void)
+0:146 Function Parameters:
+0:? Sequence
+0:149 indirect index (temp highp int)
+0:149 'a' (temp 3-element array of highp int)
+0:149 'counter' (layout(binding=0 offset=0 ) uniform highp atomic_uint)
+0:150 direct index (layout(binding=2 offset=4 ) temp highp atomic_uint)
+0:150 'countArr' (layout(binding=2 offset=4 ) uniform 4-element array of highp atomic_uint)
+0:150 Constant:
+0:150 2 (const int)
+0:151 indirect index (layout(binding=2 offset=4 ) temp highp atomic_uint)
+0:151 'countArr' (layout(binding=2 offset=4 ) uniform 4-element array of highp atomic_uint)
+0:151 'i' (uniform highp int)
+0:157 Function Definition: atoms( (global void)
+0:157 Function Parameters:
+0:159 Sequence
+0:159 Sequence
+0:159 move second child to first child (temp highp int)
+0:159 'origi' (temp highp int)
+0:159 AtomicAdd (global highp int)
+0:159 'atomi' (shared highp int)
+0:159 Constant:
+0:159 3 (const int)
+0:160 Sequence
+0:160 move second child to first child (temp highp uint)
+0:160 'origu' (temp highp uint)
+0:160 AtomicAnd (global highp uint)
+0:160 'atomu' (shared highp uint)
+0:160 Constant:
+0:160 7 (const uint)
+0:161 move second child to first child (temp highp int)
+0:161 'origi' (temp highp int)
+0:161 AtomicExchange (global highp int)
+0:161 'atomi' (shared highp int)
+0:161 Constant:
+0:161 4 (const int)
+0:162 move second child to first child (temp highp uint)
+0:162 'origu' (temp highp uint)
+0:162 AtomicCompSwap (global highp uint)
+0:162 'atomu' (shared highp uint)
+0:162 Constant:
+0:162 10 (const uint)
+0:162 Constant:
+0:162 8 (const uint)
+0:191 Function Definition: foowo( (global void)
+0:191 Function Parameters:
+0:? Sequence
+0:194 move second child to first child (temp highp float)
+0:194 'g' (temp highp float)
+0:194 direct index (layout(column_major shared ) temp highp float)
+0:194 values: direct index for structure (layout(column_major shared ) buffer implicitly-sized array of highp float)
+0:194 'wo' (layout(column_major shared ) writeonly buffer block{layout(column_major shared ) buffer highp int value, layout(column_major shared ) buffer implicitly-sized array of highp float values})
+0:194 Constant:
+0:194 1 (const int)
+0:194 Constant:
+0:194 2 (const int)
+0:195 Sequence
+0:195 move second child to first child (temp highp float)
+0:195 'f' (temp highp float)
+0:195 direct index (layout(column_major shared ) temp highp float)
+0:195 values: direct index for structure (layout(column_major shared ) buffer implicitly-sized array of highp float)
+0:195 'wo' (layout(column_major shared ) writeonly buffer block{layout(column_major shared ) buffer highp int value, layout(column_major shared ) buffer implicitly-sized array of highp float values})
+0:195 Constant:
+0:195 1 (const int)
+0:195 Constant:
+0:195 2 (const int)
+0:196 Pre-Increment (temp highp float)
+0:196 direct index (layout(column_major shared ) temp highp float)
+0:196 values: direct index for structure (layout(column_major shared ) buffer implicitly-sized array of highp float)
+0:196 'wo' (layout(column_major shared ) writeonly buffer block{layout(column_major shared ) buffer highp int value, layout(column_major shared ) buffer implicitly-sized array of highp float values})
+0:196 Constant:
+0:196 1 (const int)
+0:196 Constant:
+0:196 2 (const int)
+0:197 Post-Decrement (temp highp float)
+0:197 direct index (layout(column_major shared ) temp highp float)
+0:197 values: direct index for structure (layout(column_major shared ) buffer implicitly-sized array of highp float)
+0:197 'wo' (layout(column_major shared ) writeonly buffer block{layout(column_major shared ) buffer highp int value, layout(column_major shared ) buffer implicitly-sized array of highp float values})
+0:197 Constant:
+0:197 1 (const int)
+0:197 Constant:
+0:197 2 (const int)
+0:198 add (temp highp float)
+0:198 'f' (temp highp float)
+0:198 direct index (layout(column_major shared ) temp highp float)
+0:198 values: direct index for structure (layout(column_major shared ) buffer implicitly-sized array of highp float)
+0:198 'wo' (layout(column_major shared ) writeonly buffer block{layout(column_major shared ) buffer highp int value, layout(column_major shared ) buffer implicitly-sized array of highp float values})
+0:198 Constant:
+0:198 1 (const int)
+0:198 Constant:
+0:198 2 (const int)
+0:199 subtract (temp highp float)
+0:199 direct index (layout(column_major shared ) temp highp float)
+0:199 values: direct index for structure (layout(column_major shared ) buffer implicitly-sized array of highp float)
+0:199 'wo' (layout(column_major shared ) writeonly buffer block{layout(column_major shared ) buffer highp int value, layout(column_major shared ) buffer implicitly-sized array of highp float values})
+0:199 Constant:
+0:199 1 (const int)
+0:199 Constant:
+0:199 2 (const int)
+0:199 'f' (temp highp float)
+0:201 Test condition and select (temp highp float)
+0:201 Condition
+0:201 'b' (temp bool)
+0:201 true case
+0:201 'f' (temp highp float)
+0:201 false case
+0:201 direct index (layout(column_major shared ) temp highp float)
+0:201 values: direct index for structure (layout(column_major shared ) buffer implicitly-sized array of highp float)
+0:201 'wo' (layout(column_major shared ) writeonly buffer block{layout(column_major shared ) buffer highp int value, layout(column_major shared ) buffer implicitly-sized array of highp float values})
+0:201 Constant:
+0:201 1 (const int)
+0:201 Constant:
+0:201 2 (const int)
+0:202 Test condition and select (temp highp float)
+0:202 Condition
+0:202 'b' (temp bool)
+0:202 true case
+0:202 direct index (layout(column_major shared ) temp highp float)
+0:202 values: direct index for structure (layout(column_major shared ) buffer implicitly-sized array of highp float)
+0:202 'wo' (layout(column_major shared ) writeonly buffer block{layout(column_major shared ) buffer highp int value, layout(column_major shared ) buffer implicitly-sized array of highp float values})
+0:202 Constant:
+0:202 1 (const int)
+0:202 Constant:
+0:202 2 (const int)
+0:202 false case
+0:202 'f' (temp highp float)
+0:203 Test condition and select (temp void)
+0:203 Condition
+0:203 Compare Equal (temp bool)
+0:203 'f' (temp highp float)
+0:203 direct index (layout(column_major shared ) temp highp float)
+0:203 values: direct index for structure (layout(column_major shared ) buffer implicitly-sized array of highp float)
+0:203 'wo' (layout(column_major shared ) writeonly buffer block{layout(column_major shared ) buffer highp int value, layout(column_major shared ) buffer implicitly-sized array of highp float values})
+0:203 Constant:
+0:203 1 (const int)
+0:203 Constant:
+0:203 2 (const int)
+0:203 true case
+0:204 Pre-Increment (temp highp float)
+0:204 'f' (temp highp float)
+0:205 Test condition and select (temp void)
+0:205 Condition
+0:205 Compare Greater Than or Equal (temp bool)
+0:205 'f' (temp highp float)
+0:205 direct index (layout(column_major shared ) temp highp float)
+0:205 values: direct index for structure (layout(column_major shared ) buffer implicitly-sized array of highp float)
+0:205 'wo' (layout(column_major shared ) writeonly buffer block{layout(column_major shared ) buffer highp int value, layout(column_major shared ) buffer implicitly-sized array of highp float values})
+0:205 Constant:
+0:205 1 (const int)
+0:205 Constant:
+0:205 2 (const int)
+0:205 true case
+0:206 Pre-Increment (temp highp float)
+0:206 'f' (temp highp float)
+0:207 move second child to first child (temp highp float)
+0:207 'f' (temp highp float)
+0:207 direct index (temp highp float)
+0:207 Construct vec3 (temp highp 3-component vector of float)
+0:207 direct index (layout(column_major shared ) temp highp float)
+0:207 values: direct index for structure (layout(column_major shared ) buffer implicitly-sized array of highp float)
+0:207 'wo' (layout(column_major shared ) writeonly buffer block{layout(column_major shared ) buffer highp int value, layout(column_major shared ) buffer implicitly-sized array of highp float values})
+0:207 Constant:
+0:207 1 (const int)
+0:207 Constant:
+0:207 2 (const int)
+0:207 Constant:
+0:207 0 (const int)
+0:208 Bitwise not (temp highp int)
+0:208 value: direct index for structure (layout(column_major shared ) buffer highp int)
+0:208 'wo' (layout(column_major shared ) writeonly buffer block{layout(column_major shared ) buffer highp int value, layout(column_major shared ) buffer implicitly-sized array of highp float values})
+0:208 Constant:
+0:208 0 (const int)
+0:209 move second child to first child (temp highp float)
+0:209 direct index (layout(column_major shared ) temp highp float)
+0:209 values: direct index for structure (layout(column_major shared ) buffer implicitly-sized array of highp float)
+0:209 'wo' (layout(column_major shared ) writeonly buffer block{layout(column_major shared ) buffer highp int value, layout(column_major shared ) buffer implicitly-sized array of highp float values})
+0:209 Constant:
+0:209 1 (const int)
+0:209 Constant:
+0:209 2 (const int)
+0:209 Constant:
+0:209 3.400000
+0:218 Function Definition: foomultio( (global void)
+0:218 Function Parameters:
+0:? Sequence
+0:221 move second child to first child (temp highp float)
+0:221 'g' (temp highp float)
+0:221 direct index (layout(column_major shared ) temp highp float)
+0:221 values: direct index for structure (layout(column_major shared ) buffer implicitly-sized array of highp float)
+0:221 'wo' (layout(column_major shared ) writeonly buffer block{layout(column_major shared ) buffer highp int value, layout(column_major shared ) buffer implicitly-sized array of highp float values})
+0:221 Constant:
+0:221 1 (const int)
+0:221 Constant:
+0:221 2 (const int)
+0:222 Bitwise not (temp highp int)
+0:222 value: direct index for structure (layout(column_major shared ) buffer highp int)
+0:222 'wo' (layout(column_major shared ) writeonly buffer block{layout(column_major shared ) buffer highp int value, layout(column_major shared ) buffer implicitly-sized array of highp float values})
+0:222 Constant:
+0:222 0 (const int)
+0:223 move second child to first child (temp highp float)
+0:223 direct index (layout(column_major shared ) temp highp float)
+0:223 values: direct index for structure (layout(column_major shared ) buffer implicitly-sized array of highp float)
+0:223 'wo' (layout(column_major shared ) writeonly buffer block{layout(column_major shared ) buffer highp int value, layout(column_major shared ) buffer implicitly-sized array of highp float values})
+0:223 Constant:
+0:223 1 (const int)
+0:223 Constant:
+0:223 2 (const int)
+0:223 Constant:
+0:223 3.400000
+0:224 move second child to first child (temp highp int)
+0:224 value: direct index for structure (layout(column_major shared ) buffer highp int)
+0:224 'wo' (layout(column_major shared ) writeonly buffer block{layout(column_major shared ) buffer highp int value, layout(column_major shared ) buffer implicitly-sized array of highp float values})
+0:224 Constant:
+0:224 0 (const int)
+0:224 Constant:
+0:224 2 (const int)
+0:? Linker Objects
+0:? 'gl_WorkGroupSize' (const highp 3-component vector of uint WorkGroupSize)
+0:? 2 (const uint)
+0:? 1 (const uint)
+0:? 4096 (const uint)
+0:? 'total' (const highp int)
+0:? 66592 (const int)
+0:? 'anon@0' (layout(column_major shared ) buffer block{layout(column_major shared ) buffer highp int value, layout(column_major shared ) buffer implicitly-sized array of highp float values})
+0:? 'invalid' (layout(column_major shared ) buffer block{layout(column_major shared ) buffer implicitly-sized array of highp float values, layout(column_major shared ) buffer highp int value})
+0:? 'v3' (layout(location=2 ) in highp 3-component vector of float)
+0:? 'f' (in highp float)
+0:? 'fo' (out highp float)
+0:? 's' (shared highp 4-component vector of float)
+0:? 'sl' (layout(location=2 ) shared highp 4-component vector of float)
+0:? 'fs' (shared highp float)
+0:? 'arrX' (global 2-element array of highp int)
+0:? 'arrY' (global 1-element array of highp int)
+0:? 'arrZ' (global 4096-element array of highp int)
+0:? 'ro' (layout(column_major shared ) readonly buffer block{layout(column_major shared ) buffer highp int value, layout(column_major shared ) buffer implicitly-sized array of highp float values})
+0:? 'v' (buffer highp 4-component vector of float)
+0:? 'us2dbad' (uniform mediump usampler2D)
+0:? 'us2d' (uniform highp usampler2D)
+0:? 'ii2dabad' (uniform highp iimage2DArray)
+0:? 'ii2da' (writeonly uniform highp iimage2DArray)
+0:? 'iimg2D' (layout(r32i ) uniform highp iimage2D)
+0:? 'iimg2Drgba' (layout(rgba32i ) readonly uniform highp iimage2D)
+0:? 'img2Drgba' (layout(rgba32f ) readonly uniform lowp image2D)
+0:? 'uimg2D' (layout(r32ui ) uniform highp uimage2D)
+0:? 'vol' (volatile temp highp float)
+0:? 'vol2' (readonly temp highp int)
+0:? 'qualim1' (layout(r32i ) coherent readonly uniform highp iimage2D)
+0:? 'qualim2' (layout(r32i ) coherent restrict readonly uniform highp iimage2D)
+0:? 'i1bad' (layout(rg8i ) readonly uniform highp uimage2D)
+0:? 'i2bad' (layout(rgba32i ) readonly uniform lowp image2D)
+0:? 'i3bad' (layout(rgba32f ) readonly uniform highp uimage2D)
+0:? 'i4bad' (layout(r8_snorm ) readonly uniform highp iimage2D)
+0:? 'i5bad' (layout(rgba32ui ) readonly uniform highp iimage2D)
+0:? 'i6bad' (layout(r8ui ) readonly uniform highp iimage2D)
+0:? 'counter' (layout(binding=0 offset=0 ) uniform highp atomic_uint)
+0:? 'counterBad' (layout(binding=1 ) uniform mediump atomic_uint)
+0:? 'countArr' (layout(binding=2 offset=4 ) uniform 4-element array of highp atomic_uint)
+0:? 'i' (uniform highp int)
+0:? 'atomi' (shared highp int)
+0:? 'atomu' (shared highp uint)
+0:? 'pfoo' (noContraction temp highp int)
+0:? 'dm' (global 2X4 matrix of double)
+0:? 'sca' (uniform mediump samplerCubeArray)
+0:? 'i2dr' (uniform mediump iimage2DRect)
+0:? 'i2dms' (uniform lowp image2DMS)
+0:? 'u2dmsa' (uniform mediump uimage2DMSArray)
+0:? 'okay1' (layout(r32f ) coherent volatile restrict readonly writeonly uniform lowp image2D)
+0:? 'okay2' (layout(r32i ) coherent volatile restrict readonly uniform highp iimage2D)
+0:? 'okay3' (layout(r32ui ) coherent volatile restrict writeonly uniform highp uimage2D)
+0:? 'okay4' (layout(r32f ) coherent volatile restrict uniform lowp image2D)
+0:? 'badQ1' (layout(rgba32f ) coherent volatile restrict uniform lowp image2D)
+0:? 'badQ2' (layout(rgba8i ) coherent volatile restrict uniform highp iimage2D)
+0:? 'badQ3' (layout(rgba16ui ) coherent volatile restrict uniform highp uimage2D)
+0:? 'wo' (layout(column_major shared ) writeonly buffer block{layout(column_major shared ) buffer highp int value, layout(column_major shared ) buffer implicitly-sized array of highp float values})
+0:? 'multio' (layout(column_major shared ) buffer block{layout(column_major shared ) readonly buffer highp int value, layout(column_major shared ) writeonly buffer implicitly-sized array of highp float values})
+0:? 'inbi' (in block{in highp int a})
+0:? 'outbi' (out block{out highp int a})
+0:? 't__' (global highp float)
+0:? 'arr' (shared 2-element array of 3-element array of 4-element array of highp 4-component vector of float)
+
+
+Linked compute stage:
+
+
+Shader version: 310
+local_size = (2, 1, 4096)
+ERROR: node is still EOpNull!
+0:27 Function Definition: main( (global void)
+0:27 Function Parameters:
+0:29 Sequence
+0:29 Barrier (global void)
+0:30 MemoryBarrier (global void)
+0:31 MemoryBarrierAtomicCounter (global void)
+0:32 MemoryBarrierBuffer (global void)
+0:33 MemoryBarrierShared (global void)
+0:34 MemoryBarrierImage (global void)
+0:35 GroupMemoryBarrier (global void)
+0:36 move second child to first child (temp highp int)
+0:36 value: direct index for structure (layout(column_major shared ) buffer highp int)
+0:36 'anon@0' (layout(column_major shared ) buffer block{layout(column_major shared ) buffer highp int value, layout(column_major shared ) buffer implicitly-sized array of highp float values})
+0:36 Constant:
+0:36 0 (const uint)
+0:36 Convert float to int (temp highp int)
+0:36 indirect index (layout(column_major shared ) temp highp float)
+0:36 values: direct index for structure (layout(column_major shared ) buffer implicitly-sized array of highp float)
+0:36 'anon@0' (layout(column_major shared ) buffer block{layout(column_major shared ) buffer highp int value, layout(column_major shared ) buffer implicitly-sized array of highp float values})
+0:36 Constant:
+0:36 1 (const uint)
+0:36 'gl_LocalInvocationIndex' (in highp uint LocalInvocationIndex)
+0:59 Function Definition: foo( (global void)
+0:59 Function Parameters:
+0:61 Sequence
+0:61 move second child to first child (temp highp float)
+0:61 direct index (layout(column_major shared ) temp highp float)
+0:61 values: direct index for structure (layout(column_major shared ) buffer implicitly-sized array of highp float)
+0:61 'ro' (layout(column_major shared ) readonly buffer block{layout(column_major shared ) buffer highp int value, layout(column_major shared ) buffer implicitly-sized array of highp float values})
+0:61 Constant:
+0:61 1 (const int)
+0:61 Constant:
+0:61 2 (const int)
+0:61 Constant:
+0:61 4.700000
+0:62 array length (temp highp int)
+0:62 values: direct index for structure (layout(column_major shared ) buffer implicitly-sized array of highp float)
+0:62 'ro' (layout(column_major shared ) readonly buffer block{layout(column_major shared ) buffer highp int value, layout(column_major shared ) buffer implicitly-sized array of highp float values})
+0:62 Constant:
+0:62 1 (const int)
+0:63 Pre-Increment (temp highp 4-component vector of float)
+0:63 's' (shared highp 4-component vector of float)
+0:84 Function Definition: qux( (global void)
+0:84 Function Parameters:
+0:86 Sequence
+0:86 Sequence
+0:86 move second child to first child (temp highp int)
+0:86 'i' (temp highp int)
+0:86 Constant:
+0:86 4 (const int)
+0:87 imageAtomicCompSwap (global highp int)
+0:87 'iimg2D' (layout(r32i ) uniform highp iimage2D)
+0:87 Construct ivec2 (temp highp 2-component vector of int)
+0:87 'i' (temp highp int)
+0:87 'i' (temp highp int)
+0:87 'i' (temp highp int)
+0:87 'i' (temp highp int)
+0:88 imageAtomicAdd (global highp uint)
+0:88 'uimg2D' (layout(r32ui ) uniform highp uimage2D)
+0:88 Construct ivec2 (temp highp 2-component vector of int)
+0:88 'i' (temp highp int)
+0:88 'i' (temp highp int)
+0:88 Convert int to uint (temp highp uint)
+0:88 'i' (temp highp int)
+0:89 imageAtomicMin (global highp int)
+0:89 'iimg2Drgba' (layout(rgba32i ) readonly uniform highp iimage2D)
+0:89 Construct ivec2 (temp highp 2-component vector of int)
+0:89 'i' (temp highp int)
+0:89 'i' (temp highp int)
+0:89 'i' (temp highp int)
+0:90 Constant:
+0:90 0.000000
+0:91 Sequence
+0:91 move second child to first child (temp highp 4-component vector of int)
+0:91 'pos' (temp highp 4-component vector of int)
+0:91 imageLoad (global highp 4-component vector of int)
+0:91 'iimg2D' (layout(r32i ) uniform highp iimage2D)
+0:91 Construct ivec2 (temp highp 2-component vector of int)
+0:91 'i' (temp highp int)
+0:91 'i' (temp highp int)
+0:92 imageStore (global highp void)
+0:92 'ii2da' (writeonly uniform highp iimage2DArray)
+0:92 Construct ivec3 (temp 3-component vector of int)
+0:92 'i' (temp highp int)
+0:92 'i' (temp highp int)
+0:92 'i' (temp highp int)
+0:92 Constant:
+0:92 0 (const int)
+0:92 0 (const int)
+0:92 0 (const int)
+0:92 0 (const int)
+0:93 imageLoad (global highp 4-component vector of float)
+0:93 'img2Drgba' (layout(rgba32f ) readonly uniform lowp image2D)
+0:93 Construct ivec2 (temp highp 2-component vector of int)
+0:93 'i' (temp highp int)
+0:93 'i' (temp highp int)
+0:94 imageLoad (global highp 4-component vector of int)
+0:94 'ii2da' (writeonly uniform highp iimage2DArray)
+0:94 Construct ivec3 (temp highp 3-component vector of int)
+0:94 'i' (temp highp int)
+0:94 'i' (temp highp int)
+0:94 'i' (temp highp int)
+0:100 Function Definition: passr(iI21; (global void)
+0:100 Function Parameters:
+0:100 'image' (coherent readonly in highp iimage2D)
+0:107 Function Definition: passrc( (global void)
+0:107 Function Parameters:
+0:109 Sequence
+0:109 Function Call: passr(iI21; (global void)
+0:109 'qualim1' (layout(r32i ) coherent readonly uniform highp iimage2D)
+0:110 Function Call: passr(iI21; (global void)
+0:110 'qualim2' (layout(r32i ) coherent restrict readonly uniform highp iimage2D)
+0:111 Function Call: passr(iI21; (global void)
+0:111 'iimg2D' (layout(r32i ) uniform highp iimage2D)
+0:123 Function Definition: func(au1; (global highp uint)
+0:123 Function Parameters:
+0:123 'c' (in highp atomic_uint)
+0:125 Sequence
+0:125 Branch: Return with expression
+0:125 AtomicCounterIncrement (global highp uint)
+0:125 'c' (in highp atomic_uint)
+0:128 Function Definition: func2(au1; (global highp uint)
+0:128 Function Parameters:
+0:128 'c' (out highp atomic_uint)
+0:130 Sequence
+0:130 Branch: Return with expression
+0:130 'counter' (layout(binding=0 offset=0 ) uniform highp atomic_uint)
+0:131 Branch: Return with expression
+0:131 AtomicCounter (global highp uint)
+0:131 'counter' (layout(binding=0 offset=0 ) uniform highp atomic_uint)
+0:134 Function Definition: mainAC( (global void)
+0:134 Function Parameters:
+0:? Sequence
+0:137 Sequence
+0:137 move second child to first child (temp highp uint)
+0:137 'val' (temp highp uint)
+0:137 AtomicCounter (global highp uint)
+0:137 'counter' (layout(binding=0 offset=0 ) uniform highp atomic_uint)
+0:138 AtomicCounterDecrement (global highp uint)
+0:138 'counter' (layout(binding=0 offset=0 ) uniform highp atomic_uint)
+0:146 Function Definition: opac( (global void)
+0:146 Function Parameters:
+0:? Sequence
+0:149 indirect index (temp highp int)
+0:149 'a' (temp 3-element array of highp int)
+0:149 'counter' (layout(binding=0 offset=0 ) uniform highp atomic_uint)
+0:150 direct index (layout(binding=2 offset=4 ) temp highp atomic_uint)
+0:150 'countArr' (layout(binding=2 offset=4 ) uniform 4-element array of highp atomic_uint)
+0:150 Constant:
+0:150 2 (const int)
+0:151 indirect index (layout(binding=2 offset=4 ) temp highp atomic_uint)
+0:151 'countArr' (layout(binding=2 offset=4 ) uniform 4-element array of highp atomic_uint)
+0:151 'i' (uniform highp int)
+0:157 Function Definition: atoms( (global void)
+0:157 Function Parameters:
+0:159 Sequence
+0:159 Sequence
+0:159 move second child to first child (temp highp int)
+0:159 'origi' (temp highp int)
+0:159 AtomicAdd (global highp int)
+0:159 'atomi' (shared highp int)
+0:159 Constant:
+0:159 3 (const int)
+0:160 Sequence
+0:160 move second child to first child (temp highp uint)
+0:160 'origu' (temp highp uint)
+0:160 AtomicAnd (global highp uint)
+0:160 'atomu' (shared highp uint)
+0:160 Constant:
+0:160 7 (const uint)
+0:161 move second child to first child (temp highp int)
+0:161 'origi' (temp highp int)
+0:161 AtomicExchange (global highp int)
+0:161 'atomi' (shared highp int)
+0:161 Constant:
+0:161 4 (const int)
+0:162 move second child to first child (temp highp uint)
+0:162 'origu' (temp highp uint)
+0:162 AtomicCompSwap (global highp uint)
+0:162 'atomu' (shared highp uint)
+0:162 Constant:
+0:162 10 (const uint)
+0:162 Constant:
+0:162 8 (const uint)
+0:191 Function Definition: foowo( (global void)
+0:191 Function Parameters:
+0:? Sequence
+0:194 move second child to first child (temp highp float)
+0:194 'g' (temp highp float)
+0:194 direct index (layout(column_major shared ) temp highp float)
+0:194 values: direct index for structure (layout(column_major shared ) buffer implicitly-sized array of highp float)
+0:194 'wo' (layout(column_major shared ) writeonly buffer block{layout(column_major shared ) buffer highp int value, layout(column_major shared ) buffer implicitly-sized array of highp float values})
+0:194 Constant:
+0:194 1 (const int)
+0:194 Constant:
+0:194 2 (const int)
+0:195 Sequence
+0:195 move second child to first child (temp highp float)
+0:195 'f' (temp highp float)
+0:195 direct index (layout(column_major shared ) temp highp float)
+0:195 values: direct index for structure (layout(column_major shared ) buffer implicitly-sized array of highp float)
+0:195 'wo' (layout(column_major shared ) writeonly buffer block{layout(column_major shared ) buffer highp int value, layout(column_major shared ) buffer implicitly-sized array of highp float values})
+0:195 Constant:
+0:195 1 (const int)
+0:195 Constant:
+0:195 2 (const int)
+0:196 Pre-Increment (temp highp float)
+0:196 direct index (layout(column_major shared ) temp highp float)
+0:196 values: direct index for structure (layout(column_major shared ) buffer implicitly-sized array of highp float)
+0:196 'wo' (layout(column_major shared ) writeonly buffer block{layout(column_major shared ) buffer highp int value, layout(column_major shared ) buffer implicitly-sized array of highp float values})
+0:196 Constant:
+0:196 1 (const int)
+0:196 Constant:
+0:196 2 (const int)
+0:197 Post-Decrement (temp highp float)
+0:197 direct index (layout(column_major shared ) temp highp float)
+0:197 values: direct index for structure (layout(column_major shared ) buffer implicitly-sized array of highp float)
+0:197 'wo' (layout(column_major shared ) writeonly buffer block{layout(column_major shared ) buffer highp int value, layout(column_major shared ) buffer implicitly-sized array of highp float values})
+0:197 Constant:
+0:197 1 (const int)
+0:197 Constant:
+0:197 2 (const int)
+0:198 add (temp highp float)
+0:198 'f' (temp highp float)
+0:198 direct index (layout(column_major shared ) temp highp float)
+0:198 values: direct index for structure (layout(column_major shared ) buffer implicitly-sized array of highp float)
+0:198 'wo' (layout(column_major shared ) writeonly buffer block{layout(column_major shared ) buffer highp int value, layout(column_major shared ) buffer implicitly-sized array of highp float values})
+0:198 Constant:
+0:198 1 (const int)
+0:198 Constant:
+0:198 2 (const int)
+0:199 subtract (temp highp float)
+0:199 direct index (layout(column_major shared ) temp highp float)
+0:199 values: direct index for structure (layout(column_major shared ) buffer implicitly-sized array of highp float)
+0:199 'wo' (layout(column_major shared ) writeonly buffer block{layout(column_major shared ) buffer highp int value, layout(column_major shared ) buffer implicitly-sized array of highp float values})
+0:199 Constant:
+0:199 1 (const int)
+0:199 Constant:
+0:199 2 (const int)
+0:199 'f' (temp highp float)
+0:201 Test condition and select (temp highp float)
+0:201 Condition
+0:201 'b' (temp bool)
+0:201 true case
+0:201 'f' (temp highp float)
+0:201 false case
+0:201 direct index (layout(column_major shared ) temp highp float)
+0:201 values: direct index for structure (layout(column_major shared ) buffer implicitly-sized array of highp float)
+0:201 'wo' (layout(column_major shared ) writeonly buffer block{layout(column_major shared ) buffer highp int value, layout(column_major shared ) buffer implicitly-sized array of highp float values})
+0:201 Constant:
+0:201 1 (const int)
+0:201 Constant:
+0:201 2 (const int)
+0:202 Test condition and select (temp highp float)
+0:202 Condition
+0:202 'b' (temp bool)
+0:202 true case
+0:202 direct index (layout(column_major shared ) temp highp float)
+0:202 values: direct index for structure (layout(column_major shared ) buffer implicitly-sized array of highp float)
+0:202 'wo' (layout(column_major shared ) writeonly buffer block{layout(column_major shared ) buffer highp int value, layout(column_major shared ) buffer implicitly-sized array of highp float values})
+0:202 Constant:
+0:202 1 (const int)
+0:202 Constant:
+0:202 2 (const int)
+0:202 false case
+0:202 'f' (temp highp float)
+0:203 Test condition and select (temp void)
+0:203 Condition
+0:203 Compare Equal (temp bool)
+0:203 'f' (temp highp float)
+0:203 direct index (layout(column_major shared ) temp highp float)
+0:203 values: direct index for structure (layout(column_major shared ) buffer implicitly-sized array of highp float)
+0:203 'wo' (layout(column_major shared ) writeonly buffer block{layout(column_major shared ) buffer highp int value, layout(column_major shared ) buffer implicitly-sized array of highp float values})
+0:203 Constant:
+0:203 1 (const int)
+0:203 Constant:
+0:203 2 (const int)
+0:203 true case
+0:204 Pre-Increment (temp highp float)
+0:204 'f' (temp highp float)
+0:205 Test condition and select (temp void)
+0:205 Condition
+0:205 Compare Greater Than or Equal (temp bool)
+0:205 'f' (temp highp float)
+0:205 direct index (layout(column_major shared ) temp highp float)
+0:205 values: direct index for structure (layout(column_major shared ) buffer implicitly-sized array of highp float)
+0:205 'wo' (layout(column_major shared ) writeonly buffer block{layout(column_major shared ) buffer highp int value, layout(column_major shared ) buffer implicitly-sized array of highp float values})
+0:205 Constant:
+0:205 1 (const int)
+0:205 Constant:
+0:205 2 (const int)
+0:205 true case
+0:206 Pre-Increment (temp highp float)
+0:206 'f' (temp highp float)
+0:207 move second child to first child (temp highp float)
+0:207 'f' (temp highp float)
+0:207 direct index (temp highp float)
+0:207 Construct vec3 (temp highp 3-component vector of float)
+0:207 direct index (layout(column_major shared ) temp highp float)
+0:207 values: direct index for structure (layout(column_major shared ) buffer implicitly-sized array of highp float)
+0:207 'wo' (layout(column_major shared ) writeonly buffer block{layout(column_major shared ) buffer highp int value, layout(column_major shared ) buffer implicitly-sized array of highp float values})
+0:207 Constant:
+0:207 1 (const int)
+0:207 Constant:
+0:207 2 (const int)
+0:207 Constant:
+0:207 0 (const int)
+0:208 Bitwise not (temp highp int)
+0:208 value: direct index for structure (layout(column_major shared ) buffer highp int)
+0:208 'wo' (layout(column_major shared ) writeonly buffer block{layout(column_major shared ) buffer highp int value, layout(column_major shared ) buffer implicitly-sized array of highp float values})
+0:208 Constant:
+0:208 0 (const int)
+0:209 move second child to first child (temp highp float)
+0:209 direct index (layout(column_major shared ) temp highp float)
+0:209 values: direct index for structure (layout(column_major shared ) buffer implicitly-sized array of highp float)
+0:209 'wo' (layout(column_major shared ) writeonly buffer block{layout(column_major shared ) buffer highp int value, layout(column_major shared ) buffer implicitly-sized array of highp float values})
+0:209 Constant:
+0:209 1 (const int)
+0:209 Constant:
+0:209 2 (const int)
+0:209 Constant:
+0:209 3.400000
+0:218 Function Definition: foomultio( (global void)
+0:218 Function Parameters:
+0:? Sequence
+0:221 move second child to first child (temp highp float)
+0:221 'g' (temp highp float)
+0:221 direct index (layout(column_major shared ) temp highp float)
+0:221 values: direct index for structure (layout(column_major shared ) buffer implicitly-sized array of highp float)
+0:221 'wo' (layout(column_major shared ) writeonly buffer block{layout(column_major shared ) buffer highp int value, layout(column_major shared ) buffer implicitly-sized array of highp float values})
+0:221 Constant:
+0:221 1 (const int)
+0:221 Constant:
+0:221 2 (const int)
+0:222 Bitwise not (temp highp int)
+0:222 value: direct index for structure (layout(column_major shared ) buffer highp int)
+0:222 'wo' (layout(column_major shared ) writeonly buffer block{layout(column_major shared ) buffer highp int value, layout(column_major shared ) buffer implicitly-sized array of highp float values})
+0:222 Constant:
+0:222 0 (const int)
+0:223 move second child to first child (temp highp float)
+0:223 direct index (layout(column_major shared ) temp highp float)
+0:223 values: direct index for structure (layout(column_major shared ) buffer implicitly-sized array of highp float)
+0:223 'wo' (layout(column_major shared ) writeonly buffer block{layout(column_major shared ) buffer highp int value, layout(column_major shared ) buffer implicitly-sized array of highp float values})
+0:223 Constant:
+0:223 1 (const int)
+0:223 Constant:
+0:223 2 (const int)
+0:223 Constant:
+0:223 3.400000
+0:224 move second child to first child (temp highp int)
+0:224 value: direct index for structure (layout(column_major shared ) buffer highp int)
+0:224 'wo' (layout(column_major shared ) writeonly buffer block{layout(column_major shared ) buffer highp int value, layout(column_major shared ) buffer implicitly-sized array of highp float values})
+0:224 Constant:
+0:224 0 (const int)
+0:224 Constant:
+0:224 2 (const int)
+0:? Linker Objects
+0:? 'gl_WorkGroupSize' (const highp 3-component vector of uint WorkGroupSize)
+0:? 2 (const uint)
+0:? 1 (const uint)
+0:? 4096 (const uint)
+0:? 'total' (const highp int)
+0:? 66592 (const int)
+0:? 'anon@0' (layout(column_major shared ) buffer block{layout(column_major shared ) buffer highp int value, layout(column_major shared ) buffer implicitly-sized array of highp float values})
+0:? 'invalid' (layout(column_major shared ) buffer block{layout(column_major shared ) buffer implicitly-sized array of highp float values, layout(column_major shared ) buffer highp int value})
+0:? 'v3' (layout(location=2 ) in highp 3-component vector of float)
+0:? 'f' (in highp float)
+0:? 'fo' (out highp float)
+0:? 's' (shared highp 4-component vector of float)
+0:? 'sl' (layout(location=2 ) shared highp 4-component vector of float)
+0:? 'fs' (shared highp float)
+0:? 'arrX' (global 2-element array of highp int)
+0:? 'arrY' (global 1-element array of highp int)
+0:? 'arrZ' (global 4096-element array of highp int)
+0:? 'ro' (layout(column_major shared ) readonly buffer block{layout(column_major shared ) buffer highp int value, layout(column_major shared ) buffer implicitly-sized array of highp float values})
+0:? 'v' (buffer highp 4-component vector of float)
+0:? 'us2dbad' (uniform mediump usampler2D)
+0:? 'us2d' (uniform highp usampler2D)
+0:? 'ii2dabad' (uniform highp iimage2DArray)
+0:? 'ii2da' (writeonly uniform highp iimage2DArray)
+0:? 'iimg2D' (layout(r32i ) uniform highp iimage2D)
+0:? 'iimg2Drgba' (layout(rgba32i ) readonly uniform highp iimage2D)
+0:? 'img2Drgba' (layout(rgba32f ) readonly uniform lowp image2D)
+0:? 'uimg2D' (layout(r32ui ) uniform highp uimage2D)
+0:? 'vol' (volatile temp highp float)
+0:? 'vol2' (readonly temp highp int)
+0:? 'qualim1' (layout(r32i ) coherent readonly uniform highp iimage2D)
+0:? 'qualim2' (layout(r32i ) coherent restrict readonly uniform highp iimage2D)
+0:? 'i1bad' (layout(rg8i ) readonly uniform highp uimage2D)
+0:? 'i2bad' (layout(rgba32i ) readonly uniform lowp image2D)
+0:? 'i3bad' (layout(rgba32f ) readonly uniform highp uimage2D)
+0:? 'i4bad' (layout(r8_snorm ) readonly uniform highp iimage2D)
+0:? 'i5bad' (layout(rgba32ui ) readonly uniform highp iimage2D)
+0:? 'i6bad' (layout(r8ui ) readonly uniform highp iimage2D)
+0:? 'counter' (layout(binding=0 offset=0 ) uniform highp atomic_uint)
+0:? 'counterBad' (layout(binding=1 ) uniform mediump atomic_uint)
+0:? 'countArr' (layout(binding=2 offset=4 ) uniform 4-element array of highp atomic_uint)
+0:? 'i' (uniform highp int)
+0:? 'atomi' (shared highp int)
+0:? 'atomu' (shared highp uint)
+0:? 'pfoo' (noContraction temp highp int)
+0:? 'dm' (global 2X4 matrix of double)
+0:? 'sca' (uniform mediump samplerCubeArray)
+0:? 'i2dr' (uniform mediump iimage2DRect)
+0:? 'i2dms' (uniform lowp image2DMS)
+0:? 'u2dmsa' (uniform mediump uimage2DMSArray)
+0:? 'okay1' (layout(r32f ) coherent volatile restrict readonly writeonly uniform lowp image2D)
+0:? 'okay2' (layout(r32i ) coherent volatile restrict readonly uniform highp iimage2D)
+0:? 'okay3' (layout(r32ui ) coherent volatile restrict writeonly uniform highp uimage2D)
+0:? 'okay4' (layout(r32f ) coherent volatile restrict uniform lowp image2D)
+0:? 'badQ1' (layout(rgba32f ) coherent volatile restrict uniform lowp image2D)
+0:? 'badQ2' (layout(rgba8i ) coherent volatile restrict uniform highp iimage2D)
+0:? 'badQ3' (layout(rgba16ui ) coherent volatile restrict uniform highp uimage2D)
+0:? 'wo' (layout(column_major shared ) writeonly buffer block{layout(column_major shared ) buffer highp int value, layout(column_major shared ) buffer implicitly-sized array of highp float values})
+0:? 'multio' (layout(column_major shared ) buffer block{layout(column_major shared ) readonly buffer highp int value, layout(column_major shared ) writeonly buffer implicitly-sized array of highp float values})
+0:? 'inbi' (in block{in highp int a})
+0:? 'outbi' (out block{out highp int a})
+0:? 't__' (global highp float)
+0:? 'arr' (shared 2-element array of 3-element array of 4-element array of highp 4-component vector of float)
+
diff --git a/chromium/third_party/glslang/src/Test/baseResults/310.frag.out b/chromium/third_party/glslang/src/Test/baseResults/310.frag.out
new file mode 100644
index 00000000000..0d2ad8d0f56
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/310.frag.out
@@ -0,0 +1,1892 @@
+310.frag
+Warning, version 310 is not yet complete; most version-specific features are present, but some are missing.
+ERROR: 0:2: 'float' : type requires declaration of default precision qualifier
+ERROR: 0:8: 'origin_upper_left' : not supported with this profile: es
+ERROR: 0:8: 'pixel_center_integer' : not supported with this profile: es
+ERROR: 0:8: 'gl_FragCoord' : identifiers starting with "gl_" are reserved
+ERROR: 0:11: 'location' : overlapping use of location 2
+ERROR: 0:15: 'usampler2DRect' : Reserved word.
+ERROR: 0:15: 'sampler/image' : type requires declaration of default precision qualifier
+ERROR: 0:23: 'variable indexing sampler array' : not supported for this version or the enabled extensions
+ERROR: 0:27: 'textureGatherOffsets' : no matching overloaded function found
+ERROR: 0:27: '=' : cannot convert from 'const float' to 'temp mediump 4-component vector of uint'
+ERROR: 0:30: 'textureGatherOffset(...)' : must be a compile-time constant: component argument
+ERROR: 0:31: 'textureGatherOffset(...)' : must be 0, 1, 2, or 3: component argument
+ERROR: 0:34: 'non-constant offset argument' : not supported for this version or the enabled extensions
+ERROR: 0:42: 'texel offset' : argument must be compile-time constant
+ERROR: 0:44: 'texel offset' : value is out of range: [gl_MinProgramTexelOffset, gl_MaxProgramTexelOffset]
+ERROR: 0:44: 'texel offset' : value is out of range: [gl_MinProgramTexelOffset, gl_MaxProgramTexelOffset]
+ERROR: 0:45: 'texel offset' : value is out of range: [gl_MinProgramTexelOffset, gl_MaxProgramTexelOffset]
+ERROR: 0:45: 'texel offset' : value is out of range: [gl_MinProgramTexelOffset, gl_MaxProgramTexelOffset]
+ERROR: 0:66: 'sampler/image' : type requires declaration of default precision qualifier
+ERROR: 0:66: '' : image variables not declared 'writeonly' must have a format layout qualifier
+ERROR: 0:67: '' : image variables not declared 'writeonly' must have a format layout qualifier
+ERROR: 0:68: 'sampler/image' : type requires declaration of default precision qualifier
+ERROR: 0:68: '' : image variables not declared 'writeonly' must have a format layout qualifier
+ERROR: 0:69: '' : image variables not declared 'writeonly' must have a format layout qualifier
+ERROR: 0:73: 'binding' : requires block, or sampler/image, or atomic-counter type
+ERROR: 0:77: 'location' : location is too large
+ERROR: 0:81: 'location' : too large for fragment output
+ERROR: 0:82: 'location' : too large for fragment output
+ERROR: 0:82: 'location' : overlapping use of location 40
+ERROR: 0:83: 'non-literal layout-id value' : not supported with this profile: es
+ERROR: 0:83: 'layout-id value' : cannot be negative
+ERROR: 0:110: 'out' : cannot be bool
+ERROR: 0:111: 'image2D' : sampler/image types can only be used in uniform variables or function parameters: imageOut
+ERROR: 0:111: '' : image variables not declared 'writeonly' must have a format layout qualifier
+ERROR: 0:112: 'out' : cannot be a matrix
+ERROR: 0:114: 'in' : cannot be bool
+ERROR: 0:115: 'sampler2D' : sampler/image types can only be used in uniform variables or function parameters: ino
+ERROR: 0:117: 'fragment-shader array-of-array input' : not supported with this profile: es
+ERROR: 0:120: 'fragment-shader array-of-struct input' : not supported with this profile: es
+ERROR: 0:121: 'fragment-shader array-of-struct input' : not supported with this profile: es
+ERROR: 0:123: 'fragment-shader struct input containing an array' : not supported with this profile: es
+ERROR: 0:125: 'fragment-shader struct input containing structure' : not supported with this profile: es
+ERROR: 0:133: 'output block' : not supported in this stage: fragment
+ERROR: 0:138: '' : cannot nest a structure definition inside a structure or block
+ERROR: 0:146: 'location' : overlapping use of location 13
+ERROR: 0:148: 'inbname2' : Cannot reuse block name within the same interface: in
+ERROR: 0:153: 'badmember' : nameless block contains a member that already has a name at global scope
+ERROR: 0:157: 'inbname' : redefinition
+ERROR: 0:159: 'vAnon' : redefinition
+ERROR: 0:173: 'origin_upper_left' : not supported with this profile: es
+ERROR: 0:173: 'pixel_center_integer' : not supported with this profile: es
+ERROR: 0:173: 'redeclaration' : cannot redeclare with different qualification: gl_FragCoord
+ERROR: 0:177: 'depth layout qualifier' : not supported with this profile: es
+ERROR: 0:181: 'assign' : l-value required "gl_FragDepth" (can't modify gl_FragDepth if using early_fragment_tests)
+ERROR: 0:182: 'gl_Layer' : required extension not requested: Possible extensions include:
+GL_EXT_geometry_shader
+GL_OES_geometry_shader
+ERROR: 0:183: 'gl_PrimitiveID' : required extension not requested: Possible extensions include:
+GL_EXT_geometry_shader
+GL_OES_geometry_shader
+ERROR: 0:209: 'precise' : Reserved word.
+ERROR: 0:209: 'precise' : not supported for this version or the enabled extensions
+ERROR: 0:210: 'fma' : required extension not requested: Possible extensions include:
+GL_EXT_gpu_shader5
+GL_OES_gpu_shader5
+ERROR: 0:211: 'non-constant offset argument' : not supported for this version or the enabled extensions
+ERROR: 0:212: 'textureGatherOffsets' : required extension not requested: Possible extensions include:
+GL_EXT_gpu_shader5
+GL_OES_gpu_shader5
+ERROR: 0:223: 'textureGatherOffsets(...)' : must be a compile-time constant: offsets argument
+ERROR: 0:257: 'gl_SampleID' : required extension not requested: GL_OES_sample_variables
+ERROR: 0:258: 'gl_SamplePosition' : required extension not requested: GL_OES_sample_variables
+ERROR: 0:259: 'gl_SampleMaskIn' : required extension not requested: GL_OES_sample_variables
+ERROR: 0:260: 'gl_SampleMask' : required extension not requested: GL_OES_sample_variables
+ERROR: 0:261: 'gl_NumSamples' : required extension not requested: GL_OES_sample_variables
+ERROR: 0:289: 'imageAtomicAdd' : required extension not requested: GL_OES_shader_image_atomic
+ERROR: 0:290: 'imageAtomicAdd' : required extension not requested: GL_OES_shader_image_atomic
+ERROR: 0:291: 'imageAtomicMin' : required extension not requested: GL_OES_shader_image_atomic
+ERROR: 0:292: 'imageAtomicMin' : required extension not requested: GL_OES_shader_image_atomic
+ERROR: 0:293: 'imageAtomicMax' : required extension not requested: GL_OES_shader_image_atomic
+ERROR: 0:294: 'imageAtomicMax' : required extension not requested: GL_OES_shader_image_atomic
+ERROR: 0:295: 'imageAtomicAnd' : required extension not requested: GL_OES_shader_image_atomic
+ERROR: 0:296: 'imageAtomicAnd' : required extension not requested: GL_OES_shader_image_atomic
+ERROR: 0:297: 'imageAtomicOr' : required extension not requested: GL_OES_shader_image_atomic
+ERROR: 0:298: 'imageAtomicOr' : required extension not requested: GL_OES_shader_image_atomic
+ERROR: 0:299: 'imageAtomicXor' : required extension not requested: GL_OES_shader_image_atomic
+ERROR: 0:300: 'imageAtomicXor' : required extension not requested: GL_OES_shader_image_atomic
+ERROR: 0:301: 'imageAtomicExchange' : required extension not requested: GL_OES_shader_image_atomic
+ERROR: 0:302: 'imageAtomicExchange' : required extension not requested: GL_OES_shader_image_atomic
+ERROR: 0:303: 'imageAtomicExchange' : required extension not requested: GL_OES_shader_image_atomic
+ERROR: 0:304: 'imageAtomicCompSwap' : required extension not requested: GL_OES_shader_image_atomic
+ERROR: 0:305: 'imageAtomicCompSwap' : required extension not requested: GL_OES_shader_image_atomic
+ERROR: 0:312: 'rgba32f' : format requires readonly or writeonly memory qualifier
+ERROR: 0:313: 'rgba8ui' : format requires readonly or writeonly memory qualifier
+ERROR: 0:314: 'rgba16i' : format requires readonly or writeonly memory qualifier
+ERROR: 0:340: 'imageAtomicMax' : only supported on image with format r32i or r32ui
+ERROR: 0:341: 'imageAtomicMax' : only supported on image with format r32i or r32ui
+ERROR: 0:342: 'imageAtomicExchange' : only supported on image with format r32f
+ERROR: 0:345: 'sample' : Reserved word.
+ERROR: 0:346: 'centroid/sample/patch' : can't use auxiliary qualifier on a fragment output
+ERROR: 0:347: 'flat/smooth/noperspective' : can't use interpolation qualifier on a fragment output
+ERROR: 0:348: 'flat/smooth/noperspective' : can't use interpolation qualifier on a fragment output
+ERROR: 0:349: 'noperspective' : Reserved word.
+ERROR: 0:349: 'noperspective' : not supported with this profile: es
+ERROR: 0:349: 'flat/smooth/noperspective' : can't use interpolation qualifier on a fragment output
+ERROR: 0:355: 'interpolateAtCentroid' : required extension not requested: GL_OES_shader_multisample_interpolation
+ERROR: 0:356: 'interpolateAtSample' : required extension not requested: GL_OES_shader_multisample_interpolation
+ERROR: 0:357: 'interpolateAtOffset' : required extension not requested: GL_OES_shader_multisample_interpolation
+ERROR: 0:365: 'centroid/sample/patch' : can't use auxiliary qualifier on a fragment output
+ERROR: 0:380: 'interpolateAtCentroid' : no matching overloaded function found
+ERROR: 0:380: 'assign' : cannot convert from 'const float' to 'temp mediump 3-component vector of float'
+ERROR: 0:382: 'interpolateAtCentroid' : first argument must be an interpolant, or interpolant-array element
+ERROR: 0:384: 'interpolateAtSample' : no matching overloaded function found
+ERROR: 0:384: 'assign' : cannot convert from 'const float' to 'temp mediump 3-component vector of float'
+ERROR: 0:386: 'interpolateAtSample' : first argument must be an interpolant, or interpolant-array element
+ERROR: 0:389: 'interpolateAtOffset' : no matching overloaded function found
+ERROR: 0:389: 'assign' : cannot convert from 'const float' to 'temp mediump 3-component vector of float'
+ERROR: 0:391: 'interpolateAtOffset' : first argument must be an interpolant, or interpolant-array element
+ERROR: 0:392: 'interpolateAtOffset' : first argument must be an interpolant, or interpolant-array element
+ERROR: 0:396: 'interpolateAtCentroid' : first argument must be an interpolant, or interpolant-array element
+ERROR: 0:397: 'interpolateAtSample' : first argument must be an interpolant, or interpolant-array element
+ERROR: 0:400: 'blend equation' : required extension not requested: GL_KHR_blend_equation_advanced
+ERROR: 0:423: 'blend equation' : can only apply to 'out'
+ERROR: 0:424: 'blend equation' : can only apply to a standalone qualifier
+ERROR: 0:425: 'blend equation' : can only apply to a standalone qualifier
+ERROR: 0:426: 'blend equation' : can only apply to a standalone qualifier
+ERROR: 0:427: 'blend equation' : can only apply to a standalone qualifier
+ERROR: 0:428: 'blend equation' : can only apply to a standalone qualifier
+ERROR: 0:429: 'blend_support' : unknown blend equation
+ERROR: 0:431: 'fragment-shader array-of-array output' : not supported with this profile: es
+ERROR: 122 compilation errors. No code generated.
+
+
+Shader version: 310
+Requested GL_EXT_shader_io_blocks
+Requested GL_EXT_texture_cube_map_array
+Requested GL_KHR_blend_equation_advanced
+Requested GL_OES_geometry_shader
+Requested GL_OES_gpu_shader5
+Requested GL_OES_sample_variables
+Requested GL_OES_shader_image_atomic
+Requested GL_OES_shader_io_blocks
+Requested GL_OES_shader_multisample_interpolation
+gl_FragCoord pixel center is integer
+gl_FragCoord origin is upper left
+using early_fragment_tests
+using depth_any
+using blend_support_multiply blend_support_screen blend_support_overlay blend_support_darken blend_support_lighten blend_support_colordodge blend_support_colorburn blend_support_hardlight blend_support_softlight blend_support_difference blend_support_exclusion blend_support_hsl_hue blend_support_hsl_saturation blend_support_hsl_color blend_support_hsl_luminosity blend_support_all_equations
+ERROR: node is still EOpNull!
+0:21 Function Definition: main( (global void)
+0:21 Function Parameters:
+0:23 Sequence
+0:23 Sequence
+0:23 move second child to first child (temp highp 4-component vector of float)
+0:23 'v' (temp mediump 4-component vector of float)
+0:23 texture (global highp 4-component vector of float)
+0:23 indirect index (temp highp sampler2D)
+0:23 'arrayedSampler' (uniform 5-element array of highp sampler2D)
+0:23 'i' (uniform mediump int)
+0:23 'c2D' (smooth in mediump 2-component vector of float)
+0:28 Sequence
+0:28 move second child to first child (temp highp 4-component vector of float)
+0:28 'v4' (temp mediump 4-component vector of float)
+0:28 textureGather (global highp 4-component vector of float)
+0:28 direct index (temp highp sampler2D)
+0:28 'arrayedSampler' (uniform 5-element array of highp sampler2D)
+0:28 Constant:
+0:28 0 (const int)
+0:28 'c2D' (smooth in mediump 2-component vector of float)
+0:29 Sequence
+0:29 move second child to first child (temp highp 4-component vector of int)
+0:29 'iv4' (temp mediump 4-component vector of int)
+0:29 textureGatherOffset (global highp 4-component vector of int)
+0:29 'isamp2DA' (uniform highp isampler2DArray)
+0:29 Constant:
+0:29 0.100000
+0:29 0.100000
+0:29 0.100000
+0:29 Constant:
+0:29 1 (const int)
+0:29 1 (const int)
+0:29 Constant:
+0:29 3 (const int)
+0:30 move second child to first child (temp highp 4-component vector of int)
+0:30 'iv4' (temp mediump 4-component vector of int)
+0:30 textureGatherOffset (global highp 4-component vector of int)
+0:30 'isamp2DA' (uniform highp isampler2DArray)
+0:30 Constant:
+0:30 0.100000
+0:30 0.100000
+0:30 0.100000
+0:30 Constant:
+0:30 1 (const int)
+0:30 1 (const int)
+0:30 'i' (uniform mediump int)
+0:31 move second child to first child (temp highp 4-component vector of int)
+0:31 'iv4' (temp mediump 4-component vector of int)
+0:31 textureGatherOffset (global highp 4-component vector of int)
+0:31 'isamp2DA' (uniform highp isampler2DArray)
+0:31 Constant:
+0:31 0.100000
+0:31 0.100000
+0:31 0.100000
+0:31 Constant:
+0:31 1 (const int)
+0:31 1 (const int)
+0:31 Constant:
+0:31 4 (const int)
+0:32 move second child to first child (temp highp 4-component vector of int)
+0:32 'iv4' (temp mediump 4-component vector of int)
+0:32 textureGatherOffset (global highp 4-component vector of int)
+0:32 'isamp2DA' (uniform highp isampler2DArray)
+0:32 Constant:
+0:32 0.100000
+0:32 0.100000
+0:32 0.100000
+0:32 Constant:
+0:32 1 (const int)
+0:32 1 (const int)
+0:32 Constant:
+0:32 3 (const int)
+0:33 move second child to first child (temp highp 4-component vector of int)
+0:33 'iv4' (temp mediump 4-component vector of int)
+0:33 textureGatherOffset (global highp 4-component vector of int)
+0:33 'isamp2DA' (uniform highp isampler2DArray)
+0:33 Constant:
+0:33 0.100000
+0:33 0.100000
+0:33 0.100000
+0:33 Constant:
+0:33 0 (const int)
+0:33 0 (const int)
+0:34 move second child to first child (temp highp 4-component vector of int)
+0:34 'iv4' (temp mediump 4-component vector of int)
+0:34 textureGatherOffset (global highp 4-component vector of int)
+0:34 'isamp2DA' (uniform highp isampler2DArray)
+0:34 Constant:
+0:34 0.100000
+0:34 0.100000
+0:34 0.100000
+0:34 Construct ivec2 (temp highp 2-component vector of int)
+0:34 'i' (uniform mediump int)
+0:38 Function Definition: foo23( (global void)
+0:38 Function Parameters:
+0:? Sequence
+0:42 textureProjGradOffset (global highp 4-component vector of uint)
+0:42 'usamp2d' (uniform highp usampler2D)
+0:42 'outp' (out mediump 4-component vector of float)
+0:42 Constant:
+0:42 0.000000
+0:42 0.000000
+0:42 Constant:
+0:42 0.000000
+0:42 0.000000
+0:42 Convert float to int (temp highp 2-component vector of int)
+0:42 'c2D' (smooth in mediump 2-component vector of float)
+0:43 textureProjGradOffset (global highp 4-component vector of uint)
+0:43 'usamp2d' (uniform highp usampler2D)
+0:43 'outp' (out mediump 4-component vector of float)
+0:43 Constant:
+0:43 0.000000
+0:43 0.000000
+0:43 Constant:
+0:43 0.000000
+0:43 0.000000
+0:43 Constant:
+0:43 3 (const int)
+0:43 4 (const int)
+0:44 textureProjGradOffset (global highp 4-component vector of uint)
+0:44 'usamp2d' (uniform highp usampler2D)
+0:44 'outp' (out mediump 4-component vector of float)
+0:44 Constant:
+0:44 0.000000
+0:44 0.000000
+0:44 Constant:
+0:44 0.000000
+0:44 0.000000
+0:44 Constant:
+0:44 15 (const int)
+0:44 16 (const int)
+0:45 textureProjGradOffset (global highp 4-component vector of uint)
+0:45 'usamp2d' (uniform highp usampler2D)
+0:45 'outp' (out mediump 4-component vector of float)
+0:45 Constant:
+0:45 0.000000
+0:45 0.000000
+0:45 Constant:
+0:45 0.000000
+0:45 0.000000
+0:45 Constant:
+0:45 -10 (const int)
+0:45 20 (const int)
+0:47 Test condition and select (temp void)
+0:47 Condition
+0:47 'gl_HelperInvocation' (in bool HelperInvocation)
+0:47 true case
+0:48 Pre-Increment (temp mediump 4-component vector of float)
+0:48 'outp' (out mediump 4-component vector of float)
+0:50 Sequence
+0:50 move second child to first child (temp mediump int)
+0:50 'sum' (temp mediump int)
+0:50 Constant:
+0:50 32 (const int)
+0:58 move second child to first child (temp bool)
+0:58 'b1' (temp bool)
+0:58 mix (global bool)
+0:58 'b2' (temp bool)
+0:58 'b3' (temp bool)
+0:58 'b' (temp bool)
+0:59 Sequence
+0:59 move second child to first child (temp mediump 3-component vector of uint)
+0:59 'um3' (temp mediump 3-component vector of uint)
+0:59 mix (global mediump 3-component vector of uint)
+0:59 Construct uvec3 (temp mediump 3-component vector of uint)
+0:59 Convert int to uint (temp mediump uint)
+0:59 'i' (uniform mediump int)
+0:59 Construct uvec3 (temp mediump 3-component vector of uint)
+0:59 Convert int to uint (temp mediump uint)
+0:59 'i' (uniform mediump int)
+0:59 Construct bvec3 (temp 3-component vector of bool)
+0:59 'b' (temp bool)
+0:60 Sequence
+0:60 move second child to first child (temp mediump 4-component vector of int)
+0:60 'im4' (temp mediump 4-component vector of int)
+0:60 mix (global mediump 4-component vector of int)
+0:60 Construct ivec4 (temp mediump 4-component vector of int)
+0:60 'i' (uniform mediump int)
+0:60 Construct ivec4 (temp mediump 4-component vector of int)
+0:60 'i' (uniform mediump int)
+0:60 Construct bvec4 (temp 4-component vector of bool)
+0:60 'b' (temp bool)
+0:98 Function Definition: foots( (global void)
+0:98 Function Parameters:
+0:100 Sequence
+0:100 Sequence
+0:100 move second child to first child (temp highp 2-component vector of int)
+0:100 'v2' (temp highp 2-component vector of int)
+0:100 textureSize (global highp 2-component vector of int)
+0:100 's1' (layout(binding=3 ) uniform highp sampler2D)
+0:100 Constant:
+0:100 2 (const int)
+0:101 Sequence
+0:101 move second child to first child (temp highp 3-component vector of int)
+0:101 'v3' (temp highp 3-component vector of int)
+0:101 textureSize (global highp 3-component vector of int)
+0:101 'isamp2DA' (uniform highp isampler2DArray)
+0:101 Constant:
+0:101 3 (const int)
+0:102 move second child to first child (temp highp 2-component vector of int)
+0:102 'v2' (temp highp 2-component vector of int)
+0:102 textureSize (global highp 2-component vector of int)
+0:102 's2dms' (uniform highp sampler2DMS)
+0:103 move second child to first child (temp highp 2-component vector of int)
+0:103 'v2' (temp highp 2-component vector of int)
+0:103 imageQuerySize (global highp 2-component vector of int)
+0:103 'i2D' (layout(binding=2 ) writeonly uniform highp image2D)
+0:104 move second child to first child (temp highp 3-component vector of int)
+0:104 'v3' (temp highp 3-component vector of int)
+0:104 imageQuerySize (global highp 3-component vector of int)
+0:104 'i3D' (layout(binding=4 ) readonly uniform mediump image3D)
+0:105 move second child to first child (temp highp 2-component vector of int)
+0:105 'v2' (temp highp 2-component vector of int)
+0:105 imageQuerySize (global highp 2-component vector of int)
+0:105 'iCube' (layout(binding=5 ) uniform lowp imageCube)
+0:106 move second child to first child (temp highp 3-component vector of int)
+0:106 'v3' (temp highp 3-component vector of int)
+0:106 imageQuerySize (global highp 3-component vector of int)
+0:106 'i2DA' (layout(binding=6 ) uniform mediump image2DArray)
+0:107 move second child to first child (temp highp 2-component vector of int)
+0:107 'v2' (temp highp 2-component vector of int)
+0:107 imageQuerySize (global highp 2-component vector of int)
+0:107 'i2Dqualified' (layout(binding=6 ) coherent volatile restrict uniform highp image2D)
+0:165 Function Definition: fooIO( (global void)
+0:165 Function Parameters:
+0:167 Sequence
+0:167 Sequence
+0:167 move second child to first child (temp mediump 4-component vector of float)
+0:167 'v' (temp mediump 4-component vector of float)
+0:167 add (temp mediump 4-component vector of float)
+0:167 v: direct index for structure (in mediump 4-component vector of float)
+0:167 'inbinst' (in block{in mediump int a, in mediump 4-component vector of float v, in structure{global mediump int b} s})
+0:167 Constant:
+0:167 1 (const int)
+0:167 vAnon: direct index for structure (layout(location=13 ) centroid in mediump 4-component vector of float)
+0:167 'anon@0' (in block{layout(location=12 ) in mediump int aAnon, layout(location=13 ) centroid in mediump 4-component vector of float vAnon})
+0:167 Constant:
+0:167 1 (const uint)
+0:168 vector scale second child into first child (temp mediump 4-component vector of float)
+0:168 'v' (temp mediump 4-component vector of float)
+0:168 f: direct index for structure (in mediump float)
+0:168 direct index (temp block{in mediump float f})
+0:168 'arrayedInst' (in 4-element array of block{in mediump float f})
+0:168 Constant:
+0:168 2 (const int)
+0:168 Constant:
+0:168 0 (const int)
+0:169 vector scale second child into first child (temp mediump 4-component vector of float)
+0:169 'v' (temp mediump 4-component vector of float)
+0:169 f: direct index for structure (in mediump float)
+0:169 indirect index (temp block{in mediump float f})
+0:169 'arrayedInst' (in 4-element array of block{in mediump float f})
+0:169 'i' (uniform mediump int)
+0:169 Constant:
+0:169 0 (const int)
+0:179 Function Definition: foo_IO( (global void)
+0:179 Function Parameters:
+0:181 Sequence
+0:181 move second child to first child (temp highp float)
+0:181 'gl_FragDepth' (gl_FragDepth highp float FragDepth)
+0:181 Constant:
+0:181 0.200000
+0:182 'gl_Layer' (flat in highp int Layer)
+0:183 'gl_PrimitiveID' (flat in highp int PrimitiveID)
+0:184 Sequence
+0:184 move second child to first child (temp bool)
+0:184 'f' (temp bool)
+0:184 'gl_FrontFacing' (gl_FrontFacing bool Face)
+0:191 Function Definition: foo_GS( (global void)
+0:191 Function Parameters:
+0:193 Sequence
+0:193 Sequence
+0:193 move second child to first child (temp highp int)
+0:193 'l' (temp highp int)
+0:193 'gl_Layer' (flat in highp int Layer)
+0:194 Sequence
+0:194 move second child to first child (temp highp int)
+0:194 'p' (temp highp int)
+0:194 'gl_PrimitiveID' (flat in highp int PrimitiveID)
+0:207 Function Definition: pfooBad( (global void)
+0:207 Function Parameters:
+0:? Sequence
+0:210 move second child to first child (temp mediump 2-component vector of float)
+0:210 'h' (noContraction temp mediump 2-component vector of float)
+0:210 fma (global mediump 2-component vector of float)
+0:210 'inf' (smooth in mediump 2-component vector of float)
+0:210 'ing' (smooth in mediump 2-component vector of float)
+0:210 'h' (noContraction temp mediump 2-component vector of float)
+0:211 textureGatherOffset (global highp 4-component vector of float)
+0:211 direct index (temp highp sampler2D)
+0:211 'sArray' (uniform 4-element array of highp sampler2D)
+0:211 Constant:
+0:211 0 (const int)
+0:211 Constant:
+0:211 0.100000
+0:211 0.100000
+0:211 Convert float to int (temp highp 2-component vector of int)
+0:211 'inf' (smooth in mediump 2-component vector of float)
+0:212 textureGatherOffsets (global highp 4-component vector of float)
+0:212 direct index (temp highp sampler2D)
+0:212 'sArray' (uniform 4-element array of highp sampler2D)
+0:212 Constant:
+0:212 0 (const int)
+0:212 Constant:
+0:212 0.100000
+0:212 0.100000
+0:212 Constant:
+0:212 0 (const int)
+0:212 0 (const int)
+0:212 0 (const int)
+0:212 0 (const int)
+0:212 0 (const int)
+0:212 0 (const int)
+0:212 0 (const int)
+0:212 0 (const int)
+0:217 Function Definition: pfoo( (global void)
+0:217 Function Parameters:
+0:? Sequence
+0:220 move second child to first child (temp mediump 2-component vector of float)
+0:220 'h' (noContraction temp mediump 2-component vector of float)
+0:220 fma (global mediump 2-component vector of float)
+0:220 'inf' (smooth in mediump 2-component vector of float)
+0:220 'ing' (smooth in mediump 2-component vector of float)
+0:220 'h' (noContraction temp mediump 2-component vector of float)
+0:221 textureGatherOffset (global highp 4-component vector of float)
+0:221 direct index (temp highp sampler2D)
+0:221 'sArray' (uniform 4-element array of highp sampler2D)
+0:221 Constant:
+0:221 0 (const int)
+0:221 Constant:
+0:221 0.100000
+0:221 0.100000
+0:221 Convert float to int (temp highp 2-component vector of int)
+0:221 'inf' (smooth in mediump 2-component vector of float)
+0:222 textureGatherOffsets (global highp 4-component vector of float)
+0:222 direct index (temp highp sampler2D)
+0:222 'sArray' (uniform 4-element array of highp sampler2D)
+0:222 Constant:
+0:222 0 (const int)
+0:222 Constant:
+0:222 0.100000
+0:222 0.100000
+0:222 Constant:
+0:222 0 (const int)
+0:222 0 (const int)
+0:222 0 (const int)
+0:222 0 (const int)
+0:222 0 (const int)
+0:222 0 (const int)
+0:222 0 (const int)
+0:222 0 (const int)
+0:223 textureGatherOffsets (global highp 4-component vector of float)
+0:223 direct index (temp highp sampler2D)
+0:223 'sArray' (uniform 4-element array of highp sampler2D)
+0:223 Constant:
+0:223 0 (const int)
+0:223 Constant:
+0:223 0.100000
+0:223 0.100000
+0:223 'offsets' (uniform 4-element array of mediump 2-component vector of int)
+0:248 Function Definition: CAT( (global void)
+0:248 Function Parameters:
+0:250 Sequence
+0:250 Sequence
+0:250 move second child to first child (temp highp 4-component vector of float)
+0:250 'b4' (temp highp 4-component vector of float)
+0:250 texture (global highp 4-component vector of float)
+0:250 'CA4' (uniform highp samplerCubeArray)
+0:250 Constant:
+0:250 0.500000
+0:250 0.500000
+0:250 0.500000
+0:250 0.500000
+0:250 Constant:
+0:250 0.240000
+0:251 Sequence
+0:251 move second child to first child (temp highp 4-component vector of int)
+0:251 'b6' (temp highp 4-component vector of int)
+0:251 texture (global highp 4-component vector of int)
+0:251 'CA6' (uniform highp isamplerCubeArray)
+0:251 Constant:
+0:251 0.500000
+0:251 0.500000
+0:251 0.500000
+0:251 0.500000
+0:251 Constant:
+0:251 0.260000
+0:252 Sequence
+0:252 move second child to first child (temp highp 4-component vector of uint)
+0:252 'b7' (temp highp 4-component vector of uint)
+0:252 texture (global highp 4-component vector of uint)
+0:252 'CA7' (uniform highp usamplerCubeArray)
+0:252 Constant:
+0:252 0.500000
+0:252 0.500000
+0:252 0.500000
+0:252 0.500000
+0:252 Constant:
+0:252 0.270000
+0:255 Function Definition: badSample( (global void)
+0:255 Function Parameters:
+0:257 Sequence
+0:257 Sequence
+0:257 move second child to first child (temp lowp int)
+0:257 'a1' (temp lowp int)
+0:257 'gl_SampleID' (flat in lowp int SampleId)
+0:258 Sequence
+0:258 move second child to first child (temp mediump 2-component vector of float)
+0:258 'a2' (temp mediump 2-component vector of float)
+0:258 'gl_SamplePosition' (smooth in mediump 2-component vector of float SamplePosition)
+0:259 Sequence
+0:259 move second child to first child (temp highp int)
+0:259 'a3' (temp highp int)
+0:259 direct index (flat temp highp int SampleMaskIn)
+0:259 'gl_SampleMaskIn' (flat in implicitly-sized array of highp int SampleMaskIn)
+0:259 Constant:
+0:259 0 (const int)
+0:260 move second child to first child (temp highp int)
+0:260 direct index (temp highp int SampleMaskIn)
+0:260 'gl_SampleMask' (out implicitly-sized array of highp int SampleMaskIn)
+0:260 Constant:
+0:260 0 (const int)
+0:260 'a3' (temp highp int)
+0:261 Sequence
+0:261 move second child to first child (temp mediump int)
+0:261 'n' (temp mediump int)
+0:261 'gl_NumSamples' (uniform lowp int)
+0:268 Function Definition: goodSample( (global void)
+0:268 Function Parameters:
+0:270 Sequence
+0:270 Sequence
+0:270 move second child to first child (temp lowp int)
+0:270 'a1' (temp lowp int)
+0:270 'gl_SampleID' (flat in lowp int SampleId)
+0:271 Sequence
+0:271 move second child to first child (temp mediump 2-component vector of float)
+0:271 'a2' (temp mediump 2-component vector of float)
+0:271 'gl_SamplePosition' (smooth in mediump 2-component vector of float SamplePosition)
+0:272 Sequence
+0:272 move second child to first child (temp highp int)
+0:272 'a3' (temp highp int)
+0:272 direct index (flat temp highp int SampleMaskIn)
+0:272 'gl_SampleMaskIn' (flat in implicitly-sized array of highp int SampleMaskIn)
+0:272 Constant:
+0:272 0 (const int)
+0:273 move second child to first child (temp highp int)
+0:273 direct index (temp highp int SampleMaskIn)
+0:273 'gl_SampleMask' (out implicitly-sized array of highp int SampleMaskIn)
+0:273 Constant:
+0:273 0 (const int)
+0:273 'a3' (temp highp int)
+0:274 Sequence
+0:274 move second child to first child (temp mediump int)
+0:274 'n1' (temp mediump int)
+0:274 Constant:
+0:274 4 (const int)
+0:275 Sequence
+0:275 move second child to first child (temp mediump int)
+0:275 'n2' (temp mediump int)
+0:275 'gl_NumSamples' (uniform lowp int)
+0:283 Function Definition: badImageAtom( (global void)
+0:283 Function Parameters:
+0:? Sequence
+0:289 imageAtomicAdd (global highp int)
+0:289 'im2Di' (layout(r32i ) uniform highp iimage2D)
+0:289 'P' (uniform mediump 2-component vector of int)
+0:289 'dati' (temp mediump int)
+0:290 imageAtomicAdd (global highp uint)
+0:290 'im2Du' (layout(r32ui ) uniform highp uimage2D)
+0:290 'P' (uniform mediump 2-component vector of int)
+0:290 'datu' (temp mediump uint)
+0:291 imageAtomicMin (global highp int)
+0:291 'im2Di' (layout(r32i ) uniform highp iimage2D)
+0:291 'P' (uniform mediump 2-component vector of int)
+0:291 'dati' (temp mediump int)
+0:292 imageAtomicMin (global highp uint)
+0:292 'im2Du' (layout(r32ui ) uniform highp uimage2D)
+0:292 'P' (uniform mediump 2-component vector of int)
+0:292 'datu' (temp mediump uint)
+0:293 imageAtomicMax (global highp int)
+0:293 'im2Di' (layout(r32i ) uniform highp iimage2D)
+0:293 'P' (uniform mediump 2-component vector of int)
+0:293 'dati' (temp mediump int)
+0:294 imageAtomicMax (global highp uint)
+0:294 'im2Du' (layout(r32ui ) uniform highp uimage2D)
+0:294 'P' (uniform mediump 2-component vector of int)
+0:294 'datu' (temp mediump uint)
+0:295 imageAtomicAnd (global highp int)
+0:295 'im2Di' (layout(r32i ) uniform highp iimage2D)
+0:295 'P' (uniform mediump 2-component vector of int)
+0:295 'dati' (temp mediump int)
+0:296 imageAtomicAnd (global highp uint)
+0:296 'im2Du' (layout(r32ui ) uniform highp uimage2D)
+0:296 'P' (uniform mediump 2-component vector of int)
+0:296 'datu' (temp mediump uint)
+0:297 imageAtomicOr (global highp int)
+0:297 'im2Di' (layout(r32i ) uniform highp iimage2D)
+0:297 'P' (uniform mediump 2-component vector of int)
+0:297 'dati' (temp mediump int)
+0:298 imageAtomicOr (global highp uint)
+0:298 'im2Du' (layout(r32ui ) uniform highp uimage2D)
+0:298 'P' (uniform mediump 2-component vector of int)
+0:298 'datu' (temp mediump uint)
+0:299 imageAtomicXor (global highp int)
+0:299 'im2Di' (layout(r32i ) uniform highp iimage2D)
+0:299 'P' (uniform mediump 2-component vector of int)
+0:299 'dati' (temp mediump int)
+0:300 imageAtomicXor (global highp uint)
+0:300 'im2Du' (layout(r32ui ) uniform highp uimage2D)
+0:300 'P' (uniform mediump 2-component vector of int)
+0:300 'datu' (temp mediump uint)
+0:301 imageAtomicExchange (global highp int)
+0:301 'im2Di' (layout(r32i ) uniform highp iimage2D)
+0:301 'P' (uniform mediump 2-component vector of int)
+0:301 'dati' (temp mediump int)
+0:302 imageAtomicExchange (global highp uint)
+0:302 'im2Du' (layout(r32ui ) uniform highp uimage2D)
+0:302 'P' (uniform mediump 2-component vector of int)
+0:302 'datu' (temp mediump uint)
+0:303 imageAtomicExchange (global highp float)
+0:303 'im2Df' (layout(r32f ) uniform highp image2D)
+0:303 'P' (uniform mediump 2-component vector of int)
+0:303 'datf' (temp mediump float)
+0:304 imageAtomicCompSwap (global highp int)
+0:304 'im2Di' (layout(r32i ) uniform highp iimage2D)
+0:304 'P' (uniform mediump 2-component vector of int)
+0:304 Constant:
+0:304 3 (const int)
+0:304 'dati' (temp mediump int)
+0:305 imageAtomicCompSwap (global highp uint)
+0:305 'im2Du' (layout(r32ui ) uniform highp uimage2D)
+0:305 'P' (uniform mediump 2-component vector of int)
+0:305 Constant:
+0:305 5 (const uint)
+0:305 'datu' (temp mediump uint)
+0:316 Function Definition: goodImageAtom( (global void)
+0:316 Function Parameters:
+0:? Sequence
+0:322 imageAtomicAdd (global highp int)
+0:322 'im2Di' (layout(r32i ) uniform highp iimage2D)
+0:322 'P' (uniform mediump 2-component vector of int)
+0:322 'dati' (temp mediump int)
+0:323 imageAtomicAdd (global highp uint)
+0:323 'im2Du' (layout(r32ui ) uniform highp uimage2D)
+0:323 'P' (uniform mediump 2-component vector of int)
+0:323 'datu' (temp mediump uint)
+0:324 imageAtomicMin (global highp int)
+0:324 'im2Di' (layout(r32i ) uniform highp iimage2D)
+0:324 'P' (uniform mediump 2-component vector of int)
+0:324 'dati' (temp mediump int)
+0:325 imageAtomicMin (global highp uint)
+0:325 'im2Du' (layout(r32ui ) uniform highp uimage2D)
+0:325 'P' (uniform mediump 2-component vector of int)
+0:325 'datu' (temp mediump uint)
+0:326 imageAtomicMax (global highp int)
+0:326 'im2Di' (layout(r32i ) uniform highp iimage2D)
+0:326 'P' (uniform mediump 2-component vector of int)
+0:326 'dati' (temp mediump int)
+0:327 imageAtomicMax (global highp uint)
+0:327 'im2Du' (layout(r32ui ) uniform highp uimage2D)
+0:327 'P' (uniform mediump 2-component vector of int)
+0:327 'datu' (temp mediump uint)
+0:328 imageAtomicAnd (global highp int)
+0:328 'im2Di' (layout(r32i ) uniform highp iimage2D)
+0:328 'P' (uniform mediump 2-component vector of int)
+0:328 'dati' (temp mediump int)
+0:329 imageAtomicAnd (global highp uint)
+0:329 'im2Du' (layout(r32ui ) uniform highp uimage2D)
+0:329 'P' (uniform mediump 2-component vector of int)
+0:329 'datu' (temp mediump uint)
+0:330 imageAtomicOr (global highp int)
+0:330 'im2Di' (layout(r32i ) uniform highp iimage2D)
+0:330 'P' (uniform mediump 2-component vector of int)
+0:330 'dati' (temp mediump int)
+0:331 imageAtomicOr (global highp uint)
+0:331 'im2Du' (layout(r32ui ) uniform highp uimage2D)
+0:331 'P' (uniform mediump 2-component vector of int)
+0:331 'datu' (temp mediump uint)
+0:332 imageAtomicXor (global highp int)
+0:332 'im2Di' (layout(r32i ) uniform highp iimage2D)
+0:332 'P' (uniform mediump 2-component vector of int)
+0:332 'dati' (temp mediump int)
+0:333 imageAtomicXor (global highp uint)
+0:333 'im2Du' (layout(r32ui ) uniform highp uimage2D)
+0:333 'P' (uniform mediump 2-component vector of int)
+0:333 'datu' (temp mediump uint)
+0:334 imageAtomicExchange (global highp int)
+0:334 'im2Di' (layout(r32i ) uniform highp iimage2D)
+0:334 'P' (uniform mediump 2-component vector of int)
+0:334 'dati' (temp mediump int)
+0:335 imageAtomicExchange (global highp uint)
+0:335 'im2Du' (layout(r32ui ) uniform highp uimage2D)
+0:335 'P' (uniform mediump 2-component vector of int)
+0:335 'datu' (temp mediump uint)
+0:336 imageAtomicExchange (global highp float)
+0:336 'im2Df' (layout(r32f ) uniform highp image2D)
+0:336 'P' (uniform mediump 2-component vector of int)
+0:336 'datf' (temp mediump float)
+0:337 imageAtomicCompSwap (global highp int)
+0:337 'im2Di' (layout(r32i ) uniform highp iimage2D)
+0:337 'P' (uniform mediump 2-component vector of int)
+0:337 Constant:
+0:337 3 (const int)
+0:337 'dati' (temp mediump int)
+0:338 imageAtomicCompSwap (global highp uint)
+0:338 'im2Du' (layout(r32ui ) uniform highp uimage2D)
+0:338 'P' (uniform mediump 2-component vector of int)
+0:338 Constant:
+0:338 5 (const uint)
+0:338 'datu' (temp mediump uint)
+0:340 imageAtomicMax (global highp int)
+0:340 'badIm2Di' (layout(rgba16i ) uniform highp iimage2D)
+0:340 'P' (uniform mediump 2-component vector of int)
+0:340 'dati' (temp mediump int)
+0:341 imageAtomicMax (global highp uint)
+0:341 'badIm2Du' (layout(rgba8ui ) uniform highp uimage2D)
+0:341 'P' (uniform mediump 2-component vector of int)
+0:341 'datu' (temp mediump uint)
+0:342 imageAtomicExchange (global highp float)
+0:342 'badIm2Df' (layout(rgba32f ) uniform highp image2D)
+0:342 'P' (uniform mediump 2-component vector of int)
+0:342 'datf' (temp mediump float)
+0:353 Function Definition: badInterp( (global void)
+0:353 Function Parameters:
+0:355 Sequence
+0:355 interpolateAtCentroid (global mediump 2-component vector of float)
+0:355 'colorfc' (centroid flat in mediump 2-component vector of float)
+0:356 interpolateAtSample (global mediump 2-component vector of float)
+0:356 'colorfc' (centroid flat in mediump 2-component vector of float)
+0:356 Constant:
+0:356 1 (const int)
+0:357 interpolateAtOffset (global mediump 2-component vector of float)
+0:357 'colorfc' (centroid flat in mediump 2-component vector of float)
+0:357 Constant:
+0:357 0.200000
+0:357 0.200000
+0:369 Function Definition: interp( (global void)
+0:369 Function Parameters:
+0:? Sequence
+0:376 move second child to first child (temp mediump 2-component vector of float)
+0:376 'res2' (temp mediump 2-component vector of float)
+0:376 interpolateAtCentroid (global mediump 2-component vector of float)
+0:376 'colorfc' (centroid flat in mediump 2-component vector of float)
+0:377 move second child to first child (temp mediump 4-component vector of float)
+0:377 'res4' (temp mediump 4-component vector of float)
+0:377 interpolateAtCentroid (global mediump 4-component vector of float)
+0:377 'colorSampIn' (smooth sample in mediump 4-component vector of float)
+0:378 move second child to first child (temp mediump 4-component vector of float)
+0:378 'res4' (temp mediump 4-component vector of float)
+0:378 interpolateAtCentroid (global mediump 4-component vector of float)
+0:378 'colorfsi' (flat sample in mediump 4-component vector of float)
+0:379 move second child to first child (temp mediump float)
+0:379 'res' (temp mediump float)
+0:379 interpolateAtCentroid (global mediump float)
+0:379 'scalarIn' (smooth in mediump float)
+0:380 'res3' (temp mediump 3-component vector of float)
+0:381 move second child to first child (temp mediump 3-component vector of float)
+0:381 'res3' (temp mediump 3-component vector of float)
+0:381 interpolateAtCentroid (global mediump 3-component vector of float)
+0:381 direct index (smooth sample temp mediump 3-component vector of float)
+0:381 'sampInArray' (smooth sample in 4-element array of mediump 3-component vector of float)
+0:381 Constant:
+0:381 2 (const int)
+0:382 move second child to first child (temp mediump 2-component vector of float)
+0:382 'res2' (temp mediump 2-component vector of float)
+0:382 interpolateAtCentroid (global mediump 2-component vector of float)
+0:382 vector swizzle (temp mediump 2-component vector of float)
+0:382 direct index (smooth sample temp mediump 3-component vector of float)
+0:382 'sampInArray' (smooth sample in 4-element array of mediump 3-component vector of float)
+0:382 Constant:
+0:382 2 (const int)
+0:382 Sequence
+0:382 Constant:
+0:382 0 (const int)
+0:382 Constant:
+0:382 1 (const int)
+0:384 'res3' (temp mediump 3-component vector of float)
+0:385 move second child to first child (temp mediump 3-component vector of float)
+0:385 'res3' (temp mediump 3-component vector of float)
+0:385 interpolateAtSample (global mediump 3-component vector of float)
+0:385 indirect index (smooth sample temp mediump 3-component vector of float)
+0:385 'sampInArray' (smooth sample in 4-element array of mediump 3-component vector of float)
+0:385 'i' (uniform mediump int)
+0:385 Constant:
+0:385 0 (const int)
+0:386 move second child to first child (temp mediump 2-component vector of float)
+0:386 'res2' (temp mediump 2-component vector of float)
+0:386 interpolateAtSample (global mediump 2-component vector of float)
+0:386 vector swizzle (temp mediump 2-component vector of float)
+0:386 direct index (smooth sample temp mediump 3-component vector of float)
+0:386 'sampInArray' (smooth sample in 4-element array of mediump 3-component vector of float)
+0:386 Constant:
+0:386 2 (const int)
+0:386 Sequence
+0:386 Constant:
+0:386 0 (const int)
+0:386 Constant:
+0:386 1 (const int)
+0:386 Constant:
+0:386 2 (const int)
+0:387 move second child to first child (temp mediump float)
+0:387 'res' (temp mediump float)
+0:387 interpolateAtSample (global mediump float)
+0:387 'scalarIn' (smooth in mediump float)
+0:387 Constant:
+0:387 1 (const int)
+0:389 'res3' (temp mediump 3-component vector of float)
+0:390 move second child to first child (temp mediump 3-component vector of float)
+0:390 'res3' (temp mediump 3-component vector of float)
+0:390 interpolateAtOffset (global mediump 3-component vector of float)
+0:390 direct index (smooth sample temp mediump 3-component vector of float)
+0:390 'sampInArray' (smooth sample in 4-element array of mediump 3-component vector of float)
+0:390 Constant:
+0:390 2 (const int)
+0:390 Constant:
+0:390 0.200000
+0:390 0.200000
+0:391 move second child to first child (temp mediump 2-component vector of float)
+0:391 'res2' (temp mediump 2-component vector of float)
+0:391 interpolateAtOffset (global mediump 2-component vector of float)
+0:391 vector swizzle (temp mediump 2-component vector of float)
+0:391 direct index (smooth sample temp mediump 3-component vector of float)
+0:391 'sampInArray' (smooth sample in 4-element array of mediump 3-component vector of float)
+0:391 Constant:
+0:391 2 (const int)
+0:391 Sequence
+0:391 Constant:
+0:391 0 (const int)
+0:391 Constant:
+0:391 1 (const int)
+0:391 Constant:
+0:391 0.200000
+0:391 0.200000
+0:392 move second child to first child (temp mediump float)
+0:392 'res' (temp mediump float)
+0:392 interpolateAtOffset (global mediump float)
+0:392 add (temp mediump float)
+0:392 'scalarIn' (smooth in mediump float)
+0:392 'scalarIn' (smooth in mediump float)
+0:392 Constant:
+0:392 0.200000
+0:392 0.200000
+0:393 move second child to first child (temp mediump float)
+0:393 'res' (temp mediump float)
+0:393 interpolateAtOffset (global mediump float)
+0:393 'scalarIn' (smooth in mediump float)
+0:393 Constant:
+0:393 0.200000
+0:393 0.200000
+0:396 move second child to first child (temp mediump float)
+0:396 'res' (temp mediump float)
+0:396 interpolateAtCentroid (global mediump float)
+0:396 'f' (temp mediump float)
+0:397 move second child to first child (temp mediump 4-component vector of float)
+0:397 'res4' (temp mediump 4-component vector of float)
+0:397 interpolateAtSample (global mediump 4-component vector of float)
+0:397 'outp' (out mediump 4-component vector of float)
+0:397 Constant:
+0:397 0 (const int)
+0:427 Function Definition: blendFoo( (temp void)
+0:427 Function Parameters:
+0:428 Function Definition: blendFoo(vf3; (global void)
+0:428 Function Parameters:
+0:428 'v' (in mediump 3-component vector of float)
+0:? Linker Objects
+0:? 'gl_FragCoord' (smooth in mediump 4-component vector of float)
+0:? 'v3' (layout(location=2 ) smooth in mediump 3-component vector of float)
+0:? 'yi' (layout(location=2 ) smooth in mediump 4X4 matrix of float)
+0:? 'arrayedSampler' (uniform 5-element array of highp sampler2D)
+0:? 'usamp2d' (uniform highp usampler2D)
+0:? 'samp2dr' (uniform mediump usampler2DRect)
+0:? 'isamp2DA' (uniform highp isampler2DArray)
+0:? 'c2D' (smooth in mediump 2-component vector of float)
+0:? 'i' (uniform mediump int)
+0:? 'outp' (out mediump 4-component vector of float)
+0:? 's1' (layout(binding=3 ) uniform highp sampler2D)
+0:? 's2' (layout(binding=3 ) uniform highp sampler2D)
+0:? 'i2D' (layout(binding=2 ) writeonly uniform highp image2D)
+0:? 'i3D' (layout(binding=4 ) readonly uniform mediump image3D)
+0:? 'iCube' (layout(binding=5 ) uniform lowp imageCube)
+0:? 'i2DA' (layout(binding=6 ) uniform mediump image2DArray)
+0:? 'i2Dqualified' (layout(binding=6 ) coherent volatile restrict uniform highp image2D)
+0:? 'bbi' (layout(binding=1 column_major shared ) uniform block{layout(column_major shared ) uniform mediump int foo, layout(binding=2 column_major shared ) uniform mediump float f})
+0:? 'centroidIn' (centroid smooth in mediump 4-component vector of float)
+0:? 'bigl' (uniform mediump 4-component vector of float)
+0:? 'bigout1' (layout(location=40 ) out mediump 4-component vector of float)
+0:? 'bigout2' (layout(location=40 ) out mediump 4-component vector of float)
+0:? 'neg' (out mediump 4-component vector of float)
+0:? 'b430i' (layout(column_major std430 ) buffer block{layout(column_major std430 offset=0 ) buffer mediump int i})
+0:? 'bshari' (layout(column_major shared ) uniform block{layout(column_major shared ) uniform mediump int i})
+0:? 'smoothIn' (smooth in mediump 4-component vector of float)
+0:? 'flatIn' (flat in mediump int)
+0:? 's2dms' (uniform highp sampler2DMS)
+0:? 'bout' (out bool)
+0:? 'imageOut' (out highp image2D)
+0:? 'mout' (out mediump 2X3 matrix of float)
+0:? 'inb' (smooth in bool)
+0:? 'ino' (smooth in highp sampler2D)
+0:? 'ina' (smooth in 4-element array of mediump float)
+0:? 'inaa' (smooth in 4-element array of 2-element array of mediump float)
+0:? 'ins' (smooth in structure{global mediump float f})
+0:? 'inasa' (smooth in 4-element array of structure{global mediump float f})
+0:? 'insa' (smooth in 4-element array of structure{global mediump float f})
+0:? 'inSA' (smooth in structure{global 4-element array of mediump float f})
+0:? 'inSS' (smooth in structure{global mediump float f, global structure{global mediump float f} s})
+0:? 'outbinst' (out block{out mediump int a})
+0:? 'inbinst' (in block{in mediump int a, in mediump 4-component vector of float v, in structure{global mediump int b} s})
+0:? 'anon@0' (in block{layout(location=12 ) in mediump int aAnon, layout(location=13 ) centroid in mediump 4-component vector of float vAnon})
+0:? 'aliased' (layout(location=13 ) smooth in mediump 4-component vector of float)
+0:? 'arrayedInst' (in 4-element array of block{in mediump float f})
+0:? 'gl_FragDepth' (gl_FragDepth highp float FragDepth)
+0:? 'gl_FragDepth' (gl_FragDepth highp float FragDepth)
+0:? 'inf' (smooth in mediump 2-component vector of float)
+0:? 'ing' (smooth in mediump 2-component vector of float)
+0:? 'offsets' (uniform 4-element array of mediump 2-component vector of int)
+0:? 'sArray' (uniform 4-element array of highp sampler2D)
+0:? 'sIndex' (uniform mediump int)
+0:? 'auArray' (layout(binding=0 offset=0 ) uniform 2-element array of highp atomic_uint)
+0:? 'ubInst' (layout(column_major shared ) uniform 4-element array of block{layout(column_major shared ) uniform mediump int i})
+0:? 'bbInst' (layout(column_major shared ) buffer 4-element array of block{layout(column_major shared ) buffer mediump int i})
+0:? 'iArray' (writeonly uniform 5-element array of highp image2D)
+0:? 'constOffsets' (const 4-element array of mediump 2-component vector of int)
+0:? 0 (const int)
+0:? 0 (const int)
+0:? 0 (const int)
+0:? 0 (const int)
+0:? 0 (const int)
+0:? 0 (const int)
+0:? 0 (const int)
+0:? 0 (const int)
+0:? 'CA1' (writeonly uniform highp imageCubeArray)
+0:? 'CA2' (writeonly uniform highp iimageCubeArray)
+0:? 'CA3' (writeonly uniform highp uimageCubeArray)
+0:? 'CA4' (uniform highp samplerCubeArray)
+0:? 'CA5' (uniform highp samplerCubeArrayShadow)
+0:? 'CA6' (uniform highp isamplerCubeArray)
+0:? 'CA7' (uniform highp usamplerCubeArray)
+0:? 'gl_SampleMaskIn' (flat in implicitly-sized array of highp int SampleMaskIn)
+0:? 'gl_SampleMask' (out implicitly-sized array of highp int SampleMaskIn)
+0:? 'im2Df' (layout(r32f ) uniform highp image2D)
+0:? 'im2Du' (layout(r32ui ) uniform highp uimage2D)
+0:? 'im2Di' (layout(r32i ) uniform highp iimage2D)
+0:? 'P' (uniform mediump 2-component vector of int)
+0:? 'badIm2Df' (layout(rgba32f ) uniform highp image2D)
+0:? 'badIm2Du' (layout(rgba8ui ) uniform highp uimage2D)
+0:? 'badIm2Di' (layout(rgba16i ) uniform highp iimage2D)
+0:? 'colorSampInBad' (smooth sample in mediump 4-component vector of float)
+0:? 'colorCentroidBad' (centroid out mediump 4-component vector of float)
+0:? 'colorBadFlat' (flat out mediump 4-component vector of float)
+0:? 'colorBadSmooth' (smooth out mediump 4-component vector of float)
+0:? 'colorBadNo' (noperspective out mediump 4-component vector of float)
+0:? 'colorfc' (centroid flat in mediump 2-component vector of float)
+0:? 'scalarIn' (smooth in mediump float)
+0:? 'colorSampIn' (smooth sample in mediump 4-component vector of float)
+0:? 'colorSampleBad' (sample out mediump 4-component vector of float)
+0:? 'colorfsi' (flat sample in mediump 4-component vector of float)
+0:? 'sampInArray' (smooth sample in 4-element array of mediump 3-component vector of float)
+0:? 'badout' (out mediump 4-component vector of float)
+0:? 'outAA' (out 2-element array of 2-element array of mediump 4-component vector of float)
+
+
+Linked fragment stage:
+
+ERROR: Linking fragment stage: when more than one fragment shader output, all must have location qualifiers
+
+Shader version: 310
+Requested GL_EXT_shader_io_blocks
+Requested GL_EXT_texture_cube_map_array
+Requested GL_KHR_blend_equation_advanced
+Requested GL_OES_geometry_shader
+Requested GL_OES_gpu_shader5
+Requested GL_OES_sample_variables
+Requested GL_OES_shader_image_atomic
+Requested GL_OES_shader_io_blocks
+Requested GL_OES_shader_multisample_interpolation
+gl_FragCoord pixel center is integer
+gl_FragCoord origin is upper left
+using early_fragment_tests
+using depth_any
+using blend_support_multiply blend_support_screen blend_support_overlay blend_support_darken blend_support_lighten blend_support_colordodge blend_support_colorburn blend_support_hardlight blend_support_softlight blend_support_difference blend_support_exclusion blend_support_hsl_hue blend_support_hsl_saturation blend_support_hsl_color blend_support_hsl_luminosity blend_support_all_equations
+ERROR: node is still EOpNull!
+0:21 Function Definition: main( (global void)
+0:21 Function Parameters:
+0:23 Sequence
+0:23 Sequence
+0:23 move second child to first child (temp highp 4-component vector of float)
+0:23 'v' (temp mediump 4-component vector of float)
+0:23 texture (global highp 4-component vector of float)
+0:23 indirect index (temp highp sampler2D)
+0:23 'arrayedSampler' (uniform 5-element array of highp sampler2D)
+0:23 'i' (uniform mediump int)
+0:23 'c2D' (smooth in mediump 2-component vector of float)
+0:28 Sequence
+0:28 move second child to first child (temp highp 4-component vector of float)
+0:28 'v4' (temp mediump 4-component vector of float)
+0:28 textureGather (global highp 4-component vector of float)
+0:28 direct index (temp highp sampler2D)
+0:28 'arrayedSampler' (uniform 5-element array of highp sampler2D)
+0:28 Constant:
+0:28 0 (const int)
+0:28 'c2D' (smooth in mediump 2-component vector of float)
+0:29 Sequence
+0:29 move second child to first child (temp highp 4-component vector of int)
+0:29 'iv4' (temp mediump 4-component vector of int)
+0:29 textureGatherOffset (global highp 4-component vector of int)
+0:29 'isamp2DA' (uniform highp isampler2DArray)
+0:29 Constant:
+0:29 0.100000
+0:29 0.100000
+0:29 0.100000
+0:29 Constant:
+0:29 1 (const int)
+0:29 1 (const int)
+0:29 Constant:
+0:29 3 (const int)
+0:30 move second child to first child (temp highp 4-component vector of int)
+0:30 'iv4' (temp mediump 4-component vector of int)
+0:30 textureGatherOffset (global highp 4-component vector of int)
+0:30 'isamp2DA' (uniform highp isampler2DArray)
+0:30 Constant:
+0:30 0.100000
+0:30 0.100000
+0:30 0.100000
+0:30 Constant:
+0:30 1 (const int)
+0:30 1 (const int)
+0:30 'i' (uniform mediump int)
+0:31 move second child to first child (temp highp 4-component vector of int)
+0:31 'iv4' (temp mediump 4-component vector of int)
+0:31 textureGatherOffset (global highp 4-component vector of int)
+0:31 'isamp2DA' (uniform highp isampler2DArray)
+0:31 Constant:
+0:31 0.100000
+0:31 0.100000
+0:31 0.100000
+0:31 Constant:
+0:31 1 (const int)
+0:31 1 (const int)
+0:31 Constant:
+0:31 4 (const int)
+0:32 move second child to first child (temp highp 4-component vector of int)
+0:32 'iv4' (temp mediump 4-component vector of int)
+0:32 textureGatherOffset (global highp 4-component vector of int)
+0:32 'isamp2DA' (uniform highp isampler2DArray)
+0:32 Constant:
+0:32 0.100000
+0:32 0.100000
+0:32 0.100000
+0:32 Constant:
+0:32 1 (const int)
+0:32 1 (const int)
+0:32 Constant:
+0:32 3 (const int)
+0:33 move second child to first child (temp highp 4-component vector of int)
+0:33 'iv4' (temp mediump 4-component vector of int)
+0:33 textureGatherOffset (global highp 4-component vector of int)
+0:33 'isamp2DA' (uniform highp isampler2DArray)
+0:33 Constant:
+0:33 0.100000
+0:33 0.100000
+0:33 0.100000
+0:33 Constant:
+0:33 0 (const int)
+0:33 0 (const int)
+0:34 move second child to first child (temp highp 4-component vector of int)
+0:34 'iv4' (temp mediump 4-component vector of int)
+0:34 textureGatherOffset (global highp 4-component vector of int)
+0:34 'isamp2DA' (uniform highp isampler2DArray)
+0:34 Constant:
+0:34 0.100000
+0:34 0.100000
+0:34 0.100000
+0:34 Construct ivec2 (temp highp 2-component vector of int)
+0:34 'i' (uniform mediump int)
+0:38 Function Definition: foo23( (global void)
+0:38 Function Parameters:
+0:? Sequence
+0:42 textureProjGradOffset (global highp 4-component vector of uint)
+0:42 'usamp2d' (uniform highp usampler2D)
+0:42 'outp' (out mediump 4-component vector of float)
+0:42 Constant:
+0:42 0.000000
+0:42 0.000000
+0:42 Constant:
+0:42 0.000000
+0:42 0.000000
+0:42 Convert float to int (temp highp 2-component vector of int)
+0:42 'c2D' (smooth in mediump 2-component vector of float)
+0:43 textureProjGradOffset (global highp 4-component vector of uint)
+0:43 'usamp2d' (uniform highp usampler2D)
+0:43 'outp' (out mediump 4-component vector of float)
+0:43 Constant:
+0:43 0.000000
+0:43 0.000000
+0:43 Constant:
+0:43 0.000000
+0:43 0.000000
+0:43 Constant:
+0:43 3 (const int)
+0:43 4 (const int)
+0:44 textureProjGradOffset (global highp 4-component vector of uint)
+0:44 'usamp2d' (uniform highp usampler2D)
+0:44 'outp' (out mediump 4-component vector of float)
+0:44 Constant:
+0:44 0.000000
+0:44 0.000000
+0:44 Constant:
+0:44 0.000000
+0:44 0.000000
+0:44 Constant:
+0:44 15 (const int)
+0:44 16 (const int)
+0:45 textureProjGradOffset (global highp 4-component vector of uint)
+0:45 'usamp2d' (uniform highp usampler2D)
+0:45 'outp' (out mediump 4-component vector of float)
+0:45 Constant:
+0:45 0.000000
+0:45 0.000000
+0:45 Constant:
+0:45 0.000000
+0:45 0.000000
+0:45 Constant:
+0:45 -10 (const int)
+0:45 20 (const int)
+0:47 Test condition and select (temp void)
+0:47 Condition
+0:47 'gl_HelperInvocation' (in bool HelperInvocation)
+0:47 true case
+0:48 Pre-Increment (temp mediump 4-component vector of float)
+0:48 'outp' (out mediump 4-component vector of float)
+0:50 Sequence
+0:50 move second child to first child (temp mediump int)
+0:50 'sum' (temp mediump int)
+0:50 Constant:
+0:50 32 (const int)
+0:58 move second child to first child (temp bool)
+0:58 'b1' (temp bool)
+0:58 mix (global bool)
+0:58 'b2' (temp bool)
+0:58 'b3' (temp bool)
+0:58 'b' (temp bool)
+0:59 Sequence
+0:59 move second child to first child (temp mediump 3-component vector of uint)
+0:59 'um3' (temp mediump 3-component vector of uint)
+0:59 mix (global mediump 3-component vector of uint)
+0:59 Construct uvec3 (temp mediump 3-component vector of uint)
+0:59 Convert int to uint (temp mediump uint)
+0:59 'i' (uniform mediump int)
+0:59 Construct uvec3 (temp mediump 3-component vector of uint)
+0:59 Convert int to uint (temp mediump uint)
+0:59 'i' (uniform mediump int)
+0:59 Construct bvec3 (temp 3-component vector of bool)
+0:59 'b' (temp bool)
+0:60 Sequence
+0:60 move second child to first child (temp mediump 4-component vector of int)
+0:60 'im4' (temp mediump 4-component vector of int)
+0:60 mix (global mediump 4-component vector of int)
+0:60 Construct ivec4 (temp mediump 4-component vector of int)
+0:60 'i' (uniform mediump int)
+0:60 Construct ivec4 (temp mediump 4-component vector of int)
+0:60 'i' (uniform mediump int)
+0:60 Construct bvec4 (temp 4-component vector of bool)
+0:60 'b' (temp bool)
+0:98 Function Definition: foots( (global void)
+0:98 Function Parameters:
+0:100 Sequence
+0:100 Sequence
+0:100 move second child to first child (temp highp 2-component vector of int)
+0:100 'v2' (temp highp 2-component vector of int)
+0:100 textureSize (global highp 2-component vector of int)
+0:100 's1' (layout(binding=3 ) uniform highp sampler2D)
+0:100 Constant:
+0:100 2 (const int)
+0:101 Sequence
+0:101 move second child to first child (temp highp 3-component vector of int)
+0:101 'v3' (temp highp 3-component vector of int)
+0:101 textureSize (global highp 3-component vector of int)
+0:101 'isamp2DA' (uniform highp isampler2DArray)
+0:101 Constant:
+0:101 3 (const int)
+0:102 move second child to first child (temp highp 2-component vector of int)
+0:102 'v2' (temp highp 2-component vector of int)
+0:102 textureSize (global highp 2-component vector of int)
+0:102 's2dms' (uniform highp sampler2DMS)
+0:103 move second child to first child (temp highp 2-component vector of int)
+0:103 'v2' (temp highp 2-component vector of int)
+0:103 imageQuerySize (global highp 2-component vector of int)
+0:103 'i2D' (layout(binding=2 ) writeonly uniform highp image2D)
+0:104 move second child to first child (temp highp 3-component vector of int)
+0:104 'v3' (temp highp 3-component vector of int)
+0:104 imageQuerySize (global highp 3-component vector of int)
+0:104 'i3D' (layout(binding=4 ) readonly uniform mediump image3D)
+0:105 move second child to first child (temp highp 2-component vector of int)
+0:105 'v2' (temp highp 2-component vector of int)
+0:105 imageQuerySize (global highp 2-component vector of int)
+0:105 'iCube' (layout(binding=5 ) uniform lowp imageCube)
+0:106 move second child to first child (temp highp 3-component vector of int)
+0:106 'v3' (temp highp 3-component vector of int)
+0:106 imageQuerySize (global highp 3-component vector of int)
+0:106 'i2DA' (layout(binding=6 ) uniform mediump image2DArray)
+0:107 move second child to first child (temp highp 2-component vector of int)
+0:107 'v2' (temp highp 2-component vector of int)
+0:107 imageQuerySize (global highp 2-component vector of int)
+0:107 'i2Dqualified' (layout(binding=6 ) coherent volatile restrict uniform highp image2D)
+0:165 Function Definition: fooIO( (global void)
+0:165 Function Parameters:
+0:167 Sequence
+0:167 Sequence
+0:167 move second child to first child (temp mediump 4-component vector of float)
+0:167 'v' (temp mediump 4-component vector of float)
+0:167 add (temp mediump 4-component vector of float)
+0:167 v: direct index for structure (in mediump 4-component vector of float)
+0:167 'inbinst' (in block{in mediump int a, in mediump 4-component vector of float v, in structure{global mediump int b} s})
+0:167 Constant:
+0:167 1 (const int)
+0:167 vAnon: direct index for structure (layout(location=13 ) centroid in mediump 4-component vector of float)
+0:167 'anon@0' (in block{layout(location=12 ) in mediump int aAnon, layout(location=13 ) centroid in mediump 4-component vector of float vAnon})
+0:167 Constant:
+0:167 1 (const uint)
+0:168 vector scale second child into first child (temp mediump 4-component vector of float)
+0:168 'v' (temp mediump 4-component vector of float)
+0:168 f: direct index for structure (in mediump float)
+0:168 direct index (temp block{in mediump float f})
+0:168 'arrayedInst' (in 4-element array of block{in mediump float f})
+0:168 Constant:
+0:168 2 (const int)
+0:168 Constant:
+0:168 0 (const int)
+0:169 vector scale second child into first child (temp mediump 4-component vector of float)
+0:169 'v' (temp mediump 4-component vector of float)
+0:169 f: direct index for structure (in mediump float)
+0:169 indirect index (temp block{in mediump float f})
+0:169 'arrayedInst' (in 4-element array of block{in mediump float f})
+0:169 'i' (uniform mediump int)
+0:169 Constant:
+0:169 0 (const int)
+0:179 Function Definition: foo_IO( (global void)
+0:179 Function Parameters:
+0:181 Sequence
+0:181 move second child to first child (temp highp float)
+0:181 'gl_FragDepth' (gl_FragDepth highp float FragDepth)
+0:181 Constant:
+0:181 0.200000
+0:182 'gl_Layer' (flat in highp int Layer)
+0:183 'gl_PrimitiveID' (flat in highp int PrimitiveID)
+0:184 Sequence
+0:184 move second child to first child (temp bool)
+0:184 'f' (temp bool)
+0:184 'gl_FrontFacing' (gl_FrontFacing bool Face)
+0:191 Function Definition: foo_GS( (global void)
+0:191 Function Parameters:
+0:193 Sequence
+0:193 Sequence
+0:193 move second child to first child (temp highp int)
+0:193 'l' (temp highp int)
+0:193 'gl_Layer' (flat in highp int Layer)
+0:194 Sequence
+0:194 move second child to first child (temp highp int)
+0:194 'p' (temp highp int)
+0:194 'gl_PrimitiveID' (flat in highp int PrimitiveID)
+0:207 Function Definition: pfooBad( (global void)
+0:207 Function Parameters:
+0:? Sequence
+0:210 move second child to first child (temp mediump 2-component vector of float)
+0:210 'h' (noContraction temp mediump 2-component vector of float)
+0:210 fma (global mediump 2-component vector of float)
+0:210 'inf' (smooth in mediump 2-component vector of float)
+0:210 'ing' (smooth in mediump 2-component vector of float)
+0:210 'h' (noContraction temp mediump 2-component vector of float)
+0:211 textureGatherOffset (global highp 4-component vector of float)
+0:211 direct index (temp highp sampler2D)
+0:211 'sArray' (uniform 4-element array of highp sampler2D)
+0:211 Constant:
+0:211 0 (const int)
+0:211 Constant:
+0:211 0.100000
+0:211 0.100000
+0:211 Convert float to int (temp highp 2-component vector of int)
+0:211 'inf' (smooth in mediump 2-component vector of float)
+0:212 textureGatherOffsets (global highp 4-component vector of float)
+0:212 direct index (temp highp sampler2D)
+0:212 'sArray' (uniform 4-element array of highp sampler2D)
+0:212 Constant:
+0:212 0 (const int)
+0:212 Constant:
+0:212 0.100000
+0:212 0.100000
+0:212 Constant:
+0:212 0 (const int)
+0:212 0 (const int)
+0:212 0 (const int)
+0:212 0 (const int)
+0:212 0 (const int)
+0:212 0 (const int)
+0:212 0 (const int)
+0:212 0 (const int)
+0:217 Function Definition: pfoo( (global void)
+0:217 Function Parameters:
+0:? Sequence
+0:220 move second child to first child (temp mediump 2-component vector of float)
+0:220 'h' (noContraction temp mediump 2-component vector of float)
+0:220 fma (global mediump 2-component vector of float)
+0:220 'inf' (smooth in mediump 2-component vector of float)
+0:220 'ing' (smooth in mediump 2-component vector of float)
+0:220 'h' (noContraction temp mediump 2-component vector of float)
+0:221 textureGatherOffset (global highp 4-component vector of float)
+0:221 direct index (temp highp sampler2D)
+0:221 'sArray' (uniform 4-element array of highp sampler2D)
+0:221 Constant:
+0:221 0 (const int)
+0:221 Constant:
+0:221 0.100000
+0:221 0.100000
+0:221 Convert float to int (temp highp 2-component vector of int)
+0:221 'inf' (smooth in mediump 2-component vector of float)
+0:222 textureGatherOffsets (global highp 4-component vector of float)
+0:222 direct index (temp highp sampler2D)
+0:222 'sArray' (uniform 4-element array of highp sampler2D)
+0:222 Constant:
+0:222 0 (const int)
+0:222 Constant:
+0:222 0.100000
+0:222 0.100000
+0:222 Constant:
+0:222 0 (const int)
+0:222 0 (const int)
+0:222 0 (const int)
+0:222 0 (const int)
+0:222 0 (const int)
+0:222 0 (const int)
+0:222 0 (const int)
+0:222 0 (const int)
+0:223 textureGatherOffsets (global highp 4-component vector of float)
+0:223 direct index (temp highp sampler2D)
+0:223 'sArray' (uniform 4-element array of highp sampler2D)
+0:223 Constant:
+0:223 0 (const int)
+0:223 Constant:
+0:223 0.100000
+0:223 0.100000
+0:223 'offsets' (uniform 4-element array of mediump 2-component vector of int)
+0:248 Function Definition: CAT( (global void)
+0:248 Function Parameters:
+0:250 Sequence
+0:250 Sequence
+0:250 move second child to first child (temp highp 4-component vector of float)
+0:250 'b4' (temp highp 4-component vector of float)
+0:250 texture (global highp 4-component vector of float)
+0:250 'CA4' (uniform highp samplerCubeArray)
+0:250 Constant:
+0:250 0.500000
+0:250 0.500000
+0:250 0.500000
+0:250 0.500000
+0:250 Constant:
+0:250 0.240000
+0:251 Sequence
+0:251 move second child to first child (temp highp 4-component vector of int)
+0:251 'b6' (temp highp 4-component vector of int)
+0:251 texture (global highp 4-component vector of int)
+0:251 'CA6' (uniform highp isamplerCubeArray)
+0:251 Constant:
+0:251 0.500000
+0:251 0.500000
+0:251 0.500000
+0:251 0.500000
+0:251 Constant:
+0:251 0.260000
+0:252 Sequence
+0:252 move second child to first child (temp highp 4-component vector of uint)
+0:252 'b7' (temp highp 4-component vector of uint)
+0:252 texture (global highp 4-component vector of uint)
+0:252 'CA7' (uniform highp usamplerCubeArray)
+0:252 Constant:
+0:252 0.500000
+0:252 0.500000
+0:252 0.500000
+0:252 0.500000
+0:252 Constant:
+0:252 0.270000
+0:255 Function Definition: badSample( (global void)
+0:255 Function Parameters:
+0:257 Sequence
+0:257 Sequence
+0:257 move second child to first child (temp lowp int)
+0:257 'a1' (temp lowp int)
+0:257 'gl_SampleID' (flat in lowp int SampleId)
+0:258 Sequence
+0:258 move second child to first child (temp mediump 2-component vector of float)
+0:258 'a2' (temp mediump 2-component vector of float)
+0:258 'gl_SamplePosition' (smooth in mediump 2-component vector of float SamplePosition)
+0:259 Sequence
+0:259 move second child to first child (temp highp int)
+0:259 'a3' (temp highp int)
+0:259 direct index (flat temp highp int SampleMaskIn)
+0:259 'gl_SampleMaskIn' (flat in 1-element array of highp int SampleMaskIn)
+0:259 Constant:
+0:259 0 (const int)
+0:260 move second child to first child (temp highp int)
+0:260 direct index (temp highp int SampleMaskIn)
+0:260 'gl_SampleMask' (out 1-element array of highp int SampleMaskIn)
+0:260 Constant:
+0:260 0 (const int)
+0:260 'a3' (temp highp int)
+0:261 Sequence
+0:261 move second child to first child (temp mediump int)
+0:261 'n' (temp mediump int)
+0:261 'gl_NumSamples' (uniform lowp int)
+0:268 Function Definition: goodSample( (global void)
+0:268 Function Parameters:
+0:270 Sequence
+0:270 Sequence
+0:270 move second child to first child (temp lowp int)
+0:270 'a1' (temp lowp int)
+0:270 'gl_SampleID' (flat in lowp int SampleId)
+0:271 Sequence
+0:271 move second child to first child (temp mediump 2-component vector of float)
+0:271 'a2' (temp mediump 2-component vector of float)
+0:271 'gl_SamplePosition' (smooth in mediump 2-component vector of float SamplePosition)
+0:272 Sequence
+0:272 move second child to first child (temp highp int)
+0:272 'a3' (temp highp int)
+0:272 direct index (flat temp highp int SampleMaskIn)
+0:272 'gl_SampleMaskIn' (flat in 1-element array of highp int SampleMaskIn)
+0:272 Constant:
+0:272 0 (const int)
+0:273 move second child to first child (temp highp int)
+0:273 direct index (temp highp int SampleMaskIn)
+0:273 'gl_SampleMask' (out 1-element array of highp int SampleMaskIn)
+0:273 Constant:
+0:273 0 (const int)
+0:273 'a3' (temp highp int)
+0:274 Sequence
+0:274 move second child to first child (temp mediump int)
+0:274 'n1' (temp mediump int)
+0:274 Constant:
+0:274 4 (const int)
+0:275 Sequence
+0:275 move second child to first child (temp mediump int)
+0:275 'n2' (temp mediump int)
+0:275 'gl_NumSamples' (uniform lowp int)
+0:283 Function Definition: badImageAtom( (global void)
+0:283 Function Parameters:
+0:? Sequence
+0:289 imageAtomicAdd (global highp int)
+0:289 'im2Di' (layout(r32i ) uniform highp iimage2D)
+0:289 'P' (uniform mediump 2-component vector of int)
+0:289 'dati' (temp mediump int)
+0:290 imageAtomicAdd (global highp uint)
+0:290 'im2Du' (layout(r32ui ) uniform highp uimage2D)
+0:290 'P' (uniform mediump 2-component vector of int)
+0:290 'datu' (temp mediump uint)
+0:291 imageAtomicMin (global highp int)
+0:291 'im2Di' (layout(r32i ) uniform highp iimage2D)
+0:291 'P' (uniform mediump 2-component vector of int)
+0:291 'dati' (temp mediump int)
+0:292 imageAtomicMin (global highp uint)
+0:292 'im2Du' (layout(r32ui ) uniform highp uimage2D)
+0:292 'P' (uniform mediump 2-component vector of int)
+0:292 'datu' (temp mediump uint)
+0:293 imageAtomicMax (global highp int)
+0:293 'im2Di' (layout(r32i ) uniform highp iimage2D)
+0:293 'P' (uniform mediump 2-component vector of int)
+0:293 'dati' (temp mediump int)
+0:294 imageAtomicMax (global highp uint)
+0:294 'im2Du' (layout(r32ui ) uniform highp uimage2D)
+0:294 'P' (uniform mediump 2-component vector of int)
+0:294 'datu' (temp mediump uint)
+0:295 imageAtomicAnd (global highp int)
+0:295 'im2Di' (layout(r32i ) uniform highp iimage2D)
+0:295 'P' (uniform mediump 2-component vector of int)
+0:295 'dati' (temp mediump int)
+0:296 imageAtomicAnd (global highp uint)
+0:296 'im2Du' (layout(r32ui ) uniform highp uimage2D)
+0:296 'P' (uniform mediump 2-component vector of int)
+0:296 'datu' (temp mediump uint)
+0:297 imageAtomicOr (global highp int)
+0:297 'im2Di' (layout(r32i ) uniform highp iimage2D)
+0:297 'P' (uniform mediump 2-component vector of int)
+0:297 'dati' (temp mediump int)
+0:298 imageAtomicOr (global highp uint)
+0:298 'im2Du' (layout(r32ui ) uniform highp uimage2D)
+0:298 'P' (uniform mediump 2-component vector of int)
+0:298 'datu' (temp mediump uint)
+0:299 imageAtomicXor (global highp int)
+0:299 'im2Di' (layout(r32i ) uniform highp iimage2D)
+0:299 'P' (uniform mediump 2-component vector of int)
+0:299 'dati' (temp mediump int)
+0:300 imageAtomicXor (global highp uint)
+0:300 'im2Du' (layout(r32ui ) uniform highp uimage2D)
+0:300 'P' (uniform mediump 2-component vector of int)
+0:300 'datu' (temp mediump uint)
+0:301 imageAtomicExchange (global highp int)
+0:301 'im2Di' (layout(r32i ) uniform highp iimage2D)
+0:301 'P' (uniform mediump 2-component vector of int)
+0:301 'dati' (temp mediump int)
+0:302 imageAtomicExchange (global highp uint)
+0:302 'im2Du' (layout(r32ui ) uniform highp uimage2D)
+0:302 'P' (uniform mediump 2-component vector of int)
+0:302 'datu' (temp mediump uint)
+0:303 imageAtomicExchange (global highp float)
+0:303 'im2Df' (layout(r32f ) uniform highp image2D)
+0:303 'P' (uniform mediump 2-component vector of int)
+0:303 'datf' (temp mediump float)
+0:304 imageAtomicCompSwap (global highp int)
+0:304 'im2Di' (layout(r32i ) uniform highp iimage2D)
+0:304 'P' (uniform mediump 2-component vector of int)
+0:304 Constant:
+0:304 3 (const int)
+0:304 'dati' (temp mediump int)
+0:305 imageAtomicCompSwap (global highp uint)
+0:305 'im2Du' (layout(r32ui ) uniform highp uimage2D)
+0:305 'P' (uniform mediump 2-component vector of int)
+0:305 Constant:
+0:305 5 (const uint)
+0:305 'datu' (temp mediump uint)
+0:316 Function Definition: goodImageAtom( (global void)
+0:316 Function Parameters:
+0:? Sequence
+0:322 imageAtomicAdd (global highp int)
+0:322 'im2Di' (layout(r32i ) uniform highp iimage2D)
+0:322 'P' (uniform mediump 2-component vector of int)
+0:322 'dati' (temp mediump int)
+0:323 imageAtomicAdd (global highp uint)
+0:323 'im2Du' (layout(r32ui ) uniform highp uimage2D)
+0:323 'P' (uniform mediump 2-component vector of int)
+0:323 'datu' (temp mediump uint)
+0:324 imageAtomicMin (global highp int)
+0:324 'im2Di' (layout(r32i ) uniform highp iimage2D)
+0:324 'P' (uniform mediump 2-component vector of int)
+0:324 'dati' (temp mediump int)
+0:325 imageAtomicMin (global highp uint)
+0:325 'im2Du' (layout(r32ui ) uniform highp uimage2D)
+0:325 'P' (uniform mediump 2-component vector of int)
+0:325 'datu' (temp mediump uint)
+0:326 imageAtomicMax (global highp int)
+0:326 'im2Di' (layout(r32i ) uniform highp iimage2D)
+0:326 'P' (uniform mediump 2-component vector of int)
+0:326 'dati' (temp mediump int)
+0:327 imageAtomicMax (global highp uint)
+0:327 'im2Du' (layout(r32ui ) uniform highp uimage2D)
+0:327 'P' (uniform mediump 2-component vector of int)
+0:327 'datu' (temp mediump uint)
+0:328 imageAtomicAnd (global highp int)
+0:328 'im2Di' (layout(r32i ) uniform highp iimage2D)
+0:328 'P' (uniform mediump 2-component vector of int)
+0:328 'dati' (temp mediump int)
+0:329 imageAtomicAnd (global highp uint)
+0:329 'im2Du' (layout(r32ui ) uniform highp uimage2D)
+0:329 'P' (uniform mediump 2-component vector of int)
+0:329 'datu' (temp mediump uint)
+0:330 imageAtomicOr (global highp int)
+0:330 'im2Di' (layout(r32i ) uniform highp iimage2D)
+0:330 'P' (uniform mediump 2-component vector of int)
+0:330 'dati' (temp mediump int)
+0:331 imageAtomicOr (global highp uint)
+0:331 'im2Du' (layout(r32ui ) uniform highp uimage2D)
+0:331 'P' (uniform mediump 2-component vector of int)
+0:331 'datu' (temp mediump uint)
+0:332 imageAtomicXor (global highp int)
+0:332 'im2Di' (layout(r32i ) uniform highp iimage2D)
+0:332 'P' (uniform mediump 2-component vector of int)
+0:332 'dati' (temp mediump int)
+0:333 imageAtomicXor (global highp uint)
+0:333 'im2Du' (layout(r32ui ) uniform highp uimage2D)
+0:333 'P' (uniform mediump 2-component vector of int)
+0:333 'datu' (temp mediump uint)
+0:334 imageAtomicExchange (global highp int)
+0:334 'im2Di' (layout(r32i ) uniform highp iimage2D)
+0:334 'P' (uniform mediump 2-component vector of int)
+0:334 'dati' (temp mediump int)
+0:335 imageAtomicExchange (global highp uint)
+0:335 'im2Du' (layout(r32ui ) uniform highp uimage2D)
+0:335 'P' (uniform mediump 2-component vector of int)
+0:335 'datu' (temp mediump uint)
+0:336 imageAtomicExchange (global highp float)
+0:336 'im2Df' (layout(r32f ) uniform highp image2D)
+0:336 'P' (uniform mediump 2-component vector of int)
+0:336 'datf' (temp mediump float)
+0:337 imageAtomicCompSwap (global highp int)
+0:337 'im2Di' (layout(r32i ) uniform highp iimage2D)
+0:337 'P' (uniform mediump 2-component vector of int)
+0:337 Constant:
+0:337 3 (const int)
+0:337 'dati' (temp mediump int)
+0:338 imageAtomicCompSwap (global highp uint)
+0:338 'im2Du' (layout(r32ui ) uniform highp uimage2D)
+0:338 'P' (uniform mediump 2-component vector of int)
+0:338 Constant:
+0:338 5 (const uint)
+0:338 'datu' (temp mediump uint)
+0:340 imageAtomicMax (global highp int)
+0:340 'badIm2Di' (layout(rgba16i ) uniform highp iimage2D)
+0:340 'P' (uniform mediump 2-component vector of int)
+0:340 'dati' (temp mediump int)
+0:341 imageAtomicMax (global highp uint)
+0:341 'badIm2Du' (layout(rgba8ui ) uniform highp uimage2D)
+0:341 'P' (uniform mediump 2-component vector of int)
+0:341 'datu' (temp mediump uint)
+0:342 imageAtomicExchange (global highp float)
+0:342 'badIm2Df' (layout(rgba32f ) uniform highp image2D)
+0:342 'P' (uniform mediump 2-component vector of int)
+0:342 'datf' (temp mediump float)
+0:353 Function Definition: badInterp( (global void)
+0:353 Function Parameters:
+0:355 Sequence
+0:355 interpolateAtCentroid (global mediump 2-component vector of float)
+0:355 'colorfc' (centroid flat in mediump 2-component vector of float)
+0:356 interpolateAtSample (global mediump 2-component vector of float)
+0:356 'colorfc' (centroid flat in mediump 2-component vector of float)
+0:356 Constant:
+0:356 1 (const int)
+0:357 interpolateAtOffset (global mediump 2-component vector of float)
+0:357 'colorfc' (centroid flat in mediump 2-component vector of float)
+0:357 Constant:
+0:357 0.200000
+0:357 0.200000
+0:369 Function Definition: interp( (global void)
+0:369 Function Parameters:
+0:? Sequence
+0:376 move second child to first child (temp mediump 2-component vector of float)
+0:376 'res2' (temp mediump 2-component vector of float)
+0:376 interpolateAtCentroid (global mediump 2-component vector of float)
+0:376 'colorfc' (centroid flat in mediump 2-component vector of float)
+0:377 move second child to first child (temp mediump 4-component vector of float)
+0:377 'res4' (temp mediump 4-component vector of float)
+0:377 interpolateAtCentroid (global mediump 4-component vector of float)
+0:377 'colorSampIn' (smooth sample in mediump 4-component vector of float)
+0:378 move second child to first child (temp mediump 4-component vector of float)
+0:378 'res4' (temp mediump 4-component vector of float)
+0:378 interpolateAtCentroid (global mediump 4-component vector of float)
+0:378 'colorfsi' (flat sample in mediump 4-component vector of float)
+0:379 move second child to first child (temp mediump float)
+0:379 'res' (temp mediump float)
+0:379 interpolateAtCentroid (global mediump float)
+0:379 'scalarIn' (smooth in mediump float)
+0:380 'res3' (temp mediump 3-component vector of float)
+0:381 move second child to first child (temp mediump 3-component vector of float)
+0:381 'res3' (temp mediump 3-component vector of float)
+0:381 interpolateAtCentroid (global mediump 3-component vector of float)
+0:381 direct index (smooth sample temp mediump 3-component vector of float)
+0:381 'sampInArray' (smooth sample in 4-element array of mediump 3-component vector of float)
+0:381 Constant:
+0:381 2 (const int)
+0:382 move second child to first child (temp mediump 2-component vector of float)
+0:382 'res2' (temp mediump 2-component vector of float)
+0:382 interpolateAtCentroid (global mediump 2-component vector of float)
+0:382 vector swizzle (temp mediump 2-component vector of float)
+0:382 direct index (smooth sample temp mediump 3-component vector of float)
+0:382 'sampInArray' (smooth sample in 4-element array of mediump 3-component vector of float)
+0:382 Constant:
+0:382 2 (const int)
+0:382 Sequence
+0:382 Constant:
+0:382 0 (const int)
+0:382 Constant:
+0:382 1 (const int)
+0:384 'res3' (temp mediump 3-component vector of float)
+0:385 move second child to first child (temp mediump 3-component vector of float)
+0:385 'res3' (temp mediump 3-component vector of float)
+0:385 interpolateAtSample (global mediump 3-component vector of float)
+0:385 indirect index (smooth sample temp mediump 3-component vector of float)
+0:385 'sampInArray' (smooth sample in 4-element array of mediump 3-component vector of float)
+0:385 'i' (uniform mediump int)
+0:385 Constant:
+0:385 0 (const int)
+0:386 move second child to first child (temp mediump 2-component vector of float)
+0:386 'res2' (temp mediump 2-component vector of float)
+0:386 interpolateAtSample (global mediump 2-component vector of float)
+0:386 vector swizzle (temp mediump 2-component vector of float)
+0:386 direct index (smooth sample temp mediump 3-component vector of float)
+0:386 'sampInArray' (smooth sample in 4-element array of mediump 3-component vector of float)
+0:386 Constant:
+0:386 2 (const int)
+0:386 Sequence
+0:386 Constant:
+0:386 0 (const int)
+0:386 Constant:
+0:386 1 (const int)
+0:386 Constant:
+0:386 2 (const int)
+0:387 move second child to first child (temp mediump float)
+0:387 'res' (temp mediump float)
+0:387 interpolateAtSample (global mediump float)
+0:387 'scalarIn' (smooth in mediump float)
+0:387 Constant:
+0:387 1 (const int)
+0:389 'res3' (temp mediump 3-component vector of float)
+0:390 move second child to first child (temp mediump 3-component vector of float)
+0:390 'res3' (temp mediump 3-component vector of float)
+0:390 interpolateAtOffset (global mediump 3-component vector of float)
+0:390 direct index (smooth sample temp mediump 3-component vector of float)
+0:390 'sampInArray' (smooth sample in 4-element array of mediump 3-component vector of float)
+0:390 Constant:
+0:390 2 (const int)
+0:390 Constant:
+0:390 0.200000
+0:390 0.200000
+0:391 move second child to first child (temp mediump 2-component vector of float)
+0:391 'res2' (temp mediump 2-component vector of float)
+0:391 interpolateAtOffset (global mediump 2-component vector of float)
+0:391 vector swizzle (temp mediump 2-component vector of float)
+0:391 direct index (smooth sample temp mediump 3-component vector of float)
+0:391 'sampInArray' (smooth sample in 4-element array of mediump 3-component vector of float)
+0:391 Constant:
+0:391 2 (const int)
+0:391 Sequence
+0:391 Constant:
+0:391 0 (const int)
+0:391 Constant:
+0:391 1 (const int)
+0:391 Constant:
+0:391 0.200000
+0:391 0.200000
+0:392 move second child to first child (temp mediump float)
+0:392 'res' (temp mediump float)
+0:392 interpolateAtOffset (global mediump float)
+0:392 add (temp mediump float)
+0:392 'scalarIn' (smooth in mediump float)
+0:392 'scalarIn' (smooth in mediump float)
+0:392 Constant:
+0:392 0.200000
+0:392 0.200000
+0:393 move second child to first child (temp mediump float)
+0:393 'res' (temp mediump float)
+0:393 interpolateAtOffset (global mediump float)
+0:393 'scalarIn' (smooth in mediump float)
+0:393 Constant:
+0:393 0.200000
+0:393 0.200000
+0:396 move second child to first child (temp mediump float)
+0:396 'res' (temp mediump float)
+0:396 interpolateAtCentroid (global mediump float)
+0:396 'f' (temp mediump float)
+0:397 move second child to first child (temp mediump 4-component vector of float)
+0:397 'res4' (temp mediump 4-component vector of float)
+0:397 interpolateAtSample (global mediump 4-component vector of float)
+0:397 'outp' (out mediump 4-component vector of float)
+0:397 Constant:
+0:397 0 (const int)
+0:427 Function Definition: blendFoo( (temp void)
+0:427 Function Parameters:
+0:428 Function Definition: blendFoo(vf3; (global void)
+0:428 Function Parameters:
+0:428 'v' (in mediump 3-component vector of float)
+0:? Linker Objects
+0:? 'gl_FragCoord' (smooth in mediump 4-component vector of float)
+0:? 'v3' (layout(location=2 ) smooth in mediump 3-component vector of float)
+0:? 'yi' (layout(location=2 ) smooth in mediump 4X4 matrix of float)
+0:? 'arrayedSampler' (uniform 5-element array of highp sampler2D)
+0:? 'usamp2d' (uniform highp usampler2D)
+0:? 'samp2dr' (uniform mediump usampler2DRect)
+0:? 'isamp2DA' (uniform highp isampler2DArray)
+0:? 'c2D' (smooth in mediump 2-component vector of float)
+0:? 'i' (uniform mediump int)
+0:? 'outp' (out mediump 4-component vector of float)
+0:? 's1' (layout(binding=3 ) uniform highp sampler2D)
+0:? 's2' (layout(binding=3 ) uniform highp sampler2D)
+0:? 'i2D' (layout(binding=2 ) writeonly uniform highp image2D)
+0:? 'i3D' (layout(binding=4 ) readonly uniform mediump image3D)
+0:? 'iCube' (layout(binding=5 ) uniform lowp imageCube)
+0:? 'i2DA' (layout(binding=6 ) uniform mediump image2DArray)
+0:? 'i2Dqualified' (layout(binding=6 ) coherent volatile restrict uniform highp image2D)
+0:? 'bbi' (layout(binding=1 column_major shared ) uniform block{layout(column_major shared ) uniform mediump int foo, layout(binding=2 column_major shared ) uniform mediump float f})
+0:? 'centroidIn' (centroid smooth in mediump 4-component vector of float)
+0:? 'bigl' (uniform mediump 4-component vector of float)
+0:? 'bigout1' (layout(location=40 ) out mediump 4-component vector of float)
+0:? 'bigout2' (layout(location=40 ) out mediump 4-component vector of float)
+0:? 'neg' (out mediump 4-component vector of float)
+0:? 'b430i' (layout(column_major std430 ) buffer block{layout(column_major std430 offset=0 ) buffer mediump int i})
+0:? 'bshari' (layout(column_major shared ) uniform block{layout(column_major shared ) uniform mediump int i})
+0:? 'smoothIn' (smooth in mediump 4-component vector of float)
+0:? 'flatIn' (flat in mediump int)
+0:? 's2dms' (uniform highp sampler2DMS)
+0:? 'bout' (out bool)
+0:? 'imageOut' (out highp image2D)
+0:? 'mout' (out mediump 2X3 matrix of float)
+0:? 'inb' (smooth in bool)
+0:? 'ino' (smooth in highp sampler2D)
+0:? 'ina' (smooth in 4-element array of mediump float)
+0:? 'inaa' (smooth in 4-element array of 2-element array of mediump float)
+0:? 'ins' (smooth in structure{global mediump float f})
+0:? 'inasa' (smooth in 4-element array of structure{global mediump float f})
+0:? 'insa' (smooth in 4-element array of structure{global mediump float f})
+0:? 'inSA' (smooth in structure{global 4-element array of mediump float f})
+0:? 'inSS' (smooth in structure{global mediump float f, global structure{global mediump float f} s})
+0:? 'outbinst' (out block{out mediump int a})
+0:? 'inbinst' (in block{in mediump int a, in mediump 4-component vector of float v, in structure{global mediump int b} s})
+0:? 'anon@0' (in block{layout(location=12 ) in mediump int aAnon, layout(location=13 ) centroid in mediump 4-component vector of float vAnon})
+0:? 'aliased' (layout(location=13 ) smooth in mediump 4-component vector of float)
+0:? 'arrayedInst' (in 4-element array of block{in mediump float f})
+0:? 'gl_FragDepth' (gl_FragDepth highp float FragDepth)
+0:? 'gl_FragDepth' (gl_FragDepth highp float FragDepth)
+0:? 'inf' (smooth in mediump 2-component vector of float)
+0:? 'ing' (smooth in mediump 2-component vector of float)
+0:? 'offsets' (uniform 4-element array of mediump 2-component vector of int)
+0:? 'sArray' (uniform 4-element array of highp sampler2D)
+0:? 'sIndex' (uniform mediump int)
+0:? 'auArray' (layout(binding=0 offset=0 ) uniform 2-element array of highp atomic_uint)
+0:? 'ubInst' (layout(column_major shared ) uniform 4-element array of block{layout(column_major shared ) uniform mediump int i})
+0:? 'bbInst' (layout(column_major shared ) buffer 4-element array of block{layout(column_major shared ) buffer mediump int i})
+0:? 'iArray' (writeonly uniform 5-element array of highp image2D)
+0:? 'constOffsets' (const 4-element array of mediump 2-component vector of int)
+0:? 0 (const int)
+0:? 0 (const int)
+0:? 0 (const int)
+0:? 0 (const int)
+0:? 0 (const int)
+0:? 0 (const int)
+0:? 0 (const int)
+0:? 0 (const int)
+0:? 'CA1' (writeonly uniform highp imageCubeArray)
+0:? 'CA2' (writeonly uniform highp iimageCubeArray)
+0:? 'CA3' (writeonly uniform highp uimageCubeArray)
+0:? 'CA4' (uniform highp samplerCubeArray)
+0:? 'CA5' (uniform highp samplerCubeArrayShadow)
+0:? 'CA6' (uniform highp isamplerCubeArray)
+0:? 'CA7' (uniform highp usamplerCubeArray)
+0:? 'gl_SampleMaskIn' (flat in 1-element array of highp int SampleMaskIn)
+0:? 'gl_SampleMask' (out 1-element array of highp int SampleMaskIn)
+0:? 'im2Df' (layout(r32f ) uniform highp image2D)
+0:? 'im2Du' (layout(r32ui ) uniform highp uimage2D)
+0:? 'im2Di' (layout(r32i ) uniform highp iimage2D)
+0:? 'P' (uniform mediump 2-component vector of int)
+0:? 'badIm2Df' (layout(rgba32f ) uniform highp image2D)
+0:? 'badIm2Du' (layout(rgba8ui ) uniform highp uimage2D)
+0:? 'badIm2Di' (layout(rgba16i ) uniform highp iimage2D)
+0:? 'colorSampInBad' (smooth sample in mediump 4-component vector of float)
+0:? 'colorCentroidBad' (centroid out mediump 4-component vector of float)
+0:? 'colorBadFlat' (flat out mediump 4-component vector of float)
+0:? 'colorBadSmooth' (smooth out mediump 4-component vector of float)
+0:? 'colorBadNo' (noperspective out mediump 4-component vector of float)
+0:? 'colorfc' (centroid flat in mediump 2-component vector of float)
+0:? 'scalarIn' (smooth in mediump float)
+0:? 'colorSampIn' (smooth sample in mediump 4-component vector of float)
+0:? 'colorSampleBad' (sample out mediump 4-component vector of float)
+0:? 'colorfsi' (flat sample in mediump 4-component vector of float)
+0:? 'sampInArray' (smooth sample in 4-element array of mediump 3-component vector of float)
+0:? 'badout' (out mediump 4-component vector of float)
+0:? 'outAA' (out 2-element array of 2-element array of mediump 4-component vector of float)
+
diff --git a/chromium/third_party/glslang/src/Test/baseResults/310.geom.out b/chromium/third_party/glslang/src/Test/baseResults/310.geom.out
new file mode 100644
index 00000000000..888c14233f7
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/310.geom.out
@@ -0,0 +1,346 @@
+310.geom
+Warning, version 310 is not yet complete; most version-specific features are present, but some are missing.
+ERROR: 0:29: 'fromVertex' : block instance name redefinition
+ERROR: 0:33: 'fromVertex' : redefinition
+ERROR: 0:35: 'fooC' : block instance name redefinition
+ERROR: 0:43: 'EmitStreamVertex' : no matching overloaded function found
+ERROR: 0:44: 'EndStreamPrimitive' : no matching overloaded function found
+ERROR: 0:47: 'gl_ClipDistance' : undeclared identifier
+ERROR: 0:47: 'gl_ClipDistance' : left of '[' is not of type array, matrix, or vector
+ERROR: 0:48: 'gl_ClipDistance' : no such field in structure
+ERROR: 0:48: 'expression' : left of '[' is not of type array, matrix, or vector
+ERROR: 0:47: 'assign' : l-value required (can't modify a const)
+ERROR: 0:55: 'selecting output stream' : not supported with this profile: es
+ERROR: 0:62: 'max_vertices' : too large, must be less than gl_MaxGeometryOutputVertices
+ERROR: 0:62: 'max_vertices' : cannot change previously set layout value
+ERROR: 0:63: 'max_vertices' : can only apply to a standalone qualifier
+ERROR: 0:68: 'points' : cannot change previously set output primitive
+ERROR: 0:69: 'points' : cannot change previously set output primitive
+ERROR: 0:70: 'triangle_strip' : cannot apply to input
+ERROR: 0:71: 'triangle_strip' : cannot apply to: uniform
+ERROR: 0:72: 'triangle_strip' : can only apply to a standalone qualifier
+ERROR: 0:73: 'triangle_strip' : can only apply to a standalone qualifier
+ERROR: 0:74: 'invocations' : can only apply to a standalone qualifier
+ERROR: 0:76: 'invocations' : can only apply to a standalone qualifier
+ERROR: 0:77: 'max_vertices' : can only apply to a standalone qualifier
+ERROR: 0:78: 'triangle_strip' : can only apply to a standalone qualifier
+ERROR: 0:81: 'lines' : cannot apply to 'out'
+ERROR: 0:83: 'triangles' : cannot change previously set input primitive
+ERROR: 0:84: 'triangles_adjacency' : cannot change previously set input primitive
+ERROR: 0:116: 'gl_ViewportIndex' : undeclared identifier
+ERROR: 0:117: 'gl_MaxViewports' : undeclared identifier
+ERROR: 0:123: 'lines_adjacency' : inconsistent input primitive for array size of explArrayBad
+ERROR: 0:124: 'in' : type must be an array: nonArrayed
+ERROR: 0:128: 'sample' : Reserved word.
+ERROR: 0:132: 'component' : not supported with this profile: es
+ERROR: 0:136: 'gl_MaxGeometryVaryingComponents' : undeclared identifier
+ERROR: 0:137: 'gl_VerticesIn' : undeclared identifier
+ERROR: 0:142: 'gl_PointSize' : required extension not requested: Possible extensions include:
+GL_EXT_geometry_point_size
+GL_OES_geometry_point_size
+ERROR: 0:143: 'gl_PointSize' : required extension not requested: Possible extensions include:
+GL_EXT_geometry_point_size
+GL_OES_geometry_point_size
+ERROR: 37 compilation errors. No code generated.
+
+
+Shader version: 310
+Requested GL_EXT_geometry_shader
+Requested GL_EXT_shader_io_blocks
+Requested GL_OES_geometry_point_size
+invocations = 4
+max_vertices = 200
+input primitive = lines_adjacency
+output primitive = triangle_strip
+ERROR: node is still EOpNull!
+0:39 Function Definition: main( (global void)
+0:39 Function Parameters:
+0:41 Sequence
+0:41 EmitVertex (global void)
+0:42 EndPrimitive (global void)
+0:43 Constant:
+0:43 0.000000
+0:44 Constant:
+0:44 0.000000
+0:46 move second child to first child (temp mediump 3-component vector of float)
+0:46 color: direct index for structure (layout(stream=0 ) out mediump 3-component vector of float)
+0:46 'anon@0' (layout(stream=0 ) out block{layout(stream=0 ) out mediump 3-component vector of float color})
+0:46 Constant:
+0:46 0 (const uint)
+0:46 color: direct index for structure (in mediump 3-component vector of float)
+0:46 direct index (temp block{in mediump 3-component vector of float color})
+0:46 'fromV' (in 4-element array of block{in mediump 3-component vector of float color})
+0:46 Constant:
+0:46 0 (const int)
+0:46 Constant:
+0:46 0 (const int)
+0:47 move second child to first child (temp float)
+0:47 Constant:
+0:47 0.000000
+0:48 Constant:
+0:48 0.000000
+0:49 move second child to first child (temp highp 4-component vector of float)
+0:49 gl_Position: direct index for structure (layout(stream=0 ) gl_Position highp 4-component vector of float Position)
+0:49 'anon@1' (layout(stream=0 ) out block{layout(stream=0 ) gl_Position highp 4-component vector of float Position gl_Position, layout(stream=0 ) gl_PointSize highp float PointSize gl_PointSize})
+0:49 Constant:
+0:49 0 (const uint)
+0:49 gl_Position: direct index for structure (in highp 4-component vector of float Position)
+0:49 direct index (temp block{in highp 4-component vector of float Position gl_Position, in highp float PointSize gl_PointSize})
+0:49 'gl_in' (in 4-element array of block{in highp 4-component vector of float Position gl_Position, in highp float PointSize gl_PointSize})
+0:49 Constant:
+0:49 0 (const int)
+0:49 Constant:
+0:49 0 (const int)
+0:51 move second child to first child (temp highp int)
+0:51 'gl_PrimitiveID' (layout(stream=0 ) out highp int PrimitiveID)
+0:51 'gl_PrimitiveIDIn' (in highp int PrimitiveID)
+0:52 move second child to first child (temp highp int)
+0:52 'gl_Layer' (layout(stream=0 ) out highp int Layer)
+0:52 Constant:
+0:52 2 (const int)
+0:63 Function Definition: foo(i1; (global void)
+0:63 Function Parameters:
+0:63 'a' (in highp int)
+0:65 Sequence
+0:65 move second child to first child (temp mediump 4-component vector of float)
+0:65 a: direct index for structure (layout(stream=0 ) out mediump 4-component vector of float)
+0:65 'ouuaa6' (layout(stream=0 ) out block{layout(stream=0 ) out mediump 4-component vector of float a})
+0:65 Constant:
+0:65 0 (const int)
+0:65 Constant:
+0:65 1.000000
+0:65 1.000000
+0:65 1.000000
+0:65 1.000000
+0:114 Function Definition: fooe1( (global void)
+0:114 Function Parameters:
+0:116 Sequence
+0:116 'gl_ViewportIndex' (temp float)
+0:117 'gl_MaxViewports' (temp float)
+0:118 Constant:
+0:118 4 (const int)
+0:119 Sequence
+0:119 move second child to first child (temp highp int)
+0:119 'inv' (temp highp int)
+0:119 'gl_InvocationID' (in highp int InvocationID)
+0:134 Function Definition: notHere( (global void)
+0:134 Function Parameters:
+0:136 Sequence
+0:136 'gl_MaxGeometryVaryingComponents' (temp float)
+0:137 'gl_VerticesIn' (temp float)
+0:140 Function Definition: pointSize1( (global void)
+0:140 Function Parameters:
+0:142 Sequence
+0:142 Sequence
+0:142 move second child to first child (temp highp float)
+0:142 'ps' (temp highp float)
+0:142 gl_PointSize: direct index for structure (in highp float PointSize)
+0:142 direct index (temp block{in highp 4-component vector of float Position gl_Position, in highp float PointSize gl_PointSize})
+0:142 'gl_in' (in 4-element array of block{in highp 4-component vector of float Position gl_Position, in highp float PointSize gl_PointSize})
+0:142 Constant:
+0:142 3 (const int)
+0:142 Constant:
+0:142 1 (const int)
+0:143 move second child to first child (temp highp float)
+0:143 gl_PointSize: direct index for structure (layout(stream=0 ) gl_PointSize highp float PointSize)
+0:143 'anon@1' (layout(stream=0 ) out block{layout(stream=0 ) gl_Position highp 4-component vector of float Position gl_Position, layout(stream=0 ) gl_PointSize highp float PointSize gl_PointSize})
+0:143 Constant:
+0:143 1 (const uint)
+0:143 'ps' (temp highp float)
+0:148 Function Definition: pointSize2( (global void)
+0:148 Function Parameters:
+0:150 Sequence
+0:150 Sequence
+0:150 move second child to first child (temp highp float)
+0:150 'ps' (temp highp float)
+0:150 gl_PointSize: direct index for structure (in highp float PointSize)
+0:150 direct index (temp block{in highp 4-component vector of float Position gl_Position, in highp float PointSize gl_PointSize})
+0:150 'gl_in' (in 4-element array of block{in highp 4-component vector of float Position gl_Position, in highp float PointSize gl_PointSize})
+0:150 Constant:
+0:150 3 (const int)
+0:150 Constant:
+0:150 1 (const int)
+0:151 move second child to first child (temp highp float)
+0:151 gl_PointSize: direct index for structure (layout(stream=0 ) gl_PointSize highp float PointSize)
+0:151 'anon@1' (layout(stream=0 ) out block{layout(stream=0 ) gl_Position highp 4-component vector of float Position gl_Position, layout(stream=0 ) gl_PointSize highp float PointSize gl_PointSize})
+0:151 Constant:
+0:151 1 (const uint)
+0:151 'ps' (temp highp float)
+0:? Linker Objects
+0:? 'fromV' (in 4-element array of block{in mediump 3-component vector of float color})
+0:? 'nonBlockUnsized' (in 4-element array of mediump 4-component vector of float)
+0:? 'toF' (layout(stream=0 ) out block{layout(stream=0 ) out mediump 3-component vector of float color})
+0:? 'anon@0' (layout(stream=0 ) out block{layout(stream=0 ) out mediump 3-component vector of float color})
+0:? 'gl_in' (in 4-element array of block{in highp 4-component vector of float Position gl_Position, in highp float PointSize gl_PointSize})
+0:? 'ov4' (layout(stream=4 ) out mediump 4-component vector of float)
+0:? 'ouuaa6' (layout(stream=0 ) out block{layout(stream=0 ) out mediump 4-component vector of float a})
+0:? 'badv4' (layout(stream=0 ) out mediump 4-component vector of float)
+0:? 'bad2v4' (in 4-element array of mediump 4-component vector of float)
+0:? 'anon@1' (layout(stream=0 ) out block{layout(stream=0 ) out highp int a})
+0:? 'outbi' (layout(stream=0 ) out block{layout(stream=0 ) out highp int a, layout(stream=0 ) out highp int b, layout(stream=0 ) out highp int c})
+0:? 'insn' (in 4-element array of block{in highp int a15})
+0:? 'anon@2' (layout(stream=0 ) out block{layout(stream=0 ) out mediump float f15})
+0:? 'anon@3' (layout(column_major shared ) uniform block{layout(column_major shared ) uniform bool b15})
+0:? 'summ' (const highp int)
+0:? 2752 (const int)
+0:? 'explArray' (in 4-element array of mediump 4-component vector of float)
+0:? 'explArrayBad' (in 5-element array of mediump 4-component vector of float)
+0:? 'nonArrayed' (in mediump 4-component vector of float)
+0:? 'myColor1' (layout(stream=0 ) flat out mediump 3-component vector of float)
+0:? 'myColor2' (layout(stream=0 ) centroid out mediump 3-component vector of float)
+0:? 'centr' (centroid in 4-element array of mediump 3-component vector of float)
+0:? 'perSampleColor' (layout(stream=0 ) sample out mediump 4-component vector of float)
+0:? 'comp' (layout(location=7 component=2 ) in 4-element array of mediump float)
+
+
+Linked geometry stage:
+
+
+Shader version: 310
+Requested GL_EXT_geometry_shader
+Requested GL_EXT_shader_io_blocks
+Requested GL_OES_geometry_point_size
+invocations = 4
+max_vertices = 200
+input primitive = lines_adjacency
+output primitive = triangle_strip
+ERROR: node is still EOpNull!
+0:39 Function Definition: main( (global void)
+0:39 Function Parameters:
+0:41 Sequence
+0:41 EmitVertex (global void)
+0:42 EndPrimitive (global void)
+0:43 Constant:
+0:43 0.000000
+0:44 Constant:
+0:44 0.000000
+0:46 move second child to first child (temp mediump 3-component vector of float)
+0:46 color: direct index for structure (layout(stream=0 ) out mediump 3-component vector of float)
+0:46 'anon@0' (layout(stream=0 ) out block{layout(stream=0 ) out mediump 3-component vector of float color})
+0:46 Constant:
+0:46 0 (const uint)
+0:46 color: direct index for structure (in mediump 3-component vector of float)
+0:46 direct index (temp block{in mediump 3-component vector of float color})
+0:46 'fromV' (in 4-element array of block{in mediump 3-component vector of float color})
+0:46 Constant:
+0:46 0 (const int)
+0:46 Constant:
+0:46 0 (const int)
+0:47 move second child to first child (temp float)
+0:47 Constant:
+0:47 0.000000
+0:48 Constant:
+0:48 0.000000
+0:49 move second child to first child (temp highp 4-component vector of float)
+0:49 gl_Position: direct index for structure (layout(stream=0 ) gl_Position highp 4-component vector of float Position)
+0:49 'anon@1' (layout(stream=0 ) out block{layout(stream=0 ) gl_Position highp 4-component vector of float Position gl_Position, layout(stream=0 ) gl_PointSize highp float PointSize gl_PointSize})
+0:49 Constant:
+0:49 0 (const uint)
+0:49 gl_Position: direct index for structure (in highp 4-component vector of float Position)
+0:49 direct index (temp block{in highp 4-component vector of float Position gl_Position, in highp float PointSize gl_PointSize})
+0:49 'gl_in' (in 4-element array of block{in highp 4-component vector of float Position gl_Position, in highp float PointSize gl_PointSize})
+0:49 Constant:
+0:49 0 (const int)
+0:49 Constant:
+0:49 0 (const int)
+0:51 move second child to first child (temp highp int)
+0:51 'gl_PrimitiveID' (layout(stream=0 ) out highp int PrimitiveID)
+0:51 'gl_PrimitiveIDIn' (in highp int PrimitiveID)
+0:52 move second child to first child (temp highp int)
+0:52 'gl_Layer' (layout(stream=0 ) out highp int Layer)
+0:52 Constant:
+0:52 2 (const int)
+0:63 Function Definition: foo(i1; (global void)
+0:63 Function Parameters:
+0:63 'a' (in highp int)
+0:65 Sequence
+0:65 move second child to first child (temp mediump 4-component vector of float)
+0:65 a: direct index for structure (layout(stream=0 ) out mediump 4-component vector of float)
+0:65 'ouuaa6' (layout(stream=0 ) out block{layout(stream=0 ) out mediump 4-component vector of float a})
+0:65 Constant:
+0:65 0 (const int)
+0:65 Constant:
+0:65 1.000000
+0:65 1.000000
+0:65 1.000000
+0:65 1.000000
+0:114 Function Definition: fooe1( (global void)
+0:114 Function Parameters:
+0:116 Sequence
+0:116 'gl_ViewportIndex' (temp float)
+0:117 'gl_MaxViewports' (temp float)
+0:118 Constant:
+0:118 4 (const int)
+0:119 Sequence
+0:119 move second child to first child (temp highp int)
+0:119 'inv' (temp highp int)
+0:119 'gl_InvocationID' (in highp int InvocationID)
+0:134 Function Definition: notHere( (global void)
+0:134 Function Parameters:
+0:136 Sequence
+0:136 'gl_MaxGeometryVaryingComponents' (temp float)
+0:137 'gl_VerticesIn' (temp float)
+0:140 Function Definition: pointSize1( (global void)
+0:140 Function Parameters:
+0:142 Sequence
+0:142 Sequence
+0:142 move second child to first child (temp highp float)
+0:142 'ps' (temp highp float)
+0:142 gl_PointSize: direct index for structure (in highp float PointSize)
+0:142 direct index (temp block{in highp 4-component vector of float Position gl_Position, in highp float PointSize gl_PointSize})
+0:142 'gl_in' (in 4-element array of block{in highp 4-component vector of float Position gl_Position, in highp float PointSize gl_PointSize})
+0:142 Constant:
+0:142 3 (const int)
+0:142 Constant:
+0:142 1 (const int)
+0:143 move second child to first child (temp highp float)
+0:143 gl_PointSize: direct index for structure (layout(stream=0 ) gl_PointSize highp float PointSize)
+0:143 'anon@1' (layout(stream=0 ) out block{layout(stream=0 ) gl_Position highp 4-component vector of float Position gl_Position, layout(stream=0 ) gl_PointSize highp float PointSize gl_PointSize})
+0:143 Constant:
+0:143 1 (const uint)
+0:143 'ps' (temp highp float)
+0:148 Function Definition: pointSize2( (global void)
+0:148 Function Parameters:
+0:150 Sequence
+0:150 Sequence
+0:150 move second child to first child (temp highp float)
+0:150 'ps' (temp highp float)
+0:150 gl_PointSize: direct index for structure (in highp float PointSize)
+0:150 direct index (temp block{in highp 4-component vector of float Position gl_Position, in highp float PointSize gl_PointSize})
+0:150 'gl_in' (in 4-element array of block{in highp 4-component vector of float Position gl_Position, in highp float PointSize gl_PointSize})
+0:150 Constant:
+0:150 3 (const int)
+0:150 Constant:
+0:150 1 (const int)
+0:151 move second child to first child (temp highp float)
+0:151 gl_PointSize: direct index for structure (layout(stream=0 ) gl_PointSize highp float PointSize)
+0:151 'anon@1' (layout(stream=0 ) out block{layout(stream=0 ) gl_Position highp 4-component vector of float Position gl_Position, layout(stream=0 ) gl_PointSize highp float PointSize gl_PointSize})
+0:151 Constant:
+0:151 1 (const uint)
+0:151 'ps' (temp highp float)
+0:? Linker Objects
+0:? 'fromV' (in 4-element array of block{in mediump 3-component vector of float color})
+0:? 'nonBlockUnsized' (in 4-element array of mediump 4-component vector of float)
+0:? 'toF' (layout(stream=0 ) out block{layout(stream=0 ) out mediump 3-component vector of float color})
+0:? 'anon@0' (layout(stream=0 ) out block{layout(stream=0 ) out mediump 3-component vector of float color})
+0:? 'gl_in' (in 4-element array of block{in highp 4-component vector of float Position gl_Position, in highp float PointSize gl_PointSize})
+0:? 'ov4' (layout(stream=4 ) out mediump 4-component vector of float)
+0:? 'ouuaa6' (layout(stream=0 ) out block{layout(stream=0 ) out mediump 4-component vector of float a})
+0:? 'badv4' (layout(stream=0 ) out mediump 4-component vector of float)
+0:? 'bad2v4' (in 4-element array of mediump 4-component vector of float)
+0:? 'anon@1' (layout(stream=0 ) out block{layout(stream=0 ) out highp int a})
+0:? 'outbi' (layout(stream=0 ) out block{layout(stream=0 ) out highp int a, layout(stream=0 ) out highp int b, layout(stream=0 ) out highp int c})
+0:? 'insn' (in 4-element array of block{in highp int a15})
+0:? 'anon@2' (layout(stream=0 ) out block{layout(stream=0 ) out mediump float f15})
+0:? 'anon@3' (layout(column_major shared ) uniform block{layout(column_major shared ) uniform bool b15})
+0:? 'summ' (const highp int)
+0:? 2752 (const int)
+0:? 'explArray' (in 4-element array of mediump 4-component vector of float)
+0:? 'explArrayBad' (in 5-element array of mediump 4-component vector of float)
+0:? 'nonArrayed' (in mediump 4-component vector of float)
+0:? 'myColor1' (layout(stream=0 ) flat out mediump 3-component vector of float)
+0:? 'myColor2' (layout(stream=0 ) centroid out mediump 3-component vector of float)
+0:? 'centr' (centroid in 4-element array of mediump 3-component vector of float)
+0:? 'perSampleColor' (layout(stream=0 ) sample out mediump 4-component vector of float)
+0:? 'comp' (layout(location=7 component=2 ) in 4-element array of mediump float)
+
diff --git a/chromium/third_party/glslang/src/Test/baseResults/310.tesc.out b/chromium/third_party/glslang/src/Test/baseResults/310.tesc.out
new file mode 100644
index 00000000000..24e3d209594
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/310.tesc.out
@@ -0,0 +1,709 @@
+310.tesc
+Warning, version 310 is not yet complete; most version-specific features are present, but some are missing.
+ERROR: 0:8: 'quads' : unrecognized layout identifier, or qualifier requires assignment (e.g., binding = 4)
+ERROR: 0:9: 'ccw' : unrecognized layout identifier, or qualifier requires assignment (e.g., binding = 4)
+ERROR: 0:10: 'fractional_even_spacing' : unrecognized layout identifier, or qualifier requires assignment (e.g., binding = 4)
+ERROR: 0:12: 'patch' : can only use on output in tessellation-control shader
+ERROR: 0:26: 'gl_PointSize' : required extension not requested: Possible extensions include:
+GL_EXT_tessellation_point_size
+GL_OES_tessellation_point_size
+ERROR: 0:27: 'gl_ClipDistance' : no such field in structure
+ERROR: 0:27: 'expression' : left of '[' is not of type array, matrix, or vector
+ERROR: 0:34: 'gl_PointSize' : required extension not requested: Possible extensions include:
+GL_EXT_tessellation_point_size
+GL_OES_tessellation_point_size
+ERROR: 0:35: 'gl_ClipDistance' : no such field in structure
+ERROR: 0:35: 'expression' : left of '[' is not of type array, matrix, or vector
+ERROR: 0:35: 'assign' : l-value required (can't modify a const)
+ERROR: 0:41: '' : tessellation control barrier() cannot be placed within flow control
+ERROR: 0:43: '' : tessellation control barrier() cannot be placed within flow control
+ERROR: 0:48: '' : tessellation control barrier() cannot be placed within flow control
+ERROR: 0:53: '' : tessellation control barrier() cannot be placed within flow control
+ERROR: 0:56: '' : tessellation control barrier() cannot be placed within flow control
+ERROR: 0:63: '' : tessellation control barrier() cannot be placed after a return from main()
+ERROR: 0:66: 'vertices' : can only apply to 'out'
+ERROR: 0:67: 'vertices' : cannot change previously set layout value
+ERROR: 0:71: '[' : array index out of range '4'
+ERROR: 0:73: '' : tessellation control barrier() must be in main()
+ERROR: 0:76: 'in' : type must be an array: ina
+ERROR: 0:78: '[]' : tessellation input array size must be gl_MaxPatchVertices or implicitly sized
+ERROR: 0:80: '' : array size required
+ERROR: 0:86: 'location' : overlapping use of location 4
+ERROR: 0:90: 'location' : overlapping use of location 4
+ERROR: 0:94: 'precise' : Reserved word.
+ERROR: 0:94: 'precise' : not supported for this version or the enabled extensions
+ERROR: 0:95: 'fma' : required extension not requested: Possible extensions include:
+GL_EXT_gpu_shader5
+GL_OES_gpu_shader5
+ERROR: 0:104: 'sample' : Reserved word.
+ERROR: 0:106: 'vertices' : can only apply to a standalone qualifier
+ERROR: 0:107: 'vertices' : inconsistent output number of vertices for array size of misSized
+ERROR: 0:133: 'gl_BoundingBoxOES' : required extension not requested: Possible extensions include:
+GL_EXT_primitive_bounding_box
+GL_OES_primitive_bounding_box
+ERROR: 0:142: '[' : array index out of range '2'
+ERROR: 0:145: '' : array size required
+ERROR: 0:161: '[]' : tessellation-control per-vertex output l-value must be indexed with gl_InvocationID
+ERROR: 0:162: '[]' : tessellation-control per-vertex output l-value must be indexed with gl_InvocationID
+ERROR: 0:165: '[]' : tessellation-control per-vertex output l-value must be indexed with gl_InvocationID
+ERROR: 38 compilation errors. No code generated.
+
+
+Shader version: 310
+Requested GL_ARB_separate_shader_objects
+Requested GL_OES_gpu_shader5
+Requested GL_OES_primitive_bounding_box
+Requested GL_OES_shader_io_blocks
+Requested GL_OES_tessellation_point_size
+Requested GL_OES_tessellation_shader
+vertices = 4
+ERROR: node is still EOpNull!
+0:15 Function Definition: main( (global void)
+0:15 Function Parameters:
+0:17 Sequence
+0:17 Barrier (global void)
+0:19 Sequence
+0:19 move second child to first child (temp highp int)
+0:19 'a' (temp highp int)
+0:19 Constant:
+0:19 5392 (const int)
+0:25 Sequence
+0:25 move second child to first child (temp highp 4-component vector of float)
+0:25 'p' (temp highp 4-component vector of float)
+0:25 gl_Position: direct index for structure (in highp 4-component vector of float Position)
+0:25 direct index (temp block{in highp 4-component vector of float Position gl_Position, in highp float PointSize gl_PointSize})
+0:25 'gl_in' (in 32-element array of block{in highp 4-component vector of float Position gl_Position, in highp float PointSize gl_PointSize})
+0:25 Constant:
+0:25 1 (const int)
+0:25 Constant:
+0:25 0 (const int)
+0:26 Sequence
+0:26 move second child to first child (temp highp float)
+0:26 'ps' (temp highp float)
+0:26 gl_PointSize: direct index for structure (in highp float PointSize)
+0:26 direct index (temp block{in highp 4-component vector of float Position gl_Position, in highp float PointSize gl_PointSize})
+0:26 'gl_in' (in 32-element array of block{in highp 4-component vector of float Position gl_Position, in highp float PointSize gl_PointSize})
+0:26 Constant:
+0:26 1 (const int)
+0:26 Constant:
+0:26 1 (const int)
+0:27 Sequence
+0:27 move second child to first child (temp highp float)
+0:27 'cd' (temp highp float)
+0:27 Constant:
+0:27 0.000000
+0:29 Sequence
+0:29 move second child to first child (temp highp int)
+0:29 'pvi' (temp highp int)
+0:29 'gl_PatchVerticesIn' (in highp int PatchVertices)
+0:30 Sequence
+0:30 move second child to first child (temp highp int)
+0:30 'pid' (temp highp int)
+0:30 'gl_PrimitiveID' (in highp int PrimitiveID)
+0:31 Sequence
+0:31 move second child to first child (temp highp int)
+0:31 'iid' (temp highp int)
+0:31 'gl_InvocationID' (in highp int InvocationID)
+0:33 move second child to first child (temp highp 4-component vector of float)
+0:33 gl_Position: direct index for structure (out highp 4-component vector of float Position)
+0:33 indirect index (temp block{out highp 4-component vector of float Position gl_Position, out highp float PointSize gl_PointSize})
+0:33 'gl_out' (out 4-element array of block{out highp 4-component vector of float Position gl_Position, out highp float PointSize gl_PointSize})
+0:33 'gl_InvocationID' (in highp int InvocationID)
+0:33 Constant:
+0:33 0 (const int)
+0:33 'p' (temp highp 4-component vector of float)
+0:34 move second child to first child (temp highp float)
+0:34 gl_PointSize: direct index for structure (out highp float PointSize)
+0:34 indirect index (temp block{out highp 4-component vector of float Position gl_Position, out highp float PointSize gl_PointSize})
+0:34 'gl_out' (out 4-element array of block{out highp 4-component vector of float Position gl_Position, out highp float PointSize gl_PointSize})
+0:34 'gl_InvocationID' (in highp int InvocationID)
+0:34 Constant:
+0:34 1 (const int)
+0:34 'ps' (temp highp float)
+0:35 move second child to first child (temp highp float)
+0:35 Constant:
+0:35 0.000000
+0:35 'cd' (temp highp float)
+0:37 move second child to first child (temp highp float)
+0:37 direct index (patch temp highp float TessLevelOuter)
+0:37 'gl_TessLevelOuter' (patch out 4-element array of highp float TessLevelOuter)
+0:37 Constant:
+0:37 3 (const int)
+0:37 Constant:
+0:37 3.200000
+0:38 move second child to first child (temp highp float)
+0:38 direct index (patch temp highp float TessLevelInner)
+0:38 'gl_TessLevelInner' (patch out 2-element array of highp float TessLevelInner)
+0:38 Constant:
+0:38 1 (const int)
+0:38 Constant:
+0:38 1.300000
+0:40 Test condition and select (temp void)
+0:40 Condition
+0:40 Compare Greater Than (temp bool)
+0:40 'a' (temp highp int)
+0:40 Constant:
+0:40 10 (const int)
+0:40 true case
+0:41 Barrier (global void)
+0:40 false case
+0:43 Barrier (global void)
+0:45 Barrier (global void)
+0:49 Loop with condition not tested first
+0:49 Loop Condition
+0:49 Compare Greater Than (temp bool)
+0:49 'a' (temp highp int)
+0:49 Constant:
+0:49 10 (const int)
+0:49 Loop Body
+0:48 Sequence
+0:48 Barrier (global void)
+0:51 switch
+0:51 condition
+0:51 'a' (temp highp int)
+0:51 body
+0:51 Sequence
+0:52 default:
+0:? Sequence
+0:53 Barrier (global void)
+0:54 Branch: Break
+0:56 Test condition and select (temp highp int)
+0:56 Condition
+0:56 Compare Less Than (temp bool)
+0:56 'a' (temp highp int)
+0:56 Constant:
+0:56 12 (const int)
+0:56 true case
+0:56 'a' (temp highp int)
+0:56 false case
+0:56 Comma (temp highp int)
+0:56 Barrier (global void)
+0:56 'a' (temp highp int)
+0:58 Sequence
+0:58 Barrier (global void)
+0:61 Branch: Return
+0:63 Barrier (global void)
+0:69 Function Definition: foo( (global void)
+0:69 Function Parameters:
+0:71 Sequence
+0:71 gl_Position: direct index for structure (out highp 4-component vector of float Position)
+0:71 direct index (temp block{out highp 4-component vector of float Position gl_Position, out highp float PointSize gl_PointSize})
+0:71 'gl_out' (out 4-element array of block{out highp 4-component vector of float Position gl_Position, out highp float PointSize gl_PointSize})
+0:71 Constant:
+0:71 4 (const int)
+0:71 Constant:
+0:71 0 (const int)
+0:73 Barrier (global void)
+0:92 Function Definition: foop( (global void)
+0:92 Function Parameters:
+0:? Sequence
+0:95 move second child to first child (temp highp float)
+0:95 'd' (noContraction temp highp float)
+0:95 fma (global highp float)
+0:95 'd' (noContraction temp highp float)
+0:95 'd' (noContraction temp highp float)
+0:95 'd' (noContraction temp highp float)
+0:112 Function Definition: pointSize2( (global void)
+0:112 Function Parameters:
+0:114 Sequence
+0:114 Sequence
+0:114 move second child to first child (temp highp float)
+0:114 'ps' (temp highp float)
+0:114 gl_PointSize: direct index for structure (in highp float PointSize)
+0:114 direct index (temp block{in highp 4-component vector of float Position gl_Position, in highp float PointSize gl_PointSize})
+0:114 'gl_in' (in 32-element array of block{in highp 4-component vector of float Position gl_Position, in highp float PointSize gl_PointSize})
+0:114 Constant:
+0:114 1 (const int)
+0:114 Constant:
+0:114 1 (const int)
+0:115 move second child to first child (temp highp float)
+0:115 gl_PointSize: direct index for structure (out highp float PointSize)
+0:115 indirect index (temp block{out highp 4-component vector of float Position gl_Position, out highp float PointSize gl_PointSize})
+0:115 'gl_out' (out 4-element array of block{out highp 4-component vector of float Position gl_Position, out highp float PointSize gl_PointSize})
+0:115 'gl_InvocationID' (in highp int InvocationID)
+0:115 Constant:
+0:115 1 (const int)
+0:115 'ps' (temp highp float)
+0:122 Function Definition: goodfoop( (global void)
+0:122 Function Parameters:
+0:? Sequence
+0:126 multiply second child into first child (temp highp 3-component vector of float)
+0:126 'pv3' (noContraction temp highp 3-component vector of float)
+0:126 'pv3' (noContraction temp highp 3-component vector of float)
+0:127 move second child to first child (temp highp 3-component vector of float)
+0:127 'pv3' (noContraction temp highp 3-component vector of float)
+0:127 fma (global highp 3-component vector of float)
+0:127 'pv3' (noContraction temp highp 3-component vector of float)
+0:127 'pv3' (noContraction temp highp 3-component vector of float)
+0:127 'pv3' (noContraction temp highp 3-component vector of float)
+0:128 move second child to first child (temp highp float)
+0:128 'd' (noContraction temp highp float)
+0:128 fma (global highp float)
+0:128 'd' (noContraction temp highp float)
+0:128 'd' (noContraction temp highp float)
+0:128 'd' (noContraction temp highp float)
+0:131 Function Definition: bbBad( (global void)
+0:131 Function Parameters:
+0:133 Sequence
+0:133 'gl_BoundingBoxOES' (patch out 2-element array of highp 4-component vector of float BoundingBox)
+0:138 Function Definition: bb( (global void)
+0:138 Function Parameters:
+0:140 Sequence
+0:140 move second child to first child (temp highp 4-component vector of float)
+0:140 direct index (patch temp highp 4-component vector of float BoundingBox)
+0:140 'gl_BoundingBoxOES' (patch out 2-element array of highp 4-component vector of float BoundingBox)
+0:140 Constant:
+0:140 0 (const int)
+0:140 Constant:
+0:140 0.000000
+0:140 0.000000
+0:140 0.000000
+0:140 0.000000
+0:141 move second child to first child (temp highp 4-component vector of float)
+0:141 direct index (patch temp highp 4-component vector of float BoundingBox)
+0:141 'gl_BoundingBoxOES' (patch out 2-element array of highp 4-component vector of float BoundingBox)
+0:141 Constant:
+0:141 1 (const int)
+0:141 Constant:
+0:141 1.000000
+0:141 1.000000
+0:141 1.000000
+0:141 1.000000
+0:142 move second child to first child (temp highp 4-component vector of float)
+0:142 direct index (patch temp highp 4-component vector of float BoundingBox)
+0:142 'gl_BoundingBoxOES' (patch out 2-element array of highp 4-component vector of float BoundingBox)
+0:142 Constant:
+0:142 2 (const int)
+0:142 Constant:
+0:142 2.000000
+0:142 2.000000
+0:142 2.000000
+0:142 2.000000
+0:153 Function Definition: outputtingOutparam(i1; (global void)
+0:153 Function Parameters:
+0:153 'a' (out highp int)
+0:155 Sequence
+0:155 move second child to first child (temp highp int)
+0:155 'a' (out highp int)
+0:155 Constant:
+0:155 2 (const int)
+0:158 Function Definition: outputting( (global void)
+0:158 Function Parameters:
+0:160 Sequence
+0:160 move second child to first child (temp highp int)
+0:160 indirect index (temp highp int)
+0:160 'outa' (out 4-element array of highp int)
+0:160 'gl_InvocationID' (in highp int InvocationID)
+0:160 Constant:
+0:160 2 (const int)
+0:161 move second child to first child (temp highp int)
+0:161 direct index (temp highp int)
+0:161 'outa' (out 4-element array of highp int)
+0:161 Constant:
+0:161 1 (const int)
+0:161 Constant:
+0:161 2 (const int)
+0:162 move second child to first child (temp highp 4-component vector of float)
+0:162 gl_Position: direct index for structure (out highp 4-component vector of float Position)
+0:162 direct index (temp block{out highp 4-component vector of float Position gl_Position, out highp float PointSize gl_PointSize})
+0:162 'gl_out' (out 4-element array of block{out highp 4-component vector of float Position gl_Position, out highp float PointSize gl_PointSize})
+0:162 Constant:
+0:162 0 (const int)
+0:162 Constant:
+0:162 0 (const int)
+0:162 Constant:
+0:162 1.000000
+0:162 1.000000
+0:162 1.000000
+0:162 1.000000
+0:163 direct index (temp highp int)
+0:163 'outa' (out 4-element array of highp int)
+0:163 Constant:
+0:163 1 (const int)
+0:164 direct index (temp block{out highp 4-component vector of float Position gl_Position, out highp float PointSize gl_PointSize})
+0:164 'gl_out' (out 4-element array of block{out highp 4-component vector of float Position gl_Position, out highp float PointSize gl_PointSize})
+0:164 Constant:
+0:164 0 (const int)
+0:165 Function Call: outputtingOutparam(i1; (global void)
+0:165 direct index (temp highp int)
+0:165 'outa' (out 4-element array of highp int)
+0:165 Constant:
+0:165 0 (const int)
+0:166 Function Call: outputtingOutparam(i1; (global void)
+0:166 indirect index (temp highp int)
+0:166 'outa' (out 4-element array of highp int)
+0:166 'gl_InvocationID' (in highp int InvocationID)
+0:167 move second child to first child (temp highp float)
+0:167 f: direct index for structure (out highp float)
+0:167 direct index (patch temp block{out highp float f})
+0:167 'patchIName' (patch out 4-element array of block{out highp float f})
+0:167 Constant:
+0:167 1 (const int)
+0:167 Constant:
+0:167 0 (const int)
+0:167 Constant:
+0:167 3.140000
+0:168 move second child to first child (temp highp int)
+0:168 indirect index (temp highp int)
+0:168 'outa' (out 4-element array of highp int)
+0:168 'gl_InvocationID' (in highp int InvocationID)
+0:168 Constant:
+0:168 2 (const int)
+0:? Linker Objects
+0:? 'gl_out' (out 4-element array of block{out highp 4-component vector of float Position gl_Position, out highp float PointSize gl_PointSize})
+0:? 'outa' (out 4-element array of highp int)
+0:? 'patchIn' (patch in highp 4-component vector of float)
+0:? 'patchOut' (patch out highp 4-component vector of float)
+0:? 'ina' (in highp 2-component vector of float)
+0:? 'inb' (in 32-element array of highp 2-component vector of float)
+0:? 'inc' (in 32-element array of highp 2-component vector of float)
+0:? 'ind' (in 32-element array of highp 2-component vector of float)
+0:? 'implA' (patch out implicitly-sized array of highp float)
+0:? 'ivla' (layout(location=3 ) in 32-element array of highp 4-component vector of float)
+0:? 'ivlb' (layout(location=4 ) in 32-element array of highp 4-component vector of float)
+0:? 'ivlc' (layout(location=4 ) in 32-element array of highp 4-component vector of float)
+0:? 'ovla' (layout(location=3 ) out 4-element array of highp 4-component vector of float)
+0:? 'ovlb' (layout(location=4 ) out 4-element array of highp 4-component vector of float)
+0:? 'ovlc' (layout(location=4 ) out 4-element array of highp 4-component vector of float)
+0:? 'pinbi' (patch out block{out highp int a})
+0:? 'myColor2' (centroid out 4-element array of highp 3-component vector of float)
+0:? 'centr' (centroid in 32-element array of highp 3-component vector of float)
+0:? 'perSampleColor' (sample out 4-element array of highp 4-component vector of float)
+0:? 'badlay' (out 4-element array of highp float)
+0:? 'misSized' (out 5-element array of highp float)
+0:? 'okaySize' (out 4-element array of highp float)
+0:? 'pv3' (noContraction temp highp 3-component vector of float)
+0:? 'badpatchIName' (patch out implicitly-sized array of block{out highp float f})
+0:? 'patchIName' (patch out 4-element array of block{out highp float f})
+
+
+Linked tessellation control stage:
+
+
+Shader version: 310
+Requested GL_ARB_separate_shader_objects
+Requested GL_OES_gpu_shader5
+Requested GL_OES_primitive_bounding_box
+Requested GL_OES_shader_io_blocks
+Requested GL_OES_tessellation_point_size
+Requested GL_OES_tessellation_shader
+vertices = 4
+ERROR: node is still EOpNull!
+0:15 Function Definition: main( (global void)
+0:15 Function Parameters:
+0:17 Sequence
+0:17 Barrier (global void)
+0:19 Sequence
+0:19 move second child to first child (temp highp int)
+0:19 'a' (temp highp int)
+0:19 Constant:
+0:19 5392 (const int)
+0:25 Sequence
+0:25 move second child to first child (temp highp 4-component vector of float)
+0:25 'p' (temp highp 4-component vector of float)
+0:25 gl_Position: direct index for structure (in highp 4-component vector of float Position)
+0:25 direct index (temp block{in highp 4-component vector of float Position gl_Position, in highp float PointSize gl_PointSize})
+0:25 'gl_in' (in 32-element array of block{in highp 4-component vector of float Position gl_Position, in highp float PointSize gl_PointSize})
+0:25 Constant:
+0:25 1 (const int)
+0:25 Constant:
+0:25 0 (const int)
+0:26 Sequence
+0:26 move second child to first child (temp highp float)
+0:26 'ps' (temp highp float)
+0:26 gl_PointSize: direct index for structure (in highp float PointSize)
+0:26 direct index (temp block{in highp 4-component vector of float Position gl_Position, in highp float PointSize gl_PointSize})
+0:26 'gl_in' (in 32-element array of block{in highp 4-component vector of float Position gl_Position, in highp float PointSize gl_PointSize})
+0:26 Constant:
+0:26 1 (const int)
+0:26 Constant:
+0:26 1 (const int)
+0:27 Sequence
+0:27 move second child to first child (temp highp float)
+0:27 'cd' (temp highp float)
+0:27 Constant:
+0:27 0.000000
+0:29 Sequence
+0:29 move second child to first child (temp highp int)
+0:29 'pvi' (temp highp int)
+0:29 'gl_PatchVerticesIn' (in highp int PatchVertices)
+0:30 Sequence
+0:30 move second child to first child (temp highp int)
+0:30 'pid' (temp highp int)
+0:30 'gl_PrimitiveID' (in highp int PrimitiveID)
+0:31 Sequence
+0:31 move second child to first child (temp highp int)
+0:31 'iid' (temp highp int)
+0:31 'gl_InvocationID' (in highp int InvocationID)
+0:33 move second child to first child (temp highp 4-component vector of float)
+0:33 gl_Position: direct index for structure (out highp 4-component vector of float Position)
+0:33 indirect index (temp block{out highp 4-component vector of float Position gl_Position, out highp float PointSize gl_PointSize})
+0:33 'gl_out' (out 4-element array of block{out highp 4-component vector of float Position gl_Position, out highp float PointSize gl_PointSize})
+0:33 'gl_InvocationID' (in highp int InvocationID)
+0:33 Constant:
+0:33 0 (const int)
+0:33 'p' (temp highp 4-component vector of float)
+0:34 move second child to first child (temp highp float)
+0:34 gl_PointSize: direct index for structure (out highp float PointSize)
+0:34 indirect index (temp block{out highp 4-component vector of float Position gl_Position, out highp float PointSize gl_PointSize})
+0:34 'gl_out' (out 4-element array of block{out highp 4-component vector of float Position gl_Position, out highp float PointSize gl_PointSize})
+0:34 'gl_InvocationID' (in highp int InvocationID)
+0:34 Constant:
+0:34 1 (const int)
+0:34 'ps' (temp highp float)
+0:35 move second child to first child (temp highp float)
+0:35 Constant:
+0:35 0.000000
+0:35 'cd' (temp highp float)
+0:37 move second child to first child (temp highp float)
+0:37 direct index (patch temp highp float TessLevelOuter)
+0:37 'gl_TessLevelOuter' (patch out 4-element array of highp float TessLevelOuter)
+0:37 Constant:
+0:37 3 (const int)
+0:37 Constant:
+0:37 3.200000
+0:38 move second child to first child (temp highp float)
+0:38 direct index (patch temp highp float TessLevelInner)
+0:38 'gl_TessLevelInner' (patch out 2-element array of highp float TessLevelInner)
+0:38 Constant:
+0:38 1 (const int)
+0:38 Constant:
+0:38 1.300000
+0:40 Test condition and select (temp void)
+0:40 Condition
+0:40 Compare Greater Than (temp bool)
+0:40 'a' (temp highp int)
+0:40 Constant:
+0:40 10 (const int)
+0:40 true case
+0:41 Barrier (global void)
+0:40 false case
+0:43 Barrier (global void)
+0:45 Barrier (global void)
+0:49 Loop with condition not tested first
+0:49 Loop Condition
+0:49 Compare Greater Than (temp bool)
+0:49 'a' (temp highp int)
+0:49 Constant:
+0:49 10 (const int)
+0:49 Loop Body
+0:48 Sequence
+0:48 Barrier (global void)
+0:51 switch
+0:51 condition
+0:51 'a' (temp highp int)
+0:51 body
+0:51 Sequence
+0:52 default:
+0:? Sequence
+0:53 Barrier (global void)
+0:54 Branch: Break
+0:56 Test condition and select (temp highp int)
+0:56 Condition
+0:56 Compare Less Than (temp bool)
+0:56 'a' (temp highp int)
+0:56 Constant:
+0:56 12 (const int)
+0:56 true case
+0:56 'a' (temp highp int)
+0:56 false case
+0:56 Comma (temp highp int)
+0:56 Barrier (global void)
+0:56 'a' (temp highp int)
+0:58 Sequence
+0:58 Barrier (global void)
+0:61 Branch: Return
+0:63 Barrier (global void)
+0:69 Function Definition: foo( (global void)
+0:69 Function Parameters:
+0:71 Sequence
+0:71 gl_Position: direct index for structure (out highp 4-component vector of float Position)
+0:71 direct index (temp block{out highp 4-component vector of float Position gl_Position, out highp float PointSize gl_PointSize})
+0:71 'gl_out' (out 4-element array of block{out highp 4-component vector of float Position gl_Position, out highp float PointSize gl_PointSize})
+0:71 Constant:
+0:71 4 (const int)
+0:71 Constant:
+0:71 0 (const int)
+0:73 Barrier (global void)
+0:92 Function Definition: foop( (global void)
+0:92 Function Parameters:
+0:? Sequence
+0:95 move second child to first child (temp highp float)
+0:95 'd' (noContraction temp highp float)
+0:95 fma (global highp float)
+0:95 'd' (noContraction temp highp float)
+0:95 'd' (noContraction temp highp float)
+0:95 'd' (noContraction temp highp float)
+0:112 Function Definition: pointSize2( (global void)
+0:112 Function Parameters:
+0:114 Sequence
+0:114 Sequence
+0:114 move second child to first child (temp highp float)
+0:114 'ps' (temp highp float)
+0:114 gl_PointSize: direct index for structure (in highp float PointSize)
+0:114 direct index (temp block{in highp 4-component vector of float Position gl_Position, in highp float PointSize gl_PointSize})
+0:114 'gl_in' (in 32-element array of block{in highp 4-component vector of float Position gl_Position, in highp float PointSize gl_PointSize})
+0:114 Constant:
+0:114 1 (const int)
+0:114 Constant:
+0:114 1 (const int)
+0:115 move second child to first child (temp highp float)
+0:115 gl_PointSize: direct index for structure (out highp float PointSize)
+0:115 indirect index (temp block{out highp 4-component vector of float Position gl_Position, out highp float PointSize gl_PointSize})
+0:115 'gl_out' (out 4-element array of block{out highp 4-component vector of float Position gl_Position, out highp float PointSize gl_PointSize})
+0:115 'gl_InvocationID' (in highp int InvocationID)
+0:115 Constant:
+0:115 1 (const int)
+0:115 'ps' (temp highp float)
+0:122 Function Definition: goodfoop( (global void)
+0:122 Function Parameters:
+0:? Sequence
+0:126 multiply second child into first child (temp highp 3-component vector of float)
+0:126 'pv3' (noContraction temp highp 3-component vector of float)
+0:126 'pv3' (noContraction temp highp 3-component vector of float)
+0:127 move second child to first child (temp highp 3-component vector of float)
+0:127 'pv3' (noContraction temp highp 3-component vector of float)
+0:127 fma (global highp 3-component vector of float)
+0:127 'pv3' (noContraction temp highp 3-component vector of float)
+0:127 'pv3' (noContraction temp highp 3-component vector of float)
+0:127 'pv3' (noContraction temp highp 3-component vector of float)
+0:128 move second child to first child (temp highp float)
+0:128 'd' (noContraction temp highp float)
+0:128 fma (global highp float)
+0:128 'd' (noContraction temp highp float)
+0:128 'd' (noContraction temp highp float)
+0:128 'd' (noContraction temp highp float)
+0:131 Function Definition: bbBad( (global void)
+0:131 Function Parameters:
+0:133 Sequence
+0:133 'gl_BoundingBoxOES' (patch out 2-element array of highp 4-component vector of float BoundingBox)
+0:138 Function Definition: bb( (global void)
+0:138 Function Parameters:
+0:140 Sequence
+0:140 move second child to first child (temp highp 4-component vector of float)
+0:140 direct index (patch temp highp 4-component vector of float BoundingBox)
+0:140 'gl_BoundingBoxOES' (patch out 2-element array of highp 4-component vector of float BoundingBox)
+0:140 Constant:
+0:140 0 (const int)
+0:140 Constant:
+0:140 0.000000
+0:140 0.000000
+0:140 0.000000
+0:140 0.000000
+0:141 move second child to first child (temp highp 4-component vector of float)
+0:141 direct index (patch temp highp 4-component vector of float BoundingBox)
+0:141 'gl_BoundingBoxOES' (patch out 2-element array of highp 4-component vector of float BoundingBox)
+0:141 Constant:
+0:141 1 (const int)
+0:141 Constant:
+0:141 1.000000
+0:141 1.000000
+0:141 1.000000
+0:141 1.000000
+0:142 move second child to first child (temp highp 4-component vector of float)
+0:142 direct index (patch temp highp 4-component vector of float BoundingBox)
+0:142 'gl_BoundingBoxOES' (patch out 2-element array of highp 4-component vector of float BoundingBox)
+0:142 Constant:
+0:142 2 (const int)
+0:142 Constant:
+0:142 2.000000
+0:142 2.000000
+0:142 2.000000
+0:142 2.000000
+0:153 Function Definition: outputtingOutparam(i1; (global void)
+0:153 Function Parameters:
+0:153 'a' (out highp int)
+0:155 Sequence
+0:155 move second child to first child (temp highp int)
+0:155 'a' (out highp int)
+0:155 Constant:
+0:155 2 (const int)
+0:158 Function Definition: outputting( (global void)
+0:158 Function Parameters:
+0:160 Sequence
+0:160 move second child to first child (temp highp int)
+0:160 indirect index (temp highp int)
+0:160 'outa' (out 4-element array of highp int)
+0:160 'gl_InvocationID' (in highp int InvocationID)
+0:160 Constant:
+0:160 2 (const int)
+0:161 move second child to first child (temp highp int)
+0:161 direct index (temp highp int)
+0:161 'outa' (out 4-element array of highp int)
+0:161 Constant:
+0:161 1 (const int)
+0:161 Constant:
+0:161 2 (const int)
+0:162 move second child to first child (temp highp 4-component vector of float)
+0:162 gl_Position: direct index for structure (out highp 4-component vector of float Position)
+0:162 direct index (temp block{out highp 4-component vector of float Position gl_Position, out highp float PointSize gl_PointSize})
+0:162 'gl_out' (out 4-element array of block{out highp 4-component vector of float Position gl_Position, out highp float PointSize gl_PointSize})
+0:162 Constant:
+0:162 0 (const int)
+0:162 Constant:
+0:162 0 (const int)
+0:162 Constant:
+0:162 1.000000
+0:162 1.000000
+0:162 1.000000
+0:162 1.000000
+0:163 direct index (temp highp int)
+0:163 'outa' (out 4-element array of highp int)
+0:163 Constant:
+0:163 1 (const int)
+0:164 direct index (temp block{out highp 4-component vector of float Position gl_Position, out highp float PointSize gl_PointSize})
+0:164 'gl_out' (out 4-element array of block{out highp 4-component vector of float Position gl_Position, out highp float PointSize gl_PointSize})
+0:164 Constant:
+0:164 0 (const int)
+0:165 Function Call: outputtingOutparam(i1; (global void)
+0:165 direct index (temp highp int)
+0:165 'outa' (out 4-element array of highp int)
+0:165 Constant:
+0:165 0 (const int)
+0:166 Function Call: outputtingOutparam(i1; (global void)
+0:166 indirect index (temp highp int)
+0:166 'outa' (out 4-element array of highp int)
+0:166 'gl_InvocationID' (in highp int InvocationID)
+0:167 move second child to first child (temp highp float)
+0:167 f: direct index for structure (out highp float)
+0:167 direct index (patch temp block{out highp float f})
+0:167 'patchIName' (patch out 4-element array of block{out highp float f})
+0:167 Constant:
+0:167 1 (const int)
+0:167 Constant:
+0:167 0 (const int)
+0:167 Constant:
+0:167 3.140000
+0:168 move second child to first child (temp highp int)
+0:168 indirect index (temp highp int)
+0:168 'outa' (out 4-element array of highp int)
+0:168 'gl_InvocationID' (in highp int InvocationID)
+0:168 Constant:
+0:168 2 (const int)
+0:? Linker Objects
+0:? 'gl_out' (out 4-element array of block{out highp 4-component vector of float Position gl_Position, out highp float PointSize gl_PointSize})
+0:? 'outa' (out 4-element array of highp int)
+0:? 'patchIn' (patch in highp 4-component vector of float)
+0:? 'patchOut' (patch out highp 4-component vector of float)
+0:? 'ina' (in highp 2-component vector of float)
+0:? 'inb' (in 32-element array of highp 2-component vector of float)
+0:? 'inc' (in 32-element array of highp 2-component vector of float)
+0:? 'ind' (in 32-element array of highp 2-component vector of float)
+0:? 'implA' (patch out 1-element array of highp float)
+0:? 'ivla' (layout(location=3 ) in 32-element array of highp 4-component vector of float)
+0:? 'ivlb' (layout(location=4 ) in 32-element array of highp 4-component vector of float)
+0:? 'ivlc' (layout(location=4 ) in 32-element array of highp 4-component vector of float)
+0:? 'ovla' (layout(location=3 ) out 4-element array of highp 4-component vector of float)
+0:? 'ovlb' (layout(location=4 ) out 4-element array of highp 4-component vector of float)
+0:? 'ovlc' (layout(location=4 ) out 4-element array of highp 4-component vector of float)
+0:? 'pinbi' (patch out block{out highp int a})
+0:? 'myColor2' (centroid out 4-element array of highp 3-component vector of float)
+0:? 'centr' (centroid in 32-element array of highp 3-component vector of float)
+0:? 'perSampleColor' (sample out 4-element array of highp 4-component vector of float)
+0:? 'badlay' (out 4-element array of highp float)
+0:? 'misSized' (out 5-element array of highp float)
+0:? 'okaySize' (out 4-element array of highp float)
+0:? 'pv3' (noContraction temp highp 3-component vector of float)
+0:? 'badpatchIName' (patch out 1-element array of block{out highp float f})
+0:? 'patchIName' (patch out 4-element array of block{out highp float f})
+
diff --git a/chromium/third_party/glslang/src/Test/baseResults/310.tese.out b/chromium/third_party/glslang/src/Test/baseResults/310.tese.out
new file mode 100644
index 00000000000..aacfedbd6ef
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/310.tese.out
@@ -0,0 +1,315 @@
+310.tese
+Warning, version 310 is not yet complete; most version-specific features are present, but some are missing.
+ERROR: 0:7: 'vertices' : there is no such layout identifier for this stage taking an assigned value
+ERROR: 0:9: 'triangles' : cannot change previously set input primitive
+ERROR: 0:10: 'isolines' : cannot change previously set input primitive
+ERROR: 0:12: 'ccw' : cannot change previously set vertex order
+ERROR: 0:16: 'equal_spacing' : cannot change previously set vertex spacing
+ERROR: 0:17: 'fractional_even_spacing' : cannot change previously set vertex spacing
+ERROR: 0:22: 'patch' : can only use on input in tessellation-evaluation shader
+ERROR: 0:26: 'barrier' : no matching overloaded function found
+ERROR: 0:37: 'gl_PointSize' : required extension not requested: Possible extensions include:
+GL_EXT_tessellation_point_size
+GL_OES_tessellation_point_size
+ERROR: 0:38: 'gl_ClipDistance' : no such field in structure
+ERROR: 0:38: 'expression' : left of '[' is not of type array, matrix, or vector
+ERROR: 0:47: 'gl_PointSize' : required extension not requested: Possible extensions include:
+GL_EXT_tessellation_point_size
+GL_OES_tessellation_point_size
+ERROR: 0:48: 'gl_ClipDistance' : undeclared identifier
+ERROR: 0:48: 'gl_ClipDistance' : left of '[' is not of type array, matrix, or vector
+ERROR: 0:48: 'assign' : l-value required (can't modify a const)
+ERROR: 0:51: 'patch' : cannot use interpolation qualifiers with patch
+ERROR: 0:52: 'patch' : cannot use interpolation qualifiers with patch
+ERROR: 0:53: 'noperspective' : Reserved word.
+ERROR: 0:53: 'noperspective' : not supported with this profile: es
+ERROR: 0:53: 'patch' : cannot use interpolation qualifiers with patch
+ERROR: 0:54: 'sample' : Reserved word.
+ERROR: 0:54: '' : can only have one auxiliary qualifier (centroid, patch, and sample)
+ERROR: 0:58: 'gl_PerVertex' : block already declared with size, can't redeclare as implicitly-sized
+ERROR: 0:63: 'gl_PerVertex' : can only redeclare a built-in block once, and before any use
+ERROR: 0:68: 'quads' : cannot apply to 'out'
+ERROR: 0:68: 'cw' : can only apply to 'in'
+ERROR: 0:69: 'triangles' : cannot apply to 'out'
+ERROR: 0:70: 'isolines' : cannot apply to 'out'
+ERROR: 0:71: 'cw' : can only apply to 'in'
+ERROR: 0:72: 'fractional_odd_spacing' : can only apply to 'in'
+ERROR: 0:73: 'equal_spacing' : can only apply to 'in'
+ERROR: 0:74: 'fractional_even_spacing' : can only apply to 'in'
+ERROR: 0:75: 'point_mode' : can only apply to 'in'
+ERROR: 0:77: 'in' : type must be an array: ina
+ERROR: 0:79: '[]' : tessellation input array size must be gl_MaxPatchVertices or implicitly sized
+ERROR: 0:82: 'in' : type must be an array: bla
+ERROR: 0:90: '[]' : tessellation input array size must be gl_MaxPatchVertices or implicitly sized
+ERROR: 0:100: 'location' : overlapping use of location 24
+ERROR: 0:103: 'location' : overlapping use of location 24
+ERROR: 0:105: 'gl_TessLevelOuter' : identifiers starting with "gl_" are reserved
+ERROR: 0:113: 'sample' : Reserved word.
+ERROR: 0:119: 'gl_PointSize' : no such field in structure
+ERROR: 0:119: '=' : cannot convert from 'temp block{in highp 4-component vector of float Position gl_Position}' to 'temp highp float'
+ERROR: 0:127: 'gl_BoundingBoxOES' : undeclared identifier
+ERROR: 44 compilation errors. No code generated.
+
+
+Shader version: 310
+Requested GL_ARB_separate_shader_objects
+Requested GL_EXT_primitive_bounding_box
+Requested GL_EXT_shader_io_blocks
+Requested GL_EXT_tessellation_shader
+Requested GL_OES_shader_io_blocks
+Requested GL_OES_tessellation_point_size
+Requested GL_OES_tessellation_shader
+input primitive = quads
+vertex spacing = fractional_odd_spacing
+triangle order = cw
+using point mode
+ERROR: node is still EOpNull!
+0:24 Function Definition: main( (global void)
+0:24 Function Parameters:
+0:26 Sequence
+0:26 Constant:
+0:26 0.000000
+0:28 Sequence
+0:28 move second child to first child (temp highp int)
+0:28 'a' (temp highp int)
+0:28 Constant:
+0:28 1512 (const int)
+0:36 Sequence
+0:36 move second child to first child (temp highp 4-component vector of float)
+0:36 'p' (temp highp 4-component vector of float)
+0:36 gl_Position: direct index for structure (in highp 4-component vector of float Position)
+0:36 direct index (temp block{in highp 4-component vector of float Position gl_Position, in highp float PointSize gl_PointSize})
+0:36 'gl_in' (in 32-element array of block{in highp 4-component vector of float Position gl_Position, in highp float PointSize gl_PointSize})
+0:36 Constant:
+0:36 1 (const int)
+0:36 Constant:
+0:36 0 (const int)
+0:37 Sequence
+0:37 move second child to first child (temp highp float)
+0:37 'ps' (temp highp float)
+0:37 gl_PointSize: direct index for structure (in highp float PointSize)
+0:37 direct index (temp block{in highp 4-component vector of float Position gl_Position, in highp float PointSize gl_PointSize})
+0:37 'gl_in' (in 32-element array of block{in highp 4-component vector of float Position gl_Position, in highp float PointSize gl_PointSize})
+0:37 Constant:
+0:37 1 (const int)
+0:37 Constant:
+0:37 1 (const int)
+0:38 Sequence
+0:38 move second child to first child (temp highp float)
+0:38 'cd' (temp highp float)
+0:38 Constant:
+0:38 0.000000
+0:40 Sequence
+0:40 move second child to first child (temp highp int)
+0:40 'pvi' (temp highp int)
+0:40 'gl_PatchVerticesIn' (in highp int PatchVertices)
+0:41 Sequence
+0:41 move second child to first child (temp highp int)
+0:41 'pid' (temp highp int)
+0:41 'gl_PrimitiveID' (in highp int PrimitiveID)
+0:42 Sequence
+0:42 move second child to first child (temp highp 3-component vector of float)
+0:42 'tc' (temp highp 3-component vector of float)
+0:42 'gl_TessCoord' (in highp 3-component vector of float TessCoord)
+0:43 Sequence
+0:43 move second child to first child (temp highp float)
+0:43 'tlo' (temp highp float)
+0:43 direct index (patch temp highp float TessLevelOuter)
+0:43 'gl_TessLevelOuter' (patch in 4-element array of highp float TessLevelOuter)
+0:43 Constant:
+0:43 3 (const int)
+0:44 Sequence
+0:44 move second child to first child (temp highp float)
+0:44 'tli' (temp highp float)
+0:44 direct index (patch temp highp float TessLevelInner)
+0:44 'gl_TessLevelInner' (patch in 2-element array of highp float TessLevelInner)
+0:44 Constant:
+0:44 1 (const int)
+0:46 move second child to first child (temp highp 4-component vector of float)
+0:46 gl_Position: direct index for structure (gl_Position highp 4-component vector of float Position)
+0:46 'anon@1' (out block{gl_Position highp 4-component vector of float Position gl_Position, gl_PointSize highp float PointSize gl_PointSize})
+0:46 Constant:
+0:46 0 (const uint)
+0:46 'p' (temp highp 4-component vector of float)
+0:47 move second child to first child (temp highp float)
+0:47 gl_PointSize: direct index for structure (gl_PointSize highp float PointSize)
+0:47 'anon@1' (out block{gl_Position highp 4-component vector of float Position gl_Position, gl_PointSize highp float PointSize gl_PointSize})
+0:47 Constant:
+0:47 1 (const uint)
+0:47 'ps' (temp highp float)
+0:48 move second child to first child (temp highp float)
+0:48 Constant:
+0:48 0.000000
+0:48 'cd' (temp highp float)
+0:117 Function Definition: pointSize2( (global void)
+0:117 Function Parameters:
+0:? Sequence
+0:120 move second child to first child (temp highp float)
+0:120 gl_PointSize: direct index for structure (gl_PointSize highp float PointSize)
+0:120 'anon@1' (out block{gl_Position highp 4-component vector of float Position gl_Position, gl_PointSize highp float PointSize gl_PointSize})
+0:120 Constant:
+0:120 1 (const uint)
+0:120 'ps' (temp highp float)
+0:125 Function Definition: bbbad( (global void)
+0:125 Function Parameters:
+0:127 Sequence
+0:127 'gl_BoundingBoxOES' (temp float)
+0:? Linker Objects
+0:? 'patchIn' (patch in highp 4-component vector of float)
+0:? 'patchOut' (patch out highp 4-component vector of float)
+0:? 'badp1' (smooth patch in highp 4-component vector of float)
+0:? 'badp2' (flat patch in highp 4-component vector of float)
+0:? 'badp3' (noperspective patch in highp 4-component vector of float)
+0:? 'badp4' (patch sample in highp 3-component vector of float)
+0:? 'gl_in' (in 32-element array of block{in highp 4-component vector of float Position gl_Position})
+0:? 'ina' (in highp 2-component vector of float)
+0:? 'inb' (in 32-element array of highp 2-component vector of float)
+0:? 'inc' (in 32-element array of highp 2-component vector of float)
+0:? 'ind' (in 32-element array of highp 2-component vector of float)
+0:? 'bla' (in block{in highp int f})
+0:? 'blb' (in 32-element array of block{in highp int f})
+0:? 'blc' (in 32-element array of block{in highp int f})
+0:? 'bld' (in 32-element array of block{in highp int f})
+0:? 'ivla' (layout(location=23 ) in 32-element array of highp 4-component vector of float)
+0:? 'ivlb' (layout(location=24 ) in 32-element array of highp 4-component vector of float)
+0:? 'ivlc' (layout(location=24 ) in 32-element array of highp 4-component vector of float)
+0:? 'ovla' (layout(location=23 ) out 2-element array of highp 4-component vector of float)
+0:? 'ovlb' (layout(location=24 ) out 2-element array of highp 4-component vector of float)
+0:? 'pinbi' (patch in block{in highp int a})
+0:? 'myColor2' (centroid out highp 3-component vector of float)
+0:? 'centr' (centroid in 32-element array of highp 3-component vector of float)
+0:? 'perSampleColor' (sample out highp 4-component vector of float)
+
+
+Linked tessellation evaluation stage:
+
+
+Shader version: 310
+Requested GL_ARB_separate_shader_objects
+Requested GL_EXT_primitive_bounding_box
+Requested GL_EXT_shader_io_blocks
+Requested GL_EXT_tessellation_shader
+Requested GL_OES_shader_io_blocks
+Requested GL_OES_tessellation_point_size
+Requested GL_OES_tessellation_shader
+input primitive = quads
+vertex spacing = fractional_odd_spacing
+triangle order = cw
+using point mode
+ERROR: node is still EOpNull!
+0:24 Function Definition: main( (global void)
+0:24 Function Parameters:
+0:26 Sequence
+0:26 Constant:
+0:26 0.000000
+0:28 Sequence
+0:28 move second child to first child (temp highp int)
+0:28 'a' (temp highp int)
+0:28 Constant:
+0:28 1512 (const int)
+0:36 Sequence
+0:36 move second child to first child (temp highp 4-component vector of float)
+0:36 'p' (temp highp 4-component vector of float)
+0:36 gl_Position: direct index for structure (in highp 4-component vector of float Position)
+0:36 direct index (temp block{in highp 4-component vector of float Position gl_Position, in highp float PointSize gl_PointSize})
+0:36 'gl_in' (in 32-element array of block{in highp 4-component vector of float Position gl_Position, in highp float PointSize gl_PointSize})
+0:36 Constant:
+0:36 1 (const int)
+0:36 Constant:
+0:36 0 (const int)
+0:37 Sequence
+0:37 move second child to first child (temp highp float)
+0:37 'ps' (temp highp float)
+0:37 gl_PointSize: direct index for structure (in highp float PointSize)
+0:37 direct index (temp block{in highp 4-component vector of float Position gl_Position, in highp float PointSize gl_PointSize})
+0:37 'gl_in' (in 32-element array of block{in highp 4-component vector of float Position gl_Position, in highp float PointSize gl_PointSize})
+0:37 Constant:
+0:37 1 (const int)
+0:37 Constant:
+0:37 1 (const int)
+0:38 Sequence
+0:38 move second child to first child (temp highp float)
+0:38 'cd' (temp highp float)
+0:38 Constant:
+0:38 0.000000
+0:40 Sequence
+0:40 move second child to first child (temp highp int)
+0:40 'pvi' (temp highp int)
+0:40 'gl_PatchVerticesIn' (in highp int PatchVertices)
+0:41 Sequence
+0:41 move second child to first child (temp highp int)
+0:41 'pid' (temp highp int)
+0:41 'gl_PrimitiveID' (in highp int PrimitiveID)
+0:42 Sequence
+0:42 move second child to first child (temp highp 3-component vector of float)
+0:42 'tc' (temp highp 3-component vector of float)
+0:42 'gl_TessCoord' (in highp 3-component vector of float TessCoord)
+0:43 Sequence
+0:43 move second child to first child (temp highp float)
+0:43 'tlo' (temp highp float)
+0:43 direct index (patch temp highp float TessLevelOuter)
+0:43 'gl_TessLevelOuter' (patch in 4-element array of highp float TessLevelOuter)
+0:43 Constant:
+0:43 3 (const int)
+0:44 Sequence
+0:44 move second child to first child (temp highp float)
+0:44 'tli' (temp highp float)
+0:44 direct index (patch temp highp float TessLevelInner)
+0:44 'gl_TessLevelInner' (patch in 2-element array of highp float TessLevelInner)
+0:44 Constant:
+0:44 1 (const int)
+0:46 move second child to first child (temp highp 4-component vector of float)
+0:46 gl_Position: direct index for structure (gl_Position highp 4-component vector of float Position)
+0:46 'anon@1' (out block{gl_Position highp 4-component vector of float Position gl_Position, gl_PointSize highp float PointSize gl_PointSize})
+0:46 Constant:
+0:46 0 (const uint)
+0:46 'p' (temp highp 4-component vector of float)
+0:47 move second child to first child (temp highp float)
+0:47 gl_PointSize: direct index for structure (gl_PointSize highp float PointSize)
+0:47 'anon@1' (out block{gl_Position highp 4-component vector of float Position gl_Position, gl_PointSize highp float PointSize gl_PointSize})
+0:47 Constant:
+0:47 1 (const uint)
+0:47 'ps' (temp highp float)
+0:48 move second child to first child (temp highp float)
+0:48 Constant:
+0:48 0.000000
+0:48 'cd' (temp highp float)
+0:117 Function Definition: pointSize2( (global void)
+0:117 Function Parameters:
+0:? Sequence
+0:120 move second child to first child (temp highp float)
+0:120 gl_PointSize: direct index for structure (gl_PointSize highp float PointSize)
+0:120 'anon@1' (out block{gl_Position highp 4-component vector of float Position gl_Position, gl_PointSize highp float PointSize gl_PointSize})
+0:120 Constant:
+0:120 1 (const uint)
+0:120 'ps' (temp highp float)
+0:125 Function Definition: bbbad( (global void)
+0:125 Function Parameters:
+0:127 Sequence
+0:127 'gl_BoundingBoxOES' (temp float)
+0:? Linker Objects
+0:? 'patchIn' (patch in highp 4-component vector of float)
+0:? 'patchOut' (patch out highp 4-component vector of float)
+0:? 'badp1' (smooth patch in highp 4-component vector of float)
+0:? 'badp2' (flat patch in highp 4-component vector of float)
+0:? 'badp3' (noperspective patch in highp 4-component vector of float)
+0:? 'badp4' (patch sample in highp 3-component vector of float)
+0:? 'gl_in' (in 32-element array of block{in highp 4-component vector of float Position gl_Position})
+0:? 'ina' (in highp 2-component vector of float)
+0:? 'inb' (in 32-element array of highp 2-component vector of float)
+0:? 'inc' (in 32-element array of highp 2-component vector of float)
+0:? 'ind' (in 32-element array of highp 2-component vector of float)
+0:? 'bla' (in block{in highp int f})
+0:? 'blb' (in 32-element array of block{in highp int f})
+0:? 'blc' (in 32-element array of block{in highp int f})
+0:? 'bld' (in 32-element array of block{in highp int f})
+0:? 'ivla' (layout(location=23 ) in 32-element array of highp 4-component vector of float)
+0:? 'ivlb' (layout(location=24 ) in 32-element array of highp 4-component vector of float)
+0:? 'ivlc' (layout(location=24 ) in 32-element array of highp 4-component vector of float)
+0:? 'ovla' (layout(location=23 ) out 2-element array of highp 4-component vector of float)
+0:? 'ovlb' (layout(location=24 ) out 2-element array of highp 4-component vector of float)
+0:? 'pinbi' (patch in block{in highp int a})
+0:? 'myColor2' (centroid out highp 3-component vector of float)
+0:? 'centr' (centroid in 32-element array of highp 3-component vector of float)
+0:? 'perSampleColor' (sample out highp 4-component vector of float)
+
diff --git a/chromium/third_party/glslang/src/Test/baseResults/310.vert.out b/chromium/third_party/glslang/src/Test/baseResults/310.vert.out
new file mode 100644
index 00000000000..9ce13f444f1
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/310.vert.out
@@ -0,0 +1,1960 @@
+310.vert
+Warning, version 310 is not yet complete; most version-specific features are present, but some are missing.
+ERROR: 0:3: 'shared' : not supported in this stage: vertex
+ERROR: 0:4: 'local_size_x' : there is no such layout identifier for this stage taking an assigned value
+ERROR: 0:5: 'buffer' : buffers can be declared only as blocks
+ERROR: 0:10: 'location' : overlapping use of location 3
+ERROR: 0:58: 'usampler2DMSArray' : Reserved word.
+ERROR: 0:58: 'sampler/image' : type requires declaration of default precision qualifier
+ERROR: 0:67: 'textureSamples' : no matching overloaded function found
+ERROR: 0:69: 'assign' : l-value required "ini" (can't modify shader input)
+ERROR: 0:69: 'out' : Non-L-value cannot be passed for 'out' or 'inout' parameters.
+ERROR: 0:72: 'out' : cannot be bool
+ERROR: 0:73: 'sampler2D' : sampler/image types can only be used in uniform variables or function parameters: outo
+ERROR: 0:75: 'vertex-shader array-of-array output' : not supported with this profile: es
+ERROR: 0:78: 'vertex-shader array-of-struct output' : not supported with this profile: es
+ERROR: 0:79: 'vertex-shader array-of-struct output' : not supported with this profile: es
+ERROR: 0:81: 'vertex-shader struct output containing an array' : not supported with this profile: es
+ERROR: 0:83: 'vertex-shader struct output containing structure' : not supported with this profile: es
+ERROR: 0:85: 'std430' : requires the 'buffer' storage qualifier
+ERROR: 0:97: 's' : member of block cannot be or contain a sampler, image, or atomic_uint type
+ERROR: 0:105: 'location' : overlapping use of location 12
+ERROR: 0:107: 'input block' : not supported in this stage: vertex
+ERROR: 0:109: 'gl_PerVertex' : block redeclaration has extra members
+ERROR: 0:119: 'gl_PointSize' : member of nameless block was not redeclared
+ERROR: 0:119: 'assign' : cannot convert from 'const float' to 'gl_PointSize highp void PointSize'
+ERROR: 0:122: 'gl_PerVertex' : can only redeclare a built-in block once, and before any use
+ERROR: 0:127: 'flat/smooth/noperspective' : cannot use interpolation qualifiers on an interface block
+ERROR: 0:131: 'flat/smooth/noperspective' : cannot use interpolation qualifiers on an interface block
+ERROR: 0:135: 'centroid' : cannot use centroid qualifier on an interface block
+ERROR: 0:139: 'invariant' : cannot use invariant qualifier on an interface block
+ERROR: 0:155: 'precise' : Reserved word.
+ERROR: 0:155: 'precise' : not supported for this version or the enabled extensions
+ERROR: 0:156: 'fma' : required extension not requested: Possible extensions include:
+GL_EXT_gpu_shader5
+GL_OES_gpu_shader5
+ERROR: 0:157: 'variable indexing sampler array' : not supported for this version or the enabled extensions
+ERROR: 0:161: 'variable indexing uniform block array' : not supported for this version or the enabled extensions
+ERROR: 0:162: 'variable indexing buffer block array' : not supported with this profile: es
+ERROR: 0:164: 'variable indexing sampler array' : not supported for this version or the enabled extensions
+ERROR: 0:165: 'non-constant offset argument' : not supported for this version or the enabled extensions
+ERROR: 0:166: 'textureGatherOffsets' : required extension not requested: Possible extensions include:
+GL_EXT_gpu_shader5
+GL_OES_gpu_shader5
+ERROR: 0:177: 'variable indexing buffer block array' : not supported with this profile: es
+ERROR: 0:182: 'textureGatherOffsets(...)' : must be a compile-time constant: offsets argument
+ERROR: 0:185: 'samplerBuffer' : Reserved word.
+ERROR: 0:185: 'sampler/image' : type requires declaration of default precision qualifier
+ERROR: 0:186: 'isamplerBuffer' : Reserved word.
+ERROR: 0:186: 'sampler/image' : type requires declaration of default precision qualifier
+ERROR: 0:187: 'usamplerBuffer' : Reserved word.
+ERROR: 0:187: 'sampler/image' : type requires declaration of default precision qualifier
+ERROR: 0:188: 'imageBuffer' : Reserved word.
+ERROR: 0:188: 'sampler/image' : type requires declaration of default precision qualifier
+ERROR: 0:189: 'iimageBuffer' : Reserved word.
+ERROR: 0:189: 'sampler/image' : type requires declaration of default precision qualifier
+ERROR: 0:190: 'uimageBuffer' : Reserved word.
+ERROR: 0:190: 'sampler/image' : type requires declaration of default precision qualifier
+ERROR: 0:195: 'sampler/image' : type requires declaration of default precision qualifier
+ERROR: 0:196: 'sampler/image' : type requires declaration of default precision qualifier
+ERROR: 0:197: 'sampler/image' : type requires declaration of default precision qualifier
+ERROR: 0:198: 'sampler/image' : type requires declaration of default precision qualifier
+ERROR: 0:199: 'sampler/image' : type requires declaration of default precision qualifier
+ERROR: 0:200: 'sampler/image' : type requires declaration of default precision qualifier
+ERROR: 0:235: 'imageCubeArray' : Reserved word.
+ERROR: 0:235: 'sampler/image' : type requires declaration of default precision qualifier
+ERROR: 0:236: 'iimageCubeArray' : Reserved word.
+ERROR: 0:236: 'sampler/image' : type requires declaration of default precision qualifier
+ERROR: 0:237: 'uimageCubeArray' : Reserved word.
+ERROR: 0:237: 'sampler/image' : type requires declaration of default precision qualifier
+ERROR: 0:239: 'samplerCubeArray' : Reserved word.
+ERROR: 0:239: 'sampler/image' : type requires declaration of default precision qualifier
+ERROR: 0:240: 'samplerCubeArrayShadow' : Reserved word.
+ERROR: 0:240: 'sampler/image' : type requires declaration of default precision qualifier
+ERROR: 0:241: 'isamplerCubeArray' : Reserved word.
+ERROR: 0:241: 'sampler/image' : type requires declaration of default precision qualifier
+ERROR: 0:242: 'usamplerCubeArray' : Reserved word.
+ERROR: 0:242: 'sampler/image' : type requires declaration of default precision qualifier
+ERROR: 0:246: 'sampler/image' : type requires declaration of default precision qualifier
+ERROR: 0:247: 'sampler/image' : type requires declaration of default precision qualifier
+ERROR: 0:248: 'sampler/image' : type requires declaration of default precision qualifier
+ERROR: 0:250: 'sampler/image' : type requires declaration of default precision qualifier
+ERROR: 0:251: 'sampler/image' : type requires declaration of default precision qualifier
+ERROR: 0:252: 'sampler/image' : type requires declaration of default precision qualifier
+ERROR: 0:253: 'sampler/image' : type requires declaration of default precision qualifier
+ERROR: 0:321: 'sampler2DMSArray' : Reserved word.
+ERROR: 0:321: 'sampler/image' : type requires declaration of default precision qualifier
+ERROR: 0:322: 'isampler2DMSArray' : Reserved word.
+ERROR: 0:322: 'sampler/image' : type requires declaration of default precision qualifier
+ERROR: 0:323: 'usampler2DMSArray' : Reserved word.
+ERROR: 0:323: 'sampler/image' : type requires declaration of default precision qualifier
+ERROR: 0:329: 'sampler/image' : type requires declaration of default precision qualifier
+ERROR: 0:330: 'sampler/image' : type requires declaration of default precision qualifier
+ERROR: 0:331: 'sampler/image' : type requires declaration of default precision qualifier
+ERROR: 0:351: 'textureSize' : no matching overloaded function found
+ERROR: 0:351: '=' : cannot convert from 'const float' to 'temp highp 3-component vector of int'
+ERROR: 0:389: 'sample' : Reserved word.
+ERROR: 0:400: 'interpolateAtCentroid' : no matching overloaded function found
+ERROR: 0:401: 'interpolateAtSample' : no matching overloaded function found
+ERROR: 0:402: 'interpolateAtOffset' : no matching overloaded function found
+ERROR: 93 compilation errors. No code generated.
+
+
+Shader version: 310
+Requested GL_EXT_texture_buffer
+Requested GL_OES_gpu_shader5
+Requested GL_OES_shader_image_atomic
+Requested GL_OES_shader_io_blocks
+Requested GL_OES_shader_multisample_interpolation
+Requested GL_OES_texture_buffer
+Requested GL_OES_texture_cube_map_array
+Requested GL_OES_texture_storage_multisample_2d_array
+ERROR: node is still EOpNull!
+0:12 Function Definition: main( (global void)
+0:12 Function Parameters:
+0:? Sequence
+0:15 move second child to first child (temp highp 2-component vector of uint)
+0:15 'u2' (temp highp 2-component vector of uint)
+0:15 addCarry (global highp 2-component vector of uint)
+0:15 'u2' (temp highp 2-component vector of uint)
+0:15 'u2' (temp highp 2-component vector of uint)
+0:15 'u2' (temp highp 2-component vector of uint)
+0:17 move second child to first child (temp highp uint)
+0:17 'u1' (temp highp uint)
+0:17 subBorrow (global highp uint)
+0:17 'u1' (temp highp uint)
+0:17 'u1' (temp highp uint)
+0:17 'u1' (temp highp uint)
+0:19 uMulExtended (global void)
+0:19 'u4' (temp highp 4-component vector of uint)
+0:19 'u4' (temp highp 4-component vector of uint)
+0:19 'u4' (temp highp 4-component vector of uint)
+0:19 'u4' (temp highp 4-component vector of uint)
+0:21 iMulExtended (global void)
+0:21 'i4' (temp highp 4-component vector of int)
+0:21 'i4' (temp highp 4-component vector of int)
+0:21 'i4' (temp highp 4-component vector of int)
+0:21 'i4' (temp highp 4-component vector of int)
+0:23 move second child to first child (temp highp int)
+0:23 'i1' (temp highp int)
+0:23 bitfieldExtract (global highp int)
+0:23 'i1' (temp highp int)
+0:23 Constant:
+0:23 4 (const int)
+0:23 Constant:
+0:23 5 (const int)
+0:25 move second child to first child (temp highp 3-component vector of uint)
+0:25 'u3' (temp highp 3-component vector of uint)
+0:25 bitfieldExtract (global highp 3-component vector of uint)
+0:25 'u3' (temp highp 3-component vector of uint)
+0:25 Constant:
+0:25 4 (const int)
+0:25 Constant:
+0:25 5 (const int)
+0:27 move second child to first child (temp highp 3-component vector of int)
+0:27 'i3' (temp highp 3-component vector of int)
+0:27 bitfieldInsert (global highp 3-component vector of int)
+0:27 'i3' (temp highp 3-component vector of int)
+0:27 'i3' (temp highp 3-component vector of int)
+0:27 Constant:
+0:27 4 (const int)
+0:27 Constant:
+0:27 5 (const int)
+0:28 move second child to first child (temp highp uint)
+0:28 'u1' (temp highp uint)
+0:28 bitfieldInsert (global highp uint)
+0:28 'u1' (temp highp uint)
+0:28 'u1' (temp highp uint)
+0:28 Constant:
+0:28 4 (const int)
+0:28 Constant:
+0:28 5 (const int)
+0:30 move second child to first child (temp highp 2-component vector of int)
+0:30 'i2' (temp highp 2-component vector of int)
+0:30 bitFieldReverse (global highp 2-component vector of int)
+0:30 'i2' (temp highp 2-component vector of int)
+0:31 move second child to first child (temp highp 4-component vector of uint)
+0:31 'u4' (temp highp 4-component vector of uint)
+0:31 bitFieldReverse (global highp 4-component vector of uint)
+0:31 'u4' (temp highp 4-component vector of uint)
+0:32 move second child to first child (temp highp int)
+0:32 'i1' (temp highp int)
+0:32 bitCount (global lowp int)
+0:32 'i1' (temp highp int)
+0:33 move second child to first child (temp highp 3-component vector of int)
+0:33 'i3' (temp highp 3-component vector of int)
+0:33 bitCount (global lowp 3-component vector of int)
+0:33 'u3' (temp highp 3-component vector of uint)
+0:34 move second child to first child (temp highp 2-component vector of int)
+0:34 'i2' (temp highp 2-component vector of int)
+0:34 findLSB (global lowp 2-component vector of int)
+0:34 'i2' (temp highp 2-component vector of int)
+0:35 move second child to first child (temp highp 4-component vector of int)
+0:35 'i4' (temp highp 4-component vector of int)
+0:35 findLSB (global lowp 4-component vector of int)
+0:35 'u4' (temp highp 4-component vector of uint)
+0:36 move second child to first child (temp highp int)
+0:36 'i1' (temp highp int)
+0:36 findMSB (global lowp int)
+0:36 'i1' (temp highp int)
+0:37 move second child to first child (temp highp 2-component vector of int)
+0:37 'i2' (temp highp 2-component vector of int)
+0:37 findMSB (global lowp 2-component vector of int)
+0:37 'u2' (temp highp 2-component vector of uint)
+0:40 move second child to first child (temp highp 3-component vector of float)
+0:40 'v3' (temp highp 3-component vector of float)
+0:40 frexp (global highp 3-component vector of float)
+0:40 'v3' (temp highp 3-component vector of float)
+0:40 'i3' (temp highp 3-component vector of int)
+0:42 move second child to first child (temp highp 2-component vector of float)
+0:42 'v2' (temp highp 2-component vector of float)
+0:42 ldexp (global highp 2-component vector of float)
+0:42 'v2' (temp highp 2-component vector of float)
+0:42 'i2' (temp highp 2-component vector of int)
+0:45 move second child to first child (temp highp uint)
+0:45 'u1' (temp highp uint)
+0:45 PackUnorm4x8 (global highp uint)
+0:45 'v4' (temp mediump 4-component vector of float)
+0:46 move second child to first child (temp highp uint)
+0:46 'u1' (temp highp uint)
+0:46 PackSnorm4x8 (global highp uint)
+0:46 'v4' (temp mediump 4-component vector of float)
+0:47 move second child to first child (temp mediump 4-component vector of float)
+0:47 'v4' (temp mediump 4-component vector of float)
+0:47 UnpackUnorm4x8 (global mediump 4-component vector of float)
+0:47 'u1' (temp highp uint)
+0:48 move second child to first child (temp mediump 4-component vector of float)
+0:48 'v4' (temp mediump 4-component vector of float)
+0:48 UnpackSnorm4x8 (global mediump 4-component vector of float)
+0:48 'u1' (temp highp uint)
+0:60 Function Definition: foo( (global void)
+0:60 Function Parameters:
+0:? Sequence
+0:63 move second child to first child (temp highp 2-component vector of int)
+0:63 'v2' (temp highp 2-component vector of int)
+0:63 textureSize (global highp 2-component vector of int)
+0:63 's2dms' (uniform highp sampler2DMS)
+0:64 move second child to first child (temp highp 2-component vector of int)
+0:64 'v2' (temp highp 2-component vector of int)
+0:64 textureSize (global highp 2-component vector of int)
+0:64 'us2dms' (uniform highp usampler2DMS)
+0:65 Sequence
+0:65 move second child to first child (temp highp 4-component vector of float)
+0:65 'v4' (temp highp 4-component vector of float)
+0:65 textureFetch (global highp 4-component vector of float)
+0:65 's2dms' (uniform highp sampler2DMS)
+0:65 'v2' (temp highp 2-component vector of int)
+0:65 Constant:
+0:65 2 (const int)
+0:66 Sequence
+0:66 move second child to first child (temp highp 4-component vector of int)
+0:66 'iv4' (temp highp 4-component vector of int)
+0:66 textureFetch (global highp 4-component vector of int)
+0:66 'is2dms' (uniform highp isampler2DMS)
+0:66 'v2' (temp highp 2-component vector of int)
+0:66 Constant:
+0:66 2 (const int)
+0:67 Constant:
+0:67 0.000000
+0:69 frexp (global highp float)
+0:69 'f' (temp highp float)
+0:69 'ini' (in highp int)
+0:114 Function Definition: foo_IO( (global void)
+0:114 Function Parameters:
+0:116 Sequence
+0:116 Sequence
+0:116 move second child to first child (temp highp int)
+0:116 'sum' (temp highp int)
+0:116 add (temp highp int)
+0:116 'gl_VertexID' (gl_VertexId highp int VertexId)
+0:117 'gl_InstanceID' (gl_InstanceId highp int InstanceId)
+0:118 move second child to first child (temp highp 4-component vector of float)
+0:118 gl_Position: direct index for structure (gl_Position highp 4-component vector of float Position)
+0:118 'anon@1' (out block{gl_Position highp 4-component vector of float Position gl_Position, })
+0:118 Constant:
+0:118 0 (const uint)
+0:118 Constant:
+0:118 1.000000
+0:118 1.000000
+0:118 1.000000
+0:118 1.000000
+0:119 gl_PointSize: direct index for structure (gl_PointSize highp void PointSize)
+0:119 'anon@1' (out block{gl_Position highp 4-component vector of float Position gl_Position, })
+0:119 Constant:
+0:119 1 (const uint)
+0:153 Function Definition: pfooBad( (global void)
+0:153 Function Parameters:
+0:? Sequence
+0:156 move second child to first child (temp highp 2-component vector of float)
+0:156 'h' (noContraction temp highp 2-component vector of float)
+0:156 fma (global highp 2-component vector of float)
+0:156 'inf' (in highp 2-component vector of float)
+0:156 'ing' (in highp 2-component vector of float)
+0:156 'h' (noContraction temp highp 2-component vector of float)
+0:157 indirect index (temp highp sampler2D)
+0:157 'sArray' (uniform 4-element array of highp sampler2D)
+0:157 add (temp highp int)
+0:157 'sIndex' (uniform highp int)
+0:157 Constant:
+0:157 1 (const int)
+0:158 indirect index (layout(binding=0 offset=0 ) temp highp atomic_uint)
+0:158 'auArray' (layout(binding=0 offset=0 ) uniform 2-element array of highp atomic_uint)
+0:158 add (temp highp int)
+0:158 'sIndex' (uniform highp int)
+0:158 Constant:
+0:158 1 (const int)
+0:159 direct index (layout(column_major shared ) temp block{layout(column_major shared ) uniform highp int i})
+0:159 'ubInst' (layout(column_major shared ) uniform 4-element array of block{layout(column_major shared ) uniform highp int i})
+0:159 Constant:
+0:159 1 (const int)
+0:160 direct index (layout(column_major shared ) temp block{layout(column_major shared ) buffer highp int i})
+0:160 'bbInst' (layout(column_major shared ) buffer 4-element array of block{layout(column_major shared ) buffer highp int i})
+0:160 Constant:
+0:160 2 (const int)
+0:161 indirect index (layout(column_major shared ) temp block{layout(column_major shared ) uniform highp int i})
+0:161 'ubInst' (layout(column_major shared ) uniform 4-element array of block{layout(column_major shared ) uniform highp int i})
+0:161 add (temp highp int)
+0:161 'sIndex' (uniform highp int)
+0:161 Constant:
+0:161 1 (const int)
+0:162 indirect index (layout(column_major shared ) temp block{layout(column_major shared ) buffer highp int i})
+0:162 'bbInst' (layout(column_major shared ) buffer 4-element array of block{layout(column_major shared ) buffer highp int i})
+0:162 'sIndex' (uniform highp int)
+0:163 direct index (writeonly temp highp image2D)
+0:163 'iArray' (writeonly uniform 5-element array of highp image2D)
+0:163 Constant:
+0:163 2 (const int)
+0:164 indirect index (writeonly temp highp image2D)
+0:164 'iArray' (writeonly uniform 5-element array of highp image2D)
+0:164 component-wise multiply (temp highp int)
+0:164 'sIndex' (uniform highp int)
+0:164 Constant:
+0:164 2 (const int)
+0:165 textureGatherOffset (global highp 4-component vector of float)
+0:165 direct index (temp highp sampler2D)
+0:165 'sArray' (uniform 4-element array of highp sampler2D)
+0:165 Constant:
+0:165 0 (const int)
+0:165 Constant:
+0:165 0.100000
+0:165 0.100000
+0:165 Convert float to int (temp highp 2-component vector of int)
+0:165 'inf' (in highp 2-component vector of float)
+0:166 textureGatherOffsets (global highp 4-component vector of float)
+0:166 direct index (temp highp sampler2D)
+0:166 'sArray' (uniform 4-element array of highp sampler2D)
+0:166 Constant:
+0:166 0 (const int)
+0:166 Constant:
+0:166 0.100000
+0:166 0.100000
+0:166 Constant:
+0:166 0 (const int)
+0:166 0 (const int)
+0:166 0 (const int)
+0:166 0 (const int)
+0:166 0 (const int)
+0:166 0 (const int)
+0:166 0 (const int)
+0:166 0 (const int)
+0:171 Function Definition: pfoo( (global void)
+0:171 Function Parameters:
+0:? Sequence
+0:174 move second child to first child (temp highp 2-component vector of float)
+0:174 'h' (noContraction temp highp 2-component vector of float)
+0:174 fma (global highp 2-component vector of float)
+0:174 'inf' (in highp 2-component vector of float)
+0:174 'ing' (in highp 2-component vector of float)
+0:174 'h' (noContraction temp highp 2-component vector of float)
+0:175 indirect index (temp highp sampler2D)
+0:175 'sArray' (uniform 4-element array of highp sampler2D)
+0:175 add (temp highp int)
+0:175 'sIndex' (uniform highp int)
+0:175 Constant:
+0:175 1 (const int)
+0:176 indirect index (layout(column_major shared ) temp block{layout(column_major shared ) uniform highp int i})
+0:176 'ubInst' (layout(column_major shared ) uniform 4-element array of block{layout(column_major shared ) uniform highp int i})
+0:176 add (temp highp int)
+0:176 'sIndex' (uniform highp int)
+0:176 Constant:
+0:176 1 (const int)
+0:177 indirect index (layout(column_major shared ) temp block{layout(column_major shared ) buffer highp int i})
+0:177 'bbInst' (layout(column_major shared ) buffer 4-element array of block{layout(column_major shared ) buffer highp int i})
+0:177 subtract (temp highp int)
+0:177 'sIndex' (uniform highp int)
+0:177 Constant:
+0:177 2 (const int)
+0:178 direct index (writeonly temp highp image2D)
+0:178 'iArray' (writeonly uniform 5-element array of highp image2D)
+0:178 Constant:
+0:178 2 (const int)
+0:179 indirect index (writeonly temp highp image2D)
+0:179 'iArray' (writeonly uniform 5-element array of highp image2D)
+0:179 subtract (temp highp int)
+0:179 'sIndex' (uniform highp int)
+0:179 Constant:
+0:179 2 (const int)
+0:180 textureGatherOffset (global highp 4-component vector of float)
+0:180 direct index (temp highp sampler2D)
+0:180 'sArray' (uniform 4-element array of highp sampler2D)
+0:180 Constant:
+0:180 0 (const int)
+0:180 Constant:
+0:180 0.100000
+0:180 0.100000
+0:180 Convert float to int (temp highp 2-component vector of int)
+0:180 'inf' (in highp 2-component vector of float)
+0:181 textureGatherOffsets (global highp 4-component vector of float)
+0:181 direct index (temp highp sampler2D)
+0:181 'sArray' (uniform 4-element array of highp sampler2D)
+0:181 Constant:
+0:181 0 (const int)
+0:181 Constant:
+0:181 0.100000
+0:181 0.100000
+0:181 Constant:
+0:181 0 (const int)
+0:181 0 (const int)
+0:181 0 (const int)
+0:181 0 (const int)
+0:181 0 (const int)
+0:181 0 (const int)
+0:181 0 (const int)
+0:181 0 (const int)
+0:182 textureGatherOffsets (global highp 4-component vector of float)
+0:182 direct index (temp highp sampler2D)
+0:182 'sArray' (uniform 4-element array of highp sampler2D)
+0:182 Constant:
+0:182 0 (const int)
+0:182 Constant:
+0:182 0.100000
+0:182 0.100000
+0:182 'offsets' (uniform 4-element array of highp 2-component vector of int)
+0:220 Function Definition: bufferT( (global void)
+0:220 Function Parameters:
+0:222 Sequence
+0:222 Sequence
+0:222 move second child to first child (temp highp int)
+0:222 's1' (temp highp int)
+0:222 textureSize (global highp int)
+0:222 'bufSamp1' (uniform highp samplerBuffer)
+0:223 Sequence
+0:223 move second child to first child (temp highp int)
+0:223 's2' (temp highp int)
+0:223 textureSize (global highp int)
+0:223 'bufSamp2' (uniform highp isamplerBuffer)
+0:224 Sequence
+0:224 move second child to first child (temp highp int)
+0:224 's3' (temp highp int)
+0:224 textureSize (global highp int)
+0:224 'bufSamp3' (uniform highp usamplerBuffer)
+0:226 Sequence
+0:226 move second child to first child (temp highp int)
+0:226 's4' (temp highp int)
+0:226 imageQuerySize (global highp int)
+0:226 'bufSamp4' (writeonly uniform highp imageBuffer)
+0:227 Sequence
+0:227 move second child to first child (temp highp int)
+0:227 's5' (temp highp int)
+0:227 imageQuerySize (global highp int)
+0:227 'bufSamp5' (writeonly uniform highp iimageBuffer)
+0:228 Sequence
+0:228 move second child to first child (temp highp int)
+0:228 's6' (temp highp int)
+0:228 imageQuerySize (global highp int)
+0:228 'bufSamp6' (writeonly uniform highp uimageBuffer)
+0:230 Sequence
+0:230 move second child to first child (temp highp 4-component vector of float)
+0:230 'f1' (temp highp 4-component vector of float)
+0:230 textureFetch (global highp 4-component vector of float)
+0:230 'bufSamp1' (uniform highp samplerBuffer)
+0:230 's1' (temp highp int)
+0:231 Sequence
+0:231 move second child to first child (temp highp 4-component vector of int)
+0:231 'f2' (temp highp 4-component vector of int)
+0:231 textureFetch (global highp 4-component vector of int)
+0:231 'bufSamp2' (uniform highp isamplerBuffer)
+0:231 's2' (temp highp int)
+0:232 Sequence
+0:232 move second child to first child (temp highp 4-component vector of uint)
+0:232 'f3' (temp highp 4-component vector of uint)
+0:232 textureFetch (global highp 4-component vector of uint)
+0:232 'bufSamp3' (uniform highp usamplerBuffer)
+0:232 's3' (temp highp int)
+0:279 Function Definition: CAT( (global void)
+0:279 Function Parameters:
+0:281 Sequence
+0:281 Sequence
+0:281 move second child to first child (temp highp 3-component vector of int)
+0:281 's4' (temp highp 3-component vector of int)
+0:281 textureSize (global highp 3-component vector of int)
+0:281 'CA4' (uniform highp samplerCubeArray)
+0:281 Constant:
+0:281 1 (const int)
+0:282 Sequence
+0:282 move second child to first child (temp highp 3-component vector of int)
+0:282 's5' (temp highp 3-component vector of int)
+0:282 textureSize (global highp 3-component vector of int)
+0:282 'CA5' (uniform highp samplerCubeArrayShadow)
+0:282 Constant:
+0:282 1 (const int)
+0:283 Sequence
+0:283 move second child to first child (temp highp 3-component vector of int)
+0:283 's6' (temp highp 3-component vector of int)
+0:283 textureSize (global highp 3-component vector of int)
+0:283 'CA6' (uniform highp isamplerCubeArray)
+0:283 Constant:
+0:283 1 (const int)
+0:284 Sequence
+0:284 move second child to first child (temp highp 3-component vector of int)
+0:284 's7' (temp highp 3-component vector of int)
+0:284 textureSize (global highp 3-component vector of int)
+0:284 'CA7' (uniform highp usamplerCubeArray)
+0:284 Constant:
+0:284 1 (const int)
+0:286 Sequence
+0:286 move second child to first child (temp highp 4-component vector of float)
+0:286 't4' (temp highp 4-component vector of float)
+0:286 texture (global highp 4-component vector of float)
+0:286 'CA4' (uniform highp samplerCubeArray)
+0:286 Constant:
+0:286 0.500000
+0:286 0.500000
+0:286 0.500000
+0:286 0.500000
+0:287 Sequence
+0:287 move second child to first child (temp highp float)
+0:287 't5' (temp highp float)
+0:287 texture (global highp float)
+0:287 'CA5' (uniform highp samplerCubeArrayShadow)
+0:287 Constant:
+0:287 0.500000
+0:287 0.500000
+0:287 0.500000
+0:287 0.500000
+0:287 Constant:
+0:287 3.000000
+0:288 Sequence
+0:288 move second child to first child (temp highp 4-component vector of int)
+0:288 't6' (temp highp 4-component vector of int)
+0:288 texture (global highp 4-component vector of int)
+0:288 'CA6' (uniform highp isamplerCubeArray)
+0:288 Constant:
+0:288 0.500000
+0:288 0.500000
+0:288 0.500000
+0:288 0.500000
+0:289 Sequence
+0:289 move second child to first child (temp highp 4-component vector of uint)
+0:289 't7' (temp highp 4-component vector of uint)
+0:289 texture (global highp 4-component vector of uint)
+0:289 'CA7' (uniform highp usamplerCubeArray)
+0:289 Constant:
+0:289 0.500000
+0:289 0.500000
+0:289 0.500000
+0:289 0.500000
+0:291 Sequence
+0:291 move second child to first child (temp highp 4-component vector of float)
+0:291 'L4' (temp highp 4-component vector of float)
+0:291 textureLod (global highp 4-component vector of float)
+0:291 'CA4' (uniform highp samplerCubeArray)
+0:291 Constant:
+0:291 0.500000
+0:291 0.500000
+0:291 0.500000
+0:291 0.500000
+0:291 Constant:
+0:291 0.240000
+0:292 Sequence
+0:292 move second child to first child (temp highp 4-component vector of int)
+0:292 'L6' (temp highp 4-component vector of int)
+0:292 textureLod (global highp 4-component vector of int)
+0:292 'CA6' (uniform highp isamplerCubeArray)
+0:292 Constant:
+0:292 0.500000
+0:292 0.500000
+0:292 0.500000
+0:292 0.500000
+0:292 Constant:
+0:292 0.260000
+0:293 Sequence
+0:293 move second child to first child (temp highp 4-component vector of uint)
+0:293 'L7' (temp highp 4-component vector of uint)
+0:293 textureLod (global highp 4-component vector of uint)
+0:293 'CA7' (uniform highp usamplerCubeArray)
+0:293 Constant:
+0:293 0.500000
+0:293 0.500000
+0:293 0.500000
+0:293 0.500000
+0:293 Constant:
+0:293 0.270000
+0:295 Sequence
+0:295 move second child to first child (temp highp 4-component vector of float)
+0:295 'g4' (temp highp 4-component vector of float)
+0:295 textureGrad (global highp 4-component vector of float)
+0:295 'CA4' (uniform highp samplerCubeArray)
+0:295 Constant:
+0:295 0.500000
+0:295 0.500000
+0:295 0.500000
+0:295 0.500000
+0:295 Constant:
+0:295 0.100000
+0:295 0.100000
+0:295 0.100000
+0:295 Constant:
+0:295 0.200000
+0:295 0.200000
+0:295 0.200000
+0:296 Sequence
+0:296 move second child to first child (temp highp 4-component vector of int)
+0:296 'g6' (temp highp 4-component vector of int)
+0:296 textureGrad (global highp 4-component vector of int)
+0:296 'CA6' (uniform highp isamplerCubeArray)
+0:296 Constant:
+0:296 0.500000
+0:296 0.500000
+0:296 0.500000
+0:296 0.500000
+0:296 Constant:
+0:296 0.100000
+0:296 0.100000
+0:296 0.100000
+0:296 Constant:
+0:296 0.200000
+0:296 0.200000
+0:296 0.200000
+0:297 Sequence
+0:297 move second child to first child (temp highp 4-component vector of uint)
+0:297 'g7' (temp highp 4-component vector of uint)
+0:297 textureGrad (global highp 4-component vector of uint)
+0:297 'CA7' (uniform highp usamplerCubeArray)
+0:297 Constant:
+0:297 0.500000
+0:297 0.500000
+0:297 0.500000
+0:297 0.500000
+0:297 Constant:
+0:297 0.100000
+0:297 0.100000
+0:297 0.100000
+0:297 Constant:
+0:297 0.200000
+0:297 0.200000
+0:297 0.200000
+0:299 Sequence
+0:299 move second child to first child (temp highp 4-component vector of float)
+0:299 'gath4' (temp highp 4-component vector of float)
+0:299 textureGather (global highp 4-component vector of float)
+0:299 'CA4' (uniform highp samplerCubeArray)
+0:299 Constant:
+0:299 0.500000
+0:299 0.500000
+0:299 0.500000
+0:299 0.500000
+0:300 Sequence
+0:300 move second child to first child (temp highp 4-component vector of float)
+0:300 'gathC4' (temp highp 4-component vector of float)
+0:300 textureGather (global highp 4-component vector of float)
+0:300 'CA4' (uniform highp samplerCubeArray)
+0:300 Constant:
+0:300 0.500000
+0:300 0.500000
+0:300 0.500000
+0:300 0.500000
+0:300 Constant:
+0:300 2 (const int)
+0:301 Sequence
+0:301 move second child to first child (temp highp 4-component vector of int)
+0:301 'gath6' (temp highp 4-component vector of int)
+0:301 textureGather (global highp 4-component vector of int)
+0:301 'CA6' (uniform highp isamplerCubeArray)
+0:301 Constant:
+0:301 0.500000
+0:301 0.500000
+0:301 0.500000
+0:301 0.500000
+0:302 Sequence
+0:302 move second child to first child (temp highp 4-component vector of int)
+0:302 'gathC6' (temp highp 4-component vector of int)
+0:302 textureGather (global highp 4-component vector of int)
+0:302 'CA6' (uniform highp isamplerCubeArray)
+0:302 Constant:
+0:302 0.500000
+0:302 0.500000
+0:302 0.500000
+0:302 0.500000
+0:302 Constant:
+0:302 1 (const int)
+0:303 Sequence
+0:303 move second child to first child (temp highp 4-component vector of uint)
+0:303 'gath7' (temp highp 4-component vector of uint)
+0:303 textureGather (global highp 4-component vector of uint)
+0:303 'CA7' (uniform highp usamplerCubeArray)
+0:303 Constant:
+0:303 0.500000
+0:303 0.500000
+0:303 0.500000
+0:303 0.500000
+0:304 Sequence
+0:304 move second child to first child (temp highp 4-component vector of uint)
+0:304 'gathC7' (temp highp 4-component vector of uint)
+0:304 textureGather (global highp 4-component vector of uint)
+0:304 'CA7' (uniform highp usamplerCubeArray)
+0:304 Constant:
+0:304 0.500000
+0:304 0.500000
+0:304 0.500000
+0:304 0.500000
+0:304 Constant:
+0:304 0 (const int)
+0:306 Sequence
+0:306 move second child to first child (temp highp 4-component vector of float)
+0:306 'gath5' (temp highp 4-component vector of float)
+0:306 textureGather (global highp 4-component vector of float)
+0:306 'CA5' (uniform highp samplerCubeArrayShadow)
+0:306 Constant:
+0:306 0.500000
+0:306 0.500000
+0:306 0.500000
+0:306 0.500000
+0:306 Constant:
+0:306 2.500000
+0:308 Sequence
+0:308 move second child to first child (temp highp 3-component vector of int)
+0:308 's1' (temp highp 3-component vector of int)
+0:308 imageQuerySize (global highp 3-component vector of int)
+0:308 'CA1' (writeonly uniform highp imageCubeArray)
+0:309 Sequence
+0:309 move second child to first child (temp highp 3-component vector of int)
+0:309 's2' (temp highp 3-component vector of int)
+0:309 imageQuerySize (global highp 3-component vector of int)
+0:309 'CA2' (writeonly uniform highp iimageCubeArray)
+0:310 Sequence
+0:310 move second child to first child (temp highp 3-component vector of int)
+0:310 's3' (temp highp 3-component vector of int)
+0:310 imageQuerySize (global highp 3-component vector of int)
+0:310 'CA3' (writeonly uniform highp uimageCubeArray)
+0:312 imageStore (global highp void)
+0:312 'CA1' (writeonly uniform highp imageCubeArray)
+0:312 's3' (temp highp 3-component vector of int)
+0:312 Constant:
+0:312 1.000000
+0:312 1.000000
+0:312 1.000000
+0:312 1.000000
+0:313 imageStore (global highp void)
+0:313 'CA2' (writeonly uniform highp iimageCubeArray)
+0:313 's3' (temp highp 3-component vector of int)
+0:313 Constant:
+0:313 1 (const int)
+0:313 1 (const int)
+0:313 1 (const int)
+0:313 1 (const int)
+0:314 imageStore (global highp void)
+0:314 'CA3' (writeonly uniform highp uimageCubeArray)
+0:314 's3' (temp highp 3-component vector of int)
+0:314 Constant:
+0:314 1 (const uint)
+0:314 1 (const uint)
+0:314 1 (const uint)
+0:314 1 (const uint)
+0:316 Sequence
+0:316 move second child to first child (temp highp 4-component vector of float)
+0:316 'cl1' (temp highp 4-component vector of float)
+0:316 imageLoad (global highp 4-component vector of float)
+0:316 'rCA1' (layout(rgba16f ) readonly uniform highp imageCubeArray)
+0:316 's3' (temp highp 3-component vector of int)
+0:317 Sequence
+0:317 move second child to first child (temp highp 4-component vector of int)
+0:317 'cl2' (temp highp 4-component vector of int)
+0:317 imageLoad (global highp 4-component vector of int)
+0:317 'rCA2' (layout(rgba32i ) readonly uniform highp iimageCubeArray)
+0:317 's3' (temp highp 3-component vector of int)
+0:318 Sequence
+0:318 move second child to first child (temp highp 4-component vector of uint)
+0:318 'cl3' (temp highp 4-component vector of uint)
+0:318 imageLoad (global highp 4-component vector of uint)
+0:318 'rCA3' (layout(r32ui ) readonly uniform highp uimageCubeArray)
+0:318 's3' (temp highp 3-component vector of int)
+0:343 Function Definition: MSA( (global void)
+0:343 Function Parameters:
+0:345 Sequence
+0:345 Sequence
+0:345 move second child to first child (temp highp 4-component vector of float)
+0:345 'tf' (temp highp 4-component vector of float)
+0:345 textureFetch (global highp 4-component vector of float)
+0:345 'samp2DMSA' (uniform highp sampler2DMSArray)
+0:345 Constant:
+0:345 5 (const int)
+0:345 5 (const int)
+0:345 5 (const int)
+0:345 Constant:
+0:345 2 (const int)
+0:346 Sequence
+0:346 move second child to first child (temp highp 4-component vector of int)
+0:346 'tfi' (temp highp 4-component vector of int)
+0:346 textureFetch (global highp 4-component vector of int)
+0:346 'samp2DMSAi' (uniform highp isampler2DMSArray)
+0:346 Constant:
+0:346 5 (const int)
+0:346 5 (const int)
+0:346 5 (const int)
+0:346 Constant:
+0:346 2 (const int)
+0:347 Sequence
+0:347 move second child to first child (temp highp 4-component vector of uint)
+0:347 'tfu' (temp highp 4-component vector of uint)
+0:347 textureFetch (global highp 4-component vector of uint)
+0:347 'samp2DMSAu' (uniform highp usampler2DMSArray)
+0:347 Constant:
+0:347 5 (const int)
+0:347 5 (const int)
+0:347 5 (const int)
+0:347 Constant:
+0:347 2 (const int)
+0:349 Sequence
+0:349 move second child to first child (temp highp 3-component vector of int)
+0:349 'tfs' (temp highp 3-component vector of int)
+0:349 textureSize (global highp 3-component vector of int)
+0:349 'samp2DMSA' (uniform highp sampler2DMSArray)
+0:350 Sequence
+0:350 move second child to first child (temp highp 3-component vector of int)
+0:350 'tfsi' (temp highp 3-component vector of int)
+0:350 textureSize (global highp 3-component vector of int)
+0:350 'samp2DMSAi' (uniform highp isampler2DMSArray)
+0:352 Sequence
+0:352 move second child to first child (temp highp 3-component vector of int)
+0:352 'tfsu' (temp highp 3-component vector of int)
+0:352 textureSize (global highp 3-component vector of int)
+0:352 'samp2DMSAu' (uniform highp usampler2DMSArray)
+0:364 Function Definition: goodImageAtom( (global void)
+0:364 Function Parameters:
+0:? Sequence
+0:370 imageAtomicAdd (global highp int)
+0:370 'im2Di' (layout(r32i ) uniform highp iimage2D)
+0:370 'P' (uniform highp 2-component vector of int)
+0:370 'dati' (temp highp int)
+0:371 imageAtomicAdd (global highp uint)
+0:371 'im2Du' (layout(r32ui ) uniform highp uimage2D)
+0:371 'P' (uniform highp 2-component vector of int)
+0:371 'datu' (temp highp uint)
+0:372 imageAtomicMin (global highp int)
+0:372 'im2Di' (layout(r32i ) uniform highp iimage2D)
+0:372 'P' (uniform highp 2-component vector of int)
+0:372 'dati' (temp highp int)
+0:373 imageAtomicMin (global highp uint)
+0:373 'im2Du' (layout(r32ui ) uniform highp uimage2D)
+0:373 'P' (uniform highp 2-component vector of int)
+0:373 'datu' (temp highp uint)
+0:374 imageAtomicMax (global highp int)
+0:374 'im2Di' (layout(r32i ) uniform highp iimage2D)
+0:374 'P' (uniform highp 2-component vector of int)
+0:374 'dati' (temp highp int)
+0:375 imageAtomicMax (global highp uint)
+0:375 'im2Du' (layout(r32ui ) uniform highp uimage2D)
+0:375 'P' (uniform highp 2-component vector of int)
+0:375 'datu' (temp highp uint)
+0:376 imageAtomicAnd (global highp int)
+0:376 'im2Di' (layout(r32i ) uniform highp iimage2D)
+0:376 'P' (uniform highp 2-component vector of int)
+0:376 'dati' (temp highp int)
+0:377 imageAtomicAnd (global highp uint)
+0:377 'im2Du' (layout(r32ui ) uniform highp uimage2D)
+0:377 'P' (uniform highp 2-component vector of int)
+0:377 'datu' (temp highp uint)
+0:378 imageAtomicOr (global highp int)
+0:378 'im2Di' (layout(r32i ) uniform highp iimage2D)
+0:378 'P' (uniform highp 2-component vector of int)
+0:378 'dati' (temp highp int)
+0:379 imageAtomicOr (global highp uint)
+0:379 'im2Du' (layout(r32ui ) uniform highp uimage2D)
+0:379 'P' (uniform highp 2-component vector of int)
+0:379 'datu' (temp highp uint)
+0:380 imageAtomicXor (global highp int)
+0:380 'im2Di' (layout(r32i ) uniform highp iimage2D)
+0:380 'P' (uniform highp 2-component vector of int)
+0:380 'dati' (temp highp int)
+0:381 imageAtomicXor (global highp uint)
+0:381 'im2Du' (layout(r32ui ) uniform highp uimage2D)
+0:381 'P' (uniform highp 2-component vector of int)
+0:381 'datu' (temp highp uint)
+0:382 imageAtomicExchange (global highp int)
+0:382 'im2Di' (layout(r32i ) uniform highp iimage2D)
+0:382 'P' (uniform highp 2-component vector of int)
+0:382 'dati' (temp highp int)
+0:383 imageAtomicExchange (global highp uint)
+0:383 'im2Du' (layout(r32ui ) uniform highp uimage2D)
+0:383 'P' (uniform highp 2-component vector of int)
+0:383 'datu' (temp highp uint)
+0:384 imageAtomicExchange (global highp float)
+0:384 'im2Df' (layout(r32f ) uniform highp image2D)
+0:384 'P' (uniform highp 2-component vector of int)
+0:384 'datf' (temp highp float)
+0:385 imageAtomicCompSwap (global highp int)
+0:385 'im2Di' (layout(r32i ) uniform highp iimage2D)
+0:385 'P' (uniform highp 2-component vector of int)
+0:385 Constant:
+0:385 3 (const int)
+0:385 'dati' (temp highp int)
+0:386 imageAtomicCompSwap (global highp uint)
+0:386 'im2Du' (layout(r32ui ) uniform highp uimage2D)
+0:386 'P' (uniform highp 2-component vector of int)
+0:386 Constant:
+0:386 5 (const uint)
+0:386 'datu' (temp highp uint)
+0:398 Function Definition: badInterp( (global void)
+0:398 Function Parameters:
+0:400 Sequence
+0:400 Constant:
+0:400 0.000000
+0:401 Constant:
+0:401 0.000000
+0:402 Constant:
+0:402 0.000000
+0:? Linker Objects
+0:? 's' (shared highp 4-component vector of float)
+0:? 'v' (buffer highp 4-component vector of float)
+0:? 'ini' (in highp int)
+0:? 'x' (layout(location=2 ) uniform highp 4X4 matrix of float)
+0:? 'y' (layout(location=3 ) uniform highp 4X4 matrix of float)
+0:? 'xi' (layout(location=2 ) smooth out highp 4X4 matrix of float)
+0:? 'yi' (layout(location=3 ) smooth out highp 4X4 matrix of float)
+0:? 's2dms' (uniform highp sampler2DMS)
+0:? 'is2dms' (uniform highp isampler2DMS)
+0:? 'us2dms' (uniform highp usampler2DMS)
+0:? 'us2dmsa' (uniform mediump usampler2DMSArray)
+0:? 'outb' (smooth out bool)
+0:? 'outo' (smooth out highp sampler2D)
+0:? 'outa' (smooth out 4-element array of highp float)
+0:? 'outaa' (smooth out 4-element array of 2-element array of highp float)
+0:? 'outs' (smooth out structure{global highp float f})
+0:? 'outasa' (smooth out 4-element array of structure{global highp float f})
+0:? 'outsa' (smooth out 4-element array of structure{global highp float f})
+0:? 'outSA' (smooth out structure{global 4-element array of highp float f})
+0:? 'outSS' (smooth out structure{global highp float f, global structure{global highp float f} s})
+0:? 'U430i' (layout(column_major std430 ) uniform block{layout(column_major std430 offset=0 ) uniform highp int a})
+0:? 'B430i' (layout(column_major std430 ) buffer block{layout(column_major std430 offset=0 ) buffer highp int a})
+0:? 'outbinst' (out block{out highp int a, out highp 4-component vector of float v, out highp sampler2D s})
+0:? 'anon@0' (out block{layout(location=12 ) out highp int aAnon, layout(location=13 ) out highp 4-component vector of float vAnon})
+0:? 'aliased' (layout(location=12 ) smooth out highp int)
+0:? 'inbinst' (in block{in highp int a})
+0:? 'anon@1' (out block{gl_Position highp 4-component vector of float Position gl_Position, })
+0:? 'smon' (smooth out block{out highp int i})
+0:? 'fmon' (flat out block{out highp int i})
+0:? 'cmon' (centroid out block{out highp int i})
+0:? 'imon' (invariant out block{out highp int i})
+0:? 'inf' (in highp 2-component vector of float)
+0:? 'ing' (in highp 2-component vector of float)
+0:? 'offsets' (uniform 4-element array of highp 2-component vector of int)
+0:? 'sArray' (uniform 4-element array of highp sampler2D)
+0:? 'sIndex' (uniform highp int)
+0:? 'auArray' (layout(binding=0 offset=0 ) uniform 2-element array of highp atomic_uint)
+0:? 'ubInst' (layout(column_major shared ) uniform 4-element array of block{layout(column_major shared ) uniform highp int i})
+0:? 'bbInst' (layout(column_major shared ) buffer 4-element array of block{layout(column_major shared ) buffer highp int i})
+0:? 'iArray' (writeonly uniform 5-element array of highp image2D)
+0:? 'constOffsets' (const 4-element array of highp 2-component vector of int)
+0:? 0 (const int)
+0:? 0 (const int)
+0:? 0 (const int)
+0:? 0 (const int)
+0:? 0 (const int)
+0:? 0 (const int)
+0:? 0 (const int)
+0:? 0 (const int)
+0:? 'badSamp1' (uniform mediump samplerBuffer)
+0:? 'badSamp2' (uniform mediump isamplerBuffer)
+0:? 'badSamp3' (uniform mediump usamplerBuffer)
+0:? 'badSamp4' (writeonly uniform mediump imageBuffer)
+0:? 'badSamp5' (writeonly uniform mediump iimageBuffer)
+0:? 'badSamp6' (writeonly uniform mediump uimageBuffer)
+0:? 'noPreSamp1' (uniform mediump samplerBuffer)
+0:? 'noPreSamp2' (uniform mediump isamplerBuffer)
+0:? 'noPreSamp3' (uniform mediump usamplerBuffer)
+0:? 'noPreSamp4' (writeonly uniform mediump imageBuffer)
+0:? 'noPreSamp5' (writeonly uniform mediump iimageBuffer)
+0:? 'noPreSamp6' (writeonly uniform mediump uimageBuffer)
+0:? 'bufSamp1' (uniform highp samplerBuffer)
+0:? 'bufSamp2' (uniform highp isamplerBuffer)
+0:? 'bufSamp3' (uniform highp usamplerBuffer)
+0:? 'bufSamp4' (writeonly uniform highp imageBuffer)
+0:? 'bufSamp5' (writeonly uniform highp iimageBuffer)
+0:? 'bufSamp6' (writeonly uniform highp uimageBuffer)
+0:? 'badCA1' (writeonly uniform mediump imageCubeArray)
+0:? 'badCA2' (writeonly uniform mediump iimageCubeArray)
+0:? 'badCA3' (writeonly uniform mediump uimageCubeArray)
+0:? 'badCA4' (uniform mediump samplerCubeArray)
+0:? 'badCA5' (uniform mediump samplerCubeArrayShadow)
+0:? 'badCA6' (uniform mediump isamplerCubeArray)
+0:? 'badCA7' (uniform mediump usamplerCubeArray)
+0:? 'noPreCA1' (writeonly uniform mediump imageCubeArray)
+0:? 'noPreCA2' (writeonly uniform mediump iimageCubeArray)
+0:? 'noPreCA3' (writeonly uniform mediump uimageCubeArray)
+0:? 'noPreCA4' (uniform mediump samplerCubeArray)
+0:? 'noPreCA5' (uniform mediump samplerCubeArrayShadow)
+0:? 'noPreCA6' (uniform mediump isamplerCubeArray)
+0:? 'noPreCA7' (uniform mediump usamplerCubeArray)
+0:? 'CA1' (writeonly uniform highp imageCubeArray)
+0:? 'CA2' (writeonly uniform highp iimageCubeArray)
+0:? 'CA3' (writeonly uniform highp uimageCubeArray)
+0:? 'rCA1' (layout(rgba16f ) readonly uniform highp imageCubeArray)
+0:? 'rCA2' (layout(rgba32i ) readonly uniform highp iimageCubeArray)
+0:? 'rCA3' (layout(r32ui ) readonly uniform highp uimageCubeArray)
+0:? 'CA4' (uniform highp samplerCubeArray)
+0:? 'CA5' (uniform highp samplerCubeArrayShadow)
+0:? 'CA6' (uniform highp isamplerCubeArray)
+0:? 'CA7' (uniform highp usamplerCubeArray)
+0:? 'bad2DMS' (uniform mediump sampler2DMSArray)
+0:? 'bad2DMSi' (uniform mediump isampler2DMSArray)
+0:? 'bad2DMSu' (uniform mediump usampler2DMSArray)
+0:? 'noPrec2DMS' (uniform mediump sampler2DMSArray)
+0:? 'noPrec2DMSi' (uniform mediump isampler2DMSArray)
+0:? 'noPrec2DMSu' (uniform mediump usampler2DMSArray)
+0:? 'samp2DMSA' (uniform highp sampler2DMSArray)
+0:? 'samp2DMSAi' (uniform highp isampler2DMSArray)
+0:? 'samp2DMSAu' (uniform highp usampler2DMSArray)
+0:? 'im2Df' (layout(r32f ) uniform highp image2D)
+0:? 'im2Du' (layout(r32ui ) uniform highp uimage2D)
+0:? 'im2Di' (layout(r32i ) uniform highp iimage2D)
+0:? 'P' (uniform highp 2-component vector of int)
+0:? 'colorSampInBad' (smooth sample out highp 4-component vector of float)
+0:? 'colorSample' (smooth sample out highp 4-component vector of float)
+0:? 'colorfsi' (flat sample out highp 4-component vector of float)
+0:? 'sampInArray' (smooth sample out 4-element array of highp 3-component vector of float)
+0:? 'inv4' (in highp 4-component vector of float)
+0:? 'gl_VertexID' (gl_VertexId highp int VertexId)
+0:? 'gl_InstanceID' (gl_InstanceId highp int InstanceId)
+
+
+Linked vertex stage:
+
+
+Shader version: 310
+Requested GL_EXT_texture_buffer
+Requested GL_OES_gpu_shader5
+Requested GL_OES_shader_image_atomic
+Requested GL_OES_shader_io_blocks
+Requested GL_OES_shader_multisample_interpolation
+Requested GL_OES_texture_buffer
+Requested GL_OES_texture_cube_map_array
+Requested GL_OES_texture_storage_multisample_2d_array
+ERROR: node is still EOpNull!
+0:12 Function Definition: main( (global void)
+0:12 Function Parameters:
+0:? Sequence
+0:15 move second child to first child (temp highp 2-component vector of uint)
+0:15 'u2' (temp highp 2-component vector of uint)
+0:15 addCarry (global highp 2-component vector of uint)
+0:15 'u2' (temp highp 2-component vector of uint)
+0:15 'u2' (temp highp 2-component vector of uint)
+0:15 'u2' (temp highp 2-component vector of uint)
+0:17 move second child to first child (temp highp uint)
+0:17 'u1' (temp highp uint)
+0:17 subBorrow (global highp uint)
+0:17 'u1' (temp highp uint)
+0:17 'u1' (temp highp uint)
+0:17 'u1' (temp highp uint)
+0:19 uMulExtended (global void)
+0:19 'u4' (temp highp 4-component vector of uint)
+0:19 'u4' (temp highp 4-component vector of uint)
+0:19 'u4' (temp highp 4-component vector of uint)
+0:19 'u4' (temp highp 4-component vector of uint)
+0:21 iMulExtended (global void)
+0:21 'i4' (temp highp 4-component vector of int)
+0:21 'i4' (temp highp 4-component vector of int)
+0:21 'i4' (temp highp 4-component vector of int)
+0:21 'i4' (temp highp 4-component vector of int)
+0:23 move second child to first child (temp highp int)
+0:23 'i1' (temp highp int)
+0:23 bitfieldExtract (global highp int)
+0:23 'i1' (temp highp int)
+0:23 Constant:
+0:23 4 (const int)
+0:23 Constant:
+0:23 5 (const int)
+0:25 move second child to first child (temp highp 3-component vector of uint)
+0:25 'u3' (temp highp 3-component vector of uint)
+0:25 bitfieldExtract (global highp 3-component vector of uint)
+0:25 'u3' (temp highp 3-component vector of uint)
+0:25 Constant:
+0:25 4 (const int)
+0:25 Constant:
+0:25 5 (const int)
+0:27 move second child to first child (temp highp 3-component vector of int)
+0:27 'i3' (temp highp 3-component vector of int)
+0:27 bitfieldInsert (global highp 3-component vector of int)
+0:27 'i3' (temp highp 3-component vector of int)
+0:27 'i3' (temp highp 3-component vector of int)
+0:27 Constant:
+0:27 4 (const int)
+0:27 Constant:
+0:27 5 (const int)
+0:28 move second child to first child (temp highp uint)
+0:28 'u1' (temp highp uint)
+0:28 bitfieldInsert (global highp uint)
+0:28 'u1' (temp highp uint)
+0:28 'u1' (temp highp uint)
+0:28 Constant:
+0:28 4 (const int)
+0:28 Constant:
+0:28 5 (const int)
+0:30 move second child to first child (temp highp 2-component vector of int)
+0:30 'i2' (temp highp 2-component vector of int)
+0:30 bitFieldReverse (global highp 2-component vector of int)
+0:30 'i2' (temp highp 2-component vector of int)
+0:31 move second child to first child (temp highp 4-component vector of uint)
+0:31 'u4' (temp highp 4-component vector of uint)
+0:31 bitFieldReverse (global highp 4-component vector of uint)
+0:31 'u4' (temp highp 4-component vector of uint)
+0:32 move second child to first child (temp highp int)
+0:32 'i1' (temp highp int)
+0:32 bitCount (global lowp int)
+0:32 'i1' (temp highp int)
+0:33 move second child to first child (temp highp 3-component vector of int)
+0:33 'i3' (temp highp 3-component vector of int)
+0:33 bitCount (global lowp 3-component vector of int)
+0:33 'u3' (temp highp 3-component vector of uint)
+0:34 move second child to first child (temp highp 2-component vector of int)
+0:34 'i2' (temp highp 2-component vector of int)
+0:34 findLSB (global lowp 2-component vector of int)
+0:34 'i2' (temp highp 2-component vector of int)
+0:35 move second child to first child (temp highp 4-component vector of int)
+0:35 'i4' (temp highp 4-component vector of int)
+0:35 findLSB (global lowp 4-component vector of int)
+0:35 'u4' (temp highp 4-component vector of uint)
+0:36 move second child to first child (temp highp int)
+0:36 'i1' (temp highp int)
+0:36 findMSB (global lowp int)
+0:36 'i1' (temp highp int)
+0:37 move second child to first child (temp highp 2-component vector of int)
+0:37 'i2' (temp highp 2-component vector of int)
+0:37 findMSB (global lowp 2-component vector of int)
+0:37 'u2' (temp highp 2-component vector of uint)
+0:40 move second child to first child (temp highp 3-component vector of float)
+0:40 'v3' (temp highp 3-component vector of float)
+0:40 frexp (global highp 3-component vector of float)
+0:40 'v3' (temp highp 3-component vector of float)
+0:40 'i3' (temp highp 3-component vector of int)
+0:42 move second child to first child (temp highp 2-component vector of float)
+0:42 'v2' (temp highp 2-component vector of float)
+0:42 ldexp (global highp 2-component vector of float)
+0:42 'v2' (temp highp 2-component vector of float)
+0:42 'i2' (temp highp 2-component vector of int)
+0:45 move second child to first child (temp highp uint)
+0:45 'u1' (temp highp uint)
+0:45 PackUnorm4x8 (global highp uint)
+0:45 'v4' (temp mediump 4-component vector of float)
+0:46 move second child to first child (temp highp uint)
+0:46 'u1' (temp highp uint)
+0:46 PackSnorm4x8 (global highp uint)
+0:46 'v4' (temp mediump 4-component vector of float)
+0:47 move second child to first child (temp mediump 4-component vector of float)
+0:47 'v4' (temp mediump 4-component vector of float)
+0:47 UnpackUnorm4x8 (global mediump 4-component vector of float)
+0:47 'u1' (temp highp uint)
+0:48 move second child to first child (temp mediump 4-component vector of float)
+0:48 'v4' (temp mediump 4-component vector of float)
+0:48 UnpackSnorm4x8 (global mediump 4-component vector of float)
+0:48 'u1' (temp highp uint)
+0:60 Function Definition: foo( (global void)
+0:60 Function Parameters:
+0:? Sequence
+0:63 move second child to first child (temp highp 2-component vector of int)
+0:63 'v2' (temp highp 2-component vector of int)
+0:63 textureSize (global highp 2-component vector of int)
+0:63 's2dms' (uniform highp sampler2DMS)
+0:64 move second child to first child (temp highp 2-component vector of int)
+0:64 'v2' (temp highp 2-component vector of int)
+0:64 textureSize (global highp 2-component vector of int)
+0:64 'us2dms' (uniform highp usampler2DMS)
+0:65 Sequence
+0:65 move second child to first child (temp highp 4-component vector of float)
+0:65 'v4' (temp highp 4-component vector of float)
+0:65 textureFetch (global highp 4-component vector of float)
+0:65 's2dms' (uniform highp sampler2DMS)
+0:65 'v2' (temp highp 2-component vector of int)
+0:65 Constant:
+0:65 2 (const int)
+0:66 Sequence
+0:66 move second child to first child (temp highp 4-component vector of int)
+0:66 'iv4' (temp highp 4-component vector of int)
+0:66 textureFetch (global highp 4-component vector of int)
+0:66 'is2dms' (uniform highp isampler2DMS)
+0:66 'v2' (temp highp 2-component vector of int)
+0:66 Constant:
+0:66 2 (const int)
+0:67 Constant:
+0:67 0.000000
+0:69 frexp (global highp float)
+0:69 'f' (temp highp float)
+0:69 'ini' (in highp int)
+0:114 Function Definition: foo_IO( (global void)
+0:114 Function Parameters:
+0:116 Sequence
+0:116 Sequence
+0:116 move second child to first child (temp highp int)
+0:116 'sum' (temp highp int)
+0:116 add (temp highp int)
+0:116 'gl_VertexID' (gl_VertexId highp int VertexId)
+0:117 'gl_InstanceID' (gl_InstanceId highp int InstanceId)
+0:118 move second child to first child (temp highp 4-component vector of float)
+0:118 gl_Position: direct index for structure (gl_Position highp 4-component vector of float Position)
+0:118 'anon@1' (out block{gl_Position highp 4-component vector of float Position gl_Position, })
+0:118 Constant:
+0:118 0 (const uint)
+0:118 Constant:
+0:118 1.000000
+0:118 1.000000
+0:118 1.000000
+0:118 1.000000
+0:119 gl_PointSize: direct index for structure (gl_PointSize highp void PointSize)
+0:119 'anon@1' (out block{gl_Position highp 4-component vector of float Position gl_Position, })
+0:119 Constant:
+0:119 1 (const uint)
+0:153 Function Definition: pfooBad( (global void)
+0:153 Function Parameters:
+0:? Sequence
+0:156 move second child to first child (temp highp 2-component vector of float)
+0:156 'h' (noContraction temp highp 2-component vector of float)
+0:156 fma (global highp 2-component vector of float)
+0:156 'inf' (in highp 2-component vector of float)
+0:156 'ing' (in highp 2-component vector of float)
+0:156 'h' (noContraction temp highp 2-component vector of float)
+0:157 indirect index (temp highp sampler2D)
+0:157 'sArray' (uniform 4-element array of highp sampler2D)
+0:157 add (temp highp int)
+0:157 'sIndex' (uniform highp int)
+0:157 Constant:
+0:157 1 (const int)
+0:158 indirect index (layout(binding=0 offset=0 ) temp highp atomic_uint)
+0:158 'auArray' (layout(binding=0 offset=0 ) uniform 2-element array of highp atomic_uint)
+0:158 add (temp highp int)
+0:158 'sIndex' (uniform highp int)
+0:158 Constant:
+0:158 1 (const int)
+0:159 direct index (layout(column_major shared ) temp block{layout(column_major shared ) uniform highp int i})
+0:159 'ubInst' (layout(column_major shared ) uniform 4-element array of block{layout(column_major shared ) uniform highp int i})
+0:159 Constant:
+0:159 1 (const int)
+0:160 direct index (layout(column_major shared ) temp block{layout(column_major shared ) buffer highp int i})
+0:160 'bbInst' (layout(column_major shared ) buffer 4-element array of block{layout(column_major shared ) buffer highp int i})
+0:160 Constant:
+0:160 2 (const int)
+0:161 indirect index (layout(column_major shared ) temp block{layout(column_major shared ) uniform highp int i})
+0:161 'ubInst' (layout(column_major shared ) uniform 4-element array of block{layout(column_major shared ) uniform highp int i})
+0:161 add (temp highp int)
+0:161 'sIndex' (uniform highp int)
+0:161 Constant:
+0:161 1 (const int)
+0:162 indirect index (layout(column_major shared ) temp block{layout(column_major shared ) buffer highp int i})
+0:162 'bbInst' (layout(column_major shared ) buffer 4-element array of block{layout(column_major shared ) buffer highp int i})
+0:162 'sIndex' (uniform highp int)
+0:163 direct index (writeonly temp highp image2D)
+0:163 'iArray' (writeonly uniform 5-element array of highp image2D)
+0:163 Constant:
+0:163 2 (const int)
+0:164 indirect index (writeonly temp highp image2D)
+0:164 'iArray' (writeonly uniform 5-element array of highp image2D)
+0:164 component-wise multiply (temp highp int)
+0:164 'sIndex' (uniform highp int)
+0:164 Constant:
+0:164 2 (const int)
+0:165 textureGatherOffset (global highp 4-component vector of float)
+0:165 direct index (temp highp sampler2D)
+0:165 'sArray' (uniform 4-element array of highp sampler2D)
+0:165 Constant:
+0:165 0 (const int)
+0:165 Constant:
+0:165 0.100000
+0:165 0.100000
+0:165 Convert float to int (temp highp 2-component vector of int)
+0:165 'inf' (in highp 2-component vector of float)
+0:166 textureGatherOffsets (global highp 4-component vector of float)
+0:166 direct index (temp highp sampler2D)
+0:166 'sArray' (uniform 4-element array of highp sampler2D)
+0:166 Constant:
+0:166 0 (const int)
+0:166 Constant:
+0:166 0.100000
+0:166 0.100000
+0:166 Constant:
+0:166 0 (const int)
+0:166 0 (const int)
+0:166 0 (const int)
+0:166 0 (const int)
+0:166 0 (const int)
+0:166 0 (const int)
+0:166 0 (const int)
+0:166 0 (const int)
+0:171 Function Definition: pfoo( (global void)
+0:171 Function Parameters:
+0:? Sequence
+0:174 move second child to first child (temp highp 2-component vector of float)
+0:174 'h' (noContraction temp highp 2-component vector of float)
+0:174 fma (global highp 2-component vector of float)
+0:174 'inf' (in highp 2-component vector of float)
+0:174 'ing' (in highp 2-component vector of float)
+0:174 'h' (noContraction temp highp 2-component vector of float)
+0:175 indirect index (temp highp sampler2D)
+0:175 'sArray' (uniform 4-element array of highp sampler2D)
+0:175 add (temp highp int)
+0:175 'sIndex' (uniform highp int)
+0:175 Constant:
+0:175 1 (const int)
+0:176 indirect index (layout(column_major shared ) temp block{layout(column_major shared ) uniform highp int i})
+0:176 'ubInst' (layout(column_major shared ) uniform 4-element array of block{layout(column_major shared ) uniform highp int i})
+0:176 add (temp highp int)
+0:176 'sIndex' (uniform highp int)
+0:176 Constant:
+0:176 1 (const int)
+0:177 indirect index (layout(column_major shared ) temp block{layout(column_major shared ) buffer highp int i})
+0:177 'bbInst' (layout(column_major shared ) buffer 4-element array of block{layout(column_major shared ) buffer highp int i})
+0:177 subtract (temp highp int)
+0:177 'sIndex' (uniform highp int)
+0:177 Constant:
+0:177 2 (const int)
+0:178 direct index (writeonly temp highp image2D)
+0:178 'iArray' (writeonly uniform 5-element array of highp image2D)
+0:178 Constant:
+0:178 2 (const int)
+0:179 indirect index (writeonly temp highp image2D)
+0:179 'iArray' (writeonly uniform 5-element array of highp image2D)
+0:179 subtract (temp highp int)
+0:179 'sIndex' (uniform highp int)
+0:179 Constant:
+0:179 2 (const int)
+0:180 textureGatherOffset (global highp 4-component vector of float)
+0:180 direct index (temp highp sampler2D)
+0:180 'sArray' (uniform 4-element array of highp sampler2D)
+0:180 Constant:
+0:180 0 (const int)
+0:180 Constant:
+0:180 0.100000
+0:180 0.100000
+0:180 Convert float to int (temp highp 2-component vector of int)
+0:180 'inf' (in highp 2-component vector of float)
+0:181 textureGatherOffsets (global highp 4-component vector of float)
+0:181 direct index (temp highp sampler2D)
+0:181 'sArray' (uniform 4-element array of highp sampler2D)
+0:181 Constant:
+0:181 0 (const int)
+0:181 Constant:
+0:181 0.100000
+0:181 0.100000
+0:181 Constant:
+0:181 0 (const int)
+0:181 0 (const int)
+0:181 0 (const int)
+0:181 0 (const int)
+0:181 0 (const int)
+0:181 0 (const int)
+0:181 0 (const int)
+0:181 0 (const int)
+0:182 textureGatherOffsets (global highp 4-component vector of float)
+0:182 direct index (temp highp sampler2D)
+0:182 'sArray' (uniform 4-element array of highp sampler2D)
+0:182 Constant:
+0:182 0 (const int)
+0:182 Constant:
+0:182 0.100000
+0:182 0.100000
+0:182 'offsets' (uniform 4-element array of highp 2-component vector of int)
+0:220 Function Definition: bufferT( (global void)
+0:220 Function Parameters:
+0:222 Sequence
+0:222 Sequence
+0:222 move second child to first child (temp highp int)
+0:222 's1' (temp highp int)
+0:222 textureSize (global highp int)
+0:222 'bufSamp1' (uniform highp samplerBuffer)
+0:223 Sequence
+0:223 move second child to first child (temp highp int)
+0:223 's2' (temp highp int)
+0:223 textureSize (global highp int)
+0:223 'bufSamp2' (uniform highp isamplerBuffer)
+0:224 Sequence
+0:224 move second child to first child (temp highp int)
+0:224 's3' (temp highp int)
+0:224 textureSize (global highp int)
+0:224 'bufSamp3' (uniform highp usamplerBuffer)
+0:226 Sequence
+0:226 move second child to first child (temp highp int)
+0:226 's4' (temp highp int)
+0:226 imageQuerySize (global highp int)
+0:226 'bufSamp4' (writeonly uniform highp imageBuffer)
+0:227 Sequence
+0:227 move second child to first child (temp highp int)
+0:227 's5' (temp highp int)
+0:227 imageQuerySize (global highp int)
+0:227 'bufSamp5' (writeonly uniform highp iimageBuffer)
+0:228 Sequence
+0:228 move second child to first child (temp highp int)
+0:228 's6' (temp highp int)
+0:228 imageQuerySize (global highp int)
+0:228 'bufSamp6' (writeonly uniform highp uimageBuffer)
+0:230 Sequence
+0:230 move second child to first child (temp highp 4-component vector of float)
+0:230 'f1' (temp highp 4-component vector of float)
+0:230 textureFetch (global highp 4-component vector of float)
+0:230 'bufSamp1' (uniform highp samplerBuffer)
+0:230 's1' (temp highp int)
+0:231 Sequence
+0:231 move second child to first child (temp highp 4-component vector of int)
+0:231 'f2' (temp highp 4-component vector of int)
+0:231 textureFetch (global highp 4-component vector of int)
+0:231 'bufSamp2' (uniform highp isamplerBuffer)
+0:231 's2' (temp highp int)
+0:232 Sequence
+0:232 move second child to first child (temp highp 4-component vector of uint)
+0:232 'f3' (temp highp 4-component vector of uint)
+0:232 textureFetch (global highp 4-component vector of uint)
+0:232 'bufSamp3' (uniform highp usamplerBuffer)
+0:232 's3' (temp highp int)
+0:279 Function Definition: CAT( (global void)
+0:279 Function Parameters:
+0:281 Sequence
+0:281 Sequence
+0:281 move second child to first child (temp highp 3-component vector of int)
+0:281 's4' (temp highp 3-component vector of int)
+0:281 textureSize (global highp 3-component vector of int)
+0:281 'CA4' (uniform highp samplerCubeArray)
+0:281 Constant:
+0:281 1 (const int)
+0:282 Sequence
+0:282 move second child to first child (temp highp 3-component vector of int)
+0:282 's5' (temp highp 3-component vector of int)
+0:282 textureSize (global highp 3-component vector of int)
+0:282 'CA5' (uniform highp samplerCubeArrayShadow)
+0:282 Constant:
+0:282 1 (const int)
+0:283 Sequence
+0:283 move second child to first child (temp highp 3-component vector of int)
+0:283 's6' (temp highp 3-component vector of int)
+0:283 textureSize (global highp 3-component vector of int)
+0:283 'CA6' (uniform highp isamplerCubeArray)
+0:283 Constant:
+0:283 1 (const int)
+0:284 Sequence
+0:284 move second child to first child (temp highp 3-component vector of int)
+0:284 's7' (temp highp 3-component vector of int)
+0:284 textureSize (global highp 3-component vector of int)
+0:284 'CA7' (uniform highp usamplerCubeArray)
+0:284 Constant:
+0:284 1 (const int)
+0:286 Sequence
+0:286 move second child to first child (temp highp 4-component vector of float)
+0:286 't4' (temp highp 4-component vector of float)
+0:286 texture (global highp 4-component vector of float)
+0:286 'CA4' (uniform highp samplerCubeArray)
+0:286 Constant:
+0:286 0.500000
+0:286 0.500000
+0:286 0.500000
+0:286 0.500000
+0:287 Sequence
+0:287 move second child to first child (temp highp float)
+0:287 't5' (temp highp float)
+0:287 texture (global highp float)
+0:287 'CA5' (uniform highp samplerCubeArrayShadow)
+0:287 Constant:
+0:287 0.500000
+0:287 0.500000
+0:287 0.500000
+0:287 0.500000
+0:287 Constant:
+0:287 3.000000
+0:288 Sequence
+0:288 move second child to first child (temp highp 4-component vector of int)
+0:288 't6' (temp highp 4-component vector of int)
+0:288 texture (global highp 4-component vector of int)
+0:288 'CA6' (uniform highp isamplerCubeArray)
+0:288 Constant:
+0:288 0.500000
+0:288 0.500000
+0:288 0.500000
+0:288 0.500000
+0:289 Sequence
+0:289 move second child to first child (temp highp 4-component vector of uint)
+0:289 't7' (temp highp 4-component vector of uint)
+0:289 texture (global highp 4-component vector of uint)
+0:289 'CA7' (uniform highp usamplerCubeArray)
+0:289 Constant:
+0:289 0.500000
+0:289 0.500000
+0:289 0.500000
+0:289 0.500000
+0:291 Sequence
+0:291 move second child to first child (temp highp 4-component vector of float)
+0:291 'L4' (temp highp 4-component vector of float)
+0:291 textureLod (global highp 4-component vector of float)
+0:291 'CA4' (uniform highp samplerCubeArray)
+0:291 Constant:
+0:291 0.500000
+0:291 0.500000
+0:291 0.500000
+0:291 0.500000
+0:291 Constant:
+0:291 0.240000
+0:292 Sequence
+0:292 move second child to first child (temp highp 4-component vector of int)
+0:292 'L6' (temp highp 4-component vector of int)
+0:292 textureLod (global highp 4-component vector of int)
+0:292 'CA6' (uniform highp isamplerCubeArray)
+0:292 Constant:
+0:292 0.500000
+0:292 0.500000
+0:292 0.500000
+0:292 0.500000
+0:292 Constant:
+0:292 0.260000
+0:293 Sequence
+0:293 move second child to first child (temp highp 4-component vector of uint)
+0:293 'L7' (temp highp 4-component vector of uint)
+0:293 textureLod (global highp 4-component vector of uint)
+0:293 'CA7' (uniform highp usamplerCubeArray)
+0:293 Constant:
+0:293 0.500000
+0:293 0.500000
+0:293 0.500000
+0:293 0.500000
+0:293 Constant:
+0:293 0.270000
+0:295 Sequence
+0:295 move second child to first child (temp highp 4-component vector of float)
+0:295 'g4' (temp highp 4-component vector of float)
+0:295 textureGrad (global highp 4-component vector of float)
+0:295 'CA4' (uniform highp samplerCubeArray)
+0:295 Constant:
+0:295 0.500000
+0:295 0.500000
+0:295 0.500000
+0:295 0.500000
+0:295 Constant:
+0:295 0.100000
+0:295 0.100000
+0:295 0.100000
+0:295 Constant:
+0:295 0.200000
+0:295 0.200000
+0:295 0.200000
+0:296 Sequence
+0:296 move second child to first child (temp highp 4-component vector of int)
+0:296 'g6' (temp highp 4-component vector of int)
+0:296 textureGrad (global highp 4-component vector of int)
+0:296 'CA6' (uniform highp isamplerCubeArray)
+0:296 Constant:
+0:296 0.500000
+0:296 0.500000
+0:296 0.500000
+0:296 0.500000
+0:296 Constant:
+0:296 0.100000
+0:296 0.100000
+0:296 0.100000
+0:296 Constant:
+0:296 0.200000
+0:296 0.200000
+0:296 0.200000
+0:297 Sequence
+0:297 move second child to first child (temp highp 4-component vector of uint)
+0:297 'g7' (temp highp 4-component vector of uint)
+0:297 textureGrad (global highp 4-component vector of uint)
+0:297 'CA7' (uniform highp usamplerCubeArray)
+0:297 Constant:
+0:297 0.500000
+0:297 0.500000
+0:297 0.500000
+0:297 0.500000
+0:297 Constant:
+0:297 0.100000
+0:297 0.100000
+0:297 0.100000
+0:297 Constant:
+0:297 0.200000
+0:297 0.200000
+0:297 0.200000
+0:299 Sequence
+0:299 move second child to first child (temp highp 4-component vector of float)
+0:299 'gath4' (temp highp 4-component vector of float)
+0:299 textureGather (global highp 4-component vector of float)
+0:299 'CA4' (uniform highp samplerCubeArray)
+0:299 Constant:
+0:299 0.500000
+0:299 0.500000
+0:299 0.500000
+0:299 0.500000
+0:300 Sequence
+0:300 move second child to first child (temp highp 4-component vector of float)
+0:300 'gathC4' (temp highp 4-component vector of float)
+0:300 textureGather (global highp 4-component vector of float)
+0:300 'CA4' (uniform highp samplerCubeArray)
+0:300 Constant:
+0:300 0.500000
+0:300 0.500000
+0:300 0.500000
+0:300 0.500000
+0:300 Constant:
+0:300 2 (const int)
+0:301 Sequence
+0:301 move second child to first child (temp highp 4-component vector of int)
+0:301 'gath6' (temp highp 4-component vector of int)
+0:301 textureGather (global highp 4-component vector of int)
+0:301 'CA6' (uniform highp isamplerCubeArray)
+0:301 Constant:
+0:301 0.500000
+0:301 0.500000
+0:301 0.500000
+0:301 0.500000
+0:302 Sequence
+0:302 move second child to first child (temp highp 4-component vector of int)
+0:302 'gathC6' (temp highp 4-component vector of int)
+0:302 textureGather (global highp 4-component vector of int)
+0:302 'CA6' (uniform highp isamplerCubeArray)
+0:302 Constant:
+0:302 0.500000
+0:302 0.500000
+0:302 0.500000
+0:302 0.500000
+0:302 Constant:
+0:302 1 (const int)
+0:303 Sequence
+0:303 move second child to first child (temp highp 4-component vector of uint)
+0:303 'gath7' (temp highp 4-component vector of uint)
+0:303 textureGather (global highp 4-component vector of uint)
+0:303 'CA7' (uniform highp usamplerCubeArray)
+0:303 Constant:
+0:303 0.500000
+0:303 0.500000
+0:303 0.500000
+0:303 0.500000
+0:304 Sequence
+0:304 move second child to first child (temp highp 4-component vector of uint)
+0:304 'gathC7' (temp highp 4-component vector of uint)
+0:304 textureGather (global highp 4-component vector of uint)
+0:304 'CA7' (uniform highp usamplerCubeArray)
+0:304 Constant:
+0:304 0.500000
+0:304 0.500000
+0:304 0.500000
+0:304 0.500000
+0:304 Constant:
+0:304 0 (const int)
+0:306 Sequence
+0:306 move second child to first child (temp highp 4-component vector of float)
+0:306 'gath5' (temp highp 4-component vector of float)
+0:306 textureGather (global highp 4-component vector of float)
+0:306 'CA5' (uniform highp samplerCubeArrayShadow)
+0:306 Constant:
+0:306 0.500000
+0:306 0.500000
+0:306 0.500000
+0:306 0.500000
+0:306 Constant:
+0:306 2.500000
+0:308 Sequence
+0:308 move second child to first child (temp highp 3-component vector of int)
+0:308 's1' (temp highp 3-component vector of int)
+0:308 imageQuerySize (global highp 3-component vector of int)
+0:308 'CA1' (writeonly uniform highp imageCubeArray)
+0:309 Sequence
+0:309 move second child to first child (temp highp 3-component vector of int)
+0:309 's2' (temp highp 3-component vector of int)
+0:309 imageQuerySize (global highp 3-component vector of int)
+0:309 'CA2' (writeonly uniform highp iimageCubeArray)
+0:310 Sequence
+0:310 move second child to first child (temp highp 3-component vector of int)
+0:310 's3' (temp highp 3-component vector of int)
+0:310 imageQuerySize (global highp 3-component vector of int)
+0:310 'CA3' (writeonly uniform highp uimageCubeArray)
+0:312 imageStore (global highp void)
+0:312 'CA1' (writeonly uniform highp imageCubeArray)
+0:312 's3' (temp highp 3-component vector of int)
+0:312 Constant:
+0:312 1.000000
+0:312 1.000000
+0:312 1.000000
+0:312 1.000000
+0:313 imageStore (global highp void)
+0:313 'CA2' (writeonly uniform highp iimageCubeArray)
+0:313 's3' (temp highp 3-component vector of int)
+0:313 Constant:
+0:313 1 (const int)
+0:313 1 (const int)
+0:313 1 (const int)
+0:313 1 (const int)
+0:314 imageStore (global highp void)
+0:314 'CA3' (writeonly uniform highp uimageCubeArray)
+0:314 's3' (temp highp 3-component vector of int)
+0:314 Constant:
+0:314 1 (const uint)
+0:314 1 (const uint)
+0:314 1 (const uint)
+0:314 1 (const uint)
+0:316 Sequence
+0:316 move second child to first child (temp highp 4-component vector of float)
+0:316 'cl1' (temp highp 4-component vector of float)
+0:316 imageLoad (global highp 4-component vector of float)
+0:316 'rCA1' (layout(rgba16f ) readonly uniform highp imageCubeArray)
+0:316 's3' (temp highp 3-component vector of int)
+0:317 Sequence
+0:317 move second child to first child (temp highp 4-component vector of int)
+0:317 'cl2' (temp highp 4-component vector of int)
+0:317 imageLoad (global highp 4-component vector of int)
+0:317 'rCA2' (layout(rgba32i ) readonly uniform highp iimageCubeArray)
+0:317 's3' (temp highp 3-component vector of int)
+0:318 Sequence
+0:318 move second child to first child (temp highp 4-component vector of uint)
+0:318 'cl3' (temp highp 4-component vector of uint)
+0:318 imageLoad (global highp 4-component vector of uint)
+0:318 'rCA3' (layout(r32ui ) readonly uniform highp uimageCubeArray)
+0:318 's3' (temp highp 3-component vector of int)
+0:343 Function Definition: MSA( (global void)
+0:343 Function Parameters:
+0:345 Sequence
+0:345 Sequence
+0:345 move second child to first child (temp highp 4-component vector of float)
+0:345 'tf' (temp highp 4-component vector of float)
+0:345 textureFetch (global highp 4-component vector of float)
+0:345 'samp2DMSA' (uniform highp sampler2DMSArray)
+0:345 Constant:
+0:345 5 (const int)
+0:345 5 (const int)
+0:345 5 (const int)
+0:345 Constant:
+0:345 2 (const int)
+0:346 Sequence
+0:346 move second child to first child (temp highp 4-component vector of int)
+0:346 'tfi' (temp highp 4-component vector of int)
+0:346 textureFetch (global highp 4-component vector of int)
+0:346 'samp2DMSAi' (uniform highp isampler2DMSArray)
+0:346 Constant:
+0:346 5 (const int)
+0:346 5 (const int)
+0:346 5 (const int)
+0:346 Constant:
+0:346 2 (const int)
+0:347 Sequence
+0:347 move second child to first child (temp highp 4-component vector of uint)
+0:347 'tfu' (temp highp 4-component vector of uint)
+0:347 textureFetch (global highp 4-component vector of uint)
+0:347 'samp2DMSAu' (uniform highp usampler2DMSArray)
+0:347 Constant:
+0:347 5 (const int)
+0:347 5 (const int)
+0:347 5 (const int)
+0:347 Constant:
+0:347 2 (const int)
+0:349 Sequence
+0:349 move second child to first child (temp highp 3-component vector of int)
+0:349 'tfs' (temp highp 3-component vector of int)
+0:349 textureSize (global highp 3-component vector of int)
+0:349 'samp2DMSA' (uniform highp sampler2DMSArray)
+0:350 Sequence
+0:350 move second child to first child (temp highp 3-component vector of int)
+0:350 'tfsi' (temp highp 3-component vector of int)
+0:350 textureSize (global highp 3-component vector of int)
+0:350 'samp2DMSAi' (uniform highp isampler2DMSArray)
+0:352 Sequence
+0:352 move second child to first child (temp highp 3-component vector of int)
+0:352 'tfsu' (temp highp 3-component vector of int)
+0:352 textureSize (global highp 3-component vector of int)
+0:352 'samp2DMSAu' (uniform highp usampler2DMSArray)
+0:364 Function Definition: goodImageAtom( (global void)
+0:364 Function Parameters:
+0:? Sequence
+0:370 imageAtomicAdd (global highp int)
+0:370 'im2Di' (layout(r32i ) uniform highp iimage2D)
+0:370 'P' (uniform highp 2-component vector of int)
+0:370 'dati' (temp highp int)
+0:371 imageAtomicAdd (global highp uint)
+0:371 'im2Du' (layout(r32ui ) uniform highp uimage2D)
+0:371 'P' (uniform highp 2-component vector of int)
+0:371 'datu' (temp highp uint)
+0:372 imageAtomicMin (global highp int)
+0:372 'im2Di' (layout(r32i ) uniform highp iimage2D)
+0:372 'P' (uniform highp 2-component vector of int)
+0:372 'dati' (temp highp int)
+0:373 imageAtomicMin (global highp uint)
+0:373 'im2Du' (layout(r32ui ) uniform highp uimage2D)
+0:373 'P' (uniform highp 2-component vector of int)
+0:373 'datu' (temp highp uint)
+0:374 imageAtomicMax (global highp int)
+0:374 'im2Di' (layout(r32i ) uniform highp iimage2D)
+0:374 'P' (uniform highp 2-component vector of int)
+0:374 'dati' (temp highp int)
+0:375 imageAtomicMax (global highp uint)
+0:375 'im2Du' (layout(r32ui ) uniform highp uimage2D)
+0:375 'P' (uniform highp 2-component vector of int)
+0:375 'datu' (temp highp uint)
+0:376 imageAtomicAnd (global highp int)
+0:376 'im2Di' (layout(r32i ) uniform highp iimage2D)
+0:376 'P' (uniform highp 2-component vector of int)
+0:376 'dati' (temp highp int)
+0:377 imageAtomicAnd (global highp uint)
+0:377 'im2Du' (layout(r32ui ) uniform highp uimage2D)
+0:377 'P' (uniform highp 2-component vector of int)
+0:377 'datu' (temp highp uint)
+0:378 imageAtomicOr (global highp int)
+0:378 'im2Di' (layout(r32i ) uniform highp iimage2D)
+0:378 'P' (uniform highp 2-component vector of int)
+0:378 'dati' (temp highp int)
+0:379 imageAtomicOr (global highp uint)
+0:379 'im2Du' (layout(r32ui ) uniform highp uimage2D)
+0:379 'P' (uniform highp 2-component vector of int)
+0:379 'datu' (temp highp uint)
+0:380 imageAtomicXor (global highp int)
+0:380 'im2Di' (layout(r32i ) uniform highp iimage2D)
+0:380 'P' (uniform highp 2-component vector of int)
+0:380 'dati' (temp highp int)
+0:381 imageAtomicXor (global highp uint)
+0:381 'im2Du' (layout(r32ui ) uniform highp uimage2D)
+0:381 'P' (uniform highp 2-component vector of int)
+0:381 'datu' (temp highp uint)
+0:382 imageAtomicExchange (global highp int)
+0:382 'im2Di' (layout(r32i ) uniform highp iimage2D)
+0:382 'P' (uniform highp 2-component vector of int)
+0:382 'dati' (temp highp int)
+0:383 imageAtomicExchange (global highp uint)
+0:383 'im2Du' (layout(r32ui ) uniform highp uimage2D)
+0:383 'P' (uniform highp 2-component vector of int)
+0:383 'datu' (temp highp uint)
+0:384 imageAtomicExchange (global highp float)
+0:384 'im2Df' (layout(r32f ) uniform highp image2D)
+0:384 'P' (uniform highp 2-component vector of int)
+0:384 'datf' (temp highp float)
+0:385 imageAtomicCompSwap (global highp int)
+0:385 'im2Di' (layout(r32i ) uniform highp iimage2D)
+0:385 'P' (uniform highp 2-component vector of int)
+0:385 Constant:
+0:385 3 (const int)
+0:385 'dati' (temp highp int)
+0:386 imageAtomicCompSwap (global highp uint)
+0:386 'im2Du' (layout(r32ui ) uniform highp uimage2D)
+0:386 'P' (uniform highp 2-component vector of int)
+0:386 Constant:
+0:386 5 (const uint)
+0:386 'datu' (temp highp uint)
+0:398 Function Definition: badInterp( (global void)
+0:398 Function Parameters:
+0:400 Sequence
+0:400 Constant:
+0:400 0.000000
+0:401 Constant:
+0:401 0.000000
+0:402 Constant:
+0:402 0.000000
+0:? Linker Objects
+0:? 's' (shared highp 4-component vector of float)
+0:? 'v' (buffer highp 4-component vector of float)
+0:? 'ini' (in highp int)
+0:? 'x' (layout(location=2 ) uniform highp 4X4 matrix of float)
+0:? 'y' (layout(location=3 ) uniform highp 4X4 matrix of float)
+0:? 'xi' (layout(location=2 ) smooth out highp 4X4 matrix of float)
+0:? 'yi' (layout(location=3 ) smooth out highp 4X4 matrix of float)
+0:? 's2dms' (uniform highp sampler2DMS)
+0:? 'is2dms' (uniform highp isampler2DMS)
+0:? 'us2dms' (uniform highp usampler2DMS)
+0:? 'us2dmsa' (uniform mediump usampler2DMSArray)
+0:? 'outb' (smooth out bool)
+0:? 'outo' (smooth out highp sampler2D)
+0:? 'outa' (smooth out 4-element array of highp float)
+0:? 'outaa' (smooth out 4-element array of 2-element array of highp float)
+0:? 'outs' (smooth out structure{global highp float f})
+0:? 'outasa' (smooth out 4-element array of structure{global highp float f})
+0:? 'outsa' (smooth out 4-element array of structure{global highp float f})
+0:? 'outSA' (smooth out structure{global 4-element array of highp float f})
+0:? 'outSS' (smooth out structure{global highp float f, global structure{global highp float f} s})
+0:? 'U430i' (layout(column_major std430 ) uniform block{layout(column_major std430 offset=0 ) uniform highp int a})
+0:? 'B430i' (layout(column_major std430 ) buffer block{layout(column_major std430 offset=0 ) buffer highp int a})
+0:? 'outbinst' (out block{out highp int a, out highp 4-component vector of float v, out highp sampler2D s})
+0:? 'anon@0' (out block{layout(location=12 ) out highp int aAnon, layout(location=13 ) out highp 4-component vector of float vAnon})
+0:? 'aliased' (layout(location=12 ) smooth out highp int)
+0:? 'inbinst' (in block{in highp int a})
+0:? 'anon@1' (out block{gl_Position highp 4-component vector of float Position gl_Position, })
+0:? 'smon' (smooth out block{out highp int i})
+0:? 'fmon' (flat out block{out highp int i})
+0:? 'cmon' (centroid out block{out highp int i})
+0:? 'imon' (invariant out block{out highp int i})
+0:? 'inf' (in highp 2-component vector of float)
+0:? 'ing' (in highp 2-component vector of float)
+0:? 'offsets' (uniform 4-element array of highp 2-component vector of int)
+0:? 'sArray' (uniform 4-element array of highp sampler2D)
+0:? 'sIndex' (uniform highp int)
+0:? 'auArray' (layout(binding=0 offset=0 ) uniform 2-element array of highp atomic_uint)
+0:? 'ubInst' (layout(column_major shared ) uniform 4-element array of block{layout(column_major shared ) uniform highp int i})
+0:? 'bbInst' (layout(column_major shared ) buffer 4-element array of block{layout(column_major shared ) buffer highp int i})
+0:? 'iArray' (writeonly uniform 5-element array of highp image2D)
+0:? 'constOffsets' (const 4-element array of highp 2-component vector of int)
+0:? 0 (const int)
+0:? 0 (const int)
+0:? 0 (const int)
+0:? 0 (const int)
+0:? 0 (const int)
+0:? 0 (const int)
+0:? 0 (const int)
+0:? 0 (const int)
+0:? 'badSamp1' (uniform mediump samplerBuffer)
+0:? 'badSamp2' (uniform mediump isamplerBuffer)
+0:? 'badSamp3' (uniform mediump usamplerBuffer)
+0:? 'badSamp4' (writeonly uniform mediump imageBuffer)
+0:? 'badSamp5' (writeonly uniform mediump iimageBuffer)
+0:? 'badSamp6' (writeonly uniform mediump uimageBuffer)
+0:? 'noPreSamp1' (uniform mediump samplerBuffer)
+0:? 'noPreSamp2' (uniform mediump isamplerBuffer)
+0:? 'noPreSamp3' (uniform mediump usamplerBuffer)
+0:? 'noPreSamp4' (writeonly uniform mediump imageBuffer)
+0:? 'noPreSamp5' (writeonly uniform mediump iimageBuffer)
+0:? 'noPreSamp6' (writeonly uniform mediump uimageBuffer)
+0:? 'bufSamp1' (uniform highp samplerBuffer)
+0:? 'bufSamp2' (uniform highp isamplerBuffer)
+0:? 'bufSamp3' (uniform highp usamplerBuffer)
+0:? 'bufSamp4' (writeonly uniform highp imageBuffer)
+0:? 'bufSamp5' (writeonly uniform highp iimageBuffer)
+0:? 'bufSamp6' (writeonly uniform highp uimageBuffer)
+0:? 'badCA1' (writeonly uniform mediump imageCubeArray)
+0:? 'badCA2' (writeonly uniform mediump iimageCubeArray)
+0:? 'badCA3' (writeonly uniform mediump uimageCubeArray)
+0:? 'badCA4' (uniform mediump samplerCubeArray)
+0:? 'badCA5' (uniform mediump samplerCubeArrayShadow)
+0:? 'badCA6' (uniform mediump isamplerCubeArray)
+0:? 'badCA7' (uniform mediump usamplerCubeArray)
+0:? 'noPreCA1' (writeonly uniform mediump imageCubeArray)
+0:? 'noPreCA2' (writeonly uniform mediump iimageCubeArray)
+0:? 'noPreCA3' (writeonly uniform mediump uimageCubeArray)
+0:? 'noPreCA4' (uniform mediump samplerCubeArray)
+0:? 'noPreCA5' (uniform mediump samplerCubeArrayShadow)
+0:? 'noPreCA6' (uniform mediump isamplerCubeArray)
+0:? 'noPreCA7' (uniform mediump usamplerCubeArray)
+0:? 'CA1' (writeonly uniform highp imageCubeArray)
+0:? 'CA2' (writeonly uniform highp iimageCubeArray)
+0:? 'CA3' (writeonly uniform highp uimageCubeArray)
+0:? 'rCA1' (layout(rgba16f ) readonly uniform highp imageCubeArray)
+0:? 'rCA2' (layout(rgba32i ) readonly uniform highp iimageCubeArray)
+0:? 'rCA3' (layout(r32ui ) readonly uniform highp uimageCubeArray)
+0:? 'CA4' (uniform highp samplerCubeArray)
+0:? 'CA5' (uniform highp samplerCubeArrayShadow)
+0:? 'CA6' (uniform highp isamplerCubeArray)
+0:? 'CA7' (uniform highp usamplerCubeArray)
+0:? 'bad2DMS' (uniform mediump sampler2DMSArray)
+0:? 'bad2DMSi' (uniform mediump isampler2DMSArray)
+0:? 'bad2DMSu' (uniform mediump usampler2DMSArray)
+0:? 'noPrec2DMS' (uniform mediump sampler2DMSArray)
+0:? 'noPrec2DMSi' (uniform mediump isampler2DMSArray)
+0:? 'noPrec2DMSu' (uniform mediump usampler2DMSArray)
+0:? 'samp2DMSA' (uniform highp sampler2DMSArray)
+0:? 'samp2DMSAi' (uniform highp isampler2DMSArray)
+0:? 'samp2DMSAu' (uniform highp usampler2DMSArray)
+0:? 'im2Df' (layout(r32f ) uniform highp image2D)
+0:? 'im2Du' (layout(r32ui ) uniform highp uimage2D)
+0:? 'im2Di' (layout(r32i ) uniform highp iimage2D)
+0:? 'P' (uniform highp 2-component vector of int)
+0:? 'colorSampInBad' (smooth sample out highp 4-component vector of float)
+0:? 'colorSample' (smooth sample out highp 4-component vector of float)
+0:? 'colorfsi' (flat sample out highp 4-component vector of float)
+0:? 'sampInArray' (smooth sample out 4-element array of highp 3-component vector of float)
+0:? 'inv4' (in highp 4-component vector of float)
+0:? 'gl_VertexID' (gl_VertexId highp int VertexId)
+0:? 'gl_InstanceID' (gl_InstanceId highp int InstanceId)
+
diff --git a/chromium/third_party/glslang/src/Test/baseResults/310AofA.vert.out b/chromium/third_party/glslang/src/Test/baseResults/310AofA.vert.out
new file mode 100644
index 00000000000..40c432186a0
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/310AofA.vert.out
@@ -0,0 +1,647 @@
+310AofA.vert
+Warning, version 310 is not yet complete; most version-specific features are present, but some are missing.
+ERROR: 0:17: '' : array size required
+ERROR: 0:23: '' : array size required
+ERROR: 0:28: '[]' : only outermost dimension of an array of arrays can be implicitly sized
+ERROR: 0:40: '' : array size required
+ERROR: 0:48: 'constructor' : constructing non-array constituent from array argument
+ERROR: 0:49: 'constructior' : array constructor argument not correct type to construct array element
+ERROR: 0:62: '[' : array index out of range '4'
+ERROR: 0:78: 'assign' : cannot convert from 'global 4-element array of 7-element array of highp float' to 'global 5-element array of 7-element array of highp float'
+ERROR: 0:79: 'assign' : cannot convert from 'global 4-element array of 7-element array of highp float' to 'global implicitly-sized array of 7-element array of highp float'
+ERROR: 0:81: 'foo' : no matching overloaded function found
+ERROR: 0:86: '==' : wrong operand types: no operation '==' exists that takes a left-hand operand of type 'global 4-element array of 7-element array of highp float' and a right operand of type 'global 5-element array of 7-element array of highp float' (or there is no acceptable conversion)
+ERROR: 0:90: '[' : array index out of range '5'
+ERROR: 0:94: '[' : index out of range '-1'
+ERROR: 0:96: 'assign' : cannot convert from 'temp 3-element array of highp 4-component vector of float' to 'layout(column_major shared ) buffer implicitly-sized array of highp 4-component vector of float'
+ERROR: 0:103: '' : array size required
+ERROR: 0:104: '' : array size required
+ERROR: 0:105: '' : array size required
+ERROR: 0:106: '' : array size required
+ERROR: 0:107: '' : array size required
+ERROR: 0:110: 'vertex input arrays' : not supported with this profile: es
+ERROR: 0:111: 'vertex-shader array-of-array output' : not supported with this profile: es
+ERROR: 0:113: 'array-of-array of block' : not supported with this profile: es
+ERROR: 22 compilation errors. No code generated.
+
+
+Shader version: 310
+ERROR: node is still EOpNull!
+0:8 Function Definition: f(b1;f1;u1[4];i1[3][2]; (global void)
+0:8 Function Parameters:
+0:8 'a' (in bool)
+0:8 'b' (in highp float)
+0:8 'c' (in 4-element array of highp uint)
+0:8 'd' (in 3-element array of 2-element array of highp int)
+0:11 Function Definition: main( (global void)
+0:11 Function Parameters:
+0:? Sequence
+0:13 Function Call: f(b1;f1;u1[4];i1[3][2]; (global void)
+0:13 Constant:
+0:13 false (const bool)
+0:13 Constant:
+0:13 12.100000
+0:13 Constant:
+0:13 0 (const uint)
+0:13 1 (const uint)
+0:13 1 (const uint)
+0:13 2 (const uint)
+0:13 'd' (temp 3-element array of 2-element array of highp int)
+0:44 Function Definition: foo(f1[5][7]; (global 4-element array of 7-element array of highp float)
+0:44 Function Parameters:
+0:44 'a' (in 5-element array of 7-element array of highp float)
+0:? Sequence
+0:47 move second child to first child (temp 7-element array of highp float)
+0:47 'r' (temp 7-element array of highp float)
+0:47 direct index (temp 7-element array of highp float)
+0:47 'a' (in 5-element array of 7-element array of highp float)
+0:47 Constant:
+0:47 2 (const int)
+0:48 Constant:
+0:48 0.000000
+0:49 Constant:
+0:49 0.000000
+0:50 Branch: Return with expression
+0:50 Construct float (temp 4-element array of 7-element array of float)
+0:50 direct index (temp 7-element array of highp float)
+0:50 'a' (in 5-element array of 7-element array of highp float)
+0:50 Constant:
+0:50 0 (const int)
+0:50 direct index (temp 7-element array of highp float)
+0:50 'a' (in 5-element array of 7-element array of highp float)
+0:50 Constant:
+0:50 1 (const int)
+0:50 'r' (temp 7-element array of highp float)
+0:50 direct index (temp 7-element array of highp float)
+0:50 'a' (in 5-element array of 7-element array of highp float)
+0:50 Constant:
+0:50 3 (const int)
+0:51 Branch: Return with expression
+0:51 Construct float (temp 4-element array of 7-element array of float)
+0:51 direct index (temp 7-element array of highp float)
+0:51 'a' (in 5-element array of 7-element array of highp float)
+0:51 Constant:
+0:51 0 (const int)
+0:51 direct index (temp 7-element array of highp float)
+0:51 'a' (in 5-element array of 7-element array of highp float)
+0:51 Constant:
+0:51 1 (const int)
+0:51 'r' (temp 7-element array of highp float)
+0:51 direct index (temp 7-element array of highp float)
+0:51 'a' (in 5-element array of 7-element array of highp float)
+0:51 Constant:
+0:51 3 (const int)
+0:52 Branch: Return with expression
+0:52 Construct float (temp 4-element array of 7-element array of float)
+0:52 direct index (temp 7-element array of highp float)
+0:52 'a' (in 5-element array of 7-element array of highp float)
+0:52 Constant:
+0:52 0 (const int)
+0:52 direct index (temp 7-element array of highp float)
+0:52 'a' (in 5-element array of 7-element array of highp float)
+0:52 Constant:
+0:52 1 (const int)
+0:52 direct index (temp 7-element array of highp float)
+0:52 'a' (in 5-element array of 7-element array of highp float)
+0:52 Constant:
+0:52 2 (const int)
+0:52 direct index (temp 7-element array of highp float)
+0:52 'a' (in 5-element array of 7-element array of highp float)
+0:52 Constant:
+0:52 3 (const int)
+0:55 Function Definition: bar(f1[5][7]; (global void)
+0:55 Function Parameters:
+0:55 '' (in 5-element array of 7-element array of highp float)
+0:57 Function Definition: foo2( (global void)
+0:57 Function Parameters:
+0:? Sequence
+0:? Sequence
+0:62 move second child to first child (temp highp float)
+0:62 direct index (temp highp float)
+0:62 direct index (temp 2-element array of highp float)
+0:62 direct index (temp 4-element array of 2-element array of highp float)
+0:62 'gu' (temp 3-element array of 4-element array of 2-element array of highp float)
+0:62 Constant:
+0:62 2 (const int)
+0:62 Constant:
+0:62 4 (const int)
+0:62 Constant:
+0:62 1 (const int)
+0:62 Constant:
+0:62 4.000000
+0:64 Sequence
+0:64 move second child to first child (temp 3-element array of 2-element array of highp 4-component vector of float)
+0:64 'ca4' (temp 3-element array of 2-element array of highp 4-component vector of float)
+0:66 Constant:
+0:66 0.000000
+0:66 0.000000
+0:66 0.000000
+0:66 0.000000
+0:66 1.000000
+0:66 1.000000
+0:66 1.000000
+0:66 1.000000
+0:66 0.000000
+0:66 0.000000
+0:66 0.000000
+0:66 0.000000
+0:66 1.000000
+0:66 1.000000
+0:66 1.000000
+0:66 1.000000
+0:66 0.000000
+0:66 0.000000
+0:66 0.000000
+0:66 0.000000
+0:66 1.000000
+0:66 1.000000
+0:66 1.000000
+0:66 1.000000
+0:67 Sequence
+0:67 move second child to first child (temp 3-element array of 2-element array of highp 4-component vector of float)
+0:67 'caim' (temp 3-element array of 2-element array of highp 4-component vector of float)
+0:69 Constant:
+0:69 4.000000
+0:69 4.000000
+0:69 4.000000
+0:69 4.000000
+0:69 2.000000
+0:69 2.000000
+0:69 2.000000
+0:69 2.000000
+0:69 4.000000
+0:69 4.000000
+0:69 4.000000
+0:69 4.000000
+0:69 2.000000
+0:69 2.000000
+0:69 2.000000
+0:69 2.000000
+0:69 4.000000
+0:69 4.000000
+0:69 4.000000
+0:69 4.000000
+0:69 2.000000
+0:69 2.000000
+0:69 2.000000
+0:69 2.000000
+0:70 Sequence
+0:70 move second child to first child (temp 3-element array of 2-element array of highp 4-component vector of float)
+0:70 'caim2' (temp 3-element array of 2-element array of highp 4-component vector of float)
+0:72 Constant:
+0:72 4.000000
+0:72 4.000000
+0:72 4.000000
+0:72 4.000000
+0:72 2.000000
+0:72 2.000000
+0:72 2.000000
+0:72 2.000000
+0:72 4.000000
+0:72 4.000000
+0:72 4.000000
+0:72 4.000000
+0:72 2.000000
+0:72 2.000000
+0:72 2.000000
+0:72 2.000000
+0:72 4.000000
+0:72 4.000000
+0:72 4.000000
+0:72 4.000000
+0:72 2.000000
+0:72 2.000000
+0:72 2.000000
+0:72 2.000000
+0:73 Sequence
+0:73 move second child to first child (temp 3-element array of 2-element array of highp 4-component vector of float)
+0:73 'caim3' (temp 3-element array of 2-element array of highp 4-component vector of float)
+0:75 Constant:
+0:75 4.000000
+0:75 4.000000
+0:75 4.000000
+0:75 4.000000
+0:75 2.000000
+0:75 2.000000
+0:75 2.000000
+0:75 2.000000
+0:75 4.000000
+0:75 4.000000
+0:75 4.000000
+0:75 4.000000
+0:75 2.000000
+0:75 2.000000
+0:75 2.000000
+0:75 2.000000
+0:75 4.000000
+0:75 4.000000
+0:75 4.000000
+0:75 4.000000
+0:75 2.000000
+0:75 2.000000
+0:75 2.000000
+0:75 2.000000
+0:77 move second child to first child (temp 4-element array of 7-element array of highp float)
+0:77 'g4' (global 4-element array of 7-element array of highp float)
+0:77 Function Call: foo(f1[5][7]; (global 4-element array of 7-element array of highp float)
+0:77 'g5' (global 5-element array of 7-element array of highp float)
+0:78 'g5' (global 5-element array of 7-element array of highp float)
+0:79 'gu' (global implicitly-sized array of 7-element array of highp float)
+0:81 Constant:
+0:81 0.000000
+0:82 Function Call: bar(f1[5][7]; (global void)
+0:82 'g5' (global 5-element array of 7-element array of highp float)
+0:84 Test condition and select (temp void)
+0:84 Condition
+0:84 Compare Equal (temp bool)
+0:84 Function Call: foo(f1[5][7]; (global 4-element array of 7-element array of highp float)
+0:84 'g5' (global 5-element array of 7-element array of highp float)
+0:84 'g4' (global 4-element array of 7-element array of highp float)
+0:84 true case is null
+0:86 Test condition and select (temp void)
+0:86 Condition
+0:86 Constant:
+0:86 false (const bool)
+0:86 true case is null
+0:90 move second child to first child (temp highp float)
+0:90 direct index (temp highp float)
+0:90 direct index (temp 7-element array of highp float)
+0:90 'u' (temp 5-element array of 7-element array of highp float)
+0:90 Constant:
+0:90 5 (const int)
+0:90 Constant:
+0:90 2 (const int)
+0:90 Constant:
+0:90 5.000000
+0:91 Function Call: foo(f1[5][7]; (global 4-element array of 7-element array of highp float)
+0:91 'u' (temp 5-element array of 7-element array of highp float)
+0:94 direct index (layout(column_major shared ) temp highp 4-component vector of float)
+0:94 v: direct index for structure (layout(column_major shared ) buffer implicitly-sized array of highp 4-component vector of float)
+0:94 direct index (layout(column_major shared ) temp block{layout(column_major shared ) buffer implicitly-sized array of highp float u, layout(column_major shared ) buffer implicitly-sized array of highp 4-component vector of float v})
+0:94 'name' (layout(column_major shared ) buffer 3-element array of block{layout(column_major shared ) buffer implicitly-sized array of highp float u, layout(column_major shared ) buffer implicitly-sized array of highp 4-component vector of float v})
+0:94 Constant:
+0:94 1 (const int)
+0:94 Constant:
+0:94 1 (const int)
+0:94 Constant:
+0:94 -1 (const int)
+0:95 move second child to first child (temp highp 4-component vector of float)
+0:95 direct index (layout(column_major shared ) temp highp 4-component vector of float)
+0:95 v: direct index for structure (layout(column_major shared ) buffer implicitly-sized array of highp 4-component vector of float)
+0:95 direct index (layout(column_major shared ) temp block{layout(column_major shared ) buffer implicitly-sized array of highp float u, layout(column_major shared ) buffer implicitly-sized array of highp 4-component vector of float v})
+0:95 'name' (layout(column_major shared ) buffer 3-element array of block{layout(column_major shared ) buffer implicitly-sized array of highp float u, layout(column_major shared ) buffer implicitly-sized array of highp 4-component vector of float v})
+0:95 Constant:
+0:95 1 (const int)
+0:95 Constant:
+0:95 1 (const int)
+0:95 Constant:
+0:95 1 (const int)
+0:95 Constant:
+0:95 4.300000
+0:95 4.300000
+0:95 4.300000
+0:95 4.300000
+0:96 v: direct index for structure (layout(column_major shared ) buffer implicitly-sized array of highp 4-component vector of float)
+0:96 direct index (layout(column_major shared ) temp block{layout(column_major shared ) buffer implicitly-sized array of highp float u, layout(column_major shared ) buffer implicitly-sized array of highp 4-component vector of float v})
+0:96 'name' (layout(column_major shared ) buffer 3-element array of block{layout(column_major shared ) buffer implicitly-sized array of highp float u, layout(column_major shared ) buffer implicitly-sized array of highp 4-component vector of float v})
+0:96 Constant:
+0:96 1 (const int)
+0:96 Constant:
+0:96 1 (const int)
+0:98 Constant:
+0:98 7 (const int)
+0:99 array length (temp highp int)
+0:99 v: direct index for structure (layout(column_major shared ) buffer implicitly-sized array of 7-element array of highp 4-component vector of float)
+0:99 direct index (layout(column_major shared ) temp block{layout(column_major shared ) buffer highp float u, layout(column_major shared ) buffer implicitly-sized array of 7-element array of highp 4-component vector of float v})
+0:99 'name3' (layout(column_major shared ) buffer 3-element array of block{layout(column_major shared ) buffer highp float u, layout(column_major shared ) buffer implicitly-sized array of 7-element array of highp 4-component vector of float v})
+0:99 Constant:
+0:99 0 (const int)
+0:99 Constant:
+0:99 1 (const int)
+0:? Linker Objects
+0:? 'name' (layout(column_major shared ) buffer 3-element array of block{layout(column_major shared ) buffer implicitly-sized array of highp float u, layout(column_major shared ) buffer implicitly-sized array of highp 4-component vector of float v})
+0:? 'uname' (layout(column_major shared ) uniform 3-element array of block{layout(column_major shared ) uniform highp float u, layout(column_major shared ) uniform implicitly-sized array of highp 4-component vector of float v})
+0:? 'name2' (layout(column_major shared ) buffer 3-element array of block{layout(column_major shared ) buffer highp float u, layout(column_major shared ) buffer implicitly-sized array of implicitly-sized array of highp 4-component vector of float v})
+0:? 'name3' (layout(column_major shared ) buffer 3-element array of block{layout(column_major shared ) buffer highp float u, layout(column_major shared ) buffer implicitly-sized array of 7-element array of highp 4-component vector of float v})
+0:? 'many' (global 1-element array of 2-element array of 3-element array of 4-element array of 5-element array of 6-element array of highp float)
+0:? 'gu' (global implicitly-sized array of 7-element array of highp float)
+0:? 'g4' (global 4-element array of 7-element array of highp float)
+0:? 'g5' (global 5-element array of 7-element array of highp float)
+0:? 'inArray' (in 2-element array of 3-element array of highp float)
+0:? 'outArray' (smooth out 2-element array of 3-element array of highp float)
+0:? 'ubaaname' (layout(column_major shared ) uniform 2-element array of 3-element array of block{layout(column_major shared ) uniform highp int a})
+0:? 'gl_VertexID' (gl_VertexId highp int VertexId)
+0:? 'gl_InstanceID' (gl_InstanceId highp int InstanceId)
+
+
+Linked vertex stage:
+
+
+Shader version: 310
+ERROR: node is still EOpNull!
+0:8 Function Definition: f(b1;f1;u1[4];i1[3][2]; (global void)
+0:8 Function Parameters:
+0:8 'a' (in bool)
+0:8 'b' (in highp float)
+0:8 'c' (in 4-element array of highp uint)
+0:8 'd' (in 3-element array of 2-element array of highp int)
+0:11 Function Definition: main( (global void)
+0:11 Function Parameters:
+0:? Sequence
+0:13 Function Call: f(b1;f1;u1[4];i1[3][2]; (global void)
+0:13 Constant:
+0:13 false (const bool)
+0:13 Constant:
+0:13 12.100000
+0:13 Constant:
+0:13 0 (const uint)
+0:13 1 (const uint)
+0:13 1 (const uint)
+0:13 2 (const uint)
+0:13 'd' (temp 3-element array of 2-element array of highp int)
+0:44 Function Definition: foo(f1[5][7]; (global 4-element array of 7-element array of highp float)
+0:44 Function Parameters:
+0:44 'a' (in 5-element array of 7-element array of highp float)
+0:? Sequence
+0:47 move second child to first child (temp 7-element array of highp float)
+0:47 'r' (temp 7-element array of highp float)
+0:47 direct index (temp 7-element array of highp float)
+0:47 'a' (in 5-element array of 7-element array of highp float)
+0:47 Constant:
+0:47 2 (const int)
+0:48 Constant:
+0:48 0.000000
+0:49 Constant:
+0:49 0.000000
+0:50 Branch: Return with expression
+0:50 Construct float (temp 4-element array of 7-element array of float)
+0:50 direct index (temp 7-element array of highp float)
+0:50 'a' (in 5-element array of 7-element array of highp float)
+0:50 Constant:
+0:50 0 (const int)
+0:50 direct index (temp 7-element array of highp float)
+0:50 'a' (in 5-element array of 7-element array of highp float)
+0:50 Constant:
+0:50 1 (const int)
+0:50 'r' (temp 7-element array of highp float)
+0:50 direct index (temp 7-element array of highp float)
+0:50 'a' (in 5-element array of 7-element array of highp float)
+0:50 Constant:
+0:50 3 (const int)
+0:51 Branch: Return with expression
+0:51 Construct float (temp 4-element array of 7-element array of float)
+0:51 direct index (temp 7-element array of highp float)
+0:51 'a' (in 5-element array of 7-element array of highp float)
+0:51 Constant:
+0:51 0 (const int)
+0:51 direct index (temp 7-element array of highp float)
+0:51 'a' (in 5-element array of 7-element array of highp float)
+0:51 Constant:
+0:51 1 (const int)
+0:51 'r' (temp 7-element array of highp float)
+0:51 direct index (temp 7-element array of highp float)
+0:51 'a' (in 5-element array of 7-element array of highp float)
+0:51 Constant:
+0:51 3 (const int)
+0:52 Branch: Return with expression
+0:52 Construct float (temp 4-element array of 7-element array of float)
+0:52 direct index (temp 7-element array of highp float)
+0:52 'a' (in 5-element array of 7-element array of highp float)
+0:52 Constant:
+0:52 0 (const int)
+0:52 direct index (temp 7-element array of highp float)
+0:52 'a' (in 5-element array of 7-element array of highp float)
+0:52 Constant:
+0:52 1 (const int)
+0:52 direct index (temp 7-element array of highp float)
+0:52 'a' (in 5-element array of 7-element array of highp float)
+0:52 Constant:
+0:52 2 (const int)
+0:52 direct index (temp 7-element array of highp float)
+0:52 'a' (in 5-element array of 7-element array of highp float)
+0:52 Constant:
+0:52 3 (const int)
+0:55 Function Definition: bar(f1[5][7]; (global void)
+0:55 Function Parameters:
+0:55 '' (in 5-element array of 7-element array of highp float)
+0:57 Function Definition: foo2( (global void)
+0:57 Function Parameters:
+0:? Sequence
+0:? Sequence
+0:62 move second child to first child (temp highp float)
+0:62 direct index (temp highp float)
+0:62 direct index (temp 2-element array of highp float)
+0:62 direct index (temp 4-element array of 2-element array of highp float)
+0:62 'gu' (temp 3-element array of 4-element array of 2-element array of highp float)
+0:62 Constant:
+0:62 2 (const int)
+0:62 Constant:
+0:62 4 (const int)
+0:62 Constant:
+0:62 1 (const int)
+0:62 Constant:
+0:62 4.000000
+0:64 Sequence
+0:64 move second child to first child (temp 3-element array of 2-element array of highp 4-component vector of float)
+0:64 'ca4' (temp 3-element array of 2-element array of highp 4-component vector of float)
+0:66 Constant:
+0:66 0.000000
+0:66 0.000000
+0:66 0.000000
+0:66 0.000000
+0:66 1.000000
+0:66 1.000000
+0:66 1.000000
+0:66 1.000000
+0:66 0.000000
+0:66 0.000000
+0:66 0.000000
+0:66 0.000000
+0:66 1.000000
+0:66 1.000000
+0:66 1.000000
+0:66 1.000000
+0:66 0.000000
+0:66 0.000000
+0:66 0.000000
+0:66 0.000000
+0:66 1.000000
+0:66 1.000000
+0:66 1.000000
+0:66 1.000000
+0:67 Sequence
+0:67 move second child to first child (temp 3-element array of 2-element array of highp 4-component vector of float)
+0:67 'caim' (temp 3-element array of 2-element array of highp 4-component vector of float)
+0:69 Constant:
+0:69 4.000000
+0:69 4.000000
+0:69 4.000000
+0:69 4.000000
+0:69 2.000000
+0:69 2.000000
+0:69 2.000000
+0:69 2.000000
+0:69 4.000000
+0:69 4.000000
+0:69 4.000000
+0:69 4.000000
+0:69 2.000000
+0:69 2.000000
+0:69 2.000000
+0:69 2.000000
+0:69 4.000000
+0:69 4.000000
+0:69 4.000000
+0:69 4.000000
+0:69 2.000000
+0:69 2.000000
+0:69 2.000000
+0:69 2.000000
+0:70 Sequence
+0:70 move second child to first child (temp 3-element array of 2-element array of highp 4-component vector of float)
+0:70 'caim2' (temp 3-element array of 2-element array of highp 4-component vector of float)
+0:72 Constant:
+0:72 4.000000
+0:72 4.000000
+0:72 4.000000
+0:72 4.000000
+0:72 2.000000
+0:72 2.000000
+0:72 2.000000
+0:72 2.000000
+0:72 4.000000
+0:72 4.000000
+0:72 4.000000
+0:72 4.000000
+0:72 2.000000
+0:72 2.000000
+0:72 2.000000
+0:72 2.000000
+0:72 4.000000
+0:72 4.000000
+0:72 4.000000
+0:72 4.000000
+0:72 2.000000
+0:72 2.000000
+0:72 2.000000
+0:72 2.000000
+0:73 Sequence
+0:73 move second child to first child (temp 3-element array of 2-element array of highp 4-component vector of float)
+0:73 'caim3' (temp 3-element array of 2-element array of highp 4-component vector of float)
+0:75 Constant:
+0:75 4.000000
+0:75 4.000000
+0:75 4.000000
+0:75 4.000000
+0:75 2.000000
+0:75 2.000000
+0:75 2.000000
+0:75 2.000000
+0:75 4.000000
+0:75 4.000000
+0:75 4.000000
+0:75 4.000000
+0:75 2.000000
+0:75 2.000000
+0:75 2.000000
+0:75 2.000000
+0:75 4.000000
+0:75 4.000000
+0:75 4.000000
+0:75 4.000000
+0:75 2.000000
+0:75 2.000000
+0:75 2.000000
+0:75 2.000000
+0:77 move second child to first child (temp 4-element array of 7-element array of highp float)
+0:77 'g4' (global 4-element array of 7-element array of highp float)
+0:77 Function Call: foo(f1[5][7]; (global 4-element array of 7-element array of highp float)
+0:77 'g5' (global 5-element array of 7-element array of highp float)
+0:78 'g5' (global 5-element array of 7-element array of highp float)
+0:79 'gu' (global 1-element array of 7-element array of highp float)
+0:81 Constant:
+0:81 0.000000
+0:82 Function Call: bar(f1[5][7]; (global void)
+0:82 'g5' (global 5-element array of 7-element array of highp float)
+0:84 Test condition and select (temp void)
+0:84 Condition
+0:84 Compare Equal (temp bool)
+0:84 Function Call: foo(f1[5][7]; (global 4-element array of 7-element array of highp float)
+0:84 'g5' (global 5-element array of 7-element array of highp float)
+0:84 'g4' (global 4-element array of 7-element array of highp float)
+0:84 true case is null
+0:86 Test condition and select (temp void)
+0:86 Condition
+0:86 Constant:
+0:86 false (const bool)
+0:86 true case is null
+0:90 move second child to first child (temp highp float)
+0:90 direct index (temp highp float)
+0:90 direct index (temp 7-element array of highp float)
+0:90 'u' (temp 5-element array of 7-element array of highp float)
+0:90 Constant:
+0:90 5 (const int)
+0:90 Constant:
+0:90 2 (const int)
+0:90 Constant:
+0:90 5.000000
+0:91 Function Call: foo(f1[5][7]; (global 4-element array of 7-element array of highp float)
+0:91 'u' (temp 5-element array of 7-element array of highp float)
+0:94 direct index (layout(column_major shared ) temp highp 4-component vector of float)
+0:94 v: direct index for structure (layout(column_major shared ) buffer implicitly-sized array of highp 4-component vector of float)
+0:94 direct index (layout(column_major shared ) temp block{layout(column_major shared ) buffer implicitly-sized array of highp float u, layout(column_major shared ) buffer implicitly-sized array of highp 4-component vector of float v})
+0:94 'name' (layout(column_major shared ) buffer 3-element array of block{layout(column_major shared ) buffer implicitly-sized array of highp float u, layout(column_major shared ) buffer implicitly-sized array of highp 4-component vector of float v})
+0:94 Constant:
+0:94 1 (const int)
+0:94 Constant:
+0:94 1 (const int)
+0:94 Constant:
+0:94 -1 (const int)
+0:95 move second child to first child (temp highp 4-component vector of float)
+0:95 direct index (layout(column_major shared ) temp highp 4-component vector of float)
+0:95 v: direct index for structure (layout(column_major shared ) buffer implicitly-sized array of highp 4-component vector of float)
+0:95 direct index (layout(column_major shared ) temp block{layout(column_major shared ) buffer implicitly-sized array of highp float u, layout(column_major shared ) buffer implicitly-sized array of highp 4-component vector of float v})
+0:95 'name' (layout(column_major shared ) buffer 3-element array of block{layout(column_major shared ) buffer implicitly-sized array of highp float u, layout(column_major shared ) buffer implicitly-sized array of highp 4-component vector of float v})
+0:95 Constant:
+0:95 1 (const int)
+0:95 Constant:
+0:95 1 (const int)
+0:95 Constant:
+0:95 1 (const int)
+0:95 Constant:
+0:95 4.300000
+0:95 4.300000
+0:95 4.300000
+0:95 4.300000
+0:96 v: direct index for structure (layout(column_major shared ) buffer implicitly-sized array of highp 4-component vector of float)
+0:96 direct index (layout(column_major shared ) temp block{layout(column_major shared ) buffer implicitly-sized array of highp float u, layout(column_major shared ) buffer implicitly-sized array of highp 4-component vector of float v})
+0:96 'name' (layout(column_major shared ) buffer 3-element array of block{layout(column_major shared ) buffer implicitly-sized array of highp float u, layout(column_major shared ) buffer implicitly-sized array of highp 4-component vector of float v})
+0:96 Constant:
+0:96 1 (const int)
+0:96 Constant:
+0:96 1 (const int)
+0:98 Constant:
+0:98 7 (const int)
+0:99 array length (temp highp int)
+0:99 v: direct index for structure (layout(column_major shared ) buffer implicitly-sized array of 7-element array of highp 4-component vector of float)
+0:99 direct index (layout(column_major shared ) temp block{layout(column_major shared ) buffer highp float u, layout(column_major shared ) buffer implicitly-sized array of 7-element array of highp 4-component vector of float v})
+0:99 'name3' (layout(column_major shared ) buffer 3-element array of block{layout(column_major shared ) buffer highp float u, layout(column_major shared ) buffer implicitly-sized array of 7-element array of highp 4-component vector of float v})
+0:99 Constant:
+0:99 0 (const int)
+0:99 Constant:
+0:99 1 (const int)
+0:? Linker Objects
+0:? 'name' (layout(column_major shared ) buffer 3-element array of block{layout(column_major shared ) buffer implicitly-sized array of highp float u, layout(column_major shared ) buffer implicitly-sized array of highp 4-component vector of float v})
+0:? 'uname' (layout(column_major shared ) uniform 3-element array of block{layout(column_major shared ) uniform highp float u, layout(column_major shared ) uniform 1-element array of highp 4-component vector of float v})
+0:? 'name2' (layout(column_major shared ) buffer 3-element array of block{layout(column_major shared ) buffer highp float u, layout(column_major shared ) buffer implicitly-sized array of implicitly-sized array of highp 4-component vector of float v})
+0:? 'name3' (layout(column_major shared ) buffer 3-element array of block{layout(column_major shared ) buffer highp float u, layout(column_major shared ) buffer implicitly-sized array of 7-element array of highp 4-component vector of float v})
+0:? 'many' (global 1-element array of 2-element array of 3-element array of 4-element array of 5-element array of 6-element array of highp float)
+0:? 'gu' (global 1-element array of 7-element array of highp float)
+0:? 'g4' (global 4-element array of 7-element array of highp float)
+0:? 'g5' (global 5-element array of 7-element array of highp float)
+0:? 'inArray' (in 2-element array of 3-element array of highp float)
+0:? 'outArray' (smooth out 2-element array of 3-element array of highp float)
+0:? 'ubaaname' (layout(column_major shared ) uniform 2-element array of 3-element array of block{layout(column_major shared ) uniform highp int a})
+0:? 'gl_VertexID' (gl_VertexId highp int VertexId)
+0:? 'gl_InstanceID' (gl_InstanceId highp int InstanceId)
+
diff --git a/chromium/third_party/glslang/src/Test/baseResults/310implicitSizeArrayError.vert.out b/chromium/third_party/glslang/src/Test/baseResults/310implicitSizeArrayError.vert.out
new file mode 100644
index 00000000000..963735d853d
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/310implicitSizeArrayError.vert.out
@@ -0,0 +1,50 @@
+310implicitSizeArrayError.vert
+Warning, version 310 is not yet complete; most version-specific features are present, but some are missing.
+ERROR: 0:3: '' : array size required
+ERROR: 1 compilation errors. No code generated.
+
+
+Shader version: 310
+ERROR: node is still EOpNull!
+0:6 Function Definition: main( (global void)
+0:6 Function Parameters:
+0:7 Sequence
+0:7 move second child to first child (temp highp int)
+0:7 'o' (layout(location=0 ) smooth out highp int)
+0:7 direct index (layout(column_major shared ) temp highp int)
+0:7 a: direct index for structure (layout(column_major shared ) uniform implicitly-sized array of highp int)
+0:7 'uni' (layout(location=0 column_major shared ) uniform block{layout(column_major shared ) uniform implicitly-sized array of highp int a})
+0:7 Constant:
+0:7 0 (const int)
+0:7 Constant:
+0:7 2 (const int)
+0:? Linker Objects
+0:? 'uni' (layout(location=0 column_major shared ) uniform block{layout(column_major shared ) uniform implicitly-sized array of highp int a})
+0:? 'o' (layout(location=0 ) smooth out highp int)
+0:? 'gl_VertexID' (gl_VertexId highp int VertexId)
+0:? 'gl_InstanceID' (gl_InstanceId highp int InstanceId)
+
+
+Linked vertex stage:
+
+
+Shader version: 310
+ERROR: node is still EOpNull!
+0:6 Function Definition: main( (global void)
+0:6 Function Parameters:
+0:7 Sequence
+0:7 move second child to first child (temp highp int)
+0:7 'o' (layout(location=0 ) smooth out highp int)
+0:7 direct index (layout(column_major shared ) temp highp int)
+0:7 a: direct index for structure (layout(column_major shared ) uniform 1-element array of highp int)
+0:7 'uni' (layout(location=0 column_major shared ) uniform block{layout(column_major shared ) uniform 1-element array of highp int a})
+0:7 Constant:
+0:7 0 (const int)
+0:7 Constant:
+0:7 2 (const int)
+0:? Linker Objects
+0:? 'uni' (layout(location=0 column_major shared ) uniform block{layout(column_major shared ) uniform 1-element array of highp int a})
+0:? 'o' (layout(location=0 ) smooth out highp int)
+0:? 'gl_VertexID' (gl_VertexId highp int VertexId)
+0:? 'gl_InstanceID' (gl_InstanceId highp int InstanceId)
+
diff --git a/chromium/third_party/glslang/src/Test/baseResults/330.frag.out b/chromium/third_party/glslang/src/Test/baseResults/330.frag.out
new file mode 100644
index 00000000000..904ad3edf38
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/330.frag.out
@@ -0,0 +1,217 @@
+330.frag
+ERROR: 0:27: 'block declaration' : cannot redeclare block: gl_block
+ERROR: 0:31: 'gl_name' : identifiers starting with "gl_" are reserved
+ERROR: 0:32: 'gl_i' : identifiers starting with "gl_" are reserved
+ERROR: 0:35: 'gl_in' : no declaration found for redeclaration
+ERROR: 0:39: 'gl_FragCoord' : cannot redeclare a non block as a block
+ERROR: 0:44: 'non-literal layout-id value' : not supported for this version or the enabled extensions
+ERROR: 0:44: 'layout-id value' : cannot be negative
+ERROR: 0:45: 'non-literal layout-id value' : not supported for this version or the enabled extensions
+ERROR: 0:46: 'layout-id value' : scalar integer expression required
+ERROR: 0:46: 'location' : location is too large
+ERROR: 0:47: 'non-literal layout-id value' : not supported for this version or the enabled extensions
+ERROR: 0:48: 'non-literal layout-id value' : not supported for this version or the enabled extensions
+ERROR: 0:52: 'f2' : cannot use layout qualifiers on structure members
+ERROR: 0:57: 'location on block member' : not supported for this version or the enabled extensions
+ERROR: 0:62: 'location on block member' : can only use in an in/out block
+ERROR: 0:62: 'location qualifier on uniform or buffer' : not supported for this version or the enabled extensions
+ERROR: 0:60: 'location qualifier on uniform or buffer' : not supported for this version or the enabled extensions
+ERROR: 0:68: 'layout-id value' : cannot be negative
+ERROR: 0:69: 'layout-id value' : cannot be negative
+ERROR: 0:76: 'f2' : cannot use layout qualifiers on structure members
+ERROR: 0:91: 'location on block member' : can only use in an in/out block
+ERROR: 0:91: 'location qualifier on uniform or buffer' : not supported for this version or the enabled extensions
+ERROR: 0:91: 'location' : overlapping use of location 3
+ERROR: 0:89: 'location qualifier on uniform or buffer' : not supported for this version or the enabled extensions
+ERROR: 0:94: 'location' : either the block needs a location, or all members need a location, or no members have a location
+ERROR: 0:108: 'A' : cannot use layout qualifiers on structure members
+ERROR: 0:119: 'location' : overlapping use of location 44
+ERROR: 0:122: 'index' : can only be used with an explicit location
+ERROR: 0:124: 'location' : overlapping use of location 0
+ERROR: 0:125: 'index' : can only be used on an output
+ERROR: 0:126: 'index' : can only be used on an output
+ERROR: 0:126: 'location/component/index' : cannot declare a default, use a full declaration
+ERROR: 0:127: 'location/component/index' : cannot declare a default, use a full declaration
+ERROR: 0:128: 'output block' : not supported in this stage: fragment
+ERROR: 0:140: 'textureQueryLod' : no matching overloaded function found
+ERROR: 0:140: 'assign' : cannot convert from 'const float' to 'temp 2-component vector of float'
+ERROR: 0:141: 'textureQueryLod' : no matching overloaded function found
+ERROR: 0:141: 'assign' : cannot convert from 'const float' to 'temp 2-component vector of float'
+ERROR: 0:152: 'index' : value must be 0 or 1
+ERROR: 39 compilation errors. No code generated.
+
+
+Shader version: 330
+Requested GL_ARB_enhanced_layouts
+Requested GL_ARB_separate_shader_objects
+ERROR: node is still EOpNull!
+0:8 Function Definition: main( (global void)
+0:8 Function Parameters:
+0:10 Sequence
+0:10 move second child to first child (temp 4-component vector of float)
+0:10 'gl_FragColor' (fragColor 4-component vector of float FragColor)
+0:10 'varyingVar' (smooth in 4-component vector of float)
+0:11 move second child to first child (temp 4-component vector of float)
+0:11 direct index (temp 4-component vector of float FragData)
+0:11 'gl_FragData' (fragColor 32-element array of 4-component vector of float FragData)
+0:11 Constant:
+0:11 1 (const int)
+0:11 'inVar' (smooth in 4-component vector of float)
+0:12 Sequence
+0:12 move second child to first child (temp int)
+0:12 'buffer' (temp int)
+0:12 Constant:
+0:12 4 (const int)
+0:21 Function Definition: foo( (global void)
+0:21 Function Parameters:
+0:23 Sequence
+0:23 Sequence
+0:23 move second child to first child (temp 4-component vector of float)
+0:23 'c' (temp 4-component vector of float)
+0:23 gl_Color: direct index for structure (in 4-component vector of float Color)
+0:23 'anon@0' (in block{in 4-component vector of float Color gl_Color, })
+0:23 Constant:
+0:23 2 (const uint)
+0:24 move second child to first child (temp 4-component vector of float)
+0:24 'outVar' (layout(location=0 index=0 ) out 4-component vector of float)
+0:24 'inVar' (smooth in 4-component vector of float)
+0:133 Function Definition: qlod( (global void)
+0:133 Function Parameters:
+0:? Sequence
+0:140 'lod' (temp 2-component vector of float)
+0:141 'lod' (temp 2-component vector of float)
+0:147 Function Definition: fooKeyMem( (global void)
+0:147 Function Parameters:
+0:149 Sequence
+0:149 precise: direct index for structure (global int)
+0:149 'KeyMem' (global structure{global int precise})
+0:149 Constant:
+0:149 0 (const int)
+0:? Linker Objects
+0:? 'inVar' (smooth in 4-component vector of float)
+0:? 'outVar' (layout(location=0 index=0 ) out 4-component vector of float)
+0:? 'varyingVar' (smooth in 4-component vector of float)
+0:? 'anon@0' (in block{in 4-component vector of float Color gl_Color, })
+0:? 'gl_name' (in block{in int gl_i})
+0:? 'start' (const int)
+0:? 6 (const int)
+0:? 'v1' (smooth in 4-component vector of float)
+0:? 'v2' (layout(location=8 ) smooth in 4-component vector of float)
+0:? 'v20' (smooth in 4-component vector of float)
+0:? 'v21' (layout(location=60 ) smooth in float)
+0:? 'v22' (layout(location=2 ) smooth in float)
+0:? 'anon@1' (in block{layout(location=1 component=0 ) in float f1, layout(location=3 ) in float f2})
+0:? 'uinst' (layout(location=1 column_major shared ) uniform block{layout(column_major shared ) uniform float f1, layout(location=3 column_major shared ) uniform float f2})
+0:? 'v3' (layout(location=6 ) smooth in 4-component vector of float)
+0:? 'v4' (smooth in 4-component vector of float)
+0:? 'v5' (smooth in 4-component vector of float)
+0:? 'v6' (layout(location=30 ) smooth in 4-component vector of float)
+0:? 'v23' (layout(location=61 ) smooth in float)
+0:? 'v24' (layout(location=62 ) smooth in float)
+0:? 'ininst2' (in block{layout(location=28 component=0 ) in bool b1, layout(location=29 component=0 ) in float f1, layout(location=25 ) in float f2, layout(location=26 component=0 ) in 4-component vector of float f3, layout(location=21 ) in structure{global float f1, temp float f2} s2, layout(location=23 component=0 ) in 4-component vector of float f4, layout(location=24 component=0 ) in 4-component vector of float f5})
+0:? 'uinst2' (layout(location=13 column_major shared ) uniform block{layout(column_major shared ) uniform float f1, layout(location=3 column_major shared ) uniform float f2})
+0:? 'in3' (in block{in float f1, layout(location=40 ) in float f2})
+0:? 'in4' (in block{layout(location=50 ) in float f1, layout(location=51 ) in float f2})
+0:? 's' (layout(location=33 ) smooth in structure{global 3-component vector of float a, global 2X2 matrix of float b, global 2-element array of 4-component vector of float c, temp 2-component vector of float A})
+0:? 'anon@2' (in block{layout(location=44 component=0 ) in 4-component vector of float d, layout(location=45 component=0 ) in 4-component vector of float e, layout(location=47 ) in 4-component vector of float f, layout(location=48 component=0 ) in 4-component vector of float g, layout(location=41 ) in 4-component vector of float h, layout(location=42 component=0 ) in 4-component vector of float i, layout(location=43 component=0 ) in 4-component vector of float j, layout(location=44 component=0 ) in 4-component vector of float k})
+0:? 'outVar2' (layout(location=4095 index=0 ) out 4-component vector of float)
+0:? 'outVar3' (layout(location=0 index=1 ) out 4-component vector of float)
+0:? 'outVar4' (layout(location=0 index=1 ) out 4-component vector of float)
+0:? 'indexIn' (layout(location=27 index=0 ) smooth in 4-component vector of float)
+0:? 'indexBlockI' (layout(location=26 index=0 ) out block{out int a})
+0:? 'samp1D' (uniform sampler1D)
+0:? 'samp2Ds' (uniform sampler2DShadow)
+0:? 'precise' (global int)
+0:? 'KeyMem' (global structure{global int precise})
+0:? 'outIndex2' (layout(location=28 index=0 ) out 4-component vector of float)
+
+
+Linked fragment stage:
+
+ERROR: Linking fragment stage: Cannot use gl_FragColor or gl_FragData when using user-defined outputs
+ERROR: Linking fragment stage: Cannot use both gl_FragColor and gl_FragData
+
+Shader version: 330
+Requested GL_ARB_enhanced_layouts
+Requested GL_ARB_separate_shader_objects
+ERROR: node is still EOpNull!
+0:8 Function Definition: main( (global void)
+0:8 Function Parameters:
+0:10 Sequence
+0:10 move second child to first child (temp 4-component vector of float)
+0:10 'gl_FragColor' (fragColor 4-component vector of float FragColor)
+0:10 'varyingVar' (smooth in 4-component vector of float)
+0:11 move second child to first child (temp 4-component vector of float)
+0:11 direct index (temp 4-component vector of float FragData)
+0:11 'gl_FragData' (fragColor 32-element array of 4-component vector of float FragData)
+0:11 Constant:
+0:11 1 (const int)
+0:11 'inVar' (smooth in 4-component vector of float)
+0:12 Sequence
+0:12 move second child to first child (temp int)
+0:12 'buffer' (temp int)
+0:12 Constant:
+0:12 4 (const int)
+0:21 Function Definition: foo( (global void)
+0:21 Function Parameters:
+0:23 Sequence
+0:23 Sequence
+0:23 move second child to first child (temp 4-component vector of float)
+0:23 'c' (temp 4-component vector of float)
+0:23 gl_Color: direct index for structure (in 4-component vector of float Color)
+0:23 'anon@0' (in block{in 4-component vector of float Color gl_Color, })
+0:23 Constant:
+0:23 2 (const uint)
+0:24 move second child to first child (temp 4-component vector of float)
+0:24 'outVar' (layout(location=0 index=0 ) out 4-component vector of float)
+0:24 'inVar' (smooth in 4-component vector of float)
+0:133 Function Definition: qlod( (global void)
+0:133 Function Parameters:
+0:? Sequence
+0:140 'lod' (temp 2-component vector of float)
+0:141 'lod' (temp 2-component vector of float)
+0:147 Function Definition: fooKeyMem( (global void)
+0:147 Function Parameters:
+0:149 Sequence
+0:149 precise: direct index for structure (global int)
+0:149 'KeyMem' (global structure{global int precise})
+0:149 Constant:
+0:149 0 (const int)
+0:? Linker Objects
+0:? 'inVar' (smooth in 4-component vector of float)
+0:? 'outVar' (layout(location=0 index=0 ) out 4-component vector of float)
+0:? 'varyingVar' (smooth in 4-component vector of float)
+0:? 'anon@0' (in block{in 4-component vector of float Color gl_Color, })
+0:? 'gl_name' (in block{in int gl_i})
+0:? 'start' (const int)
+0:? 6 (const int)
+0:? 'v1' (smooth in 4-component vector of float)
+0:? 'v2' (layout(location=8 ) smooth in 4-component vector of float)
+0:? 'v20' (smooth in 4-component vector of float)
+0:? 'v21' (layout(location=60 ) smooth in float)
+0:? 'v22' (layout(location=2 ) smooth in float)
+0:? 'anon@1' (in block{layout(location=1 component=0 ) in float f1, layout(location=3 ) in float f2})
+0:? 'uinst' (layout(location=1 column_major shared ) uniform block{layout(column_major shared ) uniform float f1, layout(location=3 column_major shared ) uniform float f2})
+0:? 'v3' (layout(location=6 ) smooth in 4-component vector of float)
+0:? 'v4' (smooth in 4-component vector of float)
+0:? 'v5' (smooth in 4-component vector of float)
+0:? 'v6' (layout(location=30 ) smooth in 4-component vector of float)
+0:? 'v23' (layout(location=61 ) smooth in float)
+0:? 'v24' (layout(location=62 ) smooth in float)
+0:? 'ininst2' (in block{layout(location=28 component=0 ) in bool b1, layout(location=29 component=0 ) in float f1, layout(location=25 ) in float f2, layout(location=26 component=0 ) in 4-component vector of float f3, layout(location=21 ) in structure{global float f1, temp float f2} s2, layout(location=23 component=0 ) in 4-component vector of float f4, layout(location=24 component=0 ) in 4-component vector of float f5})
+0:? 'uinst2' (layout(location=13 column_major shared ) uniform block{layout(column_major shared ) uniform float f1, layout(location=3 column_major shared ) uniform float f2})
+0:? 'in3' (in block{in float f1, layout(location=40 ) in float f2})
+0:? 'in4' (in block{layout(location=50 ) in float f1, layout(location=51 ) in float f2})
+0:? 's' (layout(location=33 ) smooth in structure{global 3-component vector of float a, global 2X2 matrix of float b, global 2-element array of 4-component vector of float c, temp 2-component vector of float A})
+0:? 'anon@2' (in block{layout(location=44 component=0 ) in 4-component vector of float d, layout(location=45 component=0 ) in 4-component vector of float e, layout(location=47 ) in 4-component vector of float f, layout(location=48 component=0 ) in 4-component vector of float g, layout(location=41 ) in 4-component vector of float h, layout(location=42 component=0 ) in 4-component vector of float i, layout(location=43 component=0 ) in 4-component vector of float j, layout(location=44 component=0 ) in 4-component vector of float k})
+0:? 'outVar2' (layout(location=4095 index=0 ) out 4-component vector of float)
+0:? 'outVar3' (layout(location=0 index=1 ) out 4-component vector of float)
+0:? 'outVar4' (layout(location=0 index=1 ) out 4-component vector of float)
+0:? 'indexIn' (layout(location=27 index=0 ) smooth in 4-component vector of float)
+0:? 'indexBlockI' (layout(location=26 index=0 ) out block{out int a})
+0:? 'samp1D' (uniform sampler1D)
+0:? 'samp2Ds' (uniform sampler2DShadow)
+0:? 'precise' (global int)
+0:? 'KeyMem' (global structure{global int precise})
+0:? 'outIndex2' (layout(location=28 index=0 ) out 4-component vector of float)
+
diff --git a/chromium/third_party/glslang/src/Test/baseResults/330comp.frag.out b/chromium/third_party/glslang/src/Test/baseResults/330comp.frag.out
new file mode 100644
index 00000000000..58d6e5fdf6a
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/330comp.frag.out
@@ -0,0 +1,48 @@
+330comp.frag
+Shader version: 330
+0:? Sequence
+0:8 Function Definition: main( (global void)
+0:8 Function Parameters:
+0:10 Sequence
+0:10 move second child to first child (temp 4-component vector of float)
+0:10 'gl_FragColor' (fragColor 4-component vector of float FragColor)
+0:10 'varyingVar' (smooth in 4-component vector of float)
+0:11 move second child to first child (temp 4-component vector of float)
+0:11 direct index (temp 4-component vector of float FragData)
+0:11 'gl_FragData' (fragColor 32-element array of 4-component vector of float FragData)
+0:11 Constant:
+0:11 1 (const int)
+0:11 vector-times-matrix (temp 4-component vector of float)
+0:11 'inVar' (smooth in 4-component vector of float)
+0:11 'gl_ModelViewMatrix' (uniform 4X4 matrix of float)
+0:? Linker Objects
+0:? 'inVar' (smooth in 4-component vector of float)
+0:? 'outVar' (out 4-component vector of float)
+0:? 'varyingVar' (smooth in 4-component vector of float)
+
+
+Linked fragment stage:
+
+ERROR: Linking fragment stage: Cannot use both gl_FragColor and gl_FragData
+
+Shader version: 330
+0:? Sequence
+0:8 Function Definition: main( (global void)
+0:8 Function Parameters:
+0:10 Sequence
+0:10 move second child to first child (temp 4-component vector of float)
+0:10 'gl_FragColor' (fragColor 4-component vector of float FragColor)
+0:10 'varyingVar' (smooth in 4-component vector of float)
+0:11 move second child to first child (temp 4-component vector of float)
+0:11 direct index (temp 4-component vector of float FragData)
+0:11 'gl_FragData' (fragColor 32-element array of 4-component vector of float FragData)
+0:11 Constant:
+0:11 1 (const int)
+0:11 vector-times-matrix (temp 4-component vector of float)
+0:11 'inVar' (smooth in 4-component vector of float)
+0:11 'gl_ModelViewMatrix' (uniform 4X4 matrix of float)
+0:? Linker Objects
+0:? 'inVar' (smooth in 4-component vector of float)
+0:? 'outVar' (out 4-component vector of float)
+0:? 'varyingVar' (smooth in 4-component vector of float)
+
diff --git a/chromium/third_party/glslang/src/Test/baseResults/400.frag.out b/chromium/third_party/glslang/src/Test/baseResults/400.frag.out
new file mode 100644
index 00000000000..33a8c9ab05f
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/400.frag.out
@@ -0,0 +1,998 @@
+400.frag
+Warning, version 400 is not yet complete; most version-specific features are present, but some are missing.
+ERROR: 0:18: 'textureGatherOffsets(...)' : must be a compile-time constant: offsets argument
+ERROR: 0:22: 'textureGatherOffset(...)' : must be a compile-time constant: component argument
+ERROR: 0:23: 'textureGatherOffset(...)' : must be 0, 1, 2, or 3: component argument
+ERROR: 0:30: 'location qualifier on input' : not supported for this version or the enabled extensions
+ERROR: 0:38: 'location qualifier on uniform or buffer' : not supported for this version or the enabled extensions
+ERROR: 0:40: 'redeclaration' : cannot apply layout qualifier to gl_Color
+ERROR: 0:41: 'redeclaration' : cannot change qualification of gl_ClipDistance
+ERROR: 0:43: 'gl_FragCoord' : cannot redeclare after use
+ERROR: 0:51: 'texel offset' : argument must be compile-time constant
+ERROR: 0:53: 'texel offset' : value is out of range: [gl_MinProgramTexelOffset, gl_MaxProgramTexelOffset]
+ERROR: 0:53: 'texel offset' : value is out of range: [gl_MinProgramTexelOffset, gl_MaxProgramTexelOffset]
+ERROR: 0:54: 'texel offset' : value is out of range: [gl_MinProgramTexelOffset, gl_MaxProgramTexelOffset]
+ERROR: 0:54: 'texel offset' : value is out of range: [gl_MinProgramTexelOffset, gl_MaxProgramTexelOffset]
+ERROR: 0:57: 'patch' : not supported in this stage: fragment
+ERROR: 0:58: 'patch' : not supported in this stage: fragment
+ERROR: 0:58: 'centroid/sample/patch' : can't use auxiliary qualifier on a fragment output
+ERROR: 0:73: 'dFdxFine' : required extension not requested: GL_ARB_derivative_control
+ERROR: 0:74: 'dFdyCoarse' : required extension not requested: GL_ARB_derivative_control
+ERROR: 0:75: 'fwidthCoarse' : required extension not requested: GL_ARB_derivative_control
+ERROR: 0:75: 'fwidthFine' : required extension not requested: GL_ARB_derivative_control
+ERROR: 0:104: 'centroid/sample/patch' : can't use auxiliary qualifier on a fragment output
+ERROR: 0:123: 'interpolateAtCentroid' : no matching overloaded function found
+ERROR: 0:125: 'interpolateAtCentroid' : first argument must be an interpolant, or interpolant-array element
+ERROR: 0:127: 'interpolateAtSample' : no matching overloaded function found
+ERROR: 0:132: 'interpolateAtOffset' : no matching overloaded function found
+ERROR: 0:134: 'interpolateAtOffset' : first argument must be an interpolant, or interpolant-array element
+ERROR: 0:135: 'interpolateAtOffset' : first argument must be an interpolant, or interpolant-array element
+ERROR: 0:136: 'interpolateAtOffset' : first argument must be an interpolant, or interpolant-array element
+ERROR: 0:139: 'interpolateAtCentroid' : first argument must be an interpolant, or interpolant-array element
+ERROR: 0:140: 'interpolateAtSample' : first argument must be an interpolant, or interpolant-array element
+ERROR: 0:183: 'textureQueryLod' : no matching overloaded function found
+ERROR: 0:183: 'assign' : cannot convert from 'const float' to 'temp 2-component vector of float'
+ERROR: 0:184: 'textureQueryLod' : no matching overloaded function found
+ERROR: 0:184: 'assign' : cannot convert from 'const float' to 'temp 2-component vector of float'
+ERROR: 0:187: '' : syntax error
+ERROR: 35 compilation errors. No code generated.
+
+
+Shader version: 400
+Requested GL_ARB_derivative_control
+Requested GL_ARB_separate_shader_objects
+gl_FragCoord pixel center is integer
+gl_FragCoord origin is upper left
+ERROR: node is still EOpNull!
+0:10 Function Definition: main( (global void)
+0:10 Function Parameters:
+0:? Sequence
+0:13 move second child to first child (temp 4-component vector of float)
+0:13 'v' (temp 4-component vector of float)
+0:13 texture (global 4-component vector of float)
+0:13 indirect index (temp sampler2D)
+0:13 'arrayedSampler' (uniform 5-element array of sampler2D)
+0:13 'i' (flat in int)
+0:13 'c2D' (smooth in 2-component vector of float)
+0:14 move second child to first child (temp float)
+0:14 direct index (temp float)
+0:14 'outp' (out 4-component vector of float)
+0:14 Constant:
+0:14 0 (const int)
+0:14 direct index (smooth temp float ClipDistance)
+0:14 'gl_ClipDistance' (smooth in 4-element array of float ClipDistance)
+0:14 Constant:
+0:14 1 (const int)
+0:18 Sequence
+0:18 move second child to first child (temp 4-component vector of uint)
+0:18 'uv4' (temp 4-component vector of uint)
+0:18 textureGatherOffsets (global 4-component vector of uint)
+0:18 'samp2dr' (uniform usampler2DRect)
+0:18 'c2D' (smooth in 2-component vector of float)
+0:18 'offsets' (temp 4-element array of 2-component vector of int)
+0:18 Constant:
+0:18 2 (const int)
+0:19 move second child to first child (temp 4-component vector of uint)
+0:19 'uv4' (temp 4-component vector of uint)
+0:19 textureGatherOffsets (global 4-component vector of uint)
+0:19 'samp2dr' (uniform usampler2DRect)
+0:19 'c2D' (smooth in 2-component vector of float)
+0:19 Constant:
+0:19 1 (const int)
+0:19 2 (const int)
+0:19 3 (const int)
+0:19 4 (const int)
+0:19 15 (const int)
+0:19 16 (const int)
+0:19 -2 (const int)
+0:19 0 (const int)
+0:19 Constant:
+0:19 2 (const int)
+0:20 Sequence
+0:20 move second child to first child (temp 4-component vector of float)
+0:20 'v4' (temp 4-component vector of float)
+0:20 textureGather (global 4-component vector of float)
+0:20 direct index (temp sampler2D)
+0:20 'arrayedSampler' (uniform 5-element array of sampler2D)
+0:20 Constant:
+0:20 0 (const int)
+0:20 'c2D' (smooth in 2-component vector of float)
+0:21 Sequence
+0:21 move second child to first child (temp 4-component vector of int)
+0:21 'iv4' (temp 4-component vector of int)
+0:21 textureGatherOffset (global 4-component vector of int)
+0:21 'isamp2DA' (uniform isampler2DArray)
+0:21 Constant:
+0:21 0.100000
+0:21 0.100000
+0:21 0.100000
+0:21 Constant:
+0:21 1 (const int)
+0:21 1 (const int)
+0:21 Constant:
+0:21 3 (const int)
+0:22 move second child to first child (temp 4-component vector of int)
+0:22 'iv4' (temp 4-component vector of int)
+0:22 textureGatherOffset (global 4-component vector of int)
+0:22 'isamp2DA' (uniform isampler2DArray)
+0:22 Constant:
+0:22 0.100000
+0:22 0.100000
+0:22 0.100000
+0:22 Constant:
+0:22 1 (const int)
+0:22 1 (const int)
+0:22 'i' (flat in int)
+0:23 move second child to first child (temp 4-component vector of int)
+0:23 'iv4' (temp 4-component vector of int)
+0:23 textureGatherOffset (global 4-component vector of int)
+0:23 'isamp2DA' (uniform isampler2DArray)
+0:23 Constant:
+0:23 0.100000
+0:23 0.100000
+0:23 0.100000
+0:23 Constant:
+0:23 1 (const int)
+0:23 1 (const int)
+0:23 Constant:
+0:23 4 (const int)
+0:24 move second child to first child (temp 4-component vector of int)
+0:24 'iv4' (temp 4-component vector of int)
+0:24 textureGatherOffset (global 4-component vector of int)
+0:24 'isamp2DA' (uniform isampler2DArray)
+0:24 Constant:
+0:24 0.100000
+0:24 0.100000
+0:24 0.100000
+0:24 Constant:
+0:24 1 (const int)
+0:24 1 (const int)
+0:24 Constant:
+0:24 3 (const int)
+0:25 move second child to first child (temp 4-component vector of int)
+0:25 'iv4' (temp 4-component vector of int)
+0:25 textureGatherOffset (global 4-component vector of int)
+0:25 'isamp2DA' (uniform isampler2DArray)
+0:25 Constant:
+0:25 0.100000
+0:25 0.100000
+0:25 0.100000
+0:25 Construct ivec2 (temp 2-component vector of int)
+0:25 'i' (flat in int)
+0:27 Sequence
+0:27 move second child to first child (temp 4-component vector of float)
+0:27 'c' (temp 4-component vector of float)
+0:27 'gl_FragCoord' (gl_FragCoord 4-component vector of float FragCoord)
+0:47 Function Definition: foo23( (global void)
+0:47 Function Parameters:
+0:? Sequence
+0:51 textureProjGradOffset (global float)
+0:51 'u2drs' (uniform sampler2DRectShadow)
+0:51 'outp' (out 4-component vector of float)
+0:51 Constant:
+0:51 0.000000
+0:51 0.000000
+0:51 Constant:
+0:51 0.000000
+0:51 0.000000
+0:51 Convert float to int (temp 2-component vector of int)
+0:51 'c2D' (smooth in 2-component vector of float)
+0:52 textureProjGradOffset (global float)
+0:52 'u2drs' (uniform sampler2DRectShadow)
+0:52 'outp' (out 4-component vector of float)
+0:52 Constant:
+0:52 0.000000
+0:52 0.000000
+0:52 Constant:
+0:52 0.000000
+0:52 0.000000
+0:52 Constant:
+0:52 3 (const int)
+0:52 4 (const int)
+0:53 textureProjGradOffset (global float)
+0:53 'u2drs' (uniform sampler2DRectShadow)
+0:53 'outp' (out 4-component vector of float)
+0:53 Constant:
+0:53 0.000000
+0:53 0.000000
+0:53 Constant:
+0:53 0.000000
+0:53 0.000000
+0:53 Constant:
+0:53 15 (const int)
+0:53 16 (const int)
+0:54 textureProjGradOffset (global float)
+0:54 'u2drs' (uniform sampler2DRectShadow)
+0:54 'outp' (out 4-component vector of float)
+0:54 Constant:
+0:54 0.000000
+0:54 0.000000
+0:54 Constant:
+0:54 0.000000
+0:54 0.000000
+0:54 Constant:
+0:54 -10 (const int)
+0:54 20 (const int)
+0:60 Function Definition: foo24( (global void)
+0:60 Function Parameters:
+0:? Sequence
+0:63 move second child to first child (temp 3-component vector of double)
+0:63 'df' (temp 3-component vector of double)
+0:63 modf (global 3-component vector of double)
+0:63 Convert float to double (temp 3-component vector of double)
+0:63 vector swizzle (temp 3-component vector of float)
+0:63 'outp' (out 4-component vector of float)
+0:63 Sequence
+0:63 Constant:
+0:63 0 (const int)
+0:63 Constant:
+0:63 1 (const int)
+0:63 Constant:
+0:63 2 (const int)
+0:63 'di' (temp 3-component vector of double)
+0:71 Function Definition: foodc1( (global void)
+0:71 Function Parameters:
+0:73 Sequence
+0:73 Sequence
+0:73 move second child to first child (temp 2-component vector of float)
+0:73 'v2' (temp 2-component vector of float)
+0:73 dPdxFine (global 2-component vector of float)
+0:73 'in2' (smooth in 2-component vector of float)
+0:74 Sequence
+0:74 move second child to first child (temp 3-component vector of float)
+0:74 'v3' (temp 3-component vector of float)
+0:74 dPdyCoarse (global 3-component vector of float)
+0:74 'in3' (smooth in 3-component vector of float)
+0:75 Sequence
+0:75 move second child to first child (temp 4-component vector of float)
+0:75 'v4' (temp 4-component vector of float)
+0:75 add (temp 4-component vector of float)
+0:75 fwidthCoarse (global 4-component vector of float)
+0:75 'in4' (smooth in 4-component vector of float)
+0:75 fwidthFine (global 4-component vector of float)
+0:75 'in4' (smooth in 4-component vector of float)
+0:80 Function Definition: foodc2( (global void)
+0:80 Function Parameters:
+0:82 Sequence
+0:82 Sequence
+0:82 move second child to first child (temp 2-component vector of float)
+0:82 'v2' (temp 2-component vector of float)
+0:82 dPdxFine (global 2-component vector of float)
+0:82 'in2' (smooth in 2-component vector of float)
+0:83 Sequence
+0:83 move second child to first child (temp 3-component vector of float)
+0:83 'v3' (temp 3-component vector of float)
+0:83 dPdyCoarse (global 3-component vector of float)
+0:83 'in3' (smooth in 3-component vector of float)
+0:84 Sequence
+0:84 move second child to first child (temp 4-component vector of float)
+0:84 'v4' (temp 4-component vector of float)
+0:84 add (temp 4-component vector of float)
+0:84 fwidthCoarse (global 4-component vector of float)
+0:84 'in4' (smooth in 4-component vector of float)
+0:84 fwidthFine (global 4-component vector of float)
+0:84 'in4' (smooth in 4-component vector of float)
+0:89 move second child to first child (temp 2-component vector of float)
+0:89 'v2' (temp 2-component vector of float)
+0:89 frexp (global 2-component vector of float)
+0:89 'v2' (temp 2-component vector of float)
+0:89 'i2' (temp 2-component vector of int)
+0:90 move second child to first child (temp 3-component vector of float)
+0:90 'v3' (temp 3-component vector of float)
+0:90 ldexp (global 3-component vector of float)
+0:90 'v3' (temp 3-component vector of float)
+0:90 'i3' (temp 3-component vector of int)
+0:92 move second child to first child (temp uint)
+0:92 'u1' (temp uint)
+0:92 PackUnorm4x8 (global uint)
+0:92 'v4' (temp 4-component vector of float)
+0:93 move second child to first child (temp uint)
+0:93 'u1' (temp uint)
+0:93 PackSnorm4x8 (global uint)
+0:93 'v4' (temp 4-component vector of float)
+0:94 move second child to first child (temp 4-component vector of float)
+0:94 'v4' (temp 4-component vector of float)
+0:94 UnpackUnorm4x8 (global 4-component vector of float)
+0:94 'u1' (temp uint)
+0:95 move second child to first child (temp 4-component vector of float)
+0:95 'v4' (temp 4-component vector of float)
+0:95 UnpackSnorm4x8 (global 4-component vector of float)
+0:95 'u1' (temp uint)
+0:99 move second child to first child (temp double)
+0:99 'd' (temp double)
+0:99 PackDouble2x32 (global double)
+0:99 'u2' (temp 2-component vector of uint)
+0:100 move second child to first child (temp 2-component vector of uint)
+0:100 'u2' (temp 2-component vector of uint)
+0:100 UnpackDouble2x32 (global 2-component vector of uint)
+0:100 'd' (temp double)
+0:117 Function Definition: interp( (global void)
+0:117 Function Parameters:
+0:119 Sequence
+0:119 interpolateAtCentroid (global 2-component vector of float)
+0:119 'colorfc' (centroid flat in 2-component vector of float)
+0:120 interpolateAtCentroid (global 4-component vector of float)
+0:120 'colorSampIn' (smooth sample in 4-component vector of float)
+0:121 interpolateAtCentroid (global 4-component vector of float)
+0:121 'colorfsi' (noperspective in 4-component vector of float)
+0:122 interpolateAtCentroid (global float)
+0:122 'scalarIn' (smooth in float)
+0:123 Constant:
+0:123 0.000000
+0:124 interpolateAtCentroid (global 3-component vector of float)
+0:124 direct index (smooth sample temp 3-component vector of float)
+0:124 'sampInArray' (smooth sample in 4-element array of 3-component vector of float)
+0:124 Constant:
+0:124 2 (const int)
+0:125 interpolateAtCentroid (global 2-component vector of float)
+0:125 vector swizzle (temp 2-component vector of float)
+0:125 direct index (smooth sample temp 3-component vector of float)
+0:125 'sampInArray' (smooth sample in 4-element array of 3-component vector of float)
+0:125 Constant:
+0:125 2 (const int)
+0:125 Sequence
+0:125 Constant:
+0:125 0 (const int)
+0:125 Constant:
+0:125 1 (const int)
+0:127 Constant:
+0:127 0.000000
+0:128 interpolateAtSample (global 3-component vector of float)
+0:128 indirect index (smooth sample temp 3-component vector of float)
+0:128 'sampInArray' (smooth sample in 4-element array of 3-component vector of float)
+0:128 'i' (flat in int)
+0:128 Constant:
+0:128 0 (const int)
+0:129 interpolateAtSample (global float)
+0:129 x: direct index for structure (global float)
+0:129 's1' (smooth in structure{global float x})
+0:129 Constant:
+0:129 0 (const int)
+0:129 Constant:
+0:129 2 (const int)
+0:130 interpolateAtSample (global float)
+0:130 'scalarIn' (smooth in float)
+0:130 Constant:
+0:130 1 (const int)
+0:132 Constant:
+0:132 0.000000
+0:133 interpolateAtOffset (global 3-component vector of float)
+0:133 direct index (smooth sample temp 3-component vector of float)
+0:133 'sampInArray' (smooth sample in 4-element array of 3-component vector of float)
+0:133 Constant:
+0:133 2 (const int)
+0:133 Constant:
+0:133 0.200000
+0:133 0.200000
+0:134 interpolateAtOffset (global 2-component vector of float)
+0:134 vector swizzle (temp 2-component vector of float)
+0:134 direct index (smooth sample temp 3-component vector of float)
+0:134 'sampInArray' (smooth sample in 4-element array of 3-component vector of float)
+0:134 Constant:
+0:134 2 (const int)
+0:134 Sequence
+0:134 Constant:
+0:134 0 (const int)
+0:134 Constant:
+0:134 1 (const int)
+0:134 Constant:
+0:134 0.200000
+0:134 0.200000
+0:135 interpolateAtOffset (global float)
+0:135 add (temp float)
+0:135 'scalarIn' (smooth in float)
+0:135 'scalarIn' (smooth in float)
+0:135 Constant:
+0:135 0.200000
+0:135 0.200000
+0:136 interpolateAtOffset (global float)
+0:136 x: direct index for structure (global float)
+0:136 's2' (sample temp structure{global float x})
+0:136 Constant:
+0:136 0 (const int)
+0:136 Constant:
+0:136 0.200000
+0:136 0.200000
+0:139 interpolateAtCentroid (global float)
+0:139 'f' (temp float)
+0:140 interpolateAtSample (global 4-component vector of float)
+0:140 'outp' (out 4-component vector of float)
+0:140 Constant:
+0:140 0 (const int)
+0:161 Function Definition: qlod( (global void)
+0:161 Function Parameters:
+0:? Sequence
+0:168 move second child to first child (temp 2-component vector of float)
+0:168 'lod' (temp 2-component vector of float)
+0:168 textureQueryLod (global 2-component vector of float)
+0:168 'samp1D' (uniform sampler1D)
+0:168 'pf' (temp float)
+0:169 move second child to first child (temp 2-component vector of float)
+0:169 'lod' (temp 2-component vector of float)
+0:169 textureQueryLod (global 2-component vector of float)
+0:169 'isamp2D' (uniform isampler2D)
+0:169 'pf2' (temp 2-component vector of float)
+0:170 move second child to first child (temp 2-component vector of float)
+0:170 'lod' (temp 2-component vector of float)
+0:170 textureQueryLod (global 2-component vector of float)
+0:170 'usamp3D' (uniform usampler3D)
+0:170 'pf3' (temp 3-component vector of float)
+0:171 move second child to first child (temp 2-component vector of float)
+0:171 'lod' (temp 2-component vector of float)
+0:171 textureQueryLod (global 2-component vector of float)
+0:171 'sampCube' (uniform samplerCube)
+0:171 'pf3' (temp 3-component vector of float)
+0:172 move second child to first child (temp 2-component vector of float)
+0:172 'lod' (temp 2-component vector of float)
+0:172 textureQueryLod (global 2-component vector of float)
+0:172 'isamp1DA' (uniform isampler1DArray)
+0:172 'pf' (temp float)
+0:173 move second child to first child (temp 2-component vector of float)
+0:173 'lod' (temp 2-component vector of float)
+0:173 textureQueryLod (global 2-component vector of float)
+0:173 'usamp2DA' (uniform usampler2DArray)
+0:173 'pf2' (temp 2-component vector of float)
+0:174 move second child to first child (temp 2-component vector of float)
+0:174 'lod' (temp 2-component vector of float)
+0:174 textureQueryLod (global 2-component vector of float)
+0:174 'isampCubeA' (uniform isamplerCubeArray)
+0:174 'pf3' (temp 3-component vector of float)
+0:176 move second child to first child (temp 2-component vector of float)
+0:176 'lod' (temp 2-component vector of float)
+0:176 textureQueryLod (global 2-component vector of float)
+0:176 'samp1Ds' (uniform sampler1DShadow)
+0:176 'pf' (temp float)
+0:177 move second child to first child (temp 2-component vector of float)
+0:177 'lod' (temp 2-component vector of float)
+0:177 textureQueryLod (global 2-component vector of float)
+0:177 'samp2Ds' (uniform sampler2DShadow)
+0:177 'pf2' (temp 2-component vector of float)
+0:178 move second child to first child (temp 2-component vector of float)
+0:178 'lod' (temp 2-component vector of float)
+0:178 textureQueryLod (global 2-component vector of float)
+0:178 'sampCubes' (uniform samplerCubeShadow)
+0:178 'pf3' (temp 3-component vector of float)
+0:179 move second child to first child (temp 2-component vector of float)
+0:179 'lod' (temp 2-component vector of float)
+0:179 textureQueryLod (global 2-component vector of float)
+0:179 'samp1DAs' (uniform sampler1DArrayShadow)
+0:179 'pf' (temp float)
+0:180 move second child to first child (temp 2-component vector of float)
+0:180 'lod' (temp 2-component vector of float)
+0:180 textureQueryLod (global 2-component vector of float)
+0:180 'samp2DAs' (uniform sampler2DArrayShadow)
+0:180 'pf2' (temp 2-component vector of float)
+0:181 move second child to first child (temp 2-component vector of float)
+0:181 'lod' (temp 2-component vector of float)
+0:181 textureQueryLod (global 2-component vector of float)
+0:181 'sampCubeAs' (uniform samplerCubeArrayShadow)
+0:181 'pf3' (temp 3-component vector of float)
+0:183 'lod' (temp 2-component vector of float)
+0:184 'lod' (temp 2-component vector of float)
+0:? Linker Objects
+0:? 'c2D' (smooth in 2-component vector of float)
+0:? 'i' (flat in int)
+0:? 'outp' (out 4-component vector of float)
+0:? 'arrayedSampler' (uniform 5-element array of sampler2D)
+0:? 'samp2dr' (uniform usampler2DRect)
+0:? 'isamp2DA' (uniform isampler2DArray)
+0:? 'gl_ClipDistance' (smooth in 4-element array of float ClipDistance)
+0:? 'vl' (layout(location=4 ) smooth in 4-component vector of float)
+0:? 'vl2' (layout(location=6 ) smooth in 4-component vector of float)
+0:? 'uv3' (layout(location=3 ) uniform 3-component vector of float)
+0:? 'anon@0' (in block{in float FogFragCoord gl_FogFragCoord, in implicitly-sized array of 4-component vector of float TexCoord gl_TexCoord, smooth in 4-component vector of float Color gl_Color, in 4-component vector of float SecondaryColor gl_SecondaryColor})
+0:? 'anon@0' (in block{in float FogFragCoord gl_FogFragCoord, in implicitly-sized array of 4-component vector of float TexCoord gl_TexCoord, smooth in 4-component vector of float Color gl_Color, in 4-component vector of float SecondaryColor gl_SecondaryColor})
+0:? 'gl_FragCoord' (gl_FragCoord 4-component vector of float FragCoord)
+0:? 'gl_FragCoord' (gl_FragCoord 4-component vector of float FragCoord)
+0:? 'u2drs' (uniform sampler2DRectShadow)
+0:? 'patchIn' (smooth patch in 4-component vector of float)
+0:? 'patchOut' (patch out 4-component vector of float)
+0:? 'in1' (smooth in float)
+0:? 'in2' (smooth in 2-component vector of float)
+0:? 'in3' (smooth in 3-component vector of float)
+0:? 'in4' (smooth in 4-component vector of float)
+0:? 'colorSampIn' (smooth sample in 4-component vector of float)
+0:? 'colorSampleBad' (sample out 4-component vector of float)
+0:? 'colorfsi' (noperspective in 4-component vector of float)
+0:? 'sampInArray' (smooth sample in 4-element array of 3-component vector of float)
+0:? 'scalarIn' (smooth in float)
+0:? 'colorfc' (centroid flat in 2-component vector of float)
+0:? 's1' (smooth in structure{global float x})
+0:? 's2' (sample temp structure{global float x})
+0:? 'samp1D' (uniform sampler1D)
+0:? 'isamp2D' (uniform isampler2D)
+0:? 'usamp3D' (uniform usampler3D)
+0:? 'sampCube' (uniform samplerCube)
+0:? 'isamp1DA' (uniform isampler1DArray)
+0:? 'usamp2DA' (uniform usampler2DArray)
+0:? 'isampCubeA' (uniform isamplerCubeArray)
+0:? 'samp1Ds' (uniform sampler1DShadow)
+0:? 'samp2Ds' (uniform sampler2DShadow)
+0:? 'sampCubes' (uniform samplerCubeShadow)
+0:? 'samp1DAs' (uniform sampler1DArrayShadow)
+0:? 'samp2DAs' (uniform sampler2DArrayShadow)
+0:? 'sampCubeAs' (uniform samplerCubeArrayShadow)
+0:? 'sampBuf' (uniform samplerBuffer)
+0:? 'sampRect' (uniform sampler2DRect)
+
+
+Linked fragment stage:
+
+
+Shader version: 400
+Requested GL_ARB_derivative_control
+Requested GL_ARB_separate_shader_objects
+gl_FragCoord pixel center is integer
+gl_FragCoord origin is upper left
+ERROR: node is still EOpNull!
+0:10 Function Definition: main( (global void)
+0:10 Function Parameters:
+0:? Sequence
+0:13 move second child to first child (temp 4-component vector of float)
+0:13 'v' (temp 4-component vector of float)
+0:13 texture (global 4-component vector of float)
+0:13 indirect index (temp sampler2D)
+0:13 'arrayedSampler' (uniform 5-element array of sampler2D)
+0:13 'i' (flat in int)
+0:13 'c2D' (smooth in 2-component vector of float)
+0:14 move second child to first child (temp float)
+0:14 direct index (temp float)
+0:14 'outp' (out 4-component vector of float)
+0:14 Constant:
+0:14 0 (const int)
+0:14 direct index (smooth temp float ClipDistance)
+0:14 'gl_ClipDistance' (smooth in 4-element array of float ClipDistance)
+0:14 Constant:
+0:14 1 (const int)
+0:18 Sequence
+0:18 move second child to first child (temp 4-component vector of uint)
+0:18 'uv4' (temp 4-component vector of uint)
+0:18 textureGatherOffsets (global 4-component vector of uint)
+0:18 'samp2dr' (uniform usampler2DRect)
+0:18 'c2D' (smooth in 2-component vector of float)
+0:18 'offsets' (temp 4-element array of 2-component vector of int)
+0:18 Constant:
+0:18 2 (const int)
+0:19 move second child to first child (temp 4-component vector of uint)
+0:19 'uv4' (temp 4-component vector of uint)
+0:19 textureGatherOffsets (global 4-component vector of uint)
+0:19 'samp2dr' (uniform usampler2DRect)
+0:19 'c2D' (smooth in 2-component vector of float)
+0:19 Constant:
+0:19 1 (const int)
+0:19 2 (const int)
+0:19 3 (const int)
+0:19 4 (const int)
+0:19 15 (const int)
+0:19 16 (const int)
+0:19 -2 (const int)
+0:19 0 (const int)
+0:19 Constant:
+0:19 2 (const int)
+0:20 Sequence
+0:20 move second child to first child (temp 4-component vector of float)
+0:20 'v4' (temp 4-component vector of float)
+0:20 textureGather (global 4-component vector of float)
+0:20 direct index (temp sampler2D)
+0:20 'arrayedSampler' (uniform 5-element array of sampler2D)
+0:20 Constant:
+0:20 0 (const int)
+0:20 'c2D' (smooth in 2-component vector of float)
+0:21 Sequence
+0:21 move second child to first child (temp 4-component vector of int)
+0:21 'iv4' (temp 4-component vector of int)
+0:21 textureGatherOffset (global 4-component vector of int)
+0:21 'isamp2DA' (uniform isampler2DArray)
+0:21 Constant:
+0:21 0.100000
+0:21 0.100000
+0:21 0.100000
+0:21 Constant:
+0:21 1 (const int)
+0:21 1 (const int)
+0:21 Constant:
+0:21 3 (const int)
+0:22 move second child to first child (temp 4-component vector of int)
+0:22 'iv4' (temp 4-component vector of int)
+0:22 textureGatherOffset (global 4-component vector of int)
+0:22 'isamp2DA' (uniform isampler2DArray)
+0:22 Constant:
+0:22 0.100000
+0:22 0.100000
+0:22 0.100000
+0:22 Constant:
+0:22 1 (const int)
+0:22 1 (const int)
+0:22 'i' (flat in int)
+0:23 move second child to first child (temp 4-component vector of int)
+0:23 'iv4' (temp 4-component vector of int)
+0:23 textureGatherOffset (global 4-component vector of int)
+0:23 'isamp2DA' (uniform isampler2DArray)
+0:23 Constant:
+0:23 0.100000
+0:23 0.100000
+0:23 0.100000
+0:23 Constant:
+0:23 1 (const int)
+0:23 1 (const int)
+0:23 Constant:
+0:23 4 (const int)
+0:24 move second child to first child (temp 4-component vector of int)
+0:24 'iv4' (temp 4-component vector of int)
+0:24 textureGatherOffset (global 4-component vector of int)
+0:24 'isamp2DA' (uniform isampler2DArray)
+0:24 Constant:
+0:24 0.100000
+0:24 0.100000
+0:24 0.100000
+0:24 Constant:
+0:24 1 (const int)
+0:24 1 (const int)
+0:24 Constant:
+0:24 3 (const int)
+0:25 move second child to first child (temp 4-component vector of int)
+0:25 'iv4' (temp 4-component vector of int)
+0:25 textureGatherOffset (global 4-component vector of int)
+0:25 'isamp2DA' (uniform isampler2DArray)
+0:25 Constant:
+0:25 0.100000
+0:25 0.100000
+0:25 0.100000
+0:25 Construct ivec2 (temp 2-component vector of int)
+0:25 'i' (flat in int)
+0:27 Sequence
+0:27 move second child to first child (temp 4-component vector of float)
+0:27 'c' (temp 4-component vector of float)
+0:27 'gl_FragCoord' (gl_FragCoord 4-component vector of float FragCoord)
+0:47 Function Definition: foo23( (global void)
+0:47 Function Parameters:
+0:? Sequence
+0:51 textureProjGradOffset (global float)
+0:51 'u2drs' (uniform sampler2DRectShadow)
+0:51 'outp' (out 4-component vector of float)
+0:51 Constant:
+0:51 0.000000
+0:51 0.000000
+0:51 Constant:
+0:51 0.000000
+0:51 0.000000
+0:51 Convert float to int (temp 2-component vector of int)
+0:51 'c2D' (smooth in 2-component vector of float)
+0:52 textureProjGradOffset (global float)
+0:52 'u2drs' (uniform sampler2DRectShadow)
+0:52 'outp' (out 4-component vector of float)
+0:52 Constant:
+0:52 0.000000
+0:52 0.000000
+0:52 Constant:
+0:52 0.000000
+0:52 0.000000
+0:52 Constant:
+0:52 3 (const int)
+0:52 4 (const int)
+0:53 textureProjGradOffset (global float)
+0:53 'u2drs' (uniform sampler2DRectShadow)
+0:53 'outp' (out 4-component vector of float)
+0:53 Constant:
+0:53 0.000000
+0:53 0.000000
+0:53 Constant:
+0:53 0.000000
+0:53 0.000000
+0:53 Constant:
+0:53 15 (const int)
+0:53 16 (const int)
+0:54 textureProjGradOffset (global float)
+0:54 'u2drs' (uniform sampler2DRectShadow)
+0:54 'outp' (out 4-component vector of float)
+0:54 Constant:
+0:54 0.000000
+0:54 0.000000
+0:54 Constant:
+0:54 0.000000
+0:54 0.000000
+0:54 Constant:
+0:54 -10 (const int)
+0:54 20 (const int)
+0:60 Function Definition: foo24( (global void)
+0:60 Function Parameters:
+0:? Sequence
+0:63 move second child to first child (temp 3-component vector of double)
+0:63 'df' (temp 3-component vector of double)
+0:63 modf (global 3-component vector of double)
+0:63 Convert float to double (temp 3-component vector of double)
+0:63 vector swizzle (temp 3-component vector of float)
+0:63 'outp' (out 4-component vector of float)
+0:63 Sequence
+0:63 Constant:
+0:63 0 (const int)
+0:63 Constant:
+0:63 1 (const int)
+0:63 Constant:
+0:63 2 (const int)
+0:63 'di' (temp 3-component vector of double)
+0:71 Function Definition: foodc1( (global void)
+0:71 Function Parameters:
+0:73 Sequence
+0:73 Sequence
+0:73 move second child to first child (temp 2-component vector of float)
+0:73 'v2' (temp 2-component vector of float)
+0:73 dPdxFine (global 2-component vector of float)
+0:73 'in2' (smooth in 2-component vector of float)
+0:74 Sequence
+0:74 move second child to first child (temp 3-component vector of float)
+0:74 'v3' (temp 3-component vector of float)
+0:74 dPdyCoarse (global 3-component vector of float)
+0:74 'in3' (smooth in 3-component vector of float)
+0:75 Sequence
+0:75 move second child to first child (temp 4-component vector of float)
+0:75 'v4' (temp 4-component vector of float)
+0:75 add (temp 4-component vector of float)
+0:75 fwidthCoarse (global 4-component vector of float)
+0:75 'in4' (smooth in 4-component vector of float)
+0:75 fwidthFine (global 4-component vector of float)
+0:75 'in4' (smooth in 4-component vector of float)
+0:80 Function Definition: foodc2( (global void)
+0:80 Function Parameters:
+0:82 Sequence
+0:82 Sequence
+0:82 move second child to first child (temp 2-component vector of float)
+0:82 'v2' (temp 2-component vector of float)
+0:82 dPdxFine (global 2-component vector of float)
+0:82 'in2' (smooth in 2-component vector of float)
+0:83 Sequence
+0:83 move second child to first child (temp 3-component vector of float)
+0:83 'v3' (temp 3-component vector of float)
+0:83 dPdyCoarse (global 3-component vector of float)
+0:83 'in3' (smooth in 3-component vector of float)
+0:84 Sequence
+0:84 move second child to first child (temp 4-component vector of float)
+0:84 'v4' (temp 4-component vector of float)
+0:84 add (temp 4-component vector of float)
+0:84 fwidthCoarse (global 4-component vector of float)
+0:84 'in4' (smooth in 4-component vector of float)
+0:84 fwidthFine (global 4-component vector of float)
+0:84 'in4' (smooth in 4-component vector of float)
+0:89 move second child to first child (temp 2-component vector of float)
+0:89 'v2' (temp 2-component vector of float)
+0:89 frexp (global 2-component vector of float)
+0:89 'v2' (temp 2-component vector of float)
+0:89 'i2' (temp 2-component vector of int)
+0:90 move second child to first child (temp 3-component vector of float)
+0:90 'v3' (temp 3-component vector of float)
+0:90 ldexp (global 3-component vector of float)
+0:90 'v3' (temp 3-component vector of float)
+0:90 'i3' (temp 3-component vector of int)
+0:92 move second child to first child (temp uint)
+0:92 'u1' (temp uint)
+0:92 PackUnorm4x8 (global uint)
+0:92 'v4' (temp 4-component vector of float)
+0:93 move second child to first child (temp uint)
+0:93 'u1' (temp uint)
+0:93 PackSnorm4x8 (global uint)
+0:93 'v4' (temp 4-component vector of float)
+0:94 move second child to first child (temp 4-component vector of float)
+0:94 'v4' (temp 4-component vector of float)
+0:94 UnpackUnorm4x8 (global 4-component vector of float)
+0:94 'u1' (temp uint)
+0:95 move second child to first child (temp 4-component vector of float)
+0:95 'v4' (temp 4-component vector of float)
+0:95 UnpackSnorm4x8 (global 4-component vector of float)
+0:95 'u1' (temp uint)
+0:99 move second child to first child (temp double)
+0:99 'd' (temp double)
+0:99 PackDouble2x32 (global double)
+0:99 'u2' (temp 2-component vector of uint)
+0:100 move second child to first child (temp 2-component vector of uint)
+0:100 'u2' (temp 2-component vector of uint)
+0:100 UnpackDouble2x32 (global 2-component vector of uint)
+0:100 'd' (temp double)
+0:117 Function Definition: interp( (global void)
+0:117 Function Parameters:
+0:119 Sequence
+0:119 interpolateAtCentroid (global 2-component vector of float)
+0:119 'colorfc' (centroid flat in 2-component vector of float)
+0:120 interpolateAtCentroid (global 4-component vector of float)
+0:120 'colorSampIn' (smooth sample in 4-component vector of float)
+0:121 interpolateAtCentroid (global 4-component vector of float)
+0:121 'colorfsi' (noperspective in 4-component vector of float)
+0:122 interpolateAtCentroid (global float)
+0:122 'scalarIn' (smooth in float)
+0:123 Constant:
+0:123 0.000000
+0:124 interpolateAtCentroid (global 3-component vector of float)
+0:124 direct index (smooth sample temp 3-component vector of float)
+0:124 'sampInArray' (smooth sample in 4-element array of 3-component vector of float)
+0:124 Constant:
+0:124 2 (const int)
+0:125 interpolateAtCentroid (global 2-component vector of float)
+0:125 vector swizzle (temp 2-component vector of float)
+0:125 direct index (smooth sample temp 3-component vector of float)
+0:125 'sampInArray' (smooth sample in 4-element array of 3-component vector of float)
+0:125 Constant:
+0:125 2 (const int)
+0:125 Sequence
+0:125 Constant:
+0:125 0 (const int)
+0:125 Constant:
+0:125 1 (const int)
+0:127 Constant:
+0:127 0.000000
+0:128 interpolateAtSample (global 3-component vector of float)
+0:128 indirect index (smooth sample temp 3-component vector of float)
+0:128 'sampInArray' (smooth sample in 4-element array of 3-component vector of float)
+0:128 'i' (flat in int)
+0:128 Constant:
+0:128 0 (const int)
+0:129 interpolateAtSample (global float)
+0:129 x: direct index for structure (global float)
+0:129 's1' (smooth in structure{global float x})
+0:129 Constant:
+0:129 0 (const int)
+0:129 Constant:
+0:129 2 (const int)
+0:130 interpolateAtSample (global float)
+0:130 'scalarIn' (smooth in float)
+0:130 Constant:
+0:130 1 (const int)
+0:132 Constant:
+0:132 0.000000
+0:133 interpolateAtOffset (global 3-component vector of float)
+0:133 direct index (smooth sample temp 3-component vector of float)
+0:133 'sampInArray' (smooth sample in 4-element array of 3-component vector of float)
+0:133 Constant:
+0:133 2 (const int)
+0:133 Constant:
+0:133 0.200000
+0:133 0.200000
+0:134 interpolateAtOffset (global 2-component vector of float)
+0:134 vector swizzle (temp 2-component vector of float)
+0:134 direct index (smooth sample temp 3-component vector of float)
+0:134 'sampInArray' (smooth sample in 4-element array of 3-component vector of float)
+0:134 Constant:
+0:134 2 (const int)
+0:134 Sequence
+0:134 Constant:
+0:134 0 (const int)
+0:134 Constant:
+0:134 1 (const int)
+0:134 Constant:
+0:134 0.200000
+0:134 0.200000
+0:135 interpolateAtOffset (global float)
+0:135 add (temp float)
+0:135 'scalarIn' (smooth in float)
+0:135 'scalarIn' (smooth in float)
+0:135 Constant:
+0:135 0.200000
+0:135 0.200000
+0:136 interpolateAtOffset (global float)
+0:136 x: direct index for structure (global float)
+0:136 's2' (sample temp structure{global float x})
+0:136 Constant:
+0:136 0 (const int)
+0:136 Constant:
+0:136 0.200000
+0:136 0.200000
+0:139 interpolateAtCentroid (global float)
+0:139 'f' (temp float)
+0:140 interpolateAtSample (global 4-component vector of float)
+0:140 'outp' (out 4-component vector of float)
+0:140 Constant:
+0:140 0 (const int)
+0:161 Function Definition: qlod( (global void)
+0:161 Function Parameters:
+0:? Sequence
+0:168 move second child to first child (temp 2-component vector of float)
+0:168 'lod' (temp 2-component vector of float)
+0:168 textureQueryLod (global 2-component vector of float)
+0:168 'samp1D' (uniform sampler1D)
+0:168 'pf' (temp float)
+0:169 move second child to first child (temp 2-component vector of float)
+0:169 'lod' (temp 2-component vector of float)
+0:169 textureQueryLod (global 2-component vector of float)
+0:169 'isamp2D' (uniform isampler2D)
+0:169 'pf2' (temp 2-component vector of float)
+0:170 move second child to first child (temp 2-component vector of float)
+0:170 'lod' (temp 2-component vector of float)
+0:170 textureQueryLod (global 2-component vector of float)
+0:170 'usamp3D' (uniform usampler3D)
+0:170 'pf3' (temp 3-component vector of float)
+0:171 move second child to first child (temp 2-component vector of float)
+0:171 'lod' (temp 2-component vector of float)
+0:171 textureQueryLod (global 2-component vector of float)
+0:171 'sampCube' (uniform samplerCube)
+0:171 'pf3' (temp 3-component vector of float)
+0:172 move second child to first child (temp 2-component vector of float)
+0:172 'lod' (temp 2-component vector of float)
+0:172 textureQueryLod (global 2-component vector of float)
+0:172 'isamp1DA' (uniform isampler1DArray)
+0:172 'pf' (temp float)
+0:173 move second child to first child (temp 2-component vector of float)
+0:173 'lod' (temp 2-component vector of float)
+0:173 textureQueryLod (global 2-component vector of float)
+0:173 'usamp2DA' (uniform usampler2DArray)
+0:173 'pf2' (temp 2-component vector of float)
+0:174 move second child to first child (temp 2-component vector of float)
+0:174 'lod' (temp 2-component vector of float)
+0:174 textureQueryLod (global 2-component vector of float)
+0:174 'isampCubeA' (uniform isamplerCubeArray)
+0:174 'pf3' (temp 3-component vector of float)
+0:176 move second child to first child (temp 2-component vector of float)
+0:176 'lod' (temp 2-component vector of float)
+0:176 textureQueryLod (global 2-component vector of float)
+0:176 'samp1Ds' (uniform sampler1DShadow)
+0:176 'pf' (temp float)
+0:177 move second child to first child (temp 2-component vector of float)
+0:177 'lod' (temp 2-component vector of float)
+0:177 textureQueryLod (global 2-component vector of float)
+0:177 'samp2Ds' (uniform sampler2DShadow)
+0:177 'pf2' (temp 2-component vector of float)
+0:178 move second child to first child (temp 2-component vector of float)
+0:178 'lod' (temp 2-component vector of float)
+0:178 textureQueryLod (global 2-component vector of float)
+0:178 'sampCubes' (uniform samplerCubeShadow)
+0:178 'pf3' (temp 3-component vector of float)
+0:179 move second child to first child (temp 2-component vector of float)
+0:179 'lod' (temp 2-component vector of float)
+0:179 textureQueryLod (global 2-component vector of float)
+0:179 'samp1DAs' (uniform sampler1DArrayShadow)
+0:179 'pf' (temp float)
+0:180 move second child to first child (temp 2-component vector of float)
+0:180 'lod' (temp 2-component vector of float)
+0:180 textureQueryLod (global 2-component vector of float)
+0:180 'samp2DAs' (uniform sampler2DArrayShadow)
+0:180 'pf2' (temp 2-component vector of float)
+0:181 move second child to first child (temp 2-component vector of float)
+0:181 'lod' (temp 2-component vector of float)
+0:181 textureQueryLod (global 2-component vector of float)
+0:181 'sampCubeAs' (uniform samplerCubeArrayShadow)
+0:181 'pf3' (temp 3-component vector of float)
+0:183 'lod' (temp 2-component vector of float)
+0:184 'lod' (temp 2-component vector of float)
+0:? Linker Objects
+0:? 'c2D' (smooth in 2-component vector of float)
+0:? 'i' (flat in int)
+0:? 'outp' (out 4-component vector of float)
+0:? 'arrayedSampler' (uniform 5-element array of sampler2D)
+0:? 'samp2dr' (uniform usampler2DRect)
+0:? 'isamp2DA' (uniform isampler2DArray)
+0:? 'gl_ClipDistance' (smooth in 4-element array of float ClipDistance)
+0:? 'vl' (layout(location=4 ) smooth in 4-component vector of float)
+0:? 'vl2' (layout(location=6 ) smooth in 4-component vector of float)
+0:? 'uv3' (layout(location=3 ) uniform 3-component vector of float)
+0:? 'anon@0' (in block{in float FogFragCoord gl_FogFragCoord, in 1-element array of 4-component vector of float TexCoord gl_TexCoord, smooth in 4-component vector of float Color gl_Color, in 4-component vector of float SecondaryColor gl_SecondaryColor})
+0:? 'anon@0' (in block{in float FogFragCoord gl_FogFragCoord, in 1-element array of 4-component vector of float TexCoord gl_TexCoord, smooth in 4-component vector of float Color gl_Color, in 4-component vector of float SecondaryColor gl_SecondaryColor})
+0:? 'gl_FragCoord' (gl_FragCoord 4-component vector of float FragCoord)
+0:? 'gl_FragCoord' (gl_FragCoord 4-component vector of float FragCoord)
+0:? 'u2drs' (uniform sampler2DRectShadow)
+0:? 'patchIn' (smooth patch in 4-component vector of float)
+0:? 'patchOut' (patch out 4-component vector of float)
+0:? 'in1' (smooth in float)
+0:? 'in2' (smooth in 2-component vector of float)
+0:? 'in3' (smooth in 3-component vector of float)
+0:? 'in4' (smooth in 4-component vector of float)
+0:? 'colorSampIn' (smooth sample in 4-component vector of float)
+0:? 'colorSampleBad' (sample out 4-component vector of float)
+0:? 'colorfsi' (noperspective in 4-component vector of float)
+0:? 'sampInArray' (smooth sample in 4-element array of 3-component vector of float)
+0:? 'scalarIn' (smooth in float)
+0:? 'colorfc' (centroid flat in 2-component vector of float)
+0:? 's1' (smooth in structure{global float x})
+0:? 's2' (sample temp structure{global float x})
+0:? 'samp1D' (uniform sampler1D)
+0:? 'isamp2D' (uniform isampler2D)
+0:? 'usamp3D' (uniform usampler3D)
+0:? 'sampCube' (uniform samplerCube)
+0:? 'isamp1DA' (uniform isampler1DArray)
+0:? 'usamp2DA' (uniform usampler2DArray)
+0:? 'isampCubeA' (uniform isamplerCubeArray)
+0:? 'samp1Ds' (uniform sampler1DShadow)
+0:? 'samp2Ds' (uniform sampler2DShadow)
+0:? 'sampCubes' (uniform samplerCubeShadow)
+0:? 'samp1DAs' (uniform sampler1DArrayShadow)
+0:? 'samp2DAs' (uniform sampler2DArrayShadow)
+0:? 'sampCubeAs' (uniform samplerCubeArrayShadow)
+0:? 'sampBuf' (uniform samplerBuffer)
+0:? 'sampRect' (uniform sampler2DRect)
+
diff --git a/chromium/third_party/glslang/src/Test/baseResults/400.geom.out b/chromium/third_party/glslang/src/Test/baseResults/400.geom.out
new file mode 100644
index 00000000000..16117e62a23
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/400.geom.out
@@ -0,0 +1,2067 @@
+400.geom
+Warning, version 400 is not yet complete; most version-specific features are present, but some are missing.
+ERROR: 0:12: 'invocations' : can only apply to a standalone qualifier
+ERROR: 0:20: 'patch' : not supported in this stage: geometry
+ERROR: 0:20: 'gl_PointSize' : cannot add layout to redeclared block member
+ERROR: 0:20: 'gl_PointSize' : cannot add patch to redeclared block member
+ERROR: 0:25: 'length' : array must first be sized by a redeclaration or layout qualifier
+ERROR: 0:36: 'length' : array must first be sized by a redeclaration or layout qualifier
+ERROR: 0:40: 'triangles' : inconsistent input primitive for array size of colorBad
+ERROR: 0:44: 'triangles' : inconsistent input primitive for array size of colorbad2
+ERROR: 0:56: 'location' : overlapping use of location 4
+ERROR: 0:58: 'patch' : not supported in this stage: geometry
+ERROR: 0:59: 'patch' : not supported in this stage: geometry
+ERROR: 0:61: 'in' : type must be an array: scalar
+ERROR: 0:63: 'invocations' : can only apply to 'in'
+ERROR: 0:64: 'max_vertices' : can only apply to 'out'
+ERROR: 0:65: 'max_vertices' : can only apply to 'out'
+ERROR: 0:65: 'invocations' : can only apply to 'in'
+ERROR: 0:67: 'in' : type must be an array: inbls
+ERROR: 0:71: 'triangles' : inconsistent input primitive for array size of inbla
+ERROR: 0:103: 'index' : there is no such layout identifier for this stage taking an assigned value
+ERROR: 0:115: 'textureQueryLod' : no matching overloaded function found
+ERROR: 0:115: 'assign' : cannot convert from 'const float' to 'temp 2-component vector of float'
+ERROR: 0:116: 'textureQueryLod' : no matching overloaded function found
+ERROR: 0:116: 'assign' : cannot convert from 'const float' to 'temp 2-component vector of float'
+ERROR: 23 compilation errors. No code generated.
+
+
+Shader version: 400
+Requested GL_ARB_separate_shader_objects
+invocations = 4
+max_vertices = 127
+input primitive = triangles
+output primitive = none
+ERROR: node is still EOpNull!
+0:3 Function Definition: main( (global void)
+0:3 Function Parameters:
+0:5 Sequence
+0:5 EmitStreamVertex (global void)
+0:5 Constant:
+0:5 1 (const int)
+0:6 EndStreamPrimitive (global void)
+0:6 Constant:
+0:6 0 (const int)
+0:7 EmitVertex (global void)
+0:8 EndPrimitive (global void)
+0:9 Sequence
+0:9 move second child to first child (temp int)
+0:9 'id' (temp int)
+0:9 'gl_InvocationID' (in int InvocationID)
+0:23 Function Definition: foo( (global void)
+0:23 Function Parameters:
+0:25 Sequence
+0:25 Constant:
+0:25 1 (const int)
+0:26 gl_Position: direct index for structure (in 4-component vector of float Position)
+0:26 direct index (temp block{in 4-component vector of float Position gl_Position, in float PointSize gl_PointSize})
+0:26 'gl_in' (in 3-element array of block{in 4-component vector of float Position gl_Position, in float PointSize gl_PointSize})
+0:26 Constant:
+0:26 1 (const int)
+0:26 Constant:
+0:26 0 (const int)
+0:34 Function Definition: foo2( (global void)
+0:34 Function Parameters:
+0:36 Sequence
+0:36 Constant:
+0:36 1 (const int)
+0:37 Constant:
+0:37 3 (const int)
+0:46 Function Definition: foo3( (global void)
+0:46 Function Parameters:
+0:48 Sequence
+0:48 Constant:
+0:48 3 (const int)
+0:49 Constant:
+0:49 3 (const int)
+0:50 Constant:
+0:50 3 (const int)
+0:51 Constant:
+0:51 3 (const int)
+0:75 Function Definition: bits( (global void)
+0:75 Function Parameters:
+0:? Sequence
+0:78 move second child to first child (temp 2-component vector of uint)
+0:78 'u2' (temp 2-component vector of uint)
+0:78 addCarry (global 2-component vector of uint)
+0:78 'u2' (temp 2-component vector of uint)
+0:78 'u2' (temp 2-component vector of uint)
+0:78 'u2' (temp 2-component vector of uint)
+0:80 move second child to first child (temp uint)
+0:80 'u1' (temp uint)
+0:80 subBorrow (global uint)
+0:80 'u1' (temp uint)
+0:80 'u1' (temp uint)
+0:80 'u1' (temp uint)
+0:82 uMulExtended (global void)
+0:82 'u4' (temp 4-component vector of uint)
+0:82 'u4' (temp 4-component vector of uint)
+0:82 'u4' (temp 4-component vector of uint)
+0:82 'u4' (temp 4-component vector of uint)
+0:84 iMulExtended (global void)
+0:84 'i4' (temp 4-component vector of int)
+0:84 'i4' (temp 4-component vector of int)
+0:84 'i4' (temp 4-component vector of int)
+0:84 'i4' (temp 4-component vector of int)
+0:86 move second child to first child (temp int)
+0:86 'i1' (temp int)
+0:86 bitfieldExtract (global int)
+0:86 'i1' (temp int)
+0:86 Constant:
+0:86 4 (const int)
+0:86 Constant:
+0:86 5 (const int)
+0:88 move second child to first child (temp 3-component vector of uint)
+0:88 'u3' (temp 3-component vector of uint)
+0:88 bitfieldExtract (global 3-component vector of uint)
+0:88 'u3' (temp 3-component vector of uint)
+0:88 Constant:
+0:88 4 (const int)
+0:88 Constant:
+0:88 5 (const int)
+0:90 move second child to first child (temp 3-component vector of int)
+0:90 'i3' (temp 3-component vector of int)
+0:90 bitfieldInsert (global 3-component vector of int)
+0:90 'i3' (temp 3-component vector of int)
+0:90 'i3' (temp 3-component vector of int)
+0:90 Constant:
+0:90 4 (const int)
+0:90 Constant:
+0:90 5 (const int)
+0:91 move second child to first child (temp uint)
+0:91 'u1' (temp uint)
+0:91 bitfieldInsert (global uint)
+0:91 'u1' (temp uint)
+0:91 'u1' (temp uint)
+0:91 Constant:
+0:91 4 (const int)
+0:91 Constant:
+0:91 5 (const int)
+0:93 move second child to first child (temp 2-component vector of int)
+0:93 'i2' (temp 2-component vector of int)
+0:93 bitFieldReverse (global 2-component vector of int)
+0:93 'i2' (temp 2-component vector of int)
+0:94 move second child to first child (temp 4-component vector of uint)
+0:94 'u4' (temp 4-component vector of uint)
+0:94 bitFieldReverse (global 4-component vector of uint)
+0:94 'u4' (temp 4-component vector of uint)
+0:95 move second child to first child (temp int)
+0:95 'i1' (temp int)
+0:95 bitCount (global int)
+0:95 'i1' (temp int)
+0:96 move second child to first child (temp 3-component vector of int)
+0:96 'i3' (temp 3-component vector of int)
+0:96 bitCount (global 3-component vector of int)
+0:96 'u3' (temp 3-component vector of uint)
+0:97 move second child to first child (temp 2-component vector of int)
+0:97 'i2' (temp 2-component vector of int)
+0:97 findLSB (global 2-component vector of int)
+0:97 'i2' (temp 2-component vector of int)
+0:98 move second child to first child (temp 4-component vector of int)
+0:98 'i4' (temp 4-component vector of int)
+0:98 findLSB (global 4-component vector of int)
+0:98 'u4' (temp 4-component vector of uint)
+0:99 move second child to first child (temp int)
+0:99 'i1' (temp int)
+0:99 findMSB (global int)
+0:99 'i1' (temp int)
+0:100 move second child to first child (temp 2-component vector of int)
+0:100 'i2' (temp 2-component vector of int)
+0:100 findMSB (global 2-component vector of int)
+0:100 'u2' (temp 2-component vector of uint)
+0:108 Function Definition: qlod( (global void)
+0:108 Function Parameters:
+0:? Sequence
+0:115 'lod' (temp 2-component vector of float)
+0:116 'lod' (temp 2-component vector of float)
+0:119 Function Definition: doubles( (global void)
+0:119 Function Parameters:
+0:? Sequence
+0:131 move second child to first child (temp double)
+0:131 'doublev' (temp double)
+0:131 Constant:
+0:131 1.702939
+0:132 move second child to first child (temp 2-component vector of double)
+0:132 'dvec2v' (temp 2-component vector of double)
+0:132 Constant:
+0:132 1.643168
+0:132 1.643168
+0:133 move second child to first child (temp 3-component vector of double)
+0:133 'dvec3v' (temp 3-component vector of double)
+0:133 Constant:
+0:133 1.414214
+0:133 1.414214
+0:133 1.414214
+0:134 move second child to first child (temp 4-component vector of double)
+0:134 'dvec4v' (temp 4-component vector of double)
+0:134 Constant:
+0:134 1.449138
+0:134 1.449138
+0:134 1.449138
+0:134 1.449138
+0:136 add second child into first child (temp double)
+0:136 'doublev' (temp double)
+0:136 inverse sqrt (global double)
+0:136 'doublev' (temp double)
+0:137 add second child into first child (temp 2-component vector of double)
+0:137 'dvec2v' (temp 2-component vector of double)
+0:137 inverse sqrt (global 2-component vector of double)
+0:137 'dvec2v' (temp 2-component vector of double)
+0:138 add second child into first child (temp 3-component vector of double)
+0:138 'dvec3v' (temp 3-component vector of double)
+0:138 inverse sqrt (global 3-component vector of double)
+0:138 'dvec3v' (temp 3-component vector of double)
+0:139 add second child into first child (temp 4-component vector of double)
+0:139 'dvec4v' (temp 4-component vector of double)
+0:139 inverse sqrt (global 4-component vector of double)
+0:139 'dvec4v' (temp 4-component vector of double)
+0:141 add second child into first child (temp double)
+0:141 'doublev' (temp double)
+0:141 Absolute value (global double)
+0:141 'doublev' (temp double)
+0:142 add second child into first child (temp 2-component vector of double)
+0:142 'dvec2v' (temp 2-component vector of double)
+0:142 Absolute value (global 2-component vector of double)
+0:142 'dvec2v' (temp 2-component vector of double)
+0:143 add second child into first child (temp 3-component vector of double)
+0:143 'dvec3v' (temp 3-component vector of double)
+0:143 Absolute value (global 3-component vector of double)
+0:143 'dvec3v' (temp 3-component vector of double)
+0:144 add second child into first child (temp 4-component vector of double)
+0:144 'dvec4v' (temp 4-component vector of double)
+0:144 Absolute value (global 4-component vector of double)
+0:144 'dvec4v' (temp 4-component vector of double)
+0:146 add second child into first child (temp double)
+0:146 'doublev' (temp double)
+0:146 Sign (global double)
+0:146 'doublev' (temp double)
+0:147 add second child into first child (temp 2-component vector of double)
+0:147 'dvec2v' (temp 2-component vector of double)
+0:147 Sign (global 2-component vector of double)
+0:147 'dvec2v' (temp 2-component vector of double)
+0:148 add second child into first child (temp 3-component vector of double)
+0:148 'dvec3v' (temp 3-component vector of double)
+0:148 Sign (global 3-component vector of double)
+0:148 'dvec3v' (temp 3-component vector of double)
+0:149 add second child into first child (temp 4-component vector of double)
+0:149 'dvec4v' (temp 4-component vector of double)
+0:149 Sign (global 4-component vector of double)
+0:149 'dvec4v' (temp 4-component vector of double)
+0:151 add second child into first child (temp double)
+0:151 'doublev' (temp double)
+0:151 Floor (global double)
+0:151 'doublev' (temp double)
+0:152 add second child into first child (temp 2-component vector of double)
+0:152 'dvec2v' (temp 2-component vector of double)
+0:152 Floor (global 2-component vector of double)
+0:152 'dvec2v' (temp 2-component vector of double)
+0:153 add second child into first child (temp 3-component vector of double)
+0:153 'dvec3v' (temp 3-component vector of double)
+0:153 Floor (global 3-component vector of double)
+0:153 'dvec3v' (temp 3-component vector of double)
+0:154 add second child into first child (temp 4-component vector of double)
+0:154 'dvec4v' (temp 4-component vector of double)
+0:154 Floor (global 4-component vector of double)
+0:154 'dvec4v' (temp 4-component vector of double)
+0:156 add second child into first child (temp double)
+0:156 'doublev' (temp double)
+0:156 trunc (global double)
+0:156 'doublev' (temp double)
+0:157 add second child into first child (temp 2-component vector of double)
+0:157 'dvec2v' (temp 2-component vector of double)
+0:157 trunc (global 2-component vector of double)
+0:157 'dvec2v' (temp 2-component vector of double)
+0:158 add second child into first child (temp 3-component vector of double)
+0:158 'dvec3v' (temp 3-component vector of double)
+0:158 trunc (global 3-component vector of double)
+0:158 'dvec3v' (temp 3-component vector of double)
+0:159 add second child into first child (temp 4-component vector of double)
+0:159 'dvec4v' (temp 4-component vector of double)
+0:159 trunc (global 4-component vector of double)
+0:159 'dvec4v' (temp 4-component vector of double)
+0:161 add second child into first child (temp double)
+0:161 'doublev' (temp double)
+0:161 round (global double)
+0:161 'doublev' (temp double)
+0:162 add second child into first child (temp 2-component vector of double)
+0:162 'dvec2v' (temp 2-component vector of double)
+0:162 round (global 2-component vector of double)
+0:162 'dvec2v' (temp 2-component vector of double)
+0:163 add second child into first child (temp 3-component vector of double)
+0:163 'dvec3v' (temp 3-component vector of double)
+0:163 round (global 3-component vector of double)
+0:163 'dvec3v' (temp 3-component vector of double)
+0:164 add second child into first child (temp 4-component vector of double)
+0:164 'dvec4v' (temp 4-component vector of double)
+0:164 round (global 4-component vector of double)
+0:164 'dvec4v' (temp 4-component vector of double)
+0:166 add second child into first child (temp double)
+0:166 'doublev' (temp double)
+0:166 roundEven (global double)
+0:166 'doublev' (temp double)
+0:167 add second child into first child (temp 2-component vector of double)
+0:167 'dvec2v' (temp 2-component vector of double)
+0:167 roundEven (global 2-component vector of double)
+0:167 'dvec2v' (temp 2-component vector of double)
+0:168 add second child into first child (temp 3-component vector of double)
+0:168 'dvec3v' (temp 3-component vector of double)
+0:168 roundEven (global 3-component vector of double)
+0:168 'dvec3v' (temp 3-component vector of double)
+0:169 add second child into first child (temp 4-component vector of double)
+0:169 'dvec4v' (temp 4-component vector of double)
+0:169 roundEven (global 4-component vector of double)
+0:169 'dvec4v' (temp 4-component vector of double)
+0:171 add second child into first child (temp double)
+0:171 'doublev' (temp double)
+0:171 Ceiling (global double)
+0:171 'doublev' (temp double)
+0:172 add second child into first child (temp 2-component vector of double)
+0:172 'dvec2v' (temp 2-component vector of double)
+0:172 Ceiling (global 2-component vector of double)
+0:172 'dvec2v' (temp 2-component vector of double)
+0:173 add second child into first child (temp 3-component vector of double)
+0:173 'dvec3v' (temp 3-component vector of double)
+0:173 Ceiling (global 3-component vector of double)
+0:173 'dvec3v' (temp 3-component vector of double)
+0:174 add second child into first child (temp 4-component vector of double)
+0:174 'dvec4v' (temp 4-component vector of double)
+0:174 Ceiling (global 4-component vector of double)
+0:174 'dvec4v' (temp 4-component vector of double)
+0:176 add second child into first child (temp double)
+0:176 'doublev' (temp double)
+0:176 Fraction (global double)
+0:176 'doublev' (temp double)
+0:177 add second child into first child (temp 2-component vector of double)
+0:177 'dvec2v' (temp 2-component vector of double)
+0:177 Fraction (global 2-component vector of double)
+0:177 'dvec2v' (temp 2-component vector of double)
+0:178 add second child into first child (temp 3-component vector of double)
+0:178 'dvec3v' (temp 3-component vector of double)
+0:178 Fraction (global 3-component vector of double)
+0:178 'dvec3v' (temp 3-component vector of double)
+0:179 add second child into first child (temp 4-component vector of double)
+0:179 'dvec4v' (temp 4-component vector of double)
+0:179 Fraction (global 4-component vector of double)
+0:179 'dvec4v' (temp 4-component vector of double)
+0:181 add second child into first child (temp double)
+0:181 'doublev' (temp double)
+0:181 mod (global double)
+0:181 'doublev' (temp double)
+0:181 'doublev' (temp double)
+0:182 add second child into first child (temp 2-component vector of double)
+0:182 'dvec2v' (temp 2-component vector of double)
+0:182 mod (global 2-component vector of double)
+0:182 'dvec2v' (temp 2-component vector of double)
+0:182 'doublev' (temp double)
+0:183 add second child into first child (temp 3-component vector of double)
+0:183 'dvec3v' (temp 3-component vector of double)
+0:183 mod (global 3-component vector of double)
+0:183 'dvec3v' (temp 3-component vector of double)
+0:183 'doublev' (temp double)
+0:184 add second child into first child (temp 4-component vector of double)
+0:184 'dvec4v' (temp 4-component vector of double)
+0:184 mod (global 4-component vector of double)
+0:184 'dvec4v' (temp 4-component vector of double)
+0:184 'doublev' (temp double)
+0:185 add second child into first child (temp 2-component vector of double)
+0:185 'dvec2v' (temp 2-component vector of double)
+0:185 mod (global 2-component vector of double)
+0:185 'dvec2v' (temp 2-component vector of double)
+0:185 'dvec2v' (temp 2-component vector of double)
+0:186 add second child into first child (temp 3-component vector of double)
+0:186 'dvec3v' (temp 3-component vector of double)
+0:186 mod (global 3-component vector of double)
+0:186 'dvec3v' (temp 3-component vector of double)
+0:186 'dvec3v' (temp 3-component vector of double)
+0:187 add second child into first child (temp 4-component vector of double)
+0:187 'dvec4v' (temp 4-component vector of double)
+0:187 mod (global 4-component vector of double)
+0:187 'dvec4v' (temp 4-component vector of double)
+0:187 'dvec4v' (temp 4-component vector of double)
+0:189 add second child into first child (temp double)
+0:189 'doublev' (temp double)
+0:189 modf (global double)
+0:189 'doublev' (temp double)
+0:189 'doublev' (temp double)
+0:190 add second child into first child (temp 2-component vector of double)
+0:190 'dvec2v' (temp 2-component vector of double)
+0:190 modf (global 2-component vector of double)
+0:190 'dvec2v' (temp 2-component vector of double)
+0:190 'dvec2v' (temp 2-component vector of double)
+0:191 add second child into first child (temp 3-component vector of double)
+0:191 'dvec3v' (temp 3-component vector of double)
+0:191 modf (global 3-component vector of double)
+0:191 'dvec3v' (temp 3-component vector of double)
+0:191 'dvec3v' (temp 3-component vector of double)
+0:192 add second child into first child (temp 4-component vector of double)
+0:192 'dvec4v' (temp 4-component vector of double)
+0:192 modf (global 4-component vector of double)
+0:192 'dvec4v' (temp 4-component vector of double)
+0:192 'dvec4v' (temp 4-component vector of double)
+0:194 add second child into first child (temp double)
+0:194 'doublev' (temp double)
+0:194 min (global double)
+0:194 'doublev' (temp double)
+0:194 'doublev' (temp double)
+0:195 add second child into first child (temp 2-component vector of double)
+0:195 'dvec2v' (temp 2-component vector of double)
+0:195 min (global 2-component vector of double)
+0:195 'dvec2v' (temp 2-component vector of double)
+0:195 'doublev' (temp double)
+0:196 add second child into first child (temp 3-component vector of double)
+0:196 'dvec3v' (temp 3-component vector of double)
+0:196 min (global 3-component vector of double)
+0:196 'dvec3v' (temp 3-component vector of double)
+0:196 'doublev' (temp double)
+0:197 add second child into first child (temp 4-component vector of double)
+0:197 'dvec4v' (temp 4-component vector of double)
+0:197 min (global 4-component vector of double)
+0:197 'dvec4v' (temp 4-component vector of double)
+0:197 'doublev' (temp double)
+0:198 add second child into first child (temp 2-component vector of double)
+0:198 'dvec2v' (temp 2-component vector of double)
+0:198 min (global 2-component vector of double)
+0:198 'dvec2v' (temp 2-component vector of double)
+0:198 'dvec2v' (temp 2-component vector of double)
+0:199 add second child into first child (temp 3-component vector of double)
+0:199 'dvec3v' (temp 3-component vector of double)
+0:199 min (global 3-component vector of double)
+0:199 'dvec3v' (temp 3-component vector of double)
+0:199 'dvec3v' (temp 3-component vector of double)
+0:200 add second child into first child (temp 4-component vector of double)
+0:200 'dvec4v' (temp 4-component vector of double)
+0:200 min (global 4-component vector of double)
+0:200 'dvec4v' (temp 4-component vector of double)
+0:200 'dvec4v' (temp 4-component vector of double)
+0:202 add second child into first child (temp double)
+0:202 'doublev' (temp double)
+0:202 max (global double)
+0:202 'doublev' (temp double)
+0:202 'doublev' (temp double)
+0:203 add second child into first child (temp 2-component vector of double)
+0:203 'dvec2v' (temp 2-component vector of double)
+0:203 max (global 2-component vector of double)
+0:203 'dvec2v' (temp 2-component vector of double)
+0:203 'doublev' (temp double)
+0:204 add second child into first child (temp 3-component vector of double)
+0:204 'dvec3v' (temp 3-component vector of double)
+0:204 max (global 3-component vector of double)
+0:204 'dvec3v' (temp 3-component vector of double)
+0:204 'doublev' (temp double)
+0:205 add second child into first child (temp 4-component vector of double)
+0:205 'dvec4v' (temp 4-component vector of double)
+0:205 max (global 4-component vector of double)
+0:205 'dvec4v' (temp 4-component vector of double)
+0:205 'doublev' (temp double)
+0:206 add second child into first child (temp 2-component vector of double)
+0:206 'dvec2v' (temp 2-component vector of double)
+0:206 max (global 2-component vector of double)
+0:206 'dvec2v' (temp 2-component vector of double)
+0:206 'dvec2v' (temp 2-component vector of double)
+0:207 add second child into first child (temp 3-component vector of double)
+0:207 'dvec3v' (temp 3-component vector of double)
+0:207 max (global 3-component vector of double)
+0:207 'dvec3v' (temp 3-component vector of double)
+0:207 'dvec3v' (temp 3-component vector of double)
+0:208 add second child into first child (temp 4-component vector of double)
+0:208 'dvec4v' (temp 4-component vector of double)
+0:208 max (global 4-component vector of double)
+0:208 'dvec4v' (temp 4-component vector of double)
+0:208 'dvec4v' (temp 4-component vector of double)
+0:210 add second child into first child (temp double)
+0:210 'doublev' (temp double)
+0:210 clamp (global double)
+0:210 'doublev' (temp double)
+0:210 'doublev' (temp double)
+0:210 'doublev' (temp double)
+0:211 add second child into first child (temp 2-component vector of double)
+0:211 'dvec2v' (temp 2-component vector of double)
+0:211 clamp (global 2-component vector of double)
+0:211 'dvec2v' (temp 2-component vector of double)
+0:211 'doublev' (temp double)
+0:211 'doublev' (temp double)
+0:212 add second child into first child (temp 3-component vector of double)
+0:212 'dvec3v' (temp 3-component vector of double)
+0:212 clamp (global 3-component vector of double)
+0:212 'dvec3v' (temp 3-component vector of double)
+0:212 'doublev' (temp double)
+0:212 'doublev' (temp double)
+0:213 add second child into first child (temp 4-component vector of double)
+0:213 'dvec4v' (temp 4-component vector of double)
+0:213 clamp (global 4-component vector of double)
+0:213 'dvec4v' (temp 4-component vector of double)
+0:213 'doublev' (temp double)
+0:213 'doublev' (temp double)
+0:214 add second child into first child (temp 2-component vector of double)
+0:214 'dvec2v' (temp 2-component vector of double)
+0:214 clamp (global 2-component vector of double)
+0:214 'dvec2v' (temp 2-component vector of double)
+0:214 'dvec2v' (temp 2-component vector of double)
+0:214 'dvec2v' (temp 2-component vector of double)
+0:215 add second child into first child (temp 3-component vector of double)
+0:215 'dvec3v' (temp 3-component vector of double)
+0:215 clamp (global 3-component vector of double)
+0:215 'dvec3v' (temp 3-component vector of double)
+0:215 'dvec3v' (temp 3-component vector of double)
+0:215 'dvec3v' (temp 3-component vector of double)
+0:216 add second child into first child (temp 4-component vector of double)
+0:216 'dvec4v' (temp 4-component vector of double)
+0:216 clamp (global 4-component vector of double)
+0:216 'dvec4v' (temp 4-component vector of double)
+0:216 'dvec4v' (temp 4-component vector of double)
+0:216 'dvec4v' (temp 4-component vector of double)
+0:218 add second child into first child (temp double)
+0:218 'doublev' (temp double)
+0:218 mix (global double)
+0:218 'doublev' (temp double)
+0:218 'doublev' (temp double)
+0:218 'doublev' (temp double)
+0:219 add second child into first child (temp 2-component vector of double)
+0:219 'dvec2v' (temp 2-component vector of double)
+0:219 mix (global 2-component vector of double)
+0:219 'dvec2v' (temp 2-component vector of double)
+0:219 'dvec2v' (temp 2-component vector of double)
+0:219 'doublev' (temp double)
+0:220 add second child into first child (temp 3-component vector of double)
+0:220 'dvec3v' (temp 3-component vector of double)
+0:220 mix (global 3-component vector of double)
+0:220 'dvec3v' (temp 3-component vector of double)
+0:220 'dvec3v' (temp 3-component vector of double)
+0:220 'doublev' (temp double)
+0:221 add second child into first child (temp 4-component vector of double)
+0:221 'dvec4v' (temp 4-component vector of double)
+0:221 mix (global 4-component vector of double)
+0:221 'dvec4v' (temp 4-component vector of double)
+0:221 'dvec4v' (temp 4-component vector of double)
+0:221 'doublev' (temp double)
+0:222 add second child into first child (temp 2-component vector of double)
+0:222 'dvec2v' (temp 2-component vector of double)
+0:222 mix (global 2-component vector of double)
+0:222 'dvec2v' (temp 2-component vector of double)
+0:222 'dvec2v' (temp 2-component vector of double)
+0:222 'dvec2v' (temp 2-component vector of double)
+0:223 add second child into first child (temp 3-component vector of double)
+0:223 'dvec3v' (temp 3-component vector of double)
+0:223 mix (global 3-component vector of double)
+0:223 'dvec3v' (temp 3-component vector of double)
+0:223 'dvec3v' (temp 3-component vector of double)
+0:223 'dvec3v' (temp 3-component vector of double)
+0:224 add second child into first child (temp 4-component vector of double)
+0:224 'dvec4v' (temp 4-component vector of double)
+0:224 mix (global 4-component vector of double)
+0:224 'dvec4v' (temp 4-component vector of double)
+0:224 'dvec4v' (temp 4-component vector of double)
+0:224 'dvec4v' (temp 4-component vector of double)
+0:225 add second child into first child (temp double)
+0:225 'doublev' (temp double)
+0:225 mix (global double)
+0:225 'doublev' (temp double)
+0:225 'doublev' (temp double)
+0:225 'boolv' (temp bool)
+0:226 add second child into first child (temp 2-component vector of double)
+0:226 'dvec2v' (temp 2-component vector of double)
+0:226 mix (global 2-component vector of double)
+0:226 'dvec2v' (temp 2-component vector of double)
+0:226 'dvec2v' (temp 2-component vector of double)
+0:226 'bvec2v' (temp 2-component vector of bool)
+0:227 add second child into first child (temp 3-component vector of double)
+0:227 'dvec3v' (temp 3-component vector of double)
+0:227 mix (global 3-component vector of double)
+0:227 'dvec3v' (temp 3-component vector of double)
+0:227 'dvec3v' (temp 3-component vector of double)
+0:227 'bvec3v' (temp 3-component vector of bool)
+0:228 add second child into first child (temp 4-component vector of double)
+0:228 'dvec4v' (temp 4-component vector of double)
+0:228 mix (global 4-component vector of double)
+0:228 'dvec4v' (temp 4-component vector of double)
+0:228 'dvec4v' (temp 4-component vector of double)
+0:228 'bvec4v' (temp 4-component vector of bool)
+0:230 add second child into first child (temp double)
+0:230 'doublev' (temp double)
+0:230 step (global double)
+0:230 'doublev' (temp double)
+0:230 'doublev' (temp double)
+0:231 add second child into first child (temp 2-component vector of double)
+0:231 'dvec2v' (temp 2-component vector of double)
+0:231 step (global 2-component vector of double)
+0:231 'dvec2v' (temp 2-component vector of double)
+0:231 'dvec2v' (temp 2-component vector of double)
+0:232 add second child into first child (temp 3-component vector of double)
+0:232 'dvec3v' (temp 3-component vector of double)
+0:232 step (global 3-component vector of double)
+0:232 'dvec3v' (temp 3-component vector of double)
+0:232 'dvec3v' (temp 3-component vector of double)
+0:233 add second child into first child (temp 4-component vector of double)
+0:233 'dvec4v' (temp 4-component vector of double)
+0:233 step (global 4-component vector of double)
+0:233 'dvec4v' (temp 4-component vector of double)
+0:233 'dvec4v' (temp 4-component vector of double)
+0:234 add second child into first child (temp 2-component vector of double)
+0:234 'dvec2v' (temp 2-component vector of double)
+0:234 step (global 2-component vector of double)
+0:234 'doublev' (temp double)
+0:234 'dvec2v' (temp 2-component vector of double)
+0:235 add second child into first child (temp 3-component vector of double)
+0:235 'dvec3v' (temp 3-component vector of double)
+0:235 step (global 3-component vector of double)
+0:235 'doublev' (temp double)
+0:235 'dvec3v' (temp 3-component vector of double)
+0:236 add second child into first child (temp 4-component vector of double)
+0:236 'dvec4v' (temp 4-component vector of double)
+0:236 step (global 4-component vector of double)
+0:236 'doublev' (temp double)
+0:236 'dvec4v' (temp 4-component vector of double)
+0:238 add second child into first child (temp double)
+0:238 'doublev' (temp double)
+0:238 smoothstep (global double)
+0:238 'doublev' (temp double)
+0:238 'doublev' (temp double)
+0:238 'doublev' (temp double)
+0:239 add second child into first child (temp 2-component vector of double)
+0:239 'dvec2v' (temp 2-component vector of double)
+0:239 smoothstep (global 2-component vector of double)
+0:239 'dvec2v' (temp 2-component vector of double)
+0:239 'dvec2v' (temp 2-component vector of double)
+0:239 'dvec2v' (temp 2-component vector of double)
+0:240 add second child into first child (temp 3-component vector of double)
+0:240 'dvec3v' (temp 3-component vector of double)
+0:240 smoothstep (global 3-component vector of double)
+0:240 'dvec3v' (temp 3-component vector of double)
+0:240 'dvec3v' (temp 3-component vector of double)
+0:240 'dvec3v' (temp 3-component vector of double)
+0:241 add second child into first child (temp 4-component vector of double)
+0:241 'dvec4v' (temp 4-component vector of double)
+0:241 smoothstep (global 4-component vector of double)
+0:241 'dvec4v' (temp 4-component vector of double)
+0:241 'dvec4v' (temp 4-component vector of double)
+0:241 'dvec4v' (temp 4-component vector of double)
+0:242 add second child into first child (temp 2-component vector of double)
+0:242 'dvec2v' (temp 2-component vector of double)
+0:242 smoothstep (global 2-component vector of double)
+0:242 'doublev' (temp double)
+0:242 'doublev' (temp double)
+0:242 'dvec2v' (temp 2-component vector of double)
+0:243 add second child into first child (temp 3-component vector of double)
+0:243 'dvec3v' (temp 3-component vector of double)
+0:243 smoothstep (global 3-component vector of double)
+0:243 'doublev' (temp double)
+0:243 'doublev' (temp double)
+0:243 'dvec3v' (temp 3-component vector of double)
+0:244 add second child into first child (temp 4-component vector of double)
+0:244 'dvec4v' (temp 4-component vector of double)
+0:244 smoothstep (global 4-component vector of double)
+0:244 'doublev' (temp double)
+0:244 'doublev' (temp double)
+0:244 'dvec4v' (temp 4-component vector of double)
+0:246 move second child to first child (temp bool)
+0:246 'boolv' (temp bool)
+0:246 isnan (global bool)
+0:246 'doublev' (temp double)
+0:247 move second child to first child (temp 2-component vector of bool)
+0:247 'bvec2v' (temp 2-component vector of bool)
+0:247 isnan (global 2-component vector of bool)
+0:247 'dvec2v' (temp 2-component vector of double)
+0:248 move second child to first child (temp 3-component vector of bool)
+0:248 'bvec3v' (temp 3-component vector of bool)
+0:248 isnan (global 3-component vector of bool)
+0:248 'dvec3v' (temp 3-component vector of double)
+0:249 move second child to first child (temp 4-component vector of bool)
+0:249 'bvec4v' (temp 4-component vector of bool)
+0:249 isnan (global 4-component vector of bool)
+0:249 'dvec4v' (temp 4-component vector of double)
+0:251 move second child to first child (temp bool)
+0:251 'boolv' (temp bool)
+0:251 Test condition and select (temp bool)
+0:251 Condition
+0:251 'boolv' (temp bool)
+0:251 true case
+0:251 isinf (global bool)
+0:251 'doublev' (temp double)
+0:251 false case
+0:251 Constant:
+0:251 false (const bool)
+0:252 move second child to first child (temp 2-component vector of bool)
+0:252 'bvec2v' (temp 2-component vector of bool)
+0:252 Test condition and select (temp 2-component vector of bool)
+0:252 Condition
+0:252 'boolv' (temp bool)
+0:252 true case
+0:252 isinf (global 2-component vector of bool)
+0:252 'dvec2v' (temp 2-component vector of double)
+0:252 false case
+0:252 Constant:
+0:252 false (const bool)
+0:252 false (const bool)
+0:253 move second child to first child (temp 3-component vector of bool)
+0:253 'bvec3v' (temp 3-component vector of bool)
+0:253 Test condition and select (temp 3-component vector of bool)
+0:253 Condition
+0:253 'boolv' (temp bool)
+0:253 true case
+0:253 isinf (global 3-component vector of bool)
+0:253 'dvec3v' (temp 3-component vector of double)
+0:253 false case
+0:253 Constant:
+0:253 false (const bool)
+0:253 false (const bool)
+0:253 false (const bool)
+0:254 move second child to first child (temp 4-component vector of bool)
+0:254 'bvec4v' (temp 4-component vector of bool)
+0:254 Test condition and select (temp 4-component vector of bool)
+0:254 Condition
+0:254 'boolv' (temp bool)
+0:254 true case
+0:254 isinf (global 4-component vector of bool)
+0:254 'dvec4v' (temp 4-component vector of double)
+0:254 false case
+0:254 Constant:
+0:254 false (const bool)
+0:254 false (const bool)
+0:254 false (const bool)
+0:254 false (const bool)
+0:256 add second child into first child (temp double)
+0:256 'doublev' (temp double)
+0:256 length (global double)
+0:256 'doublev' (temp double)
+0:257 add second child into first child (temp double)
+0:257 'doublev' (temp double)
+0:257 length (global double)
+0:257 'dvec2v' (temp 2-component vector of double)
+0:258 add second child into first child (temp double)
+0:258 'doublev' (temp double)
+0:258 length (global double)
+0:258 'dvec3v' (temp 3-component vector of double)
+0:259 add second child into first child (temp double)
+0:259 'doublev' (temp double)
+0:259 length (global double)
+0:259 'dvec4v' (temp 4-component vector of double)
+0:261 add second child into first child (temp double)
+0:261 'doublev' (temp double)
+0:261 distance (global double)
+0:261 'doublev' (temp double)
+0:261 'doublev' (temp double)
+0:262 add second child into first child (temp double)
+0:262 'doublev' (temp double)
+0:262 distance (global double)
+0:262 'dvec2v' (temp 2-component vector of double)
+0:262 'dvec2v' (temp 2-component vector of double)
+0:263 add second child into first child (temp double)
+0:263 'doublev' (temp double)
+0:263 distance (global double)
+0:263 'dvec3v' (temp 3-component vector of double)
+0:263 'dvec3v' (temp 3-component vector of double)
+0:264 add second child into first child (temp double)
+0:264 'doublev' (temp double)
+0:264 distance (global double)
+0:264 'dvec4v' (temp 4-component vector of double)
+0:264 'dvec4v' (temp 4-component vector of double)
+0:266 add second child into first child (temp double)
+0:266 'doublev' (temp double)
+0:266 dot-product (global double)
+0:266 'doublev' (temp double)
+0:266 'doublev' (temp double)
+0:267 add second child into first child (temp double)
+0:267 'doublev' (temp double)
+0:267 dot-product (global double)
+0:267 'dvec2v' (temp 2-component vector of double)
+0:267 'dvec2v' (temp 2-component vector of double)
+0:268 add second child into first child (temp double)
+0:268 'doublev' (temp double)
+0:268 dot-product (global double)
+0:268 'dvec3v' (temp 3-component vector of double)
+0:268 'dvec3v' (temp 3-component vector of double)
+0:269 add second child into first child (temp double)
+0:269 'doublev' (temp double)
+0:269 dot-product (global double)
+0:269 'dvec4v' (temp 4-component vector of double)
+0:269 'dvec4v' (temp 4-component vector of double)
+0:271 add second child into first child (temp 3-component vector of double)
+0:271 'dvec3v' (temp 3-component vector of double)
+0:271 cross-product (global 3-component vector of double)
+0:271 'dvec3v' (temp 3-component vector of double)
+0:271 'dvec3v' (temp 3-component vector of double)
+0:273 add second child into first child (temp double)
+0:273 'doublev' (temp double)
+0:273 normalize (global double)
+0:273 'doublev' (temp double)
+0:274 add second child into first child (temp 2-component vector of double)
+0:274 'dvec2v' (temp 2-component vector of double)
+0:274 normalize (global 2-component vector of double)
+0:274 'dvec2v' (temp 2-component vector of double)
+0:275 add second child into first child (temp 3-component vector of double)
+0:275 'dvec3v' (temp 3-component vector of double)
+0:275 normalize (global 3-component vector of double)
+0:275 'dvec3v' (temp 3-component vector of double)
+0:276 add second child into first child (temp 4-component vector of double)
+0:276 'dvec4v' (temp 4-component vector of double)
+0:276 normalize (global 4-component vector of double)
+0:276 'dvec4v' (temp 4-component vector of double)
+0:278 add second child into first child (temp double)
+0:278 'doublev' (temp double)
+0:278 face-forward (global double)
+0:278 'doublev' (temp double)
+0:278 'doublev' (temp double)
+0:278 'doublev' (temp double)
+0:279 add second child into first child (temp 2-component vector of double)
+0:279 'dvec2v' (temp 2-component vector of double)
+0:279 face-forward (global 2-component vector of double)
+0:279 'dvec2v' (temp 2-component vector of double)
+0:279 'dvec2v' (temp 2-component vector of double)
+0:279 'dvec2v' (temp 2-component vector of double)
+0:280 add second child into first child (temp 3-component vector of double)
+0:280 'dvec3v' (temp 3-component vector of double)
+0:280 face-forward (global 3-component vector of double)
+0:280 'dvec3v' (temp 3-component vector of double)
+0:280 'dvec3v' (temp 3-component vector of double)
+0:280 'dvec3v' (temp 3-component vector of double)
+0:281 add second child into first child (temp 4-component vector of double)
+0:281 'dvec4v' (temp 4-component vector of double)
+0:281 face-forward (global 4-component vector of double)
+0:281 'dvec4v' (temp 4-component vector of double)
+0:281 'dvec4v' (temp 4-component vector of double)
+0:281 'dvec4v' (temp 4-component vector of double)
+0:283 add second child into first child (temp double)
+0:283 'doublev' (temp double)
+0:283 reflect (global double)
+0:283 'doublev' (temp double)
+0:283 'doublev' (temp double)
+0:284 add second child into first child (temp 2-component vector of double)
+0:284 'dvec2v' (temp 2-component vector of double)
+0:284 reflect (global 2-component vector of double)
+0:284 'dvec2v' (temp 2-component vector of double)
+0:284 'dvec2v' (temp 2-component vector of double)
+0:285 add second child into first child (temp 3-component vector of double)
+0:285 'dvec3v' (temp 3-component vector of double)
+0:285 reflect (global 3-component vector of double)
+0:285 'dvec3v' (temp 3-component vector of double)
+0:285 'dvec3v' (temp 3-component vector of double)
+0:286 add second child into first child (temp 4-component vector of double)
+0:286 'dvec4v' (temp 4-component vector of double)
+0:286 reflect (global 4-component vector of double)
+0:286 'dvec4v' (temp 4-component vector of double)
+0:286 'dvec4v' (temp 4-component vector of double)
+0:288 add second child into first child (temp double)
+0:288 'doublev' (temp double)
+0:288 refract (global double)
+0:288 'doublev' (temp double)
+0:288 'doublev' (temp double)
+0:288 'doublev' (temp double)
+0:289 add second child into first child (temp 2-component vector of double)
+0:289 'dvec2v' (temp 2-component vector of double)
+0:289 refract (global 2-component vector of double)
+0:289 'dvec2v' (temp 2-component vector of double)
+0:289 'dvec2v' (temp 2-component vector of double)
+0:289 'doublev' (temp double)
+0:290 add second child into first child (temp 3-component vector of double)
+0:290 'dvec3v' (temp 3-component vector of double)
+0:290 refract (global 3-component vector of double)
+0:290 'dvec3v' (temp 3-component vector of double)
+0:290 'dvec3v' (temp 3-component vector of double)
+0:290 'doublev' (temp double)
+0:291 add second child into first child (temp 4-component vector of double)
+0:291 'dvec4v' (temp 4-component vector of double)
+0:291 refract (global 4-component vector of double)
+0:291 'dvec4v' (temp 4-component vector of double)
+0:291 'dvec4v' (temp 4-component vector of double)
+0:291 'doublev' (temp double)
+0:293 Sequence
+0:293 move second child to first child (temp 2X2 matrix of double)
+0:293 'dmat2v' (temp 2X2 matrix of double)
+0:293 outer product (global 2X2 matrix of double)
+0:293 'dvec2v' (temp 2-component vector of double)
+0:293 'dvec2v' (temp 2-component vector of double)
+0:294 Sequence
+0:294 move second child to first child (temp 3X3 matrix of double)
+0:294 'dmat3v' (temp 3X3 matrix of double)
+0:294 outer product (global 3X3 matrix of double)
+0:294 'dvec3v' (temp 3-component vector of double)
+0:294 'dvec3v' (temp 3-component vector of double)
+0:295 Sequence
+0:295 move second child to first child (temp 4X4 matrix of double)
+0:295 'dmat4v' (temp 4X4 matrix of double)
+0:295 outer product (global 4X4 matrix of double)
+0:295 'dvec4v' (temp 4-component vector of double)
+0:295 'dvec4v' (temp 4-component vector of double)
+0:296 Sequence
+0:296 move second child to first child (temp 2X3 matrix of double)
+0:296 'dmat2x3v' (temp 2X3 matrix of double)
+0:296 outer product (global 2X3 matrix of double)
+0:296 'dvec3v' (temp 3-component vector of double)
+0:296 'dvec2v' (temp 2-component vector of double)
+0:297 Sequence
+0:297 move second child to first child (temp 3X2 matrix of double)
+0:297 'dmat3x2v' (temp 3X2 matrix of double)
+0:297 outer product (global 3X2 matrix of double)
+0:297 'dvec2v' (temp 2-component vector of double)
+0:297 'dvec3v' (temp 3-component vector of double)
+0:298 Sequence
+0:298 move second child to first child (temp 2X4 matrix of double)
+0:298 'dmat2x4v' (temp 2X4 matrix of double)
+0:298 outer product (global 2X4 matrix of double)
+0:298 'dvec4v' (temp 4-component vector of double)
+0:298 'dvec2v' (temp 2-component vector of double)
+0:299 Sequence
+0:299 move second child to first child (temp 4X2 matrix of double)
+0:299 'dmat4x2v' (temp 4X2 matrix of double)
+0:299 outer product (global 4X2 matrix of double)
+0:299 'dvec2v' (temp 2-component vector of double)
+0:299 'dvec4v' (temp 4-component vector of double)
+0:300 Sequence
+0:300 move second child to first child (temp 3X4 matrix of double)
+0:300 'dmat3x4v' (temp 3X4 matrix of double)
+0:300 outer product (global 3X4 matrix of double)
+0:300 'dvec4v' (temp 4-component vector of double)
+0:300 'dvec3v' (temp 3-component vector of double)
+0:301 Sequence
+0:301 move second child to first child (temp 4X3 matrix of double)
+0:301 'dmat4x3v' (temp 4X3 matrix of double)
+0:301 outer product (global 4X3 matrix of double)
+0:301 'dvec3v' (temp 3-component vector of double)
+0:301 'dvec4v' (temp 4-component vector of double)
+0:303 matrix mult second child into first child (temp 2X2 matrix of double)
+0:303 'dmat2v' (temp 2X2 matrix of double)
+0:303 component-wise multiply (global 2X2 matrix of double)
+0:303 'dmat2v' (temp 2X2 matrix of double)
+0:303 'dmat2v' (temp 2X2 matrix of double)
+0:304 matrix mult second child into first child (temp 3X3 matrix of double)
+0:304 'dmat3v' (temp 3X3 matrix of double)
+0:304 component-wise multiply (global 3X3 matrix of double)
+0:304 'dmat3v' (temp 3X3 matrix of double)
+0:304 'dmat3v' (temp 3X3 matrix of double)
+0:305 matrix mult second child into first child (temp 4X4 matrix of double)
+0:305 'dmat4v' (temp 4X4 matrix of double)
+0:305 component-wise multiply (global 4X4 matrix of double)
+0:305 'dmat4v' (temp 4X4 matrix of double)
+0:305 'dmat4v' (temp 4X4 matrix of double)
+0:306 move second child to first child (temp 2X3 matrix of double)
+0:306 'dmat2x3v' (temp 2X3 matrix of double)
+0:306 component-wise multiply (global 2X3 matrix of double)
+0:306 'dmat2x3v' (temp 2X3 matrix of double)
+0:306 'dmat2x3v' (temp 2X3 matrix of double)
+0:307 move second child to first child (temp 2X4 matrix of double)
+0:307 'dmat2x4v' (temp 2X4 matrix of double)
+0:307 component-wise multiply (global 2X4 matrix of double)
+0:307 'dmat2x4v' (temp 2X4 matrix of double)
+0:307 'dmat2x4v' (temp 2X4 matrix of double)
+0:308 move second child to first child (temp 3X2 matrix of double)
+0:308 'dmat3x2v' (temp 3X2 matrix of double)
+0:308 component-wise multiply (global 3X2 matrix of double)
+0:308 'dmat3x2v' (temp 3X2 matrix of double)
+0:308 'dmat3x2v' (temp 3X2 matrix of double)
+0:309 move second child to first child (temp 3X4 matrix of double)
+0:309 'dmat3x4v' (temp 3X4 matrix of double)
+0:309 component-wise multiply (global 3X4 matrix of double)
+0:309 'dmat3x4v' (temp 3X4 matrix of double)
+0:309 'dmat3x4v' (temp 3X4 matrix of double)
+0:310 move second child to first child (temp 4X2 matrix of double)
+0:310 'dmat4x2v' (temp 4X2 matrix of double)
+0:310 component-wise multiply (global 4X2 matrix of double)
+0:310 'dmat4x2v' (temp 4X2 matrix of double)
+0:310 'dmat4x2v' (temp 4X2 matrix of double)
+0:311 move second child to first child (temp 4X3 matrix of double)
+0:311 'dmat4x3v' (temp 4X3 matrix of double)
+0:311 component-wise multiply (global 4X3 matrix of double)
+0:311 'dmat4x3v' (temp 4X3 matrix of double)
+0:311 'dmat4x3v' (temp 4X3 matrix of double)
+0:313 matrix mult second child into first child (temp 2X2 matrix of double)
+0:313 'dmat2v' (temp 2X2 matrix of double)
+0:313 transpose (global 2X2 matrix of double)
+0:313 'dmat2v' (temp 2X2 matrix of double)
+0:314 matrix mult second child into first child (temp 3X3 matrix of double)
+0:314 'dmat3v' (temp 3X3 matrix of double)
+0:314 transpose (global 3X3 matrix of double)
+0:314 'dmat3v' (temp 3X3 matrix of double)
+0:315 matrix mult second child into first child (temp 4X4 matrix of double)
+0:315 'dmat4v' (temp 4X4 matrix of double)
+0:315 transpose (global 4X4 matrix of double)
+0:315 'dmat4v' (temp 4X4 matrix of double)
+0:316 move second child to first child (temp 2X3 matrix of double)
+0:316 'dmat2x3v' (temp 2X3 matrix of double)
+0:316 transpose (global 2X3 matrix of double)
+0:316 'dmat3x2v' (temp 3X2 matrix of double)
+0:317 move second child to first child (temp 3X2 matrix of double)
+0:317 'dmat3x2v' (temp 3X2 matrix of double)
+0:317 transpose (global 3X2 matrix of double)
+0:317 'dmat2x3v' (temp 2X3 matrix of double)
+0:318 move second child to first child (temp 2X4 matrix of double)
+0:318 'dmat2x4v' (temp 2X4 matrix of double)
+0:318 transpose (global 2X4 matrix of double)
+0:318 'dmat4x2v' (temp 4X2 matrix of double)
+0:319 move second child to first child (temp 4X2 matrix of double)
+0:319 'dmat4x2v' (temp 4X2 matrix of double)
+0:319 transpose (global 4X2 matrix of double)
+0:319 'dmat2x4v' (temp 2X4 matrix of double)
+0:320 move second child to first child (temp 3X4 matrix of double)
+0:320 'dmat3x4v' (temp 3X4 matrix of double)
+0:320 transpose (global 3X4 matrix of double)
+0:320 'dmat4x3v' (temp 4X3 matrix of double)
+0:321 move second child to first child (temp 4X3 matrix of double)
+0:321 'dmat4x3v' (temp 4X3 matrix of double)
+0:321 transpose (global 4X3 matrix of double)
+0:321 'dmat3x4v' (temp 3X4 matrix of double)
+0:323 add second child into first child (temp double)
+0:323 'doublev' (temp double)
+0:323 determinant (global double)
+0:323 'dmat2v' (temp 2X2 matrix of double)
+0:324 add second child into first child (temp double)
+0:324 'doublev' (temp double)
+0:324 determinant (global double)
+0:324 'dmat3v' (temp 3X3 matrix of double)
+0:325 add second child into first child (temp double)
+0:325 'doublev' (temp double)
+0:325 determinant (global double)
+0:325 'dmat4v' (temp 4X4 matrix of double)
+0:327 matrix mult second child into first child (temp 2X2 matrix of double)
+0:327 'dmat2v' (temp 2X2 matrix of double)
+0:327 inverse (global 2X2 matrix of double)
+0:327 'dmat2v' (temp 2X2 matrix of double)
+0:328 matrix mult second child into first child (temp 3X3 matrix of double)
+0:328 'dmat3v' (temp 3X3 matrix of double)
+0:328 inverse (global 3X3 matrix of double)
+0:328 'dmat3v' (temp 3X3 matrix of double)
+0:329 matrix mult second child into first child (temp 4X4 matrix of double)
+0:329 'dmat4v' (temp 4X4 matrix of double)
+0:329 inverse (global 4X4 matrix of double)
+0:329 'dmat4v' (temp 4X4 matrix of double)
+0:? Linker Objects
+0:? 'bn' (in 3-element array of block{in int a})
+0:? 'gl_in' (in 3-element array of block{in 4-component vector of float Position gl_Position, in float PointSize gl_PointSize})
+0:? 'color' (in 3-element array of 4-component vector of float)
+0:? 'color2' (in 3-element array of 4-component vector of float)
+0:? 'colorS' (in 3-element array of 4-component vector of float)
+0:? 'colorBad' (in 4-element array of 4-component vector of float)
+0:? 'colorbad2' (in 2-element array of 4-component vector of float)
+0:? 'cva' (layout(location=4 ) in 3-element array of 4-component vector of float)
+0:? 'cvb' (layout(location=5 ) in 3-element array of 4-component vector of float)
+0:? 'cmc' (layout(location=2 ) in 3-element array of 3X3 matrix of float)
+0:? 'patchIn' (patch in 3-element array of 4-component vector of float)
+0:? 'patchOut' (layout(stream=0 ) patch out 4-component vector of float)
+0:? 'scalar' (in float)
+0:? 'inbls' (in block{in int a})
+0:? 'inbla' (in 17-element array of block{in int a})
+0:? 'indexedOut' (layout(location=7 stream=0 ) out 4-component vector of float)
+0:? 'samp1D' (uniform sampler1D)
+0:? 'samp2Ds' (uniform sampler2DShadow)
+
+
+Linked geometry stage:
+
+ERROR: Linking geometry stage: At least one shader must specify an output layout primitive
+
+Shader version: 400
+Requested GL_ARB_separate_shader_objects
+invocations = 4
+max_vertices = 127
+input primitive = triangles
+output primitive = none
+ERROR: node is still EOpNull!
+0:3 Function Definition: main( (global void)
+0:3 Function Parameters:
+0:5 Sequence
+0:5 EmitStreamVertex (global void)
+0:5 Constant:
+0:5 1 (const int)
+0:6 EndStreamPrimitive (global void)
+0:6 Constant:
+0:6 0 (const int)
+0:7 EmitVertex (global void)
+0:8 EndPrimitive (global void)
+0:9 Sequence
+0:9 move second child to first child (temp int)
+0:9 'id' (temp int)
+0:9 'gl_InvocationID' (in int InvocationID)
+0:23 Function Definition: foo( (global void)
+0:23 Function Parameters:
+0:25 Sequence
+0:25 Constant:
+0:25 1 (const int)
+0:26 gl_Position: direct index for structure (in 4-component vector of float Position)
+0:26 direct index (temp block{in 4-component vector of float Position gl_Position, in float PointSize gl_PointSize})
+0:26 'gl_in' (in 3-element array of block{in 4-component vector of float Position gl_Position, in float PointSize gl_PointSize})
+0:26 Constant:
+0:26 1 (const int)
+0:26 Constant:
+0:26 0 (const int)
+0:34 Function Definition: foo2( (global void)
+0:34 Function Parameters:
+0:36 Sequence
+0:36 Constant:
+0:36 1 (const int)
+0:37 Constant:
+0:37 3 (const int)
+0:46 Function Definition: foo3( (global void)
+0:46 Function Parameters:
+0:48 Sequence
+0:48 Constant:
+0:48 3 (const int)
+0:49 Constant:
+0:49 3 (const int)
+0:50 Constant:
+0:50 3 (const int)
+0:51 Constant:
+0:51 3 (const int)
+0:75 Function Definition: bits( (global void)
+0:75 Function Parameters:
+0:? Sequence
+0:78 move second child to first child (temp 2-component vector of uint)
+0:78 'u2' (temp 2-component vector of uint)
+0:78 addCarry (global 2-component vector of uint)
+0:78 'u2' (temp 2-component vector of uint)
+0:78 'u2' (temp 2-component vector of uint)
+0:78 'u2' (temp 2-component vector of uint)
+0:80 move second child to first child (temp uint)
+0:80 'u1' (temp uint)
+0:80 subBorrow (global uint)
+0:80 'u1' (temp uint)
+0:80 'u1' (temp uint)
+0:80 'u1' (temp uint)
+0:82 uMulExtended (global void)
+0:82 'u4' (temp 4-component vector of uint)
+0:82 'u4' (temp 4-component vector of uint)
+0:82 'u4' (temp 4-component vector of uint)
+0:82 'u4' (temp 4-component vector of uint)
+0:84 iMulExtended (global void)
+0:84 'i4' (temp 4-component vector of int)
+0:84 'i4' (temp 4-component vector of int)
+0:84 'i4' (temp 4-component vector of int)
+0:84 'i4' (temp 4-component vector of int)
+0:86 move second child to first child (temp int)
+0:86 'i1' (temp int)
+0:86 bitfieldExtract (global int)
+0:86 'i1' (temp int)
+0:86 Constant:
+0:86 4 (const int)
+0:86 Constant:
+0:86 5 (const int)
+0:88 move second child to first child (temp 3-component vector of uint)
+0:88 'u3' (temp 3-component vector of uint)
+0:88 bitfieldExtract (global 3-component vector of uint)
+0:88 'u3' (temp 3-component vector of uint)
+0:88 Constant:
+0:88 4 (const int)
+0:88 Constant:
+0:88 5 (const int)
+0:90 move second child to first child (temp 3-component vector of int)
+0:90 'i3' (temp 3-component vector of int)
+0:90 bitfieldInsert (global 3-component vector of int)
+0:90 'i3' (temp 3-component vector of int)
+0:90 'i3' (temp 3-component vector of int)
+0:90 Constant:
+0:90 4 (const int)
+0:90 Constant:
+0:90 5 (const int)
+0:91 move second child to first child (temp uint)
+0:91 'u1' (temp uint)
+0:91 bitfieldInsert (global uint)
+0:91 'u1' (temp uint)
+0:91 'u1' (temp uint)
+0:91 Constant:
+0:91 4 (const int)
+0:91 Constant:
+0:91 5 (const int)
+0:93 move second child to first child (temp 2-component vector of int)
+0:93 'i2' (temp 2-component vector of int)
+0:93 bitFieldReverse (global 2-component vector of int)
+0:93 'i2' (temp 2-component vector of int)
+0:94 move second child to first child (temp 4-component vector of uint)
+0:94 'u4' (temp 4-component vector of uint)
+0:94 bitFieldReverse (global 4-component vector of uint)
+0:94 'u4' (temp 4-component vector of uint)
+0:95 move second child to first child (temp int)
+0:95 'i1' (temp int)
+0:95 bitCount (global int)
+0:95 'i1' (temp int)
+0:96 move second child to first child (temp 3-component vector of int)
+0:96 'i3' (temp 3-component vector of int)
+0:96 bitCount (global 3-component vector of int)
+0:96 'u3' (temp 3-component vector of uint)
+0:97 move second child to first child (temp 2-component vector of int)
+0:97 'i2' (temp 2-component vector of int)
+0:97 findLSB (global 2-component vector of int)
+0:97 'i2' (temp 2-component vector of int)
+0:98 move second child to first child (temp 4-component vector of int)
+0:98 'i4' (temp 4-component vector of int)
+0:98 findLSB (global 4-component vector of int)
+0:98 'u4' (temp 4-component vector of uint)
+0:99 move second child to first child (temp int)
+0:99 'i1' (temp int)
+0:99 findMSB (global int)
+0:99 'i1' (temp int)
+0:100 move second child to first child (temp 2-component vector of int)
+0:100 'i2' (temp 2-component vector of int)
+0:100 findMSB (global 2-component vector of int)
+0:100 'u2' (temp 2-component vector of uint)
+0:108 Function Definition: qlod( (global void)
+0:108 Function Parameters:
+0:? Sequence
+0:115 'lod' (temp 2-component vector of float)
+0:116 'lod' (temp 2-component vector of float)
+0:119 Function Definition: doubles( (global void)
+0:119 Function Parameters:
+0:? Sequence
+0:131 move second child to first child (temp double)
+0:131 'doublev' (temp double)
+0:131 Constant:
+0:131 1.702939
+0:132 move second child to first child (temp 2-component vector of double)
+0:132 'dvec2v' (temp 2-component vector of double)
+0:132 Constant:
+0:132 1.643168
+0:132 1.643168
+0:133 move second child to first child (temp 3-component vector of double)
+0:133 'dvec3v' (temp 3-component vector of double)
+0:133 Constant:
+0:133 1.414214
+0:133 1.414214
+0:133 1.414214
+0:134 move second child to first child (temp 4-component vector of double)
+0:134 'dvec4v' (temp 4-component vector of double)
+0:134 Constant:
+0:134 1.449138
+0:134 1.449138
+0:134 1.449138
+0:134 1.449138
+0:136 add second child into first child (temp double)
+0:136 'doublev' (temp double)
+0:136 inverse sqrt (global double)
+0:136 'doublev' (temp double)
+0:137 add second child into first child (temp 2-component vector of double)
+0:137 'dvec2v' (temp 2-component vector of double)
+0:137 inverse sqrt (global 2-component vector of double)
+0:137 'dvec2v' (temp 2-component vector of double)
+0:138 add second child into first child (temp 3-component vector of double)
+0:138 'dvec3v' (temp 3-component vector of double)
+0:138 inverse sqrt (global 3-component vector of double)
+0:138 'dvec3v' (temp 3-component vector of double)
+0:139 add second child into first child (temp 4-component vector of double)
+0:139 'dvec4v' (temp 4-component vector of double)
+0:139 inverse sqrt (global 4-component vector of double)
+0:139 'dvec4v' (temp 4-component vector of double)
+0:141 add second child into first child (temp double)
+0:141 'doublev' (temp double)
+0:141 Absolute value (global double)
+0:141 'doublev' (temp double)
+0:142 add second child into first child (temp 2-component vector of double)
+0:142 'dvec2v' (temp 2-component vector of double)
+0:142 Absolute value (global 2-component vector of double)
+0:142 'dvec2v' (temp 2-component vector of double)
+0:143 add second child into first child (temp 3-component vector of double)
+0:143 'dvec3v' (temp 3-component vector of double)
+0:143 Absolute value (global 3-component vector of double)
+0:143 'dvec3v' (temp 3-component vector of double)
+0:144 add second child into first child (temp 4-component vector of double)
+0:144 'dvec4v' (temp 4-component vector of double)
+0:144 Absolute value (global 4-component vector of double)
+0:144 'dvec4v' (temp 4-component vector of double)
+0:146 add second child into first child (temp double)
+0:146 'doublev' (temp double)
+0:146 Sign (global double)
+0:146 'doublev' (temp double)
+0:147 add second child into first child (temp 2-component vector of double)
+0:147 'dvec2v' (temp 2-component vector of double)
+0:147 Sign (global 2-component vector of double)
+0:147 'dvec2v' (temp 2-component vector of double)
+0:148 add second child into first child (temp 3-component vector of double)
+0:148 'dvec3v' (temp 3-component vector of double)
+0:148 Sign (global 3-component vector of double)
+0:148 'dvec3v' (temp 3-component vector of double)
+0:149 add second child into first child (temp 4-component vector of double)
+0:149 'dvec4v' (temp 4-component vector of double)
+0:149 Sign (global 4-component vector of double)
+0:149 'dvec4v' (temp 4-component vector of double)
+0:151 add second child into first child (temp double)
+0:151 'doublev' (temp double)
+0:151 Floor (global double)
+0:151 'doublev' (temp double)
+0:152 add second child into first child (temp 2-component vector of double)
+0:152 'dvec2v' (temp 2-component vector of double)
+0:152 Floor (global 2-component vector of double)
+0:152 'dvec2v' (temp 2-component vector of double)
+0:153 add second child into first child (temp 3-component vector of double)
+0:153 'dvec3v' (temp 3-component vector of double)
+0:153 Floor (global 3-component vector of double)
+0:153 'dvec3v' (temp 3-component vector of double)
+0:154 add second child into first child (temp 4-component vector of double)
+0:154 'dvec4v' (temp 4-component vector of double)
+0:154 Floor (global 4-component vector of double)
+0:154 'dvec4v' (temp 4-component vector of double)
+0:156 add second child into first child (temp double)
+0:156 'doublev' (temp double)
+0:156 trunc (global double)
+0:156 'doublev' (temp double)
+0:157 add second child into first child (temp 2-component vector of double)
+0:157 'dvec2v' (temp 2-component vector of double)
+0:157 trunc (global 2-component vector of double)
+0:157 'dvec2v' (temp 2-component vector of double)
+0:158 add second child into first child (temp 3-component vector of double)
+0:158 'dvec3v' (temp 3-component vector of double)
+0:158 trunc (global 3-component vector of double)
+0:158 'dvec3v' (temp 3-component vector of double)
+0:159 add second child into first child (temp 4-component vector of double)
+0:159 'dvec4v' (temp 4-component vector of double)
+0:159 trunc (global 4-component vector of double)
+0:159 'dvec4v' (temp 4-component vector of double)
+0:161 add second child into first child (temp double)
+0:161 'doublev' (temp double)
+0:161 round (global double)
+0:161 'doublev' (temp double)
+0:162 add second child into first child (temp 2-component vector of double)
+0:162 'dvec2v' (temp 2-component vector of double)
+0:162 round (global 2-component vector of double)
+0:162 'dvec2v' (temp 2-component vector of double)
+0:163 add second child into first child (temp 3-component vector of double)
+0:163 'dvec3v' (temp 3-component vector of double)
+0:163 round (global 3-component vector of double)
+0:163 'dvec3v' (temp 3-component vector of double)
+0:164 add second child into first child (temp 4-component vector of double)
+0:164 'dvec4v' (temp 4-component vector of double)
+0:164 round (global 4-component vector of double)
+0:164 'dvec4v' (temp 4-component vector of double)
+0:166 add second child into first child (temp double)
+0:166 'doublev' (temp double)
+0:166 roundEven (global double)
+0:166 'doublev' (temp double)
+0:167 add second child into first child (temp 2-component vector of double)
+0:167 'dvec2v' (temp 2-component vector of double)
+0:167 roundEven (global 2-component vector of double)
+0:167 'dvec2v' (temp 2-component vector of double)
+0:168 add second child into first child (temp 3-component vector of double)
+0:168 'dvec3v' (temp 3-component vector of double)
+0:168 roundEven (global 3-component vector of double)
+0:168 'dvec3v' (temp 3-component vector of double)
+0:169 add second child into first child (temp 4-component vector of double)
+0:169 'dvec4v' (temp 4-component vector of double)
+0:169 roundEven (global 4-component vector of double)
+0:169 'dvec4v' (temp 4-component vector of double)
+0:171 add second child into first child (temp double)
+0:171 'doublev' (temp double)
+0:171 Ceiling (global double)
+0:171 'doublev' (temp double)
+0:172 add second child into first child (temp 2-component vector of double)
+0:172 'dvec2v' (temp 2-component vector of double)
+0:172 Ceiling (global 2-component vector of double)
+0:172 'dvec2v' (temp 2-component vector of double)
+0:173 add second child into first child (temp 3-component vector of double)
+0:173 'dvec3v' (temp 3-component vector of double)
+0:173 Ceiling (global 3-component vector of double)
+0:173 'dvec3v' (temp 3-component vector of double)
+0:174 add second child into first child (temp 4-component vector of double)
+0:174 'dvec4v' (temp 4-component vector of double)
+0:174 Ceiling (global 4-component vector of double)
+0:174 'dvec4v' (temp 4-component vector of double)
+0:176 add second child into first child (temp double)
+0:176 'doublev' (temp double)
+0:176 Fraction (global double)
+0:176 'doublev' (temp double)
+0:177 add second child into first child (temp 2-component vector of double)
+0:177 'dvec2v' (temp 2-component vector of double)
+0:177 Fraction (global 2-component vector of double)
+0:177 'dvec2v' (temp 2-component vector of double)
+0:178 add second child into first child (temp 3-component vector of double)
+0:178 'dvec3v' (temp 3-component vector of double)
+0:178 Fraction (global 3-component vector of double)
+0:178 'dvec3v' (temp 3-component vector of double)
+0:179 add second child into first child (temp 4-component vector of double)
+0:179 'dvec4v' (temp 4-component vector of double)
+0:179 Fraction (global 4-component vector of double)
+0:179 'dvec4v' (temp 4-component vector of double)
+0:181 add second child into first child (temp double)
+0:181 'doublev' (temp double)
+0:181 mod (global double)
+0:181 'doublev' (temp double)
+0:181 'doublev' (temp double)
+0:182 add second child into first child (temp 2-component vector of double)
+0:182 'dvec2v' (temp 2-component vector of double)
+0:182 mod (global 2-component vector of double)
+0:182 'dvec2v' (temp 2-component vector of double)
+0:182 'doublev' (temp double)
+0:183 add second child into first child (temp 3-component vector of double)
+0:183 'dvec3v' (temp 3-component vector of double)
+0:183 mod (global 3-component vector of double)
+0:183 'dvec3v' (temp 3-component vector of double)
+0:183 'doublev' (temp double)
+0:184 add second child into first child (temp 4-component vector of double)
+0:184 'dvec4v' (temp 4-component vector of double)
+0:184 mod (global 4-component vector of double)
+0:184 'dvec4v' (temp 4-component vector of double)
+0:184 'doublev' (temp double)
+0:185 add second child into first child (temp 2-component vector of double)
+0:185 'dvec2v' (temp 2-component vector of double)
+0:185 mod (global 2-component vector of double)
+0:185 'dvec2v' (temp 2-component vector of double)
+0:185 'dvec2v' (temp 2-component vector of double)
+0:186 add second child into first child (temp 3-component vector of double)
+0:186 'dvec3v' (temp 3-component vector of double)
+0:186 mod (global 3-component vector of double)
+0:186 'dvec3v' (temp 3-component vector of double)
+0:186 'dvec3v' (temp 3-component vector of double)
+0:187 add second child into first child (temp 4-component vector of double)
+0:187 'dvec4v' (temp 4-component vector of double)
+0:187 mod (global 4-component vector of double)
+0:187 'dvec4v' (temp 4-component vector of double)
+0:187 'dvec4v' (temp 4-component vector of double)
+0:189 add second child into first child (temp double)
+0:189 'doublev' (temp double)
+0:189 modf (global double)
+0:189 'doublev' (temp double)
+0:189 'doublev' (temp double)
+0:190 add second child into first child (temp 2-component vector of double)
+0:190 'dvec2v' (temp 2-component vector of double)
+0:190 modf (global 2-component vector of double)
+0:190 'dvec2v' (temp 2-component vector of double)
+0:190 'dvec2v' (temp 2-component vector of double)
+0:191 add second child into first child (temp 3-component vector of double)
+0:191 'dvec3v' (temp 3-component vector of double)
+0:191 modf (global 3-component vector of double)
+0:191 'dvec3v' (temp 3-component vector of double)
+0:191 'dvec3v' (temp 3-component vector of double)
+0:192 add second child into first child (temp 4-component vector of double)
+0:192 'dvec4v' (temp 4-component vector of double)
+0:192 modf (global 4-component vector of double)
+0:192 'dvec4v' (temp 4-component vector of double)
+0:192 'dvec4v' (temp 4-component vector of double)
+0:194 add second child into first child (temp double)
+0:194 'doublev' (temp double)
+0:194 min (global double)
+0:194 'doublev' (temp double)
+0:194 'doublev' (temp double)
+0:195 add second child into first child (temp 2-component vector of double)
+0:195 'dvec2v' (temp 2-component vector of double)
+0:195 min (global 2-component vector of double)
+0:195 'dvec2v' (temp 2-component vector of double)
+0:195 'doublev' (temp double)
+0:196 add second child into first child (temp 3-component vector of double)
+0:196 'dvec3v' (temp 3-component vector of double)
+0:196 min (global 3-component vector of double)
+0:196 'dvec3v' (temp 3-component vector of double)
+0:196 'doublev' (temp double)
+0:197 add second child into first child (temp 4-component vector of double)
+0:197 'dvec4v' (temp 4-component vector of double)
+0:197 min (global 4-component vector of double)
+0:197 'dvec4v' (temp 4-component vector of double)
+0:197 'doublev' (temp double)
+0:198 add second child into first child (temp 2-component vector of double)
+0:198 'dvec2v' (temp 2-component vector of double)
+0:198 min (global 2-component vector of double)
+0:198 'dvec2v' (temp 2-component vector of double)
+0:198 'dvec2v' (temp 2-component vector of double)
+0:199 add second child into first child (temp 3-component vector of double)
+0:199 'dvec3v' (temp 3-component vector of double)
+0:199 min (global 3-component vector of double)
+0:199 'dvec3v' (temp 3-component vector of double)
+0:199 'dvec3v' (temp 3-component vector of double)
+0:200 add second child into first child (temp 4-component vector of double)
+0:200 'dvec4v' (temp 4-component vector of double)
+0:200 min (global 4-component vector of double)
+0:200 'dvec4v' (temp 4-component vector of double)
+0:200 'dvec4v' (temp 4-component vector of double)
+0:202 add second child into first child (temp double)
+0:202 'doublev' (temp double)
+0:202 max (global double)
+0:202 'doublev' (temp double)
+0:202 'doublev' (temp double)
+0:203 add second child into first child (temp 2-component vector of double)
+0:203 'dvec2v' (temp 2-component vector of double)
+0:203 max (global 2-component vector of double)
+0:203 'dvec2v' (temp 2-component vector of double)
+0:203 'doublev' (temp double)
+0:204 add second child into first child (temp 3-component vector of double)
+0:204 'dvec3v' (temp 3-component vector of double)
+0:204 max (global 3-component vector of double)
+0:204 'dvec3v' (temp 3-component vector of double)
+0:204 'doublev' (temp double)
+0:205 add second child into first child (temp 4-component vector of double)
+0:205 'dvec4v' (temp 4-component vector of double)
+0:205 max (global 4-component vector of double)
+0:205 'dvec4v' (temp 4-component vector of double)
+0:205 'doublev' (temp double)
+0:206 add second child into first child (temp 2-component vector of double)
+0:206 'dvec2v' (temp 2-component vector of double)
+0:206 max (global 2-component vector of double)
+0:206 'dvec2v' (temp 2-component vector of double)
+0:206 'dvec2v' (temp 2-component vector of double)
+0:207 add second child into first child (temp 3-component vector of double)
+0:207 'dvec3v' (temp 3-component vector of double)
+0:207 max (global 3-component vector of double)
+0:207 'dvec3v' (temp 3-component vector of double)
+0:207 'dvec3v' (temp 3-component vector of double)
+0:208 add second child into first child (temp 4-component vector of double)
+0:208 'dvec4v' (temp 4-component vector of double)
+0:208 max (global 4-component vector of double)
+0:208 'dvec4v' (temp 4-component vector of double)
+0:208 'dvec4v' (temp 4-component vector of double)
+0:210 add second child into first child (temp double)
+0:210 'doublev' (temp double)
+0:210 clamp (global double)
+0:210 'doublev' (temp double)
+0:210 'doublev' (temp double)
+0:210 'doublev' (temp double)
+0:211 add second child into first child (temp 2-component vector of double)
+0:211 'dvec2v' (temp 2-component vector of double)
+0:211 clamp (global 2-component vector of double)
+0:211 'dvec2v' (temp 2-component vector of double)
+0:211 'doublev' (temp double)
+0:211 'doublev' (temp double)
+0:212 add second child into first child (temp 3-component vector of double)
+0:212 'dvec3v' (temp 3-component vector of double)
+0:212 clamp (global 3-component vector of double)
+0:212 'dvec3v' (temp 3-component vector of double)
+0:212 'doublev' (temp double)
+0:212 'doublev' (temp double)
+0:213 add second child into first child (temp 4-component vector of double)
+0:213 'dvec4v' (temp 4-component vector of double)
+0:213 clamp (global 4-component vector of double)
+0:213 'dvec4v' (temp 4-component vector of double)
+0:213 'doublev' (temp double)
+0:213 'doublev' (temp double)
+0:214 add second child into first child (temp 2-component vector of double)
+0:214 'dvec2v' (temp 2-component vector of double)
+0:214 clamp (global 2-component vector of double)
+0:214 'dvec2v' (temp 2-component vector of double)
+0:214 'dvec2v' (temp 2-component vector of double)
+0:214 'dvec2v' (temp 2-component vector of double)
+0:215 add second child into first child (temp 3-component vector of double)
+0:215 'dvec3v' (temp 3-component vector of double)
+0:215 clamp (global 3-component vector of double)
+0:215 'dvec3v' (temp 3-component vector of double)
+0:215 'dvec3v' (temp 3-component vector of double)
+0:215 'dvec3v' (temp 3-component vector of double)
+0:216 add second child into first child (temp 4-component vector of double)
+0:216 'dvec4v' (temp 4-component vector of double)
+0:216 clamp (global 4-component vector of double)
+0:216 'dvec4v' (temp 4-component vector of double)
+0:216 'dvec4v' (temp 4-component vector of double)
+0:216 'dvec4v' (temp 4-component vector of double)
+0:218 add second child into first child (temp double)
+0:218 'doublev' (temp double)
+0:218 mix (global double)
+0:218 'doublev' (temp double)
+0:218 'doublev' (temp double)
+0:218 'doublev' (temp double)
+0:219 add second child into first child (temp 2-component vector of double)
+0:219 'dvec2v' (temp 2-component vector of double)
+0:219 mix (global 2-component vector of double)
+0:219 'dvec2v' (temp 2-component vector of double)
+0:219 'dvec2v' (temp 2-component vector of double)
+0:219 'doublev' (temp double)
+0:220 add second child into first child (temp 3-component vector of double)
+0:220 'dvec3v' (temp 3-component vector of double)
+0:220 mix (global 3-component vector of double)
+0:220 'dvec3v' (temp 3-component vector of double)
+0:220 'dvec3v' (temp 3-component vector of double)
+0:220 'doublev' (temp double)
+0:221 add second child into first child (temp 4-component vector of double)
+0:221 'dvec4v' (temp 4-component vector of double)
+0:221 mix (global 4-component vector of double)
+0:221 'dvec4v' (temp 4-component vector of double)
+0:221 'dvec4v' (temp 4-component vector of double)
+0:221 'doublev' (temp double)
+0:222 add second child into first child (temp 2-component vector of double)
+0:222 'dvec2v' (temp 2-component vector of double)
+0:222 mix (global 2-component vector of double)
+0:222 'dvec2v' (temp 2-component vector of double)
+0:222 'dvec2v' (temp 2-component vector of double)
+0:222 'dvec2v' (temp 2-component vector of double)
+0:223 add second child into first child (temp 3-component vector of double)
+0:223 'dvec3v' (temp 3-component vector of double)
+0:223 mix (global 3-component vector of double)
+0:223 'dvec3v' (temp 3-component vector of double)
+0:223 'dvec3v' (temp 3-component vector of double)
+0:223 'dvec3v' (temp 3-component vector of double)
+0:224 add second child into first child (temp 4-component vector of double)
+0:224 'dvec4v' (temp 4-component vector of double)
+0:224 mix (global 4-component vector of double)
+0:224 'dvec4v' (temp 4-component vector of double)
+0:224 'dvec4v' (temp 4-component vector of double)
+0:224 'dvec4v' (temp 4-component vector of double)
+0:225 add second child into first child (temp double)
+0:225 'doublev' (temp double)
+0:225 mix (global double)
+0:225 'doublev' (temp double)
+0:225 'doublev' (temp double)
+0:225 'boolv' (temp bool)
+0:226 add second child into first child (temp 2-component vector of double)
+0:226 'dvec2v' (temp 2-component vector of double)
+0:226 mix (global 2-component vector of double)
+0:226 'dvec2v' (temp 2-component vector of double)
+0:226 'dvec2v' (temp 2-component vector of double)
+0:226 'bvec2v' (temp 2-component vector of bool)
+0:227 add second child into first child (temp 3-component vector of double)
+0:227 'dvec3v' (temp 3-component vector of double)
+0:227 mix (global 3-component vector of double)
+0:227 'dvec3v' (temp 3-component vector of double)
+0:227 'dvec3v' (temp 3-component vector of double)
+0:227 'bvec3v' (temp 3-component vector of bool)
+0:228 add second child into first child (temp 4-component vector of double)
+0:228 'dvec4v' (temp 4-component vector of double)
+0:228 mix (global 4-component vector of double)
+0:228 'dvec4v' (temp 4-component vector of double)
+0:228 'dvec4v' (temp 4-component vector of double)
+0:228 'bvec4v' (temp 4-component vector of bool)
+0:230 add second child into first child (temp double)
+0:230 'doublev' (temp double)
+0:230 step (global double)
+0:230 'doublev' (temp double)
+0:230 'doublev' (temp double)
+0:231 add second child into first child (temp 2-component vector of double)
+0:231 'dvec2v' (temp 2-component vector of double)
+0:231 step (global 2-component vector of double)
+0:231 'dvec2v' (temp 2-component vector of double)
+0:231 'dvec2v' (temp 2-component vector of double)
+0:232 add second child into first child (temp 3-component vector of double)
+0:232 'dvec3v' (temp 3-component vector of double)
+0:232 step (global 3-component vector of double)
+0:232 'dvec3v' (temp 3-component vector of double)
+0:232 'dvec3v' (temp 3-component vector of double)
+0:233 add second child into first child (temp 4-component vector of double)
+0:233 'dvec4v' (temp 4-component vector of double)
+0:233 step (global 4-component vector of double)
+0:233 'dvec4v' (temp 4-component vector of double)
+0:233 'dvec4v' (temp 4-component vector of double)
+0:234 add second child into first child (temp 2-component vector of double)
+0:234 'dvec2v' (temp 2-component vector of double)
+0:234 step (global 2-component vector of double)
+0:234 'doublev' (temp double)
+0:234 'dvec2v' (temp 2-component vector of double)
+0:235 add second child into first child (temp 3-component vector of double)
+0:235 'dvec3v' (temp 3-component vector of double)
+0:235 step (global 3-component vector of double)
+0:235 'doublev' (temp double)
+0:235 'dvec3v' (temp 3-component vector of double)
+0:236 add second child into first child (temp 4-component vector of double)
+0:236 'dvec4v' (temp 4-component vector of double)
+0:236 step (global 4-component vector of double)
+0:236 'doublev' (temp double)
+0:236 'dvec4v' (temp 4-component vector of double)
+0:238 add second child into first child (temp double)
+0:238 'doublev' (temp double)
+0:238 smoothstep (global double)
+0:238 'doublev' (temp double)
+0:238 'doublev' (temp double)
+0:238 'doublev' (temp double)
+0:239 add second child into first child (temp 2-component vector of double)
+0:239 'dvec2v' (temp 2-component vector of double)
+0:239 smoothstep (global 2-component vector of double)
+0:239 'dvec2v' (temp 2-component vector of double)
+0:239 'dvec2v' (temp 2-component vector of double)
+0:239 'dvec2v' (temp 2-component vector of double)
+0:240 add second child into first child (temp 3-component vector of double)
+0:240 'dvec3v' (temp 3-component vector of double)
+0:240 smoothstep (global 3-component vector of double)
+0:240 'dvec3v' (temp 3-component vector of double)
+0:240 'dvec3v' (temp 3-component vector of double)
+0:240 'dvec3v' (temp 3-component vector of double)
+0:241 add second child into first child (temp 4-component vector of double)
+0:241 'dvec4v' (temp 4-component vector of double)
+0:241 smoothstep (global 4-component vector of double)
+0:241 'dvec4v' (temp 4-component vector of double)
+0:241 'dvec4v' (temp 4-component vector of double)
+0:241 'dvec4v' (temp 4-component vector of double)
+0:242 add second child into first child (temp 2-component vector of double)
+0:242 'dvec2v' (temp 2-component vector of double)
+0:242 smoothstep (global 2-component vector of double)
+0:242 'doublev' (temp double)
+0:242 'doublev' (temp double)
+0:242 'dvec2v' (temp 2-component vector of double)
+0:243 add second child into first child (temp 3-component vector of double)
+0:243 'dvec3v' (temp 3-component vector of double)
+0:243 smoothstep (global 3-component vector of double)
+0:243 'doublev' (temp double)
+0:243 'doublev' (temp double)
+0:243 'dvec3v' (temp 3-component vector of double)
+0:244 add second child into first child (temp 4-component vector of double)
+0:244 'dvec4v' (temp 4-component vector of double)
+0:244 smoothstep (global 4-component vector of double)
+0:244 'doublev' (temp double)
+0:244 'doublev' (temp double)
+0:244 'dvec4v' (temp 4-component vector of double)
+0:246 move second child to first child (temp bool)
+0:246 'boolv' (temp bool)
+0:246 isnan (global bool)
+0:246 'doublev' (temp double)
+0:247 move second child to first child (temp 2-component vector of bool)
+0:247 'bvec2v' (temp 2-component vector of bool)
+0:247 isnan (global 2-component vector of bool)
+0:247 'dvec2v' (temp 2-component vector of double)
+0:248 move second child to first child (temp 3-component vector of bool)
+0:248 'bvec3v' (temp 3-component vector of bool)
+0:248 isnan (global 3-component vector of bool)
+0:248 'dvec3v' (temp 3-component vector of double)
+0:249 move second child to first child (temp 4-component vector of bool)
+0:249 'bvec4v' (temp 4-component vector of bool)
+0:249 isnan (global 4-component vector of bool)
+0:249 'dvec4v' (temp 4-component vector of double)
+0:251 move second child to first child (temp bool)
+0:251 'boolv' (temp bool)
+0:251 Test condition and select (temp bool)
+0:251 Condition
+0:251 'boolv' (temp bool)
+0:251 true case
+0:251 isinf (global bool)
+0:251 'doublev' (temp double)
+0:251 false case
+0:251 Constant:
+0:251 false (const bool)
+0:252 move second child to first child (temp 2-component vector of bool)
+0:252 'bvec2v' (temp 2-component vector of bool)
+0:252 Test condition and select (temp 2-component vector of bool)
+0:252 Condition
+0:252 'boolv' (temp bool)
+0:252 true case
+0:252 isinf (global 2-component vector of bool)
+0:252 'dvec2v' (temp 2-component vector of double)
+0:252 false case
+0:252 Constant:
+0:252 false (const bool)
+0:252 false (const bool)
+0:253 move second child to first child (temp 3-component vector of bool)
+0:253 'bvec3v' (temp 3-component vector of bool)
+0:253 Test condition and select (temp 3-component vector of bool)
+0:253 Condition
+0:253 'boolv' (temp bool)
+0:253 true case
+0:253 isinf (global 3-component vector of bool)
+0:253 'dvec3v' (temp 3-component vector of double)
+0:253 false case
+0:253 Constant:
+0:253 false (const bool)
+0:253 false (const bool)
+0:253 false (const bool)
+0:254 move second child to first child (temp 4-component vector of bool)
+0:254 'bvec4v' (temp 4-component vector of bool)
+0:254 Test condition and select (temp 4-component vector of bool)
+0:254 Condition
+0:254 'boolv' (temp bool)
+0:254 true case
+0:254 isinf (global 4-component vector of bool)
+0:254 'dvec4v' (temp 4-component vector of double)
+0:254 false case
+0:254 Constant:
+0:254 false (const bool)
+0:254 false (const bool)
+0:254 false (const bool)
+0:254 false (const bool)
+0:256 add second child into first child (temp double)
+0:256 'doublev' (temp double)
+0:256 length (global double)
+0:256 'doublev' (temp double)
+0:257 add second child into first child (temp double)
+0:257 'doublev' (temp double)
+0:257 length (global double)
+0:257 'dvec2v' (temp 2-component vector of double)
+0:258 add second child into first child (temp double)
+0:258 'doublev' (temp double)
+0:258 length (global double)
+0:258 'dvec3v' (temp 3-component vector of double)
+0:259 add second child into first child (temp double)
+0:259 'doublev' (temp double)
+0:259 length (global double)
+0:259 'dvec4v' (temp 4-component vector of double)
+0:261 add second child into first child (temp double)
+0:261 'doublev' (temp double)
+0:261 distance (global double)
+0:261 'doublev' (temp double)
+0:261 'doublev' (temp double)
+0:262 add second child into first child (temp double)
+0:262 'doublev' (temp double)
+0:262 distance (global double)
+0:262 'dvec2v' (temp 2-component vector of double)
+0:262 'dvec2v' (temp 2-component vector of double)
+0:263 add second child into first child (temp double)
+0:263 'doublev' (temp double)
+0:263 distance (global double)
+0:263 'dvec3v' (temp 3-component vector of double)
+0:263 'dvec3v' (temp 3-component vector of double)
+0:264 add second child into first child (temp double)
+0:264 'doublev' (temp double)
+0:264 distance (global double)
+0:264 'dvec4v' (temp 4-component vector of double)
+0:264 'dvec4v' (temp 4-component vector of double)
+0:266 add second child into first child (temp double)
+0:266 'doublev' (temp double)
+0:266 dot-product (global double)
+0:266 'doublev' (temp double)
+0:266 'doublev' (temp double)
+0:267 add second child into first child (temp double)
+0:267 'doublev' (temp double)
+0:267 dot-product (global double)
+0:267 'dvec2v' (temp 2-component vector of double)
+0:267 'dvec2v' (temp 2-component vector of double)
+0:268 add second child into first child (temp double)
+0:268 'doublev' (temp double)
+0:268 dot-product (global double)
+0:268 'dvec3v' (temp 3-component vector of double)
+0:268 'dvec3v' (temp 3-component vector of double)
+0:269 add second child into first child (temp double)
+0:269 'doublev' (temp double)
+0:269 dot-product (global double)
+0:269 'dvec4v' (temp 4-component vector of double)
+0:269 'dvec4v' (temp 4-component vector of double)
+0:271 add second child into first child (temp 3-component vector of double)
+0:271 'dvec3v' (temp 3-component vector of double)
+0:271 cross-product (global 3-component vector of double)
+0:271 'dvec3v' (temp 3-component vector of double)
+0:271 'dvec3v' (temp 3-component vector of double)
+0:273 add second child into first child (temp double)
+0:273 'doublev' (temp double)
+0:273 normalize (global double)
+0:273 'doublev' (temp double)
+0:274 add second child into first child (temp 2-component vector of double)
+0:274 'dvec2v' (temp 2-component vector of double)
+0:274 normalize (global 2-component vector of double)
+0:274 'dvec2v' (temp 2-component vector of double)
+0:275 add second child into first child (temp 3-component vector of double)
+0:275 'dvec3v' (temp 3-component vector of double)
+0:275 normalize (global 3-component vector of double)
+0:275 'dvec3v' (temp 3-component vector of double)
+0:276 add second child into first child (temp 4-component vector of double)
+0:276 'dvec4v' (temp 4-component vector of double)
+0:276 normalize (global 4-component vector of double)
+0:276 'dvec4v' (temp 4-component vector of double)
+0:278 add second child into first child (temp double)
+0:278 'doublev' (temp double)
+0:278 face-forward (global double)
+0:278 'doublev' (temp double)
+0:278 'doublev' (temp double)
+0:278 'doublev' (temp double)
+0:279 add second child into first child (temp 2-component vector of double)
+0:279 'dvec2v' (temp 2-component vector of double)
+0:279 face-forward (global 2-component vector of double)
+0:279 'dvec2v' (temp 2-component vector of double)
+0:279 'dvec2v' (temp 2-component vector of double)
+0:279 'dvec2v' (temp 2-component vector of double)
+0:280 add second child into first child (temp 3-component vector of double)
+0:280 'dvec3v' (temp 3-component vector of double)
+0:280 face-forward (global 3-component vector of double)
+0:280 'dvec3v' (temp 3-component vector of double)
+0:280 'dvec3v' (temp 3-component vector of double)
+0:280 'dvec3v' (temp 3-component vector of double)
+0:281 add second child into first child (temp 4-component vector of double)
+0:281 'dvec4v' (temp 4-component vector of double)
+0:281 face-forward (global 4-component vector of double)
+0:281 'dvec4v' (temp 4-component vector of double)
+0:281 'dvec4v' (temp 4-component vector of double)
+0:281 'dvec4v' (temp 4-component vector of double)
+0:283 add second child into first child (temp double)
+0:283 'doublev' (temp double)
+0:283 reflect (global double)
+0:283 'doublev' (temp double)
+0:283 'doublev' (temp double)
+0:284 add second child into first child (temp 2-component vector of double)
+0:284 'dvec2v' (temp 2-component vector of double)
+0:284 reflect (global 2-component vector of double)
+0:284 'dvec2v' (temp 2-component vector of double)
+0:284 'dvec2v' (temp 2-component vector of double)
+0:285 add second child into first child (temp 3-component vector of double)
+0:285 'dvec3v' (temp 3-component vector of double)
+0:285 reflect (global 3-component vector of double)
+0:285 'dvec3v' (temp 3-component vector of double)
+0:285 'dvec3v' (temp 3-component vector of double)
+0:286 add second child into first child (temp 4-component vector of double)
+0:286 'dvec4v' (temp 4-component vector of double)
+0:286 reflect (global 4-component vector of double)
+0:286 'dvec4v' (temp 4-component vector of double)
+0:286 'dvec4v' (temp 4-component vector of double)
+0:288 add second child into first child (temp double)
+0:288 'doublev' (temp double)
+0:288 refract (global double)
+0:288 'doublev' (temp double)
+0:288 'doublev' (temp double)
+0:288 'doublev' (temp double)
+0:289 add second child into first child (temp 2-component vector of double)
+0:289 'dvec2v' (temp 2-component vector of double)
+0:289 refract (global 2-component vector of double)
+0:289 'dvec2v' (temp 2-component vector of double)
+0:289 'dvec2v' (temp 2-component vector of double)
+0:289 'doublev' (temp double)
+0:290 add second child into first child (temp 3-component vector of double)
+0:290 'dvec3v' (temp 3-component vector of double)
+0:290 refract (global 3-component vector of double)
+0:290 'dvec3v' (temp 3-component vector of double)
+0:290 'dvec3v' (temp 3-component vector of double)
+0:290 'doublev' (temp double)
+0:291 add second child into first child (temp 4-component vector of double)
+0:291 'dvec4v' (temp 4-component vector of double)
+0:291 refract (global 4-component vector of double)
+0:291 'dvec4v' (temp 4-component vector of double)
+0:291 'dvec4v' (temp 4-component vector of double)
+0:291 'doublev' (temp double)
+0:293 Sequence
+0:293 move second child to first child (temp 2X2 matrix of double)
+0:293 'dmat2v' (temp 2X2 matrix of double)
+0:293 outer product (global 2X2 matrix of double)
+0:293 'dvec2v' (temp 2-component vector of double)
+0:293 'dvec2v' (temp 2-component vector of double)
+0:294 Sequence
+0:294 move second child to first child (temp 3X3 matrix of double)
+0:294 'dmat3v' (temp 3X3 matrix of double)
+0:294 outer product (global 3X3 matrix of double)
+0:294 'dvec3v' (temp 3-component vector of double)
+0:294 'dvec3v' (temp 3-component vector of double)
+0:295 Sequence
+0:295 move second child to first child (temp 4X4 matrix of double)
+0:295 'dmat4v' (temp 4X4 matrix of double)
+0:295 outer product (global 4X4 matrix of double)
+0:295 'dvec4v' (temp 4-component vector of double)
+0:295 'dvec4v' (temp 4-component vector of double)
+0:296 Sequence
+0:296 move second child to first child (temp 2X3 matrix of double)
+0:296 'dmat2x3v' (temp 2X3 matrix of double)
+0:296 outer product (global 2X3 matrix of double)
+0:296 'dvec3v' (temp 3-component vector of double)
+0:296 'dvec2v' (temp 2-component vector of double)
+0:297 Sequence
+0:297 move second child to first child (temp 3X2 matrix of double)
+0:297 'dmat3x2v' (temp 3X2 matrix of double)
+0:297 outer product (global 3X2 matrix of double)
+0:297 'dvec2v' (temp 2-component vector of double)
+0:297 'dvec3v' (temp 3-component vector of double)
+0:298 Sequence
+0:298 move second child to first child (temp 2X4 matrix of double)
+0:298 'dmat2x4v' (temp 2X4 matrix of double)
+0:298 outer product (global 2X4 matrix of double)
+0:298 'dvec4v' (temp 4-component vector of double)
+0:298 'dvec2v' (temp 2-component vector of double)
+0:299 Sequence
+0:299 move second child to first child (temp 4X2 matrix of double)
+0:299 'dmat4x2v' (temp 4X2 matrix of double)
+0:299 outer product (global 4X2 matrix of double)
+0:299 'dvec2v' (temp 2-component vector of double)
+0:299 'dvec4v' (temp 4-component vector of double)
+0:300 Sequence
+0:300 move second child to first child (temp 3X4 matrix of double)
+0:300 'dmat3x4v' (temp 3X4 matrix of double)
+0:300 outer product (global 3X4 matrix of double)
+0:300 'dvec4v' (temp 4-component vector of double)
+0:300 'dvec3v' (temp 3-component vector of double)
+0:301 Sequence
+0:301 move second child to first child (temp 4X3 matrix of double)
+0:301 'dmat4x3v' (temp 4X3 matrix of double)
+0:301 outer product (global 4X3 matrix of double)
+0:301 'dvec3v' (temp 3-component vector of double)
+0:301 'dvec4v' (temp 4-component vector of double)
+0:303 matrix mult second child into first child (temp 2X2 matrix of double)
+0:303 'dmat2v' (temp 2X2 matrix of double)
+0:303 component-wise multiply (global 2X2 matrix of double)
+0:303 'dmat2v' (temp 2X2 matrix of double)
+0:303 'dmat2v' (temp 2X2 matrix of double)
+0:304 matrix mult second child into first child (temp 3X3 matrix of double)
+0:304 'dmat3v' (temp 3X3 matrix of double)
+0:304 component-wise multiply (global 3X3 matrix of double)
+0:304 'dmat3v' (temp 3X3 matrix of double)
+0:304 'dmat3v' (temp 3X3 matrix of double)
+0:305 matrix mult second child into first child (temp 4X4 matrix of double)
+0:305 'dmat4v' (temp 4X4 matrix of double)
+0:305 component-wise multiply (global 4X4 matrix of double)
+0:305 'dmat4v' (temp 4X4 matrix of double)
+0:305 'dmat4v' (temp 4X4 matrix of double)
+0:306 move second child to first child (temp 2X3 matrix of double)
+0:306 'dmat2x3v' (temp 2X3 matrix of double)
+0:306 component-wise multiply (global 2X3 matrix of double)
+0:306 'dmat2x3v' (temp 2X3 matrix of double)
+0:306 'dmat2x3v' (temp 2X3 matrix of double)
+0:307 move second child to first child (temp 2X4 matrix of double)
+0:307 'dmat2x4v' (temp 2X4 matrix of double)
+0:307 component-wise multiply (global 2X4 matrix of double)
+0:307 'dmat2x4v' (temp 2X4 matrix of double)
+0:307 'dmat2x4v' (temp 2X4 matrix of double)
+0:308 move second child to first child (temp 3X2 matrix of double)
+0:308 'dmat3x2v' (temp 3X2 matrix of double)
+0:308 component-wise multiply (global 3X2 matrix of double)
+0:308 'dmat3x2v' (temp 3X2 matrix of double)
+0:308 'dmat3x2v' (temp 3X2 matrix of double)
+0:309 move second child to first child (temp 3X4 matrix of double)
+0:309 'dmat3x4v' (temp 3X4 matrix of double)
+0:309 component-wise multiply (global 3X4 matrix of double)
+0:309 'dmat3x4v' (temp 3X4 matrix of double)
+0:309 'dmat3x4v' (temp 3X4 matrix of double)
+0:310 move second child to first child (temp 4X2 matrix of double)
+0:310 'dmat4x2v' (temp 4X2 matrix of double)
+0:310 component-wise multiply (global 4X2 matrix of double)
+0:310 'dmat4x2v' (temp 4X2 matrix of double)
+0:310 'dmat4x2v' (temp 4X2 matrix of double)
+0:311 move second child to first child (temp 4X3 matrix of double)
+0:311 'dmat4x3v' (temp 4X3 matrix of double)
+0:311 component-wise multiply (global 4X3 matrix of double)
+0:311 'dmat4x3v' (temp 4X3 matrix of double)
+0:311 'dmat4x3v' (temp 4X3 matrix of double)
+0:313 matrix mult second child into first child (temp 2X2 matrix of double)
+0:313 'dmat2v' (temp 2X2 matrix of double)
+0:313 transpose (global 2X2 matrix of double)
+0:313 'dmat2v' (temp 2X2 matrix of double)
+0:314 matrix mult second child into first child (temp 3X3 matrix of double)
+0:314 'dmat3v' (temp 3X3 matrix of double)
+0:314 transpose (global 3X3 matrix of double)
+0:314 'dmat3v' (temp 3X3 matrix of double)
+0:315 matrix mult second child into first child (temp 4X4 matrix of double)
+0:315 'dmat4v' (temp 4X4 matrix of double)
+0:315 transpose (global 4X4 matrix of double)
+0:315 'dmat4v' (temp 4X4 matrix of double)
+0:316 move second child to first child (temp 2X3 matrix of double)
+0:316 'dmat2x3v' (temp 2X3 matrix of double)
+0:316 transpose (global 2X3 matrix of double)
+0:316 'dmat3x2v' (temp 3X2 matrix of double)
+0:317 move second child to first child (temp 3X2 matrix of double)
+0:317 'dmat3x2v' (temp 3X2 matrix of double)
+0:317 transpose (global 3X2 matrix of double)
+0:317 'dmat2x3v' (temp 2X3 matrix of double)
+0:318 move second child to first child (temp 2X4 matrix of double)
+0:318 'dmat2x4v' (temp 2X4 matrix of double)
+0:318 transpose (global 2X4 matrix of double)
+0:318 'dmat4x2v' (temp 4X2 matrix of double)
+0:319 move second child to first child (temp 4X2 matrix of double)
+0:319 'dmat4x2v' (temp 4X2 matrix of double)
+0:319 transpose (global 4X2 matrix of double)
+0:319 'dmat2x4v' (temp 2X4 matrix of double)
+0:320 move second child to first child (temp 3X4 matrix of double)
+0:320 'dmat3x4v' (temp 3X4 matrix of double)
+0:320 transpose (global 3X4 matrix of double)
+0:320 'dmat4x3v' (temp 4X3 matrix of double)
+0:321 move second child to first child (temp 4X3 matrix of double)
+0:321 'dmat4x3v' (temp 4X3 matrix of double)
+0:321 transpose (global 4X3 matrix of double)
+0:321 'dmat3x4v' (temp 3X4 matrix of double)
+0:323 add second child into first child (temp double)
+0:323 'doublev' (temp double)
+0:323 determinant (global double)
+0:323 'dmat2v' (temp 2X2 matrix of double)
+0:324 add second child into first child (temp double)
+0:324 'doublev' (temp double)
+0:324 determinant (global double)
+0:324 'dmat3v' (temp 3X3 matrix of double)
+0:325 add second child into first child (temp double)
+0:325 'doublev' (temp double)
+0:325 determinant (global double)
+0:325 'dmat4v' (temp 4X4 matrix of double)
+0:327 matrix mult second child into first child (temp 2X2 matrix of double)
+0:327 'dmat2v' (temp 2X2 matrix of double)
+0:327 inverse (global 2X2 matrix of double)
+0:327 'dmat2v' (temp 2X2 matrix of double)
+0:328 matrix mult second child into first child (temp 3X3 matrix of double)
+0:328 'dmat3v' (temp 3X3 matrix of double)
+0:328 inverse (global 3X3 matrix of double)
+0:328 'dmat3v' (temp 3X3 matrix of double)
+0:329 matrix mult second child into first child (temp 4X4 matrix of double)
+0:329 'dmat4v' (temp 4X4 matrix of double)
+0:329 inverse (global 4X4 matrix of double)
+0:329 'dmat4v' (temp 4X4 matrix of double)
+0:? Linker Objects
+0:? 'bn' (in 3-element array of block{in int a})
+0:? 'gl_in' (in 3-element array of block{in 4-component vector of float Position gl_Position, in float PointSize gl_PointSize})
+0:? 'color' (in 3-element array of 4-component vector of float)
+0:? 'color2' (in 3-element array of 4-component vector of float)
+0:? 'colorS' (in 3-element array of 4-component vector of float)
+0:? 'colorBad' (in 4-element array of 4-component vector of float)
+0:? 'colorbad2' (in 2-element array of 4-component vector of float)
+0:? 'cva' (layout(location=4 ) in 3-element array of 4-component vector of float)
+0:? 'cvb' (layout(location=5 ) in 3-element array of 4-component vector of float)
+0:? 'cmc' (layout(location=2 ) in 3-element array of 3X3 matrix of float)
+0:? 'patchIn' (patch in 3-element array of 4-component vector of float)
+0:? 'patchOut' (layout(stream=0 ) patch out 4-component vector of float)
+0:? 'scalar' (in float)
+0:? 'inbls' (in block{in int a})
+0:? 'inbla' (in 17-element array of block{in int a})
+0:? 'indexedOut' (layout(location=7 stream=0 ) out 4-component vector of float)
+0:? 'samp1D' (uniform sampler1D)
+0:? 'samp2Ds' (uniform sampler2DShadow)
+
diff --git a/chromium/third_party/glslang/src/Test/baseResults/400.tesc.out b/chromium/third_party/glslang/src/Test/baseResults/400.tesc.out
new file mode 100644
index 00000000000..58a8a32732d
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/400.tesc.out
@@ -0,0 +1,414 @@
+400.tesc
+Warning, version 400 is not yet complete; most version-specific features are present, but some are missing.
+ERROR: 0:6: 'quads' : unrecognized layout identifier, or qualifier requires assignment (e.g., binding = 4)
+ERROR: 0:7: 'ccw' : unrecognized layout identifier, or qualifier requires assignment (e.g., binding = 4)
+ERROR: 0:8: 'fractional_even_spacing' : unrecognized layout identifier, or qualifier requires assignment (e.g., binding = 4)
+ERROR: 0:10: 'patch' : can only use on output in tessellation-control shader
+ERROR: 0:39: '' : tessellation control barrier() cannot be placed within flow control
+ERROR: 0:41: '' : tessellation control barrier() cannot be placed within flow control
+ERROR: 0:46: '' : tessellation control barrier() cannot be placed within flow control
+ERROR: 0:51: '' : tessellation control barrier() cannot be placed within flow control
+ERROR: 0:54: '' : tessellation control barrier() cannot be placed within flow control
+ERROR: 0:61: '' : tessellation control barrier() cannot be placed after a return from main()
+ERROR: 0:64: 'vertices' : can only apply to 'out'
+ERROR: 0:65: 'vertices' : cannot change previously set layout value
+ERROR: 0:69: '[' : array index out of range '4'
+ERROR: 0:71: '' : tessellation control barrier() must be in main()
+ERROR: 0:74: 'in' : type must be an array: ina
+ERROR: 0:76: '[]' : tessellation input array size must be gl_MaxPatchVertices or implicitly sized
+ERROR: 0:83: 'location' : overlapping use of location 4
+ERROR: 0:87: 'location' : overlapping use of location 4
+ERROR: 0:104: '' : precise qualifier must appear first
+ERROR: 0:105: '' : precise qualifier must appear first
+ERROR: 0:105: '' : precise qualifier must appear first
+ERROR: 21 compilation errors. No code generated.
+
+
+Shader version: 400
+Requested GL_ARB_separate_shader_objects
+vertices = 4
+ERROR: node is still EOpNull!
+0:13 Function Definition: main( (global void)
+0:13 Function Parameters:
+0:15 Sequence
+0:15 Barrier (global void)
+0:17 Sequence
+0:17 move second child to first child (temp int)
+0:17 'a' (temp int)
+0:17 Constant:
+0:17 5392 (const int)
+0:23 Sequence
+0:23 move second child to first child (temp 4-component vector of float)
+0:23 'p' (temp 4-component vector of float)
+0:23 gl_Position: direct index for structure (in 4-component vector of float Position)
+0:23 direct index (temp block{in 4-component vector of float Position gl_Position, in float PointSize gl_PointSize, in implicitly-sized array of float ClipDistance gl_ClipDistance})
+0:23 'gl_in' (in 32-element array of block{in 4-component vector of float Position gl_Position, in float PointSize gl_PointSize, in implicitly-sized array of float ClipDistance gl_ClipDistance})
+0:23 Constant:
+0:23 1 (const int)
+0:23 Constant:
+0:23 0 (const int)
+0:24 Sequence
+0:24 move second child to first child (temp float)
+0:24 'ps' (temp float)
+0:24 gl_PointSize: direct index for structure (in float PointSize)
+0:24 direct index (temp block{in 4-component vector of float Position gl_Position, in float PointSize gl_PointSize, in implicitly-sized array of float ClipDistance gl_ClipDistance})
+0:24 'gl_in' (in 32-element array of block{in 4-component vector of float Position gl_Position, in float PointSize gl_PointSize, in implicitly-sized array of float ClipDistance gl_ClipDistance})
+0:24 Constant:
+0:24 1 (const int)
+0:24 Constant:
+0:24 1 (const int)
+0:25 Sequence
+0:25 move second child to first child (temp float)
+0:25 'cd' (temp float)
+0:25 direct index (temp float ClipDistance)
+0:25 gl_ClipDistance: direct index for structure (in implicitly-sized array of float ClipDistance)
+0:25 direct index (temp block{in 4-component vector of float Position gl_Position, in float PointSize gl_PointSize, in implicitly-sized array of float ClipDistance gl_ClipDistance})
+0:25 'gl_in' (in 32-element array of block{in 4-component vector of float Position gl_Position, in float PointSize gl_PointSize, in implicitly-sized array of float ClipDistance gl_ClipDistance})
+0:25 Constant:
+0:25 1 (const int)
+0:25 Constant:
+0:25 2 (const int)
+0:25 Constant:
+0:25 2 (const int)
+0:27 Sequence
+0:27 move second child to first child (temp int)
+0:27 'pvi' (temp int)
+0:27 'gl_PatchVerticesIn' (in int PatchVertices)
+0:28 Sequence
+0:28 move second child to first child (temp int)
+0:28 'pid' (temp int)
+0:28 'gl_PrimitiveID' (in int PrimitiveID)
+0:29 Sequence
+0:29 move second child to first child (temp int)
+0:29 'iid' (temp int)
+0:29 'gl_InvocationID' (in int InvocationID)
+0:31 move second child to first child (temp 4-component vector of float)
+0:31 gl_Position: direct index for structure (out 4-component vector of float Position)
+0:31 indirect index (temp block{out 4-component vector of float Position gl_Position, out float PointSize gl_PointSize, out implicitly-sized array of float ClipDistance gl_ClipDistance})
+0:31 'gl_out' (out 4-element array of block{out 4-component vector of float Position gl_Position, out float PointSize gl_PointSize, out implicitly-sized array of float ClipDistance gl_ClipDistance})
+0:31 'gl_InvocationID' (in int InvocationID)
+0:31 Constant:
+0:31 0 (const int)
+0:31 'p' (temp 4-component vector of float)
+0:32 move second child to first child (temp float)
+0:32 gl_PointSize: direct index for structure (out float PointSize)
+0:32 indirect index (temp block{out 4-component vector of float Position gl_Position, out float PointSize gl_PointSize, out implicitly-sized array of float ClipDistance gl_ClipDistance})
+0:32 'gl_out' (out 4-element array of block{out 4-component vector of float Position gl_Position, out float PointSize gl_PointSize, out implicitly-sized array of float ClipDistance gl_ClipDistance})
+0:32 'gl_InvocationID' (in int InvocationID)
+0:32 Constant:
+0:32 1 (const int)
+0:32 'ps' (temp float)
+0:33 move second child to first child (temp float)
+0:33 direct index (temp float ClipDistance)
+0:33 gl_ClipDistance: direct index for structure (out implicitly-sized array of float ClipDistance)
+0:33 indirect index (temp block{out 4-component vector of float Position gl_Position, out float PointSize gl_PointSize, out implicitly-sized array of float ClipDistance gl_ClipDistance})
+0:33 'gl_out' (out 4-element array of block{out 4-component vector of float Position gl_Position, out float PointSize gl_PointSize, out implicitly-sized array of float ClipDistance gl_ClipDistance})
+0:33 'gl_InvocationID' (in int InvocationID)
+0:33 Constant:
+0:33 2 (const int)
+0:33 Constant:
+0:33 1 (const int)
+0:33 'cd' (temp float)
+0:35 move second child to first child (temp float)
+0:35 direct index (patch temp float TessLevelOuter)
+0:35 'gl_TessLevelOuter' (patch out 4-element array of float TessLevelOuter)
+0:35 Constant:
+0:35 3 (const int)
+0:35 Constant:
+0:35 3.200000
+0:36 move second child to first child (temp float)
+0:36 direct index (patch temp float TessLevelInner)
+0:36 'gl_TessLevelInner' (patch out 2-element array of float TessLevelInner)
+0:36 Constant:
+0:36 1 (const int)
+0:36 Constant:
+0:36 1.300000
+0:38 Test condition and select (temp void)
+0:38 Condition
+0:38 Compare Greater Than (temp bool)
+0:38 'a' (temp int)
+0:38 Constant:
+0:38 10 (const int)
+0:38 true case
+0:39 Barrier (global void)
+0:38 false case
+0:41 Barrier (global void)
+0:43 Barrier (global void)
+0:47 Loop with condition not tested first
+0:47 Loop Condition
+0:47 Compare Greater Than (temp bool)
+0:47 'a' (temp int)
+0:47 Constant:
+0:47 10 (const int)
+0:47 Loop Body
+0:46 Sequence
+0:46 Barrier (global void)
+0:49 switch
+0:49 condition
+0:49 'a' (temp int)
+0:49 body
+0:49 Sequence
+0:50 default:
+0:? Sequence
+0:51 Barrier (global void)
+0:52 Branch: Break
+0:54 Test condition and select (temp int)
+0:54 Condition
+0:54 Compare Less Than (temp bool)
+0:54 'a' (temp int)
+0:54 Constant:
+0:54 12 (const int)
+0:54 true case
+0:54 'a' (temp int)
+0:54 false case
+0:54 Comma (temp int)
+0:54 Barrier (global void)
+0:54 'a' (temp int)
+0:56 Sequence
+0:56 Barrier (global void)
+0:59 Branch: Return
+0:61 Barrier (global void)
+0:67 Function Definition: foo( (global void)
+0:67 Function Parameters:
+0:69 Sequence
+0:69 gl_PointSize: direct index for structure (out float PointSize)
+0:69 direct index (temp block{out 4-component vector of float Position gl_Position, out float PointSize gl_PointSize, out implicitly-sized array of float ClipDistance gl_ClipDistance})
+0:69 'gl_out' (out 4-element array of block{out 4-component vector of float Position gl_Position, out float PointSize gl_PointSize, out implicitly-sized array of float ClipDistance gl_ClipDistance})
+0:69 Constant:
+0:69 4 (const int)
+0:69 Constant:
+0:69 1 (const int)
+0:71 Barrier (global void)
+0:91 Function Definition: foop( (global void)
+0:91 Function Parameters:
+0:? Sequence
+0:95 multiply second child into first child (temp 3-component vector of float)
+0:95 'pv3' (noContraction temp 3-component vector of float)
+0:95 'pv3' (noContraction temp 3-component vector of float)
+0:96 move second child to first child (temp 3-component vector of float)
+0:96 'pv3' (noContraction temp 3-component vector of float)
+0:96 fma (global 3-component vector of float)
+0:96 'pv3' (noContraction temp 3-component vector of float)
+0:96 'pv3' (noContraction temp 3-component vector of float)
+0:96 'pv3' (noContraction temp 3-component vector of float)
+0:97 move second child to first child (temp double)
+0:97 'd' (noContraction temp double)
+0:97 fma (global double)
+0:97 'd' (noContraction temp double)
+0:97 'd' (noContraction temp double)
+0:97 'd' (noContraction temp double)
+0:? Linker Objects
+0:? 'gl_out' (out 4-element array of block{out 4-component vector of float Position gl_Position, out float PointSize gl_PointSize, out implicitly-sized array of float ClipDistance gl_ClipDistance})
+0:? 'outa' (global 4-element array of int)
+0:? 'patchIn' (patch in 4-component vector of float)
+0:? 'patchOut' (patch out 4-component vector of float)
+0:? 'ina' (in 2-component vector of float)
+0:? 'inb' (in 32-element array of 2-component vector of float)
+0:? 'inc' (in 32-element array of 2-component vector of float)
+0:? 'ind' (in 32-element array of 2-component vector of float)
+0:? 'ivla' (layout(location=3 ) in 32-element array of 4-component vector of float)
+0:? 'ivlb' (layout(location=4 ) in 32-element array of 4-component vector of float)
+0:? 'ivlc' (layout(location=4 ) in 32-element array of 4-component vector of float)
+0:? 'ovla' (layout(location=3 ) out 4-element array of 4-component vector of float)
+0:? 'ovlb' (layout(location=4 ) out 4-element array of 4-component vector of float)
+0:? 'ovlc' (layout(location=4 ) out 4-element array of 4-component vector of float)
+0:? 'pv3' (noContraction temp 3-component vector of float)
+0:? 'pinbi' (patch out block{out int a})
+0:? 'badOrder' (invariant noContraction out 4-element array of 4-component vector of float)
+
+
+Linked tessellation control stage:
+
+
+Shader version: 400
+Requested GL_ARB_separate_shader_objects
+vertices = 4
+ERROR: node is still EOpNull!
+0:13 Function Definition: main( (global void)
+0:13 Function Parameters:
+0:15 Sequence
+0:15 Barrier (global void)
+0:17 Sequence
+0:17 move second child to first child (temp int)
+0:17 'a' (temp int)
+0:17 Constant:
+0:17 5392 (const int)
+0:23 Sequence
+0:23 move second child to first child (temp 4-component vector of float)
+0:23 'p' (temp 4-component vector of float)
+0:23 gl_Position: direct index for structure (in 4-component vector of float Position)
+0:23 direct index (temp block{in 4-component vector of float Position gl_Position, in float PointSize gl_PointSize, in 3-element array of float ClipDistance gl_ClipDistance})
+0:23 'gl_in' (in 32-element array of block{in 4-component vector of float Position gl_Position, in float PointSize gl_PointSize, in 3-element array of float ClipDistance gl_ClipDistance})
+0:23 Constant:
+0:23 1 (const int)
+0:23 Constant:
+0:23 0 (const int)
+0:24 Sequence
+0:24 move second child to first child (temp float)
+0:24 'ps' (temp float)
+0:24 gl_PointSize: direct index for structure (in float PointSize)
+0:24 direct index (temp block{in 4-component vector of float Position gl_Position, in float PointSize gl_PointSize, in 3-element array of float ClipDistance gl_ClipDistance})
+0:24 'gl_in' (in 32-element array of block{in 4-component vector of float Position gl_Position, in float PointSize gl_PointSize, in 3-element array of float ClipDistance gl_ClipDistance})
+0:24 Constant:
+0:24 1 (const int)
+0:24 Constant:
+0:24 1 (const int)
+0:25 Sequence
+0:25 move second child to first child (temp float)
+0:25 'cd' (temp float)
+0:25 direct index (temp float ClipDistance)
+0:25 gl_ClipDistance: direct index for structure (in 3-element array of float ClipDistance)
+0:25 direct index (temp block{in 4-component vector of float Position gl_Position, in float PointSize gl_PointSize, in 3-element array of float ClipDistance gl_ClipDistance})
+0:25 'gl_in' (in 32-element array of block{in 4-component vector of float Position gl_Position, in float PointSize gl_PointSize, in 3-element array of float ClipDistance gl_ClipDistance})
+0:25 Constant:
+0:25 1 (const int)
+0:25 Constant:
+0:25 2 (const int)
+0:25 Constant:
+0:25 2 (const int)
+0:27 Sequence
+0:27 move second child to first child (temp int)
+0:27 'pvi' (temp int)
+0:27 'gl_PatchVerticesIn' (in int PatchVertices)
+0:28 Sequence
+0:28 move second child to first child (temp int)
+0:28 'pid' (temp int)
+0:28 'gl_PrimitiveID' (in int PrimitiveID)
+0:29 Sequence
+0:29 move second child to first child (temp int)
+0:29 'iid' (temp int)
+0:29 'gl_InvocationID' (in int InvocationID)
+0:31 move second child to first child (temp 4-component vector of float)
+0:31 gl_Position: direct index for structure (out 4-component vector of float Position)
+0:31 indirect index (temp block{out 4-component vector of float Position gl_Position, out float PointSize gl_PointSize, out 2-element array of float ClipDistance gl_ClipDistance})
+0:31 'gl_out' (out 4-element array of block{out 4-component vector of float Position gl_Position, out float PointSize gl_PointSize, out 2-element array of float ClipDistance gl_ClipDistance})
+0:31 'gl_InvocationID' (in int InvocationID)
+0:31 Constant:
+0:31 0 (const int)
+0:31 'p' (temp 4-component vector of float)
+0:32 move second child to first child (temp float)
+0:32 gl_PointSize: direct index for structure (out float PointSize)
+0:32 indirect index (temp block{out 4-component vector of float Position gl_Position, out float PointSize gl_PointSize, out 2-element array of float ClipDistance gl_ClipDistance})
+0:32 'gl_out' (out 4-element array of block{out 4-component vector of float Position gl_Position, out float PointSize gl_PointSize, out 2-element array of float ClipDistance gl_ClipDistance})
+0:32 'gl_InvocationID' (in int InvocationID)
+0:32 Constant:
+0:32 1 (const int)
+0:32 'ps' (temp float)
+0:33 move second child to first child (temp float)
+0:33 direct index (temp float ClipDistance)
+0:33 gl_ClipDistance: direct index for structure (out 2-element array of float ClipDistance)
+0:33 indirect index (temp block{out 4-component vector of float Position gl_Position, out float PointSize gl_PointSize, out 2-element array of float ClipDistance gl_ClipDistance})
+0:33 'gl_out' (out 4-element array of block{out 4-component vector of float Position gl_Position, out float PointSize gl_PointSize, out 2-element array of float ClipDistance gl_ClipDistance})
+0:33 'gl_InvocationID' (in int InvocationID)
+0:33 Constant:
+0:33 2 (const int)
+0:33 Constant:
+0:33 1 (const int)
+0:33 'cd' (temp float)
+0:35 move second child to first child (temp float)
+0:35 direct index (patch temp float TessLevelOuter)
+0:35 'gl_TessLevelOuter' (patch out 4-element array of float TessLevelOuter)
+0:35 Constant:
+0:35 3 (const int)
+0:35 Constant:
+0:35 3.200000
+0:36 move second child to first child (temp float)
+0:36 direct index (patch temp float TessLevelInner)
+0:36 'gl_TessLevelInner' (patch out 2-element array of float TessLevelInner)
+0:36 Constant:
+0:36 1 (const int)
+0:36 Constant:
+0:36 1.300000
+0:38 Test condition and select (temp void)
+0:38 Condition
+0:38 Compare Greater Than (temp bool)
+0:38 'a' (temp int)
+0:38 Constant:
+0:38 10 (const int)
+0:38 true case
+0:39 Barrier (global void)
+0:38 false case
+0:41 Barrier (global void)
+0:43 Barrier (global void)
+0:47 Loop with condition not tested first
+0:47 Loop Condition
+0:47 Compare Greater Than (temp bool)
+0:47 'a' (temp int)
+0:47 Constant:
+0:47 10 (const int)
+0:47 Loop Body
+0:46 Sequence
+0:46 Barrier (global void)
+0:49 switch
+0:49 condition
+0:49 'a' (temp int)
+0:49 body
+0:49 Sequence
+0:50 default:
+0:? Sequence
+0:51 Barrier (global void)
+0:52 Branch: Break
+0:54 Test condition and select (temp int)
+0:54 Condition
+0:54 Compare Less Than (temp bool)
+0:54 'a' (temp int)
+0:54 Constant:
+0:54 12 (const int)
+0:54 true case
+0:54 'a' (temp int)
+0:54 false case
+0:54 Comma (temp int)
+0:54 Barrier (global void)
+0:54 'a' (temp int)
+0:56 Sequence
+0:56 Barrier (global void)
+0:59 Branch: Return
+0:61 Barrier (global void)
+0:67 Function Definition: foo( (global void)
+0:67 Function Parameters:
+0:69 Sequence
+0:69 gl_PointSize: direct index for structure (out float PointSize)
+0:69 direct index (temp block{out 4-component vector of float Position gl_Position, out float PointSize gl_PointSize, out 2-element array of float ClipDistance gl_ClipDistance})
+0:69 'gl_out' (out 4-element array of block{out 4-component vector of float Position gl_Position, out float PointSize gl_PointSize, out 2-element array of float ClipDistance gl_ClipDistance})
+0:69 Constant:
+0:69 4 (const int)
+0:69 Constant:
+0:69 1 (const int)
+0:71 Barrier (global void)
+0:91 Function Definition: foop( (global void)
+0:91 Function Parameters:
+0:? Sequence
+0:95 multiply second child into first child (temp 3-component vector of float)
+0:95 'pv3' (noContraction temp 3-component vector of float)
+0:95 'pv3' (noContraction temp 3-component vector of float)
+0:96 move second child to first child (temp 3-component vector of float)
+0:96 'pv3' (noContraction temp 3-component vector of float)
+0:96 fma (global 3-component vector of float)
+0:96 'pv3' (noContraction temp 3-component vector of float)
+0:96 'pv3' (noContraction temp 3-component vector of float)
+0:96 'pv3' (noContraction temp 3-component vector of float)
+0:97 move second child to first child (temp double)
+0:97 'd' (noContraction temp double)
+0:97 fma (global double)
+0:97 'd' (noContraction temp double)
+0:97 'd' (noContraction temp double)
+0:97 'd' (noContraction temp double)
+0:? Linker Objects
+0:? 'gl_out' (out 4-element array of block{out 4-component vector of float Position gl_Position, out float PointSize gl_PointSize, out 2-element array of float ClipDistance gl_ClipDistance})
+0:? 'outa' (global 4-element array of int)
+0:? 'patchIn' (patch in 4-component vector of float)
+0:? 'patchOut' (patch out 4-component vector of float)
+0:? 'ina' (in 2-component vector of float)
+0:? 'inb' (in 32-element array of 2-component vector of float)
+0:? 'inc' (in 32-element array of 2-component vector of float)
+0:? 'ind' (in 32-element array of 2-component vector of float)
+0:? 'ivla' (layout(location=3 ) in 32-element array of 4-component vector of float)
+0:? 'ivlb' (layout(location=4 ) in 32-element array of 4-component vector of float)
+0:? 'ivlc' (layout(location=4 ) in 32-element array of 4-component vector of float)
+0:? 'ovla' (layout(location=3 ) out 4-element array of 4-component vector of float)
+0:? 'ovlb' (layout(location=4 ) out 4-element array of 4-component vector of float)
+0:? 'ovlc' (layout(location=4 ) out 4-element array of 4-component vector of float)
+0:? 'pv3' (noContraction temp 3-component vector of float)
+0:? 'pinbi' (patch out block{out int a})
+0:? 'badOrder' (invariant noContraction out 4-element array of 4-component vector of float)
+
diff --git a/chromium/third_party/glslang/src/Test/baseResults/400.tese.out b/chromium/third_party/glslang/src/Test/baseResults/400.tese.out
new file mode 100644
index 00000000000..324dbaa304d
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/400.tese.out
@@ -0,0 +1,281 @@
+400.tese
+Warning, version 400 is not yet complete; most version-specific features are present, but some are missing.
+ERROR: 0:3: 'vertices' : there is no such layout identifier for this stage taking an assigned value
+ERROR: 0:5: 'triangles' : cannot change previously set input primitive
+ERROR: 0:6: 'isolines' : cannot change previously set input primitive
+ERROR: 0:8: 'ccw' : cannot change previously set vertex order
+ERROR: 0:12: 'equal_spacing' : cannot change previously set vertex spacing
+ERROR: 0:13: 'fractional_even_spacing' : cannot change previously set vertex spacing
+ERROR: 0:18: 'patch' : can only use on input in tessellation-evaluation shader
+ERROR: 0:22: 'barrier' : no matching overloaded function found
+ERROR: 0:47: 'patch' : cannot use interpolation qualifiers with patch
+ERROR: 0:48: 'patch' : cannot use interpolation qualifiers with patch
+ERROR: 0:49: 'patch' : cannot use interpolation qualifiers with patch
+ERROR: 0:50: '' : can only have one auxiliary qualifier (centroid, patch, and sample)
+ERROR: 0:54: 'gl_PerVertex' : block already declared with size, can't redeclare as implicitly-sized
+ERROR: 0:59: 'gl_PerVertex' : can only redeclare a built-in block once, and before any use
+ERROR: 0:64: 'quads' : cannot apply to 'out'
+ERROR: 0:64: 'cw' : can only apply to 'in'
+ERROR: 0:65: 'triangles' : cannot apply to 'out'
+ERROR: 0:66: 'isolines' : cannot apply to 'out'
+ERROR: 0:67: 'cw' : can only apply to 'in'
+ERROR: 0:68: 'fractional_odd_spacing' : can only apply to 'in'
+ERROR: 0:69: 'equal_spacing' : can only apply to 'in'
+ERROR: 0:70: 'fractional_even_spacing' : can only apply to 'in'
+ERROR: 0:71: 'point_mode' : can only apply to 'in'
+ERROR: 0:73: 'in' : type must be an array: ina
+ERROR: 0:75: '[]' : tessellation input array size must be gl_MaxPatchVertices or implicitly sized
+ERROR: 0:78: 'in' : type must be an array: bla
+ERROR: 0:86: '[]' : tessellation input array size must be gl_MaxPatchVertices or implicitly sized
+ERROR: 0:96: 'location' : overlapping use of location 24
+ERROR: 0:99: 'location' : overlapping use of location 24
+ERROR: 0:101: 'gl_TessLevelOuter' : identifiers starting with "gl_" are reserved
+ERROR: 30 compilation errors. No code generated.
+
+
+Shader version: 400
+Requested GL_ARB_separate_shader_objects
+input primitive = quads
+vertex spacing = fractional_odd_spacing
+triangle order = cw
+using point mode
+ERROR: node is still EOpNull!
+0:20 Function Definition: main( (global void)
+0:20 Function Parameters:
+0:22 Sequence
+0:22 Constant:
+0:22 0.000000
+0:24 Sequence
+0:24 move second child to first child (temp int)
+0:24 'a' (temp int)
+0:24 Constant:
+0:24 1512 (const int)
+0:32 Sequence
+0:32 move second child to first child (temp 4-component vector of float)
+0:32 'p' (temp 4-component vector of float)
+0:32 gl_Position: direct index for structure (in 4-component vector of float Position)
+0:32 direct index (temp block{in 4-component vector of float Position gl_Position, in float PointSize gl_PointSize, in implicitly-sized array of float ClipDistance gl_ClipDistance})
+0:32 'gl_in' (in 32-element array of block{in 4-component vector of float Position gl_Position, in float PointSize gl_PointSize, in implicitly-sized array of float ClipDistance gl_ClipDistance})
+0:32 Constant:
+0:32 1 (const int)
+0:32 Constant:
+0:32 0 (const int)
+0:33 Sequence
+0:33 move second child to first child (temp float)
+0:33 'ps' (temp float)
+0:33 gl_PointSize: direct index for structure (in float PointSize)
+0:33 direct index (temp block{in 4-component vector of float Position gl_Position, in float PointSize gl_PointSize, in implicitly-sized array of float ClipDistance gl_ClipDistance})
+0:33 'gl_in' (in 32-element array of block{in 4-component vector of float Position gl_Position, in float PointSize gl_PointSize, in implicitly-sized array of float ClipDistance gl_ClipDistance})
+0:33 Constant:
+0:33 1 (const int)
+0:33 Constant:
+0:33 1 (const int)
+0:34 Sequence
+0:34 move second child to first child (temp float)
+0:34 'cd' (temp float)
+0:34 direct index (temp float ClipDistance)
+0:34 gl_ClipDistance: direct index for structure (in implicitly-sized array of float ClipDistance)
+0:34 direct index (temp block{in 4-component vector of float Position gl_Position, in float PointSize gl_PointSize, in implicitly-sized array of float ClipDistance gl_ClipDistance})
+0:34 'gl_in' (in 32-element array of block{in 4-component vector of float Position gl_Position, in float PointSize gl_PointSize, in implicitly-sized array of float ClipDistance gl_ClipDistance})
+0:34 Constant:
+0:34 1 (const int)
+0:34 Constant:
+0:34 2 (const int)
+0:34 Constant:
+0:34 2 (const int)
+0:36 Sequence
+0:36 move second child to first child (temp int)
+0:36 'pvi' (temp int)
+0:36 'gl_PatchVerticesIn' (in int PatchVertices)
+0:37 Sequence
+0:37 move second child to first child (temp int)
+0:37 'pid' (temp int)
+0:37 'gl_PrimitiveID' (in int PrimitiveID)
+0:38 Sequence
+0:38 move second child to first child (temp 3-component vector of float)
+0:38 'tc' (temp 3-component vector of float)
+0:38 'gl_TessCoord' (in 3-component vector of float TessCoord)
+0:39 Sequence
+0:39 move second child to first child (temp float)
+0:39 'tlo' (temp float)
+0:39 direct index (patch temp float TessLevelOuter)
+0:39 'gl_TessLevelOuter' (patch in 4-element array of float TessLevelOuter)
+0:39 Constant:
+0:39 3 (const int)
+0:40 Sequence
+0:40 move second child to first child (temp float)
+0:40 'tli' (temp float)
+0:40 direct index (patch temp float TessLevelInner)
+0:40 'gl_TessLevelInner' (patch in 2-element array of float TessLevelInner)
+0:40 Constant:
+0:40 1 (const int)
+0:42 move second child to first child (temp 4-component vector of float)
+0:42 gl_Position: direct index for structure (gl_Position 4-component vector of float Position)
+0:42 'anon@0' (out block{gl_Position 4-component vector of float Position gl_Position, gl_PointSize float PointSize gl_PointSize, out implicitly-sized array of float ClipDistance gl_ClipDistance})
+0:42 Constant:
+0:42 0 (const uint)
+0:42 'p' (temp 4-component vector of float)
+0:43 move second child to first child (temp float)
+0:43 gl_PointSize: direct index for structure (gl_PointSize float PointSize)
+0:43 'anon@0' (out block{gl_Position 4-component vector of float Position gl_Position, gl_PointSize float PointSize gl_PointSize, out implicitly-sized array of float ClipDistance gl_ClipDistance})
+0:43 Constant:
+0:43 1 (const uint)
+0:43 'ps' (temp float)
+0:44 move second child to first child (temp float)
+0:44 direct index (temp float ClipDistance)
+0:44 gl_ClipDistance: direct index for structure (out implicitly-sized array of float ClipDistance)
+0:44 'anon@0' (out block{gl_Position 4-component vector of float Position gl_Position, gl_PointSize float PointSize gl_PointSize, out implicitly-sized array of float ClipDistance gl_ClipDistance})
+0:44 Constant:
+0:44 2 (const uint)
+0:44 Constant:
+0:44 2 (const int)
+0:44 'cd' (temp float)
+0:? Linker Objects
+0:? 'patchIn' (patch in 4-component vector of float)
+0:? 'patchOut' (patch out 4-component vector of float)
+0:? 'anon@0' (out block{gl_Position 4-component vector of float Position gl_Position, gl_PointSize float PointSize gl_PointSize, out implicitly-sized array of float ClipDistance gl_ClipDistance})
+0:? 'badp1' (smooth patch in 4-component vector of float)
+0:? 'badp2' (flat patch in 4-component vector of float)
+0:? 'badp3' (noperspective patch in 4-component vector of float)
+0:? 'badp4' (patch sample in 3-component vector of float)
+0:? 'gl_in' (in 32-element array of block{in 1-element array of float ClipDistance gl_ClipDistance})
+0:? 'ina' (in 2-component vector of float)
+0:? 'inb' (in 32-element array of 2-component vector of float)
+0:? 'inc' (in 32-element array of 2-component vector of float)
+0:? 'ind' (in 32-element array of 2-component vector of float)
+0:? 'bla' (in block{in int f})
+0:? 'blb' (in 32-element array of block{in int f})
+0:? 'blc' (in 32-element array of block{in int f})
+0:? 'bld' (in 32-element array of block{in int f})
+0:? 'ivla' (layout(location=23 ) in 32-element array of 4-component vector of float)
+0:? 'ivlb' (layout(location=24 ) in 32-element array of 4-component vector of float)
+0:? 'ivlc' (layout(location=24 ) in 32-element array of 4-component vector of float)
+0:? 'ovla' (layout(location=23 ) out 2-element array of 4-component vector of float)
+0:? 'ovlb' (layout(location=24 ) out 2-element array of 4-component vector of float)
+0:? 'pinbi' (patch in block{in int a})
+
+
+Linked tessellation evaluation stage:
+
+
+Shader version: 400
+Requested GL_ARB_separate_shader_objects
+input primitive = quads
+vertex spacing = fractional_odd_spacing
+triangle order = cw
+using point mode
+ERROR: node is still EOpNull!
+0:20 Function Definition: main( (global void)
+0:20 Function Parameters:
+0:22 Sequence
+0:22 Constant:
+0:22 0.000000
+0:24 Sequence
+0:24 move second child to first child (temp int)
+0:24 'a' (temp int)
+0:24 Constant:
+0:24 1512 (const int)
+0:32 Sequence
+0:32 move second child to first child (temp 4-component vector of float)
+0:32 'p' (temp 4-component vector of float)
+0:32 gl_Position: direct index for structure (in 4-component vector of float Position)
+0:32 direct index (temp block{in 4-component vector of float Position gl_Position, in float PointSize gl_PointSize, in 3-element array of float ClipDistance gl_ClipDistance})
+0:32 'gl_in' (in 32-element array of block{in 4-component vector of float Position gl_Position, in float PointSize gl_PointSize, in 3-element array of float ClipDistance gl_ClipDistance})
+0:32 Constant:
+0:32 1 (const int)
+0:32 Constant:
+0:32 0 (const int)
+0:33 Sequence
+0:33 move second child to first child (temp float)
+0:33 'ps' (temp float)
+0:33 gl_PointSize: direct index for structure (in float PointSize)
+0:33 direct index (temp block{in 4-component vector of float Position gl_Position, in float PointSize gl_PointSize, in 3-element array of float ClipDistance gl_ClipDistance})
+0:33 'gl_in' (in 32-element array of block{in 4-component vector of float Position gl_Position, in float PointSize gl_PointSize, in 3-element array of float ClipDistance gl_ClipDistance})
+0:33 Constant:
+0:33 1 (const int)
+0:33 Constant:
+0:33 1 (const int)
+0:34 Sequence
+0:34 move second child to first child (temp float)
+0:34 'cd' (temp float)
+0:34 direct index (temp float ClipDistance)
+0:34 gl_ClipDistance: direct index for structure (in 3-element array of float ClipDistance)
+0:34 direct index (temp block{in 4-component vector of float Position gl_Position, in float PointSize gl_PointSize, in 3-element array of float ClipDistance gl_ClipDistance})
+0:34 'gl_in' (in 32-element array of block{in 4-component vector of float Position gl_Position, in float PointSize gl_PointSize, in 3-element array of float ClipDistance gl_ClipDistance})
+0:34 Constant:
+0:34 1 (const int)
+0:34 Constant:
+0:34 2 (const int)
+0:34 Constant:
+0:34 2 (const int)
+0:36 Sequence
+0:36 move second child to first child (temp int)
+0:36 'pvi' (temp int)
+0:36 'gl_PatchVerticesIn' (in int PatchVertices)
+0:37 Sequence
+0:37 move second child to first child (temp int)
+0:37 'pid' (temp int)
+0:37 'gl_PrimitiveID' (in int PrimitiveID)
+0:38 Sequence
+0:38 move second child to first child (temp 3-component vector of float)
+0:38 'tc' (temp 3-component vector of float)
+0:38 'gl_TessCoord' (in 3-component vector of float TessCoord)
+0:39 Sequence
+0:39 move second child to first child (temp float)
+0:39 'tlo' (temp float)
+0:39 direct index (patch temp float TessLevelOuter)
+0:39 'gl_TessLevelOuter' (patch in 4-element array of float TessLevelOuter)
+0:39 Constant:
+0:39 3 (const int)
+0:40 Sequence
+0:40 move second child to first child (temp float)
+0:40 'tli' (temp float)
+0:40 direct index (patch temp float TessLevelInner)
+0:40 'gl_TessLevelInner' (patch in 2-element array of float TessLevelInner)
+0:40 Constant:
+0:40 1 (const int)
+0:42 move second child to first child (temp 4-component vector of float)
+0:42 gl_Position: direct index for structure (gl_Position 4-component vector of float Position)
+0:42 'anon@0' (out block{gl_Position 4-component vector of float Position gl_Position, gl_PointSize float PointSize gl_PointSize, out 3-element array of float ClipDistance gl_ClipDistance})
+0:42 Constant:
+0:42 0 (const uint)
+0:42 'p' (temp 4-component vector of float)
+0:43 move second child to first child (temp float)
+0:43 gl_PointSize: direct index for structure (gl_PointSize float PointSize)
+0:43 'anon@0' (out block{gl_Position 4-component vector of float Position gl_Position, gl_PointSize float PointSize gl_PointSize, out 3-element array of float ClipDistance gl_ClipDistance})
+0:43 Constant:
+0:43 1 (const uint)
+0:43 'ps' (temp float)
+0:44 move second child to first child (temp float)
+0:44 direct index (temp float ClipDistance)
+0:44 gl_ClipDistance: direct index for structure (out 3-element array of float ClipDistance)
+0:44 'anon@0' (out block{gl_Position 4-component vector of float Position gl_Position, gl_PointSize float PointSize gl_PointSize, out 3-element array of float ClipDistance gl_ClipDistance})
+0:44 Constant:
+0:44 2 (const uint)
+0:44 Constant:
+0:44 2 (const int)
+0:44 'cd' (temp float)
+0:? Linker Objects
+0:? 'patchIn' (patch in 4-component vector of float)
+0:? 'patchOut' (patch out 4-component vector of float)
+0:? 'anon@0' (out block{gl_Position 4-component vector of float Position gl_Position, gl_PointSize float PointSize gl_PointSize, out 3-element array of float ClipDistance gl_ClipDistance})
+0:? 'badp1' (smooth patch in 4-component vector of float)
+0:? 'badp2' (flat patch in 4-component vector of float)
+0:? 'badp3' (noperspective patch in 4-component vector of float)
+0:? 'badp4' (patch sample in 3-component vector of float)
+0:? 'gl_in' (in 32-element array of block{in 1-element array of float ClipDistance gl_ClipDistance})
+0:? 'ina' (in 2-component vector of float)
+0:? 'inb' (in 32-element array of 2-component vector of float)
+0:? 'inc' (in 32-element array of 2-component vector of float)
+0:? 'ind' (in 32-element array of 2-component vector of float)
+0:? 'bla' (in block{in int f})
+0:? 'blb' (in 32-element array of block{in int f})
+0:? 'blc' (in 32-element array of block{in int f})
+0:? 'bld' (in 32-element array of block{in int f})
+0:? 'ivla' (layout(location=23 ) in 32-element array of 4-component vector of float)
+0:? 'ivlb' (layout(location=24 ) in 32-element array of 4-component vector of float)
+0:? 'ivlc' (layout(location=24 ) in 32-element array of 4-component vector of float)
+0:? 'ovla' (layout(location=23 ) out 2-element array of 4-component vector of float)
+0:? 'ovlb' (layout(location=24 ) out 2-element array of 4-component vector of float)
+0:? 'pinbi' (patch in block{in int a})
+
diff --git a/chromium/third_party/glslang/src/Test/baseResults/400.vert.out b/chromium/third_party/glslang/src/Test/baseResults/400.vert.out
new file mode 100755
index 00000000000..946f21d5856
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/400.vert.out
@@ -0,0 +1,34 @@
+400.vert
+Warning, version 400 is not yet complete; most version-specific features are present, but some are missing.
+ERROR: 0:3: 'vertex-shader `double` type input' : not supported for this version or the enabled extensions
+ERROR: 0:4: 'vertex-shader `double` type input' : not supported for this version or the enabled extensions
+ERROR: 0:5: 'vertex-shader `double` type input' : not supported for this version or the enabled extensions
+ERROR: 3 compilation errors. No code generated.
+
+
+Shader version: 400
+ERROR: node is still EOpNull!
+0:7 Function Definition: main( (global void)
+0:7 Function Parameters:
+0:? Linker Objects
+0:? 'd' (in double)
+0:? 'd3' (in 3-component vector of double)
+0:? 'dm4' (in 4X4 matrix of double)
+0:? 'gl_VertexID' (gl_VertexId int VertexId)
+0:? 'gl_InstanceID' (gl_InstanceId int InstanceId)
+
+
+Linked vertex stage:
+
+
+Shader version: 400
+ERROR: node is still EOpNull!
+0:7 Function Definition: main( (global void)
+0:7 Function Parameters:
+0:? Linker Objects
+0:? 'd' (in double)
+0:? 'd3' (in 3-component vector of double)
+0:? 'dm4' (in 4X4 matrix of double)
+0:? 'gl_VertexID' (gl_VertexId int VertexId)
+0:? 'gl_InstanceID' (gl_InstanceId int InstanceId)
+
diff --git a/chromium/third_party/glslang/src/Test/baseResults/410.geom.out b/chromium/third_party/glslang/src/Test/baseResults/410.geom.out
new file mode 100644
index 00000000000..6f7252c9807
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/410.geom.out
@@ -0,0 +1,112 @@
+410.geom
+Warning, version 410 is not yet complete; most version-specific features are present, but some are missing.
+ERROR: 0:8: 'myIn' : cannot redeclare a built-in block with a user name
+ERROR: 0:12: 'gl_myIn' : no declaration found for redeclaration
+ERROR: 0:20: 'gl_PerVertex' : can only redeclare a built-in block once, and before any use
+ERROR: 0:32: 'gl_Position' : no such field in structure
+ERROR: 0:32: '=' : cannot convert from 'temp block{in float PointSize gl_PointSize}' to 'temp 4-component vector of float'
+ERROR: 0:33: 'gl_Position' : member of nameless block was not redeclared
+ERROR: 0:33: 'assign' : cannot convert from 'const 4-component vector of float' to 'layout(stream=0 ) gl_Position void Position'
+WARNING: 0:38: 'return' : type conversion on return values was not explicitly allowed until version 420
+ERROR: 7 compilation errors. No code generated.
+
+
+Shader version: 410
+invocations = -1
+max_vertices = -1
+input primitive = none
+output primitive = none
+ERROR: node is still EOpNull!
+0:3 Function Definition: main( (global void)
+0:3 Function Parameters:
+0:5 Sequence
+0:5 move second child to first child (temp int)
+0:5 'gl_ViewportIndex' (layout(stream=0 ) out int ViewportIndex)
+0:5 Constant:
+0:5 7 (const int)
+0:28 Function Definition: foo( (global void)
+0:28 Function Parameters:
+0:30 Sequence
+0:30 Sequence
+0:30 move second child to first child (temp float)
+0:30 'p' (temp float)
+0:30 gl_PointSize: direct index for structure (in float PointSize)
+0:30 direct index (temp block{in float PointSize gl_PointSize})
+0:30 'gl_in' (in implicitly-sized array of block{in float PointSize gl_PointSize})
+0:30 Constant:
+0:30 1 (const int)
+0:30 Constant:
+0:30 0 (const int)
+0:31 move second child to first child (temp float)
+0:31 gl_PointSize: direct index for structure (layout(stream=0 ) gl_PointSize float PointSize)
+0:31 'anon@0' (layout(stream=0 ) out block{layout(stream=0 ) gl_PointSize float PointSize gl_PointSize, })
+0:31 Constant:
+0:31 1 (const uint)
+0:31 'p' (temp float)
+0:33 gl_Position: direct index for structure (layout(stream=0 ) gl_Position void Position)
+0:33 'anon@0' (layout(stream=0 ) out block{layout(stream=0 ) gl_PointSize float PointSize gl_PointSize, })
+0:33 Constant:
+0:33 0 (const uint)
+0:36 Function Definition: foo5( (global float)
+0:36 Function Parameters:
+0:38 Sequence
+0:38 Branch: Return with expression
+0:38 Constant:
+0:38 4.000000
+0:? Linker Objects
+0:? 'gl_in' (in implicitly-sized array of block{in float PointSize gl_PointSize})
+0:? 'anon@0' (layout(stream=0 ) out block{layout(stream=0 ) gl_PointSize float PointSize gl_PointSize, })
+
+
+Linked geometry stage:
+
+ERROR: Linking geometry stage: At least one shader must specify an input layout primitive
+ERROR: Linking geometry stage: At least one shader must specify an output layout primitive
+ERROR: Linking geometry stage: At least one shader must specify a layout(max_vertices = value)
+
+Shader version: 410
+invocations = 1
+max_vertices = -1
+input primitive = none
+output primitive = none
+ERROR: node is still EOpNull!
+0:3 Function Definition: main( (global void)
+0:3 Function Parameters:
+0:5 Sequence
+0:5 move second child to first child (temp int)
+0:5 'gl_ViewportIndex' (layout(stream=0 ) out int ViewportIndex)
+0:5 Constant:
+0:5 7 (const int)
+0:28 Function Definition: foo( (global void)
+0:28 Function Parameters:
+0:30 Sequence
+0:30 Sequence
+0:30 move second child to first child (temp float)
+0:30 'p' (temp float)
+0:30 gl_PointSize: direct index for structure (in float PointSize)
+0:30 direct index (temp block{in float PointSize gl_PointSize})
+0:30 'gl_in' (in 2-element array of block{in float PointSize gl_PointSize})
+0:30 Constant:
+0:30 1 (const int)
+0:30 Constant:
+0:30 0 (const int)
+0:31 move second child to first child (temp float)
+0:31 gl_PointSize: direct index for structure (layout(stream=0 ) gl_PointSize float PointSize)
+0:31 'anon@0' (layout(stream=0 ) out block{layout(stream=0 ) gl_PointSize float PointSize gl_PointSize, })
+0:31 Constant:
+0:31 1 (const uint)
+0:31 'p' (temp float)
+0:33 gl_Position: direct index for structure (layout(stream=0 ) gl_Position void Position)
+0:33 'anon@0' (layout(stream=0 ) out block{layout(stream=0 ) gl_PointSize float PointSize gl_PointSize, })
+0:33 Constant:
+0:33 0 (const uint)
+0:36 Function Definition: foo5( (global float)
+0:36 Function Parameters:
+0:38 Sequence
+0:38 Branch: Return with expression
+0:38 Constant:
+0:38 4.000000
+0:? Linker Objects
+0:? 'gl_in' (in 2-element array of block{in float PointSize gl_PointSize})
+0:? 'anon@0' (layout(stream=0 ) out block{layout(stream=0 ) gl_PointSize float PointSize gl_PointSize, })
+
diff --git a/chromium/third_party/glslang/src/Test/baseResults/410.tesc.out b/chromium/third_party/glslang/src/Test/baseResults/410.tesc.out
new file mode 100644
index 00000000000..3305c407fd8
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/410.tesc.out
@@ -0,0 +1,31 @@
+410.tesc
+Warning, version 400 is not yet complete; most version-specific features are present, but some are missing.
+ERROR: 0:4: 'length' : array must first be sized by a redeclaration or layout qualifier
+ERROR: 1 compilation errors. No code generated.
+
+
+Shader version: 400
+vertices = -1
+ERROR: node is still EOpNull!
+0:8 Function Definition: main( (global void)
+0:8 Function Parameters:
+0:? Linker Objects
+0:? 'gl_out' (out implicitly-sized array of block{out 4-component vector of float Position gl_Position, out float PointSize gl_PointSize, out implicitly-sized array of float ClipDistance gl_ClipDistance})
+0:? 'outa' (global 1-element array of int)
+0:? 'patchOut' (patch out 4-component vector of float)
+
+
+Linked tessellation control stage:
+
+ERROR: Linking tessellation control stage: At least one shader must specify an output layout(vertices=...)
+
+Shader version: 400
+vertices = -1
+ERROR: node is still EOpNull!
+0:8 Function Definition: main( (global void)
+0:8 Function Parameters:
+0:? Linker Objects
+0:? 'gl_out' (out 1-element array of block{out 4-component vector of float Position gl_Position, out float PointSize gl_PointSize, out 1-element array of float ClipDistance gl_ClipDistance})
+0:? 'outa' (global 1-element array of int)
+0:? 'patchOut' (patch out 4-component vector of float)
+
diff --git a/chromium/third_party/glslang/src/Test/baseResults/410.vert.out b/chromium/third_party/glslang/src/Test/baseResults/410.vert.out
new file mode 100755
index 00000000000..eb4f43a2e65
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/410.vert.out
@@ -0,0 +1,29 @@
+410.vert
+Warning, version 410 is not yet complete; most version-specific features are present, but some are missing.
+
+Shader version: 410
+0:? Sequence
+0:7 Function Definition: main( (global void)
+0:7 Function Parameters:
+0:? Linker Objects
+0:? 'd' (in double)
+0:? 'd3' (in 3-component vector of double)
+0:? 'dm4' (in 4X4 matrix of double)
+0:? 'gl_VertexID' (gl_VertexId int VertexId)
+0:? 'gl_InstanceID' (gl_InstanceId int InstanceId)
+
+
+Linked vertex stage:
+
+
+Shader version: 410
+0:? Sequence
+0:7 Function Definition: main( (global void)
+0:7 Function Parameters:
+0:? Linker Objects
+0:? 'd' (in double)
+0:? 'd3' (in 3-component vector of double)
+0:? 'dm4' (in 4X4 matrix of double)
+0:? 'gl_VertexID' (gl_VertexId int VertexId)
+0:? 'gl_InstanceID' (gl_InstanceId int InstanceId)
+
diff --git a/chromium/third_party/glslang/src/Test/baseResults/420.comp.out b/chromium/third_party/glslang/src/Test/baseResults/420.comp.out
new file mode 100755
index 00000000000..a2311d5a80c
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/420.comp.out
@@ -0,0 +1,122 @@
+420.comp
+Warning, version 420 is not yet complete; most version-specific features are present, but some are missing.
+ERROR: 0:3: 'gl_WorkGroupSize' : not supported for this version or the enabled extensions
+ERROR: 1 compilation errors. No code generated.
+
+
+Shader version: 420
+Requested GL_ARB_compute_shader
+local_size = (2, 4, 6)
+ERROR: node is still EOpNull!
+0:11 Function Definition: main( (global void)
+0:11 Function Parameters:
+0:13 Sequence
+0:13 move second child to first child (temp 3-component vector of float)
+0:13 'sfoo' (shared 3-component vector of float)
+0:13 Constant:
+0:13 2.000000
+0:13 4.000000
+0:13 6.000000
+0:14 add second child into first child (temp 3-component vector of float)
+0:14 'sfoo' (shared 3-component vector of float)
+0:14 Convert uint to float (temp 3-component vector of float)
+0:14 add (temp 3-component vector of uint)
+0:14 add (temp 3-component vector of uint)
+0:14 add (temp 3-component vector of uint)
+0:14 add (temp 3-component vector of uint)
+0:14 Constant:
+0:14 2 (const uint)
+0:14 4 (const uint)
+0:14 6 (const uint)
+0:14 'gl_NumWorkGroups' (in 3-component vector of uint NumWorkGroups)
+0:14 'gl_WorkGroupID' (in 3-component vector of uint WorkGroupID)
+0:14 'gl_LocalInvocationID' (in 3-component vector of uint LocalInvocationID)
+0:14 'gl_GlobalInvocationID' (in 3-component vector of uint GlobalInvocationID)
+0:15 vector scale second child into first child (temp 3-component vector of float)
+0:15 'sfoo' (shared 3-component vector of float)
+0:15 Convert uint to float (temp float)
+0:15 'gl_LocalInvocationIndex' (in uint LocalInvocationIndex)
+0:16 add second child into first child (temp 3-component vector of float)
+0:16 'sfoo' (shared 3-component vector of float)
+0:16 Constant:
+0:16 66559.000000
+0:16 66559.000000
+0:16 65599.000000
+0:17 vector scale second child into first child (temp 3-component vector of float)
+0:17 'sfoo' (shared 3-component vector of float)
+0:17 Constant:
+0:17 1057.000000
+0:23 Barrier (global void)
+0:24 MemoryBarrier (global void)
+0:25 MemoryBarrierAtomicCounter (global void)
+0:26 MemoryBarrierBuffer (global void)
+0:27 MemoryBarrierImage (global void)
+0:28 MemoryBarrierShared (global void)
+0:29 GroupMemoryBarrier (global void)
+0:? Linker Objects
+0:? 'gl_WorkGroupSize' (const 3-component vector of uint WorkGroupSize)
+0:? 2 (const uint)
+0:? 4 (const uint)
+0:? 6 (const uint)
+0:? 'sfoo' (shared 3-component vector of float)
+
+
+Linked compute stage:
+
+
+Shader version: 420
+Requested GL_ARB_compute_shader
+local_size = (2, 4, 6)
+ERROR: node is still EOpNull!
+0:11 Function Definition: main( (global void)
+0:11 Function Parameters:
+0:13 Sequence
+0:13 move second child to first child (temp 3-component vector of float)
+0:13 'sfoo' (shared 3-component vector of float)
+0:13 Constant:
+0:13 2.000000
+0:13 4.000000
+0:13 6.000000
+0:14 add second child into first child (temp 3-component vector of float)
+0:14 'sfoo' (shared 3-component vector of float)
+0:14 Convert uint to float (temp 3-component vector of float)
+0:14 add (temp 3-component vector of uint)
+0:14 add (temp 3-component vector of uint)
+0:14 add (temp 3-component vector of uint)
+0:14 add (temp 3-component vector of uint)
+0:14 Constant:
+0:14 2 (const uint)
+0:14 4 (const uint)
+0:14 6 (const uint)
+0:14 'gl_NumWorkGroups' (in 3-component vector of uint NumWorkGroups)
+0:14 'gl_WorkGroupID' (in 3-component vector of uint WorkGroupID)
+0:14 'gl_LocalInvocationID' (in 3-component vector of uint LocalInvocationID)
+0:14 'gl_GlobalInvocationID' (in 3-component vector of uint GlobalInvocationID)
+0:15 vector scale second child into first child (temp 3-component vector of float)
+0:15 'sfoo' (shared 3-component vector of float)
+0:15 Convert uint to float (temp float)
+0:15 'gl_LocalInvocationIndex' (in uint LocalInvocationIndex)
+0:16 add second child into first child (temp 3-component vector of float)
+0:16 'sfoo' (shared 3-component vector of float)
+0:16 Constant:
+0:16 66559.000000
+0:16 66559.000000
+0:16 65599.000000
+0:17 vector scale second child into first child (temp 3-component vector of float)
+0:17 'sfoo' (shared 3-component vector of float)
+0:17 Constant:
+0:17 1057.000000
+0:23 Barrier (global void)
+0:24 MemoryBarrier (global void)
+0:25 MemoryBarrierAtomicCounter (global void)
+0:26 MemoryBarrierBuffer (global void)
+0:27 MemoryBarrierImage (global void)
+0:28 MemoryBarrierShared (global void)
+0:29 GroupMemoryBarrier (global void)
+0:? Linker Objects
+0:? 'gl_WorkGroupSize' (const 3-component vector of uint WorkGroupSize)
+0:? 2 (const uint)
+0:? 4 (const uint)
+0:? 6 (const uint)
+0:? 'sfoo' (shared 3-component vector of float)
+
diff --git a/chromium/third_party/glslang/src/Test/baseResults/420.frag.out b/chromium/third_party/glslang/src/Test/baseResults/420.frag.out
new file mode 100644
index 00000000000..0697b52b7eb
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/420.frag.out
@@ -0,0 +1,42 @@
+420.frag
+Warning, version 420 is not yet complete; most version-specific features are present, but some are missing.
+ERROR: 0:4: 'redeclaration' : all redeclarations must use the same depth layout on gl_FragDepth
+ERROR: 0:11: 'layout qualifier' : can only apply depth layout to gl_FragDepth
+ERROR: 0:12: 'gl_FragDepth' : cannot redeclare after use
+ERROR: 3 compilation errors. No code generated.
+
+
+Shader version: 420
+using depth_any
+ERROR: node is still EOpNull!
+0:6 Function Definition: main( (global void)
+0:6 Function Parameters:
+0:8 Sequence
+0:8 move second child to first child (temp float)
+0:8 'gl_FragDepth' (gl_FragDepth float FragDepth)
+0:8 Constant:
+0:8 0.300000
+0:? Linker Objects
+0:? 'gl_FragDepth' (gl_FragDepth float FragDepth)
+0:? 'gl_FragDepth' (gl_FragDepth float FragDepth)
+0:? 'depth' (smooth in float)
+
+
+Linked fragment stage:
+
+
+Shader version: 420
+using depth_any
+ERROR: node is still EOpNull!
+0:6 Function Definition: main( (global void)
+0:6 Function Parameters:
+0:8 Sequence
+0:8 move second child to first child (temp float)
+0:8 'gl_FragDepth' (gl_FragDepth float FragDepth)
+0:8 Constant:
+0:8 0.300000
+0:? Linker Objects
+0:? 'gl_FragDepth' (gl_FragDepth float FragDepth)
+0:? 'gl_FragDepth' (gl_FragDepth float FragDepth)
+0:? 'depth' (smooth in float)
+
diff --git a/chromium/third_party/glslang/src/Test/baseResults/420.geom.out b/chromium/third_party/glslang/src/Test/baseResults/420.geom.out
new file mode 100644
index 00000000000..416df13923d
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/420.geom.out
@@ -0,0 +1,258 @@
+420.geom
+Warning, version 420 is not yet complete; most version-specific features are present, but some are missing.
+ERROR: 0:9: 'length' : array must first be sized by a redeclaration or layout qualifier
+ERROR: 0:11: '[' : array must be sized by a redeclaration or layout qualifier before being indexed with a variable
+ERROR: 0:42: 'assign' : l-value required (can't modify a const)
+ERROR: 0:43: 'assign' : l-value required "v4" (can't modify a uniform)
+ERROR: 0:48: 'gl_PointSize' : cannot change arrayness of redeclared block member
+ERROR: 0:49: 'gl_ClipDistance' : cannot change arrayness of redeclared block member
+ERROR: 6 compilation errors. No code generated.
+
+
+Shader version: 420
+invocations = -1
+max_vertices = -1
+input primitive = triangles
+output primitive = none
+ERROR: node is still EOpNull!
+0:7 Function Definition: foo( (global void)
+0:7 Function Parameters:
+0:9 Sequence
+0:9 Constant:
+0:9 1 (const int)
+0:10 gl_Position: direct index for structure (in 4-component vector of float Position)
+0:10 direct index (temp block{in 4-component vector of float Position gl_Position, in float PointSize gl_PointSize, in implicitly-sized array of float ClipDistance gl_ClipDistance})
+0:10 'gl_in' (in 3-element array of block{in 4-component vector of float Position gl_Position, in float PointSize gl_PointSize, in implicitly-sized array of float ClipDistance gl_ClipDistance})
+0:10 Constant:
+0:10 1 (const int)
+0:10 Constant:
+0:10 0 (const int)
+0:11 gl_Position: direct index for structure (in 4-component vector of float Position)
+0:11 indirect index (temp block{in 4-component vector of float Position gl_Position, in float PointSize gl_PointSize, in implicitly-sized array of float ClipDistance gl_ClipDistance})
+0:11 'gl_in' (in 3-element array of block{in 4-component vector of float Position gl_Position, in float PointSize gl_PointSize, in implicitly-sized array of float ClipDistance gl_ClipDistance})
+0:11 'i' (global int)
+0:11 Constant:
+0:11 0 (const int)
+0:18 Function Definition: foo3( (global void)
+0:18 Function Parameters:
+0:20 Sequence
+0:20 Constant:
+0:20 3 (const int)
+0:21 gl_Position: direct index for structure (in 4-component vector of float Position)
+0:21 indirect index (temp block{in 4-component vector of float Position gl_Position, in float PointSize gl_PointSize, in implicitly-sized array of float ClipDistance gl_ClipDistance})
+0:21 'gl_in' (in 3-element array of block{in 4-component vector of float Position gl_Position, in float PointSize gl_PointSize, in implicitly-sized array of float ClipDistance gl_ClipDistance})
+0:21 'i' (global int)
+0:21 Constant:
+0:21 0 (const int)
+0:22 Constant:
+0:22 3 (const int)
+0:29 Function Definition: foo4( (global void)
+0:29 Function Parameters:
+0:? Sequence
+0:40 Sequence
+0:40 move second child to first child (temp 4-component vector of float)
+0:40 'v' (temp 4-component vector of float)
+0:40 textureGatherOffset (global 4-component vector of float)
+0:40 's2D' (uniform sampler2D)
+0:40 direct index (temp 2-component vector of float)
+0:40 'coord' (in 3-element array of 2-component vector of float)
+0:40 Constant:
+0:40 0 (const int)
+0:40 vector swizzle (temp 2-component vector of int)
+0:40 indirect index (temp 2-component vector of int)
+0:40 Constant:
+0:40 0 (const int)
+0:40 1 (const int)
+0:40 1 (const int)
+0:40 -2 (const int)
+0:40 0 (const int)
+0:40 3 (const int)
+0:40 -3 (const int)
+0:40 0 (const int)
+0:40 2 (const int)
+0:40 1 (const int)
+0:40 'i' (global int)
+0:40 Sequence
+0:40 Constant:
+0:40 0 (const int)
+0:40 Constant:
+0:40 1 (const int)
+0:42 move second child to first child (temp 2-component vector of int)
+0:42 vector swizzle (temp 2-component vector of int)
+0:42 indirect index (temp 2-component vector of int)
+0:42 Constant:
+0:42 0 (const int)
+0:42 1 (const int)
+0:42 1 (const int)
+0:42 -2 (const int)
+0:42 0 (const int)
+0:42 3 (const int)
+0:42 -3 (const int)
+0:42 0 (const int)
+0:42 2 (const int)
+0:42 1 (const int)
+0:42 'i' (global int)
+0:42 Sequence
+0:42 Constant:
+0:42 0 (const int)
+0:42 Constant:
+0:42 1 (const int)
+0:42 Constant:
+0:42 3 (const int)
+0:42 3 (const int)
+0:43 move second child to first child (temp float)
+0:43 direct index (temp float)
+0:43 'v4' (uniform 4-component vector of float)
+0:43 Constant:
+0:43 0 (const int)
+0:43 Constant:
+0:43 3.200000
+0:44 vector swizzle (temp 2-component vector of float)
+0:44 'v4' (uniform 4-component vector of float)
+0:44 Sequence
+0:44 Constant:
+0:44 0 (const int)
+0:44 Constant:
+0:44 1 (const int)
+0:52 Function Definition: foo5( (global float)
+0:52 Function Parameters:
+0:54 Sequence
+0:54 Branch: Return with expression
+0:54 Convert int to float (temp float)
+0:54 'i' (global int)
+0:? Linker Objects
+0:? 'i' (global int)
+0:? 'gl_in' (in 3-element array of block{in 4-component vector of float Position gl_Position, in float PointSize gl_PointSize, in implicitly-sized array of float ClipDistance gl_ClipDistance})
+0:? 'color3' (in 3-element array of 4-component vector of float)
+0:? 's2D' (uniform sampler2D)
+0:? 'coord' (in 3-element array of 2-component vector of float)
+0:? 'v4' (uniform 4-component vector of float)
+0:? 'anon@0' (layout(stream=0 ) out block{layout(stream=0 ) gl_PointSize float PointSize gl_PointSize, layout(stream=0 ) out implicitly-sized array of float ClipDistance gl_ClipDistance})
+
+
+Linked geometry stage:
+
+ERROR: Linking geometry stage: Missing entry point: Each stage requires one "void main()" entry point
+ERROR: Linking geometry stage: At least one shader must specify an output layout primitive
+ERROR: Linking geometry stage: At least one shader must specify a layout(max_vertices = value)
+
+Shader version: 420
+invocations = 1
+max_vertices = -1
+input primitive = triangles
+output primitive = none
+ERROR: node is still EOpNull!
+0:7 Function Definition: foo( (global void)
+0:7 Function Parameters:
+0:9 Sequence
+0:9 Constant:
+0:9 1 (const int)
+0:10 gl_Position: direct index for structure (in 4-component vector of float Position)
+0:10 direct index (temp block{in 4-component vector of float Position gl_Position, in float PointSize gl_PointSize, in 1-element array of float ClipDistance gl_ClipDistance})
+0:10 'gl_in' (in 3-element array of block{in 4-component vector of float Position gl_Position, in float PointSize gl_PointSize, in 1-element array of float ClipDistance gl_ClipDistance})
+0:10 Constant:
+0:10 1 (const int)
+0:10 Constant:
+0:10 0 (const int)
+0:11 gl_Position: direct index for structure (in 4-component vector of float Position)
+0:11 indirect index (temp block{in 4-component vector of float Position gl_Position, in float PointSize gl_PointSize, in 1-element array of float ClipDistance gl_ClipDistance})
+0:11 'gl_in' (in 3-element array of block{in 4-component vector of float Position gl_Position, in float PointSize gl_PointSize, in 1-element array of float ClipDistance gl_ClipDistance})
+0:11 'i' (global int)
+0:11 Constant:
+0:11 0 (const int)
+0:18 Function Definition: foo3( (global void)
+0:18 Function Parameters:
+0:20 Sequence
+0:20 Constant:
+0:20 3 (const int)
+0:21 gl_Position: direct index for structure (in 4-component vector of float Position)
+0:21 indirect index (temp block{in 4-component vector of float Position gl_Position, in float PointSize gl_PointSize, in 1-element array of float ClipDistance gl_ClipDistance})
+0:21 'gl_in' (in 3-element array of block{in 4-component vector of float Position gl_Position, in float PointSize gl_PointSize, in 1-element array of float ClipDistance gl_ClipDistance})
+0:21 'i' (global int)
+0:21 Constant:
+0:21 0 (const int)
+0:22 Constant:
+0:22 3 (const int)
+0:29 Function Definition: foo4( (global void)
+0:29 Function Parameters:
+0:? Sequence
+0:40 Sequence
+0:40 move second child to first child (temp 4-component vector of float)
+0:40 'v' (temp 4-component vector of float)
+0:40 textureGatherOffset (global 4-component vector of float)
+0:40 's2D' (uniform sampler2D)
+0:40 direct index (temp 2-component vector of float)
+0:40 'coord' (in 3-element array of 2-component vector of float)
+0:40 Constant:
+0:40 0 (const int)
+0:40 vector swizzle (temp 2-component vector of int)
+0:40 indirect index (temp 2-component vector of int)
+0:40 Constant:
+0:40 0 (const int)
+0:40 1 (const int)
+0:40 1 (const int)
+0:40 -2 (const int)
+0:40 0 (const int)
+0:40 3 (const int)
+0:40 -3 (const int)
+0:40 0 (const int)
+0:40 2 (const int)
+0:40 1 (const int)
+0:40 'i' (global int)
+0:40 Sequence
+0:40 Constant:
+0:40 0 (const int)
+0:40 Constant:
+0:40 1 (const int)
+0:42 move second child to first child (temp 2-component vector of int)
+0:42 vector swizzle (temp 2-component vector of int)
+0:42 indirect index (temp 2-component vector of int)
+0:42 Constant:
+0:42 0 (const int)
+0:42 1 (const int)
+0:42 1 (const int)
+0:42 -2 (const int)
+0:42 0 (const int)
+0:42 3 (const int)
+0:42 -3 (const int)
+0:42 0 (const int)
+0:42 2 (const int)
+0:42 1 (const int)
+0:42 'i' (global int)
+0:42 Sequence
+0:42 Constant:
+0:42 0 (const int)
+0:42 Constant:
+0:42 1 (const int)
+0:42 Constant:
+0:42 3 (const int)
+0:42 3 (const int)
+0:43 move second child to first child (temp float)
+0:43 direct index (temp float)
+0:43 'v4' (uniform 4-component vector of float)
+0:43 Constant:
+0:43 0 (const int)
+0:43 Constant:
+0:43 3.200000
+0:44 vector swizzle (temp 2-component vector of float)
+0:44 'v4' (uniform 4-component vector of float)
+0:44 Sequence
+0:44 Constant:
+0:44 0 (const int)
+0:44 Constant:
+0:44 1 (const int)
+0:52 Function Definition: foo5( (global float)
+0:52 Function Parameters:
+0:54 Sequence
+0:54 Branch: Return with expression
+0:54 Convert int to float (temp float)
+0:54 'i' (global int)
+0:? Linker Objects
+0:? 'i' (global int)
+0:? 'gl_in' (in 3-element array of block{in 4-component vector of float Position gl_Position, in float PointSize gl_PointSize, in 1-element array of float ClipDistance gl_ClipDistance})
+0:? 'color3' (in 3-element array of 4-component vector of float)
+0:? 's2D' (uniform sampler2D)
+0:? 'coord' (in 3-element array of 2-component vector of float)
+0:? 'v4' (uniform 4-component vector of float)
+0:? 'anon@0' (layout(stream=0 ) out block{layout(stream=0 ) gl_PointSize float PointSize gl_PointSize, layout(stream=0 ) out 1-element array of float ClipDistance gl_ClipDistance})
+
diff --git a/chromium/third_party/glslang/src/Test/baseResults/420.tesc.out b/chromium/third_party/glslang/src/Test/baseResults/420.tesc.out
new file mode 100644
index 00000000000..594e1302833
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/420.tesc.out
@@ -0,0 +1,230 @@
+420.tesc
+Warning, version 420 is not yet complete; most version-specific features are present, but some are missing.
+ERROR: 0:7: 'vertices' : inconsistent output number of vertices for array size of gl_out
+ERROR: 0:11: 'vertices' : inconsistent output number of vertices for array size of a
+ERROR: 0:12: 'vertices' : inconsistent output number of vertices for array size of outb
+ERROR: 0:26: 'gl_PointSize' : no such field in structure
+ERROR: 0:26: 'assign' : cannot convert from 'temp float' to 'temp block{out 4-component vector of float Position gl_Position}'
+ERROR: 0:29: 'out' : type must be an array: outf
+ERROR: 0:43: 'vertices' : must be greater than 0
+ERROR: 7 compilation errors. No code generated.
+
+
+Shader version: 420
+Requested GL_ARB_separate_shader_objects
+vertices = 4
+ERROR: node is still EOpNull!
+0:15 Function Definition: main( (global void)
+0:15 Function Parameters:
+0:17 Sequence
+0:17 Sequence
+0:17 move second child to first child (temp 4-component vector of float)
+0:17 'p' (temp 4-component vector of float)
+0:17 gl_Position: direct index for structure (in 4-component vector of float Position)
+0:17 direct index (temp block{in 4-component vector of float Position gl_Position, in float PointSize gl_PointSize, in implicitly-sized array of float ClipDistance gl_ClipDistance})
+0:17 'gl_in' (in 32-element array of block{in 4-component vector of float Position gl_Position, in float PointSize gl_PointSize, in implicitly-sized array of float ClipDistance gl_ClipDistance})
+0:17 Constant:
+0:17 1 (const int)
+0:17 Constant:
+0:17 0 (const int)
+0:18 Sequence
+0:18 move second child to first child (temp float)
+0:18 'ps' (temp float)
+0:18 gl_PointSize: direct index for structure (in float PointSize)
+0:18 direct index (temp block{in 4-component vector of float Position gl_Position, in float PointSize gl_PointSize, in implicitly-sized array of float ClipDistance gl_ClipDistance})
+0:18 'gl_in' (in 32-element array of block{in 4-component vector of float Position gl_Position, in float PointSize gl_PointSize, in implicitly-sized array of float ClipDistance gl_ClipDistance})
+0:18 Constant:
+0:18 1 (const int)
+0:18 Constant:
+0:18 1 (const int)
+0:19 Sequence
+0:19 move second child to first child (temp float)
+0:19 'cd' (temp float)
+0:19 direct index (temp float ClipDistance)
+0:19 gl_ClipDistance: direct index for structure (in implicitly-sized array of float ClipDistance)
+0:19 direct index (temp block{in 4-component vector of float Position gl_Position, in float PointSize gl_PointSize, in implicitly-sized array of float ClipDistance gl_ClipDistance})
+0:19 'gl_in' (in 32-element array of block{in 4-component vector of float Position gl_Position, in float PointSize gl_PointSize, in implicitly-sized array of float ClipDistance gl_ClipDistance})
+0:19 Constant:
+0:19 1 (const int)
+0:19 Constant:
+0:19 2 (const int)
+0:19 Constant:
+0:19 2 (const int)
+0:21 Sequence
+0:21 move second child to first child (temp int)
+0:21 'pvi' (temp int)
+0:21 'gl_PatchVerticesIn' (in int PatchVertices)
+0:22 Sequence
+0:22 move second child to first child (temp int)
+0:22 'pid' (temp int)
+0:22 'gl_PrimitiveID' (in int PrimitiveID)
+0:23 Sequence
+0:23 move second child to first child (temp int)
+0:23 'iid' (temp int)
+0:23 'gl_InvocationID' (in int InvocationID)
+0:25 move second child to first child (temp 4-component vector of float)
+0:25 gl_Position: direct index for structure (out 4-component vector of float Position)
+0:25 indirect index (temp block{out 4-component vector of float Position gl_Position})
+0:25 'gl_out' (out 3-element array of block{out 4-component vector of float Position gl_Position})
+0:25 'gl_InvocationID' (in int InvocationID)
+0:25 Constant:
+0:25 0 (const int)
+0:25 'p' (temp 4-component vector of float)
+0:26 indirect index (temp block{out 4-component vector of float Position gl_Position})
+0:26 'gl_out' (out 3-element array of block{out 4-component vector of float Position gl_Position})
+0:26 'gl_InvocationID' (in int InvocationID)
+0:34 Function Definition: foo( (global void)
+0:34 Function Parameters:
+0:36 Sequence
+0:36 Test condition and select (temp void)
+0:36 Condition
+0:36 logical-or (temp bool)
+0:36 Compare Not Equal (temp bool)
+0:36 Constant:
+0:36 -0.625000
+0:36 -0.500000
+0:36 -0.375000
+0:36 -0.250000
+0:36 -0.375000
+0:36 -0.250000
+0:36 -0.125000
+0:36 0.000000
+0:36 direct index (layout(location=0 ) temp 2X4 matrix of double)
+0:36 'vs_tcs_first' (layout(location=0 ) in 32-element array of 2X4 matrix of double)
+0:36 Constant:
+0:36 0 (const int)
+0:37 Compare Not Equal (temp bool)
+0:37 Constant:
+0:37 0.375000
+0:37 0.500000
+0:37 0.625000
+0:37 0.750000
+0:37 0.625000
+0:37 0.750000
+0:37 0.875000
+0:37 -0.625000
+0:37 direct index (layout(location=12 ) temp 2X4 matrix of double)
+0:37 'vs_tcs_last' (layout(location=12 ) in 32-element array of 2X4 matrix of double)
+0:37 Constant:
+0:37 0 (const int)
+0:36 true case is null
+0:? Linker Objects
+0:? 'gl_out' (out 3-element array of block{out 4-component vector of float Position gl_Position})
+0:? 'a' (out 3-element array of int)
+0:? 'outb' (out 5-element array of int)
+0:? 'outc' (out 4-element array of int)
+0:? 'outf' (out float)
+0:? 'vs_tcs_first' (layout(location=0 ) in 32-element array of 2X4 matrix of double)
+0:? 'vs_tcs_last' (layout(location=12 ) in 32-element array of 2X4 matrix of double)
+
+
+Linked tessellation control stage:
+
+
+Shader version: 420
+Requested GL_ARB_separate_shader_objects
+vertices = 4
+ERROR: node is still EOpNull!
+0:15 Function Definition: main( (global void)
+0:15 Function Parameters:
+0:17 Sequence
+0:17 Sequence
+0:17 move second child to first child (temp 4-component vector of float)
+0:17 'p' (temp 4-component vector of float)
+0:17 gl_Position: direct index for structure (in 4-component vector of float Position)
+0:17 direct index (temp block{in 4-component vector of float Position gl_Position, in float PointSize gl_PointSize, in 3-element array of float ClipDistance gl_ClipDistance})
+0:17 'gl_in' (in 32-element array of block{in 4-component vector of float Position gl_Position, in float PointSize gl_PointSize, in 3-element array of float ClipDistance gl_ClipDistance})
+0:17 Constant:
+0:17 1 (const int)
+0:17 Constant:
+0:17 0 (const int)
+0:18 Sequence
+0:18 move second child to first child (temp float)
+0:18 'ps' (temp float)
+0:18 gl_PointSize: direct index for structure (in float PointSize)
+0:18 direct index (temp block{in 4-component vector of float Position gl_Position, in float PointSize gl_PointSize, in 3-element array of float ClipDistance gl_ClipDistance})
+0:18 'gl_in' (in 32-element array of block{in 4-component vector of float Position gl_Position, in float PointSize gl_PointSize, in 3-element array of float ClipDistance gl_ClipDistance})
+0:18 Constant:
+0:18 1 (const int)
+0:18 Constant:
+0:18 1 (const int)
+0:19 Sequence
+0:19 move second child to first child (temp float)
+0:19 'cd' (temp float)
+0:19 direct index (temp float ClipDistance)
+0:19 gl_ClipDistance: direct index for structure (in 3-element array of float ClipDistance)
+0:19 direct index (temp block{in 4-component vector of float Position gl_Position, in float PointSize gl_PointSize, in 3-element array of float ClipDistance gl_ClipDistance})
+0:19 'gl_in' (in 32-element array of block{in 4-component vector of float Position gl_Position, in float PointSize gl_PointSize, in 3-element array of float ClipDistance gl_ClipDistance})
+0:19 Constant:
+0:19 1 (const int)
+0:19 Constant:
+0:19 2 (const int)
+0:19 Constant:
+0:19 2 (const int)
+0:21 Sequence
+0:21 move second child to first child (temp int)
+0:21 'pvi' (temp int)
+0:21 'gl_PatchVerticesIn' (in int PatchVertices)
+0:22 Sequence
+0:22 move second child to first child (temp int)
+0:22 'pid' (temp int)
+0:22 'gl_PrimitiveID' (in int PrimitiveID)
+0:23 Sequence
+0:23 move second child to first child (temp int)
+0:23 'iid' (temp int)
+0:23 'gl_InvocationID' (in int InvocationID)
+0:25 move second child to first child (temp 4-component vector of float)
+0:25 gl_Position: direct index for structure (out 4-component vector of float Position)
+0:25 indirect index (temp block{out 4-component vector of float Position gl_Position})
+0:25 'gl_out' (out 3-element array of block{out 4-component vector of float Position gl_Position})
+0:25 'gl_InvocationID' (in int InvocationID)
+0:25 Constant:
+0:25 0 (const int)
+0:25 'p' (temp 4-component vector of float)
+0:26 indirect index (temp block{out 4-component vector of float Position gl_Position})
+0:26 'gl_out' (out 3-element array of block{out 4-component vector of float Position gl_Position})
+0:26 'gl_InvocationID' (in int InvocationID)
+0:34 Function Definition: foo( (global void)
+0:34 Function Parameters:
+0:36 Sequence
+0:36 Test condition and select (temp void)
+0:36 Condition
+0:36 logical-or (temp bool)
+0:36 Compare Not Equal (temp bool)
+0:36 Constant:
+0:36 -0.625000
+0:36 -0.500000
+0:36 -0.375000
+0:36 -0.250000
+0:36 -0.375000
+0:36 -0.250000
+0:36 -0.125000
+0:36 0.000000
+0:36 direct index (layout(location=0 ) temp 2X4 matrix of double)
+0:36 'vs_tcs_first' (layout(location=0 ) in 32-element array of 2X4 matrix of double)
+0:36 Constant:
+0:36 0 (const int)
+0:37 Compare Not Equal (temp bool)
+0:37 Constant:
+0:37 0.375000
+0:37 0.500000
+0:37 0.625000
+0:37 0.750000
+0:37 0.625000
+0:37 0.750000
+0:37 0.875000
+0:37 -0.625000
+0:37 direct index (layout(location=12 ) temp 2X4 matrix of double)
+0:37 'vs_tcs_last' (layout(location=12 ) in 32-element array of 2X4 matrix of double)
+0:37 Constant:
+0:37 0 (const int)
+0:36 true case is null
+0:? Linker Objects
+0:? 'gl_out' (out 3-element array of block{out 4-component vector of float Position gl_Position})
+0:? 'a' (out 3-element array of int)
+0:? 'outb' (out 5-element array of int)
+0:? 'outc' (out 4-element array of int)
+0:? 'outf' (out float)
+0:? 'vs_tcs_first' (layout(location=0 ) in 32-element array of 2X4 matrix of double)
+0:? 'vs_tcs_last' (layout(location=12 ) in 32-element array of 2X4 matrix of double)
+
diff --git a/chromium/third_party/glslang/src/Test/baseResults/420.tese.out b/chromium/third_party/glslang/src/Test/baseResults/420.tese.out
new file mode 100644
index 00000000000..fb9bc2013bc
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/420.tese.out
@@ -0,0 +1,313 @@
+420.tese
+Warning, version 420 is not yet complete; most version-specific features are present, but some are missing.
+ERROR: 0:7: '=' : cannot convert from 'const 3-element array of float' to 'global 2-element array of float'
+ERROR: 0:8: 'initializer list' : wrong vector size (or rows in a matrix column): temp 2-component vector of float
+ERROR: 0:9: 'initializer list' : wrong number of matrix columns: temp 3X3 matrix of float
+ERROR: 0:10: 'initializer list' : wrong number of matrix columns: temp 2X2 matrix of float
+ERROR: 0:25: 'initializer list' : wrong number of structure members
+ERROR: 0:27: '=' : cannot convert from 'const bool' to 'global int'
+ERROR: 0:28: 'constructor' : cannot convert parameter 2 from 'const float' to 'temp 4-component vector of float'
+ERROR: 0:29: 'constructor' : cannot convert parameter 2 from 'const 2X2 matrix of float' to 'const 4-component vector of float'
+ERROR: 0:29: 'const 2-element array of 4-component vector of float' : cannot construct with these arguments
+ERROR: 0:29: '=' : cannot convert from 'const float' to 'global 2-element array of 4-component vector of float'
+ERROR: 0:30: 'initializer list' : wrong number of matrix columns: temp 4X2 matrix of float
+ERROR: 0:40: 'constructor' : cannot convert parameter 1 from 'temp float' to 'temp structure{global float s, global float t}'
+ERROR: 0:58: 'initializer list' : wrong number of structure members
+ERROR: 13 compilation errors. No code generated.
+
+
+Shader version: 420
+input primitive = none
+vertex spacing = none
+triangle order = none
+ERROR: node is still EOpNull!
+0:4 Sequence
+0:4 move second child to first child (temp 2X2 matrix of float)
+0:4 'b' (global 2X2 matrix of float)
+0:4 Constant:
+0:4 1.000000
+0:4 0.000000
+0:4 0.000000
+0:4 1.000000
+0:15 Sequence
+0:15 move second child to first child (temp structure{global float a, global int b})
+0:15 'e' (global structure{global float a, global int b})
+0:15 Constant:
+0:15 1.200000
+0:15 2 (const int)
+0:20 Sequence
+0:20 move second child to first child (temp structure{global float a, global int b})
+0:20 'e2' (global structure{global float a, global int b})
+0:20 Constant:
+0:20 1.000000
+0:20 3 (const int)
+0:42 Sequence
+0:42 move second child to first child (temp 5-element array of float)
+0:42 'b5' (global 5-element array of float)
+0:42 Constant:
+0:42 3.400000
+0:42 4.200000
+0:42 5.000000
+0:42 5.200000
+0:42 1.100000
+0:67 Sequence
+0:67 move second child to first child (temp 3-component vector of float)
+0:67 'av3' (global 3-component vector of float)
+0:67 Construct vec3 (global 3-component vector of float)
+0:67 'vc1' (global float)
+0:67 'vc2' (global float)
+0:67 'vc3' (global float)
+0:68 Sequence
+0:68 move second child to first child (temp 3-component vector of float)
+0:68 'bv3' (global 3-component vector of float)
+0:68 Construct vec3 (temp 3-component vector of float)
+0:68 'vc1' (global float)
+0:68 'vc2' (global float)
+0:68 'vc3' (global float)
+0:70 Function Definition: main( (global void)
+0:70 Function Parameters:
+0:72 Sequence
+0:72 MemoryBarrier (global void)
+0:74 Test condition and select (temp void)
+0:74 Condition
+0:74 Compare Equal (temp bool)
+0:74 Constant:
+0:74 1 (const uint)
+0:74 2 (const uint)
+0:74 3.000000
+0:74 4.000000
+0:74 0.000000
+0:74 0.000000
+0:74 0.000000
+0:74 4.000000
+0:74 0.000000
+0:74 5.000000
+0:74 6.000000
+0:74 0.000000
+0:74 0.000000
+0:74 0.000000
+0:74 6.000000
+0:74 0.000000
+0:74 'curlybad1' (temp structure{global 2-component vector of uint uv2, global 2-element array of structure{global float f, global 2X3 matrix of float m23} s})
+0:74 true case is null
+0:76 Test condition and select (temp void)
+0:76 Condition
+0:76 Constant:
+0:76 true (const bool)
+0:76 true case is null
+0:? Linker Objects
+0:? 'a' (const 2X2 matrix of float)
+0:? 1.000000
+0:? 0.000000
+0:? 0.000000
+0:? 1.000000
+0:? 'b' (global 2X2 matrix of float)
+0:? 'c' (const 2X2 matrix of float)
+0:? 1.000000
+0:? 0.000000
+0:? 0.000000
+0:? 1.000000
+0:? 'a2' (global 2-element array of float)
+0:? 'b2' (global 2-component vector of float)
+0:? 'c2' (global 3X3 matrix of float)
+0:? 'd' (global 2X2 matrix of float)
+0:? 'e' (global structure{global float a, global int b})
+0:? 'e2' (global structure{global float a, global int b})
+0:? 'e3' (global structure{global float a, global int b})
+0:? 'a3' (global int)
+0:? 'b3' (global 2-element array of 4-component vector of float)
+0:? 'b4' (global 2-element array of 4-component vector of float)
+0:? 'c3' (global 4X2 matrix of float)
+0:? 'd2' (global implicitly-sized array of structure{global float s, global float t})
+0:? 'b5' (global 5-element array of float)
+0:? 'constructed' (const structure{global 2-component vector of uint uv2, global 2-element array of structure{global float f, global 2X3 matrix of float m23} s})
+0:? 1 (const uint)
+0:? 2 (const uint)
+0:? 3.000000
+0:? 4.000000
+0:? 0.000000
+0:? 0.000000
+0:? 0.000000
+0:? 4.000000
+0:? 0.000000
+0:? 5.000000
+0:? 6.000000
+0:? 0.000000
+0:? 0.000000
+0:? 0.000000
+0:? 6.000000
+0:? 0.000000
+0:? 'curlybad1' (temp structure{global 2-component vector of uint uv2, global 2-element array of structure{global float f, global 2X3 matrix of float m23} s})
+0:? 'curlyInit' (const structure{global 2-component vector of uint uv2, global 2-element array of structure{global float f, global 2X3 matrix of float m23} s})
+0:? 1 (const uint)
+0:? 2 (const uint)
+0:? 3.000000
+0:? 4.000000
+0:? 0.000000
+0:? 0.000000
+0:? 0.000000
+0:? 4.000000
+0:? 0.000000
+0:? 5.000000
+0:? 6.000000
+0:? 0.000000
+0:? 0.000000
+0:? 0.000000
+0:? 6.000000
+0:? 0.000000
+0:? 'vc1' (global float)
+0:? 'vc2' (global float)
+0:? 'vc3' (global float)
+0:? 'av3' (global 3-component vector of float)
+0:? 'bv3' (global 3-component vector of float)
+
+
+Linked tessellation evaluation stage:
+
+ERROR: Linking tessellation evaluation stage: At least one shader must specify an input layout primitive
+
+Shader version: 420
+input primitive = none
+vertex spacing = equal_spacing
+triangle order = ccw
+ERROR: node is still EOpNull!
+0:4 Sequence
+0:4 move second child to first child (temp 2X2 matrix of float)
+0:4 'b' (global 2X2 matrix of float)
+0:4 Constant:
+0:4 1.000000
+0:4 0.000000
+0:4 0.000000
+0:4 1.000000
+0:15 Sequence
+0:15 move second child to first child (temp structure{global float a, global int b})
+0:15 'e' (global structure{global float a, global int b})
+0:15 Constant:
+0:15 1.200000
+0:15 2 (const int)
+0:20 Sequence
+0:20 move second child to first child (temp structure{global float a, global int b})
+0:20 'e2' (global structure{global float a, global int b})
+0:20 Constant:
+0:20 1.000000
+0:20 3 (const int)
+0:42 Sequence
+0:42 move second child to first child (temp 5-element array of float)
+0:42 'b5' (global 5-element array of float)
+0:42 Constant:
+0:42 3.400000
+0:42 4.200000
+0:42 5.000000
+0:42 5.200000
+0:42 1.100000
+0:67 Sequence
+0:67 move second child to first child (temp 3-component vector of float)
+0:67 'av3' (global 3-component vector of float)
+0:67 Construct vec3 (global 3-component vector of float)
+0:67 'vc1' (global float)
+0:67 'vc2' (global float)
+0:67 'vc3' (global float)
+0:68 Sequence
+0:68 move second child to first child (temp 3-component vector of float)
+0:68 'bv3' (global 3-component vector of float)
+0:68 Construct vec3 (temp 3-component vector of float)
+0:68 'vc1' (global float)
+0:68 'vc2' (global float)
+0:68 'vc3' (global float)
+0:70 Function Definition: main( (global void)
+0:70 Function Parameters:
+0:72 Sequence
+0:72 MemoryBarrier (global void)
+0:74 Test condition and select (temp void)
+0:74 Condition
+0:74 Compare Equal (temp bool)
+0:74 Constant:
+0:74 1 (const uint)
+0:74 2 (const uint)
+0:74 3.000000
+0:74 4.000000
+0:74 0.000000
+0:74 0.000000
+0:74 0.000000
+0:74 4.000000
+0:74 0.000000
+0:74 5.000000
+0:74 6.000000
+0:74 0.000000
+0:74 0.000000
+0:74 0.000000
+0:74 6.000000
+0:74 0.000000
+0:74 'curlybad1' (temp structure{global 2-component vector of uint uv2, global 2-element array of structure{global float f, global 2X3 matrix of float m23} s})
+0:74 true case is null
+0:76 Test condition and select (temp void)
+0:76 Condition
+0:76 Constant:
+0:76 true (const bool)
+0:76 true case is null
+0:? Linker Objects
+0:? 'a' (const 2X2 matrix of float)
+0:? 1.000000
+0:? 0.000000
+0:? 0.000000
+0:? 1.000000
+0:? 'b' (global 2X2 matrix of float)
+0:? 'c' (const 2X2 matrix of float)
+0:? 1.000000
+0:? 0.000000
+0:? 0.000000
+0:? 1.000000
+0:? 'a2' (global 2-element array of float)
+0:? 'b2' (global 2-component vector of float)
+0:? 'c2' (global 3X3 matrix of float)
+0:? 'd' (global 2X2 matrix of float)
+0:? 'e' (global structure{global float a, global int b})
+0:? 'e2' (global structure{global float a, global int b})
+0:? 'e3' (global structure{global float a, global int b})
+0:? 'a3' (global int)
+0:? 'b3' (global 2-element array of 4-component vector of float)
+0:? 'b4' (global 2-element array of 4-component vector of float)
+0:? 'c3' (global 4X2 matrix of float)
+0:? 'd2' (global 1-element array of structure{global float s, global float t})
+0:? 'b5' (global 5-element array of float)
+0:? 'constructed' (const structure{global 2-component vector of uint uv2, global 2-element array of structure{global float f, global 2X3 matrix of float m23} s})
+0:? 1 (const uint)
+0:? 2 (const uint)
+0:? 3.000000
+0:? 4.000000
+0:? 0.000000
+0:? 0.000000
+0:? 0.000000
+0:? 4.000000
+0:? 0.000000
+0:? 5.000000
+0:? 6.000000
+0:? 0.000000
+0:? 0.000000
+0:? 0.000000
+0:? 6.000000
+0:? 0.000000
+0:? 'curlybad1' (temp structure{global 2-component vector of uint uv2, global 2-element array of structure{global float f, global 2X3 matrix of float m23} s})
+0:? 'curlyInit' (const structure{global 2-component vector of uint uv2, global 2-element array of structure{global float f, global 2X3 matrix of float m23} s})
+0:? 1 (const uint)
+0:? 2 (const uint)
+0:? 3.000000
+0:? 4.000000
+0:? 0.000000
+0:? 0.000000
+0:? 0.000000
+0:? 4.000000
+0:? 0.000000
+0:? 5.000000
+0:? 6.000000
+0:? 0.000000
+0:? 0.000000
+0:? 0.000000
+0:? 6.000000
+0:? 0.000000
+0:? 'vc1' (global float)
+0:? 'vc2' (global float)
+0:? 'vc3' (global float)
+0:? 'av3' (global 3-component vector of float)
+0:? 'bv3' (global 3-component vector of float)
+
diff --git a/chromium/third_party/glslang/src/Test/baseResults/420.vert.out b/chromium/third_party/glslang/src/Test/baseResults/420.vert.out
new file mode 100644
index 00000000000..0f5110cbd87
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/420.vert.out
@@ -0,0 +1,556 @@
+420.vert
+Warning, version 420 is not yet complete; most version-specific features are present, but some are missing.
+ERROR: 0:2: '#version' : must occur first in shader
+WARNING: 0:3: varying deprecated in version 130; may be removed in future release
+ERROR: 0:3: 'varying' : no longer supported in core profile; removed in version 420
+ERROR: 0:7: '' : vertex input cannot be further qualified
+ERROR: 0:11: '' : can only have one interpolation qualifier (flat, smooth, noperspective)
+ERROR: 0:12: '' : can only have one auxiliary qualifier (centroid, patch, and sample)
+ERROR: 0:13: 'uniform' : too many storage qualifiers
+ERROR: 0:18: '=' : global const initializers must be constant 'const int'
+ERROR: 0:20: 'const' : no qualifiers allowed for function return
+ERROR: 0:27: '' : array size must be a constant integer expression
+ERROR: 0:38: 'j' : undeclared identifier
+ERROR: 0:38: '=' : cannot convert from 'temp float' to 'temp int'
+ERROR: 0:39: 'k' : undeclared identifier
+ERROR: 0:39: '=' : cannot convert from 'temp float' to 'temp int'
+ERROR: 0:40: 'j' : undeclared identifier
+ERROR: 0:40: '=' : cannot convert from 'temp float' to 'temp int'
+ERROR: 0:44: 'jj' : undeclared identifier
+ERROR: 0:44: '=' : cannot convert from 'temp float' to 'temp int'
+ERROR: 0:54: 'y' : vector field selection out of range
+ERROR: 0:62: 'xxxxx' : illegal vector field selection
+ERROR: 0:63: 'xxy' : vector field selection out of range
+ERROR: 0:66: 'binding' : cannot declare a default, include a type or full declaration
+ERROR: 0:69: 'location/component/index' : cannot declare a default, use a full declaration
+ERROR: 0:70: 'input block' : not supported in this stage: vertex
+ERROR: 0:70: 'binding' : requires uniform or buffer storage qualifier
+ERROR: 0:71: 'binding' : binding is too large
+ERROR: 0:74: 'binding' : sampler binding not less than gl_MaxCombinedTextureImageUnits
+ERROR: 0:76: 'binding' : sampler binding not less than gl_MaxCombinedTextureImageUnits (using array)
+ERROR: 0:85: 'patch' : not supported in this stage: vertex
+ERROR: 0:85: '' : vertex input cannot be further qualified
+ERROR: 0:86: 'patch' : not supported in this stage: vertex
+ERROR: 0:100: '=' : global const initializers must be constant 'const int'
+ERROR: 0:101: '' : array size must be a constant integer expression
+ERROR: 0:107: '' : image variables not declared 'writeonly' must have a format layout qualifier
+ERROR: 0:114: 'imageAtomicMin' : only supported on image with format r32i or r32ui
+ERROR: 0:115: 'imageAtomicMax' : no matching overloaded function found
+ERROR: 0:119: 'writeonly' : argument cannot drop memory qualifier when passed to formal parameter
+ERROR: 0:122: '' : memory qualifiers cannot be used on this type
+ERROR: 0:123: '' : memory qualifiers cannot be used on this type
+ERROR: 0:135: 'volatile' : argument cannot drop memory qualifier when passed to formal parameter
+ERROR: 0:139: 'rg8i' : does not apply to unsigned integer images
+ERROR: 0:140: 'rgba32i' : does not apply to floating point images
+ERROR: 0:141: 'rgba32f' : does not apply to unsigned integer images
+ERROR: 0:142: 'r8_snorm' : does not apply to signed integer images
+ERROR: 0:143: 'rgba32ui' : does not apply to signed integer images
+ERROR: 0:144: 'r8ui' : does not apply to signed integer images
+ERROR: 0:147: 'offset on block member' : not supported for this version or the enabled extensions
+ERROR: 0:157: 'textureQueryLevels' : no matching overloaded function found
+ERROR: 0:157: 'assign' : cannot convert from 'const float' to 'temp int'
+ERROR: 0:158: 'textureQueryLevels' : no matching overloaded function found
+ERROR: 0:158: 'assign' : cannot convert from 'const float' to 'temp int'
+ERROR: 50 compilation errors. No code generated.
+
+
+Shader version: 420
+ERROR: node is still EOpNull!
+0:20 Function Definition: foo( (const int)
+0:20 Function Parameters:
+0:? Sequence
+0:23 Sequence
+0:23 move second child to first child (temp int)
+0:23 'b' (const (read only) int)
+0:23 'anonconst' (global int)
+0:25 Sequence
+0:25 move second child to first child (temp int)
+0:25 'd' (const (read only) int)
+0:25 'b' (const (read only) int)
+0:29 Branch: Return with expression
+0:29 'b' (const (read only) int)
+0:32 Function Definition: main( (global void)
+0:32 Function Parameters:
+0:? Sequence
+0:35 Test condition and select (temp void)
+0:35 Condition
+0:35 Compare Equal (temp bool)
+0:35 'i' (temp int)
+0:35 Constant:
+0:35 3 (const int)
+0:35 true case
+0:36 Sequence
+0:36 move second child to first child (temp int)
+0:36 'j' (temp int)
+0:36 'i' (temp int)
+0:42 Loop with condition tested first
+0:42 Loop Condition
+0:42 Constant:
+0:42 true (const bool)
+0:42 No loop body
+0:50 Function Definition: bar(vf4; (global void)
+0:50 Function Parameters:
+0:50 'v' (volatile in 4-component vector of float)
+0:? Sequence
+0:53 's' (temp int)
+0:54 's' (temp int)
+0:55 Test condition and select (temp void)
+0:55 Condition
+0:55 Compare Equal (temp bool)
+0:55 direct index (temp float)
+0:55 direct index (temp 4-component vector of float)
+0:55 'bad' (in 10-element array of 4-component vector of float)
+0:55 Constant:
+0:55 0 (const int)
+0:55 Constant:
+0:55 0 (const int)
+0:55 Constant:
+0:55 4.200000
+0:55 true case is null
+0:57 Test condition and select (temp void)
+0:57 Condition
+0:57 Constant:
+0:57 true (const bool)
+0:57 true case
+0:58 move second child to first child (temp 4-component vector of float)
+0:58 'badorder3' (flat out 4-component vector of float)
+0:58 direct index (temp 4-component vector of float)
+0:58 'bad' (in 10-element array of 4-component vector of float)
+0:58 Constant:
+0:58 0 (const int)
+0:61 Sequence
+0:61 move second child to first child (temp 3-component vector of float)
+0:61 'smeared' (temp 3-component vector of float)
+0:61 Construct vec3 (temp 3-component vector of float)
+0:61 'f' (temp float)
+0:62 'f' (temp float)
+0:63 'f' (temp float)
+0:88 Function Definition: bar23444( (global void)
+0:88 Function Parameters:
+0:? Sequence
+0:91 Sequence
+0:91 move second child to first child (temp float)
+0:91 'a1' (temp float)
+0:91 direct index (temp float)
+0:91 direct index (temp 3-component vector of float)
+0:91 'm43' (temp 4X3 matrix of float)
+0:91 Constant:
+0:91 3 (const int)
+0:91 Constant:
+0:91 1 (const int)
+0:93 Sequence
+0:93 move second child to first child (temp int)
+0:93 'a2' (temp int)
+0:93 Constant:
+0:93 4 (const int)
+0:94 add second child into first child (temp int)
+0:94 'a2' (temp int)
+0:94 Constant:
+0:94 3 (const int)
+0:95 add second child into first child (temp int)
+0:95 'a2' (temp int)
+0:95 Constant:
+0:95 3 (const int)
+0:96 Sequence
+0:96 move second child to first child (temp float)
+0:96 'b' (const (read only) float)
+0:96 component-wise multiply (temp float)
+0:96 Constant:
+0:96 2.000000
+0:96 'a1' (temp float)
+0:97 Sequence
+0:97 move second child to first child (temp int)
+0:97 'a' (temp int)
+0:97 Constant:
+0:97 -1 (const int)
+0:109 Function Definition: qux( (global void)
+0:109 Function Parameters:
+0:111 Sequence
+0:111 Sequence
+0:111 move second child to first child (temp int)
+0:111 'i' (temp int)
+0:111 aoeu: direct index for structure (layout(column_major shared ) uniform int)
+0:111 'anon@0' (layout(binding=7 column_major shared ) uniform block{layout(column_major shared ) uniform int aoeu})
+0:111 Constant:
+0:111 0 (const uint)
+0:112 imageAtomicCompSwap (global int)
+0:112 'iimg2D' (layout(r32i ) uniform iimage2D)
+0:112 Construct ivec2 (temp 2-component vector of int)
+0:112 'i' (temp int)
+0:112 'i' (temp int)
+0:112 'i' (temp int)
+0:112 'i' (temp int)
+0:113 imageAtomicAdd (global uint)
+0:113 'uimg2D' (layout(r32ui ) uniform uimage2D)
+0:113 Construct ivec2 (temp 2-component vector of int)
+0:113 'i' (temp int)
+0:113 'i' (temp int)
+0:113 Convert int to uint (temp uint)
+0:113 'i' (temp int)
+0:114 imageAtomicMin (global int)
+0:114 'iimg2Drgba' (layout(rgba32i ) uniform iimage2D)
+0:114 Construct ivec2 (temp 2-component vector of int)
+0:114 'i' (temp int)
+0:114 'i' (temp int)
+0:114 'i' (temp int)
+0:115 Constant:
+0:115 0.000000
+0:116 Sequence
+0:116 move second child to first child (temp 4-component vector of int)
+0:116 'pos' (temp 4-component vector of int)
+0:116 imageLoad (global 4-component vector of int)
+0:116 'iimg2D' (layout(r32i ) uniform iimage2D)
+0:116 Construct ivec2 (temp 2-component vector of int)
+0:116 'i' (temp int)
+0:116 'i' (temp int)
+0:117 Sequence
+0:117 move second child to first child (temp 4-component vector of float)
+0:117 'col' (temp 4-component vector of float)
+0:117 imageLoad (global 4-component vector of float)
+0:117 'img2DMS' (uniform image2DMS)
+0:117 Construct ivec2 (temp 2-component vector of int)
+0:117 'i' (temp int)
+0:117 'i' (temp int)
+0:117 'i' (temp int)
+0:118 imageStore (global void)
+0:118 'img2DMSWO' (writeonly uniform image2DMS)
+0:118 Construct ivec2 (temp 2-component vector of int)
+0:118 'i' (temp int)
+0:118 'i' (temp int)
+0:118 'i' (temp int)
+0:118 Constant:
+0:118 0.000000
+0:118 0.000000
+0:118 0.000000
+0:118 0.000000
+0:119 imageLoad (global 4-component vector of float)
+0:119 'img2DMSWO' (writeonly uniform image2DMS)
+0:119 Construct ivec2 (temp 2-component vector of int)
+0:119 'i' (temp int)
+0:119 'i' (temp int)
+0:119 'i' (temp int)
+0:125 Function Definition: passr(iI21; (global void)
+0:125 Function Parameters:
+0:125 'image' (coherent readonly in iimage2D)
+0:132 Function Definition: passrc( (global void)
+0:132 Function Parameters:
+0:134 Sequence
+0:134 Function Call: passr(iI21; (global void)
+0:134 'qualim1' (layout(r32i ) coherent readonly uniform iimage2D)
+0:135 Function Call: passr(iI21; (global void)
+0:135 'qualim2' (layout(r32i ) coherent volatile readonly uniform iimage2D)
+0:136 Function Call: passr(iI21; (global void)
+0:136 'iimg2D' (layout(r32i ) uniform iimage2D)
+0:153 Function Definition: qlod( (global void)
+0:153 Function Parameters:
+0:? Sequence
+0:157 'levels' (temp int)
+0:158 'levels' (temp int)
+0:? Linker Objects
+0:? 'v2' (smooth out 2-component vector of float)
+0:? 'bad' (in 10-element array of 4-component vector of float)
+0:? 'badorder' (in 4-component vector of float)
+0:? 'badorder2' (invariant smooth out 4-component vector of float)
+0:? 'badorder4' (centroid in 4-component vector of float)
+0:? 'badorder3' (flat out 4-component vector of float)
+0:? 'rep' (smooth flat out 4-component vector of float)
+0:? 'rep2' (centroid smooth sample out 4-component vector of float)
+0:? 'rep3' (in 4-component vector of float)
+0:? 'anonconst' (global int)
+0:? 'aconst' (const int)
+0:? 5 (const int)
+0:? 'a' (const int)
+0:? 5 (const int)
+0:? 'b' (temp int)
+0:? 'cx' (const float)
+0:? 4.200000
+0:? 'dx' (const float)
+0:? 4.200000
+0:? 'boundInst' (layout(binding=3 column_major shared ) uniform block{layout(column_major shared ) uniform int aoeu})
+0:? 'anon@0' (layout(binding=7 column_major shared ) uniform block{layout(column_major shared ) uniform int aoeu})
+0:? 'anon@1' (layout(binding=1 ) in block{in int aoeua})
+0:? 'anon@2' (layout(column_major shared ) uniform block{layout(column_major shared ) uniform int aooeu})
+0:? 'sampb1' (layout(binding=4 ) uniform sampler2D)
+0:? 'sampb2' (layout(binding=5 ) uniform 10-element array of sampler2D)
+0:? 'sampb3' (layout(binding=80 ) uniform sampler2D)
+0:? 'sampb4' (layout(binding=31 ) uniform sampler2D)
+0:? 'sampb5' (layout(binding=79 ) uniform 2-element array of sampler2D)
+0:? 'anon@3' (out block{out 4-element array of float ClipDistance gl_ClipDistance, })
+0:? 'patchIn' (patch in 4-component vector of float)
+0:? 'patchOut' (smooth patch out 4-component vector of float)
+0:? 'comma0' (temp int)
+0:? 'comma1' (global 1-element array of int)
+0:? 'iimg2D' (layout(r32i ) uniform iimage2D)
+0:? 'iimg2Drgba' (layout(rgba32i ) uniform iimage2D)
+0:? 'img2Drgba' (layout(rgba32f ) uniform image2D)
+0:? 'uimg2D' (layout(r32ui ) uniform uimage2D)
+0:? 'img2DMS' (uniform image2DMS)
+0:? 'img2DMSWO' (writeonly uniform image2DMS)
+0:? 'vol' (volatile temp float)
+0:? 'vol2' (readonly temp int)
+0:? 'qualim1' (layout(r32i ) coherent readonly uniform iimage2D)
+0:? 'qualim2' (layout(r32i ) coherent volatile readonly uniform iimage2D)
+0:? 'i1bad' (layout(rg8i ) uniform uimage2D)
+0:? 'i2bad' (layout(rgba32i ) uniform image2D)
+0:? 'i3bad' (layout(rgba32f ) uniform uimage2D)
+0:? 'i4bad' (layout(r8_snorm ) uniform iimage2D)
+0:? 'i5bad' (layout(rgba32ui ) uniform iimage2D)
+0:? 'i6bad' (layout(r8ui ) uniform iimage2D)
+0:? 'offcheckI' (layout(column_major shared ) uniform block{layout(column_major shared offset=16 ) uniform int foo})
+0:? 'samp1D' (uniform sampler1D)
+0:? 'samp1Ds' (uniform sampler1DShadow)
+0:? 'gl_VertexID' (gl_VertexId int VertexId)
+0:? 'gl_InstanceID' (gl_InstanceId int InstanceId)
+
+
+Linked vertex stage:
+
+
+Shader version: 420
+ERROR: node is still EOpNull!
+0:20 Function Definition: foo( (const int)
+0:20 Function Parameters:
+0:? Sequence
+0:23 Sequence
+0:23 move second child to first child (temp int)
+0:23 'b' (const (read only) int)
+0:23 'anonconst' (global int)
+0:25 Sequence
+0:25 move second child to first child (temp int)
+0:25 'd' (const (read only) int)
+0:25 'b' (const (read only) int)
+0:29 Branch: Return with expression
+0:29 'b' (const (read only) int)
+0:32 Function Definition: main( (global void)
+0:32 Function Parameters:
+0:? Sequence
+0:35 Test condition and select (temp void)
+0:35 Condition
+0:35 Compare Equal (temp bool)
+0:35 'i' (temp int)
+0:35 Constant:
+0:35 3 (const int)
+0:35 true case
+0:36 Sequence
+0:36 move second child to first child (temp int)
+0:36 'j' (temp int)
+0:36 'i' (temp int)
+0:42 Loop with condition tested first
+0:42 Loop Condition
+0:42 Constant:
+0:42 true (const bool)
+0:42 No loop body
+0:50 Function Definition: bar(vf4; (global void)
+0:50 Function Parameters:
+0:50 'v' (volatile in 4-component vector of float)
+0:? Sequence
+0:53 's' (temp int)
+0:54 's' (temp int)
+0:55 Test condition and select (temp void)
+0:55 Condition
+0:55 Compare Equal (temp bool)
+0:55 direct index (temp float)
+0:55 direct index (temp 4-component vector of float)
+0:55 'bad' (in 10-element array of 4-component vector of float)
+0:55 Constant:
+0:55 0 (const int)
+0:55 Constant:
+0:55 0 (const int)
+0:55 Constant:
+0:55 4.200000
+0:55 true case is null
+0:57 Test condition and select (temp void)
+0:57 Condition
+0:57 Constant:
+0:57 true (const bool)
+0:57 true case
+0:58 move second child to first child (temp 4-component vector of float)
+0:58 'badorder3' (flat out 4-component vector of float)
+0:58 direct index (temp 4-component vector of float)
+0:58 'bad' (in 10-element array of 4-component vector of float)
+0:58 Constant:
+0:58 0 (const int)
+0:61 Sequence
+0:61 move second child to first child (temp 3-component vector of float)
+0:61 'smeared' (temp 3-component vector of float)
+0:61 Construct vec3 (temp 3-component vector of float)
+0:61 'f' (temp float)
+0:62 'f' (temp float)
+0:63 'f' (temp float)
+0:88 Function Definition: bar23444( (global void)
+0:88 Function Parameters:
+0:? Sequence
+0:91 Sequence
+0:91 move second child to first child (temp float)
+0:91 'a1' (temp float)
+0:91 direct index (temp float)
+0:91 direct index (temp 3-component vector of float)
+0:91 'm43' (temp 4X3 matrix of float)
+0:91 Constant:
+0:91 3 (const int)
+0:91 Constant:
+0:91 1 (const int)
+0:93 Sequence
+0:93 move second child to first child (temp int)
+0:93 'a2' (temp int)
+0:93 Constant:
+0:93 4 (const int)
+0:94 add second child into first child (temp int)
+0:94 'a2' (temp int)
+0:94 Constant:
+0:94 3 (const int)
+0:95 add second child into first child (temp int)
+0:95 'a2' (temp int)
+0:95 Constant:
+0:95 3 (const int)
+0:96 Sequence
+0:96 move second child to first child (temp float)
+0:96 'b' (const (read only) float)
+0:96 component-wise multiply (temp float)
+0:96 Constant:
+0:96 2.000000
+0:96 'a1' (temp float)
+0:97 Sequence
+0:97 move second child to first child (temp int)
+0:97 'a' (temp int)
+0:97 Constant:
+0:97 -1 (const int)
+0:109 Function Definition: qux( (global void)
+0:109 Function Parameters:
+0:111 Sequence
+0:111 Sequence
+0:111 move second child to first child (temp int)
+0:111 'i' (temp int)
+0:111 aoeu: direct index for structure (layout(column_major shared ) uniform int)
+0:111 'anon@0' (layout(binding=7 column_major shared ) uniform block{layout(column_major shared ) uniform int aoeu})
+0:111 Constant:
+0:111 0 (const uint)
+0:112 imageAtomicCompSwap (global int)
+0:112 'iimg2D' (layout(r32i ) uniform iimage2D)
+0:112 Construct ivec2 (temp 2-component vector of int)
+0:112 'i' (temp int)
+0:112 'i' (temp int)
+0:112 'i' (temp int)
+0:112 'i' (temp int)
+0:113 imageAtomicAdd (global uint)
+0:113 'uimg2D' (layout(r32ui ) uniform uimage2D)
+0:113 Construct ivec2 (temp 2-component vector of int)
+0:113 'i' (temp int)
+0:113 'i' (temp int)
+0:113 Convert int to uint (temp uint)
+0:113 'i' (temp int)
+0:114 imageAtomicMin (global int)
+0:114 'iimg2Drgba' (layout(rgba32i ) uniform iimage2D)
+0:114 Construct ivec2 (temp 2-component vector of int)
+0:114 'i' (temp int)
+0:114 'i' (temp int)
+0:114 'i' (temp int)
+0:115 Constant:
+0:115 0.000000
+0:116 Sequence
+0:116 move second child to first child (temp 4-component vector of int)
+0:116 'pos' (temp 4-component vector of int)
+0:116 imageLoad (global 4-component vector of int)
+0:116 'iimg2D' (layout(r32i ) uniform iimage2D)
+0:116 Construct ivec2 (temp 2-component vector of int)
+0:116 'i' (temp int)
+0:116 'i' (temp int)
+0:117 Sequence
+0:117 move second child to first child (temp 4-component vector of float)
+0:117 'col' (temp 4-component vector of float)
+0:117 imageLoad (global 4-component vector of float)
+0:117 'img2DMS' (uniform image2DMS)
+0:117 Construct ivec2 (temp 2-component vector of int)
+0:117 'i' (temp int)
+0:117 'i' (temp int)
+0:117 'i' (temp int)
+0:118 imageStore (global void)
+0:118 'img2DMSWO' (writeonly uniform image2DMS)
+0:118 Construct ivec2 (temp 2-component vector of int)
+0:118 'i' (temp int)
+0:118 'i' (temp int)
+0:118 'i' (temp int)
+0:118 Constant:
+0:118 0.000000
+0:118 0.000000
+0:118 0.000000
+0:118 0.000000
+0:119 imageLoad (global 4-component vector of float)
+0:119 'img2DMSWO' (writeonly uniform image2DMS)
+0:119 Construct ivec2 (temp 2-component vector of int)
+0:119 'i' (temp int)
+0:119 'i' (temp int)
+0:119 'i' (temp int)
+0:125 Function Definition: passr(iI21; (global void)
+0:125 Function Parameters:
+0:125 'image' (coherent readonly in iimage2D)
+0:132 Function Definition: passrc( (global void)
+0:132 Function Parameters:
+0:134 Sequence
+0:134 Function Call: passr(iI21; (global void)
+0:134 'qualim1' (layout(r32i ) coherent readonly uniform iimage2D)
+0:135 Function Call: passr(iI21; (global void)
+0:135 'qualim2' (layout(r32i ) coherent volatile readonly uniform iimage2D)
+0:136 Function Call: passr(iI21; (global void)
+0:136 'iimg2D' (layout(r32i ) uniform iimage2D)
+0:153 Function Definition: qlod( (global void)
+0:153 Function Parameters:
+0:? Sequence
+0:157 'levels' (temp int)
+0:158 'levels' (temp int)
+0:? Linker Objects
+0:? 'v2' (smooth out 2-component vector of float)
+0:? 'bad' (in 10-element array of 4-component vector of float)
+0:? 'badorder' (in 4-component vector of float)
+0:? 'badorder2' (invariant smooth out 4-component vector of float)
+0:? 'badorder4' (centroid in 4-component vector of float)
+0:? 'badorder3' (flat out 4-component vector of float)
+0:? 'rep' (smooth flat out 4-component vector of float)
+0:? 'rep2' (centroid smooth sample out 4-component vector of float)
+0:? 'rep3' (in 4-component vector of float)
+0:? 'anonconst' (global int)
+0:? 'aconst' (const int)
+0:? 5 (const int)
+0:? 'a' (const int)
+0:? 5 (const int)
+0:? 'b' (temp int)
+0:? 'cx' (const float)
+0:? 4.200000
+0:? 'dx' (const float)
+0:? 4.200000
+0:? 'boundInst' (layout(binding=3 column_major shared ) uniform block{layout(column_major shared ) uniform int aoeu})
+0:? 'anon@0' (layout(binding=7 column_major shared ) uniform block{layout(column_major shared ) uniform int aoeu})
+0:? 'anon@1' (layout(binding=1 ) in block{in int aoeua})
+0:? 'anon@2' (layout(column_major shared ) uniform block{layout(column_major shared ) uniform int aooeu})
+0:? 'sampb1' (layout(binding=4 ) uniform sampler2D)
+0:? 'sampb2' (layout(binding=5 ) uniform 10-element array of sampler2D)
+0:? 'sampb3' (layout(binding=80 ) uniform sampler2D)
+0:? 'sampb4' (layout(binding=31 ) uniform sampler2D)
+0:? 'sampb5' (layout(binding=79 ) uniform 2-element array of sampler2D)
+0:? 'anon@3' (out block{out 4-element array of float ClipDistance gl_ClipDistance, })
+0:? 'patchIn' (patch in 4-component vector of float)
+0:? 'patchOut' (smooth patch out 4-component vector of float)
+0:? 'comma0' (temp int)
+0:? 'comma1' (global 1-element array of int)
+0:? 'iimg2D' (layout(r32i ) uniform iimage2D)
+0:? 'iimg2Drgba' (layout(rgba32i ) uniform iimage2D)
+0:? 'img2Drgba' (layout(rgba32f ) uniform image2D)
+0:? 'uimg2D' (layout(r32ui ) uniform uimage2D)
+0:? 'img2DMS' (uniform image2DMS)
+0:? 'img2DMSWO' (writeonly uniform image2DMS)
+0:? 'vol' (volatile temp float)
+0:? 'vol2' (readonly temp int)
+0:? 'qualim1' (layout(r32i ) coherent readonly uniform iimage2D)
+0:? 'qualim2' (layout(r32i ) coherent volatile readonly uniform iimage2D)
+0:? 'i1bad' (layout(rg8i ) uniform uimage2D)
+0:? 'i2bad' (layout(rgba32i ) uniform image2D)
+0:? 'i3bad' (layout(rgba32f ) uniform uimage2D)
+0:? 'i4bad' (layout(r8_snorm ) uniform iimage2D)
+0:? 'i5bad' (layout(rgba32ui ) uniform iimage2D)
+0:? 'i6bad' (layout(r8ui ) uniform iimage2D)
+0:? 'offcheckI' (layout(column_major shared ) uniform block{layout(column_major shared offset=16 ) uniform int foo})
+0:? 'samp1D' (uniform sampler1D)
+0:? 'samp1Ds' (uniform sampler1DShadow)
+0:? 'gl_VertexID' (gl_VertexId int VertexId)
+0:? 'gl_InstanceID' (gl_InstanceId int InstanceId)
+
diff --git a/chromium/third_party/glslang/src/Test/baseResults/420_size_gl_in.geom.out b/chromium/third_party/glslang/src/Test/baseResults/420_size_gl_in.geom.out
new file mode 100644
index 00000000000..21d1944fd05
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/420_size_gl_in.geom.out
@@ -0,0 +1,77 @@
+420_size_gl_in.geom
+Warning, version 420 is not yet complete; most version-specific features are present, but some are missing.
+ERROR: 0:19: 'gl_PerVertex' : can only redeclare a built-in block once, and before any use
+ERROR: 1 compilation errors. No code generated.
+
+
+Shader version: 420
+invocations = -1
+max_vertices = -1
+input primitive = triangles
+output primitive = none
+ERROR: node is still EOpNull!
+0:11 Function Definition: foo( (global void)
+0:11 Function Parameters:
+0:13 Sequence
+0:13 Constant:
+0:13 3 (const int)
+0:14 gl_Position: direct index for structure (in 4-component vector of float Position)
+0:14 direct index (temp block{in 4-component vector of float Position gl_Position, in float PointSize gl_PointSize, in implicitly-sized array of float ClipDistance gl_ClipDistance})
+0:14 'gl_in' (in 3-element array of block{in 4-component vector of float Position gl_Position, in float PointSize gl_PointSize, in implicitly-sized array of float ClipDistance gl_ClipDistance})
+0:14 Constant:
+0:14 1 (const int)
+0:14 Constant:
+0:14 0 (const int)
+0:15 Constant:
+0:15 3 (const int)
+0:16 gl_Position: direct index for structure (in 4-component vector of float Position)
+0:16 indirect index (temp block{in 4-component vector of float Position gl_Position, in float PointSize gl_PointSize, in implicitly-sized array of float ClipDistance gl_ClipDistance})
+0:16 'gl_in' (in 3-element array of block{in 4-component vector of float Position gl_Position, in float PointSize gl_PointSize, in implicitly-sized array of float ClipDistance gl_ClipDistance})
+0:16 'i' (global int)
+0:16 Constant:
+0:16 0 (const int)
+0:? Linker Objects
+0:? 'i' (global int)
+0:? 'colorun' (in 3-element array of 4-component vector of float)
+0:? 'color3' (in 3-element array of 4-component vector of float)
+0:? 'gl_in' (in 3-element array of block{in 4-component vector of float Position gl_Position, in float PointSize gl_PointSize, in implicitly-sized array of float ClipDistance gl_ClipDistance})
+
+
+Linked geometry stage:
+
+ERROR: Linking geometry stage: Missing entry point: Each stage requires one "void main()" entry point
+ERROR: Linking geometry stage: At least one shader must specify an output layout primitive
+ERROR: Linking geometry stage: At least one shader must specify a layout(max_vertices = value)
+
+Shader version: 420
+invocations = 1
+max_vertices = -1
+input primitive = triangles
+output primitive = none
+ERROR: node is still EOpNull!
+0:11 Function Definition: foo( (global void)
+0:11 Function Parameters:
+0:13 Sequence
+0:13 Constant:
+0:13 3 (const int)
+0:14 gl_Position: direct index for structure (in 4-component vector of float Position)
+0:14 direct index (temp block{in 4-component vector of float Position gl_Position, in float PointSize gl_PointSize, in 1-element array of float ClipDistance gl_ClipDistance})
+0:14 'gl_in' (in 3-element array of block{in 4-component vector of float Position gl_Position, in float PointSize gl_PointSize, in 1-element array of float ClipDistance gl_ClipDistance})
+0:14 Constant:
+0:14 1 (const int)
+0:14 Constant:
+0:14 0 (const int)
+0:15 Constant:
+0:15 3 (const int)
+0:16 gl_Position: direct index for structure (in 4-component vector of float Position)
+0:16 indirect index (temp block{in 4-component vector of float Position gl_Position, in float PointSize gl_PointSize, in 1-element array of float ClipDistance gl_ClipDistance})
+0:16 'gl_in' (in 3-element array of block{in 4-component vector of float Position gl_Position, in float PointSize gl_PointSize, in 1-element array of float ClipDistance gl_ClipDistance})
+0:16 'i' (global int)
+0:16 Constant:
+0:16 0 (const int)
+0:? Linker Objects
+0:? 'i' (global int)
+0:? 'colorun' (in 3-element array of 4-component vector of float)
+0:? 'color3' (in 3-element array of 4-component vector of float)
+0:? 'gl_in' (in 3-element array of block{in 4-component vector of float Position gl_Position, in float PointSize gl_PointSize, in 1-element array of float ClipDistance gl_ClipDistance})
+
diff --git a/chromium/third_party/glslang/src/Test/baseResults/430.comp.out b/chromium/third_party/glslang/src/Test/baseResults/430.comp.out
new file mode 100644
index 00000000000..aecf42fcf6d
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/430.comp.out
@@ -0,0 +1,281 @@
+430.comp
+Warning, version 430 is not yet complete; most version-specific features are present, but some are missing.
+ERROR: 0:4: 'local_size' : cannot change previously set size
+ERROR: 0:5: 'local_size' : too large; see gl_MaxComputeWorkGroupSize
+ERROR: 0:43: 'in' : global storage input qualifier cannot be used in a compute shader
+ERROR: 0:43: 'location qualifier on input' : not supported in this stage: compute
+ERROR: 0:44: 'in' : global storage input qualifier cannot be used in a compute shader
+ERROR: 0:45: 'out' : global storage output qualifier cannot be used in a compute shader
+ERROR: 0:48: 'shared' : cannot apply layout qualifiers to a shared variable
+ERROR: 0:48: 'location' : can only apply to uniform, buffer, in, or out storage qualifiers
+ERROR: 0:49: 'shared' : cannot initialize this type of qualifier
+ERROR: 0:51: 'local_size' : can only apply to 'in'
+ERROR: 0:51: 'local_size' : can only apply to 'in'
+ERROR: 0:51: 'local_size' : can only apply to 'in'
+ERROR: 0:65: 'assign' : l-value required "ro" (can't modify a readonly buffer)
+ERROR: 0:77: '=' : cannot convert from 'temp double' to 'temp int'
+ERROR: 0:81: 'input block' : not supported in this stage: compute
+ERROR: 0:85: 'output block' : not supported in this stage: compute
+ERROR: 16 compilation errors. No code generated.
+
+
+Shader version: 430
+local_size = (2, 1, 4096)
+ERROR: node is still EOpNull!
+0:27 Function Definition: main( (global void)
+0:27 Function Parameters:
+0:29 Sequence
+0:29 Barrier (global void)
+0:30 MemoryBarrier (global void)
+0:31 MemoryBarrierAtomicCounter (global void)
+0:32 MemoryBarrierBuffer (global void)
+0:33 MemoryBarrierShared (global void)
+0:34 MemoryBarrierImage (global void)
+0:35 GroupMemoryBarrier (global void)
+0:36 move second child to first child (temp int)
+0:36 value: direct index for structure (layout(column_major shared ) buffer int)
+0:36 'anon@0' (layout(column_major shared ) buffer block{layout(column_major shared ) buffer int value, layout(column_major shared ) buffer implicitly-sized array of float values})
+0:36 Constant:
+0:36 0 (const uint)
+0:36 Convert float to int (temp int)
+0:36 indirect index (layout(column_major shared ) temp float)
+0:36 values: direct index for structure (layout(column_major shared ) buffer implicitly-sized array of float)
+0:36 'anon@0' (layout(column_major shared ) buffer block{layout(column_major shared ) buffer int value, layout(column_major shared ) buffer implicitly-sized array of float values})
+0:36 Constant:
+0:36 1 (const uint)
+0:36 'gl_LocalInvocationIndex' (in uint LocalInvocationIndex)
+0:39 Test condition and select (temp void)
+0:39 Condition
+0:39 Compare Greater Than (temp bool)
+0:39 'a' (temp int)
+0:39 Constant:
+0:39 10 (const int)
+0:39 true case
+0:40 Barrier (global void)
+0:63 Function Definition: foo( (global void)
+0:63 Function Parameters:
+0:65 Sequence
+0:65 move second child to first child (temp float)
+0:65 direct index (layout(column_major shared ) temp float)
+0:65 values: direct index for structure (layout(column_major shared ) buffer implicitly-sized array of float)
+0:65 'ro' (layout(column_major shared ) readonly buffer block{layout(column_major shared ) buffer int value, layout(column_major shared ) buffer implicitly-sized array of float values})
+0:65 Constant:
+0:65 1 (const int)
+0:65 Constant:
+0:65 2 (const int)
+0:65 Constant:
+0:65 4.700000
+0:66 array length (temp int)
+0:66 values: direct index for structure (layout(column_major shared ) buffer implicitly-sized array of float)
+0:66 'ro' (layout(column_major shared ) readonly buffer block{layout(column_major shared ) buffer int value, layout(column_major shared ) buffer implicitly-sized array of float values})
+0:66 Constant:
+0:66 1 (const int)
+0:67 Barrier (global void)
+0:72 Function Definition: fooaoeu( (global void)
+0:72 Function Parameters:
+0:73 Sequence
+0:73 Sequence
+0:73 move second child to first child (temp 2-component vector of int)
+0:73 'storePos' (temp 2-component vector of int)
+0:73 Convert uint to int (temp 2-component vector of int)
+0:73 vector swizzle (temp 2-component vector of uint)
+0:73 'gl_GlobalInvocationID' (in 3-component vector of uint GlobalInvocationID)
+0:73 Sequence
+0:73 Constant:
+0:73 0 (const int)
+0:73 Constant:
+0:73 1 (const int)
+0:74 Sequence
+0:74 move second child to first child (temp double)
+0:74 'localCoef' (temp double)
+0:74 Convert float to double (temp double)
+0:74 length (global float)
+0:74 divide (temp 2-component vector of float)
+0:74 Convert int to float (temp 2-component vector of float)
+0:74 subtract (temp 2-component vector of int)
+0:74 Convert uint to int (temp 2-component vector of int)
+0:74 vector swizzle (temp 2-component vector of uint)
+0:74 'gl_LocalInvocationID' (in 3-component vector of uint LocalInvocationID)
+0:74 Sequence
+0:74 Constant:
+0:74 0 (const int)
+0:74 Constant:
+0:74 1 (const int)
+0:74 Constant:
+0:74 8 (const int)
+0:74 Constant:
+0:74 8.000000
+0:75 Sequence
+0:75 move second child to first child (temp 4-component vector of double)
+0:75 'aa' (temp 4-component vector of double)
+0:75 Constant:
+0:75 0.400000
+0:75 0.200000
+0:75 0.300000
+0:75 0.400000
+0:76 Sequence
+0:76 move second child to first child (temp double)
+0:76 'globalCoef' (temp double)
+0:76 Constant:
+0:76 1.000000
+0:78 Sequence
+0:78 move second child to first child (temp double)
+0:78 'di' (temp double)
+0:78 Convert int to double (temp double)
+0:78 'i' (temp int)
+0:? Linker Objects
+0:? 'gl_WorkGroupSize' (const 3-component vector of uint WorkGroupSize)
+0:? 2 (const uint)
+0:? 1 (const uint)
+0:? 4096 (const uint)
+0:? 'total' (const int)
+0:? 66592 (const int)
+0:? 'anon@0' (layout(column_major shared ) buffer block{layout(column_major shared ) buffer int value, layout(column_major shared ) buffer implicitly-sized array of float values})
+0:? 'invalid' (layout(column_major shared ) buffer block{layout(column_major shared ) buffer implicitly-sized array of float values, layout(column_major shared ) buffer int value})
+0:? 'v3' (layout(location=2 ) in 3-component vector of float)
+0:? 'f' (in float)
+0:? 'fo' (out float)
+0:? 's' (shared 4-component vector of float)
+0:? 'sl' (layout(location=2 ) shared 4-component vector of float)
+0:? 'fs' (shared float)
+0:? 'arrX' (global 2-element array of int)
+0:? 'arrY' (global 1-element array of int)
+0:? 'arrZ' (global 4096-element array of int)
+0:? 'ro' (layout(column_major shared ) readonly buffer block{layout(column_major shared ) buffer int value, layout(column_major shared ) buffer implicitly-sized array of float values})
+0:? 'roll' (uniform double)
+0:? 'destTex' (writeonly uniform image2D)
+0:? 'inbi' (in block{in int a})
+0:? 'outbi' (out block{out int a})
+
+
+Linked compute stage:
+
+
+Shader version: 430
+local_size = (2, 1, 4096)
+ERROR: node is still EOpNull!
+0:27 Function Definition: main( (global void)
+0:27 Function Parameters:
+0:29 Sequence
+0:29 Barrier (global void)
+0:30 MemoryBarrier (global void)
+0:31 MemoryBarrierAtomicCounter (global void)
+0:32 MemoryBarrierBuffer (global void)
+0:33 MemoryBarrierShared (global void)
+0:34 MemoryBarrierImage (global void)
+0:35 GroupMemoryBarrier (global void)
+0:36 move second child to first child (temp int)
+0:36 value: direct index for structure (layout(column_major shared ) buffer int)
+0:36 'anon@0' (layout(column_major shared ) buffer block{layout(column_major shared ) buffer int value, layout(column_major shared ) buffer implicitly-sized array of float values})
+0:36 Constant:
+0:36 0 (const uint)
+0:36 Convert float to int (temp int)
+0:36 indirect index (layout(column_major shared ) temp float)
+0:36 values: direct index for structure (layout(column_major shared ) buffer implicitly-sized array of float)
+0:36 'anon@0' (layout(column_major shared ) buffer block{layout(column_major shared ) buffer int value, layout(column_major shared ) buffer implicitly-sized array of float values})
+0:36 Constant:
+0:36 1 (const uint)
+0:36 'gl_LocalInvocationIndex' (in uint LocalInvocationIndex)
+0:39 Test condition and select (temp void)
+0:39 Condition
+0:39 Compare Greater Than (temp bool)
+0:39 'a' (temp int)
+0:39 Constant:
+0:39 10 (const int)
+0:39 true case
+0:40 Barrier (global void)
+0:63 Function Definition: foo( (global void)
+0:63 Function Parameters:
+0:65 Sequence
+0:65 move second child to first child (temp float)
+0:65 direct index (layout(column_major shared ) temp float)
+0:65 values: direct index for structure (layout(column_major shared ) buffer implicitly-sized array of float)
+0:65 'ro' (layout(column_major shared ) readonly buffer block{layout(column_major shared ) buffer int value, layout(column_major shared ) buffer implicitly-sized array of float values})
+0:65 Constant:
+0:65 1 (const int)
+0:65 Constant:
+0:65 2 (const int)
+0:65 Constant:
+0:65 4.700000
+0:66 array length (temp int)
+0:66 values: direct index for structure (layout(column_major shared ) buffer implicitly-sized array of float)
+0:66 'ro' (layout(column_major shared ) readonly buffer block{layout(column_major shared ) buffer int value, layout(column_major shared ) buffer implicitly-sized array of float values})
+0:66 Constant:
+0:66 1 (const int)
+0:67 Barrier (global void)
+0:72 Function Definition: fooaoeu( (global void)
+0:72 Function Parameters:
+0:73 Sequence
+0:73 Sequence
+0:73 move second child to first child (temp 2-component vector of int)
+0:73 'storePos' (temp 2-component vector of int)
+0:73 Convert uint to int (temp 2-component vector of int)
+0:73 vector swizzle (temp 2-component vector of uint)
+0:73 'gl_GlobalInvocationID' (in 3-component vector of uint GlobalInvocationID)
+0:73 Sequence
+0:73 Constant:
+0:73 0 (const int)
+0:73 Constant:
+0:73 1 (const int)
+0:74 Sequence
+0:74 move second child to first child (temp double)
+0:74 'localCoef' (temp double)
+0:74 Convert float to double (temp double)
+0:74 length (global float)
+0:74 divide (temp 2-component vector of float)
+0:74 Convert int to float (temp 2-component vector of float)
+0:74 subtract (temp 2-component vector of int)
+0:74 Convert uint to int (temp 2-component vector of int)
+0:74 vector swizzle (temp 2-component vector of uint)
+0:74 'gl_LocalInvocationID' (in 3-component vector of uint LocalInvocationID)
+0:74 Sequence
+0:74 Constant:
+0:74 0 (const int)
+0:74 Constant:
+0:74 1 (const int)
+0:74 Constant:
+0:74 8 (const int)
+0:74 Constant:
+0:74 8.000000
+0:75 Sequence
+0:75 move second child to first child (temp 4-component vector of double)
+0:75 'aa' (temp 4-component vector of double)
+0:75 Constant:
+0:75 0.400000
+0:75 0.200000
+0:75 0.300000
+0:75 0.400000
+0:76 Sequence
+0:76 move second child to first child (temp double)
+0:76 'globalCoef' (temp double)
+0:76 Constant:
+0:76 1.000000
+0:78 Sequence
+0:78 move second child to first child (temp double)
+0:78 'di' (temp double)
+0:78 Convert int to double (temp double)
+0:78 'i' (temp int)
+0:? Linker Objects
+0:? 'gl_WorkGroupSize' (const 3-component vector of uint WorkGroupSize)
+0:? 2 (const uint)
+0:? 1 (const uint)
+0:? 4096 (const uint)
+0:? 'total' (const int)
+0:? 66592 (const int)
+0:? 'anon@0' (layout(column_major shared ) buffer block{layout(column_major shared ) buffer int value, layout(column_major shared ) buffer implicitly-sized array of float values})
+0:? 'invalid' (layout(column_major shared ) buffer block{layout(column_major shared ) buffer implicitly-sized array of float values, layout(column_major shared ) buffer int value})
+0:? 'v3' (layout(location=2 ) in 3-component vector of float)
+0:? 'f' (in float)
+0:? 'fo' (out float)
+0:? 's' (shared 4-component vector of float)
+0:? 'sl' (layout(location=2 ) shared 4-component vector of float)
+0:? 'fs' (shared float)
+0:? 'arrX' (global 2-element array of int)
+0:? 'arrY' (global 1-element array of int)
+0:? 'arrZ' (global 4096-element array of int)
+0:? 'ro' (layout(column_major shared ) readonly buffer block{layout(column_major shared ) buffer int value, layout(column_major shared ) buffer implicitly-sized array of float values})
+0:? 'roll' (uniform double)
+0:? 'destTex' (writeonly uniform image2D)
+0:? 'inbi' (in block{in int a})
+0:? 'outbi' (out block{out int a})
+
diff --git a/chromium/third_party/glslang/src/Test/baseResults/430.vert.out b/chromium/third_party/glslang/src/Test/baseResults/430.vert.out
new file mode 100644
index 00000000000..8cfd20c03cb
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/430.vert.out
@@ -0,0 +1,469 @@
+430.vert
+Warning, version 430 is not yet complete; most version-specific features are present, but some are missing.
+ERROR: 0:3: 'location' : can only apply to uniform, buffer, in, or out storage qualifiers
+ERROR: 0:7: 'input block' : not supported in this stage: vertex
+ERROR: 0:7: 'location qualifier on in/out block' : not supported for this version or the enabled extensions
+ERROR: 0:8: 'location qualifier on in/out block' : not supported for this version or the enabled extensions
+ERROR: 0:23: 'invariant' : can only apply to an output
+ERROR: 0:21: 'g' : cannot use storage or interpolation qualifiers on structure members
+ERROR: 0:22: 'h' : cannot use storage or interpolation qualifiers on structure members
+ERROR: 0:23: 'i' : cannot use invariant qualifier on structure members
+ERROR: 0:24: 'j' : cannot use memory qualifiers on structure members
+ERROR: 0:25: 'm3' : cannot use layout qualifiers on structure members
+ERROR: 0:28: '' : cannot use invariant qualifier on a function parameter
+ERROR: 0:30: '' : cannot use layout qualifiers on a function parameter
+ERROR: 0:31: '' : cannot use auxiliary or interpolation qualifiers on a function parameter
+ERROR: 0:42: 'location' : overlapping use of location 53
+ERROR: 0:47: 'gl_ClipDistance array size' : must be less than gl_MaxClipDistances (8)
+ERROR: 0:51: 'start' : undeclared identifier
+ERROR: 0:51: '' : constant expression required
+ERROR: 0:51: 'layout-id value' : scalar integer expression required
+ERROR: 0:53: 'input block' : not supported in this stage: vertex
+ERROR: 0:54: 'location on block member' : not supported for this version or the enabled extensions
+ERROR: 0:57: 'input block' : not supported in this stage: vertex
+ERROR: 0:58: 'location on block member' : not supported for this version or the enabled extensions
+ERROR: 0:59: 'location on block member' : not supported for this version or the enabled extensions
+ERROR: 0:62: 'uniform buffer-member align' : not supported for this version or the enabled extensions
+ERROR: 0:64: 'uniform buffer-member align' : not supported for this version or the enabled extensions
+ERROR: 0:65: 'uniform buffer-member align' : not supported for this version or the enabled extensions
+ERROR: 0:65: 'offset on block member' : not supported for this version or the enabled extensions
+ERROR: 0:66: 'offset on block member' : not supported for this version or the enabled extensions
+ERROR: 0:64: 'offset/align' : can only be used with std140 or std430 layout packing
+ERROR: 0:65: 'align' : can only be used with std140 or std430 layout packing
+ERROR: 0:71: 'offset on block member' : not supported for this version or the enabled extensions
+ERROR: 0:74: 'gl_MaxTransformFeedbackBuffers' : required extension not requested: GL_ARB_enhanced_layouts
+ERROR: 0:75: 'gl_MaxTransformFeedbackInterleavedComponents' : required extension not requested: GL_ARB_enhanced_layouts
+ERROR: 0:78: 'transform feedback qualifier' : not supported for this version or the enabled extensions
+ERROR: 0:81: 'transform feedback qualifier' : not supported for this version or the enabled extensions
+ERROR: 0:81: 'transform feedback qualifier' : not supported for this version or the enabled extensions
+ERROR: 0:83: 'transform feedback qualifier' : not supported for this version or the enabled extensions
+ERROR: 0:83: 'transform feedback qualifier' : not supported for this version or the enabled extensions
+ERROR: 0:83: 'transform feedback qualifier' : not supported for this version or the enabled extensions
+ERROR: 0:84: 'transform feedback qualifier' : not supported for this version or the enabled extensions
+ERROR: 0:84: 'transform feedback qualifier' : not supported for this version or the enabled extensions
+ERROR: 0:86: 'transform feedback qualifier' : not supported for this version or the enabled extensions
+ERROR: 0:86: 'transform feedback qualifier' : not supported for this version or the enabled extensions
+ERROR: 0:86: 'transform feedback qualifier' : not supported for this version or the enabled extensions
+ERROR: 0:92: 'transform feedback qualifier' : not supported for this version or the enabled extensions
+ERROR: 0:93: 'transform feedback qualifier' : not supported for this version or the enabled extensions
+ERROR: 0:93: 'transform feedback qualifier' : not supported for this version or the enabled extensions
+ERROR: 0:93: 'transform feedback qualifier' : not supported for this version or the enabled extensions
+ERROR: 0:117: 'input block' : not supported in this stage: vertex
+ERROR: 0:123: 'input block' : not supported in this stage: vertex
+ERROR: 0:146: 'shared' : not supported in this stage: vertex
+ERROR: 0:150: 'barrier' : no matching overloaded function found
+ERROR: 0:154: 'memoryBarrierShared' : no matching overloaded function found
+ERROR: 0:156: 'groupMemoryBarrier' : no matching overloaded function found
+ERROR: 0:159: 'buffer' : buffers can be declared only as blocks
+ERROR: 0:168: 'textureSamples and imageSamples' : not supported for this version or the enabled extensions
+ERROR: 0:169: 'textureSamples and imageSamples' : not supported for this version or the enabled extensions
+ERROR: 0:170: 'textureSamples and imageSamples' : not supported for this version or the enabled extensions
+ERROR: 0:171: 'textureSamples and imageSamples' : not supported for this version or the enabled extensions
+ERROR: 0:221: 'textureQueryLevels' : no matching overloaded function found
+ERROR: 0:221: 'assign' : cannot convert from 'const float' to 'temp int'
+ERROR: 0:222: 'textureQueryLevels' : no matching overloaded function found
+ERROR: 0:222: 'assign' : cannot convert from 'const float' to 'temp int'
+ERROR: 63 compilation errors. No code generated.
+
+
+Shader version: 430
+Requested GL_ARB_enhanced_layouts
+Requested GL_ARB_shader_texture_image_samples
+in xfb mode
+ERROR: node is still EOpNull!
+0:14 Function Definition: foo( (global void)
+0:14 Function Parameters:
+0:16 Sequence
+0:16 move second child to first child (temp float)
+0:16 direct index (temp float ClipDistance)
+0:16 gl_ClipDistance: direct index for structure (out 17-element array of float ClipDistance)
+0:16 'anon@0' (out block{out 17-element array of float ClipDistance gl_ClipDistance, })
+0:16 Constant:
+0:16 2 (const uint)
+0:16 Constant:
+0:16 2 (const int)
+0:16 Constant:
+0:16 3.700000
+0:31 Function Definition: foo3(vf4;vf3;vf2;vf3; (global void)
+0:31 Function Parameters:
+0:31 'v4' (in 4-component vector of float)
+0:31 'v3' (volatile in 3-component vector of float)
+0:31 'v2' (in 2-component vector of float)
+0:31 'cv3' (in 3-component vector of float)
+0:148 Function Definition: fooBarrier( (global void)
+0:148 Function Parameters:
+0:150 Sequence
+0:150 Constant:
+0:150 0.000000
+0:151 MemoryBarrier (global void)
+0:152 MemoryBarrierAtomicCounter (global void)
+0:153 MemoryBarrierBuffer (global void)
+0:154 Constant:
+0:154 0.000000
+0:155 MemoryBarrierImage (global void)
+0:156 Constant:
+0:156 0.000000
+0:166 Function Definition: fooq( (global void)
+0:166 Function Parameters:
+0:168 Sequence
+0:168 Sequence
+0:168 move second child to first child (temp int)
+0:168 's' (temp int)
+0:168 textureSamples (global int)
+0:168 's2dms' (uniform sampler2DMS)
+0:169 add second child into first child (temp int)
+0:169 's' (temp int)
+0:169 textureSamples (global int)
+0:169 'us2dmsa' (uniform usampler2DMSArray)
+0:170 add second child into first child (temp int)
+0:170 's' (temp int)
+0:170 imageQuerySamples (global int)
+0:170 'ii2dms' (layout(rgba32i ) uniform iimage2DMS)
+0:171 add second child into first child (temp int)
+0:171 's' (temp int)
+0:171 imageQuerySamples (global int)
+0:171 'i2dmsa' (layout(rgba32f ) uniform image2DMSArray)
+0:176 Function Definition: fooq2( (global void)
+0:176 Function Parameters:
+0:178 Sequence
+0:178 Sequence
+0:178 move second child to first child (temp int)
+0:178 's' (temp int)
+0:178 textureSamples (global int)
+0:178 's2dms' (uniform sampler2DMS)
+0:179 add second child into first child (temp int)
+0:179 's' (temp int)
+0:179 textureSamples (global int)
+0:179 'us2dmsa' (uniform usampler2DMSArray)
+0:180 add second child into first child (temp int)
+0:180 's' (temp int)
+0:180 imageQuerySamples (global int)
+0:180 'ii2dms' (layout(rgba32i ) uniform iimage2DMS)
+0:181 add second child into first child (temp int)
+0:181 's' (temp int)
+0:181 imageQuerySamples (global int)
+0:181 'i2dmsa' (layout(rgba32f ) uniform image2DMSArray)
+0:202 Function Definition: qlod( (global void)
+0:202 Function Parameters:
+0:? Sequence
+0:206 move second child to first child (temp int)
+0:206 'levels' (temp int)
+0:206 textureQueryLevels (global int)
+0:206 'samp1D' (uniform sampler1D)
+0:207 move second child to first child (temp int)
+0:207 'levels' (temp int)
+0:207 textureQueryLevels (global int)
+0:207 'usamp2D' (uniform usampler2D)
+0:208 move second child to first child (temp int)
+0:208 'levels' (temp int)
+0:208 textureQueryLevels (global int)
+0:208 'isamp3D' (uniform isampler3D)
+0:209 move second child to first child (temp int)
+0:209 'levels' (temp int)
+0:209 textureQueryLevels (global int)
+0:209 'isampCube' (uniform isamplerCube)
+0:210 move second child to first child (temp int)
+0:210 'levels' (temp int)
+0:210 textureQueryLevels (global int)
+0:210 'isamp1DA' (uniform isampler1DArray)
+0:211 move second child to first child (temp int)
+0:211 'levels' (temp int)
+0:211 textureQueryLevels (global int)
+0:211 'samp2DA' (uniform sampler2DArray)
+0:212 move second child to first child (temp int)
+0:212 'levels' (temp int)
+0:212 textureQueryLevels (global int)
+0:212 'usampCubeA' (uniform usamplerCubeArray)
+0:214 move second child to first child (temp int)
+0:214 'levels' (temp int)
+0:214 textureQueryLevels (global int)
+0:214 'samp1Ds' (uniform sampler1DShadow)
+0:215 move second child to first child (temp int)
+0:215 'levels' (temp int)
+0:215 textureQueryLevels (global int)
+0:215 'samp2Ds' (uniform sampler2DShadow)
+0:216 move second child to first child (temp int)
+0:216 'levels' (temp int)
+0:216 textureQueryLevels (global int)
+0:216 'sampCubes' (uniform samplerCubeShadow)
+0:217 move second child to first child (temp int)
+0:217 'levels' (temp int)
+0:217 textureQueryLevels (global int)
+0:217 'samp1DAs' (uniform sampler1DArrayShadow)
+0:218 move second child to first child (temp int)
+0:218 'levels' (temp int)
+0:218 textureQueryLevels (global int)
+0:218 'samp2DAs' (uniform sampler2DArrayShadow)
+0:219 move second child to first child (temp int)
+0:219 'levels' (temp int)
+0:219 textureQueryLevels (global int)
+0:219 'sampCubeAs' (uniform samplerCubeArrayShadow)
+0:221 'levels' (temp int)
+0:222 'levels' (temp int)
+0:? Linker Objects
+0:? 'v4' (layout(location=3 ) temp 4-component vector of float)
+0:? 'uv4' (layout(location=4 ) uniform 4-component vector of float)
+0:? 'b1' (layout(location=2 ) in block{in 4-component vector of float v})
+0:? 'b2' (layout(location=2 ) out block{out 4-component vector of float v})
+0:? 'anon@0' (out block{out 17-element array of float ClipDistance gl_ClipDistance, })
+0:? 'cs' (layout(location=10 ) smooth out 2-element array of structure{global 7-element array of 3X2 matrix of float m, global float f})
+0:? 'cf' (layout(location=54 ) smooth out float)
+0:? 'cg' (layout(location=53 ) smooth out float)
+0:? 'alias1' (layout(location=10 ) in 4-component vector of float)
+0:? 'alias2' (layout(location=10 ) in 4-component vector of float)
+0:? 'v6e' (layout(location=0 ) in 4-component vector of float)
+0:? 'ininst2e' (in block{layout(location=25 ) in float f2})
+0:? 'in4e' (in block{layout(location=50 ) in float f1, layout(location=51 ) in float f2})
+0:? 'inst4e' (layout(column_major std140 align=16 ) uniform block{layout(column_major std140 offset=0 align=16 ) uniform int a})
+0:? 'inst9e' (layout(column_major shared align=32 ) uniform block{layout(column_major shared offset=12 align=4 ) uniform float f, layout(column_major shared offset=20 ) uniform float g})
+0:? 'spinste' (layout(column_major std140 ) uniform block{layout(column_major std140 offset=0 ) uniform 4-component vector of float a, layout(column_major std140 offset=32 ) uniform 3-component vector of float b})
+0:? 'aconste' (global 4-element array of int)
+0:? 'bconste' (global 64-element array of int)
+0:? 'bbinst2' (out block{layout(xfb_buffer=0 xfb_offset=64 ) out 4-component vector of float bbv})
+0:? 'bge' (layout(xfb_buffer=2 xfb_offset=48 xfb_stride=80 ) smooth out 4-component vector of float)
+0:? 'bhe' (layout(xfb_buffer=3 xfb_offset=32 xfb_stride=64 ) smooth out 4-component vector of float)
+0:? 'bbinst4e' (layout(xfb_stride=80 ) out block{layout(xfb_buffer=2 xfb_offset=16 ) out 4-component vector of float bbv1, layout(xfb_buffer=2 xfb_offset=32 ) out 4-component vector of float bbv2})
+0:? 'bbinst5e' (out block{layout(xfb_buffer=3 xfb_offset=0 ) out 4-component vector of float bbv1, layout(xfb_buffer=3 xfb_offset=48 xfb_stride=64 ) out 4-component vector of float bbv2})
+0:? 'inst4' (layout(column_major std140 align=16 ) uniform block{layout(column_major std140 offset=0 align=16 ) uniform int a})
+0:? 'inst9' (layout(column_major std430 align=32 ) uniform block{layout(column_major std430 offset=12 align=4 ) uniform float f, layout(column_major std430 offset=20 align=32 ) uniform float g})
+0:? 'spinst' (layout(column_major std140 ) uniform block{layout(column_major std140 offset=0 ) uniform 4-component vector of float a, layout(column_major std140 offset=32 ) uniform 3-component vector of float b})
+0:? 'aconst' (global 4-element array of int)
+0:? 'bconst' (global 64-element array of int)
+0:? 'start2' (const int)
+0:? 5 (const int)
+0:? 'v6' (layout(location=19 ) in 4-component vector of float)
+0:? 'ininst2' (in block{layout(location=28 component=0 ) in bool b1, layout(location=29 component=0 ) in float f1, layout(location=25 ) in float f2})
+0:? 'in4' (in block{layout(location=50 ) in float f1, layout(location=51 ) in float f2})
+0:? 'bbinst2g' (out block{layout(xfb_buffer=3 xfb_offset=64 ) out 4-component vector of float bbv})
+0:? 'bg' (layout(xfb_buffer=1 xfb_offset=48 xfb_stride=80 ) smooth out 4-component vector of float)
+0:? 'bh' (layout(xfb_buffer=1 xfb_offset=32 xfb_stride=80 ) smooth out 4-component vector of float)
+0:? 'bbinst4' (layout(xfb_stride=80 ) out block{layout(xfb_buffer=1 xfb_offset=16 ) out 4-component vector of float bbv1})
+0:? 'bbinst5' (out block{layout(xfb_buffer=1 xfb_offset=0 ) out 4-component vector of float bbv1, layout(xfb_buffer=1 xfb_offset=64 xfb_stride=80 ) out 4-component vector of float bbv2})
+0:? 'sharedv' (shared 4-component vector of float)
+0:? 'v' (buffer 4-component vector of float)
+0:? 's2dms' (uniform sampler2DMS)
+0:? 'us2dmsa' (uniform usampler2DMSArray)
+0:? 'ii2dms' (layout(rgba32i ) uniform iimage2DMS)
+0:? 'i2dmsa' (layout(rgba32f ) uniform image2DMSArray)
+0:? 'samp1D' (uniform sampler1D)
+0:? 'usamp2D' (uniform usampler2D)
+0:? 'isamp3D' (uniform isampler3D)
+0:? 'isampCube' (uniform isamplerCube)
+0:? 'isamp1DA' (uniform isampler1DArray)
+0:? 'samp2DA' (uniform sampler2DArray)
+0:? 'usampCubeA' (uniform usamplerCubeArray)
+0:? 'samp1Ds' (uniform sampler1DShadow)
+0:? 'samp2Ds' (uniform sampler2DShadow)
+0:? 'sampCubes' (uniform samplerCubeShadow)
+0:? 'samp1DAs' (uniform sampler1DArrayShadow)
+0:? 'samp2DAs' (uniform sampler2DArrayShadow)
+0:? 'sampCubeAs' (uniform samplerCubeArrayShadow)
+0:? 'sampBuf' (uniform samplerBuffer)
+0:? 'sampRect' (uniform sampler2DRect)
+0:? 'gl_VertexID' (gl_VertexId int VertexId)
+0:? 'gl_InstanceID' (gl_InstanceId int InstanceId)
+
+
+Linked vertex stage:
+
+ERROR: Linking vertex stage: Missing entry point: Each stage requires one "void main()" entry point
+ERROR: Linking vertex stage: xfb_stride is too small to hold all buffer entries:
+ERROR: xfb_buffer 3, xfb_stride 64, minimum stride needed: 80
+
+Shader version: 430
+Requested GL_ARB_enhanced_layouts
+Requested GL_ARB_shader_texture_image_samples
+in xfb mode
+ERROR: node is still EOpNull!
+0:14 Function Definition: foo( (global void)
+0:14 Function Parameters:
+0:16 Sequence
+0:16 move second child to first child (temp float)
+0:16 direct index (temp float ClipDistance)
+0:16 gl_ClipDistance: direct index for structure (out 17-element array of float ClipDistance)
+0:16 'anon@0' (out block{out 17-element array of float ClipDistance gl_ClipDistance, })
+0:16 Constant:
+0:16 2 (const uint)
+0:16 Constant:
+0:16 2 (const int)
+0:16 Constant:
+0:16 3.700000
+0:31 Function Definition: foo3(vf4;vf3;vf2;vf3; (global void)
+0:31 Function Parameters:
+0:31 'v4' (in 4-component vector of float)
+0:31 'v3' (volatile in 3-component vector of float)
+0:31 'v2' (in 2-component vector of float)
+0:31 'cv3' (in 3-component vector of float)
+0:148 Function Definition: fooBarrier( (global void)
+0:148 Function Parameters:
+0:150 Sequence
+0:150 Constant:
+0:150 0.000000
+0:151 MemoryBarrier (global void)
+0:152 MemoryBarrierAtomicCounter (global void)
+0:153 MemoryBarrierBuffer (global void)
+0:154 Constant:
+0:154 0.000000
+0:155 MemoryBarrierImage (global void)
+0:156 Constant:
+0:156 0.000000
+0:166 Function Definition: fooq( (global void)
+0:166 Function Parameters:
+0:168 Sequence
+0:168 Sequence
+0:168 move second child to first child (temp int)
+0:168 's' (temp int)
+0:168 textureSamples (global int)
+0:168 's2dms' (uniform sampler2DMS)
+0:169 add second child into first child (temp int)
+0:169 's' (temp int)
+0:169 textureSamples (global int)
+0:169 'us2dmsa' (uniform usampler2DMSArray)
+0:170 add second child into first child (temp int)
+0:170 's' (temp int)
+0:170 imageQuerySamples (global int)
+0:170 'ii2dms' (layout(rgba32i ) uniform iimage2DMS)
+0:171 add second child into first child (temp int)
+0:171 's' (temp int)
+0:171 imageQuerySamples (global int)
+0:171 'i2dmsa' (layout(rgba32f ) uniform image2DMSArray)
+0:176 Function Definition: fooq2( (global void)
+0:176 Function Parameters:
+0:178 Sequence
+0:178 Sequence
+0:178 move second child to first child (temp int)
+0:178 's' (temp int)
+0:178 textureSamples (global int)
+0:178 's2dms' (uniform sampler2DMS)
+0:179 add second child into first child (temp int)
+0:179 's' (temp int)
+0:179 textureSamples (global int)
+0:179 'us2dmsa' (uniform usampler2DMSArray)
+0:180 add second child into first child (temp int)
+0:180 's' (temp int)
+0:180 imageQuerySamples (global int)
+0:180 'ii2dms' (layout(rgba32i ) uniform iimage2DMS)
+0:181 add second child into first child (temp int)
+0:181 's' (temp int)
+0:181 imageQuerySamples (global int)
+0:181 'i2dmsa' (layout(rgba32f ) uniform image2DMSArray)
+0:202 Function Definition: qlod( (global void)
+0:202 Function Parameters:
+0:? Sequence
+0:206 move second child to first child (temp int)
+0:206 'levels' (temp int)
+0:206 textureQueryLevels (global int)
+0:206 'samp1D' (uniform sampler1D)
+0:207 move second child to first child (temp int)
+0:207 'levels' (temp int)
+0:207 textureQueryLevels (global int)
+0:207 'usamp2D' (uniform usampler2D)
+0:208 move second child to first child (temp int)
+0:208 'levels' (temp int)
+0:208 textureQueryLevels (global int)
+0:208 'isamp3D' (uniform isampler3D)
+0:209 move second child to first child (temp int)
+0:209 'levels' (temp int)
+0:209 textureQueryLevels (global int)
+0:209 'isampCube' (uniform isamplerCube)
+0:210 move second child to first child (temp int)
+0:210 'levels' (temp int)
+0:210 textureQueryLevels (global int)
+0:210 'isamp1DA' (uniform isampler1DArray)
+0:211 move second child to first child (temp int)
+0:211 'levels' (temp int)
+0:211 textureQueryLevels (global int)
+0:211 'samp2DA' (uniform sampler2DArray)
+0:212 move second child to first child (temp int)
+0:212 'levels' (temp int)
+0:212 textureQueryLevels (global int)
+0:212 'usampCubeA' (uniform usamplerCubeArray)
+0:214 move second child to first child (temp int)
+0:214 'levels' (temp int)
+0:214 textureQueryLevels (global int)
+0:214 'samp1Ds' (uniform sampler1DShadow)
+0:215 move second child to first child (temp int)
+0:215 'levels' (temp int)
+0:215 textureQueryLevels (global int)
+0:215 'samp2Ds' (uniform sampler2DShadow)
+0:216 move second child to first child (temp int)
+0:216 'levels' (temp int)
+0:216 textureQueryLevels (global int)
+0:216 'sampCubes' (uniform samplerCubeShadow)
+0:217 move second child to first child (temp int)
+0:217 'levels' (temp int)
+0:217 textureQueryLevels (global int)
+0:217 'samp1DAs' (uniform sampler1DArrayShadow)
+0:218 move second child to first child (temp int)
+0:218 'levels' (temp int)
+0:218 textureQueryLevels (global int)
+0:218 'samp2DAs' (uniform sampler2DArrayShadow)
+0:219 move second child to first child (temp int)
+0:219 'levels' (temp int)
+0:219 textureQueryLevels (global int)
+0:219 'sampCubeAs' (uniform samplerCubeArrayShadow)
+0:221 'levels' (temp int)
+0:222 'levels' (temp int)
+0:? Linker Objects
+0:? 'v4' (layout(location=3 ) temp 4-component vector of float)
+0:? 'uv4' (layout(location=4 ) uniform 4-component vector of float)
+0:? 'b1' (layout(location=2 ) in block{in 4-component vector of float v})
+0:? 'b2' (layout(location=2 ) out block{out 4-component vector of float v})
+0:? 'anon@0' (out block{out 17-element array of float ClipDistance gl_ClipDistance, })
+0:? 'cs' (layout(location=10 ) smooth out 2-element array of structure{global 7-element array of 3X2 matrix of float m, global float f})
+0:? 'cf' (layout(location=54 ) smooth out float)
+0:? 'cg' (layout(location=53 ) smooth out float)
+0:? 'alias1' (layout(location=10 ) in 4-component vector of float)
+0:? 'alias2' (layout(location=10 ) in 4-component vector of float)
+0:? 'v6e' (layout(location=0 ) in 4-component vector of float)
+0:? 'ininst2e' (in block{layout(location=25 ) in float f2})
+0:? 'in4e' (in block{layout(location=50 ) in float f1, layout(location=51 ) in float f2})
+0:? 'inst4e' (layout(column_major std140 align=16 ) uniform block{layout(column_major std140 offset=0 align=16 ) uniform int a})
+0:? 'inst9e' (layout(column_major shared align=32 ) uniform block{layout(column_major shared offset=12 align=4 ) uniform float f, layout(column_major shared offset=20 ) uniform float g})
+0:? 'spinste' (layout(column_major std140 ) uniform block{layout(column_major std140 offset=0 ) uniform 4-component vector of float a, layout(column_major std140 offset=32 ) uniform 3-component vector of float b})
+0:? 'aconste' (global 4-element array of int)
+0:? 'bconste' (global 64-element array of int)
+0:? 'bbinst2' (out block{layout(xfb_buffer=0 xfb_offset=64 ) out 4-component vector of float bbv})
+0:? 'bge' (layout(xfb_buffer=2 xfb_offset=48 xfb_stride=80 ) smooth out 4-component vector of float)
+0:? 'bhe' (layout(xfb_buffer=3 xfb_offset=32 xfb_stride=64 ) smooth out 4-component vector of float)
+0:? 'bbinst4e' (layout(xfb_stride=80 ) out block{layout(xfb_buffer=2 xfb_offset=16 ) out 4-component vector of float bbv1, layout(xfb_buffer=2 xfb_offset=32 ) out 4-component vector of float bbv2})
+0:? 'bbinst5e' (out block{layout(xfb_buffer=3 xfb_offset=0 ) out 4-component vector of float bbv1, layout(xfb_buffer=3 xfb_offset=48 xfb_stride=64 ) out 4-component vector of float bbv2})
+0:? 'inst4' (layout(column_major std140 align=16 ) uniform block{layout(column_major std140 offset=0 align=16 ) uniform int a})
+0:? 'inst9' (layout(column_major std430 align=32 ) uniform block{layout(column_major std430 offset=12 align=4 ) uniform float f, layout(column_major std430 offset=20 align=32 ) uniform float g})
+0:? 'spinst' (layout(column_major std140 ) uniform block{layout(column_major std140 offset=0 ) uniform 4-component vector of float a, layout(column_major std140 offset=32 ) uniform 3-component vector of float b})
+0:? 'aconst' (global 4-element array of int)
+0:? 'bconst' (global 64-element array of int)
+0:? 'start2' (const int)
+0:? 5 (const int)
+0:? 'v6' (layout(location=19 ) in 4-component vector of float)
+0:? 'ininst2' (in block{layout(location=28 component=0 ) in bool b1, layout(location=29 component=0 ) in float f1, layout(location=25 ) in float f2})
+0:? 'in4' (in block{layout(location=50 ) in float f1, layout(location=51 ) in float f2})
+0:? 'bbinst2g' (out block{layout(xfb_buffer=3 xfb_offset=64 ) out 4-component vector of float bbv})
+0:? 'bg' (layout(xfb_buffer=1 xfb_offset=48 xfb_stride=80 ) smooth out 4-component vector of float)
+0:? 'bh' (layout(xfb_buffer=1 xfb_offset=32 xfb_stride=80 ) smooth out 4-component vector of float)
+0:? 'bbinst4' (layout(xfb_stride=80 ) out block{layout(xfb_buffer=1 xfb_offset=16 ) out 4-component vector of float bbv1})
+0:? 'bbinst5' (out block{layout(xfb_buffer=1 xfb_offset=0 ) out 4-component vector of float bbv1, layout(xfb_buffer=1 xfb_offset=64 xfb_stride=80 ) out 4-component vector of float bbv2})
+0:? 'sharedv' (shared 4-component vector of float)
+0:? 'v' (buffer 4-component vector of float)
+0:? 's2dms' (uniform sampler2DMS)
+0:? 'us2dmsa' (uniform usampler2DMSArray)
+0:? 'ii2dms' (layout(rgba32i ) uniform iimage2DMS)
+0:? 'i2dmsa' (layout(rgba32f ) uniform image2DMSArray)
+0:? 'samp1D' (uniform sampler1D)
+0:? 'usamp2D' (uniform usampler2D)
+0:? 'isamp3D' (uniform isampler3D)
+0:? 'isampCube' (uniform isamplerCube)
+0:? 'isamp1DA' (uniform isampler1DArray)
+0:? 'samp2DA' (uniform sampler2DArray)
+0:? 'usampCubeA' (uniform usamplerCubeArray)
+0:? 'samp1Ds' (uniform sampler1DShadow)
+0:? 'samp2Ds' (uniform sampler2DShadow)
+0:? 'sampCubes' (uniform samplerCubeShadow)
+0:? 'samp1DAs' (uniform sampler1DArrayShadow)
+0:? 'samp2DAs' (uniform sampler2DArrayShadow)
+0:? 'sampCubeAs' (uniform samplerCubeArrayShadow)
+0:? 'sampBuf' (uniform samplerBuffer)
+0:? 'sampRect' (uniform sampler2DRect)
+0:? 'gl_VertexID' (gl_VertexId int VertexId)
+0:? 'gl_InstanceID' (gl_InstanceId int InstanceId)
+
diff --git a/chromium/third_party/glslang/src/Test/baseResults/430AofA.frag.out b/chromium/third_party/glslang/src/Test/baseResults/430AofA.frag.out
new file mode 100644
index 00000000000..68285f7378b
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/430AofA.frag.out
@@ -0,0 +1,803 @@
+430AofA.frag
+Warning, version 430 is not yet complete; most version-specific features are present, but some are missing.
+ERROR: 0:6: '[]' : only outermost dimension of an array of arrays can be implicitly sized
+ERROR: 0:14: 'constructor' : constructing non-array constituent from array argument
+ERROR: 0:15: 'constructior' : array constructor argument not correct type to construct array element
+ERROR: 0:28: '[' : array index out of range '4'
+ERROR: 0:56: 'constructor' : cannot convert parameter 2 from 'const 3-element array of 4-component vector of float' to 'temp 2-element array of 4-component vector of float'
+ERROR: 0:60: 'constructor' : cannot convert parameter 2 from 'const 2-element array of 4-component vector of float' to 'temp 3-element array of 4-component vector of float'
+ERROR: 0:64: '=' : cannot convert from 'const 3-element array of 2-element array of 4-component vector of float' to 'temp 4-element array of 2-element array of 4-component vector of float'
+ERROR: 0:70: 'assign' : cannot convert from 'global 4-element array of 7-element array of float' to 'global 5-element array of 7-element array of float'
+ERROR: 0:71: 'assign' : cannot convert from 'global 4-element array of 7-element array of float' to 'global implicitly-sized array of 7-element array of float'
+ERROR: 0:73: 'foo' : no matching overloaded function found
+ERROR: 0:78: '==' : wrong operand types: no operation '==' exists that takes a left-hand operand of type 'global 4-element array of 7-element array of float' and a right operand of type 'global 5-element array of 7-element array of float' (or there is no acceptable conversion)
+ERROR: 0:84: '[' : array index out of range '5'
+ERROR: 0:91: 'length' : array must be declared with a size before using this method
+ERROR: 0:93: 'length' : array must be declared with a size before using this method
+ERROR: 0:98: 'length' : does not operate on this type: temp float
+ERROR: 0:98: '' : function call, method, or subroutine call expected
+ERROR: 0:98: '' : no matching overloaded function found
+ERROR: 0:101: 'resize2' : redeclaration of array with a different array dimensions or sizes
+ERROR: 0:104: 'resize3' : redeclaration of array with a different array dimensions or sizes
+ERROR: 0:107: 'resize4' : redeclaration of array with a different element type
+ERROR: 20 compilation errors. No code generated.
+
+
+Shader version: 430
+ERROR: node is still EOpNull!
+0:10 Function Definition: foo(f1[5][7]; (global 4-element array of 7-element array of float)
+0:10 Function Parameters:
+0:10 'a' (in 5-element array of 7-element array of float)
+0:? Sequence
+0:13 move second child to first child (temp 7-element array of float)
+0:13 'r' (temp 7-element array of float)
+0:13 direct index (temp 7-element array of float)
+0:13 'a' (in 5-element array of 7-element array of float)
+0:13 Constant:
+0:13 2 (const int)
+0:14 Constant:
+0:14 0.000000
+0:15 Constant:
+0:15 0.000000
+0:16 Branch: Return with expression
+0:16 Construct float (temp 4-element array of 7-element array of float)
+0:16 direct index (temp 7-element array of float)
+0:16 'a' (in 5-element array of 7-element array of float)
+0:16 Constant:
+0:16 0 (const int)
+0:16 direct index (temp 7-element array of float)
+0:16 'a' (in 5-element array of 7-element array of float)
+0:16 Constant:
+0:16 1 (const int)
+0:16 'r' (temp 7-element array of float)
+0:16 direct index (temp 7-element array of float)
+0:16 'a' (in 5-element array of 7-element array of float)
+0:16 Constant:
+0:16 3 (const int)
+0:17 Branch: Return with expression
+0:17 Construct float (temp 4-element array of 7-element array of float)
+0:17 direct index (temp 7-element array of float)
+0:17 'a' (in 5-element array of 7-element array of float)
+0:17 Constant:
+0:17 0 (const int)
+0:17 direct index (temp 7-element array of float)
+0:17 'a' (in 5-element array of 7-element array of float)
+0:17 Constant:
+0:17 1 (const int)
+0:17 'r' (temp 7-element array of float)
+0:17 direct index (temp 7-element array of float)
+0:17 'a' (in 5-element array of 7-element array of float)
+0:17 Constant:
+0:17 3 (const int)
+0:18 Branch: Return with expression
+0:18 Construct float (temp 4-element array of 7-element array of float)
+0:18 direct index (temp 7-element array of float)
+0:18 'a' (in 5-element array of 7-element array of float)
+0:18 Constant:
+0:18 0 (const int)
+0:18 direct index (temp 7-element array of float)
+0:18 'a' (in 5-element array of 7-element array of float)
+0:18 Constant:
+0:18 1 (const int)
+0:18 direct index (temp 7-element array of float)
+0:18 'a' (in 5-element array of 7-element array of float)
+0:18 Constant:
+0:18 2 (const int)
+0:18 direct index (temp 7-element array of float)
+0:18 'a' (in 5-element array of 7-element array of float)
+0:18 Constant:
+0:18 3 (const int)
+0:21 Function Definition: bar(f1[5][7]; (global void)
+0:21 Function Parameters:
+0:21 '' (in 5-element array of 7-element array of float)
+0:23 Function Definition: main( (global void)
+0:23 Function Parameters:
+0:? Sequence
+0:? Sequence
+0:28 move second child to first child (temp float)
+0:28 direct index (temp float)
+0:28 direct index (temp 2-element array of float)
+0:28 direct index (temp 4-element array of 2-element array of float)
+0:28 'gu' (temp 3-element array of 4-element array of 2-element array of float)
+0:28 Constant:
+0:28 2 (const int)
+0:28 Constant:
+0:28 4 (const int)
+0:28 Constant:
+0:28 1 (const int)
+0:28 Constant:
+0:28 4.000000
+0:30 Sequence
+0:30 move second child to first child (temp 3-element array of 2-element array of 4-component vector of float)
+0:30 'ca4' (temp 3-element array of 2-element array of 4-component vector of float)
+0:32 Constant:
+0:32 0.000000
+0:32 0.000000
+0:32 0.000000
+0:32 0.000000
+0:32 1.000000
+0:32 1.000000
+0:32 1.000000
+0:32 1.000000
+0:32 0.000000
+0:32 0.000000
+0:32 0.000000
+0:32 0.000000
+0:32 1.000000
+0:32 1.000000
+0:32 1.000000
+0:32 1.000000
+0:32 0.000000
+0:32 0.000000
+0:32 0.000000
+0:32 0.000000
+0:32 1.000000
+0:32 1.000000
+0:32 1.000000
+0:32 1.000000
+0:33 Sequence
+0:33 move second child to first child (temp 3-element array of 2-element array of 4-component vector of float)
+0:33 'caim' (temp 3-element array of 2-element array of 4-component vector of float)
+0:35 Constant:
+0:35 4.000000
+0:35 4.000000
+0:35 4.000000
+0:35 4.000000
+0:35 2.000000
+0:35 2.000000
+0:35 2.000000
+0:35 2.000000
+0:35 4.000000
+0:35 4.000000
+0:35 4.000000
+0:35 4.000000
+0:35 2.000000
+0:35 2.000000
+0:35 2.000000
+0:35 2.000000
+0:35 4.000000
+0:35 4.000000
+0:35 4.000000
+0:35 4.000000
+0:35 2.000000
+0:35 2.000000
+0:35 2.000000
+0:35 2.000000
+0:36 Sequence
+0:36 move second child to first child (temp 3-element array of 2-element array of 4-component vector of float)
+0:36 'caim2' (temp 3-element array of 2-element array of 4-component vector of float)
+0:38 Constant:
+0:38 4.000000
+0:38 4.000000
+0:38 4.000000
+0:38 4.000000
+0:38 2.000000
+0:38 2.000000
+0:38 2.000000
+0:38 2.000000
+0:38 4.000000
+0:38 4.000000
+0:38 4.000000
+0:38 4.000000
+0:38 2.000000
+0:38 2.000000
+0:38 2.000000
+0:38 2.000000
+0:38 4.000000
+0:38 4.000000
+0:38 4.000000
+0:38 4.000000
+0:38 2.000000
+0:38 2.000000
+0:38 2.000000
+0:38 2.000000
+0:39 Sequence
+0:39 move second child to first child (temp 3-element array of 2-element array of 4-component vector of float)
+0:39 'caim3' (temp 3-element array of 2-element array of 4-component vector of float)
+0:41 Constant:
+0:41 4.000000
+0:41 4.000000
+0:41 4.000000
+0:41 4.000000
+0:41 2.000000
+0:41 2.000000
+0:41 2.000000
+0:41 2.000000
+0:41 4.000000
+0:41 4.000000
+0:41 4.000000
+0:41 4.000000
+0:41 2.000000
+0:41 2.000000
+0:41 2.000000
+0:41 2.000000
+0:41 4.000000
+0:41 4.000000
+0:41 4.000000
+0:41 4.000000
+0:41 2.000000
+0:41 2.000000
+0:41 2.000000
+0:41 2.000000
+0:43 Sequence
+0:43 move second child to first child (temp 3-element array of 2-element array of 4-component vector of float)
+0:43 'a4' (temp 3-element array of 2-element array of 4-component vector of float)
+0:43 Constant:
+0:43 0.000000
+0:43 0.000000
+0:43 0.000000
+0:43 0.000000
+0:43 1.000000
+0:43 1.000000
+0:43 1.000000
+0:43 1.000000
+0:43 0.000000
+0:43 0.000000
+0:43 0.000000
+0:43 0.000000
+0:43 1.000000
+0:43 1.000000
+0:43 1.000000
+0:43 1.000000
+0:43 0.000000
+0:43 0.000000
+0:43 0.000000
+0:43 0.000000
+0:43 1.000000
+0:43 1.000000
+0:43 1.000000
+0:43 1.000000
+0:46 Sequence
+0:46 move second child to first child (temp 3-element array of 2-element array of 4-component vector of float)
+0:46 'aim' (temp 3-element array of 2-element array of 4-component vector of float)
+0:46 Constant:
+0:46 4.000000
+0:46 4.000000
+0:46 4.000000
+0:46 4.000000
+0:46 2.000000
+0:46 2.000000
+0:46 2.000000
+0:46 2.000000
+0:46 4.000000
+0:46 4.000000
+0:46 4.000000
+0:46 4.000000
+0:46 2.000000
+0:46 2.000000
+0:46 2.000000
+0:46 2.000000
+0:46 4.000000
+0:46 4.000000
+0:46 4.000000
+0:46 4.000000
+0:46 2.000000
+0:46 2.000000
+0:46 2.000000
+0:46 2.000000
+0:49 Sequence
+0:49 move second child to first child (temp 3-element array of 2-element array of 4-component vector of float)
+0:49 'aim2' (temp 3-element array of 2-element array of 4-component vector of float)
+0:49 Constant:
+0:49 4.000000
+0:49 4.000000
+0:49 4.000000
+0:49 4.000000
+0:49 2.000000
+0:49 2.000000
+0:49 2.000000
+0:49 2.000000
+0:49 4.000000
+0:49 4.000000
+0:49 4.000000
+0:49 4.000000
+0:49 2.000000
+0:49 2.000000
+0:49 2.000000
+0:49 2.000000
+0:49 4.000000
+0:49 4.000000
+0:49 4.000000
+0:49 4.000000
+0:49 2.000000
+0:49 2.000000
+0:49 2.000000
+0:49 2.000000
+0:52 Sequence
+0:52 move second child to first child (temp 3-element array of 2-element array of 4-component vector of float)
+0:52 'aim3' (temp 3-element array of 2-element array of 4-component vector of float)
+0:52 Constant:
+0:52 4.000000
+0:52 4.000000
+0:52 4.000000
+0:52 4.000000
+0:52 2.000000
+0:52 2.000000
+0:52 2.000000
+0:52 2.000000
+0:52 4.000000
+0:52 4.000000
+0:52 4.000000
+0:52 4.000000
+0:52 2.000000
+0:52 2.000000
+0:52 2.000000
+0:52 2.000000
+0:52 4.000000
+0:52 4.000000
+0:52 4.000000
+0:52 4.000000
+0:52 2.000000
+0:52 2.000000
+0:52 2.000000
+0:52 2.000000
+0:69 move second child to first child (temp 4-element array of 7-element array of float)
+0:69 'g4' (global 4-element array of 7-element array of float)
+0:69 Function Call: foo(f1[5][7]; (global 4-element array of 7-element array of float)
+0:69 'g5' (global 5-element array of 7-element array of float)
+0:70 'g5' (global 5-element array of 7-element array of float)
+0:71 'gu' (global implicitly-sized array of 7-element array of float)
+0:73 Constant:
+0:73 0.000000
+0:74 Function Call: bar(f1[5][7]; (global void)
+0:74 'g5' (global 5-element array of 7-element array of float)
+0:76 Test condition and select (temp void)
+0:76 Condition
+0:76 Compare Equal (temp bool)
+0:76 Function Call: foo(f1[5][7]; (global 4-element array of 7-element array of float)
+0:76 'g5' (global 5-element array of 7-element array of float)
+0:76 'g4' (global 4-element array of 7-element array of float)
+0:76 true case is null
+0:78 Test condition and select (temp void)
+0:78 Condition
+0:78 Constant:
+0:78 false (const bool)
+0:78 true case is null
+0:82 move second child to first child (temp float)
+0:82 direct index (temp float)
+0:82 direct index (temp 7-element array of float)
+0:82 'u' (temp 5-element array of 7-element array of float)
+0:82 Constant:
+0:82 2 (const int)
+0:82 Constant:
+0:82 2 (const int)
+0:82 Constant:
+0:82 3.000000
+0:84 move second child to first child (temp float)
+0:84 direct index (temp float)
+0:84 direct index (temp 7-element array of float)
+0:84 'u' (temp 5-element array of 7-element array of float)
+0:84 Constant:
+0:84 5 (const int)
+0:84 Constant:
+0:84 2 (const int)
+0:84 Constant:
+0:84 5.000000
+0:85 Function Call: foo(f1[5][7]; (global 4-element array of 7-element array of float)
+0:85 'u' (temp 5-element array of 7-element array of float)
+0:88 Function Definition: foo3( (global void)
+0:88 Function Parameters:
+0:? Sequence
+0:91 Constant:
+0:91 1 (const int)
+0:92 move second child to first child (temp float)
+0:92 direct index (temp float)
+0:92 direct index (temp 7-element array of float)
+0:92 direct index (temp 5-element array of 7-element array of float)
+0:92 'resize1' (temp 3-element array of 5-element array of 7-element array of float)
+0:92 Constant:
+0:92 1 (const int)
+0:92 Constant:
+0:92 4 (const int)
+0:92 Constant:
+0:92 5 (const int)
+0:92 Constant:
+0:92 2.000000
+0:93 Constant:
+0:93 1 (const int)
+0:95 Constant:
+0:95 3 (const int)
+0:96 Constant:
+0:96 5 (const int)
+0:97 Constant:
+0:97 7 (const int)
+0:98 Constant:
+0:98 0.000000
+0:? Linker Objects
+0:? 'many' (global 1-element array of 2-element array of 3-element array of 4-element array of 5-element array of 6-element array of float)
+0:? 'gu' (global implicitly-sized array of 7-element array of float)
+0:? 'gimp' (global implicitly-sized array of implicitly-sized array of float)
+0:? 'g4' (global 4-element array of 7-element array of float)
+0:? 'g5' (global 5-element array of 7-element array of float)
+
+
+Linked fragment stage:
+
+
+Shader version: 430
+ERROR: node is still EOpNull!
+0:10 Function Definition: foo(f1[5][7]; (global 4-element array of 7-element array of float)
+0:10 Function Parameters:
+0:10 'a' (in 5-element array of 7-element array of float)
+0:? Sequence
+0:13 move second child to first child (temp 7-element array of float)
+0:13 'r' (temp 7-element array of float)
+0:13 direct index (temp 7-element array of float)
+0:13 'a' (in 5-element array of 7-element array of float)
+0:13 Constant:
+0:13 2 (const int)
+0:14 Constant:
+0:14 0.000000
+0:15 Constant:
+0:15 0.000000
+0:16 Branch: Return with expression
+0:16 Construct float (temp 4-element array of 7-element array of float)
+0:16 direct index (temp 7-element array of float)
+0:16 'a' (in 5-element array of 7-element array of float)
+0:16 Constant:
+0:16 0 (const int)
+0:16 direct index (temp 7-element array of float)
+0:16 'a' (in 5-element array of 7-element array of float)
+0:16 Constant:
+0:16 1 (const int)
+0:16 'r' (temp 7-element array of float)
+0:16 direct index (temp 7-element array of float)
+0:16 'a' (in 5-element array of 7-element array of float)
+0:16 Constant:
+0:16 3 (const int)
+0:17 Branch: Return with expression
+0:17 Construct float (temp 4-element array of 7-element array of float)
+0:17 direct index (temp 7-element array of float)
+0:17 'a' (in 5-element array of 7-element array of float)
+0:17 Constant:
+0:17 0 (const int)
+0:17 direct index (temp 7-element array of float)
+0:17 'a' (in 5-element array of 7-element array of float)
+0:17 Constant:
+0:17 1 (const int)
+0:17 'r' (temp 7-element array of float)
+0:17 direct index (temp 7-element array of float)
+0:17 'a' (in 5-element array of 7-element array of float)
+0:17 Constant:
+0:17 3 (const int)
+0:18 Branch: Return with expression
+0:18 Construct float (temp 4-element array of 7-element array of float)
+0:18 direct index (temp 7-element array of float)
+0:18 'a' (in 5-element array of 7-element array of float)
+0:18 Constant:
+0:18 0 (const int)
+0:18 direct index (temp 7-element array of float)
+0:18 'a' (in 5-element array of 7-element array of float)
+0:18 Constant:
+0:18 1 (const int)
+0:18 direct index (temp 7-element array of float)
+0:18 'a' (in 5-element array of 7-element array of float)
+0:18 Constant:
+0:18 2 (const int)
+0:18 direct index (temp 7-element array of float)
+0:18 'a' (in 5-element array of 7-element array of float)
+0:18 Constant:
+0:18 3 (const int)
+0:21 Function Definition: bar(f1[5][7]; (global void)
+0:21 Function Parameters:
+0:21 '' (in 5-element array of 7-element array of float)
+0:23 Function Definition: main( (global void)
+0:23 Function Parameters:
+0:? Sequence
+0:? Sequence
+0:28 move second child to first child (temp float)
+0:28 direct index (temp float)
+0:28 direct index (temp 2-element array of float)
+0:28 direct index (temp 4-element array of 2-element array of float)
+0:28 'gu' (temp 3-element array of 4-element array of 2-element array of float)
+0:28 Constant:
+0:28 2 (const int)
+0:28 Constant:
+0:28 4 (const int)
+0:28 Constant:
+0:28 1 (const int)
+0:28 Constant:
+0:28 4.000000
+0:30 Sequence
+0:30 move second child to first child (temp 3-element array of 2-element array of 4-component vector of float)
+0:30 'ca4' (temp 3-element array of 2-element array of 4-component vector of float)
+0:32 Constant:
+0:32 0.000000
+0:32 0.000000
+0:32 0.000000
+0:32 0.000000
+0:32 1.000000
+0:32 1.000000
+0:32 1.000000
+0:32 1.000000
+0:32 0.000000
+0:32 0.000000
+0:32 0.000000
+0:32 0.000000
+0:32 1.000000
+0:32 1.000000
+0:32 1.000000
+0:32 1.000000
+0:32 0.000000
+0:32 0.000000
+0:32 0.000000
+0:32 0.000000
+0:32 1.000000
+0:32 1.000000
+0:32 1.000000
+0:32 1.000000
+0:33 Sequence
+0:33 move second child to first child (temp 3-element array of 2-element array of 4-component vector of float)
+0:33 'caim' (temp 3-element array of 2-element array of 4-component vector of float)
+0:35 Constant:
+0:35 4.000000
+0:35 4.000000
+0:35 4.000000
+0:35 4.000000
+0:35 2.000000
+0:35 2.000000
+0:35 2.000000
+0:35 2.000000
+0:35 4.000000
+0:35 4.000000
+0:35 4.000000
+0:35 4.000000
+0:35 2.000000
+0:35 2.000000
+0:35 2.000000
+0:35 2.000000
+0:35 4.000000
+0:35 4.000000
+0:35 4.000000
+0:35 4.000000
+0:35 2.000000
+0:35 2.000000
+0:35 2.000000
+0:35 2.000000
+0:36 Sequence
+0:36 move second child to first child (temp 3-element array of 2-element array of 4-component vector of float)
+0:36 'caim2' (temp 3-element array of 2-element array of 4-component vector of float)
+0:38 Constant:
+0:38 4.000000
+0:38 4.000000
+0:38 4.000000
+0:38 4.000000
+0:38 2.000000
+0:38 2.000000
+0:38 2.000000
+0:38 2.000000
+0:38 4.000000
+0:38 4.000000
+0:38 4.000000
+0:38 4.000000
+0:38 2.000000
+0:38 2.000000
+0:38 2.000000
+0:38 2.000000
+0:38 4.000000
+0:38 4.000000
+0:38 4.000000
+0:38 4.000000
+0:38 2.000000
+0:38 2.000000
+0:38 2.000000
+0:38 2.000000
+0:39 Sequence
+0:39 move second child to first child (temp 3-element array of 2-element array of 4-component vector of float)
+0:39 'caim3' (temp 3-element array of 2-element array of 4-component vector of float)
+0:41 Constant:
+0:41 4.000000
+0:41 4.000000
+0:41 4.000000
+0:41 4.000000
+0:41 2.000000
+0:41 2.000000
+0:41 2.000000
+0:41 2.000000
+0:41 4.000000
+0:41 4.000000
+0:41 4.000000
+0:41 4.000000
+0:41 2.000000
+0:41 2.000000
+0:41 2.000000
+0:41 2.000000
+0:41 4.000000
+0:41 4.000000
+0:41 4.000000
+0:41 4.000000
+0:41 2.000000
+0:41 2.000000
+0:41 2.000000
+0:41 2.000000
+0:43 Sequence
+0:43 move second child to first child (temp 3-element array of 2-element array of 4-component vector of float)
+0:43 'a4' (temp 3-element array of 2-element array of 4-component vector of float)
+0:43 Constant:
+0:43 0.000000
+0:43 0.000000
+0:43 0.000000
+0:43 0.000000
+0:43 1.000000
+0:43 1.000000
+0:43 1.000000
+0:43 1.000000
+0:43 0.000000
+0:43 0.000000
+0:43 0.000000
+0:43 0.000000
+0:43 1.000000
+0:43 1.000000
+0:43 1.000000
+0:43 1.000000
+0:43 0.000000
+0:43 0.000000
+0:43 0.000000
+0:43 0.000000
+0:43 1.000000
+0:43 1.000000
+0:43 1.000000
+0:43 1.000000
+0:46 Sequence
+0:46 move second child to first child (temp 3-element array of 2-element array of 4-component vector of float)
+0:46 'aim' (temp 3-element array of 2-element array of 4-component vector of float)
+0:46 Constant:
+0:46 4.000000
+0:46 4.000000
+0:46 4.000000
+0:46 4.000000
+0:46 2.000000
+0:46 2.000000
+0:46 2.000000
+0:46 2.000000
+0:46 4.000000
+0:46 4.000000
+0:46 4.000000
+0:46 4.000000
+0:46 2.000000
+0:46 2.000000
+0:46 2.000000
+0:46 2.000000
+0:46 4.000000
+0:46 4.000000
+0:46 4.000000
+0:46 4.000000
+0:46 2.000000
+0:46 2.000000
+0:46 2.000000
+0:46 2.000000
+0:49 Sequence
+0:49 move second child to first child (temp 3-element array of 2-element array of 4-component vector of float)
+0:49 'aim2' (temp 3-element array of 2-element array of 4-component vector of float)
+0:49 Constant:
+0:49 4.000000
+0:49 4.000000
+0:49 4.000000
+0:49 4.000000
+0:49 2.000000
+0:49 2.000000
+0:49 2.000000
+0:49 2.000000
+0:49 4.000000
+0:49 4.000000
+0:49 4.000000
+0:49 4.000000
+0:49 2.000000
+0:49 2.000000
+0:49 2.000000
+0:49 2.000000
+0:49 4.000000
+0:49 4.000000
+0:49 4.000000
+0:49 4.000000
+0:49 2.000000
+0:49 2.000000
+0:49 2.000000
+0:49 2.000000
+0:52 Sequence
+0:52 move second child to first child (temp 3-element array of 2-element array of 4-component vector of float)
+0:52 'aim3' (temp 3-element array of 2-element array of 4-component vector of float)
+0:52 Constant:
+0:52 4.000000
+0:52 4.000000
+0:52 4.000000
+0:52 4.000000
+0:52 2.000000
+0:52 2.000000
+0:52 2.000000
+0:52 2.000000
+0:52 4.000000
+0:52 4.000000
+0:52 4.000000
+0:52 4.000000
+0:52 2.000000
+0:52 2.000000
+0:52 2.000000
+0:52 2.000000
+0:52 4.000000
+0:52 4.000000
+0:52 4.000000
+0:52 4.000000
+0:52 2.000000
+0:52 2.000000
+0:52 2.000000
+0:52 2.000000
+0:69 move second child to first child (temp 4-element array of 7-element array of float)
+0:69 'g4' (global 4-element array of 7-element array of float)
+0:69 Function Call: foo(f1[5][7]; (global 4-element array of 7-element array of float)
+0:69 'g5' (global 5-element array of 7-element array of float)
+0:70 'g5' (global 5-element array of 7-element array of float)
+0:71 'gu' (global 1-element array of 7-element array of float)
+0:73 Constant:
+0:73 0.000000
+0:74 Function Call: bar(f1[5][7]; (global void)
+0:74 'g5' (global 5-element array of 7-element array of float)
+0:76 Test condition and select (temp void)
+0:76 Condition
+0:76 Compare Equal (temp bool)
+0:76 Function Call: foo(f1[5][7]; (global 4-element array of 7-element array of float)
+0:76 'g5' (global 5-element array of 7-element array of float)
+0:76 'g4' (global 4-element array of 7-element array of float)
+0:76 true case is null
+0:78 Test condition and select (temp void)
+0:78 Condition
+0:78 Constant:
+0:78 false (const bool)
+0:78 true case is null
+0:82 move second child to first child (temp float)
+0:82 direct index (temp float)
+0:82 direct index (temp 7-element array of float)
+0:82 'u' (temp 5-element array of 7-element array of float)
+0:82 Constant:
+0:82 2 (const int)
+0:82 Constant:
+0:82 2 (const int)
+0:82 Constant:
+0:82 3.000000
+0:84 move second child to first child (temp float)
+0:84 direct index (temp float)
+0:84 direct index (temp 7-element array of float)
+0:84 'u' (temp 5-element array of 7-element array of float)
+0:84 Constant:
+0:84 5 (const int)
+0:84 Constant:
+0:84 2 (const int)
+0:84 Constant:
+0:84 5.000000
+0:85 Function Call: foo(f1[5][7]; (global 4-element array of 7-element array of float)
+0:85 'u' (temp 5-element array of 7-element array of float)
+0:88 Function Definition: foo3( (global void)
+0:88 Function Parameters:
+0:? Sequence
+0:91 Constant:
+0:91 1 (const int)
+0:92 move second child to first child (temp float)
+0:92 direct index (temp float)
+0:92 direct index (temp 7-element array of float)
+0:92 direct index (temp 5-element array of 7-element array of float)
+0:92 'resize1' (temp 3-element array of 5-element array of 7-element array of float)
+0:92 Constant:
+0:92 1 (const int)
+0:92 Constant:
+0:92 4 (const int)
+0:92 Constant:
+0:92 5 (const int)
+0:92 Constant:
+0:92 2.000000
+0:93 Constant:
+0:93 1 (const int)
+0:95 Constant:
+0:95 3 (const int)
+0:96 Constant:
+0:96 5 (const int)
+0:97 Constant:
+0:97 7 (const int)
+0:98 Constant:
+0:98 0.000000
+0:? Linker Objects
+0:? 'many' (global 1-element array of 2-element array of 3-element array of 4-element array of 5-element array of 6-element array of float)
+0:? 'gu' (global 1-element array of 7-element array of float)
+0:? 'gimp' (global 1-element array of implicitly-sized array of float)
+0:? 'g4' (global 4-element array of 7-element array of float)
+0:? 'g5' (global 5-element array of 7-element array of float)
+
diff --git a/chromium/third_party/glslang/src/Test/baseResults/430scope.vert.out b/chromium/third_party/glslang/src/Test/baseResults/430scope.vert.out
new file mode 100644
index 00000000000..74601392af0
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/430scope.vert.out
@@ -0,0 +1,243 @@
+430scope.vert
+Warning, version 430 is not yet complete; most version-specific features are present, but some are missing.
+ERROR: 0:5: 'a' : redefinition
+ERROR: 0:17: 'b' : function name is redeclaration of existing name
+ERROR: 0:20: 'c' : redefinition
+ERROR: 0:22: 'f' : redefinition
+ERROR: 0:43: 'sin' : can't use function syntax on variable
+ERROR: 0:57: 'z' : undeclared identifier
+ERROR: 0:57: 'z' : redefinition
+ERROR: 0:73: 'degrees' : can't use function syntax on variable
+ERROR: 8 compilation errors. No code generated.
+
+
+Shader version: 430
+ERROR: node is still EOpNull!
+0:3 Function Definition: f(i1;i1;i1; (global int)
+0:3 Function Parameters:
+0:3 'a' (in int)
+0:3 'b' (in int)
+0:3 'c' (in int)
+0:? Sequence
+0:8 Sequence
+0:8 Sequence
+0:8 move second child to first child (temp float)
+0:8 'a' (temp float)
+0:8 add (temp float)
+0:8 Convert int to float (temp float)
+0:8 'a' (in int)
+0:8 Constant:
+0:8 1.000000
+0:11 Branch: Return with expression
+0:11 'a' (in int)
+0:25 Function Definition: cos(f1; (global float)
+0:25 Function Parameters:
+0:25 'x' (in float)
+0:27 Sequence
+0:27 Branch: Return with expression
+0:27 Constant:
+0:27 1.000000
+0:29 Function Definition: radians(b1; (global bool)
+0:29 Function Parameters:
+0:29 'x' (in bool)
+0:31 Sequence
+0:31 Branch: Return with expression
+0:31 Constant:
+0:31 true (const bool)
+0:36 Function Definition: main( (global void)
+0:36 Function Parameters:
+0:? Sequence
+0:39 Function Call: g( (temp int)
+0:42 'sin' (temp float)
+0:43 Constant:
+0:43 0.000000
+0:44 Function Call: f(i1;i1;i1; (global int)
+0:44 Constant:
+0:44 1 (const int)
+0:44 Constant:
+0:44 2 (const int)
+0:44 Constant:
+0:44 3 (const int)
+0:47 move second child to first child (temp float)
+0:47 'f' (temp float)
+0:47 Constant:
+0:47 3.000000
+0:49 move second child to first child (temp 4-component vector of float)
+0:49 gl_Position: direct index for structure (invariant gl_Position 4-component vector of float Position)
+0:49 'anon@0' (out block{invariant gl_Position 4-component vector of float Position gl_Position, gl_PointSize float PointSize gl_PointSize, out implicitly-sized array of float ClipDistance gl_ClipDistance, gl_ClipVertex 4-component vector of float ClipVertex gl_ClipVertex, out 4-component vector of float FrontColor gl_FrontColor, out 4-component vector of float BackColor gl_BackColor, out 4-component vector of float FrontSecondaryColor gl_FrontSecondaryColor, out 4-component vector of float BackSecondaryColor gl_BackSecondaryColor, out implicitly-sized array of 4-component vector of float TexCoord gl_TexCoord, out float FogFragCoord gl_FogFragCoord})
+0:49 Constant:
+0:49 0 (const uint)
+0:49 Construct vec4 (temp 4-component vector of float)
+0:49 'f' (temp float)
+0:51 Sequence
+0:51 Sequence
+0:51 move second child to first child (temp int)
+0:51 'f' (temp int)
+0:51 Constant:
+0:51 0 (const int)
+0:51 Loop with condition tested first
+0:51 Loop Condition
+0:51 Compare Less Than (temp bool)
+0:51 'f' (temp int)
+0:51 Constant:
+0:51 10 (const int)
+0:51 Loop Body
+0:52 Pre-Increment (temp int)
+0:52 'f' (temp int)
+0:51 Loop Terminal Expression
+0:51 Pre-Increment (temp int)
+0:51 'f' (temp int)
+0:54 Sequence
+0:54 move second child to first child (temp int)
+0:54 'x' (temp int)
+0:54 Constant:
+0:54 1 (const int)
+0:56 Sequence
+0:56 Sequence
+0:56 move second child to first child (temp float)
+0:56 'x' (temp float)
+0:56 Constant:
+0:56 2.000000
+0:56 move second child to first child (temp float)
+0:56 'y' (temp float)
+0:56 'x' (temp float)
+0:60 Sequence
+0:60 Sequence
+0:60 move second child to first child (temp int)
+0:60 'x' (temp int)
+0:60 'x' (temp int)
+0:68 Sequence
+0:68 Sequence
+0:68 move second child to first child (temp structure{temp int x})
+0:68 'S' (temp structure{temp int x})
+0:68 Constant:
+0:68 0 (const int)
+0:69 x: direct index for structure (temp int)
+0:69 'S' (temp structure{temp int x})
+0:69 Constant:
+0:69 0 (const int)
+0:73 Constant:
+0:73 0.000000
+0:? Linker Objects
+0:? 'b' (global bool)
+0:? 'tan' (global float)
+0:? 'gl_VertexID' (gl_VertexId int VertexId)
+0:? 'gl_InstanceID' (gl_InstanceId int InstanceId)
+
+
+Linked vertex stage:
+
+
+Shader version: 430
+ERROR: node is still EOpNull!
+0:3 Function Definition: f(i1;i1;i1; (global int)
+0:3 Function Parameters:
+0:3 'a' (in int)
+0:3 'b' (in int)
+0:3 'c' (in int)
+0:? Sequence
+0:8 Sequence
+0:8 Sequence
+0:8 move second child to first child (temp float)
+0:8 'a' (temp float)
+0:8 add (temp float)
+0:8 Convert int to float (temp float)
+0:8 'a' (in int)
+0:8 Constant:
+0:8 1.000000
+0:11 Branch: Return with expression
+0:11 'a' (in int)
+0:25 Function Definition: cos(f1; (global float)
+0:25 Function Parameters:
+0:25 'x' (in float)
+0:27 Sequence
+0:27 Branch: Return with expression
+0:27 Constant:
+0:27 1.000000
+0:29 Function Definition: radians(b1; (global bool)
+0:29 Function Parameters:
+0:29 'x' (in bool)
+0:31 Sequence
+0:31 Branch: Return with expression
+0:31 Constant:
+0:31 true (const bool)
+0:36 Function Definition: main( (global void)
+0:36 Function Parameters:
+0:? Sequence
+0:39 Function Call: g( (temp int)
+0:42 'sin' (temp float)
+0:43 Constant:
+0:43 0.000000
+0:44 Function Call: f(i1;i1;i1; (global int)
+0:44 Constant:
+0:44 1 (const int)
+0:44 Constant:
+0:44 2 (const int)
+0:44 Constant:
+0:44 3 (const int)
+0:47 move second child to first child (temp float)
+0:47 'f' (temp float)
+0:47 Constant:
+0:47 3.000000
+0:49 move second child to first child (temp 4-component vector of float)
+0:49 gl_Position: direct index for structure (invariant gl_Position 4-component vector of float Position)
+0:49 'anon@0' (out block{invariant gl_Position 4-component vector of float Position gl_Position, gl_PointSize float PointSize gl_PointSize, out 1-element array of float ClipDistance gl_ClipDistance, gl_ClipVertex 4-component vector of float ClipVertex gl_ClipVertex, out 4-component vector of float FrontColor gl_FrontColor, out 4-component vector of float BackColor gl_BackColor, out 4-component vector of float FrontSecondaryColor gl_FrontSecondaryColor, out 4-component vector of float BackSecondaryColor gl_BackSecondaryColor, out 1-element array of 4-component vector of float TexCoord gl_TexCoord, out float FogFragCoord gl_FogFragCoord})
+0:49 Constant:
+0:49 0 (const uint)
+0:49 Construct vec4 (temp 4-component vector of float)
+0:49 'f' (temp float)
+0:51 Sequence
+0:51 Sequence
+0:51 move second child to first child (temp int)
+0:51 'f' (temp int)
+0:51 Constant:
+0:51 0 (const int)
+0:51 Loop with condition tested first
+0:51 Loop Condition
+0:51 Compare Less Than (temp bool)
+0:51 'f' (temp int)
+0:51 Constant:
+0:51 10 (const int)
+0:51 Loop Body
+0:52 Pre-Increment (temp int)
+0:52 'f' (temp int)
+0:51 Loop Terminal Expression
+0:51 Pre-Increment (temp int)
+0:51 'f' (temp int)
+0:54 Sequence
+0:54 move second child to first child (temp int)
+0:54 'x' (temp int)
+0:54 Constant:
+0:54 1 (const int)
+0:56 Sequence
+0:56 Sequence
+0:56 move second child to first child (temp float)
+0:56 'x' (temp float)
+0:56 Constant:
+0:56 2.000000
+0:56 move second child to first child (temp float)
+0:56 'y' (temp float)
+0:56 'x' (temp float)
+0:60 Sequence
+0:60 Sequence
+0:60 move second child to first child (temp int)
+0:60 'x' (temp int)
+0:60 'x' (temp int)
+0:68 Sequence
+0:68 Sequence
+0:68 move second child to first child (temp structure{temp int x})
+0:68 'S' (temp structure{temp int x})
+0:68 Constant:
+0:68 0 (const int)
+0:69 x: direct index for structure (temp int)
+0:69 'S' (temp structure{temp int x})
+0:69 Constant:
+0:69 0 (const int)
+0:73 Constant:
+0:73 0.000000
+0:? Linker Objects
+0:? 'b' (global bool)
+0:? 'tan' (global float)
+0:? 'gl_VertexID' (gl_VertexId int VertexId)
+0:? 'gl_InstanceID' (gl_InstanceId int InstanceId)
+
diff --git a/chromium/third_party/glslang/src/Test/baseResults/440.frag.out b/chromium/third_party/glslang/src/Test/baseResults/440.frag.out
new file mode 100644
index 00000000000..cafd85a5757
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/440.frag.out
@@ -0,0 +1,194 @@
+440.frag
+Warning, version 440 is not yet complete; most version-specific features are present, but some are missing.
+ERROR: 0:11: 'location' : overlapping use of location 4
+ERROR: 0:13: 'component' : type overflows the available 4 components
+ERROR: 0:22: 'location' : fragment outputs sharing the same location must be the same basic type 30
+ERROR: 0:24: 'qualifier' : cannot use auxiliary, memory, interpolation, or precision qualifier in a default qualifier declaration (declaration with no type)
+ERROR: 0:25: 'qualifier' : cannot use auxiliary, memory, interpolation, or precision qualifier in a default qualifier declaration (declaration with no type)
+ERROR: 0:26: 'qualifier' : cannot use auxiliary, memory, interpolation, or precision qualifier in a default qualifier declaration (declaration with no type)
+ERROR: 0:29: 'layout qualifier' : cannot use offset or align qualifiers in a default qualifier declaration (declaration with no type)
+ERROR: 0:30: 'layout qualifier' : cannot use offset or align qualifiers in a default qualifier declaration (declaration with no type)
+ERROR: 0:30: 'layout' : offset/align can only be used on a uniform or buffer
+ERROR: 0:31: 'layout qualifier' : cannot use offset or align qualifiers in a default qualifier declaration (declaration with no type)
+ERROR: 0:31: 'layout' : offset/align can only be used on a uniform or buffer
+ERROR: 0:33: 'layout qualifier' : cannot use offset or align qualifiers in a default qualifier declaration (declaration with no type)
+ERROR: 0:34: 'layout qualifier' : cannot use offset or align qualifiers in a default qualifier declaration (declaration with no type)
+ERROR: 0:34: 'layout' : offset/align can only be used on a uniform or buffer
+ERROR: 0:35: 'layout qualifier' : cannot use offset or align qualifiers in a default qualifier declaration (declaration with no type)
+ERROR: 0:35: 'layout' : offset/align can only be used on a uniform or buffer
+ERROR: 0:37: 'offset' : only applies to block members, not blocks
+ERROR: 0:38: 'layout' : offset/align can only be used on a uniform or buffer
+ERROR: 0:38: 'offset' : only applies to block members, not blocks
+ERROR: 0:39: 'output block' : not supported in this stage: fragment
+ERROR: 0:39: 'layout' : offset/align can only be used on a uniform or buffer
+ERROR: 0:39: 'offset' : only applies to block members, not blocks
+ERROR: 0:42: 'offset/align' : can only be used with std140 or std430 layout packing
+ERROR: 0:43: 'offset/align' : can only be used with std140 or std430 layout packing
+ERROR: 0:43: 'layout' : offset/align can only be used on a uniform or buffer
+ERROR: 0:44: 'output block' : not supported in this stage: fragment
+ERROR: 0:44: 'offset/align' : can only be used with std140 or std430 layout packing
+ERROR: 0:44: 'layout' : offset/align can only be used on a uniform or buffer
+ERROR: 0:46: 'offset' : cannot specify on a variable declaration
+ERROR: 0:47: 'layout' : offset/align can only be used on a uniform or buffer
+ERROR: 0:48: 'layout' : offset/align can only be used on a uniform or buffer
+ERROR: 0:50: 'align' : cannot specify on a variable declaration
+ERROR: 0:51: 'layout' : offset/align can only be used on a uniform or buffer
+ERROR: 0:52: 'layout' : offset/align can only be used on a uniform or buffer
+ERROR: 0:54: 'layout' : matrix or packing qualifiers can only be used on a uniform or buffer
+ERROR: 0:55: 'layout' : cannot specify packing on a variable declaration
+ERROR: 0:57: 'align' : must be a power of 2
+ERROR: 0:58: 'align' : can only be used with std140 or std430 layout packing
+ERROR: 0:63: 'align' : can only be used with std140 or std430 layout packing
+ERROR: 0:62: 'layout' : offset/align can only be used on a uniform or buffer
+ERROR: 0:63: 'layout' : offset/align can only be used on a uniform or buffer
+ERROR: 0:84: 'align' : must be a power of 2
+ERROR: 0:83: 'offset' : cannot lie in previous members
+ERROR: 0:85: 'offset' : must be a multiple of the member's alignment
+ERROR: 0:103: 'align' : must be a power of 2
+ERROR: 0:105: 'align' : must be a power of 2
+ERROR: 0:102: 'offset' : cannot lie in previous members
+ERROR: 0:104: 'offset' : must be a multiple of the member's alignment
+ERROR: 48 compilation errors. No code generated.
+
+
+Shader version: 440
+ERROR: node is still EOpNull!
+0:144 Function Definition: interp( (global void)
+0:144 Function Parameters:
+0:146 Sequence
+0:146 interpolateAtCentroid (global 2-component vector of float)
+0:146 vector swizzle (temp 2-component vector of float)
+0:146 direct index (smooth sample temp 3-component vector of float)
+0:146 'sampInArray' (smooth sample in 4-element array of 3-component vector of float)
+0:146 Constant:
+0:146 2 (const int)
+0:146 Sequence
+0:146 Constant:
+0:146 0 (const int)
+0:146 Constant:
+0:146 1 (const int)
+0:147 interpolateAtSample (global float)
+0:147 direct index (temp float)
+0:147 direct index (smooth sample temp 3-component vector of float)
+0:147 'sampInArray' (smooth sample in 4-element array of 3-component vector of float)
+0:147 Constant:
+0:147 2 (const int)
+0:147 Constant:
+0:147 0 (const int)
+0:147 Constant:
+0:147 2 (const int)
+0:150 Function Definition: layer( (global int)
+0:150 Function Parameters:
+0:152 Sequence
+0:152 Branch: Return with expression
+0:152 'gl_Layer' (flat in int Layer)
+0:? Linker Objects
+0:? 'a' (layout(location=4 component=2 ) smooth in 2-component vector of float)
+0:? 'b' (layout(location=4 component=1 ) smooth in float)
+0:? 'h' (layout(location=4 component=2 ) smooth in 2-component vector of float)
+0:? 'c' (layout(location=3 component=2 ) smooth in 3-component vector of float)
+0:? 'e' (layout(location=20 component=0 ) smooth in 6-element array of 3-component vector of float)
+0:? 'f' (layout(location=20 component=3 ) smooth in 6-element array of float)
+0:? 'be' (layout(location=30 component=3 ) out int)
+0:? 'bf' (layout(location=30 component=0 ) out 3-component vector of float)
+0:? 'inst1' (layout(column_major shared offset=12 ) uniform block{layout(column_major shared ) uniform int a})
+0:? 'inst2' (layout(offset=12 ) in block{in int a})
+0:? 'inst3' (layout(offset=12 ) out block{out int a})
+0:? 'inst4' (layout(column_major std140 align=16 ) uniform block{layout(column_major std140 offset=0 align=16 ) uniform int a})
+0:? 'inst8' (layout(column_major shared align=16 ) uniform block{layout(column_major shared ) uniform int a})
+0:? 'inst5' (layout(align=16 ) in block{in int a})
+0:? 'inst6' (layout(align=16 ) out block{out int a})
+0:? 'v1' (layout(offset=12 ) uniform 4-component vector of float)
+0:? 'v2' (layout(offset=12 ) smooth in 4-component vector of float)
+0:? 'v3' (layout(offset=12 ) out 4-component vector of float)
+0:? 'v4' (layout(align=16 ) uniform 4-component vector of float)
+0:? 'v5' (layout(align=16 ) smooth in 4-component vector of float)
+0:? 'v6' (layout(align=16 ) out 4-component vector of float)
+0:? 'v7' (layout(std140 ) uniform 4-component vector of float)
+0:? 'inst7' (layout(column_major shared ) uniform block{layout(column_major shared offset=12 align=4 ) uniform float f})
+0:? 'inst10' (in block{layout(offset=12 ) in float f, layout(align=4 ) in float g})
+0:? 'inst9' (layout(column_major std430 align=32 ) uniform block{layout(column_major std430 align=32 ) uniform float e, layout(column_major std430 offset=12 align=4 ) uniform float f, layout(column_major std430 offset=20 align=32 ) uniform float g, layout(column_major std430 align=32 ) uniform float h})
+0:? 'inst11' (layout(column_major std430 ) uniform block{layout(column_major std430 offset=12 align=4 ) uniform float f, layout(column_major std430 ) uniform float g})
+0:? 'specExampleErrors' (layout(column_major std140 ) uniform block{layout(column_major std140 offset=0 ) uniform 4-component vector of float a, layout(column_major std140 offset=32 ) uniform 3-component vector of float b, layout(column_major std140 offset=48 ) uniform 2-component vector of float c, layout(column_major std140 offset=56 ) uniform double g, layout(column_major std140 offset=72 ) uniform double h})
+0:? 'specExample' (layout(column_major std140 ) uniform block{layout(column_major std140 offset=0 ) uniform 4-component vector of float a, layout(column_major std140 offset=32 ) uniform 3-component vector of float b, layout(column_major std140 offset=48 ) uniform 2-component vector of float d, layout(column_major std140 offset=64 align=16 ) uniform float e, layout(column_major std140 offset=72 align=2 ) uniform double f, layout(column_major std140 offset=80 ) uniform float h, layout(column_major std140 offset=128 align=64 ) uniform 3-component vector of double i, layout(column_major std140 offset=168 align=8 ) uniform float j})
+0:? 'specExampleErrors430' (layout(column_major std430 ) buffer block{layout(column_major std430 offset=0 ) buffer 4-component vector of float a, layout(column_major std430 offset=32 ) buffer 3-component vector of float b, layout(column_major std430 offset=48 ) buffer 2-component vector of float c, layout(column_major std430 offset=56 ) buffer double g, layout(column_major std430 offset=72 ) buffer double h, layout(column_major std430 offset=80 ) buffer double i})
+0:? 'specExample430' (layout(column_major std430 ) buffer block{layout(column_major std430 offset=0 ) buffer 4-component vector of float a, layout(column_major std430 offset=32 ) buffer 3-component vector of float b, layout(column_major std430 offset=48 ) buffer 2-component vector of float d, layout(column_major std430 offset=64 align=16 ) buffer float e, layout(column_major std430 offset=72 align=2 ) buffer double f, layout(column_major std430 offset=80 ) buffer float h, layout(column_major std430 offset=128 align=64 ) buffer 3-component vector of double i, layout(column_major std430 offset=168 align=8 ) buffer float j})
+0:? 'specExample4300' (layout(column_major std430 align=128 ) buffer block{layout(column_major std430 offset=0 align=128 ) buffer 4-component vector of float a, layout(column_major std430 offset=128 align=128 ) buffer 3-component vector of float b, layout(column_major std430 offset=256 align=128 ) buffer 2-component vector of float d, layout(column_major std430 offset=384 align=128 ) buffer float e, layout(column_major std430 offset=512 align=128 ) buffer double f, layout(column_major std430 offset=640 align=128 ) buffer float h, layout(column_major std430 offset=768 align=128 ) buffer 3-component vector of double i})
+0:? 'specExample4301' (layout(column_major std430 align=128 ) buffer block{layout(column_major std430 offset=0 align=128 ) buffer 4-component vector of float a, layout(column_major std430 offset=128 align=128 ) buffer 3-component vector of float b, layout(column_major std430 offset=256 align=128 ) buffer 2-component vector of float d, layout(column_major std430 offset=512 align=128 ) buffer float e, layout(column_major std430 offset=520 align=8 ) buffer double f, layout(column_major std430 offset=640 align=128 ) buffer float h, layout(column_major std430 offset=768 align=128 ) buffer 3-component vector of double i})
+0:? 'aconst' (global 4-element array of int)
+0:? 'bconst' (global 64-element array of int)
+0:? 'sampInArray' (smooth sample in 4-element array of 3-component vector of float)
+
+
+Linked fragment stage:
+
+ERROR: Linking fragment stage: Missing entry point: Each stage requires one "void main()" entry point
+
+Shader version: 440
+ERROR: node is still EOpNull!
+0:144 Function Definition: interp( (global void)
+0:144 Function Parameters:
+0:146 Sequence
+0:146 interpolateAtCentroid (global 2-component vector of float)
+0:146 vector swizzle (temp 2-component vector of float)
+0:146 direct index (smooth sample temp 3-component vector of float)
+0:146 'sampInArray' (smooth sample in 4-element array of 3-component vector of float)
+0:146 Constant:
+0:146 2 (const int)
+0:146 Sequence
+0:146 Constant:
+0:146 0 (const int)
+0:146 Constant:
+0:146 1 (const int)
+0:147 interpolateAtSample (global float)
+0:147 direct index (temp float)
+0:147 direct index (smooth sample temp 3-component vector of float)
+0:147 'sampInArray' (smooth sample in 4-element array of 3-component vector of float)
+0:147 Constant:
+0:147 2 (const int)
+0:147 Constant:
+0:147 0 (const int)
+0:147 Constant:
+0:147 2 (const int)
+0:150 Function Definition: layer( (global int)
+0:150 Function Parameters:
+0:152 Sequence
+0:152 Branch: Return with expression
+0:152 'gl_Layer' (flat in int Layer)
+0:? Linker Objects
+0:? 'a' (layout(location=4 component=2 ) smooth in 2-component vector of float)
+0:? 'b' (layout(location=4 component=1 ) smooth in float)
+0:? 'h' (layout(location=4 component=2 ) smooth in 2-component vector of float)
+0:? 'c' (layout(location=3 component=2 ) smooth in 3-component vector of float)
+0:? 'e' (layout(location=20 component=0 ) smooth in 6-element array of 3-component vector of float)
+0:? 'f' (layout(location=20 component=3 ) smooth in 6-element array of float)
+0:? 'be' (layout(location=30 component=3 ) out int)
+0:? 'bf' (layout(location=30 component=0 ) out 3-component vector of float)
+0:? 'inst1' (layout(column_major shared offset=12 ) uniform block{layout(column_major shared ) uniform int a})
+0:? 'inst2' (layout(offset=12 ) in block{in int a})
+0:? 'inst3' (layout(offset=12 ) out block{out int a})
+0:? 'inst4' (layout(column_major std140 align=16 ) uniform block{layout(column_major std140 offset=0 align=16 ) uniform int a})
+0:? 'inst8' (layout(column_major shared align=16 ) uniform block{layout(column_major shared ) uniform int a})
+0:? 'inst5' (layout(align=16 ) in block{in int a})
+0:? 'inst6' (layout(align=16 ) out block{out int a})
+0:? 'v1' (layout(offset=12 ) uniform 4-component vector of float)
+0:? 'v2' (layout(offset=12 ) smooth in 4-component vector of float)
+0:? 'v3' (layout(offset=12 ) out 4-component vector of float)
+0:? 'v4' (layout(align=16 ) uniform 4-component vector of float)
+0:? 'v5' (layout(align=16 ) smooth in 4-component vector of float)
+0:? 'v6' (layout(align=16 ) out 4-component vector of float)
+0:? 'v7' (layout(std140 ) uniform 4-component vector of float)
+0:? 'inst7' (layout(column_major shared ) uniform block{layout(column_major shared offset=12 align=4 ) uniform float f})
+0:? 'inst10' (in block{layout(offset=12 ) in float f, layout(align=4 ) in float g})
+0:? 'inst9' (layout(column_major std430 align=32 ) uniform block{layout(column_major std430 align=32 ) uniform float e, layout(column_major std430 offset=12 align=4 ) uniform float f, layout(column_major std430 offset=20 align=32 ) uniform float g, layout(column_major std430 align=32 ) uniform float h})
+0:? 'inst11' (layout(column_major std430 ) uniform block{layout(column_major std430 offset=12 align=4 ) uniform float f, layout(column_major std430 ) uniform float g})
+0:? 'specExampleErrors' (layout(column_major std140 ) uniform block{layout(column_major std140 offset=0 ) uniform 4-component vector of float a, layout(column_major std140 offset=32 ) uniform 3-component vector of float b, layout(column_major std140 offset=48 ) uniform 2-component vector of float c, layout(column_major std140 offset=56 ) uniform double g, layout(column_major std140 offset=72 ) uniform double h})
+0:? 'specExample' (layout(column_major std140 ) uniform block{layout(column_major std140 offset=0 ) uniform 4-component vector of float a, layout(column_major std140 offset=32 ) uniform 3-component vector of float b, layout(column_major std140 offset=48 ) uniform 2-component vector of float d, layout(column_major std140 offset=64 align=16 ) uniform float e, layout(column_major std140 offset=72 align=2 ) uniform double f, layout(column_major std140 offset=80 ) uniform float h, layout(column_major std140 offset=128 align=64 ) uniform 3-component vector of double i, layout(column_major std140 offset=168 align=8 ) uniform float j})
+0:? 'specExampleErrors430' (layout(column_major std430 ) buffer block{layout(column_major std430 offset=0 ) buffer 4-component vector of float a, layout(column_major std430 offset=32 ) buffer 3-component vector of float b, layout(column_major std430 offset=48 ) buffer 2-component vector of float c, layout(column_major std430 offset=56 ) buffer double g, layout(column_major std430 offset=72 ) buffer double h, layout(column_major std430 offset=80 ) buffer double i})
+0:? 'specExample430' (layout(column_major std430 ) buffer block{layout(column_major std430 offset=0 ) buffer 4-component vector of float a, layout(column_major std430 offset=32 ) buffer 3-component vector of float b, layout(column_major std430 offset=48 ) buffer 2-component vector of float d, layout(column_major std430 offset=64 align=16 ) buffer float e, layout(column_major std430 offset=72 align=2 ) buffer double f, layout(column_major std430 offset=80 ) buffer float h, layout(column_major std430 offset=128 align=64 ) buffer 3-component vector of double i, layout(column_major std430 offset=168 align=8 ) buffer float j})
+0:? 'specExample4300' (layout(column_major std430 align=128 ) buffer block{layout(column_major std430 offset=0 align=128 ) buffer 4-component vector of float a, layout(column_major std430 offset=128 align=128 ) buffer 3-component vector of float b, layout(column_major std430 offset=256 align=128 ) buffer 2-component vector of float d, layout(column_major std430 offset=384 align=128 ) buffer float e, layout(column_major std430 offset=512 align=128 ) buffer double f, layout(column_major std430 offset=640 align=128 ) buffer float h, layout(column_major std430 offset=768 align=128 ) buffer 3-component vector of double i})
+0:? 'specExample4301' (layout(column_major std430 align=128 ) buffer block{layout(column_major std430 offset=0 align=128 ) buffer 4-component vector of float a, layout(column_major std430 offset=128 align=128 ) buffer 3-component vector of float b, layout(column_major std430 offset=256 align=128 ) buffer 2-component vector of float d, layout(column_major std430 offset=512 align=128 ) buffer float e, layout(column_major std430 offset=520 align=8 ) buffer double f, layout(column_major std430 offset=640 align=128 ) buffer float h, layout(column_major std430 offset=768 align=128 ) buffer 3-component vector of double i})
+0:? 'aconst' (global 4-element array of int)
+0:? 'bconst' (global 64-element array of int)
+0:? 'sampInArray' (smooth sample in 4-element array of 3-component vector of float)
+
diff --git a/chromium/third_party/glslang/src/Test/baseResults/440.vert.out b/chromium/third_party/glslang/src/Test/baseResults/440.vert.out
new file mode 100644
index 00000000000..9ad3c1bdde0
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/440.vert.out
@@ -0,0 +1,241 @@
+440.vert
+Warning, version 440 is not yet complete; most version-specific features are present, but some are missing.
+ERROR: 0:8: 'component' : type overflows the available 4 components
+ERROR: 0:15: 'component' : component is too large
+ERROR: 0:23: 'location' : overlapping use of location 4
+ERROR: 0:26: 'location' : overlapping use of location 2
+ERROR: 0:31: 'location' : overlapping use of location 15
+ERROR: 0:32: 'location' : overlapping use of location 10
+ERROR: 0:37: 'location' : overlapping use of location 20
+ERROR: 0:39: 'component' : type overflows the available 4 components
+ERROR: 0:40: 'component' : type overflows the available 4 components
+ERROR: 0:42: 'component' : cannot apply to a matrix, structure, or block
+ERROR: 0:43: 'component' : cannot apply to a matrix, structure, or block
+ERROR: 0:44: 'component' : cannot apply to a matrix, structure, or block
+ERROR: 0:46: 'component' : must specify 'location' to use 'component'
+ERROR: 0:52: 'location' : overlapping use of location 40
+ERROR: 0:54: 'component' : type overflows the available 4 components
+ERROR: 0:55: 'component' : type overflows the available 4 components
+ERROR: 0:57: 'component' : cannot apply to a matrix, structure, or block
+ERROR: 0:58: 'component' : cannot apply to a matrix, structure, or block
+ERROR: 0:61: 'location/component/index' : cannot declare a default, use a full declaration
+ERROR: 0:81: 'xfb layout qualifier' : can only be used on an output
+ERROR: 0:87: 'xfb_offset' : cannot declare a default, use a full declaration
+ERROR: 0:97: 'xfb_buffer' : member cannot contradict block (or what block inherited from global)
+ERROR: 0:102: 'xfb_buffer' : member cannot contradict block (or what block inherited from global)
+ERROR: 0:102: 'xfb_offset' : overlapping offsets at offset 32 in buffer 3
+ERROR: 0:103: 'xfb_offset' : overlapping offsets at offset 0 in buffer 2
+ERROR: 0:105: 'xfb_offset' : overlapping offsets at offset 24 in buffer 2
+ERROR: 0:108: 'xfb_stride' : all stride settings must match for xfb buffer 15
+ERROR: 0:112: 'xfb_offset' : overlapping offsets at offset 4 in buffer 1
+ERROR: 0:114: 'xfb_stride' : all stride settings must match for xfb buffer 3
+ERROR: 0:115: 'xfb_stride' : all stride settings must match for xfb buffer 3
+ERROR: 0:119: 'xfb_stride' : all stride settings must match for xfb buffer 3
+ERROR: 0:117: 'xfb_stride' : all stride settings must match for xfb buffer 3
+ERROR: 0:138: 'xfb_offset' : overlapping offsets at offset 64 in buffer 0
+ERROR: 0:143: 'xfb_buffer' : buffer is too large: gl_MaxTransformFeedbackBuffers is 4
+ERROR: 0:144: 'xfb_offset' : must be a multiple of size of first component
+ERROR: 0:145: 'xfb_offset' : type contains double; xfb_offset must be a multiple of 8
+ERROR: 0:147: 'xfb_offset' : must be a multiple of size of first component
+ERROR: 0:148: 'xfb_offset' : type contains double; xfb_offset must be a multiple of 8
+ERROR: 0:152: 'xfb_buffer' : buffer is too large: gl_MaxTransformFeedbackBuffers is 4
+ERROR: 0:155: 'xfb_buffer' : buffer is too large: gl_MaxTransformFeedbackBuffers is 4
+ERROR: 0:155: 'xfb_stride' : 1/4 stride is too large: gl_MaxTransformFeedbackInterleavedComponents is 64
+ERROR: 0:157: 'xfb_buffer' : buffer is too large: gl_MaxTransformFeedbackBuffers is 4
+ERROR: 0:165: 'gl_BaseVertexARB' : required extension not requested: GL_ARB_shader_draw_parameters
+ERROR: 0:165: 'gl_BaseInstanceARB' : required extension not requested: GL_ARB_shader_draw_parameters
+ERROR: 0:165: 'gl_DrawIDARB' : required extension not requested: GL_ARB_shader_draw_parameters
+ERROR: 0:173: 'assign' : l-value required "gl_BaseVertexARB" (can't modify shader input)
+ERROR: 0:174: 'assign' : l-value required "gl_BaseInstanceARB" (can't modify shader input)
+ERROR: 0:175: 'assign' : l-value required "gl_DrawIDARB" (can't modify shader input)
+ERROR: 0:176: 'glBaseInstanceARB' : undeclared identifier
+ERROR: 49 compilation errors. No code generated.
+
+
+Shader version: 440
+Requested GL_ARB_shader_draw_parameters
+in xfb mode
+ERROR: node is still EOpNull!
+0:163 Function Definition: drawParamsBad( (global int)
+0:163 Function Parameters:
+0:165 Sequence
+0:165 Branch: Return with expression
+0:165 add (temp int)
+0:165 add (temp int)
+0:165 'gl_BaseVertexARB' (in int BaseVertex)
+0:165 'gl_BaseInstanceARB' (in int BaseInstance)
+0:165 'gl_DrawIDARB' (in int DrawId)
+0:170 Function Definition: drawParams( (global int)
+0:170 Function Parameters:
+0:172 Sequence
+0:172 Branch: Return with expression
+0:172 add (temp int)
+0:172 add (temp int)
+0:172 'gl_BaseVertexARB' (in int BaseVertex)
+0:172 'gl_BaseInstanceARB' (in int BaseInstance)
+0:172 'gl_DrawIDARB' (in int DrawId)
+0:173 move second child to first child (temp int)
+0:173 'gl_BaseVertexARB' (in int BaseVertex)
+0:173 Constant:
+0:173 3 (const int)
+0:174 move second child to first child (temp int)
+0:174 'gl_BaseInstanceARB' (in int BaseInstance)
+0:174 Constant:
+0:174 3 (const int)
+0:175 move second child to first child (temp int)
+0:175 'gl_DrawIDARB' (in int DrawId)
+0:175 Constant:
+0:175 3 (const int)
+0:176 'glBaseInstanceARB' (temp float)
+0:? Linker Objects
+0:? 'a' (layout(location=2 component=2 ) in 2-component vector of float)
+0:? 'b' (layout(location=2 component=1 ) in float)
+0:? 'c' (layout(location=3 component=2 ) in 3-component vector of float)
+0:? 'd' (layout(location=0 component=3 ) in 4-element array of float)
+0:? 'e' (layout(location=4 component=0 ) in 5-element array of 3-component vector of float)
+0:? 'f' (layout(location=4 component=3 ) in 5-element array of float)
+0:? 'g' (layout(location=9 ) in 6-element array of float)
+0:? 'h' (layout(location=4 component=2 ) in 2-component vector of float)
+0:? 'i' (layout(location=3 component=2 ) smooth out 2-component vector of float)
+0:? 'j' (layout(location=3 component=0 ) smooth out 2-component vector of float)
+0:? 'k' (layout(location=4 component=2 ) smooth out 2-component vector of float)
+0:? 'm' (layout(location=4 component=2 ) smooth out 2-component vector of float)
+0:? 'n' (layout(location=2 component=2 ) smooth out 2-component vector of float)
+0:? 'p' (layout(location=2 component=0 ) smooth out 3-component vector of float)
+0:? 'q' (layout(location=10 component=3 ) smooth out 6-element array of float)
+0:? 'r' (layout(location=10 component=0 ) smooth out 6-element array of 3-component vector of float)
+0:? 's' (layout(location=15 component=3 ) smooth out float)
+0:? 't' (layout(location=10 component=1 ) smooth out float)
+0:? 'u' (layout(location=20 component=2 ) smooth out float)
+0:? 'v' (layout(location=20 component=0 ) smooth out float)
+0:? 'w' (layout(location=20 component=3 ) smooth out float)
+0:? 'x' (layout(location=20 component=1 ) smooth out 2-component vector of float)
+0:? 'y' (layout(location=30 component=3 ) smooth out 2-component vector of float)
+0:? 'z' (layout(location=31 component=1 ) smooth out 4-component vector of float)
+0:? 'ba' (layout(location=32 component=1 ) smooth out 4X4 matrix of float)
+0:? 'Ss' (layout(location=33 component=1 ) smooth out structure{global int a})
+0:? 'bb' (layout(location=34 component=1 ) out block{out int a})
+0:? 'bc' (layout(location=4095 component=1 ) smooth out float)
+0:? 'bd' (out block{layout(location=40 component=2 ) out float u, layout(location=40 component=0 ) out float v, layout(location=40 component=3 ) out float w, layout(location=40 component=1 ) out 2-component vector of float x, layout(location=41 component=3 ) out 2-component vector of float y, layout(location=42 component=1 ) out 4-component vector of float z, layout(location=42 component=1 ) out 4X4 matrix of float ba, layout(location=43 component=1 ) out structure{global int a} Ss})
+0:? 'be' (layout(location=50 component=3 ) smooth out int)
+0:? 'bf' (layout(location=50 component=0 ) smooth out 3-component vector of float)
+0:? 'bbinst1' (out block{out 4-component vector of float bbv})
+0:? 'bbinst2' (out block{layout(xfb_buffer=0 xfb_offset=64 ) out 4-component vector of float bbv})
+0:? 'bbinst3' (out block{layout(xfb_buffer=3 xfb_offset=16 ) out 4-component vector of float bbv})
+0:? 'ubbinst3' (layout(column_major shared ) uniform block{layout(column_major shared xfb_offset=16 ) uniform 4-component vector of float bbv})
+0:? 'bg' (layout(xfb_buffer=2 xfb_offset=48 xfb_stride=80 ) smooth out 4-component vector of float)
+0:? 'bh' (layout(xfb_buffer=3 xfb_offset=32 xfb_stride=64 ) smooth out 4-component vector of float)
+0:? 'bbinst4' (layout(xfb_stride=80 ) out block{layout(xfb_buffer=2 xfb_offset=16 ) out 4-component vector of float bbv1, layout(xfb_buffer=2 xfb_offset=32 ) out 4-component vector of float bbv2})
+0:? 'bbinst5' (out block{layout(xfb_buffer=3 xfb_offset=0 ) out 4-component vector of float bbv1, layout(xfb_buffer=3 xfb_offset=48 xfb_stride=64 ) out 4-component vector of float bbv2, out 4-component vector of float bbv3})
+0:? 'bbinst6' (out block{layout(xfb_buffer=2 xfb_offset=0 ) out 4-component vector of float bbv1, layout(xfb_buffer=3 xfb_offset=32 xfb_stride=64 ) out 4-component vector of float bbv2, layout(xfb_buffer=2 xfb_offset=0 ) out 4-component vector of float bbv3, out 4-component vector of float bbv5, layout(xfb_buffer=2 xfb_offset=24 ) out float bbf6})
+0:? 'bj' (layout(xfb_buffer=1 xfb_offset=4 ) smooth out float)
+0:? 'bk' (layout(xfb_buffer=1 xfb_offset=0 ) smooth out 2-component vector of int)
+0:? 'bl' (layout(xfb_stride=48 ) smooth out float)
+0:? 'bbinst7' (layout(xfb_stride=48 ) out block{layout(xfb_stride=64 ) out 4-component vector of float bbv1, layout(xfb_stride=32 ) out 4-component vector of float bbv2})
+0:? 'bbinst8' (layout(xfb_stride=92 ) out block{layout(xfb_buffer=0 xfb_offset=0 ) out bool b, layout(xfb_buffer=0 xfb_offset=8 ) out structure{global bool b, global structure{global int i, global double d, global float f} s, global 2-component vector of float v2} t, layout(xfb_buffer=0 xfb_offset=48 ) out int i, layout(xfb_buffer=0 xfb_offset=52 ) out 3X3 matrix of float m3, layout(xfb_buffer=0 xfb_offset=88 ) out float f, layout(xfb_buffer=0 xfb_offset=92 ) out float g})
+0:? 'bbinst9' (out block{layout(xfb_buffer=4 xfb_offset=1 ) out bool b, layout(xfb_buffer=4 xfb_offset=12 ) out structure{global bool b, global structure{global int i, global double d, global float f} s, global 2-component vector of float v2} t, layout(xfb_buffer=4 xfb_offset=52 ) out 3X3 matrix of float m3, layout(xfb_buffer=4 xfb_offset=90 ) out int i, layout(xfb_buffer=4 xfb_offset=98 ) out double d, layout(xfb_buffer=4 xfb_offset=108 ) out structure{global int a} s})
+0:? 'bm' (layout(xfb_buffer=5 xfb_offset=0 ) smooth out float)
+0:? 'bbinst10' (out block{layout(xfb_buffer=7 xfb_offset=0 ) out 4X4 matrix of double m1, layout(xfb_buffer=7 xfb_offset=128 ) out 4X4 matrix of double m2, layout(xfb_buffer=7 xfb_offset=256 ) out float f})
+0:? 'gl_VertexID' (gl_VertexId int VertexId)
+0:? 'gl_InstanceID' (gl_InstanceId int InstanceId)
+
+
+Linked vertex stage:
+
+ERROR: Linking vertex stage: Missing entry point: Each stage requires one "void main()" entry point
+ERROR: Linking vertex stage: xfb_stride is too small to hold all buffer entries:
+ERROR: xfb_buffer 0, xfb_stride 92, minimum stride needed: 96
+ERROR: Linking vertex stage: xfb_stride must be multiple of 8 for buffer holding a double:
+ERROR: xfb_buffer 0, xfb_stride 92
+ERROR: Linking vertex stage: xfb_stride must be multiple of 4:
+ERROR: xfb_buffer 5, xfb_stride 6
+ERROR: Linking vertex stage: xfb_stride is too large:
+ERROR: xfb_buffer 7, components (1/4 stride) needed are 66, gl_MaxTransformFeedbackInterleavedComponents is 64
+
+Shader version: 440
+Requested GL_ARB_shader_draw_parameters
+in xfb mode
+ERROR: node is still EOpNull!
+0:163 Function Definition: drawParamsBad( (global int)
+0:163 Function Parameters:
+0:165 Sequence
+0:165 Branch: Return with expression
+0:165 add (temp int)
+0:165 add (temp int)
+0:165 'gl_BaseVertexARB' (in int BaseVertex)
+0:165 'gl_BaseInstanceARB' (in int BaseInstance)
+0:165 'gl_DrawIDARB' (in int DrawId)
+0:170 Function Definition: drawParams( (global int)
+0:170 Function Parameters:
+0:172 Sequence
+0:172 Branch: Return with expression
+0:172 add (temp int)
+0:172 add (temp int)
+0:172 'gl_BaseVertexARB' (in int BaseVertex)
+0:172 'gl_BaseInstanceARB' (in int BaseInstance)
+0:172 'gl_DrawIDARB' (in int DrawId)
+0:173 move second child to first child (temp int)
+0:173 'gl_BaseVertexARB' (in int BaseVertex)
+0:173 Constant:
+0:173 3 (const int)
+0:174 move second child to first child (temp int)
+0:174 'gl_BaseInstanceARB' (in int BaseInstance)
+0:174 Constant:
+0:174 3 (const int)
+0:175 move second child to first child (temp int)
+0:175 'gl_DrawIDARB' (in int DrawId)
+0:175 Constant:
+0:175 3 (const int)
+0:176 'glBaseInstanceARB' (temp float)
+0:? Linker Objects
+0:? 'a' (layout(location=2 component=2 ) in 2-component vector of float)
+0:? 'b' (layout(location=2 component=1 ) in float)
+0:? 'c' (layout(location=3 component=2 ) in 3-component vector of float)
+0:? 'd' (layout(location=0 component=3 ) in 4-element array of float)
+0:? 'e' (layout(location=4 component=0 ) in 5-element array of 3-component vector of float)
+0:? 'f' (layout(location=4 component=3 ) in 5-element array of float)
+0:? 'g' (layout(location=9 ) in 6-element array of float)
+0:? 'h' (layout(location=4 component=2 ) in 2-component vector of float)
+0:? 'i' (layout(location=3 component=2 ) smooth out 2-component vector of float)
+0:? 'j' (layout(location=3 component=0 ) smooth out 2-component vector of float)
+0:? 'k' (layout(location=4 component=2 ) smooth out 2-component vector of float)
+0:? 'm' (layout(location=4 component=2 ) smooth out 2-component vector of float)
+0:? 'n' (layout(location=2 component=2 ) smooth out 2-component vector of float)
+0:? 'p' (layout(location=2 component=0 ) smooth out 3-component vector of float)
+0:? 'q' (layout(location=10 component=3 ) smooth out 6-element array of float)
+0:? 'r' (layout(location=10 component=0 ) smooth out 6-element array of 3-component vector of float)
+0:? 's' (layout(location=15 component=3 ) smooth out float)
+0:? 't' (layout(location=10 component=1 ) smooth out float)
+0:? 'u' (layout(location=20 component=2 ) smooth out float)
+0:? 'v' (layout(location=20 component=0 ) smooth out float)
+0:? 'w' (layout(location=20 component=3 ) smooth out float)
+0:? 'x' (layout(location=20 component=1 ) smooth out 2-component vector of float)
+0:? 'y' (layout(location=30 component=3 ) smooth out 2-component vector of float)
+0:? 'z' (layout(location=31 component=1 ) smooth out 4-component vector of float)
+0:? 'ba' (layout(location=32 component=1 ) smooth out 4X4 matrix of float)
+0:? 'Ss' (layout(location=33 component=1 ) smooth out structure{global int a})
+0:? 'bb' (layout(location=34 component=1 ) out block{out int a})
+0:? 'bc' (layout(location=4095 component=1 ) smooth out float)
+0:? 'bd' (out block{layout(location=40 component=2 ) out float u, layout(location=40 component=0 ) out float v, layout(location=40 component=3 ) out float w, layout(location=40 component=1 ) out 2-component vector of float x, layout(location=41 component=3 ) out 2-component vector of float y, layout(location=42 component=1 ) out 4-component vector of float z, layout(location=42 component=1 ) out 4X4 matrix of float ba, layout(location=43 component=1 ) out structure{global int a} Ss})
+0:? 'be' (layout(location=50 component=3 ) smooth out int)
+0:? 'bf' (layout(location=50 component=0 ) smooth out 3-component vector of float)
+0:? 'bbinst1' (out block{out 4-component vector of float bbv})
+0:? 'bbinst2' (out block{layout(xfb_buffer=0 xfb_offset=64 ) out 4-component vector of float bbv})
+0:? 'bbinst3' (out block{layout(xfb_buffer=3 xfb_offset=16 ) out 4-component vector of float bbv})
+0:? 'ubbinst3' (layout(column_major shared ) uniform block{layout(column_major shared xfb_offset=16 ) uniform 4-component vector of float bbv})
+0:? 'bg' (layout(xfb_buffer=2 xfb_offset=48 xfb_stride=80 ) smooth out 4-component vector of float)
+0:? 'bh' (layout(xfb_buffer=3 xfb_offset=32 xfb_stride=64 ) smooth out 4-component vector of float)
+0:? 'bbinst4' (layout(xfb_stride=80 ) out block{layout(xfb_buffer=2 xfb_offset=16 ) out 4-component vector of float bbv1, layout(xfb_buffer=2 xfb_offset=32 ) out 4-component vector of float bbv2})
+0:? 'bbinst5' (out block{layout(xfb_buffer=3 xfb_offset=0 ) out 4-component vector of float bbv1, layout(xfb_buffer=3 xfb_offset=48 xfb_stride=64 ) out 4-component vector of float bbv2, out 4-component vector of float bbv3})
+0:? 'bbinst6' (out block{layout(xfb_buffer=2 xfb_offset=0 ) out 4-component vector of float bbv1, layout(xfb_buffer=3 xfb_offset=32 xfb_stride=64 ) out 4-component vector of float bbv2, layout(xfb_buffer=2 xfb_offset=0 ) out 4-component vector of float bbv3, out 4-component vector of float bbv5, layout(xfb_buffer=2 xfb_offset=24 ) out float bbf6})
+0:? 'bj' (layout(xfb_buffer=1 xfb_offset=4 ) smooth out float)
+0:? 'bk' (layout(xfb_buffer=1 xfb_offset=0 ) smooth out 2-component vector of int)
+0:? 'bl' (layout(xfb_stride=48 ) smooth out float)
+0:? 'bbinst7' (layout(xfb_stride=48 ) out block{layout(xfb_stride=64 ) out 4-component vector of float bbv1, layout(xfb_stride=32 ) out 4-component vector of float bbv2})
+0:? 'bbinst8' (layout(xfb_stride=92 ) out block{layout(xfb_buffer=0 xfb_offset=0 ) out bool b, layout(xfb_buffer=0 xfb_offset=8 ) out structure{global bool b, global structure{global int i, global double d, global float f} s, global 2-component vector of float v2} t, layout(xfb_buffer=0 xfb_offset=48 ) out int i, layout(xfb_buffer=0 xfb_offset=52 ) out 3X3 matrix of float m3, layout(xfb_buffer=0 xfb_offset=88 ) out float f, layout(xfb_buffer=0 xfb_offset=92 ) out float g})
+0:? 'bbinst9' (out block{layout(xfb_buffer=4 xfb_offset=1 ) out bool b, layout(xfb_buffer=4 xfb_offset=12 ) out structure{global bool b, global structure{global int i, global double d, global float f} s, global 2-component vector of float v2} t, layout(xfb_buffer=4 xfb_offset=52 ) out 3X3 matrix of float m3, layout(xfb_buffer=4 xfb_offset=90 ) out int i, layout(xfb_buffer=4 xfb_offset=98 ) out double d, layout(xfb_buffer=4 xfb_offset=108 ) out structure{global int a} s})
+0:? 'bm' (layout(xfb_buffer=5 xfb_offset=0 ) smooth out float)
+0:? 'bbinst10' (out block{layout(xfb_buffer=7 xfb_offset=0 ) out 4X4 matrix of double m1, layout(xfb_buffer=7 xfb_offset=128 ) out 4X4 matrix of double m2, layout(xfb_buffer=7 xfb_offset=256 ) out float f})
+0:? 'gl_VertexID' (gl_VertexId int VertexId)
+0:? 'gl_InstanceID' (gl_InstanceId int InstanceId)
+
diff --git a/chromium/third_party/glslang/src/Test/baseResults/450.comp.out b/chromium/third_party/glslang/src/Test/baseResults/450.comp.out
new file mode 100644
index 00000000000..d5d1ecabdd8
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/450.comp.out
@@ -0,0 +1,18 @@
+450.comp
+Warning, version 450 is not yet complete; most version-specific features are present, but some are missing.
+
+Shader version: 450
+local_size = (1, 1, 1)
+0:? Sequence
+0:? Linker Objects
+
+
+Linked compute stage:
+
+ERROR: Linking compute stage: Missing entry point: Each stage requires one "void main()" entry point
+
+Shader version: 450
+local_size = (1, 1, 1)
+0:? Sequence
+0:? Linker Objects
+
diff --git a/chromium/third_party/glslang/src/Test/baseResults/450.frag.out b/chromium/third_party/glslang/src/Test/baseResults/450.frag.out
new file mode 100644
index 00000000000..23682e8a17a
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/450.frag.out
@@ -0,0 +1,327 @@
+450.frag
+Warning, version 450 is not yet complete; most version-specific features are present, but some are missing.
+
+Shader version: 450
+0:? Sequence
+0:8 Function Definition: main( (global void)
+0:8 Function Parameters:
+0:10 Sequence
+0:10 Sequence
+0:10 move second child to first child (temp 2-component vector of float)
+0:10 'v2' (temp 2-component vector of float)
+0:10 dPdxFine (global 2-component vector of float)
+0:10 'in2' (smooth in 2-component vector of float)
+0:11 Sequence
+0:11 move second child to first child (temp 3-component vector of float)
+0:11 'v3' (temp 3-component vector of float)
+0:11 dPdyCoarse (global 3-component vector of float)
+0:11 'in3' (smooth in 3-component vector of float)
+0:12 Sequence
+0:12 move second child to first child (temp 4-component vector of float)
+0:12 'v4' (temp 4-component vector of float)
+0:12 fwidth (global 4-component vector of float)
+0:12 'in4' (smooth in 4-component vector of float)
+0:13 move second child to first child (temp 4-component vector of float)
+0:13 'v4' (temp 4-component vector of float)
+0:13 dPdyFine (global 4-component vector of float)
+0:13 'in4' (smooth in 4-component vector of float)
+0:14 move second child to first child (temp 3-component vector of float)
+0:14 'v3' (temp 3-component vector of float)
+0:14 dPdyFine (global 3-component vector of float)
+0:14 'in3' (smooth in 3-component vector of float)
+0:15 Sequence
+0:15 move second child to first child (temp float)
+0:15 'f' (temp float)
+0:15 add (temp float)
+0:15 add (temp float)
+0:15 dPdx (global float)
+0:15 'in1' (smooth in float)
+0:15 dPdxFine (global float)
+0:15 'in1' (smooth in float)
+0:15 dPdxCoarse (global float)
+0:15 'in1' (smooth in float)
+0:16 move second child to first child (temp 4-component vector of float)
+0:16 'v4' (temp 4-component vector of float)
+0:16 add (temp 4-component vector of float)
+0:16 fwidthCoarse (global 4-component vector of float)
+0:16 'in4' (smooth in 4-component vector of float)
+0:16 fwidthFine (global 4-component vector of float)
+0:16 'in4' (smooth in 4-component vector of float)
+0:18 Sequence
+0:18 move second child to first child (temp float)
+0:18 'cull' (temp float)
+0:18 direct index (smooth temp float CullDistance)
+0:18 'gl_CullDistance' (smooth in 6-element array of float CullDistance)
+0:18 Constant:
+0:18 2 (const int)
+0:19 Sequence
+0:19 move second child to first child (temp float)
+0:19 'consts' (temp float)
+0:19 Constant:
+0:19 20.000000
+0:21 Test condition and select (temp void)
+0:21 Condition
+0:21 'gl_HelperInvocation' (in bool HelperInvocation)
+0:21 true case
+0:22 Pre-Increment (temp 4-component vector of float)
+0:22 'v4' (temp 4-component vector of float)
+0:24 Sequence
+0:24 move second child to first child (temp int)
+0:24 'sum' (temp int)
+0:24 Constant:
+0:24 32 (const int)
+0:32 Sequence
+0:32 move second child to first child (temp 2-component vector of bool)
+0:32 'b2' (temp 2-component vector of bool)
+0:32 mix (global 2-component vector of bool)
+0:32 Construct bvec2 (temp 2-component vector of bool)
+0:32 'b1' (temp bool)
+0:32 Construct bvec2 (temp 2-component vector of bool)
+0:32 'b3' (temp bool)
+0:32 Construct bvec2 (temp 2-component vector of bool)
+0:32 'b' (temp bool)
+0:33 Sequence
+0:33 move second child to first child (temp uint)
+0:33 'um' (temp uint)
+0:33 mix (global uint)
+0:33 'uin' (temp uint)
+0:33 'uin' (temp uint)
+0:33 'b' (temp bool)
+0:34 Sequence
+0:34 move second child to first child (temp 3-component vector of int)
+0:34 'im3' (temp 3-component vector of int)
+0:34 mix (global 3-component vector of int)
+0:34 Construct ivec3 (temp 3-component vector of int)
+0:34 Convert uint to int (temp int)
+0:34 'uin' (temp uint)
+0:34 Construct ivec3 (temp 3-component vector of int)
+0:34 Convert uint to int (temp int)
+0:34 'uin' (temp uint)
+0:34 Construct bvec3 (temp 3-component vector of bool)
+0:34 'b' (temp bool)
+0:42 Function Definition: foo( (global void)
+0:42 Function Parameters:
+0:44 Sequence
+0:44 Sequence
+0:44 move second child to first child (temp int)
+0:44 's' (temp int)
+0:44 textureSamples (global int)
+0:44 's2dms' (uniform sampler2DMS)
+0:45 add second child into first child (temp int)
+0:45 's' (temp int)
+0:45 textureSamples (global int)
+0:45 'us2dmsa' (uniform usampler2DMSArray)
+0:46 add second child into first child (temp int)
+0:46 's' (temp int)
+0:46 imageQuerySamples (global int)
+0:46 'ii2dms' (layout(rgba32i ) uniform iimage2DMS)
+0:47 add second child into first child (temp int)
+0:47 's' (temp int)
+0:47 imageQuerySamples (global int)
+0:47 'i2dmsa' (layout(rgba32f ) uniform image2DMSArray)
+0:48 Sequence
+0:48 move second child to first child (temp float)
+0:48 'f' (temp float)
+0:48 imageAtomicExchange (global float)
+0:48 'i2dmsa' (layout(rgba32f ) uniform image2DMSArray)
+0:48 Convert float to int (temp 3-component vector of int)
+0:48 'in3' (smooth in 3-component vector of float)
+0:48 Constant:
+0:48 2 (const int)
+0:48 Constant:
+0:48 4.500000
+0:53 Function Definition: cull(i1; (global float)
+0:53 Function Parameters:
+0:53 'i' (in int)
+0:55 Sequence
+0:55 Branch: Return with expression
+0:55 Test condition and select (temp float)
+0:55 Condition
+0:55 Compare Greater Than or Equal (temp bool)
+0:55 'i' (in int)
+0:55 Constant:
+0:55 6 (const int)
+0:55 true case
+0:55 direct index (smooth temp float CullDistance)
+0:55 'gl_CullDistance' (smooth in 6-element array of float CullDistance)
+0:55 Constant:
+0:55 5 (const int)
+0:55 false case
+0:55 indirect index (smooth temp float CullDistance)
+0:55 'gl_CullDistance' (smooth in 6-element array of float CullDistance)
+0:55 'i' (in int)
+0:? Linker Objects
+0:? 'in1' (smooth in float)
+0:? 'in2' (smooth in 2-component vector of float)
+0:? 'in3' (smooth in 3-component vector of float)
+0:? 'in4' (smooth in 4-component vector of float)
+0:? 'gl_CullDistance' (smooth in 6-element array of float CullDistance)
+0:? 's2dms' (uniform sampler2DMS)
+0:? 'us2dmsa' (uniform usampler2DMSArray)
+0:? 'ii2dms' (layout(rgba32i ) uniform iimage2DMS)
+0:? 'i2dmsa' (layout(rgba32f ) uniform image2DMSArray)
+
+
+Linked fragment stage:
+
+
+Shader version: 450
+0:? Sequence
+0:8 Function Definition: main( (global void)
+0:8 Function Parameters:
+0:10 Sequence
+0:10 Sequence
+0:10 move second child to first child (temp 2-component vector of float)
+0:10 'v2' (temp 2-component vector of float)
+0:10 dPdxFine (global 2-component vector of float)
+0:10 'in2' (smooth in 2-component vector of float)
+0:11 Sequence
+0:11 move second child to first child (temp 3-component vector of float)
+0:11 'v3' (temp 3-component vector of float)
+0:11 dPdyCoarse (global 3-component vector of float)
+0:11 'in3' (smooth in 3-component vector of float)
+0:12 Sequence
+0:12 move second child to first child (temp 4-component vector of float)
+0:12 'v4' (temp 4-component vector of float)
+0:12 fwidth (global 4-component vector of float)
+0:12 'in4' (smooth in 4-component vector of float)
+0:13 move second child to first child (temp 4-component vector of float)
+0:13 'v4' (temp 4-component vector of float)
+0:13 dPdyFine (global 4-component vector of float)
+0:13 'in4' (smooth in 4-component vector of float)
+0:14 move second child to first child (temp 3-component vector of float)
+0:14 'v3' (temp 3-component vector of float)
+0:14 dPdyFine (global 3-component vector of float)
+0:14 'in3' (smooth in 3-component vector of float)
+0:15 Sequence
+0:15 move second child to first child (temp float)
+0:15 'f' (temp float)
+0:15 add (temp float)
+0:15 add (temp float)
+0:15 dPdx (global float)
+0:15 'in1' (smooth in float)
+0:15 dPdxFine (global float)
+0:15 'in1' (smooth in float)
+0:15 dPdxCoarse (global float)
+0:15 'in1' (smooth in float)
+0:16 move second child to first child (temp 4-component vector of float)
+0:16 'v4' (temp 4-component vector of float)
+0:16 add (temp 4-component vector of float)
+0:16 fwidthCoarse (global 4-component vector of float)
+0:16 'in4' (smooth in 4-component vector of float)
+0:16 fwidthFine (global 4-component vector of float)
+0:16 'in4' (smooth in 4-component vector of float)
+0:18 Sequence
+0:18 move second child to first child (temp float)
+0:18 'cull' (temp float)
+0:18 direct index (smooth temp float CullDistance)
+0:18 'gl_CullDistance' (smooth in 6-element array of float CullDistance)
+0:18 Constant:
+0:18 2 (const int)
+0:19 Sequence
+0:19 move second child to first child (temp float)
+0:19 'consts' (temp float)
+0:19 Constant:
+0:19 20.000000
+0:21 Test condition and select (temp void)
+0:21 Condition
+0:21 'gl_HelperInvocation' (in bool HelperInvocation)
+0:21 true case
+0:22 Pre-Increment (temp 4-component vector of float)
+0:22 'v4' (temp 4-component vector of float)
+0:24 Sequence
+0:24 move second child to first child (temp int)
+0:24 'sum' (temp int)
+0:24 Constant:
+0:24 32 (const int)
+0:32 Sequence
+0:32 move second child to first child (temp 2-component vector of bool)
+0:32 'b2' (temp 2-component vector of bool)
+0:32 mix (global 2-component vector of bool)
+0:32 Construct bvec2 (temp 2-component vector of bool)
+0:32 'b1' (temp bool)
+0:32 Construct bvec2 (temp 2-component vector of bool)
+0:32 'b3' (temp bool)
+0:32 Construct bvec2 (temp 2-component vector of bool)
+0:32 'b' (temp bool)
+0:33 Sequence
+0:33 move second child to first child (temp uint)
+0:33 'um' (temp uint)
+0:33 mix (global uint)
+0:33 'uin' (temp uint)
+0:33 'uin' (temp uint)
+0:33 'b' (temp bool)
+0:34 Sequence
+0:34 move second child to first child (temp 3-component vector of int)
+0:34 'im3' (temp 3-component vector of int)
+0:34 mix (global 3-component vector of int)
+0:34 Construct ivec3 (temp 3-component vector of int)
+0:34 Convert uint to int (temp int)
+0:34 'uin' (temp uint)
+0:34 Construct ivec3 (temp 3-component vector of int)
+0:34 Convert uint to int (temp int)
+0:34 'uin' (temp uint)
+0:34 Construct bvec3 (temp 3-component vector of bool)
+0:34 'b' (temp bool)
+0:42 Function Definition: foo( (global void)
+0:42 Function Parameters:
+0:44 Sequence
+0:44 Sequence
+0:44 move second child to first child (temp int)
+0:44 's' (temp int)
+0:44 textureSamples (global int)
+0:44 's2dms' (uniform sampler2DMS)
+0:45 add second child into first child (temp int)
+0:45 's' (temp int)
+0:45 textureSamples (global int)
+0:45 'us2dmsa' (uniform usampler2DMSArray)
+0:46 add second child into first child (temp int)
+0:46 's' (temp int)
+0:46 imageQuerySamples (global int)
+0:46 'ii2dms' (layout(rgba32i ) uniform iimage2DMS)
+0:47 add second child into first child (temp int)
+0:47 's' (temp int)
+0:47 imageQuerySamples (global int)
+0:47 'i2dmsa' (layout(rgba32f ) uniform image2DMSArray)
+0:48 Sequence
+0:48 move second child to first child (temp float)
+0:48 'f' (temp float)
+0:48 imageAtomicExchange (global float)
+0:48 'i2dmsa' (layout(rgba32f ) uniform image2DMSArray)
+0:48 Convert float to int (temp 3-component vector of int)
+0:48 'in3' (smooth in 3-component vector of float)
+0:48 Constant:
+0:48 2 (const int)
+0:48 Constant:
+0:48 4.500000
+0:53 Function Definition: cull(i1; (global float)
+0:53 Function Parameters:
+0:53 'i' (in int)
+0:55 Sequence
+0:55 Branch: Return with expression
+0:55 Test condition and select (temp float)
+0:55 Condition
+0:55 Compare Greater Than or Equal (temp bool)
+0:55 'i' (in int)
+0:55 Constant:
+0:55 6 (const int)
+0:55 true case
+0:55 direct index (smooth temp float CullDistance)
+0:55 'gl_CullDistance' (smooth in 6-element array of float CullDistance)
+0:55 Constant:
+0:55 5 (const int)
+0:55 false case
+0:55 indirect index (smooth temp float CullDistance)
+0:55 'gl_CullDistance' (smooth in 6-element array of float CullDistance)
+0:55 'i' (in int)
+0:? Linker Objects
+0:? 'in1' (smooth in float)
+0:? 'in2' (smooth in 2-component vector of float)
+0:? 'in3' (smooth in 3-component vector of float)
+0:? 'in4' (smooth in 4-component vector of float)
+0:? 'gl_CullDistance' (smooth in 6-element array of float CullDistance)
+0:? 's2dms' (uniform sampler2DMS)
+0:? 'us2dmsa' (uniform usampler2DMSArray)
+0:? 'ii2dms' (layout(rgba32i ) uniform iimage2DMS)
+0:? 'i2dmsa' (layout(rgba32f ) uniform image2DMSArray)
+
diff --git a/chromium/third_party/glslang/src/Test/baseResults/450.geom.out b/chromium/third_party/glslang/src/Test/baseResults/450.geom.out
new file mode 100644
index 00000000000..fef3486aeb6
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/450.geom.out
@@ -0,0 +1,72 @@
+450.geom
+Warning, version 450 is not yet complete; most version-specific features are present, but some are missing.
+
+Shader version: 450
+invocations = -1
+max_vertices = -1
+input primitive = none
+output primitive = none
+0:? Sequence
+0:11 Function Definition: main( (global void)
+0:11 Function Parameters:
+0:13 Sequence
+0:13 move second child to first child (temp float)
+0:13 direct index (layout(stream=0 ) temp float CullDistance)
+0:13 gl_CullDistance: direct index for structure (layout(stream=0 ) out 3-element array of float CullDistance)
+0:13 'anon@0' (layout(stream=0 ) out block{layout(stream=0 ) out 3-element array of float CullDistance gl_CullDistance})
+0:13 Constant:
+0:13 3 (const uint)
+0:13 Constant:
+0:13 2 (const int)
+0:13 direct index (temp float CullDistance)
+0:13 gl_CullDistance: direct index for structure (in 3-element array of float CullDistance)
+0:13 direct index (temp block{in 3-element array of float CullDistance gl_CullDistance})
+0:13 'gl_in' (in implicitly-sized array of block{in 3-element array of float CullDistance gl_CullDistance})
+0:13 Constant:
+0:13 1 (const int)
+0:13 Constant:
+0:13 0 (const int)
+0:13 Constant:
+0:13 2 (const int)
+0:? Linker Objects
+0:? 'gl_in' (in implicitly-sized array of block{in 3-element array of float CullDistance gl_CullDistance})
+0:? 'anon@0' (layout(stream=0 ) out block{layout(stream=0 ) out 3-element array of float CullDistance gl_CullDistance})
+
+
+Linked geometry stage:
+
+ERROR: Linking geometry stage: At least one shader must specify an input layout primitive
+ERROR: Linking geometry stage: At least one shader must specify an output layout primitive
+ERROR: Linking geometry stage: At least one shader must specify a layout(max_vertices = value)
+
+Shader version: 450
+invocations = 1
+max_vertices = -1
+input primitive = none
+output primitive = none
+0:? Sequence
+0:11 Function Definition: main( (global void)
+0:11 Function Parameters:
+0:13 Sequence
+0:13 move second child to first child (temp float)
+0:13 direct index (layout(stream=0 ) temp float CullDistance)
+0:13 gl_CullDistance: direct index for structure (layout(stream=0 ) out 3-element array of float CullDistance)
+0:13 'anon@0' (layout(stream=0 ) out block{layout(stream=0 ) out 3-element array of float CullDistance gl_CullDistance})
+0:13 Constant:
+0:13 3 (const uint)
+0:13 Constant:
+0:13 2 (const int)
+0:13 direct index (temp float CullDistance)
+0:13 gl_CullDistance: direct index for structure (in 3-element array of float CullDistance)
+0:13 direct index (temp block{in 3-element array of float CullDistance gl_CullDistance})
+0:13 'gl_in' (in 2-element array of block{in 3-element array of float CullDistance gl_CullDistance})
+0:13 Constant:
+0:13 1 (const int)
+0:13 Constant:
+0:13 0 (const int)
+0:13 Constant:
+0:13 2 (const int)
+0:? Linker Objects
+0:? 'gl_in' (in 2-element array of block{in 3-element array of float CullDistance gl_CullDistance})
+0:? 'anon@0' (layout(stream=0 ) out block{layout(stream=0 ) out 3-element array of float CullDistance gl_CullDistance})
+
diff --git a/chromium/third_party/glslang/src/Test/baseResults/450.tesc.out b/chromium/third_party/glslang/src/Test/baseResults/450.tesc.out
new file mode 100644
index 00000000000..aeef6cb3ad1
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/450.tesc.out
@@ -0,0 +1,68 @@
+450.tesc
+Warning, version 450 is not yet complete; most version-specific features are present, but some are missing.
+
+Shader version: 450
+vertices = -1
+0:? Sequence
+0:11 Function Definition: main( (global void)
+0:11 Function Parameters:
+0:13 Sequence
+0:13 move second child to first child (temp float)
+0:13 direct index (temp float CullDistance)
+0:13 gl_CullDistance: direct index for structure (out 3-element array of float CullDistance)
+0:13 indirect index (temp block{out 3-element array of float CullDistance gl_CullDistance})
+0:13 'gl_out' (out 4-element array of block{out 3-element array of float CullDistance gl_CullDistance})
+0:13 'gl_InvocationID' (in int InvocationID)
+0:13 Constant:
+0:13 0 (const int)
+0:13 Constant:
+0:13 2 (const int)
+0:13 direct index (temp float CullDistance)
+0:13 gl_CullDistance: direct index for structure (in 3-element array of float CullDistance)
+0:13 direct index (temp block{in 3-element array of float CullDistance gl_CullDistance})
+0:13 'gl_in' (in 32-element array of block{in 3-element array of float CullDistance gl_CullDistance})
+0:13 Constant:
+0:13 1 (const int)
+0:13 Constant:
+0:13 0 (const int)
+0:13 Constant:
+0:13 2 (const int)
+0:? Linker Objects
+0:? 'gl_in' (in 32-element array of block{in 3-element array of float CullDistance gl_CullDistance})
+0:? 'gl_out' (out 4-element array of block{out 3-element array of float CullDistance gl_CullDistance})
+
+
+Linked tessellation control stage:
+
+ERROR: Linking tessellation control stage: At least one shader must specify an output layout(vertices=...)
+
+Shader version: 450
+vertices = -1
+0:? Sequence
+0:11 Function Definition: main( (global void)
+0:11 Function Parameters:
+0:13 Sequence
+0:13 move second child to first child (temp float)
+0:13 direct index (temp float CullDistance)
+0:13 gl_CullDistance: direct index for structure (out 3-element array of float CullDistance)
+0:13 indirect index (temp block{out 3-element array of float CullDistance gl_CullDistance})
+0:13 'gl_out' (out 4-element array of block{out 3-element array of float CullDistance gl_CullDistance})
+0:13 'gl_InvocationID' (in int InvocationID)
+0:13 Constant:
+0:13 0 (const int)
+0:13 Constant:
+0:13 2 (const int)
+0:13 direct index (temp float CullDistance)
+0:13 gl_CullDistance: direct index for structure (in 3-element array of float CullDistance)
+0:13 direct index (temp block{in 3-element array of float CullDistance gl_CullDistance})
+0:13 'gl_in' (in 32-element array of block{in 3-element array of float CullDistance gl_CullDistance})
+0:13 Constant:
+0:13 1 (const int)
+0:13 Constant:
+0:13 0 (const int)
+0:13 Constant:
+0:13 2 (const int)
+0:? Linker Objects
+0:? 'gl_in' (in 32-element array of block{in 3-element array of float CullDistance gl_CullDistance})
+0:? 'gl_out' (out 4-element array of block{out 3-element array of float CullDistance gl_CullDistance})
+
diff --git a/chromium/third_party/glslang/src/Test/baseResults/450.tese.out b/chromium/third_party/glslang/src/Test/baseResults/450.tese.out
new file mode 100644
index 00000000000..f988f1086de
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/450.tese.out
@@ -0,0 +1,68 @@
+450.tese
+Warning, version 450 is not yet complete; most version-specific features are present, but some are missing.
+
+Shader version: 450
+input primitive = none
+vertex spacing = none
+triangle order = none
+0:? Sequence
+0:11 Function Definition: main( (global void)
+0:11 Function Parameters:
+0:13 Sequence
+0:13 move second child to first child (temp float)
+0:13 direct index (temp float CullDistance)
+0:13 gl_CullDistance: direct index for structure (out 3-element array of float CullDistance)
+0:13 'anon@0' (out block{out 3-element array of float CullDistance gl_CullDistance})
+0:13 Constant:
+0:13 3 (const uint)
+0:13 Constant:
+0:13 2 (const int)
+0:13 direct index (temp float CullDistance)
+0:13 gl_CullDistance: direct index for structure (in 3-element array of float CullDistance)
+0:13 direct index (temp block{in 3-element array of float CullDistance gl_CullDistance})
+0:13 'gl_in' (in 32-element array of block{in 3-element array of float CullDistance gl_CullDistance})
+0:13 Constant:
+0:13 1 (const int)
+0:13 Constant:
+0:13 0 (const int)
+0:13 Constant:
+0:13 2 (const int)
+0:? Linker Objects
+0:? 'gl_in' (in 32-element array of block{in 3-element array of float CullDistance gl_CullDistance})
+0:? 'anon@0' (out block{out 3-element array of float CullDistance gl_CullDistance})
+
+
+Linked tessellation evaluation stage:
+
+ERROR: Linking tessellation evaluation stage: At least one shader must specify an input layout primitive
+
+Shader version: 450
+input primitive = none
+vertex spacing = equal_spacing
+triangle order = ccw
+0:? Sequence
+0:11 Function Definition: main( (global void)
+0:11 Function Parameters:
+0:13 Sequence
+0:13 move second child to first child (temp float)
+0:13 direct index (temp float CullDistance)
+0:13 gl_CullDistance: direct index for structure (out 3-element array of float CullDistance)
+0:13 'anon@0' (out block{out 3-element array of float CullDistance gl_CullDistance})
+0:13 Constant:
+0:13 3 (const uint)
+0:13 Constant:
+0:13 2 (const int)
+0:13 direct index (temp float CullDistance)
+0:13 gl_CullDistance: direct index for structure (in 3-element array of float CullDistance)
+0:13 direct index (temp block{in 3-element array of float CullDistance gl_CullDistance})
+0:13 'gl_in' (in 32-element array of block{in 3-element array of float CullDistance gl_CullDistance})
+0:13 Constant:
+0:13 1 (const int)
+0:13 Constant:
+0:13 0 (const int)
+0:13 Constant:
+0:13 2 (const int)
+0:? Linker Objects
+0:? 'gl_in' (in 32-element array of block{in 3-element array of float CullDistance gl_CullDistance})
+0:? 'anon@0' (out block{out 3-element array of float CullDistance gl_CullDistance})
+
diff --git a/chromium/third_party/glslang/src/Test/baseResults/450.vert.out b/chromium/third_party/glslang/src/Test/baseResults/450.vert.out
new file mode 100644
index 00000000000..86338c76129
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/450.vert.out
@@ -0,0 +1,69 @@
+450.vert
+Warning, version 450 is not yet complete; most version-specific features are present, but some are missing.
+ERROR: 0:12: 'out' : cannot be bool
+ERROR: 0:13: 'sampler2D' : sampler/image types can only be used in uniform variables or function parameters: outo
+ERROR: 2 compilation errors. No code generated.
+
+
+Shader version: 450
+ERROR: node is still EOpNull!
+0:7 Function Definition: main( (global void)
+0:7 Function Parameters:
+0:9 Sequence
+0:9 move second child to first child (temp float)
+0:9 direct index (temp float CullDistance)
+0:9 gl_CullDistance: direct index for structure (out 3-element array of float CullDistance)
+0:9 'anon@0' (out block{out 3-element array of float CullDistance gl_CullDistance})
+0:9 Constant:
+0:9 10 (const uint)
+0:9 Constant:
+0:9 2 (const int)
+0:9 Constant:
+0:9 4.500000
+0:? Linker Objects
+0:? 'anon@0' (out block{out 3-element array of float CullDistance gl_CullDistance})
+0:? 'outb' (smooth out bool)
+0:? 'outo' (smooth out sampler2D)
+0:? 'outa' (smooth out 4-element array of float)
+0:? 'outaa' (smooth out 4-element array of 2-element array of float)
+0:? 'outs' (smooth out structure{global float f})
+0:? 'outasa' (smooth out 4-element array of structure{global float f})
+0:? 'outsa' (smooth out 4-element array of structure{global float f})
+0:? 'outSA' (smooth out structure{global 4-element array of float f})
+0:? 'outSS' (smooth out structure{global float f, global structure{global float f} s})
+0:? 'gl_VertexID' (gl_VertexId int VertexId)
+0:? 'gl_InstanceID' (gl_InstanceId int InstanceId)
+
+
+Linked vertex stage:
+
+
+Shader version: 450
+ERROR: node is still EOpNull!
+0:7 Function Definition: main( (global void)
+0:7 Function Parameters:
+0:9 Sequence
+0:9 move second child to first child (temp float)
+0:9 direct index (temp float CullDistance)
+0:9 gl_CullDistance: direct index for structure (out 3-element array of float CullDistance)
+0:9 'anon@0' (out block{out 3-element array of float CullDistance gl_CullDistance})
+0:9 Constant:
+0:9 10 (const uint)
+0:9 Constant:
+0:9 2 (const int)
+0:9 Constant:
+0:9 4.500000
+0:? Linker Objects
+0:? 'anon@0' (out block{out 3-element array of float CullDistance gl_CullDistance})
+0:? 'outb' (smooth out bool)
+0:? 'outo' (smooth out sampler2D)
+0:? 'outa' (smooth out 4-element array of float)
+0:? 'outaa' (smooth out 4-element array of 2-element array of float)
+0:? 'outs' (smooth out structure{global float f})
+0:? 'outasa' (smooth out 4-element array of structure{global float f})
+0:? 'outsa' (smooth out 4-element array of structure{global float f})
+0:? 'outSA' (smooth out structure{global 4-element array of float f})
+0:? 'outSS' (smooth out structure{global float f, global structure{global float f} s})
+0:? 'gl_VertexID' (gl_VertexId int VertexId)
+0:? 'gl_InstanceID' (gl_InstanceId int InstanceId)
+
diff --git a/chromium/third_party/glslang/src/Test/baseResults/Operations.frag.out b/chromium/third_party/glslang/src/Test/baseResults/Operations.frag.out
new file mode 100644
index 00000000000..bc12fe0daee
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/Operations.frag.out
@@ -0,0 +1,1151 @@
+Operations.frag
+ERROR: 0:76: 'intBitsToFloat' : no matching overloaded function found
+ERROR: 0:77: 'uintBitsToFloat' : no matching overloaded function found
+ERROR: 0:78: 'fma' : no matching overloaded function found
+ERROR: 0:79: 'frexp' : no matching overloaded function found
+ERROR: 0:80: 'ldexp' : no matching overloaded function found
+ERROR: 0:81: 'unpackUnorm2x16' : no matching overloaded function found
+ERROR: 0:82: 'unpackUnorm4x8' : no matching overloaded function found
+ERROR: 0:83: 'unpackSnorm4x8' : no matching overloaded function found
+ERROR: 0:107: 'floatsBitsToInt' : no matching overloaded function found
+ERROR: 0:108: 'packUnorm2x16' : no matching overloaded function found
+ERROR: 0:109: 'packUnorm4x8' : no matching overloaded function found
+ERROR: 0:110: 'packSnorm4x8' : no matching overloaded function found
+ERROR: 0:113: 'assign' : cannot convert from 'global float' to 'temp uint'
+ERROR: 0:114: 'assign' : cannot convert from 'global float' to 'temp uint'
+ERROR: 0:118: 'floatsBitToInt' : no matching overloaded function found
+ERROR: 0:118: 'assign' : cannot convert from 'const float' to 'temp uint'
+ERROR: 0:119: 'packUnorm2x16' : no matching overloaded function found
+ERROR: 0:119: 'assign' : cannot convert from 'const float' to 'temp uint'
+ERROR: 0:120: 'packUnorm4x8' : no matching overloaded function found
+ERROR: 0:120: 'assign' : cannot convert from 'const float' to 'temp uint'
+ERROR: 0:121: '&' : wrong operand types: no operation '&' exists that takes a left-hand operand of type 'uniform uint' and a right operand of type 'temp int' (or there is no acceptable conversion)
+ERROR: 0:121: 'assign' : cannot convert from 'uniform uint' to 'temp int'
+ERROR: 0:122: '^' : wrong operand types: no operation '^' exists that takes a left-hand operand of type 'uniform uint' and a right operand of type 'temp int' (or there is no acceptable conversion)
+ERROR: 0:122: 'assign' : cannot convert from 'uniform uint' to 'temp int'
+ERROR: 0:123: '|' : wrong operand types: no operation '|' exists that takes a left-hand operand of type 'temp int' and a right operand of type 'uniform uint' (or there is no acceptable conversion)
+ERROR: 25 compilation errors. No code generated.
+
+
+Shader version: 130
+ERROR: node is still EOpNull!
+0:15 Function Definition: main( (global void)
+0:15 Function Parameters:
+0:? Sequence
+0:27 move second child to first child (temp 4-component vector of float)
+0:27 'v' (temp 4-component vector of float)
+0:27 radians (global 4-component vector of float)
+0:27 'uv4' (uniform 4-component vector of float)
+0:28 add second child into first child (temp 4-component vector of float)
+0:28 'v' (temp 4-component vector of float)
+0:28 degrees (global 4-component vector of float)
+0:28 'v' (temp 4-component vector of float)
+0:29 add second child into first child (temp 4-component vector of float)
+0:29 'v' (temp 4-component vector of float)
+0:29 Comma (temp 4-component vector of float)
+0:29 move second child to first child (temp int)
+0:29 'i' (temp int)
+0:29 component-wise multiply (temp int)
+0:29 'ui' (uniform int)
+0:29 'ui' (uniform int)
+0:29 sine (global 4-component vector of float)
+0:29 'v' (temp 4-component vector of float)
+0:30 add second child into first child (temp 4-component vector of float)
+0:30 'v' (temp 4-component vector of float)
+0:30 cosine (global 4-component vector of float)
+0:30 'v' (temp 4-component vector of float)
+0:31 add second child into first child (temp 4-component vector of float)
+0:31 'v' (temp 4-component vector of float)
+0:31 tangent (global 4-component vector of float)
+0:31 'v' (temp 4-component vector of float)
+0:32 add second child into first child (temp 4-component vector of float)
+0:32 'v' (temp 4-component vector of float)
+0:32 arc sine (global 4-component vector of float)
+0:32 'v' (temp 4-component vector of float)
+0:33 add second child into first child (temp 4-component vector of float)
+0:33 'v' (temp 4-component vector of float)
+0:33 arc cosine (global 4-component vector of float)
+0:33 'v' (temp 4-component vector of float)
+0:35 add second child into first child (temp 4-component vector of float)
+0:35 'v' (temp 4-component vector of float)
+0:35 arc tangent (global 4-component vector of float)
+0:35 'v' (temp 4-component vector of float)
+0:36 add second child into first child (temp 4-component vector of float)
+0:36 'v' (temp 4-component vector of float)
+0:36 hyp. sine (global 4-component vector of float)
+0:36 'v' (temp 4-component vector of float)
+0:37 add second child into first child (temp 4-component vector of float)
+0:37 'v' (temp 4-component vector of float)
+0:37 hyp. cosine (global 4-component vector of float)
+0:37 'v' (temp 4-component vector of float)
+0:38 add second child into first child (temp 4-component vector of float)
+0:38 'v' (temp 4-component vector of float)
+0:38 hyp. tangent (global 4-component vector of float)
+0:38 'v' (temp 4-component vector of float)
+0:39 add second child into first child (temp 4-component vector of float)
+0:39 'v' (temp 4-component vector of float)
+0:39 arc hyp. sine (global 4-component vector of float)
+0:39 'v' (temp 4-component vector of float)
+0:40 add second child into first child (temp 4-component vector of float)
+0:40 'v' (temp 4-component vector of float)
+0:40 arc hyp. cosine (global 4-component vector of float)
+0:40 'v' (temp 4-component vector of float)
+0:41 add second child into first child (temp 4-component vector of float)
+0:41 'v' (temp 4-component vector of float)
+0:41 arc hyp. tangent (global 4-component vector of float)
+0:41 'v' (temp 4-component vector of float)
+0:43 add second child into first child (temp 4-component vector of float)
+0:43 'v' (temp 4-component vector of float)
+0:43 pow (global 4-component vector of float)
+0:43 'v' (temp 4-component vector of float)
+0:43 'v' (temp 4-component vector of float)
+0:44 add second child into first child (temp 4-component vector of float)
+0:44 'v' (temp 4-component vector of float)
+0:44 exp (global 4-component vector of float)
+0:44 'v' (temp 4-component vector of float)
+0:45 add second child into first child (temp 4-component vector of float)
+0:45 'v' (temp 4-component vector of float)
+0:45 log (global 4-component vector of float)
+0:45 'v' (temp 4-component vector of float)
+0:46 add second child into first child (temp 4-component vector of float)
+0:46 'v' (temp 4-component vector of float)
+0:46 exp2 (global 4-component vector of float)
+0:46 'v' (temp 4-component vector of float)
+0:47 add second child into first child (temp 4-component vector of float)
+0:47 'v' (temp 4-component vector of float)
+0:47 log2 (global 4-component vector of float)
+0:47 'v' (temp 4-component vector of float)
+0:48 add second child into first child (temp 4-component vector of float)
+0:48 'v' (temp 4-component vector of float)
+0:48 sqrt (global 4-component vector of float)
+0:48 'v' (temp 4-component vector of float)
+0:49 add second child into first child (temp 4-component vector of float)
+0:49 'v' (temp 4-component vector of float)
+0:49 inverse sqrt (global 4-component vector of float)
+0:49 'v' (temp 4-component vector of float)
+0:50 add second child into first child (temp 4-component vector of float)
+0:50 'v' (temp 4-component vector of float)
+0:50 Absolute value (global 4-component vector of float)
+0:50 'v' (temp 4-component vector of float)
+0:51 add second child into first child (temp 4-component vector of float)
+0:51 'v' (temp 4-component vector of float)
+0:51 Sign (global 4-component vector of float)
+0:51 'v' (temp 4-component vector of float)
+0:52 add second child into first child (temp 4-component vector of float)
+0:52 'v' (temp 4-component vector of float)
+0:52 Floor (global 4-component vector of float)
+0:52 'v' (temp 4-component vector of float)
+0:55 add second child into first child (temp 4-component vector of float)
+0:55 'v' (temp 4-component vector of float)
+0:55 trunc (global 4-component vector of float)
+0:55 'v' (temp 4-component vector of float)
+0:56 add second child into first child (temp 4-component vector of float)
+0:56 'v' (temp 4-component vector of float)
+0:56 round (global 4-component vector of float)
+0:56 'v' (temp 4-component vector of float)
+0:57 add second child into first child (temp 4-component vector of float)
+0:57 'v' (temp 4-component vector of float)
+0:57 roundEven (global 4-component vector of float)
+0:57 'v' (temp 4-component vector of float)
+0:60 add second child into first child (temp 4-component vector of float)
+0:60 'v' (temp 4-component vector of float)
+0:60 Ceiling (global 4-component vector of float)
+0:60 'v' (temp 4-component vector of float)
+0:61 add second child into first child (temp 4-component vector of float)
+0:61 'v' (temp 4-component vector of float)
+0:61 Fraction (global 4-component vector of float)
+0:61 'v' (temp 4-component vector of float)
+0:62 add second child into first child (temp 4-component vector of float)
+0:62 'v' (temp 4-component vector of float)
+0:62 mod (global 4-component vector of float)
+0:62 'v' (temp 4-component vector of float)
+0:62 'v' (temp 4-component vector of float)
+0:63 add second child into first child (temp 4-component vector of float)
+0:63 'v' (temp 4-component vector of float)
+0:63 mod (global 4-component vector of float)
+0:63 'v' (temp 4-component vector of float)
+0:63 direct index (temp float)
+0:63 'v' (temp 4-component vector of float)
+0:63 Constant:
+0:63 0 (const int)
+0:66 add second child into first child (temp 4-component vector of float)
+0:66 'v' (temp 4-component vector of float)
+0:66 modf (global 4-component vector of float)
+0:66 'v' (temp 4-component vector of float)
+0:66 'v' (temp 4-component vector of float)
+0:69 add second child into first child (temp 4-component vector of float)
+0:69 'v' (temp 4-component vector of float)
+0:69 min (global 4-component vector of float)
+0:69 'v' (temp 4-component vector of float)
+0:69 'uv4' (uniform 4-component vector of float)
+0:70 add second child into first child (temp 4-component vector of float)
+0:70 'v' (temp 4-component vector of float)
+0:70 max (global 4-component vector of float)
+0:70 'v' (temp 4-component vector of float)
+0:70 'uv4' (uniform 4-component vector of float)
+0:71 add second child into first child (temp 4-component vector of float)
+0:71 'v' (temp 4-component vector of float)
+0:71 clamp (global 4-component vector of float)
+0:71 'v' (temp 4-component vector of float)
+0:71 'uv4' (uniform 4-component vector of float)
+0:71 'uv4' (uniform 4-component vector of float)
+0:72 add second child into first child (temp 4-component vector of float)
+0:72 'v' (temp 4-component vector of float)
+0:72 mix (global 4-component vector of float)
+0:72 'v' (temp 4-component vector of float)
+0:72 'v' (temp 4-component vector of float)
+0:72 'v' (temp 4-component vector of float)
+0:75 add second child into first child (temp 4-component vector of float)
+0:75 'v' (temp 4-component vector of float)
+0:75 mix (global 4-component vector of float)
+0:75 'v' (temp 4-component vector of float)
+0:75 'v' (temp 4-component vector of float)
+0:75 'bv4' (temp 4-component vector of bool)
+0:76 add second child into first child (temp 4-component vector of float)
+0:76 'v' (temp 4-component vector of float)
+0:76 Constant:
+0:76 0.000000
+0:77 add second child into first child (temp 4-component vector of float)
+0:77 'v' (temp 4-component vector of float)
+0:77 Constant:
+0:77 0.000000
+0:78 add second child into first child (temp 4-component vector of float)
+0:78 'v' (temp 4-component vector of float)
+0:78 Constant:
+0:78 0.000000
+0:79 add second child into first child (temp 4-component vector of float)
+0:79 'v' (temp 4-component vector of float)
+0:79 Constant:
+0:79 0.000000
+0:80 add second child into first child (temp 4-component vector of float)
+0:80 'v' (temp 4-component vector of float)
+0:80 Constant:
+0:80 0.000000
+0:81 add second child into first child (temp 4-component vector of float)
+0:81 'v' (temp 4-component vector of float)
+0:81 Constant:
+0:81 0.000000
+0:82 add second child into first child (temp 4-component vector of float)
+0:82 'v' (temp 4-component vector of float)
+0:82 Constant:
+0:82 0.000000
+0:83 add second child into first child (temp 4-component vector of float)
+0:83 'v' (temp 4-component vector of float)
+0:83 Constant:
+0:83 0.000000
+0:86 add second child into first child (temp 4-component vector of float)
+0:86 'v' (temp 4-component vector of float)
+0:86 step (global 4-component vector of float)
+0:86 'v' (temp 4-component vector of float)
+0:86 'v' (temp 4-component vector of float)
+0:87 add second child into first child (temp 4-component vector of float)
+0:87 'v' (temp 4-component vector of float)
+0:87 smoothstep (global 4-component vector of float)
+0:87 'v' (temp 4-component vector of float)
+0:87 'v' (temp 4-component vector of float)
+0:87 'v' (temp 4-component vector of float)
+0:88 add second child into first child (temp 4-component vector of float)
+0:88 'v' (temp 4-component vector of float)
+0:88 step (global 4-component vector of float)
+0:88 'uf' (uniform float)
+0:88 'v' (temp 4-component vector of float)
+0:89 add second child into first child (temp 4-component vector of float)
+0:89 'v' (temp 4-component vector of float)
+0:89 smoothstep (global 4-component vector of float)
+0:89 'uf' (uniform float)
+0:89 'uf' (uniform float)
+0:89 'v' (temp 4-component vector of float)
+0:90 add second child into first child (temp 4-component vector of float)
+0:90 'v' (temp 4-component vector of float)
+0:90 normalize (global 4-component vector of float)
+0:90 'v' (temp 4-component vector of float)
+0:91 add second child into first child (temp 4-component vector of float)
+0:91 'v' (temp 4-component vector of float)
+0:91 face-forward (global 4-component vector of float)
+0:91 'v' (temp 4-component vector of float)
+0:91 'v' (temp 4-component vector of float)
+0:91 'v' (temp 4-component vector of float)
+0:92 add second child into first child (temp 4-component vector of float)
+0:92 'v' (temp 4-component vector of float)
+0:92 reflect (global 4-component vector of float)
+0:92 'v' (temp 4-component vector of float)
+0:92 'v' (temp 4-component vector of float)
+0:93 add second child into first child (temp 4-component vector of float)
+0:93 'v' (temp 4-component vector of float)
+0:93 refract (global 4-component vector of float)
+0:93 'v' (temp 4-component vector of float)
+0:93 'v' (temp 4-component vector of float)
+0:93 'uf' (uniform float)
+0:94 add second child into first child (temp 4-component vector of float)
+0:94 'v' (temp 4-component vector of float)
+0:94 dPdx (global 4-component vector of float)
+0:94 'v' (temp 4-component vector of float)
+0:95 add second child into first child (temp 4-component vector of float)
+0:95 'v' (temp 4-component vector of float)
+0:95 dPdy (global 4-component vector of float)
+0:95 'v' (temp 4-component vector of float)
+0:96 add second child into first child (temp 4-component vector of float)
+0:96 'v' (temp 4-component vector of float)
+0:96 fwidth (global 4-component vector of float)
+0:96 'v' (temp 4-component vector of float)
+0:101 add second child into first child (temp int)
+0:101 'i' (temp int)
+0:101 Absolute value (global int)
+0:101 'ui' (uniform int)
+0:102 add second child into first child (temp int)
+0:102 'i' (temp int)
+0:102 Sign (global int)
+0:102 'i' (temp int)
+0:103 add second child into first child (temp int)
+0:103 'i' (temp int)
+0:103 min (global int)
+0:103 'i' (temp int)
+0:103 'ui' (uniform int)
+0:104 add second child into first child (temp int)
+0:104 'i' (temp int)
+0:104 max (global int)
+0:104 'i' (temp int)
+0:104 'ui' (uniform int)
+0:105 add second child into first child (temp int)
+0:105 'i' (temp int)
+0:105 clamp (global int)
+0:105 'i' (temp int)
+0:105 'ui' (uniform int)
+0:105 'ui' (uniform int)
+0:107 Constant:
+0:107 0.000000
+0:108 Constant:
+0:108 0.000000
+0:109 Constant:
+0:109 0.000000
+0:110 Constant:
+0:110 0.000000
+0:113 'u' (temp uint)
+0:114 'u' (temp uint)
+0:115 add second child into first child (temp uint)
+0:115 'u' (temp uint)
+0:115 min (global uint)
+0:115 'u' (temp uint)
+0:115 'uui' (uniform uint)
+0:116 add second child into first child (temp uint)
+0:116 'u' (temp uint)
+0:116 max (global uint)
+0:116 'u' (temp uint)
+0:116 'uui' (uniform uint)
+0:117 add second child into first child (temp uint)
+0:117 'u' (temp uint)
+0:117 clamp (global uint)
+0:117 'u' (temp uint)
+0:117 'uui' (uniform uint)
+0:117 'uui' (uniform uint)
+0:118 'u' (temp uint)
+0:119 'u' (temp uint)
+0:120 'u' (temp uint)
+0:121 'i' (temp int)
+0:122 'i' (temp int)
+0:123 add second child into first child (temp int)
+0:123 'i' (temp int)
+0:123 'i' (temp int)
+0:127 move second child to first child (temp bool)
+0:127 'b' (temp bool)
+0:127 isnan (global bool)
+0:127 'uf' (uniform float)
+0:128 move second child to first child (temp bool)
+0:128 'b' (temp bool)
+0:128 isinf (global bool)
+0:128 direct index (temp float)
+0:128 'v' (temp 4-component vector of float)
+0:128 Constant:
+0:128 1 (const int)
+0:130 move second child to first child (temp bool)
+0:130 'b' (temp bool)
+0:130 any (global bool)
+0:130 Compare Less Than (global 4-component vector of bool)
+0:130 'v' (temp 4-component vector of float)
+0:130 'uv4' (uniform 4-component vector of float)
+0:131 move second child to first child (temp bool)
+0:131 'b' (temp bool)
+0:131 logical-and (temp bool)
+0:131 'b' (temp bool)
+0:131 any (global bool)
+0:131 Compare Less Than or Equal (global 4-component vector of bool)
+0:131 'v' (temp 4-component vector of float)
+0:131 'uv4' (uniform 4-component vector of float)
+0:132 move second child to first child (temp bool)
+0:132 'b' (temp bool)
+0:132 logical-and (temp bool)
+0:132 'b' (temp bool)
+0:132 any (global bool)
+0:132 Compare Greater Than (global 4-component vector of bool)
+0:132 'v' (temp 4-component vector of float)
+0:132 'uv4' (uniform 4-component vector of float)
+0:133 move second child to first child (temp bool)
+0:133 'b' (temp bool)
+0:133 logical-and (temp bool)
+0:133 'b' (temp bool)
+0:133 any (global bool)
+0:133 Compare Greater Than or Equal (global 4-component vector of bool)
+0:133 'v' (temp 4-component vector of float)
+0:133 'uv4' (uniform 4-component vector of float)
+0:134 move second child to first child (temp bool)
+0:134 'b' (temp bool)
+0:134 logical-and (temp bool)
+0:134 'b' (temp bool)
+0:134 any (global bool)
+0:134 Equal (global 4-component vector of bool)
+0:134 'ub41' (uniform 4-component vector of bool)
+0:134 'ub42' (uniform 4-component vector of bool)
+0:135 move second child to first child (temp bool)
+0:135 'b' (temp bool)
+0:135 logical-and (temp bool)
+0:135 'b' (temp bool)
+0:135 any (global bool)
+0:135 NotEqual (global 4-component vector of bool)
+0:135 'ub41' (uniform 4-component vector of bool)
+0:135 'ub42' (uniform 4-component vector of bool)
+0:136 move second child to first child (temp bool)
+0:136 'b' (temp bool)
+0:136 logical-and (temp bool)
+0:136 'b' (temp bool)
+0:136 any (global bool)
+0:136 'ub41' (uniform 4-component vector of bool)
+0:137 move second child to first child (temp bool)
+0:137 'b' (temp bool)
+0:137 logical-and (temp bool)
+0:137 'b' (temp bool)
+0:137 all (global bool)
+0:137 'ub41' (uniform 4-component vector of bool)
+0:138 move second child to first child (temp bool)
+0:138 'b' (temp bool)
+0:138 logical-and (temp bool)
+0:138 'b' (temp bool)
+0:138 any (global bool)
+0:138 Negate conditional (global 4-component vector of bool)
+0:138 'ub41' (uniform 4-component vector of bool)
+0:140 move second child to first child (temp int)
+0:140 'i' (temp int)
+0:140 divide (temp int)
+0:140 subtract (temp int)
+0:140 component-wise multiply (temp int)
+0:140 add (temp int)
+0:140 'i' (temp int)
+0:140 'ui' (uniform int)
+0:140 'i' (temp int)
+0:140 'ui' (uniform int)
+0:140 'i' (temp int)
+0:141 move second child to first child (temp int)
+0:141 'i' (temp int)
+0:141 mod (temp int)
+0:141 'i' (temp int)
+0:141 'ui' (uniform int)
+0:142 Test condition and select (temp void)
+0:142 Condition
+0:142 logical-or (temp bool)
+0:142 Compare Equal (temp bool)
+0:142 'i' (temp int)
+0:142 'ui' (uniform int)
+0:142 logical-xor (temp bool)
+0:142 logical-and (temp bool)
+0:142 Compare Not Equal (temp bool)
+0:142 'i' (temp int)
+0:142 'ui' (uniform int)
+0:142 Compare Equal (temp bool)
+0:142 'i' (temp int)
+0:142 'ui' (uniform int)
+0:142 Compare Not Equal (temp bool)
+0:142 'i' (temp int)
+0:142 Constant:
+0:142 2 (const int)
+0:142 true case
+0:143 Pre-Increment (temp int)
+0:143 'i' (temp int)
+0:145 move second child to first child (temp float)
+0:145 'f' (temp float)
+0:145 divide (temp float)
+0:145 subtract (temp float)
+0:145 component-wise multiply (temp float)
+0:145 add (temp float)
+0:145 'uf' (uniform float)
+0:145 'uf' (uniform float)
+0:145 'uf' (uniform float)
+0:145 'uf' (uniform float)
+0:145 'uf' (uniform float)
+0:147 add second child into first child (temp float)
+0:147 'f' (temp float)
+0:147 length (global float)
+0:147 'v' (temp 4-component vector of float)
+0:148 add second child into first child (temp float)
+0:148 'f' (temp float)
+0:148 distance (global float)
+0:148 'v' (temp 4-component vector of float)
+0:148 'v' (temp 4-component vector of float)
+0:149 add second child into first child (temp float)
+0:149 'f' (temp float)
+0:149 dot-product (global float)
+0:149 'v' (temp 4-component vector of float)
+0:149 'v' (temp 4-component vector of float)
+0:150 add second child into first child (temp float)
+0:150 'f' (temp float)
+0:150 dot-product (global float)
+0:150 'f' (temp float)
+0:150 'uf' (uniform float)
+0:151 add second child into first child (temp float)
+0:151 'f' (temp float)
+0:151 direct index (temp float)
+0:151 cross-product (global 3-component vector of float)
+0:151 vector swizzle (temp 3-component vector of float)
+0:151 'v' (temp 4-component vector of float)
+0:151 Sequence
+0:151 Constant:
+0:151 0 (const int)
+0:151 Constant:
+0:151 1 (const int)
+0:151 Constant:
+0:151 2 (const int)
+0:151 vector swizzle (temp 3-component vector of float)
+0:151 'v' (temp 4-component vector of float)
+0:151 Sequence
+0:151 Constant:
+0:151 0 (const int)
+0:151 Constant:
+0:151 1 (const int)
+0:151 Constant:
+0:151 2 (const int)
+0:151 Constant:
+0:151 0 (const int)
+0:153 Test condition and select (temp void)
+0:153 Condition
+0:153 logical-or (temp bool)
+0:153 Compare Equal (temp bool)
+0:153 'f' (temp float)
+0:153 'uf' (uniform float)
+0:153 logical-and (temp bool)
+0:153 Compare Not Equal (temp bool)
+0:153 'f' (temp float)
+0:153 'uf' (uniform float)
+0:153 Compare Not Equal (temp bool)
+0:153 'f' (temp float)
+0:153 Constant:
+0:153 2.000000
+0:153 true case
+0:154 Pre-Increment (temp float)
+0:154 'f' (temp float)
+0:156 and second child into first child (temp int)
+0:156 'i' (temp int)
+0:156 'ui' (uniform int)
+0:157 or second child into first child (temp int)
+0:157 'i' (temp int)
+0:157 Constant:
+0:157 66 (const int)
+0:158 exclusive or second child into first child (temp int)
+0:158 'i' (temp int)
+0:158 'ui' (uniform int)
+0:159 mod second child into first child (temp int)
+0:159 'i' (temp int)
+0:159 Constant:
+0:159 17 (const int)
+0:160 right shift second child into first child (temp int)
+0:160 'i' (temp int)
+0:160 Constant:
+0:160 2 (const int)
+0:161 left shift second child into first child (temp int)
+0:161 'i' (temp int)
+0:161 'ui' (uniform int)
+0:162 move second child to first child (temp int)
+0:162 'i' (temp int)
+0:162 Bitwise not (temp int)
+0:162 'i' (temp int)
+0:163 move second child to first child (temp bool)
+0:163 'b' (temp bool)
+0:163 Negate conditional (temp bool)
+0:163 'b' (temp bool)
+0:165 move second child to first child (temp 4-component vector of float)
+0:165 'gl_FragColor' (fragColor 4-component vector of float FragColor)
+0:165 Test condition and select (temp 4-component vector of float)
+0:165 Condition
+0:165 'b' (temp bool)
+0:165 true case
+0:165 add (temp 4-component vector of float)
+0:165 add (temp 4-component vector of float)
+0:165 Construct vec4 (temp 4-component vector of float)
+0:165 Convert int to float (temp float)
+0:165 'i' (temp int)
+0:165 Construct vec4 (temp 4-component vector of float)
+0:165 'f' (temp float)
+0:165 'v' (temp 4-component vector of float)
+0:165 false case
+0:165 'v' (temp 4-component vector of float)
+0:? Linker Objects
+0:? 'uiv4' (uniform 4-component vector of int)
+0:? 'uv4' (uniform 4-component vector of float)
+0:? 'ub' (uniform bool)
+0:? 'ub41' (uniform 4-component vector of bool)
+0:? 'ub42' (uniform 4-component vector of bool)
+0:? 'uf' (uniform float)
+0:? 'ui' (uniform int)
+0:? 'uuv4' (uniform 4-component vector of uint)
+0:? 'uui' (uniform uint)
+
+
+Linked fragment stage:
+
+
+Shader version: 130
+ERROR: node is still EOpNull!
+0:15 Function Definition: main( (global void)
+0:15 Function Parameters:
+0:? Sequence
+0:27 move second child to first child (temp 4-component vector of float)
+0:27 'v' (temp 4-component vector of float)
+0:27 radians (global 4-component vector of float)
+0:27 'uv4' (uniform 4-component vector of float)
+0:28 add second child into first child (temp 4-component vector of float)
+0:28 'v' (temp 4-component vector of float)
+0:28 degrees (global 4-component vector of float)
+0:28 'v' (temp 4-component vector of float)
+0:29 add second child into first child (temp 4-component vector of float)
+0:29 'v' (temp 4-component vector of float)
+0:29 Comma (temp 4-component vector of float)
+0:29 move second child to first child (temp int)
+0:29 'i' (temp int)
+0:29 component-wise multiply (temp int)
+0:29 'ui' (uniform int)
+0:29 'ui' (uniform int)
+0:29 sine (global 4-component vector of float)
+0:29 'v' (temp 4-component vector of float)
+0:30 add second child into first child (temp 4-component vector of float)
+0:30 'v' (temp 4-component vector of float)
+0:30 cosine (global 4-component vector of float)
+0:30 'v' (temp 4-component vector of float)
+0:31 add second child into first child (temp 4-component vector of float)
+0:31 'v' (temp 4-component vector of float)
+0:31 tangent (global 4-component vector of float)
+0:31 'v' (temp 4-component vector of float)
+0:32 add second child into first child (temp 4-component vector of float)
+0:32 'v' (temp 4-component vector of float)
+0:32 arc sine (global 4-component vector of float)
+0:32 'v' (temp 4-component vector of float)
+0:33 add second child into first child (temp 4-component vector of float)
+0:33 'v' (temp 4-component vector of float)
+0:33 arc cosine (global 4-component vector of float)
+0:33 'v' (temp 4-component vector of float)
+0:35 add second child into first child (temp 4-component vector of float)
+0:35 'v' (temp 4-component vector of float)
+0:35 arc tangent (global 4-component vector of float)
+0:35 'v' (temp 4-component vector of float)
+0:36 add second child into first child (temp 4-component vector of float)
+0:36 'v' (temp 4-component vector of float)
+0:36 hyp. sine (global 4-component vector of float)
+0:36 'v' (temp 4-component vector of float)
+0:37 add second child into first child (temp 4-component vector of float)
+0:37 'v' (temp 4-component vector of float)
+0:37 hyp. cosine (global 4-component vector of float)
+0:37 'v' (temp 4-component vector of float)
+0:38 add second child into first child (temp 4-component vector of float)
+0:38 'v' (temp 4-component vector of float)
+0:38 hyp. tangent (global 4-component vector of float)
+0:38 'v' (temp 4-component vector of float)
+0:39 add second child into first child (temp 4-component vector of float)
+0:39 'v' (temp 4-component vector of float)
+0:39 arc hyp. sine (global 4-component vector of float)
+0:39 'v' (temp 4-component vector of float)
+0:40 add second child into first child (temp 4-component vector of float)
+0:40 'v' (temp 4-component vector of float)
+0:40 arc hyp. cosine (global 4-component vector of float)
+0:40 'v' (temp 4-component vector of float)
+0:41 add second child into first child (temp 4-component vector of float)
+0:41 'v' (temp 4-component vector of float)
+0:41 arc hyp. tangent (global 4-component vector of float)
+0:41 'v' (temp 4-component vector of float)
+0:43 add second child into first child (temp 4-component vector of float)
+0:43 'v' (temp 4-component vector of float)
+0:43 pow (global 4-component vector of float)
+0:43 'v' (temp 4-component vector of float)
+0:43 'v' (temp 4-component vector of float)
+0:44 add second child into first child (temp 4-component vector of float)
+0:44 'v' (temp 4-component vector of float)
+0:44 exp (global 4-component vector of float)
+0:44 'v' (temp 4-component vector of float)
+0:45 add second child into first child (temp 4-component vector of float)
+0:45 'v' (temp 4-component vector of float)
+0:45 log (global 4-component vector of float)
+0:45 'v' (temp 4-component vector of float)
+0:46 add second child into first child (temp 4-component vector of float)
+0:46 'v' (temp 4-component vector of float)
+0:46 exp2 (global 4-component vector of float)
+0:46 'v' (temp 4-component vector of float)
+0:47 add second child into first child (temp 4-component vector of float)
+0:47 'v' (temp 4-component vector of float)
+0:47 log2 (global 4-component vector of float)
+0:47 'v' (temp 4-component vector of float)
+0:48 add second child into first child (temp 4-component vector of float)
+0:48 'v' (temp 4-component vector of float)
+0:48 sqrt (global 4-component vector of float)
+0:48 'v' (temp 4-component vector of float)
+0:49 add second child into first child (temp 4-component vector of float)
+0:49 'v' (temp 4-component vector of float)
+0:49 inverse sqrt (global 4-component vector of float)
+0:49 'v' (temp 4-component vector of float)
+0:50 add second child into first child (temp 4-component vector of float)
+0:50 'v' (temp 4-component vector of float)
+0:50 Absolute value (global 4-component vector of float)
+0:50 'v' (temp 4-component vector of float)
+0:51 add second child into first child (temp 4-component vector of float)
+0:51 'v' (temp 4-component vector of float)
+0:51 Sign (global 4-component vector of float)
+0:51 'v' (temp 4-component vector of float)
+0:52 add second child into first child (temp 4-component vector of float)
+0:52 'v' (temp 4-component vector of float)
+0:52 Floor (global 4-component vector of float)
+0:52 'v' (temp 4-component vector of float)
+0:55 add second child into first child (temp 4-component vector of float)
+0:55 'v' (temp 4-component vector of float)
+0:55 trunc (global 4-component vector of float)
+0:55 'v' (temp 4-component vector of float)
+0:56 add second child into first child (temp 4-component vector of float)
+0:56 'v' (temp 4-component vector of float)
+0:56 round (global 4-component vector of float)
+0:56 'v' (temp 4-component vector of float)
+0:57 add second child into first child (temp 4-component vector of float)
+0:57 'v' (temp 4-component vector of float)
+0:57 roundEven (global 4-component vector of float)
+0:57 'v' (temp 4-component vector of float)
+0:60 add second child into first child (temp 4-component vector of float)
+0:60 'v' (temp 4-component vector of float)
+0:60 Ceiling (global 4-component vector of float)
+0:60 'v' (temp 4-component vector of float)
+0:61 add second child into first child (temp 4-component vector of float)
+0:61 'v' (temp 4-component vector of float)
+0:61 Fraction (global 4-component vector of float)
+0:61 'v' (temp 4-component vector of float)
+0:62 add second child into first child (temp 4-component vector of float)
+0:62 'v' (temp 4-component vector of float)
+0:62 mod (global 4-component vector of float)
+0:62 'v' (temp 4-component vector of float)
+0:62 'v' (temp 4-component vector of float)
+0:63 add second child into first child (temp 4-component vector of float)
+0:63 'v' (temp 4-component vector of float)
+0:63 mod (global 4-component vector of float)
+0:63 'v' (temp 4-component vector of float)
+0:63 direct index (temp float)
+0:63 'v' (temp 4-component vector of float)
+0:63 Constant:
+0:63 0 (const int)
+0:66 add second child into first child (temp 4-component vector of float)
+0:66 'v' (temp 4-component vector of float)
+0:66 modf (global 4-component vector of float)
+0:66 'v' (temp 4-component vector of float)
+0:66 'v' (temp 4-component vector of float)
+0:69 add second child into first child (temp 4-component vector of float)
+0:69 'v' (temp 4-component vector of float)
+0:69 min (global 4-component vector of float)
+0:69 'v' (temp 4-component vector of float)
+0:69 'uv4' (uniform 4-component vector of float)
+0:70 add second child into first child (temp 4-component vector of float)
+0:70 'v' (temp 4-component vector of float)
+0:70 max (global 4-component vector of float)
+0:70 'v' (temp 4-component vector of float)
+0:70 'uv4' (uniform 4-component vector of float)
+0:71 add second child into first child (temp 4-component vector of float)
+0:71 'v' (temp 4-component vector of float)
+0:71 clamp (global 4-component vector of float)
+0:71 'v' (temp 4-component vector of float)
+0:71 'uv4' (uniform 4-component vector of float)
+0:71 'uv4' (uniform 4-component vector of float)
+0:72 add second child into first child (temp 4-component vector of float)
+0:72 'v' (temp 4-component vector of float)
+0:72 mix (global 4-component vector of float)
+0:72 'v' (temp 4-component vector of float)
+0:72 'v' (temp 4-component vector of float)
+0:72 'v' (temp 4-component vector of float)
+0:75 add second child into first child (temp 4-component vector of float)
+0:75 'v' (temp 4-component vector of float)
+0:75 mix (global 4-component vector of float)
+0:75 'v' (temp 4-component vector of float)
+0:75 'v' (temp 4-component vector of float)
+0:75 'bv4' (temp 4-component vector of bool)
+0:76 add second child into first child (temp 4-component vector of float)
+0:76 'v' (temp 4-component vector of float)
+0:76 Constant:
+0:76 0.000000
+0:77 add second child into first child (temp 4-component vector of float)
+0:77 'v' (temp 4-component vector of float)
+0:77 Constant:
+0:77 0.000000
+0:78 add second child into first child (temp 4-component vector of float)
+0:78 'v' (temp 4-component vector of float)
+0:78 Constant:
+0:78 0.000000
+0:79 add second child into first child (temp 4-component vector of float)
+0:79 'v' (temp 4-component vector of float)
+0:79 Constant:
+0:79 0.000000
+0:80 add second child into first child (temp 4-component vector of float)
+0:80 'v' (temp 4-component vector of float)
+0:80 Constant:
+0:80 0.000000
+0:81 add second child into first child (temp 4-component vector of float)
+0:81 'v' (temp 4-component vector of float)
+0:81 Constant:
+0:81 0.000000
+0:82 add second child into first child (temp 4-component vector of float)
+0:82 'v' (temp 4-component vector of float)
+0:82 Constant:
+0:82 0.000000
+0:83 add second child into first child (temp 4-component vector of float)
+0:83 'v' (temp 4-component vector of float)
+0:83 Constant:
+0:83 0.000000
+0:86 add second child into first child (temp 4-component vector of float)
+0:86 'v' (temp 4-component vector of float)
+0:86 step (global 4-component vector of float)
+0:86 'v' (temp 4-component vector of float)
+0:86 'v' (temp 4-component vector of float)
+0:87 add second child into first child (temp 4-component vector of float)
+0:87 'v' (temp 4-component vector of float)
+0:87 smoothstep (global 4-component vector of float)
+0:87 'v' (temp 4-component vector of float)
+0:87 'v' (temp 4-component vector of float)
+0:87 'v' (temp 4-component vector of float)
+0:88 add second child into first child (temp 4-component vector of float)
+0:88 'v' (temp 4-component vector of float)
+0:88 step (global 4-component vector of float)
+0:88 'uf' (uniform float)
+0:88 'v' (temp 4-component vector of float)
+0:89 add second child into first child (temp 4-component vector of float)
+0:89 'v' (temp 4-component vector of float)
+0:89 smoothstep (global 4-component vector of float)
+0:89 'uf' (uniform float)
+0:89 'uf' (uniform float)
+0:89 'v' (temp 4-component vector of float)
+0:90 add second child into first child (temp 4-component vector of float)
+0:90 'v' (temp 4-component vector of float)
+0:90 normalize (global 4-component vector of float)
+0:90 'v' (temp 4-component vector of float)
+0:91 add second child into first child (temp 4-component vector of float)
+0:91 'v' (temp 4-component vector of float)
+0:91 face-forward (global 4-component vector of float)
+0:91 'v' (temp 4-component vector of float)
+0:91 'v' (temp 4-component vector of float)
+0:91 'v' (temp 4-component vector of float)
+0:92 add second child into first child (temp 4-component vector of float)
+0:92 'v' (temp 4-component vector of float)
+0:92 reflect (global 4-component vector of float)
+0:92 'v' (temp 4-component vector of float)
+0:92 'v' (temp 4-component vector of float)
+0:93 add second child into first child (temp 4-component vector of float)
+0:93 'v' (temp 4-component vector of float)
+0:93 refract (global 4-component vector of float)
+0:93 'v' (temp 4-component vector of float)
+0:93 'v' (temp 4-component vector of float)
+0:93 'uf' (uniform float)
+0:94 add second child into first child (temp 4-component vector of float)
+0:94 'v' (temp 4-component vector of float)
+0:94 dPdx (global 4-component vector of float)
+0:94 'v' (temp 4-component vector of float)
+0:95 add second child into first child (temp 4-component vector of float)
+0:95 'v' (temp 4-component vector of float)
+0:95 dPdy (global 4-component vector of float)
+0:95 'v' (temp 4-component vector of float)
+0:96 add second child into first child (temp 4-component vector of float)
+0:96 'v' (temp 4-component vector of float)
+0:96 fwidth (global 4-component vector of float)
+0:96 'v' (temp 4-component vector of float)
+0:101 add second child into first child (temp int)
+0:101 'i' (temp int)
+0:101 Absolute value (global int)
+0:101 'ui' (uniform int)
+0:102 add second child into first child (temp int)
+0:102 'i' (temp int)
+0:102 Sign (global int)
+0:102 'i' (temp int)
+0:103 add second child into first child (temp int)
+0:103 'i' (temp int)
+0:103 min (global int)
+0:103 'i' (temp int)
+0:103 'ui' (uniform int)
+0:104 add second child into first child (temp int)
+0:104 'i' (temp int)
+0:104 max (global int)
+0:104 'i' (temp int)
+0:104 'ui' (uniform int)
+0:105 add second child into first child (temp int)
+0:105 'i' (temp int)
+0:105 clamp (global int)
+0:105 'i' (temp int)
+0:105 'ui' (uniform int)
+0:105 'ui' (uniform int)
+0:107 Constant:
+0:107 0.000000
+0:108 Constant:
+0:108 0.000000
+0:109 Constant:
+0:109 0.000000
+0:110 Constant:
+0:110 0.000000
+0:113 'u' (temp uint)
+0:114 'u' (temp uint)
+0:115 add second child into first child (temp uint)
+0:115 'u' (temp uint)
+0:115 min (global uint)
+0:115 'u' (temp uint)
+0:115 'uui' (uniform uint)
+0:116 add second child into first child (temp uint)
+0:116 'u' (temp uint)
+0:116 max (global uint)
+0:116 'u' (temp uint)
+0:116 'uui' (uniform uint)
+0:117 add second child into first child (temp uint)
+0:117 'u' (temp uint)
+0:117 clamp (global uint)
+0:117 'u' (temp uint)
+0:117 'uui' (uniform uint)
+0:117 'uui' (uniform uint)
+0:118 'u' (temp uint)
+0:119 'u' (temp uint)
+0:120 'u' (temp uint)
+0:121 'i' (temp int)
+0:122 'i' (temp int)
+0:123 add second child into first child (temp int)
+0:123 'i' (temp int)
+0:123 'i' (temp int)
+0:127 move second child to first child (temp bool)
+0:127 'b' (temp bool)
+0:127 isnan (global bool)
+0:127 'uf' (uniform float)
+0:128 move second child to first child (temp bool)
+0:128 'b' (temp bool)
+0:128 isinf (global bool)
+0:128 direct index (temp float)
+0:128 'v' (temp 4-component vector of float)
+0:128 Constant:
+0:128 1 (const int)
+0:130 move second child to first child (temp bool)
+0:130 'b' (temp bool)
+0:130 any (global bool)
+0:130 Compare Less Than (global 4-component vector of bool)
+0:130 'v' (temp 4-component vector of float)
+0:130 'uv4' (uniform 4-component vector of float)
+0:131 move second child to first child (temp bool)
+0:131 'b' (temp bool)
+0:131 logical-and (temp bool)
+0:131 'b' (temp bool)
+0:131 any (global bool)
+0:131 Compare Less Than or Equal (global 4-component vector of bool)
+0:131 'v' (temp 4-component vector of float)
+0:131 'uv4' (uniform 4-component vector of float)
+0:132 move second child to first child (temp bool)
+0:132 'b' (temp bool)
+0:132 logical-and (temp bool)
+0:132 'b' (temp bool)
+0:132 any (global bool)
+0:132 Compare Greater Than (global 4-component vector of bool)
+0:132 'v' (temp 4-component vector of float)
+0:132 'uv4' (uniform 4-component vector of float)
+0:133 move second child to first child (temp bool)
+0:133 'b' (temp bool)
+0:133 logical-and (temp bool)
+0:133 'b' (temp bool)
+0:133 any (global bool)
+0:133 Compare Greater Than or Equal (global 4-component vector of bool)
+0:133 'v' (temp 4-component vector of float)
+0:133 'uv4' (uniform 4-component vector of float)
+0:134 move second child to first child (temp bool)
+0:134 'b' (temp bool)
+0:134 logical-and (temp bool)
+0:134 'b' (temp bool)
+0:134 any (global bool)
+0:134 Equal (global 4-component vector of bool)
+0:134 'ub41' (uniform 4-component vector of bool)
+0:134 'ub42' (uniform 4-component vector of bool)
+0:135 move second child to first child (temp bool)
+0:135 'b' (temp bool)
+0:135 logical-and (temp bool)
+0:135 'b' (temp bool)
+0:135 any (global bool)
+0:135 NotEqual (global 4-component vector of bool)
+0:135 'ub41' (uniform 4-component vector of bool)
+0:135 'ub42' (uniform 4-component vector of bool)
+0:136 move second child to first child (temp bool)
+0:136 'b' (temp bool)
+0:136 logical-and (temp bool)
+0:136 'b' (temp bool)
+0:136 any (global bool)
+0:136 'ub41' (uniform 4-component vector of bool)
+0:137 move second child to first child (temp bool)
+0:137 'b' (temp bool)
+0:137 logical-and (temp bool)
+0:137 'b' (temp bool)
+0:137 all (global bool)
+0:137 'ub41' (uniform 4-component vector of bool)
+0:138 move second child to first child (temp bool)
+0:138 'b' (temp bool)
+0:138 logical-and (temp bool)
+0:138 'b' (temp bool)
+0:138 any (global bool)
+0:138 Negate conditional (global 4-component vector of bool)
+0:138 'ub41' (uniform 4-component vector of bool)
+0:140 move second child to first child (temp int)
+0:140 'i' (temp int)
+0:140 divide (temp int)
+0:140 subtract (temp int)
+0:140 component-wise multiply (temp int)
+0:140 add (temp int)
+0:140 'i' (temp int)
+0:140 'ui' (uniform int)
+0:140 'i' (temp int)
+0:140 'ui' (uniform int)
+0:140 'i' (temp int)
+0:141 move second child to first child (temp int)
+0:141 'i' (temp int)
+0:141 mod (temp int)
+0:141 'i' (temp int)
+0:141 'ui' (uniform int)
+0:142 Test condition and select (temp void)
+0:142 Condition
+0:142 logical-or (temp bool)
+0:142 Compare Equal (temp bool)
+0:142 'i' (temp int)
+0:142 'ui' (uniform int)
+0:142 logical-xor (temp bool)
+0:142 logical-and (temp bool)
+0:142 Compare Not Equal (temp bool)
+0:142 'i' (temp int)
+0:142 'ui' (uniform int)
+0:142 Compare Equal (temp bool)
+0:142 'i' (temp int)
+0:142 'ui' (uniform int)
+0:142 Compare Not Equal (temp bool)
+0:142 'i' (temp int)
+0:142 Constant:
+0:142 2 (const int)
+0:142 true case
+0:143 Pre-Increment (temp int)
+0:143 'i' (temp int)
+0:145 move second child to first child (temp float)
+0:145 'f' (temp float)
+0:145 divide (temp float)
+0:145 subtract (temp float)
+0:145 component-wise multiply (temp float)
+0:145 add (temp float)
+0:145 'uf' (uniform float)
+0:145 'uf' (uniform float)
+0:145 'uf' (uniform float)
+0:145 'uf' (uniform float)
+0:145 'uf' (uniform float)
+0:147 add second child into first child (temp float)
+0:147 'f' (temp float)
+0:147 length (global float)
+0:147 'v' (temp 4-component vector of float)
+0:148 add second child into first child (temp float)
+0:148 'f' (temp float)
+0:148 distance (global float)
+0:148 'v' (temp 4-component vector of float)
+0:148 'v' (temp 4-component vector of float)
+0:149 add second child into first child (temp float)
+0:149 'f' (temp float)
+0:149 dot-product (global float)
+0:149 'v' (temp 4-component vector of float)
+0:149 'v' (temp 4-component vector of float)
+0:150 add second child into first child (temp float)
+0:150 'f' (temp float)
+0:150 dot-product (global float)
+0:150 'f' (temp float)
+0:150 'uf' (uniform float)
+0:151 add second child into first child (temp float)
+0:151 'f' (temp float)
+0:151 direct index (temp float)
+0:151 cross-product (global 3-component vector of float)
+0:151 vector swizzle (temp 3-component vector of float)
+0:151 'v' (temp 4-component vector of float)
+0:151 Sequence
+0:151 Constant:
+0:151 0 (const int)
+0:151 Constant:
+0:151 1 (const int)
+0:151 Constant:
+0:151 2 (const int)
+0:151 vector swizzle (temp 3-component vector of float)
+0:151 'v' (temp 4-component vector of float)
+0:151 Sequence
+0:151 Constant:
+0:151 0 (const int)
+0:151 Constant:
+0:151 1 (const int)
+0:151 Constant:
+0:151 2 (const int)
+0:151 Constant:
+0:151 0 (const int)
+0:153 Test condition and select (temp void)
+0:153 Condition
+0:153 logical-or (temp bool)
+0:153 Compare Equal (temp bool)
+0:153 'f' (temp float)
+0:153 'uf' (uniform float)
+0:153 logical-and (temp bool)
+0:153 Compare Not Equal (temp bool)
+0:153 'f' (temp float)
+0:153 'uf' (uniform float)
+0:153 Compare Not Equal (temp bool)
+0:153 'f' (temp float)
+0:153 Constant:
+0:153 2.000000
+0:153 true case
+0:154 Pre-Increment (temp float)
+0:154 'f' (temp float)
+0:156 and second child into first child (temp int)
+0:156 'i' (temp int)
+0:156 'ui' (uniform int)
+0:157 or second child into first child (temp int)
+0:157 'i' (temp int)
+0:157 Constant:
+0:157 66 (const int)
+0:158 exclusive or second child into first child (temp int)
+0:158 'i' (temp int)
+0:158 'ui' (uniform int)
+0:159 mod second child into first child (temp int)
+0:159 'i' (temp int)
+0:159 Constant:
+0:159 17 (const int)
+0:160 right shift second child into first child (temp int)
+0:160 'i' (temp int)
+0:160 Constant:
+0:160 2 (const int)
+0:161 left shift second child into first child (temp int)
+0:161 'i' (temp int)
+0:161 'ui' (uniform int)
+0:162 move second child to first child (temp int)
+0:162 'i' (temp int)
+0:162 Bitwise not (temp int)
+0:162 'i' (temp int)
+0:163 move second child to first child (temp bool)
+0:163 'b' (temp bool)
+0:163 Negate conditional (temp bool)
+0:163 'b' (temp bool)
+0:165 move second child to first child (temp 4-component vector of float)
+0:165 'gl_FragColor' (fragColor 4-component vector of float FragColor)
+0:165 Test condition and select (temp 4-component vector of float)
+0:165 Condition
+0:165 'b' (temp bool)
+0:165 true case
+0:165 add (temp 4-component vector of float)
+0:165 add (temp 4-component vector of float)
+0:165 Construct vec4 (temp 4-component vector of float)
+0:165 Convert int to float (temp float)
+0:165 'i' (temp int)
+0:165 Construct vec4 (temp 4-component vector of float)
+0:165 'f' (temp float)
+0:165 'v' (temp 4-component vector of float)
+0:165 false case
+0:165 'v' (temp 4-component vector of float)
+0:? Linker Objects
+0:? 'uiv4' (uniform 4-component vector of int)
+0:? 'uv4' (uniform 4-component vector of float)
+0:? 'ub' (uniform bool)
+0:? 'ub41' (uniform 4-component vector of bool)
+0:? 'ub42' (uniform 4-component vector of bool)
+0:? 'uf' (uniform float)
+0:? 'ui' (uniform int)
+0:? 'uuv4' (uniform 4-component vector of uint)
+0:? 'uui' (uniform uint)
+
diff --git a/chromium/third_party/glslang/src/Test/baseResults/aggOps.frag.out b/chromium/third_party/glslang/src/Test/baseResults/aggOps.frag.out
new file mode 100644
index 00000000000..7a60fbc6d03
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/aggOps.frag.out
@@ -0,0 +1,298 @@
+aggOps.frag
+WARNING: 0:4: varying deprecated in version 130; may be removed in future release
+WARNING: 0:6: varying deprecated in version 130; may be removed in future release
+
+Shader version: 130
+0:? Sequence
+0:23 Function Definition: main( (global void)
+0:23 Function Parameters:
+0:? Sequence
+0:27 move second child to first child (temp 3-element array of structure{global int i, global float f})
+0:27 'a' (temp 3-element array of structure{global int i, global float f})
+0:27 Construct structure (temp 3-element array of structure{global int i, global float f})
+0:27 Construct structure (temp structure{global int i, global float f})
+0:27 Convert float to int (temp int)
+0:27 direct index (temp float)
+0:27 'u' (smooth in 4-component vector of float)
+0:27 Constant:
+0:27 0 (const int)
+0:27 direct index (temp float)
+0:27 'u' (smooth in 4-component vector of float)
+0:27 Constant:
+0:27 1 (const int)
+0:27 Construct structure (temp structure{global int i, global float f})
+0:27 Convert float to int (temp int)
+0:27 direct index (temp float)
+0:27 'u' (smooth in 4-component vector of float)
+0:27 Constant:
+0:27 2 (const int)
+0:27 direct index (temp float)
+0:27 'u' (smooth in 4-component vector of float)
+0:27 Constant:
+0:27 3 (const int)
+0:27 Constant:
+0:27 14 (const int)
+0:27 14.000000
+0:28 move second child to first child (temp 3-element array of structure{global int i, global float f})
+0:28 'b' (temp 3-element array of structure{global int i, global float f})
+0:28 Construct structure (temp 3-element array of structure{global int i, global float f})
+0:28 Constant:
+0:28 17 (const int)
+0:28 17.000000
+0:28 Construct structure (temp structure{global int i, global float f})
+0:28 Convert float to int (temp int)
+0:28 direct index (temp float)
+0:28 'w' (smooth in 4-component vector of float)
+0:28 Constant:
+0:28 0 (const int)
+0:28 direct index (temp float)
+0:28 'w' (smooth in 4-component vector of float)
+0:28 Constant:
+0:28 1 (const int)
+0:28 Construct structure (temp structure{global int i, global float f})
+0:28 Convert float to int (temp int)
+0:28 direct index (temp float)
+0:28 'w' (smooth in 4-component vector of float)
+0:28 Constant:
+0:28 2 (const int)
+0:28 direct index (temp float)
+0:28 'w' (smooth in 4-component vector of float)
+0:28 Constant:
+0:28 3 (const int)
+0:30 Test condition and select (temp void)
+0:30 Condition
+0:30 Compare Equal (temp bool)
+0:30 'foo2a' (uniform structure{global int i, global float f, global structure{global int i, global float f} s1_1})
+0:30 'foo2b' (uniform structure{global int i, global float f, global structure{global int i, global float f} s1_1})
+0:30 true case
+0:31 move second child to first child (temp 4-component vector of float)
+0:31 'v' (temp 4-component vector of float)
+0:31 texture (global 4-component vector of float)
+0:31 'sampler' (uniform sampler2D)
+0:31 'coord' (smooth in 2-component vector of float)
+0:30 false case
+0:33 move second child to first child (temp 4-component vector of float)
+0:33 'v' (temp 4-component vector of float)
+0:33 texture (global 4-component vector of float)
+0:33 'sampler' (uniform sampler2D)
+0:33 vector-scale (temp 2-component vector of float)
+0:33 Constant:
+0:33 2.000000
+0:33 'coord' (smooth in 2-component vector of float)
+0:35 Test condition and select (temp void)
+0:35 Condition
+0:35 Compare Equal (temp bool)
+0:35 'u' (smooth in 4-component vector of float)
+0:35 'v' (temp 4-component vector of float)
+0:35 true case
+0:36 vector scale second child into first child (temp 4-component vector of float)
+0:36 'v' (temp 4-component vector of float)
+0:36 Constant:
+0:36 3.000000
+0:38 Test condition and select (temp void)
+0:38 Condition
+0:38 Compare Not Equal (temp bool)
+0:38 'u' (smooth in 4-component vector of float)
+0:38 'v' (temp 4-component vector of float)
+0:38 true case
+0:39 vector scale second child into first child (temp 4-component vector of float)
+0:39 'v' (temp 4-component vector of float)
+0:39 Constant:
+0:39 4.000000
+0:41 Test condition and select (temp void)
+0:41 Condition
+0:41 Compare Equal (temp bool)
+0:41 'coord' (smooth in 2-component vector of float)
+0:41 vector swizzle (temp 2-component vector of float)
+0:41 'v' (temp 4-component vector of float)
+0:41 Sequence
+0:41 Constant:
+0:41 1 (const int)
+0:41 Constant:
+0:41 3 (const int)
+0:41 true case
+0:42 vector scale second child into first child (temp 4-component vector of float)
+0:42 'v' (temp 4-component vector of float)
+0:42 Constant:
+0:42 5.000000
+0:44 Test condition and select (temp void)
+0:44 Condition
+0:44 Compare Equal (temp bool)
+0:44 'a' (temp 3-element array of structure{global int i, global float f})
+0:44 'b' (temp 3-element array of structure{global int i, global float f})
+0:44 true case
+0:45 vector scale second child into first child (temp 4-component vector of float)
+0:45 'v' (temp 4-component vector of float)
+0:45 Constant:
+0:45 6.000000
+0:47 Test condition and select (temp void)
+0:47 Condition
+0:47 Compare Not Equal (temp bool)
+0:47 'a' (temp 3-element array of structure{global int i, global float f})
+0:47 'b' (temp 3-element array of structure{global int i, global float f})
+0:47 true case
+0:48 vector scale second child into first child (temp 4-component vector of float)
+0:48 'v' (temp 4-component vector of float)
+0:48 Constant:
+0:48 7.000000
+0:50 move second child to first child (temp 4-component vector of float)
+0:50 'gl_FragColor' (fragColor 4-component vector of float FragColor)
+0:50 'v' (temp 4-component vector of float)
+0:? Linker Objects
+0:? 'sampler' (uniform sampler2D)
+0:? 'coord' (smooth in 2-component vector of float)
+0:? 'u' (smooth in 4-component vector of float)
+0:? 'w' (smooth in 4-component vector of float)
+0:? 'foo1' (uniform structure{global int i, global float f})
+0:? 'foo2a' (uniform structure{global int i, global float f, global structure{global int i, global float f} s1_1})
+0:? 'foo2b' (uniform structure{global int i, global float f, global structure{global int i, global float f} s1_1})
+
+
+Linked fragment stage:
+
+
+Shader version: 130
+0:? Sequence
+0:23 Function Definition: main( (global void)
+0:23 Function Parameters:
+0:? Sequence
+0:27 move second child to first child (temp 3-element array of structure{global int i, global float f})
+0:27 'a' (temp 3-element array of structure{global int i, global float f})
+0:27 Construct structure (temp 3-element array of structure{global int i, global float f})
+0:27 Construct structure (temp structure{global int i, global float f})
+0:27 Convert float to int (temp int)
+0:27 direct index (temp float)
+0:27 'u' (smooth in 4-component vector of float)
+0:27 Constant:
+0:27 0 (const int)
+0:27 direct index (temp float)
+0:27 'u' (smooth in 4-component vector of float)
+0:27 Constant:
+0:27 1 (const int)
+0:27 Construct structure (temp structure{global int i, global float f})
+0:27 Convert float to int (temp int)
+0:27 direct index (temp float)
+0:27 'u' (smooth in 4-component vector of float)
+0:27 Constant:
+0:27 2 (const int)
+0:27 direct index (temp float)
+0:27 'u' (smooth in 4-component vector of float)
+0:27 Constant:
+0:27 3 (const int)
+0:27 Constant:
+0:27 14 (const int)
+0:27 14.000000
+0:28 move second child to first child (temp 3-element array of structure{global int i, global float f})
+0:28 'b' (temp 3-element array of structure{global int i, global float f})
+0:28 Construct structure (temp 3-element array of structure{global int i, global float f})
+0:28 Constant:
+0:28 17 (const int)
+0:28 17.000000
+0:28 Construct structure (temp structure{global int i, global float f})
+0:28 Convert float to int (temp int)
+0:28 direct index (temp float)
+0:28 'w' (smooth in 4-component vector of float)
+0:28 Constant:
+0:28 0 (const int)
+0:28 direct index (temp float)
+0:28 'w' (smooth in 4-component vector of float)
+0:28 Constant:
+0:28 1 (const int)
+0:28 Construct structure (temp structure{global int i, global float f})
+0:28 Convert float to int (temp int)
+0:28 direct index (temp float)
+0:28 'w' (smooth in 4-component vector of float)
+0:28 Constant:
+0:28 2 (const int)
+0:28 direct index (temp float)
+0:28 'w' (smooth in 4-component vector of float)
+0:28 Constant:
+0:28 3 (const int)
+0:30 Test condition and select (temp void)
+0:30 Condition
+0:30 Compare Equal (temp bool)
+0:30 'foo2a' (uniform structure{global int i, global float f, global structure{global int i, global float f} s1_1})
+0:30 'foo2b' (uniform structure{global int i, global float f, global structure{global int i, global float f} s1_1})
+0:30 true case
+0:31 move second child to first child (temp 4-component vector of float)
+0:31 'v' (temp 4-component vector of float)
+0:31 texture (global 4-component vector of float)
+0:31 'sampler' (uniform sampler2D)
+0:31 'coord' (smooth in 2-component vector of float)
+0:30 false case
+0:33 move second child to first child (temp 4-component vector of float)
+0:33 'v' (temp 4-component vector of float)
+0:33 texture (global 4-component vector of float)
+0:33 'sampler' (uniform sampler2D)
+0:33 vector-scale (temp 2-component vector of float)
+0:33 Constant:
+0:33 2.000000
+0:33 'coord' (smooth in 2-component vector of float)
+0:35 Test condition and select (temp void)
+0:35 Condition
+0:35 Compare Equal (temp bool)
+0:35 'u' (smooth in 4-component vector of float)
+0:35 'v' (temp 4-component vector of float)
+0:35 true case
+0:36 vector scale second child into first child (temp 4-component vector of float)
+0:36 'v' (temp 4-component vector of float)
+0:36 Constant:
+0:36 3.000000
+0:38 Test condition and select (temp void)
+0:38 Condition
+0:38 Compare Not Equal (temp bool)
+0:38 'u' (smooth in 4-component vector of float)
+0:38 'v' (temp 4-component vector of float)
+0:38 true case
+0:39 vector scale second child into first child (temp 4-component vector of float)
+0:39 'v' (temp 4-component vector of float)
+0:39 Constant:
+0:39 4.000000
+0:41 Test condition and select (temp void)
+0:41 Condition
+0:41 Compare Equal (temp bool)
+0:41 'coord' (smooth in 2-component vector of float)
+0:41 vector swizzle (temp 2-component vector of float)
+0:41 'v' (temp 4-component vector of float)
+0:41 Sequence
+0:41 Constant:
+0:41 1 (const int)
+0:41 Constant:
+0:41 3 (const int)
+0:41 true case
+0:42 vector scale second child into first child (temp 4-component vector of float)
+0:42 'v' (temp 4-component vector of float)
+0:42 Constant:
+0:42 5.000000
+0:44 Test condition and select (temp void)
+0:44 Condition
+0:44 Compare Equal (temp bool)
+0:44 'a' (temp 3-element array of structure{global int i, global float f})
+0:44 'b' (temp 3-element array of structure{global int i, global float f})
+0:44 true case
+0:45 vector scale second child into first child (temp 4-component vector of float)
+0:45 'v' (temp 4-component vector of float)
+0:45 Constant:
+0:45 6.000000
+0:47 Test condition and select (temp void)
+0:47 Condition
+0:47 Compare Not Equal (temp bool)
+0:47 'a' (temp 3-element array of structure{global int i, global float f})
+0:47 'b' (temp 3-element array of structure{global int i, global float f})
+0:47 true case
+0:48 vector scale second child into first child (temp 4-component vector of float)
+0:48 'v' (temp 4-component vector of float)
+0:48 Constant:
+0:48 7.000000
+0:50 move second child to first child (temp 4-component vector of float)
+0:50 'gl_FragColor' (fragColor 4-component vector of float FragColor)
+0:50 'v' (temp 4-component vector of float)
+0:? Linker Objects
+0:? 'sampler' (uniform sampler2D)
+0:? 'coord' (smooth in 2-component vector of float)
+0:? 'u' (smooth in 4-component vector of float)
+0:? 'w' (smooth in 4-component vector of float)
+0:? 'foo1' (uniform structure{global int i, global float f})
+0:? 'foo2a' (uniform structure{global int i, global float f, global structure{global int i, global float f} s1_1})
+0:? 'foo2b' (uniform structure{global int i, global float f, global structure{global int i, global float f} s1_1})
+
diff --git a/chromium/third_party/glslang/src/Test/baseResults/always-discard.frag.out b/chromium/third_party/glslang/src/Test/baseResults/always-discard.frag.out
new file mode 100644
index 00000000000..e1eeae3e6cf
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/always-discard.frag.out
@@ -0,0 +1,239 @@
+always-discard.frag
+Shader version: 110
+0:? Sequence
+0:4 Function Definition: main( (global void)
+0:4 Function Parameters:
+0:6 Sequence
+0:6 Sequence
+0:6 move second child to first child (temp 4-component vector of float)
+0:6 'white' (temp 4-component vector of float)
+0:6 Constant:
+0:6 1.000000
+0:6 1.000000
+0:6 1.000000
+0:6 1.000000
+0:7 Sequence
+0:7 move second child to first child (temp 4-component vector of float)
+0:7 'black' (temp 4-component vector of float)
+0:7 Constant:
+0:7 0.200000
+0:7 0.200000
+0:7 0.200000
+0:7 0.200000
+0:8 Sequence
+0:8 move second child to first child (temp 4-component vector of float)
+0:8 'color' (temp 4-component vector of float)
+0:8 'white' (temp 4-component vector of float)
+0:11 Sequence
+0:11 move second child to first child (temp float)
+0:11 'x' (temp float)
+0:11 subtract (temp float)
+0:11 component-wise multiply (temp float)
+0:11 direct index (temp float)
+0:11 'tex_coord' (smooth in 2-component vector of float)
+0:11 Constant:
+0:11 0 (const int)
+0:11 Constant:
+0:11 2.000000
+0:11 Constant:
+0:11 1.000000
+0:12 Sequence
+0:12 move second child to first child (temp float)
+0:12 'y' (temp float)
+0:12 subtract (temp float)
+0:12 component-wise multiply (temp float)
+0:12 direct index (temp float)
+0:12 'tex_coord' (smooth in 2-component vector of float)
+0:12 Constant:
+0:12 1 (const int)
+0:12 Constant:
+0:12 2.000000
+0:12 Constant:
+0:12 1.000000
+0:14 Sequence
+0:14 move second child to first child (temp float)
+0:14 'radius' (temp float)
+0:14 sqrt (global float)
+0:14 add (temp float)
+0:14 component-wise multiply (temp float)
+0:14 'x' (temp float)
+0:14 'x' (temp float)
+0:14 component-wise multiply (temp float)
+0:14 'y' (temp float)
+0:14 'y' (temp float)
+0:15 Test condition and select (temp void)
+0:15 Condition
+0:15 Compare Greater Than (temp bool)
+0:15 'radius' (temp float)
+0:15 Constant:
+0:15 1.000000
+0:15 true case
+0:16 Sequence
+0:16 Test condition and select (temp void)
+0:16 Condition
+0:16 Compare Greater Than (temp bool)
+0:16 'radius' (temp float)
+0:16 Constant:
+0:16 1.100000
+0:16 true case
+0:17 Sequence
+0:17 Pre-Increment (temp 4-component vector of float)
+0:17 'color' (temp 4-component vector of float)
+0:20 move second child to first child (temp 4-component vector of float)
+0:20 'gl_FragColor' (fragColor 4-component vector of float FragColor)
+0:20 'color' (temp 4-component vector of float)
+0:22 Test condition and select (temp void)
+0:22 Condition
+0:22 Compare Greater Than (temp bool)
+0:22 'radius' (temp float)
+0:22 Constant:
+0:22 1.200000
+0:22 true case
+0:23 Sequence
+0:23 Pre-Increment (temp 4-component vector of float)
+0:23 'color' (temp 4-component vector of float)
+0:28 Branch: Kill
+0:31 Test condition and select (temp void)
+0:31 Condition
+0:31 Compare Greater Than or Equal (temp bool)
+0:31 'radius' (temp float)
+0:31 Constant:
+0:31 0.750000
+0:31 true case
+0:32 subtract second child into first child (temp 4-component vector of float)
+0:32 'color' (temp 4-component vector of float)
+0:32 Absolute value (global float)
+0:32 divide (temp float)
+0:32 pow (global float)
+0:32 'radius' (temp float)
+0:32 Constant:
+0:32 16.000000
+0:32 Constant:
+0:32 2.000000
+0:34 move second child to first child (temp 4-component vector of float)
+0:34 'gl_FragColor' (fragColor 4-component vector of float FragColor)
+0:34 'color' (temp 4-component vector of float)
+0:? Linker Objects
+0:? 'tex_coord' (smooth in 2-component vector of float)
+
+
+Linked fragment stage:
+
+
+Shader version: 110
+0:? Sequence
+0:4 Function Definition: main( (global void)
+0:4 Function Parameters:
+0:6 Sequence
+0:6 Sequence
+0:6 move second child to first child (temp 4-component vector of float)
+0:6 'white' (temp 4-component vector of float)
+0:6 Constant:
+0:6 1.000000
+0:6 1.000000
+0:6 1.000000
+0:6 1.000000
+0:7 Sequence
+0:7 move second child to first child (temp 4-component vector of float)
+0:7 'black' (temp 4-component vector of float)
+0:7 Constant:
+0:7 0.200000
+0:7 0.200000
+0:7 0.200000
+0:7 0.200000
+0:8 Sequence
+0:8 move second child to first child (temp 4-component vector of float)
+0:8 'color' (temp 4-component vector of float)
+0:8 'white' (temp 4-component vector of float)
+0:11 Sequence
+0:11 move second child to first child (temp float)
+0:11 'x' (temp float)
+0:11 subtract (temp float)
+0:11 component-wise multiply (temp float)
+0:11 direct index (temp float)
+0:11 'tex_coord' (smooth in 2-component vector of float)
+0:11 Constant:
+0:11 0 (const int)
+0:11 Constant:
+0:11 2.000000
+0:11 Constant:
+0:11 1.000000
+0:12 Sequence
+0:12 move second child to first child (temp float)
+0:12 'y' (temp float)
+0:12 subtract (temp float)
+0:12 component-wise multiply (temp float)
+0:12 direct index (temp float)
+0:12 'tex_coord' (smooth in 2-component vector of float)
+0:12 Constant:
+0:12 1 (const int)
+0:12 Constant:
+0:12 2.000000
+0:12 Constant:
+0:12 1.000000
+0:14 Sequence
+0:14 move second child to first child (temp float)
+0:14 'radius' (temp float)
+0:14 sqrt (global float)
+0:14 add (temp float)
+0:14 component-wise multiply (temp float)
+0:14 'x' (temp float)
+0:14 'x' (temp float)
+0:14 component-wise multiply (temp float)
+0:14 'y' (temp float)
+0:14 'y' (temp float)
+0:15 Test condition and select (temp void)
+0:15 Condition
+0:15 Compare Greater Than (temp bool)
+0:15 'radius' (temp float)
+0:15 Constant:
+0:15 1.000000
+0:15 true case
+0:16 Sequence
+0:16 Test condition and select (temp void)
+0:16 Condition
+0:16 Compare Greater Than (temp bool)
+0:16 'radius' (temp float)
+0:16 Constant:
+0:16 1.100000
+0:16 true case
+0:17 Sequence
+0:17 Pre-Increment (temp 4-component vector of float)
+0:17 'color' (temp 4-component vector of float)
+0:20 move second child to first child (temp 4-component vector of float)
+0:20 'gl_FragColor' (fragColor 4-component vector of float FragColor)
+0:20 'color' (temp 4-component vector of float)
+0:22 Test condition and select (temp void)
+0:22 Condition
+0:22 Compare Greater Than (temp bool)
+0:22 'radius' (temp float)
+0:22 Constant:
+0:22 1.200000
+0:22 true case
+0:23 Sequence
+0:23 Pre-Increment (temp 4-component vector of float)
+0:23 'color' (temp 4-component vector of float)
+0:28 Branch: Kill
+0:31 Test condition and select (temp void)
+0:31 Condition
+0:31 Compare Greater Than or Equal (temp bool)
+0:31 'radius' (temp float)
+0:31 Constant:
+0:31 0.750000
+0:31 true case
+0:32 subtract second child into first child (temp 4-component vector of float)
+0:32 'color' (temp 4-component vector of float)
+0:32 Absolute value (global float)
+0:32 divide (temp float)
+0:32 pow (global float)
+0:32 'radius' (temp float)
+0:32 Constant:
+0:32 16.000000
+0:32 Constant:
+0:32 2.000000
+0:34 move second child to first child (temp 4-component vector of float)
+0:34 'gl_FragColor' (fragColor 4-component vector of float FragColor)
+0:34 'color' (temp 4-component vector of float)
+0:? Linker Objects
+0:? 'tex_coord' (smooth in 2-component vector of float)
+
diff --git a/chromium/third_party/glslang/src/Test/baseResults/always-discard2.frag.out b/chromium/third_party/glslang/src/Test/baseResults/always-discard2.frag.out
new file mode 100644
index 00000000000..72f21d2f00e
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/always-discard2.frag.out
@@ -0,0 +1,121 @@
+always-discard2.frag
+Shader version: 110
+0:? Sequence
+0:4 Function Definition: main( (global void)
+0:4 Function Parameters:
+0:6 Sequence
+0:6 Sequence
+0:6 move second child to first child (temp 4-component vector of float)
+0:6 'white' (temp 4-component vector of float)
+0:6 Constant:
+0:6 1.000000
+0:6 1.000000
+0:6 1.000000
+0:6 1.000000
+0:7 Sequence
+0:7 move second child to first child (temp 4-component vector of float)
+0:7 'black' (temp 4-component vector of float)
+0:7 Constant:
+0:7 0.200000
+0:7 0.200000
+0:7 0.200000
+0:7 0.200000
+0:8 Sequence
+0:8 move second child to first child (temp 4-component vector of float)
+0:8 'color' (temp 4-component vector of float)
+0:8 'white' (temp 4-component vector of float)
+0:11 Sequence
+0:11 move second child to first child (temp float)
+0:11 'x' (temp float)
+0:11 subtract (temp float)
+0:11 component-wise multiply (temp float)
+0:11 direct index (temp float)
+0:11 'tex_coord' (smooth in 2-component vector of float)
+0:11 Constant:
+0:11 0 (const int)
+0:11 Constant:
+0:11 2.000000
+0:11 Constant:
+0:11 1.000000
+0:12 Sequence
+0:12 move second child to first child (temp float)
+0:12 'y' (temp float)
+0:12 subtract (temp float)
+0:12 component-wise multiply (temp float)
+0:12 direct index (temp float)
+0:12 'tex_coord' (smooth in 2-component vector of float)
+0:12 Constant:
+0:12 1 (const int)
+0:12 Constant:
+0:12 2.000000
+0:12 Constant:
+0:12 1.000000
+0:14 Branch: Kill
+0:17 move second child to first child (temp 4-component vector of float)
+0:17 'gl_FragColor' (fragColor 4-component vector of float FragColor)
+0:17 'color' (temp 4-component vector of float)
+0:? Linker Objects
+0:? 'tex_coord' (smooth in 2-component vector of float)
+
+
+Linked fragment stage:
+
+
+Shader version: 110
+0:? Sequence
+0:4 Function Definition: main( (global void)
+0:4 Function Parameters:
+0:6 Sequence
+0:6 Sequence
+0:6 move second child to first child (temp 4-component vector of float)
+0:6 'white' (temp 4-component vector of float)
+0:6 Constant:
+0:6 1.000000
+0:6 1.000000
+0:6 1.000000
+0:6 1.000000
+0:7 Sequence
+0:7 move second child to first child (temp 4-component vector of float)
+0:7 'black' (temp 4-component vector of float)
+0:7 Constant:
+0:7 0.200000
+0:7 0.200000
+0:7 0.200000
+0:7 0.200000
+0:8 Sequence
+0:8 move second child to first child (temp 4-component vector of float)
+0:8 'color' (temp 4-component vector of float)
+0:8 'white' (temp 4-component vector of float)
+0:11 Sequence
+0:11 move second child to first child (temp float)
+0:11 'x' (temp float)
+0:11 subtract (temp float)
+0:11 component-wise multiply (temp float)
+0:11 direct index (temp float)
+0:11 'tex_coord' (smooth in 2-component vector of float)
+0:11 Constant:
+0:11 0 (const int)
+0:11 Constant:
+0:11 2.000000
+0:11 Constant:
+0:11 1.000000
+0:12 Sequence
+0:12 move second child to first child (temp float)
+0:12 'y' (temp float)
+0:12 subtract (temp float)
+0:12 component-wise multiply (temp float)
+0:12 direct index (temp float)
+0:12 'tex_coord' (smooth in 2-component vector of float)
+0:12 Constant:
+0:12 1 (const int)
+0:12 Constant:
+0:12 2.000000
+0:12 Constant:
+0:12 1.000000
+0:14 Branch: Kill
+0:17 move second child to first child (temp 4-component vector of float)
+0:17 'gl_FragColor' (fragColor 4-component vector of float FragColor)
+0:17 'color' (temp 4-component vector of float)
+0:? Linker Objects
+0:? 'tex_coord' (smooth in 2-component vector of float)
+
diff --git a/chromium/third_party/glslang/src/Test/baseResults/array.frag.out b/chromium/third_party/glslang/src/Test/baseResults/array.frag.out
new file mode 100644
index 00000000000..8b3cf807a48
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/array.frag.out
@@ -0,0 +1,530 @@
+array.frag
+ERROR: 0:21: '[' : array index out of range '2'
+ERROR: 0:27: '[' : array must be redeclared with a size before being indexed with a variable
+ERROR: 0:30: 'assign' : cannot convert from 'global 4-element array of float' to 'global 5-element array of float'
+ERROR: 0:31: 'assign' : cannot convert from 'global 4-element array of float' to 'global implicitly-sized array of float'
+ERROR: 0:33: 'foo' : no matching overloaded function found
+ERROR: 0:42: '[' : array index out of range '5'
+ERROR: 0:45: '[' : array index out of range '1000'
+ERROR: 0:46: '[' : index out of range '-1'
+ERROR: 0:52: '[' : array index out of range '2'
+ERROR: 0:54: 'const' : non-matching or non-convertible constant type for const initializer
+ERROR: 0:56: '=' : cannot convert from 'const 2-element array of int' to 'temp 3-element array of int'
+ERROR: 0:57: '[]' : scalar integer expression required
+ERROR: 0:57: '[' : index out of range '-858993459'
+ERROR: 0:58: '[]' : scalar integer expression required
+ERROR: 0:61: '' : array size required
+ERROR: 0:62: '' : array size required
+ERROR: 0:63: '' : array size required
+ERROR: 0:66: '=' : cannot convert from 'temp 3-component vector of float' to 'global float'
+ERROR: 0:76: 'bar' : no matching overloaded function found
+ERROR: 0:79: '' : array size required
+ERROR: 0:84: 'return' : type does not match, or is not convertible to, the function's return type
+ERROR: 0:93: 'length' : array must be declared with a size before using this method
+ERROR: 0:101: '[' : array index out of range '5'
+ERROR: 0:104: 'constructor' : array constructor must have at least one argument
+ERROR: 0:104: '=' : cannot convert from 'const float' to 'global implicitly-sized array of int'
+ERROR: 0:106: 'constructor' : array argument must be sized
+ERROR: 26 compilation errors. No code generated.
+
+
+Shader version: 130
+ERROR: node is still EOpNull!
+0:9 Function Definition: foo(f1[5]; (global 4-element array of float)
+0:9 Function Parameters:
+0:9 'a' (in 5-element array of float)
+0:11 Sequence
+0:11 Branch: Return with expression
+0:11 Construct float (temp 4-element array of float)
+0:11 direct index (temp float)
+0:11 'a' (in 5-element array of float)
+0:11 Constant:
+0:11 0 (const int)
+0:11 direct index (temp float)
+0:11 'a' (in 5-element array of float)
+0:11 Constant:
+0:11 1 (const int)
+0:11 direct index (temp float)
+0:11 'a' (in 5-element array of float)
+0:11 Constant:
+0:11 2 (const int)
+0:11 direct index (temp float)
+0:11 'a' (in 5-element array of float)
+0:11 Constant:
+0:11 3 (const int)
+0:14 Function Definition: bar(f1[5]; (global void)
+0:14 Function Parameters:
+0:14 '' (in 5-element array of float)
+0:16 Function Definition: main( (global void)
+0:16 Function Parameters:
+0:? Sequence
+0:? Sequence
+0:21 move second child to first child (temp float)
+0:21 direct index (temp float)
+0:21 'gu' (temp 2-element array of float)
+0:21 Constant:
+0:21 2 (const int)
+0:21 Constant:
+0:21 4.000000
+0:24 move second child to first child (temp float)
+0:24 direct index (temp float)
+0:24 'gu' (global implicitly-sized array of float)
+0:24 Constant:
+0:24 2 (const int)
+0:24 Constant:
+0:24 4.000000
+0:26 move second child to first child (temp float)
+0:26 direct index (temp float)
+0:26 'gu' (global implicitly-sized array of float)
+0:26 Constant:
+0:26 3 (const int)
+0:26 Constant:
+0:26 3.000000
+0:27 move second child to first child (temp float)
+0:27 indirect index (temp float)
+0:27 'gu' (global implicitly-sized array of float)
+0:27 'a' (uniform int)
+0:27 Constant:
+0:27 5.000000
+0:29 move second child to first child (temp 4-element array of float)
+0:29 'g4' (global 4-element array of float)
+0:29 Function Call: foo(f1[5]; (global 4-element array of float)
+0:29 'g5' (global 5-element array of float)
+0:30 'g5' (global 5-element array of float)
+0:31 'gu' (global implicitly-sized array of float)
+0:33 Constant:
+0:33 0.000000
+0:34 Function Call: bar(f1[5]; (global void)
+0:34 'g5' (global 5-element array of float)
+0:36 Test condition and select (temp void)
+0:36 Condition
+0:36 Compare Equal (temp bool)
+0:36 Constant:
+0:36 1.000000
+0:36 2.000000
+0:36 3.000000
+0:36 4.000000
+0:36 'g4' (global 4-element array of float)
+0:36 true case
+0:37 move second child to first child (temp float)
+0:37 direct index (temp float)
+0:37 'gu' (global implicitly-sized array of float)
+0:37 Constant:
+0:37 0 (const int)
+0:37 Constant:
+0:37 2.000000
+0:40 move second child to first child (temp float)
+0:40 direct index (temp float)
+0:40 'u' (temp 5-element array of float)
+0:40 Constant:
+0:40 2 (const int)
+0:40 Constant:
+0:40 3.000000
+0:42 move second child to first child (temp float)
+0:42 direct index (temp float)
+0:42 'u' (temp 5-element array of float)
+0:42 Constant:
+0:42 5 (const int)
+0:42 Constant:
+0:42 5.000000
+0:43 Function Call: foo(f1[5]; (global 4-element array of float)
+0:43 'u' (temp 5-element array of float)
+0:45 move second child to first child (temp 4-component vector of float)
+0:45 direct index (temp 4-component vector of float FragData)
+0:45 'gl_FragData' (fragColor 32-element array of 4-component vector of float FragData)
+0:45 Constant:
+0:45 1000 (const int)
+0:45 Constant:
+0:45 1.000000
+0:45 1.000000
+0:45 1.000000
+0:45 1.000000
+0:46 move second child to first child (temp 4-component vector of float)
+0:46 direct index (temp 4-component vector of float FragData)
+0:46 'gl_FragData' (fragColor 32-element array of 4-component vector of float FragData)
+0:46 Constant:
+0:46 -1 (const int)
+0:46 Constant:
+0:46 1.000000
+0:46 1.000000
+0:46 1.000000
+0:46 1.000000
+0:47 move second child to first child (temp 4-component vector of float)
+0:47 direct index (temp 4-component vector of float FragData)
+0:47 'gl_FragData' (fragColor 32-element array of 4-component vector of float FragData)
+0:47 Constant:
+0:47 3 (const int)
+0:47 Constant:
+0:47 1.000000
+0:47 1.000000
+0:47 1.000000
+0:47 1.000000
+0:50 Sequence
+0:50 move second child to first child (temp int)
+0:50 'sum' (temp int)
+0:50 Constant:
+0:50 3 (const int)
+0:51 add second child into first child (temp int)
+0:51 'sum' (temp int)
+0:51 Constant:
+0:51 2 (const int)
+0:52 add second child into first child (temp int)
+0:52 'sum' (temp int)
+0:52 Constant:
+0:52 2 (const int)
+0:55 Sequence
+0:55 move second child to first child (temp 2-element array of int)
+0:55 'ica' (temp 2-element array of int)
+0:55 Constant:
+0:55 3 (const int)
+0:55 2 (const int)
+0:57 move second child to first child (temp int)
+0:57 direct index (temp int)
+0:57 'ica' (temp 2-element array of int)
+0:57 Constant:
+0:57 3.100000
+0:57 Constant:
+0:57 3 (const int)
+0:58 move second child to first child (temp int)
+0:58 indirect index (temp int)
+0:58 'ica' (temp 2-element array of int)
+0:58 direct index (temp float)
+0:58 'u' (temp 5-element array of float)
+0:58 Constant:
+0:58 1 (const int)
+0:58 Constant:
+0:58 4 (const int)
+0:68 Function Definition: foo( (global void)
+0:68 Function Parameters:
+0:? Sequence
+0:71 move second child to first child (temp int)
+0:71 direct index (temp int)
+0:71 'uns' (temp implicitly-sized array of int)
+0:71 Constant:
+0:71 3 (const int)
+0:71 Constant:
+0:71 40 (const int)
+0:72 move second child to first child (temp int)
+0:72 direct index (temp int)
+0:72 'uns' (temp implicitly-sized array of int)
+0:72 Constant:
+0:72 1 (const int)
+0:72 Constant:
+0:72 30 (const int)
+0:73 move second child to first child (temp 3-component vector of float)
+0:73 direct index (temp 3-component vector of float)
+0:73 'guns' (global implicitly-sized array of 3-component vector of float)
+0:73 Constant:
+0:73 2 (const int)
+0:73 Constant:
+0:73 2.400000
+0:73 2.400000
+0:73 2.400000
+0:76 Constant:
+0:76 0.000000
+0:79 Function Definition: foo2( (global implicitly-sized array of float)
+0:79 Function Parameters:
+0:? Sequence
+0:82 Branch: Return with expression
+0:82 'f' (temp implicitly-sized array of float)
+0:84 Branch: Return with expression
+0:84 'g' (temp 9-element array of float)
+0:89 Function Definition: foo3( (global void)
+0:89 Function Parameters:
+0:? Sequence
+0:92 move second child to first child (temp float)
+0:92 direct index (temp float)
+0:92 'resize1' (temp 3-element array of float)
+0:92 Constant:
+0:92 2 (const int)
+0:92 Constant:
+0:92 4.000000
+0:93 Constant:
+0:93 1 (const int)
+0:95 Constant:
+0:95 3 (const int)
+0:98 move second child to first child (temp float)
+0:98 direct index (temp float)
+0:98 'resize2' (temp 5-element array of float)
+0:98 Constant:
+0:98 5 (const int)
+0:98 Constant:
+0:98 4.000000
+0:100 Constant:
+0:100 5 (const int)
+0:101 move second child to first child (temp float)
+0:101 direct index (temp float)
+0:101 'resize2' (temp 5-element array of float)
+0:101 Constant:
+0:101 5 (const int)
+0:101 Constant:
+0:101 4.000000
+0:106 Sequence
+0:106 move second child to first child (temp float)
+0:106 'b' (global float)
+0:106 Constant:
+0:106 0.000000
+0:? Linker Objects
+0:? 'gu' (global implicitly-sized array of float)
+0:? 'g4' (global 4-element array of float)
+0:? 'g5' (global 5-element array of float)
+0:? 'a' (uniform int)
+0:? 'guns' (global implicitly-sized array of 3-component vector of float)
+0:? 'f' (global float)
+0:? 'gUnusedUnsized' (global implicitly-sized array of float)
+0:? 'i' (global implicitly-sized array of int)
+0:? 'emptyA' (global implicitly-sized array of float)
+0:? 'b' (global float)
+
+
+Linked fragment stage:
+
+
+Shader version: 130
+ERROR: node is still EOpNull!
+0:9 Function Definition: foo(f1[5]; (global 4-element array of float)
+0:9 Function Parameters:
+0:9 'a' (in 5-element array of float)
+0:11 Sequence
+0:11 Branch: Return with expression
+0:11 Construct float (temp 4-element array of float)
+0:11 direct index (temp float)
+0:11 'a' (in 5-element array of float)
+0:11 Constant:
+0:11 0 (const int)
+0:11 direct index (temp float)
+0:11 'a' (in 5-element array of float)
+0:11 Constant:
+0:11 1 (const int)
+0:11 direct index (temp float)
+0:11 'a' (in 5-element array of float)
+0:11 Constant:
+0:11 2 (const int)
+0:11 direct index (temp float)
+0:11 'a' (in 5-element array of float)
+0:11 Constant:
+0:11 3 (const int)
+0:14 Function Definition: bar(f1[5]; (global void)
+0:14 Function Parameters:
+0:14 '' (in 5-element array of float)
+0:16 Function Definition: main( (global void)
+0:16 Function Parameters:
+0:? Sequence
+0:? Sequence
+0:21 move second child to first child (temp float)
+0:21 direct index (temp float)
+0:21 'gu' (temp 2-element array of float)
+0:21 Constant:
+0:21 2 (const int)
+0:21 Constant:
+0:21 4.000000
+0:24 move second child to first child (temp float)
+0:24 direct index (temp float)
+0:24 'gu' (global 4-element array of float)
+0:24 Constant:
+0:24 2 (const int)
+0:24 Constant:
+0:24 4.000000
+0:26 move second child to first child (temp float)
+0:26 direct index (temp float)
+0:26 'gu' (global 4-element array of float)
+0:26 Constant:
+0:26 3 (const int)
+0:26 Constant:
+0:26 3.000000
+0:27 move second child to first child (temp float)
+0:27 indirect index (temp float)
+0:27 'gu' (global 4-element array of float)
+0:27 'a' (uniform int)
+0:27 Constant:
+0:27 5.000000
+0:29 move second child to first child (temp 4-element array of float)
+0:29 'g4' (global 4-element array of float)
+0:29 Function Call: foo(f1[5]; (global 4-element array of float)
+0:29 'g5' (global 5-element array of float)
+0:30 'g5' (global 5-element array of float)
+0:31 'gu' (global 4-element array of float)
+0:33 Constant:
+0:33 0.000000
+0:34 Function Call: bar(f1[5]; (global void)
+0:34 'g5' (global 5-element array of float)
+0:36 Test condition and select (temp void)
+0:36 Condition
+0:36 Compare Equal (temp bool)
+0:36 Constant:
+0:36 1.000000
+0:36 2.000000
+0:36 3.000000
+0:36 4.000000
+0:36 'g4' (global 4-element array of float)
+0:36 true case
+0:37 move second child to first child (temp float)
+0:37 direct index (temp float)
+0:37 'gu' (global 4-element array of float)
+0:37 Constant:
+0:37 0 (const int)
+0:37 Constant:
+0:37 2.000000
+0:40 move second child to first child (temp float)
+0:40 direct index (temp float)
+0:40 'u' (temp 5-element array of float)
+0:40 Constant:
+0:40 2 (const int)
+0:40 Constant:
+0:40 3.000000
+0:42 move second child to first child (temp float)
+0:42 direct index (temp float)
+0:42 'u' (temp 5-element array of float)
+0:42 Constant:
+0:42 5 (const int)
+0:42 Constant:
+0:42 5.000000
+0:43 Function Call: foo(f1[5]; (global 4-element array of float)
+0:43 'u' (temp 5-element array of float)
+0:45 move second child to first child (temp 4-component vector of float)
+0:45 direct index (temp 4-component vector of float FragData)
+0:45 'gl_FragData' (fragColor 32-element array of 4-component vector of float FragData)
+0:45 Constant:
+0:45 1000 (const int)
+0:45 Constant:
+0:45 1.000000
+0:45 1.000000
+0:45 1.000000
+0:45 1.000000
+0:46 move second child to first child (temp 4-component vector of float)
+0:46 direct index (temp 4-component vector of float FragData)
+0:46 'gl_FragData' (fragColor 32-element array of 4-component vector of float FragData)
+0:46 Constant:
+0:46 -1 (const int)
+0:46 Constant:
+0:46 1.000000
+0:46 1.000000
+0:46 1.000000
+0:46 1.000000
+0:47 move second child to first child (temp 4-component vector of float)
+0:47 direct index (temp 4-component vector of float FragData)
+0:47 'gl_FragData' (fragColor 32-element array of 4-component vector of float FragData)
+0:47 Constant:
+0:47 3 (const int)
+0:47 Constant:
+0:47 1.000000
+0:47 1.000000
+0:47 1.000000
+0:47 1.000000
+0:50 Sequence
+0:50 move second child to first child (temp int)
+0:50 'sum' (temp int)
+0:50 Constant:
+0:50 3 (const int)
+0:51 add second child into first child (temp int)
+0:51 'sum' (temp int)
+0:51 Constant:
+0:51 2 (const int)
+0:52 add second child into first child (temp int)
+0:52 'sum' (temp int)
+0:52 Constant:
+0:52 2 (const int)
+0:55 Sequence
+0:55 move second child to first child (temp 2-element array of int)
+0:55 'ica' (temp 2-element array of int)
+0:55 Constant:
+0:55 3 (const int)
+0:55 2 (const int)
+0:57 move second child to first child (temp int)
+0:57 direct index (temp int)
+0:57 'ica' (temp 2-element array of int)
+0:57 Constant:
+0:57 3.100000
+0:57 Constant:
+0:57 3 (const int)
+0:58 move second child to first child (temp int)
+0:58 indirect index (temp int)
+0:58 'ica' (temp 2-element array of int)
+0:58 direct index (temp float)
+0:58 'u' (temp 5-element array of float)
+0:58 Constant:
+0:58 1 (const int)
+0:58 Constant:
+0:58 4 (const int)
+0:68 Function Definition: foo( (global void)
+0:68 Function Parameters:
+0:? Sequence
+0:71 move second child to first child (temp int)
+0:71 direct index (temp int)
+0:71 'uns' (temp 4-element array of int)
+0:71 Constant:
+0:71 3 (const int)
+0:71 Constant:
+0:71 40 (const int)
+0:72 move second child to first child (temp int)
+0:72 direct index (temp int)
+0:72 'uns' (temp 4-element array of int)
+0:72 Constant:
+0:72 1 (const int)
+0:72 Constant:
+0:72 30 (const int)
+0:73 move second child to first child (temp 3-component vector of float)
+0:73 direct index (temp 3-component vector of float)
+0:73 'guns' (global 8-element array of 3-component vector of float)
+0:73 Constant:
+0:73 2 (const int)
+0:73 Constant:
+0:73 2.400000
+0:73 2.400000
+0:73 2.400000
+0:76 Constant:
+0:76 0.000000
+0:79 Function Definition: foo2( (global implicitly-sized array of float)
+0:79 Function Parameters:
+0:? Sequence
+0:82 Branch: Return with expression
+0:82 'f' (temp 1-element array of float)
+0:84 Branch: Return with expression
+0:84 'g' (temp 9-element array of float)
+0:89 Function Definition: foo3( (global void)
+0:89 Function Parameters:
+0:? Sequence
+0:92 move second child to first child (temp float)
+0:92 direct index (temp float)
+0:92 'resize1' (temp 3-element array of float)
+0:92 Constant:
+0:92 2 (const int)
+0:92 Constant:
+0:92 4.000000
+0:93 Constant:
+0:93 1 (const int)
+0:95 Constant:
+0:95 3 (const int)
+0:98 move second child to first child (temp float)
+0:98 direct index (temp float)
+0:98 'resize2' (temp 5-element array of float)
+0:98 Constant:
+0:98 5 (const int)
+0:98 Constant:
+0:98 4.000000
+0:100 Constant:
+0:100 5 (const int)
+0:101 move second child to first child (temp float)
+0:101 direct index (temp float)
+0:101 'resize2' (temp 5-element array of float)
+0:101 Constant:
+0:101 5 (const int)
+0:101 Constant:
+0:101 4.000000
+0:106 Sequence
+0:106 move second child to first child (temp float)
+0:106 'b' (global float)
+0:106 Constant:
+0:106 0.000000
+0:? Linker Objects
+0:? 'gu' (global 4-element array of float)
+0:? 'g4' (global 4-element array of float)
+0:? 'g5' (global 5-element array of float)
+0:? 'a' (uniform int)
+0:? 'guns' (global 8-element array of 3-component vector of float)
+0:? 'f' (global float)
+0:? 'gUnusedUnsized' (global 1-element array of float)
+0:? 'i' (global 1-element array of int)
+0:? 'emptyA' (global 1-element array of float)
+0:? 'b' (global float)
+
diff --git a/chromium/third_party/glslang/src/Test/baseResults/array100.frag.out b/chromium/third_party/glslang/src/Test/baseResults/array100.frag.out
new file mode 100644
index 00000000000..b44f6a02cbc
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/array100.frag.out
@@ -0,0 +1,296 @@
+array100.frag
+ERROR: 0:3: 'float' : type requires declaration of default precision qualifier
+ERROR: 0:3: '' : array size required
+ERROR: 0:9: 'arrayed type' : not supported for this version or the enabled extensions
+ERROR: 0:9: 'arrayed type' : not supported for this version or the enabled extensions
+ERROR: 0:9: 'array in function return type' : not supported for this version or the enabled extensions
+ERROR: 0:11: 'arrayed constructor' : not supported for this version or the enabled extensions
+ERROR: 0:21: '[' : array index out of range '2'
+ERROR: 0:24: 'array assignment' : not supported for this version or the enabled extensions
+ERROR: 0:25: 'array assignment' : not supported for this version or the enabled extensions
+ERROR: 0:25: 'assign' : cannot convert from 'global 4-element array of mediump float' to 'global 5-element array of mediump float'
+ERROR: 0:26: 'array assignment' : not supported for this version or the enabled extensions
+ERROR: 0:26: 'assign' : cannot convert from 'global 4-element array of mediump float' to 'global implicitly-sized array of mediump float'
+ERROR: 0:28: 'foo' : no matching overloaded function found
+ERROR: 0:31: 'arrayed constructor' : not supported for this version or the enabled extensions
+ERROR: 0:31: 'array comparison' : not supported for this version or the enabled extensions
+ERROR: 0:35: '[' : array index out of range '5'
+ERROR: 0:38: '[' : array index out of range '1000'
+ERROR: 0:39: '[' : index out of range '-1'
+ERROR: 0:53: 'array in function return type' : not supported for this version or the enabled extensions
+ERROR: 0:66: 'array assignment' : not supported for this version or the enabled extensions
+ERROR: 0:68: 'array assignment' : not supported for this version or the enabled extensions
+ERROR: 0:69: 'array initializer' : not supported for this version or the enabled extensions
+ERROR: 22 compilation errors. No code generated.
+
+
+Shader version: 100
+ERROR: node is still EOpNull!
+0:9 Function Definition: foo(f1[5]; (global 4-element array of mediump float)
+0:9 Function Parameters:
+0:9 'a' (in 5-element array of mediump float)
+0:11 Sequence
+0:11 Branch: Return with expression
+0:11 Construct float (temp 4-element array of float)
+0:11 direct index (temp mediump float)
+0:11 'a' (in 5-element array of mediump float)
+0:11 Constant:
+0:11 0 (const int)
+0:11 direct index (temp mediump float)
+0:11 'a' (in 5-element array of mediump float)
+0:11 Constant:
+0:11 1 (const int)
+0:11 direct index (temp mediump float)
+0:11 'a' (in 5-element array of mediump float)
+0:11 Constant:
+0:11 2 (const int)
+0:11 direct index (temp mediump float)
+0:11 'a' (in 5-element array of mediump float)
+0:11 Constant:
+0:11 3 (const int)
+0:14 Function Definition: bar(f1[5]; (global void)
+0:14 Function Parameters:
+0:14 '' (in 5-element array of mediump float)
+0:16 Function Definition: main( (global void)
+0:16 Function Parameters:
+0:? Sequence
+0:? Sequence
+0:21 move second child to first child (temp mediump float)
+0:21 direct index (temp mediump float)
+0:21 'gu' (temp 2-element array of mediump float)
+0:21 Constant:
+0:21 2 (const int)
+0:21 Constant:
+0:21 4.000000
+0:24 move second child to first child (temp 4-element array of mediump float)
+0:24 'g4' (global 4-element array of mediump float)
+0:24 Function Call: foo(f1[5]; (global 4-element array of mediump float)
+0:24 'g5' (global 5-element array of mediump float)
+0:25 'g5' (global 5-element array of mediump float)
+0:26 'gu' (global implicitly-sized array of mediump float)
+0:28 Constant:
+0:28 0.000000
+0:29 Function Call: bar(f1[5]; (global void)
+0:29 'g5' (global 5-element array of mediump float)
+0:31 Test condition and select (temp void)
+0:31 Condition
+0:31 Compare Equal (temp bool)
+0:31 Constant:
+0:31 1.000000
+0:31 2.000000
+0:31 3.000000
+0:31 4.000000
+0:31 'g4' (global 4-element array of mediump float)
+0:31 true case
+0:32 move second child to first child (temp mediump float)
+0:32 direct index (temp mediump float)
+0:32 'gu' (global implicitly-sized array of mediump float)
+0:32 Constant:
+0:32 0 (const int)
+0:32 Constant:
+0:32 2.000000
+0:35 move second child to first child (temp mediump float)
+0:35 direct index (temp mediump float)
+0:35 'u' (temp 5-element array of mediump float)
+0:35 Constant:
+0:35 5 (const int)
+0:35 Constant:
+0:35 5.000000
+0:36 Function Call: foo(f1[5]; (global 4-element array of mediump float)
+0:36 'u' (temp 5-element array of mediump float)
+0:38 move second child to first child (temp mediump 4-component vector of float)
+0:38 direct index (temp mediump 4-component vector of float FragData)
+0:38 'gl_FragData' (fragColor 32-element array of mediump 4-component vector of float FragData)
+0:38 Constant:
+0:38 1000 (const int)
+0:38 Constant:
+0:38 1.000000
+0:38 1.000000
+0:38 1.000000
+0:38 1.000000
+0:39 move second child to first child (temp mediump 4-component vector of float)
+0:39 direct index (temp mediump 4-component vector of float FragData)
+0:39 'gl_FragData' (fragColor 32-element array of mediump 4-component vector of float FragData)
+0:39 Constant:
+0:39 -1 (const int)
+0:39 Constant:
+0:39 1.000000
+0:39 1.000000
+0:39 1.000000
+0:39 1.000000
+0:40 move second child to first child (temp mediump 4-component vector of float)
+0:40 direct index (temp mediump 4-component vector of float FragData)
+0:40 'gl_FragData' (fragColor 32-element array of mediump 4-component vector of float FragData)
+0:40 Constant:
+0:40 3 (const int)
+0:40 Constant:
+0:40 1.000000
+0:40 1.000000
+0:40 1.000000
+0:40 1.000000
+0:53 Function Definition: bar9( (global structure{global mediump 4-component vector of float v4, global structure{global mediump 3-component vector of float v3, global 4-element array of mediump 2-component vector of float v2} sa})
+0:53 Function Parameters:
+0:? Sequence
+0:56 Branch: Return with expression
+0:56 's' (temp structure{global mediump 4-component vector of float v4, global structure{global mediump 3-component vector of float v3, global 4-element array of mediump 2-component vector of float v2} sa})
+0:59 Function Definition: bar10(struct-SB-vf4-struct-SA-vf3-vf2[4]11; (global void)
+0:59 Function Parameters:
+0:59 's' (in structure{global mediump 4-component vector of float v4, global structure{global mediump 3-component vector of float v3, global 4-element array of mediump 2-component vector of float v2} sa})
+0:63 Function Definition: bar11( (global void)
+0:63 Function Parameters:
+0:? Sequence
+0:66 move second child to first child (temp structure{global mediump 4-component vector of float v4, global structure{global mediump 3-component vector of float v3, global 4-element array of mediump 2-component vector of float v2} sa})
+0:66 's1' (temp structure{global mediump 4-component vector of float v4, global structure{global mediump 3-component vector of float v3, global 4-element array of mediump 2-component vector of float v2} sa})
+0:66 's2' (temp structure{global mediump 4-component vector of float v4, global structure{global mediump 3-component vector of float v3, global 4-element array of mediump 2-component vector of float v2} sa})
+0:67 Function Call: bar10(struct-SB-vf4-struct-SA-vf3-vf2[4]11; (global void)
+0:67 's1' (temp structure{global mediump 4-component vector of float v4, global structure{global mediump 3-component vector of float v3, global 4-element array of mediump 2-component vector of float v2} sa})
+0:68 move second child to first child (temp structure{global mediump 4-component vector of float v4, global structure{global mediump 3-component vector of float v3, global 4-element array of mediump 2-component vector of float v2} sa})
+0:68 's2' (temp structure{global mediump 4-component vector of float v4, global structure{global mediump 3-component vector of float v3, global 4-element array of mediump 2-component vector of float v2} sa})
+0:68 Function Call: bar9( (global structure{global mediump 4-component vector of float v4, global structure{global mediump 3-component vector of float v3, global 4-element array of mediump 2-component vector of float v2} sa})
+0:69 Sequence
+0:69 move second child to first child (temp structure{global mediump 4-component vector of float v4, global structure{global mediump 3-component vector of float v3, global 4-element array of mediump 2-component vector of float v2} sa})
+0:69 'initSb' (temp structure{global mediump 4-component vector of float v4, global structure{global mediump 3-component vector of float v3, global 4-element array of mediump 2-component vector of float v2} sa})
+0:69 's1' (temp structure{global mediump 4-component vector of float v4, global structure{global mediump 3-component vector of float v3, global 4-element array of mediump 2-component vector of float v2} sa})
+0:? Linker Objects
+0:? 'gu' (global implicitly-sized array of mediump float)
+0:? 'g4' (global 4-element array of mediump float)
+0:? 'g5' (global 5-element array of mediump float)
+0:? 'a' (uniform mediump int)
+
+
+Linked fragment stage:
+
+
+Shader version: 100
+ERROR: node is still EOpNull!
+0:9 Function Definition: foo(f1[5]; (global 4-element array of mediump float)
+0:9 Function Parameters:
+0:9 'a' (in 5-element array of mediump float)
+0:11 Sequence
+0:11 Branch: Return with expression
+0:11 Construct float (temp 4-element array of float)
+0:11 direct index (temp mediump float)
+0:11 'a' (in 5-element array of mediump float)
+0:11 Constant:
+0:11 0 (const int)
+0:11 direct index (temp mediump float)
+0:11 'a' (in 5-element array of mediump float)
+0:11 Constant:
+0:11 1 (const int)
+0:11 direct index (temp mediump float)
+0:11 'a' (in 5-element array of mediump float)
+0:11 Constant:
+0:11 2 (const int)
+0:11 direct index (temp mediump float)
+0:11 'a' (in 5-element array of mediump float)
+0:11 Constant:
+0:11 3 (const int)
+0:14 Function Definition: bar(f1[5]; (global void)
+0:14 Function Parameters:
+0:14 '' (in 5-element array of mediump float)
+0:16 Function Definition: main( (global void)
+0:16 Function Parameters:
+0:? Sequence
+0:? Sequence
+0:21 move second child to first child (temp mediump float)
+0:21 direct index (temp mediump float)
+0:21 'gu' (temp 2-element array of mediump float)
+0:21 Constant:
+0:21 2 (const int)
+0:21 Constant:
+0:21 4.000000
+0:24 move second child to first child (temp 4-element array of mediump float)
+0:24 'g4' (global 4-element array of mediump float)
+0:24 Function Call: foo(f1[5]; (global 4-element array of mediump float)
+0:24 'g5' (global 5-element array of mediump float)
+0:25 'g5' (global 5-element array of mediump float)
+0:26 'gu' (global 1-element array of mediump float)
+0:28 Constant:
+0:28 0.000000
+0:29 Function Call: bar(f1[5]; (global void)
+0:29 'g5' (global 5-element array of mediump float)
+0:31 Test condition and select (temp void)
+0:31 Condition
+0:31 Compare Equal (temp bool)
+0:31 Constant:
+0:31 1.000000
+0:31 2.000000
+0:31 3.000000
+0:31 4.000000
+0:31 'g4' (global 4-element array of mediump float)
+0:31 true case
+0:32 move second child to first child (temp mediump float)
+0:32 direct index (temp mediump float)
+0:32 'gu' (global 1-element array of mediump float)
+0:32 Constant:
+0:32 0 (const int)
+0:32 Constant:
+0:32 2.000000
+0:35 move second child to first child (temp mediump float)
+0:35 direct index (temp mediump float)
+0:35 'u' (temp 5-element array of mediump float)
+0:35 Constant:
+0:35 5 (const int)
+0:35 Constant:
+0:35 5.000000
+0:36 Function Call: foo(f1[5]; (global 4-element array of mediump float)
+0:36 'u' (temp 5-element array of mediump float)
+0:38 move second child to first child (temp mediump 4-component vector of float)
+0:38 direct index (temp mediump 4-component vector of float FragData)
+0:38 'gl_FragData' (fragColor 32-element array of mediump 4-component vector of float FragData)
+0:38 Constant:
+0:38 1000 (const int)
+0:38 Constant:
+0:38 1.000000
+0:38 1.000000
+0:38 1.000000
+0:38 1.000000
+0:39 move second child to first child (temp mediump 4-component vector of float)
+0:39 direct index (temp mediump 4-component vector of float FragData)
+0:39 'gl_FragData' (fragColor 32-element array of mediump 4-component vector of float FragData)
+0:39 Constant:
+0:39 -1 (const int)
+0:39 Constant:
+0:39 1.000000
+0:39 1.000000
+0:39 1.000000
+0:39 1.000000
+0:40 move second child to first child (temp mediump 4-component vector of float)
+0:40 direct index (temp mediump 4-component vector of float FragData)
+0:40 'gl_FragData' (fragColor 32-element array of mediump 4-component vector of float FragData)
+0:40 Constant:
+0:40 3 (const int)
+0:40 Constant:
+0:40 1.000000
+0:40 1.000000
+0:40 1.000000
+0:40 1.000000
+0:53 Function Definition: bar9( (global structure{global mediump 4-component vector of float v4, global structure{global mediump 3-component vector of float v3, global 4-element array of mediump 2-component vector of float v2} sa})
+0:53 Function Parameters:
+0:? Sequence
+0:56 Branch: Return with expression
+0:56 's' (temp structure{global mediump 4-component vector of float v4, global structure{global mediump 3-component vector of float v3, global 4-element array of mediump 2-component vector of float v2} sa})
+0:59 Function Definition: bar10(struct-SB-vf4-struct-SA-vf3-vf2[4]11; (global void)
+0:59 Function Parameters:
+0:59 's' (in structure{global mediump 4-component vector of float v4, global structure{global mediump 3-component vector of float v3, global 4-element array of mediump 2-component vector of float v2} sa})
+0:63 Function Definition: bar11( (global void)
+0:63 Function Parameters:
+0:? Sequence
+0:66 move second child to first child (temp structure{global mediump 4-component vector of float v4, global structure{global mediump 3-component vector of float v3, global 4-element array of mediump 2-component vector of float v2} sa})
+0:66 's1' (temp structure{global mediump 4-component vector of float v4, global structure{global mediump 3-component vector of float v3, global 4-element array of mediump 2-component vector of float v2} sa})
+0:66 's2' (temp structure{global mediump 4-component vector of float v4, global structure{global mediump 3-component vector of float v3, global 4-element array of mediump 2-component vector of float v2} sa})
+0:67 Function Call: bar10(struct-SB-vf4-struct-SA-vf3-vf2[4]11; (global void)
+0:67 's1' (temp structure{global mediump 4-component vector of float v4, global structure{global mediump 3-component vector of float v3, global 4-element array of mediump 2-component vector of float v2} sa})
+0:68 move second child to first child (temp structure{global mediump 4-component vector of float v4, global structure{global mediump 3-component vector of float v3, global 4-element array of mediump 2-component vector of float v2} sa})
+0:68 's2' (temp structure{global mediump 4-component vector of float v4, global structure{global mediump 3-component vector of float v3, global 4-element array of mediump 2-component vector of float v2} sa})
+0:68 Function Call: bar9( (global structure{global mediump 4-component vector of float v4, global structure{global mediump 3-component vector of float v3, global 4-element array of mediump 2-component vector of float v2} sa})
+0:69 Sequence
+0:69 move second child to first child (temp structure{global mediump 4-component vector of float v4, global structure{global mediump 3-component vector of float v3, global 4-element array of mediump 2-component vector of float v2} sa})
+0:69 'initSb' (temp structure{global mediump 4-component vector of float v4, global structure{global mediump 3-component vector of float v3, global 4-element array of mediump 2-component vector of float v2} sa})
+0:69 's1' (temp structure{global mediump 4-component vector of float v4, global structure{global mediump 3-component vector of float v3, global 4-element array of mediump 2-component vector of float v2} sa})
+0:? Linker Objects
+0:? 'gu' (global 1-element array of mediump float)
+0:? 'g4' (global 4-element array of mediump float)
+0:? 'g5' (global 5-element array of mediump float)
+0:? 'a' (uniform mediump int)
+
diff --git a/chromium/third_party/glslang/src/Test/baseResults/atomic_uint.frag.out b/chromium/third_party/glslang/src/Test/baseResults/atomic_uint.frag.out
new file mode 100644
index 00000000000..4d05756ca07
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/atomic_uint.frag.out
@@ -0,0 +1,145 @@
+atomic_uint.frag
+Warning, version 420 is not yet complete; most version-specific features are present, but some are missing.
+ERROR: 0:10: 'atomic_uint' : samplers and atomic_uints cannot be output parameters
+ERROR: 0:12: 'return' : type does not match, or is not convertible to, the function's return type
+ERROR: 0:18: 'atomic_uint' : atomic_uints can only be used in uniform variables or function parameters: non_uniform_counter
+ERROR: 0:18: 'atomic_uint' : layout(binding=X) is required
+ERROR: 0:23: 'binding' : atomic_uint binding is too large; see gl_MaxAtomicCounterBindings
+ERROR: 0:28: '+' : wrong operand types: no operation '+' exists that takes a left-hand operand of type 'layout(binding=0 offset=0 ) uniform atomic_uint' and a right operand of type 'layout(binding=0 offset=0 ) uniform atomic_uint' (or there is no acceptable conversion)
+ERROR: 0:29: '-' : wrong operand type no operation '-' exists that takes an operand of type layout(binding=0 offset=0 ) uniform atomic_uint (or there is no acceptable conversion)
+ERROR: 0:31: '[]' : scalar integer expression required
+ERROR: 0:34: 'assign' : l-value required "counter" (can't modify a uniform)
+ERROR: 0:34: 'assign' : cannot convert from 'const int' to 'layout(binding=0 offset=0 ) uniform atomic_uint'
+ERROR: 0:37: 'atomic_uint' : atomic_uints can only be used in uniform variables or function parameters: acin
+ERROR: 0:37: 'atomic_uint' : layout(binding=X) is required
+ERROR: 0:38: 'atomic_uint' : atomic_uints can only be used in uniform variables or function parameters: acg
+ERROR: 0:38: 'atomic_uint' : layout(binding=X) is required
+ERROR: 0:40: 'atomic_uint' : layout(binding=X) is required
+ERROR: 0:46: 'atomic_uint' : layout(binding=X) is required
+ERROR: 0:47: 'offset' : atomic counters sharing the same offset: 12
+ERROR: 0:48: 'binding' : atomic_uint binding is too large; see gl_MaxAtomicCounterBindings
+ERROR: 18 compilation errors. No code generated.
+
+
+Shader version: 420
+ERROR: node is still EOpNull!
+0:5 Function Definition: func(au1; (global uint)
+0:5 Function Parameters:
+0:5 'c' (in atomic_uint)
+0:7 Sequence
+0:7 Branch: Return with expression
+0:7 AtomicCounterIncrement (global uint)
+0:7 'c' (in atomic_uint)
+0:10 Function Definition: func2(au1; (global uint)
+0:10 Function Parameters:
+0:10 'c' (out atomic_uint)
+0:12 Sequence
+0:12 Branch: Return with expression
+0:12 'counter' (layout(binding=0 offset=0 ) uniform atomic_uint)
+0:13 Branch: Return with expression
+0:13 AtomicCounter (global uint)
+0:13 'counter' (layout(binding=0 offset=0 ) uniform atomic_uint)
+0:16 Function Definition: main( (global void)
+0:16 Function Parameters:
+0:? Sequence
+0:19 Sequence
+0:19 move second child to first child (temp uint)
+0:19 'val' (temp uint)
+0:19 AtomicCounter (global uint)
+0:19 'counter' (layout(binding=0 offset=0 ) uniform atomic_uint)
+0:20 AtomicCounterDecrement (global uint)
+0:20 'counter' (layout(binding=0 offset=0 ) uniform atomic_uint)
+0:26 Function Definition: opac( (global void)
+0:26 Function Parameters:
+0:28 Sequence
+0:28 'counter' (layout(binding=0 offset=0 ) uniform atomic_uint)
+0:29 'counter' (layout(binding=0 offset=0 ) uniform atomic_uint)
+0:31 indirect index (temp int)
+0:31 'a' (temp 3-element array of int)
+0:31 'counter' (layout(binding=0 offset=0 ) uniform atomic_uint)
+0:32 direct index (layout(binding=1 offset=3 ) temp atomic_uint)
+0:32 'countArr' (layout(binding=1 offset=3 ) uniform 4-element array of atomic_uint)
+0:32 Constant:
+0:32 2 (const int)
+0:33 indirect index (layout(binding=1 offset=3 ) temp atomic_uint)
+0:33 'countArr' (layout(binding=1 offset=3 ) uniform 4-element array of atomic_uint)
+0:33 'i' (uniform int)
+0:34 'counter' (layout(binding=0 offset=0 ) uniform atomic_uint)
+0:? Linker Objects
+0:? 'counter' (layout(binding=0 offset=0 ) uniform atomic_uint)
+0:? 'countArr' (layout(binding=1 offset=3 ) uniform 4-element array of atomic_uint)
+0:? 'i' (uniform int)
+0:? 'acin' (smooth in atomic_uint)
+0:? 'acg' (global atomic_uint)
+0:? 'aNoBind' (uniform atomic_uint)
+0:? 'aOffset' (layout(binding=0 offset=32 ) uniform atomic_uint)
+0:? 'bar3' (layout(binding=0 offset=4 ) uniform atomic_uint)
+0:? 'ac' (layout(binding=0 offset=8 ) uniform 3-element array of atomic_uint)
+0:? 'ad' (layout(binding=0 offset=20 ) uniform atomic_uint)
+0:? 'bar4' (layout(offset=8 ) uniform atomic_uint)
+0:? 'overlap' (layout(binding=0 offset=12 ) uniform atomic_uint)
+0:? 'bigBind' (layout(binding=20 ) uniform atomic_uint)
+
+
+Linked fragment stage:
+
+
+Shader version: 420
+ERROR: node is still EOpNull!
+0:5 Function Definition: func(au1; (global uint)
+0:5 Function Parameters:
+0:5 'c' (in atomic_uint)
+0:7 Sequence
+0:7 Branch: Return with expression
+0:7 AtomicCounterIncrement (global uint)
+0:7 'c' (in atomic_uint)
+0:10 Function Definition: func2(au1; (global uint)
+0:10 Function Parameters:
+0:10 'c' (out atomic_uint)
+0:12 Sequence
+0:12 Branch: Return with expression
+0:12 'counter' (layout(binding=0 offset=0 ) uniform atomic_uint)
+0:13 Branch: Return with expression
+0:13 AtomicCounter (global uint)
+0:13 'counter' (layout(binding=0 offset=0 ) uniform atomic_uint)
+0:16 Function Definition: main( (global void)
+0:16 Function Parameters:
+0:? Sequence
+0:19 Sequence
+0:19 move second child to first child (temp uint)
+0:19 'val' (temp uint)
+0:19 AtomicCounter (global uint)
+0:19 'counter' (layout(binding=0 offset=0 ) uniform atomic_uint)
+0:20 AtomicCounterDecrement (global uint)
+0:20 'counter' (layout(binding=0 offset=0 ) uniform atomic_uint)
+0:26 Function Definition: opac( (global void)
+0:26 Function Parameters:
+0:28 Sequence
+0:28 'counter' (layout(binding=0 offset=0 ) uniform atomic_uint)
+0:29 'counter' (layout(binding=0 offset=0 ) uniform atomic_uint)
+0:31 indirect index (temp int)
+0:31 'a' (temp 3-element array of int)
+0:31 'counter' (layout(binding=0 offset=0 ) uniform atomic_uint)
+0:32 direct index (layout(binding=1 offset=3 ) temp atomic_uint)
+0:32 'countArr' (layout(binding=1 offset=3 ) uniform 4-element array of atomic_uint)
+0:32 Constant:
+0:32 2 (const int)
+0:33 indirect index (layout(binding=1 offset=3 ) temp atomic_uint)
+0:33 'countArr' (layout(binding=1 offset=3 ) uniform 4-element array of atomic_uint)
+0:33 'i' (uniform int)
+0:34 'counter' (layout(binding=0 offset=0 ) uniform atomic_uint)
+0:? Linker Objects
+0:? 'counter' (layout(binding=0 offset=0 ) uniform atomic_uint)
+0:? 'countArr' (layout(binding=1 offset=3 ) uniform 4-element array of atomic_uint)
+0:? 'i' (uniform int)
+0:? 'acin' (smooth in atomic_uint)
+0:? 'acg' (global atomic_uint)
+0:? 'aNoBind' (uniform atomic_uint)
+0:? 'aOffset' (layout(binding=0 offset=32 ) uniform atomic_uint)
+0:? 'bar3' (layout(binding=0 offset=4 ) uniform atomic_uint)
+0:? 'ac' (layout(binding=0 offset=8 ) uniform 3-element array of atomic_uint)
+0:? 'ad' (layout(binding=0 offset=20 ) uniform atomic_uint)
+0:? 'bar4' (layout(offset=8 ) uniform atomic_uint)
+0:? 'overlap' (layout(binding=0 offset=12 ) uniform atomic_uint)
+0:? 'bigBind' (layout(binding=20 ) uniform atomic_uint)
+
diff --git a/chromium/third_party/glslang/src/Test/baseResults/badChars.frag.out b/chromium/third_party/glslang/src/Test/baseResults/badChars.frag.out
new file mode 100644
index 00000000000..37af2875507
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/badChars.frag.out
@@ -0,0 +1,26 @@
+badChars.frag
+ERROR: 0:1: 'preprocessor evaluation' : bad expression
+ERROR: 0:1: '#if' : unexpected tokens following directive
+ERROR: 0:3: '#error' : A <bad token> B
+ERROR: 0:4: 'preprocessor evaluation' : bad expression
+ERROR: 0:4: '#if' : unexpected tokens following directive
+ERROR: 0:6: 'ÿ' : unexpected token
+ERROR: 0:7: '' : syntax error
+ERROR: 7 compilation errors. No code generated.
+
+
+Shader version: 100
+ERROR: node is still EOpNull!
+0:? Linker Objects
+0:? 'a' (global mediump int)
+
+
+Linked fragment stage:
+
+ERROR: Linking fragment stage: Missing entry point: Each stage requires one "void main()" entry point
+
+Shader version: 100
+ERROR: node is still EOpNull!
+0:? Linker Objects
+0:? 'a' (global mediump int)
+
diff --git a/chromium/third_party/glslang/src/Test/baseResults/comment.frag.out b/chromium/third_party/glslang/src/Test/baseResults/comment.frag.out
new file mode 100644
index 00000000000..1c876bb597e
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/comment.frag.out
@@ -0,0 +1,23 @@
+comment.frag
+Warning, version 430 is not yet complete; most version-specific features are present, but some are missing.
+WARNING: 0:10: 'line continuation' : used at end of comment; the following line is still part of the comment
+WARNING: 0:12: 'line continuation' : used at end of comment; the following line is still part of the comment
+
+Shader version: 430
+0:? Sequence
+0:17 Function Definition: main( (global void)
+0:17 Function Parameters:
+0:? Linker Objects
+0:? 'v' (smooth in 4-component vector of float)
+
+
+Linked fragment stage:
+
+
+Shader version: 430
+0:? Sequence
+0:17 Function Definition: main( (global void)
+0:17 Function Parameters:
+0:? Linker Objects
+0:? 'v' (smooth in 4-component vector of float)
+
diff --git a/chromium/third_party/glslang/src/Test/baseResults/conditionalDiscard.frag.out b/chromium/third_party/glslang/src/Test/baseResults/conditionalDiscard.frag.out
new file mode 100644
index 00000000000..169787f46c7
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/conditionalDiscard.frag.out
@@ -0,0 +1,63 @@
+conditionalDiscard.frag
+Shader version: 110
+0:? Sequence
+0:6 Function Definition: main( (global void)
+0:6 Function Parameters:
+0:8 Sequence
+0:8 Sequence
+0:8 move second child to first child (temp 4-component vector of float)
+0:8 'v' (temp 4-component vector of float)
+0:8 texture (global 4-component vector of float)
+0:8 'tex' (uniform sampler2D)
+0:8 'coord' (smooth in 2-component vector of float)
+0:10 Test condition and select (temp void)
+0:10 Condition
+0:10 Compare Equal (temp bool)
+0:10 'v' (temp 4-component vector of float)
+0:10 Constant:
+0:10 0.100000
+0:10 0.200000
+0:10 0.300000
+0:10 0.400000
+0:10 true case
+0:11 Branch: Kill
+0:13 move second child to first child (temp 4-component vector of float)
+0:13 'gl_FragColor' (fragColor 4-component vector of float FragColor)
+0:13 'v' (temp 4-component vector of float)
+0:? Linker Objects
+0:? 'tex' (uniform sampler2D)
+0:? 'coord' (smooth in 2-component vector of float)
+
+
+Linked fragment stage:
+
+
+Shader version: 110
+0:? Sequence
+0:6 Function Definition: main( (global void)
+0:6 Function Parameters:
+0:8 Sequence
+0:8 Sequence
+0:8 move second child to first child (temp 4-component vector of float)
+0:8 'v' (temp 4-component vector of float)
+0:8 texture (global 4-component vector of float)
+0:8 'tex' (uniform sampler2D)
+0:8 'coord' (smooth in 2-component vector of float)
+0:10 Test condition and select (temp void)
+0:10 Condition
+0:10 Compare Equal (temp bool)
+0:10 'v' (temp 4-component vector of float)
+0:10 Constant:
+0:10 0.100000
+0:10 0.200000
+0:10 0.300000
+0:10 0.400000
+0:10 true case
+0:11 Branch: Kill
+0:13 move second child to first child (temp 4-component vector of float)
+0:13 'gl_FragColor' (fragColor 4-component vector of float FragColor)
+0:13 'v' (temp 4-component vector of float)
+0:? Linker Objects
+0:? 'tex' (uniform sampler2D)
+0:? 'coord' (smooth in 2-component vector of float)
+
diff --git a/chromium/third_party/glslang/src/Test/baseResults/constErrors.frag.out b/chromium/third_party/glslang/src/Test/baseResults/constErrors.frag.out
new file mode 100644
index 00000000000..f04c7369ff6
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/constErrors.frag.out
@@ -0,0 +1,54 @@
+constErrors.frag
+ERROR: 0:14: 'non-constant initializer' : not supported for this version or the enabled extensions
+ERROR: 0:17: '' : array size must be a constant integer expression
+ERROR: 0:18: '' : array size must be a constant integer expression
+ERROR: 0:19: '' : array size must be a constant integer expression
+ERROR: 0:27: '=' : global const initializers must be constant 'const structure{global 3-component vector of float v3, global 2-component vector of int iv2}'
+ERROR: 0:33: '=' : global const initializers must be constant 'const structure{global 3-component vector of float v3, global 2-component vector of int iv2, global 2X4 matrix of float m}'
+ERROR: 6 compilation errors. No code generated.
+
+
+Shader version: 330
+ERROR: node is still EOpNull!
+0:10 Function Definition: main( (global void)
+0:10 Function Parameters:
+0:? Sequence
+0:14 Sequence
+0:14 move second child to first child (temp int)
+0:14 'a3' (const (read only) int)
+0:14 'uniformInt' (uniform int)
+0:? Linker Objects
+0:? 'inVar' (smooth in 4-component vector of float)
+0:? 'outVar' (out 4-component vector of float)
+0:? 'constInt' (const int)
+0:? 3 (const int)
+0:? 'uniformInt' (uniform int)
+0:? 's' (temp structure{global 3-component vector of float v3, global 2-component vector of int iv2})
+0:? 's2' (temp structure{global 3-component vector of float v3, global 2-component vector of int iv2, global 2X4 matrix of float m})
+0:? 'f' (const float)
+0:? 3.000000
+
+
+Linked fragment stage:
+
+
+Shader version: 330
+ERROR: node is still EOpNull!
+0:10 Function Definition: main( (global void)
+0:10 Function Parameters:
+0:? Sequence
+0:14 Sequence
+0:14 move second child to first child (temp int)
+0:14 'a3' (const (read only) int)
+0:14 'uniformInt' (uniform int)
+0:? Linker Objects
+0:? 'inVar' (smooth in 4-component vector of float)
+0:? 'outVar' (out 4-component vector of float)
+0:? 'constInt' (const int)
+0:? 3 (const int)
+0:? 'uniformInt' (uniform int)
+0:? 's' (temp structure{global 3-component vector of float v3, global 2-component vector of int iv2})
+0:? 's2' (temp structure{global 3-component vector of float v3, global 2-component vector of int iv2, global 2X4 matrix of float m})
+0:? 'f' (const float)
+0:? 3.000000
+
diff --git a/chromium/third_party/glslang/src/Test/baseResults/constFold.frag.out b/chromium/third_party/glslang/src/Test/baseResults/constFold.frag.out
new file mode 100644
index 00000000000..f5c3e9c571c
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/constFold.frag.out
@@ -0,0 +1,747 @@
+constFold.frag
+Warning, version 430 is not yet complete; most version-specific features are present, but some are missing.
+ERROR: 0:109: '[' : index out of range '-1'
+ERROR: 0:110: '[' : vector index out of range '4'
+ERROR: 0:111: '[' : index out of range '-2'
+ERROR: 0:112: '[' : index out of range '-1'
+ERROR: 0:113: '[' : vector index out of range '3'
+ERROR: 0:114: '[' : matrix index out of range '3'
+ERROR: 6 compilation errors. No code generated.
+
+
+Shader version: 430
+ERROR: node is still EOpNull!
+0:28 Function Definition: main( (global void)
+0:28 Function Parameters:
+0:30 Sequence
+0:30 Sequence
+0:30 move second child to first child (temp 4-component vector of float)
+0:30 'dx' (temp 4-component vector of float)
+0:30 dPdx (global 4-component vector of float)
+0:30 'inv' (smooth in 4-component vector of float)
+0:37 move second child to first child (temp 4-component vector of float)
+0:37 'FragColor' (out 4-component vector of float)
+0:37 Constant:
+0:37 2.000000
+0:37 6.000000
+0:37 3.000000
+0:37 171.887339
+0:42 move second child to first child (temp 4-component vector of float)
+0:42 'FragColor' (out 4-component vector of float)
+0:42 Constant:
+0:42 3.000000
+0:42 2.000000
+0:42 0.001593
+0:42 -0.999999
+0:43 move second child to first child (temp 2-component vector of float)
+0:43 'out2' (out 2-component vector of float)
+0:43 Constant:
+0:43 5.600000
+0:43 5.800000
+0:44 move second child to first child (temp 4-component vector of float)
+0:44 'out3' (out 4-component vector of float)
+0:44 Constant:
+0:44 20.085537
+0:44 2.302585
+0:44 16.000000
+0:44 8.000000
+0:45 move second child to first child (temp 4-component vector of float)
+0:45 'out4' (out 4-component vector of float)
+0:45 Constant:
+0:45 10.000000
+0:45 0.100000
+0:45 4.700000
+0:45 10.900000
+0:46 move second child to first child (temp 4-component vector of int)
+0:46 'out5' (out 4-component vector of int)
+0:46 Constant:
+0:46 8 (const int)
+0:46 17 (const int)
+0:46 -1 (const int)
+0:46 1 (const int)
+0:47 move second child to first child (temp 3-component vector of float)
+0:47 'out6' (out 3-component vector of float)
+0:47 Constant:
+0:47 -1.000000
+0:47 1.000000
+0:47 0.000000
+0:48 move second child to first child (temp 4-component vector of float)
+0:48 'out7' (out 4-component vector of float)
+0:48 Constant:
+0:48 4.000000
+0:48 -4.000000
+0:48 5.000000
+0:48 -5.000000
+0:49 move second child to first child (temp 4-component vector of float)
+0:49 'out8' (out 4-component vector of float)
+0:49 Constant:
+0:49 4.000000
+0:49 5.000000
+0:49 4.000000
+0:49 -6.000000
+0:50 move second child to first child (temp 4-component vector of float)
+0:50 'out9' (out 4-component vector of float)
+0:50 Constant:
+0:50 8.000000
+0:50 -4.000000
+0:50 0.345000
+0:50 0.400000
+0:51 move second child to first child (temp 4-component vector of float)
+0:51 'out10' (out 4-component vector of float)
+0:51 Constant:
+0:51 1.000000
+0:51 1.000000
+0:51 0.000000
+0:51 0.000000
+0:52 move second child to first child (temp 4-component vector of float)
+0:52 'out11' (out 4-component vector of float)
+0:52 Constant:
+0:52 0.000000
+0:52 0.000000
+0:52 1.000000
+0:52 0.000000
+0:53 move second child to first child (temp 4-component vector of float)
+0:53 'out11' (out 4-component vector of float)
+0:53 Constant:
+0:53 1.029639
+0:53 0.799690
+0:53 0.674741
+0:53 1.570696
+0:54 move second child to first child (temp 4-component vector of float)
+0:54 'out11' (out 4-component vector of float)
+0:54 Constant:
+0:54 0.000000
+0:54 0.523599
+0:54 1.570796
+0:54 1.047198
+0:58 move second child to first child (temp 4-component vector of float)
+0:58 'out11' (out 4-component vector of float)
+0:58 Constant:
+0:58 1.373401
+0:58 0.000000
+0:58 0.896055
+0:58 -0.380506
+0:62 move second child to first child (temp 2-component vector of int)
+0:62 'out12' (out 2-component vector of int)
+0:62 Constant:
+0:62 15 (const int)
+0:62 16 (const int)
+0:63 move second child to first child (temp 2-component vector of int)
+0:63 'out12' (out 2-component vector of int)
+0:63 Constant:
+0:63 17 (const int)
+0:63 17 (const int)
+0:64 move second child to first child (temp 2-component vector of float)
+0:64 'out2' (out 2-component vector of float)
+0:64 Constant:
+0:64 871.421253
+0:64 4913.000000
+0:65 move second child to first child (temp 3-component vector of uint)
+0:65 'out13' (out 3-component vector of uint)
+0:65 Constant:
+0:65 10 (const uint)
+0:65 20 (const uint)
+0:65 30 (const uint)
+0:66 move second child to first child (temp 2-component vector of float)
+0:66 'out2' (out 2-component vector of float)
+0:66 Constant:
+0:66 3.000000
+0:66 6.000000
+0:67 move second child to first child (temp 2-component vector of float)
+0:67 'out2' (out 2-component vector of float)
+0:67 Constant:
+0:67 3.500000
+0:67 4.500000
+0:68 move second child to first child (temp 2-component vector of float)
+0:68 'out2' (out 2-component vector of float)
+0:68 Constant:
+0:68 0.000000
+0:68 1.000000
+0:69 move second child to first child (temp 4-component vector of float)
+0:69 'out11' (out 4-component vector of float)
+0:69 Constant:
+0:69 0.000000
+0:69 0.028000
+0:69 0.500000
+0:69 1.000000
+0:78 Function Definition: foo( (global void)
+0:78 Function Parameters:
+0:? Sequence
+0:81 move second child to first child (temp float)
+0:81 direct index (temp float)
+0:81 'a' (temp 3-element array of float)
+0:81 Constant:
+0:81 0 (const int)
+0:81 Constant:
+0:81 7.000000
+0:82 Constant:
+0:82 2 (const int)
+0:83 Constant:
+0:83 2147483647 (const int)
+0:84 Constant:
+0:84 inf
+0:88 Constant:
+0:88 2 (const uint)
+0:88 3 (const uint)
+0:89 Constant:
+0:89 0 (const uint)
+0:90 Constant:
+0:90 6 (const uint)
+0:90 7 (const uint)
+0:103 Function Definition: foo2( (global void)
+0:103 Function Parameters:
+0:105 Sequence
+0:105 direct index (temp float)
+0:105 'a1' (global 1-element array of float)
+0:105 Constant:
+0:105 0 (const int)
+0:106 direct index (temp float)
+0:106 'a2' (global 2-element array of float)
+0:106 Constant:
+0:106 0 (const int)
+0:107 direct index (temp float)
+0:107 'a3' (global 4-element array of float)
+0:107 Constant:
+0:107 0 (const int)
+0:108 direct index (temp float)
+0:108 'a4' (global 2-element array of float)
+0:108 Constant:
+0:108 0 (const int)
+0:109 Constant:
+0:109 1.000000
+0:110 Constant:
+0:110 5.000000
+0:111 Constant:
+0:111 2.000000
+0:112 Constant:
+0:112 3.000000
+0:113 Constant:
+0:113 0.000000
+0:114 Constant:
+0:114 0.000000
+0:116 move second child to first child (temp int)
+0:116 'p' (temp int)
+0:116 Constant:
+0:116 2147483647 (const int)
+0:117 move second child to first child (temp int)
+0:117 'p' (temp int)
+0:117 Constant:
+0:117 -2147483648 (const int)
+0:118 move second child to first child (temp int)
+0:118 'p' (temp int)
+0:118 Constant:
+0:118 -2147483647 (const int)
+0:119 Sequence
+0:119 move second child to first child (temp float)
+0:119 'f' (temp float)
+0:119 Constant:
+0:119 1.444000
+0:120 move second child to first child (temp float)
+0:120 'f' (temp float)
+0:120 direct index (temp float)
+0:120 Construct vec4 (temp 4-component vector of float)
+0:120 Test condition and select (temp float)
+0:120 Condition
+0:120 Compare Less Than (temp bool)
+0:120 direct index (temp float)
+0:120 'inv' (smooth in 4-component vector of float)
+0:120 Constant:
+0:120 0 (const int)
+0:120 Constant:
+0:120 2.400000
+0:120 true case
+0:120 Constant:
+0:120 -1.000000
+0:120 false case
+0:120 Constant:
+0:120 1.000000
+0:120 Constant:
+0:120 3 (const int)
+0:126 Function Definition: foo3( (global void)
+0:126 Function Parameters:
+0:128 Sequence
+0:128 Sequence
+0:128 move second child to first child (temp 3X2 matrix of float)
+0:128 'r32' (temp 3X2 matrix of float)
+0:128 Constant:
+0:128 43.000000
+0:128 64.000000
+0:128 51.000000
+0:128 76.000000
+0:128 59.000000
+0:128 88.000000
+0:138 Function Definition: foo4( (global void)
+0:138 Function Parameters:
+0:140 Sequence
+0:140 Sequence
+0:140 move second child to first child (temp int)
+0:140 'a' (temp int)
+0:140 Constant:
+0:140 9 (const int)
+0:? Linker Objects
+0:? 'a' (const int)
+0:? 1 (const int)
+0:? 'b' (const int)
+0:? 2 (const int)
+0:? 'c' (const int)
+0:? 3 (const int)
+0:? 'd' (const int)
+0:? 2 (const int)
+0:? 'e' (const float)
+0:? 2.000000
+0:? 'f' (const float)
+0:? 6.000000
+0:? 'g' (const float)
+0:? 3.000000
+0:? 'pytho' (const 2-component vector of float)
+0:? 3.000000
+0:? 4.000000
+0:? 'inv' (smooth in 4-component vector of float)
+0:? 'FragColor' (out 4-component vector of float)
+0:? 'out2' (out 2-component vector of float)
+0:? 'out3' (out 4-component vector of float)
+0:? 'out4' (out 4-component vector of float)
+0:? 'out5' (out 4-component vector of int)
+0:? 'out6' (out 3-component vector of float)
+0:? 'out7' (out 4-component vector of float)
+0:? 'out8' (out 4-component vector of float)
+0:? 'out9' (out 4-component vector of float)
+0:? 'out10' (out 4-component vector of float)
+0:? 'out11' (out 4-component vector of float)
+0:? 'out12' (out 2-component vector of int)
+0:? 'out13' (out 3-component vector of uint)
+0:? 's' (const structure{global 3-component vector of float v3, global 2-component vector of int iv2, global 2X4 matrix of float m})
+0:? 3.000000
+0:? 3.000000
+0:? 3.000000
+0:? 3 (const int)
+0:? 3 (const int)
+0:? 1.000000
+0:? 2.000000
+0:? 3.000000
+0:? 4.000000
+0:? 5.000000
+0:? 6.000000
+0:? 7.000000
+0:? 8.000000
+0:? 'm2' (const 2X2 matrix of float)
+0:? 2.000000
+0:? 3.000000
+0:? 4.000000
+0:? 5.000000
+0:? 'm3' (const 3X3 matrix of float)
+0:? 2.000000
+0:? 3.000000
+0:? 0.000000
+0:? 4.000000
+0:? 5.000000
+0:? 0.000000
+0:? 0.000000
+0:? 0.000000
+0:? 1.000000
+0:? 'mc' (const int)
+0:? 1 (const int)
+0:? 'a1' (global 1-element array of float)
+0:? 'a2' (global 2-element array of float)
+0:? 'a3' (global 4-element array of float)
+0:? 'v2' (const 2-component vector of float)
+0:? 1.000000
+0:? 2.000000
+0:? 'v3' (const 3-component vector of float)
+0:? 3.000000
+0:? 4.000000
+0:? 5.000000
+0:? 'a4' (global 2-element array of float)
+0:? 'mm2' (const 2X2 matrix of float)
+0:? 1.000000
+0:? 2.000000
+0:? 3.000000
+0:? 4.000000
+0:? 'mm32' (const 3X2 matrix of float)
+0:? 10.000000
+0:? 11.000000
+0:? 12.000000
+0:? 13.000000
+0:? 14.000000
+0:? 15.000000
+0:? 'a0' (const 3-element array of structure{global int i, global float f, global bool b})
+0:? 3 (const int)
+0:? 2.000000
+0:? true (const bool)
+0:? 1 (const int)
+0:? 5.000000
+0:? true (const bool)
+0:? 1 (const int)
+0:? 9.000000
+0:? false (const bool)
+
+
+Linked fragment stage:
+
+
+Shader version: 430
+ERROR: node is still EOpNull!
+0:28 Function Definition: main( (global void)
+0:28 Function Parameters:
+0:30 Sequence
+0:30 Sequence
+0:30 move second child to first child (temp 4-component vector of float)
+0:30 'dx' (temp 4-component vector of float)
+0:30 dPdx (global 4-component vector of float)
+0:30 'inv' (smooth in 4-component vector of float)
+0:37 move second child to first child (temp 4-component vector of float)
+0:37 'FragColor' (out 4-component vector of float)
+0:37 Constant:
+0:37 2.000000
+0:37 6.000000
+0:37 3.000000
+0:37 171.887339
+0:42 move second child to first child (temp 4-component vector of float)
+0:42 'FragColor' (out 4-component vector of float)
+0:42 Constant:
+0:42 3.000000
+0:42 2.000000
+0:42 0.001593
+0:42 -0.999999
+0:43 move second child to first child (temp 2-component vector of float)
+0:43 'out2' (out 2-component vector of float)
+0:43 Constant:
+0:43 5.600000
+0:43 5.800000
+0:44 move second child to first child (temp 4-component vector of float)
+0:44 'out3' (out 4-component vector of float)
+0:44 Constant:
+0:44 20.085537
+0:44 2.302585
+0:44 16.000000
+0:44 8.000000
+0:45 move second child to first child (temp 4-component vector of float)
+0:45 'out4' (out 4-component vector of float)
+0:45 Constant:
+0:45 10.000000
+0:45 0.100000
+0:45 4.700000
+0:45 10.900000
+0:46 move second child to first child (temp 4-component vector of int)
+0:46 'out5' (out 4-component vector of int)
+0:46 Constant:
+0:46 8 (const int)
+0:46 17 (const int)
+0:46 -1 (const int)
+0:46 1 (const int)
+0:47 move second child to first child (temp 3-component vector of float)
+0:47 'out6' (out 3-component vector of float)
+0:47 Constant:
+0:47 -1.000000
+0:47 1.000000
+0:47 0.000000
+0:48 move second child to first child (temp 4-component vector of float)
+0:48 'out7' (out 4-component vector of float)
+0:48 Constant:
+0:48 4.000000
+0:48 -4.000000
+0:48 5.000000
+0:48 -5.000000
+0:49 move second child to first child (temp 4-component vector of float)
+0:49 'out8' (out 4-component vector of float)
+0:49 Constant:
+0:49 4.000000
+0:49 5.000000
+0:49 4.000000
+0:49 -6.000000
+0:50 move second child to first child (temp 4-component vector of float)
+0:50 'out9' (out 4-component vector of float)
+0:50 Constant:
+0:50 8.000000
+0:50 -4.000000
+0:50 0.345000
+0:50 0.400000
+0:51 move second child to first child (temp 4-component vector of float)
+0:51 'out10' (out 4-component vector of float)
+0:51 Constant:
+0:51 1.000000
+0:51 1.000000
+0:51 0.000000
+0:51 0.000000
+0:52 move second child to first child (temp 4-component vector of float)
+0:52 'out11' (out 4-component vector of float)
+0:52 Constant:
+0:52 0.000000
+0:52 0.000000
+0:52 1.000000
+0:52 0.000000
+0:53 move second child to first child (temp 4-component vector of float)
+0:53 'out11' (out 4-component vector of float)
+0:53 Constant:
+0:53 1.029639
+0:53 0.799690
+0:53 0.674741
+0:53 1.570696
+0:54 move second child to first child (temp 4-component vector of float)
+0:54 'out11' (out 4-component vector of float)
+0:54 Constant:
+0:54 0.000000
+0:54 0.523599
+0:54 1.570796
+0:54 1.047198
+0:58 move second child to first child (temp 4-component vector of float)
+0:58 'out11' (out 4-component vector of float)
+0:58 Constant:
+0:58 1.373401
+0:58 0.000000
+0:58 0.896055
+0:58 -0.380506
+0:62 move second child to first child (temp 2-component vector of int)
+0:62 'out12' (out 2-component vector of int)
+0:62 Constant:
+0:62 15 (const int)
+0:62 16 (const int)
+0:63 move second child to first child (temp 2-component vector of int)
+0:63 'out12' (out 2-component vector of int)
+0:63 Constant:
+0:63 17 (const int)
+0:63 17 (const int)
+0:64 move second child to first child (temp 2-component vector of float)
+0:64 'out2' (out 2-component vector of float)
+0:64 Constant:
+0:64 871.421253
+0:64 4913.000000
+0:65 move second child to first child (temp 3-component vector of uint)
+0:65 'out13' (out 3-component vector of uint)
+0:65 Constant:
+0:65 10 (const uint)
+0:65 20 (const uint)
+0:65 30 (const uint)
+0:66 move second child to first child (temp 2-component vector of float)
+0:66 'out2' (out 2-component vector of float)
+0:66 Constant:
+0:66 3.000000
+0:66 6.000000
+0:67 move second child to first child (temp 2-component vector of float)
+0:67 'out2' (out 2-component vector of float)
+0:67 Constant:
+0:67 3.500000
+0:67 4.500000
+0:68 move second child to first child (temp 2-component vector of float)
+0:68 'out2' (out 2-component vector of float)
+0:68 Constant:
+0:68 0.000000
+0:68 1.000000
+0:69 move second child to first child (temp 4-component vector of float)
+0:69 'out11' (out 4-component vector of float)
+0:69 Constant:
+0:69 0.000000
+0:69 0.028000
+0:69 0.500000
+0:69 1.000000
+0:78 Function Definition: foo( (global void)
+0:78 Function Parameters:
+0:? Sequence
+0:81 move second child to first child (temp float)
+0:81 direct index (temp float)
+0:81 'a' (temp 3-element array of float)
+0:81 Constant:
+0:81 0 (const int)
+0:81 Constant:
+0:81 7.000000
+0:82 Constant:
+0:82 2 (const int)
+0:83 Constant:
+0:83 2147483647 (const int)
+0:84 Constant:
+0:84 inf
+0:88 Constant:
+0:88 2 (const uint)
+0:88 3 (const uint)
+0:89 Constant:
+0:89 0 (const uint)
+0:90 Constant:
+0:90 6 (const uint)
+0:90 7 (const uint)
+0:103 Function Definition: foo2( (global void)
+0:103 Function Parameters:
+0:105 Sequence
+0:105 direct index (temp float)
+0:105 'a1' (global 1-element array of float)
+0:105 Constant:
+0:105 0 (const int)
+0:106 direct index (temp float)
+0:106 'a2' (global 2-element array of float)
+0:106 Constant:
+0:106 0 (const int)
+0:107 direct index (temp float)
+0:107 'a3' (global 4-element array of float)
+0:107 Constant:
+0:107 0 (const int)
+0:108 direct index (temp float)
+0:108 'a4' (global 2-element array of float)
+0:108 Constant:
+0:108 0 (const int)
+0:109 Constant:
+0:109 1.000000
+0:110 Constant:
+0:110 5.000000
+0:111 Constant:
+0:111 2.000000
+0:112 Constant:
+0:112 3.000000
+0:113 Constant:
+0:113 0.000000
+0:114 Constant:
+0:114 0.000000
+0:116 move second child to first child (temp int)
+0:116 'p' (temp int)
+0:116 Constant:
+0:116 2147483647 (const int)
+0:117 move second child to first child (temp int)
+0:117 'p' (temp int)
+0:117 Constant:
+0:117 -2147483648 (const int)
+0:118 move second child to first child (temp int)
+0:118 'p' (temp int)
+0:118 Constant:
+0:118 -2147483647 (const int)
+0:119 Sequence
+0:119 move second child to first child (temp float)
+0:119 'f' (temp float)
+0:119 Constant:
+0:119 1.444000
+0:120 move second child to first child (temp float)
+0:120 'f' (temp float)
+0:120 direct index (temp float)
+0:120 Construct vec4 (temp 4-component vector of float)
+0:120 Test condition and select (temp float)
+0:120 Condition
+0:120 Compare Less Than (temp bool)
+0:120 direct index (temp float)
+0:120 'inv' (smooth in 4-component vector of float)
+0:120 Constant:
+0:120 0 (const int)
+0:120 Constant:
+0:120 2.400000
+0:120 true case
+0:120 Constant:
+0:120 -1.000000
+0:120 false case
+0:120 Constant:
+0:120 1.000000
+0:120 Constant:
+0:120 3 (const int)
+0:126 Function Definition: foo3( (global void)
+0:126 Function Parameters:
+0:128 Sequence
+0:128 Sequence
+0:128 move second child to first child (temp 3X2 matrix of float)
+0:128 'r32' (temp 3X2 matrix of float)
+0:128 Constant:
+0:128 43.000000
+0:128 64.000000
+0:128 51.000000
+0:128 76.000000
+0:128 59.000000
+0:128 88.000000
+0:138 Function Definition: foo4( (global void)
+0:138 Function Parameters:
+0:140 Sequence
+0:140 Sequence
+0:140 move second child to first child (temp int)
+0:140 'a' (temp int)
+0:140 Constant:
+0:140 9 (const int)
+0:? Linker Objects
+0:? 'a' (const int)
+0:? 1 (const int)
+0:? 'b' (const int)
+0:? 2 (const int)
+0:? 'c' (const int)
+0:? 3 (const int)
+0:? 'd' (const int)
+0:? 2 (const int)
+0:? 'e' (const float)
+0:? 2.000000
+0:? 'f' (const float)
+0:? 6.000000
+0:? 'g' (const float)
+0:? 3.000000
+0:? 'pytho' (const 2-component vector of float)
+0:? 3.000000
+0:? 4.000000
+0:? 'inv' (smooth in 4-component vector of float)
+0:? 'FragColor' (out 4-component vector of float)
+0:? 'out2' (out 2-component vector of float)
+0:? 'out3' (out 4-component vector of float)
+0:? 'out4' (out 4-component vector of float)
+0:? 'out5' (out 4-component vector of int)
+0:? 'out6' (out 3-component vector of float)
+0:? 'out7' (out 4-component vector of float)
+0:? 'out8' (out 4-component vector of float)
+0:? 'out9' (out 4-component vector of float)
+0:? 'out10' (out 4-component vector of float)
+0:? 'out11' (out 4-component vector of float)
+0:? 'out12' (out 2-component vector of int)
+0:? 'out13' (out 3-component vector of uint)
+0:? 's' (const structure{global 3-component vector of float v3, global 2-component vector of int iv2, global 2X4 matrix of float m})
+0:? 3.000000
+0:? 3.000000
+0:? 3.000000
+0:? 3 (const int)
+0:? 3 (const int)
+0:? 1.000000
+0:? 2.000000
+0:? 3.000000
+0:? 4.000000
+0:? 5.000000
+0:? 6.000000
+0:? 7.000000
+0:? 8.000000
+0:? 'm2' (const 2X2 matrix of float)
+0:? 2.000000
+0:? 3.000000
+0:? 4.000000
+0:? 5.000000
+0:? 'm3' (const 3X3 matrix of float)
+0:? 2.000000
+0:? 3.000000
+0:? 0.000000
+0:? 4.000000
+0:? 5.000000
+0:? 0.000000
+0:? 0.000000
+0:? 0.000000
+0:? 1.000000
+0:? 'mc' (const int)
+0:? 1 (const int)
+0:? 'a1' (global 1-element array of float)
+0:? 'a2' (global 2-element array of float)
+0:? 'a3' (global 4-element array of float)
+0:? 'v2' (const 2-component vector of float)
+0:? 1.000000
+0:? 2.000000
+0:? 'v3' (const 3-component vector of float)
+0:? 3.000000
+0:? 4.000000
+0:? 5.000000
+0:? 'a4' (global 2-element array of float)
+0:? 'mm2' (const 2X2 matrix of float)
+0:? 1.000000
+0:? 2.000000
+0:? 3.000000
+0:? 4.000000
+0:? 'mm32' (const 3X2 matrix of float)
+0:? 10.000000
+0:? 11.000000
+0:? 12.000000
+0:? 13.000000
+0:? 14.000000
+0:? 15.000000
+0:? 'a0' (const 3-element array of structure{global int i, global float f, global bool b})
+0:? 3 (const int)
+0:? 2.000000
+0:? true (const bool)
+0:? 1 (const int)
+0:? 5.000000
+0:? true (const bool)
+0:? 1 (const int)
+0:? 9.000000
+0:? false (const bool)
+
diff --git a/chromium/third_party/glslang/src/Test/baseResults/conversion.frag.out b/chromium/third_party/glslang/src/Test/baseResults/conversion.frag.out
new file mode 100644
index 00000000000..3abf82ceffc
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/conversion.frag.out
@@ -0,0 +1,955 @@
+conversion.frag
+Shader version: 130
+0:? Sequence
+0:33 Function Definition: main( (global void)
+0:33 Function Parameters:
+0:35 Sequence
+0:35 Sequence
+0:35 move second child to first child (temp bool)
+0:35 'b' (temp bool)
+0:35 logical-xor (temp bool)
+0:35 Convert int to bool (temp bool)
+0:35 'u_i' (uniform int)
+0:35 Convert float to bool (temp bool)
+0:35 'u_f' (uniform float)
+0:36 Sequence
+0:36 move second child to first child (temp 2-component vector of bool)
+0:36 'b2' (temp 2-component vector of bool)
+0:36 Construct bvec2 (temp 2-component vector of bool)
+0:36 Convert int to bool (temp bool)
+0:36 'u_i' (uniform int)
+0:36 Convert float to bool (temp bool)
+0:36 'u_f' (uniform float)
+0:37 Sequence
+0:37 move second child to first child (temp 3-component vector of bool)
+0:37 'b3' (temp 3-component vector of bool)
+0:37 Construct bvec3 (temp 3-component vector of bool)
+0:37 Convert int to bool (temp bool)
+0:37 'u_i' (uniform int)
+0:37 Convert float to bool (temp bool)
+0:37 'u_f' (uniform float)
+0:37 Convert int to bool (temp bool)
+0:37 'i_i' (flat in int)
+0:38 Sequence
+0:38 move second child to first child (temp 4-component vector of bool)
+0:38 'b4' (temp 4-component vector of bool)
+0:38 Construct bvec4 (temp 4-component vector of bool)
+0:38 Convert int to bool (temp bool)
+0:38 'u_i' (uniform int)
+0:38 Convert float to bool (temp bool)
+0:38 'u_f' (uniform float)
+0:38 Convert int to bool (temp bool)
+0:38 'i_i' (flat in int)
+0:38 Convert float to bool (temp bool)
+0:38 'i_f' (smooth in float)
+0:40 Sequence
+0:40 move second child to first child (temp int)
+0:40 'i' (temp int)
+0:40 add (temp int)
+0:40 Convert float to int (temp int)
+0:40 'u_f' (uniform float)
+0:40 Convert bool to int (temp int)
+0:40 'b' (temp bool)
+0:41 Sequence
+0:41 move second child to first child (temp 2-component vector of int)
+0:41 'i2' (temp 2-component vector of int)
+0:41 add (temp 2-component vector of int)
+0:41 Convert float to int (temp 2-component vector of int)
+0:41 'u_f2' (uniform 2-component vector of float)
+0:41 Convert bool to int (temp 2-component vector of int)
+0:41 'b2' (temp 2-component vector of bool)
+0:42 Sequence
+0:42 move second child to first child (temp 3-component vector of int)
+0:42 'i3' (temp 3-component vector of int)
+0:42 add (temp 3-component vector of int)
+0:42 Convert float to int (temp 3-component vector of int)
+0:42 'u_f3' (uniform 3-component vector of float)
+0:42 Convert bool to int (temp 3-component vector of int)
+0:42 'b3' (temp 3-component vector of bool)
+0:43 Sequence
+0:43 move second child to first child (temp 4-component vector of int)
+0:43 'i4' (temp 4-component vector of int)
+0:43 add (temp 4-component vector of int)
+0:43 Convert float to int (temp 4-component vector of int)
+0:43 'u_f4' (uniform 4-component vector of float)
+0:43 Convert bool to int (temp 4-component vector of int)
+0:43 'b4' (temp 4-component vector of bool)
+0:45 Sequence
+0:45 move second child to first child (temp float)
+0:45 'f' (temp float)
+0:45 Convert int to float (temp float)
+0:45 'i' (temp int)
+0:46 Sequence
+0:46 move second child to first child (temp 2-component vector of float)
+0:46 'f2' (temp 2-component vector of float)
+0:46 Convert int to float (temp 2-component vector of float)
+0:46 'i2' (temp 2-component vector of int)
+0:47 Sequence
+0:47 move second child to first child (temp 3-component vector of float)
+0:47 'f3' (temp 3-component vector of float)
+0:47 Convert int to float (temp 3-component vector of float)
+0:47 'i3' (temp 3-component vector of int)
+0:48 Sequence
+0:48 move second child to first child (temp 4-component vector of float)
+0:48 'f4' (temp 4-component vector of float)
+0:48 Convert int to float (temp 4-component vector of float)
+0:48 'i4' (temp 4-component vector of int)
+0:50 add second child into first child (temp float)
+0:50 'f' (temp float)
+0:50 add (temp float)
+0:50 Convert int to float (temp float)
+0:50 'i' (temp int)
+0:50 Convert bool to float (temp float)
+0:50 'b' (temp bool)
+0:51 subtract second child into first child (temp 2-component vector of float)
+0:51 'f2' (temp 2-component vector of float)
+0:51 add (temp 2-component vector of float)
+0:51 Convert int to float (temp 2-component vector of float)
+0:51 'i2' (temp 2-component vector of int)
+0:51 Convert bool to float (temp 2-component vector of float)
+0:51 'b2' (temp 2-component vector of bool)
+0:52 divide second child into first child (temp 3-component vector of float)
+0:52 'f3' (temp 3-component vector of float)
+0:52 add (temp 3-component vector of float)
+0:52 Convert int to float (temp 3-component vector of float)
+0:52 'i3' (temp 3-component vector of int)
+0:52 Convert bool to float (temp 3-component vector of float)
+0:52 'b3' (temp 3-component vector of bool)
+0:53 add second child into first child (temp 4-component vector of float)
+0:53 'f4' (temp 4-component vector of float)
+0:53 add (temp 4-component vector of float)
+0:53 Convert int to float (temp 4-component vector of float)
+0:53 'i4' (temp 4-component vector of int)
+0:53 Convert bool to float (temp 4-component vector of float)
+0:53 'b4' (temp 4-component vector of bool)
+0:55 add second child into first child (temp 4-component vector of float)
+0:55 'f4' (temp 4-component vector of float)
+0:55 Convert bool to float (temp 4-component vector of float)
+0:55 Convert int to bool (temp 4-component vector of bool)
+0:55 'i_i4' (flat in 4-component vector of int)
+0:56 add second child into first child (temp 4-component vector of float)
+0:56 'f4' (temp 4-component vector of float)
+0:56 Convert bool to float (temp 4-component vector of float)
+0:56 Convert float to bool (temp 4-component vector of bool)
+0:56 'u_f4' (uniform 4-component vector of float)
+0:58 add second child into first child (temp float)
+0:58 'f' (temp float)
+0:58 subtract (temp float)
+0:58 'f' (temp float)
+0:58 Convert int to float (temp float)
+0:58 'i' (temp int)
+0:59 add second child into first child (temp 2-component vector of float)
+0:59 'f2' (temp 2-component vector of float)
+0:59 add (temp 2-component vector of float)
+0:59 Construct vec2 (temp 2-component vector of float)
+0:59 'f' (temp float)
+0:59 Convert int to float (temp float)
+0:59 'i' (temp int)
+0:59 Convert int to float (temp 2-component vector of float)
+0:59 'i2' (temp 2-component vector of int)
+0:60 add second child into first child (temp 3-component vector of float)
+0:60 'f3' (temp 3-component vector of float)
+0:60 add (temp 3-component vector of float)
+0:60 Convert int to float (temp 3-component vector of float)
+0:60 'i3' (temp 3-component vector of int)
+0:60 Construct vec3 (temp 3-component vector of float)
+0:60 'f' (temp float)
+0:60 Convert int to float (temp float)
+0:60 'i' (temp int)
+0:60 'f' (temp float)
+0:61 add second child into first child (temp 4-component vector of float)
+0:61 'f4' (temp 4-component vector of float)
+0:61 add (temp 4-component vector of float)
+0:61 Construct vec4 (temp 4-component vector of float)
+0:61 Convert bool to float (temp float)
+0:61 'b' (temp bool)
+0:61 Convert int to float (temp float)
+0:61 'i' (temp int)
+0:61 'f' (temp float)
+0:61 Convert int to float (temp float)
+0:61 'i' (temp int)
+0:61 Convert int to float (temp 4-component vector of float)
+0:61 'i4' (temp 4-component vector of int)
+0:63 add second child into first child (temp 2-component vector of float)
+0:63 'f2' (temp 2-component vector of float)
+0:63 vector-scale (temp 2-component vector of float)
+0:63 Construct vec2 (temp 2-component vector of float)
+0:63 'f' (temp float)
+0:63 Convert int to float (temp float)
+0:63 'i' (temp int)
+0:63 Convert int to float (temp float)
+0:63 'i' (temp int)
+0:64 add second child into first child (temp 3-component vector of float)
+0:64 'f3' (temp 3-component vector of float)
+0:64 add (temp 3-component vector of float)
+0:64 Construct vec3 (temp 3-component vector of float)
+0:64 'f' (temp float)
+0:64 Convert int to float (temp float)
+0:64 'i' (temp int)
+0:64 'f' (temp float)
+0:64 Convert int to float (temp float)
+0:64 'i' (temp int)
+0:65 add second child into first child (temp 4-component vector of float)
+0:65 'f4' (temp 4-component vector of float)
+0:65 subtract (temp 4-component vector of float)
+0:65 Convert int to float (temp float)
+0:65 'i' (temp int)
+0:65 Construct vec4 (temp 4-component vector of float)
+0:65 Convert bool to float (temp float)
+0:65 'b' (temp bool)
+0:65 Convert int to float (temp float)
+0:65 'i' (temp int)
+0:65 'f' (temp float)
+0:65 Convert int to float (temp float)
+0:65 'i' (temp int)
+0:67 add second child into first child (temp 2-component vector of int)
+0:67 'i2' (temp 2-component vector of int)
+0:67 Construct ivec2 (temp 2-component vector of int)
+0:67 Convert float to int (temp int)
+0:67 'f' (temp float)
+0:67 'i' (temp int)
+0:68 add second child into first child (temp 3-component vector of int)
+0:68 'i3' (temp 3-component vector of int)
+0:68 Construct ivec3 (temp 3-component vector of int)
+0:68 Convert float to int (temp int)
+0:68 'f' (temp float)
+0:68 'i' (temp int)
+0:68 Convert float to int (temp int)
+0:68 'f' (temp float)
+0:69 add second child into first child (temp 4-component vector of int)
+0:69 'i4' (temp 4-component vector of int)
+0:69 Construct ivec4 (temp 4-component vector of int)
+0:69 Convert bool to int (temp int)
+0:69 'b' (temp bool)
+0:69 'i' (temp int)
+0:69 Convert float to int (temp int)
+0:69 'f' (temp float)
+0:69 'i' (temp int)
+0:71 Test condition and select (temp void)
+0:71 Condition
+0:72 logical-or (temp bool)
+0:71 logical-or (temp bool)
+0:71 logical-or (temp bool)
+0:71 Compare Less Than (temp bool)
+0:71 'f' (temp float)
+0:71 Convert int to float (temp float)
+0:71 'i' (temp int)
+0:71 Compare Less Than (temp bool)
+0:71 Convert int to float (temp float)
+0:71 'i' (temp int)
+0:71 'f' (temp float)
+0:72 Compare Equal (temp bool)
+0:72 'f2' (temp 2-component vector of float)
+0:72 Convert int to float (temp 2-component vector of float)
+0:72 'i2' (temp 2-component vector of int)
+0:73 Compare Not Equal (temp bool)
+0:73 Convert int to float (temp 3-component vector of float)
+0:73 'i3' (temp 3-component vector of int)
+0:73 'f3' (temp 3-component vector of float)
+0:71 true case
+0:74 move second child to first child (temp float)
+0:74 'f' (temp float)
+0:74 add (temp float)
+0:74 Test condition and select (temp float)
+0:74 Condition
+0:74 'b' (temp bool)
+0:74 true case
+0:74 Convert int to float (temp float)
+0:74 'i' (temp int)
+0:74 false case
+0:74 direct index (temp float)
+0:74 'f2' (temp 2-component vector of float)
+0:74 Constant:
+0:74 0 (const int)
+0:74 Test condition and select (temp float)
+0:74 Condition
+0:74 direct index (temp bool)
+0:74 'b2' (temp 2-component vector of bool)
+0:74 Constant:
+0:74 0 (const int)
+0:74 true case
+0:74 direct index (temp float)
+0:74 'f3' (temp 3-component vector of float)
+0:74 Constant:
+0:74 0 (const int)
+0:74 false case
+0:74 Convert int to float (temp float)
+0:74 direct index (temp int)
+0:74 'i2' (temp 2-component vector of int)
+0:74 Constant:
+0:74 1 (const int)
+0:76 move second child to first child (temp 4-component vector of float)
+0:76 'gl_FragColor' (fragColor 4-component vector of float FragColor)
+0:86 Test condition and select (temp 4-component vector of float)
+0:86 Condition
+0:85 logical-or (temp bool)
+0:84 logical-or (temp bool)
+0:83 logical-or (temp bool)
+0:82 logical-or (temp bool)
+0:81 logical-or (temp bool)
+0:80 logical-or (temp bool)
+0:79 logical-or (temp bool)
+0:78 logical-or (temp bool)
+0:77 logical-or (temp bool)
+0:77 'b' (temp bool)
+0:78 direct index (temp bool)
+0:78 'b2' (temp 2-component vector of bool)
+0:78 Constant:
+0:78 0 (const int)
+0:79 direct index (temp bool)
+0:79 'b2' (temp 2-component vector of bool)
+0:79 Constant:
+0:79 1 (const int)
+0:80 direct index (temp bool)
+0:80 'b3' (temp 3-component vector of bool)
+0:80 Constant:
+0:80 0 (const int)
+0:81 direct index (temp bool)
+0:81 'b3' (temp 3-component vector of bool)
+0:81 Constant:
+0:81 1 (const int)
+0:82 direct index (temp bool)
+0:82 'b3' (temp 3-component vector of bool)
+0:82 Constant:
+0:82 2 (const int)
+0:83 direct index (temp bool)
+0:83 'b4' (temp 4-component vector of bool)
+0:83 Constant:
+0:83 0 (const int)
+0:84 direct index (temp bool)
+0:84 'b4' (temp 4-component vector of bool)
+0:84 Constant:
+0:84 1 (const int)
+0:85 direct index (temp bool)
+0:85 'b4' (temp 4-component vector of bool)
+0:85 Constant:
+0:85 2 (const int)
+0:86 direct index (temp bool)
+0:86 'b4' (temp 4-component vector of bool)
+0:86 Constant:
+0:86 3 (const int)
+0:86 true case
+0:105 Construct vec4 (temp 4-component vector of float)
+0:105 add (temp float)
+0:104 add (temp float)
+0:103 add (temp float)
+0:102 add (temp float)
+0:101 add (temp float)
+0:100 add (temp float)
+0:99 add (temp float)
+0:98 add (temp float)
+0:97 add (temp float)
+0:96 add (temp float)
+0:95 Convert int to float (temp float)
+0:95 add (temp int)
+0:94 add (temp int)
+0:93 add (temp int)
+0:92 add (temp int)
+0:91 add (temp int)
+0:90 add (temp int)
+0:89 add (temp int)
+0:88 add (temp int)
+0:87 add (temp int)
+0:87 'i' (temp int)
+0:88 direct index (temp int)
+0:88 'i2' (temp 2-component vector of int)
+0:88 Constant:
+0:88 0 (const int)
+0:89 direct index (temp int)
+0:89 'i2' (temp 2-component vector of int)
+0:89 Constant:
+0:89 1 (const int)
+0:90 direct index (temp int)
+0:90 'i3' (temp 3-component vector of int)
+0:90 Constant:
+0:90 0 (const int)
+0:91 direct index (temp int)
+0:91 'i3' (temp 3-component vector of int)
+0:91 Constant:
+0:91 1 (const int)
+0:92 direct index (temp int)
+0:92 'i3' (temp 3-component vector of int)
+0:92 Constant:
+0:92 2 (const int)
+0:93 direct index (temp int)
+0:93 'i4' (temp 4-component vector of int)
+0:93 Constant:
+0:93 0 (const int)
+0:94 direct index (temp int)
+0:94 'i4' (temp 4-component vector of int)
+0:94 Constant:
+0:94 1 (const int)
+0:95 direct index (temp int)
+0:95 'i4' (temp 4-component vector of int)
+0:95 Constant:
+0:95 2 (const int)
+0:96 direct index (temp int)
+0:96 'i4' (temp 4-component vector of int)
+0:96 Constant:
+0:96 3 (const int)
+0:97 'f' (temp float)
+0:98 direct index (temp float)
+0:98 'f2' (temp 2-component vector of float)
+0:98 Constant:
+0:98 0 (const int)
+0:99 direct index (temp float)
+0:99 'f2' (temp 2-component vector of float)
+0:99 Constant:
+0:99 1 (const int)
+0:100 direct index (temp float)
+0:100 'f3' (temp 3-component vector of float)
+0:100 Constant:
+0:100 0 (const int)
+0:101 direct index (temp float)
+0:101 'f3' (temp 3-component vector of float)
+0:101 Constant:
+0:101 1 (const int)
+0:102 direct index (temp float)
+0:102 'f3' (temp 3-component vector of float)
+0:102 Constant:
+0:102 2 (const int)
+0:103 direct index (temp float)
+0:103 'f4' (temp 4-component vector of float)
+0:103 Constant:
+0:103 0 (const int)
+0:104 direct index (temp float)
+0:104 'f4' (temp 4-component vector of float)
+0:104 Constant:
+0:104 1 (const int)
+0:105 direct index (temp float)
+0:105 'f4' (temp 4-component vector of float)
+0:105 Constant:
+0:105 2 (const int)
+0:106 direct index (temp float)
+0:106 'f4' (temp 4-component vector of float)
+0:106 Constant:
+0:106 3 (const int)
+0:86 false case
+0:106 Constant:
+0:106 1.000000
+0:106 1.000000
+0:106 1.000000
+0:106 1.000000
+0:109 Sequence
+0:109 move second child to first child (temp 4-component vector of int)
+0:109 'cv2' (temp 4-component vector of int)
+0:109 Constant:
+0:109 1 (const int)
+0:109 1 (const int)
+0:109 1 (const int)
+0:109 1 (const int)
+0:110 Sequence
+0:110 move second child to first child (temp 4-component vector of bool)
+0:110 'cv5' (temp 4-component vector of bool)
+0:110 Convert int to bool (temp 4-component vector of bool)
+0:110 'cv2' (temp 4-component vector of int)
+0:111 add second child into first child (temp 4-component vector of float)
+0:111 'gl_FragColor' (fragColor 4-component vector of float FragColor)
+0:111 Construct float (temp float)
+0:111 Convert bool to float (temp 4-component vector of float)
+0:111 'cv5' (temp 4-component vector of bool)
+0:? Linker Objects
+0:? 'u_b' (uniform bool)
+0:? 'u_b2' (uniform 2-component vector of bool)
+0:? 'u_b3' (uniform 3-component vector of bool)
+0:? 'u_b4' (uniform 4-component vector of bool)
+0:? 'u_i' (uniform int)
+0:? 'u_i2' (uniform 2-component vector of int)
+0:? 'u_i3' (uniform 3-component vector of int)
+0:? 'u_i4' (uniform 4-component vector of int)
+0:? 'u_f' (uniform float)
+0:? 'u_f2' (uniform 2-component vector of float)
+0:? 'u_f3' (uniform 3-component vector of float)
+0:? 'u_f4' (uniform 4-component vector of float)
+0:? 'i_b' (uniform bool)
+0:? 'i_b2' (uniform 2-component vector of bool)
+0:? 'i_b3' (uniform 3-component vector of bool)
+0:? 'i_b4' (uniform 4-component vector of bool)
+0:? 'i_i' (flat in int)
+0:? 'i_i2' (flat in 2-component vector of int)
+0:? 'i_i3' (flat in 3-component vector of int)
+0:? 'i_i4' (flat in 4-component vector of int)
+0:? 'i_f' (smooth in float)
+0:? 'i_f2' (smooth in 2-component vector of float)
+0:? 'i_f3' (smooth in 3-component vector of float)
+0:? 'i_f4' (smooth in 4-component vector of float)
+
+
+Linked fragment stage:
+
+
+Shader version: 130
+0:? Sequence
+0:33 Function Definition: main( (global void)
+0:33 Function Parameters:
+0:35 Sequence
+0:35 Sequence
+0:35 move second child to first child (temp bool)
+0:35 'b' (temp bool)
+0:35 logical-xor (temp bool)
+0:35 Convert int to bool (temp bool)
+0:35 'u_i' (uniform int)
+0:35 Convert float to bool (temp bool)
+0:35 'u_f' (uniform float)
+0:36 Sequence
+0:36 move second child to first child (temp 2-component vector of bool)
+0:36 'b2' (temp 2-component vector of bool)
+0:36 Construct bvec2 (temp 2-component vector of bool)
+0:36 Convert int to bool (temp bool)
+0:36 'u_i' (uniform int)
+0:36 Convert float to bool (temp bool)
+0:36 'u_f' (uniform float)
+0:37 Sequence
+0:37 move second child to first child (temp 3-component vector of bool)
+0:37 'b3' (temp 3-component vector of bool)
+0:37 Construct bvec3 (temp 3-component vector of bool)
+0:37 Convert int to bool (temp bool)
+0:37 'u_i' (uniform int)
+0:37 Convert float to bool (temp bool)
+0:37 'u_f' (uniform float)
+0:37 Convert int to bool (temp bool)
+0:37 'i_i' (flat in int)
+0:38 Sequence
+0:38 move second child to first child (temp 4-component vector of bool)
+0:38 'b4' (temp 4-component vector of bool)
+0:38 Construct bvec4 (temp 4-component vector of bool)
+0:38 Convert int to bool (temp bool)
+0:38 'u_i' (uniform int)
+0:38 Convert float to bool (temp bool)
+0:38 'u_f' (uniform float)
+0:38 Convert int to bool (temp bool)
+0:38 'i_i' (flat in int)
+0:38 Convert float to bool (temp bool)
+0:38 'i_f' (smooth in float)
+0:40 Sequence
+0:40 move second child to first child (temp int)
+0:40 'i' (temp int)
+0:40 add (temp int)
+0:40 Convert float to int (temp int)
+0:40 'u_f' (uniform float)
+0:40 Convert bool to int (temp int)
+0:40 'b' (temp bool)
+0:41 Sequence
+0:41 move second child to first child (temp 2-component vector of int)
+0:41 'i2' (temp 2-component vector of int)
+0:41 add (temp 2-component vector of int)
+0:41 Convert float to int (temp 2-component vector of int)
+0:41 'u_f2' (uniform 2-component vector of float)
+0:41 Convert bool to int (temp 2-component vector of int)
+0:41 'b2' (temp 2-component vector of bool)
+0:42 Sequence
+0:42 move second child to first child (temp 3-component vector of int)
+0:42 'i3' (temp 3-component vector of int)
+0:42 add (temp 3-component vector of int)
+0:42 Convert float to int (temp 3-component vector of int)
+0:42 'u_f3' (uniform 3-component vector of float)
+0:42 Convert bool to int (temp 3-component vector of int)
+0:42 'b3' (temp 3-component vector of bool)
+0:43 Sequence
+0:43 move second child to first child (temp 4-component vector of int)
+0:43 'i4' (temp 4-component vector of int)
+0:43 add (temp 4-component vector of int)
+0:43 Convert float to int (temp 4-component vector of int)
+0:43 'u_f4' (uniform 4-component vector of float)
+0:43 Convert bool to int (temp 4-component vector of int)
+0:43 'b4' (temp 4-component vector of bool)
+0:45 Sequence
+0:45 move second child to first child (temp float)
+0:45 'f' (temp float)
+0:45 Convert int to float (temp float)
+0:45 'i' (temp int)
+0:46 Sequence
+0:46 move second child to first child (temp 2-component vector of float)
+0:46 'f2' (temp 2-component vector of float)
+0:46 Convert int to float (temp 2-component vector of float)
+0:46 'i2' (temp 2-component vector of int)
+0:47 Sequence
+0:47 move second child to first child (temp 3-component vector of float)
+0:47 'f3' (temp 3-component vector of float)
+0:47 Convert int to float (temp 3-component vector of float)
+0:47 'i3' (temp 3-component vector of int)
+0:48 Sequence
+0:48 move second child to first child (temp 4-component vector of float)
+0:48 'f4' (temp 4-component vector of float)
+0:48 Convert int to float (temp 4-component vector of float)
+0:48 'i4' (temp 4-component vector of int)
+0:50 add second child into first child (temp float)
+0:50 'f' (temp float)
+0:50 add (temp float)
+0:50 Convert int to float (temp float)
+0:50 'i' (temp int)
+0:50 Convert bool to float (temp float)
+0:50 'b' (temp bool)
+0:51 subtract second child into first child (temp 2-component vector of float)
+0:51 'f2' (temp 2-component vector of float)
+0:51 add (temp 2-component vector of float)
+0:51 Convert int to float (temp 2-component vector of float)
+0:51 'i2' (temp 2-component vector of int)
+0:51 Convert bool to float (temp 2-component vector of float)
+0:51 'b2' (temp 2-component vector of bool)
+0:52 divide second child into first child (temp 3-component vector of float)
+0:52 'f3' (temp 3-component vector of float)
+0:52 add (temp 3-component vector of float)
+0:52 Convert int to float (temp 3-component vector of float)
+0:52 'i3' (temp 3-component vector of int)
+0:52 Convert bool to float (temp 3-component vector of float)
+0:52 'b3' (temp 3-component vector of bool)
+0:53 add second child into first child (temp 4-component vector of float)
+0:53 'f4' (temp 4-component vector of float)
+0:53 add (temp 4-component vector of float)
+0:53 Convert int to float (temp 4-component vector of float)
+0:53 'i4' (temp 4-component vector of int)
+0:53 Convert bool to float (temp 4-component vector of float)
+0:53 'b4' (temp 4-component vector of bool)
+0:55 add second child into first child (temp 4-component vector of float)
+0:55 'f4' (temp 4-component vector of float)
+0:55 Convert bool to float (temp 4-component vector of float)
+0:55 Convert int to bool (temp 4-component vector of bool)
+0:55 'i_i4' (flat in 4-component vector of int)
+0:56 add second child into first child (temp 4-component vector of float)
+0:56 'f4' (temp 4-component vector of float)
+0:56 Convert bool to float (temp 4-component vector of float)
+0:56 Convert float to bool (temp 4-component vector of bool)
+0:56 'u_f4' (uniform 4-component vector of float)
+0:58 add second child into first child (temp float)
+0:58 'f' (temp float)
+0:58 subtract (temp float)
+0:58 'f' (temp float)
+0:58 Convert int to float (temp float)
+0:58 'i' (temp int)
+0:59 add second child into first child (temp 2-component vector of float)
+0:59 'f2' (temp 2-component vector of float)
+0:59 add (temp 2-component vector of float)
+0:59 Construct vec2 (temp 2-component vector of float)
+0:59 'f' (temp float)
+0:59 Convert int to float (temp float)
+0:59 'i' (temp int)
+0:59 Convert int to float (temp 2-component vector of float)
+0:59 'i2' (temp 2-component vector of int)
+0:60 add second child into first child (temp 3-component vector of float)
+0:60 'f3' (temp 3-component vector of float)
+0:60 add (temp 3-component vector of float)
+0:60 Convert int to float (temp 3-component vector of float)
+0:60 'i3' (temp 3-component vector of int)
+0:60 Construct vec3 (temp 3-component vector of float)
+0:60 'f' (temp float)
+0:60 Convert int to float (temp float)
+0:60 'i' (temp int)
+0:60 'f' (temp float)
+0:61 add second child into first child (temp 4-component vector of float)
+0:61 'f4' (temp 4-component vector of float)
+0:61 add (temp 4-component vector of float)
+0:61 Construct vec4 (temp 4-component vector of float)
+0:61 Convert bool to float (temp float)
+0:61 'b' (temp bool)
+0:61 Convert int to float (temp float)
+0:61 'i' (temp int)
+0:61 'f' (temp float)
+0:61 Convert int to float (temp float)
+0:61 'i' (temp int)
+0:61 Convert int to float (temp 4-component vector of float)
+0:61 'i4' (temp 4-component vector of int)
+0:63 add second child into first child (temp 2-component vector of float)
+0:63 'f2' (temp 2-component vector of float)
+0:63 vector-scale (temp 2-component vector of float)
+0:63 Construct vec2 (temp 2-component vector of float)
+0:63 'f' (temp float)
+0:63 Convert int to float (temp float)
+0:63 'i' (temp int)
+0:63 Convert int to float (temp float)
+0:63 'i' (temp int)
+0:64 add second child into first child (temp 3-component vector of float)
+0:64 'f3' (temp 3-component vector of float)
+0:64 add (temp 3-component vector of float)
+0:64 Construct vec3 (temp 3-component vector of float)
+0:64 'f' (temp float)
+0:64 Convert int to float (temp float)
+0:64 'i' (temp int)
+0:64 'f' (temp float)
+0:64 Convert int to float (temp float)
+0:64 'i' (temp int)
+0:65 add second child into first child (temp 4-component vector of float)
+0:65 'f4' (temp 4-component vector of float)
+0:65 subtract (temp 4-component vector of float)
+0:65 Convert int to float (temp float)
+0:65 'i' (temp int)
+0:65 Construct vec4 (temp 4-component vector of float)
+0:65 Convert bool to float (temp float)
+0:65 'b' (temp bool)
+0:65 Convert int to float (temp float)
+0:65 'i' (temp int)
+0:65 'f' (temp float)
+0:65 Convert int to float (temp float)
+0:65 'i' (temp int)
+0:67 add second child into first child (temp 2-component vector of int)
+0:67 'i2' (temp 2-component vector of int)
+0:67 Construct ivec2 (temp 2-component vector of int)
+0:67 Convert float to int (temp int)
+0:67 'f' (temp float)
+0:67 'i' (temp int)
+0:68 add second child into first child (temp 3-component vector of int)
+0:68 'i3' (temp 3-component vector of int)
+0:68 Construct ivec3 (temp 3-component vector of int)
+0:68 Convert float to int (temp int)
+0:68 'f' (temp float)
+0:68 'i' (temp int)
+0:68 Convert float to int (temp int)
+0:68 'f' (temp float)
+0:69 add second child into first child (temp 4-component vector of int)
+0:69 'i4' (temp 4-component vector of int)
+0:69 Construct ivec4 (temp 4-component vector of int)
+0:69 Convert bool to int (temp int)
+0:69 'b' (temp bool)
+0:69 'i' (temp int)
+0:69 Convert float to int (temp int)
+0:69 'f' (temp float)
+0:69 'i' (temp int)
+0:71 Test condition and select (temp void)
+0:71 Condition
+0:72 logical-or (temp bool)
+0:71 logical-or (temp bool)
+0:71 logical-or (temp bool)
+0:71 Compare Less Than (temp bool)
+0:71 'f' (temp float)
+0:71 Convert int to float (temp float)
+0:71 'i' (temp int)
+0:71 Compare Less Than (temp bool)
+0:71 Convert int to float (temp float)
+0:71 'i' (temp int)
+0:71 'f' (temp float)
+0:72 Compare Equal (temp bool)
+0:72 'f2' (temp 2-component vector of float)
+0:72 Convert int to float (temp 2-component vector of float)
+0:72 'i2' (temp 2-component vector of int)
+0:73 Compare Not Equal (temp bool)
+0:73 Convert int to float (temp 3-component vector of float)
+0:73 'i3' (temp 3-component vector of int)
+0:73 'f3' (temp 3-component vector of float)
+0:71 true case
+0:74 move second child to first child (temp float)
+0:74 'f' (temp float)
+0:74 add (temp float)
+0:74 Test condition and select (temp float)
+0:74 Condition
+0:74 'b' (temp bool)
+0:74 true case
+0:74 Convert int to float (temp float)
+0:74 'i' (temp int)
+0:74 false case
+0:74 direct index (temp float)
+0:74 'f2' (temp 2-component vector of float)
+0:74 Constant:
+0:74 0 (const int)
+0:74 Test condition and select (temp float)
+0:74 Condition
+0:74 direct index (temp bool)
+0:74 'b2' (temp 2-component vector of bool)
+0:74 Constant:
+0:74 0 (const int)
+0:74 true case
+0:74 direct index (temp float)
+0:74 'f3' (temp 3-component vector of float)
+0:74 Constant:
+0:74 0 (const int)
+0:74 false case
+0:74 Convert int to float (temp float)
+0:74 direct index (temp int)
+0:74 'i2' (temp 2-component vector of int)
+0:74 Constant:
+0:74 1 (const int)
+0:76 move second child to first child (temp 4-component vector of float)
+0:76 'gl_FragColor' (fragColor 4-component vector of float FragColor)
+0:86 Test condition and select (temp 4-component vector of float)
+0:86 Condition
+0:85 logical-or (temp bool)
+0:84 logical-or (temp bool)
+0:83 logical-or (temp bool)
+0:82 logical-or (temp bool)
+0:81 logical-or (temp bool)
+0:80 logical-or (temp bool)
+0:79 logical-or (temp bool)
+0:78 logical-or (temp bool)
+0:77 logical-or (temp bool)
+0:77 'b' (temp bool)
+0:78 direct index (temp bool)
+0:78 'b2' (temp 2-component vector of bool)
+0:78 Constant:
+0:78 0 (const int)
+0:79 direct index (temp bool)
+0:79 'b2' (temp 2-component vector of bool)
+0:79 Constant:
+0:79 1 (const int)
+0:80 direct index (temp bool)
+0:80 'b3' (temp 3-component vector of bool)
+0:80 Constant:
+0:80 0 (const int)
+0:81 direct index (temp bool)
+0:81 'b3' (temp 3-component vector of bool)
+0:81 Constant:
+0:81 1 (const int)
+0:82 direct index (temp bool)
+0:82 'b3' (temp 3-component vector of bool)
+0:82 Constant:
+0:82 2 (const int)
+0:83 direct index (temp bool)
+0:83 'b4' (temp 4-component vector of bool)
+0:83 Constant:
+0:83 0 (const int)
+0:84 direct index (temp bool)
+0:84 'b4' (temp 4-component vector of bool)
+0:84 Constant:
+0:84 1 (const int)
+0:85 direct index (temp bool)
+0:85 'b4' (temp 4-component vector of bool)
+0:85 Constant:
+0:85 2 (const int)
+0:86 direct index (temp bool)
+0:86 'b4' (temp 4-component vector of bool)
+0:86 Constant:
+0:86 3 (const int)
+0:86 true case
+0:105 Construct vec4 (temp 4-component vector of float)
+0:105 add (temp float)
+0:104 add (temp float)
+0:103 add (temp float)
+0:102 add (temp float)
+0:101 add (temp float)
+0:100 add (temp float)
+0:99 add (temp float)
+0:98 add (temp float)
+0:97 add (temp float)
+0:96 add (temp float)
+0:95 Convert int to float (temp float)
+0:95 add (temp int)
+0:94 add (temp int)
+0:93 add (temp int)
+0:92 add (temp int)
+0:91 add (temp int)
+0:90 add (temp int)
+0:89 add (temp int)
+0:88 add (temp int)
+0:87 add (temp int)
+0:87 'i' (temp int)
+0:88 direct index (temp int)
+0:88 'i2' (temp 2-component vector of int)
+0:88 Constant:
+0:88 0 (const int)
+0:89 direct index (temp int)
+0:89 'i2' (temp 2-component vector of int)
+0:89 Constant:
+0:89 1 (const int)
+0:90 direct index (temp int)
+0:90 'i3' (temp 3-component vector of int)
+0:90 Constant:
+0:90 0 (const int)
+0:91 direct index (temp int)
+0:91 'i3' (temp 3-component vector of int)
+0:91 Constant:
+0:91 1 (const int)
+0:92 direct index (temp int)
+0:92 'i3' (temp 3-component vector of int)
+0:92 Constant:
+0:92 2 (const int)
+0:93 direct index (temp int)
+0:93 'i4' (temp 4-component vector of int)
+0:93 Constant:
+0:93 0 (const int)
+0:94 direct index (temp int)
+0:94 'i4' (temp 4-component vector of int)
+0:94 Constant:
+0:94 1 (const int)
+0:95 direct index (temp int)
+0:95 'i4' (temp 4-component vector of int)
+0:95 Constant:
+0:95 2 (const int)
+0:96 direct index (temp int)
+0:96 'i4' (temp 4-component vector of int)
+0:96 Constant:
+0:96 3 (const int)
+0:97 'f' (temp float)
+0:98 direct index (temp float)
+0:98 'f2' (temp 2-component vector of float)
+0:98 Constant:
+0:98 0 (const int)
+0:99 direct index (temp float)
+0:99 'f2' (temp 2-component vector of float)
+0:99 Constant:
+0:99 1 (const int)
+0:100 direct index (temp float)
+0:100 'f3' (temp 3-component vector of float)
+0:100 Constant:
+0:100 0 (const int)
+0:101 direct index (temp float)
+0:101 'f3' (temp 3-component vector of float)
+0:101 Constant:
+0:101 1 (const int)
+0:102 direct index (temp float)
+0:102 'f3' (temp 3-component vector of float)
+0:102 Constant:
+0:102 2 (const int)
+0:103 direct index (temp float)
+0:103 'f4' (temp 4-component vector of float)
+0:103 Constant:
+0:103 0 (const int)
+0:104 direct index (temp float)
+0:104 'f4' (temp 4-component vector of float)
+0:104 Constant:
+0:104 1 (const int)
+0:105 direct index (temp float)
+0:105 'f4' (temp 4-component vector of float)
+0:105 Constant:
+0:105 2 (const int)
+0:106 direct index (temp float)
+0:106 'f4' (temp 4-component vector of float)
+0:106 Constant:
+0:106 3 (const int)
+0:86 false case
+0:106 Constant:
+0:106 1.000000
+0:106 1.000000
+0:106 1.000000
+0:106 1.000000
+0:109 Sequence
+0:109 move second child to first child (temp 4-component vector of int)
+0:109 'cv2' (temp 4-component vector of int)
+0:109 Constant:
+0:109 1 (const int)
+0:109 1 (const int)
+0:109 1 (const int)
+0:109 1 (const int)
+0:110 Sequence
+0:110 move second child to first child (temp 4-component vector of bool)
+0:110 'cv5' (temp 4-component vector of bool)
+0:110 Convert int to bool (temp 4-component vector of bool)
+0:110 'cv2' (temp 4-component vector of int)
+0:111 add second child into first child (temp 4-component vector of float)
+0:111 'gl_FragColor' (fragColor 4-component vector of float FragColor)
+0:111 Construct float (temp float)
+0:111 Convert bool to float (temp 4-component vector of float)
+0:111 'cv5' (temp 4-component vector of bool)
+0:? Linker Objects
+0:? 'u_b' (uniform bool)
+0:? 'u_b2' (uniform 2-component vector of bool)
+0:? 'u_b3' (uniform 3-component vector of bool)
+0:? 'u_b4' (uniform 4-component vector of bool)
+0:? 'u_i' (uniform int)
+0:? 'u_i2' (uniform 2-component vector of int)
+0:? 'u_i3' (uniform 3-component vector of int)
+0:? 'u_i4' (uniform 4-component vector of int)
+0:? 'u_f' (uniform float)
+0:? 'u_f2' (uniform 2-component vector of float)
+0:? 'u_f3' (uniform 3-component vector of float)
+0:? 'u_f4' (uniform 4-component vector of float)
+0:? 'i_b' (uniform bool)
+0:? 'i_b2' (uniform 2-component vector of bool)
+0:? 'i_b3' (uniform 3-component vector of bool)
+0:? 'i_b4' (uniform 4-component vector of bool)
+0:? 'i_i' (flat in int)
+0:? 'i_i2' (flat in 2-component vector of int)
+0:? 'i_i3' (flat in 3-component vector of int)
+0:? 'i_i4' (flat in 4-component vector of int)
+0:? 'i_f' (smooth in float)
+0:? 'i_f2' (smooth in 2-component vector of float)
+0:? 'i_f3' (smooth in 3-component vector of float)
+0:? 'i_f4' (smooth in 4-component vector of float)
+
diff --git a/chromium/third_party/glslang/src/Test/baseResults/cppComplexExpr.vert.out b/chromium/third_party/glslang/src/Test/baseResults/cppComplexExpr.vert.out
new file mode 100644
index 00000000000..aa73a069d38
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/cppComplexExpr.vert.out
@@ -0,0 +1,200 @@
+cppComplexExpr.vert
+ERROR: 0:46: 'xyxwx' : illegal vector field selection
+ERROR: 0:46: 'xyxwx' : illegal vector field selection
+ERROR: 0:66: '#define' : Macro redefined; different substitutions: BIG
+ERROR: 0:81: 'preprocessor evaluation' : bad expression
+ERROR: 0:81: '#if' : unexpected tokens following directive
+ERROR: 0:82: '#error' : good macro
+ERROR: 0:87: 'macro expansion' : End of line in macro substitution: foobar
+ERROR: 0:88: 'preprocessor evaluation' : can't evaluate expression
+ERROR: 0:88: 'preprocessor evaluation' : bad expression
+ERROR: 0:88: '#if' : unexpected tokens following directive
+ERROR: 0:92: 'macro expansion' : End of line in macro substitution: foobar
+ERROR: 0:93: 'preprocessor evaluation' : can't evaluate expression
+ERROR: 0:93: 'preprocessor evaluation' : bad expression
+ERROR: 0:93: '#if' : unexpected tokens following directive
+ERROR: 0:99: 'macro expansion' : End of line in macro substitution: foobar
+ERROR: 0:100: 'preprocessor evaluation' : can't evaluate expression
+ERROR: 0:100: 'preprocessor evaluation' : bad expression
+ERROR: 0:100: '#if' : unexpected tokens following directive
+ERROR: 0:101: 'macro expansion' : End of line in macro substitution: foobar
+ERROR: 0:102: 'preprocessor evaluation' : can't evaluate expression
+ERROR: 0:102: 'preprocessor evaluation' : bad expression
+ERROR: 0:102: '#if' : unexpected tokens following directive
+ERROR: 0:108: 'preprocessor evaluation' : undefined macro in expression not allowed in es profile UNDEF
+ERROR: 0:111: '#error' : good 0
+ERROR: 0:115: '#error' : good 1
+ERROR: 0:120: 'preprocessor evaluation' : undefined macro in expression not allowed in es profile UNDEF
+ERROR: 0:123: 'preprocessor evaluation' : undefined macro in expression not allowed in es profile UNDEF
+ERROR: 0:129: '#error' : good 1
+ERROR: 0:133: '#error' : good 3
+ERROR: 0:139: '#error' : good 4
+ERROR: 0:144: 'preprocessor evaluation' : undefined macro in expression not allowed in es profile UNDEF
+ERROR: 0:153: 'preprocessor evaluation' : undefined macro in expression not allowed in es profile UNDEF
+ERROR: 0:156: 'preprocessor evaluation' : undefined macro in expression not allowed in es profile UNDEF2
+ERROR: 0:159: 'preprocessor evaluation' : undefined macro in expression not allowed in es profile UNDEF2
+ERROR: 0:3000: '#error' : line of this error should be 3000
+ERROR: 0:3002: '#define' : predefined names can't be (un)defined: __LINE__
+ERROR: 0:3003: '#define' : predefined names can't be (un)defined: __FILE__
+ERROR: 0:3004: '#define' : predefined names can't be (un)defined: __VERSION__
+ERROR: 0:3005: '#define' : names beginning with "GL_" can't be (un)defined: GL_SOME_EXTENSION
+ERROR: 0:3006: '#undef' : predefined names can't be (un)defined: __LINE__
+ERROR: 0:3007: '#undef' : predefined names can't be (un)defined: __FILE__
+ERROR: 0:3008: '#undef' : predefined names can't be (un)defined: __VERSION__
+ERROR: 0:3009: '#undef' : names beginning with "GL_" can't be (un)defined: GL_SOME_EXTENSION
+ERROR: 0:4000: 'preprocessor evaluation' : division by 0
+ERROR: 0:0: 'preprocessor evaluation' : division by 0
+ERROR: 0:3: 'preprocessor evaluation' : bad expression
+ERROR: 0:3: 'preprocessor evaluation' : division by 0
+ERROR: 0:10001: '' : missing #endif
+ERROR: 48 compilation errors. No code generated.
+
+
+Shader version: 300
+ERROR: node is still EOpNull!
+0:4 Sequence
+0:4 move second child to first child (temp highp float)
+0:4 'sum' (global highp float)
+0:4 Constant:
+0:4 0.000000
+0:6 Function Definition: main( (global void)
+0:6 Function Parameters:
+0:10 Sequence
+0:10 add second child into first child (temp highp float)
+0:10 'sum' (global highp float)
+0:10 Constant:
+0:10 1.000000
+0:15 add second child into first child (temp highp float)
+0:15 'sum' (global highp float)
+0:15 Constant:
+0:15 20.000000
+0:30 add second child into first child (temp highp float)
+0:30 'sum' (global highp float)
+0:30 Constant:
+0:30 300.000000
+0:39 move second child to first child (temp highp 4-component vector of float)
+0:39 'gl_Position' (gl_Position highp 4-component vector of float Position)
+0:39 Construct vec4 (temp highp 4-component vector of float)
+0:39 'sum' (global highp float)
+0:44 Function Definition: foo( (global highp float)
+0:44 Function Parameters:
+0:46 Sequence
+0:46 Branch: Return with expression
+0:46 add (temp highp float)
+0:46 add (temp highp float)
+0:46 direct index (temp highp float)
+0:46 'gl_Position' (gl_Position highp 4-component vector of float Position)
+0:46 Constant:
+0:46 0 (const int)
+0:46 Constant:
+0:46 3.000000
+0:46 add (temp highp float)
+0:46 direct index (temp highp float)
+0:46 'gl_Position' (gl_Position highp 4-component vector of float Position)
+0:46 Constant:
+0:46 0 (const int)
+0:46 Constant:
+0:46 3.000000
+0:47 Branch: Return with expression
+0:47 add (temp highp float)
+0:47 add (temp highp float)
+0:47 direct index (temp highp float)
+0:47 'gl_Position' (gl_Position highp 4-component vector of float Position)
+0:47 Constant:
+0:47 1 (const int)
+0:47 Constant:
+0:47 3.000000
+0:47 add (temp highp float)
+0:47 direct index (temp highp float)
+0:47 'gl_Position' (gl_Position highp 4-component vector of float Position)
+0:47 Constant:
+0:47 1 (const int)
+0:47 Constant:
+0:47 3.000000
+0:97 Sequence
+0:97 move second child to first child (temp highp float)
+0:97 'c' (global highp float)
+0:98 Constant:
+0:98 3.300000
+0:? Linker Objects
+0:? 'sum' (global highp float)
+0:? 'c' (global highp float)
+0:? 'gl_VertexID' (gl_VertexId highp int VertexId)
+0:? 'gl_InstanceID' (gl_InstanceId highp int InstanceId)
+
+
+Linked vertex stage:
+
+
+Shader version: 300
+ERROR: node is still EOpNull!
+0:4 Sequence
+0:4 move second child to first child (temp highp float)
+0:4 'sum' (global highp float)
+0:4 Constant:
+0:4 0.000000
+0:6 Function Definition: main( (global void)
+0:6 Function Parameters:
+0:10 Sequence
+0:10 add second child into first child (temp highp float)
+0:10 'sum' (global highp float)
+0:10 Constant:
+0:10 1.000000
+0:15 add second child into first child (temp highp float)
+0:15 'sum' (global highp float)
+0:15 Constant:
+0:15 20.000000
+0:30 add second child into first child (temp highp float)
+0:30 'sum' (global highp float)
+0:30 Constant:
+0:30 300.000000
+0:39 move second child to first child (temp highp 4-component vector of float)
+0:39 'gl_Position' (gl_Position highp 4-component vector of float Position)
+0:39 Construct vec4 (temp highp 4-component vector of float)
+0:39 'sum' (global highp float)
+0:44 Function Definition: foo( (global highp float)
+0:44 Function Parameters:
+0:46 Sequence
+0:46 Branch: Return with expression
+0:46 add (temp highp float)
+0:46 add (temp highp float)
+0:46 direct index (temp highp float)
+0:46 'gl_Position' (gl_Position highp 4-component vector of float Position)
+0:46 Constant:
+0:46 0 (const int)
+0:46 Constant:
+0:46 3.000000
+0:46 add (temp highp float)
+0:46 direct index (temp highp float)
+0:46 'gl_Position' (gl_Position highp 4-component vector of float Position)
+0:46 Constant:
+0:46 0 (const int)
+0:46 Constant:
+0:46 3.000000
+0:47 Branch: Return with expression
+0:47 add (temp highp float)
+0:47 add (temp highp float)
+0:47 direct index (temp highp float)
+0:47 'gl_Position' (gl_Position highp 4-component vector of float Position)
+0:47 Constant:
+0:47 1 (const int)
+0:47 Constant:
+0:47 3.000000
+0:47 add (temp highp float)
+0:47 direct index (temp highp float)
+0:47 'gl_Position' (gl_Position highp 4-component vector of float Position)
+0:47 Constant:
+0:47 1 (const int)
+0:47 Constant:
+0:47 3.000000
+0:97 Sequence
+0:97 move second child to first child (temp highp float)
+0:97 'c' (global highp float)
+0:98 Constant:
+0:98 3.300000
+0:? Linker Objects
+0:? 'sum' (global highp float)
+0:? 'c' (global highp float)
+0:? 'gl_VertexID' (gl_VertexId highp int VertexId)
+0:? 'gl_InstanceID' (gl_InstanceId highp int InstanceId)
+
diff --git a/chromium/third_party/glslang/src/Test/baseResults/cppIndent.vert.out b/chromium/third_party/glslang/src/Test/baseResults/cppIndent.vert.out
new file mode 100644
index 00000000000..318ca815d4d
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/cppIndent.vert.out
@@ -0,0 +1,84 @@
+cppIndent.vert
+ERROR: 0:61: 'macro expansion' : Too few args in Macro FUNC
+ERROR: 0:61: '' : syntax error
+ERROR: 2 compilation errors. No code generated.
+
+
+Shader version: 110
+ERROR: node is still EOpNull!
+0:5 Sequence
+0:5 move second child to first child (temp float)
+0:5 'sum' (global float)
+0:5 Constant:
+0:5 0.000000
+0:7 Function Definition: main( (global void)
+0:7 Function Parameters:
+0:12 Sequence
+0:12 add second child into first child (temp float)
+0:12 'sum' (global float)
+0:12 Constant:
+0:12 1.000000
+0:22 add second child into first child (temp float)
+0:22 'sum' (global float)
+0:22 Constant:
+0:22 300.000000
+0:37 add second child into first child (temp float)
+0:37 'sum' (global float)
+0:37 Constant:
+0:37 600000.000000
+0:47 add second child into first child (temp float)
+0:47 'sum' (global float)
+0:47 Constant:
+0:47 80000000.000000
+0:52 add second child into first child (temp float)
+0:52 'sum' (global float)
+0:52 Constant:
+0:52 900000000.000000
+0:56 move second child to first child (temp 4-component vector of float)
+0:56 'gl_Position' (gl_Position 4-component vector of float Position)
+0:56 Construct vec4 (temp 4-component vector of float)
+0:56 'sum' (global float)
+0:? Linker Objects
+0:? 'sum' (global float)
+
+
+Linked vertex stage:
+
+
+Shader version: 110
+ERROR: node is still EOpNull!
+0:5 Sequence
+0:5 move second child to first child (temp float)
+0:5 'sum' (global float)
+0:5 Constant:
+0:5 0.000000
+0:7 Function Definition: main( (global void)
+0:7 Function Parameters:
+0:12 Sequence
+0:12 add second child into first child (temp float)
+0:12 'sum' (global float)
+0:12 Constant:
+0:12 1.000000
+0:22 add second child into first child (temp float)
+0:22 'sum' (global float)
+0:22 Constant:
+0:22 300.000000
+0:37 add second child into first child (temp float)
+0:37 'sum' (global float)
+0:37 Constant:
+0:37 600000.000000
+0:47 add second child into first child (temp float)
+0:47 'sum' (global float)
+0:47 Constant:
+0:47 80000000.000000
+0:52 add second child into first child (temp float)
+0:52 'sum' (global float)
+0:52 Constant:
+0:52 900000000.000000
+0:56 move second child to first child (temp 4-component vector of float)
+0:56 'gl_Position' (gl_Position 4-component vector of float Position)
+0:56 Construct vec4 (temp 4-component vector of float)
+0:56 'sum' (global float)
+0:? Linker Objects
+0:? 'sum' (global float)
+
diff --git a/chromium/third_party/glslang/src/Test/baseResults/cppNest.vert.out b/chromium/third_party/glslang/src/Test/baseResults/cppNest.vert.out
new file mode 100644
index 00000000000..4f95f5a2acf
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/cppNest.vert.out
@@ -0,0 +1,154 @@
+cppNest.vert
+ERROR: 0:144: '#elif' : #elif after #else
+ERROR: 0:152: '#else' : #else after #else
+ERROR: 0:161: '#elif' : #elif after #else
+ERROR: 0:169: '#else' : #else after #else
+ERROR: 0:177: 'macro expansion' : End of input in macro FUNC
+ERROR: 0:178: '' : syntax error
+ERROR: 6 compilation errors. No code generated.
+
+
+Shader version: 110
+ERROR: node is still EOpNull!
+0:5 Sequence
+0:5 move second child to first child (temp float)
+0:5 'sum' (global float)
+0:5 Constant:
+0:5 0.000000
+0:7 Function Definition: main( (global void)
+0:7 Function Parameters:
+0:12 Sequence
+0:12 add second child into first child (temp float)
+0:12 'sum' (global float)
+0:12 Constant:
+0:12 1.000000
+0:21 add second child into first child (temp float)
+0:21 'sum' (global float)
+0:21 Constant:
+0:21 300.000000
+0:61 add second child into first child (temp float)
+0:61 'sum' (global float)
+0:61 Constant:
+0:61 600000.000000
+0:65 add second child into first child (temp float)
+0:65 'sum' (global float)
+0:65 Constant:
+0:65 80000000.000000
+0:69 add second child into first child (temp float)
+0:69 'sum' (global float)
+0:69 Constant:
+0:69 900000000.000000
+0:76 add second child into first child (temp float)
+0:76 'sum' (global float)
+0:76 Constant:
+0:76 7000000.000000
+0:86 move second child to first child (temp 4-component vector of float)
+0:86 'gl_Position' (gl_Position 4-component vector of float Position)
+0:86 Construct vec4 (temp 4-component vector of float)
+0:86 'sum' (global float)
+0:103 Sequence
+0:103 move second child to first child (temp int)
+0:103 'selected4' (global int)
+0:103 Constant:
+0:103 4 (const int)
+0:115 Sequence
+0:115 move second child to first child (temp int)
+0:115 'selected2' (global int)
+0:115 Constant:
+0:115 2 (const int)
+0:133 Sequence
+0:133 move second child to first child (temp int)
+0:133 'selected3' (global int)
+0:133 Constant:
+0:133 3 (const int)
+0:175 Function Definition: foo985( (global void)
+0:175 Function Parameters:
+0:175 Sequence
+0:175 add (temp int)
+0:175 Constant:
+0:175 2 (const int)
+0:175 Comma (temp int)
+0:175 Constant:
+0:175 3 (const int)
+0:175 Constant:
+0:175 4 (const int)
+0:? Linker Objects
+0:? 'sum' (global float)
+0:? 'selected4' (global int)
+0:? 'selected2' (global int)
+0:? 'selected3' (global int)
+
+
+Linked vertex stage:
+
+
+Shader version: 110
+ERROR: node is still EOpNull!
+0:5 Sequence
+0:5 move second child to first child (temp float)
+0:5 'sum' (global float)
+0:5 Constant:
+0:5 0.000000
+0:7 Function Definition: main( (global void)
+0:7 Function Parameters:
+0:12 Sequence
+0:12 add second child into first child (temp float)
+0:12 'sum' (global float)
+0:12 Constant:
+0:12 1.000000
+0:21 add second child into first child (temp float)
+0:21 'sum' (global float)
+0:21 Constant:
+0:21 300.000000
+0:61 add second child into first child (temp float)
+0:61 'sum' (global float)
+0:61 Constant:
+0:61 600000.000000
+0:65 add second child into first child (temp float)
+0:65 'sum' (global float)
+0:65 Constant:
+0:65 80000000.000000
+0:69 add second child into first child (temp float)
+0:69 'sum' (global float)
+0:69 Constant:
+0:69 900000000.000000
+0:76 add second child into first child (temp float)
+0:76 'sum' (global float)
+0:76 Constant:
+0:76 7000000.000000
+0:86 move second child to first child (temp 4-component vector of float)
+0:86 'gl_Position' (gl_Position 4-component vector of float Position)
+0:86 Construct vec4 (temp 4-component vector of float)
+0:86 'sum' (global float)
+0:103 Sequence
+0:103 move second child to first child (temp int)
+0:103 'selected4' (global int)
+0:103 Constant:
+0:103 4 (const int)
+0:115 Sequence
+0:115 move second child to first child (temp int)
+0:115 'selected2' (global int)
+0:115 Constant:
+0:115 2 (const int)
+0:133 Sequence
+0:133 move second child to first child (temp int)
+0:133 'selected3' (global int)
+0:133 Constant:
+0:133 3 (const int)
+0:175 Function Definition: foo985( (global void)
+0:175 Function Parameters:
+0:175 Sequence
+0:175 add (temp int)
+0:175 Constant:
+0:175 2 (const int)
+0:175 Comma (temp int)
+0:175 Constant:
+0:175 3 (const int)
+0:175 Constant:
+0:175 4 (const int)
+0:? Linker Objects
+0:? 'sum' (global float)
+0:? 'selected4' (global int)
+0:? 'selected2' (global int)
+0:? 'selected3' (global int)
+
diff --git a/chromium/third_party/glslang/src/Test/baseResults/cppSimple.vert.out b/chromium/third_party/glslang/src/Test/baseResults/cppSimple.vert.out
new file mode 100644
index 00000000000..366770d13d7
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/cppSimple.vert.out
@@ -0,0 +1,317 @@
+cppSimple.vert
+Warning, version 400 is not yet complete; most version-specific features are present, but some are missing.
+ERROR: 0:77: '#error' : good1
+ERROR: 0:81: '#error' : good2
+ERROR: 0:85: '#error' : good3
+ERROR: 0:89: '#error' : good4
+ERROR: 0:93: '#error' : good5
+ERROR: 0:97: '#error' : good6
+ERROR: 0:100: 'preprocessor evaluation' : expected ')'
+ERROR: 0:101: '#error' : bad1
+ERROR: 0:104: '#if' : unexpected tokens following directive
+ERROR: 0:105: '#error' : bad2
+ERROR: 0:108: 'preprocessor evaluation' : expected ')'
+ERROR: 0:109: '#error' : bad3
+ERROR: 0:112: '#if' : unexpected tokens following directive
+ERROR: 0:113: '#error' : bad4
+ERROR: 0:116: 'preprocessor evaluation' : expected ')'
+ERROR: 0:117: '#error' : bad5
+ERROR: 0:120: '#if' : unexpected tokens following directive
+ERROR: 0:121: '#error' : bad6
+ERROR: 0:122: '#endif' : unexpected tokens following directive
+ERROR: 0:135: '""' : string literals not supported
+ERROR: 0:136: '""' : string literals not supported
+ERROR: 0:136: 'length' : no matching overloaded function found
+ERROR: 0:136: '=' : cannot convert from 'const float' to 'global int'
+ERROR: 0:138: ''' : character literals not supported
+ERROR: 0:138: ''' : character literals not supported
+ERROR: 0:141: '#define' : names beginning with "GL_" can't be (un)defined: GL_
+ERROR: 0:142: '#define' : names beginning with "GL_" can't be (un)defined: GL_Macro
+WARNING: 0:143: '#define' : names containing consecutive underscores are reserved: __M
+WARNING: 0:144: '#define' : names containing consecutive underscores are reserved: M__
+WARNING: 0:145: '#define' : names containing consecutive underscores are reserved: ABC__DE
+ERROR: 0:148: '#else' : unexpected tokens following directive
+ERROR: 0:149: '#elif' : #elif after #else
+ERROR: 0:155: '#else' : unexpected tokens following directive
+ERROR: 0:158: '#else' : #else after #else
+ERROR: 0:160: '#endif' : unexpected tokens following directive
+ERROR: 0:164: '#define' : duplicate macro parameter
+ERROR: 0:173: '#define' : Macro redefined; different number of arguments: m4
+ERROR: 0:178: '#define' : Macro redefined; different number of arguments: m5
+ERROR: 0:182: '#define' : Macro redefined; different number of arguments: m6
+ERROR: 0:185: '#define' : Macro redefined; different substitutions: m7
+ERROR: 0:192: '#define' : Macro redefined; different substitutions: m8
+ERROR: 0:196: '#define' : Macro redefined; different argument names: m9
+WARNING: 0:204: '#undef' : names containing consecutive underscores are reserved: __VERSION__
+ERROR: 0:205: '#undef' : names beginning with "GL_" can't be (un)defined: GL_ARB_texture_rectangle
+ERROR: 0:210: '#' : invalid directive
+ERROR: 0:211: '#' : invalid directive
+ERROR: 0:212: '#' : invalid directive
+ERROR: 0:213: '#' : invalid directive
+ERROR: 0:214: '#' : invalid directive
+ERROR: 0:215: '#' : invalid directive
+ERROR: 0:224: '#pragma' : optimize pragma syntax is incorrect
+ERROR: 0:225: '#pragma' : optimize pragma syntax is incorrect
+ERROR: 0:226: '#pragma' : debug pragma syntax is incorrect
+ERROR: 0:227: '#pragma' : debug pragma syntax is incorrect
+ERROR: 0:229: '#pragma' : optimize pragma syntax is incorrect
+ERROR: 0:230: '#pragma' : debug pragma syntax is incorrect
+ERROR: 0:233: 'line continuation' : not supported for this version or the enabled extensions
+ERROR: 0:235: 'line continuation' : not supported for this version or the enabled extensions
+ERROR: 0:236: '#error' : good continuation
+ERROR: 0:238: '#' : invalid directive: flizbit
+ERROR: 0:242: '#' : invalid directive: directive
+ERROR: 0:12000: '#error' : line should be 12000
+ERROR: 7:13000: '#error' : line should be 13000 , string 7
+ERROR: 7:14013: '#error' : line should be 14013 , string 7
+ERROR: 12:14013: '#error' : line should be 14013 , string 12
+ERROR: 12:14025: '#error' : line should be 14025 , string 12
+ERROR: 12:1233: '#line' : unexpected tokens following directive
+ERROR: 12:1236: '#line' : unexpected tokens following directive
+ERROR: 12:20000: '#error' : line should be 20000
+ERROR: 12:20010: '#error' : line should be 20010
+ERROR: 12:20020: '#error' : line should be 20020
+ERROR: 12:20045: '#define' : Macro redefined; different substitutions: SPACE_IN_MIDDLE
+ERROR: 12:20051: '#error' : good evaluation 1
+ERROR: 12:20055: '#error' : good evaluation 2
+ERROR: 12:9000: 'preprocessor evaluation' : expected ')'
+ERROR: 12:9002: '#if' : unexpected tokens following directive
+ERROR: 12:9014: 'macro expansion' : expected '(' following FOOOM
+ERROR: 12:9014: 'FOOOM' : undeclared identifier
+ERROR: 12:9014: '=' : cannot convert from 'temp float' to 'global int'
+ERROR: 12:9015: 'macro expansion' : expected '(' following FOOOM
+ERROR: 12:9016: 'preprocessor evaluation' : can't evaluate expression
+ERROR: 12:9016: 'preprocessor evaluation' : bad expression
+ERROR: 12:9500: 'preprocessor evaluation' : bad expression
+ERROR: 12:9500: '#if' : unexpected tokens following directive
+ERROR: 12:9502: 'preprocessor evaluation' : bad expression
+ERROR: 12:9502: '#if' : unexpected tokens following directive
+ERROR: 12:9504: 'preprocessor evaluation' : bad expression
+ERROR: 12:9504: '#if' : unexpected tokens following directive
+ERROR: 12:9506: '#error' : \ 377
+ERROR: 12:9507: '#error' : \ 376
+ERROR: 12:9508: '#error' : \ 377
+ERROR: 12:10002: '' : missing #endif
+ERROR: 88 compilation errors. No code generated.
+
+
+Shader version: 400
+ERROR: node is still EOpNull!
+0:5 Sequence
+0:5 move second child to first child (temp float)
+0:5 'sum' (global float)
+0:5 Constant:
+0:5 0.000000
+0:7 Function Definition: main( (global void)
+0:7 Function Parameters:
+0:12 Sequence
+0:12 add second child into first child (temp float)
+0:12 'sum' (global float)
+0:12 Constant:
+0:12 1.000000
+0:22 add second child into first child (temp float)
+0:22 'sum' (global float)
+0:22 Constant:
+0:22 300.000000
+0:37 add second child into first child (temp float)
+0:37 'sum' (global float)
+0:37 Constant:
+0:37 600000.000000
+0:48 add second child into first child (temp float)
+0:48 'sum' (global float)
+0:48 Constant:
+0:48 7000000.000000
+0:53 add second child into first child (temp float)
+0:53 'sum' (global float)
+0:53 Constant:
+0:53 80000000.000000
+0:58 add second child into first child (temp float)
+0:58 'sum' (global float)
+0:58 Constant:
+0:58 900000000.000000
+0:65 add second child into first child (temp float)
+0:65 'sum' (global float)
+0:65 Constant:
+0:65 0.050000
+0:69 move second child to first child (temp 4-component vector of float)
+0:69 gl_Position: direct index for structure (gl_Position 4-component vector of float Position)
+0:69 'anon@0' (out block{gl_Position 4-component vector of float Position gl_Position, gl_PointSize float PointSize gl_PointSize, out implicitly-sized array of float ClipDistance gl_ClipDistance, gl_ClipVertex 4-component vector of float ClipVertex gl_ClipVertex, out 4-component vector of float FrontColor gl_FrontColor, out 4-component vector of float BackColor gl_BackColor, out 4-component vector of float FrontSecondaryColor gl_FrontSecondaryColor, out 4-component vector of float BackSecondaryColor gl_BackSecondaryColor, out implicitly-sized array of 4-component vector of float TexCoord gl_TexCoord, out float FogFragCoord gl_FogFragCoord})
+0:69 Constant:
+0:69 0 (const uint)
+0:69 Construct vec4 (temp 4-component vector of float)
+0:69 'sum' (global float)
+0:124 Sequence
+0:124 move second child to first child (temp int)
+0:124 'linenumber' (global int)
+0:124 Constant:
+0:124 124 (const int)
+0:125 Sequence
+0:125 move second child to first child (temp int)
+0:125 'filenumber' (global int)
+0:125 Constant:
+0:125 0 (const int)
+0:126 Sequence
+0:126 move second child to first child (temp int)
+0:126 'version' (global int)
+0:126 Constant:
+0:126 400 (const int)
+0:130 Sequence
+0:130 move second child to first child (temp float)
+0:130 'twoPi' (global float)
+0:130 Constant:
+0:130 6.280000
+0:199 Sequence
+0:199 move second child to first child (temp int)
+0:199 'n' (global int)
+0:199 Constant:
+0:199 15 (const int)
+0:202 Sequence
+0:202 move second child to first child (temp double)
+0:202 'f' (global double)
+0:202 Constant:
+0:202 0.000800
+12:20031 Function Definition: foo234( (global void)
+12:20031 Function Parameters:
+12:20033 Sequence
+12:20033 move second child to first child (temp 4-component vector of float)
+12:20033 gl_Position: direct index for structure (gl_Position 4-component vector of float Position)
+12:20033 'anon@0' (out block{gl_Position 4-component vector of float Position gl_Position, gl_PointSize float PointSize gl_PointSize, out implicitly-sized array of float ClipDistance gl_ClipDistance, gl_ClipVertex 4-component vector of float ClipVertex gl_ClipVertex, out 4-component vector of float FrontColor gl_FrontColor, out 4-component vector of float BackColor gl_BackColor, out 4-component vector of float FrontSecondaryColor gl_FrontSecondaryColor, out 4-component vector of float BackSecondaryColor gl_BackSecondaryColor, out implicitly-sized array of 4-component vector of float TexCoord gl_TexCoord, out float FogFragCoord gl_FogFragCoord})
+12:20033 Constant:
+12:20033 0 (const uint)
+12:20033 Constant:
+12:20033 6.000000
+12:20033 6.000000
+12:20033 6.000000
+12:20033 6.000000
+12:9011 Sequence
+12:9011 move second child to first child (temp int)
+12:9011 'R1' (global int)
+12:9011 'RECURSE' (global int)
+0:? Linker Objects
+0:? 'sum' (global float)
+0:? 'anon@0' (out block{gl_Position 4-component vector of float Position gl_Position, gl_PointSize float PointSize gl_PointSize, out implicitly-sized array of float ClipDistance gl_ClipDistance, gl_ClipVertex 4-component vector of float ClipVertex gl_ClipVertex, out 4-component vector of float FrontColor gl_FrontColor, out 4-component vector of float BackColor gl_BackColor, out 4-component vector of float FrontSecondaryColor gl_FrontSecondaryColor, out 4-component vector of float BackSecondaryColor gl_BackSecondaryColor, out implicitly-sized array of 4-component vector of float TexCoord gl_TexCoord, out float FogFragCoord gl_FogFragCoord})
+0:? 'linenumber' (global int)
+0:? 'filenumber' (global int)
+0:? 'version' (global int)
+0:? 'twoPi' (global float)
+0:? 'a' (global int)
+0:? 'n' (global int)
+0:? 'f' (global double)
+0:? 'RECURSE' (global int)
+0:? 'R1' (global int)
+0:? 'aoeua' (global int)
+0:? 'gl_VertexID' (gl_VertexId int VertexId)
+0:? 'gl_InstanceID' (gl_InstanceId int InstanceId)
+
+
+Linked vertex stage:
+
+
+Shader version: 400
+ERROR: node is still EOpNull!
+0:5 Sequence
+0:5 move second child to first child (temp float)
+0:5 'sum' (global float)
+0:5 Constant:
+0:5 0.000000
+0:7 Function Definition: main( (global void)
+0:7 Function Parameters:
+0:12 Sequence
+0:12 add second child into first child (temp float)
+0:12 'sum' (global float)
+0:12 Constant:
+0:12 1.000000
+0:22 add second child into first child (temp float)
+0:22 'sum' (global float)
+0:22 Constant:
+0:22 300.000000
+0:37 add second child into first child (temp float)
+0:37 'sum' (global float)
+0:37 Constant:
+0:37 600000.000000
+0:48 add second child into first child (temp float)
+0:48 'sum' (global float)
+0:48 Constant:
+0:48 7000000.000000
+0:53 add second child into first child (temp float)
+0:53 'sum' (global float)
+0:53 Constant:
+0:53 80000000.000000
+0:58 add second child into first child (temp float)
+0:58 'sum' (global float)
+0:58 Constant:
+0:58 900000000.000000
+0:65 add second child into first child (temp float)
+0:65 'sum' (global float)
+0:65 Constant:
+0:65 0.050000
+0:69 move second child to first child (temp 4-component vector of float)
+0:69 gl_Position: direct index for structure (gl_Position 4-component vector of float Position)
+0:69 'anon@0' (out block{gl_Position 4-component vector of float Position gl_Position, gl_PointSize float PointSize gl_PointSize, out 1-element array of float ClipDistance gl_ClipDistance, gl_ClipVertex 4-component vector of float ClipVertex gl_ClipVertex, out 4-component vector of float FrontColor gl_FrontColor, out 4-component vector of float BackColor gl_BackColor, out 4-component vector of float FrontSecondaryColor gl_FrontSecondaryColor, out 4-component vector of float BackSecondaryColor gl_BackSecondaryColor, out 1-element array of 4-component vector of float TexCoord gl_TexCoord, out float FogFragCoord gl_FogFragCoord})
+0:69 Constant:
+0:69 0 (const uint)
+0:69 Construct vec4 (temp 4-component vector of float)
+0:69 'sum' (global float)
+0:124 Sequence
+0:124 move second child to first child (temp int)
+0:124 'linenumber' (global int)
+0:124 Constant:
+0:124 124 (const int)
+0:125 Sequence
+0:125 move second child to first child (temp int)
+0:125 'filenumber' (global int)
+0:125 Constant:
+0:125 0 (const int)
+0:126 Sequence
+0:126 move second child to first child (temp int)
+0:126 'version' (global int)
+0:126 Constant:
+0:126 400 (const int)
+0:130 Sequence
+0:130 move second child to first child (temp float)
+0:130 'twoPi' (global float)
+0:130 Constant:
+0:130 6.280000
+0:199 Sequence
+0:199 move second child to first child (temp int)
+0:199 'n' (global int)
+0:199 Constant:
+0:199 15 (const int)
+0:202 Sequence
+0:202 move second child to first child (temp double)
+0:202 'f' (global double)
+0:202 Constant:
+0:202 0.000800
+12:20031 Function Definition: foo234( (global void)
+12:20031 Function Parameters:
+12:20033 Sequence
+12:20033 move second child to first child (temp 4-component vector of float)
+12:20033 gl_Position: direct index for structure (gl_Position 4-component vector of float Position)
+12:20033 'anon@0' (out block{gl_Position 4-component vector of float Position gl_Position, gl_PointSize float PointSize gl_PointSize, out 1-element array of float ClipDistance gl_ClipDistance, gl_ClipVertex 4-component vector of float ClipVertex gl_ClipVertex, out 4-component vector of float FrontColor gl_FrontColor, out 4-component vector of float BackColor gl_BackColor, out 4-component vector of float FrontSecondaryColor gl_FrontSecondaryColor, out 4-component vector of float BackSecondaryColor gl_BackSecondaryColor, out 1-element array of 4-component vector of float TexCoord gl_TexCoord, out float FogFragCoord gl_FogFragCoord})
+12:20033 Constant:
+12:20033 0 (const uint)
+12:20033 Constant:
+12:20033 6.000000
+12:20033 6.000000
+12:20033 6.000000
+12:20033 6.000000
+12:9011 Sequence
+12:9011 move second child to first child (temp int)
+12:9011 'R1' (global int)
+12:9011 'RECURSE' (global int)
+0:? Linker Objects
+0:? 'sum' (global float)
+0:? 'anon@0' (out block{gl_Position 4-component vector of float Position gl_Position, gl_PointSize float PointSize gl_PointSize, out 1-element array of float ClipDistance gl_ClipDistance, gl_ClipVertex 4-component vector of float ClipVertex gl_ClipVertex, out 4-component vector of float FrontColor gl_FrontColor, out 4-component vector of float BackColor gl_BackColor, out 4-component vector of float FrontSecondaryColor gl_FrontSecondaryColor, out 4-component vector of float BackSecondaryColor gl_BackSecondaryColor, out 1-element array of 4-component vector of float TexCoord gl_TexCoord, out float FogFragCoord gl_FogFragCoord})
+0:? 'linenumber' (global int)
+0:? 'filenumber' (global int)
+0:? 'version' (global int)
+0:? 'twoPi' (global float)
+0:? 'a' (global int)
+0:? 'n' (global int)
+0:? 'f' (global double)
+0:? 'RECURSE' (global int)
+0:? 'R1' (global int)
+0:? 'aoeua' (global int)
+0:? 'gl_VertexID' (gl_VertexId int VertexId)
+0:? 'gl_InstanceID' (gl_InstanceId int InstanceId)
+
diff --git a/chromium/third_party/glslang/src/Test/baseResults/dataOut.frag.out b/chromium/third_party/glslang/src/Test/baseResults/dataOut.frag.out
new file mode 100644
index 00000000000..030bae7d9eb
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/dataOut.frag.out
@@ -0,0 +1,35 @@
+dataOut.frag
+WARNING: 0:3: varying deprecated in version 130; may be removed in future release
+
+Shader version: 130
+0:? Sequence
+0:5 Function Definition: main( (global void)
+0:5 Function Parameters:
+0:7 Sequence
+0:7 move second child to first child (temp 4-component vector of float)
+0:7 direct index (temp 4-component vector of float FragData)
+0:7 'gl_FragData' (fragColor 32-element array of 4-component vector of float FragData)
+0:7 Constant:
+0:7 1 (const int)
+0:7 'Color' (smooth in 4-component vector of float)
+0:? Linker Objects
+0:? 'Color' (smooth in 4-component vector of float)
+
+
+Linked fragment stage:
+
+
+Shader version: 130
+0:? Sequence
+0:5 Function Definition: main( (global void)
+0:5 Function Parameters:
+0:7 Sequence
+0:7 move second child to first child (temp 4-component vector of float)
+0:7 direct index (temp 4-component vector of float FragData)
+0:7 'gl_FragData' (fragColor 32-element array of 4-component vector of float FragData)
+0:7 Constant:
+0:7 1 (const int)
+0:7 'Color' (smooth in 4-component vector of float)
+0:? Linker Objects
+0:? 'Color' (smooth in 4-component vector of float)
+
diff --git a/chromium/third_party/glslang/src/Test/baseResults/dataOutIndirect.frag.out b/chromium/third_party/glslang/src/Test/baseResults/dataOutIndirect.frag.out
new file mode 100644
index 00000000000..31b4f07a5fe
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/dataOutIndirect.frag.out
@@ -0,0 +1,35 @@
+dataOutIndirect.frag
+WARNING: 0:3: varying deprecated in version 130; may be removed in future release
+
+Shader version: 130
+0:? Sequence
+0:7 Function Definition: main( (global void)
+0:7 Function Parameters:
+0:9 Sequence
+0:9 move second child to first child (temp 4-component vector of float)
+0:9 indirect index (temp 4-component vector of float FragData)
+0:9 'gl_FragData' (fragColor 32-element array of 4-component vector of float FragData)
+0:9 'i' (uniform int)
+0:9 'Color' (smooth in 4-component vector of float)
+0:? Linker Objects
+0:? 'Color' (smooth in 4-component vector of float)
+0:? 'i' (uniform int)
+
+
+Linked fragment stage:
+
+
+Shader version: 130
+0:? Sequence
+0:7 Function Definition: main( (global void)
+0:7 Function Parameters:
+0:9 Sequence
+0:9 move second child to first child (temp 4-component vector of float)
+0:9 indirect index (temp 4-component vector of float FragData)
+0:9 'gl_FragData' (fragColor 32-element array of 4-component vector of float FragData)
+0:9 'i' (uniform int)
+0:9 'Color' (smooth in 4-component vector of float)
+0:? Linker Objects
+0:? 'Color' (smooth in 4-component vector of float)
+0:? 'i' (uniform int)
+
diff --git a/chromium/third_party/glslang/src/Test/baseResults/dce.frag.out b/chromium/third_party/glslang/src/Test/baseResults/dce.frag.out
new file mode 100644
index 00000000000..a19fe4e8b1a
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/dce.frag.out
@@ -0,0 +1,276 @@
+dce.frag
+Warning, version 400 is not yet complete; most version-specific features are present, but some are missing.
+
+Shader version: 400
+0:? Sequence
+0:5 Sequence
+0:5 move second child to first child (temp int)
+0:5 'c' (global int)
+0:5 Constant:
+0:5 0 (const int)
+0:7 Function Definition: bar( (global void)
+0:7 Function Parameters:
+0:9 Sequence
+0:9 Test condition and select (temp void)
+0:9 Condition
+0:9 Constant:
+0:9 false (const bool)
+0:9 true case
+0:10 Pre-Increment (temp int)
+0:10 'c' (global int)
+0:9 false case
+0:12 Pre-Increment (temp int)
+0:12 'c' (global int)
+0:14 Test condition and select (temp int)
+0:14 Condition
+0:14 Constant:
+0:14 false (const bool)
+0:14 true case
+0:14 Pre-Increment (temp int)
+0:14 'c' (global int)
+0:14 false case
+0:14 Pre-Increment (temp int)
+0:14 'c' (global int)
+0:16 switch
+0:16 condition
+0:16 'c' (global int)
+0:16 body
+0:16 Sequence
+0:17 case: with expression
+0:17 Constant:
+0:17 1 (const int)
+0:? Sequence
+0:18 Pre-Increment (temp int)
+0:18 'c' (global int)
+0:19 Branch: Break
+0:20 Pre-Increment (temp int)
+0:20 'c' (global int)
+0:21 case: with expression
+0:21 Constant:
+0:21 2 (const int)
+0:? Sequence
+0:22 Branch: Break
+0:23 Pre-Increment (temp int)
+0:23 'c' (global int)
+0:24 default:
+0:? Sequence
+0:25 Branch: Break
+0:28 Sequence
+0:28 Sequence
+0:28 move second child to first child (temp int)
+0:28 'i' (temp int)
+0:28 Constant:
+0:28 0 (const int)
+0:28 Loop with condition tested first
+0:28 Loop Condition
+0:28 Compare Less Than (temp bool)
+0:28 'i' (temp int)
+0:28 Constant:
+0:28 0 (const int)
+0:28 Loop Body
+0:29 Pre-Increment (temp int)
+0:29 'c' (global int)
+0:28 Loop Terminal Expression
+0:28 Pre-Increment (temp int)
+0:28 'i' (temp int)
+0:31 Sequence
+0:31 Sequence
+0:31 move second child to first child (temp int)
+0:31 'i' (temp int)
+0:31 Constant:
+0:31 0 (const int)
+0:31 Loop with condition tested first
+0:31 Loop Condition
+0:31 Compare Less Than (temp bool)
+0:31 'i' (temp int)
+0:31 Constant:
+0:31 10 (const int)
+0:31 Loop Body
+0:32 Sequence
+0:32 Test condition and select (temp void)
+0:32 Condition
+0:32 Compare Less Than (temp bool)
+0:32 'c' (global int)
+0:32 Constant:
+0:32 3 (const int)
+0:32 true case
+0:33 Sequence
+0:33 Branch: Break
+0:34 Pre-Increment (temp int)
+0:34 'c' (global int)
+0:32 false case
+0:36 Sequence
+0:36 Branch: Continue
+0:37 Pre-Increment (temp int)
+0:37 'c' (global int)
+0:31 Loop Terminal Expression
+0:31 Pre-Increment (temp int)
+0:31 'i' (temp int)
+0:41 Branch: Return
+0:43 Pre-Increment (temp int)
+0:43 'c' (global int)
+0:46 Function Definition: foo( (global int)
+0:46 Function Parameters:
+0:48 Sequence
+0:48 Test condition and select (temp void)
+0:48 Condition
+0:48 Compare Greater Than (temp bool)
+0:48 'c' (global int)
+0:48 Constant:
+0:48 4 (const int)
+0:48 true case
+0:49 Sequence
+0:49 Branch: Return with expression
+0:49 Constant:
+0:49 4 (const int)
+0:50 Pre-Increment (temp int)
+0:50 'c' (global int)
+0:53 Branch: Return with expression
+0:53 Constant:
+0:53 5 (const int)
+0:55 Pre-Increment (temp int)
+0:55 'c' (global int)
+0:? Linker Objects
+0:? 'flag' (const bool)
+0:? false (const bool)
+0:? 'c' (global int)
+
+
+Linked fragment stage:
+
+ERROR: Linking fragment stage: Missing entry point: Each stage requires one "void main()" entry point
+
+Shader version: 400
+0:? Sequence
+0:5 Sequence
+0:5 move second child to first child (temp int)
+0:5 'c' (global int)
+0:5 Constant:
+0:5 0 (const int)
+0:7 Function Definition: bar( (global void)
+0:7 Function Parameters:
+0:9 Sequence
+0:9 Test condition and select (temp void)
+0:9 Condition
+0:9 Constant:
+0:9 false (const bool)
+0:9 true case
+0:10 Pre-Increment (temp int)
+0:10 'c' (global int)
+0:9 false case
+0:12 Pre-Increment (temp int)
+0:12 'c' (global int)
+0:14 Test condition and select (temp int)
+0:14 Condition
+0:14 Constant:
+0:14 false (const bool)
+0:14 true case
+0:14 Pre-Increment (temp int)
+0:14 'c' (global int)
+0:14 false case
+0:14 Pre-Increment (temp int)
+0:14 'c' (global int)
+0:16 switch
+0:16 condition
+0:16 'c' (global int)
+0:16 body
+0:16 Sequence
+0:17 case: with expression
+0:17 Constant:
+0:17 1 (const int)
+0:? Sequence
+0:18 Pre-Increment (temp int)
+0:18 'c' (global int)
+0:19 Branch: Break
+0:20 Pre-Increment (temp int)
+0:20 'c' (global int)
+0:21 case: with expression
+0:21 Constant:
+0:21 2 (const int)
+0:? Sequence
+0:22 Branch: Break
+0:23 Pre-Increment (temp int)
+0:23 'c' (global int)
+0:24 default:
+0:? Sequence
+0:25 Branch: Break
+0:28 Sequence
+0:28 Sequence
+0:28 move second child to first child (temp int)
+0:28 'i' (temp int)
+0:28 Constant:
+0:28 0 (const int)
+0:28 Loop with condition tested first
+0:28 Loop Condition
+0:28 Compare Less Than (temp bool)
+0:28 'i' (temp int)
+0:28 Constant:
+0:28 0 (const int)
+0:28 Loop Body
+0:29 Pre-Increment (temp int)
+0:29 'c' (global int)
+0:28 Loop Terminal Expression
+0:28 Pre-Increment (temp int)
+0:28 'i' (temp int)
+0:31 Sequence
+0:31 Sequence
+0:31 move second child to first child (temp int)
+0:31 'i' (temp int)
+0:31 Constant:
+0:31 0 (const int)
+0:31 Loop with condition tested first
+0:31 Loop Condition
+0:31 Compare Less Than (temp bool)
+0:31 'i' (temp int)
+0:31 Constant:
+0:31 10 (const int)
+0:31 Loop Body
+0:32 Sequence
+0:32 Test condition and select (temp void)
+0:32 Condition
+0:32 Compare Less Than (temp bool)
+0:32 'c' (global int)
+0:32 Constant:
+0:32 3 (const int)
+0:32 true case
+0:33 Sequence
+0:33 Branch: Break
+0:34 Pre-Increment (temp int)
+0:34 'c' (global int)
+0:32 false case
+0:36 Sequence
+0:36 Branch: Continue
+0:37 Pre-Increment (temp int)
+0:37 'c' (global int)
+0:31 Loop Terminal Expression
+0:31 Pre-Increment (temp int)
+0:31 'i' (temp int)
+0:41 Branch: Return
+0:43 Pre-Increment (temp int)
+0:43 'c' (global int)
+0:46 Function Definition: foo( (global int)
+0:46 Function Parameters:
+0:48 Sequence
+0:48 Test condition and select (temp void)
+0:48 Condition
+0:48 Compare Greater Than (temp bool)
+0:48 'c' (global int)
+0:48 Constant:
+0:48 4 (const int)
+0:48 true case
+0:49 Sequence
+0:49 Branch: Return with expression
+0:49 Constant:
+0:49 4 (const int)
+0:50 Pre-Increment (temp int)
+0:50 'c' (global int)
+0:53 Branch: Return with expression
+0:53 Constant:
+0:53 5 (const int)
+0:55 Pre-Increment (temp int)
+0:55 'c' (global int)
+0:? Linker Objects
+0:? 'flag' (const bool)
+0:? false (const bool)
+0:? 'c' (global int)
+
diff --git a/chromium/third_party/glslang/src/Test/baseResults/decls.frag.out b/chromium/third_party/glslang/src/Test/baseResults/decls.frag.out
new file mode 100644
index 00000000000..a7e2137d4e0
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/decls.frag.out
@@ -0,0 +1,515 @@
+decls.frag
+ERROR: 0:19: 'vi4' : illegal use of type 'void'
+ERROR: 0:20: 'vj' : illegal use of type 'void'
+ERROR: 0:20: 'vk5' : illegal use of type 'void'
+ERROR: 0:21: 'vm2' : illegal use of type 'void'
+ERROR: 0:21: 'vm3' : illegal use of type 'void'
+ERROR: 0:22: 'vn8' : illegal use of type 'void'
+ERROR: 0:22: 'vp' : illegal use of type 'void'
+ERROR: 0:25: 'cij' : variables with qualifier 'const' must be initialized
+ERROR: 0:27: 'cip' : variables with qualifier 'const' must be initialized
+ERROR: 0:34: 'gl_vi4' : identifiers starting with "gl_" are reserved
+ERROR: 0:35: 'gl_vj' : identifiers starting with "gl_" are reserved
+ERROR: 0:35: 'gl_vk5' : identifiers starting with "gl_" are reserved
+ERROR: 0:36: 'gl_vm2' : identifiers starting with "gl_" are reserved
+ERROR: 0:36: 'gl_vm3' : identifiers starting with "gl_" are reserved
+ERROR: 0:37: 'gl_vn8' : identifiers starting with "gl_" are reserved
+ERROR: 0:37: 'gl_vp' : identifiers starting with "gl_" are reserved
+ERROR: 0:42: '' : boolean expression expected
+ERROR: 0:43: 'gl_cond' : identifiers starting with "gl_" are reserved
+WARNING: 0:46: 'foob__vi4' : identifiers containing consecutive underscores ("__") are reserved
+WARNING: 0:47: 'foob__vj' : identifiers containing consecutive underscores ("__") are reserved
+WARNING: 0:47: 'foob__vk5' : identifiers containing consecutive underscores ("__") are reserved
+WARNING: 0:48: '__foobvm2' : identifiers containing consecutive underscores ("__") are reserved
+WARNING: 0:48: '__foobvm3' : identifiers containing consecutive underscores ("__") are reserved
+WARNING: 0:49: 'foob__vn8' : identifiers containing consecutive underscores ("__") are reserved
+WARNING: 0:49: 'foob__vp' : identifiers containing consecutive underscores ("__") are reserved
+ERROR: 18 compilation errors. No code generated.
+
+
+Shader version: 120
+ERROR: node is still EOpNull!
+0:5 Sequence
+0:5 move second child to first child (temp int)
+0:5 'd1' (global int)
+0:5 Constant:
+0:5 1 (const int)
+0:6 Sequence
+0:6 move second child to first child (temp int)
+0:6 'e2' (global int)
+0:6 Constant:
+0:6 2 (const int)
+0:7 Sequence
+0:7 move second child to first child (temp int)
+0:7 'h3' (global int)
+0:7 Constant:
+0:7 3 (const int)
+0:14 Sequence
+0:14 move second child to first child (temp 4-element array of int)
+0:14 'ii4' (global 4-element array of int)
+0:14 Constant:
+0:14 1 (const int)
+0:14 2 (const int)
+0:14 3 (const int)
+0:14 4 (const int)
+0:15 Sequence
+0:15 move second child to first child (temp 5-element array of int)
+0:15 'ik5' (global 5-element array of int)
+0:15 Constant:
+0:15 5 (const int)
+0:15 6 (const int)
+0:15 7 (const int)
+0:15 8 (const int)
+0:15 9 (const int)
+0:16 Sequence
+0:16 move second child to first child (temp 2-element array of int)
+0:16 'im2' (global 2-element array of int)
+0:16 Constant:
+0:16 10 (const int)
+0:16 11 (const int)
+0:16 move second child to first child (temp 3-element array of int)
+0:16 'im3' (global 3-element array of int)
+0:16 Constant:
+0:16 12 (const int)
+0:16 13 (const int)
+0:16 14 (const int)
+0:17 Sequence
+0:17 move second child to first child (temp 4-element array of int)
+0:17 'in8' (global 4-element array of int)
+0:17 Constant:
+0:17 21 (const int)
+0:17 22 (const int)
+0:17 23 (const int)
+0:17 24 (const int)
+0:34 Sequence
+0:34 move second child to first child (temp 4-element array of int)
+0:34 'gl_vi4' (global 4-element array of int)
+0:34 Constant:
+0:34 1 (const int)
+0:34 2 (const int)
+0:34 3 (const int)
+0:34 4 (const int)
+0:35 Sequence
+0:35 move second child to first child (temp 5-element array of int)
+0:35 'gl_vk5' (global 5-element array of int)
+0:35 Constant:
+0:35 5 (const int)
+0:35 6 (const int)
+0:35 7 (const int)
+0:35 8 (const int)
+0:35 9 (const int)
+0:36 Sequence
+0:36 move second child to first child (temp 2-element array of int)
+0:36 'gl_vm2' (global 2-element array of int)
+0:36 Constant:
+0:36 10 (const int)
+0:36 11 (const int)
+0:36 move second child to first child (temp 3-element array of int)
+0:36 'gl_vm3' (global 3-element array of int)
+0:36 Constant:
+0:36 12 (const int)
+0:36 13 (const int)
+0:36 14 (const int)
+0:37 Sequence
+0:37 move second child to first child (temp 4-element array of int)
+0:37 'gl_vn8' (global 4-element array of int)
+0:37 Constant:
+0:37 21 (const int)
+0:37 22 (const int)
+0:37 23 (const int)
+0:37 24 (const int)
+0:39 Function Definition: main( (global void)
+0:39 Function Parameters:
+0:41 Sequence
+0:41 Loop with condition tested first
+0:41 Loop Condition
+0:41 move second child to first child (temp bool)
+0:41 'cond' (temp bool)
+0:41 Compare Less Than (temp bool)
+0:41 'b' (global int)
+0:41 'c' (global int)
+0:41 No loop body
+0:42 Loop with condition tested first
+0:42 Loop Condition
+0:42 move second child to first child (temp int)
+0:42 'icond' (temp int)
+0:42 'b' (global int)
+0:42 No loop body
+0:43 Loop with condition tested first
+0:43 Loop Condition
+0:43 move second child to first child (temp bool)
+0:43 'gl_cond' (temp bool)
+0:43 Compare Less Than (temp bool)
+0:43 'b' (global int)
+0:43 'c' (global int)
+0:43 No loop body
+0:46 Sequence
+0:46 move second child to first child (temp 4-element array of int)
+0:46 'foob__vi4' (global 4-element array of int)
+0:46 Constant:
+0:46 1 (const int)
+0:46 2 (const int)
+0:46 3 (const int)
+0:46 4 (const int)
+0:47 Sequence
+0:47 move second child to first child (temp 5-element array of int)
+0:47 'foob__vk5' (global 5-element array of int)
+0:47 Constant:
+0:47 5 (const int)
+0:47 6 (const int)
+0:47 7 (const int)
+0:47 8 (const int)
+0:47 9 (const int)
+0:48 Sequence
+0:48 move second child to first child (temp 2-element array of int)
+0:48 '__foobvm2' (global 2-element array of int)
+0:48 Constant:
+0:48 10 (const int)
+0:48 11 (const int)
+0:48 move second child to first child (temp 3-element array of int)
+0:48 '__foobvm3' (global 3-element array of int)
+0:48 Constant:
+0:48 12 (const int)
+0:48 13 (const int)
+0:48 14 (const int)
+0:49 Sequence
+0:49 move second child to first child (temp 4-element array of int)
+0:49 'foob__vn8' (global 4-element array of int)
+0:49 Constant:
+0:49 21 (const int)
+0:49 22 (const int)
+0:49 23 (const int)
+0:49 24 (const int)
+0:? Linker Objects
+0:? 'a' (global int)
+0:? 'b' (global int)
+0:? 'c' (global int)
+0:? 'd1' (global int)
+0:? 'e2' (global int)
+0:? 'f' (global int)
+0:? 'g' (global int)
+0:? 'h3' (global int)
+0:? 'i4' (global 4-element array of int)
+0:? 'j' (global int)
+0:? 'k5' (global 5-element array of int)
+0:? 'm6' (global 6-element array of int)
+0:? 'm7' (global 7-element array of int)
+0:? 'n8' (global 8-element array of int)
+0:? 'p' (global int)
+0:? 'ii4' (global 4-element array of int)
+0:? 'ij' (global int)
+0:? 'ik5' (global 5-element array of int)
+0:? 'im2' (global 2-element array of int)
+0:? 'im3' (global 3-element array of int)
+0:? 'in8' (global 4-element array of int)
+0:? 'ip' (global int)
+0:? 'cii4' (const 4-element array of int)
+0:? 1 (const int)
+0:? 2 (const int)
+0:? 3 (const int)
+0:? 4 (const int)
+0:? 'cij' (temp int)
+0:? 'cik5' (const 5-element array of int)
+0:? 5 (const int)
+0:? 6 (const int)
+0:? 7 (const int)
+0:? 8 (const int)
+0:? 9 (const int)
+0:? 'cim2' (const 2-element array of int)
+0:? 10 (const int)
+0:? 11 (const int)
+0:? 'cim3' (const 3-element array of int)
+0:? 12 (const int)
+0:? 13 (const int)
+0:? 14 (const int)
+0:? 'cin8' (const 4-element array of int)
+0:? 21 (const int)
+0:? 22 (const int)
+0:? 23 (const int)
+0:? 24 (const int)
+0:? 'cip' (temp int)
+0:? 'uii4' (uniform 4-element array of int)
+0:? 1 (const int)
+0:? 2 (const int)
+0:? 3 (const int)
+0:? 4 (const int)
+0:? 'uij' (uniform int)
+0:? 'uik5' (uniform 5-element array of int)
+0:? 5 (const int)
+0:? 6 (const int)
+0:? 7 (const int)
+0:? 8 (const int)
+0:? 9 (const int)
+0:? 'uim2' (uniform 2-element array of int)
+0:? 10 (const int)
+0:? 11 (const int)
+0:? 'uim3' (uniform 3-element array of int)
+0:? 12 (const int)
+0:? 13 (const int)
+0:? 14 (const int)
+0:? 'uin8' (uniform 4-element array of int)
+0:? 21 (const int)
+0:? 22 (const int)
+0:? 23 (const int)
+0:? 24 (const int)
+0:? 'uip' (uniform int)
+0:? 'gl_vi4' (global 4-element array of int)
+0:? 'gl_vj' (global int)
+0:? 'gl_vk5' (global 5-element array of int)
+0:? 'gl_vm2' (global 2-element array of int)
+0:? 'gl_vm3' (global 3-element array of int)
+0:? 'gl_vn8' (global 4-element array of int)
+0:? 'gl_vp' (global int)
+0:? 'foob__vi4' (global 4-element array of int)
+0:? 'foob__vj' (global int)
+0:? 'foob__vk5' (global 5-element array of int)
+0:? '__foobvm2' (global 2-element array of int)
+0:? '__foobvm3' (global 3-element array of int)
+0:? 'foob__vn8' (global 4-element array of int)
+0:? 'foob__vp' (global int)
+
+
+Linked fragment stage:
+
+
+Shader version: 120
+ERROR: node is still EOpNull!
+0:5 Sequence
+0:5 move second child to first child (temp int)
+0:5 'd1' (global int)
+0:5 Constant:
+0:5 1 (const int)
+0:6 Sequence
+0:6 move second child to first child (temp int)
+0:6 'e2' (global int)
+0:6 Constant:
+0:6 2 (const int)
+0:7 Sequence
+0:7 move second child to first child (temp int)
+0:7 'h3' (global int)
+0:7 Constant:
+0:7 3 (const int)
+0:14 Sequence
+0:14 move second child to first child (temp 4-element array of int)
+0:14 'ii4' (global 4-element array of int)
+0:14 Constant:
+0:14 1 (const int)
+0:14 2 (const int)
+0:14 3 (const int)
+0:14 4 (const int)
+0:15 Sequence
+0:15 move second child to first child (temp 5-element array of int)
+0:15 'ik5' (global 5-element array of int)
+0:15 Constant:
+0:15 5 (const int)
+0:15 6 (const int)
+0:15 7 (const int)
+0:15 8 (const int)
+0:15 9 (const int)
+0:16 Sequence
+0:16 move second child to first child (temp 2-element array of int)
+0:16 'im2' (global 2-element array of int)
+0:16 Constant:
+0:16 10 (const int)
+0:16 11 (const int)
+0:16 move second child to first child (temp 3-element array of int)
+0:16 'im3' (global 3-element array of int)
+0:16 Constant:
+0:16 12 (const int)
+0:16 13 (const int)
+0:16 14 (const int)
+0:17 Sequence
+0:17 move second child to first child (temp 4-element array of int)
+0:17 'in8' (global 4-element array of int)
+0:17 Constant:
+0:17 21 (const int)
+0:17 22 (const int)
+0:17 23 (const int)
+0:17 24 (const int)
+0:34 Sequence
+0:34 move second child to first child (temp 4-element array of int)
+0:34 'gl_vi4' (global 4-element array of int)
+0:34 Constant:
+0:34 1 (const int)
+0:34 2 (const int)
+0:34 3 (const int)
+0:34 4 (const int)
+0:35 Sequence
+0:35 move second child to first child (temp 5-element array of int)
+0:35 'gl_vk5' (global 5-element array of int)
+0:35 Constant:
+0:35 5 (const int)
+0:35 6 (const int)
+0:35 7 (const int)
+0:35 8 (const int)
+0:35 9 (const int)
+0:36 Sequence
+0:36 move second child to first child (temp 2-element array of int)
+0:36 'gl_vm2' (global 2-element array of int)
+0:36 Constant:
+0:36 10 (const int)
+0:36 11 (const int)
+0:36 move second child to first child (temp 3-element array of int)
+0:36 'gl_vm3' (global 3-element array of int)
+0:36 Constant:
+0:36 12 (const int)
+0:36 13 (const int)
+0:36 14 (const int)
+0:37 Sequence
+0:37 move second child to first child (temp 4-element array of int)
+0:37 'gl_vn8' (global 4-element array of int)
+0:37 Constant:
+0:37 21 (const int)
+0:37 22 (const int)
+0:37 23 (const int)
+0:37 24 (const int)
+0:39 Function Definition: main( (global void)
+0:39 Function Parameters:
+0:41 Sequence
+0:41 Loop with condition tested first
+0:41 Loop Condition
+0:41 move second child to first child (temp bool)
+0:41 'cond' (temp bool)
+0:41 Compare Less Than (temp bool)
+0:41 'b' (global int)
+0:41 'c' (global int)
+0:41 No loop body
+0:42 Loop with condition tested first
+0:42 Loop Condition
+0:42 move second child to first child (temp int)
+0:42 'icond' (temp int)
+0:42 'b' (global int)
+0:42 No loop body
+0:43 Loop with condition tested first
+0:43 Loop Condition
+0:43 move second child to first child (temp bool)
+0:43 'gl_cond' (temp bool)
+0:43 Compare Less Than (temp bool)
+0:43 'b' (global int)
+0:43 'c' (global int)
+0:43 No loop body
+0:46 Sequence
+0:46 move second child to first child (temp 4-element array of int)
+0:46 'foob__vi4' (global 4-element array of int)
+0:46 Constant:
+0:46 1 (const int)
+0:46 2 (const int)
+0:46 3 (const int)
+0:46 4 (const int)
+0:47 Sequence
+0:47 move second child to first child (temp 5-element array of int)
+0:47 'foob__vk5' (global 5-element array of int)
+0:47 Constant:
+0:47 5 (const int)
+0:47 6 (const int)
+0:47 7 (const int)
+0:47 8 (const int)
+0:47 9 (const int)
+0:48 Sequence
+0:48 move second child to first child (temp 2-element array of int)
+0:48 '__foobvm2' (global 2-element array of int)
+0:48 Constant:
+0:48 10 (const int)
+0:48 11 (const int)
+0:48 move second child to first child (temp 3-element array of int)
+0:48 '__foobvm3' (global 3-element array of int)
+0:48 Constant:
+0:48 12 (const int)
+0:48 13 (const int)
+0:48 14 (const int)
+0:49 Sequence
+0:49 move second child to first child (temp 4-element array of int)
+0:49 'foob__vn8' (global 4-element array of int)
+0:49 Constant:
+0:49 21 (const int)
+0:49 22 (const int)
+0:49 23 (const int)
+0:49 24 (const int)
+0:? Linker Objects
+0:? 'a' (global int)
+0:? 'b' (global int)
+0:? 'c' (global int)
+0:? 'd1' (global int)
+0:? 'e2' (global int)
+0:? 'f' (global int)
+0:? 'g' (global int)
+0:? 'h3' (global int)
+0:? 'i4' (global 4-element array of int)
+0:? 'j' (global int)
+0:? 'k5' (global 5-element array of int)
+0:? 'm6' (global 6-element array of int)
+0:? 'm7' (global 7-element array of int)
+0:? 'n8' (global 8-element array of int)
+0:? 'p' (global int)
+0:? 'ii4' (global 4-element array of int)
+0:? 'ij' (global int)
+0:? 'ik5' (global 5-element array of int)
+0:? 'im2' (global 2-element array of int)
+0:? 'im3' (global 3-element array of int)
+0:? 'in8' (global 4-element array of int)
+0:? 'ip' (global int)
+0:? 'cii4' (const 4-element array of int)
+0:? 1 (const int)
+0:? 2 (const int)
+0:? 3 (const int)
+0:? 4 (const int)
+0:? 'cij' (temp int)
+0:? 'cik5' (const 5-element array of int)
+0:? 5 (const int)
+0:? 6 (const int)
+0:? 7 (const int)
+0:? 8 (const int)
+0:? 9 (const int)
+0:? 'cim2' (const 2-element array of int)
+0:? 10 (const int)
+0:? 11 (const int)
+0:? 'cim3' (const 3-element array of int)
+0:? 12 (const int)
+0:? 13 (const int)
+0:? 14 (const int)
+0:? 'cin8' (const 4-element array of int)
+0:? 21 (const int)
+0:? 22 (const int)
+0:? 23 (const int)
+0:? 24 (const int)
+0:? 'cip' (temp int)
+0:? 'uii4' (uniform 4-element array of int)
+0:? 1 (const int)
+0:? 2 (const int)
+0:? 3 (const int)
+0:? 4 (const int)
+0:? 'uij' (uniform int)
+0:? 'uik5' (uniform 5-element array of int)
+0:? 5 (const int)
+0:? 6 (const int)
+0:? 7 (const int)
+0:? 8 (const int)
+0:? 9 (const int)
+0:? 'uim2' (uniform 2-element array of int)
+0:? 10 (const int)
+0:? 11 (const int)
+0:? 'uim3' (uniform 3-element array of int)
+0:? 12 (const int)
+0:? 13 (const int)
+0:? 14 (const int)
+0:? 'uin8' (uniform 4-element array of int)
+0:? 21 (const int)
+0:? 22 (const int)
+0:? 23 (const int)
+0:? 24 (const int)
+0:? 'uip' (uniform int)
+0:? 'gl_vi4' (global 4-element array of int)
+0:? 'gl_vj' (global int)
+0:? 'gl_vk5' (global 5-element array of int)
+0:? 'gl_vm2' (global 2-element array of int)
+0:? 'gl_vm3' (global 3-element array of int)
+0:? 'gl_vn8' (global 4-element array of int)
+0:? 'gl_vp' (global int)
+0:? 'foob__vi4' (global 4-element array of int)
+0:? 'foob__vj' (global int)
+0:? 'foob__vk5' (global 5-element array of int)
+0:? '__foobvm2' (global 2-element array of int)
+0:? '__foobvm3' (global 3-element array of int)
+0:? 'foob__vn8' (global 4-element array of int)
+0:? 'foob__vp' (global int)
+
diff --git a/chromium/third_party/glslang/src/Test/baseResults/deepRvalue.frag.out b/chromium/third_party/glslang/src/Test/baseResults/deepRvalue.frag.out
new file mode 100644
index 00000000000..9441ace9750
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/deepRvalue.frag.out
@@ -0,0 +1,285 @@
+deepRvalue.frag
+Shader version: 120
+0:? Sequence
+0:5 Sequence
+0:5 move second child to first child (temp 4-component vector of float)
+0:5 'v1' (global 4-component vector of float)
+0:5 Constant:
+0:5 2.000000
+0:5 3.000000
+0:5 5.000000
+0:5 7.000000
+0:6 Sequence
+0:6 move second child to first child (temp 4-component vector of float)
+0:6 'v2' (global 4-component vector of float)
+0:6 Constant:
+0:6 11.000000
+0:6 13.000000
+0:6 17.000000
+0:6 19.000000
+0:7 Sequence
+0:7 move second child to first child (temp 4-component vector of float)
+0:7 'v3' (global 4-component vector of float)
+0:7 Constant:
+0:7 23.000000
+0:7 29.000000
+0:7 31.000000
+0:7 37.000000
+0:8 Sequence
+0:8 move second child to first child (temp 4-component vector of float)
+0:8 'v4' (global 4-component vector of float)
+0:8 Constant:
+0:8 41.000000
+0:8 43.000000
+0:8 47.000000
+0:8 53.000000
+0:16 Function Definition: main( (global void)
+0:16 Function Parameters:
+0:18 Sequence
+0:18 Sequence
+0:18 move second child to first child (temp 4X4 matrix of float)
+0:18 'm' (temp 4X4 matrix of float)
+0:18 Construct mat4 (temp 4X4 matrix of float)
+0:18 'v1' (global 4-component vector of float)
+0:18 'v2' (global 4-component vector of float)
+0:18 'v3' (global 4-component vector of float)
+0:18 'v4' (global 4-component vector of float)
+0:20 Sequence
+0:20 move second child to first child (temp 4X4 matrix of float)
+0:20 'mm' (temp 4X4 matrix of float)
+0:20 component-wise multiply (global 4X4 matrix of float)
+0:20 'm' (temp 4X4 matrix of float)
+0:20 'm' (temp 4X4 matrix of float)
+0:21 Sequence
+0:21 move second child to first child (temp float)
+0:21 'f' (temp float)
+0:21 direct index (temp float)
+0:21 direct index (temp 4-component vector of float)
+0:21 'mm' (temp 4X4 matrix of float)
+0:21 Constant:
+0:21 1 (const int)
+0:21 Constant:
+0:21 3 (const int)
+0:24 Sequence
+0:24 move second child to first child (temp float)
+0:24 'g' (temp float)
+0:24 direct index (temp float)
+0:24 direct index (temp 4-component vector of float)
+0:24 component-wise multiply (global 4X4 matrix of float)
+0:24 'm' (temp 4X4 matrix of float)
+0:24 'm' (temp 4X4 matrix of float)
+0:24 Constant:
+0:24 2 (const int)
+0:24 Constant:
+0:24 1 (const int)
+0:26 Sequence
+0:26 move second child to first child (temp float)
+0:26 'h' (temp float)
+0:26 Constant:
+0:26 5.000000
+0:28 Sequence
+0:28 move second child to first child (temp float)
+0:28 'i' (temp float)
+0:28 direct index (temp float)
+0:28 texture (global 4-component vector of float)
+0:28 'sampler' (uniform sampler2D)
+0:28 Constant:
+0:28 0.500000
+0:28 0.500000
+0:28 Constant:
+0:28 1 (const int)
+0:30 add second child into first child (temp float)
+0:30 'i' (temp float)
+0:30 direct index (temp float)
+0:30 Test condition and select (temp 4-component vector of float)
+0:30 Condition
+0:30 Compare Greater Than (temp bool)
+0:30 'i' (temp float)
+0:30 Constant:
+0:30 0.100000
+0:30 true case
+0:30 'v1' (global 4-component vector of float)
+0:30 false case
+0:30 'v2' (global 4-component vector of float)
+0:30 Constant:
+0:30 3 (const int)
+0:33 add second child into first child (temp float)
+0:33 'i' (temp float)
+0:33 direct index (temp float)
+0:33 direct index (temp 2-component vector of float)
+0:33 b: direct index for structure (global 3-element array of 2-component vector of float)
+0:33 move second child to first child (temp structure{global int a, global 3-element array of 2-component vector of float b, global bool c})
+0:33 't' (temp structure{global int a, global 3-element array of 2-component vector of float b, global bool c})
+0:33 Constant:
+0:33 1 (const int)
+0:33 2.000000
+0:33 3.000000
+0:33 4.000000
+0:33 5.000000
+0:33 6.000000
+0:33 7.000000
+0:33 true (const bool)
+0:33 Constant:
+0:33 1 (const int)
+0:33 Constant:
+0:33 2 (const int)
+0:33 Constant:
+0:33 1 (const int)
+0:35 move second child to first child (temp 4-component vector of float)
+0:35 'gl_FragColor' (fragColor 4-component vector of float FragColor)
+0:35 Construct vec4 (temp 4-component vector of float)
+0:35 'f' (temp float)
+0:35 'g' (temp float)
+0:35 'h' (temp float)
+0:35 'i' (temp float)
+0:? Linker Objects
+0:? 'sampler' (uniform sampler2D)
+0:? 'v1' (global 4-component vector of float)
+0:? 'v2' (global 4-component vector of float)
+0:? 'v3' (global 4-component vector of float)
+0:? 'v4' (global 4-component vector of float)
+
+
+Linked fragment stage:
+
+
+Shader version: 120
+0:? Sequence
+0:5 Sequence
+0:5 move second child to first child (temp 4-component vector of float)
+0:5 'v1' (global 4-component vector of float)
+0:5 Constant:
+0:5 2.000000
+0:5 3.000000
+0:5 5.000000
+0:5 7.000000
+0:6 Sequence
+0:6 move second child to first child (temp 4-component vector of float)
+0:6 'v2' (global 4-component vector of float)
+0:6 Constant:
+0:6 11.000000
+0:6 13.000000
+0:6 17.000000
+0:6 19.000000
+0:7 Sequence
+0:7 move second child to first child (temp 4-component vector of float)
+0:7 'v3' (global 4-component vector of float)
+0:7 Constant:
+0:7 23.000000
+0:7 29.000000
+0:7 31.000000
+0:7 37.000000
+0:8 Sequence
+0:8 move second child to first child (temp 4-component vector of float)
+0:8 'v4' (global 4-component vector of float)
+0:8 Constant:
+0:8 41.000000
+0:8 43.000000
+0:8 47.000000
+0:8 53.000000
+0:16 Function Definition: main( (global void)
+0:16 Function Parameters:
+0:18 Sequence
+0:18 Sequence
+0:18 move second child to first child (temp 4X4 matrix of float)
+0:18 'm' (temp 4X4 matrix of float)
+0:18 Construct mat4 (temp 4X4 matrix of float)
+0:18 'v1' (global 4-component vector of float)
+0:18 'v2' (global 4-component vector of float)
+0:18 'v3' (global 4-component vector of float)
+0:18 'v4' (global 4-component vector of float)
+0:20 Sequence
+0:20 move second child to first child (temp 4X4 matrix of float)
+0:20 'mm' (temp 4X4 matrix of float)
+0:20 component-wise multiply (global 4X4 matrix of float)
+0:20 'm' (temp 4X4 matrix of float)
+0:20 'm' (temp 4X4 matrix of float)
+0:21 Sequence
+0:21 move second child to first child (temp float)
+0:21 'f' (temp float)
+0:21 direct index (temp float)
+0:21 direct index (temp 4-component vector of float)
+0:21 'mm' (temp 4X4 matrix of float)
+0:21 Constant:
+0:21 1 (const int)
+0:21 Constant:
+0:21 3 (const int)
+0:24 Sequence
+0:24 move second child to first child (temp float)
+0:24 'g' (temp float)
+0:24 direct index (temp float)
+0:24 direct index (temp 4-component vector of float)
+0:24 component-wise multiply (global 4X4 matrix of float)
+0:24 'm' (temp 4X4 matrix of float)
+0:24 'm' (temp 4X4 matrix of float)
+0:24 Constant:
+0:24 2 (const int)
+0:24 Constant:
+0:24 1 (const int)
+0:26 Sequence
+0:26 move second child to first child (temp float)
+0:26 'h' (temp float)
+0:26 Constant:
+0:26 5.000000
+0:28 Sequence
+0:28 move second child to first child (temp float)
+0:28 'i' (temp float)
+0:28 direct index (temp float)
+0:28 texture (global 4-component vector of float)
+0:28 'sampler' (uniform sampler2D)
+0:28 Constant:
+0:28 0.500000
+0:28 0.500000
+0:28 Constant:
+0:28 1 (const int)
+0:30 add second child into first child (temp float)
+0:30 'i' (temp float)
+0:30 direct index (temp float)
+0:30 Test condition and select (temp 4-component vector of float)
+0:30 Condition
+0:30 Compare Greater Than (temp bool)
+0:30 'i' (temp float)
+0:30 Constant:
+0:30 0.100000
+0:30 true case
+0:30 'v1' (global 4-component vector of float)
+0:30 false case
+0:30 'v2' (global 4-component vector of float)
+0:30 Constant:
+0:30 3 (const int)
+0:33 add second child into first child (temp float)
+0:33 'i' (temp float)
+0:33 direct index (temp float)
+0:33 direct index (temp 2-component vector of float)
+0:33 b: direct index for structure (global 3-element array of 2-component vector of float)
+0:33 move second child to first child (temp structure{global int a, global 3-element array of 2-component vector of float b, global bool c})
+0:33 't' (temp structure{global int a, global 3-element array of 2-component vector of float b, global bool c})
+0:33 Constant:
+0:33 1 (const int)
+0:33 2.000000
+0:33 3.000000
+0:33 4.000000
+0:33 5.000000
+0:33 6.000000
+0:33 7.000000
+0:33 true (const bool)
+0:33 Constant:
+0:33 1 (const int)
+0:33 Constant:
+0:33 2 (const int)
+0:33 Constant:
+0:33 1 (const int)
+0:35 move second child to first child (temp 4-component vector of float)
+0:35 'gl_FragColor' (fragColor 4-component vector of float FragColor)
+0:35 Construct vec4 (temp 4-component vector of float)
+0:35 'f' (temp float)
+0:35 'g' (temp float)
+0:35 'h' (temp float)
+0:35 'i' (temp float)
+0:? Linker Objects
+0:? 'sampler' (uniform sampler2D)
+0:? 'v1' (global 4-component vector of float)
+0:? 'v2' (global 4-component vector of float)
+0:? 'v3' (global 4-component vector of float)
+0:? 'v4' (global 4-component vector of float)
+
diff --git a/chromium/third_party/glslang/src/Test/baseResults/depthOut.frag.out b/chromium/third_party/glslang/src/Test/baseResults/depthOut.frag.out
new file mode 100644
index 00000000000..0177b39e328
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/depthOut.frag.out
@@ -0,0 +1,38 @@
+depthOut.frag
+WARNING: 0:3: varying deprecated in version 130; may be removed in future release
+WARNING: 0:4: varying deprecated in version 130; may be removed in future release
+
+Shader version: 130
+0:? Sequence
+0:6 Function Definition: main( (global void)
+0:6 Function Parameters:
+0:8 Sequence
+0:8 move second child to first child (temp float)
+0:8 'gl_FragDepth' (gl_FragDepth float FragDepth)
+0:8 'Depth' (smooth in float)
+0:9 move second child to first child (temp 4-component vector of float)
+0:9 'gl_FragColor' (fragColor 4-component vector of float FragColor)
+0:9 'Color' (smooth in 4-component vector of float)
+0:? Linker Objects
+0:? 'Color' (smooth in 4-component vector of float)
+0:? 'Depth' (smooth in float)
+
+
+Linked fragment stage:
+
+
+Shader version: 130
+0:? Sequence
+0:6 Function Definition: main( (global void)
+0:6 Function Parameters:
+0:8 Sequence
+0:8 move second child to first child (temp float)
+0:8 'gl_FragDepth' (gl_FragDepth float FragDepth)
+0:8 'Depth' (smooth in float)
+0:9 move second child to first child (temp 4-component vector of float)
+0:9 'gl_FragColor' (fragColor 4-component vector of float FragColor)
+0:9 'Color' (smooth in 4-component vector of float)
+0:? Linker Objects
+0:? 'Color' (smooth in 4-component vector of float)
+0:? 'Depth' (smooth in float)
+
diff --git a/chromium/third_party/glslang/src/Test/baseResults/discard-dce.frag.out b/chromium/third_party/glslang/src/Test/baseResults/discard-dce.frag.out
new file mode 100644
index 00000000000..9b194c7bd2d
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/discard-dce.frag.out
@@ -0,0 +1,239 @@
+discard-dce.frag
+Shader version: 110
+0:? Sequence
+0:4 Function Definition: main( (global void)
+0:4 Function Parameters:
+0:6 Sequence
+0:6 Sequence
+0:6 move second child to first child (temp 4-component vector of float)
+0:6 'white' (temp 4-component vector of float)
+0:6 Constant:
+0:6 1.000000
+0:6 1.000000
+0:6 1.000000
+0:6 1.000000
+0:7 Sequence
+0:7 move second child to first child (temp 4-component vector of float)
+0:7 'black' (temp 4-component vector of float)
+0:7 Constant:
+0:7 0.200000
+0:7 0.200000
+0:7 0.200000
+0:7 0.200000
+0:8 Sequence
+0:8 move second child to first child (temp 4-component vector of float)
+0:8 'color' (temp 4-component vector of float)
+0:8 'white' (temp 4-component vector of float)
+0:11 Sequence
+0:11 move second child to first child (temp float)
+0:11 'x' (temp float)
+0:11 subtract (temp float)
+0:11 component-wise multiply (temp float)
+0:11 direct index (temp float)
+0:11 'tex_coord' (smooth in 2-component vector of float)
+0:11 Constant:
+0:11 0 (const int)
+0:11 Constant:
+0:11 2.000000
+0:11 Constant:
+0:11 1.000000
+0:12 Sequence
+0:12 move second child to first child (temp float)
+0:12 'y' (temp float)
+0:12 subtract (temp float)
+0:12 component-wise multiply (temp float)
+0:12 direct index (temp float)
+0:12 'tex_coord' (smooth in 2-component vector of float)
+0:12 Constant:
+0:12 1 (const int)
+0:12 Constant:
+0:12 2.000000
+0:12 Constant:
+0:12 1.000000
+0:14 Sequence
+0:14 move second child to first child (temp float)
+0:14 'radius' (temp float)
+0:14 sqrt (global float)
+0:14 add (temp float)
+0:14 component-wise multiply (temp float)
+0:14 'x' (temp float)
+0:14 'x' (temp float)
+0:14 component-wise multiply (temp float)
+0:14 'y' (temp float)
+0:14 'y' (temp float)
+0:15 Test condition and select (temp void)
+0:15 Condition
+0:15 Compare Greater Than (temp bool)
+0:15 'radius' (temp float)
+0:15 Constant:
+0:15 1.000000
+0:15 true case
+0:16 Sequence
+0:16 Test condition and select (temp void)
+0:16 Condition
+0:16 Compare Greater Than (temp bool)
+0:16 'radius' (temp float)
+0:16 Constant:
+0:16 1.100000
+0:16 true case
+0:17 Sequence
+0:17 Pre-Increment (temp 4-component vector of float)
+0:17 'color' (temp 4-component vector of float)
+0:20 move second child to first child (temp 4-component vector of float)
+0:20 'gl_FragColor' (fragColor 4-component vector of float FragColor)
+0:20 'color' (temp 4-component vector of float)
+0:22 Test condition and select (temp void)
+0:22 Condition
+0:22 Compare Greater Than (temp bool)
+0:22 'radius' (temp float)
+0:22 Constant:
+0:22 1.200000
+0:22 true case
+0:23 Sequence
+0:23 Pre-Increment (temp 4-component vector of float)
+0:23 'color' (temp 4-component vector of float)
+0:26 Branch: Kill
+0:30 Test condition and select (temp void)
+0:30 Condition
+0:30 Compare Greater Than or Equal (temp bool)
+0:30 'radius' (temp float)
+0:30 Constant:
+0:30 0.750000
+0:30 true case
+0:31 subtract second child into first child (temp 4-component vector of float)
+0:31 'color' (temp 4-component vector of float)
+0:31 Absolute value (global float)
+0:31 divide (temp float)
+0:31 pow (global float)
+0:31 'radius' (temp float)
+0:31 Constant:
+0:31 16.000000
+0:31 Constant:
+0:31 2.000000
+0:33 move second child to first child (temp 4-component vector of float)
+0:33 'gl_FragColor' (fragColor 4-component vector of float FragColor)
+0:33 'color' (temp 4-component vector of float)
+0:? Linker Objects
+0:? 'tex_coord' (smooth in 2-component vector of float)
+
+
+Linked fragment stage:
+
+
+Shader version: 110
+0:? Sequence
+0:4 Function Definition: main( (global void)
+0:4 Function Parameters:
+0:6 Sequence
+0:6 Sequence
+0:6 move second child to first child (temp 4-component vector of float)
+0:6 'white' (temp 4-component vector of float)
+0:6 Constant:
+0:6 1.000000
+0:6 1.000000
+0:6 1.000000
+0:6 1.000000
+0:7 Sequence
+0:7 move second child to first child (temp 4-component vector of float)
+0:7 'black' (temp 4-component vector of float)
+0:7 Constant:
+0:7 0.200000
+0:7 0.200000
+0:7 0.200000
+0:7 0.200000
+0:8 Sequence
+0:8 move second child to first child (temp 4-component vector of float)
+0:8 'color' (temp 4-component vector of float)
+0:8 'white' (temp 4-component vector of float)
+0:11 Sequence
+0:11 move second child to first child (temp float)
+0:11 'x' (temp float)
+0:11 subtract (temp float)
+0:11 component-wise multiply (temp float)
+0:11 direct index (temp float)
+0:11 'tex_coord' (smooth in 2-component vector of float)
+0:11 Constant:
+0:11 0 (const int)
+0:11 Constant:
+0:11 2.000000
+0:11 Constant:
+0:11 1.000000
+0:12 Sequence
+0:12 move second child to first child (temp float)
+0:12 'y' (temp float)
+0:12 subtract (temp float)
+0:12 component-wise multiply (temp float)
+0:12 direct index (temp float)
+0:12 'tex_coord' (smooth in 2-component vector of float)
+0:12 Constant:
+0:12 1 (const int)
+0:12 Constant:
+0:12 2.000000
+0:12 Constant:
+0:12 1.000000
+0:14 Sequence
+0:14 move second child to first child (temp float)
+0:14 'radius' (temp float)
+0:14 sqrt (global float)
+0:14 add (temp float)
+0:14 component-wise multiply (temp float)
+0:14 'x' (temp float)
+0:14 'x' (temp float)
+0:14 component-wise multiply (temp float)
+0:14 'y' (temp float)
+0:14 'y' (temp float)
+0:15 Test condition and select (temp void)
+0:15 Condition
+0:15 Compare Greater Than (temp bool)
+0:15 'radius' (temp float)
+0:15 Constant:
+0:15 1.000000
+0:15 true case
+0:16 Sequence
+0:16 Test condition and select (temp void)
+0:16 Condition
+0:16 Compare Greater Than (temp bool)
+0:16 'radius' (temp float)
+0:16 Constant:
+0:16 1.100000
+0:16 true case
+0:17 Sequence
+0:17 Pre-Increment (temp 4-component vector of float)
+0:17 'color' (temp 4-component vector of float)
+0:20 move second child to first child (temp 4-component vector of float)
+0:20 'gl_FragColor' (fragColor 4-component vector of float FragColor)
+0:20 'color' (temp 4-component vector of float)
+0:22 Test condition and select (temp void)
+0:22 Condition
+0:22 Compare Greater Than (temp bool)
+0:22 'radius' (temp float)
+0:22 Constant:
+0:22 1.200000
+0:22 true case
+0:23 Sequence
+0:23 Pre-Increment (temp 4-component vector of float)
+0:23 'color' (temp 4-component vector of float)
+0:26 Branch: Kill
+0:30 Test condition and select (temp void)
+0:30 Condition
+0:30 Compare Greater Than or Equal (temp bool)
+0:30 'radius' (temp float)
+0:30 Constant:
+0:30 0.750000
+0:30 true case
+0:31 subtract second child into first child (temp 4-component vector of float)
+0:31 'color' (temp 4-component vector of float)
+0:31 Absolute value (global float)
+0:31 divide (temp float)
+0:31 pow (global float)
+0:31 'radius' (temp float)
+0:31 Constant:
+0:31 16.000000
+0:31 Constant:
+0:31 2.000000
+0:33 move second child to first child (temp 4-component vector of float)
+0:33 'gl_FragColor' (fragColor 4-component vector of float FragColor)
+0:33 'color' (temp 4-component vector of float)
+0:? Linker Objects
+0:? 'tex_coord' (smooth in 2-component vector of float)
+
diff --git a/chromium/third_party/glslang/src/Test/baseResults/doWhileLoop.frag.out b/chromium/third_party/glslang/src/Test/baseResults/doWhileLoop.frag.out
new file mode 100644
index 00000000000..4cfbea97dc8
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/doWhileLoop.frag.out
@@ -0,0 +1,65 @@
+doWhileLoop.frag
+Shader version: 110
+0:? Sequence
+0:7 Function Definition: main( (global void)
+0:7 Function Parameters:
+0:9 Sequence
+0:9 Sequence
+0:9 move second child to first child (temp 4-component vector of float)
+0:9 'color' (temp 4-component vector of float)
+0:9 'BaseColor' (smooth in 4-component vector of float)
+0:13 Loop with condition not tested first
+0:13 Loop Condition
+0:13 Compare Less Than (temp bool)
+0:13 direct index (temp float)
+0:13 'color' (temp 4-component vector of float)
+0:13 Constant:
+0:13 0 (const int)
+0:13 'd' (uniform float)
+0:13 Loop Body
+0:12 Sequence
+0:12 add second child into first child (temp 4-component vector of float)
+0:12 'color' (temp 4-component vector of float)
+0:12 'bigColor' (uniform 4-component vector of float)
+0:15 move second child to first child (temp 4-component vector of float)
+0:15 'gl_FragColor' (fragColor 4-component vector of float FragColor)
+0:15 'color' (temp 4-component vector of float)
+0:? Linker Objects
+0:? 'bigColor' (uniform 4-component vector of float)
+0:? 'BaseColor' (smooth in 4-component vector of float)
+0:? 'd' (uniform float)
+
+
+Linked fragment stage:
+
+
+Shader version: 110
+0:? Sequence
+0:7 Function Definition: main( (global void)
+0:7 Function Parameters:
+0:9 Sequence
+0:9 Sequence
+0:9 move second child to first child (temp 4-component vector of float)
+0:9 'color' (temp 4-component vector of float)
+0:9 'BaseColor' (smooth in 4-component vector of float)
+0:13 Loop with condition not tested first
+0:13 Loop Condition
+0:13 Compare Less Than (temp bool)
+0:13 direct index (temp float)
+0:13 'color' (temp 4-component vector of float)
+0:13 Constant:
+0:13 0 (const int)
+0:13 'd' (uniform float)
+0:13 Loop Body
+0:12 Sequence
+0:12 add second child into first child (temp 4-component vector of float)
+0:12 'color' (temp 4-component vector of float)
+0:12 'bigColor' (uniform 4-component vector of float)
+0:15 move second child to first child (temp 4-component vector of float)
+0:15 'gl_FragColor' (fragColor 4-component vector of float FragColor)
+0:15 'color' (temp 4-component vector of float)
+0:? Linker Objects
+0:? 'bigColor' (uniform 4-component vector of float)
+0:? 'BaseColor' (smooth in 4-component vector of float)
+0:? 'd' (uniform float)
+
diff --git a/chromium/third_party/glslang/src/Test/baseResults/earlyReturnDiscard.frag.out b/chromium/third_party/glslang/src/Test/baseResults/earlyReturnDiscard.frag.out
new file mode 100644
index 00000000000..160b7566971
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/earlyReturnDiscard.frag.out
@@ -0,0 +1,257 @@
+earlyReturnDiscard.frag
+Shader version: 110
+0:? Sequence
+0:19 Function Definition: main( (global void)
+0:19 Function Parameters:
+0:21 Sequence
+0:21 Sequence
+0:21 move second child to first child (temp 4-component vector of float)
+0:21 'color' (temp 4-component vector of float)
+0:21 'BaseColor' (smooth in 4-component vector of float)
+0:24 move second child to first child (temp 4-component vector of float)
+0:24 'color2' (temp 4-component vector of float)
+0:24 'otherColor' (uniform 4-component vector of float)
+0:26 Test condition and select (temp void)
+0:26 Condition
+0:26 Compare Greater Than (temp bool)
+0:26 'c' (smooth in float)
+0:26 'd' (uniform float)
+0:26 true case
+0:27 add second child into first child (temp 4-component vector of float)
+0:27 'color' (temp 4-component vector of float)
+0:27 'bigColor' (uniform 4-component vector of float)
+0:26 false case
+0:29 add second child into first child (temp 4-component vector of float)
+0:29 'color' (temp 4-component vector of float)
+0:29 'smallColor' (uniform 4-component vector of float)
+0:31 Test condition and select (temp void)
+0:31 Condition
+0:31 Compare Less Than (temp bool)
+0:31 direct index (temp float)
+0:31 'color' (temp 4-component vector of float)
+0:31 Constant:
+0:31 2 (const int)
+0:31 'minimum' (uniform float)
+0:31 true case
+0:32 Branch: Return
+0:34 Post-Increment (temp float)
+0:34 direct index (temp float)
+0:34 'color' (temp 4-component vector of float)
+0:34 Constant:
+0:34 2 (const int)
+0:36 Test condition and select (temp void)
+0:36 Condition
+0:36 Compare Greater Than (temp bool)
+0:36 direct index (temp float)
+0:36 'color' (temp 4-component vector of float)
+0:36 Constant:
+0:36 2 (const int)
+0:36 'threshhold' (uniform float)
+0:36 true case
+0:37 Branch: Kill
+0:39 Post-Increment (temp 4-component vector of float)
+0:39 'color' (temp 4-component vector of float)
+0:42 Test condition and select (temp void)
+0:42 Condition
+0:42 Compare Greater Than (temp bool)
+0:42 direct index (temp float)
+0:42 'color' (temp 4-component vector of float)
+0:42 Constant:
+0:42 3 (const int)
+0:42 'threshhold2' (uniform float)
+0:42 true case
+0:43 Sequence
+0:43 Test condition and select (temp void)
+0:43 Condition
+0:43 Compare Greater Than (temp bool)
+0:43 direct index (temp float)
+0:43 'color' (temp 4-component vector of float)
+0:43 Constant:
+0:43 2 (const int)
+0:43 'threshhold2' (uniform float)
+0:43 true case
+0:44 Branch: Return
+0:43 false case
+0:45 Test condition and select (temp void)
+0:45 Condition
+0:45 'b' (uniform bool)
+0:45 true case
+0:46 Post-Increment (temp float)
+0:46 direct index (temp float)
+0:46 'color' (temp 4-component vector of float)
+0:46 Constant:
+0:46 2 (const int)
+0:45 false case
+0:48 Sequence
+0:48 Test condition and select (temp void)
+0:48 Condition
+0:48 Compare Less Than (temp bool)
+0:48 direct index (temp float)
+0:48 'color' (temp 4-component vector of float)
+0:48 Constant:
+0:48 0 (const int)
+0:48 'minimum' (uniform float)
+0:48 true case
+0:49 Sequence
+0:49 Branch: Kill
+0:48 false case
+0:51 Sequence
+0:51 Post-Increment (temp 4-component vector of float)
+0:51 'color' (temp 4-component vector of float)
+0:42 false case
+0:55 Sequence
+0:55 Test condition and select (temp void)
+0:55 Condition
+0:55 'b' (uniform bool)
+0:55 true case
+0:56 Branch: Kill
+0:55 false case
+0:58 Branch: Return
+0:101 move second child to first child (temp 4-component vector of float)
+0:101 'gl_FragColor' (fragColor 4-component vector of float FragColor)
+0:101 component-wise multiply (temp 4-component vector of float)
+0:101 'color' (temp 4-component vector of float)
+0:101 'color2' (temp 4-component vector of float)
+0:? Linker Objects
+0:? 'd' (uniform float)
+0:? 'bigColor' (uniform 4-component vector of float)
+0:? 'smallColor' (uniform 4-component vector of float)
+0:? 'otherColor' (uniform 4-component vector of float)
+0:? 'c' (smooth in float)
+0:? 'threshhold' (uniform float)
+0:? 'threshhold2' (uniform float)
+0:? 'threshhold3' (uniform float)
+0:? 'minimum' (uniform float)
+0:? 'BaseColor' (smooth in 4-component vector of float)
+0:? 'b' (uniform bool)
+
+
+Linked fragment stage:
+
+
+Shader version: 110
+0:? Sequence
+0:19 Function Definition: main( (global void)
+0:19 Function Parameters:
+0:21 Sequence
+0:21 Sequence
+0:21 move second child to first child (temp 4-component vector of float)
+0:21 'color' (temp 4-component vector of float)
+0:21 'BaseColor' (smooth in 4-component vector of float)
+0:24 move second child to first child (temp 4-component vector of float)
+0:24 'color2' (temp 4-component vector of float)
+0:24 'otherColor' (uniform 4-component vector of float)
+0:26 Test condition and select (temp void)
+0:26 Condition
+0:26 Compare Greater Than (temp bool)
+0:26 'c' (smooth in float)
+0:26 'd' (uniform float)
+0:26 true case
+0:27 add second child into first child (temp 4-component vector of float)
+0:27 'color' (temp 4-component vector of float)
+0:27 'bigColor' (uniform 4-component vector of float)
+0:26 false case
+0:29 add second child into first child (temp 4-component vector of float)
+0:29 'color' (temp 4-component vector of float)
+0:29 'smallColor' (uniform 4-component vector of float)
+0:31 Test condition and select (temp void)
+0:31 Condition
+0:31 Compare Less Than (temp bool)
+0:31 direct index (temp float)
+0:31 'color' (temp 4-component vector of float)
+0:31 Constant:
+0:31 2 (const int)
+0:31 'minimum' (uniform float)
+0:31 true case
+0:32 Branch: Return
+0:34 Post-Increment (temp float)
+0:34 direct index (temp float)
+0:34 'color' (temp 4-component vector of float)
+0:34 Constant:
+0:34 2 (const int)
+0:36 Test condition and select (temp void)
+0:36 Condition
+0:36 Compare Greater Than (temp bool)
+0:36 direct index (temp float)
+0:36 'color' (temp 4-component vector of float)
+0:36 Constant:
+0:36 2 (const int)
+0:36 'threshhold' (uniform float)
+0:36 true case
+0:37 Branch: Kill
+0:39 Post-Increment (temp 4-component vector of float)
+0:39 'color' (temp 4-component vector of float)
+0:42 Test condition and select (temp void)
+0:42 Condition
+0:42 Compare Greater Than (temp bool)
+0:42 direct index (temp float)
+0:42 'color' (temp 4-component vector of float)
+0:42 Constant:
+0:42 3 (const int)
+0:42 'threshhold2' (uniform float)
+0:42 true case
+0:43 Sequence
+0:43 Test condition and select (temp void)
+0:43 Condition
+0:43 Compare Greater Than (temp bool)
+0:43 direct index (temp float)
+0:43 'color' (temp 4-component vector of float)
+0:43 Constant:
+0:43 2 (const int)
+0:43 'threshhold2' (uniform float)
+0:43 true case
+0:44 Branch: Return
+0:43 false case
+0:45 Test condition and select (temp void)
+0:45 Condition
+0:45 'b' (uniform bool)
+0:45 true case
+0:46 Post-Increment (temp float)
+0:46 direct index (temp float)
+0:46 'color' (temp 4-component vector of float)
+0:46 Constant:
+0:46 2 (const int)
+0:45 false case
+0:48 Sequence
+0:48 Test condition and select (temp void)
+0:48 Condition
+0:48 Compare Less Than (temp bool)
+0:48 direct index (temp float)
+0:48 'color' (temp 4-component vector of float)
+0:48 Constant:
+0:48 0 (const int)
+0:48 'minimum' (uniform float)
+0:48 true case
+0:49 Sequence
+0:49 Branch: Kill
+0:48 false case
+0:51 Sequence
+0:51 Post-Increment (temp 4-component vector of float)
+0:51 'color' (temp 4-component vector of float)
+0:42 false case
+0:55 Sequence
+0:55 Test condition and select (temp void)
+0:55 Condition
+0:55 'b' (uniform bool)
+0:55 true case
+0:56 Branch: Kill
+0:55 false case
+0:58 Branch: Return
+0:101 move second child to first child (temp 4-component vector of float)
+0:101 'gl_FragColor' (fragColor 4-component vector of float FragColor)
+0:101 component-wise multiply (temp 4-component vector of float)
+0:101 'color' (temp 4-component vector of float)
+0:101 'color2' (temp 4-component vector of float)
+0:? Linker Objects
+0:? 'd' (uniform float)
+0:? 'bigColor' (uniform 4-component vector of float)
+0:? 'smallColor' (uniform 4-component vector of float)
+0:? 'otherColor' (uniform 4-component vector of float)
+0:? 'c' (smooth in float)
+0:? 'threshhold' (uniform float)
+0:? 'threshhold2' (uniform float)
+0:? 'threshhold3' (uniform float)
+0:? 'minimum' (uniform float)
+0:? 'BaseColor' (smooth in 4-component vector of float)
+0:? 'b' (uniform bool)
+
diff --git a/chromium/third_party/glslang/src/Test/baseResults/empty.frag.out b/chromium/third_party/glslang/src/Test/baseResults/empty.frag.out
new file mode 100644
index 00000000000..be186bb9f8a
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/empty.frag.out
@@ -0,0 +1,17 @@
+empty.frag
+Shader version: 100
+0:? Sequence
+0:? Linker Objects
+
+empty2.frag
+Shader version: 100
+0:? Sequence
+0:? Linker Objects
+
+empty3.frag
+Shader version: 110
+0:? Sequence
+0:? Linker Objects
+
+ERROR: Cannot mix ES profile with non-ES profile shaders
+
diff --git a/chromium/third_party/glslang/src/Test/baseResults/errors.frag.out b/chromium/third_party/glslang/src/Test/baseResults/errors.frag.out
new file mode 100644
index 00000000000..f1e06d2cc7c
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/errors.frag.out
@@ -0,0 +1,32 @@
+errors.frag
+ERROR: 0:1: 'main' : function cannot take any parameter(s)
+ERROR: 0:1: 'int' : main function cannot return a value
+ERROR: 2 compilation errors. No code generated.
+
+
+Shader version: 100
+ERROR: node is still EOpNull!
+0:1 Function Definition: main(i1; (global mediump int)
+0:1 Function Parameters:
+0:1 'foo' (in mediump int)
+0:3 Sequence
+0:3 Branch: Return with expression
+0:3 Constant:
+0:3 1 (const int)
+0:? Linker Objects
+
+
+Linked fragment stage:
+
+
+Shader version: 100
+ERROR: node is still EOpNull!
+0:1 Function Definition: main(i1; (global mediump int)
+0:1 Function Parameters:
+0:1 'foo' (in mediump int)
+0:3 Sequence
+0:3 Branch: Return with expression
+0:3 Constant:
+0:3 1 (const int)
+0:? Linker Objects
+
diff --git a/chromium/third_party/glslang/src/Test/baseResults/es-link1.frag.out b/chromium/third_party/glslang/src/Test/baseResults/es-link1.frag.out
new file mode 100644
index 00000000000..41ce9a0fdfe
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/es-link1.frag.out
@@ -0,0 +1,27 @@
+es-link1.frag
+Shader version: 100
+0:? Sequence
+0:5 Function Definition: main( (global void)
+0:5 Function Parameters:
+0:7 Sequence
+0:7 move second child to first child (temp mediump 4-component vector of float)
+0:7 'gl_FragColor' (fragColor mediump 4-component vector of float FragColor)
+0:7 Function Call: calculateColor( (global mediump 4-component vector of float)
+0:? Linker Objects
+
+es-link2.frag
+Shader version: 100
+0:? Sequence
+0:5 Function Definition: calculateColor( (global mediump 4-component vector of float)
+0:5 Function Parameters:
+0:7 Sequence
+0:7 Branch: Return with expression
+0:7 vector-scale (temp mediump 4-component vector of float)
+0:7 'varyingColor' (smooth in mediump 4-component vector of float)
+0:7 Constant:
+0:7 0.500000
+0:? Linker Objects
+0:? 'varyingColor' (smooth in mediump 4-component vector of float)
+
+ERROR: Cannot attach multiple ES shaders of the same type to a single program
+
diff --git a/chromium/third_party/glslang/src/Test/baseResults/flowControl.frag.out b/chromium/third_party/glslang/src/Test/baseResults/flowControl.frag.out
new file mode 100644
index 00000000000..324da066c14
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/flowControl.frag.out
@@ -0,0 +1,81 @@
+flowControl.frag
+Shader version: 120
+0:? Sequence
+0:10 Function Definition: main( (global void)
+0:10 Function Parameters:
+0:12 Sequence
+0:12 Sequence
+0:12 move second child to first child (temp 4-component vector of float)
+0:12 'color' (temp 4-component vector of float)
+0:12 'BaseColor' (smooth in 4-component vector of float)
+0:15 move second child to first child (temp 4-component vector of float)
+0:15 'color2' (temp 4-component vector of float)
+0:15 'otherColor' (uniform 4-component vector of float)
+0:17 Test condition and select (temp void)
+0:17 Condition
+0:17 Compare Greater Than (temp bool)
+0:17 'c' (smooth in float)
+0:17 'd' (uniform float)
+0:17 true case
+0:18 add second child into first child (temp 4-component vector of float)
+0:18 'color' (temp 4-component vector of float)
+0:18 'bigColor' (uniform 4-component vector of float)
+0:17 false case
+0:20 add second child into first child (temp 4-component vector of float)
+0:20 'color' (temp 4-component vector of float)
+0:20 'smallColor' (uniform 4-component vector of float)
+0:22 move second child to first child (temp 4-component vector of float)
+0:22 'gl_FragColor' (fragColor 4-component vector of float FragColor)
+0:22 component-wise multiply (temp 4-component vector of float)
+0:22 'color' (temp 4-component vector of float)
+0:22 'color2' (temp 4-component vector of float)
+0:? Linker Objects
+0:? 'd' (uniform float)
+0:? 'bigColor' (uniform 4-component vector of float)
+0:? 'smallColor' (uniform 4-component vector of float)
+0:? 'otherColor' (uniform 4-component vector of float)
+0:? 'c' (smooth in float)
+0:? 'BaseColor' (smooth in 4-component vector of float)
+
+
+Linked fragment stage:
+
+
+Shader version: 120
+0:? Sequence
+0:10 Function Definition: main( (global void)
+0:10 Function Parameters:
+0:12 Sequence
+0:12 Sequence
+0:12 move second child to first child (temp 4-component vector of float)
+0:12 'color' (temp 4-component vector of float)
+0:12 'BaseColor' (smooth in 4-component vector of float)
+0:15 move second child to first child (temp 4-component vector of float)
+0:15 'color2' (temp 4-component vector of float)
+0:15 'otherColor' (uniform 4-component vector of float)
+0:17 Test condition and select (temp void)
+0:17 Condition
+0:17 Compare Greater Than (temp bool)
+0:17 'c' (smooth in float)
+0:17 'd' (uniform float)
+0:17 true case
+0:18 add second child into first child (temp 4-component vector of float)
+0:18 'color' (temp 4-component vector of float)
+0:18 'bigColor' (uniform 4-component vector of float)
+0:17 false case
+0:20 add second child into first child (temp 4-component vector of float)
+0:20 'color' (temp 4-component vector of float)
+0:20 'smallColor' (uniform 4-component vector of float)
+0:22 move second child to first child (temp 4-component vector of float)
+0:22 'gl_FragColor' (fragColor 4-component vector of float FragColor)
+0:22 component-wise multiply (temp 4-component vector of float)
+0:22 'color' (temp 4-component vector of float)
+0:22 'color2' (temp 4-component vector of float)
+0:? Linker Objects
+0:? 'd' (uniform float)
+0:? 'bigColor' (uniform 4-component vector of float)
+0:? 'smallColor' (uniform 4-component vector of float)
+0:? 'otherColor' (uniform 4-component vector of float)
+0:? 'c' (smooth in float)
+0:? 'BaseColor' (smooth in 4-component vector of float)
+
diff --git a/chromium/third_party/glslang/src/Test/baseResults/forLoop.frag.out b/chromium/third_party/glslang/src/Test/baseResults/forLoop.frag.out
new file mode 100644
index 00000000000..babd30e45d6
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/forLoop.frag.out
@@ -0,0 +1,361 @@
+forLoop.frag
+Shader version: 130
+0:? Sequence
+0:10 Function Definition: main( (global void)
+0:10 Function Parameters:
+0:12 Sequence
+0:12 Sequence
+0:12 move second child to first child (temp 4-component vector of float)
+0:12 'color' (temp 4-component vector of float)
+0:12 'BaseColor' (smooth in 4-component vector of float)
+0:14 Sequence
+0:14 Sequence
+0:14 move second child to first child (temp int)
+0:14 'i' (temp int)
+0:14 Constant:
+0:14 0 (const int)
+0:14 Loop with condition tested first
+0:14 Loop Condition
+0:14 Compare Less Than (temp bool)
+0:14 'i' (temp int)
+0:14 'Count' (uniform int)
+0:14 Loop Body
+0:15 Sequence
+0:15 add second child into first child (temp 4-component vector of float)
+0:15 'color' (temp 4-component vector of float)
+0:15 'bigColor' (uniform 4-component vector of float)
+0:14 Loop Terminal Expression
+0:14 Pre-Increment (temp int)
+0:14 'i' (temp int)
+0:18 move second child to first child (temp 4-component vector of float)
+0:18 'gl_FragColor' (fragColor 4-component vector of float FragColor)
+0:18 'color' (temp 4-component vector of float)
+0:20 Sequence
+0:20 move second child to first child (temp float)
+0:20 'sum' (temp float)
+0:20 Constant:
+0:20 0.000000
+0:21 Sequence
+0:21 Sequence
+0:21 move second child to first child (temp int)
+0:21 'i' (temp int)
+0:21 Constant:
+0:21 0 (const int)
+0:21 Loop with condition tested first
+0:21 Loop Condition
+0:21 Compare Less Than (temp bool)
+0:21 'i' (temp int)
+0:21 Constant:
+0:21 4 (const int)
+0:21 Loop Body
+0:22 add second child into first child (temp float)
+0:22 'sum' (temp float)
+0:22 Convert uint to float (temp float)
+0:22 indirect index (temp uint)
+0:22 'v4' (uniform 4-component vector of uint)
+0:22 'i' (temp int)
+0:21 Loop Terminal Expression
+0:21 Pre-Increment (temp int)
+0:21 'i' (temp int)
+0:26 Sequence
+0:26 Sequence
+0:26 move second child to first child (temp int)
+0:26 'i' (temp int)
+0:26 Constant:
+0:26 0 (const int)
+0:26 Loop with condition tested first
+0:26 Loop Condition
+0:26 Compare Less Than (temp bool)
+0:26 'i' (temp int)
+0:26 Constant:
+0:26 4 (const int)
+0:26 Loop Body
+0:27 move second child to first child (temp float)
+0:27 indirect index (temp float)
+0:27 'tv4' (temp 4-component vector of float)
+0:27 'i' (temp int)
+0:27 Convert uint to float (temp float)
+0:27 component-wise multiply (temp uint)
+0:27 indirect index (temp uint)
+0:27 'v4' (uniform 4-component vector of uint)
+0:27 'i' (temp int)
+0:27 Constant:
+0:27 4 (const uint)
+0:26 Loop Terminal Expression
+0:26 Pre-Increment (temp int)
+0:26 'i' (temp int)
+0:29 add second child into first child (temp 4-component vector of float)
+0:29 'gl_FragColor' (fragColor 4-component vector of float FragColor)
+0:29 add (temp 4-component vector of float)
+0:29 Construct vec4 (temp 4-component vector of float)
+0:29 'sum' (temp float)
+0:29 'tv4' (temp 4-component vector of float)
+0:32 move second child to first child (temp 3-component vector of float)
+0:32 vector swizzle (temp 3-component vector of float)
+0:32 'r' (temp 4-component vector of float)
+0:32 Sequence
+0:32 Constant:
+0:32 0 (const int)
+0:32 Constant:
+0:32 1 (const int)
+0:32 Constant:
+0:32 2 (const int)
+0:32 vector swizzle (temp 3-component vector of float)
+0:32 'BaseColor' (smooth in 4-component vector of float)
+0:32 Sequence
+0:32 Constant:
+0:32 0 (const int)
+0:32 Constant:
+0:32 1 (const int)
+0:32 Constant:
+0:32 2 (const int)
+0:34 Sequence
+0:34 Sequence
+0:34 move second child to first child (temp int)
+0:34 'i' (temp int)
+0:34 Constant:
+0:34 0 (const int)
+0:34 Loop with condition tested first
+0:34 Loop Condition
+0:34 Compare Less Than (temp bool)
+0:34 'i' (temp int)
+0:34 'Count' (uniform int)
+0:34 Loop Body
+0:35 move second child to first child (temp float)
+0:35 direct index (temp float)
+0:35 'r' (temp 4-component vector of float)
+0:35 Constant:
+0:35 3 (const int)
+0:35 'f' (smooth in float)
+0:34 Loop Terminal Expression
+0:34 Pre-Increment (temp int)
+0:34 'i' (temp int)
+0:37 add second child into first child (temp 3-component vector of float)
+0:37 vector swizzle (temp 3-component vector of float)
+0:37 'gl_FragColor' (fragColor 4-component vector of float FragColor)
+0:37 Sequence
+0:37 Constant:
+0:37 0 (const int)
+0:37 Constant:
+0:37 1 (const int)
+0:37 Constant:
+0:37 2 (const int)
+0:37 vector swizzle (temp 3-component vector of float)
+0:37 'r' (temp 4-component vector of float)
+0:37 Sequence
+0:37 Constant:
+0:37 0 (const int)
+0:37 Constant:
+0:37 1 (const int)
+0:37 Constant:
+0:37 2 (const int)
+0:39 Sequence
+0:39 Sequence
+0:39 move second child to first child (temp int)
+0:39 'i' (temp int)
+0:39 Constant:
+0:39 0 (const int)
+0:39 Loop with condition tested first
+0:39 Loop Condition
+0:39 Compare Less Than (temp bool)
+0:39 'i' (temp int)
+0:39 Constant:
+0:39 16 (const int)
+0:39 Loop Body
+0:40 vector scale second child into first child (temp 4-component vector of float)
+0:40 'gl_FragColor' (fragColor 4-component vector of float FragColor)
+0:40 'f' (smooth in float)
+0:39 Loop Terminal Expression
+0:39 add second child into first child (temp int)
+0:39 'i' (temp int)
+0:39 Constant:
+0:39 4 (const int)
+0:? Linker Objects
+0:? 'bigColor' (uniform 4-component vector of float)
+0:? 'BaseColor' (smooth in 4-component vector of float)
+0:? 'f' (smooth in float)
+0:? 'Count' (uniform int)
+0:? 'v4' (uniform 4-component vector of uint)
+
+
+Linked fragment stage:
+
+
+Shader version: 130
+0:? Sequence
+0:10 Function Definition: main( (global void)
+0:10 Function Parameters:
+0:12 Sequence
+0:12 Sequence
+0:12 move second child to first child (temp 4-component vector of float)
+0:12 'color' (temp 4-component vector of float)
+0:12 'BaseColor' (smooth in 4-component vector of float)
+0:14 Sequence
+0:14 Sequence
+0:14 move second child to first child (temp int)
+0:14 'i' (temp int)
+0:14 Constant:
+0:14 0 (const int)
+0:14 Loop with condition tested first
+0:14 Loop Condition
+0:14 Compare Less Than (temp bool)
+0:14 'i' (temp int)
+0:14 'Count' (uniform int)
+0:14 Loop Body
+0:15 Sequence
+0:15 add second child into first child (temp 4-component vector of float)
+0:15 'color' (temp 4-component vector of float)
+0:15 'bigColor' (uniform 4-component vector of float)
+0:14 Loop Terminal Expression
+0:14 Pre-Increment (temp int)
+0:14 'i' (temp int)
+0:18 move second child to first child (temp 4-component vector of float)
+0:18 'gl_FragColor' (fragColor 4-component vector of float FragColor)
+0:18 'color' (temp 4-component vector of float)
+0:20 Sequence
+0:20 move second child to first child (temp float)
+0:20 'sum' (temp float)
+0:20 Constant:
+0:20 0.000000
+0:21 Sequence
+0:21 Sequence
+0:21 move second child to first child (temp int)
+0:21 'i' (temp int)
+0:21 Constant:
+0:21 0 (const int)
+0:21 Loop with condition tested first
+0:21 Loop Condition
+0:21 Compare Less Than (temp bool)
+0:21 'i' (temp int)
+0:21 Constant:
+0:21 4 (const int)
+0:21 Loop Body
+0:22 add second child into first child (temp float)
+0:22 'sum' (temp float)
+0:22 Convert uint to float (temp float)
+0:22 indirect index (temp uint)
+0:22 'v4' (uniform 4-component vector of uint)
+0:22 'i' (temp int)
+0:21 Loop Terminal Expression
+0:21 Pre-Increment (temp int)
+0:21 'i' (temp int)
+0:26 Sequence
+0:26 Sequence
+0:26 move second child to first child (temp int)
+0:26 'i' (temp int)
+0:26 Constant:
+0:26 0 (const int)
+0:26 Loop with condition tested first
+0:26 Loop Condition
+0:26 Compare Less Than (temp bool)
+0:26 'i' (temp int)
+0:26 Constant:
+0:26 4 (const int)
+0:26 Loop Body
+0:27 move second child to first child (temp float)
+0:27 indirect index (temp float)
+0:27 'tv4' (temp 4-component vector of float)
+0:27 'i' (temp int)
+0:27 Convert uint to float (temp float)
+0:27 component-wise multiply (temp uint)
+0:27 indirect index (temp uint)
+0:27 'v4' (uniform 4-component vector of uint)
+0:27 'i' (temp int)
+0:27 Constant:
+0:27 4 (const uint)
+0:26 Loop Terminal Expression
+0:26 Pre-Increment (temp int)
+0:26 'i' (temp int)
+0:29 add second child into first child (temp 4-component vector of float)
+0:29 'gl_FragColor' (fragColor 4-component vector of float FragColor)
+0:29 add (temp 4-component vector of float)
+0:29 Construct vec4 (temp 4-component vector of float)
+0:29 'sum' (temp float)
+0:29 'tv4' (temp 4-component vector of float)
+0:32 move second child to first child (temp 3-component vector of float)
+0:32 vector swizzle (temp 3-component vector of float)
+0:32 'r' (temp 4-component vector of float)
+0:32 Sequence
+0:32 Constant:
+0:32 0 (const int)
+0:32 Constant:
+0:32 1 (const int)
+0:32 Constant:
+0:32 2 (const int)
+0:32 vector swizzle (temp 3-component vector of float)
+0:32 'BaseColor' (smooth in 4-component vector of float)
+0:32 Sequence
+0:32 Constant:
+0:32 0 (const int)
+0:32 Constant:
+0:32 1 (const int)
+0:32 Constant:
+0:32 2 (const int)
+0:34 Sequence
+0:34 Sequence
+0:34 move second child to first child (temp int)
+0:34 'i' (temp int)
+0:34 Constant:
+0:34 0 (const int)
+0:34 Loop with condition tested first
+0:34 Loop Condition
+0:34 Compare Less Than (temp bool)
+0:34 'i' (temp int)
+0:34 'Count' (uniform int)
+0:34 Loop Body
+0:35 move second child to first child (temp float)
+0:35 direct index (temp float)
+0:35 'r' (temp 4-component vector of float)
+0:35 Constant:
+0:35 3 (const int)
+0:35 'f' (smooth in float)
+0:34 Loop Terminal Expression
+0:34 Pre-Increment (temp int)
+0:34 'i' (temp int)
+0:37 add second child into first child (temp 3-component vector of float)
+0:37 vector swizzle (temp 3-component vector of float)
+0:37 'gl_FragColor' (fragColor 4-component vector of float FragColor)
+0:37 Sequence
+0:37 Constant:
+0:37 0 (const int)
+0:37 Constant:
+0:37 1 (const int)
+0:37 Constant:
+0:37 2 (const int)
+0:37 vector swizzle (temp 3-component vector of float)
+0:37 'r' (temp 4-component vector of float)
+0:37 Sequence
+0:37 Constant:
+0:37 0 (const int)
+0:37 Constant:
+0:37 1 (const int)
+0:37 Constant:
+0:37 2 (const int)
+0:39 Sequence
+0:39 Sequence
+0:39 move second child to first child (temp int)
+0:39 'i' (temp int)
+0:39 Constant:
+0:39 0 (const int)
+0:39 Loop with condition tested first
+0:39 Loop Condition
+0:39 Compare Less Than (temp bool)
+0:39 'i' (temp int)
+0:39 Constant:
+0:39 16 (const int)
+0:39 Loop Body
+0:40 vector scale second child into first child (temp 4-component vector of float)
+0:40 'gl_FragColor' (fragColor 4-component vector of float FragColor)
+0:40 'f' (smooth in float)
+0:39 Loop Terminal Expression
+0:39 add second child into first child (temp int)
+0:39 'i' (temp int)
+0:39 Constant:
+0:39 4 (const int)
+0:? Linker Objects
+0:? 'bigColor' (uniform 4-component vector of float)
+0:? 'BaseColor' (smooth in 4-component vector of float)
+0:? 'f' (smooth in float)
+0:? 'Count' (uniform int)
+0:? 'v4' (uniform 4-component vector of uint)
+
diff --git a/chromium/third_party/glslang/src/Test/baseResults/forwardRef.frag.out b/chromium/third_party/glslang/src/Test/baseResults/forwardRef.frag.out
new file mode 100644
index 00000000000..357cc2bd458
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/forwardRef.frag.out
@@ -0,0 +1,125 @@
+forwardRef.frag
+Shader version: 110
+0:? Sequence
+0:11 Function Definition: main( (global void)
+0:11 Function Parameters:
+0:13 Sequence
+0:13 Sequence
+0:13 move second child to first child (temp 4-component vector of float)
+0:13 'color' (temp 4-component vector of float)
+0:13 Construct vec4 (temp 4-component vector of float)
+0:13 Function Call: foo(vf4; (global float)
+0:13 'BaseColor' (smooth in 4-component vector of float)
+0:15 Function Call: bar( (global void)
+0:16 Sequence
+0:16 move second child to first child (temp float)
+0:16 'f' (temp float)
+0:16 Function Call: unreachableReturn( (global float)
+0:18 move second child to first child (temp 4-component vector of float)
+0:18 'gl_FragColor' (fragColor 4-component vector of float FragColor)
+0:18 vector-scale (temp 4-component vector of float)
+0:18 'color' (temp 4-component vector of float)
+0:18 'f' (temp float)
+0:21 Function Definition: bar( (global void)
+0:21 Function Parameters:
+0:25 Function Definition: unreachableReturn( (global float)
+0:25 Function Parameters:
+0:27 Sequence
+0:27 Function Call: bar( (global void)
+0:28 Test condition and select (temp void)
+0:28 Condition
+0:28 Compare Less Than (temp bool)
+0:28 'd' (uniform float)
+0:28 Constant:
+0:28 4.200000
+0:28 true case
+0:29 Branch: Return with expression
+0:29 Constant:
+0:29 1.200000
+0:28 false case
+0:31 Branch: Return with expression
+0:31 Constant:
+0:31 4.500000
+0:34 Function Definition: foo(vf4; (global float)
+0:34 Function Parameters:
+0:34 'bar' (in 4-component vector of float)
+0:36 Sequence
+0:36 Branch: Return with expression
+0:36 add (temp float)
+0:36 direct index (temp float)
+0:36 'bar' (in 4-component vector of float)
+0:36 Constant:
+0:36 0 (const int)
+0:36 direct index (temp float)
+0:36 'bar' (in 4-component vector of float)
+0:36 Constant:
+0:36 1 (const int)
+0:? Linker Objects
+0:? 'bigColor' (uniform 4-component vector of float)
+0:? 'BaseColor' (smooth in 4-component vector of float)
+0:? 'd' (uniform float)
+
+
+Linked fragment stage:
+
+
+Shader version: 110
+0:? Sequence
+0:11 Function Definition: main( (global void)
+0:11 Function Parameters:
+0:13 Sequence
+0:13 Sequence
+0:13 move second child to first child (temp 4-component vector of float)
+0:13 'color' (temp 4-component vector of float)
+0:13 Construct vec4 (temp 4-component vector of float)
+0:13 Function Call: foo(vf4; (global float)
+0:13 'BaseColor' (smooth in 4-component vector of float)
+0:15 Function Call: bar( (global void)
+0:16 Sequence
+0:16 move second child to first child (temp float)
+0:16 'f' (temp float)
+0:16 Function Call: unreachableReturn( (global float)
+0:18 move second child to first child (temp 4-component vector of float)
+0:18 'gl_FragColor' (fragColor 4-component vector of float FragColor)
+0:18 vector-scale (temp 4-component vector of float)
+0:18 'color' (temp 4-component vector of float)
+0:18 'f' (temp float)
+0:21 Function Definition: bar( (global void)
+0:21 Function Parameters:
+0:25 Function Definition: unreachableReturn( (global float)
+0:25 Function Parameters:
+0:27 Sequence
+0:27 Function Call: bar( (global void)
+0:28 Test condition and select (temp void)
+0:28 Condition
+0:28 Compare Less Than (temp bool)
+0:28 'd' (uniform float)
+0:28 Constant:
+0:28 4.200000
+0:28 true case
+0:29 Branch: Return with expression
+0:29 Constant:
+0:29 1.200000
+0:28 false case
+0:31 Branch: Return with expression
+0:31 Constant:
+0:31 4.500000
+0:34 Function Definition: foo(vf4; (global float)
+0:34 Function Parameters:
+0:34 'bar' (in 4-component vector of float)
+0:36 Sequence
+0:36 Branch: Return with expression
+0:36 add (temp float)
+0:36 direct index (temp float)
+0:36 'bar' (in 4-component vector of float)
+0:36 Constant:
+0:36 0 (const int)
+0:36 direct index (temp float)
+0:36 'bar' (in 4-component vector of float)
+0:36 Constant:
+0:36 1 (const int)
+0:? Linker Objects
+0:? 'bigColor' (uniform 4-component vector of float)
+0:? 'BaseColor' (smooth in 4-component vector of float)
+0:? 'd' (uniform float)
+
diff --git a/chromium/third_party/glslang/src/Test/baseResults/functionCall.frag.out b/chromium/third_party/glslang/src/Test/baseResults/functionCall.frag.out
new file mode 100644
index 00000000000..610f2bb1e65
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/functionCall.frag.out
@@ -0,0 +1,183 @@
+functionCall.frag
+WARNING: 0:4: varying deprecated in version 130; may be removed in future release
+
+Shader version: 130
+0:? Sequence
+0:7 Sequence
+0:7 move second child to first child (temp float)
+0:7 'h' (global float)
+0:7 Constant:
+0:7 0.000000
+0:9 Function Definition: foo(vf4; (global float)
+0:9 Function Parameters:
+0:9 'bar' (in 4-component vector of float)
+0:11 Sequence
+0:11 Branch: Return with expression
+0:11 add (temp float)
+0:11 direct index (temp float)
+0:11 'bar' (in 4-component vector of float)
+0:11 Constant:
+0:11 0 (const int)
+0:11 direct index (temp float)
+0:11 'bar' (in 4-component vector of float)
+0:11 Constant:
+0:11 1 (const int)
+0:14 Function Definition: bar( (global void)
+0:14 Function Parameters:
+0:18 Function Definition: unreachableReturn( (global float)
+0:18 Function Parameters:
+0:20 Sequence
+0:20 Test condition and select (temp void)
+0:20 Condition
+0:20 Compare Less Than (temp bool)
+0:20 'd' (uniform float)
+0:20 Constant:
+0:20 4.200000
+0:20 true case
+0:21 Branch: Return with expression
+0:21 Constant:
+0:21 1.200000
+0:20 false case
+0:23 Branch: Return with expression
+0:23 Constant:
+0:23 4.500000
+0:27 Function Definition: missingReturn( (global float)
+0:27 Function Parameters:
+0:29 Sequence
+0:29 Test condition and select (temp void)
+0:29 Condition
+0:29 Compare Less Than (temp bool)
+0:29 'd' (uniform float)
+0:29 Constant:
+0:29 4.500000
+0:29 true case
+0:30 Sequence
+0:30 move second child to first child (temp float)
+0:30 'h' (global float)
+0:30 'd' (uniform float)
+0:31 Branch: Return with expression
+0:31 Constant:
+0:31 3.900000
+0:35 Function Definition: main( (global void)
+0:35 Function Parameters:
+0:37 Sequence
+0:37 Sequence
+0:37 move second child to first child (temp 4-component vector of float)
+0:37 'color' (temp 4-component vector of float)
+0:37 Construct vec4 (temp 4-component vector of float)
+0:37 Function Call: foo(vf4; (global float)
+0:37 'BaseColor' (smooth in 4-component vector of float)
+0:39 Function Call: bar( (global void)
+0:40 Sequence
+0:40 move second child to first child (temp float)
+0:40 'f' (temp float)
+0:40 Function Call: unreachableReturn( (global float)
+0:41 Sequence
+0:41 move second child to first child (temp float)
+0:41 'g' (temp float)
+0:41 Function Call: missingReturn( (global float)
+0:43 move second child to first child (temp 4-component vector of float)
+0:43 'gl_FragColor' (fragColor 4-component vector of float FragColor)
+0:43 vector-scale (temp 4-component vector of float)
+0:43 vector-scale (temp 4-component vector of float)
+0:43 'color' (temp 4-component vector of float)
+0:43 'f' (temp float)
+0:43 'h' (global float)
+0:? Linker Objects
+0:? 'bigColor' (uniform 4-component vector of float)
+0:? 'BaseColor' (smooth in 4-component vector of float)
+0:? 'd' (uniform float)
+0:? 'h' (global float)
+
+
+Linked fragment stage:
+
+
+Shader version: 130
+0:? Sequence
+0:7 Sequence
+0:7 move second child to first child (temp float)
+0:7 'h' (global float)
+0:7 Constant:
+0:7 0.000000
+0:9 Function Definition: foo(vf4; (global float)
+0:9 Function Parameters:
+0:9 'bar' (in 4-component vector of float)
+0:11 Sequence
+0:11 Branch: Return with expression
+0:11 add (temp float)
+0:11 direct index (temp float)
+0:11 'bar' (in 4-component vector of float)
+0:11 Constant:
+0:11 0 (const int)
+0:11 direct index (temp float)
+0:11 'bar' (in 4-component vector of float)
+0:11 Constant:
+0:11 1 (const int)
+0:14 Function Definition: bar( (global void)
+0:14 Function Parameters:
+0:18 Function Definition: unreachableReturn( (global float)
+0:18 Function Parameters:
+0:20 Sequence
+0:20 Test condition and select (temp void)
+0:20 Condition
+0:20 Compare Less Than (temp bool)
+0:20 'd' (uniform float)
+0:20 Constant:
+0:20 4.200000
+0:20 true case
+0:21 Branch: Return with expression
+0:21 Constant:
+0:21 1.200000
+0:20 false case
+0:23 Branch: Return with expression
+0:23 Constant:
+0:23 4.500000
+0:27 Function Definition: missingReturn( (global float)
+0:27 Function Parameters:
+0:29 Sequence
+0:29 Test condition and select (temp void)
+0:29 Condition
+0:29 Compare Less Than (temp bool)
+0:29 'd' (uniform float)
+0:29 Constant:
+0:29 4.500000
+0:29 true case
+0:30 Sequence
+0:30 move second child to first child (temp float)
+0:30 'h' (global float)
+0:30 'd' (uniform float)
+0:31 Branch: Return with expression
+0:31 Constant:
+0:31 3.900000
+0:35 Function Definition: main( (global void)
+0:35 Function Parameters:
+0:37 Sequence
+0:37 Sequence
+0:37 move second child to first child (temp 4-component vector of float)
+0:37 'color' (temp 4-component vector of float)
+0:37 Construct vec4 (temp 4-component vector of float)
+0:37 Function Call: foo(vf4; (global float)
+0:37 'BaseColor' (smooth in 4-component vector of float)
+0:39 Function Call: bar( (global void)
+0:40 Sequence
+0:40 move second child to first child (temp float)
+0:40 'f' (temp float)
+0:40 Function Call: unreachableReturn( (global float)
+0:41 Sequence
+0:41 move second child to first child (temp float)
+0:41 'g' (temp float)
+0:41 Function Call: missingReturn( (global float)
+0:43 move second child to first child (temp 4-component vector of float)
+0:43 'gl_FragColor' (fragColor 4-component vector of float FragColor)
+0:43 vector-scale (temp 4-component vector of float)
+0:43 vector-scale (temp 4-component vector of float)
+0:43 'color' (temp 4-component vector of float)
+0:43 'f' (temp float)
+0:43 'h' (global float)
+0:? Linker Objects
+0:? 'bigColor' (uniform 4-component vector of float)
+0:? 'BaseColor' (smooth in 4-component vector of float)
+0:? 'd' (uniform float)
+0:? 'h' (global float)
+
diff --git a/chromium/third_party/glslang/src/Test/baseResults/functionSemantics.frag.out b/chromium/third_party/glslang/src/Test/baseResults/functionSemantics.frag.out
new file mode 100644
index 00000000000..a9dfb91c53c
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/functionSemantics.frag.out
@@ -0,0 +1,401 @@
+functionSemantics.frag
+Warning, version 400 is not yet complete; most version-specific features are present, but some are missing.
+
+Shader version: 400
+0:? Sequence
+0:5 Function Definition: foo(i1;i1;i1;i1;i1;i1; (global int)
+0:5 Function Parameters:
+0:5 'a' (in int)
+0:5 'b' (const (read only) int)
+0:5 'c' (in int)
+0:5 'd' (const (read only) int)
+0:5 'e' (out int)
+0:5 'f' (inout int)
+0:7 Sequence
+0:7 Sequence
+0:7 move second child to first child (temp int)
+0:7 'sum' (temp int)
+0:7 add (temp int)
+0:7 add (temp int)
+0:7 add (temp int)
+0:7 add (temp int)
+0:7 'a' (in int)
+0:7 'b' (const (read only) int)
+0:7 'c' (in int)
+0:7 'd' (const (read only) int)
+0:7 'f' (inout int)
+0:10 multiply second child into first child (temp int)
+0:10 'a' (in int)
+0:10 Constant:
+0:10 64 (const int)
+0:12 multiply second child into first child (temp int)
+0:12 'c' (in int)
+0:12 Constant:
+0:12 64 (const int)
+0:14 move second child to first child (temp int)
+0:14 'e' (out int)
+0:14 Constant:
+0:14 1024 (const int)
+0:15 multiply second child into first child (temp int)
+0:15 'f' (inout int)
+0:15 Constant:
+0:15 64 (const int)
+0:17 add second child into first child (temp int)
+0:17 'sum' (temp int)
+0:17 add (temp int)
+0:17 add (temp int)
+0:17 add (temp int)
+0:17 add (temp int)
+0:17 add (temp int)
+0:17 'a' (in int)
+0:17 component-wise multiply (temp int)
+0:17 Constant:
+0:17 64 (const int)
+0:17 'b' (const (read only) int)
+0:17 'c' (in int)
+0:17 component-wise multiply (temp int)
+0:17 Constant:
+0:17 64 (const int)
+0:17 'd' (const (read only) int)
+0:17 'e' (out int)
+0:17 'f' (inout int)
+0:20 Branch: Return with expression
+0:20 'sum' (temp int)
+0:23 Function Definition: foo2(f1;vf3;i1; (global int)
+0:23 Function Parameters:
+0:23 'a' (in float)
+0:23 'b' (in 3-component vector of float)
+0:23 'r' (out int)
+0:25 Sequence
+0:25 move second child to first child (temp int)
+0:25 'r' (out int)
+0:25 Convert float to int (temp int)
+0:25 component-wise multiply (temp float)
+0:25 Constant:
+0:25 3.000000
+0:25 'a' (in float)
+0:26 Branch: Return with expression
+0:26 Convert float to int (temp int)
+0:26 component-wise multiply (temp float)
+0:26 Constant:
+0:26 5.000000
+0:26 direct index (temp float)
+0:26 'b' (in 3-component vector of float)
+0:26 Constant:
+0:26 1 (const int)
+0:29 Function Definition: foo3( (global int)
+0:29 Function Parameters:
+0:31 Sequence
+0:31 Test condition and select (temp void)
+0:31 Condition
+0:31 Compare Greater Than (temp bool)
+0:31 'u' (uniform float)
+0:31 Constant:
+0:31 3.200000
+0:31 true case
+0:32 Sequence
+0:32 Branch: Kill
+0:33 Branch: Return with expression
+0:33 Constant:
+0:33 1000000 (const int)
+0:36 Branch: Return with expression
+0:36 Constant:
+0:36 2000000 (const int)
+0:39 Function Definition: main( (global void)
+0:39 Function Parameters:
+0:? Sequence
+0:42 Sequence
+0:42 move second child to first child (temp int)
+0:42 't' (temp int)
+0:42 Constant:
+0:42 2 (const int)
+0:46 move second child to first child (temp int)
+0:46 direct index (temp int)
+0:46 t: direct index for structure (temp 4-component vector of int)
+0:46 'f' (temp structure{temp 4-component vector of int t})
+0:46 Constant:
+0:46 0 (const int)
+0:46 Constant:
+0:46 1 (const int)
+0:46 Constant:
+0:46 32 (const int)
+0:49 Sequence
+0:49 move second child to first child (temp int)
+0:49 'color' (temp int)
+0:49 Function Call: foo(i1;i1;i1;i1;i1;i1; (global int)
+0:49 Constant:
+0:49 1 (const int)
+0:49 Constant:
+0:49 2 (const int)
+0:49 add (temp int)
+0:49 't' (temp int)
+0:49 't' (temp int)
+0:49 Constant:
+0:49 8 (const int)
+0:49 'e' (temp int)
+0:49 direct index (temp int)
+0:49 t: direct index for structure (temp 4-component vector of int)
+0:49 'f' (temp structure{temp 4-component vector of int t})
+0:49 Constant:
+0:49 0 (const int)
+0:49 Constant:
+0:49 1 (const int)
+0:51 add second child into first child (temp int)
+0:51 'color' (temp int)
+0:51 component-wise multiply (temp int)
+0:51 Constant:
+0:51 128 (const int)
+0:51 add (temp int)
+0:51 'e' (temp int)
+0:51 direct index (temp int)
+0:51 t: direct index for structure (temp 4-component vector of int)
+0:51 'f' (temp structure{temp 4-component vector of int t})
+0:51 Constant:
+0:51 0 (const int)
+0:51 Constant:
+0:51 1 (const int)
+0:57 move second child to first child (temp float)
+0:57 'ret' (temp float)
+0:57 Convert int to float (temp float)
+0:57 Comma (global int)
+0:57 move second child to first child (temp int)
+0:57 'tempReturn' (global int)
+0:57 Function Call: foo2(f1;vf3;i1; (global int)
+0:57 Constant:
+0:57 4.000000
+0:57 Constant:
+0:57 1.000000
+0:57 2.000000
+0:57 3.000000
+0:57 'tempArg' (temp int)
+0:57 move second child to first child (temp float)
+0:57 'arg' (temp float)
+0:57 Convert int to float (temp float)
+0:57 'tempArg' (temp int)
+0:57 'tempReturn' (global int)
+0:58 add second child into first child (temp int)
+0:58 'color' (temp int)
+0:58 Convert float to int (temp int)
+0:58 add (temp float)
+0:58 'ret' (temp float)
+0:58 'arg' (temp float)
+0:60 add second child into first child (temp int)
+0:60 'color' (temp int)
+0:60 Function Call: foo3( (global int)
+0:62 move second child to first child (temp 4-component vector of float)
+0:62 'gl_FragColor' (fragColor 4-component vector of float FragColor)
+0:62 Construct vec4 (temp 4-component vector of float)
+0:62 Convert int to float (temp float)
+0:62 'color' (temp int)
+0:66 Function Definition: aggCall( (global void)
+0:66 Function Parameters:
+0:? Sequence
+0:69 Function Call: m(vf2; (global 3-component vector of float)
+0:69 Convert int to float (temp 2-component vector of float)
+0:69 Construct ivec2 (temp 2-component vector of int)
+0:69 Convert float to int (temp int)
+0:69 'F' (temp float)
+0:? Linker Objects
+0:? 'u' (uniform float)
+
+
+Linked fragment stage:
+
+
+Shader version: 400
+0:? Sequence
+0:5 Function Definition: foo(i1;i1;i1;i1;i1;i1; (global int)
+0:5 Function Parameters:
+0:5 'a' (in int)
+0:5 'b' (const (read only) int)
+0:5 'c' (in int)
+0:5 'd' (const (read only) int)
+0:5 'e' (out int)
+0:5 'f' (inout int)
+0:7 Sequence
+0:7 Sequence
+0:7 move second child to first child (temp int)
+0:7 'sum' (temp int)
+0:7 add (temp int)
+0:7 add (temp int)
+0:7 add (temp int)
+0:7 add (temp int)
+0:7 'a' (in int)
+0:7 'b' (const (read only) int)
+0:7 'c' (in int)
+0:7 'd' (const (read only) int)
+0:7 'f' (inout int)
+0:10 multiply second child into first child (temp int)
+0:10 'a' (in int)
+0:10 Constant:
+0:10 64 (const int)
+0:12 multiply second child into first child (temp int)
+0:12 'c' (in int)
+0:12 Constant:
+0:12 64 (const int)
+0:14 move second child to first child (temp int)
+0:14 'e' (out int)
+0:14 Constant:
+0:14 1024 (const int)
+0:15 multiply second child into first child (temp int)
+0:15 'f' (inout int)
+0:15 Constant:
+0:15 64 (const int)
+0:17 add second child into first child (temp int)
+0:17 'sum' (temp int)
+0:17 add (temp int)
+0:17 add (temp int)
+0:17 add (temp int)
+0:17 add (temp int)
+0:17 add (temp int)
+0:17 'a' (in int)
+0:17 component-wise multiply (temp int)
+0:17 Constant:
+0:17 64 (const int)
+0:17 'b' (const (read only) int)
+0:17 'c' (in int)
+0:17 component-wise multiply (temp int)
+0:17 Constant:
+0:17 64 (const int)
+0:17 'd' (const (read only) int)
+0:17 'e' (out int)
+0:17 'f' (inout int)
+0:20 Branch: Return with expression
+0:20 'sum' (temp int)
+0:23 Function Definition: foo2(f1;vf3;i1; (global int)
+0:23 Function Parameters:
+0:23 'a' (in float)
+0:23 'b' (in 3-component vector of float)
+0:23 'r' (out int)
+0:25 Sequence
+0:25 move second child to first child (temp int)
+0:25 'r' (out int)
+0:25 Convert float to int (temp int)
+0:25 component-wise multiply (temp float)
+0:25 Constant:
+0:25 3.000000
+0:25 'a' (in float)
+0:26 Branch: Return with expression
+0:26 Convert float to int (temp int)
+0:26 component-wise multiply (temp float)
+0:26 Constant:
+0:26 5.000000
+0:26 direct index (temp float)
+0:26 'b' (in 3-component vector of float)
+0:26 Constant:
+0:26 1 (const int)
+0:29 Function Definition: foo3( (global int)
+0:29 Function Parameters:
+0:31 Sequence
+0:31 Test condition and select (temp void)
+0:31 Condition
+0:31 Compare Greater Than (temp bool)
+0:31 'u' (uniform float)
+0:31 Constant:
+0:31 3.200000
+0:31 true case
+0:32 Sequence
+0:32 Branch: Kill
+0:33 Branch: Return with expression
+0:33 Constant:
+0:33 1000000 (const int)
+0:36 Branch: Return with expression
+0:36 Constant:
+0:36 2000000 (const int)
+0:39 Function Definition: main( (global void)
+0:39 Function Parameters:
+0:? Sequence
+0:42 Sequence
+0:42 move second child to first child (temp int)
+0:42 't' (temp int)
+0:42 Constant:
+0:42 2 (const int)
+0:46 move second child to first child (temp int)
+0:46 direct index (temp int)
+0:46 t: direct index for structure (temp 4-component vector of int)
+0:46 'f' (temp structure{temp 4-component vector of int t})
+0:46 Constant:
+0:46 0 (const int)
+0:46 Constant:
+0:46 1 (const int)
+0:46 Constant:
+0:46 32 (const int)
+0:49 Sequence
+0:49 move second child to first child (temp int)
+0:49 'color' (temp int)
+0:49 Function Call: foo(i1;i1;i1;i1;i1;i1; (global int)
+0:49 Constant:
+0:49 1 (const int)
+0:49 Constant:
+0:49 2 (const int)
+0:49 add (temp int)
+0:49 't' (temp int)
+0:49 't' (temp int)
+0:49 Constant:
+0:49 8 (const int)
+0:49 'e' (temp int)
+0:49 direct index (temp int)
+0:49 t: direct index for structure (temp 4-component vector of int)
+0:49 'f' (temp structure{temp 4-component vector of int t})
+0:49 Constant:
+0:49 0 (const int)
+0:49 Constant:
+0:49 1 (const int)
+0:51 add second child into first child (temp int)
+0:51 'color' (temp int)
+0:51 component-wise multiply (temp int)
+0:51 Constant:
+0:51 128 (const int)
+0:51 add (temp int)
+0:51 'e' (temp int)
+0:51 direct index (temp int)
+0:51 t: direct index for structure (temp 4-component vector of int)
+0:51 'f' (temp structure{temp 4-component vector of int t})
+0:51 Constant:
+0:51 0 (const int)
+0:51 Constant:
+0:51 1 (const int)
+0:57 move second child to first child (temp float)
+0:57 'ret' (temp float)
+0:57 Convert int to float (temp float)
+0:57 Comma (global int)
+0:57 move second child to first child (temp int)
+0:57 'tempReturn' (global int)
+0:57 Function Call: foo2(f1;vf3;i1; (global int)
+0:57 Constant:
+0:57 4.000000
+0:57 Constant:
+0:57 1.000000
+0:57 2.000000
+0:57 3.000000
+0:57 'tempArg' (temp int)
+0:57 move second child to first child (temp float)
+0:57 'arg' (temp float)
+0:57 Convert int to float (temp float)
+0:57 'tempArg' (temp int)
+0:57 'tempReturn' (global int)
+0:58 add second child into first child (temp int)
+0:58 'color' (temp int)
+0:58 Convert float to int (temp int)
+0:58 add (temp float)
+0:58 'ret' (temp float)
+0:58 'arg' (temp float)
+0:60 add second child into first child (temp int)
+0:60 'color' (temp int)
+0:60 Function Call: foo3( (global int)
+0:62 move second child to first child (temp 4-component vector of float)
+0:62 'gl_FragColor' (fragColor 4-component vector of float FragColor)
+0:62 Construct vec4 (temp 4-component vector of float)
+0:62 Convert int to float (temp float)
+0:62 'color' (temp int)
+0:66 Function Definition: aggCall( (global void)
+0:66 Function Parameters:
+0:? Sequence
+0:69 Function Call: m(vf2; (global 3-component vector of float)
+0:69 Convert int to float (temp 2-component vector of float)
+0:69 Construct ivec2 (temp 2-component vector of int)
+0:69 Convert float to int (temp int)
+0:69 'F' (temp float)
+0:? Linker Objects
+0:? 'u' (uniform float)
+
diff --git a/chromium/third_party/glslang/src/Test/baseResults/hlsl.assoc.frag.out b/chromium/third_party/glslang/src/Test/baseResults/hlsl.assoc.frag.out
new file mode 100755
index 00000000000..a027a62c617
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/hlsl.assoc.frag.out
@@ -0,0 +1,113 @@
+hlsl.assoc.frag
+Shader version: 450
+gl_FragCoord origin is upper left
+0:? Sequence
+0:12 Function Definition: PixelShaderFunction(vf4;vf4;vf4;vf4;vf4; (temp 4-component vector of float)
+0:8 Function Parameters:
+0:8 'a1' (temp 4-component vector of float)
+0:8 'a2' (temp 4-component vector of float)
+0:8 'a3' (temp 4-component vector of float)
+0:8 'a4' (temp 4-component vector of float)
+0:8 'a5' (temp 4-component vector of float)
+0:? Sequence
+0:9 move second child to first child (temp 4-component vector of float)
+0:9 'a1' (temp 4-component vector of float)
+0:9 move second child to first child (temp 4-component vector of float)
+0:9 'a2' (temp 4-component vector of float)
+0:9 move second child to first child (temp 4-component vector of float)
+0:9 'a3' (temp 4-component vector of float)
+0:9 move second child to first child (temp 4-component vector of float)
+0:9 'a4' (temp 4-component vector of float)
+0:9 'a5' (temp 4-component vector of float)
+0:10 Branch: Return with expression
+0:10 add (temp 4-component vector of float)
+0:10 add (temp 4-component vector of float)
+0:10 add (temp 4-component vector of float)
+0:10 'a1' (temp 4-component vector of float)
+0:10 'a2' (temp 4-component vector of float)
+0:10 add (temp 4-component vector of float)
+0:10 'a3' (temp 4-component vector of float)
+0:10 'a4' (temp 4-component vector of float)
+0:10 'a5' (temp 4-component vector of float)
+0:? Linker Objects
+
+
+Linked fragment stage:
+
+
+Shader version: 450
+gl_FragCoord origin is upper left
+0:? Sequence
+0:12 Function Definition: PixelShaderFunction(vf4;vf4;vf4;vf4;vf4; (temp 4-component vector of float)
+0:8 Function Parameters:
+0:8 'a1' (temp 4-component vector of float)
+0:8 'a2' (temp 4-component vector of float)
+0:8 'a3' (temp 4-component vector of float)
+0:8 'a4' (temp 4-component vector of float)
+0:8 'a5' (temp 4-component vector of float)
+0:? Sequence
+0:9 move second child to first child (temp 4-component vector of float)
+0:9 'a1' (temp 4-component vector of float)
+0:9 move second child to first child (temp 4-component vector of float)
+0:9 'a2' (temp 4-component vector of float)
+0:9 move second child to first child (temp 4-component vector of float)
+0:9 'a3' (temp 4-component vector of float)
+0:9 move second child to first child (temp 4-component vector of float)
+0:9 'a4' (temp 4-component vector of float)
+0:9 'a5' (temp 4-component vector of float)
+0:10 Branch: Return with expression
+0:10 add (temp 4-component vector of float)
+0:10 add (temp 4-component vector of float)
+0:10 add (temp 4-component vector of float)
+0:10 'a1' (temp 4-component vector of float)
+0:10 'a2' (temp 4-component vector of float)
+0:10 add (temp 4-component vector of float)
+0:10 'a3' (temp 4-component vector of float)
+0:10 'a4' (temp 4-component vector of float)
+0:10 'a5' (temp 4-component vector of float)
+0:? Linker Objects
+
+// Module Version 10000
+// Generated by (magic number): 80001
+// Id's are bound by 25
+
+ Capability Shader
+ 1: ExtInstImport "GLSL.std.450"
+ MemoryModel Logical GLSL450
+ EntryPoint Fragment 4 "PixelShaderFunction"
+ ExecutionMode 4 OriginUpperLeft
+ Source HLSL 450
+ Name 4 "PixelShaderFunction"
+ Name 9 "a1"
+ Name 10 "a2"
+ Name 11 "a3"
+ Name 12 "a4"
+ Name 13 "a5"
+ 2: TypeVoid
+ 3: TypeFunction 2
+ 6: TypeFloat 32
+ 7: TypeVector 6(float) 4
+ 8: TypePointer Function 7(fvec4)
+4(PixelShaderFunction): 2 Function None 3
+ 5: Label
+ 9(a1): 8(ptr) Variable Function
+ 10(a2): 8(ptr) Variable Function
+ 11(a3): 8(ptr) Variable Function
+ 12(a4): 8(ptr) Variable Function
+ 13(a5): 8(ptr) Variable Function
+ 14: 7(fvec4) Load 13(a5)
+ Store 12(a4) 14
+ Store 11(a3) 14
+ Store 10(a2) 14
+ Store 9(a1) 14
+ 15: 7(fvec4) Load 9(a1)
+ 16: 7(fvec4) Load 10(a2)
+ 17: 7(fvec4) FAdd 15 16
+ 18: 7(fvec4) Load 11(a3)
+ 19: 7(fvec4) Load 12(a4)
+ 20: 7(fvec4) FAdd 18 19
+ 21: 7(fvec4) FAdd 17 20
+ 22: 7(fvec4) Load 13(a5)
+ 23: 7(fvec4) FAdd 21 22
+ ReturnValue 23
+ FunctionEnd
diff --git a/chromium/third_party/glslang/src/Test/baseResults/hlsl.attribute.frag.out b/chromium/third_party/glslang/src/Test/baseResults/hlsl.attribute.frag.out
new file mode 100755
index 00000000000..6ee4a24659c
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/hlsl.attribute.frag.out
@@ -0,0 +1,57 @@
+hlsl.attribute.frag
+Shader version: 450
+gl_FragCoord origin is upper left
+0:? Sequence
+0:14 Function Definition: PixelShaderFunction(vf4; (temp 4-component vector of float)
+0:2 Function Parameters:
+0:2 'input' (temp 4-component vector of float)
+0:? Sequence
+0:11 Test condition and select (temp void)
+0:11 Condition
+0:11 Constant:
+0:11 0 (const int)
+0:11 true case is null
+0:? Linker Objects
+
+
+Linked fragment stage:
+
+
+Shader version: 450
+gl_FragCoord origin is upper left
+0:? Sequence
+0:14 Function Definition: PixelShaderFunction(vf4; (temp 4-component vector of float)
+0:2 Function Parameters:
+0:2 'input' (temp 4-component vector of float)
+0:? Sequence
+0:11 Test condition and select (temp void)
+0:11 Condition
+0:11 Constant:
+0:11 0 (const int)
+0:11 true case is null
+0:? Linker Objects
+
+// Module Version 10000
+// Generated by (magic number): 80001
+// Id's are bound by 10
+
+ Capability Shader
+ 1: ExtInstImport "GLSL.std.450"
+ MemoryModel Logical GLSL450
+ EntryPoint Fragment 4 "PixelShaderFunction"
+ ExecutionMode 4 OriginUpperLeft
+ Source HLSL 450
+ Name 4 "PixelShaderFunction"
+ 2: TypeVoid
+ 3: TypeFunction 2
+ 6: TypeInt 32 1
+ 7: 6(int) Constant 0
+4(PixelShaderFunction): 2 Function None 3
+ 5: Label
+ SelectionMerge 9 None
+ BranchConditional 7 8 9
+ 8: Label
+ Branch 9
+ 9: Label
+ Return
+ FunctionEnd
diff --git a/chromium/third_party/glslang/src/Test/baseResults/hlsl.cast.frag.out b/chromium/third_party/glslang/src/Test/baseResults/hlsl.cast.frag.out
new file mode 100755
index 00000000000..1e689788774
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/hlsl.cast.frag.out
@@ -0,0 +1,86 @@
+hlsl.cast.frag
+Shader version: 450
+gl_FragCoord origin is upper left
+0:? Sequence
+0:5 Function Definition: PixelShaderFunction(vf4; (temp 4-component vector of float)
+0:2 Function Parameters:
+0:2 'input' (temp 4-component vector of float)
+0:? Sequence
+0:3 Branch: Return with expression
+0:3 add (temp 4-component vector of float)
+0:3 add (temp 4-component vector of float)
+0:3 Construct vec4 (temp 4-component vector of float)
+0:3 'input' (temp 4-component vector of float)
+0:3 Convert int to float (temp 4-component vector of float)
+0:3 Convert float to int (temp 4-component vector of int)
+0:3 'input' (temp 4-component vector of float)
+0:3 Constant:
+0:3 1.198000
+0:3 1.198000
+0:3 1.198000
+0:3 1.198000
+0:? Linker Objects
+
+
+Linked fragment stage:
+
+
+Shader version: 450
+gl_FragCoord origin is upper left
+0:? Sequence
+0:5 Function Definition: PixelShaderFunction(vf4; (temp 4-component vector of float)
+0:2 Function Parameters:
+0:2 'input' (temp 4-component vector of float)
+0:? Sequence
+0:3 Branch: Return with expression
+0:3 add (temp 4-component vector of float)
+0:3 add (temp 4-component vector of float)
+0:3 Construct vec4 (temp 4-component vector of float)
+0:3 'input' (temp 4-component vector of float)
+0:3 Convert int to float (temp 4-component vector of float)
+0:3 Convert float to int (temp 4-component vector of int)
+0:3 'input' (temp 4-component vector of float)
+0:3 Constant:
+0:3 1.198000
+0:3 1.198000
+0:3 1.198000
+0:3 1.198000
+0:? Linker Objects
+
+// Module Version 10000
+// Generated by (magic number): 80001
+// Id's are bound by 26
+
+ Capability Shader
+ 1: ExtInstImport "GLSL.std.450"
+ MemoryModel Logical GLSL450
+ EntryPoint Fragment 4 "PixelShaderFunction"
+ ExecutionMode 4 OriginUpperLeft
+ Source HLSL 450
+ Name 4 "PixelShaderFunction"
+ Name 9 "input"
+ 2: TypeVoid
+ 3: TypeFunction 2
+ 6: TypeFloat 32
+ 7: TypeVector 6(float) 4
+ 8: TypePointer Function 7(fvec4)
+ 17: TypeInt 32 1
+ 18: TypeVector 17(int) 4
+ 22: 6(float) Constant 1067014160
+ 23: 7(fvec4) ConstantComposite 22 22 22 22
+4(PixelShaderFunction): 2 Function None 3
+ 5: Label
+ 9(input): 8(ptr) Variable Function
+ 10: 7(fvec4) Load 9(input)
+ 11: 6(float) CompositeExtract 10 0
+ 12: 6(float) CompositeExtract 10 1
+ 13: 6(float) CompositeExtract 10 2
+ 14: 6(float) CompositeExtract 10 3
+ 15: 7(fvec4) CompositeConstruct 11 12 13 14
+ 16: 7(fvec4) Load 9(input)
+ 19: 18(ivec4) ConvertFToS 16
+ 20: 7(fvec4) ConvertSToF 19
+ 21: 7(fvec4) FAdd 15 20
+ 24: 7(fvec4) FAdd 21 23
+ ReturnValue 24
+ FunctionEnd
diff --git a/chromium/third_party/glslang/src/Test/baseResults/hlsl.doLoop.frag.out b/chromium/third_party/glslang/src/Test/baseResults/hlsl.doLoop.frag.out
new file mode 100755
index 00000000000..eed2d9136f5
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/hlsl.doLoop.frag.out
@@ -0,0 +1,116 @@
+hlsl.doLoop.frag
+Shader version: 450
+gl_FragCoord origin is upper left
+0:? Sequence
+0:7 Function Definition: PixelShaderFunction(vf4; (temp 4-component vector of float)
+0:2 Function Parameters:
+0:2 'input' (temp 4-component vector of float)
+0:? Sequence
+0:3 Loop with condition not tested first
+0:3 Loop Condition
+0:3 Constant:
+0:3 false (const bool)
+0:3 No loop body
+0:4 Loop with condition not tested first
+0:4 Loop Condition
+0:4 Constant:
+0:4 false (const bool)
+0:4 No loop body
+0:5 Loop with condition not tested first
+0:5 Loop Condition
+0:5 Compare Equal (temp bool)
+0:5 'input' (temp 4-component vector of float)
+0:5 'input' (temp 4-component vector of float)
+0:5 Loop Body
+0:5 Branch: Return with expression
+0:5 'input' (temp 4-component vector of float)
+0:? Linker Objects
+
+
+Linked fragment stage:
+
+
+Shader version: 450
+gl_FragCoord origin is upper left
+0:? Sequence
+0:7 Function Definition: PixelShaderFunction(vf4; (temp 4-component vector of float)
+0:2 Function Parameters:
+0:2 'input' (temp 4-component vector of float)
+0:? Sequence
+0:3 Loop with condition not tested first
+0:3 Loop Condition
+0:3 Constant:
+0:3 false (const bool)
+0:3 No loop body
+0:4 Loop with condition not tested first
+0:4 Loop Condition
+0:4 Constant:
+0:4 false (const bool)
+0:4 No loop body
+0:5 Loop with condition not tested first
+0:5 Loop Condition
+0:5 Compare Equal (temp bool)
+0:5 'input' (temp 4-component vector of float)
+0:5 'input' (temp 4-component vector of float)
+0:5 Loop Body
+0:5 Branch: Return with expression
+0:5 'input' (temp 4-component vector of float)
+0:? Linker Objects
+
+// Module Version 10000
+// Generated by (magic number): 80001
+// Id's are bound by 31
+
+ Capability Shader
+ 1: ExtInstImport "GLSL.std.450"
+ MemoryModel Logical GLSL450
+ EntryPoint Fragment 4 "PixelShaderFunction"
+ ExecutionMode 4 OriginUpperLeft
+ Source HLSL 450
+ Name 4 "PixelShaderFunction"
+ Name 23 "input"
+ 2: TypeVoid
+ 3: TypeFunction 2
+ 10: TypeBool
+ 11: 10(bool) ConstantFalse
+ 20: TypeFloat 32
+ 21: TypeVector 20(float) 4
+ 22: TypePointer Function 21(fvec4)
+ 28: TypeVector 10(bool) 4
+4(PixelShaderFunction): 2 Function None 3
+ 5: Label
+ 23(input): 22(ptr) Variable Function
+ Branch 6
+ 6: Label
+ LoopMerge 8 9 None
+ Branch 7
+ 7: Label
+ Branch 9
+ 9: Label
+ BranchConditional 11 6 8
+ 8: Label
+ Branch 12
+ 12: Label
+ LoopMerge 14 15 None
+ Branch 13
+ 13: Label
+ Branch 15
+ 15: Label
+ BranchConditional 11 12 14
+ 14: Label
+ Branch 16
+ 16: Label
+ LoopMerge 18 19 None
+ Branch 17
+ 17: Label
+ 24: 21(fvec4) Load 23(input)
+ ReturnValue 24
+ 19: Label
+ 26: 21(fvec4) Load 23(input)
+ 27: 21(fvec4) Load 23(input)
+ 29: 28(bvec4) FOrdEqual 26 27
+ 30: 10(bool) All 29
+ BranchConditional 30 16 18
+ 18: Label
+ Return
+ FunctionEnd
diff --git a/chromium/third_party/glslang/src/Test/baseResults/hlsl.float1.frag.out b/chromium/third_party/glslang/src/Test/baseResults/hlsl.float1.frag.out
new file mode 100755
index 00000000000..4cf0a0d1ff9
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/hlsl.float1.frag.out
@@ -0,0 +1,100 @@
+hlsl.float1.frag
+Shader version: 450
+gl_FragCoord origin is upper left
+0:? Sequence
+0:1 move second child to first child (temp 1-component vector of float)
+0:1 'f1' (temp 1-component vector of float)
+0:1 Constant:
+0:1 1.000000
+0:2 move second child to first child (temp float)
+0:2 'scalar' (temp float)
+0:2 Constant:
+0:2 2.000000
+0:8 Function Definition: ShaderFunction(vf1;f1; (temp 1-component vector of float)
+0:5 Function Parameters:
+0:5 'inFloat1' (temp 1-component vector of float)
+0:5 'inScalar' (temp float)
+0:? Sequence
+0:6 Branch: Return with expression
+0:6 add (temp 1-component vector of float)
+0:6 vector-scale (temp 1-component vector of float)
+0:6 'f1' (temp 1-component vector of float)
+0:6 'scalar' (temp float)
+0:6 vector-scale (temp 1-component vector of float)
+0:6 'inFloat1' (temp 1-component vector of float)
+0:6 'inScalar' (temp float)
+0:? Linker Objects
+0:? 'f1' (temp 1-component vector of float)
+0:? 'scalar' (temp float)
+
+
+Linked fragment stage:
+
+
+Shader version: 450
+gl_FragCoord origin is upper left
+0:? Sequence
+0:1 move second child to first child (temp 1-component vector of float)
+0:1 'f1' (temp 1-component vector of float)
+0:1 Constant:
+0:1 1.000000
+0:2 move second child to first child (temp float)
+0:2 'scalar' (temp float)
+0:2 Constant:
+0:2 2.000000
+0:8 Function Definition: ShaderFunction(vf1;f1; (temp 1-component vector of float)
+0:5 Function Parameters:
+0:5 'inFloat1' (temp 1-component vector of float)
+0:5 'inScalar' (temp float)
+0:? Sequence
+0:6 Branch: Return with expression
+0:6 add (temp 1-component vector of float)
+0:6 vector-scale (temp 1-component vector of float)
+0:6 'f1' (temp 1-component vector of float)
+0:6 'scalar' (temp float)
+0:6 vector-scale (temp 1-component vector of float)
+0:6 'inFloat1' (temp 1-component vector of float)
+0:6 'inScalar' (temp float)
+0:? Linker Objects
+0:? 'f1' (temp 1-component vector of float)
+0:? 'scalar' (temp float)
+
+// Module Version 10000
+// Generated by (magic number): 80001
+// Id's are bound by 24
+
+ Capability Shader
+ 1: ExtInstImport "GLSL.std.450"
+ MemoryModel Logical GLSL450
+ EntryPoint Fragment 4 "PixelShaderFunction"
+ ExecutionMode 4 OriginUpperLeft
+ Source HLSL 450
+ Name 4 "PixelShaderFunction"
+ Name 11 "ShaderFunction(vf1;f1;"
+ Name 9 "inFloat1"
+ Name 10 "inScalar"
+ Name 13 "f1"
+ Name 15 "scalar"
+ 2: TypeVoid
+ 3: TypeFunction 2
+ 6: TypeFloat 32
+ 7: TypePointer Function 6(float)
+ 8: TypeFunction 6(float) 7(ptr) 7(ptr)
+4(PixelShaderFunction): 2 Function None 3
+ 5: Label
+ FunctionEnd
+11(ShaderFunction(vf1;f1;): 6(float) Function None 8
+ 9(inFloat1): 7(ptr) FunctionParameter
+ 10(inScalar): 7(ptr) FunctionParameter
+ 12: Label
+ 13(f1): 7(ptr) Variable Function
+ 15(scalar): 7(ptr) Variable Function
+ 14: 6(float) Load 13(f1)
+ 16: 6(float) Load 15(scalar)
+ 17: 6(float) IMul 14 16
+ 18: 6(float) Load 9(inFloat1)
+ 19: 6(float) Load 10(inScalar)
+ 20: 6(float) IMul 18 19
+ 21: 6(float) FAdd 17 20
+ ReturnValue 21
+ FunctionEnd
diff --git a/chromium/third_party/glslang/src/Test/baseResults/hlsl.float4.frag.out b/chromium/third_party/glslang/src/Test/baseResults/hlsl.float4.frag.out
new file mode 100755
index 00000000000..2ea803f1a8d
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/hlsl.float4.frag.out
@@ -0,0 +1,99 @@
+hlsl.float4.frag
+Shader version: 450
+gl_FragCoord origin is upper left
+0:? Sequence
+0:1 move second child to first child (temp 4-component vector of float)
+0:1 'AmbientColor' (temp 4-component vector of float)
+0:? Constant:
+0:? 1.000000
+0:? 0.500000
+0:? 0.000000
+0:? 1.000000
+0:12 Function Definition: ShaderFunction(vf4; (temp 4-component vector of float)
+0:9 Function Parameters:
+0:9 'input' (temp 4-component vector of float)
+0:? Sequence
+0:10 Branch: Return with expression
+0:10 component-wise multiply (temp 4-component vector of float)
+0:10 'input' (temp 4-component vector of float)
+0:10 'AmbientColor' (temp 4-component vector of float)
+0:? Linker Objects
+0:? 'AmbientColor' (temp 4-component vector of float)
+0:? 'ff1' (temp bool Face)
+0:? 'ff2' (temp 4-component vector of float)
+0:? 'ff3' (temp 4-component vector of float)
+0:? 'ff4' (temp 4-component vector of float FragCoord)
+
+
+Linked fragment stage:
+
+
+Shader version: 450
+gl_FragCoord origin is upper left
+0:? Sequence
+0:1 move second child to first child (temp 4-component vector of float)
+0:1 'AmbientColor' (temp 4-component vector of float)
+0:? Constant:
+0:? 1.000000
+0:? 0.500000
+0:? 0.000000
+0:? 1.000000
+0:12 Function Definition: ShaderFunction(vf4; (temp 4-component vector of float)
+0:9 Function Parameters:
+0:9 'input' (temp 4-component vector of float)
+0:? Sequence
+0:10 Branch: Return with expression
+0:10 component-wise multiply (temp 4-component vector of float)
+0:10 'input' (temp 4-component vector of float)
+0:10 'AmbientColor' (temp 4-component vector of float)
+0:? Linker Objects
+0:? 'AmbientColor' (temp 4-component vector of float)
+0:? 'ff1' (temp bool Face)
+0:? 'ff2' (temp 4-component vector of float)
+0:? 'ff3' (temp 4-component vector of float)
+0:? 'ff4' (temp 4-component vector of float FragCoord)
+
+// Module Version 10000
+// Generated by (magic number): 80001
+// Id's are bound by 25
+
+ Capability Shader
+ 1: ExtInstImport "GLSL.std.450"
+ MemoryModel Logical GLSL450
+ EntryPoint Fragment 4 "PixelShaderFunction"
+ ExecutionMode 4 OriginUpperLeft
+ Source HLSL 450
+ Name 4 "PixelShaderFunction"
+ Name 11 "ShaderFunction(vf4;"
+ Name 10 "input"
+ Name 14 "AmbientColor"
+ Name 21 "ff1"
+ Name 22 "ff2"
+ Name 23 "ff3"
+ Name 24 "ff4"
+ Decorate 21(ff1) BuiltIn FrontFacing
+ Decorate 24(ff4) BuiltIn FragCoord
+ 2: TypeVoid
+ 3: TypeFunction 2
+ 6: TypeFloat 32
+ 7: TypeVector 6(float) 4
+ 8: TypePointer Function 7(fvec4)
+ 9: TypeFunction 7(fvec4) 8(ptr)
+ 19: TypeBool
+ 20: TypePointer Function 19(bool)
+4(PixelShaderFunction): 2 Function None 3
+ 5: Label
+ FunctionEnd
+11(ShaderFunction(vf4;): 7(fvec4) Function None 9
+ 10(input): 8(ptr) FunctionParameter
+ 12: Label
+14(AmbientColor): 8(ptr) Variable Function
+ 21(ff1): 20(ptr) Variable Function
+ 22(ff2): 8(ptr) Variable Function
+ 23(ff3): 8(ptr) Variable Function
+ 24(ff4): 8(ptr) Variable Function
+ 13: 7(fvec4) Load 10(input)
+ 15: 7(fvec4) Load 14(AmbientColor)
+ 16: 7(fvec4) FMul 13 15
+ ReturnValue 16
+ FunctionEnd
diff --git a/chromium/third_party/glslang/src/Test/baseResults/hlsl.forLoop.frag.out b/chromium/third_party/glslang/src/Test/baseResults/hlsl.forLoop.frag.out
new file mode 100755
index 00000000000..2e654e19188
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/hlsl.forLoop.frag.out
@@ -0,0 +1,220 @@
+hlsl.forLoop.frag
+Shader version: 450
+gl_FragCoord origin is upper left
+0:? Sequence
+0:9 Function Definition: PixelShaderFunction(vf4; (temp 4-component vector of float)
+0:2 Function Parameters:
+0:2 'input' (temp 4-component vector of float)
+0:? Sequence
+0:? Sequence
+0:3 Loop with condition tested first
+0:3 No loop condition
+0:3 No loop body
+0:4 Sequence
+0:4 Pre-Increment (temp 4-component vector of float)
+0:4 'input' (temp 4-component vector of float)
+0:4 Loop with condition tested first
+0:4 No loop condition
+0:4 No loop body
+0:? Sequence
+0:5 Loop with condition tested first
+0:5 Loop Condition
+0:5 Compare Not Equal (temp bool)
+0:5 'input' (temp 4-component vector of float)
+0:5 'input' (temp 4-component vector of float)
+0:5 No loop body
+0:? Sequence
+0:6 Loop with condition tested first
+0:6 Loop Condition
+0:6 Compare Not Equal (temp bool)
+0:6 'input' (temp 4-component vector of float)
+0:6 'input' (temp 4-component vector of float)
+0:6 Loop Body
+0:? Sequence
+0:6 Branch: Return with expression
+0:6 Negate value (temp 4-component vector of float)
+0:6 'input' (temp 4-component vector of float)
+0:7 Sequence
+0:7 Pre-Decrement (temp 4-component vector of float)
+0:7 'input' (temp 4-component vector of float)
+0:7 Loop with condition tested first
+0:7 Loop Condition
+0:7 Compare Not Equal (temp bool)
+0:7 'input' (temp 4-component vector of float)
+0:7 'input' (temp 4-component vector of float)
+0:7 Loop Body
+0:? Sequence
+0:7 Branch: Return with expression
+0:7 Negate value (temp 4-component vector of float)
+0:7 'input' (temp 4-component vector of float)
+0:7 Loop Terminal Expression
+0:7 add second child into first child (temp 4-component vector of float)
+0:7 'input' (temp 4-component vector of float)
+0:7 Constant:
+0:7 2.000000
+0:? Linker Objects
+
+
+Linked fragment stage:
+
+
+Shader version: 450
+gl_FragCoord origin is upper left
+0:? Sequence
+0:9 Function Definition: PixelShaderFunction(vf4; (temp 4-component vector of float)
+0:2 Function Parameters:
+0:2 'input' (temp 4-component vector of float)
+0:? Sequence
+0:? Sequence
+0:3 Loop with condition tested first
+0:3 No loop condition
+0:3 No loop body
+0:4 Sequence
+0:4 Pre-Increment (temp 4-component vector of float)
+0:4 'input' (temp 4-component vector of float)
+0:4 Loop with condition tested first
+0:4 No loop condition
+0:4 No loop body
+0:? Sequence
+0:5 Loop with condition tested first
+0:5 Loop Condition
+0:5 Compare Not Equal (temp bool)
+0:5 'input' (temp 4-component vector of float)
+0:5 'input' (temp 4-component vector of float)
+0:5 No loop body
+0:? Sequence
+0:6 Loop with condition tested first
+0:6 Loop Condition
+0:6 Compare Not Equal (temp bool)
+0:6 'input' (temp 4-component vector of float)
+0:6 'input' (temp 4-component vector of float)
+0:6 Loop Body
+0:? Sequence
+0:6 Branch: Return with expression
+0:6 Negate value (temp 4-component vector of float)
+0:6 'input' (temp 4-component vector of float)
+0:7 Sequence
+0:7 Pre-Decrement (temp 4-component vector of float)
+0:7 'input' (temp 4-component vector of float)
+0:7 Loop with condition tested first
+0:7 Loop Condition
+0:7 Compare Not Equal (temp bool)
+0:7 'input' (temp 4-component vector of float)
+0:7 'input' (temp 4-component vector of float)
+0:7 Loop Body
+0:? Sequence
+0:7 Branch: Return with expression
+0:7 Negate value (temp 4-component vector of float)
+0:7 'input' (temp 4-component vector of float)
+0:7 Loop Terminal Expression
+0:7 add second child into first child (temp 4-component vector of float)
+0:7 'input' (temp 4-component vector of float)
+0:7 Constant:
+0:7 2.000000
+0:? Linker Objects
+
+// Module Version 10000
+// Generated by (magic number): 80001
+// Id's are bound by 64
+
+ Capability Shader
+ 1: ExtInstImport "GLSL.std.450"
+ MemoryModel Logical GLSL450
+ EntryPoint Fragment 4 "PixelShaderFunction"
+ ExecutionMode 4 OriginUpperLeft
+ Source HLSL 450
+ Name 4 "PixelShaderFunction"
+ Name 13 "input"
+ 2: TypeVoid
+ 3: TypeFunction 2
+ 10: TypeFloat 32
+ 11: TypeVector 10(float) 4
+ 12: TypePointer Function 11(fvec4)
+ 15: 10(float) Constant 1065353216
+ 29: TypeBool
+ 30: TypeVector 29(bool) 4
+ 60: 10(float) Constant 1073741824
+4(PixelShaderFunction): 2 Function None 3
+ 5: Label
+ 13(input): 12(ptr) Variable Function
+ Branch 6
+ 6: Label
+ LoopMerge 8 9 None
+ Branch 7
+ 7: Label
+ Branch 9
+ 9: Label
+ Branch 6
+ 8: Label
+ 14: 11(fvec4) Load 13(input)
+ 16: 11(fvec4) CompositeConstruct 15 15 15 15
+ 17: 11(fvec4) FAdd 14 16
+ Store 13(input) 17
+ Branch 18
+ 18: Label
+ LoopMerge 20 21 None
+ Branch 19
+ 19: Label
+ Branch 21
+ 21: Label
+ Branch 18
+ 20: Label
+ Branch 22
+ 22: Label
+ LoopMerge 24 25 None
+ Branch 26
+ 26: Label
+ 27: 11(fvec4) Load 13(input)
+ 28: 11(fvec4) Load 13(input)
+ 31: 30(bvec4) FOrdNotEqual 27 28
+ 32: 29(bool) Any 31
+ BranchConditional 32 23 24
+ 23: Label
+ Branch 25
+ 25: Label
+ Branch 22
+ 24: Label
+ Branch 33
+ 33: Label
+ LoopMerge 35 36 None
+ Branch 37
+ 37: Label
+ 38: 11(fvec4) Load 13(input)
+ 39: 11(fvec4) Load 13(input)
+ 40: 30(bvec4) FOrdNotEqual 38 39
+ 41: 29(bool) Any 40
+ BranchConditional 41 34 35
+ 34: Label
+ 42: 11(fvec4) Load 13(input)
+ 43: 11(fvec4) FNegate 42
+ ReturnValue 43
+ 36: Label
+ Branch 33
+ 35: Label
+ 45: 11(fvec4) Load 13(input)
+ 46: 11(fvec4) CompositeConstruct 15 15 15 15
+ 47: 11(fvec4) FSub 45 46
+ Store 13(input) 47
+ Branch 48
+ 48: Label
+ LoopMerge 50 51 None
+ Branch 52
+ 52: Label
+ 53: 11(fvec4) Load 13(input)
+ 54: 11(fvec4) Load 13(input)
+ 55: 30(bvec4) FOrdNotEqual 53 54
+ 56: 29(bool) Any 55
+ BranchConditional 56 49 50
+ 49: Label
+ 57: 11(fvec4) Load 13(input)
+ 58: 11(fvec4) FNegate 57
+ ReturnValue 58
+ 51: Label
+ 61: 11(fvec4) Load 13(input)
+ 62: 11(fvec4) CompositeConstruct 60 60 60 60
+ 63: 11(fvec4) FAdd 61 62
+ Store 13(input) 63
+ Branch 48
+ 50: Label
+ Return
+ FunctionEnd
diff --git a/chromium/third_party/glslang/src/Test/baseResults/hlsl.frag.out b/chromium/third_party/glslang/src/Test/baseResults/hlsl.frag.out
new file mode 100644
index 00000000000..cfed9051fba
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/hlsl.frag.out
@@ -0,0 +1,160 @@
+hlsl.frag
+Shader version: 450
+gl_FragCoord origin is upper left
+0:? Sequence
+0:1 move second child to first child (temp 4-component vector of float)
+0:1 'AmbientColor' (temp 4-component vector of float)
+0:? Constant:
+0:? 1.000000
+0:? 0.500000
+0:? 0.000000
+0:? 1.000000
+0:2 move second child to first child (temp float)
+0:2 'AmbientIntensity' (temp float)
+0:2 Constant:
+0:2 0.100000
+0:13 Function Definition: PixelShaderFunction(vf4; (temp 4-component vector of float)
+0:5 Function Parameters:
+0:5 'input' (temp 4-component vector of float)
+0:? Sequence
+0:6 Branch: Return with expression
+0:6 add (temp 4-component vector of float)
+0:6 vector-scale (temp 4-component vector of float)
+0:6 'input' (temp 4-component vector of float)
+0:6 'AmbientIntensity' (temp float)
+0:6 'AmbientColor' (temp 4-component vector of float)
+0:7 Branch: Return with expression
+0:7 add (temp 4-component vector of float)
+0:7 component-wise multiply (temp 4-component vector of float)
+0:7 'input' (temp 4-component vector of float)
+0:7 'input' (temp 4-component vector of float)
+0:7 component-wise multiply (temp 4-component vector of float)
+0:7 'input' (temp 4-component vector of float)
+0:7 'input' (temp 4-component vector of float)
+0:8 Branch: Return with expression
+0:8 add (temp 4-component vector of float)
+0:8 add (temp 4-component vector of float)
+0:8 'input' (temp 4-component vector of float)
+0:8 component-wise multiply (temp 4-component vector of float)
+0:8 'input' (temp 4-component vector of float)
+0:8 'input' (temp 4-component vector of float)
+0:8 'input' (temp 4-component vector of float)
+0:9 Branch: Return with expression
+0:9 component-wise multiply (temp 4-component vector of float)
+0:9 Pre-Increment (temp 4-component vector of float)
+0:9 'input' (temp 4-component vector of float)
+0:9 Negate value (temp 4-component vector of float)
+0:9 Negate value (temp 4-component vector of float)
+0:9 Pre-Decrement (temp 4-component vector of float)
+0:9 'input' (temp 4-component vector of float)
+0:10 Branch: Return with expression
+0:10 add (temp 4-component vector of float)
+0:10 Post-Increment (temp 4-component vector of float)
+0:10 'input' (temp 4-component vector of float)
+0:10 Pre-Increment (temp 4-component vector of float)
+0:10 'input' (temp 4-component vector of float)
+0:11 Branch: Return with expression
+0:11 sine (global 4-component vector of float)
+0:11 'input' (temp 4-component vector of float)
+0:? Linker Objects
+0:? 'AmbientColor' (temp 4-component vector of float)
+0:? 'AmbientIntensity' (temp float)
+
+
+Linked fragment stage:
+
+
+Shader version: 450
+gl_FragCoord origin is upper left
+0:? Sequence
+0:1 move second child to first child (temp 4-component vector of float)
+0:1 'AmbientColor' (temp 4-component vector of float)
+0:? Constant:
+0:? 1.000000
+0:? 0.500000
+0:? 0.000000
+0:? 1.000000
+0:2 move second child to first child (temp float)
+0:2 'AmbientIntensity' (temp float)
+0:2 Constant:
+0:2 0.100000
+0:13 Function Definition: PixelShaderFunction(vf4; (temp 4-component vector of float)
+0:5 Function Parameters:
+0:5 'input' (temp 4-component vector of float)
+0:? Sequence
+0:6 Branch: Return with expression
+0:6 add (temp 4-component vector of float)
+0:6 vector-scale (temp 4-component vector of float)
+0:6 'input' (temp 4-component vector of float)
+0:6 'AmbientIntensity' (temp float)
+0:6 'AmbientColor' (temp 4-component vector of float)
+0:7 Branch: Return with expression
+0:7 add (temp 4-component vector of float)
+0:7 component-wise multiply (temp 4-component vector of float)
+0:7 'input' (temp 4-component vector of float)
+0:7 'input' (temp 4-component vector of float)
+0:7 component-wise multiply (temp 4-component vector of float)
+0:7 'input' (temp 4-component vector of float)
+0:7 'input' (temp 4-component vector of float)
+0:8 Branch: Return with expression
+0:8 add (temp 4-component vector of float)
+0:8 add (temp 4-component vector of float)
+0:8 'input' (temp 4-component vector of float)
+0:8 component-wise multiply (temp 4-component vector of float)
+0:8 'input' (temp 4-component vector of float)
+0:8 'input' (temp 4-component vector of float)
+0:8 'input' (temp 4-component vector of float)
+0:9 Branch: Return with expression
+0:9 component-wise multiply (temp 4-component vector of float)
+0:9 Pre-Increment (temp 4-component vector of float)
+0:9 'input' (temp 4-component vector of float)
+0:9 Negate value (temp 4-component vector of float)
+0:9 Negate value (temp 4-component vector of float)
+0:9 Pre-Decrement (temp 4-component vector of float)
+0:9 'input' (temp 4-component vector of float)
+0:10 Branch: Return with expression
+0:10 add (temp 4-component vector of float)
+0:10 Post-Increment (temp 4-component vector of float)
+0:10 'input' (temp 4-component vector of float)
+0:10 Pre-Increment (temp 4-component vector of float)
+0:10 'input' (temp 4-component vector of float)
+0:11 Branch: Return with expression
+0:11 sine (global 4-component vector of float)
+0:11 'input' (temp 4-component vector of float)
+0:? Linker Objects
+0:? 'AmbientColor' (temp 4-component vector of float)
+0:? 'AmbientIntensity' (temp float)
+
+// Module Version 10000
+// Generated by (magic number): 80001
+// Id's are bound by 57
+
+ Capability Shader
+ 1: ExtInstImport "GLSL.std.450"
+ MemoryModel Logical GLSL450
+ EntryPoint Fragment 4 "PixelShaderFunction"
+ ExecutionMode 4 OriginUpperLeft
+ Source HLSL 450
+ Name 4 "PixelShaderFunction"
+ Name 9 "input"
+ Name 12 "AmbientIntensity"
+ Name 15 "AmbientColor"
+ 2: TypeVoid
+ 3: TypeFunction 2
+ 6: TypeFloat 32
+ 7: TypeVector 6(float) 4
+ 8: TypePointer Function 7(fvec4)
+ 11: TypePointer Function 6(float)
+ 36: 6(float) Constant 1065353216
+4(PixelShaderFunction): 2 Function None 3
+ 5: Label
+ 9(input): 8(ptr) Variable Function
+12(AmbientIntensity): 11(ptr) Variable Function
+15(AmbientColor): 8(ptr) Variable Function
+ 10: 7(fvec4) Load 9(input)
+ 13: 6(float) Load 12(AmbientIntensity)
+ 14: 7(fvec4) VectorTimesScalar 10 13
+ 16: 7(fvec4) Load 15(AmbientColor)
+ 17: 7(fvec4) FAdd 14 16
+ ReturnValue 17
+ FunctionEnd
diff --git a/chromium/third_party/glslang/src/Test/baseResults/hlsl.if.frag.out b/chromium/third_party/glslang/src/Test/baseResults/hlsl.if.frag.out
new file mode 100755
index 00000000000..8908279bac7
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/hlsl.if.frag.out
@@ -0,0 +1,223 @@
+hlsl.if.frag
+Shader version: 450
+gl_FragCoord origin is upper left
+0:? Sequence
+0:29 Function Definition: PixelShaderFunction(vf4; (temp 4-component vector of float)
+0:2 Function Parameters:
+0:2 'input' (temp 4-component vector of float)
+0:? Sequence
+0:3 Test condition and select (temp void)
+0:3 Condition
+0:3 Compare Equal (temp bool)
+0:3 'input' (temp 4-component vector of float)
+0:3 'input' (temp 4-component vector of float)
+0:3 true case
+0:4 Branch: Return with expression
+0:4 'input' (temp 4-component vector of float)
+0:6 Test condition and select (temp void)
+0:6 Condition
+0:6 Compare Equal (temp bool)
+0:6 'input' (temp 4-component vector of float)
+0:6 'input' (temp 4-component vector of float)
+0:6 true case
+0:7 Branch: Return with expression
+0:7 'input' (temp 4-component vector of float)
+0:6 false case
+0:9 Branch: Return with expression
+0:9 Negate value (temp 4-component vector of float)
+0:9 'input' (temp 4-component vector of float)
+0:11 Test condition and select (temp void)
+0:11 Condition
+0:11 Compare Equal (temp bool)
+0:11 'input' (temp 4-component vector of float)
+0:11 'input' (temp 4-component vector of float)
+0:11 true case is null
+0:14 Test condition and select (temp void)
+0:14 Condition
+0:14 Compare Equal (temp bool)
+0:14 'input' (temp 4-component vector of float)
+0:14 'input' (temp 4-component vector of float)
+0:14 true case is null
+0:19 Test condition and select (temp void)
+0:19 Condition
+0:19 Compare Equal (temp bool)
+0:19 'input' (temp 4-component vector of float)
+0:19 'input' (temp 4-component vector of float)
+0:19 true case
+0:? Sequence
+0:20 Branch: Return with expression
+0:20 'input' (temp 4-component vector of float)
+0:23 Test condition and select (temp void)
+0:23 Condition
+0:23 Compare Equal (temp bool)
+0:23 'input' (temp 4-component vector of float)
+0:23 'input' (temp 4-component vector of float)
+0:23 true case
+0:? Sequence
+0:24 Branch: Return with expression
+0:24 'input' (temp 4-component vector of float)
+0:23 false case
+0:? Sequence
+0:26 Branch: Return with expression
+0:26 Negate value (temp 4-component vector of float)
+0:26 'input' (temp 4-component vector of float)
+0:? Linker Objects
+
+
+Linked fragment stage:
+
+
+Shader version: 450
+gl_FragCoord origin is upper left
+0:? Sequence
+0:29 Function Definition: PixelShaderFunction(vf4; (temp 4-component vector of float)
+0:2 Function Parameters:
+0:2 'input' (temp 4-component vector of float)
+0:? Sequence
+0:3 Test condition and select (temp void)
+0:3 Condition
+0:3 Compare Equal (temp bool)
+0:3 'input' (temp 4-component vector of float)
+0:3 'input' (temp 4-component vector of float)
+0:3 true case
+0:4 Branch: Return with expression
+0:4 'input' (temp 4-component vector of float)
+0:6 Test condition and select (temp void)
+0:6 Condition
+0:6 Compare Equal (temp bool)
+0:6 'input' (temp 4-component vector of float)
+0:6 'input' (temp 4-component vector of float)
+0:6 true case
+0:7 Branch: Return with expression
+0:7 'input' (temp 4-component vector of float)
+0:6 false case
+0:9 Branch: Return with expression
+0:9 Negate value (temp 4-component vector of float)
+0:9 'input' (temp 4-component vector of float)
+0:11 Test condition and select (temp void)
+0:11 Condition
+0:11 Compare Equal (temp bool)
+0:11 'input' (temp 4-component vector of float)
+0:11 'input' (temp 4-component vector of float)
+0:11 true case is null
+0:14 Test condition and select (temp void)
+0:14 Condition
+0:14 Compare Equal (temp bool)
+0:14 'input' (temp 4-component vector of float)
+0:14 'input' (temp 4-component vector of float)
+0:14 true case is null
+0:19 Test condition and select (temp void)
+0:19 Condition
+0:19 Compare Equal (temp bool)
+0:19 'input' (temp 4-component vector of float)
+0:19 'input' (temp 4-component vector of float)
+0:19 true case
+0:? Sequence
+0:20 Branch: Return with expression
+0:20 'input' (temp 4-component vector of float)
+0:23 Test condition and select (temp void)
+0:23 Condition
+0:23 Compare Equal (temp bool)
+0:23 'input' (temp 4-component vector of float)
+0:23 'input' (temp 4-component vector of float)
+0:23 true case
+0:? Sequence
+0:24 Branch: Return with expression
+0:24 'input' (temp 4-component vector of float)
+0:23 false case
+0:? Sequence
+0:26 Branch: Return with expression
+0:26 Negate value (temp 4-component vector of float)
+0:26 'input' (temp 4-component vector of float)
+0:? Linker Objects
+
+// Module Version 10000
+// Generated by (magic number): 80001
+// Id's are bound by 64
+
+ Capability Shader
+ 1: ExtInstImport "GLSL.std.450"
+ MemoryModel Logical GLSL450
+ EntryPoint Fragment 4 "PixelShaderFunction"
+ ExecutionMode 4 OriginUpperLeft
+ Source HLSL 450
+ Name 4 "PixelShaderFunction"
+ Name 9 "input"
+ 2: TypeVoid
+ 3: TypeFunction 2
+ 6: TypeFloat 32
+ 7: TypeVector 6(float) 4
+ 8: TypePointer Function 7(fvec4)
+ 12: TypeBool
+ 13: TypeVector 12(bool) 4
+4(PixelShaderFunction): 2 Function None 3
+ 5: Label
+ 9(input): 8(ptr) Variable Function
+ 10: 7(fvec4) Load 9(input)
+ 11: 7(fvec4) Load 9(input)
+ 14: 13(bvec4) FOrdEqual 10 11
+ 15: 12(bool) All 14
+ SelectionMerge 17 None
+ BranchConditional 15 16 17
+ 16: Label
+ 18: 7(fvec4) Load 9(input)
+ ReturnValue 18
+ 17: Label
+ 20: 7(fvec4) Load 9(input)
+ 21: 7(fvec4) Load 9(input)
+ 22: 13(bvec4) FOrdEqual 20 21
+ 23: 12(bool) All 22
+ SelectionMerge 25 None
+ BranchConditional 23 24 28
+ 24: Label
+ 26: 7(fvec4) Load 9(input)
+ ReturnValue 26
+ 28: Label
+ 29: 7(fvec4) Load 9(input)
+ 30: 7(fvec4) FNegate 29
+ ReturnValue 30
+ 25: Label
+ 32: 7(fvec4) Load 9(input)
+ 33: 7(fvec4) Load 9(input)
+ 34: 13(bvec4) FOrdEqual 32 33
+ 35: 12(bool) All 34
+ SelectionMerge 37 None
+ BranchConditional 35 36 37
+ 36: Label
+ Branch 37
+ 37: Label
+ 38: 7(fvec4) Load 9(input)
+ 39: 7(fvec4) Load 9(input)
+ 40: 13(bvec4) FOrdEqual 38 39
+ 41: 12(bool) All 40
+ SelectionMerge 43 None
+ BranchConditional 41 42 43
+ 42: Label
+ Branch 43
+ 43: Label
+ 44: 7(fvec4) Load 9(input)
+ 45: 7(fvec4) Load 9(input)
+ 46: 13(bvec4) FOrdEqual 44 45
+ 47: 12(bool) All 46
+ SelectionMerge 49 None
+ BranchConditional 47 48 49
+ 48: Label
+ 50: 7(fvec4) Load 9(input)
+ ReturnValue 50
+ 49: Label
+ 52: 7(fvec4) Load 9(input)
+ 53: 7(fvec4) Load 9(input)
+ 54: 13(bvec4) FOrdEqual 52 53
+ 55: 12(bool) All 54
+ SelectionMerge 57 None
+ BranchConditional 55 56 60
+ 56: Label
+ 58: 7(fvec4) Load 9(input)
+ ReturnValue 58
+ 60: Label
+ 61: 7(fvec4) Load 9(input)
+ 62: 7(fvec4) FNegate 61
+ ReturnValue 62
+ 57: Label
+ Return
+ FunctionEnd
diff --git a/chromium/third_party/glslang/src/Test/baseResults/hlsl.intrinsics.frag.out b/chromium/third_party/glslang/src/Test/baseResults/hlsl.intrinsics.frag.out
new file mode 100644
index 00000000000..e27b11a3d58
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/hlsl.intrinsics.frag.out
@@ -0,0 +1,3290 @@
+hlsl.intrinsics.frag
+Shader version: 450
+gl_FragCoord origin is upper left
+0:? Sequence
+0:66 Function Definition: PixelShaderFunction(f1;f1;f1; (temp float)
+0:2 Function Parameters:
+0:2 'inF0' (temp float)
+0:2 'inF1' (temp float)
+0:2 'inF2' (temp float)
+0:? Sequence
+0:3 all (global bool)
+0:3 'inF0' (temp float)
+0:4 Absolute value (global float)
+0:4 'inF0' (temp float)
+0:5 arc cosine (global float)
+0:5 'inF0' (temp float)
+0:6 any (global bool)
+0:6 'inF0' (temp float)
+0:7 arc sine (global float)
+0:7 'inF0' (temp float)
+0:8 arc tangent (global float)
+0:8 'inF0' (temp float)
+0:9 arc tangent (global float)
+0:9 'inF0' (temp float)
+0:9 'inF1' (temp float)
+0:10 Ceiling (global float)
+0:10 'inF0' (temp float)
+0:11 clamp (global float)
+0:11 'inF0' (temp float)
+0:11 'inF1' (temp float)
+0:11 'inF2' (temp float)
+0:12 Test condition and select (temp void)
+0:12 Condition
+0:12 Compare Less Than (temp bool)
+0:12 'inF0' (temp float)
+0:12 Constant:
+0:12 0.000000
+0:12 true case
+0:12 Branch: Kill
+0:13 cosine (global float)
+0:13 'inF0' (temp float)
+0:14 hyp. cosine (global float)
+0:14 'inF0' (temp float)
+0:15 bitCount (global uint)
+0:15 Constant:
+0:15 7 (const uint)
+0:16 dPdx (global float)
+0:16 'inF0' (temp float)
+0:17 dPdxCoarse (global float)
+0:17 'inF0' (temp float)
+0:18 dPdxFine (global float)
+0:18 'inF0' (temp float)
+0:19 dPdy (global float)
+0:19 'inF0' (temp float)
+0:20 dPdyCoarse (global float)
+0:20 'inF0' (temp float)
+0:21 dPdyFine (global float)
+0:21 'inF0' (temp float)
+0:22 degrees (global float)
+0:22 'inF0' (temp float)
+0:26 exp (global float)
+0:26 'inF0' (temp float)
+0:27 exp2 (global float)
+0:27 'inF0' (temp float)
+0:28 findMSB (global int)
+0:28 Constant:
+0:28 7 (const int)
+0:29 findLSB (global int)
+0:29 Constant:
+0:29 7 (const int)
+0:30 Floor (global float)
+0:30 'inF0' (temp float)
+0:32 mod (global float)
+0:32 'inF0' (temp float)
+0:32 'inF1' (temp float)
+0:33 Fraction (global float)
+0:33 'inF0' (temp float)
+0:34 frexp (global float)
+0:34 'inF0' (temp float)
+0:34 'inF1' (temp float)
+0:35 fwidth (global float)
+0:35 'inF0' (temp float)
+0:36 isinf (global bool)
+0:36 'inF0' (temp float)
+0:37 isnan (global bool)
+0:37 'inF0' (temp float)
+0:38 ldexp (global float)
+0:38 'inF0' (temp float)
+0:38 'inF1' (temp float)
+0:39 log (global float)
+0:39 'inF0' (temp float)
+0:40 component-wise multiply (temp float)
+0:40 log2 (temp float)
+0:40 'inF0' (temp float)
+0:40 Constant:
+0:40 0.301030
+0:41 log2 (global float)
+0:41 'inF0' (temp float)
+0:42 max (global float)
+0:42 'inF0' (temp float)
+0:42 'inF1' (temp float)
+0:43 min (global float)
+0:43 'inF0' (temp float)
+0:43 'inF1' (temp float)
+0:44 pow (global float)
+0:44 'inF0' (temp float)
+0:44 'inF1' (temp float)
+0:45 radians (global float)
+0:45 'inF0' (temp float)
+0:46 divide (temp float)
+0:46 Constant:
+0:46 1.000000
+0:46 'inF0' (temp float)
+0:47 bitFieldReverse (global uint)
+0:47 Constant:
+0:47 2 (const uint)
+0:48 roundEven (global float)
+0:48 'inF0' (temp float)
+0:49 inverse sqrt (global float)
+0:49 'inF0' (temp float)
+0:50 clamp (global float)
+0:50 'inF0' (temp float)
+0:50 Constant:
+0:50 0.000000
+0:50 Constant:
+0:50 1.000000
+0:51 Sign (global float)
+0:51 'inF0' (temp float)
+0:52 sine (global float)
+0:52 'inF0' (temp float)
+0:53 Sequence
+0:53 move second child to first child (temp float)
+0:53 'inF1' (temp float)
+0:53 sine (temp float)
+0:53 'inF0' (temp float)
+0:53 move second child to first child (temp float)
+0:53 'inF2' (temp float)
+0:53 cosine (temp float)
+0:53 'inF0' (temp float)
+0:54 hyp. sine (global float)
+0:54 'inF0' (temp float)
+0:55 smoothstep (global float)
+0:55 'inF0' (temp float)
+0:55 'inF1' (temp float)
+0:55 'inF2' (temp float)
+0:56 sqrt (global float)
+0:56 'inF0' (temp float)
+0:57 step (global float)
+0:57 'inF0' (temp float)
+0:57 'inF1' (temp float)
+0:58 tangent (global float)
+0:58 'inF0' (temp float)
+0:59 hyp. tangent (global float)
+0:59 'inF0' (temp float)
+0:61 trunc (global float)
+0:61 'inF0' (temp float)
+0:63 Branch: Return with expression
+0:63 Constant:
+0:63 0.000000
+0:72 Function Definition: PixelShaderFunction(vf1;vf1;vf1; (temp 1-component vector of float)
+0:67 Function Parameters:
+0:67 'inF0' (temp 1-component vector of float)
+0:67 'inF1' (temp 1-component vector of float)
+0:67 'inF2' (temp 1-component vector of float)
+0:? Sequence
+0:69 Branch: Return with expression
+0:69 Constant:
+0:69 0.000000
+0:145 Function Definition: PixelShaderFunction(vf2;vf2;vf2; (temp 2-component vector of float)
+0:73 Function Parameters:
+0:73 'inF0' (temp 2-component vector of float)
+0:73 'inF1' (temp 2-component vector of float)
+0:73 'inF2' (temp 2-component vector of float)
+0:? Sequence
+0:74 all (global bool)
+0:74 'inF0' (temp 2-component vector of float)
+0:75 Absolute value (global 2-component vector of float)
+0:75 'inF0' (temp 2-component vector of float)
+0:76 arc cosine (global 2-component vector of float)
+0:76 'inF0' (temp 2-component vector of float)
+0:77 any (global bool)
+0:77 'inF0' (temp 2-component vector of float)
+0:78 arc sine (global 2-component vector of float)
+0:78 'inF0' (temp 2-component vector of float)
+0:79 arc tangent (global 2-component vector of float)
+0:79 'inF0' (temp 2-component vector of float)
+0:80 arc tangent (global 2-component vector of float)
+0:80 'inF0' (temp 2-component vector of float)
+0:80 'inF1' (temp 2-component vector of float)
+0:81 Ceiling (global 2-component vector of float)
+0:81 'inF0' (temp 2-component vector of float)
+0:82 clamp (global 2-component vector of float)
+0:82 'inF0' (temp 2-component vector of float)
+0:82 'inF1' (temp 2-component vector of float)
+0:82 'inF2' (temp 2-component vector of float)
+0:83 Test condition and select (temp void)
+0:83 Condition
+0:83 any (temp bool)
+0:83 Compare Less Than (temp 2-component vector of bool)
+0:83 'inF0' (temp 2-component vector of float)
+0:83 Constant:
+0:83 0.000000
+0:83 0.000000
+0:83 true case
+0:83 Branch: Kill
+0:84 cosine (global 2-component vector of float)
+0:84 'inF0' (temp 2-component vector of float)
+0:85 hyp. cosine (global 2-component vector of float)
+0:85 'inF0' (temp 2-component vector of float)
+0:? bitCount (global 2-component vector of uint)
+0:? Constant:
+0:? 7 (const uint)
+0:? 3 (const uint)
+0:87 dPdx (global 2-component vector of float)
+0:87 'inF0' (temp 2-component vector of float)
+0:88 dPdxCoarse (global 2-component vector of float)
+0:88 'inF0' (temp 2-component vector of float)
+0:89 dPdxFine (global 2-component vector of float)
+0:89 'inF0' (temp 2-component vector of float)
+0:90 dPdy (global 2-component vector of float)
+0:90 'inF0' (temp 2-component vector of float)
+0:91 dPdyCoarse (global 2-component vector of float)
+0:91 'inF0' (temp 2-component vector of float)
+0:92 dPdyFine (global 2-component vector of float)
+0:92 'inF0' (temp 2-component vector of float)
+0:93 degrees (global 2-component vector of float)
+0:93 'inF0' (temp 2-component vector of float)
+0:94 distance (global float)
+0:94 'inF0' (temp 2-component vector of float)
+0:94 'inF1' (temp 2-component vector of float)
+0:95 dot-product (global float)
+0:95 'inF0' (temp 2-component vector of float)
+0:95 'inF1' (temp 2-component vector of float)
+0:99 exp (global 2-component vector of float)
+0:99 'inF0' (temp 2-component vector of float)
+0:100 exp2 (global 2-component vector of float)
+0:100 'inF0' (temp 2-component vector of float)
+0:101 face-forward (global 2-component vector of float)
+0:101 'inF0' (temp 2-component vector of float)
+0:101 'inF1' (temp 2-component vector of float)
+0:101 'inF2' (temp 2-component vector of float)
+0:102 findMSB (global int)
+0:102 Constant:
+0:102 7 (const int)
+0:103 findLSB (global int)
+0:103 Constant:
+0:103 7 (const int)
+0:104 Floor (global 2-component vector of float)
+0:104 'inF0' (temp 2-component vector of float)
+0:106 mod (global 2-component vector of float)
+0:106 'inF0' (temp 2-component vector of float)
+0:106 'inF1' (temp 2-component vector of float)
+0:107 Fraction (global 2-component vector of float)
+0:107 'inF0' (temp 2-component vector of float)
+0:108 frexp (global 2-component vector of float)
+0:108 'inF0' (temp 2-component vector of float)
+0:108 'inF1' (temp 2-component vector of float)
+0:109 fwidth (global 2-component vector of float)
+0:109 'inF0' (temp 2-component vector of float)
+0:110 isinf (global 2-component vector of bool)
+0:110 'inF0' (temp 2-component vector of float)
+0:111 isnan (global 2-component vector of bool)
+0:111 'inF0' (temp 2-component vector of float)
+0:112 ldexp (global 2-component vector of float)
+0:112 'inF0' (temp 2-component vector of float)
+0:112 'inF1' (temp 2-component vector of float)
+0:113 length (global float)
+0:113 'inF0' (temp 2-component vector of float)
+0:114 log (global 2-component vector of float)
+0:114 'inF0' (temp 2-component vector of float)
+0:115 vector-scale (temp 2-component vector of float)
+0:115 log2 (temp 2-component vector of float)
+0:115 'inF0' (temp 2-component vector of float)
+0:115 Constant:
+0:115 0.301030
+0:116 log2 (global 2-component vector of float)
+0:116 'inF0' (temp 2-component vector of float)
+0:117 max (global 2-component vector of float)
+0:117 'inF0' (temp 2-component vector of float)
+0:117 'inF1' (temp 2-component vector of float)
+0:118 min (global 2-component vector of float)
+0:118 'inF0' (temp 2-component vector of float)
+0:118 'inF1' (temp 2-component vector of float)
+0:119 normalize (global 2-component vector of float)
+0:119 'inF0' (temp 2-component vector of float)
+0:120 pow (global 2-component vector of float)
+0:120 'inF0' (temp 2-component vector of float)
+0:120 'inF1' (temp 2-component vector of float)
+0:121 radians (global 2-component vector of float)
+0:121 'inF0' (temp 2-component vector of float)
+0:122 divide (temp 2-component vector of float)
+0:122 Constant:
+0:122 1.000000
+0:122 'inF0' (temp 2-component vector of float)
+0:123 reflect (global 2-component vector of float)
+0:123 'inF0' (temp 2-component vector of float)
+0:123 'inF1' (temp 2-component vector of float)
+0:124 refract (global 2-component vector of float)
+0:124 'inF0' (temp 2-component vector of float)
+0:124 'inF1' (temp 2-component vector of float)
+0:124 Constant:
+0:124 2.000000
+0:? bitFieldReverse (global 2-component vector of uint)
+0:? Constant:
+0:? 1 (const uint)
+0:? 2 (const uint)
+0:126 roundEven (global 2-component vector of float)
+0:126 'inF0' (temp 2-component vector of float)
+0:127 inverse sqrt (global 2-component vector of float)
+0:127 'inF0' (temp 2-component vector of float)
+0:128 clamp (global 2-component vector of float)
+0:128 'inF0' (temp 2-component vector of float)
+0:128 Constant:
+0:128 0.000000
+0:128 Constant:
+0:128 1.000000
+0:129 Sign (global 2-component vector of float)
+0:129 'inF0' (temp 2-component vector of float)
+0:130 sine (global 2-component vector of float)
+0:130 'inF0' (temp 2-component vector of float)
+0:131 Sequence
+0:131 move second child to first child (temp 2-component vector of float)
+0:131 'inF1' (temp 2-component vector of float)
+0:131 sine (temp 2-component vector of float)
+0:131 'inF0' (temp 2-component vector of float)
+0:131 move second child to first child (temp 2-component vector of float)
+0:131 'inF2' (temp 2-component vector of float)
+0:131 cosine (temp 2-component vector of float)
+0:131 'inF0' (temp 2-component vector of float)
+0:132 hyp. sine (global 2-component vector of float)
+0:132 'inF0' (temp 2-component vector of float)
+0:133 smoothstep (global 2-component vector of float)
+0:133 'inF0' (temp 2-component vector of float)
+0:133 'inF1' (temp 2-component vector of float)
+0:133 'inF2' (temp 2-component vector of float)
+0:134 sqrt (global 2-component vector of float)
+0:134 'inF0' (temp 2-component vector of float)
+0:135 step (global 2-component vector of float)
+0:135 'inF0' (temp 2-component vector of float)
+0:135 'inF1' (temp 2-component vector of float)
+0:136 tangent (global 2-component vector of float)
+0:136 'inF0' (temp 2-component vector of float)
+0:137 hyp. tangent (global 2-component vector of float)
+0:137 'inF0' (temp 2-component vector of float)
+0:139 trunc (global 2-component vector of float)
+0:139 'inF0' (temp 2-component vector of float)
+0:142 Branch: Return with expression
+0:? Constant:
+0:? 1.000000
+0:? 2.000000
+0:219 Function Definition: PixelShaderFunction(vf3;vf3;vf3; (temp 3-component vector of float)
+0:146 Function Parameters:
+0:146 'inF0' (temp 3-component vector of float)
+0:146 'inF1' (temp 3-component vector of float)
+0:146 'inF2' (temp 3-component vector of float)
+0:? Sequence
+0:147 all (global bool)
+0:147 'inF0' (temp 3-component vector of float)
+0:148 Absolute value (global 3-component vector of float)
+0:148 'inF0' (temp 3-component vector of float)
+0:149 arc cosine (global 3-component vector of float)
+0:149 'inF0' (temp 3-component vector of float)
+0:150 any (global bool)
+0:150 'inF0' (temp 3-component vector of float)
+0:151 arc sine (global 3-component vector of float)
+0:151 'inF0' (temp 3-component vector of float)
+0:152 arc tangent (global 3-component vector of float)
+0:152 'inF0' (temp 3-component vector of float)
+0:153 arc tangent (global 3-component vector of float)
+0:153 'inF0' (temp 3-component vector of float)
+0:153 'inF1' (temp 3-component vector of float)
+0:154 Ceiling (global 3-component vector of float)
+0:154 'inF0' (temp 3-component vector of float)
+0:155 clamp (global 3-component vector of float)
+0:155 'inF0' (temp 3-component vector of float)
+0:155 'inF1' (temp 3-component vector of float)
+0:155 'inF2' (temp 3-component vector of float)
+0:156 Test condition and select (temp void)
+0:156 Condition
+0:156 any (temp bool)
+0:156 Compare Less Than (temp 3-component vector of bool)
+0:156 'inF0' (temp 3-component vector of float)
+0:156 Constant:
+0:156 0.000000
+0:156 0.000000
+0:156 0.000000
+0:156 true case
+0:156 Branch: Kill
+0:157 cosine (global 3-component vector of float)
+0:157 'inF0' (temp 3-component vector of float)
+0:158 hyp. cosine (global 3-component vector of float)
+0:158 'inF0' (temp 3-component vector of float)
+0:? bitCount (global 3-component vector of uint)
+0:? Constant:
+0:? 7 (const uint)
+0:? 3 (const uint)
+0:? 5 (const uint)
+0:160 cross-product (global 3-component vector of float)
+0:160 'inF0' (temp 3-component vector of float)
+0:160 'inF1' (temp 3-component vector of float)
+0:161 dPdx (global 3-component vector of float)
+0:161 'inF0' (temp 3-component vector of float)
+0:162 dPdxCoarse (global 3-component vector of float)
+0:162 'inF0' (temp 3-component vector of float)
+0:163 dPdxFine (global 3-component vector of float)
+0:163 'inF0' (temp 3-component vector of float)
+0:164 dPdy (global 3-component vector of float)
+0:164 'inF0' (temp 3-component vector of float)
+0:165 dPdyCoarse (global 3-component vector of float)
+0:165 'inF0' (temp 3-component vector of float)
+0:166 dPdyFine (global 3-component vector of float)
+0:166 'inF0' (temp 3-component vector of float)
+0:167 degrees (global 3-component vector of float)
+0:167 'inF0' (temp 3-component vector of float)
+0:168 distance (global float)
+0:168 'inF0' (temp 3-component vector of float)
+0:168 'inF1' (temp 3-component vector of float)
+0:169 dot-product (global float)
+0:169 'inF0' (temp 3-component vector of float)
+0:169 'inF1' (temp 3-component vector of float)
+0:173 exp (global 3-component vector of float)
+0:173 'inF0' (temp 3-component vector of float)
+0:174 exp2 (global 3-component vector of float)
+0:174 'inF0' (temp 3-component vector of float)
+0:175 face-forward (global 3-component vector of float)
+0:175 'inF0' (temp 3-component vector of float)
+0:175 'inF1' (temp 3-component vector of float)
+0:175 'inF2' (temp 3-component vector of float)
+0:176 findMSB (global int)
+0:176 Constant:
+0:176 7 (const int)
+0:177 findLSB (global int)
+0:177 Constant:
+0:177 7 (const int)
+0:178 Floor (global 3-component vector of float)
+0:178 'inF0' (temp 3-component vector of float)
+0:180 mod (global 3-component vector of float)
+0:180 'inF0' (temp 3-component vector of float)
+0:180 'inF1' (temp 3-component vector of float)
+0:181 Fraction (global 3-component vector of float)
+0:181 'inF0' (temp 3-component vector of float)
+0:182 frexp (global 3-component vector of float)
+0:182 'inF0' (temp 3-component vector of float)
+0:182 'inF1' (temp 3-component vector of float)
+0:183 fwidth (global 3-component vector of float)
+0:183 'inF0' (temp 3-component vector of float)
+0:184 isinf (global 3-component vector of bool)
+0:184 'inF0' (temp 3-component vector of float)
+0:185 isnan (global 3-component vector of bool)
+0:185 'inF0' (temp 3-component vector of float)
+0:186 ldexp (global 3-component vector of float)
+0:186 'inF0' (temp 3-component vector of float)
+0:186 'inF1' (temp 3-component vector of float)
+0:187 length (global float)
+0:187 'inF0' (temp 3-component vector of float)
+0:188 log (global 3-component vector of float)
+0:188 'inF0' (temp 3-component vector of float)
+0:189 vector-scale (temp 3-component vector of float)
+0:189 log2 (temp 3-component vector of float)
+0:189 'inF0' (temp 3-component vector of float)
+0:189 Constant:
+0:189 0.301030
+0:190 log2 (global 3-component vector of float)
+0:190 'inF0' (temp 3-component vector of float)
+0:191 max (global 3-component vector of float)
+0:191 'inF0' (temp 3-component vector of float)
+0:191 'inF1' (temp 3-component vector of float)
+0:192 min (global 3-component vector of float)
+0:192 'inF0' (temp 3-component vector of float)
+0:192 'inF1' (temp 3-component vector of float)
+0:193 normalize (global 3-component vector of float)
+0:193 'inF0' (temp 3-component vector of float)
+0:194 pow (global 3-component vector of float)
+0:194 'inF0' (temp 3-component vector of float)
+0:194 'inF1' (temp 3-component vector of float)
+0:195 radians (global 3-component vector of float)
+0:195 'inF0' (temp 3-component vector of float)
+0:196 divide (temp 3-component vector of float)
+0:196 Constant:
+0:196 1.000000
+0:196 'inF0' (temp 3-component vector of float)
+0:197 reflect (global 3-component vector of float)
+0:197 'inF0' (temp 3-component vector of float)
+0:197 'inF1' (temp 3-component vector of float)
+0:198 refract (global 3-component vector of float)
+0:198 'inF0' (temp 3-component vector of float)
+0:198 'inF1' (temp 3-component vector of float)
+0:198 Constant:
+0:198 2.000000
+0:? bitFieldReverse (global 3-component vector of uint)
+0:? Constant:
+0:? 1 (const uint)
+0:? 2 (const uint)
+0:? 3 (const uint)
+0:200 roundEven (global 3-component vector of float)
+0:200 'inF0' (temp 3-component vector of float)
+0:201 inverse sqrt (global 3-component vector of float)
+0:201 'inF0' (temp 3-component vector of float)
+0:202 clamp (global 3-component vector of float)
+0:202 'inF0' (temp 3-component vector of float)
+0:202 Constant:
+0:202 0.000000
+0:202 Constant:
+0:202 1.000000
+0:203 Sign (global 3-component vector of float)
+0:203 'inF0' (temp 3-component vector of float)
+0:204 sine (global 3-component vector of float)
+0:204 'inF0' (temp 3-component vector of float)
+0:205 Sequence
+0:205 move second child to first child (temp 3-component vector of float)
+0:205 'inF1' (temp 3-component vector of float)
+0:205 sine (temp 3-component vector of float)
+0:205 'inF0' (temp 3-component vector of float)
+0:205 move second child to first child (temp 3-component vector of float)
+0:205 'inF2' (temp 3-component vector of float)
+0:205 cosine (temp 3-component vector of float)
+0:205 'inF0' (temp 3-component vector of float)
+0:206 hyp. sine (global 3-component vector of float)
+0:206 'inF0' (temp 3-component vector of float)
+0:207 smoothstep (global 3-component vector of float)
+0:207 'inF0' (temp 3-component vector of float)
+0:207 'inF1' (temp 3-component vector of float)
+0:207 'inF2' (temp 3-component vector of float)
+0:208 sqrt (global 3-component vector of float)
+0:208 'inF0' (temp 3-component vector of float)
+0:209 step (global 3-component vector of float)
+0:209 'inF0' (temp 3-component vector of float)
+0:209 'inF1' (temp 3-component vector of float)
+0:210 tangent (global 3-component vector of float)
+0:210 'inF0' (temp 3-component vector of float)
+0:211 hyp. tangent (global 3-component vector of float)
+0:211 'inF0' (temp 3-component vector of float)
+0:213 trunc (global 3-component vector of float)
+0:213 'inF0' (temp 3-component vector of float)
+0:216 Branch: Return with expression
+0:? Constant:
+0:? 1.000000
+0:? 2.000000
+0:? 3.000000
+0:349 Function Definition: PixelShaderFunction(vf4;vf4;vf4; (temp 4-component vector of float)
+0:220 Function Parameters:
+0:220 'inF0' (temp 4-component vector of float)
+0:220 'inF1' (temp 4-component vector of float)
+0:220 'inF2' (temp 4-component vector of float)
+0:? Sequence
+0:221 all (global bool)
+0:221 'inF0' (temp 4-component vector of float)
+0:222 Absolute value (global 4-component vector of float)
+0:222 'inF0' (temp 4-component vector of float)
+0:223 arc cosine (global 4-component vector of float)
+0:223 'inF0' (temp 4-component vector of float)
+0:224 any (global bool)
+0:224 'inF0' (temp 4-component vector of float)
+0:225 arc sine (global 4-component vector of float)
+0:225 'inF0' (temp 4-component vector of float)
+0:226 arc tangent (global 4-component vector of float)
+0:226 'inF0' (temp 4-component vector of float)
+0:227 arc tangent (global 4-component vector of float)
+0:227 'inF0' (temp 4-component vector of float)
+0:227 'inF1' (temp 4-component vector of float)
+0:228 Ceiling (global 4-component vector of float)
+0:228 'inF0' (temp 4-component vector of float)
+0:229 clamp (global 4-component vector of float)
+0:229 'inF0' (temp 4-component vector of float)
+0:229 'inF1' (temp 4-component vector of float)
+0:229 'inF2' (temp 4-component vector of float)
+0:230 Test condition and select (temp void)
+0:230 Condition
+0:230 any (temp bool)
+0:230 Compare Less Than (temp 4-component vector of bool)
+0:230 'inF0' (temp 4-component vector of float)
+0:230 Constant:
+0:230 0.000000
+0:230 0.000000
+0:230 0.000000
+0:230 0.000000
+0:230 true case
+0:230 Branch: Kill
+0:231 cosine (global 4-component vector of float)
+0:231 'inF0' (temp 4-component vector of float)
+0:232 hyp. cosine (global 4-component vector of float)
+0:232 'inF0' (temp 4-component vector of float)
+0:? bitCount (global 4-component vector of uint)
+0:? Constant:
+0:? 7 (const uint)
+0:? 3 (const uint)
+0:? 5 (const uint)
+0:? 2 (const uint)
+0:234 dPdx (global 4-component vector of float)
+0:234 'inF0' (temp 4-component vector of float)
+0:235 dPdxCoarse (global 4-component vector of float)
+0:235 'inF0' (temp 4-component vector of float)
+0:236 dPdxFine (global 4-component vector of float)
+0:236 'inF0' (temp 4-component vector of float)
+0:237 dPdy (global 4-component vector of float)
+0:237 'inF0' (temp 4-component vector of float)
+0:238 dPdyCoarse (global 4-component vector of float)
+0:238 'inF0' (temp 4-component vector of float)
+0:239 dPdyFine (global 4-component vector of float)
+0:239 'inF0' (temp 4-component vector of float)
+0:240 degrees (global 4-component vector of float)
+0:240 'inF0' (temp 4-component vector of float)
+0:241 distance (global float)
+0:241 'inF0' (temp 4-component vector of float)
+0:241 'inF1' (temp 4-component vector of float)
+0:242 dot-product (global float)
+0:242 'inF0' (temp 4-component vector of float)
+0:242 'inF1' (temp 4-component vector of float)
+0:243 Construct vec4 (temp float)
+0:243 Constant:
+0:243 1.000000
+0:243 component-wise multiply (temp float)
+0:243 direct index (temp float)
+0:243 'inF0' (temp 4-component vector of float)
+0:243 Constant:
+0:243 1 (const int)
+0:243 direct index (temp float)
+0:243 'inF1' (temp 4-component vector of float)
+0:243 Constant:
+0:243 1 (const int)
+0:243 direct index (temp float)
+0:243 'inF0' (temp 4-component vector of float)
+0:243 Constant:
+0:243 2 (const int)
+0:243 direct index (temp float)
+0:243 'inF1' (temp 4-component vector of float)
+0:243 Constant:
+0:243 3 (const int)
+0:247 exp (global 4-component vector of float)
+0:247 'inF0' (temp 4-component vector of float)
+0:248 exp2 (global 4-component vector of float)
+0:248 'inF0' (temp 4-component vector of float)
+0:249 face-forward (global 4-component vector of float)
+0:249 'inF0' (temp 4-component vector of float)
+0:249 'inF1' (temp 4-component vector of float)
+0:249 'inF2' (temp 4-component vector of float)
+0:250 findMSB (global int)
+0:250 Constant:
+0:250 7 (const int)
+0:251 findLSB (global int)
+0:251 Constant:
+0:251 7 (const int)
+0:252 Floor (global 4-component vector of float)
+0:252 'inF0' (temp 4-component vector of float)
+0:254 mod (global 4-component vector of float)
+0:254 'inF0' (temp 4-component vector of float)
+0:254 'inF1' (temp 4-component vector of float)
+0:255 Fraction (global 4-component vector of float)
+0:255 'inF0' (temp 4-component vector of float)
+0:256 frexp (global 4-component vector of float)
+0:256 'inF0' (temp 4-component vector of float)
+0:256 'inF1' (temp 4-component vector of float)
+0:257 fwidth (global 4-component vector of float)
+0:257 'inF0' (temp 4-component vector of float)
+0:258 isinf (global 4-component vector of bool)
+0:258 'inF0' (temp 4-component vector of float)
+0:259 isnan (global 4-component vector of bool)
+0:259 'inF0' (temp 4-component vector of float)
+0:260 ldexp (global 4-component vector of float)
+0:260 'inF0' (temp 4-component vector of float)
+0:260 'inF1' (temp 4-component vector of float)
+0:261 length (global float)
+0:261 'inF0' (temp 4-component vector of float)
+0:262 log (global 4-component vector of float)
+0:262 'inF0' (temp 4-component vector of float)
+0:263 vector-scale (temp 4-component vector of float)
+0:263 log2 (temp 4-component vector of float)
+0:263 'inF0' (temp 4-component vector of float)
+0:263 Constant:
+0:263 0.301030
+0:264 log2 (global 4-component vector of float)
+0:264 'inF0' (temp 4-component vector of float)
+0:265 max (global 4-component vector of float)
+0:265 'inF0' (temp 4-component vector of float)
+0:265 'inF1' (temp 4-component vector of float)
+0:266 min (global 4-component vector of float)
+0:266 'inF0' (temp 4-component vector of float)
+0:266 'inF1' (temp 4-component vector of float)
+0:267 normalize (global 4-component vector of float)
+0:267 'inF0' (temp 4-component vector of float)
+0:268 pow (global 4-component vector of float)
+0:268 'inF0' (temp 4-component vector of float)
+0:268 'inF1' (temp 4-component vector of float)
+0:269 radians (global 4-component vector of float)
+0:269 'inF0' (temp 4-component vector of float)
+0:270 divide (temp 4-component vector of float)
+0:270 Constant:
+0:270 1.000000
+0:270 'inF0' (temp 4-component vector of float)
+0:271 reflect (global 4-component vector of float)
+0:271 'inF0' (temp 4-component vector of float)
+0:271 'inF1' (temp 4-component vector of float)
+0:272 refract (global 4-component vector of float)
+0:272 'inF0' (temp 4-component vector of float)
+0:272 'inF1' (temp 4-component vector of float)
+0:272 Constant:
+0:272 2.000000
+0:? bitFieldReverse (global 4-component vector of uint)
+0:? Constant:
+0:? 1 (const uint)
+0:? 2 (const uint)
+0:? 3 (const uint)
+0:? 4 (const uint)
+0:274 roundEven (global 4-component vector of float)
+0:274 'inF0' (temp 4-component vector of float)
+0:275 inverse sqrt (global 4-component vector of float)
+0:275 'inF0' (temp 4-component vector of float)
+0:276 clamp (global 4-component vector of float)
+0:276 'inF0' (temp 4-component vector of float)
+0:276 Constant:
+0:276 0.000000
+0:276 Constant:
+0:276 1.000000
+0:277 Sign (global 4-component vector of float)
+0:277 'inF0' (temp 4-component vector of float)
+0:278 sine (global 4-component vector of float)
+0:278 'inF0' (temp 4-component vector of float)
+0:279 Sequence
+0:279 move second child to first child (temp 4-component vector of float)
+0:279 'inF1' (temp 4-component vector of float)
+0:279 sine (temp 4-component vector of float)
+0:279 'inF0' (temp 4-component vector of float)
+0:279 move second child to first child (temp 4-component vector of float)
+0:279 'inF2' (temp 4-component vector of float)
+0:279 cosine (temp 4-component vector of float)
+0:279 'inF0' (temp 4-component vector of float)
+0:280 hyp. sine (global 4-component vector of float)
+0:280 'inF0' (temp 4-component vector of float)
+0:281 smoothstep (global 4-component vector of float)
+0:281 'inF0' (temp 4-component vector of float)
+0:281 'inF1' (temp 4-component vector of float)
+0:281 'inF2' (temp 4-component vector of float)
+0:282 sqrt (global 4-component vector of float)
+0:282 'inF0' (temp 4-component vector of float)
+0:283 step (global 4-component vector of float)
+0:283 'inF0' (temp 4-component vector of float)
+0:283 'inF1' (temp 4-component vector of float)
+0:284 tangent (global 4-component vector of float)
+0:284 'inF0' (temp 4-component vector of float)
+0:285 hyp. tangent (global 4-component vector of float)
+0:285 'inF0' (temp 4-component vector of float)
+0:287 trunc (global 4-component vector of float)
+0:287 'inF0' (temp 4-component vector of float)
+0:290 Branch: Return with expression
+0:? Constant:
+0:? 1.000000
+0:? 2.000000
+0:? 3.000000
+0:? 4.000000
+0:358 Function Definition: PixelShaderFunction(mf22;mf22;mf22; (temp 2X2 matrix of float)
+0:350 Function Parameters:
+0:350 'inF0' (temp 2X2 matrix of float)
+0:350 'inF1' (temp 2X2 matrix of float)
+0:350 'inF2' (temp 2X2 matrix of float)
+0:? Sequence
+0:352 all (global bool)
+0:352 'inF0' (temp 2X2 matrix of float)
+0:352 Absolute value (global 2X2 matrix of float)
+0:352 'inF0' (temp 2X2 matrix of float)
+0:352 arc cosine (global 2X2 matrix of float)
+0:352 'inF0' (temp 2X2 matrix of float)
+0:352 any (global bool)
+0:352 'inF0' (temp 2X2 matrix of float)
+0:352 arc sine (global 2X2 matrix of float)
+0:352 'inF0' (temp 2X2 matrix of float)
+0:352 arc tangent (global 2X2 matrix of float)
+0:352 'inF0' (temp 2X2 matrix of float)
+0:352 arc tangent (global 2X2 matrix of float)
+0:352 'inF0' (temp 2X2 matrix of float)
+0:352 'inF1' (temp 2X2 matrix of float)
+0:352 Ceiling (global 2X2 matrix of float)
+0:352 'inF0' (temp 2X2 matrix of float)
+0:352 Test condition and select (temp void)
+0:352 Condition
+0:352 any (temp bool)
+0:352 Compare Less Than (temp 2X2 matrix of bool)
+0:352 'inF0' (temp 2X2 matrix of float)
+0:352 Constant:
+0:352 0.000000
+0:352 0.000000
+0:352 0.000000
+0:352 0.000000
+0:352 true case
+0:352 Branch: Kill
+0:352 clamp (global 2X2 matrix of float)
+0:352 'inF0' (temp 2X2 matrix of float)
+0:352 'inF1' (temp 2X2 matrix of float)
+0:352 'inF2' (temp 2X2 matrix of float)
+0:352 cosine (global 2X2 matrix of float)
+0:352 'inF0' (temp 2X2 matrix of float)
+0:352 hyp. cosine (global 2X2 matrix of float)
+0:352 'inF0' (temp 2X2 matrix of float)
+0:352 dPdx (global 2X2 matrix of float)
+0:352 'inF0' (temp 2X2 matrix of float)
+0:352 dPdxCoarse (global 2X2 matrix of float)
+0:352 'inF0' (temp 2X2 matrix of float)
+0:352 dPdxFine (global 2X2 matrix of float)
+0:352 'inF0' (temp 2X2 matrix of float)
+0:352 dPdy (global 2X2 matrix of float)
+0:352 'inF0' (temp 2X2 matrix of float)
+0:352 dPdyCoarse (global 2X2 matrix of float)
+0:352 'inF0' (temp 2X2 matrix of float)
+0:352 dPdyFine (global 2X2 matrix of float)
+0:352 'inF0' (temp 2X2 matrix of float)
+0:352 degrees (global 2X2 matrix of float)
+0:352 'inF0' (temp 2X2 matrix of float)
+0:352 determinant (global float)
+0:352 'inF0' (temp 2X2 matrix of float)
+0:352 exp (global 2X2 matrix of float)
+0:352 'inF0' (temp 2X2 matrix of float)
+0:352 exp2 (global 2X2 matrix of float)
+0:352 'inF0' (temp 2X2 matrix of float)
+0:352 findMSB (global int)
+0:352 Constant:
+0:352 7 (const int)
+0:352 findLSB (global int)
+0:352 Constant:
+0:352 7 (const int)
+0:352 Floor (global 2X2 matrix of float)
+0:352 'inF0' (temp 2X2 matrix of float)
+0:352 mod (global 2X2 matrix of float)
+0:352 'inF0' (temp 2X2 matrix of float)
+0:352 'inF1' (temp 2X2 matrix of float)
+0:352 Fraction (global 2X2 matrix of float)
+0:352 'inF0' (temp 2X2 matrix of float)
+0:352 frexp (global 2X2 matrix of float)
+0:352 'inF0' (temp 2X2 matrix of float)
+0:352 'inF1' (temp 2X2 matrix of float)
+0:352 fwidth (global 2X2 matrix of float)
+0:352 'inF0' (temp 2X2 matrix of float)
+0:352 ldexp (global 2X2 matrix of float)
+0:352 'inF0' (temp 2X2 matrix of float)
+0:352 'inF1' (temp 2X2 matrix of float)
+0:352 log (global 2X2 matrix of float)
+0:352 'inF0' (temp 2X2 matrix of float)
+0:352 matrix-scale (temp 2X2 matrix of float)
+0:352 log2 (temp 2X2 matrix of float)
+0:352 'inF0' (temp 2X2 matrix of float)
+0:352 Constant:
+0:352 0.301030
+0:352 log2 (global 2X2 matrix of float)
+0:352 'inF0' (temp 2X2 matrix of float)
+0:352 max (global 2X2 matrix of float)
+0:352 'inF0' (temp 2X2 matrix of float)
+0:352 'inF1' (temp 2X2 matrix of float)
+0:352 min (global 2X2 matrix of float)
+0:352 'inF0' (temp 2X2 matrix of float)
+0:352 'inF1' (temp 2X2 matrix of float)
+0:352 pow (global 2X2 matrix of float)
+0:352 'inF0' (temp 2X2 matrix of float)
+0:352 'inF1' (temp 2X2 matrix of float)
+0:352 radians (global 2X2 matrix of float)
+0:352 'inF0' (temp 2X2 matrix of float)
+0:352 roundEven (global 2X2 matrix of float)
+0:352 'inF0' (temp 2X2 matrix of float)
+0:352 inverse sqrt (global 2X2 matrix of float)
+0:352 'inF0' (temp 2X2 matrix of float)
+0:352 clamp (global 2X2 matrix of float)
+0:352 'inF0' (temp 2X2 matrix of float)
+0:352 Constant:
+0:352 0.000000
+0:352 Constant:
+0:352 1.000000
+0:352 Sign (global 2X2 matrix of float)
+0:352 'inF0' (temp 2X2 matrix of float)
+0:352 sine (global 2X2 matrix of float)
+0:352 'inF0' (temp 2X2 matrix of float)
+0:352 Sequence
+0:352 move second child to first child (temp 2X2 matrix of float)
+0:352 'inF1' (temp 2X2 matrix of float)
+0:352 sine (temp 2X2 matrix of float)
+0:352 'inF0' (temp 2X2 matrix of float)
+0:352 move second child to first child (temp 2X2 matrix of float)
+0:352 'inF2' (temp 2X2 matrix of float)
+0:352 cosine (temp 2X2 matrix of float)
+0:352 'inF0' (temp 2X2 matrix of float)
+0:352 hyp. sine (global 2X2 matrix of float)
+0:352 'inF0' (temp 2X2 matrix of float)
+0:352 smoothstep (global 2X2 matrix of float)
+0:352 'inF0' (temp 2X2 matrix of float)
+0:352 'inF1' (temp 2X2 matrix of float)
+0:352 'inF2' (temp 2X2 matrix of float)
+0:352 sqrt (global 2X2 matrix of float)
+0:352 'inF0' (temp 2X2 matrix of float)
+0:352 step (global 2X2 matrix of float)
+0:352 'inF0' (temp 2X2 matrix of float)
+0:352 'inF1' (temp 2X2 matrix of float)
+0:352 tangent (global 2X2 matrix of float)
+0:352 'inF0' (temp 2X2 matrix of float)
+0:352 hyp. tangent (global 2X2 matrix of float)
+0:352 'inF0' (temp 2X2 matrix of float)
+0:352 transpose (global 2X2 matrix of float)
+0:352 'inF0' (temp 2X2 matrix of float)
+0:352 trunc (global 2X2 matrix of float)
+0:352 'inF0' (temp 2X2 matrix of float)
+0:355 Branch: Return with expression
+0:? Constant:
+0:? 2.000000
+0:? 2.000000
+0:? 2.000000
+0:? 2.000000
+0:367 Function Definition: PixelShaderFunction(mf33;mf33;mf33; (temp 3X3 matrix of float)
+0:359 Function Parameters:
+0:359 'inF0' (temp 3X3 matrix of float)
+0:359 'inF1' (temp 3X3 matrix of float)
+0:359 'inF2' (temp 3X3 matrix of float)
+0:? Sequence
+0:361 all (global bool)
+0:361 'inF0' (temp 3X3 matrix of float)
+0:361 Absolute value (global 3X3 matrix of float)
+0:361 'inF0' (temp 3X3 matrix of float)
+0:361 arc cosine (global 3X3 matrix of float)
+0:361 'inF0' (temp 3X3 matrix of float)
+0:361 any (global bool)
+0:361 'inF0' (temp 3X3 matrix of float)
+0:361 arc sine (global 3X3 matrix of float)
+0:361 'inF0' (temp 3X3 matrix of float)
+0:361 arc tangent (global 3X3 matrix of float)
+0:361 'inF0' (temp 3X3 matrix of float)
+0:361 arc tangent (global 3X3 matrix of float)
+0:361 'inF0' (temp 3X3 matrix of float)
+0:361 'inF1' (temp 3X3 matrix of float)
+0:361 Ceiling (global 3X3 matrix of float)
+0:361 'inF0' (temp 3X3 matrix of float)
+0:361 Test condition and select (temp void)
+0:361 Condition
+0:361 any (temp bool)
+0:361 Compare Less Than (temp 3X3 matrix of bool)
+0:361 'inF0' (temp 3X3 matrix of float)
+0:361 Constant:
+0:361 0.000000
+0:361 0.000000
+0:361 0.000000
+0:361 0.000000
+0:361 0.000000
+0:361 0.000000
+0:361 0.000000
+0:361 0.000000
+0:361 0.000000
+0:361 true case
+0:361 Branch: Kill
+0:361 clamp (global 3X3 matrix of float)
+0:361 'inF0' (temp 3X3 matrix of float)
+0:361 'inF1' (temp 3X3 matrix of float)
+0:361 'inF2' (temp 3X3 matrix of float)
+0:361 cosine (global 3X3 matrix of float)
+0:361 'inF0' (temp 3X3 matrix of float)
+0:361 hyp. cosine (global 3X3 matrix of float)
+0:361 'inF0' (temp 3X3 matrix of float)
+0:361 dPdx (global 3X3 matrix of float)
+0:361 'inF0' (temp 3X3 matrix of float)
+0:361 dPdxCoarse (global 3X3 matrix of float)
+0:361 'inF0' (temp 3X3 matrix of float)
+0:361 dPdxFine (global 3X3 matrix of float)
+0:361 'inF0' (temp 3X3 matrix of float)
+0:361 dPdy (global 3X3 matrix of float)
+0:361 'inF0' (temp 3X3 matrix of float)
+0:361 dPdyCoarse (global 3X3 matrix of float)
+0:361 'inF0' (temp 3X3 matrix of float)
+0:361 dPdyFine (global 3X3 matrix of float)
+0:361 'inF0' (temp 3X3 matrix of float)
+0:361 degrees (global 3X3 matrix of float)
+0:361 'inF0' (temp 3X3 matrix of float)
+0:361 determinant (global float)
+0:361 'inF0' (temp 3X3 matrix of float)
+0:361 exp (global 3X3 matrix of float)
+0:361 'inF0' (temp 3X3 matrix of float)
+0:361 exp2 (global 3X3 matrix of float)
+0:361 'inF0' (temp 3X3 matrix of float)
+0:361 findMSB (global int)
+0:361 Constant:
+0:361 7 (const int)
+0:361 findLSB (global int)
+0:361 Constant:
+0:361 7 (const int)
+0:361 Floor (global 3X3 matrix of float)
+0:361 'inF0' (temp 3X3 matrix of float)
+0:361 mod (global 3X3 matrix of float)
+0:361 'inF0' (temp 3X3 matrix of float)
+0:361 'inF1' (temp 3X3 matrix of float)
+0:361 Fraction (global 3X3 matrix of float)
+0:361 'inF0' (temp 3X3 matrix of float)
+0:361 frexp (global 3X3 matrix of float)
+0:361 'inF0' (temp 3X3 matrix of float)
+0:361 'inF1' (temp 3X3 matrix of float)
+0:361 fwidth (global 3X3 matrix of float)
+0:361 'inF0' (temp 3X3 matrix of float)
+0:361 ldexp (global 3X3 matrix of float)
+0:361 'inF0' (temp 3X3 matrix of float)
+0:361 'inF1' (temp 3X3 matrix of float)
+0:361 log (global 3X3 matrix of float)
+0:361 'inF0' (temp 3X3 matrix of float)
+0:361 matrix-scale (temp 3X3 matrix of float)
+0:361 log2 (temp 3X3 matrix of float)
+0:361 'inF0' (temp 3X3 matrix of float)
+0:361 Constant:
+0:361 0.301030
+0:361 log2 (global 3X3 matrix of float)
+0:361 'inF0' (temp 3X3 matrix of float)
+0:361 max (global 3X3 matrix of float)
+0:361 'inF0' (temp 3X3 matrix of float)
+0:361 'inF1' (temp 3X3 matrix of float)
+0:361 min (global 3X3 matrix of float)
+0:361 'inF0' (temp 3X3 matrix of float)
+0:361 'inF1' (temp 3X3 matrix of float)
+0:361 pow (global 3X3 matrix of float)
+0:361 'inF0' (temp 3X3 matrix of float)
+0:361 'inF1' (temp 3X3 matrix of float)
+0:361 radians (global 3X3 matrix of float)
+0:361 'inF0' (temp 3X3 matrix of float)
+0:361 roundEven (global 3X3 matrix of float)
+0:361 'inF0' (temp 3X3 matrix of float)
+0:361 inverse sqrt (global 3X3 matrix of float)
+0:361 'inF0' (temp 3X3 matrix of float)
+0:361 clamp (global 3X3 matrix of float)
+0:361 'inF0' (temp 3X3 matrix of float)
+0:361 Constant:
+0:361 0.000000
+0:361 Constant:
+0:361 1.000000
+0:361 Sign (global 3X3 matrix of float)
+0:361 'inF0' (temp 3X3 matrix of float)
+0:361 sine (global 3X3 matrix of float)
+0:361 'inF0' (temp 3X3 matrix of float)
+0:361 Sequence
+0:361 move second child to first child (temp 3X3 matrix of float)
+0:361 'inF1' (temp 3X3 matrix of float)
+0:361 sine (temp 3X3 matrix of float)
+0:361 'inF0' (temp 3X3 matrix of float)
+0:361 move second child to first child (temp 3X3 matrix of float)
+0:361 'inF2' (temp 3X3 matrix of float)
+0:361 cosine (temp 3X3 matrix of float)
+0:361 'inF0' (temp 3X3 matrix of float)
+0:361 hyp. sine (global 3X3 matrix of float)
+0:361 'inF0' (temp 3X3 matrix of float)
+0:361 smoothstep (global 3X3 matrix of float)
+0:361 'inF0' (temp 3X3 matrix of float)
+0:361 'inF1' (temp 3X3 matrix of float)
+0:361 'inF2' (temp 3X3 matrix of float)
+0:361 sqrt (global 3X3 matrix of float)
+0:361 'inF0' (temp 3X3 matrix of float)
+0:361 step (global 3X3 matrix of float)
+0:361 'inF0' (temp 3X3 matrix of float)
+0:361 'inF1' (temp 3X3 matrix of float)
+0:361 tangent (global 3X3 matrix of float)
+0:361 'inF0' (temp 3X3 matrix of float)
+0:361 hyp. tangent (global 3X3 matrix of float)
+0:361 'inF0' (temp 3X3 matrix of float)
+0:361 transpose (global 3X3 matrix of float)
+0:361 'inF0' (temp 3X3 matrix of float)
+0:361 trunc (global 3X3 matrix of float)
+0:361 'inF0' (temp 3X3 matrix of float)
+0:364 Branch: Return with expression
+0:? Constant:
+0:? 3.000000
+0:? 3.000000
+0:? 3.000000
+0:? 3.000000
+0:? 3.000000
+0:? 3.000000
+0:? 3.000000
+0:? 3.000000
+0:? 3.000000
+0:388 Function Definition: PixelShaderFunction(mf44;mf44;mf44; (temp 4X4 matrix of float)
+0:368 Function Parameters:
+0:368 'inF0' (temp 4X4 matrix of float)
+0:368 'inF1' (temp 4X4 matrix of float)
+0:368 'inF2' (temp 4X4 matrix of float)
+0:? Sequence
+0:370 all (global bool)
+0:370 'inF0' (temp 4X4 matrix of float)
+0:370 Absolute value (global 4X4 matrix of float)
+0:370 'inF0' (temp 4X4 matrix of float)
+0:370 arc cosine (global 4X4 matrix of float)
+0:370 'inF0' (temp 4X4 matrix of float)
+0:370 any (global bool)
+0:370 'inF0' (temp 4X4 matrix of float)
+0:370 arc sine (global 4X4 matrix of float)
+0:370 'inF0' (temp 4X4 matrix of float)
+0:370 arc tangent (global 4X4 matrix of float)
+0:370 'inF0' (temp 4X4 matrix of float)
+0:370 arc tangent (global 4X4 matrix of float)
+0:370 'inF0' (temp 4X4 matrix of float)
+0:370 'inF1' (temp 4X4 matrix of float)
+0:370 Ceiling (global 4X4 matrix of float)
+0:370 'inF0' (temp 4X4 matrix of float)
+0:370 Test condition and select (temp void)
+0:370 Condition
+0:370 any (temp bool)
+0:370 Compare Less Than (temp 4X4 matrix of bool)
+0:370 'inF0' (temp 4X4 matrix of float)
+0:370 Constant:
+0:370 0.000000
+0:370 0.000000
+0:370 0.000000
+0:370 0.000000
+0:370 0.000000
+0:370 0.000000
+0:370 0.000000
+0:370 0.000000
+0:370 0.000000
+0:370 0.000000
+0:370 0.000000
+0:370 0.000000
+0:370 0.000000
+0:370 0.000000
+0:370 0.000000
+0:370 0.000000
+0:370 true case
+0:370 Branch: Kill
+0:370 clamp (global 4X4 matrix of float)
+0:370 'inF0' (temp 4X4 matrix of float)
+0:370 'inF1' (temp 4X4 matrix of float)
+0:370 'inF2' (temp 4X4 matrix of float)
+0:370 cosine (global 4X4 matrix of float)
+0:370 'inF0' (temp 4X4 matrix of float)
+0:370 hyp. cosine (global 4X4 matrix of float)
+0:370 'inF0' (temp 4X4 matrix of float)
+0:370 dPdx (global 4X4 matrix of float)
+0:370 'inF0' (temp 4X4 matrix of float)
+0:370 dPdxCoarse (global 4X4 matrix of float)
+0:370 'inF0' (temp 4X4 matrix of float)
+0:370 dPdxFine (global 4X4 matrix of float)
+0:370 'inF0' (temp 4X4 matrix of float)
+0:370 dPdy (global 4X4 matrix of float)
+0:370 'inF0' (temp 4X4 matrix of float)
+0:370 dPdyCoarse (global 4X4 matrix of float)
+0:370 'inF0' (temp 4X4 matrix of float)
+0:370 dPdyFine (global 4X4 matrix of float)
+0:370 'inF0' (temp 4X4 matrix of float)
+0:370 degrees (global 4X4 matrix of float)
+0:370 'inF0' (temp 4X4 matrix of float)
+0:370 determinant (global float)
+0:370 'inF0' (temp 4X4 matrix of float)
+0:370 exp (global 4X4 matrix of float)
+0:370 'inF0' (temp 4X4 matrix of float)
+0:370 exp2 (global 4X4 matrix of float)
+0:370 'inF0' (temp 4X4 matrix of float)
+0:370 findMSB (global int)
+0:370 Constant:
+0:370 7 (const int)
+0:370 findLSB (global int)
+0:370 Constant:
+0:370 7 (const int)
+0:370 Floor (global 4X4 matrix of float)
+0:370 'inF0' (temp 4X4 matrix of float)
+0:370 mod (global 4X4 matrix of float)
+0:370 'inF0' (temp 4X4 matrix of float)
+0:370 'inF1' (temp 4X4 matrix of float)
+0:370 Fraction (global 4X4 matrix of float)
+0:370 'inF0' (temp 4X4 matrix of float)
+0:370 frexp (global 4X4 matrix of float)
+0:370 'inF0' (temp 4X4 matrix of float)
+0:370 'inF1' (temp 4X4 matrix of float)
+0:370 fwidth (global 4X4 matrix of float)
+0:370 'inF0' (temp 4X4 matrix of float)
+0:370 ldexp (global 4X4 matrix of float)
+0:370 'inF0' (temp 4X4 matrix of float)
+0:370 'inF1' (temp 4X4 matrix of float)
+0:370 log (global 4X4 matrix of float)
+0:370 'inF0' (temp 4X4 matrix of float)
+0:370 matrix-scale (temp 4X4 matrix of float)
+0:370 log2 (temp 4X4 matrix of float)
+0:370 'inF0' (temp 4X4 matrix of float)
+0:370 Constant:
+0:370 0.301030
+0:370 log2 (global 4X4 matrix of float)
+0:370 'inF0' (temp 4X4 matrix of float)
+0:370 max (global 4X4 matrix of float)
+0:370 'inF0' (temp 4X4 matrix of float)
+0:370 'inF1' (temp 4X4 matrix of float)
+0:370 min (global 4X4 matrix of float)
+0:370 'inF0' (temp 4X4 matrix of float)
+0:370 'inF1' (temp 4X4 matrix of float)
+0:370 pow (global 4X4 matrix of float)
+0:370 'inF0' (temp 4X4 matrix of float)
+0:370 'inF1' (temp 4X4 matrix of float)
+0:370 radians (global 4X4 matrix of float)
+0:370 'inF0' (temp 4X4 matrix of float)
+0:370 roundEven (global 4X4 matrix of float)
+0:370 'inF0' (temp 4X4 matrix of float)
+0:370 inverse sqrt (global 4X4 matrix of float)
+0:370 'inF0' (temp 4X4 matrix of float)
+0:370 clamp (global 4X4 matrix of float)
+0:370 'inF0' (temp 4X4 matrix of float)
+0:370 Constant:
+0:370 0.000000
+0:370 Constant:
+0:370 1.000000
+0:370 Sign (global 4X4 matrix of float)
+0:370 'inF0' (temp 4X4 matrix of float)
+0:370 sine (global 4X4 matrix of float)
+0:370 'inF0' (temp 4X4 matrix of float)
+0:370 Sequence
+0:370 move second child to first child (temp 4X4 matrix of float)
+0:370 'inF1' (temp 4X4 matrix of float)
+0:370 sine (temp 4X4 matrix of float)
+0:370 'inF0' (temp 4X4 matrix of float)
+0:370 move second child to first child (temp 4X4 matrix of float)
+0:370 'inF2' (temp 4X4 matrix of float)
+0:370 cosine (temp 4X4 matrix of float)
+0:370 'inF0' (temp 4X4 matrix of float)
+0:370 hyp. sine (global 4X4 matrix of float)
+0:370 'inF0' (temp 4X4 matrix of float)
+0:370 smoothstep (global 4X4 matrix of float)
+0:370 'inF0' (temp 4X4 matrix of float)
+0:370 'inF1' (temp 4X4 matrix of float)
+0:370 'inF2' (temp 4X4 matrix of float)
+0:370 sqrt (global 4X4 matrix of float)
+0:370 'inF0' (temp 4X4 matrix of float)
+0:370 step (global 4X4 matrix of float)
+0:370 'inF0' (temp 4X4 matrix of float)
+0:370 'inF1' (temp 4X4 matrix of float)
+0:370 tangent (global 4X4 matrix of float)
+0:370 'inF0' (temp 4X4 matrix of float)
+0:370 hyp. tangent (global 4X4 matrix of float)
+0:370 'inF0' (temp 4X4 matrix of float)
+0:370 transpose (global 4X4 matrix of float)
+0:370 'inF0' (temp 4X4 matrix of float)
+0:370 trunc (global 4X4 matrix of float)
+0:370 'inF0' (temp 4X4 matrix of float)
+0:373 Branch: Return with expression
+0:? Constant:
+0:? 4.000000
+0:? 4.000000
+0:? 4.000000
+0:? 4.000000
+0:? 4.000000
+0:? 4.000000
+0:? 4.000000
+0:? 4.000000
+0:? 4.000000
+0:? 4.000000
+0:? 4.000000
+0:? 4.000000
+0:? 4.000000
+0:? 4.000000
+0:? 4.000000
+0:? 4.000000
+0:395 Function Definition: TestGenMul(f1;f1;vf2;vf2;mf22;mf22; (temp void)
+0:391 Function Parameters:
+0:391 'inF0' (temp float)
+0:391 'inF1' (temp float)
+0:391 'inFV0' (temp 2-component vector of float)
+0:391 'inFV1' (temp 2-component vector of float)
+0:391 'inFM0' (temp 2X2 matrix of float)
+0:391 'inFM1' (temp 2X2 matrix of float)
+0:? Sequence
+0:392 move second child to first child (temp float)
+0:392 'r0' (temp float)
+0:392 component-wise multiply (temp float)
+0:392 'inF0' (temp float)
+0:392 'inF1' (temp float)
+0:392 move second child to first child (temp 2-component vector of float)
+0:392 'r1' (temp 2-component vector of float)
+0:392 vector-scale (temp 2-component vector of float)
+0:392 'inFV0' (temp 2-component vector of float)
+0:392 'inF0' (temp float)
+0:392 move second child to first child (temp 2-component vector of float)
+0:392 'r2' (temp 2-component vector of float)
+0:392 vector-scale (temp 2-component vector of float)
+0:392 'inF0' (temp float)
+0:392 'inFV0' (temp 2-component vector of float)
+0:392 move second child to first child (temp float)
+0:392 'r3' (temp float)
+0:392 dot-product (global float)
+0:392 'inFV0' (temp 2-component vector of float)
+0:392 'inFV1' (temp 2-component vector of float)
+0:392 move second child to first child (temp 2-component vector of float)
+0:392 'r4' (temp 2-component vector of float)
+0:392 matrix-times-vector (temp 2-component vector of float)
+0:392 'inFM0' (temp 2X2 matrix of float)
+0:392 'inFV0' (temp 2-component vector of float)
+0:392 move second child to first child (temp 2-component vector of float)
+0:392 'r5' (temp 2-component vector of float)
+0:392 vector-times-matrix (temp 2-component vector of float)
+0:392 'inFV0' (temp 2-component vector of float)
+0:392 'inFM0' (temp 2X2 matrix of float)
+0:392 move second child to first child (temp 2X2 matrix of float)
+0:392 'r6' (temp 2X2 matrix of float)
+0:392 matrix-scale (temp 2X2 matrix of float)
+0:392 'inFM0' (temp 2X2 matrix of float)
+0:392 'inF0' (temp float)
+0:392 move second child to first child (temp 2X2 matrix of float)
+0:392 'r7' (temp 2X2 matrix of float)
+0:392 matrix-scale (temp 2X2 matrix of float)
+0:392 'inF0' (temp float)
+0:392 'inFM0' (temp 2X2 matrix of float)
+0:392 move second child to first child (temp 2X2 matrix of float)
+0:392 'r8' (temp 2X2 matrix of float)
+0:392 matrix-multiply (temp 2X2 matrix of float)
+0:392 'inFM0' (temp 2X2 matrix of float)
+0:392 'inFM1' (temp 2X2 matrix of float)
+0:402 Function Definition: TestGenMul(f1;f1;vf3;vf3;mf33;mf33; (temp void)
+0:398 Function Parameters:
+0:398 'inF0' (temp float)
+0:398 'inF1' (temp float)
+0:398 'inFV0' (temp 3-component vector of float)
+0:398 'inFV1' (temp 3-component vector of float)
+0:398 'inFM0' (temp 3X3 matrix of float)
+0:398 'inFM1' (temp 3X3 matrix of float)
+0:? Sequence
+0:399 move second child to first child (temp float)
+0:399 'r0' (temp float)
+0:399 component-wise multiply (temp float)
+0:399 'inF0' (temp float)
+0:399 'inF1' (temp float)
+0:399 move second child to first child (temp 3-component vector of float)
+0:399 'r1' (temp 3-component vector of float)
+0:399 vector-scale (temp 3-component vector of float)
+0:399 'inFV0' (temp 3-component vector of float)
+0:399 'inF0' (temp float)
+0:399 move second child to first child (temp 3-component vector of float)
+0:399 'r2' (temp 3-component vector of float)
+0:399 vector-scale (temp 3-component vector of float)
+0:399 'inF0' (temp float)
+0:399 'inFV0' (temp 3-component vector of float)
+0:399 move second child to first child (temp float)
+0:399 'r3' (temp float)
+0:399 dot-product (global float)
+0:399 'inFV0' (temp 3-component vector of float)
+0:399 'inFV1' (temp 3-component vector of float)
+0:399 move second child to first child (temp 3-component vector of float)
+0:399 'r4' (temp 3-component vector of float)
+0:399 matrix-times-vector (temp 3-component vector of float)
+0:399 'inFM0' (temp 3X3 matrix of float)
+0:399 'inFV0' (temp 3-component vector of float)
+0:399 move second child to first child (temp 3-component vector of float)
+0:399 'r5' (temp 3-component vector of float)
+0:399 vector-times-matrix (temp 3-component vector of float)
+0:399 'inFV0' (temp 3-component vector of float)
+0:399 'inFM0' (temp 3X3 matrix of float)
+0:399 move second child to first child (temp 3X3 matrix of float)
+0:399 'r6' (temp 3X3 matrix of float)
+0:399 matrix-scale (temp 3X3 matrix of float)
+0:399 'inFM0' (temp 3X3 matrix of float)
+0:399 'inF0' (temp float)
+0:399 move second child to first child (temp 3X3 matrix of float)
+0:399 'r7' (temp 3X3 matrix of float)
+0:399 matrix-scale (temp 3X3 matrix of float)
+0:399 'inF0' (temp float)
+0:399 'inFM0' (temp 3X3 matrix of float)
+0:399 move second child to first child (temp 3X3 matrix of float)
+0:399 'r8' (temp 3X3 matrix of float)
+0:399 matrix-multiply (temp 3X3 matrix of float)
+0:399 'inFM0' (temp 3X3 matrix of float)
+0:399 'inFM1' (temp 3X3 matrix of float)
+0:408 Function Definition: TestGenMul(f1;f1;vf4;vf4;mf44;mf44; (temp void)
+0:405 Function Parameters:
+0:405 'inF0' (temp float)
+0:405 'inF1' (temp float)
+0:405 'inFV0' (temp 4-component vector of float)
+0:405 'inFV1' (temp 4-component vector of float)
+0:405 'inFM0' (temp 4X4 matrix of float)
+0:405 'inFM1' (temp 4X4 matrix of float)
+0:? Sequence
+0:406 move second child to first child (temp float)
+0:406 'r0' (temp float)
+0:406 component-wise multiply (temp float)
+0:406 'inF0' (temp float)
+0:406 'inF1' (temp float)
+0:406 move second child to first child (temp 4-component vector of float)
+0:406 'r1' (temp 4-component vector of float)
+0:406 vector-scale (temp 4-component vector of float)
+0:406 'inFV0' (temp 4-component vector of float)
+0:406 'inF0' (temp float)
+0:406 move second child to first child (temp 4-component vector of float)
+0:406 'r2' (temp 4-component vector of float)
+0:406 vector-scale (temp 4-component vector of float)
+0:406 'inF0' (temp float)
+0:406 'inFV0' (temp 4-component vector of float)
+0:406 move second child to first child (temp float)
+0:406 'r3' (temp float)
+0:406 dot-product (global float)
+0:406 'inFV0' (temp 4-component vector of float)
+0:406 'inFV1' (temp 4-component vector of float)
+0:406 move second child to first child (temp 4-component vector of float)
+0:406 'r4' (temp 4-component vector of float)
+0:406 matrix-times-vector (temp 4-component vector of float)
+0:406 'inFM0' (temp 4X4 matrix of float)
+0:406 'inFV0' (temp 4-component vector of float)
+0:406 move second child to first child (temp 4-component vector of float)
+0:406 'r5' (temp 4-component vector of float)
+0:406 vector-times-matrix (temp 4-component vector of float)
+0:406 'inFV0' (temp 4-component vector of float)
+0:406 'inFM0' (temp 4X4 matrix of float)
+0:406 move second child to first child (temp 4X4 matrix of float)
+0:406 'r6' (temp 4X4 matrix of float)
+0:406 matrix-scale (temp 4X4 matrix of float)
+0:406 'inFM0' (temp 4X4 matrix of float)
+0:406 'inF0' (temp float)
+0:406 move second child to first child (temp 4X4 matrix of float)
+0:406 'r7' (temp 4X4 matrix of float)
+0:406 matrix-scale (temp 4X4 matrix of float)
+0:406 'inF0' (temp float)
+0:406 'inFM0' (temp 4X4 matrix of float)
+0:406 move second child to first child (temp 4X4 matrix of float)
+0:406 'r8' (temp 4X4 matrix of float)
+0:406 matrix-multiply (temp 4X4 matrix of float)
+0:406 'inFM0' (temp 4X4 matrix of float)
+0:406 'inFM1' (temp 4X4 matrix of float)
+0:? Linker Objects
+
+
+Linked fragment stage:
+
+
+Shader version: 450
+gl_FragCoord origin is upper left
+0:? Sequence
+0:66 Function Definition: PixelShaderFunction(f1;f1;f1; (temp float)
+0:2 Function Parameters:
+0:2 'inF0' (temp float)
+0:2 'inF1' (temp float)
+0:2 'inF2' (temp float)
+0:? Sequence
+0:3 all (global bool)
+0:3 'inF0' (temp float)
+0:4 Absolute value (global float)
+0:4 'inF0' (temp float)
+0:5 arc cosine (global float)
+0:5 'inF0' (temp float)
+0:6 any (global bool)
+0:6 'inF0' (temp float)
+0:7 arc sine (global float)
+0:7 'inF0' (temp float)
+0:8 arc tangent (global float)
+0:8 'inF0' (temp float)
+0:9 arc tangent (global float)
+0:9 'inF0' (temp float)
+0:9 'inF1' (temp float)
+0:10 Ceiling (global float)
+0:10 'inF0' (temp float)
+0:11 clamp (global float)
+0:11 'inF0' (temp float)
+0:11 'inF1' (temp float)
+0:11 'inF2' (temp float)
+0:12 Test condition and select (temp void)
+0:12 Condition
+0:12 Compare Less Than (temp bool)
+0:12 'inF0' (temp float)
+0:12 Constant:
+0:12 0.000000
+0:12 true case
+0:12 Branch: Kill
+0:13 cosine (global float)
+0:13 'inF0' (temp float)
+0:14 hyp. cosine (global float)
+0:14 'inF0' (temp float)
+0:15 bitCount (global uint)
+0:15 Constant:
+0:15 7 (const uint)
+0:16 dPdx (global float)
+0:16 'inF0' (temp float)
+0:17 dPdxCoarse (global float)
+0:17 'inF0' (temp float)
+0:18 dPdxFine (global float)
+0:18 'inF0' (temp float)
+0:19 dPdy (global float)
+0:19 'inF0' (temp float)
+0:20 dPdyCoarse (global float)
+0:20 'inF0' (temp float)
+0:21 dPdyFine (global float)
+0:21 'inF0' (temp float)
+0:22 degrees (global float)
+0:22 'inF0' (temp float)
+0:26 exp (global float)
+0:26 'inF0' (temp float)
+0:27 exp2 (global float)
+0:27 'inF0' (temp float)
+0:28 findMSB (global int)
+0:28 Constant:
+0:28 7 (const int)
+0:29 findLSB (global int)
+0:29 Constant:
+0:29 7 (const int)
+0:30 Floor (global float)
+0:30 'inF0' (temp float)
+0:32 mod (global float)
+0:32 'inF0' (temp float)
+0:32 'inF1' (temp float)
+0:33 Fraction (global float)
+0:33 'inF0' (temp float)
+0:34 frexp (global float)
+0:34 'inF0' (temp float)
+0:34 'inF1' (temp float)
+0:35 fwidth (global float)
+0:35 'inF0' (temp float)
+0:36 isinf (global bool)
+0:36 'inF0' (temp float)
+0:37 isnan (global bool)
+0:37 'inF0' (temp float)
+0:38 ldexp (global float)
+0:38 'inF0' (temp float)
+0:38 'inF1' (temp float)
+0:39 log (global float)
+0:39 'inF0' (temp float)
+0:40 component-wise multiply (temp float)
+0:40 log2 (temp float)
+0:40 'inF0' (temp float)
+0:40 Constant:
+0:40 0.301030
+0:41 log2 (global float)
+0:41 'inF0' (temp float)
+0:42 max (global float)
+0:42 'inF0' (temp float)
+0:42 'inF1' (temp float)
+0:43 min (global float)
+0:43 'inF0' (temp float)
+0:43 'inF1' (temp float)
+0:44 pow (global float)
+0:44 'inF0' (temp float)
+0:44 'inF1' (temp float)
+0:45 radians (global float)
+0:45 'inF0' (temp float)
+0:46 divide (temp float)
+0:46 Constant:
+0:46 1.000000
+0:46 'inF0' (temp float)
+0:47 bitFieldReverse (global uint)
+0:47 Constant:
+0:47 2 (const uint)
+0:48 roundEven (global float)
+0:48 'inF0' (temp float)
+0:49 inverse sqrt (global float)
+0:49 'inF0' (temp float)
+0:50 clamp (global float)
+0:50 'inF0' (temp float)
+0:50 Constant:
+0:50 0.000000
+0:50 Constant:
+0:50 1.000000
+0:51 Sign (global float)
+0:51 'inF0' (temp float)
+0:52 sine (global float)
+0:52 'inF0' (temp float)
+0:53 Sequence
+0:53 move second child to first child (temp float)
+0:53 'inF1' (temp float)
+0:53 sine (temp float)
+0:53 'inF0' (temp float)
+0:53 move second child to first child (temp float)
+0:53 'inF2' (temp float)
+0:53 cosine (temp float)
+0:53 'inF0' (temp float)
+0:54 hyp. sine (global float)
+0:54 'inF0' (temp float)
+0:55 smoothstep (global float)
+0:55 'inF0' (temp float)
+0:55 'inF1' (temp float)
+0:55 'inF2' (temp float)
+0:56 sqrt (global float)
+0:56 'inF0' (temp float)
+0:57 step (global float)
+0:57 'inF0' (temp float)
+0:57 'inF1' (temp float)
+0:58 tangent (global float)
+0:58 'inF0' (temp float)
+0:59 hyp. tangent (global float)
+0:59 'inF0' (temp float)
+0:61 trunc (global float)
+0:61 'inF0' (temp float)
+0:63 Branch: Return with expression
+0:63 Constant:
+0:63 0.000000
+0:72 Function Definition: PixelShaderFunction(vf1;vf1;vf1; (temp 1-component vector of float)
+0:67 Function Parameters:
+0:67 'inF0' (temp 1-component vector of float)
+0:67 'inF1' (temp 1-component vector of float)
+0:67 'inF2' (temp 1-component vector of float)
+0:? Sequence
+0:69 Branch: Return with expression
+0:69 Constant:
+0:69 0.000000
+0:145 Function Definition: PixelShaderFunction(vf2;vf2;vf2; (temp 2-component vector of float)
+0:73 Function Parameters:
+0:73 'inF0' (temp 2-component vector of float)
+0:73 'inF1' (temp 2-component vector of float)
+0:73 'inF2' (temp 2-component vector of float)
+0:? Sequence
+0:74 all (global bool)
+0:74 'inF0' (temp 2-component vector of float)
+0:75 Absolute value (global 2-component vector of float)
+0:75 'inF0' (temp 2-component vector of float)
+0:76 arc cosine (global 2-component vector of float)
+0:76 'inF0' (temp 2-component vector of float)
+0:77 any (global bool)
+0:77 'inF0' (temp 2-component vector of float)
+0:78 arc sine (global 2-component vector of float)
+0:78 'inF0' (temp 2-component vector of float)
+0:79 arc tangent (global 2-component vector of float)
+0:79 'inF0' (temp 2-component vector of float)
+0:80 arc tangent (global 2-component vector of float)
+0:80 'inF0' (temp 2-component vector of float)
+0:80 'inF1' (temp 2-component vector of float)
+0:81 Ceiling (global 2-component vector of float)
+0:81 'inF0' (temp 2-component vector of float)
+0:82 clamp (global 2-component vector of float)
+0:82 'inF0' (temp 2-component vector of float)
+0:82 'inF1' (temp 2-component vector of float)
+0:82 'inF2' (temp 2-component vector of float)
+0:83 Test condition and select (temp void)
+0:83 Condition
+0:83 any (temp bool)
+0:83 Compare Less Than (temp 2-component vector of bool)
+0:83 'inF0' (temp 2-component vector of float)
+0:83 Constant:
+0:83 0.000000
+0:83 0.000000
+0:83 true case
+0:83 Branch: Kill
+0:84 cosine (global 2-component vector of float)
+0:84 'inF0' (temp 2-component vector of float)
+0:85 hyp. cosine (global 2-component vector of float)
+0:85 'inF0' (temp 2-component vector of float)
+0:? bitCount (global 2-component vector of uint)
+0:? Constant:
+0:? 7 (const uint)
+0:? 3 (const uint)
+0:87 dPdx (global 2-component vector of float)
+0:87 'inF0' (temp 2-component vector of float)
+0:88 dPdxCoarse (global 2-component vector of float)
+0:88 'inF0' (temp 2-component vector of float)
+0:89 dPdxFine (global 2-component vector of float)
+0:89 'inF0' (temp 2-component vector of float)
+0:90 dPdy (global 2-component vector of float)
+0:90 'inF0' (temp 2-component vector of float)
+0:91 dPdyCoarse (global 2-component vector of float)
+0:91 'inF0' (temp 2-component vector of float)
+0:92 dPdyFine (global 2-component vector of float)
+0:92 'inF0' (temp 2-component vector of float)
+0:93 degrees (global 2-component vector of float)
+0:93 'inF0' (temp 2-component vector of float)
+0:94 distance (global float)
+0:94 'inF0' (temp 2-component vector of float)
+0:94 'inF1' (temp 2-component vector of float)
+0:95 dot-product (global float)
+0:95 'inF0' (temp 2-component vector of float)
+0:95 'inF1' (temp 2-component vector of float)
+0:99 exp (global 2-component vector of float)
+0:99 'inF0' (temp 2-component vector of float)
+0:100 exp2 (global 2-component vector of float)
+0:100 'inF0' (temp 2-component vector of float)
+0:101 face-forward (global 2-component vector of float)
+0:101 'inF0' (temp 2-component vector of float)
+0:101 'inF1' (temp 2-component vector of float)
+0:101 'inF2' (temp 2-component vector of float)
+0:102 findMSB (global int)
+0:102 Constant:
+0:102 7 (const int)
+0:103 findLSB (global int)
+0:103 Constant:
+0:103 7 (const int)
+0:104 Floor (global 2-component vector of float)
+0:104 'inF0' (temp 2-component vector of float)
+0:106 mod (global 2-component vector of float)
+0:106 'inF0' (temp 2-component vector of float)
+0:106 'inF1' (temp 2-component vector of float)
+0:107 Fraction (global 2-component vector of float)
+0:107 'inF0' (temp 2-component vector of float)
+0:108 frexp (global 2-component vector of float)
+0:108 'inF0' (temp 2-component vector of float)
+0:108 'inF1' (temp 2-component vector of float)
+0:109 fwidth (global 2-component vector of float)
+0:109 'inF0' (temp 2-component vector of float)
+0:110 isinf (global 2-component vector of bool)
+0:110 'inF0' (temp 2-component vector of float)
+0:111 isnan (global 2-component vector of bool)
+0:111 'inF0' (temp 2-component vector of float)
+0:112 ldexp (global 2-component vector of float)
+0:112 'inF0' (temp 2-component vector of float)
+0:112 'inF1' (temp 2-component vector of float)
+0:113 length (global float)
+0:113 'inF0' (temp 2-component vector of float)
+0:114 log (global 2-component vector of float)
+0:114 'inF0' (temp 2-component vector of float)
+0:115 vector-scale (temp 2-component vector of float)
+0:115 log2 (temp 2-component vector of float)
+0:115 'inF0' (temp 2-component vector of float)
+0:115 Constant:
+0:115 0.301030
+0:116 log2 (global 2-component vector of float)
+0:116 'inF0' (temp 2-component vector of float)
+0:117 max (global 2-component vector of float)
+0:117 'inF0' (temp 2-component vector of float)
+0:117 'inF1' (temp 2-component vector of float)
+0:118 min (global 2-component vector of float)
+0:118 'inF0' (temp 2-component vector of float)
+0:118 'inF1' (temp 2-component vector of float)
+0:119 normalize (global 2-component vector of float)
+0:119 'inF0' (temp 2-component vector of float)
+0:120 pow (global 2-component vector of float)
+0:120 'inF0' (temp 2-component vector of float)
+0:120 'inF1' (temp 2-component vector of float)
+0:121 radians (global 2-component vector of float)
+0:121 'inF0' (temp 2-component vector of float)
+0:122 divide (temp 2-component vector of float)
+0:122 Constant:
+0:122 1.000000
+0:122 'inF0' (temp 2-component vector of float)
+0:123 reflect (global 2-component vector of float)
+0:123 'inF0' (temp 2-component vector of float)
+0:123 'inF1' (temp 2-component vector of float)
+0:124 refract (global 2-component vector of float)
+0:124 'inF0' (temp 2-component vector of float)
+0:124 'inF1' (temp 2-component vector of float)
+0:124 Constant:
+0:124 2.000000
+0:? bitFieldReverse (global 2-component vector of uint)
+0:? Constant:
+0:? 1 (const uint)
+0:? 2 (const uint)
+0:126 roundEven (global 2-component vector of float)
+0:126 'inF0' (temp 2-component vector of float)
+0:127 inverse sqrt (global 2-component vector of float)
+0:127 'inF0' (temp 2-component vector of float)
+0:128 clamp (global 2-component vector of float)
+0:128 'inF0' (temp 2-component vector of float)
+0:128 Constant:
+0:128 0.000000
+0:128 Constant:
+0:128 1.000000
+0:129 Sign (global 2-component vector of float)
+0:129 'inF0' (temp 2-component vector of float)
+0:130 sine (global 2-component vector of float)
+0:130 'inF0' (temp 2-component vector of float)
+0:131 Sequence
+0:131 move second child to first child (temp 2-component vector of float)
+0:131 'inF1' (temp 2-component vector of float)
+0:131 sine (temp 2-component vector of float)
+0:131 'inF0' (temp 2-component vector of float)
+0:131 move second child to first child (temp 2-component vector of float)
+0:131 'inF2' (temp 2-component vector of float)
+0:131 cosine (temp 2-component vector of float)
+0:131 'inF0' (temp 2-component vector of float)
+0:132 hyp. sine (global 2-component vector of float)
+0:132 'inF0' (temp 2-component vector of float)
+0:133 smoothstep (global 2-component vector of float)
+0:133 'inF0' (temp 2-component vector of float)
+0:133 'inF1' (temp 2-component vector of float)
+0:133 'inF2' (temp 2-component vector of float)
+0:134 sqrt (global 2-component vector of float)
+0:134 'inF0' (temp 2-component vector of float)
+0:135 step (global 2-component vector of float)
+0:135 'inF0' (temp 2-component vector of float)
+0:135 'inF1' (temp 2-component vector of float)
+0:136 tangent (global 2-component vector of float)
+0:136 'inF0' (temp 2-component vector of float)
+0:137 hyp. tangent (global 2-component vector of float)
+0:137 'inF0' (temp 2-component vector of float)
+0:139 trunc (global 2-component vector of float)
+0:139 'inF0' (temp 2-component vector of float)
+0:142 Branch: Return with expression
+0:? Constant:
+0:? 1.000000
+0:? 2.000000
+0:219 Function Definition: PixelShaderFunction(vf3;vf3;vf3; (temp 3-component vector of float)
+0:146 Function Parameters:
+0:146 'inF0' (temp 3-component vector of float)
+0:146 'inF1' (temp 3-component vector of float)
+0:146 'inF2' (temp 3-component vector of float)
+0:? Sequence
+0:147 all (global bool)
+0:147 'inF0' (temp 3-component vector of float)
+0:148 Absolute value (global 3-component vector of float)
+0:148 'inF0' (temp 3-component vector of float)
+0:149 arc cosine (global 3-component vector of float)
+0:149 'inF0' (temp 3-component vector of float)
+0:150 any (global bool)
+0:150 'inF0' (temp 3-component vector of float)
+0:151 arc sine (global 3-component vector of float)
+0:151 'inF0' (temp 3-component vector of float)
+0:152 arc tangent (global 3-component vector of float)
+0:152 'inF0' (temp 3-component vector of float)
+0:153 arc tangent (global 3-component vector of float)
+0:153 'inF0' (temp 3-component vector of float)
+0:153 'inF1' (temp 3-component vector of float)
+0:154 Ceiling (global 3-component vector of float)
+0:154 'inF0' (temp 3-component vector of float)
+0:155 clamp (global 3-component vector of float)
+0:155 'inF0' (temp 3-component vector of float)
+0:155 'inF1' (temp 3-component vector of float)
+0:155 'inF2' (temp 3-component vector of float)
+0:156 Test condition and select (temp void)
+0:156 Condition
+0:156 any (temp bool)
+0:156 Compare Less Than (temp 3-component vector of bool)
+0:156 'inF0' (temp 3-component vector of float)
+0:156 Constant:
+0:156 0.000000
+0:156 0.000000
+0:156 0.000000
+0:156 true case
+0:156 Branch: Kill
+0:157 cosine (global 3-component vector of float)
+0:157 'inF0' (temp 3-component vector of float)
+0:158 hyp. cosine (global 3-component vector of float)
+0:158 'inF0' (temp 3-component vector of float)
+0:? bitCount (global 3-component vector of uint)
+0:? Constant:
+0:? 7 (const uint)
+0:? 3 (const uint)
+0:? 5 (const uint)
+0:160 cross-product (global 3-component vector of float)
+0:160 'inF0' (temp 3-component vector of float)
+0:160 'inF1' (temp 3-component vector of float)
+0:161 dPdx (global 3-component vector of float)
+0:161 'inF0' (temp 3-component vector of float)
+0:162 dPdxCoarse (global 3-component vector of float)
+0:162 'inF0' (temp 3-component vector of float)
+0:163 dPdxFine (global 3-component vector of float)
+0:163 'inF0' (temp 3-component vector of float)
+0:164 dPdy (global 3-component vector of float)
+0:164 'inF0' (temp 3-component vector of float)
+0:165 dPdyCoarse (global 3-component vector of float)
+0:165 'inF0' (temp 3-component vector of float)
+0:166 dPdyFine (global 3-component vector of float)
+0:166 'inF0' (temp 3-component vector of float)
+0:167 degrees (global 3-component vector of float)
+0:167 'inF0' (temp 3-component vector of float)
+0:168 distance (global float)
+0:168 'inF0' (temp 3-component vector of float)
+0:168 'inF1' (temp 3-component vector of float)
+0:169 dot-product (global float)
+0:169 'inF0' (temp 3-component vector of float)
+0:169 'inF1' (temp 3-component vector of float)
+0:173 exp (global 3-component vector of float)
+0:173 'inF0' (temp 3-component vector of float)
+0:174 exp2 (global 3-component vector of float)
+0:174 'inF0' (temp 3-component vector of float)
+0:175 face-forward (global 3-component vector of float)
+0:175 'inF0' (temp 3-component vector of float)
+0:175 'inF1' (temp 3-component vector of float)
+0:175 'inF2' (temp 3-component vector of float)
+0:176 findMSB (global int)
+0:176 Constant:
+0:176 7 (const int)
+0:177 findLSB (global int)
+0:177 Constant:
+0:177 7 (const int)
+0:178 Floor (global 3-component vector of float)
+0:178 'inF0' (temp 3-component vector of float)
+0:180 mod (global 3-component vector of float)
+0:180 'inF0' (temp 3-component vector of float)
+0:180 'inF1' (temp 3-component vector of float)
+0:181 Fraction (global 3-component vector of float)
+0:181 'inF0' (temp 3-component vector of float)
+0:182 frexp (global 3-component vector of float)
+0:182 'inF0' (temp 3-component vector of float)
+0:182 'inF1' (temp 3-component vector of float)
+0:183 fwidth (global 3-component vector of float)
+0:183 'inF0' (temp 3-component vector of float)
+0:184 isinf (global 3-component vector of bool)
+0:184 'inF0' (temp 3-component vector of float)
+0:185 isnan (global 3-component vector of bool)
+0:185 'inF0' (temp 3-component vector of float)
+0:186 ldexp (global 3-component vector of float)
+0:186 'inF0' (temp 3-component vector of float)
+0:186 'inF1' (temp 3-component vector of float)
+0:187 length (global float)
+0:187 'inF0' (temp 3-component vector of float)
+0:188 log (global 3-component vector of float)
+0:188 'inF0' (temp 3-component vector of float)
+0:189 vector-scale (temp 3-component vector of float)
+0:189 log2 (temp 3-component vector of float)
+0:189 'inF0' (temp 3-component vector of float)
+0:189 Constant:
+0:189 0.301030
+0:190 log2 (global 3-component vector of float)
+0:190 'inF0' (temp 3-component vector of float)
+0:191 max (global 3-component vector of float)
+0:191 'inF0' (temp 3-component vector of float)
+0:191 'inF1' (temp 3-component vector of float)
+0:192 min (global 3-component vector of float)
+0:192 'inF0' (temp 3-component vector of float)
+0:192 'inF1' (temp 3-component vector of float)
+0:193 normalize (global 3-component vector of float)
+0:193 'inF0' (temp 3-component vector of float)
+0:194 pow (global 3-component vector of float)
+0:194 'inF0' (temp 3-component vector of float)
+0:194 'inF1' (temp 3-component vector of float)
+0:195 radians (global 3-component vector of float)
+0:195 'inF0' (temp 3-component vector of float)
+0:196 divide (temp 3-component vector of float)
+0:196 Constant:
+0:196 1.000000
+0:196 'inF0' (temp 3-component vector of float)
+0:197 reflect (global 3-component vector of float)
+0:197 'inF0' (temp 3-component vector of float)
+0:197 'inF1' (temp 3-component vector of float)
+0:198 refract (global 3-component vector of float)
+0:198 'inF0' (temp 3-component vector of float)
+0:198 'inF1' (temp 3-component vector of float)
+0:198 Constant:
+0:198 2.000000
+0:? bitFieldReverse (global 3-component vector of uint)
+0:? Constant:
+0:? 1 (const uint)
+0:? 2 (const uint)
+0:? 3 (const uint)
+0:200 roundEven (global 3-component vector of float)
+0:200 'inF0' (temp 3-component vector of float)
+0:201 inverse sqrt (global 3-component vector of float)
+0:201 'inF0' (temp 3-component vector of float)
+0:202 clamp (global 3-component vector of float)
+0:202 'inF0' (temp 3-component vector of float)
+0:202 Constant:
+0:202 0.000000
+0:202 Constant:
+0:202 1.000000
+0:203 Sign (global 3-component vector of float)
+0:203 'inF0' (temp 3-component vector of float)
+0:204 sine (global 3-component vector of float)
+0:204 'inF0' (temp 3-component vector of float)
+0:205 Sequence
+0:205 move second child to first child (temp 3-component vector of float)
+0:205 'inF1' (temp 3-component vector of float)
+0:205 sine (temp 3-component vector of float)
+0:205 'inF0' (temp 3-component vector of float)
+0:205 move second child to first child (temp 3-component vector of float)
+0:205 'inF2' (temp 3-component vector of float)
+0:205 cosine (temp 3-component vector of float)
+0:205 'inF0' (temp 3-component vector of float)
+0:206 hyp. sine (global 3-component vector of float)
+0:206 'inF0' (temp 3-component vector of float)
+0:207 smoothstep (global 3-component vector of float)
+0:207 'inF0' (temp 3-component vector of float)
+0:207 'inF1' (temp 3-component vector of float)
+0:207 'inF2' (temp 3-component vector of float)
+0:208 sqrt (global 3-component vector of float)
+0:208 'inF0' (temp 3-component vector of float)
+0:209 step (global 3-component vector of float)
+0:209 'inF0' (temp 3-component vector of float)
+0:209 'inF1' (temp 3-component vector of float)
+0:210 tangent (global 3-component vector of float)
+0:210 'inF0' (temp 3-component vector of float)
+0:211 hyp. tangent (global 3-component vector of float)
+0:211 'inF0' (temp 3-component vector of float)
+0:213 trunc (global 3-component vector of float)
+0:213 'inF0' (temp 3-component vector of float)
+0:216 Branch: Return with expression
+0:? Constant:
+0:? 1.000000
+0:? 2.000000
+0:? 3.000000
+0:349 Function Definition: PixelShaderFunction(vf4;vf4;vf4; (temp 4-component vector of float)
+0:220 Function Parameters:
+0:220 'inF0' (temp 4-component vector of float)
+0:220 'inF1' (temp 4-component vector of float)
+0:220 'inF2' (temp 4-component vector of float)
+0:? Sequence
+0:221 all (global bool)
+0:221 'inF0' (temp 4-component vector of float)
+0:222 Absolute value (global 4-component vector of float)
+0:222 'inF0' (temp 4-component vector of float)
+0:223 arc cosine (global 4-component vector of float)
+0:223 'inF0' (temp 4-component vector of float)
+0:224 any (global bool)
+0:224 'inF0' (temp 4-component vector of float)
+0:225 arc sine (global 4-component vector of float)
+0:225 'inF0' (temp 4-component vector of float)
+0:226 arc tangent (global 4-component vector of float)
+0:226 'inF0' (temp 4-component vector of float)
+0:227 arc tangent (global 4-component vector of float)
+0:227 'inF0' (temp 4-component vector of float)
+0:227 'inF1' (temp 4-component vector of float)
+0:228 Ceiling (global 4-component vector of float)
+0:228 'inF0' (temp 4-component vector of float)
+0:229 clamp (global 4-component vector of float)
+0:229 'inF0' (temp 4-component vector of float)
+0:229 'inF1' (temp 4-component vector of float)
+0:229 'inF2' (temp 4-component vector of float)
+0:230 Test condition and select (temp void)
+0:230 Condition
+0:230 any (temp bool)
+0:230 Compare Less Than (temp 4-component vector of bool)
+0:230 'inF0' (temp 4-component vector of float)
+0:230 Constant:
+0:230 0.000000
+0:230 0.000000
+0:230 0.000000
+0:230 0.000000
+0:230 true case
+0:230 Branch: Kill
+0:231 cosine (global 4-component vector of float)
+0:231 'inF0' (temp 4-component vector of float)
+0:232 hyp. cosine (global 4-component vector of float)
+0:232 'inF0' (temp 4-component vector of float)
+0:? bitCount (global 4-component vector of uint)
+0:? Constant:
+0:? 7 (const uint)
+0:? 3 (const uint)
+0:? 5 (const uint)
+0:? 2 (const uint)
+0:234 dPdx (global 4-component vector of float)
+0:234 'inF0' (temp 4-component vector of float)
+0:235 dPdxCoarse (global 4-component vector of float)
+0:235 'inF0' (temp 4-component vector of float)
+0:236 dPdxFine (global 4-component vector of float)
+0:236 'inF0' (temp 4-component vector of float)
+0:237 dPdy (global 4-component vector of float)
+0:237 'inF0' (temp 4-component vector of float)
+0:238 dPdyCoarse (global 4-component vector of float)
+0:238 'inF0' (temp 4-component vector of float)
+0:239 dPdyFine (global 4-component vector of float)
+0:239 'inF0' (temp 4-component vector of float)
+0:240 degrees (global 4-component vector of float)
+0:240 'inF0' (temp 4-component vector of float)
+0:241 distance (global float)
+0:241 'inF0' (temp 4-component vector of float)
+0:241 'inF1' (temp 4-component vector of float)
+0:242 dot-product (global float)
+0:242 'inF0' (temp 4-component vector of float)
+0:242 'inF1' (temp 4-component vector of float)
+0:243 Construct vec4 (temp float)
+0:243 Constant:
+0:243 1.000000
+0:243 component-wise multiply (temp float)
+0:243 direct index (temp float)
+0:243 'inF0' (temp 4-component vector of float)
+0:243 Constant:
+0:243 1 (const int)
+0:243 direct index (temp float)
+0:243 'inF1' (temp 4-component vector of float)
+0:243 Constant:
+0:243 1 (const int)
+0:243 direct index (temp float)
+0:243 'inF0' (temp 4-component vector of float)
+0:243 Constant:
+0:243 2 (const int)
+0:243 direct index (temp float)
+0:243 'inF1' (temp 4-component vector of float)
+0:243 Constant:
+0:243 3 (const int)
+0:247 exp (global 4-component vector of float)
+0:247 'inF0' (temp 4-component vector of float)
+0:248 exp2 (global 4-component vector of float)
+0:248 'inF0' (temp 4-component vector of float)
+0:249 face-forward (global 4-component vector of float)
+0:249 'inF0' (temp 4-component vector of float)
+0:249 'inF1' (temp 4-component vector of float)
+0:249 'inF2' (temp 4-component vector of float)
+0:250 findMSB (global int)
+0:250 Constant:
+0:250 7 (const int)
+0:251 findLSB (global int)
+0:251 Constant:
+0:251 7 (const int)
+0:252 Floor (global 4-component vector of float)
+0:252 'inF0' (temp 4-component vector of float)
+0:254 mod (global 4-component vector of float)
+0:254 'inF0' (temp 4-component vector of float)
+0:254 'inF1' (temp 4-component vector of float)
+0:255 Fraction (global 4-component vector of float)
+0:255 'inF0' (temp 4-component vector of float)
+0:256 frexp (global 4-component vector of float)
+0:256 'inF0' (temp 4-component vector of float)
+0:256 'inF1' (temp 4-component vector of float)
+0:257 fwidth (global 4-component vector of float)
+0:257 'inF0' (temp 4-component vector of float)
+0:258 isinf (global 4-component vector of bool)
+0:258 'inF0' (temp 4-component vector of float)
+0:259 isnan (global 4-component vector of bool)
+0:259 'inF0' (temp 4-component vector of float)
+0:260 ldexp (global 4-component vector of float)
+0:260 'inF0' (temp 4-component vector of float)
+0:260 'inF1' (temp 4-component vector of float)
+0:261 length (global float)
+0:261 'inF0' (temp 4-component vector of float)
+0:262 log (global 4-component vector of float)
+0:262 'inF0' (temp 4-component vector of float)
+0:263 vector-scale (temp 4-component vector of float)
+0:263 log2 (temp 4-component vector of float)
+0:263 'inF0' (temp 4-component vector of float)
+0:263 Constant:
+0:263 0.301030
+0:264 log2 (global 4-component vector of float)
+0:264 'inF0' (temp 4-component vector of float)
+0:265 max (global 4-component vector of float)
+0:265 'inF0' (temp 4-component vector of float)
+0:265 'inF1' (temp 4-component vector of float)
+0:266 min (global 4-component vector of float)
+0:266 'inF0' (temp 4-component vector of float)
+0:266 'inF1' (temp 4-component vector of float)
+0:267 normalize (global 4-component vector of float)
+0:267 'inF0' (temp 4-component vector of float)
+0:268 pow (global 4-component vector of float)
+0:268 'inF0' (temp 4-component vector of float)
+0:268 'inF1' (temp 4-component vector of float)
+0:269 radians (global 4-component vector of float)
+0:269 'inF0' (temp 4-component vector of float)
+0:270 divide (temp 4-component vector of float)
+0:270 Constant:
+0:270 1.000000
+0:270 'inF0' (temp 4-component vector of float)
+0:271 reflect (global 4-component vector of float)
+0:271 'inF0' (temp 4-component vector of float)
+0:271 'inF1' (temp 4-component vector of float)
+0:272 refract (global 4-component vector of float)
+0:272 'inF0' (temp 4-component vector of float)
+0:272 'inF1' (temp 4-component vector of float)
+0:272 Constant:
+0:272 2.000000
+0:? bitFieldReverse (global 4-component vector of uint)
+0:? Constant:
+0:? 1 (const uint)
+0:? 2 (const uint)
+0:? 3 (const uint)
+0:? 4 (const uint)
+0:274 roundEven (global 4-component vector of float)
+0:274 'inF0' (temp 4-component vector of float)
+0:275 inverse sqrt (global 4-component vector of float)
+0:275 'inF0' (temp 4-component vector of float)
+0:276 clamp (global 4-component vector of float)
+0:276 'inF0' (temp 4-component vector of float)
+0:276 Constant:
+0:276 0.000000
+0:276 Constant:
+0:276 1.000000
+0:277 Sign (global 4-component vector of float)
+0:277 'inF0' (temp 4-component vector of float)
+0:278 sine (global 4-component vector of float)
+0:278 'inF0' (temp 4-component vector of float)
+0:279 Sequence
+0:279 move second child to first child (temp 4-component vector of float)
+0:279 'inF1' (temp 4-component vector of float)
+0:279 sine (temp 4-component vector of float)
+0:279 'inF0' (temp 4-component vector of float)
+0:279 move second child to first child (temp 4-component vector of float)
+0:279 'inF2' (temp 4-component vector of float)
+0:279 cosine (temp 4-component vector of float)
+0:279 'inF0' (temp 4-component vector of float)
+0:280 hyp. sine (global 4-component vector of float)
+0:280 'inF0' (temp 4-component vector of float)
+0:281 smoothstep (global 4-component vector of float)
+0:281 'inF0' (temp 4-component vector of float)
+0:281 'inF1' (temp 4-component vector of float)
+0:281 'inF2' (temp 4-component vector of float)
+0:282 sqrt (global 4-component vector of float)
+0:282 'inF0' (temp 4-component vector of float)
+0:283 step (global 4-component vector of float)
+0:283 'inF0' (temp 4-component vector of float)
+0:283 'inF1' (temp 4-component vector of float)
+0:284 tangent (global 4-component vector of float)
+0:284 'inF0' (temp 4-component vector of float)
+0:285 hyp. tangent (global 4-component vector of float)
+0:285 'inF0' (temp 4-component vector of float)
+0:287 trunc (global 4-component vector of float)
+0:287 'inF0' (temp 4-component vector of float)
+0:290 Branch: Return with expression
+0:? Constant:
+0:? 1.000000
+0:? 2.000000
+0:? 3.000000
+0:? 4.000000
+0:358 Function Definition: PixelShaderFunction(mf22;mf22;mf22; (temp 2X2 matrix of float)
+0:350 Function Parameters:
+0:350 'inF0' (temp 2X2 matrix of float)
+0:350 'inF1' (temp 2X2 matrix of float)
+0:350 'inF2' (temp 2X2 matrix of float)
+0:? Sequence
+0:352 all (global bool)
+0:352 'inF0' (temp 2X2 matrix of float)
+0:352 Absolute value (global 2X2 matrix of float)
+0:352 'inF0' (temp 2X2 matrix of float)
+0:352 arc cosine (global 2X2 matrix of float)
+0:352 'inF0' (temp 2X2 matrix of float)
+0:352 any (global bool)
+0:352 'inF0' (temp 2X2 matrix of float)
+0:352 arc sine (global 2X2 matrix of float)
+0:352 'inF0' (temp 2X2 matrix of float)
+0:352 arc tangent (global 2X2 matrix of float)
+0:352 'inF0' (temp 2X2 matrix of float)
+0:352 arc tangent (global 2X2 matrix of float)
+0:352 'inF0' (temp 2X2 matrix of float)
+0:352 'inF1' (temp 2X2 matrix of float)
+0:352 Ceiling (global 2X2 matrix of float)
+0:352 'inF0' (temp 2X2 matrix of float)
+0:352 Test condition and select (temp void)
+0:352 Condition
+0:352 any (temp bool)
+0:352 Compare Less Than (temp 2X2 matrix of bool)
+0:352 'inF0' (temp 2X2 matrix of float)
+0:352 Constant:
+0:352 0.000000
+0:352 0.000000
+0:352 0.000000
+0:352 0.000000
+0:352 true case
+0:352 Branch: Kill
+0:352 clamp (global 2X2 matrix of float)
+0:352 'inF0' (temp 2X2 matrix of float)
+0:352 'inF1' (temp 2X2 matrix of float)
+0:352 'inF2' (temp 2X2 matrix of float)
+0:352 cosine (global 2X2 matrix of float)
+0:352 'inF0' (temp 2X2 matrix of float)
+0:352 hyp. cosine (global 2X2 matrix of float)
+0:352 'inF0' (temp 2X2 matrix of float)
+0:352 dPdx (global 2X2 matrix of float)
+0:352 'inF0' (temp 2X2 matrix of float)
+0:352 dPdxCoarse (global 2X2 matrix of float)
+0:352 'inF0' (temp 2X2 matrix of float)
+0:352 dPdxFine (global 2X2 matrix of float)
+0:352 'inF0' (temp 2X2 matrix of float)
+0:352 dPdy (global 2X2 matrix of float)
+0:352 'inF0' (temp 2X2 matrix of float)
+0:352 dPdyCoarse (global 2X2 matrix of float)
+0:352 'inF0' (temp 2X2 matrix of float)
+0:352 dPdyFine (global 2X2 matrix of float)
+0:352 'inF0' (temp 2X2 matrix of float)
+0:352 degrees (global 2X2 matrix of float)
+0:352 'inF0' (temp 2X2 matrix of float)
+0:352 determinant (global float)
+0:352 'inF0' (temp 2X2 matrix of float)
+0:352 exp (global 2X2 matrix of float)
+0:352 'inF0' (temp 2X2 matrix of float)
+0:352 exp2 (global 2X2 matrix of float)
+0:352 'inF0' (temp 2X2 matrix of float)
+0:352 findMSB (global int)
+0:352 Constant:
+0:352 7 (const int)
+0:352 findLSB (global int)
+0:352 Constant:
+0:352 7 (const int)
+0:352 Floor (global 2X2 matrix of float)
+0:352 'inF0' (temp 2X2 matrix of float)
+0:352 mod (global 2X2 matrix of float)
+0:352 'inF0' (temp 2X2 matrix of float)
+0:352 'inF1' (temp 2X2 matrix of float)
+0:352 Fraction (global 2X2 matrix of float)
+0:352 'inF0' (temp 2X2 matrix of float)
+0:352 frexp (global 2X2 matrix of float)
+0:352 'inF0' (temp 2X2 matrix of float)
+0:352 'inF1' (temp 2X2 matrix of float)
+0:352 fwidth (global 2X2 matrix of float)
+0:352 'inF0' (temp 2X2 matrix of float)
+0:352 ldexp (global 2X2 matrix of float)
+0:352 'inF0' (temp 2X2 matrix of float)
+0:352 'inF1' (temp 2X2 matrix of float)
+0:352 log (global 2X2 matrix of float)
+0:352 'inF0' (temp 2X2 matrix of float)
+0:352 matrix-scale (temp 2X2 matrix of float)
+0:352 log2 (temp 2X2 matrix of float)
+0:352 'inF0' (temp 2X2 matrix of float)
+0:352 Constant:
+0:352 0.301030
+0:352 log2 (global 2X2 matrix of float)
+0:352 'inF0' (temp 2X2 matrix of float)
+0:352 max (global 2X2 matrix of float)
+0:352 'inF0' (temp 2X2 matrix of float)
+0:352 'inF1' (temp 2X2 matrix of float)
+0:352 min (global 2X2 matrix of float)
+0:352 'inF0' (temp 2X2 matrix of float)
+0:352 'inF1' (temp 2X2 matrix of float)
+0:352 pow (global 2X2 matrix of float)
+0:352 'inF0' (temp 2X2 matrix of float)
+0:352 'inF1' (temp 2X2 matrix of float)
+0:352 radians (global 2X2 matrix of float)
+0:352 'inF0' (temp 2X2 matrix of float)
+0:352 roundEven (global 2X2 matrix of float)
+0:352 'inF0' (temp 2X2 matrix of float)
+0:352 inverse sqrt (global 2X2 matrix of float)
+0:352 'inF0' (temp 2X2 matrix of float)
+0:352 clamp (global 2X2 matrix of float)
+0:352 'inF0' (temp 2X2 matrix of float)
+0:352 Constant:
+0:352 0.000000
+0:352 Constant:
+0:352 1.000000
+0:352 Sign (global 2X2 matrix of float)
+0:352 'inF0' (temp 2X2 matrix of float)
+0:352 sine (global 2X2 matrix of float)
+0:352 'inF0' (temp 2X2 matrix of float)
+0:352 Sequence
+0:352 move second child to first child (temp 2X2 matrix of float)
+0:352 'inF1' (temp 2X2 matrix of float)
+0:352 sine (temp 2X2 matrix of float)
+0:352 'inF0' (temp 2X2 matrix of float)
+0:352 move second child to first child (temp 2X2 matrix of float)
+0:352 'inF2' (temp 2X2 matrix of float)
+0:352 cosine (temp 2X2 matrix of float)
+0:352 'inF0' (temp 2X2 matrix of float)
+0:352 hyp. sine (global 2X2 matrix of float)
+0:352 'inF0' (temp 2X2 matrix of float)
+0:352 smoothstep (global 2X2 matrix of float)
+0:352 'inF0' (temp 2X2 matrix of float)
+0:352 'inF1' (temp 2X2 matrix of float)
+0:352 'inF2' (temp 2X2 matrix of float)
+0:352 sqrt (global 2X2 matrix of float)
+0:352 'inF0' (temp 2X2 matrix of float)
+0:352 step (global 2X2 matrix of float)
+0:352 'inF0' (temp 2X2 matrix of float)
+0:352 'inF1' (temp 2X2 matrix of float)
+0:352 tangent (global 2X2 matrix of float)
+0:352 'inF0' (temp 2X2 matrix of float)
+0:352 hyp. tangent (global 2X2 matrix of float)
+0:352 'inF0' (temp 2X2 matrix of float)
+0:352 transpose (global 2X2 matrix of float)
+0:352 'inF0' (temp 2X2 matrix of float)
+0:352 trunc (global 2X2 matrix of float)
+0:352 'inF0' (temp 2X2 matrix of float)
+0:355 Branch: Return with expression
+0:? Constant:
+0:? 2.000000
+0:? 2.000000
+0:? 2.000000
+0:? 2.000000
+0:367 Function Definition: PixelShaderFunction(mf33;mf33;mf33; (temp 3X3 matrix of float)
+0:359 Function Parameters:
+0:359 'inF0' (temp 3X3 matrix of float)
+0:359 'inF1' (temp 3X3 matrix of float)
+0:359 'inF2' (temp 3X3 matrix of float)
+0:? Sequence
+0:361 all (global bool)
+0:361 'inF0' (temp 3X3 matrix of float)
+0:361 Absolute value (global 3X3 matrix of float)
+0:361 'inF0' (temp 3X3 matrix of float)
+0:361 arc cosine (global 3X3 matrix of float)
+0:361 'inF0' (temp 3X3 matrix of float)
+0:361 any (global bool)
+0:361 'inF0' (temp 3X3 matrix of float)
+0:361 arc sine (global 3X3 matrix of float)
+0:361 'inF0' (temp 3X3 matrix of float)
+0:361 arc tangent (global 3X3 matrix of float)
+0:361 'inF0' (temp 3X3 matrix of float)
+0:361 arc tangent (global 3X3 matrix of float)
+0:361 'inF0' (temp 3X3 matrix of float)
+0:361 'inF1' (temp 3X3 matrix of float)
+0:361 Ceiling (global 3X3 matrix of float)
+0:361 'inF0' (temp 3X3 matrix of float)
+0:361 Test condition and select (temp void)
+0:361 Condition
+0:361 any (temp bool)
+0:361 Compare Less Than (temp 3X3 matrix of bool)
+0:361 'inF0' (temp 3X3 matrix of float)
+0:361 Constant:
+0:361 0.000000
+0:361 0.000000
+0:361 0.000000
+0:361 0.000000
+0:361 0.000000
+0:361 0.000000
+0:361 0.000000
+0:361 0.000000
+0:361 0.000000
+0:361 true case
+0:361 Branch: Kill
+0:361 clamp (global 3X3 matrix of float)
+0:361 'inF0' (temp 3X3 matrix of float)
+0:361 'inF1' (temp 3X3 matrix of float)
+0:361 'inF2' (temp 3X3 matrix of float)
+0:361 cosine (global 3X3 matrix of float)
+0:361 'inF0' (temp 3X3 matrix of float)
+0:361 hyp. cosine (global 3X3 matrix of float)
+0:361 'inF0' (temp 3X3 matrix of float)
+0:361 dPdx (global 3X3 matrix of float)
+0:361 'inF0' (temp 3X3 matrix of float)
+0:361 dPdxCoarse (global 3X3 matrix of float)
+0:361 'inF0' (temp 3X3 matrix of float)
+0:361 dPdxFine (global 3X3 matrix of float)
+0:361 'inF0' (temp 3X3 matrix of float)
+0:361 dPdy (global 3X3 matrix of float)
+0:361 'inF0' (temp 3X3 matrix of float)
+0:361 dPdyCoarse (global 3X3 matrix of float)
+0:361 'inF0' (temp 3X3 matrix of float)
+0:361 dPdyFine (global 3X3 matrix of float)
+0:361 'inF0' (temp 3X3 matrix of float)
+0:361 degrees (global 3X3 matrix of float)
+0:361 'inF0' (temp 3X3 matrix of float)
+0:361 determinant (global float)
+0:361 'inF0' (temp 3X3 matrix of float)
+0:361 exp (global 3X3 matrix of float)
+0:361 'inF0' (temp 3X3 matrix of float)
+0:361 exp2 (global 3X3 matrix of float)
+0:361 'inF0' (temp 3X3 matrix of float)
+0:361 findMSB (global int)
+0:361 Constant:
+0:361 7 (const int)
+0:361 findLSB (global int)
+0:361 Constant:
+0:361 7 (const int)
+0:361 Floor (global 3X3 matrix of float)
+0:361 'inF0' (temp 3X3 matrix of float)
+0:361 mod (global 3X3 matrix of float)
+0:361 'inF0' (temp 3X3 matrix of float)
+0:361 'inF1' (temp 3X3 matrix of float)
+0:361 Fraction (global 3X3 matrix of float)
+0:361 'inF0' (temp 3X3 matrix of float)
+0:361 frexp (global 3X3 matrix of float)
+0:361 'inF0' (temp 3X3 matrix of float)
+0:361 'inF1' (temp 3X3 matrix of float)
+0:361 fwidth (global 3X3 matrix of float)
+0:361 'inF0' (temp 3X3 matrix of float)
+0:361 ldexp (global 3X3 matrix of float)
+0:361 'inF0' (temp 3X3 matrix of float)
+0:361 'inF1' (temp 3X3 matrix of float)
+0:361 log (global 3X3 matrix of float)
+0:361 'inF0' (temp 3X3 matrix of float)
+0:361 matrix-scale (temp 3X3 matrix of float)
+0:361 log2 (temp 3X3 matrix of float)
+0:361 'inF0' (temp 3X3 matrix of float)
+0:361 Constant:
+0:361 0.301030
+0:361 log2 (global 3X3 matrix of float)
+0:361 'inF0' (temp 3X3 matrix of float)
+0:361 max (global 3X3 matrix of float)
+0:361 'inF0' (temp 3X3 matrix of float)
+0:361 'inF1' (temp 3X3 matrix of float)
+0:361 min (global 3X3 matrix of float)
+0:361 'inF0' (temp 3X3 matrix of float)
+0:361 'inF1' (temp 3X3 matrix of float)
+0:361 pow (global 3X3 matrix of float)
+0:361 'inF0' (temp 3X3 matrix of float)
+0:361 'inF1' (temp 3X3 matrix of float)
+0:361 radians (global 3X3 matrix of float)
+0:361 'inF0' (temp 3X3 matrix of float)
+0:361 roundEven (global 3X3 matrix of float)
+0:361 'inF0' (temp 3X3 matrix of float)
+0:361 inverse sqrt (global 3X3 matrix of float)
+0:361 'inF0' (temp 3X3 matrix of float)
+0:361 clamp (global 3X3 matrix of float)
+0:361 'inF0' (temp 3X3 matrix of float)
+0:361 Constant:
+0:361 0.000000
+0:361 Constant:
+0:361 1.000000
+0:361 Sign (global 3X3 matrix of float)
+0:361 'inF0' (temp 3X3 matrix of float)
+0:361 sine (global 3X3 matrix of float)
+0:361 'inF0' (temp 3X3 matrix of float)
+0:361 Sequence
+0:361 move second child to first child (temp 3X3 matrix of float)
+0:361 'inF1' (temp 3X3 matrix of float)
+0:361 sine (temp 3X3 matrix of float)
+0:361 'inF0' (temp 3X3 matrix of float)
+0:361 move second child to first child (temp 3X3 matrix of float)
+0:361 'inF2' (temp 3X3 matrix of float)
+0:361 cosine (temp 3X3 matrix of float)
+0:361 'inF0' (temp 3X3 matrix of float)
+0:361 hyp. sine (global 3X3 matrix of float)
+0:361 'inF0' (temp 3X3 matrix of float)
+0:361 smoothstep (global 3X3 matrix of float)
+0:361 'inF0' (temp 3X3 matrix of float)
+0:361 'inF1' (temp 3X3 matrix of float)
+0:361 'inF2' (temp 3X3 matrix of float)
+0:361 sqrt (global 3X3 matrix of float)
+0:361 'inF0' (temp 3X3 matrix of float)
+0:361 step (global 3X3 matrix of float)
+0:361 'inF0' (temp 3X3 matrix of float)
+0:361 'inF1' (temp 3X3 matrix of float)
+0:361 tangent (global 3X3 matrix of float)
+0:361 'inF0' (temp 3X3 matrix of float)
+0:361 hyp. tangent (global 3X3 matrix of float)
+0:361 'inF0' (temp 3X3 matrix of float)
+0:361 transpose (global 3X3 matrix of float)
+0:361 'inF0' (temp 3X3 matrix of float)
+0:361 trunc (global 3X3 matrix of float)
+0:361 'inF0' (temp 3X3 matrix of float)
+0:364 Branch: Return with expression
+0:? Constant:
+0:? 3.000000
+0:? 3.000000
+0:? 3.000000
+0:? 3.000000
+0:? 3.000000
+0:? 3.000000
+0:? 3.000000
+0:? 3.000000
+0:? 3.000000
+0:388 Function Definition: PixelShaderFunction(mf44;mf44;mf44; (temp 4X4 matrix of float)
+0:368 Function Parameters:
+0:368 'inF0' (temp 4X4 matrix of float)
+0:368 'inF1' (temp 4X4 matrix of float)
+0:368 'inF2' (temp 4X4 matrix of float)
+0:? Sequence
+0:370 all (global bool)
+0:370 'inF0' (temp 4X4 matrix of float)
+0:370 Absolute value (global 4X4 matrix of float)
+0:370 'inF0' (temp 4X4 matrix of float)
+0:370 arc cosine (global 4X4 matrix of float)
+0:370 'inF0' (temp 4X4 matrix of float)
+0:370 any (global bool)
+0:370 'inF0' (temp 4X4 matrix of float)
+0:370 arc sine (global 4X4 matrix of float)
+0:370 'inF0' (temp 4X4 matrix of float)
+0:370 arc tangent (global 4X4 matrix of float)
+0:370 'inF0' (temp 4X4 matrix of float)
+0:370 arc tangent (global 4X4 matrix of float)
+0:370 'inF0' (temp 4X4 matrix of float)
+0:370 'inF1' (temp 4X4 matrix of float)
+0:370 Ceiling (global 4X4 matrix of float)
+0:370 'inF0' (temp 4X4 matrix of float)
+0:370 Test condition and select (temp void)
+0:370 Condition
+0:370 any (temp bool)
+0:370 Compare Less Than (temp 4X4 matrix of bool)
+0:370 'inF0' (temp 4X4 matrix of float)
+0:370 Constant:
+0:370 0.000000
+0:370 0.000000
+0:370 0.000000
+0:370 0.000000
+0:370 0.000000
+0:370 0.000000
+0:370 0.000000
+0:370 0.000000
+0:370 0.000000
+0:370 0.000000
+0:370 0.000000
+0:370 0.000000
+0:370 0.000000
+0:370 0.000000
+0:370 0.000000
+0:370 0.000000
+0:370 true case
+0:370 Branch: Kill
+0:370 clamp (global 4X4 matrix of float)
+0:370 'inF0' (temp 4X4 matrix of float)
+0:370 'inF1' (temp 4X4 matrix of float)
+0:370 'inF2' (temp 4X4 matrix of float)
+0:370 cosine (global 4X4 matrix of float)
+0:370 'inF0' (temp 4X4 matrix of float)
+0:370 hyp. cosine (global 4X4 matrix of float)
+0:370 'inF0' (temp 4X4 matrix of float)
+0:370 dPdx (global 4X4 matrix of float)
+0:370 'inF0' (temp 4X4 matrix of float)
+0:370 dPdxCoarse (global 4X4 matrix of float)
+0:370 'inF0' (temp 4X4 matrix of float)
+0:370 dPdxFine (global 4X4 matrix of float)
+0:370 'inF0' (temp 4X4 matrix of float)
+0:370 dPdy (global 4X4 matrix of float)
+0:370 'inF0' (temp 4X4 matrix of float)
+0:370 dPdyCoarse (global 4X4 matrix of float)
+0:370 'inF0' (temp 4X4 matrix of float)
+0:370 dPdyFine (global 4X4 matrix of float)
+0:370 'inF0' (temp 4X4 matrix of float)
+0:370 degrees (global 4X4 matrix of float)
+0:370 'inF0' (temp 4X4 matrix of float)
+0:370 determinant (global float)
+0:370 'inF0' (temp 4X4 matrix of float)
+0:370 exp (global 4X4 matrix of float)
+0:370 'inF0' (temp 4X4 matrix of float)
+0:370 exp2 (global 4X4 matrix of float)
+0:370 'inF0' (temp 4X4 matrix of float)
+0:370 findMSB (global int)
+0:370 Constant:
+0:370 7 (const int)
+0:370 findLSB (global int)
+0:370 Constant:
+0:370 7 (const int)
+0:370 Floor (global 4X4 matrix of float)
+0:370 'inF0' (temp 4X4 matrix of float)
+0:370 mod (global 4X4 matrix of float)
+0:370 'inF0' (temp 4X4 matrix of float)
+0:370 'inF1' (temp 4X4 matrix of float)
+0:370 Fraction (global 4X4 matrix of float)
+0:370 'inF0' (temp 4X4 matrix of float)
+0:370 frexp (global 4X4 matrix of float)
+0:370 'inF0' (temp 4X4 matrix of float)
+0:370 'inF1' (temp 4X4 matrix of float)
+0:370 fwidth (global 4X4 matrix of float)
+0:370 'inF0' (temp 4X4 matrix of float)
+0:370 ldexp (global 4X4 matrix of float)
+0:370 'inF0' (temp 4X4 matrix of float)
+0:370 'inF1' (temp 4X4 matrix of float)
+0:370 log (global 4X4 matrix of float)
+0:370 'inF0' (temp 4X4 matrix of float)
+0:370 matrix-scale (temp 4X4 matrix of float)
+0:370 log2 (temp 4X4 matrix of float)
+0:370 'inF0' (temp 4X4 matrix of float)
+0:370 Constant:
+0:370 0.301030
+0:370 log2 (global 4X4 matrix of float)
+0:370 'inF0' (temp 4X4 matrix of float)
+0:370 max (global 4X4 matrix of float)
+0:370 'inF0' (temp 4X4 matrix of float)
+0:370 'inF1' (temp 4X4 matrix of float)
+0:370 min (global 4X4 matrix of float)
+0:370 'inF0' (temp 4X4 matrix of float)
+0:370 'inF1' (temp 4X4 matrix of float)
+0:370 pow (global 4X4 matrix of float)
+0:370 'inF0' (temp 4X4 matrix of float)
+0:370 'inF1' (temp 4X4 matrix of float)
+0:370 radians (global 4X4 matrix of float)
+0:370 'inF0' (temp 4X4 matrix of float)
+0:370 roundEven (global 4X4 matrix of float)
+0:370 'inF0' (temp 4X4 matrix of float)
+0:370 inverse sqrt (global 4X4 matrix of float)
+0:370 'inF0' (temp 4X4 matrix of float)
+0:370 clamp (global 4X4 matrix of float)
+0:370 'inF0' (temp 4X4 matrix of float)
+0:370 Constant:
+0:370 0.000000
+0:370 Constant:
+0:370 1.000000
+0:370 Sign (global 4X4 matrix of float)
+0:370 'inF0' (temp 4X4 matrix of float)
+0:370 sine (global 4X4 matrix of float)
+0:370 'inF0' (temp 4X4 matrix of float)
+0:370 Sequence
+0:370 move second child to first child (temp 4X4 matrix of float)
+0:370 'inF1' (temp 4X4 matrix of float)
+0:370 sine (temp 4X4 matrix of float)
+0:370 'inF0' (temp 4X4 matrix of float)
+0:370 move second child to first child (temp 4X4 matrix of float)
+0:370 'inF2' (temp 4X4 matrix of float)
+0:370 cosine (temp 4X4 matrix of float)
+0:370 'inF0' (temp 4X4 matrix of float)
+0:370 hyp. sine (global 4X4 matrix of float)
+0:370 'inF0' (temp 4X4 matrix of float)
+0:370 smoothstep (global 4X4 matrix of float)
+0:370 'inF0' (temp 4X4 matrix of float)
+0:370 'inF1' (temp 4X4 matrix of float)
+0:370 'inF2' (temp 4X4 matrix of float)
+0:370 sqrt (global 4X4 matrix of float)
+0:370 'inF0' (temp 4X4 matrix of float)
+0:370 step (global 4X4 matrix of float)
+0:370 'inF0' (temp 4X4 matrix of float)
+0:370 'inF1' (temp 4X4 matrix of float)
+0:370 tangent (global 4X4 matrix of float)
+0:370 'inF0' (temp 4X4 matrix of float)
+0:370 hyp. tangent (global 4X4 matrix of float)
+0:370 'inF0' (temp 4X4 matrix of float)
+0:370 transpose (global 4X4 matrix of float)
+0:370 'inF0' (temp 4X4 matrix of float)
+0:370 trunc (global 4X4 matrix of float)
+0:370 'inF0' (temp 4X4 matrix of float)
+0:373 Branch: Return with expression
+0:? Constant:
+0:? 4.000000
+0:? 4.000000
+0:? 4.000000
+0:? 4.000000
+0:? 4.000000
+0:? 4.000000
+0:? 4.000000
+0:? 4.000000
+0:? 4.000000
+0:? 4.000000
+0:? 4.000000
+0:? 4.000000
+0:? 4.000000
+0:? 4.000000
+0:? 4.000000
+0:? 4.000000
+0:395 Function Definition: TestGenMul(f1;f1;vf2;vf2;mf22;mf22; (temp void)
+0:391 Function Parameters:
+0:391 'inF0' (temp float)
+0:391 'inF1' (temp float)
+0:391 'inFV0' (temp 2-component vector of float)
+0:391 'inFV1' (temp 2-component vector of float)
+0:391 'inFM0' (temp 2X2 matrix of float)
+0:391 'inFM1' (temp 2X2 matrix of float)
+0:? Sequence
+0:392 move second child to first child (temp float)
+0:392 'r0' (temp float)
+0:392 component-wise multiply (temp float)
+0:392 'inF0' (temp float)
+0:392 'inF1' (temp float)
+0:392 move second child to first child (temp 2-component vector of float)
+0:392 'r1' (temp 2-component vector of float)
+0:392 vector-scale (temp 2-component vector of float)
+0:392 'inFV0' (temp 2-component vector of float)
+0:392 'inF0' (temp float)
+0:392 move second child to first child (temp 2-component vector of float)
+0:392 'r2' (temp 2-component vector of float)
+0:392 vector-scale (temp 2-component vector of float)
+0:392 'inF0' (temp float)
+0:392 'inFV0' (temp 2-component vector of float)
+0:392 move second child to first child (temp float)
+0:392 'r3' (temp float)
+0:392 dot-product (global float)
+0:392 'inFV0' (temp 2-component vector of float)
+0:392 'inFV1' (temp 2-component vector of float)
+0:392 move second child to first child (temp 2-component vector of float)
+0:392 'r4' (temp 2-component vector of float)
+0:392 matrix-times-vector (temp 2-component vector of float)
+0:392 'inFM0' (temp 2X2 matrix of float)
+0:392 'inFV0' (temp 2-component vector of float)
+0:392 move second child to first child (temp 2-component vector of float)
+0:392 'r5' (temp 2-component vector of float)
+0:392 vector-times-matrix (temp 2-component vector of float)
+0:392 'inFV0' (temp 2-component vector of float)
+0:392 'inFM0' (temp 2X2 matrix of float)
+0:392 move second child to first child (temp 2X2 matrix of float)
+0:392 'r6' (temp 2X2 matrix of float)
+0:392 matrix-scale (temp 2X2 matrix of float)
+0:392 'inFM0' (temp 2X2 matrix of float)
+0:392 'inF0' (temp float)
+0:392 move second child to first child (temp 2X2 matrix of float)
+0:392 'r7' (temp 2X2 matrix of float)
+0:392 matrix-scale (temp 2X2 matrix of float)
+0:392 'inF0' (temp float)
+0:392 'inFM0' (temp 2X2 matrix of float)
+0:392 move second child to first child (temp 2X2 matrix of float)
+0:392 'r8' (temp 2X2 matrix of float)
+0:392 matrix-multiply (temp 2X2 matrix of float)
+0:392 'inFM0' (temp 2X2 matrix of float)
+0:392 'inFM1' (temp 2X2 matrix of float)
+0:402 Function Definition: TestGenMul(f1;f1;vf3;vf3;mf33;mf33; (temp void)
+0:398 Function Parameters:
+0:398 'inF0' (temp float)
+0:398 'inF1' (temp float)
+0:398 'inFV0' (temp 3-component vector of float)
+0:398 'inFV1' (temp 3-component vector of float)
+0:398 'inFM0' (temp 3X3 matrix of float)
+0:398 'inFM1' (temp 3X3 matrix of float)
+0:? Sequence
+0:399 move second child to first child (temp float)
+0:399 'r0' (temp float)
+0:399 component-wise multiply (temp float)
+0:399 'inF0' (temp float)
+0:399 'inF1' (temp float)
+0:399 move second child to first child (temp 3-component vector of float)
+0:399 'r1' (temp 3-component vector of float)
+0:399 vector-scale (temp 3-component vector of float)
+0:399 'inFV0' (temp 3-component vector of float)
+0:399 'inF0' (temp float)
+0:399 move second child to first child (temp 3-component vector of float)
+0:399 'r2' (temp 3-component vector of float)
+0:399 vector-scale (temp 3-component vector of float)
+0:399 'inF0' (temp float)
+0:399 'inFV0' (temp 3-component vector of float)
+0:399 move second child to first child (temp float)
+0:399 'r3' (temp float)
+0:399 dot-product (global float)
+0:399 'inFV0' (temp 3-component vector of float)
+0:399 'inFV1' (temp 3-component vector of float)
+0:399 move second child to first child (temp 3-component vector of float)
+0:399 'r4' (temp 3-component vector of float)
+0:399 matrix-times-vector (temp 3-component vector of float)
+0:399 'inFM0' (temp 3X3 matrix of float)
+0:399 'inFV0' (temp 3-component vector of float)
+0:399 move second child to first child (temp 3-component vector of float)
+0:399 'r5' (temp 3-component vector of float)
+0:399 vector-times-matrix (temp 3-component vector of float)
+0:399 'inFV0' (temp 3-component vector of float)
+0:399 'inFM0' (temp 3X3 matrix of float)
+0:399 move second child to first child (temp 3X3 matrix of float)
+0:399 'r6' (temp 3X3 matrix of float)
+0:399 matrix-scale (temp 3X3 matrix of float)
+0:399 'inFM0' (temp 3X3 matrix of float)
+0:399 'inF0' (temp float)
+0:399 move second child to first child (temp 3X3 matrix of float)
+0:399 'r7' (temp 3X3 matrix of float)
+0:399 matrix-scale (temp 3X3 matrix of float)
+0:399 'inF0' (temp float)
+0:399 'inFM0' (temp 3X3 matrix of float)
+0:399 move second child to first child (temp 3X3 matrix of float)
+0:399 'r8' (temp 3X3 matrix of float)
+0:399 matrix-multiply (temp 3X3 matrix of float)
+0:399 'inFM0' (temp 3X3 matrix of float)
+0:399 'inFM1' (temp 3X3 matrix of float)
+0:408 Function Definition: TestGenMul(f1;f1;vf4;vf4;mf44;mf44; (temp void)
+0:405 Function Parameters:
+0:405 'inF0' (temp float)
+0:405 'inF1' (temp float)
+0:405 'inFV0' (temp 4-component vector of float)
+0:405 'inFV1' (temp 4-component vector of float)
+0:405 'inFM0' (temp 4X4 matrix of float)
+0:405 'inFM1' (temp 4X4 matrix of float)
+0:? Sequence
+0:406 move second child to first child (temp float)
+0:406 'r0' (temp float)
+0:406 component-wise multiply (temp float)
+0:406 'inF0' (temp float)
+0:406 'inF1' (temp float)
+0:406 move second child to first child (temp 4-component vector of float)
+0:406 'r1' (temp 4-component vector of float)
+0:406 vector-scale (temp 4-component vector of float)
+0:406 'inFV0' (temp 4-component vector of float)
+0:406 'inF0' (temp float)
+0:406 move second child to first child (temp 4-component vector of float)
+0:406 'r2' (temp 4-component vector of float)
+0:406 vector-scale (temp 4-component vector of float)
+0:406 'inF0' (temp float)
+0:406 'inFV0' (temp 4-component vector of float)
+0:406 move second child to first child (temp float)
+0:406 'r3' (temp float)
+0:406 dot-product (global float)
+0:406 'inFV0' (temp 4-component vector of float)
+0:406 'inFV1' (temp 4-component vector of float)
+0:406 move second child to first child (temp 4-component vector of float)
+0:406 'r4' (temp 4-component vector of float)
+0:406 matrix-times-vector (temp 4-component vector of float)
+0:406 'inFM0' (temp 4X4 matrix of float)
+0:406 'inFV0' (temp 4-component vector of float)
+0:406 move second child to first child (temp 4-component vector of float)
+0:406 'r5' (temp 4-component vector of float)
+0:406 vector-times-matrix (temp 4-component vector of float)
+0:406 'inFV0' (temp 4-component vector of float)
+0:406 'inFM0' (temp 4X4 matrix of float)
+0:406 move second child to first child (temp 4X4 matrix of float)
+0:406 'r6' (temp 4X4 matrix of float)
+0:406 matrix-scale (temp 4X4 matrix of float)
+0:406 'inFM0' (temp 4X4 matrix of float)
+0:406 'inF0' (temp float)
+0:406 move second child to first child (temp 4X4 matrix of float)
+0:406 'r7' (temp 4X4 matrix of float)
+0:406 matrix-scale (temp 4X4 matrix of float)
+0:406 'inF0' (temp float)
+0:406 'inFM0' (temp 4X4 matrix of float)
+0:406 move second child to first child (temp 4X4 matrix of float)
+0:406 'r8' (temp 4X4 matrix of float)
+0:406 matrix-multiply (temp 4X4 matrix of float)
+0:406 'inFM0' (temp 4X4 matrix of float)
+0:406 'inFM1' (temp 4X4 matrix of float)
+0:? Linker Objects
+
+// Module Version 10000
+// Generated by (magic number): 80001
+// Id's are bound by 1209
+
+ Capability Shader
+ Capability DerivativeControl
+ 1: ExtInstImport "GLSL.std.450"
+ MemoryModel Logical GLSL450
+ EntryPoint Fragment 4 "PixelShaderFunction"
+ ExecutionMode 4 OriginUpperLeft
+ Source HLSL 450
+ Name 4 "PixelShaderFunction"
+ Name 19 "TestGenMul(f1;f1;vf2;vf2;mf22;mf22;"
+ Name 13 "inF0"
+ Name 14 "inF1"
+ Name 15 "inFV0"
+ Name 16 "inFV1"
+ Name 17 "inFM0"
+ Name 18 "inFM1"
+ Name 32 "TestGenMul(f1;f1;vf3;vf3;mf33;mf33;"
+ Name 26 "inF0"
+ Name 27 "inF1"
+ Name 28 "inFV0"
+ Name 29 "inFV1"
+ Name 30 "inFM0"
+ Name 31 "inFM1"
+ Name 45 "TestGenMul(f1;f1;vf4;vf4;mf44;mf44;"
+ Name 39 "inF0"
+ Name 40 "inF1"
+ Name 41 "inFV0"
+ Name 42 "inFV1"
+ Name 43 "inFM0"
+ Name 44 "inFM1"
+ Name 47 "inF0"
+ Name 62 "inF1"
+ Name 69 "inF2"
+ Name 115 "ResType"
+ Name 185 "inF0"
+ Name 199 "inF1"
+ Name 206 "inF2"
+ Name 264 "ResType"
+ Name 347 "inF0"
+ Name 361 "inF1"
+ Name 368 "inF2"
+ Name 429 "ResType"
+ Name 511 "inF0"
+ Name 525 "inF1"
+ Name 532 "inF2"
+ Name 598 "ResType"
+ Name 681 "inF0"
+ Name 695 "inF1"
+ Name 710 "inF2"
+ Name 753 "ResType"
+ Name 818 "inF0"
+ Name 832 "inF1"
+ Name 847 "inF2"
+ Name 893 "ResType"
+ Name 958 "inF0"
+ Name 972 "inF1"
+ Name 987 "inF2"
+ Name 1036 "ResType"
+ Name 1101 "r0"
+ Name 1105 "r1"
+ Name 1109 "r2"
+ Name 1113 "r3"
+ Name 1117 "r4"
+ Name 1121 "r5"
+ Name 1125 "r6"
+ Name 1129 "r7"
+ Name 1133 "r8"
+ Name 1137 "r0"
+ Name 1141 "r1"
+ Name 1145 "r2"
+ Name 1149 "r3"
+ Name 1153 "r4"
+ Name 1157 "r5"
+ Name 1161 "r6"
+ Name 1165 "r7"
+ Name 1169 "r8"
+ Name 1173 "r0"
+ Name 1177 "r1"
+ Name 1181 "r2"
+ Name 1185 "r3"
+ Name 1189 "r4"
+ Name 1193 "r5"
+ Name 1197 "r6"
+ Name 1201 "r7"
+ Name 1205 "r8"
+ 2: TypeVoid
+ 3: TypeFunction 2
+ 6: TypeFloat 32
+ 7: TypePointer Function 6(float)
+ 8: TypeVector 6(float) 2
+ 9: TypePointer Function 8(fvec2)
+ 10: TypeMatrix 8(fvec2) 2
+ 11: TypePointer Function 10
+ 12: TypeFunction 2 7(ptr) 7(ptr) 9(ptr) 9(ptr) 11(ptr) 11(ptr)
+ 21: TypeVector 6(float) 3
+ 22: TypePointer Function 21(fvec3)
+ 23: TypeMatrix 21(fvec3) 3
+ 24: TypePointer Function 23
+ 25: TypeFunction 2 7(ptr) 7(ptr) 22(ptr) 22(ptr) 24(ptr) 24(ptr)
+ 34: TypeVector 6(float) 4
+ 35: TypePointer Function 34(fvec4)
+ 36: TypeMatrix 34(fvec4) 4
+ 37: TypePointer Function 36
+ 38: TypeFunction 2 7(ptr) 7(ptr) 35(ptr) 35(ptr) 37(ptr) 37(ptr)
+ 49: TypeBool
+ 73: 6(float) Constant 0
+ 82: TypeInt 32 0
+ 83: 82(int) Constant 7
+ 103: TypeInt 32 1
+ 104: 103(int) Constant 7
+ 115(ResType): TypeStruct 6(float) 103(int)
+ 132: 6(float) Constant 1050288283
+ 147: 6(float) Constant 1065353216
+ 150: 82(int) Constant 2
+ 210: 8(fvec2) ConstantComposite 73 73
+ 211: TypeVector 49(bool) 2
+ 221: TypeVector 82(int) 2
+ 222: 82(int) Constant 3
+ 223: 221(ivec2) ConstantComposite 83 222
+ 263: TypeVector 103(int) 2
+ 264(ResType): TypeStruct 8(fvec2) 263(ivec2)
+ 307: 6(float) Constant 1073741824
+ 309: 82(int) Constant 1
+ 310: 221(ivec2) ConstantComposite 309 150
+ 345: 8(fvec2) ConstantComposite 147 307
+ 372: 21(fvec3) ConstantComposite 73 73 73
+ 373: TypeVector 49(bool) 3
+ 383: TypeVector 82(int) 3
+ 384: 82(int) Constant 5
+ 385: 383(ivec3) ConstantComposite 83 222 384
+ 428: TypeVector 103(int) 3
+ 429(ResType): TypeStruct 21(fvec3) 428(ivec3)
+ 473: 383(ivec3) ConstantComposite 309 150 222
+ 508: 6(float) Constant 1077936128
+ 509: 21(fvec3) ConstantComposite 147 307 508
+ 536: 34(fvec4) ConstantComposite 73 73 73 73
+ 537: TypeVector 49(bool) 4
+ 547: TypeVector 82(int) 4
+ 548: 547(ivec4) ConstantComposite 83 222 384 150
+ 597: TypeVector 103(int) 4
+ 598(ResType): TypeStruct 34(fvec4) 597(ivec4)
+ 642: 82(int) Constant 4
+ 643: 547(ivec4) ConstantComposite 309 150 222 642
+ 678: 6(float) Constant 1082130432
+ 679: 34(fvec4) ConstantComposite 147 307 508 678
+ 701: 10 ConstantComposite 210 210
+ 702: TypeMatrix 211(bvec2) 2
+ 753(ResType): TypeStruct 10 263(ivec2)
+ 815: 8(fvec2) ConstantComposite 307 307
+ 816: 10 ConstantComposite 815 815
+ 838: 23 ConstantComposite 372 372 372
+ 839: TypeMatrix 373(bvec3) 3
+ 893(ResType): TypeStruct 23 428(ivec3)
+ 955: 21(fvec3) ConstantComposite 508 508 508
+ 956: 23 ConstantComposite 955 955 955
+ 978: 36 ConstantComposite 536 536 536 536
+ 979: TypeMatrix 537(bvec4) 4
+ 1036(ResType): TypeStruct 36 597(ivec4)
+ 1098: 34(fvec4) ConstantComposite 678 678 678 678
+ 1099: 36 ConstantComposite 1098 1098 1098 1098
+4(PixelShaderFunction): 2 Function None 3
+ 5: Label
+ 47(inF0): 7(ptr) Variable Function
+ 62(inF1): 7(ptr) Variable Function
+ 69(inF2): 7(ptr) Variable Function
+ 185(inF0): 9(ptr) Variable Function
+ 199(inF1): 9(ptr) Variable Function
+ 206(inF2): 9(ptr) Variable Function
+ 347(inF0): 22(ptr) Variable Function
+ 361(inF1): 22(ptr) Variable Function
+ 368(inF2): 22(ptr) Variable Function
+ 511(inF0): 35(ptr) Variable Function
+ 525(inF1): 35(ptr) Variable Function
+ 532(inF2): 35(ptr) Variable Function
+ 681(inF0): 11(ptr) Variable Function
+ 695(inF1): 11(ptr) Variable Function
+ 710(inF2): 11(ptr) Variable Function
+ 818(inF0): 24(ptr) Variable Function
+ 832(inF1): 24(ptr) Variable Function
+ 847(inF2): 24(ptr) Variable Function
+ 958(inF0): 37(ptr) Variable Function
+ 972(inF1): 37(ptr) Variable Function
+ 987(inF2): 37(ptr) Variable Function
+ 48: 6(float) Load 47(inF0)
+ 50: 49(bool) All 48
+ 51: 6(float) Load 47(inF0)
+ 52: 6(float) ExtInst 1(GLSL.std.450) 4(FAbs) 51
+ 53: 6(float) Load 47(inF0)
+ 54: 6(float) ExtInst 1(GLSL.std.450) 17(Acos) 53
+ 55: 6(float) Load 47(inF0)
+ 56: 49(bool) Any 55
+ 57: 6(float) Load 47(inF0)
+ 58: 6(float) ExtInst 1(GLSL.std.450) 16(Asin) 57
+ 59: 6(float) Load 47(inF0)
+ 60: 6(float) ExtInst 1(GLSL.std.450) 18(Atan) 59
+ 61: 6(float) Load 47(inF0)
+ 63: 6(float) Load 62(inF1)
+ 64: 6(float) ExtInst 1(GLSL.std.450) 25(Atan2) 61 63
+ 65: 6(float) Load 47(inF0)
+ 66: 6(float) ExtInst 1(GLSL.std.450) 9(Ceil) 65
+ 67: 6(float) Load 47(inF0)
+ 68: 6(float) Load 62(inF1)
+ 70: 6(float) Load 69(inF2)
+ 71: 6(float) ExtInst 1(GLSL.std.450) 43(FClamp) 67 68 70
+ 72: 6(float) Load 47(inF0)
+ 74: 49(bool) FOrdLessThan 72 73
+ SelectionMerge 76 None
+ BranchConditional 74 75 76
+ 75: Label
+ Kill
+ 76: Label
+ 78: 6(float) Load 47(inF0)
+ 79: 6(float) ExtInst 1(GLSL.std.450) 14(Cos) 78
+ 80: 6(float) Load 47(inF0)
+ 81: 6(float) ExtInst 1(GLSL.std.450) 20(Cosh) 80
+ 84: 82(int) BitCount 83
+ 85: 6(float) Load 47(inF0)
+ 86: 6(float) DPdx 85
+ 87: 6(float) Load 47(inF0)
+ 88: 6(float) DPdxCoarse 87
+ 89: 6(float) Load 47(inF0)
+ 90: 6(float) DPdxFine 89
+ 91: 6(float) Load 47(inF0)
+ 92: 6(float) DPdy 91
+ 93: 6(float) Load 47(inF0)
+ 94: 6(float) DPdyCoarse 93
+ 95: 6(float) Load 47(inF0)
+ 96: 6(float) DPdyFine 95
+ 97: 6(float) Load 47(inF0)
+ 98: 6(float) ExtInst 1(GLSL.std.450) 12(Degrees) 97
+ 99: 6(float) Load 47(inF0)
+ 100: 6(float) ExtInst 1(GLSL.std.450) 27(Exp) 99
+ 101: 6(float) Load 47(inF0)
+ 102: 6(float) ExtInst 1(GLSL.std.450) 29(Exp2) 101
+ 105: 103(int) ExtInst 1(GLSL.std.450) 74(FindSMsb) 104
+ 106: 103(int) ExtInst 1(GLSL.std.450) 73(FindILsb) 104
+ 107: 6(float) Load 47(inF0)
+ 108: 6(float) ExtInst 1(GLSL.std.450) 8(Floor) 107
+ 109: 6(float) Load 47(inF0)
+ 110: 6(float) Load 62(inF1)
+ 111: 6(float) FMod 109 110
+ 112: 6(float) Load 47(inF0)
+ 113: 6(float) ExtInst 1(GLSL.std.450) 10(Fract) 112
+ 114: 6(float) Load 47(inF0)
+ 116:115(ResType) ExtInst 1(GLSL.std.450) 52(FrexpStruct) 114
+ 117: 103(int) CompositeExtract 116 1
+ Store 62(inF1) 117
+ 118: 6(float) CompositeExtract 116 0
+ 119: 6(float) Load 47(inF0)
+ 120: 6(float) Fwidth 119
+ 121: 6(float) Load 47(inF0)
+ 122: 49(bool) IsInf 121
+ 123: 6(float) Load 47(inF0)
+ 124: 49(bool) IsNan 123
+ 125: 6(float) Load 47(inF0)
+ 126: 6(float) Load 62(inF1)
+ 127: 6(float) ExtInst 1(GLSL.std.450) 53(Ldexp) 125 126
+ 128: 6(float) Load 47(inF0)
+ 129: 6(float) ExtInst 1(GLSL.std.450) 28(Log) 128
+ 130: 6(float) Load 47(inF0)
+ 131: 6(float) ExtInst 1(GLSL.std.450) 30(Log2) 130
+ 133: 6(float) FMul 131 132
+ 134: 6(float) Load 47(inF0)
+ 135: 6(float) ExtInst 1(GLSL.std.450) 30(Log2) 134
+ 136: 6(float) Load 47(inF0)
+ 137: 6(float) Load 62(inF1)
+ 138: 6(float) ExtInst 1(GLSL.std.450) 40(FMax) 136 137
+ 139: 6(float) Load 47(inF0)
+ 140: 6(float) Load 62(inF1)
+ 141: 6(float) ExtInst 1(GLSL.std.450) 37(FMin) 139 140
+ 142: 6(float) Load 47(inF0)
+ 143: 6(float) Load 62(inF1)
+ 144: 6(float) ExtInst 1(GLSL.std.450) 26(Pow) 142 143
+ 145: 6(float) Load 47(inF0)
+ 146: 6(float) ExtInst 1(GLSL.std.450) 11(Radians) 145
+ 148: 6(float) Load 47(inF0)
+ 149: 6(float) FDiv 147 148
+ 151: 82(int) BitReverse 150
+ 152: 6(float) Load 47(inF0)
+ 153: 6(float) ExtInst 1(GLSL.std.450) 2(RoundEven) 152
+ 154: 6(float) Load 47(inF0)
+ 155: 6(float) ExtInst 1(GLSL.std.450) 32(InverseSqrt) 154
+ 156: 6(float) Load 47(inF0)
+ 157: 6(float) ExtInst 1(GLSL.std.450) 43(FClamp) 156 73 147
+ 158: 6(float) Load 47(inF0)
+ 159: 6(float) ExtInst 1(GLSL.std.450) 6(FSign) 158
+ 160: 6(float) Load 47(inF0)
+ 161: 6(float) ExtInst 1(GLSL.std.450) 13(Sin) 160
+ 162: 6(float) Load 47(inF0)
+ 163: 6(float) ExtInst 1(GLSL.std.450) 13(Sin) 162
+ Store 62(inF1) 163
+ 164: 6(float) Load 47(inF0)
+ 165: 6(float) ExtInst 1(GLSL.std.450) 14(Cos) 164
+ Store 69(inF2) 165
+ 166: 6(float) Load 47(inF0)
+ 167: 6(float) ExtInst 1(GLSL.std.450) 19(Sinh) 166
+ 168: 6(float) Load 47(inF0)
+ 169: 6(float) Load 62(inF1)
+ 170: 6(float) Load 69(inF2)
+ 171: 6(float) ExtInst 1(GLSL.std.450) 49(SmoothStep) 168 169 170
+ 172: 6(float) Load 47(inF0)
+ 173: 6(float) ExtInst 1(GLSL.std.450) 31(Sqrt) 172
+ 174: 6(float) Load 47(inF0)
+ 175: 6(float) Load 62(inF1)
+ 176: 6(float) ExtInst 1(GLSL.std.450) 48(Step) 174 175
+ 177: 6(float) Load 47(inF0)
+ 178: 6(float) ExtInst 1(GLSL.std.450) 15(Tan) 177
+ 179: 6(float) Load 47(inF0)
+ 180: 6(float) ExtInst 1(GLSL.std.450) 21(Tanh) 179
+ 181: 6(float) Load 47(inF0)
+ 182: 6(float) ExtInst 1(GLSL.std.450) 3(Trunc) 181
+ ReturnValue 73
+ FunctionEnd
+19(TestGenMul(f1;f1;vf2;vf2;mf22;mf22;): 2 Function None 12
+ 13(inF0): 7(ptr) FunctionParameter
+ 14(inF1): 7(ptr) FunctionParameter
+ 15(inFV0): 9(ptr) FunctionParameter
+ 16(inFV1): 9(ptr) FunctionParameter
+ 17(inFM0): 11(ptr) FunctionParameter
+ 18(inFM1): 11(ptr) FunctionParameter
+ 20: Label
+ 1101(r0): 7(ptr) Variable Function
+ 1105(r1): 9(ptr) Variable Function
+ 1109(r2): 9(ptr) Variable Function
+ 1113(r3): 7(ptr) Variable Function
+ 1117(r4): 9(ptr) Variable Function
+ 1121(r5): 9(ptr) Variable Function
+ 1125(r6): 11(ptr) Variable Function
+ 1129(r7): 11(ptr) Variable Function
+ 1133(r8): 11(ptr) Variable Function
+ 1102: 6(float) Load 13(inF0)
+ 1103: 6(float) Load 14(inF1)
+ 1104: 6(float) FMul 1102 1103
+ Store 1101(r0) 1104
+ 1106: 8(fvec2) Load 15(inFV0)
+ 1107: 6(float) Load 13(inF0)
+ 1108: 8(fvec2) VectorTimesScalar 1106 1107
+ Store 1105(r1) 1108
+ 1110: 6(float) Load 13(inF0)
+ 1111: 8(fvec2) Load 15(inFV0)
+ 1112: 8(fvec2) VectorTimesScalar 1111 1110
+ Store 1109(r2) 1112
+ 1114: 8(fvec2) Load 15(inFV0)
+ 1115: 8(fvec2) Load 16(inFV1)
+ 1116: 6(float) Dot 1114 1115
+ Store 1113(r3) 1116
+ 1118: 10 Load 17(inFM0)
+ 1119: 8(fvec2) Load 15(inFV0)
+ 1120: 8(fvec2) MatrixTimesVector 1118 1119
+ Store 1117(r4) 1120
+ 1122: 8(fvec2) Load 15(inFV0)
+ 1123: 10 Load 17(inFM0)
+ 1124: 8(fvec2) VectorTimesMatrix 1122 1123
+ Store 1121(r5) 1124
+ 1126: 10 Load 17(inFM0)
+ 1127: 6(float) Load 13(inF0)
+ 1128: 10 MatrixTimesScalar 1126 1127
+ Store 1125(r6) 1128
+ 1130: 6(float) Load 13(inF0)
+ 1131: 10 Load 17(inFM0)
+ 1132: 10 MatrixTimesScalar 1131 1130
+ Store 1129(r7) 1132
+ 1134: 10 Load 17(inFM0)
+ 1135: 10 Load 18(inFM1)
+ 1136: 10 MatrixTimesMatrix 1134 1135
+ Store 1133(r8) 1136
+ Return
+ FunctionEnd
+32(TestGenMul(f1;f1;vf3;vf3;mf33;mf33;): 2 Function None 25
+ 26(inF0): 7(ptr) FunctionParameter
+ 27(inF1): 7(ptr) FunctionParameter
+ 28(inFV0): 22(ptr) FunctionParameter
+ 29(inFV1): 22(ptr) FunctionParameter
+ 30(inFM0): 24(ptr) FunctionParameter
+ 31(inFM1): 24(ptr) FunctionParameter
+ 33: Label
+ 1137(r0): 7(ptr) Variable Function
+ 1141(r1): 22(ptr) Variable Function
+ 1145(r2): 22(ptr) Variable Function
+ 1149(r3): 7(ptr) Variable Function
+ 1153(r4): 22(ptr) Variable Function
+ 1157(r5): 22(ptr) Variable Function
+ 1161(r6): 24(ptr) Variable Function
+ 1165(r7): 24(ptr) Variable Function
+ 1169(r8): 24(ptr) Variable Function
+ 1138: 6(float) Load 26(inF0)
+ 1139: 6(float) Load 27(inF1)
+ 1140: 6(float) FMul 1138 1139
+ Store 1137(r0) 1140
+ 1142: 21(fvec3) Load 28(inFV0)
+ 1143: 6(float) Load 26(inF0)
+ 1144: 21(fvec3) VectorTimesScalar 1142 1143
+ Store 1141(r1) 1144
+ 1146: 6(float) Load 26(inF0)
+ 1147: 21(fvec3) Load 28(inFV0)
+ 1148: 21(fvec3) VectorTimesScalar 1147 1146
+ Store 1145(r2) 1148
+ 1150: 21(fvec3) Load 28(inFV0)
+ 1151: 21(fvec3) Load 29(inFV1)
+ 1152: 6(float) Dot 1150 1151
+ Store 1149(r3) 1152
+ 1154: 23 Load 30(inFM0)
+ 1155: 21(fvec3) Load 28(inFV0)
+ 1156: 21(fvec3) MatrixTimesVector 1154 1155
+ Store 1153(r4) 1156
+ 1158: 21(fvec3) Load 28(inFV0)
+ 1159: 23 Load 30(inFM0)
+ 1160: 21(fvec3) VectorTimesMatrix 1158 1159
+ Store 1157(r5) 1160
+ 1162: 23 Load 30(inFM0)
+ 1163: 6(float) Load 26(inF0)
+ 1164: 23 MatrixTimesScalar 1162 1163
+ Store 1161(r6) 1164
+ 1166: 6(float) Load 26(inF0)
+ 1167: 23 Load 30(inFM0)
+ 1168: 23 MatrixTimesScalar 1167 1166
+ Store 1165(r7) 1168
+ 1170: 23 Load 30(inFM0)
+ 1171: 23 Load 31(inFM1)
+ 1172: 23 MatrixTimesMatrix 1170 1171
+ Store 1169(r8) 1172
+ Return
+ FunctionEnd
+45(TestGenMul(f1;f1;vf4;vf4;mf44;mf44;): 2 Function None 38
+ 39(inF0): 7(ptr) FunctionParameter
+ 40(inF1): 7(ptr) FunctionParameter
+ 41(inFV0): 35(ptr) FunctionParameter
+ 42(inFV1): 35(ptr) FunctionParameter
+ 43(inFM0): 37(ptr) FunctionParameter
+ 44(inFM1): 37(ptr) FunctionParameter
+ 46: Label
+ 1173(r0): 7(ptr) Variable Function
+ 1177(r1): 35(ptr) Variable Function
+ 1181(r2): 35(ptr) Variable Function
+ 1185(r3): 7(ptr) Variable Function
+ 1189(r4): 35(ptr) Variable Function
+ 1193(r5): 35(ptr) Variable Function
+ 1197(r6): 37(ptr) Variable Function
+ 1201(r7): 37(ptr) Variable Function
+ 1205(r8): 37(ptr) Variable Function
+ 1174: 6(float) Load 39(inF0)
+ 1175: 6(float) Load 40(inF1)
+ 1176: 6(float) FMul 1174 1175
+ Store 1173(r0) 1176
+ 1178: 34(fvec4) Load 41(inFV0)
+ 1179: 6(float) Load 39(inF0)
+ 1180: 34(fvec4) VectorTimesScalar 1178 1179
+ Store 1177(r1) 1180
+ 1182: 6(float) Load 39(inF0)
+ 1183: 34(fvec4) Load 41(inFV0)
+ 1184: 34(fvec4) VectorTimesScalar 1183 1182
+ Store 1181(r2) 1184
+ 1186: 34(fvec4) Load 41(inFV0)
+ 1187: 34(fvec4) Load 42(inFV1)
+ 1188: 6(float) Dot 1186 1187
+ Store 1185(r3) 1188
+ 1190: 36 Load 43(inFM0)
+ 1191: 34(fvec4) Load 41(inFV0)
+ 1192: 34(fvec4) MatrixTimesVector 1190 1191
+ Store 1189(r4) 1192
+ 1194: 34(fvec4) Load 41(inFV0)
+ 1195: 36 Load 43(inFM0)
+ 1196: 34(fvec4) VectorTimesMatrix 1194 1195
+ Store 1193(r5) 1196
+ 1198: 36 Load 43(inFM0)
+ 1199: 6(float) Load 39(inF0)
+ 1200: 36 MatrixTimesScalar 1198 1199
+ Store 1197(r6) 1200
+ 1202: 6(float) Load 39(inF0)
+ 1203: 36 Load 43(inFM0)
+ 1204: 36 MatrixTimesScalar 1203 1202
+ Store 1201(r7) 1204
+ 1206: 36 Load 43(inFM0)
+ 1207: 36 Load 44(inFM1)
+ 1208: 36 MatrixTimesMatrix 1206 1207
+ Store 1205(r8) 1208
+ Return
+ FunctionEnd
diff --git a/chromium/third_party/glslang/src/Test/baseResults/hlsl.intrinsics.negative.frag.out b/chromium/third_party/glslang/src/Test/baseResults/hlsl.intrinsics.negative.frag.out
new file mode 100644
index 00000000000..d1f9b429b4b
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/hlsl.intrinsics.negative.frag.out
@@ -0,0 +1,702 @@
+hlsl.intrinsics.negative.frag
+ERROR: 0:5: 'asdouble' : no matching overloaded function found
+ERROR: 0:6: 'CheckAccessFullyMapped' : no matching overloaded function found
+ERROR: 0:7: 'countbits' : no matching overloaded function found
+ERROR: 0:8: 'cross' : no matching overloaded function found
+ERROR: 0:9: 'D3DCOLORtoUBYTE4' : no matching overloaded function found
+ERROR: 0:10: 'determinant' : no matching overloaded function found
+ERROR: 0:12: 'f16tof32' : no matching overloaded function found
+ERROR: 0:13: 'firstbithigh' : no matching overloaded function found
+ERROR: 0:14: 'firstbitlow' : no matching overloaded function found
+ERROR: 0:15: 'fma' : no matching overloaded function found
+ERROR: 0:23: 'length' : no matching overloaded function found
+ERROR: 0:24: 'msad4' : no matching overloaded function found
+ERROR: 0:25: 'normalize' : no matching overloaded function found
+ERROR: 0:26: 'reflect' : no matching overloaded function found
+ERROR: 0:27: 'refract' : no matching overloaded function found
+ERROR: 0:28: 'refract' : no matching overloaded function found
+ERROR: 0:29: 'reversebits' : no matching overloaded function found
+ERROR: 0:30: 'transpose' : no matching overloaded function found
+ERROR: 0:39: 'GetRenderTargetSamplePosition' : no matching overloaded function found
+ERROR: 0:46: 'asdouble' : no matching overloaded function found
+ERROR: 0:47: 'CheckAccessFullyMapped' : no matching overloaded function found
+ERROR: 0:48: 'countbits' : no matching overloaded function found
+ERROR: 0:49: 'cross' : no matching overloaded function found
+ERROR: 0:50: 'D3DCOLORtoUBYTE4' : no matching overloaded function found
+ERROR: 0:51: 'determinant' : no matching overloaded function found
+ERROR: 0:52: 'f16tof32' : no matching overloaded function found
+ERROR: 0:53: 'firstbithigh' : no matching overloaded function found
+ERROR: 0:54: 'firstbitlow' : no matching overloaded function found
+ERROR: 0:55: 'fma' : no matching overloaded function found
+ERROR: 0:56: 'reversebits' : no matching overloaded function found
+ERROR: 0:57: 'transpose' : no matching overloaded function found
+ERROR: 0:64: 'CheckAccessFullyMapped' : no matching overloaded function found
+ERROR: 0:65: 'countbits' : no matching overloaded function found
+ERROR: 0:66: 'D3DCOLORtoUBYTE4' : no matching overloaded function found
+ERROR: 0:67: 'determinant' : no matching overloaded function found
+ERROR: 0:68: 'f16tof32' : no matching overloaded function found
+ERROR: 0:69: 'firstbithigh' : no matching overloaded function found
+ERROR: 0:70: 'firstbitlow' : no matching overloaded function found
+ERROR: 0:71: 'fma' : no matching overloaded function found
+ERROR: 0:72: 'reversebits' : no matching overloaded function found
+ERROR: 0:73: 'transpose' : no matching overloaded function found
+ERROR: 0:81: 'CheckAccessFullyMapped' : no matching overloaded function found
+ERROR: 0:82: 'countbits' : no matching overloaded function found
+ERROR: 0:83: 'cross' : no matching overloaded function found
+ERROR: 0:84: 'determinant' : no matching overloaded function found
+ERROR: 0:85: 'f16tof32' : no matching overloaded function found
+ERROR: 0:86: 'firstbithigh' : no matching overloaded function found
+ERROR: 0:87: 'firstbitlow' : no matching overloaded function found
+ERROR: 0:88: 'fma' : no matching overloaded function found
+ERROR: 0:89: 'reversebits' : no matching overloaded function found
+ERROR: 0:90: 'transpose' : no matching overloaded function found
+ERROR: 0:118: 'countbits' : no matching overloaded function found
+ERROR: 0:118: 'D3DCOLORtoUBYTE4' : no matching overloaded function found
+ERROR: 0:118: 'cross' : no matching overloaded function found
+ERROR: 0:118: 'f16tof32' : no matching overloaded function found
+ERROR: 0:118: 'firstbithigh' : no matching overloaded function found
+ERROR: 0:118: 'firstbitlow' : no matching overloaded function found
+ERROR: 0:118: 'fma' : no matching overloaded function found
+ERROR: 0:118: 'reversebits' : no matching overloaded function found
+ERROR: 0:118: 'length' : no matching overloaded function found
+ERROR: 0:118: 'noise' : no matching overloaded function found
+ERROR: 0:118: 'normalize' : no matching overloaded function found
+ERROR: 0:118: 'reflect' : no matching overloaded function found
+ERROR: 0:118: 'refract' : no matching overloaded function found
+ERROR: 0:118: 'reversebits' : no matching overloaded function found
+ERROR: 0:126: 'countbits' : no matching overloaded function found
+ERROR: 0:126: 'D3DCOLORtoUBYTE4' : no matching overloaded function found
+ERROR: 0:126: 'cross' : no matching overloaded function found
+ERROR: 0:126: 'f16tof32' : no matching overloaded function found
+ERROR: 0:126: 'firstbithigh' : no matching overloaded function found
+ERROR: 0:126: 'firstbitlow' : no matching overloaded function found
+ERROR: 0:126: 'fma' : no matching overloaded function found
+ERROR: 0:126: 'reversebits' : no matching overloaded function found
+ERROR: 0:126: 'length' : no matching overloaded function found
+ERROR: 0:126: 'noise' : no matching overloaded function found
+ERROR: 0:126: 'normalize' : no matching overloaded function found
+ERROR: 0:126: 'reflect' : no matching overloaded function found
+ERROR: 0:126: 'refract' : no matching overloaded function found
+ERROR: 0:126: 'reversebits' : no matching overloaded function found
+ERROR: 0:134: 'countbits' : no matching overloaded function found
+ERROR: 0:134: 'D3DCOLORtoUBYTE4' : no matching overloaded function found
+ERROR: 0:134: 'cross' : no matching overloaded function found
+ERROR: 0:134: 'f16tof32' : no matching overloaded function found
+ERROR: 0:134: 'firstbithigh' : no matching overloaded function found
+ERROR: 0:134: 'firstbitlow' : no matching overloaded function found
+ERROR: 0:134: 'fma' : no matching overloaded function found
+ERROR: 0:134: 'reversebits' : no matching overloaded function found
+ERROR: 0:134: 'length' : no matching overloaded function found
+ERROR: 0:134: 'noise' : no matching overloaded function found
+ERROR: 0:134: 'normalize' : no matching overloaded function found
+ERROR: 0:134: 'reflect' : no matching overloaded function found
+ERROR: 0:134: 'refract' : no matching overloaded function found
+ERROR: 0:134: 'reversebits' : no matching overloaded function found
+ERROR: 93 compilation errors. No code generated.
+
+
+Shader version: 450
+gl_FragCoord origin is upper left
+ERROR: node is still EOpNull!
+0:35 Function Definition: PixelShaderFunction(f1;f1;f1;i1; (temp float)
+0:2 Function Parameters:
+0:2 'inF0' (temp float)
+0:2 'inF1' (temp float)
+0:2 'inF2' (temp float)
+0:2 'inI0' (temp int)
+0:? Sequence
+0:5 Constant:
+0:5 0.000000
+0:6 Constant:
+0:6 0.000000
+0:7 Constant:
+0:7 0.000000
+0:8 Constant:
+0:8 0.000000
+0:9 Constant:
+0:9 0.000000
+0:10 Constant:
+0:10 0.000000
+0:12 Constant:
+0:12 0.000000
+0:13 Constant:
+0:13 0.000000
+0:14 Constant:
+0:14 0.000000
+0:15 Constant:
+0:15 0.000000
+0:23 Constant:
+0:23 0.000000
+0:24 Constant:
+0:24 0.000000
+0:25 Constant:
+0:25 0.000000
+0:26 Constant:
+0:26 0.000000
+0:27 Constant:
+0:27 0.000000
+0:28 Constant:
+0:28 0.000000
+0:29 Constant:
+0:29 0.000000
+0:30 Constant:
+0:30 0.000000
+0:32 Branch: Return with expression
+0:32 Constant:
+0:32 0.000000
+0:44 Function Definition: PixelShaderFunction(vf1;vf1;vf1;vi1; (temp 1-component vector of float)
+0:36 Function Parameters:
+0:36 'inF0' (temp 1-component vector of float)
+0:36 'inF1' (temp 1-component vector of float)
+0:36 'inF2' (temp 1-component vector of float)
+0:36 'inI0' (temp 1-component vector of int)
+0:? Sequence
+0:39 Constant:
+0:39 0.000000
+0:41 Branch: Return with expression
+0:41 Constant:
+0:41 0.000000
+0:62 Function Definition: PixelShaderFunction(vf2;vf2;vf2;vi2; (temp 2-component vector of float)
+0:45 Function Parameters:
+0:45 'inF0' (temp 2-component vector of float)
+0:45 'inF1' (temp 2-component vector of float)
+0:45 'inF2' (temp 2-component vector of float)
+0:45 'inI0' (temp 2-component vector of int)
+0:? Sequence
+0:46 Constant:
+0:46 0.000000
+0:47 Constant:
+0:47 0.000000
+0:48 Constant:
+0:48 0.000000
+0:49 Constant:
+0:49 0.000000
+0:50 Constant:
+0:50 0.000000
+0:51 Constant:
+0:51 0.000000
+0:52 Constant:
+0:52 0.000000
+0:53 Constant:
+0:53 0.000000
+0:54 Constant:
+0:54 0.000000
+0:55 Constant:
+0:55 0.000000
+0:56 Constant:
+0:56 0.000000
+0:57 Constant:
+0:57 0.000000
+0:59 Branch: Return with expression
+0:? Constant:
+0:? 1.000000
+0:? 2.000000
+0:79 Function Definition: PixelShaderFunction(vf3;vf3;vf3;vi3; (temp 3-component vector of float)
+0:63 Function Parameters:
+0:63 'inF0' (temp 3-component vector of float)
+0:63 'inF1' (temp 3-component vector of float)
+0:63 'inF2' (temp 3-component vector of float)
+0:63 'inI0' (temp 3-component vector of int)
+0:? Sequence
+0:64 Constant:
+0:64 0.000000
+0:65 Constant:
+0:65 0.000000
+0:66 Constant:
+0:66 0.000000
+0:67 Constant:
+0:67 0.000000
+0:68 Constant:
+0:68 0.000000
+0:69 Constant:
+0:69 0.000000
+0:70 Constant:
+0:70 0.000000
+0:71 Constant:
+0:71 0.000000
+0:72 Constant:
+0:72 0.000000
+0:73 Constant:
+0:73 0.000000
+0:76 Branch: Return with expression
+0:? Constant:
+0:? 1.000000
+0:? 2.000000
+0:? 3.000000
+0:115 Function Definition: PixelShaderFunction(vf4;vf4;vf4;vi4; (temp 4-component vector of float)
+0:80 Function Parameters:
+0:80 'inF0' (temp 4-component vector of float)
+0:80 'inF1' (temp 4-component vector of float)
+0:80 'inF2' (temp 4-component vector of float)
+0:80 'inI0' (temp 4-component vector of int)
+0:? Sequence
+0:81 Constant:
+0:81 0.000000
+0:82 Constant:
+0:82 0.000000
+0:83 Constant:
+0:83 0.000000
+0:84 Constant:
+0:84 0.000000
+0:85 Constant:
+0:85 0.000000
+0:86 Constant:
+0:86 0.000000
+0:87 Constant:
+0:87 0.000000
+0:88 Constant:
+0:88 0.000000
+0:89 Constant:
+0:89 0.000000
+0:90 Constant:
+0:90 0.000000
+0:92 Branch: Return with expression
+0:? Constant:
+0:? 1.000000
+0:? 2.000000
+0:? 3.000000
+0:? 4.000000
+0:123 Function Definition: PixelShaderFunction(mf22;mf22;mf22; (temp 2X2 matrix of float)
+0:116 Function Parameters:
+0:116 'inF0' (temp 2X2 matrix of float)
+0:116 'inF1' (temp 2X2 matrix of float)
+0:116 'inF2' (temp 2X2 matrix of float)
+0:? Sequence
+0:118 Constant:
+0:118 0.000000
+0:118 Constant:
+0:118 0.000000
+0:118 Constant:
+0:118 0.000000
+0:118 Constant:
+0:118 0.000000
+0:118 Constant:
+0:118 0.000000
+0:118 Constant:
+0:118 0.000000
+0:118 Constant:
+0:118 0.000000
+0:118 Constant:
+0:118 0.000000
+0:118 Constant:
+0:118 0.000000
+0:118 Constant:
+0:118 0.000000
+0:118 Constant:
+0:118 0.000000
+0:118 Constant:
+0:118 0.000000
+0:118 Constant:
+0:118 0.000000
+0:118 Constant:
+0:118 0.000000
+0:120 Branch: Return with expression
+0:? Constant:
+0:? 2.000000
+0:? 2.000000
+0:? 2.000000
+0:? 2.000000
+0:131 Function Definition: PixelShaderFunction(mf33;mf33;mf33; (temp 3X3 matrix of float)
+0:124 Function Parameters:
+0:124 'inF0' (temp 3X3 matrix of float)
+0:124 'inF1' (temp 3X3 matrix of float)
+0:124 'inF2' (temp 3X3 matrix of float)
+0:? Sequence
+0:126 Constant:
+0:126 0.000000
+0:126 Constant:
+0:126 0.000000
+0:126 Constant:
+0:126 0.000000
+0:126 Constant:
+0:126 0.000000
+0:126 Constant:
+0:126 0.000000
+0:126 Constant:
+0:126 0.000000
+0:126 Constant:
+0:126 0.000000
+0:126 Constant:
+0:126 0.000000
+0:126 Constant:
+0:126 0.000000
+0:126 Constant:
+0:126 0.000000
+0:126 Constant:
+0:126 0.000000
+0:126 Constant:
+0:126 0.000000
+0:126 Constant:
+0:126 0.000000
+0:126 Constant:
+0:126 0.000000
+0:128 Branch: Return with expression
+0:? Constant:
+0:? 3.000000
+0:? 3.000000
+0:? 3.000000
+0:? 3.000000
+0:? 3.000000
+0:? 3.000000
+0:? 3.000000
+0:? 3.000000
+0:? 3.000000
+0:138 Function Definition: PixelShaderFunction(mf44;mf44;mf44; (temp 4X4 matrix of float)
+0:132 Function Parameters:
+0:132 'inF0' (temp 4X4 matrix of float)
+0:132 'inF1' (temp 4X4 matrix of float)
+0:132 'inF2' (temp 4X4 matrix of float)
+0:? Sequence
+0:134 Constant:
+0:134 0.000000
+0:134 Constant:
+0:134 0.000000
+0:134 Constant:
+0:134 0.000000
+0:134 Constant:
+0:134 0.000000
+0:134 Constant:
+0:134 0.000000
+0:134 Constant:
+0:134 0.000000
+0:134 Constant:
+0:134 0.000000
+0:134 Constant:
+0:134 0.000000
+0:134 Constant:
+0:134 0.000000
+0:134 Constant:
+0:134 0.000000
+0:134 Constant:
+0:134 0.000000
+0:134 Constant:
+0:134 0.000000
+0:134 Constant:
+0:134 0.000000
+0:134 Constant:
+0:134 0.000000
+0:136 Branch: Return with expression
+0:? Constant:
+0:? 4.000000
+0:? 4.000000
+0:? 4.000000
+0:? 4.000000
+0:? 4.000000
+0:? 4.000000
+0:? 4.000000
+0:? 4.000000
+0:? 4.000000
+0:? 4.000000
+0:? 4.000000
+0:? 4.000000
+0:? 4.000000
+0:? 4.000000
+0:? 4.000000
+0:? 4.000000
+0:? Linker Objects
+
+
+Linked fragment stage:
+
+
+Shader version: 450
+gl_FragCoord origin is upper left
+ERROR: node is still EOpNull!
+0:35 Function Definition: PixelShaderFunction(f1;f1;f1;i1; (temp float)
+0:2 Function Parameters:
+0:2 'inF0' (temp float)
+0:2 'inF1' (temp float)
+0:2 'inF2' (temp float)
+0:2 'inI0' (temp int)
+0:? Sequence
+0:5 Constant:
+0:5 0.000000
+0:6 Constant:
+0:6 0.000000
+0:7 Constant:
+0:7 0.000000
+0:8 Constant:
+0:8 0.000000
+0:9 Constant:
+0:9 0.000000
+0:10 Constant:
+0:10 0.000000
+0:12 Constant:
+0:12 0.000000
+0:13 Constant:
+0:13 0.000000
+0:14 Constant:
+0:14 0.000000
+0:15 Constant:
+0:15 0.000000
+0:23 Constant:
+0:23 0.000000
+0:24 Constant:
+0:24 0.000000
+0:25 Constant:
+0:25 0.000000
+0:26 Constant:
+0:26 0.000000
+0:27 Constant:
+0:27 0.000000
+0:28 Constant:
+0:28 0.000000
+0:29 Constant:
+0:29 0.000000
+0:30 Constant:
+0:30 0.000000
+0:32 Branch: Return with expression
+0:32 Constant:
+0:32 0.000000
+0:44 Function Definition: PixelShaderFunction(vf1;vf1;vf1;vi1; (temp 1-component vector of float)
+0:36 Function Parameters:
+0:36 'inF0' (temp 1-component vector of float)
+0:36 'inF1' (temp 1-component vector of float)
+0:36 'inF2' (temp 1-component vector of float)
+0:36 'inI0' (temp 1-component vector of int)
+0:? Sequence
+0:39 Constant:
+0:39 0.000000
+0:41 Branch: Return with expression
+0:41 Constant:
+0:41 0.000000
+0:62 Function Definition: PixelShaderFunction(vf2;vf2;vf2;vi2; (temp 2-component vector of float)
+0:45 Function Parameters:
+0:45 'inF0' (temp 2-component vector of float)
+0:45 'inF1' (temp 2-component vector of float)
+0:45 'inF2' (temp 2-component vector of float)
+0:45 'inI0' (temp 2-component vector of int)
+0:? Sequence
+0:46 Constant:
+0:46 0.000000
+0:47 Constant:
+0:47 0.000000
+0:48 Constant:
+0:48 0.000000
+0:49 Constant:
+0:49 0.000000
+0:50 Constant:
+0:50 0.000000
+0:51 Constant:
+0:51 0.000000
+0:52 Constant:
+0:52 0.000000
+0:53 Constant:
+0:53 0.000000
+0:54 Constant:
+0:54 0.000000
+0:55 Constant:
+0:55 0.000000
+0:56 Constant:
+0:56 0.000000
+0:57 Constant:
+0:57 0.000000
+0:59 Branch: Return with expression
+0:? Constant:
+0:? 1.000000
+0:? 2.000000
+0:79 Function Definition: PixelShaderFunction(vf3;vf3;vf3;vi3; (temp 3-component vector of float)
+0:63 Function Parameters:
+0:63 'inF0' (temp 3-component vector of float)
+0:63 'inF1' (temp 3-component vector of float)
+0:63 'inF2' (temp 3-component vector of float)
+0:63 'inI0' (temp 3-component vector of int)
+0:? Sequence
+0:64 Constant:
+0:64 0.000000
+0:65 Constant:
+0:65 0.000000
+0:66 Constant:
+0:66 0.000000
+0:67 Constant:
+0:67 0.000000
+0:68 Constant:
+0:68 0.000000
+0:69 Constant:
+0:69 0.000000
+0:70 Constant:
+0:70 0.000000
+0:71 Constant:
+0:71 0.000000
+0:72 Constant:
+0:72 0.000000
+0:73 Constant:
+0:73 0.000000
+0:76 Branch: Return with expression
+0:? Constant:
+0:? 1.000000
+0:? 2.000000
+0:? 3.000000
+0:115 Function Definition: PixelShaderFunction(vf4;vf4;vf4;vi4; (temp 4-component vector of float)
+0:80 Function Parameters:
+0:80 'inF0' (temp 4-component vector of float)
+0:80 'inF1' (temp 4-component vector of float)
+0:80 'inF2' (temp 4-component vector of float)
+0:80 'inI0' (temp 4-component vector of int)
+0:? Sequence
+0:81 Constant:
+0:81 0.000000
+0:82 Constant:
+0:82 0.000000
+0:83 Constant:
+0:83 0.000000
+0:84 Constant:
+0:84 0.000000
+0:85 Constant:
+0:85 0.000000
+0:86 Constant:
+0:86 0.000000
+0:87 Constant:
+0:87 0.000000
+0:88 Constant:
+0:88 0.000000
+0:89 Constant:
+0:89 0.000000
+0:90 Constant:
+0:90 0.000000
+0:92 Branch: Return with expression
+0:? Constant:
+0:? 1.000000
+0:? 2.000000
+0:? 3.000000
+0:? 4.000000
+0:123 Function Definition: PixelShaderFunction(mf22;mf22;mf22; (temp 2X2 matrix of float)
+0:116 Function Parameters:
+0:116 'inF0' (temp 2X2 matrix of float)
+0:116 'inF1' (temp 2X2 matrix of float)
+0:116 'inF2' (temp 2X2 matrix of float)
+0:? Sequence
+0:118 Constant:
+0:118 0.000000
+0:118 Constant:
+0:118 0.000000
+0:118 Constant:
+0:118 0.000000
+0:118 Constant:
+0:118 0.000000
+0:118 Constant:
+0:118 0.000000
+0:118 Constant:
+0:118 0.000000
+0:118 Constant:
+0:118 0.000000
+0:118 Constant:
+0:118 0.000000
+0:118 Constant:
+0:118 0.000000
+0:118 Constant:
+0:118 0.000000
+0:118 Constant:
+0:118 0.000000
+0:118 Constant:
+0:118 0.000000
+0:118 Constant:
+0:118 0.000000
+0:118 Constant:
+0:118 0.000000
+0:120 Branch: Return with expression
+0:? Constant:
+0:? 2.000000
+0:? 2.000000
+0:? 2.000000
+0:? 2.000000
+0:131 Function Definition: PixelShaderFunction(mf33;mf33;mf33; (temp 3X3 matrix of float)
+0:124 Function Parameters:
+0:124 'inF0' (temp 3X3 matrix of float)
+0:124 'inF1' (temp 3X3 matrix of float)
+0:124 'inF2' (temp 3X3 matrix of float)
+0:? Sequence
+0:126 Constant:
+0:126 0.000000
+0:126 Constant:
+0:126 0.000000
+0:126 Constant:
+0:126 0.000000
+0:126 Constant:
+0:126 0.000000
+0:126 Constant:
+0:126 0.000000
+0:126 Constant:
+0:126 0.000000
+0:126 Constant:
+0:126 0.000000
+0:126 Constant:
+0:126 0.000000
+0:126 Constant:
+0:126 0.000000
+0:126 Constant:
+0:126 0.000000
+0:126 Constant:
+0:126 0.000000
+0:126 Constant:
+0:126 0.000000
+0:126 Constant:
+0:126 0.000000
+0:126 Constant:
+0:126 0.000000
+0:128 Branch: Return with expression
+0:? Constant:
+0:? 3.000000
+0:? 3.000000
+0:? 3.000000
+0:? 3.000000
+0:? 3.000000
+0:? 3.000000
+0:? 3.000000
+0:? 3.000000
+0:? 3.000000
+0:138 Function Definition: PixelShaderFunction(mf44;mf44;mf44; (temp 4X4 matrix of float)
+0:132 Function Parameters:
+0:132 'inF0' (temp 4X4 matrix of float)
+0:132 'inF1' (temp 4X4 matrix of float)
+0:132 'inF2' (temp 4X4 matrix of float)
+0:? Sequence
+0:134 Constant:
+0:134 0.000000
+0:134 Constant:
+0:134 0.000000
+0:134 Constant:
+0:134 0.000000
+0:134 Constant:
+0:134 0.000000
+0:134 Constant:
+0:134 0.000000
+0:134 Constant:
+0:134 0.000000
+0:134 Constant:
+0:134 0.000000
+0:134 Constant:
+0:134 0.000000
+0:134 Constant:
+0:134 0.000000
+0:134 Constant:
+0:134 0.000000
+0:134 Constant:
+0:134 0.000000
+0:134 Constant:
+0:134 0.000000
+0:134 Constant:
+0:134 0.000000
+0:134 Constant:
+0:134 0.000000
+0:136 Branch: Return with expression
+0:? Constant:
+0:? 4.000000
+0:? 4.000000
+0:? 4.000000
+0:? 4.000000
+0:? 4.000000
+0:? 4.000000
+0:? 4.000000
+0:? 4.000000
+0:? 4.000000
+0:? 4.000000
+0:? 4.000000
+0:? 4.000000
+0:? 4.000000
+0:? 4.000000
+0:? 4.000000
+0:? 4.000000
+0:? Linker Objects
+
+SPIR-V is not generated for failed compile or link
diff --git a/chromium/third_party/glslang/src/Test/baseResults/hlsl.intrinsics.negative.vert.out b/chromium/third_party/glslang/src/Test/baseResults/hlsl.intrinsics.negative.vert.out
new file mode 100644
index 00000000000..de711e9b03b
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/hlsl.intrinsics.negative.vert.out
@@ -0,0 +1,1055 @@
+hlsl.intrinsics.negative.vert
+ERROR: 0:5: 'asdouble' : no matching overloaded function found
+ERROR: 0:6: 'CheckAccessFullyMapped' : no matching overloaded function found
+ERROR: 0:7: 'CheckAccessFullyMapped' : no matching overloaded function found
+ERROR: 0:8: 'clip' : no matching overloaded function found
+ERROR: 0:9: 'countbits' : no matching overloaded function found
+ERROR: 0:10: 'cross' : no matching overloaded function found
+ERROR: 0:11: 'D3DCOLORtoUBYTE4' : no matching overloaded function found
+ERROR: 0:14: 'ddx' : no matching overloaded function found
+ERROR: 0:15: 'ddx_coarse' : no matching overloaded function found
+ERROR: 0:16: 'ddx_fine' : no matching overloaded function found
+ERROR: 0:17: 'ddy' : no matching overloaded function found
+ERROR: 0:18: 'ddy_coarse' : no matching overloaded function found
+ERROR: 0:19: 'ddy_fine' : no matching overloaded function found
+ERROR: 0:20: 'determinant' : no matching overloaded function found
+ERROR: 0:21: 'EvaluateAttributeAtCentroid' : no matching overloaded function found
+ERROR: 0:22: 'EvaluateAttributeAtSample' : no matching overloaded function found
+ERROR: 0:23: 'EvaluateAttributeSnapped' : no matching overloaded function found
+ERROR: 0:24: 'f16tof32' : no matching overloaded function found
+ERROR: 0:25: 'firstbithigh' : no matching overloaded function found
+ERROR: 0:26: 'firstbitlow' : no matching overloaded function found
+ERROR: 0:27: 'fma' : no matching overloaded function found
+ERROR: 0:35: 'length' : no matching overloaded function found
+ERROR: 0:36: 'msad4' : no matching overloaded function found
+ERROR: 0:37: 'normalize' : no matching overloaded function found
+ERROR: 0:38: 'reflect' : no matching overloaded function found
+ERROR: 0:39: 'refract' : no matching overloaded function found
+ERROR: 0:40: 'refract' : no matching overloaded function found
+ERROR: 0:41: 'reversebits' : no matching overloaded function found
+ERROR: 0:42: 'transpose' : no matching overloaded function found
+ERROR: 0:53: 'GetRenderTargetSamplePosition' : no matching overloaded function found
+ERROR: 0:60: 'asdouble' : no matching overloaded function found
+ERROR: 0:61: 'CheckAccessFullyMapped' : no matching overloaded function found
+ERROR: 0:62: 'countbits' : no matching overloaded function found
+ERROR: 0:63: 'cross' : no matching overloaded function found
+ERROR: 0:64: 'D3DCOLORtoUBYTE4' : no matching overloaded function found
+ERROR: 0:65: 'ddx' : no matching overloaded function found
+ERROR: 0:66: 'ddx_coarse' : no matching overloaded function found
+ERROR: 0:67: 'ddx_fine' : no matching overloaded function found
+ERROR: 0:68: 'ddy' : no matching overloaded function found
+ERROR: 0:69: 'ddy_coarse' : no matching overloaded function found
+ERROR: 0:70: 'ddy_fine' : no matching overloaded function found
+ERROR: 0:71: 'determinant' : no matching overloaded function found
+ERROR: 0:72: 'EvaluateAttributeAtCentroid' : no matching overloaded function found
+ERROR: 0:73: 'EvaluateAttributeAtSample' : no matching overloaded function found
+ERROR: 0:74: 'EvaluateAttributeSnapped' : no matching overloaded function found
+ERROR: 0:75: 'f16tof32' : no matching overloaded function found
+ERROR: 0:76: 'firstbithigh' : no matching overloaded function found
+ERROR: 0:77: 'firstbitlow' : no matching overloaded function found
+ERROR: 0:78: 'fma' : no matching overloaded function found
+ERROR: 0:79: 'noise' : no matching overloaded function found
+ERROR: 0:80: 'reversebits' : no matching overloaded function found
+ERROR: 0:81: 'transpose' : no matching overloaded function found
+ERROR: 0:90: 'CheckAccessFullyMapped' : no matching overloaded function found
+ERROR: 0:91: 'countbits' : no matching overloaded function found
+ERROR: 0:92: 'ddx' : no matching overloaded function found
+ERROR: 0:93: 'ddx_coarse' : no matching overloaded function found
+ERROR: 0:94: 'ddx_fine' : no matching overloaded function found
+ERROR: 0:95: 'ddy' : no matching overloaded function found
+ERROR: 0:96: 'ddy_coarse' : no matching overloaded function found
+ERROR: 0:97: 'ddy_fine' : no matching overloaded function found
+ERROR: 0:98: 'D3DCOLORtoUBYTE4' : no matching overloaded function found
+ERROR: 0:99: 'determinant' : no matching overloaded function found
+ERROR: 0:100: 'EvaluateAttributeAtCentroid' : no matching overloaded function found
+ERROR: 0:101: 'EvaluateAttributeAtSample' : no matching overloaded function found
+ERROR: 0:102: 'EvaluateAttributeSnapped' : no matching overloaded function found
+ERROR: 0:103: 'f16tof32' : no matching overloaded function found
+ERROR: 0:104: 'firstbithigh' : no matching overloaded function found
+ERROR: 0:105: 'firstbitlow' : no matching overloaded function found
+ERROR: 0:106: 'fma' : no matching overloaded function found
+ERROR: 0:107: 'noise' : no matching overloaded function found
+ERROR: 0:108: 'reversebits' : no matching overloaded function found
+ERROR: 0:109: 'transpose' : no matching overloaded function found
+ERROR: 0:118: 'CheckAccessFullyMapped' : no matching overloaded function found
+ERROR: 0:119: 'countbits' : no matching overloaded function found
+ERROR: 0:120: 'cross' : no matching overloaded function found
+ERROR: 0:121: 'determinant' : no matching overloaded function found
+ERROR: 0:122: 'ddx' : no matching overloaded function found
+ERROR: 0:123: 'ddx_coarse' : no matching overloaded function found
+ERROR: 0:124: 'ddx_fine' : no matching overloaded function found
+ERROR: 0:125: 'ddy' : no matching overloaded function found
+ERROR: 0:126: 'ddy_coarse' : no matching overloaded function found
+ERROR: 0:127: 'ddy_fine' : no matching overloaded function found
+ERROR: 0:128: 'EvaluateAttributeAtCentroid' : no matching overloaded function found
+ERROR: 0:129: 'EvaluateAttributeAtSample' : no matching overloaded function found
+ERROR: 0:130: 'EvaluateAttributeSnapped' : no matching overloaded function found
+ERROR: 0:131: 'f16tof32' : no matching overloaded function found
+ERROR: 0:132: 'firstbithigh' : no matching overloaded function found
+ERROR: 0:133: 'firstbitlow' : no matching overloaded function found
+ERROR: 0:134: 'fma' : no matching overloaded function found
+ERROR: 0:135: 'noise' : no matching overloaded function found
+ERROR: 0:136: 'reversebits' : no matching overloaded function found
+ERROR: 0:137: 'transpose' : no matching overloaded function found
+ERROR: 0:177: 'countbits' : no matching overloaded function found
+ERROR: 0:177: 'cross' : no matching overloaded function found
+ERROR: 0:177: 'D3DCOLORtoUBYTE4' : no matching overloaded function found
+ERROR: 0:177: 'ddx' : no matching overloaded function found
+ERROR: 0:177: 'ddx_coarse' : no matching overloaded function found
+ERROR: 0:177: 'ddx_fine' : no matching overloaded function found
+ERROR: 0:177: 'ddy' : no matching overloaded function found
+ERROR: 0:177: 'ddy_coarse' : no matching overloaded function found
+ERROR: 0:177: 'ddy_fine' : no matching overloaded function found
+ERROR: 0:177: 'EvaluateAttributeAtCentroid' : no matching overloaded function found
+ERROR: 0:177: 'EvaluateAttributeAtSample' : no matching overloaded function found
+ERROR: 0:177: 'EvaluateAttributeSnapped' : no matching overloaded function found
+ERROR: 0:177: 'f16tof32' : no matching overloaded function found
+ERROR: 0:177: 'firstbithigh' : no matching overloaded function found
+ERROR: 0:177: 'firstbitlow' : no matching overloaded function found
+ERROR: 0:177: 'fma' : no matching overloaded function found
+ERROR: 0:177: 'noise' : no matching overloaded function found
+ERROR: 0:177: 'reversebits' : no matching overloaded function found
+ERROR: 0:177: 'length' : no matching overloaded function found
+ERROR: 0:177: 'noise' : no matching overloaded function found
+ERROR: 0:177: 'normalize' : no matching overloaded function found
+ERROR: 0:177: 'reflect' : no matching overloaded function found
+ERROR: 0:177: 'refract' : no matching overloaded function found
+ERROR: 0:177: 'reversebits' : no matching overloaded function found
+ERROR: 0:185: 'countbits' : no matching overloaded function found
+ERROR: 0:185: 'cross' : no matching overloaded function found
+ERROR: 0:185: 'D3DCOLORtoUBYTE4' : no matching overloaded function found
+ERROR: 0:185: 'ddx' : no matching overloaded function found
+ERROR: 0:185: 'ddx_coarse' : no matching overloaded function found
+ERROR: 0:185: 'ddx_fine' : no matching overloaded function found
+ERROR: 0:185: 'ddy' : no matching overloaded function found
+ERROR: 0:185: 'ddy_coarse' : no matching overloaded function found
+ERROR: 0:185: 'ddy_fine' : no matching overloaded function found
+ERROR: 0:185: 'EvaluateAttributeAtCentroid' : no matching overloaded function found
+ERROR: 0:185: 'EvaluateAttributeAtSample' : no matching overloaded function found
+ERROR: 0:185: 'EvaluateAttributeSnapped' : no matching overloaded function found
+ERROR: 0:185: 'f16tof32' : no matching overloaded function found
+ERROR: 0:185: 'firstbithigh' : no matching overloaded function found
+ERROR: 0:185: 'firstbitlow' : no matching overloaded function found
+ERROR: 0:185: 'fma' : no matching overloaded function found
+ERROR: 0:185: 'noise' : no matching overloaded function found
+ERROR: 0:185: 'reversebits' : no matching overloaded function found
+ERROR: 0:185: 'length' : no matching overloaded function found
+ERROR: 0:185: 'noise' : no matching overloaded function found
+ERROR: 0:185: 'normalize' : no matching overloaded function found
+ERROR: 0:185: 'reflect' : no matching overloaded function found
+ERROR: 0:185: 'refract' : no matching overloaded function found
+ERROR: 0:185: 'reversebits' : no matching overloaded function found
+ERROR: 0:193: 'countbits' : no matching overloaded function found
+ERROR: 0:193: 'cross' : no matching overloaded function found
+ERROR: 0:193: 'D3DCOLORtoUBYTE4' : no matching overloaded function found
+ERROR: 0:193: 'ddx' : no matching overloaded function found
+ERROR: 0:193: 'ddx_coarse' : no matching overloaded function found
+ERROR: 0:193: 'ddx_fine' : no matching overloaded function found
+ERROR: 0:193: 'ddy' : no matching overloaded function found
+ERROR: 0:193: 'ddy_coarse' : no matching overloaded function found
+ERROR: 0:193: 'ddy_fine' : no matching overloaded function found
+ERROR: 0:193: 'EvaluateAttributeAtCentroid' : no matching overloaded function found
+ERROR: 0:193: 'EvaluateAttributeAtSample' : no matching overloaded function found
+ERROR: 0:193: 'EvaluateAttributeSnapped' : no matching overloaded function found
+ERROR: 0:193: 'f16tof32' : no matching overloaded function found
+ERROR: 0:193: 'firstbithigh' : no matching overloaded function found
+ERROR: 0:193: 'firstbitlow' : no matching overloaded function found
+ERROR: 0:193: 'fma' : no matching overloaded function found
+ERROR: 0:193: 'noise' : no matching overloaded function found
+ERROR: 0:193: 'reversebits' : no matching overloaded function found
+ERROR: 0:193: 'length' : no matching overloaded function found
+ERROR: 0:193: 'noise' : no matching overloaded function found
+ERROR: 0:193: 'normalize' : no matching overloaded function found
+ERROR: 0:193: 'reflect' : no matching overloaded function found
+ERROR: 0:193: 'refract' : no matching overloaded function found
+ERROR: 0:193: 'reversebits' : no matching overloaded function found
+ERROR: 164 compilation errors. No code generated.
+
+
+Shader version: 450
+ERROR: node is still EOpNull!
+0:49 Function Definition: VertexShaderFunction(f1;f1;f1;i1; (temp float)
+0:2 Function Parameters:
+0:2 'inF0' (temp float)
+0:2 'inF1' (temp float)
+0:2 'inF2' (temp float)
+0:2 'inI0' (temp int)
+0:? Sequence
+0:5 Constant:
+0:5 0.000000
+0:6 Constant:
+0:6 0.000000
+0:7 Constant:
+0:7 0.000000
+0:8 Constant:
+0:8 0.000000
+0:9 Constant:
+0:9 0.000000
+0:10 Constant:
+0:10 0.000000
+0:11 Constant:
+0:11 0.000000
+0:14 Constant:
+0:14 0.000000
+0:15 Constant:
+0:15 0.000000
+0:16 Constant:
+0:16 0.000000
+0:17 Constant:
+0:17 0.000000
+0:18 Constant:
+0:18 0.000000
+0:19 Constant:
+0:19 0.000000
+0:20 Constant:
+0:20 0.000000
+0:21 Constant:
+0:21 0.000000
+0:22 Constant:
+0:22 0.000000
+0:23 Constant:
+0:23 0.000000
+0:24 Constant:
+0:24 0.000000
+0:25 Constant:
+0:25 0.000000
+0:26 Constant:
+0:26 0.000000
+0:27 Constant:
+0:27 0.000000
+0:35 Constant:
+0:35 0.000000
+0:36 Constant:
+0:36 0.000000
+0:37 Constant:
+0:37 0.000000
+0:38 Constant:
+0:38 0.000000
+0:39 Constant:
+0:39 0.000000
+0:40 Constant:
+0:40 0.000000
+0:41 Constant:
+0:41 0.000000
+0:42 Constant:
+0:42 0.000000
+0:46 Branch: Return with expression
+0:46 Constant:
+0:46 0.000000
+0:58 Function Definition: VertexShaderFunction(vf1;vf1;vf1;vi1; (temp 1-component vector of float)
+0:50 Function Parameters:
+0:50 'inF0' (temp 1-component vector of float)
+0:50 'inF1' (temp 1-component vector of float)
+0:50 'inF2' (temp 1-component vector of float)
+0:50 'inI0' (temp 1-component vector of int)
+0:? Sequence
+0:53 Constant:
+0:53 0.000000
+0:55 Branch: Return with expression
+0:55 Constant:
+0:55 0.000000
+0:88 Function Definition: VertexShaderFunction(vf2;vf2;vf2;vi2; (temp 2-component vector of float)
+0:59 Function Parameters:
+0:59 'inF0' (temp 2-component vector of float)
+0:59 'inF1' (temp 2-component vector of float)
+0:59 'inF2' (temp 2-component vector of float)
+0:59 'inI0' (temp 2-component vector of int)
+0:? Sequence
+0:60 Constant:
+0:60 0.000000
+0:61 Constant:
+0:61 0.000000
+0:62 Constant:
+0:62 0.000000
+0:63 Constant:
+0:63 0.000000
+0:64 Constant:
+0:64 0.000000
+0:65 Constant:
+0:65 0.000000
+0:66 Constant:
+0:66 0.000000
+0:67 Constant:
+0:67 0.000000
+0:68 Constant:
+0:68 0.000000
+0:69 Constant:
+0:69 0.000000
+0:70 Constant:
+0:70 0.000000
+0:71 Constant:
+0:71 0.000000
+0:72 Constant:
+0:72 0.000000
+0:73 Constant:
+0:73 0.000000
+0:74 Constant:
+0:74 0.000000
+0:75 Constant:
+0:75 0.000000
+0:76 Constant:
+0:76 0.000000
+0:77 Constant:
+0:77 0.000000
+0:78 Constant:
+0:78 0.000000
+0:79 Constant:
+0:79 0.000000
+0:80 Constant:
+0:80 0.000000
+0:81 Constant:
+0:81 0.000000
+0:85 Branch: Return with expression
+0:? Constant:
+0:? 1.000000
+0:? 2.000000
+0:116 Function Definition: VertexShaderFunction(vf3;vf3;vf3;vi3; (temp 3-component vector of float)
+0:89 Function Parameters:
+0:89 'inF0' (temp 3-component vector of float)
+0:89 'inF1' (temp 3-component vector of float)
+0:89 'inF2' (temp 3-component vector of float)
+0:89 'inI0' (temp 3-component vector of int)
+0:? Sequence
+0:90 Constant:
+0:90 0.000000
+0:91 Constant:
+0:91 0.000000
+0:92 Constant:
+0:92 0.000000
+0:93 Constant:
+0:93 0.000000
+0:94 Constant:
+0:94 0.000000
+0:95 Constant:
+0:95 0.000000
+0:96 Constant:
+0:96 0.000000
+0:97 Constant:
+0:97 0.000000
+0:98 Constant:
+0:98 0.000000
+0:99 Constant:
+0:99 0.000000
+0:100 Constant:
+0:100 0.000000
+0:101 Constant:
+0:101 0.000000
+0:102 Constant:
+0:102 0.000000
+0:103 Constant:
+0:103 0.000000
+0:104 Constant:
+0:104 0.000000
+0:105 Constant:
+0:105 0.000000
+0:106 Constant:
+0:106 0.000000
+0:107 Constant:
+0:107 0.000000
+0:108 Constant:
+0:108 0.000000
+0:109 Constant:
+0:109 0.000000
+0:113 Branch: Return with expression
+0:? Constant:
+0:? 1.000000
+0:? 2.000000
+0:? 3.000000
+0:174 Function Definition: VertexShaderFunction(vf4;vf4;vf4;vi4; (temp 4-component vector of float)
+0:117 Function Parameters:
+0:117 'inF0' (temp 4-component vector of float)
+0:117 'inF1' (temp 4-component vector of float)
+0:117 'inF2' (temp 4-component vector of float)
+0:117 'inI0' (temp 4-component vector of int)
+0:? Sequence
+0:118 Constant:
+0:118 0.000000
+0:119 Constant:
+0:119 0.000000
+0:120 Constant:
+0:120 0.000000
+0:121 Constant:
+0:121 0.000000
+0:122 Constant:
+0:122 0.000000
+0:123 Constant:
+0:123 0.000000
+0:124 Constant:
+0:124 0.000000
+0:125 Constant:
+0:125 0.000000
+0:126 Constant:
+0:126 0.000000
+0:127 Constant:
+0:127 0.000000
+0:128 Constant:
+0:128 0.000000
+0:129 Constant:
+0:129 0.000000
+0:130 Constant:
+0:130 0.000000
+0:131 Constant:
+0:131 0.000000
+0:132 Constant:
+0:132 0.000000
+0:133 Constant:
+0:133 0.000000
+0:134 Constant:
+0:134 0.000000
+0:135 Constant:
+0:135 0.000000
+0:136 Constant:
+0:136 0.000000
+0:137 Constant:
+0:137 0.000000
+0:141 Branch: Return with expression
+0:? Constant:
+0:? 1.000000
+0:? 2.000000
+0:? 3.000000
+0:? 4.000000
+0:182 Function Definition: VertexShaderFunction(mf22;mf22;mf22; (temp 2X2 matrix of float)
+0:175 Function Parameters:
+0:175 'inF0' (temp 2X2 matrix of float)
+0:175 'inF1' (temp 2X2 matrix of float)
+0:175 'inF2' (temp 2X2 matrix of float)
+0:? Sequence
+0:177 Constant:
+0:177 0.000000
+0:177 Constant:
+0:177 0.000000
+0:177 Constant:
+0:177 0.000000
+0:177 Constant:
+0:177 0.000000
+0:177 Constant:
+0:177 0.000000
+0:177 Constant:
+0:177 0.000000
+0:177 Constant:
+0:177 0.000000
+0:177 Constant:
+0:177 0.000000
+0:177 Constant:
+0:177 0.000000
+0:177 Constant:
+0:177 0.000000
+0:177 Constant:
+0:177 0.000000
+0:177 Constant:
+0:177 0.000000
+0:177 Constant:
+0:177 0.000000
+0:177 Constant:
+0:177 0.000000
+0:177 Constant:
+0:177 0.000000
+0:177 Constant:
+0:177 0.000000
+0:177 Constant:
+0:177 0.000000
+0:177 Constant:
+0:177 0.000000
+0:177 Constant:
+0:177 0.000000
+0:177 Constant:
+0:177 0.000000
+0:177 Constant:
+0:177 0.000000
+0:177 Constant:
+0:177 0.000000
+0:177 Constant:
+0:177 0.000000
+0:177 Constant:
+0:177 0.000000
+0:179 Branch: Return with expression
+0:? Constant:
+0:? 2.000000
+0:? 2.000000
+0:? 2.000000
+0:? 2.000000
+0:190 Function Definition: VertexShaderFunction(mf33;mf33;mf33; (temp 3X3 matrix of float)
+0:183 Function Parameters:
+0:183 'inF0' (temp 3X3 matrix of float)
+0:183 'inF1' (temp 3X3 matrix of float)
+0:183 'inF2' (temp 3X3 matrix of float)
+0:? Sequence
+0:185 Constant:
+0:185 0.000000
+0:185 Constant:
+0:185 0.000000
+0:185 Constant:
+0:185 0.000000
+0:185 Constant:
+0:185 0.000000
+0:185 Constant:
+0:185 0.000000
+0:185 Constant:
+0:185 0.000000
+0:185 Constant:
+0:185 0.000000
+0:185 Constant:
+0:185 0.000000
+0:185 Constant:
+0:185 0.000000
+0:185 Constant:
+0:185 0.000000
+0:185 Constant:
+0:185 0.000000
+0:185 Constant:
+0:185 0.000000
+0:185 Constant:
+0:185 0.000000
+0:185 Constant:
+0:185 0.000000
+0:185 Constant:
+0:185 0.000000
+0:185 Constant:
+0:185 0.000000
+0:185 Constant:
+0:185 0.000000
+0:185 Constant:
+0:185 0.000000
+0:185 Constant:
+0:185 0.000000
+0:185 Constant:
+0:185 0.000000
+0:185 Constant:
+0:185 0.000000
+0:185 Constant:
+0:185 0.000000
+0:185 Constant:
+0:185 0.000000
+0:185 Constant:
+0:185 0.000000
+0:187 Branch: Return with expression
+0:? Constant:
+0:? 3.000000
+0:? 3.000000
+0:? 3.000000
+0:? 3.000000
+0:? 3.000000
+0:? 3.000000
+0:? 3.000000
+0:? 3.000000
+0:? 3.000000
+0:197 Function Definition: VertexShaderFunction(mf44;mf44;mf44; (temp 4X4 matrix of float)
+0:191 Function Parameters:
+0:191 'inF0' (temp 4X4 matrix of float)
+0:191 'inF1' (temp 4X4 matrix of float)
+0:191 'inF2' (temp 4X4 matrix of float)
+0:? Sequence
+0:193 Constant:
+0:193 0.000000
+0:193 Constant:
+0:193 0.000000
+0:193 Constant:
+0:193 0.000000
+0:193 Constant:
+0:193 0.000000
+0:193 Constant:
+0:193 0.000000
+0:193 Constant:
+0:193 0.000000
+0:193 Constant:
+0:193 0.000000
+0:193 Constant:
+0:193 0.000000
+0:193 Constant:
+0:193 0.000000
+0:193 Constant:
+0:193 0.000000
+0:193 Constant:
+0:193 0.000000
+0:193 Constant:
+0:193 0.000000
+0:193 Constant:
+0:193 0.000000
+0:193 Constant:
+0:193 0.000000
+0:193 Constant:
+0:193 0.000000
+0:193 Constant:
+0:193 0.000000
+0:193 Constant:
+0:193 0.000000
+0:193 Constant:
+0:193 0.000000
+0:193 Constant:
+0:193 0.000000
+0:193 Constant:
+0:193 0.000000
+0:193 Constant:
+0:193 0.000000
+0:193 Constant:
+0:193 0.000000
+0:193 Constant:
+0:193 0.000000
+0:193 Constant:
+0:193 0.000000
+0:195 Branch: Return with expression
+0:? Constant:
+0:? 4.000000
+0:? 4.000000
+0:? 4.000000
+0:? 4.000000
+0:? 4.000000
+0:? 4.000000
+0:? 4.000000
+0:? 4.000000
+0:? 4.000000
+0:? 4.000000
+0:? 4.000000
+0:? 4.000000
+0:? 4.000000
+0:? 4.000000
+0:? 4.000000
+0:? 4.000000
+0:? Linker Objects
+
+
+Linked vertex stage:
+
+
+Shader version: 450
+ERROR: node is still EOpNull!
+0:49 Function Definition: VertexShaderFunction(f1;f1;f1;i1; (temp float)
+0:2 Function Parameters:
+0:2 'inF0' (temp float)
+0:2 'inF1' (temp float)
+0:2 'inF2' (temp float)
+0:2 'inI0' (temp int)
+0:? Sequence
+0:5 Constant:
+0:5 0.000000
+0:6 Constant:
+0:6 0.000000
+0:7 Constant:
+0:7 0.000000
+0:8 Constant:
+0:8 0.000000
+0:9 Constant:
+0:9 0.000000
+0:10 Constant:
+0:10 0.000000
+0:11 Constant:
+0:11 0.000000
+0:14 Constant:
+0:14 0.000000
+0:15 Constant:
+0:15 0.000000
+0:16 Constant:
+0:16 0.000000
+0:17 Constant:
+0:17 0.000000
+0:18 Constant:
+0:18 0.000000
+0:19 Constant:
+0:19 0.000000
+0:20 Constant:
+0:20 0.000000
+0:21 Constant:
+0:21 0.000000
+0:22 Constant:
+0:22 0.000000
+0:23 Constant:
+0:23 0.000000
+0:24 Constant:
+0:24 0.000000
+0:25 Constant:
+0:25 0.000000
+0:26 Constant:
+0:26 0.000000
+0:27 Constant:
+0:27 0.000000
+0:35 Constant:
+0:35 0.000000
+0:36 Constant:
+0:36 0.000000
+0:37 Constant:
+0:37 0.000000
+0:38 Constant:
+0:38 0.000000
+0:39 Constant:
+0:39 0.000000
+0:40 Constant:
+0:40 0.000000
+0:41 Constant:
+0:41 0.000000
+0:42 Constant:
+0:42 0.000000
+0:46 Branch: Return with expression
+0:46 Constant:
+0:46 0.000000
+0:58 Function Definition: VertexShaderFunction(vf1;vf1;vf1;vi1; (temp 1-component vector of float)
+0:50 Function Parameters:
+0:50 'inF0' (temp 1-component vector of float)
+0:50 'inF1' (temp 1-component vector of float)
+0:50 'inF2' (temp 1-component vector of float)
+0:50 'inI0' (temp 1-component vector of int)
+0:? Sequence
+0:53 Constant:
+0:53 0.000000
+0:55 Branch: Return with expression
+0:55 Constant:
+0:55 0.000000
+0:88 Function Definition: VertexShaderFunction(vf2;vf2;vf2;vi2; (temp 2-component vector of float)
+0:59 Function Parameters:
+0:59 'inF0' (temp 2-component vector of float)
+0:59 'inF1' (temp 2-component vector of float)
+0:59 'inF2' (temp 2-component vector of float)
+0:59 'inI0' (temp 2-component vector of int)
+0:? Sequence
+0:60 Constant:
+0:60 0.000000
+0:61 Constant:
+0:61 0.000000
+0:62 Constant:
+0:62 0.000000
+0:63 Constant:
+0:63 0.000000
+0:64 Constant:
+0:64 0.000000
+0:65 Constant:
+0:65 0.000000
+0:66 Constant:
+0:66 0.000000
+0:67 Constant:
+0:67 0.000000
+0:68 Constant:
+0:68 0.000000
+0:69 Constant:
+0:69 0.000000
+0:70 Constant:
+0:70 0.000000
+0:71 Constant:
+0:71 0.000000
+0:72 Constant:
+0:72 0.000000
+0:73 Constant:
+0:73 0.000000
+0:74 Constant:
+0:74 0.000000
+0:75 Constant:
+0:75 0.000000
+0:76 Constant:
+0:76 0.000000
+0:77 Constant:
+0:77 0.000000
+0:78 Constant:
+0:78 0.000000
+0:79 Constant:
+0:79 0.000000
+0:80 Constant:
+0:80 0.000000
+0:81 Constant:
+0:81 0.000000
+0:85 Branch: Return with expression
+0:? Constant:
+0:? 1.000000
+0:? 2.000000
+0:116 Function Definition: VertexShaderFunction(vf3;vf3;vf3;vi3; (temp 3-component vector of float)
+0:89 Function Parameters:
+0:89 'inF0' (temp 3-component vector of float)
+0:89 'inF1' (temp 3-component vector of float)
+0:89 'inF2' (temp 3-component vector of float)
+0:89 'inI0' (temp 3-component vector of int)
+0:? Sequence
+0:90 Constant:
+0:90 0.000000
+0:91 Constant:
+0:91 0.000000
+0:92 Constant:
+0:92 0.000000
+0:93 Constant:
+0:93 0.000000
+0:94 Constant:
+0:94 0.000000
+0:95 Constant:
+0:95 0.000000
+0:96 Constant:
+0:96 0.000000
+0:97 Constant:
+0:97 0.000000
+0:98 Constant:
+0:98 0.000000
+0:99 Constant:
+0:99 0.000000
+0:100 Constant:
+0:100 0.000000
+0:101 Constant:
+0:101 0.000000
+0:102 Constant:
+0:102 0.000000
+0:103 Constant:
+0:103 0.000000
+0:104 Constant:
+0:104 0.000000
+0:105 Constant:
+0:105 0.000000
+0:106 Constant:
+0:106 0.000000
+0:107 Constant:
+0:107 0.000000
+0:108 Constant:
+0:108 0.000000
+0:109 Constant:
+0:109 0.000000
+0:113 Branch: Return with expression
+0:? Constant:
+0:? 1.000000
+0:? 2.000000
+0:? 3.000000
+0:174 Function Definition: VertexShaderFunction(vf4;vf4;vf4;vi4; (temp 4-component vector of float)
+0:117 Function Parameters:
+0:117 'inF0' (temp 4-component vector of float)
+0:117 'inF1' (temp 4-component vector of float)
+0:117 'inF2' (temp 4-component vector of float)
+0:117 'inI0' (temp 4-component vector of int)
+0:? Sequence
+0:118 Constant:
+0:118 0.000000
+0:119 Constant:
+0:119 0.000000
+0:120 Constant:
+0:120 0.000000
+0:121 Constant:
+0:121 0.000000
+0:122 Constant:
+0:122 0.000000
+0:123 Constant:
+0:123 0.000000
+0:124 Constant:
+0:124 0.000000
+0:125 Constant:
+0:125 0.000000
+0:126 Constant:
+0:126 0.000000
+0:127 Constant:
+0:127 0.000000
+0:128 Constant:
+0:128 0.000000
+0:129 Constant:
+0:129 0.000000
+0:130 Constant:
+0:130 0.000000
+0:131 Constant:
+0:131 0.000000
+0:132 Constant:
+0:132 0.000000
+0:133 Constant:
+0:133 0.000000
+0:134 Constant:
+0:134 0.000000
+0:135 Constant:
+0:135 0.000000
+0:136 Constant:
+0:136 0.000000
+0:137 Constant:
+0:137 0.000000
+0:141 Branch: Return with expression
+0:? Constant:
+0:? 1.000000
+0:? 2.000000
+0:? 3.000000
+0:? 4.000000
+0:182 Function Definition: VertexShaderFunction(mf22;mf22;mf22; (temp 2X2 matrix of float)
+0:175 Function Parameters:
+0:175 'inF0' (temp 2X2 matrix of float)
+0:175 'inF1' (temp 2X2 matrix of float)
+0:175 'inF2' (temp 2X2 matrix of float)
+0:? Sequence
+0:177 Constant:
+0:177 0.000000
+0:177 Constant:
+0:177 0.000000
+0:177 Constant:
+0:177 0.000000
+0:177 Constant:
+0:177 0.000000
+0:177 Constant:
+0:177 0.000000
+0:177 Constant:
+0:177 0.000000
+0:177 Constant:
+0:177 0.000000
+0:177 Constant:
+0:177 0.000000
+0:177 Constant:
+0:177 0.000000
+0:177 Constant:
+0:177 0.000000
+0:177 Constant:
+0:177 0.000000
+0:177 Constant:
+0:177 0.000000
+0:177 Constant:
+0:177 0.000000
+0:177 Constant:
+0:177 0.000000
+0:177 Constant:
+0:177 0.000000
+0:177 Constant:
+0:177 0.000000
+0:177 Constant:
+0:177 0.000000
+0:177 Constant:
+0:177 0.000000
+0:177 Constant:
+0:177 0.000000
+0:177 Constant:
+0:177 0.000000
+0:177 Constant:
+0:177 0.000000
+0:177 Constant:
+0:177 0.000000
+0:177 Constant:
+0:177 0.000000
+0:177 Constant:
+0:177 0.000000
+0:179 Branch: Return with expression
+0:? Constant:
+0:? 2.000000
+0:? 2.000000
+0:? 2.000000
+0:? 2.000000
+0:190 Function Definition: VertexShaderFunction(mf33;mf33;mf33; (temp 3X3 matrix of float)
+0:183 Function Parameters:
+0:183 'inF0' (temp 3X3 matrix of float)
+0:183 'inF1' (temp 3X3 matrix of float)
+0:183 'inF2' (temp 3X3 matrix of float)
+0:? Sequence
+0:185 Constant:
+0:185 0.000000
+0:185 Constant:
+0:185 0.000000
+0:185 Constant:
+0:185 0.000000
+0:185 Constant:
+0:185 0.000000
+0:185 Constant:
+0:185 0.000000
+0:185 Constant:
+0:185 0.000000
+0:185 Constant:
+0:185 0.000000
+0:185 Constant:
+0:185 0.000000
+0:185 Constant:
+0:185 0.000000
+0:185 Constant:
+0:185 0.000000
+0:185 Constant:
+0:185 0.000000
+0:185 Constant:
+0:185 0.000000
+0:185 Constant:
+0:185 0.000000
+0:185 Constant:
+0:185 0.000000
+0:185 Constant:
+0:185 0.000000
+0:185 Constant:
+0:185 0.000000
+0:185 Constant:
+0:185 0.000000
+0:185 Constant:
+0:185 0.000000
+0:185 Constant:
+0:185 0.000000
+0:185 Constant:
+0:185 0.000000
+0:185 Constant:
+0:185 0.000000
+0:185 Constant:
+0:185 0.000000
+0:185 Constant:
+0:185 0.000000
+0:185 Constant:
+0:185 0.000000
+0:187 Branch: Return with expression
+0:? Constant:
+0:? 3.000000
+0:? 3.000000
+0:? 3.000000
+0:? 3.000000
+0:? 3.000000
+0:? 3.000000
+0:? 3.000000
+0:? 3.000000
+0:? 3.000000
+0:197 Function Definition: VertexShaderFunction(mf44;mf44;mf44; (temp 4X4 matrix of float)
+0:191 Function Parameters:
+0:191 'inF0' (temp 4X4 matrix of float)
+0:191 'inF1' (temp 4X4 matrix of float)
+0:191 'inF2' (temp 4X4 matrix of float)
+0:? Sequence
+0:193 Constant:
+0:193 0.000000
+0:193 Constant:
+0:193 0.000000
+0:193 Constant:
+0:193 0.000000
+0:193 Constant:
+0:193 0.000000
+0:193 Constant:
+0:193 0.000000
+0:193 Constant:
+0:193 0.000000
+0:193 Constant:
+0:193 0.000000
+0:193 Constant:
+0:193 0.000000
+0:193 Constant:
+0:193 0.000000
+0:193 Constant:
+0:193 0.000000
+0:193 Constant:
+0:193 0.000000
+0:193 Constant:
+0:193 0.000000
+0:193 Constant:
+0:193 0.000000
+0:193 Constant:
+0:193 0.000000
+0:193 Constant:
+0:193 0.000000
+0:193 Constant:
+0:193 0.000000
+0:193 Constant:
+0:193 0.000000
+0:193 Constant:
+0:193 0.000000
+0:193 Constant:
+0:193 0.000000
+0:193 Constant:
+0:193 0.000000
+0:193 Constant:
+0:193 0.000000
+0:193 Constant:
+0:193 0.000000
+0:193 Constant:
+0:193 0.000000
+0:193 Constant:
+0:193 0.000000
+0:195 Branch: Return with expression
+0:? Constant:
+0:? 4.000000
+0:? 4.000000
+0:? 4.000000
+0:? 4.000000
+0:? 4.000000
+0:? 4.000000
+0:? 4.000000
+0:? 4.000000
+0:? 4.000000
+0:? 4.000000
+0:? 4.000000
+0:? 4.000000
+0:? 4.000000
+0:? 4.000000
+0:? 4.000000
+0:? 4.000000
+0:? Linker Objects
+
+SPIR-V is not generated for failed compile or link
diff --git a/chromium/third_party/glslang/src/Test/baseResults/hlsl.intrinsics.vert.out b/chromium/third_party/glslang/src/Test/baseResults/hlsl.intrinsics.vert.out
new file mode 100644
index 00000000000..6f92fc36598
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/hlsl.intrinsics.vert.out
@@ -0,0 +1,2868 @@
+hlsl.intrinsics.vert
+Shader version: 450
+0:? Sequence
+0:59 Function Definition: VertexShaderFunction(f1;f1;f1; (temp float)
+0:2 Function Parameters:
+0:2 'inF0' (temp float)
+0:2 'inF1' (temp float)
+0:2 'inF2' (temp float)
+0:? Sequence
+0:3 all (global bool)
+0:3 'inF0' (temp float)
+0:4 Absolute value (global float)
+0:4 'inF0' (temp float)
+0:5 arc cosine (global float)
+0:5 'inF0' (temp float)
+0:6 any (global bool)
+0:6 'inF0' (temp float)
+0:7 arc sine (global float)
+0:7 'inF0' (temp float)
+0:8 arc tangent (global float)
+0:8 'inF0' (temp float)
+0:9 arc tangent (global float)
+0:9 'inF0' (temp float)
+0:9 'inF1' (temp float)
+0:10 Ceiling (global float)
+0:10 'inF0' (temp float)
+0:11 clamp (global float)
+0:11 'inF0' (temp float)
+0:11 'inF1' (temp float)
+0:11 'inF2' (temp float)
+0:12 cosine (global float)
+0:12 'inF0' (temp float)
+0:13 hyp. cosine (global float)
+0:13 'inF0' (temp float)
+0:14 bitCount (global uint)
+0:14 Constant:
+0:14 7 (const uint)
+0:15 degrees (global float)
+0:15 'inF0' (temp float)
+0:19 exp (global float)
+0:19 'inF0' (temp float)
+0:20 exp2 (global float)
+0:20 'inF0' (temp float)
+0:21 findMSB (global int)
+0:21 Constant:
+0:21 7 (const int)
+0:22 findLSB (global int)
+0:22 Constant:
+0:22 7 (const int)
+0:23 Floor (global float)
+0:23 'inF0' (temp float)
+0:25 mod (global float)
+0:25 'inF0' (temp float)
+0:25 'inF1' (temp float)
+0:26 Fraction (global float)
+0:26 'inF0' (temp float)
+0:27 frexp (global float)
+0:27 'inF0' (temp float)
+0:27 'inF1' (temp float)
+0:28 fwidth (global float)
+0:28 'inF0' (temp float)
+0:29 isinf (global bool)
+0:29 'inF0' (temp float)
+0:30 isnan (global bool)
+0:30 'inF0' (temp float)
+0:31 ldexp (global float)
+0:31 'inF0' (temp float)
+0:31 'inF1' (temp float)
+0:32 log (global float)
+0:32 'inF0' (temp float)
+0:33 component-wise multiply (temp float)
+0:33 log2 (temp float)
+0:33 'inF0' (temp float)
+0:33 Constant:
+0:33 0.301030
+0:34 log2 (global float)
+0:34 'inF0' (temp float)
+0:35 max (global float)
+0:35 'inF0' (temp float)
+0:35 'inF1' (temp float)
+0:36 min (global float)
+0:36 'inF0' (temp float)
+0:36 'inF1' (temp float)
+0:38 pow (global float)
+0:38 'inF0' (temp float)
+0:38 'inF1' (temp float)
+0:39 radians (global float)
+0:39 'inF0' (temp float)
+0:40 bitFieldReverse (global uint)
+0:40 Constant:
+0:40 2 (const uint)
+0:41 roundEven (global float)
+0:41 'inF0' (temp float)
+0:42 inverse sqrt (global float)
+0:42 'inF0' (temp float)
+0:43 clamp (global float)
+0:43 'inF0' (temp float)
+0:43 Constant:
+0:43 0.000000
+0:43 Constant:
+0:43 1.000000
+0:44 Sign (global float)
+0:44 'inF0' (temp float)
+0:45 sine (global float)
+0:45 'inF0' (temp float)
+0:46 Sequence
+0:46 move second child to first child (temp float)
+0:46 'inF1' (temp float)
+0:46 sine (temp float)
+0:46 'inF0' (temp float)
+0:46 move second child to first child (temp float)
+0:46 'inF2' (temp float)
+0:46 cosine (temp float)
+0:46 'inF0' (temp float)
+0:47 hyp. sine (global float)
+0:47 'inF0' (temp float)
+0:48 smoothstep (global float)
+0:48 'inF0' (temp float)
+0:48 'inF1' (temp float)
+0:48 'inF2' (temp float)
+0:49 sqrt (global float)
+0:49 'inF0' (temp float)
+0:50 step (global float)
+0:50 'inF0' (temp float)
+0:50 'inF1' (temp float)
+0:51 tangent (global float)
+0:51 'inF0' (temp float)
+0:52 hyp. tangent (global float)
+0:52 'inF0' (temp float)
+0:54 trunc (global float)
+0:54 'inF0' (temp float)
+0:56 Branch: Return with expression
+0:56 Constant:
+0:56 0.000000
+0:65 Function Definition: VertexShaderFunction(vf1;vf1;vf1; (temp 1-component vector of float)
+0:60 Function Parameters:
+0:60 'inF0' (temp 1-component vector of float)
+0:60 'inF1' (temp 1-component vector of float)
+0:60 'inF2' (temp 1-component vector of float)
+0:? Sequence
+0:62 Branch: Return with expression
+0:62 Constant:
+0:62 0.000000
+0:131 Function Definition: VertexShaderFunction(vf2;vf2;vf2; (temp 2-component vector of float)
+0:66 Function Parameters:
+0:66 'inF0' (temp 2-component vector of float)
+0:66 'inF1' (temp 2-component vector of float)
+0:66 'inF2' (temp 2-component vector of float)
+0:? Sequence
+0:67 all (global bool)
+0:67 'inF0' (temp 2-component vector of float)
+0:68 Absolute value (global 2-component vector of float)
+0:68 'inF0' (temp 2-component vector of float)
+0:69 arc cosine (global 2-component vector of float)
+0:69 'inF0' (temp 2-component vector of float)
+0:70 any (global bool)
+0:70 'inF0' (temp 2-component vector of float)
+0:71 arc sine (global 2-component vector of float)
+0:71 'inF0' (temp 2-component vector of float)
+0:72 arc tangent (global 2-component vector of float)
+0:72 'inF0' (temp 2-component vector of float)
+0:73 arc tangent (global 2-component vector of float)
+0:73 'inF0' (temp 2-component vector of float)
+0:73 'inF1' (temp 2-component vector of float)
+0:74 Ceiling (global 2-component vector of float)
+0:74 'inF0' (temp 2-component vector of float)
+0:75 clamp (global 2-component vector of float)
+0:75 'inF0' (temp 2-component vector of float)
+0:75 'inF1' (temp 2-component vector of float)
+0:75 'inF2' (temp 2-component vector of float)
+0:76 cosine (global 2-component vector of float)
+0:76 'inF0' (temp 2-component vector of float)
+0:77 hyp. cosine (global 2-component vector of float)
+0:77 'inF0' (temp 2-component vector of float)
+0:? bitCount (global 2-component vector of uint)
+0:? Constant:
+0:? 7 (const uint)
+0:? 3 (const uint)
+0:79 degrees (global 2-component vector of float)
+0:79 'inF0' (temp 2-component vector of float)
+0:80 distance (global float)
+0:80 'inF0' (temp 2-component vector of float)
+0:80 'inF1' (temp 2-component vector of float)
+0:81 dot-product (global float)
+0:81 'inF0' (temp 2-component vector of float)
+0:81 'inF1' (temp 2-component vector of float)
+0:85 exp (global 2-component vector of float)
+0:85 'inF0' (temp 2-component vector of float)
+0:86 exp2 (global 2-component vector of float)
+0:86 'inF0' (temp 2-component vector of float)
+0:87 face-forward (global 2-component vector of float)
+0:87 'inF0' (temp 2-component vector of float)
+0:87 'inF1' (temp 2-component vector of float)
+0:87 'inF2' (temp 2-component vector of float)
+0:88 findMSB (global int)
+0:88 Constant:
+0:88 7 (const int)
+0:89 findLSB (global int)
+0:89 Constant:
+0:89 7 (const int)
+0:90 Floor (global 2-component vector of float)
+0:90 'inF0' (temp 2-component vector of float)
+0:92 mod (global 2-component vector of float)
+0:92 'inF0' (temp 2-component vector of float)
+0:92 'inF1' (temp 2-component vector of float)
+0:93 Fraction (global 2-component vector of float)
+0:93 'inF0' (temp 2-component vector of float)
+0:94 frexp (global 2-component vector of float)
+0:94 'inF0' (temp 2-component vector of float)
+0:94 'inF1' (temp 2-component vector of float)
+0:95 fwidth (global 2-component vector of float)
+0:95 'inF0' (temp 2-component vector of float)
+0:96 isinf (global 2-component vector of bool)
+0:96 'inF0' (temp 2-component vector of float)
+0:97 isnan (global 2-component vector of bool)
+0:97 'inF0' (temp 2-component vector of float)
+0:98 ldexp (global 2-component vector of float)
+0:98 'inF0' (temp 2-component vector of float)
+0:98 'inF1' (temp 2-component vector of float)
+0:99 length (global float)
+0:99 'inF0' (temp 2-component vector of float)
+0:100 log (global 2-component vector of float)
+0:100 'inF0' (temp 2-component vector of float)
+0:101 vector-scale (temp 2-component vector of float)
+0:101 log2 (temp 2-component vector of float)
+0:101 'inF0' (temp 2-component vector of float)
+0:101 Constant:
+0:101 0.301030
+0:102 log2 (global 2-component vector of float)
+0:102 'inF0' (temp 2-component vector of float)
+0:103 max (global 2-component vector of float)
+0:103 'inF0' (temp 2-component vector of float)
+0:103 'inF1' (temp 2-component vector of float)
+0:104 min (global 2-component vector of float)
+0:104 'inF0' (temp 2-component vector of float)
+0:104 'inF1' (temp 2-component vector of float)
+0:106 normalize (global 2-component vector of float)
+0:106 'inF0' (temp 2-component vector of float)
+0:107 pow (global 2-component vector of float)
+0:107 'inF0' (temp 2-component vector of float)
+0:107 'inF1' (temp 2-component vector of float)
+0:108 radians (global 2-component vector of float)
+0:108 'inF0' (temp 2-component vector of float)
+0:109 reflect (global 2-component vector of float)
+0:109 'inF0' (temp 2-component vector of float)
+0:109 'inF1' (temp 2-component vector of float)
+0:110 refract (global 2-component vector of float)
+0:110 'inF0' (temp 2-component vector of float)
+0:110 'inF1' (temp 2-component vector of float)
+0:110 Constant:
+0:110 2.000000
+0:? bitFieldReverse (global 2-component vector of uint)
+0:? Constant:
+0:? 1 (const uint)
+0:? 2 (const uint)
+0:112 roundEven (global 2-component vector of float)
+0:112 'inF0' (temp 2-component vector of float)
+0:113 inverse sqrt (global 2-component vector of float)
+0:113 'inF0' (temp 2-component vector of float)
+0:114 clamp (global 2-component vector of float)
+0:114 'inF0' (temp 2-component vector of float)
+0:114 Constant:
+0:114 0.000000
+0:114 Constant:
+0:114 1.000000
+0:115 Sign (global 2-component vector of float)
+0:115 'inF0' (temp 2-component vector of float)
+0:116 sine (global 2-component vector of float)
+0:116 'inF0' (temp 2-component vector of float)
+0:117 Sequence
+0:117 move second child to first child (temp 2-component vector of float)
+0:117 'inF1' (temp 2-component vector of float)
+0:117 sine (temp 2-component vector of float)
+0:117 'inF0' (temp 2-component vector of float)
+0:117 move second child to first child (temp 2-component vector of float)
+0:117 'inF2' (temp 2-component vector of float)
+0:117 cosine (temp 2-component vector of float)
+0:117 'inF0' (temp 2-component vector of float)
+0:118 hyp. sine (global 2-component vector of float)
+0:118 'inF0' (temp 2-component vector of float)
+0:119 smoothstep (global 2-component vector of float)
+0:119 'inF0' (temp 2-component vector of float)
+0:119 'inF1' (temp 2-component vector of float)
+0:119 'inF2' (temp 2-component vector of float)
+0:120 sqrt (global 2-component vector of float)
+0:120 'inF0' (temp 2-component vector of float)
+0:121 step (global 2-component vector of float)
+0:121 'inF0' (temp 2-component vector of float)
+0:121 'inF1' (temp 2-component vector of float)
+0:122 tangent (global 2-component vector of float)
+0:122 'inF0' (temp 2-component vector of float)
+0:123 hyp. tangent (global 2-component vector of float)
+0:123 'inF0' (temp 2-component vector of float)
+0:125 trunc (global 2-component vector of float)
+0:125 'inF0' (temp 2-component vector of float)
+0:128 Branch: Return with expression
+0:? Constant:
+0:? 1.000000
+0:? 2.000000
+0:198 Function Definition: VertexShaderFunction(vf3;vf3;vf3; (temp 3-component vector of float)
+0:132 Function Parameters:
+0:132 'inF0' (temp 3-component vector of float)
+0:132 'inF1' (temp 3-component vector of float)
+0:132 'inF2' (temp 3-component vector of float)
+0:? Sequence
+0:133 all (global bool)
+0:133 'inF0' (temp 3-component vector of float)
+0:134 Absolute value (global 3-component vector of float)
+0:134 'inF0' (temp 3-component vector of float)
+0:135 arc cosine (global 3-component vector of float)
+0:135 'inF0' (temp 3-component vector of float)
+0:136 any (global bool)
+0:136 'inF0' (temp 3-component vector of float)
+0:137 arc sine (global 3-component vector of float)
+0:137 'inF0' (temp 3-component vector of float)
+0:138 arc tangent (global 3-component vector of float)
+0:138 'inF0' (temp 3-component vector of float)
+0:139 arc tangent (global 3-component vector of float)
+0:139 'inF0' (temp 3-component vector of float)
+0:139 'inF1' (temp 3-component vector of float)
+0:140 Ceiling (global 3-component vector of float)
+0:140 'inF0' (temp 3-component vector of float)
+0:141 clamp (global 3-component vector of float)
+0:141 'inF0' (temp 3-component vector of float)
+0:141 'inF1' (temp 3-component vector of float)
+0:141 'inF2' (temp 3-component vector of float)
+0:142 cosine (global 3-component vector of float)
+0:142 'inF0' (temp 3-component vector of float)
+0:143 hyp. cosine (global 3-component vector of float)
+0:143 'inF0' (temp 3-component vector of float)
+0:? bitCount (global 3-component vector of uint)
+0:? Constant:
+0:? 7 (const uint)
+0:? 3 (const uint)
+0:? 5 (const uint)
+0:145 cross-product (global 3-component vector of float)
+0:145 'inF0' (temp 3-component vector of float)
+0:145 'inF1' (temp 3-component vector of float)
+0:146 degrees (global 3-component vector of float)
+0:146 'inF0' (temp 3-component vector of float)
+0:147 distance (global float)
+0:147 'inF0' (temp 3-component vector of float)
+0:147 'inF1' (temp 3-component vector of float)
+0:148 dot-product (global float)
+0:148 'inF0' (temp 3-component vector of float)
+0:148 'inF1' (temp 3-component vector of float)
+0:152 exp (global 3-component vector of float)
+0:152 'inF0' (temp 3-component vector of float)
+0:153 exp2 (global 3-component vector of float)
+0:153 'inF0' (temp 3-component vector of float)
+0:154 face-forward (global 3-component vector of float)
+0:154 'inF0' (temp 3-component vector of float)
+0:154 'inF1' (temp 3-component vector of float)
+0:154 'inF2' (temp 3-component vector of float)
+0:155 findMSB (global int)
+0:155 Constant:
+0:155 7 (const int)
+0:156 findLSB (global int)
+0:156 Constant:
+0:156 7 (const int)
+0:157 Floor (global 3-component vector of float)
+0:157 'inF0' (temp 3-component vector of float)
+0:159 mod (global 3-component vector of float)
+0:159 'inF0' (temp 3-component vector of float)
+0:159 'inF1' (temp 3-component vector of float)
+0:160 Fraction (global 3-component vector of float)
+0:160 'inF0' (temp 3-component vector of float)
+0:161 frexp (global 3-component vector of float)
+0:161 'inF0' (temp 3-component vector of float)
+0:161 'inF1' (temp 3-component vector of float)
+0:162 fwidth (global 3-component vector of float)
+0:162 'inF0' (temp 3-component vector of float)
+0:163 isinf (global 3-component vector of bool)
+0:163 'inF0' (temp 3-component vector of float)
+0:164 isnan (global 3-component vector of bool)
+0:164 'inF0' (temp 3-component vector of float)
+0:165 ldexp (global 3-component vector of float)
+0:165 'inF0' (temp 3-component vector of float)
+0:165 'inF1' (temp 3-component vector of float)
+0:166 length (global float)
+0:166 'inF0' (temp 3-component vector of float)
+0:167 log (global 3-component vector of float)
+0:167 'inF0' (temp 3-component vector of float)
+0:168 vector-scale (temp 3-component vector of float)
+0:168 log2 (temp 3-component vector of float)
+0:168 'inF0' (temp 3-component vector of float)
+0:168 Constant:
+0:168 0.301030
+0:169 log2 (global 3-component vector of float)
+0:169 'inF0' (temp 3-component vector of float)
+0:170 max (global 3-component vector of float)
+0:170 'inF0' (temp 3-component vector of float)
+0:170 'inF1' (temp 3-component vector of float)
+0:171 min (global 3-component vector of float)
+0:171 'inF0' (temp 3-component vector of float)
+0:171 'inF1' (temp 3-component vector of float)
+0:173 normalize (global 3-component vector of float)
+0:173 'inF0' (temp 3-component vector of float)
+0:174 pow (global 3-component vector of float)
+0:174 'inF0' (temp 3-component vector of float)
+0:174 'inF1' (temp 3-component vector of float)
+0:175 radians (global 3-component vector of float)
+0:175 'inF0' (temp 3-component vector of float)
+0:176 reflect (global 3-component vector of float)
+0:176 'inF0' (temp 3-component vector of float)
+0:176 'inF1' (temp 3-component vector of float)
+0:177 refract (global 3-component vector of float)
+0:177 'inF0' (temp 3-component vector of float)
+0:177 'inF1' (temp 3-component vector of float)
+0:177 Constant:
+0:177 2.000000
+0:? bitFieldReverse (global 3-component vector of uint)
+0:? Constant:
+0:? 1 (const uint)
+0:? 2 (const uint)
+0:? 3 (const uint)
+0:179 roundEven (global 3-component vector of float)
+0:179 'inF0' (temp 3-component vector of float)
+0:180 inverse sqrt (global 3-component vector of float)
+0:180 'inF0' (temp 3-component vector of float)
+0:181 clamp (global 3-component vector of float)
+0:181 'inF0' (temp 3-component vector of float)
+0:181 Constant:
+0:181 0.000000
+0:181 Constant:
+0:181 1.000000
+0:182 Sign (global 3-component vector of float)
+0:182 'inF0' (temp 3-component vector of float)
+0:183 sine (global 3-component vector of float)
+0:183 'inF0' (temp 3-component vector of float)
+0:184 Sequence
+0:184 move second child to first child (temp 3-component vector of float)
+0:184 'inF1' (temp 3-component vector of float)
+0:184 sine (temp 3-component vector of float)
+0:184 'inF0' (temp 3-component vector of float)
+0:184 move second child to first child (temp 3-component vector of float)
+0:184 'inF2' (temp 3-component vector of float)
+0:184 cosine (temp 3-component vector of float)
+0:184 'inF0' (temp 3-component vector of float)
+0:185 hyp. sine (global 3-component vector of float)
+0:185 'inF0' (temp 3-component vector of float)
+0:186 smoothstep (global 3-component vector of float)
+0:186 'inF0' (temp 3-component vector of float)
+0:186 'inF1' (temp 3-component vector of float)
+0:186 'inF2' (temp 3-component vector of float)
+0:187 sqrt (global 3-component vector of float)
+0:187 'inF0' (temp 3-component vector of float)
+0:188 step (global 3-component vector of float)
+0:188 'inF0' (temp 3-component vector of float)
+0:188 'inF1' (temp 3-component vector of float)
+0:189 tangent (global 3-component vector of float)
+0:189 'inF0' (temp 3-component vector of float)
+0:190 hyp. tangent (global 3-component vector of float)
+0:190 'inF0' (temp 3-component vector of float)
+0:192 trunc (global 3-component vector of float)
+0:192 'inF0' (temp 3-component vector of float)
+0:195 Branch: Return with expression
+0:? Constant:
+0:? 1.000000
+0:? 2.000000
+0:? 3.000000
+0:314 Function Definition: VertexShaderFunction(vf4;vf4;vf4; (temp 4-component vector of float)
+0:199 Function Parameters:
+0:199 'inF0' (temp 4-component vector of float)
+0:199 'inF1' (temp 4-component vector of float)
+0:199 'inF2' (temp 4-component vector of float)
+0:? Sequence
+0:200 all (global bool)
+0:200 'inF0' (temp 4-component vector of float)
+0:201 Absolute value (global 4-component vector of float)
+0:201 'inF0' (temp 4-component vector of float)
+0:202 arc cosine (global 4-component vector of float)
+0:202 'inF0' (temp 4-component vector of float)
+0:203 any (global bool)
+0:203 'inF0' (temp 4-component vector of float)
+0:204 arc sine (global 4-component vector of float)
+0:204 'inF0' (temp 4-component vector of float)
+0:205 arc tangent (global 4-component vector of float)
+0:205 'inF0' (temp 4-component vector of float)
+0:206 arc tangent (global 4-component vector of float)
+0:206 'inF0' (temp 4-component vector of float)
+0:206 'inF1' (temp 4-component vector of float)
+0:207 Ceiling (global 4-component vector of float)
+0:207 'inF0' (temp 4-component vector of float)
+0:208 clamp (global 4-component vector of float)
+0:208 'inF0' (temp 4-component vector of float)
+0:208 'inF1' (temp 4-component vector of float)
+0:208 'inF2' (temp 4-component vector of float)
+0:209 cosine (global 4-component vector of float)
+0:209 'inF0' (temp 4-component vector of float)
+0:210 hyp. cosine (global 4-component vector of float)
+0:210 'inF0' (temp 4-component vector of float)
+0:? bitCount (global 4-component vector of uint)
+0:? Constant:
+0:? 7 (const uint)
+0:? 3 (const uint)
+0:? 5 (const uint)
+0:? 2 (const uint)
+0:212 degrees (global 4-component vector of float)
+0:212 'inF0' (temp 4-component vector of float)
+0:213 distance (global float)
+0:213 'inF0' (temp 4-component vector of float)
+0:213 'inF1' (temp 4-component vector of float)
+0:214 dot-product (global float)
+0:214 'inF0' (temp 4-component vector of float)
+0:214 'inF1' (temp 4-component vector of float)
+0:215 Construct vec4 (temp float)
+0:215 Constant:
+0:215 1.000000
+0:215 component-wise multiply (temp float)
+0:215 direct index (temp float)
+0:215 'inF0' (temp 4-component vector of float)
+0:215 Constant:
+0:215 1 (const int)
+0:215 direct index (temp float)
+0:215 'inF1' (temp 4-component vector of float)
+0:215 Constant:
+0:215 1 (const int)
+0:215 direct index (temp float)
+0:215 'inF0' (temp 4-component vector of float)
+0:215 Constant:
+0:215 2 (const int)
+0:215 direct index (temp float)
+0:215 'inF1' (temp 4-component vector of float)
+0:215 Constant:
+0:215 3 (const int)
+0:219 exp (global 4-component vector of float)
+0:219 'inF0' (temp 4-component vector of float)
+0:220 exp2 (global 4-component vector of float)
+0:220 'inF0' (temp 4-component vector of float)
+0:221 face-forward (global 4-component vector of float)
+0:221 'inF0' (temp 4-component vector of float)
+0:221 'inF1' (temp 4-component vector of float)
+0:221 'inF2' (temp 4-component vector of float)
+0:222 findMSB (global int)
+0:222 Constant:
+0:222 7 (const int)
+0:223 findLSB (global int)
+0:223 Constant:
+0:223 7 (const int)
+0:224 Floor (global 4-component vector of float)
+0:224 'inF0' (temp 4-component vector of float)
+0:226 mod (global 4-component vector of float)
+0:226 'inF0' (temp 4-component vector of float)
+0:226 'inF1' (temp 4-component vector of float)
+0:227 Fraction (global 4-component vector of float)
+0:227 'inF0' (temp 4-component vector of float)
+0:228 frexp (global 4-component vector of float)
+0:228 'inF0' (temp 4-component vector of float)
+0:228 'inF1' (temp 4-component vector of float)
+0:229 fwidth (global 4-component vector of float)
+0:229 'inF0' (temp 4-component vector of float)
+0:230 isinf (global 4-component vector of bool)
+0:230 'inF0' (temp 4-component vector of float)
+0:231 isnan (global 4-component vector of bool)
+0:231 'inF0' (temp 4-component vector of float)
+0:232 ldexp (global 4-component vector of float)
+0:232 'inF0' (temp 4-component vector of float)
+0:232 'inF1' (temp 4-component vector of float)
+0:233 length (global float)
+0:233 'inF0' (temp 4-component vector of float)
+0:234 log (global 4-component vector of float)
+0:234 'inF0' (temp 4-component vector of float)
+0:235 vector-scale (temp 4-component vector of float)
+0:235 log2 (temp 4-component vector of float)
+0:235 'inF0' (temp 4-component vector of float)
+0:235 Constant:
+0:235 0.301030
+0:236 log2 (global 4-component vector of float)
+0:236 'inF0' (temp 4-component vector of float)
+0:237 max (global 4-component vector of float)
+0:237 'inF0' (temp 4-component vector of float)
+0:237 'inF1' (temp 4-component vector of float)
+0:238 min (global 4-component vector of float)
+0:238 'inF0' (temp 4-component vector of float)
+0:238 'inF1' (temp 4-component vector of float)
+0:240 normalize (global 4-component vector of float)
+0:240 'inF0' (temp 4-component vector of float)
+0:241 pow (global 4-component vector of float)
+0:241 'inF0' (temp 4-component vector of float)
+0:241 'inF1' (temp 4-component vector of float)
+0:242 radians (global 4-component vector of float)
+0:242 'inF0' (temp 4-component vector of float)
+0:243 reflect (global 4-component vector of float)
+0:243 'inF0' (temp 4-component vector of float)
+0:243 'inF1' (temp 4-component vector of float)
+0:244 refract (global 4-component vector of float)
+0:244 'inF0' (temp 4-component vector of float)
+0:244 'inF1' (temp 4-component vector of float)
+0:244 Constant:
+0:244 2.000000
+0:? bitFieldReverse (global 4-component vector of uint)
+0:? Constant:
+0:? 1 (const uint)
+0:? 2 (const uint)
+0:? 3 (const uint)
+0:? 4 (const uint)
+0:246 roundEven (global 4-component vector of float)
+0:246 'inF0' (temp 4-component vector of float)
+0:247 inverse sqrt (global 4-component vector of float)
+0:247 'inF0' (temp 4-component vector of float)
+0:248 clamp (global 4-component vector of float)
+0:248 'inF0' (temp 4-component vector of float)
+0:248 Constant:
+0:248 0.000000
+0:248 Constant:
+0:248 1.000000
+0:249 Sign (global 4-component vector of float)
+0:249 'inF0' (temp 4-component vector of float)
+0:250 sine (global 4-component vector of float)
+0:250 'inF0' (temp 4-component vector of float)
+0:251 Sequence
+0:251 move second child to first child (temp 4-component vector of float)
+0:251 'inF1' (temp 4-component vector of float)
+0:251 sine (temp 4-component vector of float)
+0:251 'inF0' (temp 4-component vector of float)
+0:251 move second child to first child (temp 4-component vector of float)
+0:251 'inF2' (temp 4-component vector of float)
+0:251 cosine (temp 4-component vector of float)
+0:251 'inF0' (temp 4-component vector of float)
+0:252 hyp. sine (global 4-component vector of float)
+0:252 'inF0' (temp 4-component vector of float)
+0:253 smoothstep (global 4-component vector of float)
+0:253 'inF0' (temp 4-component vector of float)
+0:253 'inF1' (temp 4-component vector of float)
+0:253 'inF2' (temp 4-component vector of float)
+0:254 sqrt (global 4-component vector of float)
+0:254 'inF0' (temp 4-component vector of float)
+0:255 step (global 4-component vector of float)
+0:255 'inF0' (temp 4-component vector of float)
+0:255 'inF1' (temp 4-component vector of float)
+0:256 tangent (global 4-component vector of float)
+0:256 'inF0' (temp 4-component vector of float)
+0:257 hyp. tangent (global 4-component vector of float)
+0:257 'inF0' (temp 4-component vector of float)
+0:259 trunc (global 4-component vector of float)
+0:259 'inF0' (temp 4-component vector of float)
+0:262 Branch: Return with expression
+0:? Constant:
+0:? 1.000000
+0:? 2.000000
+0:? 3.000000
+0:? 4.000000
+0:323 Function Definition: VertexShaderFunction(mf22;mf22;mf22; (temp 2X2 matrix of float)
+0:315 Function Parameters:
+0:315 'inF0' (temp 2X2 matrix of float)
+0:315 'inF1' (temp 2X2 matrix of float)
+0:315 'inF2' (temp 2X2 matrix of float)
+0:? Sequence
+0:317 all (global bool)
+0:317 'inF0' (temp 2X2 matrix of float)
+0:317 Absolute value (global 2X2 matrix of float)
+0:317 'inF0' (temp 2X2 matrix of float)
+0:317 arc cosine (global 2X2 matrix of float)
+0:317 'inF0' (temp 2X2 matrix of float)
+0:317 any (global bool)
+0:317 'inF0' (temp 2X2 matrix of float)
+0:317 arc sine (global 2X2 matrix of float)
+0:317 'inF0' (temp 2X2 matrix of float)
+0:317 arc tangent (global 2X2 matrix of float)
+0:317 'inF0' (temp 2X2 matrix of float)
+0:317 arc tangent (global 2X2 matrix of float)
+0:317 'inF0' (temp 2X2 matrix of float)
+0:317 'inF1' (temp 2X2 matrix of float)
+0:317 Ceiling (global 2X2 matrix of float)
+0:317 'inF0' (temp 2X2 matrix of float)
+0:317 clamp (global 2X2 matrix of float)
+0:317 'inF0' (temp 2X2 matrix of float)
+0:317 'inF1' (temp 2X2 matrix of float)
+0:317 'inF2' (temp 2X2 matrix of float)
+0:317 cosine (global 2X2 matrix of float)
+0:317 'inF0' (temp 2X2 matrix of float)
+0:317 hyp. cosine (global 2X2 matrix of float)
+0:317 'inF0' (temp 2X2 matrix of float)
+0:317 degrees (global 2X2 matrix of float)
+0:317 'inF0' (temp 2X2 matrix of float)
+0:317 determinant (global float)
+0:317 'inF0' (temp 2X2 matrix of float)
+0:317 exp (global 2X2 matrix of float)
+0:317 'inF0' (temp 2X2 matrix of float)
+0:317 exp2 (global 2X2 matrix of float)
+0:317 'inF0' (temp 2X2 matrix of float)
+0:317 findMSB (global int)
+0:317 Constant:
+0:317 7 (const int)
+0:317 findLSB (global int)
+0:317 Constant:
+0:317 7 (const int)
+0:317 Floor (global 2X2 matrix of float)
+0:317 'inF0' (temp 2X2 matrix of float)
+0:317 mod (global 2X2 matrix of float)
+0:317 'inF0' (temp 2X2 matrix of float)
+0:317 'inF1' (temp 2X2 matrix of float)
+0:317 Fraction (global 2X2 matrix of float)
+0:317 'inF0' (temp 2X2 matrix of float)
+0:317 frexp (global 2X2 matrix of float)
+0:317 'inF0' (temp 2X2 matrix of float)
+0:317 'inF1' (temp 2X2 matrix of float)
+0:317 fwidth (global 2X2 matrix of float)
+0:317 'inF0' (temp 2X2 matrix of float)
+0:317 ldexp (global 2X2 matrix of float)
+0:317 'inF0' (temp 2X2 matrix of float)
+0:317 'inF1' (temp 2X2 matrix of float)
+0:317 log (global 2X2 matrix of float)
+0:317 'inF0' (temp 2X2 matrix of float)
+0:317 matrix-scale (temp 2X2 matrix of float)
+0:317 log2 (temp 2X2 matrix of float)
+0:317 'inF0' (temp 2X2 matrix of float)
+0:317 Constant:
+0:317 0.301030
+0:317 log2 (global 2X2 matrix of float)
+0:317 'inF0' (temp 2X2 matrix of float)
+0:317 max (global 2X2 matrix of float)
+0:317 'inF0' (temp 2X2 matrix of float)
+0:317 'inF1' (temp 2X2 matrix of float)
+0:317 min (global 2X2 matrix of float)
+0:317 'inF0' (temp 2X2 matrix of float)
+0:317 'inF1' (temp 2X2 matrix of float)
+0:317 pow (global 2X2 matrix of float)
+0:317 'inF0' (temp 2X2 matrix of float)
+0:317 'inF1' (temp 2X2 matrix of float)
+0:317 radians (global 2X2 matrix of float)
+0:317 'inF0' (temp 2X2 matrix of float)
+0:317 roundEven (global 2X2 matrix of float)
+0:317 'inF0' (temp 2X2 matrix of float)
+0:317 inverse sqrt (global 2X2 matrix of float)
+0:317 'inF0' (temp 2X2 matrix of float)
+0:317 clamp (global 2X2 matrix of float)
+0:317 'inF0' (temp 2X2 matrix of float)
+0:317 Constant:
+0:317 0.000000
+0:317 Constant:
+0:317 1.000000
+0:317 Sign (global 2X2 matrix of float)
+0:317 'inF0' (temp 2X2 matrix of float)
+0:317 sine (global 2X2 matrix of float)
+0:317 'inF0' (temp 2X2 matrix of float)
+0:317 Sequence
+0:317 move second child to first child (temp 2X2 matrix of float)
+0:317 'inF1' (temp 2X2 matrix of float)
+0:317 sine (temp 2X2 matrix of float)
+0:317 'inF0' (temp 2X2 matrix of float)
+0:317 move second child to first child (temp 2X2 matrix of float)
+0:317 'inF2' (temp 2X2 matrix of float)
+0:317 cosine (temp 2X2 matrix of float)
+0:317 'inF0' (temp 2X2 matrix of float)
+0:317 hyp. sine (global 2X2 matrix of float)
+0:317 'inF0' (temp 2X2 matrix of float)
+0:317 smoothstep (global 2X2 matrix of float)
+0:317 'inF0' (temp 2X2 matrix of float)
+0:317 'inF1' (temp 2X2 matrix of float)
+0:317 'inF2' (temp 2X2 matrix of float)
+0:317 sqrt (global 2X2 matrix of float)
+0:317 'inF0' (temp 2X2 matrix of float)
+0:317 step (global 2X2 matrix of float)
+0:317 'inF0' (temp 2X2 matrix of float)
+0:317 'inF1' (temp 2X2 matrix of float)
+0:317 tangent (global 2X2 matrix of float)
+0:317 'inF0' (temp 2X2 matrix of float)
+0:317 hyp. tangent (global 2X2 matrix of float)
+0:317 'inF0' (temp 2X2 matrix of float)
+0:317 transpose (global 2X2 matrix of float)
+0:317 'inF0' (temp 2X2 matrix of float)
+0:317 trunc (global 2X2 matrix of float)
+0:317 'inF0' (temp 2X2 matrix of float)
+0:320 Branch: Return with expression
+0:? Constant:
+0:? 2.000000
+0:? 2.000000
+0:? 2.000000
+0:? 2.000000
+0:332 Function Definition: VertexShaderFunction(mf33;mf33;mf33; (temp 3X3 matrix of float)
+0:324 Function Parameters:
+0:324 'inF0' (temp 3X3 matrix of float)
+0:324 'inF1' (temp 3X3 matrix of float)
+0:324 'inF2' (temp 3X3 matrix of float)
+0:? Sequence
+0:326 all (global bool)
+0:326 'inF0' (temp 3X3 matrix of float)
+0:326 Absolute value (global 3X3 matrix of float)
+0:326 'inF0' (temp 3X3 matrix of float)
+0:326 arc cosine (global 3X3 matrix of float)
+0:326 'inF0' (temp 3X3 matrix of float)
+0:326 any (global bool)
+0:326 'inF0' (temp 3X3 matrix of float)
+0:326 arc sine (global 3X3 matrix of float)
+0:326 'inF0' (temp 3X3 matrix of float)
+0:326 arc tangent (global 3X3 matrix of float)
+0:326 'inF0' (temp 3X3 matrix of float)
+0:326 arc tangent (global 3X3 matrix of float)
+0:326 'inF0' (temp 3X3 matrix of float)
+0:326 'inF1' (temp 3X3 matrix of float)
+0:326 Ceiling (global 3X3 matrix of float)
+0:326 'inF0' (temp 3X3 matrix of float)
+0:326 clamp (global 3X3 matrix of float)
+0:326 'inF0' (temp 3X3 matrix of float)
+0:326 'inF1' (temp 3X3 matrix of float)
+0:326 'inF2' (temp 3X3 matrix of float)
+0:326 cosine (global 3X3 matrix of float)
+0:326 'inF0' (temp 3X3 matrix of float)
+0:326 hyp. cosine (global 3X3 matrix of float)
+0:326 'inF0' (temp 3X3 matrix of float)
+0:326 degrees (global 3X3 matrix of float)
+0:326 'inF0' (temp 3X3 matrix of float)
+0:326 determinant (global float)
+0:326 'inF0' (temp 3X3 matrix of float)
+0:326 exp (global 3X3 matrix of float)
+0:326 'inF0' (temp 3X3 matrix of float)
+0:326 exp2 (global 3X3 matrix of float)
+0:326 'inF0' (temp 3X3 matrix of float)
+0:326 findMSB (global int)
+0:326 Constant:
+0:326 7 (const int)
+0:326 findLSB (global int)
+0:326 Constant:
+0:326 7 (const int)
+0:326 Floor (global 3X3 matrix of float)
+0:326 'inF0' (temp 3X3 matrix of float)
+0:326 mod (global 3X3 matrix of float)
+0:326 'inF0' (temp 3X3 matrix of float)
+0:326 'inF1' (temp 3X3 matrix of float)
+0:326 Fraction (global 3X3 matrix of float)
+0:326 'inF0' (temp 3X3 matrix of float)
+0:326 frexp (global 3X3 matrix of float)
+0:326 'inF0' (temp 3X3 matrix of float)
+0:326 'inF1' (temp 3X3 matrix of float)
+0:326 fwidth (global 3X3 matrix of float)
+0:326 'inF0' (temp 3X3 matrix of float)
+0:326 ldexp (global 3X3 matrix of float)
+0:326 'inF0' (temp 3X3 matrix of float)
+0:326 'inF1' (temp 3X3 matrix of float)
+0:326 log (global 3X3 matrix of float)
+0:326 'inF0' (temp 3X3 matrix of float)
+0:326 matrix-scale (temp 3X3 matrix of float)
+0:326 log2 (temp 3X3 matrix of float)
+0:326 'inF0' (temp 3X3 matrix of float)
+0:326 Constant:
+0:326 0.301030
+0:326 log2 (global 3X3 matrix of float)
+0:326 'inF0' (temp 3X3 matrix of float)
+0:326 max (global 3X3 matrix of float)
+0:326 'inF0' (temp 3X3 matrix of float)
+0:326 'inF1' (temp 3X3 matrix of float)
+0:326 min (global 3X3 matrix of float)
+0:326 'inF0' (temp 3X3 matrix of float)
+0:326 'inF1' (temp 3X3 matrix of float)
+0:326 pow (global 3X3 matrix of float)
+0:326 'inF0' (temp 3X3 matrix of float)
+0:326 'inF1' (temp 3X3 matrix of float)
+0:326 radians (global 3X3 matrix of float)
+0:326 'inF0' (temp 3X3 matrix of float)
+0:326 roundEven (global 3X3 matrix of float)
+0:326 'inF0' (temp 3X3 matrix of float)
+0:326 inverse sqrt (global 3X3 matrix of float)
+0:326 'inF0' (temp 3X3 matrix of float)
+0:326 clamp (global 3X3 matrix of float)
+0:326 'inF0' (temp 3X3 matrix of float)
+0:326 Constant:
+0:326 0.000000
+0:326 Constant:
+0:326 1.000000
+0:326 Sign (global 3X3 matrix of float)
+0:326 'inF0' (temp 3X3 matrix of float)
+0:326 sine (global 3X3 matrix of float)
+0:326 'inF0' (temp 3X3 matrix of float)
+0:326 Sequence
+0:326 move second child to first child (temp 3X3 matrix of float)
+0:326 'inF1' (temp 3X3 matrix of float)
+0:326 sine (temp 3X3 matrix of float)
+0:326 'inF0' (temp 3X3 matrix of float)
+0:326 move second child to first child (temp 3X3 matrix of float)
+0:326 'inF2' (temp 3X3 matrix of float)
+0:326 cosine (temp 3X3 matrix of float)
+0:326 'inF0' (temp 3X3 matrix of float)
+0:326 hyp. sine (global 3X3 matrix of float)
+0:326 'inF0' (temp 3X3 matrix of float)
+0:326 smoothstep (global 3X3 matrix of float)
+0:326 'inF0' (temp 3X3 matrix of float)
+0:326 'inF1' (temp 3X3 matrix of float)
+0:326 'inF2' (temp 3X3 matrix of float)
+0:326 sqrt (global 3X3 matrix of float)
+0:326 'inF0' (temp 3X3 matrix of float)
+0:326 step (global 3X3 matrix of float)
+0:326 'inF0' (temp 3X3 matrix of float)
+0:326 'inF1' (temp 3X3 matrix of float)
+0:326 tangent (global 3X3 matrix of float)
+0:326 'inF0' (temp 3X3 matrix of float)
+0:326 hyp. tangent (global 3X3 matrix of float)
+0:326 'inF0' (temp 3X3 matrix of float)
+0:326 transpose (global 3X3 matrix of float)
+0:326 'inF0' (temp 3X3 matrix of float)
+0:326 trunc (global 3X3 matrix of float)
+0:326 'inF0' (temp 3X3 matrix of float)
+0:329 Branch: Return with expression
+0:? Constant:
+0:? 3.000000
+0:? 3.000000
+0:? 3.000000
+0:? 3.000000
+0:? 3.000000
+0:? 3.000000
+0:? 3.000000
+0:? 3.000000
+0:? 3.000000
+0:353 Function Definition: VertexShaderFunction(mf44;mf44;mf44; (temp 4X4 matrix of float)
+0:333 Function Parameters:
+0:333 'inF0' (temp 4X4 matrix of float)
+0:333 'inF1' (temp 4X4 matrix of float)
+0:333 'inF2' (temp 4X4 matrix of float)
+0:? Sequence
+0:335 all (global bool)
+0:335 'inF0' (temp 4X4 matrix of float)
+0:335 Absolute value (global 4X4 matrix of float)
+0:335 'inF0' (temp 4X4 matrix of float)
+0:335 arc cosine (global 4X4 matrix of float)
+0:335 'inF0' (temp 4X4 matrix of float)
+0:335 any (global bool)
+0:335 'inF0' (temp 4X4 matrix of float)
+0:335 arc sine (global 4X4 matrix of float)
+0:335 'inF0' (temp 4X4 matrix of float)
+0:335 arc tangent (global 4X4 matrix of float)
+0:335 'inF0' (temp 4X4 matrix of float)
+0:335 arc tangent (global 4X4 matrix of float)
+0:335 'inF0' (temp 4X4 matrix of float)
+0:335 'inF1' (temp 4X4 matrix of float)
+0:335 Ceiling (global 4X4 matrix of float)
+0:335 'inF0' (temp 4X4 matrix of float)
+0:335 clamp (global 4X4 matrix of float)
+0:335 'inF0' (temp 4X4 matrix of float)
+0:335 'inF1' (temp 4X4 matrix of float)
+0:335 'inF2' (temp 4X4 matrix of float)
+0:335 cosine (global 4X4 matrix of float)
+0:335 'inF0' (temp 4X4 matrix of float)
+0:335 hyp. cosine (global 4X4 matrix of float)
+0:335 'inF0' (temp 4X4 matrix of float)
+0:335 degrees (global 4X4 matrix of float)
+0:335 'inF0' (temp 4X4 matrix of float)
+0:335 determinant (global float)
+0:335 'inF0' (temp 4X4 matrix of float)
+0:335 exp (global 4X4 matrix of float)
+0:335 'inF0' (temp 4X4 matrix of float)
+0:335 exp2 (global 4X4 matrix of float)
+0:335 'inF0' (temp 4X4 matrix of float)
+0:335 findMSB (global int)
+0:335 Constant:
+0:335 7 (const int)
+0:335 findLSB (global int)
+0:335 Constant:
+0:335 7 (const int)
+0:335 Floor (global 4X4 matrix of float)
+0:335 'inF0' (temp 4X4 matrix of float)
+0:335 mod (global 4X4 matrix of float)
+0:335 'inF0' (temp 4X4 matrix of float)
+0:335 'inF1' (temp 4X4 matrix of float)
+0:335 Fraction (global 4X4 matrix of float)
+0:335 'inF0' (temp 4X4 matrix of float)
+0:335 frexp (global 4X4 matrix of float)
+0:335 'inF0' (temp 4X4 matrix of float)
+0:335 'inF1' (temp 4X4 matrix of float)
+0:335 fwidth (global 4X4 matrix of float)
+0:335 'inF0' (temp 4X4 matrix of float)
+0:335 ldexp (global 4X4 matrix of float)
+0:335 'inF0' (temp 4X4 matrix of float)
+0:335 'inF1' (temp 4X4 matrix of float)
+0:335 log (global 4X4 matrix of float)
+0:335 'inF0' (temp 4X4 matrix of float)
+0:335 matrix-scale (temp 4X4 matrix of float)
+0:335 log2 (temp 4X4 matrix of float)
+0:335 'inF0' (temp 4X4 matrix of float)
+0:335 Constant:
+0:335 0.301030
+0:335 log2 (global 4X4 matrix of float)
+0:335 'inF0' (temp 4X4 matrix of float)
+0:335 max (global 4X4 matrix of float)
+0:335 'inF0' (temp 4X4 matrix of float)
+0:335 'inF1' (temp 4X4 matrix of float)
+0:335 min (global 4X4 matrix of float)
+0:335 'inF0' (temp 4X4 matrix of float)
+0:335 'inF1' (temp 4X4 matrix of float)
+0:335 pow (global 4X4 matrix of float)
+0:335 'inF0' (temp 4X4 matrix of float)
+0:335 'inF1' (temp 4X4 matrix of float)
+0:335 radians (global 4X4 matrix of float)
+0:335 'inF0' (temp 4X4 matrix of float)
+0:335 roundEven (global 4X4 matrix of float)
+0:335 'inF0' (temp 4X4 matrix of float)
+0:335 inverse sqrt (global 4X4 matrix of float)
+0:335 'inF0' (temp 4X4 matrix of float)
+0:335 clamp (global 4X4 matrix of float)
+0:335 'inF0' (temp 4X4 matrix of float)
+0:335 Constant:
+0:335 0.000000
+0:335 Constant:
+0:335 1.000000
+0:335 Sign (global 4X4 matrix of float)
+0:335 'inF0' (temp 4X4 matrix of float)
+0:335 sine (global 4X4 matrix of float)
+0:335 'inF0' (temp 4X4 matrix of float)
+0:335 Sequence
+0:335 move second child to first child (temp 4X4 matrix of float)
+0:335 'inF1' (temp 4X4 matrix of float)
+0:335 sine (temp 4X4 matrix of float)
+0:335 'inF0' (temp 4X4 matrix of float)
+0:335 move second child to first child (temp 4X4 matrix of float)
+0:335 'inF2' (temp 4X4 matrix of float)
+0:335 cosine (temp 4X4 matrix of float)
+0:335 'inF0' (temp 4X4 matrix of float)
+0:335 hyp. sine (global 4X4 matrix of float)
+0:335 'inF0' (temp 4X4 matrix of float)
+0:335 smoothstep (global 4X4 matrix of float)
+0:335 'inF0' (temp 4X4 matrix of float)
+0:335 'inF1' (temp 4X4 matrix of float)
+0:335 'inF2' (temp 4X4 matrix of float)
+0:335 sqrt (global 4X4 matrix of float)
+0:335 'inF0' (temp 4X4 matrix of float)
+0:335 step (global 4X4 matrix of float)
+0:335 'inF0' (temp 4X4 matrix of float)
+0:335 'inF1' (temp 4X4 matrix of float)
+0:335 tangent (global 4X4 matrix of float)
+0:335 'inF0' (temp 4X4 matrix of float)
+0:335 hyp. tangent (global 4X4 matrix of float)
+0:335 'inF0' (temp 4X4 matrix of float)
+0:335 transpose (global 4X4 matrix of float)
+0:335 'inF0' (temp 4X4 matrix of float)
+0:335 trunc (global 4X4 matrix of float)
+0:335 'inF0' (temp 4X4 matrix of float)
+0:338 Branch: Return with expression
+0:? Constant:
+0:? 4.000000
+0:? 4.000000
+0:? 4.000000
+0:? 4.000000
+0:? 4.000000
+0:? 4.000000
+0:? 4.000000
+0:? 4.000000
+0:? 4.000000
+0:? 4.000000
+0:? 4.000000
+0:? 4.000000
+0:? 4.000000
+0:? 4.000000
+0:? 4.000000
+0:? 4.000000
+0:360 Function Definition: TestGenMul(f1;f1;vf2;vf2;mf22;mf22; (temp void)
+0:356 Function Parameters:
+0:356 'inF0' (temp float)
+0:356 'inF1' (temp float)
+0:356 'inFV0' (temp 2-component vector of float)
+0:356 'inFV1' (temp 2-component vector of float)
+0:356 'inFM0' (temp 2X2 matrix of float)
+0:356 'inFM1' (temp 2X2 matrix of float)
+0:? Sequence
+0:357 move second child to first child (temp float)
+0:357 'r0' (temp float)
+0:357 component-wise multiply (temp float)
+0:357 'inF0' (temp float)
+0:357 'inF1' (temp float)
+0:357 move second child to first child (temp 2-component vector of float)
+0:357 'r1' (temp 2-component vector of float)
+0:357 vector-scale (temp 2-component vector of float)
+0:357 'inFV0' (temp 2-component vector of float)
+0:357 'inF0' (temp float)
+0:357 move second child to first child (temp 2-component vector of float)
+0:357 'r2' (temp 2-component vector of float)
+0:357 vector-scale (temp 2-component vector of float)
+0:357 'inF0' (temp float)
+0:357 'inFV0' (temp 2-component vector of float)
+0:357 move second child to first child (temp float)
+0:357 'r3' (temp float)
+0:357 dot-product (global float)
+0:357 'inFV0' (temp 2-component vector of float)
+0:357 'inFV1' (temp 2-component vector of float)
+0:357 move second child to first child (temp 2-component vector of float)
+0:357 'r4' (temp 2-component vector of float)
+0:357 matrix-times-vector (temp 2-component vector of float)
+0:357 'inFM0' (temp 2X2 matrix of float)
+0:357 'inFV0' (temp 2-component vector of float)
+0:357 move second child to first child (temp 2-component vector of float)
+0:357 'r5' (temp 2-component vector of float)
+0:357 vector-times-matrix (temp 2-component vector of float)
+0:357 'inFV0' (temp 2-component vector of float)
+0:357 'inFM0' (temp 2X2 matrix of float)
+0:357 move second child to first child (temp 2X2 matrix of float)
+0:357 'r6' (temp 2X2 matrix of float)
+0:357 matrix-scale (temp 2X2 matrix of float)
+0:357 'inFM0' (temp 2X2 matrix of float)
+0:357 'inF0' (temp float)
+0:357 move second child to first child (temp 2X2 matrix of float)
+0:357 'r7' (temp 2X2 matrix of float)
+0:357 matrix-scale (temp 2X2 matrix of float)
+0:357 'inF0' (temp float)
+0:357 'inFM0' (temp 2X2 matrix of float)
+0:357 move second child to first child (temp 2X2 matrix of float)
+0:357 'r8' (temp 2X2 matrix of float)
+0:357 matrix-multiply (temp 2X2 matrix of float)
+0:357 'inFM0' (temp 2X2 matrix of float)
+0:357 'inFM1' (temp 2X2 matrix of float)
+0:367 Function Definition: TestGenMul(f1;f1;vf3;vf3;mf33;mf33; (temp void)
+0:363 Function Parameters:
+0:363 'inF0' (temp float)
+0:363 'inF1' (temp float)
+0:363 'inFV0' (temp 3-component vector of float)
+0:363 'inFV1' (temp 3-component vector of float)
+0:363 'inFM0' (temp 3X3 matrix of float)
+0:363 'inFM1' (temp 3X3 matrix of float)
+0:? Sequence
+0:364 move second child to first child (temp float)
+0:364 'r0' (temp float)
+0:364 component-wise multiply (temp float)
+0:364 'inF0' (temp float)
+0:364 'inF1' (temp float)
+0:364 move second child to first child (temp 3-component vector of float)
+0:364 'r1' (temp 3-component vector of float)
+0:364 vector-scale (temp 3-component vector of float)
+0:364 'inFV0' (temp 3-component vector of float)
+0:364 'inF0' (temp float)
+0:364 move second child to first child (temp 3-component vector of float)
+0:364 'r2' (temp 3-component vector of float)
+0:364 vector-scale (temp 3-component vector of float)
+0:364 'inF0' (temp float)
+0:364 'inFV0' (temp 3-component vector of float)
+0:364 move second child to first child (temp float)
+0:364 'r3' (temp float)
+0:364 dot-product (global float)
+0:364 'inFV0' (temp 3-component vector of float)
+0:364 'inFV1' (temp 3-component vector of float)
+0:364 move second child to first child (temp 3-component vector of float)
+0:364 'r4' (temp 3-component vector of float)
+0:364 matrix-times-vector (temp 3-component vector of float)
+0:364 'inFM0' (temp 3X3 matrix of float)
+0:364 'inFV0' (temp 3-component vector of float)
+0:364 move second child to first child (temp 3-component vector of float)
+0:364 'r5' (temp 3-component vector of float)
+0:364 vector-times-matrix (temp 3-component vector of float)
+0:364 'inFV0' (temp 3-component vector of float)
+0:364 'inFM0' (temp 3X3 matrix of float)
+0:364 move second child to first child (temp 3X3 matrix of float)
+0:364 'r6' (temp 3X3 matrix of float)
+0:364 matrix-scale (temp 3X3 matrix of float)
+0:364 'inFM0' (temp 3X3 matrix of float)
+0:364 'inF0' (temp float)
+0:364 move second child to first child (temp 3X3 matrix of float)
+0:364 'r7' (temp 3X3 matrix of float)
+0:364 matrix-scale (temp 3X3 matrix of float)
+0:364 'inF0' (temp float)
+0:364 'inFM0' (temp 3X3 matrix of float)
+0:364 move second child to first child (temp 3X3 matrix of float)
+0:364 'r8' (temp 3X3 matrix of float)
+0:364 matrix-multiply (temp 3X3 matrix of float)
+0:364 'inFM0' (temp 3X3 matrix of float)
+0:364 'inFM1' (temp 3X3 matrix of float)
+0:373 Function Definition: TestGenMul(f1;f1;vf4;vf4;mf44;mf44; (temp void)
+0:370 Function Parameters:
+0:370 'inF0' (temp float)
+0:370 'inF1' (temp float)
+0:370 'inFV0' (temp 4-component vector of float)
+0:370 'inFV1' (temp 4-component vector of float)
+0:370 'inFM0' (temp 4X4 matrix of float)
+0:370 'inFM1' (temp 4X4 matrix of float)
+0:? Sequence
+0:371 move second child to first child (temp float)
+0:371 'r0' (temp float)
+0:371 component-wise multiply (temp float)
+0:371 'inF0' (temp float)
+0:371 'inF1' (temp float)
+0:371 move second child to first child (temp 4-component vector of float)
+0:371 'r1' (temp 4-component vector of float)
+0:371 vector-scale (temp 4-component vector of float)
+0:371 'inFV0' (temp 4-component vector of float)
+0:371 'inF0' (temp float)
+0:371 move second child to first child (temp 4-component vector of float)
+0:371 'r2' (temp 4-component vector of float)
+0:371 vector-scale (temp 4-component vector of float)
+0:371 'inF0' (temp float)
+0:371 'inFV0' (temp 4-component vector of float)
+0:371 move second child to first child (temp float)
+0:371 'r3' (temp float)
+0:371 dot-product (global float)
+0:371 'inFV0' (temp 4-component vector of float)
+0:371 'inFV1' (temp 4-component vector of float)
+0:371 move second child to first child (temp 4-component vector of float)
+0:371 'r4' (temp 4-component vector of float)
+0:371 matrix-times-vector (temp 4-component vector of float)
+0:371 'inFM0' (temp 4X4 matrix of float)
+0:371 'inFV0' (temp 4-component vector of float)
+0:371 move second child to first child (temp 4-component vector of float)
+0:371 'r5' (temp 4-component vector of float)
+0:371 vector-times-matrix (temp 4-component vector of float)
+0:371 'inFV0' (temp 4-component vector of float)
+0:371 'inFM0' (temp 4X4 matrix of float)
+0:371 move second child to first child (temp 4X4 matrix of float)
+0:371 'r6' (temp 4X4 matrix of float)
+0:371 matrix-scale (temp 4X4 matrix of float)
+0:371 'inFM0' (temp 4X4 matrix of float)
+0:371 'inF0' (temp float)
+0:371 move second child to first child (temp 4X4 matrix of float)
+0:371 'r7' (temp 4X4 matrix of float)
+0:371 matrix-scale (temp 4X4 matrix of float)
+0:371 'inF0' (temp float)
+0:371 'inFM0' (temp 4X4 matrix of float)
+0:371 move second child to first child (temp 4X4 matrix of float)
+0:371 'r8' (temp 4X4 matrix of float)
+0:371 matrix-multiply (temp 4X4 matrix of float)
+0:371 'inFM0' (temp 4X4 matrix of float)
+0:371 'inFM1' (temp 4X4 matrix of float)
+0:? Linker Objects
+
+
+Linked vertex stage:
+
+
+Shader version: 450
+0:? Sequence
+0:59 Function Definition: VertexShaderFunction(f1;f1;f1; (temp float)
+0:2 Function Parameters:
+0:2 'inF0' (temp float)
+0:2 'inF1' (temp float)
+0:2 'inF2' (temp float)
+0:? Sequence
+0:3 all (global bool)
+0:3 'inF0' (temp float)
+0:4 Absolute value (global float)
+0:4 'inF0' (temp float)
+0:5 arc cosine (global float)
+0:5 'inF0' (temp float)
+0:6 any (global bool)
+0:6 'inF0' (temp float)
+0:7 arc sine (global float)
+0:7 'inF0' (temp float)
+0:8 arc tangent (global float)
+0:8 'inF0' (temp float)
+0:9 arc tangent (global float)
+0:9 'inF0' (temp float)
+0:9 'inF1' (temp float)
+0:10 Ceiling (global float)
+0:10 'inF0' (temp float)
+0:11 clamp (global float)
+0:11 'inF0' (temp float)
+0:11 'inF1' (temp float)
+0:11 'inF2' (temp float)
+0:12 cosine (global float)
+0:12 'inF0' (temp float)
+0:13 hyp. cosine (global float)
+0:13 'inF0' (temp float)
+0:14 bitCount (global uint)
+0:14 Constant:
+0:14 7 (const uint)
+0:15 degrees (global float)
+0:15 'inF0' (temp float)
+0:19 exp (global float)
+0:19 'inF0' (temp float)
+0:20 exp2 (global float)
+0:20 'inF0' (temp float)
+0:21 findMSB (global int)
+0:21 Constant:
+0:21 7 (const int)
+0:22 findLSB (global int)
+0:22 Constant:
+0:22 7 (const int)
+0:23 Floor (global float)
+0:23 'inF0' (temp float)
+0:25 mod (global float)
+0:25 'inF0' (temp float)
+0:25 'inF1' (temp float)
+0:26 Fraction (global float)
+0:26 'inF0' (temp float)
+0:27 frexp (global float)
+0:27 'inF0' (temp float)
+0:27 'inF1' (temp float)
+0:28 fwidth (global float)
+0:28 'inF0' (temp float)
+0:29 isinf (global bool)
+0:29 'inF0' (temp float)
+0:30 isnan (global bool)
+0:30 'inF0' (temp float)
+0:31 ldexp (global float)
+0:31 'inF0' (temp float)
+0:31 'inF1' (temp float)
+0:32 log (global float)
+0:32 'inF0' (temp float)
+0:33 component-wise multiply (temp float)
+0:33 log2 (temp float)
+0:33 'inF0' (temp float)
+0:33 Constant:
+0:33 0.301030
+0:34 log2 (global float)
+0:34 'inF0' (temp float)
+0:35 max (global float)
+0:35 'inF0' (temp float)
+0:35 'inF1' (temp float)
+0:36 min (global float)
+0:36 'inF0' (temp float)
+0:36 'inF1' (temp float)
+0:38 pow (global float)
+0:38 'inF0' (temp float)
+0:38 'inF1' (temp float)
+0:39 radians (global float)
+0:39 'inF0' (temp float)
+0:40 bitFieldReverse (global uint)
+0:40 Constant:
+0:40 2 (const uint)
+0:41 roundEven (global float)
+0:41 'inF0' (temp float)
+0:42 inverse sqrt (global float)
+0:42 'inF0' (temp float)
+0:43 clamp (global float)
+0:43 'inF0' (temp float)
+0:43 Constant:
+0:43 0.000000
+0:43 Constant:
+0:43 1.000000
+0:44 Sign (global float)
+0:44 'inF0' (temp float)
+0:45 sine (global float)
+0:45 'inF0' (temp float)
+0:46 Sequence
+0:46 move second child to first child (temp float)
+0:46 'inF1' (temp float)
+0:46 sine (temp float)
+0:46 'inF0' (temp float)
+0:46 move second child to first child (temp float)
+0:46 'inF2' (temp float)
+0:46 cosine (temp float)
+0:46 'inF0' (temp float)
+0:47 hyp. sine (global float)
+0:47 'inF0' (temp float)
+0:48 smoothstep (global float)
+0:48 'inF0' (temp float)
+0:48 'inF1' (temp float)
+0:48 'inF2' (temp float)
+0:49 sqrt (global float)
+0:49 'inF0' (temp float)
+0:50 step (global float)
+0:50 'inF0' (temp float)
+0:50 'inF1' (temp float)
+0:51 tangent (global float)
+0:51 'inF0' (temp float)
+0:52 hyp. tangent (global float)
+0:52 'inF0' (temp float)
+0:54 trunc (global float)
+0:54 'inF0' (temp float)
+0:56 Branch: Return with expression
+0:56 Constant:
+0:56 0.000000
+0:65 Function Definition: VertexShaderFunction(vf1;vf1;vf1; (temp 1-component vector of float)
+0:60 Function Parameters:
+0:60 'inF0' (temp 1-component vector of float)
+0:60 'inF1' (temp 1-component vector of float)
+0:60 'inF2' (temp 1-component vector of float)
+0:? Sequence
+0:62 Branch: Return with expression
+0:62 Constant:
+0:62 0.000000
+0:131 Function Definition: VertexShaderFunction(vf2;vf2;vf2; (temp 2-component vector of float)
+0:66 Function Parameters:
+0:66 'inF0' (temp 2-component vector of float)
+0:66 'inF1' (temp 2-component vector of float)
+0:66 'inF2' (temp 2-component vector of float)
+0:? Sequence
+0:67 all (global bool)
+0:67 'inF0' (temp 2-component vector of float)
+0:68 Absolute value (global 2-component vector of float)
+0:68 'inF0' (temp 2-component vector of float)
+0:69 arc cosine (global 2-component vector of float)
+0:69 'inF0' (temp 2-component vector of float)
+0:70 any (global bool)
+0:70 'inF0' (temp 2-component vector of float)
+0:71 arc sine (global 2-component vector of float)
+0:71 'inF0' (temp 2-component vector of float)
+0:72 arc tangent (global 2-component vector of float)
+0:72 'inF0' (temp 2-component vector of float)
+0:73 arc tangent (global 2-component vector of float)
+0:73 'inF0' (temp 2-component vector of float)
+0:73 'inF1' (temp 2-component vector of float)
+0:74 Ceiling (global 2-component vector of float)
+0:74 'inF0' (temp 2-component vector of float)
+0:75 clamp (global 2-component vector of float)
+0:75 'inF0' (temp 2-component vector of float)
+0:75 'inF1' (temp 2-component vector of float)
+0:75 'inF2' (temp 2-component vector of float)
+0:76 cosine (global 2-component vector of float)
+0:76 'inF0' (temp 2-component vector of float)
+0:77 hyp. cosine (global 2-component vector of float)
+0:77 'inF0' (temp 2-component vector of float)
+0:? bitCount (global 2-component vector of uint)
+0:? Constant:
+0:? 7 (const uint)
+0:? 3 (const uint)
+0:79 degrees (global 2-component vector of float)
+0:79 'inF0' (temp 2-component vector of float)
+0:80 distance (global float)
+0:80 'inF0' (temp 2-component vector of float)
+0:80 'inF1' (temp 2-component vector of float)
+0:81 dot-product (global float)
+0:81 'inF0' (temp 2-component vector of float)
+0:81 'inF1' (temp 2-component vector of float)
+0:85 exp (global 2-component vector of float)
+0:85 'inF0' (temp 2-component vector of float)
+0:86 exp2 (global 2-component vector of float)
+0:86 'inF0' (temp 2-component vector of float)
+0:87 face-forward (global 2-component vector of float)
+0:87 'inF0' (temp 2-component vector of float)
+0:87 'inF1' (temp 2-component vector of float)
+0:87 'inF2' (temp 2-component vector of float)
+0:88 findMSB (global int)
+0:88 Constant:
+0:88 7 (const int)
+0:89 findLSB (global int)
+0:89 Constant:
+0:89 7 (const int)
+0:90 Floor (global 2-component vector of float)
+0:90 'inF0' (temp 2-component vector of float)
+0:92 mod (global 2-component vector of float)
+0:92 'inF0' (temp 2-component vector of float)
+0:92 'inF1' (temp 2-component vector of float)
+0:93 Fraction (global 2-component vector of float)
+0:93 'inF0' (temp 2-component vector of float)
+0:94 frexp (global 2-component vector of float)
+0:94 'inF0' (temp 2-component vector of float)
+0:94 'inF1' (temp 2-component vector of float)
+0:95 fwidth (global 2-component vector of float)
+0:95 'inF0' (temp 2-component vector of float)
+0:96 isinf (global 2-component vector of bool)
+0:96 'inF0' (temp 2-component vector of float)
+0:97 isnan (global 2-component vector of bool)
+0:97 'inF0' (temp 2-component vector of float)
+0:98 ldexp (global 2-component vector of float)
+0:98 'inF0' (temp 2-component vector of float)
+0:98 'inF1' (temp 2-component vector of float)
+0:99 length (global float)
+0:99 'inF0' (temp 2-component vector of float)
+0:100 log (global 2-component vector of float)
+0:100 'inF0' (temp 2-component vector of float)
+0:101 vector-scale (temp 2-component vector of float)
+0:101 log2 (temp 2-component vector of float)
+0:101 'inF0' (temp 2-component vector of float)
+0:101 Constant:
+0:101 0.301030
+0:102 log2 (global 2-component vector of float)
+0:102 'inF0' (temp 2-component vector of float)
+0:103 max (global 2-component vector of float)
+0:103 'inF0' (temp 2-component vector of float)
+0:103 'inF1' (temp 2-component vector of float)
+0:104 min (global 2-component vector of float)
+0:104 'inF0' (temp 2-component vector of float)
+0:104 'inF1' (temp 2-component vector of float)
+0:106 normalize (global 2-component vector of float)
+0:106 'inF0' (temp 2-component vector of float)
+0:107 pow (global 2-component vector of float)
+0:107 'inF0' (temp 2-component vector of float)
+0:107 'inF1' (temp 2-component vector of float)
+0:108 radians (global 2-component vector of float)
+0:108 'inF0' (temp 2-component vector of float)
+0:109 reflect (global 2-component vector of float)
+0:109 'inF0' (temp 2-component vector of float)
+0:109 'inF1' (temp 2-component vector of float)
+0:110 refract (global 2-component vector of float)
+0:110 'inF0' (temp 2-component vector of float)
+0:110 'inF1' (temp 2-component vector of float)
+0:110 Constant:
+0:110 2.000000
+0:? bitFieldReverse (global 2-component vector of uint)
+0:? Constant:
+0:? 1 (const uint)
+0:? 2 (const uint)
+0:112 roundEven (global 2-component vector of float)
+0:112 'inF0' (temp 2-component vector of float)
+0:113 inverse sqrt (global 2-component vector of float)
+0:113 'inF0' (temp 2-component vector of float)
+0:114 clamp (global 2-component vector of float)
+0:114 'inF0' (temp 2-component vector of float)
+0:114 Constant:
+0:114 0.000000
+0:114 Constant:
+0:114 1.000000
+0:115 Sign (global 2-component vector of float)
+0:115 'inF0' (temp 2-component vector of float)
+0:116 sine (global 2-component vector of float)
+0:116 'inF0' (temp 2-component vector of float)
+0:117 Sequence
+0:117 move second child to first child (temp 2-component vector of float)
+0:117 'inF1' (temp 2-component vector of float)
+0:117 sine (temp 2-component vector of float)
+0:117 'inF0' (temp 2-component vector of float)
+0:117 move second child to first child (temp 2-component vector of float)
+0:117 'inF2' (temp 2-component vector of float)
+0:117 cosine (temp 2-component vector of float)
+0:117 'inF0' (temp 2-component vector of float)
+0:118 hyp. sine (global 2-component vector of float)
+0:118 'inF0' (temp 2-component vector of float)
+0:119 smoothstep (global 2-component vector of float)
+0:119 'inF0' (temp 2-component vector of float)
+0:119 'inF1' (temp 2-component vector of float)
+0:119 'inF2' (temp 2-component vector of float)
+0:120 sqrt (global 2-component vector of float)
+0:120 'inF0' (temp 2-component vector of float)
+0:121 step (global 2-component vector of float)
+0:121 'inF0' (temp 2-component vector of float)
+0:121 'inF1' (temp 2-component vector of float)
+0:122 tangent (global 2-component vector of float)
+0:122 'inF0' (temp 2-component vector of float)
+0:123 hyp. tangent (global 2-component vector of float)
+0:123 'inF0' (temp 2-component vector of float)
+0:125 trunc (global 2-component vector of float)
+0:125 'inF0' (temp 2-component vector of float)
+0:128 Branch: Return with expression
+0:? Constant:
+0:? 1.000000
+0:? 2.000000
+0:198 Function Definition: VertexShaderFunction(vf3;vf3;vf3; (temp 3-component vector of float)
+0:132 Function Parameters:
+0:132 'inF0' (temp 3-component vector of float)
+0:132 'inF1' (temp 3-component vector of float)
+0:132 'inF2' (temp 3-component vector of float)
+0:? Sequence
+0:133 all (global bool)
+0:133 'inF0' (temp 3-component vector of float)
+0:134 Absolute value (global 3-component vector of float)
+0:134 'inF0' (temp 3-component vector of float)
+0:135 arc cosine (global 3-component vector of float)
+0:135 'inF0' (temp 3-component vector of float)
+0:136 any (global bool)
+0:136 'inF0' (temp 3-component vector of float)
+0:137 arc sine (global 3-component vector of float)
+0:137 'inF0' (temp 3-component vector of float)
+0:138 arc tangent (global 3-component vector of float)
+0:138 'inF0' (temp 3-component vector of float)
+0:139 arc tangent (global 3-component vector of float)
+0:139 'inF0' (temp 3-component vector of float)
+0:139 'inF1' (temp 3-component vector of float)
+0:140 Ceiling (global 3-component vector of float)
+0:140 'inF0' (temp 3-component vector of float)
+0:141 clamp (global 3-component vector of float)
+0:141 'inF0' (temp 3-component vector of float)
+0:141 'inF1' (temp 3-component vector of float)
+0:141 'inF2' (temp 3-component vector of float)
+0:142 cosine (global 3-component vector of float)
+0:142 'inF0' (temp 3-component vector of float)
+0:143 hyp. cosine (global 3-component vector of float)
+0:143 'inF0' (temp 3-component vector of float)
+0:? bitCount (global 3-component vector of uint)
+0:? Constant:
+0:? 7 (const uint)
+0:? 3 (const uint)
+0:? 5 (const uint)
+0:145 cross-product (global 3-component vector of float)
+0:145 'inF0' (temp 3-component vector of float)
+0:145 'inF1' (temp 3-component vector of float)
+0:146 degrees (global 3-component vector of float)
+0:146 'inF0' (temp 3-component vector of float)
+0:147 distance (global float)
+0:147 'inF0' (temp 3-component vector of float)
+0:147 'inF1' (temp 3-component vector of float)
+0:148 dot-product (global float)
+0:148 'inF0' (temp 3-component vector of float)
+0:148 'inF1' (temp 3-component vector of float)
+0:152 exp (global 3-component vector of float)
+0:152 'inF0' (temp 3-component vector of float)
+0:153 exp2 (global 3-component vector of float)
+0:153 'inF0' (temp 3-component vector of float)
+0:154 face-forward (global 3-component vector of float)
+0:154 'inF0' (temp 3-component vector of float)
+0:154 'inF1' (temp 3-component vector of float)
+0:154 'inF2' (temp 3-component vector of float)
+0:155 findMSB (global int)
+0:155 Constant:
+0:155 7 (const int)
+0:156 findLSB (global int)
+0:156 Constant:
+0:156 7 (const int)
+0:157 Floor (global 3-component vector of float)
+0:157 'inF0' (temp 3-component vector of float)
+0:159 mod (global 3-component vector of float)
+0:159 'inF0' (temp 3-component vector of float)
+0:159 'inF1' (temp 3-component vector of float)
+0:160 Fraction (global 3-component vector of float)
+0:160 'inF0' (temp 3-component vector of float)
+0:161 frexp (global 3-component vector of float)
+0:161 'inF0' (temp 3-component vector of float)
+0:161 'inF1' (temp 3-component vector of float)
+0:162 fwidth (global 3-component vector of float)
+0:162 'inF0' (temp 3-component vector of float)
+0:163 isinf (global 3-component vector of bool)
+0:163 'inF0' (temp 3-component vector of float)
+0:164 isnan (global 3-component vector of bool)
+0:164 'inF0' (temp 3-component vector of float)
+0:165 ldexp (global 3-component vector of float)
+0:165 'inF0' (temp 3-component vector of float)
+0:165 'inF1' (temp 3-component vector of float)
+0:166 length (global float)
+0:166 'inF0' (temp 3-component vector of float)
+0:167 log (global 3-component vector of float)
+0:167 'inF0' (temp 3-component vector of float)
+0:168 vector-scale (temp 3-component vector of float)
+0:168 log2 (temp 3-component vector of float)
+0:168 'inF0' (temp 3-component vector of float)
+0:168 Constant:
+0:168 0.301030
+0:169 log2 (global 3-component vector of float)
+0:169 'inF0' (temp 3-component vector of float)
+0:170 max (global 3-component vector of float)
+0:170 'inF0' (temp 3-component vector of float)
+0:170 'inF1' (temp 3-component vector of float)
+0:171 min (global 3-component vector of float)
+0:171 'inF0' (temp 3-component vector of float)
+0:171 'inF1' (temp 3-component vector of float)
+0:173 normalize (global 3-component vector of float)
+0:173 'inF0' (temp 3-component vector of float)
+0:174 pow (global 3-component vector of float)
+0:174 'inF0' (temp 3-component vector of float)
+0:174 'inF1' (temp 3-component vector of float)
+0:175 radians (global 3-component vector of float)
+0:175 'inF0' (temp 3-component vector of float)
+0:176 reflect (global 3-component vector of float)
+0:176 'inF0' (temp 3-component vector of float)
+0:176 'inF1' (temp 3-component vector of float)
+0:177 refract (global 3-component vector of float)
+0:177 'inF0' (temp 3-component vector of float)
+0:177 'inF1' (temp 3-component vector of float)
+0:177 Constant:
+0:177 2.000000
+0:? bitFieldReverse (global 3-component vector of uint)
+0:? Constant:
+0:? 1 (const uint)
+0:? 2 (const uint)
+0:? 3 (const uint)
+0:179 roundEven (global 3-component vector of float)
+0:179 'inF0' (temp 3-component vector of float)
+0:180 inverse sqrt (global 3-component vector of float)
+0:180 'inF0' (temp 3-component vector of float)
+0:181 clamp (global 3-component vector of float)
+0:181 'inF0' (temp 3-component vector of float)
+0:181 Constant:
+0:181 0.000000
+0:181 Constant:
+0:181 1.000000
+0:182 Sign (global 3-component vector of float)
+0:182 'inF0' (temp 3-component vector of float)
+0:183 sine (global 3-component vector of float)
+0:183 'inF0' (temp 3-component vector of float)
+0:184 Sequence
+0:184 move second child to first child (temp 3-component vector of float)
+0:184 'inF1' (temp 3-component vector of float)
+0:184 sine (temp 3-component vector of float)
+0:184 'inF0' (temp 3-component vector of float)
+0:184 move second child to first child (temp 3-component vector of float)
+0:184 'inF2' (temp 3-component vector of float)
+0:184 cosine (temp 3-component vector of float)
+0:184 'inF0' (temp 3-component vector of float)
+0:185 hyp. sine (global 3-component vector of float)
+0:185 'inF0' (temp 3-component vector of float)
+0:186 smoothstep (global 3-component vector of float)
+0:186 'inF0' (temp 3-component vector of float)
+0:186 'inF1' (temp 3-component vector of float)
+0:186 'inF2' (temp 3-component vector of float)
+0:187 sqrt (global 3-component vector of float)
+0:187 'inF0' (temp 3-component vector of float)
+0:188 step (global 3-component vector of float)
+0:188 'inF0' (temp 3-component vector of float)
+0:188 'inF1' (temp 3-component vector of float)
+0:189 tangent (global 3-component vector of float)
+0:189 'inF0' (temp 3-component vector of float)
+0:190 hyp. tangent (global 3-component vector of float)
+0:190 'inF0' (temp 3-component vector of float)
+0:192 trunc (global 3-component vector of float)
+0:192 'inF0' (temp 3-component vector of float)
+0:195 Branch: Return with expression
+0:? Constant:
+0:? 1.000000
+0:? 2.000000
+0:? 3.000000
+0:314 Function Definition: VertexShaderFunction(vf4;vf4;vf4; (temp 4-component vector of float)
+0:199 Function Parameters:
+0:199 'inF0' (temp 4-component vector of float)
+0:199 'inF1' (temp 4-component vector of float)
+0:199 'inF2' (temp 4-component vector of float)
+0:? Sequence
+0:200 all (global bool)
+0:200 'inF0' (temp 4-component vector of float)
+0:201 Absolute value (global 4-component vector of float)
+0:201 'inF0' (temp 4-component vector of float)
+0:202 arc cosine (global 4-component vector of float)
+0:202 'inF0' (temp 4-component vector of float)
+0:203 any (global bool)
+0:203 'inF0' (temp 4-component vector of float)
+0:204 arc sine (global 4-component vector of float)
+0:204 'inF0' (temp 4-component vector of float)
+0:205 arc tangent (global 4-component vector of float)
+0:205 'inF0' (temp 4-component vector of float)
+0:206 arc tangent (global 4-component vector of float)
+0:206 'inF0' (temp 4-component vector of float)
+0:206 'inF1' (temp 4-component vector of float)
+0:207 Ceiling (global 4-component vector of float)
+0:207 'inF0' (temp 4-component vector of float)
+0:208 clamp (global 4-component vector of float)
+0:208 'inF0' (temp 4-component vector of float)
+0:208 'inF1' (temp 4-component vector of float)
+0:208 'inF2' (temp 4-component vector of float)
+0:209 cosine (global 4-component vector of float)
+0:209 'inF0' (temp 4-component vector of float)
+0:210 hyp. cosine (global 4-component vector of float)
+0:210 'inF0' (temp 4-component vector of float)
+0:? bitCount (global 4-component vector of uint)
+0:? Constant:
+0:? 7 (const uint)
+0:? 3 (const uint)
+0:? 5 (const uint)
+0:? 2 (const uint)
+0:212 degrees (global 4-component vector of float)
+0:212 'inF0' (temp 4-component vector of float)
+0:213 distance (global float)
+0:213 'inF0' (temp 4-component vector of float)
+0:213 'inF1' (temp 4-component vector of float)
+0:214 dot-product (global float)
+0:214 'inF0' (temp 4-component vector of float)
+0:214 'inF1' (temp 4-component vector of float)
+0:215 Construct vec4 (temp float)
+0:215 Constant:
+0:215 1.000000
+0:215 component-wise multiply (temp float)
+0:215 direct index (temp float)
+0:215 'inF0' (temp 4-component vector of float)
+0:215 Constant:
+0:215 1 (const int)
+0:215 direct index (temp float)
+0:215 'inF1' (temp 4-component vector of float)
+0:215 Constant:
+0:215 1 (const int)
+0:215 direct index (temp float)
+0:215 'inF0' (temp 4-component vector of float)
+0:215 Constant:
+0:215 2 (const int)
+0:215 direct index (temp float)
+0:215 'inF1' (temp 4-component vector of float)
+0:215 Constant:
+0:215 3 (const int)
+0:219 exp (global 4-component vector of float)
+0:219 'inF0' (temp 4-component vector of float)
+0:220 exp2 (global 4-component vector of float)
+0:220 'inF0' (temp 4-component vector of float)
+0:221 face-forward (global 4-component vector of float)
+0:221 'inF0' (temp 4-component vector of float)
+0:221 'inF1' (temp 4-component vector of float)
+0:221 'inF2' (temp 4-component vector of float)
+0:222 findMSB (global int)
+0:222 Constant:
+0:222 7 (const int)
+0:223 findLSB (global int)
+0:223 Constant:
+0:223 7 (const int)
+0:224 Floor (global 4-component vector of float)
+0:224 'inF0' (temp 4-component vector of float)
+0:226 mod (global 4-component vector of float)
+0:226 'inF0' (temp 4-component vector of float)
+0:226 'inF1' (temp 4-component vector of float)
+0:227 Fraction (global 4-component vector of float)
+0:227 'inF0' (temp 4-component vector of float)
+0:228 frexp (global 4-component vector of float)
+0:228 'inF0' (temp 4-component vector of float)
+0:228 'inF1' (temp 4-component vector of float)
+0:229 fwidth (global 4-component vector of float)
+0:229 'inF0' (temp 4-component vector of float)
+0:230 isinf (global 4-component vector of bool)
+0:230 'inF0' (temp 4-component vector of float)
+0:231 isnan (global 4-component vector of bool)
+0:231 'inF0' (temp 4-component vector of float)
+0:232 ldexp (global 4-component vector of float)
+0:232 'inF0' (temp 4-component vector of float)
+0:232 'inF1' (temp 4-component vector of float)
+0:233 length (global float)
+0:233 'inF0' (temp 4-component vector of float)
+0:234 log (global 4-component vector of float)
+0:234 'inF0' (temp 4-component vector of float)
+0:235 vector-scale (temp 4-component vector of float)
+0:235 log2 (temp 4-component vector of float)
+0:235 'inF0' (temp 4-component vector of float)
+0:235 Constant:
+0:235 0.301030
+0:236 log2 (global 4-component vector of float)
+0:236 'inF0' (temp 4-component vector of float)
+0:237 max (global 4-component vector of float)
+0:237 'inF0' (temp 4-component vector of float)
+0:237 'inF1' (temp 4-component vector of float)
+0:238 min (global 4-component vector of float)
+0:238 'inF0' (temp 4-component vector of float)
+0:238 'inF1' (temp 4-component vector of float)
+0:240 normalize (global 4-component vector of float)
+0:240 'inF0' (temp 4-component vector of float)
+0:241 pow (global 4-component vector of float)
+0:241 'inF0' (temp 4-component vector of float)
+0:241 'inF1' (temp 4-component vector of float)
+0:242 radians (global 4-component vector of float)
+0:242 'inF0' (temp 4-component vector of float)
+0:243 reflect (global 4-component vector of float)
+0:243 'inF0' (temp 4-component vector of float)
+0:243 'inF1' (temp 4-component vector of float)
+0:244 refract (global 4-component vector of float)
+0:244 'inF0' (temp 4-component vector of float)
+0:244 'inF1' (temp 4-component vector of float)
+0:244 Constant:
+0:244 2.000000
+0:? bitFieldReverse (global 4-component vector of uint)
+0:? Constant:
+0:? 1 (const uint)
+0:? 2 (const uint)
+0:? 3 (const uint)
+0:? 4 (const uint)
+0:246 roundEven (global 4-component vector of float)
+0:246 'inF0' (temp 4-component vector of float)
+0:247 inverse sqrt (global 4-component vector of float)
+0:247 'inF0' (temp 4-component vector of float)
+0:248 clamp (global 4-component vector of float)
+0:248 'inF0' (temp 4-component vector of float)
+0:248 Constant:
+0:248 0.000000
+0:248 Constant:
+0:248 1.000000
+0:249 Sign (global 4-component vector of float)
+0:249 'inF0' (temp 4-component vector of float)
+0:250 sine (global 4-component vector of float)
+0:250 'inF0' (temp 4-component vector of float)
+0:251 Sequence
+0:251 move second child to first child (temp 4-component vector of float)
+0:251 'inF1' (temp 4-component vector of float)
+0:251 sine (temp 4-component vector of float)
+0:251 'inF0' (temp 4-component vector of float)
+0:251 move second child to first child (temp 4-component vector of float)
+0:251 'inF2' (temp 4-component vector of float)
+0:251 cosine (temp 4-component vector of float)
+0:251 'inF0' (temp 4-component vector of float)
+0:252 hyp. sine (global 4-component vector of float)
+0:252 'inF0' (temp 4-component vector of float)
+0:253 smoothstep (global 4-component vector of float)
+0:253 'inF0' (temp 4-component vector of float)
+0:253 'inF1' (temp 4-component vector of float)
+0:253 'inF2' (temp 4-component vector of float)
+0:254 sqrt (global 4-component vector of float)
+0:254 'inF0' (temp 4-component vector of float)
+0:255 step (global 4-component vector of float)
+0:255 'inF0' (temp 4-component vector of float)
+0:255 'inF1' (temp 4-component vector of float)
+0:256 tangent (global 4-component vector of float)
+0:256 'inF0' (temp 4-component vector of float)
+0:257 hyp. tangent (global 4-component vector of float)
+0:257 'inF0' (temp 4-component vector of float)
+0:259 trunc (global 4-component vector of float)
+0:259 'inF0' (temp 4-component vector of float)
+0:262 Branch: Return with expression
+0:? Constant:
+0:? 1.000000
+0:? 2.000000
+0:? 3.000000
+0:? 4.000000
+0:323 Function Definition: VertexShaderFunction(mf22;mf22;mf22; (temp 2X2 matrix of float)
+0:315 Function Parameters:
+0:315 'inF0' (temp 2X2 matrix of float)
+0:315 'inF1' (temp 2X2 matrix of float)
+0:315 'inF2' (temp 2X2 matrix of float)
+0:? Sequence
+0:317 all (global bool)
+0:317 'inF0' (temp 2X2 matrix of float)
+0:317 Absolute value (global 2X2 matrix of float)
+0:317 'inF0' (temp 2X2 matrix of float)
+0:317 arc cosine (global 2X2 matrix of float)
+0:317 'inF0' (temp 2X2 matrix of float)
+0:317 any (global bool)
+0:317 'inF0' (temp 2X2 matrix of float)
+0:317 arc sine (global 2X2 matrix of float)
+0:317 'inF0' (temp 2X2 matrix of float)
+0:317 arc tangent (global 2X2 matrix of float)
+0:317 'inF0' (temp 2X2 matrix of float)
+0:317 arc tangent (global 2X2 matrix of float)
+0:317 'inF0' (temp 2X2 matrix of float)
+0:317 'inF1' (temp 2X2 matrix of float)
+0:317 Ceiling (global 2X2 matrix of float)
+0:317 'inF0' (temp 2X2 matrix of float)
+0:317 clamp (global 2X2 matrix of float)
+0:317 'inF0' (temp 2X2 matrix of float)
+0:317 'inF1' (temp 2X2 matrix of float)
+0:317 'inF2' (temp 2X2 matrix of float)
+0:317 cosine (global 2X2 matrix of float)
+0:317 'inF0' (temp 2X2 matrix of float)
+0:317 hyp. cosine (global 2X2 matrix of float)
+0:317 'inF0' (temp 2X2 matrix of float)
+0:317 degrees (global 2X2 matrix of float)
+0:317 'inF0' (temp 2X2 matrix of float)
+0:317 determinant (global float)
+0:317 'inF0' (temp 2X2 matrix of float)
+0:317 exp (global 2X2 matrix of float)
+0:317 'inF0' (temp 2X2 matrix of float)
+0:317 exp2 (global 2X2 matrix of float)
+0:317 'inF0' (temp 2X2 matrix of float)
+0:317 findMSB (global int)
+0:317 Constant:
+0:317 7 (const int)
+0:317 findLSB (global int)
+0:317 Constant:
+0:317 7 (const int)
+0:317 Floor (global 2X2 matrix of float)
+0:317 'inF0' (temp 2X2 matrix of float)
+0:317 mod (global 2X2 matrix of float)
+0:317 'inF0' (temp 2X2 matrix of float)
+0:317 'inF1' (temp 2X2 matrix of float)
+0:317 Fraction (global 2X2 matrix of float)
+0:317 'inF0' (temp 2X2 matrix of float)
+0:317 frexp (global 2X2 matrix of float)
+0:317 'inF0' (temp 2X2 matrix of float)
+0:317 'inF1' (temp 2X2 matrix of float)
+0:317 fwidth (global 2X2 matrix of float)
+0:317 'inF0' (temp 2X2 matrix of float)
+0:317 ldexp (global 2X2 matrix of float)
+0:317 'inF0' (temp 2X2 matrix of float)
+0:317 'inF1' (temp 2X2 matrix of float)
+0:317 log (global 2X2 matrix of float)
+0:317 'inF0' (temp 2X2 matrix of float)
+0:317 matrix-scale (temp 2X2 matrix of float)
+0:317 log2 (temp 2X2 matrix of float)
+0:317 'inF0' (temp 2X2 matrix of float)
+0:317 Constant:
+0:317 0.301030
+0:317 log2 (global 2X2 matrix of float)
+0:317 'inF0' (temp 2X2 matrix of float)
+0:317 max (global 2X2 matrix of float)
+0:317 'inF0' (temp 2X2 matrix of float)
+0:317 'inF1' (temp 2X2 matrix of float)
+0:317 min (global 2X2 matrix of float)
+0:317 'inF0' (temp 2X2 matrix of float)
+0:317 'inF1' (temp 2X2 matrix of float)
+0:317 pow (global 2X2 matrix of float)
+0:317 'inF0' (temp 2X2 matrix of float)
+0:317 'inF1' (temp 2X2 matrix of float)
+0:317 radians (global 2X2 matrix of float)
+0:317 'inF0' (temp 2X2 matrix of float)
+0:317 roundEven (global 2X2 matrix of float)
+0:317 'inF0' (temp 2X2 matrix of float)
+0:317 inverse sqrt (global 2X2 matrix of float)
+0:317 'inF0' (temp 2X2 matrix of float)
+0:317 clamp (global 2X2 matrix of float)
+0:317 'inF0' (temp 2X2 matrix of float)
+0:317 Constant:
+0:317 0.000000
+0:317 Constant:
+0:317 1.000000
+0:317 Sign (global 2X2 matrix of float)
+0:317 'inF0' (temp 2X2 matrix of float)
+0:317 sine (global 2X2 matrix of float)
+0:317 'inF0' (temp 2X2 matrix of float)
+0:317 Sequence
+0:317 move second child to first child (temp 2X2 matrix of float)
+0:317 'inF1' (temp 2X2 matrix of float)
+0:317 sine (temp 2X2 matrix of float)
+0:317 'inF0' (temp 2X2 matrix of float)
+0:317 move second child to first child (temp 2X2 matrix of float)
+0:317 'inF2' (temp 2X2 matrix of float)
+0:317 cosine (temp 2X2 matrix of float)
+0:317 'inF0' (temp 2X2 matrix of float)
+0:317 hyp. sine (global 2X2 matrix of float)
+0:317 'inF0' (temp 2X2 matrix of float)
+0:317 smoothstep (global 2X2 matrix of float)
+0:317 'inF0' (temp 2X2 matrix of float)
+0:317 'inF1' (temp 2X2 matrix of float)
+0:317 'inF2' (temp 2X2 matrix of float)
+0:317 sqrt (global 2X2 matrix of float)
+0:317 'inF0' (temp 2X2 matrix of float)
+0:317 step (global 2X2 matrix of float)
+0:317 'inF0' (temp 2X2 matrix of float)
+0:317 'inF1' (temp 2X2 matrix of float)
+0:317 tangent (global 2X2 matrix of float)
+0:317 'inF0' (temp 2X2 matrix of float)
+0:317 hyp. tangent (global 2X2 matrix of float)
+0:317 'inF0' (temp 2X2 matrix of float)
+0:317 transpose (global 2X2 matrix of float)
+0:317 'inF0' (temp 2X2 matrix of float)
+0:317 trunc (global 2X2 matrix of float)
+0:317 'inF0' (temp 2X2 matrix of float)
+0:320 Branch: Return with expression
+0:? Constant:
+0:? 2.000000
+0:? 2.000000
+0:? 2.000000
+0:? 2.000000
+0:332 Function Definition: VertexShaderFunction(mf33;mf33;mf33; (temp 3X3 matrix of float)
+0:324 Function Parameters:
+0:324 'inF0' (temp 3X3 matrix of float)
+0:324 'inF1' (temp 3X3 matrix of float)
+0:324 'inF2' (temp 3X3 matrix of float)
+0:? Sequence
+0:326 all (global bool)
+0:326 'inF0' (temp 3X3 matrix of float)
+0:326 Absolute value (global 3X3 matrix of float)
+0:326 'inF0' (temp 3X3 matrix of float)
+0:326 arc cosine (global 3X3 matrix of float)
+0:326 'inF0' (temp 3X3 matrix of float)
+0:326 any (global bool)
+0:326 'inF0' (temp 3X3 matrix of float)
+0:326 arc sine (global 3X3 matrix of float)
+0:326 'inF0' (temp 3X3 matrix of float)
+0:326 arc tangent (global 3X3 matrix of float)
+0:326 'inF0' (temp 3X3 matrix of float)
+0:326 arc tangent (global 3X3 matrix of float)
+0:326 'inF0' (temp 3X3 matrix of float)
+0:326 'inF1' (temp 3X3 matrix of float)
+0:326 Ceiling (global 3X3 matrix of float)
+0:326 'inF0' (temp 3X3 matrix of float)
+0:326 clamp (global 3X3 matrix of float)
+0:326 'inF0' (temp 3X3 matrix of float)
+0:326 'inF1' (temp 3X3 matrix of float)
+0:326 'inF2' (temp 3X3 matrix of float)
+0:326 cosine (global 3X3 matrix of float)
+0:326 'inF0' (temp 3X3 matrix of float)
+0:326 hyp. cosine (global 3X3 matrix of float)
+0:326 'inF0' (temp 3X3 matrix of float)
+0:326 degrees (global 3X3 matrix of float)
+0:326 'inF0' (temp 3X3 matrix of float)
+0:326 determinant (global float)
+0:326 'inF0' (temp 3X3 matrix of float)
+0:326 exp (global 3X3 matrix of float)
+0:326 'inF0' (temp 3X3 matrix of float)
+0:326 exp2 (global 3X3 matrix of float)
+0:326 'inF0' (temp 3X3 matrix of float)
+0:326 findMSB (global int)
+0:326 Constant:
+0:326 7 (const int)
+0:326 findLSB (global int)
+0:326 Constant:
+0:326 7 (const int)
+0:326 Floor (global 3X3 matrix of float)
+0:326 'inF0' (temp 3X3 matrix of float)
+0:326 mod (global 3X3 matrix of float)
+0:326 'inF0' (temp 3X3 matrix of float)
+0:326 'inF1' (temp 3X3 matrix of float)
+0:326 Fraction (global 3X3 matrix of float)
+0:326 'inF0' (temp 3X3 matrix of float)
+0:326 frexp (global 3X3 matrix of float)
+0:326 'inF0' (temp 3X3 matrix of float)
+0:326 'inF1' (temp 3X3 matrix of float)
+0:326 fwidth (global 3X3 matrix of float)
+0:326 'inF0' (temp 3X3 matrix of float)
+0:326 ldexp (global 3X3 matrix of float)
+0:326 'inF0' (temp 3X3 matrix of float)
+0:326 'inF1' (temp 3X3 matrix of float)
+0:326 log (global 3X3 matrix of float)
+0:326 'inF0' (temp 3X3 matrix of float)
+0:326 matrix-scale (temp 3X3 matrix of float)
+0:326 log2 (temp 3X3 matrix of float)
+0:326 'inF0' (temp 3X3 matrix of float)
+0:326 Constant:
+0:326 0.301030
+0:326 log2 (global 3X3 matrix of float)
+0:326 'inF0' (temp 3X3 matrix of float)
+0:326 max (global 3X3 matrix of float)
+0:326 'inF0' (temp 3X3 matrix of float)
+0:326 'inF1' (temp 3X3 matrix of float)
+0:326 min (global 3X3 matrix of float)
+0:326 'inF0' (temp 3X3 matrix of float)
+0:326 'inF1' (temp 3X3 matrix of float)
+0:326 pow (global 3X3 matrix of float)
+0:326 'inF0' (temp 3X3 matrix of float)
+0:326 'inF1' (temp 3X3 matrix of float)
+0:326 radians (global 3X3 matrix of float)
+0:326 'inF0' (temp 3X3 matrix of float)
+0:326 roundEven (global 3X3 matrix of float)
+0:326 'inF0' (temp 3X3 matrix of float)
+0:326 inverse sqrt (global 3X3 matrix of float)
+0:326 'inF0' (temp 3X3 matrix of float)
+0:326 clamp (global 3X3 matrix of float)
+0:326 'inF0' (temp 3X3 matrix of float)
+0:326 Constant:
+0:326 0.000000
+0:326 Constant:
+0:326 1.000000
+0:326 Sign (global 3X3 matrix of float)
+0:326 'inF0' (temp 3X3 matrix of float)
+0:326 sine (global 3X3 matrix of float)
+0:326 'inF0' (temp 3X3 matrix of float)
+0:326 Sequence
+0:326 move second child to first child (temp 3X3 matrix of float)
+0:326 'inF1' (temp 3X3 matrix of float)
+0:326 sine (temp 3X3 matrix of float)
+0:326 'inF0' (temp 3X3 matrix of float)
+0:326 move second child to first child (temp 3X3 matrix of float)
+0:326 'inF2' (temp 3X3 matrix of float)
+0:326 cosine (temp 3X3 matrix of float)
+0:326 'inF0' (temp 3X3 matrix of float)
+0:326 hyp. sine (global 3X3 matrix of float)
+0:326 'inF0' (temp 3X3 matrix of float)
+0:326 smoothstep (global 3X3 matrix of float)
+0:326 'inF0' (temp 3X3 matrix of float)
+0:326 'inF1' (temp 3X3 matrix of float)
+0:326 'inF2' (temp 3X3 matrix of float)
+0:326 sqrt (global 3X3 matrix of float)
+0:326 'inF0' (temp 3X3 matrix of float)
+0:326 step (global 3X3 matrix of float)
+0:326 'inF0' (temp 3X3 matrix of float)
+0:326 'inF1' (temp 3X3 matrix of float)
+0:326 tangent (global 3X3 matrix of float)
+0:326 'inF0' (temp 3X3 matrix of float)
+0:326 hyp. tangent (global 3X3 matrix of float)
+0:326 'inF0' (temp 3X3 matrix of float)
+0:326 transpose (global 3X3 matrix of float)
+0:326 'inF0' (temp 3X3 matrix of float)
+0:326 trunc (global 3X3 matrix of float)
+0:326 'inF0' (temp 3X3 matrix of float)
+0:329 Branch: Return with expression
+0:? Constant:
+0:? 3.000000
+0:? 3.000000
+0:? 3.000000
+0:? 3.000000
+0:? 3.000000
+0:? 3.000000
+0:? 3.000000
+0:? 3.000000
+0:? 3.000000
+0:353 Function Definition: VertexShaderFunction(mf44;mf44;mf44; (temp 4X4 matrix of float)
+0:333 Function Parameters:
+0:333 'inF0' (temp 4X4 matrix of float)
+0:333 'inF1' (temp 4X4 matrix of float)
+0:333 'inF2' (temp 4X4 matrix of float)
+0:? Sequence
+0:335 all (global bool)
+0:335 'inF0' (temp 4X4 matrix of float)
+0:335 Absolute value (global 4X4 matrix of float)
+0:335 'inF0' (temp 4X4 matrix of float)
+0:335 arc cosine (global 4X4 matrix of float)
+0:335 'inF0' (temp 4X4 matrix of float)
+0:335 any (global bool)
+0:335 'inF0' (temp 4X4 matrix of float)
+0:335 arc sine (global 4X4 matrix of float)
+0:335 'inF0' (temp 4X4 matrix of float)
+0:335 arc tangent (global 4X4 matrix of float)
+0:335 'inF0' (temp 4X4 matrix of float)
+0:335 arc tangent (global 4X4 matrix of float)
+0:335 'inF0' (temp 4X4 matrix of float)
+0:335 'inF1' (temp 4X4 matrix of float)
+0:335 Ceiling (global 4X4 matrix of float)
+0:335 'inF0' (temp 4X4 matrix of float)
+0:335 clamp (global 4X4 matrix of float)
+0:335 'inF0' (temp 4X4 matrix of float)
+0:335 'inF1' (temp 4X4 matrix of float)
+0:335 'inF2' (temp 4X4 matrix of float)
+0:335 cosine (global 4X4 matrix of float)
+0:335 'inF0' (temp 4X4 matrix of float)
+0:335 hyp. cosine (global 4X4 matrix of float)
+0:335 'inF0' (temp 4X4 matrix of float)
+0:335 degrees (global 4X4 matrix of float)
+0:335 'inF0' (temp 4X4 matrix of float)
+0:335 determinant (global float)
+0:335 'inF0' (temp 4X4 matrix of float)
+0:335 exp (global 4X4 matrix of float)
+0:335 'inF0' (temp 4X4 matrix of float)
+0:335 exp2 (global 4X4 matrix of float)
+0:335 'inF0' (temp 4X4 matrix of float)
+0:335 findMSB (global int)
+0:335 Constant:
+0:335 7 (const int)
+0:335 findLSB (global int)
+0:335 Constant:
+0:335 7 (const int)
+0:335 Floor (global 4X4 matrix of float)
+0:335 'inF0' (temp 4X4 matrix of float)
+0:335 mod (global 4X4 matrix of float)
+0:335 'inF0' (temp 4X4 matrix of float)
+0:335 'inF1' (temp 4X4 matrix of float)
+0:335 Fraction (global 4X4 matrix of float)
+0:335 'inF0' (temp 4X4 matrix of float)
+0:335 frexp (global 4X4 matrix of float)
+0:335 'inF0' (temp 4X4 matrix of float)
+0:335 'inF1' (temp 4X4 matrix of float)
+0:335 fwidth (global 4X4 matrix of float)
+0:335 'inF0' (temp 4X4 matrix of float)
+0:335 ldexp (global 4X4 matrix of float)
+0:335 'inF0' (temp 4X4 matrix of float)
+0:335 'inF1' (temp 4X4 matrix of float)
+0:335 log (global 4X4 matrix of float)
+0:335 'inF0' (temp 4X4 matrix of float)
+0:335 matrix-scale (temp 4X4 matrix of float)
+0:335 log2 (temp 4X4 matrix of float)
+0:335 'inF0' (temp 4X4 matrix of float)
+0:335 Constant:
+0:335 0.301030
+0:335 log2 (global 4X4 matrix of float)
+0:335 'inF0' (temp 4X4 matrix of float)
+0:335 max (global 4X4 matrix of float)
+0:335 'inF0' (temp 4X4 matrix of float)
+0:335 'inF1' (temp 4X4 matrix of float)
+0:335 min (global 4X4 matrix of float)
+0:335 'inF0' (temp 4X4 matrix of float)
+0:335 'inF1' (temp 4X4 matrix of float)
+0:335 pow (global 4X4 matrix of float)
+0:335 'inF0' (temp 4X4 matrix of float)
+0:335 'inF1' (temp 4X4 matrix of float)
+0:335 radians (global 4X4 matrix of float)
+0:335 'inF0' (temp 4X4 matrix of float)
+0:335 roundEven (global 4X4 matrix of float)
+0:335 'inF0' (temp 4X4 matrix of float)
+0:335 inverse sqrt (global 4X4 matrix of float)
+0:335 'inF0' (temp 4X4 matrix of float)
+0:335 clamp (global 4X4 matrix of float)
+0:335 'inF0' (temp 4X4 matrix of float)
+0:335 Constant:
+0:335 0.000000
+0:335 Constant:
+0:335 1.000000
+0:335 Sign (global 4X4 matrix of float)
+0:335 'inF0' (temp 4X4 matrix of float)
+0:335 sine (global 4X4 matrix of float)
+0:335 'inF0' (temp 4X4 matrix of float)
+0:335 Sequence
+0:335 move second child to first child (temp 4X4 matrix of float)
+0:335 'inF1' (temp 4X4 matrix of float)
+0:335 sine (temp 4X4 matrix of float)
+0:335 'inF0' (temp 4X4 matrix of float)
+0:335 move second child to first child (temp 4X4 matrix of float)
+0:335 'inF2' (temp 4X4 matrix of float)
+0:335 cosine (temp 4X4 matrix of float)
+0:335 'inF0' (temp 4X4 matrix of float)
+0:335 hyp. sine (global 4X4 matrix of float)
+0:335 'inF0' (temp 4X4 matrix of float)
+0:335 smoothstep (global 4X4 matrix of float)
+0:335 'inF0' (temp 4X4 matrix of float)
+0:335 'inF1' (temp 4X4 matrix of float)
+0:335 'inF2' (temp 4X4 matrix of float)
+0:335 sqrt (global 4X4 matrix of float)
+0:335 'inF0' (temp 4X4 matrix of float)
+0:335 step (global 4X4 matrix of float)
+0:335 'inF0' (temp 4X4 matrix of float)
+0:335 'inF1' (temp 4X4 matrix of float)
+0:335 tangent (global 4X4 matrix of float)
+0:335 'inF0' (temp 4X4 matrix of float)
+0:335 hyp. tangent (global 4X4 matrix of float)
+0:335 'inF0' (temp 4X4 matrix of float)
+0:335 transpose (global 4X4 matrix of float)
+0:335 'inF0' (temp 4X4 matrix of float)
+0:335 trunc (global 4X4 matrix of float)
+0:335 'inF0' (temp 4X4 matrix of float)
+0:338 Branch: Return with expression
+0:? Constant:
+0:? 4.000000
+0:? 4.000000
+0:? 4.000000
+0:? 4.000000
+0:? 4.000000
+0:? 4.000000
+0:? 4.000000
+0:? 4.000000
+0:? 4.000000
+0:? 4.000000
+0:? 4.000000
+0:? 4.000000
+0:? 4.000000
+0:? 4.000000
+0:? 4.000000
+0:? 4.000000
+0:360 Function Definition: TestGenMul(f1;f1;vf2;vf2;mf22;mf22; (temp void)
+0:356 Function Parameters:
+0:356 'inF0' (temp float)
+0:356 'inF1' (temp float)
+0:356 'inFV0' (temp 2-component vector of float)
+0:356 'inFV1' (temp 2-component vector of float)
+0:356 'inFM0' (temp 2X2 matrix of float)
+0:356 'inFM1' (temp 2X2 matrix of float)
+0:? Sequence
+0:357 move second child to first child (temp float)
+0:357 'r0' (temp float)
+0:357 component-wise multiply (temp float)
+0:357 'inF0' (temp float)
+0:357 'inF1' (temp float)
+0:357 move second child to first child (temp 2-component vector of float)
+0:357 'r1' (temp 2-component vector of float)
+0:357 vector-scale (temp 2-component vector of float)
+0:357 'inFV0' (temp 2-component vector of float)
+0:357 'inF0' (temp float)
+0:357 move second child to first child (temp 2-component vector of float)
+0:357 'r2' (temp 2-component vector of float)
+0:357 vector-scale (temp 2-component vector of float)
+0:357 'inF0' (temp float)
+0:357 'inFV0' (temp 2-component vector of float)
+0:357 move second child to first child (temp float)
+0:357 'r3' (temp float)
+0:357 dot-product (global float)
+0:357 'inFV0' (temp 2-component vector of float)
+0:357 'inFV1' (temp 2-component vector of float)
+0:357 move second child to first child (temp 2-component vector of float)
+0:357 'r4' (temp 2-component vector of float)
+0:357 matrix-times-vector (temp 2-component vector of float)
+0:357 'inFM0' (temp 2X2 matrix of float)
+0:357 'inFV0' (temp 2-component vector of float)
+0:357 move second child to first child (temp 2-component vector of float)
+0:357 'r5' (temp 2-component vector of float)
+0:357 vector-times-matrix (temp 2-component vector of float)
+0:357 'inFV0' (temp 2-component vector of float)
+0:357 'inFM0' (temp 2X2 matrix of float)
+0:357 move second child to first child (temp 2X2 matrix of float)
+0:357 'r6' (temp 2X2 matrix of float)
+0:357 matrix-scale (temp 2X2 matrix of float)
+0:357 'inFM0' (temp 2X2 matrix of float)
+0:357 'inF0' (temp float)
+0:357 move second child to first child (temp 2X2 matrix of float)
+0:357 'r7' (temp 2X2 matrix of float)
+0:357 matrix-scale (temp 2X2 matrix of float)
+0:357 'inF0' (temp float)
+0:357 'inFM0' (temp 2X2 matrix of float)
+0:357 move second child to first child (temp 2X2 matrix of float)
+0:357 'r8' (temp 2X2 matrix of float)
+0:357 matrix-multiply (temp 2X2 matrix of float)
+0:357 'inFM0' (temp 2X2 matrix of float)
+0:357 'inFM1' (temp 2X2 matrix of float)
+0:367 Function Definition: TestGenMul(f1;f1;vf3;vf3;mf33;mf33; (temp void)
+0:363 Function Parameters:
+0:363 'inF0' (temp float)
+0:363 'inF1' (temp float)
+0:363 'inFV0' (temp 3-component vector of float)
+0:363 'inFV1' (temp 3-component vector of float)
+0:363 'inFM0' (temp 3X3 matrix of float)
+0:363 'inFM1' (temp 3X3 matrix of float)
+0:? Sequence
+0:364 move second child to first child (temp float)
+0:364 'r0' (temp float)
+0:364 component-wise multiply (temp float)
+0:364 'inF0' (temp float)
+0:364 'inF1' (temp float)
+0:364 move second child to first child (temp 3-component vector of float)
+0:364 'r1' (temp 3-component vector of float)
+0:364 vector-scale (temp 3-component vector of float)
+0:364 'inFV0' (temp 3-component vector of float)
+0:364 'inF0' (temp float)
+0:364 move second child to first child (temp 3-component vector of float)
+0:364 'r2' (temp 3-component vector of float)
+0:364 vector-scale (temp 3-component vector of float)
+0:364 'inF0' (temp float)
+0:364 'inFV0' (temp 3-component vector of float)
+0:364 move second child to first child (temp float)
+0:364 'r3' (temp float)
+0:364 dot-product (global float)
+0:364 'inFV0' (temp 3-component vector of float)
+0:364 'inFV1' (temp 3-component vector of float)
+0:364 move second child to first child (temp 3-component vector of float)
+0:364 'r4' (temp 3-component vector of float)
+0:364 matrix-times-vector (temp 3-component vector of float)
+0:364 'inFM0' (temp 3X3 matrix of float)
+0:364 'inFV0' (temp 3-component vector of float)
+0:364 move second child to first child (temp 3-component vector of float)
+0:364 'r5' (temp 3-component vector of float)
+0:364 vector-times-matrix (temp 3-component vector of float)
+0:364 'inFV0' (temp 3-component vector of float)
+0:364 'inFM0' (temp 3X3 matrix of float)
+0:364 move second child to first child (temp 3X3 matrix of float)
+0:364 'r6' (temp 3X3 matrix of float)
+0:364 matrix-scale (temp 3X3 matrix of float)
+0:364 'inFM0' (temp 3X3 matrix of float)
+0:364 'inF0' (temp float)
+0:364 move second child to first child (temp 3X3 matrix of float)
+0:364 'r7' (temp 3X3 matrix of float)
+0:364 matrix-scale (temp 3X3 matrix of float)
+0:364 'inF0' (temp float)
+0:364 'inFM0' (temp 3X3 matrix of float)
+0:364 move second child to first child (temp 3X3 matrix of float)
+0:364 'r8' (temp 3X3 matrix of float)
+0:364 matrix-multiply (temp 3X3 matrix of float)
+0:364 'inFM0' (temp 3X3 matrix of float)
+0:364 'inFM1' (temp 3X3 matrix of float)
+0:373 Function Definition: TestGenMul(f1;f1;vf4;vf4;mf44;mf44; (temp void)
+0:370 Function Parameters:
+0:370 'inF0' (temp float)
+0:370 'inF1' (temp float)
+0:370 'inFV0' (temp 4-component vector of float)
+0:370 'inFV1' (temp 4-component vector of float)
+0:370 'inFM0' (temp 4X4 matrix of float)
+0:370 'inFM1' (temp 4X4 matrix of float)
+0:? Sequence
+0:371 move second child to first child (temp float)
+0:371 'r0' (temp float)
+0:371 component-wise multiply (temp float)
+0:371 'inF0' (temp float)
+0:371 'inF1' (temp float)
+0:371 move second child to first child (temp 4-component vector of float)
+0:371 'r1' (temp 4-component vector of float)
+0:371 vector-scale (temp 4-component vector of float)
+0:371 'inFV0' (temp 4-component vector of float)
+0:371 'inF0' (temp float)
+0:371 move second child to first child (temp 4-component vector of float)
+0:371 'r2' (temp 4-component vector of float)
+0:371 vector-scale (temp 4-component vector of float)
+0:371 'inF0' (temp float)
+0:371 'inFV0' (temp 4-component vector of float)
+0:371 move second child to first child (temp float)
+0:371 'r3' (temp float)
+0:371 dot-product (global float)
+0:371 'inFV0' (temp 4-component vector of float)
+0:371 'inFV1' (temp 4-component vector of float)
+0:371 move second child to first child (temp 4-component vector of float)
+0:371 'r4' (temp 4-component vector of float)
+0:371 matrix-times-vector (temp 4-component vector of float)
+0:371 'inFM0' (temp 4X4 matrix of float)
+0:371 'inFV0' (temp 4-component vector of float)
+0:371 move second child to first child (temp 4-component vector of float)
+0:371 'r5' (temp 4-component vector of float)
+0:371 vector-times-matrix (temp 4-component vector of float)
+0:371 'inFV0' (temp 4-component vector of float)
+0:371 'inFM0' (temp 4X4 matrix of float)
+0:371 move second child to first child (temp 4X4 matrix of float)
+0:371 'r6' (temp 4X4 matrix of float)
+0:371 matrix-scale (temp 4X4 matrix of float)
+0:371 'inFM0' (temp 4X4 matrix of float)
+0:371 'inF0' (temp float)
+0:371 move second child to first child (temp 4X4 matrix of float)
+0:371 'r7' (temp 4X4 matrix of float)
+0:371 matrix-scale (temp 4X4 matrix of float)
+0:371 'inF0' (temp float)
+0:371 'inFM0' (temp 4X4 matrix of float)
+0:371 move second child to first child (temp 4X4 matrix of float)
+0:371 'r8' (temp 4X4 matrix of float)
+0:371 matrix-multiply (temp 4X4 matrix of float)
+0:371 'inFM0' (temp 4X4 matrix of float)
+0:371 'inFM1' (temp 4X4 matrix of float)
+0:? Linker Objects
+
+// Module Version 10000
+// Generated by (magic number): 80001
+// Id's are bound by 1064
+
+ Capability Shader
+ 1: ExtInstImport "GLSL.std.450"
+ MemoryModel Logical GLSL450
+ EntryPoint Vertex 4 "VertexShaderFunction"
+ Source HLSL 450
+ Name 4 "VertexShaderFunction"
+ Name 19 "TestGenMul(f1;f1;vf2;vf2;mf22;mf22;"
+ Name 13 "inF0"
+ Name 14 "inF1"
+ Name 15 "inFV0"
+ Name 16 "inFV1"
+ Name 17 "inFM0"
+ Name 18 "inFM1"
+ Name 32 "TestGenMul(f1;f1;vf3;vf3;mf33;mf33;"
+ Name 26 "inF0"
+ Name 27 "inF1"
+ Name 28 "inFV0"
+ Name 29 "inFV1"
+ Name 30 "inFM0"
+ Name 31 "inFM1"
+ Name 45 "TestGenMul(f1;f1;vf4;vf4;mf44;mf44;"
+ Name 39 "inF0"
+ Name 40 "inF1"
+ Name 41 "inFV0"
+ Name 42 "inFV1"
+ Name 43 "inFM0"
+ Name 44 "inFM1"
+ Name 47 "inF0"
+ Name 62 "inF1"
+ Name 69 "inF2"
+ Name 97 "ResType"
+ Name 166 "inF0"
+ Name 180 "inF1"
+ Name 187 "inF2"
+ Name 225 "ResType"
+ Name 306 "inF0"
+ Name 320 "inF1"
+ Name 327 "inF2"
+ Name 368 "ResType"
+ Name 448 "inF0"
+ Name 462 "inF1"
+ Name 469 "inF2"
+ Name 515 "ResType"
+ Name 596 "inF0"
+ Name 610 "inF1"
+ Name 617 "inF2"
+ Name 648 "ResType"
+ Name 713 "inF0"
+ Name 727 "inF1"
+ Name 734 "inF2"
+ Name 768 "ResType"
+ Name 833 "inF0"
+ Name 847 "inF1"
+ Name 854 "inF2"
+ Name 891 "ResType"
+ Name 956 "r0"
+ Name 960 "r1"
+ Name 964 "r2"
+ Name 968 "r3"
+ Name 972 "r4"
+ Name 976 "r5"
+ Name 980 "r6"
+ Name 984 "r7"
+ Name 988 "r8"
+ Name 992 "r0"
+ Name 996 "r1"
+ Name 1000 "r2"
+ Name 1004 "r3"
+ Name 1008 "r4"
+ Name 1012 "r5"
+ Name 1016 "r6"
+ Name 1020 "r7"
+ Name 1024 "r8"
+ Name 1028 "r0"
+ Name 1032 "r1"
+ Name 1036 "r2"
+ Name 1040 "r3"
+ Name 1044 "r4"
+ Name 1048 "r5"
+ Name 1052 "r6"
+ Name 1056 "r7"
+ Name 1060 "r8"
+ 2: TypeVoid
+ 3: TypeFunction 2
+ 6: TypeFloat 32
+ 7: TypePointer Function 6(float)
+ 8: TypeVector 6(float) 2
+ 9: TypePointer Function 8(fvec2)
+ 10: TypeMatrix 8(fvec2) 2
+ 11: TypePointer Function 10
+ 12: TypeFunction 2 7(ptr) 7(ptr) 9(ptr) 9(ptr) 11(ptr) 11(ptr)
+ 21: TypeVector 6(float) 3
+ 22: TypePointer Function 21(fvec3)
+ 23: TypeMatrix 21(fvec3) 3
+ 24: TypePointer Function 23
+ 25: TypeFunction 2 7(ptr) 7(ptr) 22(ptr) 22(ptr) 24(ptr) 24(ptr)
+ 34: TypeVector 6(float) 4
+ 35: TypePointer Function 34(fvec4)
+ 36: TypeMatrix 34(fvec4) 4
+ 37: TypePointer Function 36
+ 38: TypeFunction 2 7(ptr) 7(ptr) 35(ptr) 35(ptr) 37(ptr) 37(ptr)
+ 49: TypeBool
+ 76: TypeInt 32 0
+ 77: 76(int) Constant 7
+ 85: TypeInt 32 1
+ 86: 85(int) Constant 7
+ 97(ResType): TypeStruct 6(float) 85(int)
+ 114: 6(float) Constant 1050288283
+ 129: 76(int) Constant 2
+ 136: 6(float) Constant 0
+ 137: 6(float) Constant 1065353216
+ 194: TypeVector 76(int) 2
+ 195: 76(int) Constant 3
+ 196: 194(ivec2) ConstantComposite 77 195
+ 224: TypeVector 85(int) 2
+ 225(ResType): TypeStruct 8(fvec2) 224(ivec2)
+ 232: TypeVector 49(bool) 2
+ 266: 6(float) Constant 1073741824
+ 268: 76(int) Constant 1
+ 269: 194(ivec2) ConstantComposite 268 129
+ 304: 8(fvec2) ConstantComposite 137 266
+ 334: TypeVector 76(int) 3
+ 335: 76(int) Constant 5
+ 336: 334(ivec3) ConstantComposite 77 195 335
+ 367: TypeVector 85(int) 3
+ 368(ResType): TypeStruct 21(fvec3) 367(ivec3)
+ 375: TypeVector 49(bool) 3
+ 410: 334(ivec3) ConstantComposite 268 129 195
+ 445: 6(float) Constant 1077936128
+ 446: 21(fvec3) ConstantComposite 137 266 445
+ 476: TypeVector 76(int) 4
+ 477: 476(ivec4) ConstantComposite 77 195 335 129
+ 514: TypeVector 85(int) 4
+ 515(ResType): TypeStruct 34(fvec4) 514(ivec4)
+ 522: TypeVector 49(bool) 4
+ 557: 76(int) Constant 4
+ 558: 476(ivec4) ConstantComposite 268 129 195 557
+ 593: 6(float) Constant 1082130432
+ 594: 34(fvec4) ConstantComposite 137 266 445 593
+ 648(ResType): TypeStruct 10 224(ivec2)
+ 710: 8(fvec2) ConstantComposite 266 266
+ 711: 10 ConstantComposite 710 710
+ 768(ResType): TypeStruct 23 367(ivec3)
+ 830: 21(fvec3) ConstantComposite 445 445 445
+ 831: 23 ConstantComposite 830 830 830
+ 891(ResType): TypeStruct 36 514(ivec4)
+ 953: 34(fvec4) ConstantComposite 593 593 593 593
+ 954: 36 ConstantComposite 953 953 953 953
+4(VertexShaderFunction): 2 Function None 3
+ 5: Label
+ 47(inF0): 7(ptr) Variable Function
+ 62(inF1): 7(ptr) Variable Function
+ 69(inF2): 7(ptr) Variable Function
+ 166(inF0): 9(ptr) Variable Function
+ 180(inF1): 9(ptr) Variable Function
+ 187(inF2): 9(ptr) Variable Function
+ 306(inF0): 22(ptr) Variable Function
+ 320(inF1): 22(ptr) Variable Function
+ 327(inF2): 22(ptr) Variable Function
+ 448(inF0): 35(ptr) Variable Function
+ 462(inF1): 35(ptr) Variable Function
+ 469(inF2): 35(ptr) Variable Function
+ 596(inF0): 11(ptr) Variable Function
+ 610(inF1): 11(ptr) Variable Function
+ 617(inF2): 11(ptr) Variable Function
+ 713(inF0): 24(ptr) Variable Function
+ 727(inF1): 24(ptr) Variable Function
+ 734(inF2): 24(ptr) Variable Function
+ 833(inF0): 37(ptr) Variable Function
+ 847(inF1): 37(ptr) Variable Function
+ 854(inF2): 37(ptr) Variable Function
+ 48: 6(float) Load 47(inF0)
+ 50: 49(bool) All 48
+ 51: 6(float) Load 47(inF0)
+ 52: 6(float) ExtInst 1(GLSL.std.450) 4(FAbs) 51
+ 53: 6(float) Load 47(inF0)
+ 54: 6(float) ExtInst 1(GLSL.std.450) 17(Acos) 53
+ 55: 6(float) Load 47(inF0)
+ 56: 49(bool) Any 55
+ 57: 6(float) Load 47(inF0)
+ 58: 6(float) ExtInst 1(GLSL.std.450) 16(Asin) 57
+ 59: 6(float) Load 47(inF0)
+ 60: 6(float) ExtInst 1(GLSL.std.450) 18(Atan) 59
+ 61: 6(float) Load 47(inF0)
+ 63: 6(float) Load 62(inF1)
+ 64: 6(float) ExtInst 1(GLSL.std.450) 25(Atan2) 61 63
+ 65: 6(float) Load 47(inF0)
+ 66: 6(float) ExtInst 1(GLSL.std.450) 9(Ceil) 65
+ 67: 6(float) Load 47(inF0)
+ 68: 6(float) Load 62(inF1)
+ 70: 6(float) Load 69(inF2)
+ 71: 6(float) ExtInst 1(GLSL.std.450) 43(FClamp) 67 68 70
+ 72: 6(float) Load 47(inF0)
+ 73: 6(float) ExtInst 1(GLSL.std.450) 14(Cos) 72
+ 74: 6(float) Load 47(inF0)
+ 75: 6(float) ExtInst 1(GLSL.std.450) 20(Cosh) 74
+ 78: 76(int) BitCount 77
+ 79: 6(float) Load 47(inF0)
+ 80: 6(float) ExtInst 1(GLSL.std.450) 12(Degrees) 79
+ 81: 6(float) Load 47(inF0)
+ 82: 6(float) ExtInst 1(GLSL.std.450) 27(Exp) 81
+ 83: 6(float) Load 47(inF0)
+ 84: 6(float) ExtInst 1(GLSL.std.450) 29(Exp2) 83
+ 87: 85(int) ExtInst 1(GLSL.std.450) 74(FindSMsb) 86
+ 88: 85(int) ExtInst 1(GLSL.std.450) 73(FindILsb) 86
+ 89: 6(float) Load 47(inF0)
+ 90: 6(float) ExtInst 1(GLSL.std.450) 8(Floor) 89
+ 91: 6(float) Load 47(inF0)
+ 92: 6(float) Load 62(inF1)
+ 93: 6(float) FMod 91 92
+ 94: 6(float) Load 47(inF0)
+ 95: 6(float) ExtInst 1(GLSL.std.450) 10(Fract) 94
+ 96: 6(float) Load 47(inF0)
+ 98: 97(ResType) ExtInst 1(GLSL.std.450) 52(FrexpStruct) 96
+ 99: 85(int) CompositeExtract 98 1
+ Store 62(inF1) 99
+ 100: 6(float) CompositeExtract 98 0
+ 101: 6(float) Load 47(inF0)
+ 102: 6(float) Fwidth 101
+ 103: 6(float) Load 47(inF0)
+ 104: 49(bool) IsInf 103
+ 105: 6(float) Load 47(inF0)
+ 106: 49(bool) IsNan 105
+ 107: 6(float) Load 47(inF0)
+ 108: 6(float) Load 62(inF1)
+ 109: 6(float) ExtInst 1(GLSL.std.450) 53(Ldexp) 107 108
+ 110: 6(float) Load 47(inF0)
+ 111: 6(float) ExtInst 1(GLSL.std.450) 28(Log) 110
+ 112: 6(float) Load 47(inF0)
+ 113: 6(float) ExtInst 1(GLSL.std.450) 30(Log2) 112
+ 115: 6(float) FMul 113 114
+ 116: 6(float) Load 47(inF0)
+ 117: 6(float) ExtInst 1(GLSL.std.450) 30(Log2) 116
+ 118: 6(float) Load 47(inF0)
+ 119: 6(float) Load 62(inF1)
+ 120: 6(float) ExtInst 1(GLSL.std.450) 40(FMax) 118 119
+ 121: 6(float) Load 47(inF0)
+ 122: 6(float) Load 62(inF1)
+ 123: 6(float) ExtInst 1(GLSL.std.450) 37(FMin) 121 122
+ 124: 6(float) Load 47(inF0)
+ 125: 6(float) Load 62(inF1)
+ 126: 6(float) ExtInst 1(GLSL.std.450) 26(Pow) 124 125
+ 127: 6(float) Load 47(inF0)
+ 128: 6(float) ExtInst 1(GLSL.std.450) 11(Radians) 127
+ 130: 76(int) BitReverse 129
+ 131: 6(float) Load 47(inF0)
+ 132: 6(float) ExtInst 1(GLSL.std.450) 2(RoundEven) 131
+ 133: 6(float) Load 47(inF0)
+ 134: 6(float) ExtInst 1(GLSL.std.450) 32(InverseSqrt) 133
+ 135: 6(float) Load 47(inF0)
+ 138: 6(float) ExtInst 1(GLSL.std.450) 43(FClamp) 135 136 137
+ 139: 6(float) Load 47(inF0)
+ 140: 6(float) ExtInst 1(GLSL.std.450) 6(FSign) 139
+ 141: 6(float) Load 47(inF0)
+ 142: 6(float) ExtInst 1(GLSL.std.450) 13(Sin) 141
+ 143: 6(float) Load 47(inF0)
+ 144: 6(float) ExtInst 1(GLSL.std.450) 13(Sin) 143
+ Store 62(inF1) 144
+ 145: 6(float) Load 47(inF0)
+ 146: 6(float) ExtInst 1(GLSL.std.450) 14(Cos) 145
+ Store 69(inF2) 146
+ 147: 6(float) Load 47(inF0)
+ 148: 6(float) ExtInst 1(GLSL.std.450) 19(Sinh) 147
+ 149: 6(float) Load 47(inF0)
+ 150: 6(float) Load 62(inF1)
+ 151: 6(float) Load 69(inF2)
+ 152: 6(float) ExtInst 1(GLSL.std.450) 49(SmoothStep) 149 150 151
+ 153: 6(float) Load 47(inF0)
+ 154: 6(float) ExtInst 1(GLSL.std.450) 31(Sqrt) 153
+ 155: 6(float) Load 47(inF0)
+ 156: 6(float) Load 62(inF1)
+ 157: 6(float) ExtInst 1(GLSL.std.450) 48(Step) 155 156
+ 158: 6(float) Load 47(inF0)
+ 159: 6(float) ExtInst 1(GLSL.std.450) 15(Tan) 158
+ 160: 6(float) Load 47(inF0)
+ 161: 6(float) ExtInst 1(GLSL.std.450) 21(Tanh) 160
+ 162: 6(float) Load 47(inF0)
+ 163: 6(float) ExtInst 1(GLSL.std.450) 3(Trunc) 162
+ ReturnValue 136
+ FunctionEnd
+19(TestGenMul(f1;f1;vf2;vf2;mf22;mf22;): 2 Function None 12
+ 13(inF0): 7(ptr) FunctionParameter
+ 14(inF1): 7(ptr) FunctionParameter
+ 15(inFV0): 9(ptr) FunctionParameter
+ 16(inFV1): 9(ptr) FunctionParameter
+ 17(inFM0): 11(ptr) FunctionParameter
+ 18(inFM1): 11(ptr) FunctionParameter
+ 20: Label
+ 956(r0): 7(ptr) Variable Function
+ 960(r1): 9(ptr) Variable Function
+ 964(r2): 9(ptr) Variable Function
+ 968(r3): 7(ptr) Variable Function
+ 972(r4): 9(ptr) Variable Function
+ 976(r5): 9(ptr) Variable Function
+ 980(r6): 11(ptr) Variable Function
+ 984(r7): 11(ptr) Variable Function
+ 988(r8): 11(ptr) Variable Function
+ 957: 6(float) Load 13(inF0)
+ 958: 6(float) Load 14(inF1)
+ 959: 6(float) FMul 957 958
+ Store 956(r0) 959
+ 961: 8(fvec2) Load 15(inFV0)
+ 962: 6(float) Load 13(inF0)
+ 963: 8(fvec2) VectorTimesScalar 961 962
+ Store 960(r1) 963
+ 965: 6(float) Load 13(inF0)
+ 966: 8(fvec2) Load 15(inFV0)
+ 967: 8(fvec2) VectorTimesScalar 966 965
+ Store 964(r2) 967
+ 969: 8(fvec2) Load 15(inFV0)
+ 970: 8(fvec2) Load 16(inFV1)
+ 971: 6(float) Dot 969 970
+ Store 968(r3) 971
+ 973: 10 Load 17(inFM0)
+ 974: 8(fvec2) Load 15(inFV0)
+ 975: 8(fvec2) MatrixTimesVector 973 974
+ Store 972(r4) 975
+ 977: 8(fvec2) Load 15(inFV0)
+ 978: 10 Load 17(inFM0)
+ 979: 8(fvec2) VectorTimesMatrix 977 978
+ Store 976(r5) 979
+ 981: 10 Load 17(inFM0)
+ 982: 6(float) Load 13(inF0)
+ 983: 10 MatrixTimesScalar 981 982
+ Store 980(r6) 983
+ 985: 6(float) Load 13(inF0)
+ 986: 10 Load 17(inFM0)
+ 987: 10 MatrixTimesScalar 986 985
+ Store 984(r7) 987
+ 989: 10 Load 17(inFM0)
+ 990: 10 Load 18(inFM1)
+ 991: 10 MatrixTimesMatrix 989 990
+ Store 988(r8) 991
+ Return
+ FunctionEnd
+32(TestGenMul(f1;f1;vf3;vf3;mf33;mf33;): 2 Function None 25
+ 26(inF0): 7(ptr) FunctionParameter
+ 27(inF1): 7(ptr) FunctionParameter
+ 28(inFV0): 22(ptr) FunctionParameter
+ 29(inFV1): 22(ptr) FunctionParameter
+ 30(inFM0): 24(ptr) FunctionParameter
+ 31(inFM1): 24(ptr) FunctionParameter
+ 33: Label
+ 992(r0): 7(ptr) Variable Function
+ 996(r1): 22(ptr) Variable Function
+ 1000(r2): 22(ptr) Variable Function
+ 1004(r3): 7(ptr) Variable Function
+ 1008(r4): 22(ptr) Variable Function
+ 1012(r5): 22(ptr) Variable Function
+ 1016(r6): 24(ptr) Variable Function
+ 1020(r7): 24(ptr) Variable Function
+ 1024(r8): 24(ptr) Variable Function
+ 993: 6(float) Load 26(inF0)
+ 994: 6(float) Load 27(inF1)
+ 995: 6(float) FMul 993 994
+ Store 992(r0) 995
+ 997: 21(fvec3) Load 28(inFV0)
+ 998: 6(float) Load 26(inF0)
+ 999: 21(fvec3) VectorTimesScalar 997 998
+ Store 996(r1) 999
+ 1001: 6(float) Load 26(inF0)
+ 1002: 21(fvec3) Load 28(inFV0)
+ 1003: 21(fvec3) VectorTimesScalar 1002 1001
+ Store 1000(r2) 1003
+ 1005: 21(fvec3) Load 28(inFV0)
+ 1006: 21(fvec3) Load 29(inFV1)
+ 1007: 6(float) Dot 1005 1006
+ Store 1004(r3) 1007
+ 1009: 23 Load 30(inFM0)
+ 1010: 21(fvec3) Load 28(inFV0)
+ 1011: 21(fvec3) MatrixTimesVector 1009 1010
+ Store 1008(r4) 1011
+ 1013: 21(fvec3) Load 28(inFV0)
+ 1014: 23 Load 30(inFM0)
+ 1015: 21(fvec3) VectorTimesMatrix 1013 1014
+ Store 1012(r5) 1015
+ 1017: 23 Load 30(inFM0)
+ 1018: 6(float) Load 26(inF0)
+ 1019: 23 MatrixTimesScalar 1017 1018
+ Store 1016(r6) 1019
+ 1021: 6(float) Load 26(inF0)
+ 1022: 23 Load 30(inFM0)
+ 1023: 23 MatrixTimesScalar 1022 1021
+ Store 1020(r7) 1023
+ 1025: 23 Load 30(inFM0)
+ 1026: 23 Load 31(inFM1)
+ 1027: 23 MatrixTimesMatrix 1025 1026
+ Store 1024(r8) 1027
+ Return
+ FunctionEnd
+45(TestGenMul(f1;f1;vf4;vf4;mf44;mf44;): 2 Function None 38
+ 39(inF0): 7(ptr) FunctionParameter
+ 40(inF1): 7(ptr) FunctionParameter
+ 41(inFV0): 35(ptr) FunctionParameter
+ 42(inFV1): 35(ptr) FunctionParameter
+ 43(inFM0): 37(ptr) FunctionParameter
+ 44(inFM1): 37(ptr) FunctionParameter
+ 46: Label
+ 1028(r0): 7(ptr) Variable Function
+ 1032(r1): 35(ptr) Variable Function
+ 1036(r2): 35(ptr) Variable Function
+ 1040(r3): 7(ptr) Variable Function
+ 1044(r4): 35(ptr) Variable Function
+ 1048(r5): 35(ptr) Variable Function
+ 1052(r6): 37(ptr) Variable Function
+ 1056(r7): 37(ptr) Variable Function
+ 1060(r8): 37(ptr) Variable Function
+ 1029: 6(float) Load 39(inF0)
+ 1030: 6(float) Load 40(inF1)
+ 1031: 6(float) FMul 1029 1030
+ Store 1028(r0) 1031
+ 1033: 34(fvec4) Load 41(inFV0)
+ 1034: 6(float) Load 39(inF0)
+ 1035: 34(fvec4) VectorTimesScalar 1033 1034
+ Store 1032(r1) 1035
+ 1037: 6(float) Load 39(inF0)
+ 1038: 34(fvec4) Load 41(inFV0)
+ 1039: 34(fvec4) VectorTimesScalar 1038 1037
+ Store 1036(r2) 1039
+ 1041: 34(fvec4) Load 41(inFV0)
+ 1042: 34(fvec4) Load 42(inFV1)
+ 1043: 6(float) Dot 1041 1042
+ Store 1040(r3) 1043
+ 1045: 36 Load 43(inFM0)
+ 1046: 34(fvec4) Load 41(inFV0)
+ 1047: 34(fvec4) MatrixTimesVector 1045 1046
+ Store 1044(r4) 1047
+ 1049: 34(fvec4) Load 41(inFV0)
+ 1050: 36 Load 43(inFM0)
+ 1051: 34(fvec4) VectorTimesMatrix 1049 1050
+ Store 1048(r5) 1051
+ 1053: 36 Load 43(inFM0)
+ 1054: 6(float) Load 39(inF0)
+ 1055: 36 MatrixTimesScalar 1053 1054
+ Store 1052(r6) 1055
+ 1057: 6(float) Load 39(inF0)
+ 1058: 36 Load 43(inFM0)
+ 1059: 36 MatrixTimesScalar 1058 1057
+ Store 1056(r7) 1059
+ 1061: 36 Load 43(inFM0)
+ 1062: 36 Load 44(inFM1)
+ 1063: 36 MatrixTimesMatrix 1061 1062
+ Store 1060(r8) 1063
+ Return
+ FunctionEnd
diff --git a/chromium/third_party/glslang/src/Test/baseResults/hlsl.matType.frag.out b/chromium/third_party/glslang/src/Test/baseResults/hlsl.matType.frag.out
new file mode 100755
index 00000000000..298211df4ad
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/hlsl.matType.frag.out
@@ -0,0 +1,101 @@
+hlsl.matType.frag
+Shader version: 450
+gl_FragCoord origin is upper left
+0:? Sequence
+0:1 move second child to first child (temp 1-component vector of float)
+0:1 'f1' (temp 1-component vector of float)
+0:1 Constant:
+0:1 1.000000
+0:11 Function Definition: ShaderFunction(vf1;f1; (temp 1-component vector of float)
+0:9 Function Parameters:
+0:9 'inFloat1' (temp 1-component vector of float)
+0:9 'inScalar' (temp float)
+0:? Linker Objects
+0:? 'f1' (temp 1-component vector of float)
+0:? 'fmat11' (temp 1X1 matrix of float)
+0:? 'fmat41' (temp 1X4 matrix of float)
+0:? 'fmat12' (temp 2X1 matrix of float)
+0:? 'dmat23' (temp 3X2 matrix of double)
+0:? 'int44' (temp 4X4 matrix of int)
+
+
+Linked fragment stage:
+
+
+Shader version: 450
+gl_FragCoord origin is upper left
+0:? Sequence
+0:1 move second child to first child (temp 1-component vector of float)
+0:1 'f1' (temp 1-component vector of float)
+0:1 Constant:
+0:1 1.000000
+0:11 Function Definition: ShaderFunction(vf1;f1; (temp 1-component vector of float)
+0:9 Function Parameters:
+0:9 'inFloat1' (temp 1-component vector of float)
+0:9 'inScalar' (temp float)
+0:? Linker Objects
+0:? 'f1' (temp 1-component vector of float)
+0:? 'fmat11' (temp 1X1 matrix of float)
+0:? 'fmat41' (temp 1X4 matrix of float)
+0:? 'fmat12' (temp 2X1 matrix of float)
+0:? 'dmat23' (temp 3X2 matrix of double)
+0:? 'int44' (temp 4X4 matrix of int)
+
+// Module Version 10000
+// Generated by (magic number): 80001
+// Id's are bound by 36
+
+ Capability Shader
+ Capability Float64
+ 1: ExtInstImport "GLSL.std.450"
+ MemoryModel Logical GLSL450
+ EntryPoint Fragment 4 "PixelShaderFunction"
+ ExecutionMode 4 OriginUpperLeft
+ Source HLSL 450
+ Name 4 "PixelShaderFunction"
+ Name 11 "ShaderFunction(vf1;f1;"
+ Name 9 "inFloat1"
+ Name 10 "inScalar"
+ Name 14 "f1"
+ Name 18 "fmat11"
+ Name 22 "fmat41"
+ Name 25 "fmat12"
+ Name 30 "dmat23"
+ Name 35 "int44"
+ 2: TypeVoid
+ 3: TypeFunction 2
+ 6: TypeFloat 32
+ 7: TypePointer Function 6(float)
+ 8: TypeFunction 6(float) 7(ptr) 7(ptr)
+ 15: TypeVector 6(float) 1
+ 16: TypeMatrix 15(fvec) 1
+ 17: TypePointer Function 16
+ 19: TypeVector 6(float) 4
+ 20: TypeMatrix 19(fvec4) 1
+ 21: TypePointer Function 20
+ 23: TypeMatrix 15(fvec) 2
+ 24: TypePointer Function 23
+ 26: TypeFloat 64
+ 27: TypeVector 26(float) 2
+ 28: TypeMatrix 27(fvec2) 3
+ 29: TypePointer Function 28
+ 31: TypeInt 32 1
+ 32: TypeVector 31(int) 4
+ 33: TypeMatrix 32(ivec4) 4
+ 34: TypePointer Function 33
+4(PixelShaderFunction): 2 Function None 3
+ 5: Label
+ FunctionEnd
+11(ShaderFunction(vf1;f1;): 6(float) Function None 8
+ 9(inFloat1): 7(ptr) FunctionParameter
+ 10(inScalar): 7(ptr) FunctionParameter
+ 12: Label
+ 14(f1): 7(ptr) Variable Function
+ 18(fmat11): 17(ptr) Variable Function
+ 22(fmat41): 21(ptr) Variable Function
+ 25(fmat12): 24(ptr) Variable Function
+ 30(dmat23): 29(ptr) Variable Function
+ 35(int44): 34(ptr) Variable Function
+ 13: 6(float) Undef
+ ReturnValue 13
+ FunctionEnd
diff --git a/chromium/third_party/glslang/src/Test/baseResults/hlsl.max.frag.out b/chromium/third_party/glslang/src/Test/baseResults/hlsl.max.frag.out
new file mode 100755
index 00000000000..7c3c7e69194
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/hlsl.max.frag.out
@@ -0,0 +1,60 @@
+hlsl.max.frag
+Shader version: 450
+gl_FragCoord origin is upper left
+0:? Sequence
+0:5 Function Definition: PixelShaderFunction(vf4;vf4; (temp 4-component vector of float)
+0:2 Function Parameters:
+0:2 'input1' (temp 4-component vector of float)
+0:2 'input2' (temp 4-component vector of float)
+0:? Sequence
+0:3 Branch: Return with expression
+0:3 max (global 4-component vector of float)
+0:3 'input1' (temp 4-component vector of float)
+0:3 'input2' (temp 4-component vector of float)
+0:? Linker Objects
+
+
+Linked fragment stage:
+
+
+Shader version: 450
+gl_FragCoord origin is upper left
+0:? Sequence
+0:5 Function Definition: PixelShaderFunction(vf4;vf4; (temp 4-component vector of float)
+0:2 Function Parameters:
+0:2 'input1' (temp 4-component vector of float)
+0:2 'input2' (temp 4-component vector of float)
+0:? Sequence
+0:3 Branch: Return with expression
+0:3 max (global 4-component vector of float)
+0:3 'input1' (temp 4-component vector of float)
+0:3 'input2' (temp 4-component vector of float)
+0:? Linker Objects
+
+// Module Version 10000
+// Generated by (magic number): 80001
+// Id's are bound by 15
+
+ Capability Shader
+ 1: ExtInstImport "GLSL.std.450"
+ MemoryModel Logical GLSL450
+ EntryPoint Fragment 4 "PixelShaderFunction"
+ ExecutionMode 4 OriginUpperLeft
+ Source HLSL 450
+ Name 4 "PixelShaderFunction"
+ Name 9 "input1"
+ Name 11 "input2"
+ 2: TypeVoid
+ 3: TypeFunction 2
+ 6: TypeFloat 32
+ 7: TypeVector 6(float) 4
+ 8: TypePointer Function 7(fvec4)
+4(PixelShaderFunction): 2 Function None 3
+ 5: Label
+ 9(input1): 8(ptr) Variable Function
+ 11(input2): 8(ptr) Variable Function
+ 10: 7(fvec4) Load 9(input1)
+ 12: 7(fvec4) Load 11(input2)
+ 13: 7(fvec4) ExtInst 1(GLSL.std.450) 40(FMax) 10 12
+ ReturnValue 13
+ FunctionEnd
diff --git a/chromium/third_party/glslang/src/Test/baseResults/hlsl.precedence.frag.out b/chromium/third_party/glslang/src/Test/baseResults/hlsl.precedence.frag.out
new file mode 100755
index 00000000000..dc0b0e93ab9
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/hlsl.precedence.frag.out
@@ -0,0 +1,80 @@
+hlsl.precedence.frag
+Shader version: 450
+gl_FragCoord origin is upper left
+0:? Sequence
+0:10 Function Definition: PixelShaderFunction(vf4;vf4;vf4;vf4; (temp 4-component vector of float)
+0:7 Function Parameters:
+0:7 'a1' (temp 4-component vector of float)
+0:7 'a2' (temp 4-component vector of float)
+0:7 'a3' (temp 4-component vector of float)
+0:7 'a4' (temp 4-component vector of float)
+0:? Sequence
+0:8 Branch: Return with expression
+0:8 add (temp 4-component vector of float)
+0:8 add (temp 4-component vector of float)
+0:8 'a1' (temp 4-component vector of float)
+0:8 component-wise multiply (temp 4-component vector of float)
+0:8 'a2' (temp 4-component vector of float)
+0:8 'a3' (temp 4-component vector of float)
+0:8 'a4' (temp 4-component vector of float)
+0:? Linker Objects
+
+
+Linked fragment stage:
+
+
+Shader version: 450
+gl_FragCoord origin is upper left
+0:? Sequence
+0:10 Function Definition: PixelShaderFunction(vf4;vf4;vf4;vf4; (temp 4-component vector of float)
+0:7 Function Parameters:
+0:7 'a1' (temp 4-component vector of float)
+0:7 'a2' (temp 4-component vector of float)
+0:7 'a3' (temp 4-component vector of float)
+0:7 'a4' (temp 4-component vector of float)
+0:? Sequence
+0:8 Branch: Return with expression
+0:8 add (temp 4-component vector of float)
+0:8 add (temp 4-component vector of float)
+0:8 'a1' (temp 4-component vector of float)
+0:8 component-wise multiply (temp 4-component vector of float)
+0:8 'a2' (temp 4-component vector of float)
+0:8 'a3' (temp 4-component vector of float)
+0:8 'a4' (temp 4-component vector of float)
+0:? Linker Objects
+
+// Module Version 10000
+// Generated by (magic number): 80001
+// Id's are bound by 21
+
+ Capability Shader
+ 1: ExtInstImport "GLSL.std.450"
+ MemoryModel Logical GLSL450
+ EntryPoint Fragment 4 "PixelShaderFunction"
+ ExecutionMode 4 OriginUpperLeft
+ Source HLSL 450
+ Name 4 "PixelShaderFunction"
+ Name 9 "a1"
+ Name 11 "a2"
+ Name 13 "a3"
+ Name 17 "a4"
+ 2: TypeVoid
+ 3: TypeFunction 2
+ 6: TypeFloat 32
+ 7: TypeVector 6(float) 4
+ 8: TypePointer Function 7(fvec4)
+4(PixelShaderFunction): 2 Function None 3
+ 5: Label
+ 9(a1): 8(ptr) Variable Function
+ 11(a2): 8(ptr) Variable Function
+ 13(a3): 8(ptr) Variable Function
+ 17(a4): 8(ptr) Variable Function
+ 10: 7(fvec4) Load 9(a1)
+ 12: 7(fvec4) Load 11(a2)
+ 14: 7(fvec4) Load 13(a3)
+ 15: 7(fvec4) FMul 12 14
+ 16: 7(fvec4) FAdd 10 15
+ 18: 7(fvec4) Load 17(a4)
+ 19: 7(fvec4) FAdd 16 18
+ ReturnValue 19
+ FunctionEnd
diff --git a/chromium/third_party/glslang/src/Test/baseResults/hlsl.precedence2.frag.out b/chromium/third_party/glslang/src/Test/baseResults/hlsl.precedence2.frag.out
new file mode 100755
index 00000000000..73d500d3c73
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/hlsl.precedence2.frag.out
@@ -0,0 +1,103 @@
+hlsl.precedence2.frag
+Shader version: 450
+gl_FragCoord origin is upper left
+0:? Sequence
+0:10 Function Definition: PixelShaderFunction(i1;i1;i1;i1; (temp int)
+0:7 Function Parameters:
+0:7 'a1' (temp int)
+0:7 'a2' (temp int)
+0:7 'a3' (temp int)
+0:7 'a4' (temp int)
+0:? Sequence
+0:8 Branch: Return with expression
+0:8 add (temp int)
+0:8 left-shift (temp int)
+0:8 add (temp int)
+0:8 component-wise multiply (temp int)
+0:8 'a1' (temp int)
+0:8 'a2' (temp int)
+0:8 'a3' (temp int)
+0:8 'a4' (temp int)
+0:8 left-shift (temp int)
+0:8 'a1' (temp int)
+0:8 add (temp int)
+0:8 'a2' (temp int)
+0:8 component-wise multiply (temp int)
+0:8 'a3' (temp int)
+0:8 'a4' (temp int)
+0:? Linker Objects
+
+
+Linked fragment stage:
+
+
+Shader version: 450
+gl_FragCoord origin is upper left
+0:? Sequence
+0:10 Function Definition: PixelShaderFunction(i1;i1;i1;i1; (temp int)
+0:7 Function Parameters:
+0:7 'a1' (temp int)
+0:7 'a2' (temp int)
+0:7 'a3' (temp int)
+0:7 'a4' (temp int)
+0:? Sequence
+0:8 Branch: Return with expression
+0:8 add (temp int)
+0:8 left-shift (temp int)
+0:8 add (temp int)
+0:8 component-wise multiply (temp int)
+0:8 'a1' (temp int)
+0:8 'a2' (temp int)
+0:8 'a3' (temp int)
+0:8 'a4' (temp int)
+0:8 left-shift (temp int)
+0:8 'a1' (temp int)
+0:8 add (temp int)
+0:8 'a2' (temp int)
+0:8 component-wise multiply (temp int)
+0:8 'a3' (temp int)
+0:8 'a4' (temp int)
+0:? Linker Objects
+
+// Module Version 10000
+// Generated by (magic number): 80001
+// Id's are bound by 28
+
+ Capability Shader
+ 1: ExtInstImport "GLSL.std.450"
+ MemoryModel Logical GLSL450
+ EntryPoint Fragment 4 "PixelShaderFunction"
+ ExecutionMode 4 OriginUpperLeft
+ Source HLSL 450
+ Name 4 "PixelShaderFunction"
+ Name 8 "a1"
+ Name 10 "a2"
+ Name 13 "a3"
+ Name 16 "a4"
+ 2: TypeVoid
+ 3: TypeFunction 2
+ 6: TypeInt 32 1
+ 7: TypePointer Function 6(int)
+4(PixelShaderFunction): 2 Function None 3
+ 5: Label
+ 8(a1): 7(ptr) Variable Function
+ 10(a2): 7(ptr) Variable Function
+ 13(a3): 7(ptr) Variable Function
+ 16(a4): 7(ptr) Variable Function
+ 9: 6(int) Load 8(a1)
+ 11: 6(int) Load 10(a2)
+ 12: 6(int) IMul 9 11
+ 14: 6(int) Load 13(a3)
+ 15: 6(int) IAdd 12 14
+ 17: 6(int) Load 16(a4)
+ 18: 6(int) ShiftLeftLogical 15 17
+ 19: 6(int) Load 8(a1)
+ 20: 6(int) Load 10(a2)
+ 21: 6(int) Load 13(a3)
+ 22: 6(int) Load 16(a4)
+ 23: 6(int) IMul 21 22
+ 24: 6(int) IAdd 20 23
+ 25: 6(int) ShiftLeftLogical 19 24
+ 26: 6(int) IAdd 18 25
+ ReturnValue 26
+ FunctionEnd
diff --git a/chromium/third_party/glslang/src/Test/baseResults/hlsl.scope.frag.out b/chromium/third_party/glslang/src/Test/baseResults/hlsl.scope.frag.out
new file mode 100755
index 00000000000..274477a461f
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/hlsl.scope.frag.out
@@ -0,0 +1,150 @@
+hlsl.scope.frag
+Shader version: 450
+gl_FragCoord origin is upper left
+0:? Sequence
+0:31 Function Definition: PixelShaderFunction(vf4; (temp 4-component vector of float)
+0:2 Function Parameters:
+0:2 'input' (temp 4-component vector of float)
+0:? Sequence
+0:4 'x' (temp int)
+0:? Sequence
+0:7 'x' (temp float)
+0:? Sequence
+0:10 'x' (temp bool)
+0:? Sequence
+0:13 'x' (temp 3-component vector of float)
+0:15 'x' (temp bool)
+0:17 'x' (temp float)
+0:19 'x' (temp int)
+0:21 Test condition and select (temp void)
+0:21 Condition
+0:21 Compare Greater Than (temp bool)
+0:21 'x' (temp int)
+0:21 Constant:
+0:21 0 (const int)
+0:21 true case is null
+0:24 Loop with condition tested first
+0:24 Loop Condition
+0:24 Compare Greater Than (temp bool)
+0:24 'x' (temp int)
+0:24 Constant:
+0:24 0 (const int)
+0:24 No loop body
+0:27 Loop with condition not tested first
+0:27 Loop Condition
+0:29 Compare Greater Than (temp bool)
+0:29 'x' (temp int)
+0:29 Constant:
+0:29 0 (const int)
+0:27 No loop body
+0:? Linker Objects
+
+
+Linked fragment stage:
+
+
+Shader version: 450
+gl_FragCoord origin is upper left
+0:? Sequence
+0:31 Function Definition: PixelShaderFunction(vf4; (temp 4-component vector of float)
+0:2 Function Parameters:
+0:2 'input' (temp 4-component vector of float)
+0:? Sequence
+0:4 'x' (temp int)
+0:? Sequence
+0:7 'x' (temp float)
+0:? Sequence
+0:10 'x' (temp bool)
+0:? Sequence
+0:13 'x' (temp 3-component vector of float)
+0:15 'x' (temp bool)
+0:17 'x' (temp float)
+0:19 'x' (temp int)
+0:21 Test condition and select (temp void)
+0:21 Condition
+0:21 Compare Greater Than (temp bool)
+0:21 'x' (temp int)
+0:21 Constant:
+0:21 0 (const int)
+0:21 true case is null
+0:24 Loop with condition tested first
+0:24 Loop Condition
+0:24 Compare Greater Than (temp bool)
+0:24 'x' (temp int)
+0:24 Constant:
+0:24 0 (const int)
+0:24 No loop body
+0:27 Loop with condition not tested first
+0:27 Loop Condition
+0:29 Compare Greater Than (temp bool)
+0:29 'x' (temp int)
+0:29 Constant:
+0:29 0 (const int)
+0:27 No loop body
+0:? Linker Objects
+
+// Module Version 10000
+// Generated by (magic number): 80001
+// Id's are bound by 36
+
+ Capability Shader
+ 1: ExtInstImport "GLSL.std.450"
+ MemoryModel Logical GLSL450
+ EntryPoint Fragment 4 "PixelShaderFunction"
+ ExecutionMode 4 OriginUpperLeft
+ Source HLSL 450
+ Name 4 "PixelShaderFunction"
+ Name 8 "x"
+ Name 11 "x"
+ Name 14 "x"
+ Name 17 "x"
+ 2: TypeVoid
+ 3: TypeFunction 2
+ 6: TypeInt 32 1
+ 7: TypePointer Function 6(int)
+ 9: TypeFloat 32
+ 10: TypePointer Function 9(float)
+ 12: TypeBool
+ 13: TypePointer Function 12(bool)
+ 15: TypeVector 9(float) 3
+ 16: TypePointer Function 15(fvec3)
+ 19: 6(int) Constant 0
+4(PixelShaderFunction): 2 Function None 3
+ 5: Label
+ 8(x): 7(ptr) Variable Function
+ 11(x): 10(ptr) Variable Function
+ 14(x): 13(ptr) Variable Function
+ 17(x): 16(ptr) Variable Function
+ 18: 6(int) Load 8(x)
+ 20: 12(bool) SGreaterThan 18 19
+ SelectionMerge 22 None
+ BranchConditional 20 21 22
+ 21: Label
+ Branch 22
+ 22: Label
+ Branch 23
+ 23: Label
+ LoopMerge 25 26 None
+ Branch 27
+ 27: Label
+ 28: 6(int) Load 8(x)
+ 29: 12(bool) SGreaterThan 28 19
+ BranchConditional 29 24 25
+ 24: Label
+ Branch 26
+ 26: Label
+ Branch 23
+ 25: Label
+ Branch 30
+ 30: Label
+ LoopMerge 32 33 None
+ Branch 31
+ 31: Label
+ Branch 33
+ 33: Label
+ 34: 6(int) Load 8(x)
+ 35: 12(bool) SGreaterThan 34 19
+ BranchConditional 35 30 32
+ 32: Label
+ Return
+ FunctionEnd
diff --git a/chromium/third_party/glslang/src/Test/baseResults/hlsl.sin.frag.out b/chromium/third_party/glslang/src/Test/baseResults/hlsl.sin.frag.out
new file mode 100755
index 00000000000..331945acfbe
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/hlsl.sin.frag.out
@@ -0,0 +1,53 @@
+hlsl.sin.frag
+Shader version: 450
+gl_FragCoord origin is upper left
+0:? Sequence
+0:5 Function Definition: PixelShaderFunction(vf4; (temp 4-component vector of float)
+0:2 Function Parameters:
+0:2 'input' (temp 4-component vector of float)
+0:? Sequence
+0:3 Branch: Return with expression
+0:3 sine (global 4-component vector of float)
+0:3 'input' (temp 4-component vector of float)
+0:? Linker Objects
+
+
+Linked fragment stage:
+
+
+Shader version: 450
+gl_FragCoord origin is upper left
+0:? Sequence
+0:5 Function Definition: PixelShaderFunction(vf4; (temp 4-component vector of float)
+0:2 Function Parameters:
+0:2 'input' (temp 4-component vector of float)
+0:? Sequence
+0:3 Branch: Return with expression
+0:3 sine (global 4-component vector of float)
+0:3 'input' (temp 4-component vector of float)
+0:? Linker Objects
+
+// Module Version 10000
+// Generated by (magic number): 80001
+// Id's are bound by 13
+
+ Capability Shader
+ 1: ExtInstImport "GLSL.std.450"
+ MemoryModel Logical GLSL450
+ EntryPoint Fragment 4 "PixelShaderFunction"
+ ExecutionMode 4 OriginUpperLeft
+ Source HLSL 450
+ Name 4 "PixelShaderFunction"
+ Name 9 "input"
+ 2: TypeVoid
+ 3: TypeFunction 2
+ 6: TypeFloat 32
+ 7: TypeVector 6(float) 4
+ 8: TypePointer Function 7(fvec4)
+4(PixelShaderFunction): 2 Function None 3
+ 5: Label
+ 9(input): 8(ptr) Variable Function
+ 10: 7(fvec4) Load 9(input)
+ 11: 7(fvec4) ExtInst 1(GLSL.std.450) 13(Sin) 10
+ ReturnValue 11
+ FunctionEnd
diff --git a/chromium/third_party/glslang/src/Test/baseResults/hlsl.struct.frag.out b/chromium/third_party/glslang/src/Test/baseResults/hlsl.struct.frag.out
new file mode 100755
index 00000000000..de2c74becc5
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/hlsl.struct.frag.out
@@ -0,0 +1,107 @@
+hlsl.struct.frag
+Shader version: 450
+gl_FragCoord origin is upper left
+0:? Sequence
+0:39 Function Definition: PixelShaderFunction(vf4; (temp 4-component vector of float)
+0:31 Function Parameters:
+0:31 'input' (temp 4-component vector of float)
+0:? Sequence
+0:36 Compare Equal (temp bool)
+0:36 's3' (temp structure{temp 3-component vector of bool b3})
+0:36 's3' (temp structure{temp 3-component vector of bool b3})
+0:38 Branch: Return with expression
+0:38 'input' (temp 4-component vector of float)
+0:? Linker Objects
+0:? 's1' (temp structure{temp bool b, temp bool c, temp 4-component vector of float a, temp 4-component vector of float d})
+0:? 's2' (temp structure{temp 4-component vector of float i})
+0:? 's4' (temp structure{smooth in 4-component vector of float a, flat temp bool b, centroid noperspective temp 1-component vector of float c, centroid sample temp 2-component vector of float d, temp bool Face ff1, temp bool ff2, temp bool ff3, temp 4-component vector of float FragCoord ff4})
+
+
+Linked fragment stage:
+
+
+Shader version: 450
+gl_FragCoord origin is upper left
+0:? Sequence
+0:39 Function Definition: PixelShaderFunction(vf4; (temp 4-component vector of float)
+0:31 Function Parameters:
+0:31 'input' (temp 4-component vector of float)
+0:? Sequence
+0:36 Compare Equal (temp bool)
+0:36 's3' (temp structure{temp 3-component vector of bool b3})
+0:36 's3' (temp structure{temp 3-component vector of bool b3})
+0:38 Branch: Return with expression
+0:38 'input' (temp 4-component vector of float)
+0:? Linker Objects
+0:? 's1' (temp structure{temp bool b, temp bool c, temp 4-component vector of float a, temp 4-component vector of float d})
+0:? 's2' (temp structure{temp 4-component vector of float i})
+0:? 's4' (temp structure{smooth in 4-component vector of float a, flat temp bool b, centroid noperspective temp 1-component vector of float c, centroid sample temp 2-component vector of float d, temp bool Face ff1, temp bool ff2, temp bool ff3, temp 4-component vector of float FragCoord ff4})
+
+// Module Version 10000
+// Generated by (magic number): 80001
+// Id's are bound by 33
+
+ Capability Shader
+ 1: ExtInstImport "GLSL.std.450"
+ MemoryModel Logical GLSL450
+ EntryPoint Fragment 4 "PixelShaderFunction"
+ ExecutionMode 4 OriginUpperLeft
+ Source HLSL 450
+ Name 4 "PixelShaderFunction"
+ Name 8 "FS"
+ MemberName 8(FS) 0 "b3"
+ Name 10 "s3"
+ Name 20 "input"
+ Name 23 "myS"
+ MemberName 23(myS) 0 "b"
+ MemberName 23(myS) 1 "c"
+ MemberName 23(myS) 2 "a"
+ MemberName 23(myS) 3 "d"
+ Name 25 "s1"
+ Name 26 ""
+ MemberName 26 0 "i"
+ Name 28 "s2"
+ Name 30 ""
+ MemberName 30 0 "a"
+ MemberName 30 1 "b"
+ MemberName 30 2 "c"
+ MemberName 30 3 "d"
+ MemberName 30 4 "ff1"
+ MemberName 30 5 "ff2"
+ MemberName 30 6 "ff3"
+ MemberName 30 7 "ff4"
+ Name 32 "s4"
+ MemberDecorate 30 4 BuiltIn FrontFacing
+ MemberDecorate 30 7 BuiltIn FragCoord
+ 2: TypeVoid
+ 3: TypeFunction 2
+ 6: TypeBool
+ 7: TypeVector 6(bool) 3
+ 8(FS): TypeStruct 7(bvec3)
+ 9: TypePointer Function 8(FS)
+ 17: TypeFloat 32
+ 18: TypeVector 17(float) 4
+ 19: TypePointer Function 18(fvec4)
+ 23(myS): TypeStruct 6(bool) 6(bool) 18(fvec4) 18(fvec4)
+ 24: TypePointer Function 23(myS)
+ 26: TypeStruct 18(fvec4)
+ 27: TypePointer Function 26(struct)
+ 29: TypeVector 17(float) 2
+ 30: TypeStruct 18(fvec4) 6(bool) 17(float) 29(fvec2) 6(bool) 6(bool) 6(bool) 18(fvec4)
+ 31: TypePointer Function 30(struct)
+4(PixelShaderFunction): 2 Function None 3
+ 5: Label
+ 10(s3): 9(ptr) Variable Function
+ 20(input): 19(ptr) Variable Function
+ 25(s1): 24(ptr) Variable Function
+ 28(s2): 27(ptr) Variable Function
+ 32(s4): 31(ptr) Variable Function
+ 11: 8(FS) Load 10(s3)
+ 12: 8(FS) Load 10(s3)
+ 13: 7(bvec3) CompositeExtract 11 0
+ 14: 7(bvec3) CompositeExtract 12 0
+ 15: 7(bvec3) LogicalEqual 13 14
+ 16: 6(bool) All 15
+ 21: 18(fvec4) Load 20(input)
+ ReturnValue 21
+ FunctionEnd
diff --git a/chromium/third_party/glslang/src/Test/baseResults/hlsl.void.frag.out b/chromium/third_party/glslang/src/Test/baseResults/hlsl.void.frag.out
new file mode 100755
index 00000000000..a6e92317449
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/hlsl.void.frag.out
@@ -0,0 +1,64 @@
+hlsl.void.frag
+Shader version: 450
+gl_FragCoord origin is upper left
+0:? Sequence
+0:2 Function Definition: foo1( (temp void)
+0:1 Function Parameters:
+0:4 Function Definition: foo2( (temp void)
+0:2 Function Parameters:
+0:8 Function Definition: PixelShaderFunction(vf4; (temp 4-component vector of float)
+0:5 Function Parameters:
+0:5 'input' (temp 4-component vector of float)
+0:? Sequence
+0:6 Function Call: foo1( (temp void)
+0:7 Function Call: foo2( (temp void)
+0:? Linker Objects
+
+
+Linked fragment stage:
+
+
+Shader version: 450
+gl_FragCoord origin is upper left
+0:? Sequence
+0:2 Function Definition: foo1( (temp void)
+0:1 Function Parameters:
+0:4 Function Definition: foo2( (temp void)
+0:2 Function Parameters:
+0:8 Function Definition: PixelShaderFunction(vf4; (temp 4-component vector of float)
+0:5 Function Parameters:
+0:5 'input' (temp 4-component vector of float)
+0:? Sequence
+0:6 Function Call: foo1( (temp void)
+0:7 Function Call: foo2( (temp void)
+0:? Linker Objects
+
+// Module Version 10000
+// Generated by (magic number): 80001
+// Id's are bound by 12
+
+ Capability Shader
+ 1: ExtInstImport "GLSL.std.450"
+ MemoryModel Logical GLSL450
+ EntryPoint Fragment 4 "PixelShaderFunction"
+ ExecutionMode 4 OriginUpperLeft
+ Source HLSL 450
+ Name 4 "PixelShaderFunction"
+ Name 6 "foo1("
+ Name 8 "foo2("
+ 2: TypeVoid
+ 3: TypeFunction 2
+4(PixelShaderFunction): 2 Function None 3
+ 5: Label
+ 10: 2 FunctionCall 6(foo1()
+ 11: 2 FunctionCall 8(foo2()
+ Return
+ FunctionEnd
+ 6(foo1(): 2 Function None 3
+ 7: Label
+ Return
+ FunctionEnd
+ 8(foo2(): 2 Function None 3
+ 9: Label
+ Return
+ FunctionEnd
diff --git a/chromium/third_party/glslang/src/Test/baseResults/hlsl.whileLoop.frag.out b/chromium/third_party/glslang/src/Test/baseResults/hlsl.whileLoop.frag.out
new file mode 100755
index 00000000000..686407bd29c
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/hlsl.whileLoop.frag.out
@@ -0,0 +1,145 @@
+hlsl.whileLoop.frag
+Shader version: 450
+gl_FragCoord origin is upper left
+0:? Sequence
+0:8 Function Definition: PixelShaderFunction(vf4; (temp 4-component vector of float)
+0:2 Function Parameters:
+0:2 'input' (temp 4-component vector of float)
+0:? Sequence
+0:3 Loop with condition tested first
+0:3 Loop Condition
+0:3 Compare Not Equal (temp bool)
+0:3 'input' (temp 4-component vector of float)
+0:3 'input' (temp 4-component vector of float)
+0:3 Loop Body
+0:? Sequence
+0:3 Branch: Return with expression
+0:3 'input' (temp 4-component vector of float)
+0:4 Loop with condition tested first
+0:4 Loop Condition
+0:4 Constant:
+0:4 false (const bool)
+0:4 No loop body
+0:5 Loop with condition tested first
+0:5 Loop Condition
+0:5 Constant:
+0:5 false (const bool)
+0:5 No loop body
+0:6 Loop with condition tested first
+0:6 Loop Condition
+0:6 Constant:
+0:6 false (const bool)
+0:6 No loop body
+0:? Linker Objects
+
+
+Linked fragment stage:
+
+
+Shader version: 450
+gl_FragCoord origin is upper left
+0:? Sequence
+0:8 Function Definition: PixelShaderFunction(vf4; (temp 4-component vector of float)
+0:2 Function Parameters:
+0:2 'input' (temp 4-component vector of float)
+0:? Sequence
+0:3 Loop with condition tested first
+0:3 Loop Condition
+0:3 Compare Not Equal (temp bool)
+0:3 'input' (temp 4-component vector of float)
+0:3 'input' (temp 4-component vector of float)
+0:3 Loop Body
+0:? Sequence
+0:3 Branch: Return with expression
+0:3 'input' (temp 4-component vector of float)
+0:4 Loop with condition tested first
+0:4 Loop Condition
+0:4 Constant:
+0:4 false (const bool)
+0:4 No loop body
+0:5 Loop with condition tested first
+0:5 Loop Condition
+0:5 Constant:
+0:5 false (const bool)
+0:5 No loop body
+0:6 Loop with condition tested first
+0:6 Loop Condition
+0:6 Constant:
+0:6 false (const bool)
+0:6 No loop body
+0:? Linker Objects
+
+// Module Version 10000
+// Generated by (magic number): 80001
+// Id's are bound by 39
+
+ Capability Shader
+ 1: ExtInstImport "GLSL.std.450"
+ MemoryModel Logical GLSL450
+ EntryPoint Fragment 4 "PixelShaderFunction"
+ ExecutionMode 4 OriginUpperLeft
+ Source HLSL 450
+ Name 4 "PixelShaderFunction"
+ Name 14 "input"
+ 2: TypeVoid
+ 3: TypeFunction 2
+ 11: TypeFloat 32
+ 12: TypeVector 11(float) 4
+ 13: TypePointer Function 12(fvec4)
+ 17: TypeBool
+ 18: TypeVector 17(bool) 4
+ 28: 17(bool) ConstantFalse
+4(PixelShaderFunction): 2 Function None 3
+ 5: Label
+ 14(input): 13(ptr) Variable Function
+ Branch 6
+ 6: Label
+ LoopMerge 8 9 None
+ Branch 10
+ 10: Label
+ 15: 12(fvec4) Load 14(input)
+ 16: 12(fvec4) Load 14(input)
+ 19: 18(bvec4) FOrdNotEqual 15 16
+ 20: 17(bool) Any 19
+ BranchConditional 20 7 8
+ 7: Label
+ 21: 12(fvec4) Load 14(input)
+ ReturnValue 21
+ 9: Label
+ Branch 6
+ 8: Label
+ Branch 23
+ 23: Label
+ LoopMerge 25 26 None
+ Branch 27
+ 27: Label
+ BranchConditional 28 24 25
+ 24: Label
+ Branch 26
+ 26: Label
+ Branch 23
+ 25: Label
+ Branch 29
+ 29: Label
+ LoopMerge 31 32 None
+ Branch 33
+ 33: Label
+ BranchConditional 28 30 31
+ 30: Label
+ Branch 32
+ 32: Label
+ Branch 29
+ 31: Label
+ Branch 34
+ 34: Label
+ LoopMerge 36 37 None
+ Branch 38
+ 38: Label
+ BranchConditional 28 35 36
+ 35: Label
+ Branch 37
+ 37: Label
+ Branch 34
+ 36: Label
+ Return
+ FunctionEnd
diff --git a/chromium/third_party/glslang/src/Test/baseResults/length.frag.out b/chromium/third_party/glslang/src/Test/baseResults/length.frag.out
new file mode 100644
index 00000000000..1c42560711e
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/length.frag.out
@@ -0,0 +1,61 @@
+length.frag
+Shader version: 120
+0:? Sequence
+0:11 Function Definition: main( (global void)
+0:11 Function Parameters:
+0:? Sequence
+0:15 Sequence
+0:15 move second child to first child (temp 2-component vector of float)
+0:15 't' (temp 2-component vector of float)
+0:15 add (temp 2-component vector of float)
+0:15 direct index (smooth temp 2-component vector of float)
+0:15 'v' (smooth in 2-element array of 2-component vector of float)
+0:15 Constant:
+0:15 0 (const int)
+0:15 direct index (smooth temp 2-component vector of float)
+0:15 'v' (smooth in 2-element array of 2-component vector of float)
+0:15 Constant:
+0:15 1 (const int)
+0:17 move second child to first child (temp 4-component vector of float)
+0:17 'gl_FragColor' (fragColor 4-component vector of float FragColor)
+0:17 Constant:
+0:17 30.000000
+0:17 30.000000
+0:17 30.000000
+0:17 30.000000
+0:? Linker Objects
+0:? 'u' (uniform 3-element array of 4-component vector of float)
+0:? 'v' (smooth in 2-element array of 2-component vector of float)
+
+
+Linked fragment stage:
+
+
+Shader version: 120
+0:? Sequence
+0:11 Function Definition: main( (global void)
+0:11 Function Parameters:
+0:? Sequence
+0:15 Sequence
+0:15 move second child to first child (temp 2-component vector of float)
+0:15 't' (temp 2-component vector of float)
+0:15 add (temp 2-component vector of float)
+0:15 direct index (smooth temp 2-component vector of float)
+0:15 'v' (smooth in 2-element array of 2-component vector of float)
+0:15 Constant:
+0:15 0 (const int)
+0:15 direct index (smooth temp 2-component vector of float)
+0:15 'v' (smooth in 2-element array of 2-component vector of float)
+0:15 Constant:
+0:15 1 (const int)
+0:17 move second child to first child (temp 4-component vector of float)
+0:17 'gl_FragColor' (fragColor 4-component vector of float FragColor)
+0:17 Constant:
+0:17 30.000000
+0:17 30.000000
+0:17 30.000000
+0:17 30.000000
+0:? Linker Objects
+0:? 'u' (uniform 3-element array of 4-component vector of float)
+0:? 'v' (smooth in 2-element array of 2-component vector of float)
+
diff --git a/chromium/third_party/glslang/src/Test/baseResults/lineContinuation.vert.out b/chromium/third_party/glslang/src/Test/baseResults/lineContinuation.vert.out
new file mode 100644
index 00000000000..78e5c0722d7
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/lineContinuation.vert.out
@@ -0,0 +1,309 @@
+lineContinuation.vert
+WARNING: 0:3: 'line continuation' : used at end of comment; the following line is still part of the comment
+ERROR: 0:6: '#error' : e1
+ERROR: 0:11: '#error' : e2
+ERROR: 0:18: '#error' : e3
+ERROR: 0:42: '\' : illegal use of escape character
+ERROR: 0:43: '@' : unexpected token
+ERROR: 0:44: '$' : unexpected token
+ERROR: 0:45: '\' : illegal use of escape character
+ERROR: 0:47: '\' : illegal use of escape character
+ERROR: 0:48: '\' : illegal use of escape character
+ERROR: 0:49: '$' : unexpected token
+ERROR: 0:50: '@' : unexpected token
+ERROR: 0:55: '#error' : good continuation
+WARNING: 0:62: 'line continuation' : used at end of comment; the following line is still part of the comment
+ERROR: 0:111: 'macro expansion' : End of line in macro substitution: FOOM
+ERROR: 0:112: 'preprocessor evaluation' : can't evaluate expression
+ERROR: 0:112: '#if' : unexpected tokens following directive
+ERROR: 0:117: 'macro expansion' : End of line in macro substitution: FOOM
+ERROR: 0:118: 'preprocessor evaluation' : can't evaluate expression
+ERROR: 0:118: '#if' : unexpected tokens following directive
+ERROR: 0:150: '' : syntax error
+ERROR: 19 compilation errors. No code generated.
+
+
+Shader version: 300
+ERROR: node is still EOpNull!
+0:20 Function Definition: main( (global void)
+0:20 Function Parameters:
+0:20 Sequence
+0:20 move second child to first child (temp highp 4-component vector of float)
+0:20 'gl_Position' (gl_Position highp 4-component vector of float Position)
+0:20 Construct vec4 (temp highp 4-component vector of float)
+0:20 'foo' (global highp float)
+0:22 Function Definition: foo2(vf4; (global highp 4-component vector of float)
+0:22 Function Parameters:
+0:22 'a' (in highp 4-component vector of float)
+0:24 Sequence
+0:24 Sequence
+0:24 move second child to first child (temp highp 4-component vector of float)
+0:24 'b' (temp highp 4-component vector of float)
+0:24 'a' (in highp 4-component vector of float)
+0:25 Branch: Return with expression
+0:25 'b' (temp highp 4-component vector of float)
+0:47 Sequence
+0:47 move second child to first child (temp highp int)
+0:47 'q1' (global highp int)
+0:47 Constant:
+0:47 1 (const int)
+0:48 Sequence
+0:48 move second child to first child (temp highp int)
+0:48 'q2' (global highp int)
+0:48 Constant:
+0:48 1 (const int)
+0:49 Sequence
+0:49 move second child to first child (temp highp int)
+0:49 'q3' (global highp int)
+0:49 Constant:
+0:49 1 (const int)
+0:50 Sequence
+0:50 move second child to first child (temp highp int)
+0:50 'q4' (global highp int)
+0:50 Constant:
+0:50 1 (const int)
+0:74 Sequence
+0:74 move second child to first child (temp highp float)
+0:74 'funkyf' (global highp float)
+0:75 Constant:
+0:75 12300000000000000.000000
+0:85 Sequence
+0:84 move second child to first child (temp highp int)
+0:84 'funkyh' (global highp int)
+0:86 Constant:
+0:86 244 (const int)
+0:91 Sequence
+0:91 move second child to first child (temp highp int)
+0:91 'funkyo' (global highp int)
+0:92 Constant:
+0:92 34 (const int)
+0:96 Sequence
+0:96 move second child to first child (temp highp int)
+0:96 'c' (global highp int)
+0:97 Constant:
+0:97 11 (const int)
+0:98 Sequence
+0:98 move second child to first child (temp highp int)
+0:98 'd' (global highp int)
+0:98 Constant:
+0:98 12 (const int)
+0:107 Sequence
+0:107 move second child to first child (temp highp int)
+0:107 'bar103' (global highp int)
+0:107 Constant:
+0:107 17 (const int)
+0:113 Sequence
+0:113 move second child to first child (temp highp int)
+0:113 'bar104' (global highp int)
+0:113 Constant:
+0:113 19 (const int)
+0:119 Sequence
+0:119 move second child to first child (temp highp int)
+0:119 'bar105' (global highp int)
+0:119 Constant:
+0:119 19 (const int)
+0:122 Sequence
+0:122 move second child to first child (temp highp int)
+0:122 'bar106' (global highp int)
+0:122 Constant:
+0:122 12 (const int)
+0:123 Sequence
+0:123 move second child to first child (temp highp int)
+0:123 'bar107' (global highp int)
+0:128 Constant:
+0:128 5 (const int)
+0:131 Function Definition: foo203209409( (global void)
+0:131 Function Parameters:
+0:134 Sequence
+0:134 add second child into first child (temp highp int)
+0:133 'bar107' (global highp int)
+0:134 Constant:
+0:134 37 (const int)
+0:135 multiply second child into first child (temp highp int)
+0:135 'bar107' (global highp int)
+0:136 Constant:
+0:136 38 (const int)
+0:137 divide second child into first child (temp highp int)
+0:137 'bar107' (global highp int)
+0:138 Constant:
+0:138 39 (const int)
+0:139 add (temp highp int)
+0:139 'bar107' (global highp int)
+0:140 Constant:
+0:140 41 (const int)
+0:? Linker Objects
+0:? 'foo' (global highp float)
+0:? 'goodDecl' (global highp int)
+0:? 'a1' (const highp int)
+0:? 4 (const int)
+0:? 'a2' (const highp int)
+0:? 3 (const int)
+0:? 'a3' (const highp int)
+0:? 4 (const int)
+0:? 'a4' (const highp int)
+0:? 3 (const int)
+0:? 'q1' (global highp int)
+0:? 'q2' (global highp int)
+0:? 'q3' (global highp int)
+0:? 'q4' (global highp int)
+0:? 'abdece' (const highp int)
+0:? 10 (const int)
+0:? 'aoeuntaoehu' (const highp int)
+0:? 10 (const int)
+0:? 'funkyf' (global highp float)
+0:? 'funkyh' (global highp int)
+0:? 'funkyo' (global highp int)
+0:? 'c' (global highp int)
+0:? 'd' (global highp int)
+0:? 'bar103' (global highp int)
+0:? 'bar104' (global highp int)
+0:? 'bar105' (global highp int)
+0:? 'bar106' (global highp int)
+0:? 'bar107' (global highp int)
+0:? 'gl_VertexID' (gl_VertexId highp int VertexId)
+0:? 'gl_InstanceID' (gl_InstanceId highp int InstanceId)
+
+
+Linked vertex stage:
+
+
+Shader version: 300
+ERROR: node is still EOpNull!
+0:20 Function Definition: main( (global void)
+0:20 Function Parameters:
+0:20 Sequence
+0:20 move second child to first child (temp highp 4-component vector of float)
+0:20 'gl_Position' (gl_Position highp 4-component vector of float Position)
+0:20 Construct vec4 (temp highp 4-component vector of float)
+0:20 'foo' (global highp float)
+0:22 Function Definition: foo2(vf4; (global highp 4-component vector of float)
+0:22 Function Parameters:
+0:22 'a' (in highp 4-component vector of float)
+0:24 Sequence
+0:24 Sequence
+0:24 move second child to first child (temp highp 4-component vector of float)
+0:24 'b' (temp highp 4-component vector of float)
+0:24 'a' (in highp 4-component vector of float)
+0:25 Branch: Return with expression
+0:25 'b' (temp highp 4-component vector of float)
+0:47 Sequence
+0:47 move second child to first child (temp highp int)
+0:47 'q1' (global highp int)
+0:47 Constant:
+0:47 1 (const int)
+0:48 Sequence
+0:48 move second child to first child (temp highp int)
+0:48 'q2' (global highp int)
+0:48 Constant:
+0:48 1 (const int)
+0:49 Sequence
+0:49 move second child to first child (temp highp int)
+0:49 'q3' (global highp int)
+0:49 Constant:
+0:49 1 (const int)
+0:50 Sequence
+0:50 move second child to first child (temp highp int)
+0:50 'q4' (global highp int)
+0:50 Constant:
+0:50 1 (const int)
+0:74 Sequence
+0:74 move second child to first child (temp highp float)
+0:74 'funkyf' (global highp float)
+0:75 Constant:
+0:75 12300000000000000.000000
+0:85 Sequence
+0:84 move second child to first child (temp highp int)
+0:84 'funkyh' (global highp int)
+0:86 Constant:
+0:86 244 (const int)
+0:91 Sequence
+0:91 move second child to first child (temp highp int)
+0:91 'funkyo' (global highp int)
+0:92 Constant:
+0:92 34 (const int)
+0:96 Sequence
+0:96 move second child to first child (temp highp int)
+0:96 'c' (global highp int)
+0:97 Constant:
+0:97 11 (const int)
+0:98 Sequence
+0:98 move second child to first child (temp highp int)
+0:98 'd' (global highp int)
+0:98 Constant:
+0:98 12 (const int)
+0:107 Sequence
+0:107 move second child to first child (temp highp int)
+0:107 'bar103' (global highp int)
+0:107 Constant:
+0:107 17 (const int)
+0:113 Sequence
+0:113 move second child to first child (temp highp int)
+0:113 'bar104' (global highp int)
+0:113 Constant:
+0:113 19 (const int)
+0:119 Sequence
+0:119 move second child to first child (temp highp int)
+0:119 'bar105' (global highp int)
+0:119 Constant:
+0:119 19 (const int)
+0:122 Sequence
+0:122 move second child to first child (temp highp int)
+0:122 'bar106' (global highp int)
+0:122 Constant:
+0:122 12 (const int)
+0:123 Sequence
+0:123 move second child to first child (temp highp int)
+0:123 'bar107' (global highp int)
+0:128 Constant:
+0:128 5 (const int)
+0:131 Function Definition: foo203209409( (global void)
+0:131 Function Parameters:
+0:134 Sequence
+0:134 add second child into first child (temp highp int)
+0:133 'bar107' (global highp int)
+0:134 Constant:
+0:134 37 (const int)
+0:135 multiply second child into first child (temp highp int)
+0:135 'bar107' (global highp int)
+0:136 Constant:
+0:136 38 (const int)
+0:137 divide second child into first child (temp highp int)
+0:137 'bar107' (global highp int)
+0:138 Constant:
+0:138 39 (const int)
+0:139 add (temp highp int)
+0:139 'bar107' (global highp int)
+0:140 Constant:
+0:140 41 (const int)
+0:? Linker Objects
+0:? 'foo' (global highp float)
+0:? 'goodDecl' (global highp int)
+0:? 'a1' (const highp int)
+0:? 4 (const int)
+0:? 'a2' (const highp int)
+0:? 3 (const int)
+0:? 'a3' (const highp int)
+0:? 4 (const int)
+0:? 'a4' (const highp int)
+0:? 3 (const int)
+0:? 'q1' (global highp int)
+0:? 'q2' (global highp int)
+0:? 'q3' (global highp int)
+0:? 'q4' (global highp int)
+0:? 'abdece' (const highp int)
+0:? 10 (const int)
+0:? 'aoeuntaoehu' (const highp int)
+0:? 10 (const int)
+0:? 'funkyf' (global highp float)
+0:? 'funkyh' (global highp int)
+0:? 'funkyo' (global highp int)
+0:? 'c' (global highp int)
+0:? 'd' (global highp int)
+0:? 'bar103' (global highp int)
+0:? 'bar104' (global highp int)
+0:? 'bar105' (global highp int)
+0:? 'bar106' (global highp int)
+0:? 'bar107' (global highp int)
+0:? 'gl_VertexID' (gl_VertexId highp int VertexId)
+0:? 'gl_InstanceID' (gl_InstanceId highp int InstanceId)
+
diff --git a/chromium/third_party/glslang/src/Test/baseResults/lineContinuation100.vert.out b/chromium/third_party/glslang/src/Test/baseResults/lineContinuation100.vert.out
new file mode 100644
index 00000000000..003637d039f
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/lineContinuation100.vert.out
@@ -0,0 +1,137 @@
+lineContinuation100.vert
+WARNING: 0:3: 'line continuation' : used at end of comment, but this version does not provide line continuation
+ERROR: 0:4: '#error' : good error
+ERROR: 0:8: 'line continuation' : not supported for this version or the enabled extensions
+ERROR: 0:11: '#error' : e2
+ERROR: 0:13: 'line continuation' : not supported for this version or the enabled extensions
+ERROR: 0:14: 'line continuation' : not supported for this version or the enabled extensions
+ERROR: 0:15: 'line continuation' : not supported for this version or the enabled extensions
+ERROR: 0:18: '#error' : e3
+ERROR: 0:24: 'line continuation' : not supported for this version or the enabled extensions
+ERROR: 0:40: '\' : illegal use of escape character
+ERROR: 0:41: '@' : unexpected token
+ERROR: 0:42: '$' : unexpected token
+ERROR: 0:43: '\' : illegal use of escape character
+ERROR: 0:45: '\' : illegal use of escape character
+ERROR: 0:46: '\' : illegal use of escape character
+ERROR: 0:47: '$' : unexpected token
+ERROR: 0:48: '@' : unexpected token
+ERROR: 0:50: 'line continuation' : not supported for this version or the enabled extensions
+ERROR: 0:52: 'line continuation' : not supported for this version or the enabled extensions
+ERROR: 0:53: '#error' : bad continuation
+ERROR: 0:55: 'line continuation' : not supported for this version or the enabled extensions
+ERROR: 20 compilation errors. No code generated.
+
+
+Shader version: 100
+ERROR: node is still EOpNull!
+0:20 Function Definition: main( (global void)
+0:20 Function Parameters:
+0:20 Sequence
+0:20 move second child to first child (temp highp 4-component vector of float)
+0:20 'gl_Position' (gl_Position highp 4-component vector of float Position)
+0:20 Construct vec4 (temp highp 4-component vector of float)
+0:20 'foo' (global highp float)
+0:22 Function Definition: foo2(vf4; (global highp 4-component vector of float)
+0:22 Function Parameters:
+0:22 'a' (in highp 4-component vector of float)
+0:24 Sequence
+0:24 Sequence
+0:24 move second child to first child (temp highp 4-component vector of float)
+0:24 'b' (temp highp 4-component vector of float)
+0:24 'a' (in highp 4-component vector of float)
+0:25 Branch: Return with expression
+0:25 'b' (temp highp 4-component vector of float)
+0:45 Sequence
+0:45 move second child to first child (temp highp int)
+0:45 'q1' (global highp int)
+0:45 Constant:
+0:45 1 (const int)
+0:46 Sequence
+0:46 move second child to first child (temp highp int)
+0:46 'q2' (global highp int)
+0:46 Constant:
+0:46 1 (const int)
+0:47 Sequence
+0:47 move second child to first child (temp highp int)
+0:47 'q3' (global highp int)
+0:47 Constant:
+0:47 1 (const int)
+0:48 Sequence
+0:48 move second child to first child (temp highp int)
+0:48 'q4' (global highp int)
+0:48 Constant:
+0:48 1 (const int)
+0:? Linker Objects
+0:? 'foo' (global highp float)
+0:? 'a1' (const highp int)
+0:? 4 (const int)
+0:? 'a2' (const highp int)
+0:? 3 (const int)
+0:? 'a3' (const highp int)
+0:? 4 (const int)
+0:? 'a4' (const highp int)
+0:? 3 (const int)
+0:? 'q1' (global highp int)
+0:? 'q2' (global highp int)
+0:? 'q3' (global highp int)
+0:? 'q4' (global highp int)
+
+
+Linked vertex stage:
+
+
+Shader version: 100
+ERROR: node is still EOpNull!
+0:20 Function Definition: main( (global void)
+0:20 Function Parameters:
+0:20 Sequence
+0:20 move second child to first child (temp highp 4-component vector of float)
+0:20 'gl_Position' (gl_Position highp 4-component vector of float Position)
+0:20 Construct vec4 (temp highp 4-component vector of float)
+0:20 'foo' (global highp float)
+0:22 Function Definition: foo2(vf4; (global highp 4-component vector of float)
+0:22 Function Parameters:
+0:22 'a' (in highp 4-component vector of float)
+0:24 Sequence
+0:24 Sequence
+0:24 move second child to first child (temp highp 4-component vector of float)
+0:24 'b' (temp highp 4-component vector of float)
+0:24 'a' (in highp 4-component vector of float)
+0:25 Branch: Return with expression
+0:25 'b' (temp highp 4-component vector of float)
+0:45 Sequence
+0:45 move second child to first child (temp highp int)
+0:45 'q1' (global highp int)
+0:45 Constant:
+0:45 1 (const int)
+0:46 Sequence
+0:46 move second child to first child (temp highp int)
+0:46 'q2' (global highp int)
+0:46 Constant:
+0:46 1 (const int)
+0:47 Sequence
+0:47 move second child to first child (temp highp int)
+0:47 'q3' (global highp int)
+0:47 Constant:
+0:47 1 (const int)
+0:48 Sequence
+0:48 move second child to first child (temp highp int)
+0:48 'q4' (global highp int)
+0:48 Constant:
+0:48 1 (const int)
+0:? Linker Objects
+0:? 'foo' (global highp float)
+0:? 'a1' (const highp int)
+0:? 4 (const int)
+0:? 'a2' (const highp int)
+0:? 3 (const int)
+0:? 'a3' (const highp int)
+0:? 4 (const int)
+0:? 'a4' (const highp int)
+0:? 3 (const int)
+0:? 'q1' (global highp int)
+0:? 'q2' (global highp int)
+0:? 'q3' (global highp int)
+0:? 'q4' (global highp int)
+
diff --git a/chromium/third_party/glslang/src/Test/baseResults/link1.frag.out b/chromium/third_party/glslang/src/Test/baseResults/link1.frag.out
new file mode 100644
index 00000000000..51d7475a5bf
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/link1.frag.out
@@ -0,0 +1,162 @@
+link1.frag
+Shader version: 130
+0:? Sequence
+0:8 Sequence
+0:8 move second child to first child (temp 4-component vector of float)
+0:8 'a' (global 4-component vector of float)
+0:8 vector-scale (temp 4-component vector of float)
+0:8 Constant:
+0:8 8.000000
+0:8 'uv4' (uniform 4-component vector of float)
+0:13 Function Definition: main( (global void)
+0:13 Function Parameters:
+0:17 Sequence
+0:17 move second child to first child (temp 4-component vector of float)
+0:17 'b' (global 4-component vector of float)
+0:17 vector-scale (temp 4-component vector of float)
+0:17 Constant:
+0:17 8.000000
+0:17 'a' (global 4-component vector of float)
+0:19 Function Definition: foo(mf22; (global 2-component vector of int)
+0:19 Function Parameters:
+0:19 'm' (in 2X2 matrix of float)
+0:21 Sequence
+0:21 Branch: Return with expression
+0:21 Convert float to int (temp 2-component vector of int)
+0:21 direct index (temp 2-component vector of float)
+0:21 'm' (in 2X2 matrix of float)
+0:21 Constant:
+0:21 0 (const int)
+0:24 Sequence
+0:24 move second child to first child (temp 4-component vector of float)
+0:24 'c' (global 4-component vector of float)
+0:24 component-wise multiply (temp 4-component vector of float)
+0:24 'b' (global 4-component vector of float)
+0:24 'b' (global 4-component vector of float)
+0:? Linker Objects
+0:? 'uv4' (uniform 4-component vector of float)
+0:? 'glass' (uniform 3-component vector of float)
+0:? 'ci' (const int)
+0:? 8 (const int)
+0:? 'a' (global 4-component vector of float)
+0:? 'iv3' (smooth in 3-component vector of float)
+0:? 'cup' (smooth in 4-component vector of float)
+0:? 'b' (global 4-component vector of float)
+0:? 'c' (global 4-component vector of float)
+0:? 'cv3' (const 3-component vector of float)
+0:? 43.000000
+0:? 0.340000
+0:? 9.900000
+0:? 'cv3n' (const 3-component vector of float)
+0:? 43.000000
+0:? 0.340000
+0:? 9.900000
+0:? 'cv3e' (const 3-component vector of float)
+0:? 43.000000
+0:? 0.340000
+0:? 9.900000
+0:? 'um2' (uniform 2X2 matrix of float)
+0:? 4.000000
+0:? 0.000000
+0:? 0.000000
+0:? 4.000000
+0:? 'um2n' (uniform 2X2 matrix of float)
+0:? 4.000000
+0:? 0.000000
+0:? 0.000000
+0:? 4.000000
+0:? 'um2e' (uniform 2X2 matrix of float)
+0:? 4.000000
+0:? 0.000000
+0:? 0.000000
+0:? 4.000000
+0:? 's' (uniform structure{global int a, global float b})
+0:? 82 (const int)
+0:? 3.900000
+0:? 'sn' (uniform structure{global int a, global float b})
+0:? 'se' (uniform structure{global int a, global float b})
+0:? 82 (const int)
+0:? 3.900000
+
+link2.frag
+Shader version: 130
+Requested GL_OES_standard_derivatives
+Requested GL_OES_texture_3D
+0:? Sequence
+0:8 Sequence
+0:8 move second child to first child (temp 4-component vector of float)
+0:8 'd' (global 4-component vector of float)
+0:8 vector-scale (temp 4-component vector of float)
+0:8 Constant:
+0:8 8.000000
+0:8 'uv4' (uniform 4-component vector of float)
+0:13 Sequence
+0:13 move second child to first child (temp 4-component vector of float)
+0:13 'e' (global 4-component vector of float)
+0:13 vector-scale (temp 4-component vector of float)
+0:13 Constant:
+0:13 8.000000
+0:13 'd' (global 4-component vector of float)
+0:15 Function Definition: foo( (global 2-component vector of int)
+0:15 Function Parameters:
+0:17 Sequence
+0:17 Branch: Return with expression
+0:17 Constant:
+0:17 2 (const int)
+0:17 2 (const int)
+0:20 Sequence
+0:20 move second child to first child (temp 4-component vector of float)
+0:20 'f' (global 4-component vector of float)
+0:20 component-wise multiply (temp 4-component vector of float)
+0:20 'e' (global 4-component vector of float)
+0:20 'e' (global 4-component vector of float)
+0:? Linker Objects
+0:? 'uv4' (uniform 4-component vector of float)
+0:? 'glass' (uniform 2-component vector of float)
+0:? 'ci' (const int)
+0:? 8 (const int)
+0:? 'd' (global 4-component vector of float)
+0:? 'iv3' (smooth in 3-component vector of float)
+0:? 'cup' (flat in 4-component vector of float)
+0:? 'e' (global 4-component vector of float)
+0:? 'f' (global 4-component vector of float)
+0:? 'cv3' (const 3-component vector of float)
+0:? 43.000000
+0:? 0.340000
+0:? 9.900000
+0:? 'cv3e' (const 3-component vector of float)
+0:? 43.000000
+0:? 0.340000
+0:? 2.900000
+0:? 'um2' (uniform 2X2 matrix of float)
+0:? 4.000000
+0:? 0.000000
+0:? 0.000000
+0:? 4.000000
+0:? 'um2n' (uniform 2X2 matrix of float)
+0:? 'um2e' (uniform 2X2 matrix of float)
+0:? 3.000000
+0:? 0.000000
+0:? 0.000000
+0:? 3.000000
+0:? 's' (uniform structure{global int a, global float b})
+0:? 82 (const int)
+0:? 3.900000
+0:? 'sn' (uniform structure{global int a, global float b})
+0:? 82 (const int)
+0:? 3.900000
+0:? 'se' (uniform structure{global int a, global float b})
+0:? 81 (const int)
+0:? 3.900000
+
+link3.frag
+Shader version: 300
+Requested GL_OES_EGL_image_external
+Requested GL_OES_standard_derivatives
+Requested GL_OES_texture_3D
+0:? Sequence
+0:? Linker Objects
+0:? 'iv3' (smooth in highp 2-component vector of float)
+
+ERROR: Cannot mix ES profile with non-ES profile shaders
+
diff --git a/chromium/third_party/glslang/src/Test/baseResults/localAggregates.frag.out b/chromium/third_party/glslang/src/Test/baseResults/localAggregates.frag.out
new file mode 100644
index 00000000000..2e8ae76c0bc
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/localAggregates.frag.out
@@ -0,0 +1,414 @@
+localAggregates.frag
+WARNING: 0:4: varying deprecated in version 130; may be removed in future release
+WARNING: 0:5: varying deprecated in version 130; may be removed in future release
+
+Shader version: 130
+0:? Sequence
+0:34 Function Definition: main( (global void)
+0:34 Function Parameters:
+0:? Sequence
+0:41 move second child to first child (temp structure{global int i, global float f, global structure{global int i, global float f} s1_1, global 4-component vector of float bleh})
+0:41 'locals2' (temp structure{global int i, global float f, global structure{global int i, global float f} s1_1, global 4-component vector of float bleh})
+0:41 s2_1: direct index for structure (global structure{global int i, global float f, global structure{global int i, global float f} s1_1, global 4-component vector of float bleh})
+0:41 'foo3' (uniform structure{global structure{global int i, global float f, global structure{global int i, global float f} s1_1, global 4-component vector of float bleh} s2_1, global int i, global float f, global structure{global int i, global float f} s1_1})
+0:41 Constant:
+0:41 0 (const int)
+0:43 Test condition and select (temp void)
+0:43 Condition
+0:43 Compare Greater Than (temp bool)
+0:43 i: direct index for structure (global int)
+0:43 s2_1: direct index for structure (global structure{global int i, global float f, global structure{global int i, global float f} s1_1, global 4-component vector of float bleh})
+0:43 'foo3' (uniform structure{global structure{global int i, global float f, global structure{global int i, global float f} s1_1, global 4-component vector of float bleh} s2_1, global int i, global float f, global structure{global int i, global float f} s1_1})
+0:43 Constant:
+0:43 0 (const int)
+0:43 Constant:
+0:43 0 (const int)
+0:43 Constant:
+0:43 0 (const int)
+0:43 true case
+0:44 Sequence
+0:44 move second child to first child (temp float)
+0:44 f: direct index for structure (global float)
+0:44 s1_1: direct index for structure (global structure{global int i, global float f})
+0:44 'locals2' (temp structure{global int i, global float f, global structure{global int i, global float f} s1_1, global 4-component vector of float bleh})
+0:44 Constant:
+0:44 2 (const int)
+0:44 Constant:
+0:44 1 (const int)
+0:44 Constant:
+0:44 1.000000
+0:45 move second child to first child (temp float)
+0:45 direct index (temp float)
+0:45 'localFArray' (temp 16-element array of float)
+0:45 Constant:
+0:45 4 (const int)
+0:45 direct index (temp float)
+0:45 'coord' (smooth in 2-component vector of float)
+0:45 Constant:
+0:45 0 (const int)
+0:46 move second child to first child (temp int)
+0:46 direct index (temp int)
+0:46 'localIArray' (temp 8-element array of int)
+0:46 Constant:
+0:46 2 (const int)
+0:46 i: direct index for structure (global int)
+0:46 s2_1: direct index for structure (global structure{global int i, global float f, global structure{global int i, global float f} s1_1, global 4-component vector of float bleh})
+0:46 'foo3' (uniform structure{global structure{global int i, global float f, global structure{global int i, global float f} s1_1, global 4-component vector of float bleh} s2_1, global int i, global float f, global structure{global int i, global float f} s1_1})
+0:46 Constant:
+0:46 0 (const int)
+0:46 Constant:
+0:46 0 (const int)
+0:43 false case
+0:48 Sequence
+0:48 move second child to first child (temp float)
+0:48 f: direct index for structure (global float)
+0:48 s1_1: direct index for structure (global structure{global int i, global float f})
+0:48 'locals2' (temp structure{global int i, global float f, global structure{global int i, global float f} s1_1, global 4-component vector of float bleh})
+0:48 Constant:
+0:48 2 (const int)
+0:48 Constant:
+0:48 1 (const int)
+0:48 direct index (temp float)
+0:48 'coord' (smooth in 2-component vector of float)
+0:48 Constant:
+0:48 0 (const int)
+0:49 move second child to first child (temp float)
+0:49 direct index (temp float)
+0:49 'localFArray' (temp 16-element array of float)
+0:49 Constant:
+0:49 4 (const int)
+0:49 Constant:
+0:49 1.000000
+0:50 move second child to first child (temp int)
+0:50 direct index (temp int)
+0:50 'localIArray' (temp 8-element array of int)
+0:50 Constant:
+0:50 2 (const int)
+0:50 Constant:
+0:50 0 (const int)
+0:53 Test condition and select (temp void)
+0:53 Condition
+0:53 Compare Equal (temp bool)
+0:53 direct index (temp int)
+0:53 'localIArray' (temp 8-element array of int)
+0:53 Constant:
+0:53 2 (const int)
+0:53 Constant:
+0:53 0 (const int)
+0:53 true case
+0:54 Pre-Increment (temp float)
+0:54 direct index (temp float)
+0:54 'localFArray' (temp 16-element array of float)
+0:54 Constant:
+0:54 4 (const int)
+0:57 Sequence
+0:57 move second child to first child (temp int)
+0:57 'x' (temp int)
+0:57 Constant:
+0:57 5 (const int)
+0:58 move second child to first child (temp float)
+0:58 indirect index (temp float)
+0:58 'localArray' (temp 16-element array of float)
+0:58 'x' (temp int)
+0:58 direct index (temp float)
+0:58 'coord' (smooth in 2-component vector of float)
+0:58 Constant:
+0:58 0 (const int)
+0:62 Sequence
+0:62 Sequence
+0:62 move second child to first child (temp int)
+0:62 'i' (temp int)
+0:62 Constant:
+0:62 0 (const int)
+0:62 Loop with condition tested first
+0:62 Loop Condition
+0:62 Compare Less Than (temp bool)
+0:62 'i' (temp int)
+0:62 Constant:
+0:62 16 (const int)
+0:62 Loop Body
+0:63 move second child to first child (temp float)
+0:63 indirect index (temp float)
+0:63 'a' (temp 16-element array of float)
+0:63 'i' (temp int)
+0:63 Constant:
+0:63 0.000000
+0:62 Loop Terminal Expression
+0:62 Post-Increment (temp int)
+0:62 'i' (temp int)
+0:65 Test condition and select (temp void)
+0:65 Condition
+0:65 Compare Equal (temp bool)
+0:65 'condition' (uniform int)
+0:65 Constant:
+0:65 1 (const int)
+0:65 true case
+0:66 move second child to first child (temp 16-element array of float)
+0:66 'a' (temp 16-element array of float)
+0:66 'localArray' (temp 16-element array of float)
+0:68 move second child to first child (temp 4-component vector of float)
+0:68 bleh: direct index for structure (global 4-component vector of float)
+0:68 'locals2' (temp structure{global int i, global float f, global structure{global int i, global float f} s1_1, global 4-component vector of float bleh})
+0:68 Constant:
+0:68 3 (const int)
+0:68 'color' (smooth in 4-component vector of float)
+0:69 move second child to first child (temp float)
+0:69 direct index (temp float)
+0:69 bleh: direct index for structure (global 4-component vector of float)
+0:69 'locals2' (temp structure{global int i, global float f, global structure{global int i, global float f} s1_1, global 4-component vector of float bleh})
+0:69 Constant:
+0:69 3 (const int)
+0:69 Constant:
+0:69 2 (const int)
+0:69 direct index (temp float)
+0:69 'coord' (smooth in 2-component vector of float)
+0:69 Constant:
+0:69 1 (const int)
+0:71 move second child to first child (temp 4-component vector of float)
+0:71 'gl_FragColor' (fragColor 4-component vector of float FragColor)
+0:71 component-wise multiply (temp 4-component vector of float)
+0:71 vector-scale (temp 4-component vector of float)
+0:71 bleh: direct index for structure (global 4-component vector of float)
+0:71 'locals2' (temp structure{global int i, global float f, global structure{global int i, global float f} s1_1, global 4-component vector of float bleh})
+0:71 Constant:
+0:71 3 (const int)
+0:71 add (temp float)
+0:71 add (temp float)
+0:71 add (temp float)
+0:71 direct index (temp float)
+0:71 'localFArray' (temp 16-element array of float)
+0:71 Constant:
+0:71 4 (const int)
+0:71 f: direct index for structure (global float)
+0:71 s1_1: direct index for structure (global structure{global int i, global float f})
+0:71 'locals2' (temp structure{global int i, global float f, global structure{global int i, global float f} s1_1, global 4-component vector of float bleh})
+0:71 Constant:
+0:71 2 (const int)
+0:71 Constant:
+0:71 1 (const int)
+0:71 indirect index (temp float)
+0:71 'localArray' (temp 16-element array of float)
+0:71 'x' (temp int)
+0:71 indirect index (temp float)
+0:71 'a' (temp 16-element array of float)
+0:71 'x' (temp int)
+0:71 texture (global 4-component vector of float)
+0:71 'sampler' (uniform sampler2D)
+0:71 'coord' (smooth in 2-component vector of float)
+0:? Linker Objects
+0:? 'sampler' (uniform sampler2D)
+0:? 'coord' (smooth in 2-component vector of float)
+0:? 'color' (smooth in 4-component vector of float)
+0:? 'foo' (uniform structure{global int i, global float f})
+0:? 'foo2' (uniform structure{global int i, global float f, global structure{global int i, global float f} s1_1, global 4-component vector of float bleh})
+0:? 'foo3' (uniform structure{global structure{global int i, global float f, global structure{global int i, global float f} s1_1, global 4-component vector of float bleh} s2_1, global int i, global float f, global structure{global int i, global float f} s1_1})
+0:? 'uFloatArray' (uniform 16-element array of float)
+0:? 'condition' (uniform int)
+
+
+Linked fragment stage:
+
+
+Shader version: 130
+0:? Sequence
+0:34 Function Definition: main( (global void)
+0:34 Function Parameters:
+0:? Sequence
+0:41 move second child to first child (temp structure{global int i, global float f, global structure{global int i, global float f} s1_1, global 4-component vector of float bleh})
+0:41 'locals2' (temp structure{global int i, global float f, global structure{global int i, global float f} s1_1, global 4-component vector of float bleh})
+0:41 s2_1: direct index for structure (global structure{global int i, global float f, global structure{global int i, global float f} s1_1, global 4-component vector of float bleh})
+0:41 'foo3' (uniform structure{global structure{global int i, global float f, global structure{global int i, global float f} s1_1, global 4-component vector of float bleh} s2_1, global int i, global float f, global structure{global int i, global float f} s1_1})
+0:41 Constant:
+0:41 0 (const int)
+0:43 Test condition and select (temp void)
+0:43 Condition
+0:43 Compare Greater Than (temp bool)
+0:43 i: direct index for structure (global int)
+0:43 s2_1: direct index for structure (global structure{global int i, global float f, global structure{global int i, global float f} s1_1, global 4-component vector of float bleh})
+0:43 'foo3' (uniform structure{global structure{global int i, global float f, global structure{global int i, global float f} s1_1, global 4-component vector of float bleh} s2_1, global int i, global float f, global structure{global int i, global float f} s1_1})
+0:43 Constant:
+0:43 0 (const int)
+0:43 Constant:
+0:43 0 (const int)
+0:43 Constant:
+0:43 0 (const int)
+0:43 true case
+0:44 Sequence
+0:44 move second child to first child (temp float)
+0:44 f: direct index for structure (global float)
+0:44 s1_1: direct index for structure (global structure{global int i, global float f})
+0:44 'locals2' (temp structure{global int i, global float f, global structure{global int i, global float f} s1_1, global 4-component vector of float bleh})
+0:44 Constant:
+0:44 2 (const int)
+0:44 Constant:
+0:44 1 (const int)
+0:44 Constant:
+0:44 1.000000
+0:45 move second child to first child (temp float)
+0:45 direct index (temp float)
+0:45 'localFArray' (temp 16-element array of float)
+0:45 Constant:
+0:45 4 (const int)
+0:45 direct index (temp float)
+0:45 'coord' (smooth in 2-component vector of float)
+0:45 Constant:
+0:45 0 (const int)
+0:46 move second child to first child (temp int)
+0:46 direct index (temp int)
+0:46 'localIArray' (temp 8-element array of int)
+0:46 Constant:
+0:46 2 (const int)
+0:46 i: direct index for structure (global int)
+0:46 s2_1: direct index for structure (global structure{global int i, global float f, global structure{global int i, global float f} s1_1, global 4-component vector of float bleh})
+0:46 'foo3' (uniform structure{global structure{global int i, global float f, global structure{global int i, global float f} s1_1, global 4-component vector of float bleh} s2_1, global int i, global float f, global structure{global int i, global float f} s1_1})
+0:46 Constant:
+0:46 0 (const int)
+0:46 Constant:
+0:46 0 (const int)
+0:43 false case
+0:48 Sequence
+0:48 move second child to first child (temp float)
+0:48 f: direct index for structure (global float)
+0:48 s1_1: direct index for structure (global structure{global int i, global float f})
+0:48 'locals2' (temp structure{global int i, global float f, global structure{global int i, global float f} s1_1, global 4-component vector of float bleh})
+0:48 Constant:
+0:48 2 (const int)
+0:48 Constant:
+0:48 1 (const int)
+0:48 direct index (temp float)
+0:48 'coord' (smooth in 2-component vector of float)
+0:48 Constant:
+0:48 0 (const int)
+0:49 move second child to first child (temp float)
+0:49 direct index (temp float)
+0:49 'localFArray' (temp 16-element array of float)
+0:49 Constant:
+0:49 4 (const int)
+0:49 Constant:
+0:49 1.000000
+0:50 move second child to first child (temp int)
+0:50 direct index (temp int)
+0:50 'localIArray' (temp 8-element array of int)
+0:50 Constant:
+0:50 2 (const int)
+0:50 Constant:
+0:50 0 (const int)
+0:53 Test condition and select (temp void)
+0:53 Condition
+0:53 Compare Equal (temp bool)
+0:53 direct index (temp int)
+0:53 'localIArray' (temp 8-element array of int)
+0:53 Constant:
+0:53 2 (const int)
+0:53 Constant:
+0:53 0 (const int)
+0:53 true case
+0:54 Pre-Increment (temp float)
+0:54 direct index (temp float)
+0:54 'localFArray' (temp 16-element array of float)
+0:54 Constant:
+0:54 4 (const int)
+0:57 Sequence
+0:57 move second child to first child (temp int)
+0:57 'x' (temp int)
+0:57 Constant:
+0:57 5 (const int)
+0:58 move second child to first child (temp float)
+0:58 indirect index (temp float)
+0:58 'localArray' (temp 16-element array of float)
+0:58 'x' (temp int)
+0:58 direct index (temp float)
+0:58 'coord' (smooth in 2-component vector of float)
+0:58 Constant:
+0:58 0 (const int)
+0:62 Sequence
+0:62 Sequence
+0:62 move second child to first child (temp int)
+0:62 'i' (temp int)
+0:62 Constant:
+0:62 0 (const int)
+0:62 Loop with condition tested first
+0:62 Loop Condition
+0:62 Compare Less Than (temp bool)
+0:62 'i' (temp int)
+0:62 Constant:
+0:62 16 (const int)
+0:62 Loop Body
+0:63 move second child to first child (temp float)
+0:63 indirect index (temp float)
+0:63 'a' (temp 16-element array of float)
+0:63 'i' (temp int)
+0:63 Constant:
+0:63 0.000000
+0:62 Loop Terminal Expression
+0:62 Post-Increment (temp int)
+0:62 'i' (temp int)
+0:65 Test condition and select (temp void)
+0:65 Condition
+0:65 Compare Equal (temp bool)
+0:65 'condition' (uniform int)
+0:65 Constant:
+0:65 1 (const int)
+0:65 true case
+0:66 move second child to first child (temp 16-element array of float)
+0:66 'a' (temp 16-element array of float)
+0:66 'localArray' (temp 16-element array of float)
+0:68 move second child to first child (temp 4-component vector of float)
+0:68 bleh: direct index for structure (global 4-component vector of float)
+0:68 'locals2' (temp structure{global int i, global float f, global structure{global int i, global float f} s1_1, global 4-component vector of float bleh})
+0:68 Constant:
+0:68 3 (const int)
+0:68 'color' (smooth in 4-component vector of float)
+0:69 move second child to first child (temp float)
+0:69 direct index (temp float)
+0:69 bleh: direct index for structure (global 4-component vector of float)
+0:69 'locals2' (temp structure{global int i, global float f, global structure{global int i, global float f} s1_1, global 4-component vector of float bleh})
+0:69 Constant:
+0:69 3 (const int)
+0:69 Constant:
+0:69 2 (const int)
+0:69 direct index (temp float)
+0:69 'coord' (smooth in 2-component vector of float)
+0:69 Constant:
+0:69 1 (const int)
+0:71 move second child to first child (temp 4-component vector of float)
+0:71 'gl_FragColor' (fragColor 4-component vector of float FragColor)
+0:71 component-wise multiply (temp 4-component vector of float)
+0:71 vector-scale (temp 4-component vector of float)
+0:71 bleh: direct index for structure (global 4-component vector of float)
+0:71 'locals2' (temp structure{global int i, global float f, global structure{global int i, global float f} s1_1, global 4-component vector of float bleh})
+0:71 Constant:
+0:71 3 (const int)
+0:71 add (temp float)
+0:71 add (temp float)
+0:71 add (temp float)
+0:71 direct index (temp float)
+0:71 'localFArray' (temp 16-element array of float)
+0:71 Constant:
+0:71 4 (const int)
+0:71 f: direct index for structure (global float)
+0:71 s1_1: direct index for structure (global structure{global int i, global float f})
+0:71 'locals2' (temp structure{global int i, global float f, global structure{global int i, global float f} s1_1, global 4-component vector of float bleh})
+0:71 Constant:
+0:71 2 (const int)
+0:71 Constant:
+0:71 1 (const int)
+0:71 indirect index (temp float)
+0:71 'localArray' (temp 16-element array of float)
+0:71 'x' (temp int)
+0:71 indirect index (temp float)
+0:71 'a' (temp 16-element array of float)
+0:71 'x' (temp int)
+0:71 texture (global 4-component vector of float)
+0:71 'sampler' (uniform sampler2D)
+0:71 'coord' (smooth in 2-component vector of float)
+0:? Linker Objects
+0:? 'sampler' (uniform sampler2D)
+0:? 'coord' (smooth in 2-component vector of float)
+0:? 'color' (smooth in 4-component vector of float)
+0:? 'foo' (uniform structure{global int i, global float f})
+0:? 'foo2' (uniform structure{global int i, global float f, global structure{global int i, global float f} s1_1, global 4-component vector of float bleh})
+0:? 'foo3' (uniform structure{global structure{global int i, global float f, global structure{global int i, global float f} s1_1, global 4-component vector of float bleh} s2_1, global int i, global float f, global structure{global int i, global float f} s1_1})
+0:? 'uFloatArray' (uniform 16-element array of float)
+0:? 'condition' (uniform int)
+
diff --git a/chromium/third_party/glslang/src/Test/baseResults/loops.frag.out b/chromium/third_party/glslang/src/Test/baseResults/loops.frag.out
new file mode 100644
index 00000000000..b592dbd8459
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/loops.frag.out
@@ -0,0 +1,1935 @@
+loops.frag
+WARNING: 0:14: varying deprecated in version 130; may be removed in future release
+
+Shader version: 130
+0:? Sequence
+0:53 Function Definition: main( (global void)
+0:53 Function Parameters:
+0:55 Sequence
+0:55 Sequence
+0:55 move second child to first child (temp 4-component vector of float)
+0:55 'color' (temp 4-component vector of float)
+0:55 'BaseColor' (smooth in 4-component vector of float)
+0:58 Loop with condition tested first
+0:58 Loop Condition
+0:58 Constant:
+0:58 true (const bool)
+0:58 Loop Body
+0:59 Sequence
+0:59 Test condition and select (temp void)
+0:59 Condition
+0:59 Compare Less Than (temp bool)
+0:59 direct index (temp float)
+0:59 'color' (temp 4-component vector of float)
+0:59 Constant:
+0:59 0 (const int)
+0:59 Constant:
+0:59 0.330000
+0:59 true case
+0:60 Sequence
+0:60 add second child into first child (temp 4-component vector of float)
+0:60 'color' (temp 4-component vector of float)
+0:60 Constant:
+0:60 0.330000
+0:60 0.330000
+0:60 0.330000
+0:60 0.330000
+0:61 Branch: Break
+0:63 Test condition and select (temp void)
+0:63 Condition
+0:63 Compare Less Than (temp bool)
+0:63 direct index (temp float)
+0:63 'color' (temp 4-component vector of float)
+0:63 Constant:
+0:63 0 (const int)
+0:63 Constant:
+0:63 0.660000
+0:63 true case
+0:64 Sequence
+0:64 add second child into first child (temp 4-component vector of float)
+0:64 'color' (temp 4-component vector of float)
+0:64 Constant:
+0:64 0.660000
+0:64 0.660000
+0:64 0.660000
+0:64 0.660000
+0:65 Branch: Break
+0:68 add second child into first child (temp 4-component vector of float)
+0:68 'color' (temp 4-component vector of float)
+0:68 Constant:
+0:68 0.330000
+0:68 0.330000
+0:68 0.330000
+0:68 0.330000
+0:69 Branch: Break
+0:73 Loop with condition tested first
+0:73 Loop Condition
+0:73 Compare Less Than (temp bool)
+0:73 direct index (temp float)
+0:73 'color' (temp 4-component vector of float)
+0:73 Constant:
+0:73 0 (const int)
+0:73 'd' (uniform float)
+0:73 Loop Body
+0:74 Sequence
+0:74 add second child into first child (temp 4-component vector of float)
+0:74 'color' (temp 4-component vector of float)
+0:74 'bigColor' (uniform 4-component vector of float)
+0:78 Loop with condition tested first
+0:78 Loop Condition
+0:78 Compare Less Than (temp bool)
+0:78 direct index (temp float)
+0:78 'color' (temp 4-component vector of float)
+0:78 Constant:
+0:78 2 (const int)
+0:78 'd' (uniform float)
+0:78 Loop Body
+0:79 Sequence
+0:79 add second child into first child (temp 4-component vector of float)
+0:79 'color' (temp 4-component vector of float)
+0:79 'bigColor1_1' (uniform 4-component vector of float)
+0:80 Test condition and select (temp void)
+0:80 Condition
+0:80 Compare Less Than (temp bool)
+0:80 direct index (temp float)
+0:80 'color' (temp 4-component vector of float)
+0:80 Constant:
+0:80 3 (const int)
+0:80 'd' (uniform float)
+0:80 true case
+0:81 Branch: Continue
+0:83 add second child into first child (temp 4-component vector of float)
+0:83 'color' (temp 4-component vector of float)
+0:83 'bigColor1_1' (uniform 4-component vector of float)
+0:87 Loop with condition tested first
+0:87 Loop Condition
+0:87 Compare Less Than (temp bool)
+0:87 direct index (temp float)
+0:87 'color' (temp 4-component vector of float)
+0:87 Constant:
+0:87 0 (const int)
+0:87 Constant:
+0:87 42.000000
+0:87 Loop Body
+0:88 Sequence
+0:88 Pre-Increment (temp 4-component vector of float)
+0:88 'color' (temp 4-component vector of float)
+0:92 Loop with condition tested first
+0:92 Loop Condition
+0:92 logical-and (temp bool)
+0:92 Compare Less Than (temp bool)
+0:92 direct index (temp float)
+0:92 'color' (temp 4-component vector of float)
+0:92 Constant:
+0:92 3 (const int)
+0:92 'd2' (uniform float)
+0:92 Compare Less Than (temp bool)
+0:92 direct index (temp float)
+0:92 'color' (temp 4-component vector of float)
+0:92 Constant:
+0:92 1 (const int)
+0:92 'd3' (uniform float)
+0:92 Loop Body
+0:93 Sequence
+0:93 add second child into first child (temp 4-component vector of float)
+0:93 'color' (temp 4-component vector of float)
+0:93 'bigColor1_2' (uniform 4-component vector of float)
+0:97 Loop with condition tested first
+0:97 Loop Condition
+0:97 Compare Less Than (temp bool)
+0:97 direct index (temp float)
+0:97 'color' (temp 4-component vector of float)
+0:97 Constant:
+0:97 2 (const int)
+0:97 'd3' (uniform float)
+0:97 Loop Body
+0:98 Sequence
+0:98 add second child into first child (temp 4-component vector of float)
+0:98 'color' (temp 4-component vector of float)
+0:98 'bigColor1_3' (uniform 4-component vector of float)
+0:99 Test condition and select (temp void)
+0:99 Condition
+0:99 Compare Less Than (temp bool)
+0:99 direct index (temp float)
+0:99 'color' (temp 4-component vector of float)
+0:99 Constant:
+0:99 1 (const int)
+0:99 'd4' (uniform float)
+0:99 true case
+0:100 Branch: Break
+0:101 add second child into first child (temp 4-component vector of float)
+0:101 'color' (temp 4-component vector of float)
+0:101 'bigColor1_3' (uniform 4-component vector of float)
+0:105 Sequence
+0:105 Sequence
+0:105 move second child to first child (temp int)
+0:105 'i' (temp int)
+0:105 Constant:
+0:105 0 (const int)
+0:105 Loop with condition tested first
+0:105 Loop Condition
+0:105 Compare Less Than (temp bool)
+0:105 'i' (temp int)
+0:105 'Count' (uniform int)
+0:105 Loop Body
+0:106 Sequence
+0:106 add second child into first child (temp 4-component vector of float)
+0:106 'color' (temp 4-component vector of float)
+0:106 'bigColor2' (uniform 4-component vector of float)
+0:105 Loop Terminal Expression
+0:105 Pre-Increment (temp int)
+0:105 'i' (temp int)
+0:112 Loop with condition not tested first
+0:112 Loop Condition
+0:112 Compare Less Than (temp bool)
+0:112 direct index (temp float)
+0:112 'color' (temp 4-component vector of float)
+0:112 Constant:
+0:112 0 (const int)
+0:112 'd2' (uniform float)
+0:112 Loop Body
+0:111 Sequence
+0:111 add second child into first child (temp 4-component vector of float)
+0:111 'color' (temp 4-component vector of float)
+0:111 'bigColor3' (uniform 4-component vector of float)
+0:115 Sequence
+0:115 Sequence
+0:115 move second child to first child (temp int)
+0:115 'i' (temp int)
+0:115 Constant:
+0:115 0 (const int)
+0:115 Loop with condition tested first
+0:115 Loop Condition
+0:115 Compare Less Than (temp bool)
+0:115 'i' (temp int)
+0:115 Constant:
+0:115 42 (const int)
+0:115 Loop Body
+0:116 Sequence
+0:116 add second child into first child (temp float)
+0:116 direct index (temp float)
+0:116 'color' (temp 4-component vector of float)
+0:116 Constant:
+0:116 2 (const int)
+0:116 'd3' (uniform float)
+0:115 Loop Terminal Expression
+0:115 Pre-Increment (temp int)
+0:115 'i' (temp int)
+0:120 Sequence
+0:120 Sequence
+0:120 move second child to first child (temp int)
+0:120 'i' (temp int)
+0:120 Constant:
+0:120 0 (const int)
+0:120 Loop with condition tested first
+0:120 Loop Condition
+0:120 Compare Less Than (temp bool)
+0:120 'i' (temp int)
+0:120 Constant:
+0:120 100 (const int)
+0:120 Loop Body
+0:121 Sequence
+0:121 Test condition and select (temp void)
+0:121 Condition
+0:121 Compare Less Than (temp bool)
+0:121 direct index (temp float)
+0:121 'color' (temp 4-component vector of float)
+0:121 Constant:
+0:121 2 (const int)
+0:121 Constant:
+0:121 20.000000
+0:121 true case
+0:122 Post-Increment (temp float)
+0:122 direct index (temp float)
+0:122 'color' (temp 4-component vector of float)
+0:122 Constant:
+0:122 0 (const int)
+0:121 false case
+0:124 Post-Increment (temp float)
+0:124 direct index (temp float)
+0:124 'color' (temp 4-component vector of float)
+0:124 Constant:
+0:124 1 (const int)
+0:125 Test condition and select (temp void)
+0:125 Condition
+0:125 Compare Less Than (temp bool)
+0:125 direct index (temp float)
+0:125 'color' (temp 4-component vector of float)
+0:125 Constant:
+0:125 3 (const int)
+0:125 Constant:
+0:125 20.000000
+0:125 true case
+0:126 Test condition and select (temp void)
+0:126 Condition
+0:126 Compare Greater Than (temp bool)
+0:126 direct index (temp float)
+0:126 'color' (temp 4-component vector of float)
+0:126 Constant:
+0:126 2 (const int)
+0:126 direct index (temp float)
+0:126 'color' (temp 4-component vector of float)
+0:126 Constant:
+0:126 1 (const int)
+0:126 true case
+0:127 Constant:
+0:127 0 (const int)
+0:120 Loop Terminal Expression
+0:120 Pre-Increment (temp int)
+0:120 'i' (temp int)
+0:131 Sequence
+0:131 Sequence
+0:131 move second child to first child (temp int)
+0:131 'i' (temp int)
+0:131 Constant:
+0:131 0 (const int)
+0:131 Loop with condition tested first
+0:131 Loop Condition
+0:131 Compare Less Than (temp bool)
+0:131 'i' (temp int)
+0:131 Constant:
+0:131 120 (const int)
+0:131 Loop Body
+0:132 Sequence
+0:132 Test condition and select (temp void)
+0:132 Condition
+0:132 Compare Less Than (temp bool)
+0:132 direct index (temp float)
+0:132 'color' (temp 4-component vector of float)
+0:132 Constant:
+0:132 2 (const int)
+0:132 Constant:
+0:132 20.000000
+0:132 true case
+0:133 Post-Increment (temp float)
+0:133 direct index (temp float)
+0:133 'color' (temp 4-component vector of float)
+0:133 Constant:
+0:133 0 (const int)
+0:132 false case
+0:135 Post-Increment (temp float)
+0:135 direct index (temp float)
+0:135 'color' (temp 4-component vector of float)
+0:135 Constant:
+0:135 1 (const int)
+0:131 Loop Terminal Expression
+0:131 Pre-Increment (temp int)
+0:131 'i' (temp int)
+0:139 Sequence
+0:139 Sequence
+0:139 move second child to first child (temp int)
+0:139 'i' (temp int)
+0:139 Constant:
+0:139 0 (const int)
+0:139 Loop with condition tested first
+0:139 Loop Condition
+0:139 Compare Less Than (temp bool)
+0:139 'i' (temp int)
+0:139 Constant:
+0:139 42 (const int)
+0:139 Loop Body
+0:140 Sequence
+0:140 add second child into first child (temp float)
+0:140 direct index (temp float)
+0:140 'color' (temp 4-component vector of float)
+0:140 Constant:
+0:140 2 (const int)
+0:140 'd3' (uniform float)
+0:141 Test condition and select (temp void)
+0:141 Condition
+0:141 Compare Less Than (temp bool)
+0:141 direct index (temp float)
+0:141 'color' (temp 4-component vector of float)
+0:141 Constant:
+0:141 0 (const int)
+0:141 'd4' (uniform float)
+0:141 true case
+0:142 Branch: Continue
+0:143 Pre-Increment (temp float)
+0:143 direct index (temp float)
+0:143 'color' (temp 4-component vector of float)
+0:143 Constant:
+0:143 3 (const int)
+0:139 Loop Terminal Expression
+0:139 Pre-Increment (temp int)
+0:139 'i' (temp int)
+0:147 Sequence
+0:147 Sequence
+0:147 move second child to first child (temp int)
+0:147 'i' (temp int)
+0:147 Constant:
+0:147 0 (const int)
+0:147 Loop with condition tested first
+0:147 Loop Condition
+0:147 Compare Less Than (temp bool)
+0:147 'i' (temp int)
+0:147 Constant:
+0:147 42 (const int)
+0:147 Loop Body
+0:148 Sequence
+0:148 add second child into first child (temp float)
+0:148 direct index (temp float)
+0:148 'color' (temp 4-component vector of float)
+0:148 Constant:
+0:148 2 (const int)
+0:148 'd3' (uniform float)
+0:149 Test condition and select (temp void)
+0:149 Condition
+0:149 Compare Less Than (temp bool)
+0:149 direct index (temp float)
+0:149 'color' (temp 4-component vector of float)
+0:149 Constant:
+0:149 0 (const int)
+0:149 'd4' (uniform float)
+0:149 true case
+0:150 Branch: Break
+0:151 Pre-Increment (temp float)
+0:151 direct index (temp float)
+0:151 'color' (temp 4-component vector of float)
+0:151 Constant:
+0:151 3 (const int)
+0:147 Loop Terminal Expression
+0:147 Pre-Increment (temp int)
+0:147 'i' (temp int)
+0:163 Loop with condition not tested first
+0:163 Loop Condition
+0:163 Compare Less Than (temp bool)
+0:163 direct index (temp float)
+0:163 'color' (temp 4-component vector of float)
+0:163 Constant:
+0:163 2 (const int)
+0:163 'd4' (uniform float)
+0:163 Loop Body
+0:156 Sequence
+0:156 add second child into first child (temp 4-component vector of float)
+0:156 'color' (temp 4-component vector of float)
+0:156 'bigColor4' (uniform 4-component vector of float)
+0:157 Test condition and select (temp void)
+0:157 Condition
+0:157 Compare Less Than (temp bool)
+0:157 direct index (temp float)
+0:157 'color' (temp 4-component vector of float)
+0:157 Constant:
+0:157 0 (const int)
+0:157 'd4' (uniform float)
+0:157 true case
+0:158 Branch: Continue
+0:159 Test condition and select (temp void)
+0:159 Condition
+0:159 Compare Less Than (temp bool)
+0:159 direct index (temp float)
+0:159 'color' (temp 4-component vector of float)
+0:159 Constant:
+0:159 1 (const int)
+0:159 'd4' (uniform float)
+0:159 true case
+0:160 add second child into first child (temp float)
+0:160 direct index (temp float)
+0:160 'color' (temp 4-component vector of float)
+0:160 Constant:
+0:160 1 (const int)
+0:160 'd4' (uniform float)
+0:159 false case
+0:162 add second child into first child (temp float)
+0:162 direct index (temp float)
+0:162 'color' (temp 4-component vector of float)
+0:162 Constant:
+0:162 0 (const int)
+0:162 'd4' (uniform float)
+0:170 Loop with condition not tested first
+0:170 Loop Condition
+0:170 Compare Less Than (temp bool)
+0:170 direct index (temp float)
+0:170 'color' (temp 4-component vector of float)
+0:170 Constant:
+0:170 0 (const int)
+0:170 'd5' (uniform float)
+0:170 Loop Body
+0:167 Sequence
+0:167 add second child into first child (temp 4-component vector of float)
+0:167 'color' (temp 4-component vector of float)
+0:167 'bigColor5' (uniform 4-component vector of float)
+0:168 Test condition and select (temp void)
+0:168 Condition
+0:168 Compare Less Than (temp bool)
+0:168 direct index (temp float)
+0:168 'color' (temp 4-component vector of float)
+0:168 Constant:
+0:168 1 (const int)
+0:168 'd5' (uniform float)
+0:168 true case
+0:169 add second child into first child (temp float)
+0:169 direct index (temp float)
+0:169 'color' (temp 4-component vector of float)
+0:169 Constant:
+0:169 1 (const int)
+0:169 'd5' (uniform float)
+0:173 Test condition and select (temp void)
+0:173 Condition
+0:173 Compare Less Than (temp bool)
+0:173 direct index (temp float)
+0:173 'color' (temp 4-component vector of float)
+0:173 Constant:
+0:173 0 (const int)
+0:173 'd6' (uniform float)
+0:173 true case
+0:174 Sequence
+0:174 Loop with condition tested first
+0:174 Loop Condition
+0:174 Compare Less Than (temp bool)
+0:174 direct index (temp float)
+0:174 'color' (temp 4-component vector of float)
+0:174 Constant:
+0:174 1 (const int)
+0:174 'd6' (uniform float)
+0:174 Loop Body
+0:175 add second child into first child (temp 4-component vector of float)
+0:175 'color' (temp 4-component vector of float)
+0:175 'bigColor6' (uniform 4-component vector of float)
+0:173 false case
+0:177 Sequence
+0:177 Loop with condition tested first
+0:177 Loop Condition
+0:177 Compare Less Than (temp bool)
+0:177 direct index (temp float)
+0:177 'color' (temp 4-component vector of float)
+0:177 Constant:
+0:177 2 (const int)
+0:177 'd6' (uniform float)
+0:177 Loop Body
+0:178 add second child into first child (temp float)
+0:178 direct index (temp float)
+0:178 'color' (temp 4-component vector of float)
+0:178 Constant:
+0:178 2 (const int)
+0:178 direct index (temp float)
+0:178 'bigColor6' (uniform 4-component vector of float)
+0:178 Constant:
+0:178 2 (const int)
+0:182 Test condition and select (temp void)
+0:182 Condition
+0:182 Compare Less Than (temp bool)
+0:182 direct index (temp float)
+0:182 'color' (temp 4-component vector of float)
+0:182 Constant:
+0:182 0 (const int)
+0:182 'd6' (uniform float)
+0:182 true case
+0:183 Sequence
+0:183 Loop with condition tested first
+0:183 Loop Condition
+0:183 Compare Less Than (temp bool)
+0:183 direct index (temp float)
+0:183 'color' (temp 4-component vector of float)
+0:183 Constant:
+0:183 1 (const int)
+0:183 'd6' (uniform float)
+0:183 Loop Body
+0:184 Sequence
+0:184 add second child into first child (temp 4-component vector of float)
+0:184 'color' (temp 4-component vector of float)
+0:184 'bigColor6' (uniform 4-component vector of float)
+0:185 Test condition and select (temp void)
+0:185 Condition
+0:185 Compare Less Than (temp bool)
+0:185 'd7' (uniform float)
+0:185 Constant:
+0:185 1.000000
+0:185 true case
+0:186 Branch: Break
+0:182 false case
+0:190 Sequence
+0:190 Loop with condition tested first
+0:190 Loop Condition
+0:190 Compare Less Than (temp bool)
+0:190 direct index (temp float)
+0:190 'color' (temp 4-component vector of float)
+0:190 Constant:
+0:190 2 (const int)
+0:190 'd6' (uniform float)
+0:190 Loop Body
+0:191 add second child into first child (temp float)
+0:191 direct index (temp float)
+0:191 'color' (temp 4-component vector of float)
+0:191 Constant:
+0:191 2 (const int)
+0:191 direct index (temp float)
+0:191 'bigColor6' (uniform 4-component vector of float)
+0:191 Constant:
+0:191 2 (const int)
+0:209 Loop with condition not tested first
+0:209 Loop Condition
+0:209 Constant:
+0:209 true (const bool)
+0:209 Loop Body
+0:197 Sequence
+0:197 Test condition and select (temp void)
+0:197 Condition
+0:197 Compare Less Than (temp bool)
+0:197 'd7' (uniform float)
+0:197 Constant:
+0:197 0.000000
+0:197 true case
+0:198 Branch: Break
+0:200 add second child into first child (temp 4-component vector of float)
+0:200 'color' (temp 4-component vector of float)
+0:200 'bigColor7' (uniform 4-component vector of float)
+0:202 Test condition and select (temp void)
+0:202 Condition
+0:202 Compare Less Than (temp bool)
+0:202 'd7' (uniform float)
+0:202 Constant:
+0:202 1.000000
+0:202 true case
+0:203 Sequence
+0:203 Post-Increment (temp float)
+0:203 direct index (temp float)
+0:203 'color' (temp 4-component vector of float)
+0:203 Constant:
+0:203 2 (const int)
+0:204 Branch: Break
+0:207 add second child into first child (temp 4-component vector of float)
+0:207 'color' (temp 4-component vector of float)
+0:207 'BaseColor' (smooth in 4-component vector of float)
+0:234 Loop with condition not tested first
+0:234 Loop Condition
+0:234 Compare Less Than (temp bool)
+0:234 direct index (temp float)
+0:234 'color' (temp 4-component vector of float)
+0:234 Constant:
+0:234 2 (const int)
+0:234 'd8' (uniform float)
+0:234 Loop Body
+0:217 Sequence
+0:217 Test condition and select (temp void)
+0:217 Condition
+0:217 Compare Less Than (temp bool)
+0:217 'd8' (uniform float)
+0:217 Constant:
+0:217 0.000000
+0:217 true case
+0:218 Branch: Break
+0:220 add second child into first child (temp 4-component vector of float)
+0:220 'color' (temp 4-component vector of float)
+0:220 'bigColor7' (uniform 4-component vector of float)
+0:222 Test condition and select (temp void)
+0:222 Condition
+0:222 Compare Less Than (temp bool)
+0:222 'd8' (uniform float)
+0:222 Constant:
+0:222 1.000000
+0:222 true case
+0:223 Sequence
+0:223 Post-Increment (temp float)
+0:223 direct index (temp float)
+0:223 'color' (temp 4-component vector of float)
+0:223 Constant:
+0:223 2 (const int)
+0:224 Test condition and select (temp void)
+0:224 Condition
+0:224 Compare Less Than (temp bool)
+0:224 'd8' (uniform float)
+0:224 Constant:
+0:224 2.000000
+0:224 true case
+0:225 Sequence
+0:225 Post-Increment (temp float)
+0:225 direct index (temp float)
+0:225 'color' (temp 4-component vector of float)
+0:225 Constant:
+0:225 1 (const int)
+0:224 false case
+0:227 Sequence
+0:227 Post-Increment (temp float)
+0:227 direct index (temp float)
+0:227 'color' (temp 4-component vector of float)
+0:227 Constant:
+0:227 0 (const int)
+0:229 Branch: Break
+0:232 add second child into first child (temp 4-component vector of float)
+0:232 'color' (temp 4-component vector of float)
+0:232 'BaseColor' (smooth in 4-component vector of float)
+0:237 Loop with condition tested first
+0:237 Loop Condition
+0:237 Compare Less Than (temp bool)
+0:237 direct index (temp float)
+0:237 'color' (temp 4-component vector of float)
+0:237 Constant:
+0:237 3 (const int)
+0:237 'd9' (uniform float)
+0:237 Loop Body
+0:238 Sequence
+0:238 Test condition and select (temp void)
+0:238 Condition
+0:238 Compare Greater Than (temp bool)
+0:238 'd9' (uniform float)
+0:238 'd8' (uniform float)
+0:238 true case
+0:239 Sequence
+0:239 Test condition and select (temp void)
+0:239 Condition
+0:239 Compare Less Than or Equal (temp bool)
+0:239 direct index (temp float)
+0:239 'color' (temp 4-component vector of float)
+0:239 Constant:
+0:239 0 (const int)
+0:239 'd7' (uniform float)
+0:239 true case
+0:240 Sequence
+0:240 Test condition and select (temp void)
+0:240 Condition
+0:240 Compare Equal (temp bool)
+0:240 direct index (temp float)
+0:240 'color' (temp 4-component vector of float)
+0:240 Constant:
+0:240 2 (const int)
+0:240 Constant:
+0:240 5.000000
+0:240 true case
+0:241 Post-Increment (temp float)
+0:241 direct index (temp float)
+0:241 'color' (temp 4-component vector of float)
+0:241 Constant:
+0:241 3 (const int)
+0:240 false case
+0:243 Branch: Break
+0:250 Loop with condition tested first
+0:250 Loop Condition
+0:250 Compare Less Than (temp bool)
+0:250 direct index (temp float)
+0:250 'color' (temp 4-component vector of float)
+0:250 Constant:
+0:250 2 (const int)
+0:250 'd10' (uniform float)
+0:250 Loop Body
+0:251 Sequence
+0:251 Post-Increment (temp float)
+0:251 direct index (temp float)
+0:251 'color' (temp 4-component vector of float)
+0:251 Constant:
+0:251 1 (const int)
+0:252 Test condition and select (temp void)
+0:252 Condition
+0:252 Compare Less Than (temp bool)
+0:252 direct index (temp float)
+0:252 'color' (temp 4-component vector of float)
+0:252 Constant:
+0:252 1 (const int)
+0:252 'd11' (uniform float)
+0:252 true case
+0:253 Sequence
+0:253 Post-Increment (temp float)
+0:253 direct index (temp float)
+0:253 'color' (temp 4-component vector of float)
+0:253 Constant:
+0:253 2 (const int)
+0:254 Test condition and select (temp void)
+0:254 Condition
+0:254 Compare Less Than (temp bool)
+0:254 direct index (temp float)
+0:254 'color' (temp 4-component vector of float)
+0:254 Constant:
+0:254 3 (const int)
+0:254 'd12' (uniform float)
+0:254 true case
+0:255 Post-Increment (temp float)
+0:255 direct index (temp float)
+0:255 'color' (temp 4-component vector of float)
+0:255 Constant:
+0:255 3 (const int)
+0:254 false case
+0:257 Post-Increment (temp float)
+0:257 direct index (temp float)
+0:257 'color' (temp 4-component vector of float)
+0:257 Constant:
+0:257 0 (const int)
+0:258 Branch: Continue
+0:261 Post-Increment (temp 4-component vector of float)
+0:261 'color' (temp 4-component vector of float)
+0:262 Branch: Break
+0:266 Loop with condition tested first
+0:266 Loop Condition
+0:266 Compare Less Than (temp bool)
+0:266 direct index (temp float)
+0:266 'color' (temp 4-component vector of float)
+0:266 Constant:
+0:266 0 (const int)
+0:266 Constant:
+0:266 10.000000
+0:266 Loop Body
+0:267 Sequence
+0:267 add second child into first child (temp 4-component vector of float)
+0:267 'color' (temp 4-component vector of float)
+0:267 'bigColor8' (uniform 4-component vector of float)
+0:269 Test condition and select (temp void)
+0:269 Condition
+0:269 Compare Less Than (temp bool)
+0:269 direct index (temp float)
+0:269 'color' (temp 4-component vector of float)
+0:269 Constant:
+0:269 2 (const int)
+0:269 'd8' (uniform float)
+0:269 true case
+0:270 Test condition and select (temp void)
+0:270 Condition
+0:270 Compare Less Than (temp bool)
+0:270 direct index (temp float)
+0:270 'color' (temp 4-component vector of float)
+0:270 Constant:
+0:270 3 (const int)
+0:270 'd6' (uniform float)
+0:270 true case
+0:271 Branch: Continue
+0:273 add second child into first child (temp float)
+0:273 direct index (temp float)
+0:273 'color' (temp 4-component vector of float)
+0:273 Constant:
+0:273 1 (const int)
+0:273 direct index (temp float)
+0:273 'bigColor8' (uniform 4-component vector of float)
+0:273 Constant:
+0:273 0 (const int)
+0:276 Post-Increment (temp 4-component vector of float)
+0:276 'color' (temp 4-component vector of float)
+0:277 move second child to first child (temp 4-component vector of float)
+0:277 'gl_FragColor' (fragColor 4-component vector of float FragColor)
+0:277 'color' (temp 4-component vector of float)
+0:280 Loop with condition tested first
+0:280 Loop Condition
+0:280 Compare Less Than (temp bool)
+0:280 direct index (temp float)
+0:280 'color' (temp 4-component vector of float)
+0:280 Constant:
+0:280 0 (const int)
+0:280 'd14' (uniform float)
+0:280 Loop Body
+0:281 Sequence
+0:281 Test condition and select (temp void)
+0:281 Condition
+0:281 Compare Less Than (temp bool)
+0:281 direct index (temp float)
+0:281 'color' (temp 4-component vector of float)
+0:281 Constant:
+0:281 1 (const int)
+0:281 'd15' (uniform float)
+0:281 true case
+0:282 Sequence
+0:282 Branch: Return
+0:281 false case
+0:285 Post-Increment (temp 4-component vector of float)
+0:285 'color' (temp 4-component vector of float)
+0:288 Post-Increment (temp 4-component vector of float)
+0:288 'color' (temp 4-component vector of float)
+0:290 Loop with condition tested first
+0:290 Loop Condition
+0:290 Compare Less Than (temp bool)
+0:290 direct index (temp float)
+0:290 'color' (temp 4-component vector of float)
+0:290 Constant:
+0:290 3 (const int)
+0:290 'd16' (uniform float)
+0:290 Loop Body
+0:291 Sequence
+0:291 Post-Increment (temp float)
+0:291 direct index (temp float)
+0:291 'color' (temp 4-component vector of float)
+0:291 Constant:
+0:291 3 (const int)
+0:296 Loop with condition tested first
+0:296 Loop Condition
+0:296 logical-and (temp bool)
+0:296 Compare Less Than (temp bool)
+0:296 direct index (temp float)
+0:296 'color' (temp 4-component vector of float)
+0:296 Constant:
+0:296 3 (const int)
+0:296 'd2' (uniform float)
+0:296 Compare Less Than (temp bool)
+0:296 direct index (temp float)
+0:296 'color' (temp 4-component vector of float)
+0:296 Constant:
+0:296 1 (const int)
+0:296 'd3' (uniform float)
+0:296 Loop Body
+0:297 Sequence
+0:297 add second child into first child (temp 4-component vector of float)
+0:297 'color' (temp 4-component vector of float)
+0:297 'bigColor1_2' (uniform 4-component vector of float)
+0:298 Test condition and select (temp void)
+0:298 Condition
+0:298 Compare Less Than (temp bool)
+0:298 direct index (temp float)
+0:298 'color' (temp 4-component vector of float)
+0:298 Constant:
+0:298 2 (const int)
+0:298 'd3' (uniform float)
+0:298 true case
+0:299 Branch: Return
+0:307 Loop with condition not tested first
+0:307 Loop Condition
+0:307 Compare Less Than (temp bool)
+0:307 direct index (temp float)
+0:307 'color' (temp 4-component vector of float)
+0:307 Constant:
+0:307 0 (const int)
+0:307 'd17' (uniform float)
+0:307 Loop Body
+0:304 Sequence
+0:304 Test condition and select (temp void)
+0:304 Condition
+0:304 Compare Less Than (temp bool)
+0:304 direct index (temp float)
+0:304 'color' (temp 4-component vector of float)
+0:304 Constant:
+0:304 1 (const int)
+0:304 'd18' (uniform float)
+0:304 true case
+0:305 Branch: Return
+0:306 Post-Increment (temp 4-component vector of float)
+0:306 'color' (temp 4-component vector of float)
+0:310 Loop with condition tested first
+0:310 Loop Condition
+0:310 Compare Less Than (temp bool)
+0:310 direct index (temp float)
+0:310 'color' (temp 4-component vector of float)
+0:310 Constant:
+0:310 1 (const int)
+0:310 'd16' (uniform float)
+0:310 Loop Body
+0:311 Sequence
+0:311 Test condition and select (temp void)
+0:311 Condition
+0:311 Compare Less Than (temp bool)
+0:311 direct index (temp float)
+0:311 'color' (temp 4-component vector of float)
+0:311 Constant:
+0:311 3 (const int)
+0:311 'd16' (uniform float)
+0:311 true case
+0:312 Sequence
+0:312 Branch: Kill
+0:311 false case
+0:314 Post-Increment (temp 4-component vector of float)
+0:314 'color' (temp 4-component vector of float)
+0:317 Post-Increment (temp 4-component vector of float)
+0:317 'color' (temp 4-component vector of float)
+0:319 move second child to first child (temp 4-component vector of float)
+0:319 'gl_FragColor' (fragColor 4-component vector of float FragColor)
+0:319 'color' (temp 4-component vector of float)
+0:? Linker Objects
+0:? 'bigColor' (uniform 4-component vector of float)
+0:? 'bigColor1_1' (uniform 4-component vector of float)
+0:? 'bigColor1_2' (uniform 4-component vector of float)
+0:? 'bigColor1_3' (uniform 4-component vector of float)
+0:? 'bigColor2' (uniform 4-component vector of float)
+0:? 'bigColor3' (uniform 4-component vector of float)
+0:? 'bigColor4' (uniform 4-component vector of float)
+0:? 'bigColor5' (uniform 4-component vector of float)
+0:? 'bigColor6' (uniform 4-component vector of float)
+0:? 'bigColor7' (uniform 4-component vector of float)
+0:? 'bigColor8' (uniform 4-component vector of float)
+0:? 'BaseColor' (smooth in 4-component vector of float)
+0:? 'd' (uniform float)
+0:? 'd2' (uniform float)
+0:? 'd3' (uniform float)
+0:? 'd4' (uniform float)
+0:? 'd5' (uniform float)
+0:? 'd6' (uniform float)
+0:? 'd7' (uniform float)
+0:? 'd8' (uniform float)
+0:? 'd9' (uniform float)
+0:? 'd10' (uniform float)
+0:? 'd11' (uniform float)
+0:? 'd12' (uniform float)
+0:? 'd13' (uniform float)
+0:? 'd14' (uniform float)
+0:? 'd15' (uniform float)
+0:? 'd16' (uniform float)
+0:? 'd17' (uniform float)
+0:? 'd18' (uniform float)
+0:? 'd19' (uniform float)
+0:? 'd20' (uniform float)
+0:? 'd21' (uniform float)
+0:? 'd22' (uniform float)
+0:? 'd23' (uniform float)
+0:? 'd24' (uniform float)
+0:? 'd25' (uniform float)
+0:? 'd26' (uniform float)
+0:? 'd27' (uniform float)
+0:? 'd28' (uniform float)
+0:? 'd29' (uniform float)
+0:? 'd30' (uniform float)
+0:? 'd31' (uniform float)
+0:? 'd32' (uniform float)
+0:? 'd33' (uniform float)
+0:? 'd34' (uniform float)
+0:? 'Count' (uniform int)
+
+
+Linked fragment stage:
+
+
+Shader version: 130
+0:? Sequence
+0:53 Function Definition: main( (global void)
+0:53 Function Parameters:
+0:55 Sequence
+0:55 Sequence
+0:55 move second child to first child (temp 4-component vector of float)
+0:55 'color' (temp 4-component vector of float)
+0:55 'BaseColor' (smooth in 4-component vector of float)
+0:58 Loop with condition tested first
+0:58 Loop Condition
+0:58 Constant:
+0:58 true (const bool)
+0:58 Loop Body
+0:59 Sequence
+0:59 Test condition and select (temp void)
+0:59 Condition
+0:59 Compare Less Than (temp bool)
+0:59 direct index (temp float)
+0:59 'color' (temp 4-component vector of float)
+0:59 Constant:
+0:59 0 (const int)
+0:59 Constant:
+0:59 0.330000
+0:59 true case
+0:60 Sequence
+0:60 add second child into first child (temp 4-component vector of float)
+0:60 'color' (temp 4-component vector of float)
+0:60 Constant:
+0:60 0.330000
+0:60 0.330000
+0:60 0.330000
+0:60 0.330000
+0:61 Branch: Break
+0:63 Test condition and select (temp void)
+0:63 Condition
+0:63 Compare Less Than (temp bool)
+0:63 direct index (temp float)
+0:63 'color' (temp 4-component vector of float)
+0:63 Constant:
+0:63 0 (const int)
+0:63 Constant:
+0:63 0.660000
+0:63 true case
+0:64 Sequence
+0:64 add second child into first child (temp 4-component vector of float)
+0:64 'color' (temp 4-component vector of float)
+0:64 Constant:
+0:64 0.660000
+0:64 0.660000
+0:64 0.660000
+0:64 0.660000
+0:65 Branch: Break
+0:68 add second child into first child (temp 4-component vector of float)
+0:68 'color' (temp 4-component vector of float)
+0:68 Constant:
+0:68 0.330000
+0:68 0.330000
+0:68 0.330000
+0:68 0.330000
+0:69 Branch: Break
+0:73 Loop with condition tested first
+0:73 Loop Condition
+0:73 Compare Less Than (temp bool)
+0:73 direct index (temp float)
+0:73 'color' (temp 4-component vector of float)
+0:73 Constant:
+0:73 0 (const int)
+0:73 'd' (uniform float)
+0:73 Loop Body
+0:74 Sequence
+0:74 add second child into first child (temp 4-component vector of float)
+0:74 'color' (temp 4-component vector of float)
+0:74 'bigColor' (uniform 4-component vector of float)
+0:78 Loop with condition tested first
+0:78 Loop Condition
+0:78 Compare Less Than (temp bool)
+0:78 direct index (temp float)
+0:78 'color' (temp 4-component vector of float)
+0:78 Constant:
+0:78 2 (const int)
+0:78 'd' (uniform float)
+0:78 Loop Body
+0:79 Sequence
+0:79 add second child into first child (temp 4-component vector of float)
+0:79 'color' (temp 4-component vector of float)
+0:79 'bigColor1_1' (uniform 4-component vector of float)
+0:80 Test condition and select (temp void)
+0:80 Condition
+0:80 Compare Less Than (temp bool)
+0:80 direct index (temp float)
+0:80 'color' (temp 4-component vector of float)
+0:80 Constant:
+0:80 3 (const int)
+0:80 'd' (uniform float)
+0:80 true case
+0:81 Branch: Continue
+0:83 add second child into first child (temp 4-component vector of float)
+0:83 'color' (temp 4-component vector of float)
+0:83 'bigColor1_1' (uniform 4-component vector of float)
+0:87 Loop with condition tested first
+0:87 Loop Condition
+0:87 Compare Less Than (temp bool)
+0:87 direct index (temp float)
+0:87 'color' (temp 4-component vector of float)
+0:87 Constant:
+0:87 0 (const int)
+0:87 Constant:
+0:87 42.000000
+0:87 Loop Body
+0:88 Sequence
+0:88 Pre-Increment (temp 4-component vector of float)
+0:88 'color' (temp 4-component vector of float)
+0:92 Loop with condition tested first
+0:92 Loop Condition
+0:92 logical-and (temp bool)
+0:92 Compare Less Than (temp bool)
+0:92 direct index (temp float)
+0:92 'color' (temp 4-component vector of float)
+0:92 Constant:
+0:92 3 (const int)
+0:92 'd2' (uniform float)
+0:92 Compare Less Than (temp bool)
+0:92 direct index (temp float)
+0:92 'color' (temp 4-component vector of float)
+0:92 Constant:
+0:92 1 (const int)
+0:92 'd3' (uniform float)
+0:92 Loop Body
+0:93 Sequence
+0:93 add second child into first child (temp 4-component vector of float)
+0:93 'color' (temp 4-component vector of float)
+0:93 'bigColor1_2' (uniform 4-component vector of float)
+0:97 Loop with condition tested first
+0:97 Loop Condition
+0:97 Compare Less Than (temp bool)
+0:97 direct index (temp float)
+0:97 'color' (temp 4-component vector of float)
+0:97 Constant:
+0:97 2 (const int)
+0:97 'd3' (uniform float)
+0:97 Loop Body
+0:98 Sequence
+0:98 add second child into first child (temp 4-component vector of float)
+0:98 'color' (temp 4-component vector of float)
+0:98 'bigColor1_3' (uniform 4-component vector of float)
+0:99 Test condition and select (temp void)
+0:99 Condition
+0:99 Compare Less Than (temp bool)
+0:99 direct index (temp float)
+0:99 'color' (temp 4-component vector of float)
+0:99 Constant:
+0:99 1 (const int)
+0:99 'd4' (uniform float)
+0:99 true case
+0:100 Branch: Break
+0:101 add second child into first child (temp 4-component vector of float)
+0:101 'color' (temp 4-component vector of float)
+0:101 'bigColor1_3' (uniform 4-component vector of float)
+0:105 Sequence
+0:105 Sequence
+0:105 move second child to first child (temp int)
+0:105 'i' (temp int)
+0:105 Constant:
+0:105 0 (const int)
+0:105 Loop with condition tested first
+0:105 Loop Condition
+0:105 Compare Less Than (temp bool)
+0:105 'i' (temp int)
+0:105 'Count' (uniform int)
+0:105 Loop Body
+0:106 Sequence
+0:106 add second child into first child (temp 4-component vector of float)
+0:106 'color' (temp 4-component vector of float)
+0:106 'bigColor2' (uniform 4-component vector of float)
+0:105 Loop Terminal Expression
+0:105 Pre-Increment (temp int)
+0:105 'i' (temp int)
+0:112 Loop with condition not tested first
+0:112 Loop Condition
+0:112 Compare Less Than (temp bool)
+0:112 direct index (temp float)
+0:112 'color' (temp 4-component vector of float)
+0:112 Constant:
+0:112 0 (const int)
+0:112 'd2' (uniform float)
+0:112 Loop Body
+0:111 Sequence
+0:111 add second child into first child (temp 4-component vector of float)
+0:111 'color' (temp 4-component vector of float)
+0:111 'bigColor3' (uniform 4-component vector of float)
+0:115 Sequence
+0:115 Sequence
+0:115 move second child to first child (temp int)
+0:115 'i' (temp int)
+0:115 Constant:
+0:115 0 (const int)
+0:115 Loop with condition tested first
+0:115 Loop Condition
+0:115 Compare Less Than (temp bool)
+0:115 'i' (temp int)
+0:115 Constant:
+0:115 42 (const int)
+0:115 Loop Body
+0:116 Sequence
+0:116 add second child into first child (temp float)
+0:116 direct index (temp float)
+0:116 'color' (temp 4-component vector of float)
+0:116 Constant:
+0:116 2 (const int)
+0:116 'd3' (uniform float)
+0:115 Loop Terminal Expression
+0:115 Pre-Increment (temp int)
+0:115 'i' (temp int)
+0:120 Sequence
+0:120 Sequence
+0:120 move second child to first child (temp int)
+0:120 'i' (temp int)
+0:120 Constant:
+0:120 0 (const int)
+0:120 Loop with condition tested first
+0:120 Loop Condition
+0:120 Compare Less Than (temp bool)
+0:120 'i' (temp int)
+0:120 Constant:
+0:120 100 (const int)
+0:120 Loop Body
+0:121 Sequence
+0:121 Test condition and select (temp void)
+0:121 Condition
+0:121 Compare Less Than (temp bool)
+0:121 direct index (temp float)
+0:121 'color' (temp 4-component vector of float)
+0:121 Constant:
+0:121 2 (const int)
+0:121 Constant:
+0:121 20.000000
+0:121 true case
+0:122 Post-Increment (temp float)
+0:122 direct index (temp float)
+0:122 'color' (temp 4-component vector of float)
+0:122 Constant:
+0:122 0 (const int)
+0:121 false case
+0:124 Post-Increment (temp float)
+0:124 direct index (temp float)
+0:124 'color' (temp 4-component vector of float)
+0:124 Constant:
+0:124 1 (const int)
+0:125 Test condition and select (temp void)
+0:125 Condition
+0:125 Compare Less Than (temp bool)
+0:125 direct index (temp float)
+0:125 'color' (temp 4-component vector of float)
+0:125 Constant:
+0:125 3 (const int)
+0:125 Constant:
+0:125 20.000000
+0:125 true case
+0:126 Test condition and select (temp void)
+0:126 Condition
+0:126 Compare Greater Than (temp bool)
+0:126 direct index (temp float)
+0:126 'color' (temp 4-component vector of float)
+0:126 Constant:
+0:126 2 (const int)
+0:126 direct index (temp float)
+0:126 'color' (temp 4-component vector of float)
+0:126 Constant:
+0:126 1 (const int)
+0:126 true case
+0:127 Constant:
+0:127 0 (const int)
+0:120 Loop Terminal Expression
+0:120 Pre-Increment (temp int)
+0:120 'i' (temp int)
+0:131 Sequence
+0:131 Sequence
+0:131 move second child to first child (temp int)
+0:131 'i' (temp int)
+0:131 Constant:
+0:131 0 (const int)
+0:131 Loop with condition tested first
+0:131 Loop Condition
+0:131 Compare Less Than (temp bool)
+0:131 'i' (temp int)
+0:131 Constant:
+0:131 120 (const int)
+0:131 Loop Body
+0:132 Sequence
+0:132 Test condition and select (temp void)
+0:132 Condition
+0:132 Compare Less Than (temp bool)
+0:132 direct index (temp float)
+0:132 'color' (temp 4-component vector of float)
+0:132 Constant:
+0:132 2 (const int)
+0:132 Constant:
+0:132 20.000000
+0:132 true case
+0:133 Post-Increment (temp float)
+0:133 direct index (temp float)
+0:133 'color' (temp 4-component vector of float)
+0:133 Constant:
+0:133 0 (const int)
+0:132 false case
+0:135 Post-Increment (temp float)
+0:135 direct index (temp float)
+0:135 'color' (temp 4-component vector of float)
+0:135 Constant:
+0:135 1 (const int)
+0:131 Loop Terminal Expression
+0:131 Pre-Increment (temp int)
+0:131 'i' (temp int)
+0:139 Sequence
+0:139 Sequence
+0:139 move second child to first child (temp int)
+0:139 'i' (temp int)
+0:139 Constant:
+0:139 0 (const int)
+0:139 Loop with condition tested first
+0:139 Loop Condition
+0:139 Compare Less Than (temp bool)
+0:139 'i' (temp int)
+0:139 Constant:
+0:139 42 (const int)
+0:139 Loop Body
+0:140 Sequence
+0:140 add second child into first child (temp float)
+0:140 direct index (temp float)
+0:140 'color' (temp 4-component vector of float)
+0:140 Constant:
+0:140 2 (const int)
+0:140 'd3' (uniform float)
+0:141 Test condition and select (temp void)
+0:141 Condition
+0:141 Compare Less Than (temp bool)
+0:141 direct index (temp float)
+0:141 'color' (temp 4-component vector of float)
+0:141 Constant:
+0:141 0 (const int)
+0:141 'd4' (uniform float)
+0:141 true case
+0:142 Branch: Continue
+0:143 Pre-Increment (temp float)
+0:143 direct index (temp float)
+0:143 'color' (temp 4-component vector of float)
+0:143 Constant:
+0:143 3 (const int)
+0:139 Loop Terminal Expression
+0:139 Pre-Increment (temp int)
+0:139 'i' (temp int)
+0:147 Sequence
+0:147 Sequence
+0:147 move second child to first child (temp int)
+0:147 'i' (temp int)
+0:147 Constant:
+0:147 0 (const int)
+0:147 Loop with condition tested first
+0:147 Loop Condition
+0:147 Compare Less Than (temp bool)
+0:147 'i' (temp int)
+0:147 Constant:
+0:147 42 (const int)
+0:147 Loop Body
+0:148 Sequence
+0:148 add second child into first child (temp float)
+0:148 direct index (temp float)
+0:148 'color' (temp 4-component vector of float)
+0:148 Constant:
+0:148 2 (const int)
+0:148 'd3' (uniform float)
+0:149 Test condition and select (temp void)
+0:149 Condition
+0:149 Compare Less Than (temp bool)
+0:149 direct index (temp float)
+0:149 'color' (temp 4-component vector of float)
+0:149 Constant:
+0:149 0 (const int)
+0:149 'd4' (uniform float)
+0:149 true case
+0:150 Branch: Break
+0:151 Pre-Increment (temp float)
+0:151 direct index (temp float)
+0:151 'color' (temp 4-component vector of float)
+0:151 Constant:
+0:151 3 (const int)
+0:147 Loop Terminal Expression
+0:147 Pre-Increment (temp int)
+0:147 'i' (temp int)
+0:163 Loop with condition not tested first
+0:163 Loop Condition
+0:163 Compare Less Than (temp bool)
+0:163 direct index (temp float)
+0:163 'color' (temp 4-component vector of float)
+0:163 Constant:
+0:163 2 (const int)
+0:163 'd4' (uniform float)
+0:163 Loop Body
+0:156 Sequence
+0:156 add second child into first child (temp 4-component vector of float)
+0:156 'color' (temp 4-component vector of float)
+0:156 'bigColor4' (uniform 4-component vector of float)
+0:157 Test condition and select (temp void)
+0:157 Condition
+0:157 Compare Less Than (temp bool)
+0:157 direct index (temp float)
+0:157 'color' (temp 4-component vector of float)
+0:157 Constant:
+0:157 0 (const int)
+0:157 'd4' (uniform float)
+0:157 true case
+0:158 Branch: Continue
+0:159 Test condition and select (temp void)
+0:159 Condition
+0:159 Compare Less Than (temp bool)
+0:159 direct index (temp float)
+0:159 'color' (temp 4-component vector of float)
+0:159 Constant:
+0:159 1 (const int)
+0:159 'd4' (uniform float)
+0:159 true case
+0:160 add second child into first child (temp float)
+0:160 direct index (temp float)
+0:160 'color' (temp 4-component vector of float)
+0:160 Constant:
+0:160 1 (const int)
+0:160 'd4' (uniform float)
+0:159 false case
+0:162 add second child into first child (temp float)
+0:162 direct index (temp float)
+0:162 'color' (temp 4-component vector of float)
+0:162 Constant:
+0:162 0 (const int)
+0:162 'd4' (uniform float)
+0:170 Loop with condition not tested first
+0:170 Loop Condition
+0:170 Compare Less Than (temp bool)
+0:170 direct index (temp float)
+0:170 'color' (temp 4-component vector of float)
+0:170 Constant:
+0:170 0 (const int)
+0:170 'd5' (uniform float)
+0:170 Loop Body
+0:167 Sequence
+0:167 add second child into first child (temp 4-component vector of float)
+0:167 'color' (temp 4-component vector of float)
+0:167 'bigColor5' (uniform 4-component vector of float)
+0:168 Test condition and select (temp void)
+0:168 Condition
+0:168 Compare Less Than (temp bool)
+0:168 direct index (temp float)
+0:168 'color' (temp 4-component vector of float)
+0:168 Constant:
+0:168 1 (const int)
+0:168 'd5' (uniform float)
+0:168 true case
+0:169 add second child into first child (temp float)
+0:169 direct index (temp float)
+0:169 'color' (temp 4-component vector of float)
+0:169 Constant:
+0:169 1 (const int)
+0:169 'd5' (uniform float)
+0:173 Test condition and select (temp void)
+0:173 Condition
+0:173 Compare Less Than (temp bool)
+0:173 direct index (temp float)
+0:173 'color' (temp 4-component vector of float)
+0:173 Constant:
+0:173 0 (const int)
+0:173 'd6' (uniform float)
+0:173 true case
+0:174 Sequence
+0:174 Loop with condition tested first
+0:174 Loop Condition
+0:174 Compare Less Than (temp bool)
+0:174 direct index (temp float)
+0:174 'color' (temp 4-component vector of float)
+0:174 Constant:
+0:174 1 (const int)
+0:174 'd6' (uniform float)
+0:174 Loop Body
+0:175 add second child into first child (temp 4-component vector of float)
+0:175 'color' (temp 4-component vector of float)
+0:175 'bigColor6' (uniform 4-component vector of float)
+0:173 false case
+0:177 Sequence
+0:177 Loop with condition tested first
+0:177 Loop Condition
+0:177 Compare Less Than (temp bool)
+0:177 direct index (temp float)
+0:177 'color' (temp 4-component vector of float)
+0:177 Constant:
+0:177 2 (const int)
+0:177 'd6' (uniform float)
+0:177 Loop Body
+0:178 add second child into first child (temp float)
+0:178 direct index (temp float)
+0:178 'color' (temp 4-component vector of float)
+0:178 Constant:
+0:178 2 (const int)
+0:178 direct index (temp float)
+0:178 'bigColor6' (uniform 4-component vector of float)
+0:178 Constant:
+0:178 2 (const int)
+0:182 Test condition and select (temp void)
+0:182 Condition
+0:182 Compare Less Than (temp bool)
+0:182 direct index (temp float)
+0:182 'color' (temp 4-component vector of float)
+0:182 Constant:
+0:182 0 (const int)
+0:182 'd6' (uniform float)
+0:182 true case
+0:183 Sequence
+0:183 Loop with condition tested first
+0:183 Loop Condition
+0:183 Compare Less Than (temp bool)
+0:183 direct index (temp float)
+0:183 'color' (temp 4-component vector of float)
+0:183 Constant:
+0:183 1 (const int)
+0:183 'd6' (uniform float)
+0:183 Loop Body
+0:184 Sequence
+0:184 add second child into first child (temp 4-component vector of float)
+0:184 'color' (temp 4-component vector of float)
+0:184 'bigColor6' (uniform 4-component vector of float)
+0:185 Test condition and select (temp void)
+0:185 Condition
+0:185 Compare Less Than (temp bool)
+0:185 'd7' (uniform float)
+0:185 Constant:
+0:185 1.000000
+0:185 true case
+0:186 Branch: Break
+0:182 false case
+0:190 Sequence
+0:190 Loop with condition tested first
+0:190 Loop Condition
+0:190 Compare Less Than (temp bool)
+0:190 direct index (temp float)
+0:190 'color' (temp 4-component vector of float)
+0:190 Constant:
+0:190 2 (const int)
+0:190 'd6' (uniform float)
+0:190 Loop Body
+0:191 add second child into first child (temp float)
+0:191 direct index (temp float)
+0:191 'color' (temp 4-component vector of float)
+0:191 Constant:
+0:191 2 (const int)
+0:191 direct index (temp float)
+0:191 'bigColor6' (uniform 4-component vector of float)
+0:191 Constant:
+0:191 2 (const int)
+0:209 Loop with condition not tested first
+0:209 Loop Condition
+0:209 Constant:
+0:209 true (const bool)
+0:209 Loop Body
+0:197 Sequence
+0:197 Test condition and select (temp void)
+0:197 Condition
+0:197 Compare Less Than (temp bool)
+0:197 'd7' (uniform float)
+0:197 Constant:
+0:197 0.000000
+0:197 true case
+0:198 Branch: Break
+0:200 add second child into first child (temp 4-component vector of float)
+0:200 'color' (temp 4-component vector of float)
+0:200 'bigColor7' (uniform 4-component vector of float)
+0:202 Test condition and select (temp void)
+0:202 Condition
+0:202 Compare Less Than (temp bool)
+0:202 'd7' (uniform float)
+0:202 Constant:
+0:202 1.000000
+0:202 true case
+0:203 Sequence
+0:203 Post-Increment (temp float)
+0:203 direct index (temp float)
+0:203 'color' (temp 4-component vector of float)
+0:203 Constant:
+0:203 2 (const int)
+0:204 Branch: Break
+0:207 add second child into first child (temp 4-component vector of float)
+0:207 'color' (temp 4-component vector of float)
+0:207 'BaseColor' (smooth in 4-component vector of float)
+0:234 Loop with condition not tested first
+0:234 Loop Condition
+0:234 Compare Less Than (temp bool)
+0:234 direct index (temp float)
+0:234 'color' (temp 4-component vector of float)
+0:234 Constant:
+0:234 2 (const int)
+0:234 'd8' (uniform float)
+0:234 Loop Body
+0:217 Sequence
+0:217 Test condition and select (temp void)
+0:217 Condition
+0:217 Compare Less Than (temp bool)
+0:217 'd8' (uniform float)
+0:217 Constant:
+0:217 0.000000
+0:217 true case
+0:218 Branch: Break
+0:220 add second child into first child (temp 4-component vector of float)
+0:220 'color' (temp 4-component vector of float)
+0:220 'bigColor7' (uniform 4-component vector of float)
+0:222 Test condition and select (temp void)
+0:222 Condition
+0:222 Compare Less Than (temp bool)
+0:222 'd8' (uniform float)
+0:222 Constant:
+0:222 1.000000
+0:222 true case
+0:223 Sequence
+0:223 Post-Increment (temp float)
+0:223 direct index (temp float)
+0:223 'color' (temp 4-component vector of float)
+0:223 Constant:
+0:223 2 (const int)
+0:224 Test condition and select (temp void)
+0:224 Condition
+0:224 Compare Less Than (temp bool)
+0:224 'd8' (uniform float)
+0:224 Constant:
+0:224 2.000000
+0:224 true case
+0:225 Sequence
+0:225 Post-Increment (temp float)
+0:225 direct index (temp float)
+0:225 'color' (temp 4-component vector of float)
+0:225 Constant:
+0:225 1 (const int)
+0:224 false case
+0:227 Sequence
+0:227 Post-Increment (temp float)
+0:227 direct index (temp float)
+0:227 'color' (temp 4-component vector of float)
+0:227 Constant:
+0:227 0 (const int)
+0:229 Branch: Break
+0:232 add second child into first child (temp 4-component vector of float)
+0:232 'color' (temp 4-component vector of float)
+0:232 'BaseColor' (smooth in 4-component vector of float)
+0:237 Loop with condition tested first
+0:237 Loop Condition
+0:237 Compare Less Than (temp bool)
+0:237 direct index (temp float)
+0:237 'color' (temp 4-component vector of float)
+0:237 Constant:
+0:237 3 (const int)
+0:237 'd9' (uniform float)
+0:237 Loop Body
+0:238 Sequence
+0:238 Test condition and select (temp void)
+0:238 Condition
+0:238 Compare Greater Than (temp bool)
+0:238 'd9' (uniform float)
+0:238 'd8' (uniform float)
+0:238 true case
+0:239 Sequence
+0:239 Test condition and select (temp void)
+0:239 Condition
+0:239 Compare Less Than or Equal (temp bool)
+0:239 direct index (temp float)
+0:239 'color' (temp 4-component vector of float)
+0:239 Constant:
+0:239 0 (const int)
+0:239 'd7' (uniform float)
+0:239 true case
+0:240 Sequence
+0:240 Test condition and select (temp void)
+0:240 Condition
+0:240 Compare Equal (temp bool)
+0:240 direct index (temp float)
+0:240 'color' (temp 4-component vector of float)
+0:240 Constant:
+0:240 2 (const int)
+0:240 Constant:
+0:240 5.000000
+0:240 true case
+0:241 Post-Increment (temp float)
+0:241 direct index (temp float)
+0:241 'color' (temp 4-component vector of float)
+0:241 Constant:
+0:241 3 (const int)
+0:240 false case
+0:243 Branch: Break
+0:250 Loop with condition tested first
+0:250 Loop Condition
+0:250 Compare Less Than (temp bool)
+0:250 direct index (temp float)
+0:250 'color' (temp 4-component vector of float)
+0:250 Constant:
+0:250 2 (const int)
+0:250 'd10' (uniform float)
+0:250 Loop Body
+0:251 Sequence
+0:251 Post-Increment (temp float)
+0:251 direct index (temp float)
+0:251 'color' (temp 4-component vector of float)
+0:251 Constant:
+0:251 1 (const int)
+0:252 Test condition and select (temp void)
+0:252 Condition
+0:252 Compare Less Than (temp bool)
+0:252 direct index (temp float)
+0:252 'color' (temp 4-component vector of float)
+0:252 Constant:
+0:252 1 (const int)
+0:252 'd11' (uniform float)
+0:252 true case
+0:253 Sequence
+0:253 Post-Increment (temp float)
+0:253 direct index (temp float)
+0:253 'color' (temp 4-component vector of float)
+0:253 Constant:
+0:253 2 (const int)
+0:254 Test condition and select (temp void)
+0:254 Condition
+0:254 Compare Less Than (temp bool)
+0:254 direct index (temp float)
+0:254 'color' (temp 4-component vector of float)
+0:254 Constant:
+0:254 3 (const int)
+0:254 'd12' (uniform float)
+0:254 true case
+0:255 Post-Increment (temp float)
+0:255 direct index (temp float)
+0:255 'color' (temp 4-component vector of float)
+0:255 Constant:
+0:255 3 (const int)
+0:254 false case
+0:257 Post-Increment (temp float)
+0:257 direct index (temp float)
+0:257 'color' (temp 4-component vector of float)
+0:257 Constant:
+0:257 0 (const int)
+0:258 Branch: Continue
+0:261 Post-Increment (temp 4-component vector of float)
+0:261 'color' (temp 4-component vector of float)
+0:262 Branch: Break
+0:266 Loop with condition tested first
+0:266 Loop Condition
+0:266 Compare Less Than (temp bool)
+0:266 direct index (temp float)
+0:266 'color' (temp 4-component vector of float)
+0:266 Constant:
+0:266 0 (const int)
+0:266 Constant:
+0:266 10.000000
+0:266 Loop Body
+0:267 Sequence
+0:267 add second child into first child (temp 4-component vector of float)
+0:267 'color' (temp 4-component vector of float)
+0:267 'bigColor8' (uniform 4-component vector of float)
+0:269 Test condition and select (temp void)
+0:269 Condition
+0:269 Compare Less Than (temp bool)
+0:269 direct index (temp float)
+0:269 'color' (temp 4-component vector of float)
+0:269 Constant:
+0:269 2 (const int)
+0:269 'd8' (uniform float)
+0:269 true case
+0:270 Test condition and select (temp void)
+0:270 Condition
+0:270 Compare Less Than (temp bool)
+0:270 direct index (temp float)
+0:270 'color' (temp 4-component vector of float)
+0:270 Constant:
+0:270 3 (const int)
+0:270 'd6' (uniform float)
+0:270 true case
+0:271 Branch: Continue
+0:273 add second child into first child (temp float)
+0:273 direct index (temp float)
+0:273 'color' (temp 4-component vector of float)
+0:273 Constant:
+0:273 1 (const int)
+0:273 direct index (temp float)
+0:273 'bigColor8' (uniform 4-component vector of float)
+0:273 Constant:
+0:273 0 (const int)
+0:276 Post-Increment (temp 4-component vector of float)
+0:276 'color' (temp 4-component vector of float)
+0:277 move second child to first child (temp 4-component vector of float)
+0:277 'gl_FragColor' (fragColor 4-component vector of float FragColor)
+0:277 'color' (temp 4-component vector of float)
+0:280 Loop with condition tested first
+0:280 Loop Condition
+0:280 Compare Less Than (temp bool)
+0:280 direct index (temp float)
+0:280 'color' (temp 4-component vector of float)
+0:280 Constant:
+0:280 0 (const int)
+0:280 'd14' (uniform float)
+0:280 Loop Body
+0:281 Sequence
+0:281 Test condition and select (temp void)
+0:281 Condition
+0:281 Compare Less Than (temp bool)
+0:281 direct index (temp float)
+0:281 'color' (temp 4-component vector of float)
+0:281 Constant:
+0:281 1 (const int)
+0:281 'd15' (uniform float)
+0:281 true case
+0:282 Sequence
+0:282 Branch: Return
+0:281 false case
+0:285 Post-Increment (temp 4-component vector of float)
+0:285 'color' (temp 4-component vector of float)
+0:288 Post-Increment (temp 4-component vector of float)
+0:288 'color' (temp 4-component vector of float)
+0:290 Loop with condition tested first
+0:290 Loop Condition
+0:290 Compare Less Than (temp bool)
+0:290 direct index (temp float)
+0:290 'color' (temp 4-component vector of float)
+0:290 Constant:
+0:290 3 (const int)
+0:290 'd16' (uniform float)
+0:290 Loop Body
+0:291 Sequence
+0:291 Post-Increment (temp float)
+0:291 direct index (temp float)
+0:291 'color' (temp 4-component vector of float)
+0:291 Constant:
+0:291 3 (const int)
+0:296 Loop with condition tested first
+0:296 Loop Condition
+0:296 logical-and (temp bool)
+0:296 Compare Less Than (temp bool)
+0:296 direct index (temp float)
+0:296 'color' (temp 4-component vector of float)
+0:296 Constant:
+0:296 3 (const int)
+0:296 'd2' (uniform float)
+0:296 Compare Less Than (temp bool)
+0:296 direct index (temp float)
+0:296 'color' (temp 4-component vector of float)
+0:296 Constant:
+0:296 1 (const int)
+0:296 'd3' (uniform float)
+0:296 Loop Body
+0:297 Sequence
+0:297 add second child into first child (temp 4-component vector of float)
+0:297 'color' (temp 4-component vector of float)
+0:297 'bigColor1_2' (uniform 4-component vector of float)
+0:298 Test condition and select (temp void)
+0:298 Condition
+0:298 Compare Less Than (temp bool)
+0:298 direct index (temp float)
+0:298 'color' (temp 4-component vector of float)
+0:298 Constant:
+0:298 2 (const int)
+0:298 'd3' (uniform float)
+0:298 true case
+0:299 Branch: Return
+0:307 Loop with condition not tested first
+0:307 Loop Condition
+0:307 Compare Less Than (temp bool)
+0:307 direct index (temp float)
+0:307 'color' (temp 4-component vector of float)
+0:307 Constant:
+0:307 0 (const int)
+0:307 'd17' (uniform float)
+0:307 Loop Body
+0:304 Sequence
+0:304 Test condition and select (temp void)
+0:304 Condition
+0:304 Compare Less Than (temp bool)
+0:304 direct index (temp float)
+0:304 'color' (temp 4-component vector of float)
+0:304 Constant:
+0:304 1 (const int)
+0:304 'd18' (uniform float)
+0:304 true case
+0:305 Branch: Return
+0:306 Post-Increment (temp 4-component vector of float)
+0:306 'color' (temp 4-component vector of float)
+0:310 Loop with condition tested first
+0:310 Loop Condition
+0:310 Compare Less Than (temp bool)
+0:310 direct index (temp float)
+0:310 'color' (temp 4-component vector of float)
+0:310 Constant:
+0:310 1 (const int)
+0:310 'd16' (uniform float)
+0:310 Loop Body
+0:311 Sequence
+0:311 Test condition and select (temp void)
+0:311 Condition
+0:311 Compare Less Than (temp bool)
+0:311 direct index (temp float)
+0:311 'color' (temp 4-component vector of float)
+0:311 Constant:
+0:311 3 (const int)
+0:311 'd16' (uniform float)
+0:311 true case
+0:312 Sequence
+0:312 Branch: Kill
+0:311 false case
+0:314 Post-Increment (temp 4-component vector of float)
+0:314 'color' (temp 4-component vector of float)
+0:317 Post-Increment (temp 4-component vector of float)
+0:317 'color' (temp 4-component vector of float)
+0:319 move second child to first child (temp 4-component vector of float)
+0:319 'gl_FragColor' (fragColor 4-component vector of float FragColor)
+0:319 'color' (temp 4-component vector of float)
+0:? Linker Objects
+0:? 'bigColor' (uniform 4-component vector of float)
+0:? 'bigColor1_1' (uniform 4-component vector of float)
+0:? 'bigColor1_2' (uniform 4-component vector of float)
+0:? 'bigColor1_3' (uniform 4-component vector of float)
+0:? 'bigColor2' (uniform 4-component vector of float)
+0:? 'bigColor3' (uniform 4-component vector of float)
+0:? 'bigColor4' (uniform 4-component vector of float)
+0:? 'bigColor5' (uniform 4-component vector of float)
+0:? 'bigColor6' (uniform 4-component vector of float)
+0:? 'bigColor7' (uniform 4-component vector of float)
+0:? 'bigColor8' (uniform 4-component vector of float)
+0:? 'BaseColor' (smooth in 4-component vector of float)
+0:? 'd' (uniform float)
+0:? 'd2' (uniform float)
+0:? 'd3' (uniform float)
+0:? 'd4' (uniform float)
+0:? 'd5' (uniform float)
+0:? 'd6' (uniform float)
+0:? 'd7' (uniform float)
+0:? 'd8' (uniform float)
+0:? 'd9' (uniform float)
+0:? 'd10' (uniform float)
+0:? 'd11' (uniform float)
+0:? 'd12' (uniform float)
+0:? 'd13' (uniform float)
+0:? 'd14' (uniform float)
+0:? 'd15' (uniform float)
+0:? 'd16' (uniform float)
+0:? 'd17' (uniform float)
+0:? 'd18' (uniform float)
+0:? 'd19' (uniform float)
+0:? 'd20' (uniform float)
+0:? 'd21' (uniform float)
+0:? 'd22' (uniform float)
+0:? 'd23' (uniform float)
+0:? 'd24' (uniform float)
+0:? 'd25' (uniform float)
+0:? 'd26' (uniform float)
+0:? 'd27' (uniform float)
+0:? 'd28' (uniform float)
+0:? 'd29' (uniform float)
+0:? 'd30' (uniform float)
+0:? 'd31' (uniform float)
+0:? 'd32' (uniform float)
+0:? 'd33' (uniform float)
+0:? 'd34' (uniform float)
+0:? 'Count' (uniform int)
+
diff --git a/chromium/third_party/glslang/src/Test/baseResults/loopsArtificial.frag.out b/chromium/third_party/glslang/src/Test/baseResults/loopsArtificial.frag.out
new file mode 100644
index 00000000000..39fae13d4dd
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/loopsArtificial.frag.out
@@ -0,0 +1,433 @@
+loopsArtificial.frag
+WARNING: 0:14: varying deprecated in version 130; may be removed in future release
+
+Shader version: 130
+0:? Sequence
+0:53 Function Definition: main( (global void)
+0:53 Function Parameters:
+0:55 Sequence
+0:55 Sequence
+0:55 move second child to first child (temp 4-component vector of float)
+0:55 'color' (temp 4-component vector of float)
+0:55 'BaseColor' (smooth in 4-component vector of float)
+0:71 Loop with condition not tested first
+0:71 Loop Condition
+0:71 Compare Less Than (temp bool)
+0:71 direct index (temp float)
+0:71 'color' (temp 4-component vector of float)
+0:71 Constant:
+0:71 2 (const int)
+0:71 'd4' (uniform float)
+0:71 Loop Body
+0:59 Sequence
+0:59 add second child into first child (temp 4-component vector of float)
+0:59 'color' (temp 4-component vector of float)
+0:59 'bigColor4' (uniform 4-component vector of float)
+0:60 Test condition and select (temp void)
+0:60 Condition
+0:60 Compare Less Than (temp bool)
+0:60 direct index (temp float)
+0:60 'color' (temp 4-component vector of float)
+0:60 Constant:
+0:60 0 (const int)
+0:60 'd4' (uniform float)
+0:60 true case
+0:61 Sequence
+0:61 add second child into first child (temp float)
+0:61 direct index (temp float)
+0:61 'color' (temp 4-component vector of float)
+0:61 Constant:
+0:61 2 (const int)
+0:61 Constant:
+0:61 2.000000
+0:62 Test condition and select (temp void)
+0:62 Condition
+0:62 Compare Less Than (temp bool)
+0:62 direct index (temp float)
+0:62 'color' (temp 4-component vector of float)
+0:62 Constant:
+0:62 2 (const int)
+0:62 'd4' (uniform float)
+0:62 true case
+0:63 Sequence
+0:63 Post-Increment (temp float)
+0:63 direct index (temp float)
+0:63 'color' (temp 4-component vector of float)
+0:63 Constant:
+0:63 0 (const int)
+0:64 Branch: Continue
+0:67 Test condition and select (temp void)
+0:67 Condition
+0:67 Compare Less Than (temp bool)
+0:67 direct index (temp float)
+0:67 'color' (temp 4-component vector of float)
+0:67 Constant:
+0:67 1 (const int)
+0:67 'd4' (uniform float)
+0:67 true case
+0:68 add second child into first child (temp float)
+0:68 direct index (temp float)
+0:68 'color' (temp 4-component vector of float)
+0:68 Constant:
+0:68 1 (const int)
+0:68 'd4' (uniform float)
+0:67 false case
+0:70 add second child into first child (temp float)
+0:70 direct index (temp float)
+0:70 'color' (temp 4-component vector of float)
+0:70 Constant:
+0:70 0 (const int)
+0:70 'd4' (uniform float)
+0:74 Loop with condition tested first
+0:74 Loop Condition
+0:74 Compare Less Than (temp bool)
+0:74 direct index (temp float)
+0:74 'color' (temp 4-component vector of float)
+0:74 Constant:
+0:74 3 (const int)
+0:74 'd13' (uniform float)
+0:74 Loop Body
+0:75 Sequence
+0:75 Test condition and select (temp void)
+0:75 Condition
+0:75 Compare Less Than (temp bool)
+0:75 direct index (temp float)
+0:75 'color' (temp 4-component vector of float)
+0:75 Constant:
+0:75 2 (const int)
+0:75 'd13' (uniform float)
+0:75 true case
+0:76 Post-Increment (temp 4-component vector of float)
+0:76 'color' (temp 4-component vector of float)
+0:75 false case
+0:78 Post-Decrement (temp 4-component vector of float)
+0:78 'color' (temp 4-component vector of float)
+0:80 add second child into first child (temp 4-component vector of float)
+0:80 'color' (temp 4-component vector of float)
+0:80 'bigColor4' (uniform 4-component vector of float)
+0:81 Test condition and select (temp void)
+0:81 Condition
+0:81 Compare Less Than (temp bool)
+0:81 direct index (temp float)
+0:81 'color' (temp 4-component vector of float)
+0:81 Constant:
+0:81 0 (const int)
+0:81 'd4' (uniform float)
+0:81 true case
+0:82 Sequence
+0:82 add second child into first child (temp float)
+0:82 direct index (temp float)
+0:82 'color' (temp 4-component vector of float)
+0:82 Constant:
+0:82 2 (const int)
+0:82 Constant:
+0:82 2.000000
+0:83 Test condition and select (temp void)
+0:83 Condition
+0:83 Compare Less Than (temp bool)
+0:83 direct index (temp float)
+0:83 'color' (temp 4-component vector of float)
+0:83 Constant:
+0:83 2 (const int)
+0:83 'd4' (uniform float)
+0:83 true case
+0:84 Sequence
+0:84 Post-Increment (temp float)
+0:84 direct index (temp float)
+0:84 'color' (temp 4-component vector of float)
+0:84 Constant:
+0:84 0 (const int)
+0:85 Branch: Continue
+0:88 Test condition and select (temp void)
+0:88 Condition
+0:88 Compare Less Than (temp bool)
+0:88 direct index (temp float)
+0:88 'color' (temp 4-component vector of float)
+0:88 Constant:
+0:88 1 (const int)
+0:88 'd4' (uniform float)
+0:88 true case
+0:89 add second child into first child (temp float)
+0:89 direct index (temp float)
+0:89 'color' (temp 4-component vector of float)
+0:89 Constant:
+0:89 1 (const int)
+0:89 'd4' (uniform float)
+0:88 false case
+0:91 add second child into first child (temp float)
+0:91 direct index (temp float)
+0:91 'color' (temp 4-component vector of float)
+0:91 Constant:
+0:91 0 (const int)
+0:91 'd4' (uniform float)
+0:94 Post-Increment (temp 4-component vector of float)
+0:94 'color' (temp 4-component vector of float)
+0:95 move second child to first child (temp 4-component vector of float)
+0:95 'gl_FragColor' (fragColor 4-component vector of float FragColor)
+0:95 'color' (temp 4-component vector of float)
+0:? Linker Objects
+0:? 'bigColor' (uniform 4-component vector of float)
+0:? 'bigColor1_1' (uniform 4-component vector of float)
+0:? 'bigColor1_2' (uniform 4-component vector of float)
+0:? 'bigColor1_3' (uniform 4-component vector of float)
+0:? 'bigColor2' (uniform 4-component vector of float)
+0:? 'bigColor3' (uniform 4-component vector of float)
+0:? 'bigColor4' (uniform 4-component vector of float)
+0:? 'bigColor5' (uniform 4-component vector of float)
+0:? 'bigColor6' (uniform 4-component vector of float)
+0:? 'bigColor7' (uniform 4-component vector of float)
+0:? 'bigColor8' (uniform 4-component vector of float)
+0:? 'BaseColor' (smooth in 4-component vector of float)
+0:? 'd' (uniform float)
+0:? 'd2' (uniform float)
+0:? 'd3' (uniform float)
+0:? 'd4' (uniform float)
+0:? 'd5' (uniform float)
+0:? 'd6' (uniform float)
+0:? 'd7' (uniform float)
+0:? 'd8' (uniform float)
+0:? 'd9' (uniform float)
+0:? 'd10' (uniform float)
+0:? 'd11' (uniform float)
+0:? 'd12' (uniform float)
+0:? 'd13' (uniform float)
+0:? 'd14' (uniform float)
+0:? 'd15' (uniform float)
+0:? 'd16' (uniform float)
+0:? 'd17' (uniform float)
+0:? 'd18' (uniform float)
+0:? 'd19' (uniform float)
+0:? 'd20' (uniform float)
+0:? 'd21' (uniform float)
+0:? 'd22' (uniform float)
+0:? 'd23' (uniform float)
+0:? 'd24' (uniform float)
+0:? 'd25' (uniform float)
+0:? 'd26' (uniform float)
+0:? 'd27' (uniform float)
+0:? 'd28' (uniform float)
+0:? 'd29' (uniform float)
+0:? 'd30' (uniform float)
+0:? 'd31' (uniform float)
+0:? 'd32' (uniform float)
+0:? 'd33' (uniform float)
+0:? 'd34' (uniform float)
+0:? 'Count' (uniform int)
+
+
+Linked fragment stage:
+
+
+Shader version: 130
+0:? Sequence
+0:53 Function Definition: main( (global void)
+0:53 Function Parameters:
+0:55 Sequence
+0:55 Sequence
+0:55 move second child to first child (temp 4-component vector of float)
+0:55 'color' (temp 4-component vector of float)
+0:55 'BaseColor' (smooth in 4-component vector of float)
+0:71 Loop with condition not tested first
+0:71 Loop Condition
+0:71 Compare Less Than (temp bool)
+0:71 direct index (temp float)
+0:71 'color' (temp 4-component vector of float)
+0:71 Constant:
+0:71 2 (const int)
+0:71 'd4' (uniform float)
+0:71 Loop Body
+0:59 Sequence
+0:59 add second child into first child (temp 4-component vector of float)
+0:59 'color' (temp 4-component vector of float)
+0:59 'bigColor4' (uniform 4-component vector of float)
+0:60 Test condition and select (temp void)
+0:60 Condition
+0:60 Compare Less Than (temp bool)
+0:60 direct index (temp float)
+0:60 'color' (temp 4-component vector of float)
+0:60 Constant:
+0:60 0 (const int)
+0:60 'd4' (uniform float)
+0:60 true case
+0:61 Sequence
+0:61 add second child into first child (temp float)
+0:61 direct index (temp float)
+0:61 'color' (temp 4-component vector of float)
+0:61 Constant:
+0:61 2 (const int)
+0:61 Constant:
+0:61 2.000000
+0:62 Test condition and select (temp void)
+0:62 Condition
+0:62 Compare Less Than (temp bool)
+0:62 direct index (temp float)
+0:62 'color' (temp 4-component vector of float)
+0:62 Constant:
+0:62 2 (const int)
+0:62 'd4' (uniform float)
+0:62 true case
+0:63 Sequence
+0:63 Post-Increment (temp float)
+0:63 direct index (temp float)
+0:63 'color' (temp 4-component vector of float)
+0:63 Constant:
+0:63 0 (const int)
+0:64 Branch: Continue
+0:67 Test condition and select (temp void)
+0:67 Condition
+0:67 Compare Less Than (temp bool)
+0:67 direct index (temp float)
+0:67 'color' (temp 4-component vector of float)
+0:67 Constant:
+0:67 1 (const int)
+0:67 'd4' (uniform float)
+0:67 true case
+0:68 add second child into first child (temp float)
+0:68 direct index (temp float)
+0:68 'color' (temp 4-component vector of float)
+0:68 Constant:
+0:68 1 (const int)
+0:68 'd4' (uniform float)
+0:67 false case
+0:70 add second child into first child (temp float)
+0:70 direct index (temp float)
+0:70 'color' (temp 4-component vector of float)
+0:70 Constant:
+0:70 0 (const int)
+0:70 'd4' (uniform float)
+0:74 Loop with condition tested first
+0:74 Loop Condition
+0:74 Compare Less Than (temp bool)
+0:74 direct index (temp float)
+0:74 'color' (temp 4-component vector of float)
+0:74 Constant:
+0:74 3 (const int)
+0:74 'd13' (uniform float)
+0:74 Loop Body
+0:75 Sequence
+0:75 Test condition and select (temp void)
+0:75 Condition
+0:75 Compare Less Than (temp bool)
+0:75 direct index (temp float)
+0:75 'color' (temp 4-component vector of float)
+0:75 Constant:
+0:75 2 (const int)
+0:75 'd13' (uniform float)
+0:75 true case
+0:76 Post-Increment (temp 4-component vector of float)
+0:76 'color' (temp 4-component vector of float)
+0:75 false case
+0:78 Post-Decrement (temp 4-component vector of float)
+0:78 'color' (temp 4-component vector of float)
+0:80 add second child into first child (temp 4-component vector of float)
+0:80 'color' (temp 4-component vector of float)
+0:80 'bigColor4' (uniform 4-component vector of float)
+0:81 Test condition and select (temp void)
+0:81 Condition
+0:81 Compare Less Than (temp bool)
+0:81 direct index (temp float)
+0:81 'color' (temp 4-component vector of float)
+0:81 Constant:
+0:81 0 (const int)
+0:81 'd4' (uniform float)
+0:81 true case
+0:82 Sequence
+0:82 add second child into first child (temp float)
+0:82 direct index (temp float)
+0:82 'color' (temp 4-component vector of float)
+0:82 Constant:
+0:82 2 (const int)
+0:82 Constant:
+0:82 2.000000
+0:83 Test condition and select (temp void)
+0:83 Condition
+0:83 Compare Less Than (temp bool)
+0:83 direct index (temp float)
+0:83 'color' (temp 4-component vector of float)
+0:83 Constant:
+0:83 2 (const int)
+0:83 'd4' (uniform float)
+0:83 true case
+0:84 Sequence
+0:84 Post-Increment (temp float)
+0:84 direct index (temp float)
+0:84 'color' (temp 4-component vector of float)
+0:84 Constant:
+0:84 0 (const int)
+0:85 Branch: Continue
+0:88 Test condition and select (temp void)
+0:88 Condition
+0:88 Compare Less Than (temp bool)
+0:88 direct index (temp float)
+0:88 'color' (temp 4-component vector of float)
+0:88 Constant:
+0:88 1 (const int)
+0:88 'd4' (uniform float)
+0:88 true case
+0:89 add second child into first child (temp float)
+0:89 direct index (temp float)
+0:89 'color' (temp 4-component vector of float)
+0:89 Constant:
+0:89 1 (const int)
+0:89 'd4' (uniform float)
+0:88 false case
+0:91 add second child into first child (temp float)
+0:91 direct index (temp float)
+0:91 'color' (temp 4-component vector of float)
+0:91 Constant:
+0:91 0 (const int)
+0:91 'd4' (uniform float)
+0:94 Post-Increment (temp 4-component vector of float)
+0:94 'color' (temp 4-component vector of float)
+0:95 move second child to first child (temp 4-component vector of float)
+0:95 'gl_FragColor' (fragColor 4-component vector of float FragColor)
+0:95 'color' (temp 4-component vector of float)
+0:? Linker Objects
+0:? 'bigColor' (uniform 4-component vector of float)
+0:? 'bigColor1_1' (uniform 4-component vector of float)
+0:? 'bigColor1_2' (uniform 4-component vector of float)
+0:? 'bigColor1_3' (uniform 4-component vector of float)
+0:? 'bigColor2' (uniform 4-component vector of float)
+0:? 'bigColor3' (uniform 4-component vector of float)
+0:? 'bigColor4' (uniform 4-component vector of float)
+0:? 'bigColor5' (uniform 4-component vector of float)
+0:? 'bigColor6' (uniform 4-component vector of float)
+0:? 'bigColor7' (uniform 4-component vector of float)
+0:? 'bigColor8' (uniform 4-component vector of float)
+0:? 'BaseColor' (smooth in 4-component vector of float)
+0:? 'd' (uniform float)
+0:? 'd2' (uniform float)
+0:? 'd3' (uniform float)
+0:? 'd4' (uniform float)
+0:? 'd5' (uniform float)
+0:? 'd6' (uniform float)
+0:? 'd7' (uniform float)
+0:? 'd8' (uniform float)
+0:? 'd9' (uniform float)
+0:? 'd10' (uniform float)
+0:? 'd11' (uniform float)
+0:? 'd12' (uniform float)
+0:? 'd13' (uniform float)
+0:? 'd14' (uniform float)
+0:? 'd15' (uniform float)
+0:? 'd16' (uniform float)
+0:? 'd17' (uniform float)
+0:? 'd18' (uniform float)
+0:? 'd19' (uniform float)
+0:? 'd20' (uniform float)
+0:? 'd21' (uniform float)
+0:? 'd22' (uniform float)
+0:? 'd23' (uniform float)
+0:? 'd24' (uniform float)
+0:? 'd25' (uniform float)
+0:? 'd26' (uniform float)
+0:? 'd27' (uniform float)
+0:? 'd28' (uniform float)
+0:? 'd29' (uniform float)
+0:? 'd30' (uniform float)
+0:? 'd31' (uniform float)
+0:? 'd32' (uniform float)
+0:? 'd33' (uniform float)
+0:? 'd34' (uniform float)
+0:? 'Count' (uniform int)
+
diff --git a/chromium/third_party/glslang/src/Test/baseResults/mains1.frag.out b/chromium/third_party/glslang/src/Test/baseResults/mains1.frag.out
new file mode 100644
index 00000000000..8ba02bf1efb
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/mains1.frag.out
@@ -0,0 +1,72 @@
+mains1.frag
+Shader version: 110
+0:? Sequence
+0:3 Function Definition: main( (global void)
+0:3 Function Parameters:
+0:? Linker Objects
+
+mains2.frag
+Shader version: 110
+0:? Sequence
+0:3 Function Definition: main( (global void)
+0:3 Function Parameters:
+0:? Linker Objects
+
+noMain1.geom
+ERROR: #version: geometry shaders require es profile with version 310 or non-es profile with version 150 or above
+ERROR: 1 compilation errors. No code generated.
+
+
+Shader version: 150
+invocations = -1
+max_vertices = -1
+input primitive = none
+output primitive = points
+ERROR: node is still EOpNull!
+0:3 Function Definition: foo( (global void)
+0:3 Function Parameters:
+0:? Linker Objects
+
+noMain2.geom
+Shader version: 150
+invocations = -1
+max_vertices = -1
+input primitive = none
+output primitive = line_strip
+0:? Sequence
+0:3 Function Definition: bar( (global void)
+0:3 Function Parameters:
+0:? Linker Objects
+
+
+Linked geometry stage:
+
+ERROR: Linking geometry stage: Contradictory output layout primitives
+ERROR: Linking geometry stage: Missing entry point: Each stage requires one "void main()" entry point
+ERROR: Linking geometry stage: At least one shader must specify an input layout primitive
+ERROR: Linking geometry stage: At least one shader must specify a layout(max_vertices = value)
+
+Linked fragment stage:
+
+ERROR: Linking fragment stage: Multiple function bodies in multiple compilation units for the same signature in the same stage:
+ main(
+
+Shader version: 150
+invocations = 1
+max_vertices = -1
+input primitive = none
+output primitive = points
+ERROR: node is still EOpNull!
+0:3 Function Definition: foo( (global void)
+0:3 Function Parameters:
+0:3 Function Definition: bar( (global void)
+0:3 Function Parameters:
+0:? Linker Objects
+Shader version: 110
+0:? Sequence
+0:3 Function Definition: main( (global void)
+0:3 Function Parameters:
+0:3 Function Definition: main( (global void)
+0:3 Function Parameters:
+0:? Linker Objects
+
diff --git a/chromium/third_party/glslang/src/Test/baseResults/matrix.frag.out b/chromium/third_party/glslang/src/Test/baseResults/matrix.frag.out
new file mode 100644
index 00000000000..14c3548b14c
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/matrix.frag.out
@@ -0,0 +1,507 @@
+matrix.frag
+WARNING: 0:6: varying deprecated in version 130; may be removed in future release
+WARNING: 0:17: varying deprecated in version 130; may be removed in future release
+WARNING: 0:22: varying deprecated in version 130; may be removed in future release
+
+Shader version: 130
+0:? Sequence
+0:25 Function Definition: main( (global void)
+0:25 Function Parameters:
+0:27 Sequence
+0:27 move second child to first child (temp 4-component vector of float)
+0:27 'gl_FragColor' (fragColor 4-component vector of float FragColor)
+0:27 Construct vec4 (temp 4-component vector of float)
+0:27 direct index (temp 4-component vector of float)
+0:27 'un34' (uniform 4X4 matrix of float)
+0:27 Constant:
+0:27 1 (const int)
+0:28 add second child into first child (temp 4-component vector of float)
+0:28 'gl_FragColor' (fragColor 4-component vector of float FragColor)
+0:28 Construct vec4 (temp 4-component vector of float)
+0:28 vector-times-matrix (temp 3-component vector of float)
+0:28 'Color' (smooth in 3-component vector of float)
+0:28 'colorTransform' (uniform 3X3 matrix of float)
+0:28 Constant:
+0:28 1.000000
+0:30 Test condition and select (temp void)
+0:30 Condition
+0:30 Compare Not Equal (temp bool)
+0:30 'm' (uniform 4X4 matrix of float)
+0:30 'n' (uniform 4X4 matrix of float)
+0:30 true case
+0:31 add second child into first child (temp 4-component vector of float)
+0:31 'gl_FragColor' (fragColor 4-component vector of float FragColor)
+0:31 'v' (smooth in 4-component vector of float)
+0:30 false case
+0:33 Sequence
+0:33 add second child into first child (temp 4-component vector of float)
+0:33 'gl_FragColor' (fragColor 4-component vector of float FragColor)
+0:33 matrix-times-vector (temp 4-component vector of float)
+0:33 'm' (uniform 4X4 matrix of float)
+0:33 'v' (smooth in 4-component vector of float)
+0:34 add second child into first child (temp 4-component vector of float)
+0:34 'gl_FragColor' (fragColor 4-component vector of float FragColor)
+0:34 vector-times-matrix (temp 4-component vector of float)
+0:34 'v' (smooth in 4-component vector of float)
+0:34 subtract (temp 4X4 matrix of float)
+0:34 'm' (uniform 4X4 matrix of float)
+0:34 'n' (uniform 4X4 matrix of float)
+0:42 Sequence
+0:42 move second child to first child (temp 4X4 matrix of float)
+0:42 'm34' (temp 4X4 matrix of float)
+0:45 Construct mat4 (temp 4X4 matrix of float)
+0:42 component-wise multiply (temp float)
+0:42 direct index (temp float)
+0:42 'v' (smooth in 4-component vector of float)
+0:42 Constant:
+0:42 0 (const int)
+0:42 direct index (temp float)
+0:42 'u' (smooth in 4-component vector of float)
+0:42 Constant:
+0:42 0 (const int)
+0:42 component-wise multiply (temp float)
+0:42 direct index (temp float)
+0:42 'v' (smooth in 4-component vector of float)
+0:42 Constant:
+0:42 0 (const int)
+0:42 direct index (temp float)
+0:42 'u' (smooth in 4-component vector of float)
+0:42 Constant:
+0:42 1 (const int)
+0:42 component-wise multiply (temp float)
+0:42 direct index (temp float)
+0:42 'v' (smooth in 4-component vector of float)
+0:42 Constant:
+0:42 0 (const int)
+0:42 direct index (temp float)
+0:42 'u' (smooth in 4-component vector of float)
+0:42 Constant:
+0:42 2 (const int)
+0:42 component-wise multiply (temp float)
+0:42 direct index (temp float)
+0:42 'v' (smooth in 4-component vector of float)
+0:42 Constant:
+0:42 0 (const int)
+0:42 direct index (temp float)
+0:42 'u' (smooth in 4-component vector of float)
+0:42 Constant:
+0:42 3 (const int)
+0:43 component-wise multiply (temp float)
+0:43 direct index (temp float)
+0:43 'v' (smooth in 4-component vector of float)
+0:43 Constant:
+0:43 1 (const int)
+0:43 direct index (temp float)
+0:43 'u' (smooth in 4-component vector of float)
+0:43 Constant:
+0:43 0 (const int)
+0:43 component-wise multiply (temp float)
+0:43 direct index (temp float)
+0:43 'v' (smooth in 4-component vector of float)
+0:43 Constant:
+0:43 1 (const int)
+0:43 direct index (temp float)
+0:43 'u' (smooth in 4-component vector of float)
+0:43 Constant:
+0:43 1 (const int)
+0:43 component-wise multiply (temp float)
+0:43 direct index (temp float)
+0:43 'v' (smooth in 4-component vector of float)
+0:43 Constant:
+0:43 1 (const int)
+0:43 direct index (temp float)
+0:43 'u' (smooth in 4-component vector of float)
+0:43 Constant:
+0:43 2 (const int)
+0:43 component-wise multiply (temp float)
+0:43 direct index (temp float)
+0:43 'v' (smooth in 4-component vector of float)
+0:43 Constant:
+0:43 1 (const int)
+0:43 direct index (temp float)
+0:43 'u' (smooth in 4-component vector of float)
+0:43 Constant:
+0:43 3 (const int)
+0:44 component-wise multiply (temp float)
+0:44 direct index (temp float)
+0:44 'v' (smooth in 4-component vector of float)
+0:44 Constant:
+0:44 2 (const int)
+0:44 direct index (temp float)
+0:44 'u' (smooth in 4-component vector of float)
+0:44 Constant:
+0:44 0 (const int)
+0:44 component-wise multiply (temp float)
+0:44 direct index (temp float)
+0:44 'v' (smooth in 4-component vector of float)
+0:44 Constant:
+0:44 2 (const int)
+0:44 direct index (temp float)
+0:44 'u' (smooth in 4-component vector of float)
+0:44 Constant:
+0:44 1 (const int)
+0:44 component-wise multiply (temp float)
+0:44 direct index (temp float)
+0:44 'v' (smooth in 4-component vector of float)
+0:44 Constant:
+0:44 2 (const int)
+0:44 direct index (temp float)
+0:44 'u' (smooth in 4-component vector of float)
+0:44 Constant:
+0:44 2 (const int)
+0:44 component-wise multiply (temp float)
+0:44 direct index (temp float)
+0:44 'v' (smooth in 4-component vector of float)
+0:44 Constant:
+0:44 2 (const int)
+0:44 direct index (temp float)
+0:44 'u' (smooth in 4-component vector of float)
+0:44 Constant:
+0:44 3 (const int)
+0:45 component-wise multiply (temp float)
+0:45 direct index (temp float)
+0:45 'v' (smooth in 4-component vector of float)
+0:45 Constant:
+0:45 3 (const int)
+0:45 direct index (temp float)
+0:45 'u' (smooth in 4-component vector of float)
+0:45 Constant:
+0:45 0 (const int)
+0:45 component-wise multiply (temp float)
+0:45 direct index (temp float)
+0:45 'v' (smooth in 4-component vector of float)
+0:45 Constant:
+0:45 3 (const int)
+0:45 direct index (temp float)
+0:45 'u' (smooth in 4-component vector of float)
+0:45 Constant:
+0:45 1 (const int)
+0:45 component-wise multiply (temp float)
+0:45 direct index (temp float)
+0:45 'v' (smooth in 4-component vector of float)
+0:45 Constant:
+0:45 3 (const int)
+0:45 direct index (temp float)
+0:45 'u' (smooth in 4-component vector of float)
+0:45 Constant:
+0:45 2 (const int)
+0:45 component-wise multiply (temp float)
+0:45 direct index (temp float)
+0:45 'v' (smooth in 4-component vector of float)
+0:45 Constant:
+0:45 3 (const int)
+0:45 direct index (temp float)
+0:45 'u' (smooth in 4-component vector of float)
+0:45 Constant:
+0:45 3 (const int)
+0:46 add second child into first child (temp 4X4 matrix of float)
+0:46 'm34' (temp 4X4 matrix of float)
+0:46 Construct mat4 (temp 4X4 matrix of float)
+0:46 direct index (temp float)
+0:46 'v' (smooth in 4-component vector of float)
+0:46 Constant:
+0:46 0 (const int)
+0:47 add second child into first child (temp 4X4 matrix of float)
+0:47 'm34' (temp 4X4 matrix of float)
+0:47 Construct mat4 (temp 4X4 matrix of float)
+0:47 'u' (smooth in 4-component vector of float)
+0:47 direct index (temp float)
+0:47 'u' (smooth in 4-component vector of float)
+0:47 Constant:
+0:47 0 (const int)
+0:47 'u' (smooth in 4-component vector of float)
+0:47 direct index (temp float)
+0:47 'u' (smooth in 4-component vector of float)
+0:47 Constant:
+0:47 0 (const int)
+0:47 'u' (smooth in 4-component vector of float)
+0:47 direct index (temp float)
+0:47 'u' (smooth in 4-component vector of float)
+0:47 Constant:
+0:47 0 (const int)
+0:47 direct index (temp float)
+0:47 'u' (smooth in 4-component vector of float)
+0:47 Constant:
+0:47 0 (const int)
+0:51 Test condition and select (temp void)
+0:51 Condition
+0:51 Compare Equal (temp bool)
+0:51 'm34' (temp 4X4 matrix of float)
+0:51 'un34' (uniform 4X4 matrix of float)
+0:51 true case
+0:52 add second child into first child (temp 4-component vector of float)
+0:52 'gl_FragColor' (fragColor 4-component vector of float FragColor)
+0:52 matrix-times-vector (temp 4-component vector of float)
+0:52 'm34' (temp 4X4 matrix of float)
+0:52 'u' (smooth in 4-component vector of float)
+0:51 false case
+0:54 add second child into first child (temp 4-component vector of float)
+0:54 'gl_FragColor' (fragColor 4-component vector of float FragColor)
+0:54 matrix-times-vector (temp 4-component vector of float)
+0:54 matrix-multiply (temp 4X4 matrix of float)
+0:54 'un34' (uniform 4X4 matrix of float)
+0:54 'um43' (uniform 4X4 matrix of float)
+0:54 'v' (smooth in 4-component vector of float)
+0:? Linker Objects
+0:? 'colorTransform' (uniform 3X3 matrix of float)
+0:? 'Color' (smooth in 3-component vector of float)
+0:? 'm' (uniform 4X4 matrix of float)
+0:? 'n' (uniform 4X4 matrix of float)
+0:? 'um43' (uniform 4X4 matrix of float)
+0:? 'un34' (uniform 4X4 matrix of float)
+0:? 'v' (smooth in 4-component vector of float)
+0:? 'u' (smooth in 4-component vector of float)
+
+
+Linked fragment stage:
+
+
+Shader version: 130
+0:? Sequence
+0:25 Function Definition: main( (global void)
+0:25 Function Parameters:
+0:27 Sequence
+0:27 move second child to first child (temp 4-component vector of float)
+0:27 'gl_FragColor' (fragColor 4-component vector of float FragColor)
+0:27 Construct vec4 (temp 4-component vector of float)
+0:27 direct index (temp 4-component vector of float)
+0:27 'un34' (uniform 4X4 matrix of float)
+0:27 Constant:
+0:27 1 (const int)
+0:28 add second child into first child (temp 4-component vector of float)
+0:28 'gl_FragColor' (fragColor 4-component vector of float FragColor)
+0:28 Construct vec4 (temp 4-component vector of float)
+0:28 vector-times-matrix (temp 3-component vector of float)
+0:28 'Color' (smooth in 3-component vector of float)
+0:28 'colorTransform' (uniform 3X3 matrix of float)
+0:28 Constant:
+0:28 1.000000
+0:30 Test condition and select (temp void)
+0:30 Condition
+0:30 Compare Not Equal (temp bool)
+0:30 'm' (uniform 4X4 matrix of float)
+0:30 'n' (uniform 4X4 matrix of float)
+0:30 true case
+0:31 add second child into first child (temp 4-component vector of float)
+0:31 'gl_FragColor' (fragColor 4-component vector of float FragColor)
+0:31 'v' (smooth in 4-component vector of float)
+0:30 false case
+0:33 Sequence
+0:33 add second child into first child (temp 4-component vector of float)
+0:33 'gl_FragColor' (fragColor 4-component vector of float FragColor)
+0:33 matrix-times-vector (temp 4-component vector of float)
+0:33 'm' (uniform 4X4 matrix of float)
+0:33 'v' (smooth in 4-component vector of float)
+0:34 add second child into first child (temp 4-component vector of float)
+0:34 'gl_FragColor' (fragColor 4-component vector of float FragColor)
+0:34 vector-times-matrix (temp 4-component vector of float)
+0:34 'v' (smooth in 4-component vector of float)
+0:34 subtract (temp 4X4 matrix of float)
+0:34 'm' (uniform 4X4 matrix of float)
+0:34 'n' (uniform 4X4 matrix of float)
+0:42 Sequence
+0:42 move second child to first child (temp 4X4 matrix of float)
+0:42 'm34' (temp 4X4 matrix of float)
+0:45 Construct mat4 (temp 4X4 matrix of float)
+0:42 component-wise multiply (temp float)
+0:42 direct index (temp float)
+0:42 'v' (smooth in 4-component vector of float)
+0:42 Constant:
+0:42 0 (const int)
+0:42 direct index (temp float)
+0:42 'u' (smooth in 4-component vector of float)
+0:42 Constant:
+0:42 0 (const int)
+0:42 component-wise multiply (temp float)
+0:42 direct index (temp float)
+0:42 'v' (smooth in 4-component vector of float)
+0:42 Constant:
+0:42 0 (const int)
+0:42 direct index (temp float)
+0:42 'u' (smooth in 4-component vector of float)
+0:42 Constant:
+0:42 1 (const int)
+0:42 component-wise multiply (temp float)
+0:42 direct index (temp float)
+0:42 'v' (smooth in 4-component vector of float)
+0:42 Constant:
+0:42 0 (const int)
+0:42 direct index (temp float)
+0:42 'u' (smooth in 4-component vector of float)
+0:42 Constant:
+0:42 2 (const int)
+0:42 component-wise multiply (temp float)
+0:42 direct index (temp float)
+0:42 'v' (smooth in 4-component vector of float)
+0:42 Constant:
+0:42 0 (const int)
+0:42 direct index (temp float)
+0:42 'u' (smooth in 4-component vector of float)
+0:42 Constant:
+0:42 3 (const int)
+0:43 component-wise multiply (temp float)
+0:43 direct index (temp float)
+0:43 'v' (smooth in 4-component vector of float)
+0:43 Constant:
+0:43 1 (const int)
+0:43 direct index (temp float)
+0:43 'u' (smooth in 4-component vector of float)
+0:43 Constant:
+0:43 0 (const int)
+0:43 component-wise multiply (temp float)
+0:43 direct index (temp float)
+0:43 'v' (smooth in 4-component vector of float)
+0:43 Constant:
+0:43 1 (const int)
+0:43 direct index (temp float)
+0:43 'u' (smooth in 4-component vector of float)
+0:43 Constant:
+0:43 1 (const int)
+0:43 component-wise multiply (temp float)
+0:43 direct index (temp float)
+0:43 'v' (smooth in 4-component vector of float)
+0:43 Constant:
+0:43 1 (const int)
+0:43 direct index (temp float)
+0:43 'u' (smooth in 4-component vector of float)
+0:43 Constant:
+0:43 2 (const int)
+0:43 component-wise multiply (temp float)
+0:43 direct index (temp float)
+0:43 'v' (smooth in 4-component vector of float)
+0:43 Constant:
+0:43 1 (const int)
+0:43 direct index (temp float)
+0:43 'u' (smooth in 4-component vector of float)
+0:43 Constant:
+0:43 3 (const int)
+0:44 component-wise multiply (temp float)
+0:44 direct index (temp float)
+0:44 'v' (smooth in 4-component vector of float)
+0:44 Constant:
+0:44 2 (const int)
+0:44 direct index (temp float)
+0:44 'u' (smooth in 4-component vector of float)
+0:44 Constant:
+0:44 0 (const int)
+0:44 component-wise multiply (temp float)
+0:44 direct index (temp float)
+0:44 'v' (smooth in 4-component vector of float)
+0:44 Constant:
+0:44 2 (const int)
+0:44 direct index (temp float)
+0:44 'u' (smooth in 4-component vector of float)
+0:44 Constant:
+0:44 1 (const int)
+0:44 component-wise multiply (temp float)
+0:44 direct index (temp float)
+0:44 'v' (smooth in 4-component vector of float)
+0:44 Constant:
+0:44 2 (const int)
+0:44 direct index (temp float)
+0:44 'u' (smooth in 4-component vector of float)
+0:44 Constant:
+0:44 2 (const int)
+0:44 component-wise multiply (temp float)
+0:44 direct index (temp float)
+0:44 'v' (smooth in 4-component vector of float)
+0:44 Constant:
+0:44 2 (const int)
+0:44 direct index (temp float)
+0:44 'u' (smooth in 4-component vector of float)
+0:44 Constant:
+0:44 3 (const int)
+0:45 component-wise multiply (temp float)
+0:45 direct index (temp float)
+0:45 'v' (smooth in 4-component vector of float)
+0:45 Constant:
+0:45 3 (const int)
+0:45 direct index (temp float)
+0:45 'u' (smooth in 4-component vector of float)
+0:45 Constant:
+0:45 0 (const int)
+0:45 component-wise multiply (temp float)
+0:45 direct index (temp float)
+0:45 'v' (smooth in 4-component vector of float)
+0:45 Constant:
+0:45 3 (const int)
+0:45 direct index (temp float)
+0:45 'u' (smooth in 4-component vector of float)
+0:45 Constant:
+0:45 1 (const int)
+0:45 component-wise multiply (temp float)
+0:45 direct index (temp float)
+0:45 'v' (smooth in 4-component vector of float)
+0:45 Constant:
+0:45 3 (const int)
+0:45 direct index (temp float)
+0:45 'u' (smooth in 4-component vector of float)
+0:45 Constant:
+0:45 2 (const int)
+0:45 component-wise multiply (temp float)
+0:45 direct index (temp float)
+0:45 'v' (smooth in 4-component vector of float)
+0:45 Constant:
+0:45 3 (const int)
+0:45 direct index (temp float)
+0:45 'u' (smooth in 4-component vector of float)
+0:45 Constant:
+0:45 3 (const int)
+0:46 add second child into first child (temp 4X4 matrix of float)
+0:46 'm34' (temp 4X4 matrix of float)
+0:46 Construct mat4 (temp 4X4 matrix of float)
+0:46 direct index (temp float)
+0:46 'v' (smooth in 4-component vector of float)
+0:46 Constant:
+0:46 0 (const int)
+0:47 add second child into first child (temp 4X4 matrix of float)
+0:47 'm34' (temp 4X4 matrix of float)
+0:47 Construct mat4 (temp 4X4 matrix of float)
+0:47 'u' (smooth in 4-component vector of float)
+0:47 direct index (temp float)
+0:47 'u' (smooth in 4-component vector of float)
+0:47 Constant:
+0:47 0 (const int)
+0:47 'u' (smooth in 4-component vector of float)
+0:47 direct index (temp float)
+0:47 'u' (smooth in 4-component vector of float)
+0:47 Constant:
+0:47 0 (const int)
+0:47 'u' (smooth in 4-component vector of float)
+0:47 direct index (temp float)
+0:47 'u' (smooth in 4-component vector of float)
+0:47 Constant:
+0:47 0 (const int)
+0:47 direct index (temp float)
+0:47 'u' (smooth in 4-component vector of float)
+0:47 Constant:
+0:47 0 (const int)
+0:51 Test condition and select (temp void)
+0:51 Condition
+0:51 Compare Equal (temp bool)
+0:51 'm34' (temp 4X4 matrix of float)
+0:51 'un34' (uniform 4X4 matrix of float)
+0:51 true case
+0:52 add second child into first child (temp 4-component vector of float)
+0:52 'gl_FragColor' (fragColor 4-component vector of float FragColor)
+0:52 matrix-times-vector (temp 4-component vector of float)
+0:52 'm34' (temp 4X4 matrix of float)
+0:52 'u' (smooth in 4-component vector of float)
+0:51 false case
+0:54 add second child into first child (temp 4-component vector of float)
+0:54 'gl_FragColor' (fragColor 4-component vector of float FragColor)
+0:54 matrix-times-vector (temp 4-component vector of float)
+0:54 matrix-multiply (temp 4X4 matrix of float)
+0:54 'un34' (uniform 4X4 matrix of float)
+0:54 'um43' (uniform 4X4 matrix of float)
+0:54 'v' (smooth in 4-component vector of float)
+0:? Linker Objects
+0:? 'colorTransform' (uniform 3X3 matrix of float)
+0:? 'Color' (smooth in 3-component vector of float)
+0:? 'm' (uniform 4X4 matrix of float)
+0:? 'n' (uniform 4X4 matrix of float)
+0:? 'um43' (uniform 4X4 matrix of float)
+0:? 'un34' (uniform 4X4 matrix of float)
+0:? 'v' (smooth in 4-component vector of float)
+0:? 'u' (smooth in 4-component vector of float)
+
diff --git a/chromium/third_party/glslang/src/Test/baseResults/matrix2.frag.out b/chromium/third_party/glslang/src/Test/baseResults/matrix2.frag.out
new file mode 100644
index 00000000000..d09dec0bf18
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/matrix2.frag.out
@@ -0,0 +1,347 @@
+matrix2.frag
+WARNING: 0:4: varying deprecated in version 130; may be removed in future release
+WARNING: 0:13: varying deprecated in version 130; may be removed in future release
+WARNING: 0:15: varying deprecated in version 130; may be removed in future release
+
+Shader version: 150
+0:? Sequence
+0:19 Function Definition: main( (global void)
+0:19 Function Parameters:
+0:21 Sequence
+0:21 Sequence
+0:21 move second child to first child (temp 3X4 matrix of float)
+0:21 'm34' (temp 3X4 matrix of float)
+0:21 outer product (global 3X4 matrix of float)
+0:21 'v' (smooth in 4-component vector of float)
+0:21 'u' (smooth in 3-component vector of float)
+0:23 add second child into first child (temp 3X4 matrix of float)
+0:23 'm34' (temp 3X4 matrix of float)
+0:23 Constant:
+0:23 4.300000
+0:23 0.000000
+0:23 0.000000
+0:23 0.000000
+0:23 0.000000
+0:23 4.300000
+0:23 0.000000
+0:23 0.000000
+0:23 0.000000
+0:23 0.000000
+0:23 4.300000
+0:23 0.000000
+0:25 move second child to first child (temp 4-component vector of float)
+0:25 'FragColor' (out 4-component vector of float)
+0:25 Construct vec4 (temp 4-component vector of float)
+0:25 'Color' (smooth in 3-component vector of float)
+0:25 Constant:
+0:25 1.000000
+0:26 multiply second child into first child (temp 4-component vector of float)
+0:26 'FragColor' (out 4-component vector of float)
+0:26 Construct vec4 (temp 4-component vector of float)
+0:26 vector-times-matrix (temp 3-component vector of float)
+0:26 'FragColor' (out 4-component vector of float)
+0:26 'm34' (temp 3X4 matrix of float)
+0:26 Constant:
+0:26 1.000000
+0:28 matrix scale second child into first child (temp 3X4 matrix of float)
+0:28 'm34' (temp 3X4 matrix of float)
+0:28 direct index (temp float)
+0:28 'v' (smooth in 4-component vector of float)
+0:28 Constant:
+0:28 0 (const int)
+0:30 Sequence
+0:30 move second child to first child (temp 4X4 matrix of float)
+0:30 'm44' (temp 4X4 matrix of float)
+0:30 Construct mat4 (temp 4X4 matrix of float)
+0:30 'un34' (uniform 3X4 matrix of float)
+0:32 add second child into first child (temp 4X4 matrix of float)
+0:32 'm44' (temp 4X4 matrix of float)
+0:32 matrix-multiply (temp 4X4 matrix of float)
+0:32 'm34' (temp 3X4 matrix of float)
+0:32 'um43' (uniform 4X3 matrix of float)
+0:34 add second child into first child (temp 4-component vector of float)
+0:34 'FragColor' (out 4-component vector of float)
+0:34 matrix-times-vector (temp 4-component vector of float)
+0:34 Negate value (temp 4X4 matrix of float)
+0:34 'm44' (temp 4X4 matrix of float)
+0:34 'v' (smooth in 4-component vector of float)
+0:36 matrix mult second child into first child (temp 4-component vector of float)
+0:36 'FragColor' (out 4-component vector of float)
+0:36 component-wise multiply (global 4X4 matrix of float)
+0:36 'm44' (temp 4X4 matrix of float)
+0:36 'm44' (temp 4X4 matrix of float)
+0:38 move second child to first child (temp 3X4 matrix of float)
+0:38 'm34' (temp 3X4 matrix of float)
+0:38 transpose (global 3X4 matrix of float)
+0:38 'um43' (uniform 4X3 matrix of float)
+0:39 multiply second child into first child (temp 4-component vector of float)
+0:39 'FragColor' (out 4-component vector of float)
+0:39 Construct vec4 (temp 4-component vector of float)
+0:39 vector-times-matrix (temp 3-component vector of float)
+0:39 'FragColor' (out 4-component vector of float)
+0:39 'm34' (temp 3X4 matrix of float)
+0:39 Constant:
+0:39 1.000000
+0:40 multiply second child into first child (temp 4-component vector of float)
+0:40 'FragColor' (out 4-component vector of float)
+0:40 Construct vec4 (temp 4-component vector of float)
+0:40 determinant (global float)
+0:40 'um4' (uniform 4X4 matrix of float)
+0:41 Sequence
+0:41 move second child to first child (temp 2X2 matrix of float)
+0:41 'inv' (temp 2X2 matrix of float)
+0:41 inverse (global 2X2 matrix of float)
+0:41 'um2' (uniform 2X2 matrix of float)
+0:42 multiply second child into first child (temp 4-component vector of float)
+0:42 'FragColor' (out 4-component vector of float)
+0:42 Construct vec4 (temp 4-component vector of float)
+0:42 direct index (temp float)
+0:42 direct index (temp 2-component vector of float)
+0:42 'inv' (temp 2X2 matrix of float)
+0:42 Constant:
+0:42 0 (const int)
+0:42 Constant:
+0:42 0 (const int)
+0:42 direct index (temp float)
+0:42 direct index (temp 2-component vector of float)
+0:42 'inv' (temp 2X2 matrix of float)
+0:42 Constant:
+0:42 1 (const int)
+0:42 Constant:
+0:42 0 (const int)
+0:42 direct index (temp float)
+0:42 direct index (temp 2-component vector of float)
+0:42 'inv' (temp 2X2 matrix of float)
+0:42 Constant:
+0:42 0 (const int)
+0:42 Constant:
+0:42 1 (const int)
+0:42 direct index (temp float)
+0:42 direct index (temp 2-component vector of float)
+0:42 'inv' (temp 2X2 matrix of float)
+0:42 Constant:
+0:42 1 (const int)
+0:42 Constant:
+0:42 1 (const int)
+0:43 Sequence
+0:43 move second child to first child (temp 3X3 matrix of float)
+0:43 'inv3' (temp 3X3 matrix of float)
+0:43 inverse (global 3X3 matrix of float)
+0:43 'um3' (uniform 3X3 matrix of float)
+0:44 multiply second child into first child (temp 4-component vector of float)
+0:44 'FragColor' (out 4-component vector of float)
+0:44 Construct vec4 (temp 4-component vector of float)
+0:44 direct index (temp float)
+0:44 direct index (temp 3-component vector of float)
+0:44 'inv3' (temp 3X3 matrix of float)
+0:44 Constant:
+0:44 2 (const int)
+0:44 Constant:
+0:44 1 (const int)
+0:46 Sequence
+0:46 move second child to first child (temp 4X4 matrix of float)
+0:46 'inv4' (temp 4X4 matrix of float)
+0:46 inverse (global 4X4 matrix of float)
+0:46 'um4' (uniform 4X4 matrix of float)
+0:47 matrix mult second child into first child (temp 4-component vector of float)
+0:47 'FragColor' (out 4-component vector of float)
+0:47 'inv4' (temp 4X4 matrix of float)
+0:49 move second child to first child (temp 4-component vector of float)
+0:49 'FragColor' (out 4-component vector of float)
+0:49 Construct vec4 (temp 4-component vector of float)
+0:49 vector-times-matrix (temp 3-component vector of float)
+0:49 'FragColor' (out 4-component vector of float)
+0:49 component-wise multiply (global 3X4 matrix of float)
+0:49 'un34' (uniform 3X4 matrix of float)
+0:49 'un34' (uniform 3X4 matrix of float)
+0:49 direct index (temp float)
+0:49 'FragColor' (out 4-component vector of float)
+0:49 Constant:
+0:49 3 (const int)
+0:? Linker Objects
+0:? 'colorTransform' (uniform 3X3 matrix of float)
+0:? 'Color' (smooth in 3-component vector of float)
+0:? 'm' (uniform 4X4 matrix of float)
+0:? 'n' (uniform 4X4 matrix of float)
+0:? 'um43' (uniform 4X3 matrix of float)
+0:? 'un34' (uniform 3X4 matrix of float)
+0:? 'um2' (uniform 2X2 matrix of float)
+0:? 'um3' (uniform 3X3 matrix of float)
+0:? 'um4' (uniform 4X4 matrix of float)
+0:? 'v' (smooth in 4-component vector of float)
+0:? 'u' (smooth in 3-component vector of float)
+0:? 'FragColor' (out 4-component vector of float)
+
+
+Linked fragment stage:
+
+
+Shader version: 150
+0:? Sequence
+0:19 Function Definition: main( (global void)
+0:19 Function Parameters:
+0:21 Sequence
+0:21 Sequence
+0:21 move second child to first child (temp 3X4 matrix of float)
+0:21 'm34' (temp 3X4 matrix of float)
+0:21 outer product (global 3X4 matrix of float)
+0:21 'v' (smooth in 4-component vector of float)
+0:21 'u' (smooth in 3-component vector of float)
+0:23 add second child into first child (temp 3X4 matrix of float)
+0:23 'm34' (temp 3X4 matrix of float)
+0:23 Constant:
+0:23 4.300000
+0:23 0.000000
+0:23 0.000000
+0:23 0.000000
+0:23 0.000000
+0:23 4.300000
+0:23 0.000000
+0:23 0.000000
+0:23 0.000000
+0:23 0.000000
+0:23 4.300000
+0:23 0.000000
+0:25 move second child to first child (temp 4-component vector of float)
+0:25 'FragColor' (out 4-component vector of float)
+0:25 Construct vec4 (temp 4-component vector of float)
+0:25 'Color' (smooth in 3-component vector of float)
+0:25 Constant:
+0:25 1.000000
+0:26 multiply second child into first child (temp 4-component vector of float)
+0:26 'FragColor' (out 4-component vector of float)
+0:26 Construct vec4 (temp 4-component vector of float)
+0:26 vector-times-matrix (temp 3-component vector of float)
+0:26 'FragColor' (out 4-component vector of float)
+0:26 'm34' (temp 3X4 matrix of float)
+0:26 Constant:
+0:26 1.000000
+0:28 matrix scale second child into first child (temp 3X4 matrix of float)
+0:28 'm34' (temp 3X4 matrix of float)
+0:28 direct index (temp float)
+0:28 'v' (smooth in 4-component vector of float)
+0:28 Constant:
+0:28 0 (const int)
+0:30 Sequence
+0:30 move second child to first child (temp 4X4 matrix of float)
+0:30 'm44' (temp 4X4 matrix of float)
+0:30 Construct mat4 (temp 4X4 matrix of float)
+0:30 'un34' (uniform 3X4 matrix of float)
+0:32 add second child into first child (temp 4X4 matrix of float)
+0:32 'm44' (temp 4X4 matrix of float)
+0:32 matrix-multiply (temp 4X4 matrix of float)
+0:32 'm34' (temp 3X4 matrix of float)
+0:32 'um43' (uniform 4X3 matrix of float)
+0:34 add second child into first child (temp 4-component vector of float)
+0:34 'FragColor' (out 4-component vector of float)
+0:34 matrix-times-vector (temp 4-component vector of float)
+0:34 Negate value (temp 4X4 matrix of float)
+0:34 'm44' (temp 4X4 matrix of float)
+0:34 'v' (smooth in 4-component vector of float)
+0:36 matrix mult second child into first child (temp 4-component vector of float)
+0:36 'FragColor' (out 4-component vector of float)
+0:36 component-wise multiply (global 4X4 matrix of float)
+0:36 'm44' (temp 4X4 matrix of float)
+0:36 'm44' (temp 4X4 matrix of float)
+0:38 move second child to first child (temp 3X4 matrix of float)
+0:38 'm34' (temp 3X4 matrix of float)
+0:38 transpose (global 3X4 matrix of float)
+0:38 'um43' (uniform 4X3 matrix of float)
+0:39 multiply second child into first child (temp 4-component vector of float)
+0:39 'FragColor' (out 4-component vector of float)
+0:39 Construct vec4 (temp 4-component vector of float)
+0:39 vector-times-matrix (temp 3-component vector of float)
+0:39 'FragColor' (out 4-component vector of float)
+0:39 'm34' (temp 3X4 matrix of float)
+0:39 Constant:
+0:39 1.000000
+0:40 multiply second child into first child (temp 4-component vector of float)
+0:40 'FragColor' (out 4-component vector of float)
+0:40 Construct vec4 (temp 4-component vector of float)
+0:40 determinant (global float)
+0:40 'um4' (uniform 4X4 matrix of float)
+0:41 Sequence
+0:41 move second child to first child (temp 2X2 matrix of float)
+0:41 'inv' (temp 2X2 matrix of float)
+0:41 inverse (global 2X2 matrix of float)
+0:41 'um2' (uniform 2X2 matrix of float)
+0:42 multiply second child into first child (temp 4-component vector of float)
+0:42 'FragColor' (out 4-component vector of float)
+0:42 Construct vec4 (temp 4-component vector of float)
+0:42 direct index (temp float)
+0:42 direct index (temp 2-component vector of float)
+0:42 'inv' (temp 2X2 matrix of float)
+0:42 Constant:
+0:42 0 (const int)
+0:42 Constant:
+0:42 0 (const int)
+0:42 direct index (temp float)
+0:42 direct index (temp 2-component vector of float)
+0:42 'inv' (temp 2X2 matrix of float)
+0:42 Constant:
+0:42 1 (const int)
+0:42 Constant:
+0:42 0 (const int)
+0:42 direct index (temp float)
+0:42 direct index (temp 2-component vector of float)
+0:42 'inv' (temp 2X2 matrix of float)
+0:42 Constant:
+0:42 0 (const int)
+0:42 Constant:
+0:42 1 (const int)
+0:42 direct index (temp float)
+0:42 direct index (temp 2-component vector of float)
+0:42 'inv' (temp 2X2 matrix of float)
+0:42 Constant:
+0:42 1 (const int)
+0:42 Constant:
+0:42 1 (const int)
+0:43 Sequence
+0:43 move second child to first child (temp 3X3 matrix of float)
+0:43 'inv3' (temp 3X3 matrix of float)
+0:43 inverse (global 3X3 matrix of float)
+0:43 'um3' (uniform 3X3 matrix of float)
+0:44 multiply second child into first child (temp 4-component vector of float)
+0:44 'FragColor' (out 4-component vector of float)
+0:44 Construct vec4 (temp 4-component vector of float)
+0:44 direct index (temp float)
+0:44 direct index (temp 3-component vector of float)
+0:44 'inv3' (temp 3X3 matrix of float)
+0:44 Constant:
+0:44 2 (const int)
+0:44 Constant:
+0:44 1 (const int)
+0:46 Sequence
+0:46 move second child to first child (temp 4X4 matrix of float)
+0:46 'inv4' (temp 4X4 matrix of float)
+0:46 inverse (global 4X4 matrix of float)
+0:46 'um4' (uniform 4X4 matrix of float)
+0:47 matrix mult second child into first child (temp 4-component vector of float)
+0:47 'FragColor' (out 4-component vector of float)
+0:47 'inv4' (temp 4X4 matrix of float)
+0:49 move second child to first child (temp 4-component vector of float)
+0:49 'FragColor' (out 4-component vector of float)
+0:49 Construct vec4 (temp 4-component vector of float)
+0:49 vector-times-matrix (temp 3-component vector of float)
+0:49 'FragColor' (out 4-component vector of float)
+0:49 component-wise multiply (global 3X4 matrix of float)
+0:49 'un34' (uniform 3X4 matrix of float)
+0:49 'un34' (uniform 3X4 matrix of float)
+0:49 direct index (temp float)
+0:49 'FragColor' (out 4-component vector of float)
+0:49 Constant:
+0:49 3 (const int)
+0:? Linker Objects
+0:? 'colorTransform' (uniform 3X3 matrix of float)
+0:? 'Color' (smooth in 3-component vector of float)
+0:? 'm' (uniform 4X4 matrix of float)
+0:? 'n' (uniform 4X4 matrix of float)
+0:? 'um43' (uniform 4X3 matrix of float)
+0:? 'un34' (uniform 3X4 matrix of float)
+0:? 'um2' (uniform 2X2 matrix of float)
+0:? 'um3' (uniform 3X3 matrix of float)
+0:? 'um4' (uniform 4X4 matrix of float)
+0:? 'v' (smooth in 4-component vector of float)
+0:? 'u' (smooth in 3-component vector of float)
+0:? 'FragColor' (out 4-component vector of float)
+
diff --git a/chromium/third_party/glslang/src/Test/baseResults/matrixError.vert.out b/chromium/third_party/glslang/src/Test/baseResults/matrixError.vert.out
new file mode 100644
index 00000000000..ee0646ea0c3
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/matrixError.vert.out
@@ -0,0 +1,71 @@
+matrixError.vert
+ERROR: 0:10: 'constructor' : too many arguments
+ERROR: 0:7: 'const' : non-matching or non-convertible constant type for const initializer
+ERROR: 0:17: 'assign' : cannot convert from 'temp 2-component vector of float' to 'temp 3-component vector of float'
+ERROR: 0:18: 'assign' : cannot convert from 'temp 2-component vector of float' to 'temp 3-component vector of float'
+ERROR: 0:19: 'xy' : does not apply to this type: temp 2X3 matrix of float
+ERROR: 0:21: '[' : matrix index out of range '2'
+ERROR: 0:21: '[' : vector index out of range '4'
+ERROR: 7 compilation errors. No code generated.
+
+
+Shader version: 120
+ERROR: node is still EOpNull!
+0:12 Function Definition: main( (global void)
+0:12 Function Parameters:
+0:? Sequence
+0:17 'a' (temp 3-component vector of float)
+0:18 'b' (temp 3-component vector of float)
+0:19 'm23' (temp 2X3 matrix of float)
+0:21 move second child to first child (temp 4-component vector of float)
+0:21 'gl_Position' (gl_Position 4-component vector of float Position)
+0:21 Construct vec4 (temp 4-component vector of float)
+0:21 matrix-times-vector (temp 3-component vector of float)
+0:21 matrix-multiply (temp 3X3 matrix of float)
+0:21 'm23' (temp 2X3 matrix of float)
+0:21 'm32' (uniform 3X2 matrix of float)
+0:21 'v3' (in 3-component vector of float)
+0:21 direct index (temp float)
+0:21 direct index (temp 4-component vector of float)
+0:21 'm24' (temp 2X4 matrix of float)
+0:21 Constant:
+0:21 2 (const int)
+0:21 Constant:
+0:21 4 (const int)
+0:? Linker Objects
+0:? 'v3' (in 3-component vector of float)
+0:? 'm32' (uniform 3X2 matrix of float)
+0:? 'm24' (temp 2X4 matrix of float)
+
+
+Linked vertex stage:
+
+
+Shader version: 120
+ERROR: node is still EOpNull!
+0:12 Function Definition: main( (global void)
+0:12 Function Parameters:
+0:? Sequence
+0:17 'a' (temp 3-component vector of float)
+0:18 'b' (temp 3-component vector of float)
+0:19 'm23' (temp 2X3 matrix of float)
+0:21 move second child to first child (temp 4-component vector of float)
+0:21 'gl_Position' (gl_Position 4-component vector of float Position)
+0:21 Construct vec4 (temp 4-component vector of float)
+0:21 matrix-times-vector (temp 3-component vector of float)
+0:21 matrix-multiply (temp 3X3 matrix of float)
+0:21 'm23' (temp 2X3 matrix of float)
+0:21 'm32' (uniform 3X2 matrix of float)
+0:21 'v3' (in 3-component vector of float)
+0:21 direct index (temp float)
+0:21 direct index (temp 4-component vector of float)
+0:21 'm24' (temp 2X4 matrix of float)
+0:21 Constant:
+0:21 2 (const int)
+0:21 Constant:
+0:21 4 (const int)
+0:? Linker Objects
+0:? 'v3' (in 3-component vector of float)
+0:? 'm32' (uniform 3X2 matrix of float)
+0:? 'm24' (temp 2X4 matrix of float)
+
diff --git a/chromium/third_party/glslang/src/Test/baseResults/max_vertices_0.geom.out b/chromium/third_party/glslang/src/Test/baseResults/max_vertices_0.geom.out
new file mode 100644
index 00000000000..94890bc8915
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/max_vertices_0.geom.out
@@ -0,0 +1,35 @@
+max_vertices_0.geom
+Shader version: 330
+invocations = -1
+max_vertices = 0
+input primitive = points
+output primitive = triangle_strip
+0:? Sequence
+0:8 Function Definition: main( (global void)
+0:8 Function Parameters:
+0:10 Sequence
+0:10 EndPrimitive (global void)
+0:11 EndPrimitive (global void)
+0:? Linker Objects
+0:? 'v_geom_FragColor' (in 1-element array of 4-component vector of float)
+0:? 'v_frag_FragColor' (layout(stream=0 ) out 4-component vector of float)
+
+
+Linked geometry stage:
+
+
+Shader version: 330
+invocations = 1
+max_vertices = 0
+input primitive = points
+output primitive = triangle_strip
+0:? Sequence
+0:8 Function Definition: main( (global void)
+0:8 Function Parameters:
+0:10 Sequence
+0:10 EndPrimitive (global void)
+0:11 EndPrimitive (global void)
+0:? Linker Objects
+0:? 'v_geom_FragColor' (in 1-element array of 4-component vector of float)
+0:? 'v_frag_FragColor' (layout(stream=0 ) out 4-component vector of float)
+
diff --git a/chromium/third_party/glslang/src/Test/baseResults/negativeArraySize.comp.out b/chromium/third_party/glslang/src/Test/baseResults/negativeArraySize.comp.out
new file mode 100644
index 00000000000..ccbabf5f15a
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/negativeArraySize.comp.out
@@ -0,0 +1,24 @@
+negativeArraySize.comp
+Warning, version 310 is not yet complete; most version-specific features are present, but some are missing.
+ERROR: 0:9: '' : array size must be a positive integer
+ERROR: 1 compilation errors. No code generated.
+
+
+Shader version: 310
+local_size = (1, 1, 1)
+ERROR: node is still EOpNull!
+0:7 Function Definition: main( (global void)
+0:7 Function Parameters:
+0:? Linker Objects
+
+
+Linked compute stage:
+
+
+Shader version: 310
+local_size = (1, 1, 1)
+ERROR: node is still EOpNull!
+0:7 Function Definition: main( (global void)
+0:7 Function Parameters:
+0:? Linker Objects
+
diff --git a/chromium/third_party/glslang/src/Test/baseResults/newTexture.frag.out b/chromium/third_party/glslang/src/Test/baseResults/newTexture.frag.out
new file mode 100644
index 00000000000..f63d79f12d1
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/newTexture.frag.out
@@ -0,0 +1,523 @@
+newTexture.frag
+Warning, version 430 is not yet complete; most version-specific features are present, but some are missing.
+
+Shader version: 430
+0:? Sequence
+0:36 Function Definition: main( (global void)
+0:36 Function Parameters:
+0:38 Sequence
+0:38 Sequence
+0:38 move second child to first child (temp 4-component vector of float)
+0:38 'v' (temp 4-component vector of float)
+0:38 texture (global 4-component vector of float)
+0:38 's2D' (uniform sampler2D)
+0:38 'c2D' (smooth in 2-component vector of float)
+0:39 add second child into first child (temp 4-component vector of float)
+0:39 'v' (temp 4-component vector of float)
+0:39 textureProj (global 4-component vector of float)
+0:39 's3D' (uniform sampler3D)
+0:39 'c4D' (smooth in 4-component vector of float)
+0:40 add second child into first child (temp 4-component vector of float)
+0:40 'v' (temp 4-component vector of float)
+0:40 textureLod (global 4-component vector of float)
+0:40 's2DArray' (uniform sampler2DArray)
+0:40 'c3D' (smooth in 3-component vector of float)
+0:40 Constant:
+0:40 1.200000
+0:41 add second child into first child (temp float)
+0:41 direct index (temp float)
+0:41 'v' (temp 4-component vector of float)
+0:41 Constant:
+0:41 1 (const int)
+0:41 textureOffset (global float)
+0:41 's2DShadow' (uniform sampler2DShadow)
+0:41 'c3D' (smooth in 3-component vector of float)
+0:41 Constant:
+0:41 3 (const int)
+0:41 3 (const int)
+0:41 'c1D' (smooth in float)
+0:42 add second child into first child (temp 4-component vector of float)
+0:42 'v' (temp 4-component vector of float)
+0:42 textureFetch (global 4-component vector of float)
+0:42 's3D' (uniform sampler3D)
+0:42 'ic3D' (flat in 3-component vector of int)
+0:42 'ic1D' (flat in int)
+0:43 add second child into first child (temp 4-component vector of float)
+0:43 'v' (temp 4-component vector of float)
+0:43 textureFetchOffset (global 4-component vector of float)
+0:43 's2D' (uniform sampler2D)
+0:43 'ic2D' (flat in 2-component vector of int)
+0:43 Constant:
+0:43 4 (const int)
+0:43 Constant:
+0:43 3 (const int)
+0:43 3 (const int)
+0:44 add second child into first child (temp 4-component vector of float)
+0:44 'v' (temp 4-component vector of float)
+0:44 textureFetchOffset (global 4-component vector of float)
+0:44 'sr' (uniform sampler2DRect)
+0:44 'ic2D' (flat in 2-component vector of int)
+0:44 Constant:
+0:44 4 (const int)
+0:44 4 (const int)
+0:45 add second child into first child (temp float)
+0:45 direct index (temp float)
+0:45 'v' (temp 4-component vector of float)
+0:45 Constant:
+0:45 1 (const int)
+0:45 textureLodOffset (global float)
+0:45 's2DShadow' (uniform sampler2DShadow)
+0:45 'c3D' (smooth in 3-component vector of float)
+0:45 'c1D' (smooth in float)
+0:45 Constant:
+0:45 3 (const int)
+0:45 3 (const int)
+0:46 add second child into first child (temp 4-component vector of float)
+0:46 'v' (temp 4-component vector of float)
+0:46 textureProjLodOffset (global 4-component vector of float)
+0:46 's2D' (uniform sampler2D)
+0:46 'c3D' (smooth in 3-component vector of float)
+0:46 'c1D' (smooth in float)
+0:46 Constant:
+0:46 3 (const int)
+0:46 3 (const int)
+0:47 add second child into first child (temp 4-component vector of float)
+0:47 'v' (temp 4-component vector of float)
+0:47 textureGrad (global 4-component vector of float)
+0:47 'sCube' (uniform samplerCube)
+0:47 'c3D' (smooth in 3-component vector of float)
+0:47 'c3D' (smooth in 3-component vector of float)
+0:47 'c3D' (smooth in 3-component vector of float)
+0:48 add second child into first child (temp float)
+0:48 direct index (temp float)
+0:48 'v' (temp 4-component vector of float)
+0:48 Constant:
+0:48 0 (const int)
+0:48 textureGradOffset (global float)
+0:48 's2DArrayShadow' (uniform sampler2DArrayShadow)
+0:48 'c4D' (smooth in 4-component vector of float)
+0:48 'c2D' (smooth in 2-component vector of float)
+0:48 'c2D' (smooth in 2-component vector of float)
+0:48 Constant:
+0:48 3 (const int)
+0:48 3 (const int)
+0:49 add second child into first child (temp 4-component vector of float)
+0:49 'v' (temp 4-component vector of float)
+0:49 textureProjGrad (global 4-component vector of float)
+0:49 's3D' (uniform sampler3D)
+0:49 'c4D' (smooth in 4-component vector of float)
+0:49 'c3D' (smooth in 3-component vector of float)
+0:49 'c3D' (smooth in 3-component vector of float)
+0:50 add second child into first child (temp 4-component vector of float)
+0:50 'v' (temp 4-component vector of float)
+0:50 textureProjGradOffset (global 4-component vector of float)
+0:50 's2D' (uniform sampler2D)
+0:50 'c3D' (smooth in 3-component vector of float)
+0:50 'c2D' (smooth in 2-component vector of float)
+0:50 'c2D' (smooth in 2-component vector of float)
+0:50 Constant:
+0:50 3 (const int)
+0:50 3 (const int)
+0:52 Sequence
+0:52 move second child to first child (temp 4-component vector of int)
+0:52 'iv' (temp 4-component vector of int)
+0:52 texture (global 4-component vector of int)
+0:52 'is2D' (uniform isampler2D)
+0:52 'c2D' (smooth in 2-component vector of float)
+0:53 add second child into first child (temp 4-component vector of float)
+0:53 'v' (temp 4-component vector of float)
+0:53 Convert int to float (temp 4-component vector of float)
+0:53 'iv' (temp 4-component vector of int)
+0:54 move second child to first child (temp 4-component vector of int)
+0:54 'iv' (temp 4-component vector of int)
+0:54 textureProjOffset (global 4-component vector of int)
+0:54 'is2D' (uniform isampler2D)
+0:54 'c4D' (smooth in 4-component vector of float)
+0:54 Constant:
+0:54 3 (const int)
+0:54 3 (const int)
+0:55 add second child into first child (temp 4-component vector of float)
+0:55 'v' (temp 4-component vector of float)
+0:55 Convert int to float (temp 4-component vector of float)
+0:55 'iv' (temp 4-component vector of int)
+0:56 move second child to first child (temp 4-component vector of int)
+0:56 'iv' (temp 4-component vector of int)
+0:56 textureProjLod (global 4-component vector of int)
+0:56 'is2D' (uniform isampler2D)
+0:56 'c3D' (smooth in 3-component vector of float)
+0:56 'c1D' (smooth in float)
+0:57 add second child into first child (temp 4-component vector of float)
+0:57 'v' (temp 4-component vector of float)
+0:57 Convert int to float (temp 4-component vector of float)
+0:57 'iv' (temp 4-component vector of int)
+0:58 move second child to first child (temp 4-component vector of int)
+0:58 'iv' (temp 4-component vector of int)
+0:58 textureProjGrad (global 4-component vector of int)
+0:58 'is2D' (uniform isampler2D)
+0:58 'c3D' (smooth in 3-component vector of float)
+0:58 'c2D' (smooth in 2-component vector of float)
+0:58 'c2D' (smooth in 2-component vector of float)
+0:59 add second child into first child (temp 4-component vector of float)
+0:59 'v' (temp 4-component vector of float)
+0:59 Convert int to float (temp 4-component vector of float)
+0:59 'iv' (temp 4-component vector of int)
+0:60 move second child to first child (temp 4-component vector of int)
+0:60 'iv' (temp 4-component vector of int)
+0:60 texture (global 4-component vector of int)
+0:60 'is3D' (uniform isampler3D)
+0:60 'c3D' (smooth in 3-component vector of float)
+0:60 Constant:
+0:60 4.200000
+0:61 add second child into first child (temp 4-component vector of float)
+0:61 'v' (temp 4-component vector of float)
+0:61 Convert int to float (temp 4-component vector of float)
+0:61 'iv' (temp 4-component vector of int)
+0:62 move second child to first child (temp 4-component vector of int)
+0:62 'iv' (temp 4-component vector of int)
+0:62 textureLod (global 4-component vector of int)
+0:62 'isCube' (uniform isamplerCube)
+0:62 'c3D' (smooth in 3-component vector of float)
+0:62 'c1D' (smooth in float)
+0:63 add second child into first child (temp 4-component vector of float)
+0:63 'v' (temp 4-component vector of float)
+0:63 Convert int to float (temp 4-component vector of float)
+0:63 'iv' (temp 4-component vector of int)
+0:64 move second child to first child (temp 4-component vector of int)
+0:64 'iv' (temp 4-component vector of int)
+0:64 textureFetch (global 4-component vector of int)
+0:64 'is2DArray' (uniform isampler2DArray)
+0:64 'ic3D' (flat in 3-component vector of int)
+0:64 'ic1D' (flat in int)
+0:65 add second child into first child (temp 4-component vector of float)
+0:65 'v' (temp 4-component vector of float)
+0:65 Convert int to float (temp 4-component vector of float)
+0:65 'iv' (temp 4-component vector of int)
+0:66 add second child into first child (temp 4-component vector of int)
+0:66 'iv' (temp 4-component vector of int)
+0:66 textureFetch (global 4-component vector of int)
+0:66 'is2Dms' (uniform isampler2DMS)
+0:66 'ic2D' (flat in 2-component vector of int)
+0:66 'ic1D' (flat in int)
+0:67 add second child into first child (temp 4-component vector of float)
+0:67 'v' (temp 4-component vector of float)
+0:67 Convert int to float (temp 4-component vector of float)
+0:67 'iv' (temp 4-component vector of int)
+0:68 add second child into first child (temp 4-component vector of float)
+0:68 'v' (temp 4-component vector of float)
+0:68 textureFetch (global 4-component vector of float)
+0:68 'sb' (uniform samplerBuffer)
+0:68 'ic1D' (flat in int)
+0:69 add second child into first child (temp 4-component vector of float)
+0:69 'v' (temp 4-component vector of float)
+0:69 textureFetch (global 4-component vector of float)
+0:69 'sr' (uniform sampler2DRect)
+0:69 'ic2D' (flat in 2-component vector of int)
+0:71 Sequence
+0:71 move second child to first child (temp 2-component vector of int)
+0:71 'iv2' (temp 2-component vector of int)
+0:71 textureSize (global 2-component vector of int)
+0:71 'sCubeShadow' (uniform samplerCubeShadow)
+0:71 Constant:
+0:71 2 (const int)
+0:74 move second child to first child (temp 4-component vector of float)
+0:74 'FragData' (out 4-component vector of float)
+0:74 add (temp 4-component vector of float)
+0:74 'v' (temp 4-component vector of float)
+0:74 Construct vec4 (temp 4-component vector of float)
+0:74 Convert int to float (temp 2-component vector of float)
+0:74 'iv2' (temp 2-component vector of int)
+0:74 Constant:
+0:74 0.000000
+0:74 Constant:
+0:74 0.000000
+0:? Linker Objects
+0:? 'sb' (uniform samplerBuffer)
+0:? 'sr' (uniform sampler2DRect)
+0:? 's2D' (uniform sampler2D)
+0:? 's3D' (uniform sampler3D)
+0:? 'sCube' (uniform samplerCube)
+0:? 'sCubeShadow' (uniform samplerCubeShadow)
+0:? 's2DShadow' (uniform sampler2DShadow)
+0:? 's2DArray' (uniform sampler2DArray)
+0:? 's2DArrayShadow' (uniform sampler2DArrayShadow)
+0:? 'is2D' (uniform isampler2D)
+0:? 'is3D' (uniform isampler3D)
+0:? 'isCube' (uniform isamplerCube)
+0:? 'is2DArray' (uniform isampler2DArray)
+0:? 'is2Dms' (uniform isampler2DMS)
+0:? 'us2D' (uniform usampler2D)
+0:? 'us3D' (uniform usampler3D)
+0:? 'usCube' (uniform usamplerCube)
+0:? 'us2DArray' (uniform usampler2DArray)
+0:? 'c1D' (smooth in float)
+0:? 'c2D' (smooth in 2-component vector of float)
+0:? 'c3D' (smooth in 3-component vector of float)
+0:? 'c4D' (smooth in 4-component vector of float)
+0:? 'ic1D' (flat in int)
+0:? 'ic2D' (flat in 2-component vector of int)
+0:? 'ic3D' (flat in 3-component vector of int)
+0:? 'ic4D' (flat in 4-component vector of int)
+0:? 'FragData' (out 4-component vector of float)
+
+
+Linked fragment stage:
+
+
+Shader version: 430
+0:? Sequence
+0:36 Function Definition: main( (global void)
+0:36 Function Parameters:
+0:38 Sequence
+0:38 Sequence
+0:38 move second child to first child (temp 4-component vector of float)
+0:38 'v' (temp 4-component vector of float)
+0:38 texture (global 4-component vector of float)
+0:38 's2D' (uniform sampler2D)
+0:38 'c2D' (smooth in 2-component vector of float)
+0:39 add second child into first child (temp 4-component vector of float)
+0:39 'v' (temp 4-component vector of float)
+0:39 textureProj (global 4-component vector of float)
+0:39 's3D' (uniform sampler3D)
+0:39 'c4D' (smooth in 4-component vector of float)
+0:40 add second child into first child (temp 4-component vector of float)
+0:40 'v' (temp 4-component vector of float)
+0:40 textureLod (global 4-component vector of float)
+0:40 's2DArray' (uniform sampler2DArray)
+0:40 'c3D' (smooth in 3-component vector of float)
+0:40 Constant:
+0:40 1.200000
+0:41 add second child into first child (temp float)
+0:41 direct index (temp float)
+0:41 'v' (temp 4-component vector of float)
+0:41 Constant:
+0:41 1 (const int)
+0:41 textureOffset (global float)
+0:41 's2DShadow' (uniform sampler2DShadow)
+0:41 'c3D' (smooth in 3-component vector of float)
+0:41 Constant:
+0:41 3 (const int)
+0:41 3 (const int)
+0:41 'c1D' (smooth in float)
+0:42 add second child into first child (temp 4-component vector of float)
+0:42 'v' (temp 4-component vector of float)
+0:42 textureFetch (global 4-component vector of float)
+0:42 's3D' (uniform sampler3D)
+0:42 'ic3D' (flat in 3-component vector of int)
+0:42 'ic1D' (flat in int)
+0:43 add second child into first child (temp 4-component vector of float)
+0:43 'v' (temp 4-component vector of float)
+0:43 textureFetchOffset (global 4-component vector of float)
+0:43 's2D' (uniform sampler2D)
+0:43 'ic2D' (flat in 2-component vector of int)
+0:43 Constant:
+0:43 4 (const int)
+0:43 Constant:
+0:43 3 (const int)
+0:43 3 (const int)
+0:44 add second child into first child (temp 4-component vector of float)
+0:44 'v' (temp 4-component vector of float)
+0:44 textureFetchOffset (global 4-component vector of float)
+0:44 'sr' (uniform sampler2DRect)
+0:44 'ic2D' (flat in 2-component vector of int)
+0:44 Constant:
+0:44 4 (const int)
+0:44 4 (const int)
+0:45 add second child into first child (temp float)
+0:45 direct index (temp float)
+0:45 'v' (temp 4-component vector of float)
+0:45 Constant:
+0:45 1 (const int)
+0:45 textureLodOffset (global float)
+0:45 's2DShadow' (uniform sampler2DShadow)
+0:45 'c3D' (smooth in 3-component vector of float)
+0:45 'c1D' (smooth in float)
+0:45 Constant:
+0:45 3 (const int)
+0:45 3 (const int)
+0:46 add second child into first child (temp 4-component vector of float)
+0:46 'v' (temp 4-component vector of float)
+0:46 textureProjLodOffset (global 4-component vector of float)
+0:46 's2D' (uniform sampler2D)
+0:46 'c3D' (smooth in 3-component vector of float)
+0:46 'c1D' (smooth in float)
+0:46 Constant:
+0:46 3 (const int)
+0:46 3 (const int)
+0:47 add second child into first child (temp 4-component vector of float)
+0:47 'v' (temp 4-component vector of float)
+0:47 textureGrad (global 4-component vector of float)
+0:47 'sCube' (uniform samplerCube)
+0:47 'c3D' (smooth in 3-component vector of float)
+0:47 'c3D' (smooth in 3-component vector of float)
+0:47 'c3D' (smooth in 3-component vector of float)
+0:48 add second child into first child (temp float)
+0:48 direct index (temp float)
+0:48 'v' (temp 4-component vector of float)
+0:48 Constant:
+0:48 0 (const int)
+0:48 textureGradOffset (global float)
+0:48 's2DArrayShadow' (uniform sampler2DArrayShadow)
+0:48 'c4D' (smooth in 4-component vector of float)
+0:48 'c2D' (smooth in 2-component vector of float)
+0:48 'c2D' (smooth in 2-component vector of float)
+0:48 Constant:
+0:48 3 (const int)
+0:48 3 (const int)
+0:49 add second child into first child (temp 4-component vector of float)
+0:49 'v' (temp 4-component vector of float)
+0:49 textureProjGrad (global 4-component vector of float)
+0:49 's3D' (uniform sampler3D)
+0:49 'c4D' (smooth in 4-component vector of float)
+0:49 'c3D' (smooth in 3-component vector of float)
+0:49 'c3D' (smooth in 3-component vector of float)
+0:50 add second child into first child (temp 4-component vector of float)
+0:50 'v' (temp 4-component vector of float)
+0:50 textureProjGradOffset (global 4-component vector of float)
+0:50 's2D' (uniform sampler2D)
+0:50 'c3D' (smooth in 3-component vector of float)
+0:50 'c2D' (smooth in 2-component vector of float)
+0:50 'c2D' (smooth in 2-component vector of float)
+0:50 Constant:
+0:50 3 (const int)
+0:50 3 (const int)
+0:52 Sequence
+0:52 move second child to first child (temp 4-component vector of int)
+0:52 'iv' (temp 4-component vector of int)
+0:52 texture (global 4-component vector of int)
+0:52 'is2D' (uniform isampler2D)
+0:52 'c2D' (smooth in 2-component vector of float)
+0:53 add second child into first child (temp 4-component vector of float)
+0:53 'v' (temp 4-component vector of float)
+0:53 Convert int to float (temp 4-component vector of float)
+0:53 'iv' (temp 4-component vector of int)
+0:54 move second child to first child (temp 4-component vector of int)
+0:54 'iv' (temp 4-component vector of int)
+0:54 textureProjOffset (global 4-component vector of int)
+0:54 'is2D' (uniform isampler2D)
+0:54 'c4D' (smooth in 4-component vector of float)
+0:54 Constant:
+0:54 3 (const int)
+0:54 3 (const int)
+0:55 add second child into first child (temp 4-component vector of float)
+0:55 'v' (temp 4-component vector of float)
+0:55 Convert int to float (temp 4-component vector of float)
+0:55 'iv' (temp 4-component vector of int)
+0:56 move second child to first child (temp 4-component vector of int)
+0:56 'iv' (temp 4-component vector of int)
+0:56 textureProjLod (global 4-component vector of int)
+0:56 'is2D' (uniform isampler2D)
+0:56 'c3D' (smooth in 3-component vector of float)
+0:56 'c1D' (smooth in float)
+0:57 add second child into first child (temp 4-component vector of float)
+0:57 'v' (temp 4-component vector of float)
+0:57 Convert int to float (temp 4-component vector of float)
+0:57 'iv' (temp 4-component vector of int)
+0:58 move second child to first child (temp 4-component vector of int)
+0:58 'iv' (temp 4-component vector of int)
+0:58 textureProjGrad (global 4-component vector of int)
+0:58 'is2D' (uniform isampler2D)
+0:58 'c3D' (smooth in 3-component vector of float)
+0:58 'c2D' (smooth in 2-component vector of float)
+0:58 'c2D' (smooth in 2-component vector of float)
+0:59 add second child into first child (temp 4-component vector of float)
+0:59 'v' (temp 4-component vector of float)
+0:59 Convert int to float (temp 4-component vector of float)
+0:59 'iv' (temp 4-component vector of int)
+0:60 move second child to first child (temp 4-component vector of int)
+0:60 'iv' (temp 4-component vector of int)
+0:60 texture (global 4-component vector of int)
+0:60 'is3D' (uniform isampler3D)
+0:60 'c3D' (smooth in 3-component vector of float)
+0:60 Constant:
+0:60 4.200000
+0:61 add second child into first child (temp 4-component vector of float)
+0:61 'v' (temp 4-component vector of float)
+0:61 Convert int to float (temp 4-component vector of float)
+0:61 'iv' (temp 4-component vector of int)
+0:62 move second child to first child (temp 4-component vector of int)
+0:62 'iv' (temp 4-component vector of int)
+0:62 textureLod (global 4-component vector of int)
+0:62 'isCube' (uniform isamplerCube)
+0:62 'c3D' (smooth in 3-component vector of float)
+0:62 'c1D' (smooth in float)
+0:63 add second child into first child (temp 4-component vector of float)
+0:63 'v' (temp 4-component vector of float)
+0:63 Convert int to float (temp 4-component vector of float)
+0:63 'iv' (temp 4-component vector of int)
+0:64 move second child to first child (temp 4-component vector of int)
+0:64 'iv' (temp 4-component vector of int)
+0:64 textureFetch (global 4-component vector of int)
+0:64 'is2DArray' (uniform isampler2DArray)
+0:64 'ic3D' (flat in 3-component vector of int)
+0:64 'ic1D' (flat in int)
+0:65 add second child into first child (temp 4-component vector of float)
+0:65 'v' (temp 4-component vector of float)
+0:65 Convert int to float (temp 4-component vector of float)
+0:65 'iv' (temp 4-component vector of int)
+0:66 add second child into first child (temp 4-component vector of int)
+0:66 'iv' (temp 4-component vector of int)
+0:66 textureFetch (global 4-component vector of int)
+0:66 'is2Dms' (uniform isampler2DMS)
+0:66 'ic2D' (flat in 2-component vector of int)
+0:66 'ic1D' (flat in int)
+0:67 add second child into first child (temp 4-component vector of float)
+0:67 'v' (temp 4-component vector of float)
+0:67 Convert int to float (temp 4-component vector of float)
+0:67 'iv' (temp 4-component vector of int)
+0:68 add second child into first child (temp 4-component vector of float)
+0:68 'v' (temp 4-component vector of float)
+0:68 textureFetch (global 4-component vector of float)
+0:68 'sb' (uniform samplerBuffer)
+0:68 'ic1D' (flat in int)
+0:69 add second child into first child (temp 4-component vector of float)
+0:69 'v' (temp 4-component vector of float)
+0:69 textureFetch (global 4-component vector of float)
+0:69 'sr' (uniform sampler2DRect)
+0:69 'ic2D' (flat in 2-component vector of int)
+0:71 Sequence
+0:71 move second child to first child (temp 2-component vector of int)
+0:71 'iv2' (temp 2-component vector of int)
+0:71 textureSize (global 2-component vector of int)
+0:71 'sCubeShadow' (uniform samplerCubeShadow)
+0:71 Constant:
+0:71 2 (const int)
+0:74 move second child to first child (temp 4-component vector of float)
+0:74 'FragData' (out 4-component vector of float)
+0:74 add (temp 4-component vector of float)
+0:74 'v' (temp 4-component vector of float)
+0:74 Construct vec4 (temp 4-component vector of float)
+0:74 Convert int to float (temp 2-component vector of float)
+0:74 'iv2' (temp 2-component vector of int)
+0:74 Constant:
+0:74 0.000000
+0:74 Constant:
+0:74 0.000000
+0:? Linker Objects
+0:? 'sb' (uniform samplerBuffer)
+0:? 'sr' (uniform sampler2DRect)
+0:? 's2D' (uniform sampler2D)
+0:? 's3D' (uniform sampler3D)
+0:? 'sCube' (uniform samplerCube)
+0:? 'sCubeShadow' (uniform samplerCubeShadow)
+0:? 's2DShadow' (uniform sampler2DShadow)
+0:? 's2DArray' (uniform sampler2DArray)
+0:? 's2DArrayShadow' (uniform sampler2DArrayShadow)
+0:? 'is2D' (uniform isampler2D)
+0:? 'is3D' (uniform isampler3D)
+0:? 'isCube' (uniform isamplerCube)
+0:? 'is2DArray' (uniform isampler2DArray)
+0:? 'is2Dms' (uniform isampler2DMS)
+0:? 'us2D' (uniform usampler2D)
+0:? 'us3D' (uniform usampler3D)
+0:? 'usCube' (uniform usamplerCube)
+0:? 'us2DArray' (uniform usampler2DArray)
+0:? 'c1D' (smooth in float)
+0:? 'c2D' (smooth in 2-component vector of float)
+0:? 'c3D' (smooth in 3-component vector of float)
+0:? 'c4D' (smooth in 4-component vector of float)
+0:? 'ic1D' (flat in int)
+0:? 'ic2D' (flat in 2-component vector of int)
+0:? 'ic3D' (flat in 3-component vector of int)
+0:? 'ic4D' (flat in 4-component vector of int)
+0:? 'FragData' (out 4-component vector of float)
+
diff --git a/chromium/third_party/glslang/src/Test/baseResults/noMain.vert.out b/chromium/third_party/glslang/src/Test/baseResults/noMain.vert.out
new file mode 100644
index 00000000000..630af95564f
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/noMain.vert.out
@@ -0,0 +1,45 @@
+noMain.vert
+Shader version: 300
+0:? Sequence
+0:3 Function Definition: foo( (global void)
+0:3 Function Parameters:
+0:? Linker Objects
+0:? 'gl_VertexID' (gl_VertexId highp int VertexId)
+0:? 'gl_InstanceID' (gl_InstanceId highp int InstanceId)
+
+mains.frag
+ERROR: 0:7: 'main' : function already has a body
+ERROR: 1 compilation errors. No code generated.
+
+
+Shader version: 300
+ERROR: node is still EOpNull!
+0:3 Function Definition: main( (global void)
+0:3 Function Parameters:
+0:7 Function Definition: main( (global void)
+0:7 Function Parameters:
+0:? Linker Objects
+
+
+Linked vertex stage:
+
+ERROR: Linking vertex stage: Missing entry point: Each stage requires one "void main()" entry point
+
+Linked fragment stage:
+
+
+Shader version: 300
+0:? Sequence
+0:3 Function Definition: foo( (global void)
+0:3 Function Parameters:
+0:? Linker Objects
+0:? 'gl_VertexID' (gl_VertexId highp int VertexId)
+0:? 'gl_InstanceID' (gl_InstanceId highp int InstanceId)
+Shader version: 300
+ERROR: node is still EOpNull!
+0:3 Function Definition: main( (global void)
+0:3 Function Parameters:
+0:7 Function Definition: main( (global void)
+0:7 Function Parameters:
+0:? Linker Objects
+
diff --git a/chromium/third_party/glslang/src/Test/baseResults/nonSquare.vert.out b/chromium/third_party/glslang/src/Test/baseResults/nonSquare.vert.out
new file mode 100644
index 00000000000..c0753696a23
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/nonSquare.vert.out
@@ -0,0 +1,183 @@
+nonSquare.vert
+Shader version: 120
+0:? Sequence
+0:15 Function Definition: main( (global void)
+0:15 Function Parameters:
+0:? Sequence
+0:20 move second child to first child (temp 2-component vector of float)
+0:20 'a' (temp 2-component vector of float)
+0:20 vector-times-matrix (temp 2-component vector of float)
+0:20 'v3' (in 3-component vector of float)
+0:20 'm23' (temp 2X3 matrix of float)
+0:21 move second child to first child (temp 2-component vector of float)
+0:21 'b' (temp 2-component vector of float)
+0:21 matrix-times-vector (temp 2-component vector of float)
+0:21 'm32' (uniform 3X2 matrix of float)
+0:21 'v3' (in 3-component vector of float)
+0:23 move second child to first child (temp 4-component vector of float)
+0:23 'gl_Position' (gl_Position 4-component vector of float Position)
+0:24 add (temp 4-component vector of float)
+0:24 add (temp 4-component vector of float)
+0:24 add (temp 4-component vector of float)
+0:23 add (temp 4-component vector of float)
+0:23 Construct vec4 (temp 4-component vector of float)
+0:23 matrix-times-vector (temp 3-component vector of float)
+0:23 matrix-multiply (temp 3X3 matrix of float)
+0:23 'm23' (temp 2X3 matrix of float)
+0:23 'm32' (uniform 3X2 matrix of float)
+0:23 'v3' (in 3-component vector of float)
+0:23 Constant:
+0:23 0.000000
+0:24 matrix-times-vector (temp 4-component vector of float)
+0:24 Constant:
+0:24 3.000000
+0:24 6.000000
+0:24 0.000000
+0:24 0.000000
+0:24 9.000000
+0:24 12.000000
+0:24 0.000000
+0:24 0.000000
+0:24 15.000000
+0:24 18.000000
+0:24 0.000000
+0:24 0.000000
+0:24 21.000000
+0:24 24.000000
+0:24 0.000000
+0:24 0.000000
+0:24 'v4' (in 4-component vector of float)
+0:24 Constant:
+0:24 50.000000
+0:24 110.000000
+0:24 170.000000
+0:24 230.000000
+0:24 Constant:
+0:24 30.000000
+0:24 60.000000
+0:24 0.000000
+0:24 0.000000
+0:24 Constant:
+0:24 20.000000
+0:24 10.000000
+0:24 6.000000
+0:24 5.000000
+0:? Linker Objects
+0:? 'v3' (in 3-component vector of float)
+0:? 'v4' (in 4-component vector of float)
+0:? 'm32' (uniform 3X2 matrix of float)
+0:? 'cv2' (const 2-component vector of float)
+0:? 10.000000
+0:? 20.000000
+0:? 'm24' (const 2X4 matrix of float)
+0:? 3.000000
+0:? 0.000000
+0:? 0.000000
+0:? 0.000000
+0:? 0.000000
+0:? 3.000000
+0:? 0.000000
+0:? 0.000000
+0:? 'm42' (const 4X2 matrix of float)
+0:? 1.000000
+0:? 2.000000
+0:? 3.000000
+0:? 4.000000
+0:? 5.000000
+0:? 6.000000
+0:? 7.000000
+0:? 8.000000
+
+
+Linked vertex stage:
+
+
+Shader version: 120
+0:? Sequence
+0:15 Function Definition: main( (global void)
+0:15 Function Parameters:
+0:? Sequence
+0:20 move second child to first child (temp 2-component vector of float)
+0:20 'a' (temp 2-component vector of float)
+0:20 vector-times-matrix (temp 2-component vector of float)
+0:20 'v3' (in 3-component vector of float)
+0:20 'm23' (temp 2X3 matrix of float)
+0:21 move second child to first child (temp 2-component vector of float)
+0:21 'b' (temp 2-component vector of float)
+0:21 matrix-times-vector (temp 2-component vector of float)
+0:21 'm32' (uniform 3X2 matrix of float)
+0:21 'v3' (in 3-component vector of float)
+0:23 move second child to first child (temp 4-component vector of float)
+0:23 'gl_Position' (gl_Position 4-component vector of float Position)
+0:24 add (temp 4-component vector of float)
+0:24 add (temp 4-component vector of float)
+0:24 add (temp 4-component vector of float)
+0:23 add (temp 4-component vector of float)
+0:23 Construct vec4 (temp 4-component vector of float)
+0:23 matrix-times-vector (temp 3-component vector of float)
+0:23 matrix-multiply (temp 3X3 matrix of float)
+0:23 'm23' (temp 2X3 matrix of float)
+0:23 'm32' (uniform 3X2 matrix of float)
+0:23 'v3' (in 3-component vector of float)
+0:23 Constant:
+0:23 0.000000
+0:24 matrix-times-vector (temp 4-component vector of float)
+0:24 Constant:
+0:24 3.000000
+0:24 6.000000
+0:24 0.000000
+0:24 0.000000
+0:24 9.000000
+0:24 12.000000
+0:24 0.000000
+0:24 0.000000
+0:24 15.000000
+0:24 18.000000
+0:24 0.000000
+0:24 0.000000
+0:24 21.000000
+0:24 24.000000
+0:24 0.000000
+0:24 0.000000
+0:24 'v4' (in 4-component vector of float)
+0:24 Constant:
+0:24 50.000000
+0:24 110.000000
+0:24 170.000000
+0:24 230.000000
+0:24 Constant:
+0:24 30.000000
+0:24 60.000000
+0:24 0.000000
+0:24 0.000000
+0:24 Constant:
+0:24 20.000000
+0:24 10.000000
+0:24 6.000000
+0:24 5.000000
+0:? Linker Objects
+0:? 'v3' (in 3-component vector of float)
+0:? 'v4' (in 4-component vector of float)
+0:? 'm32' (uniform 3X2 matrix of float)
+0:? 'cv2' (const 2-component vector of float)
+0:? 10.000000
+0:? 20.000000
+0:? 'm24' (const 2X4 matrix of float)
+0:? 3.000000
+0:? 0.000000
+0:? 0.000000
+0:? 0.000000
+0:? 0.000000
+0:? 3.000000
+0:? 0.000000
+0:? 0.000000
+0:? 'm42' (const 4X2 matrix of float)
+0:? 1.000000
+0:? 2.000000
+0:? 3.000000
+0:? 4.000000
+0:? 5.000000
+0:? 6.000000
+0:? 7.000000
+0:? 8.000000
+
diff --git a/chromium/third_party/glslang/src/Test/baseResults/nonVulkan.frag.out b/chromium/third_party/glslang/src/Test/baseResults/nonVulkan.frag.out
new file mode 100644
index 00000000000..10c693c0abc
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/nonVulkan.frag.out
@@ -0,0 +1,30 @@
+nonVulkan.frag
+Warning, version 450 is not yet complete; most version-specific features are present, but some are missing.
+ERROR: 0:3: 'constant_id' : only allowed when generating SPIR-V
+ERROR: 0:4: 'input_attachment_index' : only allowed when using GLSL for Vulkan
+ERROR: 0:4: 'input_attachment_index' : can only be used with a subpass
+ERROR: 0:5: 'push_constant' : only allowed when using GLSL for Vulkan
+ERROR: 4 compilation errors. No code generated.
+
+
+Shader version: 450
+ERROR: node is still EOpNull!
+0:? Linker Objects
+0:? 'arraySize' (specialization-constant const int)
+0:? 12 (const int)
+0:? 'foo' (temp int)
+0:? 'ubi' (layout(column_major std430 push_constant ) uniform block{layout(column_major std430 offset=0 ) uniform int a})
+
+
+Linked fragment stage:
+
+ERROR: Linking fragment stage: Missing entry point: Each stage requires one "void main()" entry point
+
+Shader version: 450
+ERROR: node is still EOpNull!
+0:? Linker Objects
+0:? 'arraySize' (specialization-constant const int)
+0:? 12 (const int)
+0:? 'foo' (temp int)
+0:? 'ubi' (layout(column_major std430 push_constant ) uniform block{layout(column_major std430 offset=0 ) uniform int a})
+
diff --git a/chromium/third_party/glslang/src/Test/baseResults/numeral.frag.out b/chromium/third_party/glslang/src/Test/baseResults/numeral.frag.out
new file mode 100644
index 00000000000..6f5595c8f83
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/numeral.frag.out
@@ -0,0 +1,829 @@
+numeral.frag
+Warning, version 400 is not yet complete; most version-specific features are present, but some are missing.
+ERROR: 0:14: '' : octal literal digit too large
+ERROR: 0:15: '' : octal literal digit too large
+ERROR: 0:16: '' : octal literal digit too large
+ERROR: 0:17: '' : octal literal too big
+ERROR: 0:18: '' : octal literal too big
+ERROR: 0:23: '' : octal literal digit too large
+ERROR: 0:24: '' : octal literal digit too large
+ERROR: 0:49: '' : bad digit in hexidecimal literal
+ERROR: 0:50: '' : hexidecimal literal too big
+ERROR: 0:88: '' : float literal needs a decimal point or exponent
+ERROR: 0:98: '' : numeric literal too big
+ERROR: 0:101: '' : numeric literal too big
+ERROR: 12 compilation errors. No code generated.
+
+
+Shader version: 400
+ERROR: node is still EOpNull!
+0:3 Function Definition: main( (global void)
+0:3 Function Parameters:
+0:5 Sequence
+0:5 Sequence
+0:5 move second child to first child (temp int)
+0:5 'o00' (temp int)
+0:5 Constant:
+0:5 0 (const int)
+0:6 Sequence
+0:6 move second child to first child (temp int)
+0:6 'o000' (temp int)
+0:6 Constant:
+0:6 0 (const int)
+0:7 Sequence
+0:7 move second child to first child (temp int)
+0:7 'o0000' (temp int)
+0:7 Constant:
+0:7 0 (const int)
+0:8 Sequence
+0:8 move second child to first child (temp int)
+0:8 'o5' (temp int)
+0:8 Constant:
+0:8 5 (const int)
+0:9 Sequence
+0:9 move second child to first child (temp int)
+0:9 'o05' (temp int)
+0:9 Constant:
+0:9 5 (const int)
+0:10 Sequence
+0:10 move second child to first child (temp int)
+0:10 'o006' (temp int)
+0:10 Constant:
+0:10 6 (const int)
+0:11 Sequence
+0:11 move second child to first child (temp int)
+0:11 'o7' (temp int)
+0:11 Constant:
+0:11 7 (const int)
+0:12 Sequence
+0:12 move second child to first child (temp int)
+0:12 'o58' (temp int)
+0:12 Constant:
+0:12 58 (const int)
+0:13 Sequence
+0:13 move second child to first child (temp int)
+0:13 'omax' (temp int)
+0:13 Constant:
+0:13 -1 (const int)
+0:14 Sequence
+0:14 move second child to first child (temp int)
+0:14 'o8' (temp int)
+0:14 Constant:
+0:14 0 (const int)
+0:15 Sequence
+0:15 move second child to first child (temp int)
+0:15 'o08' (temp int)
+0:15 Constant:
+0:15 0 (const int)
+0:16 Sequence
+0:16 move second child to first child (temp int)
+0:16 'o009' (temp int)
+0:16 Constant:
+0:16 0 (const int)
+0:17 Sequence
+0:17 move second child to first child (temp int)
+0:17 'obig' (temp int)
+0:17 Constant:
+0:17 995208915 (const int)
+0:18 Sequence
+0:18 move second child to first child (temp int)
+0:18 'omax1' (temp int)
+0:18 Constant:
+0:18 536870912 (const int)
+0:20 Sequence
+0:20 move second child to first child (temp uint)
+0:20 'uo5' (temp uint)
+0:20 Constant:
+0:20 5 (const uint)
+0:21 Sequence
+0:21 move second child to first child (temp uint)
+0:21 'uo6' (temp uint)
+0:21 Constant:
+0:21 6 (const uint)
+0:22 Sequence
+0:22 move second child to first child (temp uint)
+0:22 'uo7' (temp uint)
+0:22 Constant:
+0:22 7 (const uint)
+0:23 Sequence
+0:23 move second child to first child (temp uint)
+0:23 'uo8' (temp uint)
+0:23 Constant:
+0:23 0 (const uint)
+0:24 Sequence
+0:24 move second child to first child (temp uint)
+0:24 'uo9' (temp uint)
+0:24 Constant:
+0:24 0 (const uint)
+0:26 Sequence
+0:26 move second child to first child (temp int)
+0:26 'h0' (temp int)
+0:26 Constant:
+0:26 0 (const int)
+0:27 Sequence
+0:27 move second child to first child (temp int)
+0:27 'h00' (temp int)
+0:27 Constant:
+0:27 0 (const int)
+0:28 Sequence
+0:28 move second child to first child (temp int)
+0:28 'h000' (temp int)
+0:28 Constant:
+0:28 0 (const int)
+0:29 Sequence
+0:29 move second child to first child (temp int)
+0:29 'h1' (temp int)
+0:29 Constant:
+0:29 1 (const int)
+0:30 Sequence
+0:30 move second child to first child (temp int)
+0:30 'h2' (temp int)
+0:30 Constant:
+0:30 2 (const int)
+0:31 Sequence
+0:31 move second child to first child (temp int)
+0:31 'h300' (temp int)
+0:31 Constant:
+0:31 768 (const int)
+0:32 Sequence
+0:32 move second child to first child (temp int)
+0:32 'hABCDEF' (temp int)
+0:32 Constant:
+0:32 11259375 (const int)
+0:33 Sequence
+0:33 move second child to first child (temp int)
+0:33 'hFFFFFFFF' (temp int)
+0:33 Constant:
+0:33 -1 (const int)
+0:34 Sequence
+0:34 move second child to first child (temp int)
+0:34 'h12345678' (temp int)
+0:34 Constant:
+0:34 12345678 (const int)
+0:35 Sequence
+0:35 move second child to first child (temp int)
+0:35 'hToBeOrNotToBe' (temp int)
+0:35 Constant:
+0:35 -1 (const int)
+0:37 Sequence
+0:37 move second child to first child (temp uint)
+0:37 'uh0' (temp uint)
+0:37 Constant:
+0:37 0 (const uint)
+0:38 Sequence
+0:38 move second child to first child (temp uint)
+0:38 'uhg' (temp uint)
+0:38 Constant:
+0:38 12 (const uint)
+0:39 Sequence
+0:39 move second child to first child (temp uint)
+0:39 'uh000' (temp uint)
+0:39 Constant:
+0:39 0 (const uint)
+0:40 Sequence
+0:40 move second child to first child (temp uint)
+0:40 'uh1' (temp uint)
+0:40 Constant:
+0:40 1 (const uint)
+0:41 Sequence
+0:41 move second child to first child (temp uint)
+0:41 'uh2' (temp uint)
+0:41 Constant:
+0:41 2 (const uint)
+0:42 Sequence
+0:42 move second child to first child (temp uint)
+0:42 'uh300' (temp uint)
+0:42 Constant:
+0:42 768 (const uint)
+0:43 Sequence
+0:43 move second child to first child (temp uint)
+0:43 'uhABCDEF' (temp uint)
+0:43 Constant:
+0:43 11259375 (const uint)
+0:44 Sequence
+0:44 move second child to first child (temp uint)
+0:44 'uhFFFFFFFF' (temp uint)
+0:44 Constant:
+0:44 4294967295 (const uint)
+0:45 Sequence
+0:45 move second child to first child (temp uint)
+0:45 'uh12345678' (temp uint)
+0:45 Constant:
+0:45 12345678 (const uint)
+0:46 Sequence
+0:46 move second child to first child (temp uint)
+0:46 'uhToBeOrNotToBe' (temp uint)
+0:46 Constant:
+0:46 4294967295 (const uint)
+0:49 Sequence
+0:49 move second child to first child (temp int)
+0:49 'he2' (temp int)
+0:49 Constant:
+0:49 0 (const int)
+0:50 Sequence
+0:50 move second child to first child (temp int)
+0:50 'hbig' (temp int)
+0:50 Constant:
+0:50 -1 (const int)
+0:52 Sequence
+0:52 move second child to first child (temp float)
+0:52 'f1' (temp float)
+0:52 Constant:
+0:52 1.000000
+0:53 Sequence
+0:53 move second child to first child (temp float)
+0:53 'f2' (temp float)
+0:53 Constant:
+0:53 2.000000
+0:54 Sequence
+0:54 move second child to first child (temp float)
+0:54 'f3' (temp float)
+0:54 Constant:
+0:54 3.000000
+0:55 Sequence
+0:55 move second child to first child (temp float)
+0:55 'f4' (temp float)
+0:55 Constant:
+0:55 4.000000
+0:56 Sequence
+0:56 move second child to first child (temp float)
+0:56 'f5' (temp float)
+0:56 Constant:
+0:56 5.000000
+0:57 Sequence
+0:57 move second child to first child (temp float)
+0:57 'f6' (temp float)
+0:57 Constant:
+0:57 6.000000
+0:58 Sequence
+0:58 move second child to first child (temp float)
+0:58 'f7' (temp float)
+0:58 Constant:
+0:58 7.000000
+0:59 Sequence
+0:59 move second child to first child (temp float)
+0:59 'f8' (temp float)
+0:59 Constant:
+0:59 8.000000
+0:60 Sequence
+0:60 move second child to first child (temp float)
+0:60 'f9' (temp float)
+0:60 Constant:
+0:60 9.000000
+0:61 Sequence
+0:61 move second child to first child (temp float)
+0:61 'f10' (temp float)
+0:61 Constant:
+0:61 10.000000
+0:62 Sequence
+0:62 move second child to first child (temp float)
+0:62 'f11' (temp float)
+0:62 Constant:
+0:62 11.000000
+0:63 Sequence
+0:63 move second child to first child (temp float)
+0:63 'f12' (temp float)
+0:63 Constant:
+0:63 12.000000
+0:64 Sequence
+0:64 move second child to first child (temp float)
+0:64 'f543' (temp float)
+0:64 Constant:
+0:64 543.000000
+0:65 Sequence
+0:65 move second child to first child (temp float)
+0:65 'f6789' (temp float)
+0:65 Constant:
+0:65 6789.000000
+0:66 Sequence
+0:66 move second child to first child (temp float)
+0:66 'f88' (temp float)
+0:66 Constant:
+0:66 88.000000
+0:68 Sequence
+0:68 move second child to first child (temp float)
+0:68 'g1' (temp float)
+0:68 Constant:
+0:68 53876.000000
+0:69 Sequence
+0:69 move second child to first child (temp float)
+0:69 'g2' (temp float)
+0:69 Constant:
+0:69 0.040000
+0:70 Sequence
+0:70 move second child to first child (temp float)
+0:70 'g3' (temp float)
+0:70 Constant:
+0:70 100000.000000
+0:71 Sequence
+0:71 move second child to first child (temp float)
+0:71 'g4' (temp float)
+0:71 Constant:
+0:71 0.007321
+0:72 Sequence
+0:72 move second child to first child (temp float)
+0:72 'g5' (temp float)
+0:72 Constant:
+0:72 32000.000000
+0:73 Sequence
+0:73 move second child to first child (temp float)
+0:73 'g6' (temp float)
+0:73 Constant:
+0:73 0.000005
+0:74 Sequence
+0:74 move second child to first child (temp float)
+0:74 'g7' (temp float)
+0:74 Constant:
+0:74 0.450000
+0:75 Sequence
+0:75 move second child to first child (temp float)
+0:75 'g8' (temp float)
+0:75 Constant:
+0:75 60000000000.000000
+0:77 Sequence
+0:77 move second child to first child (temp double)
+0:77 'gf1' (temp double)
+0:77 Constant:
+0:77 1.000000
+0:78 Sequence
+0:78 move second child to first child (temp double)
+0:78 'gf2' (temp double)
+0:78 Constant:
+0:78 2.000000
+0:79 Sequence
+0:79 move second child to first child (temp double)
+0:79 'gf3' (temp double)
+0:79 Constant:
+0:79 3.000000
+0:80 Sequence
+0:80 move second child to first child (temp double)
+0:80 'gf4' (temp double)
+0:80 Constant:
+0:80 4.000000
+0:81 Sequence
+0:81 move second child to first child (temp float)
+0:81 'gf5' (temp float)
+0:81 Constant:
+0:81 5.000000
+0:82 Sequence
+0:82 move second child to first child (temp float)
+0:82 'gf6' (temp float)
+0:82 Constant:
+0:82 6.000000
+0:88 Sequence
+0:88 move second child to first child (temp float)
+0:88 'e5' (temp float)
+0:88 Constant:
+0:88 5.000000
+0:98 Sequence
+0:98 move second child to first child (temp uint)
+0:98 'g1' (global uint)
+0:98 Constant:
+0:98 4294967295 (const uint)
+0:99 Sequence
+0:99 move second child to first child (temp uint)
+0:99 'g2' (global uint)
+0:99 Constant:
+0:99 4294967295 (const uint)
+0:100 Sequence
+0:100 move second child to first child (temp uint)
+0:100 'g3' (global uint)
+0:100 Constant:
+0:100 4294967294 (const uint)
+0:101 Sequence
+0:101 move second child to first child (temp int)
+0:101 'g4' (global int)
+0:101 Constant:
+0:101 -1 (const int)
+0:102 Sequence
+0:102 move second child to first child (temp int)
+0:102 'g5' (global int)
+0:102 Constant:
+0:102 -1 (const int)
+0:103 Sequence
+0:103 move second child to first child (temp int)
+0:103 'g6' (global int)
+0:103 Constant:
+0:103 -2 (const int)
+0:? Linker Objects
+0:? 'c2' (layout(location=2 ) out 4-component vector of float)
+0:? 'c3' (layout(location=3 ) out 4-component vector of float)
+0:? 'c4' (layout(location=4 ) out 4-component vector of float)
+0:? 'c5' (layout(location=5 ) out 4-component vector of float)
+0:? 'c6' (layout(location=6 ) out 4-component vector of float)
+0:? 'c7' (layout(location=7 ) out 4-component vector of float)
+0:? 'g1' (global uint)
+0:? 'g2' (global uint)
+0:? 'g3' (global uint)
+0:? 'g4' (global int)
+0:? 'g5' (global int)
+0:? 'g6' (global int)
+
+
+Linked fragment stage:
+
+
+Shader version: 400
+ERROR: node is still EOpNull!
+0:3 Function Definition: main( (global void)
+0:3 Function Parameters:
+0:5 Sequence
+0:5 Sequence
+0:5 move second child to first child (temp int)
+0:5 'o00' (temp int)
+0:5 Constant:
+0:5 0 (const int)
+0:6 Sequence
+0:6 move second child to first child (temp int)
+0:6 'o000' (temp int)
+0:6 Constant:
+0:6 0 (const int)
+0:7 Sequence
+0:7 move second child to first child (temp int)
+0:7 'o0000' (temp int)
+0:7 Constant:
+0:7 0 (const int)
+0:8 Sequence
+0:8 move second child to first child (temp int)
+0:8 'o5' (temp int)
+0:8 Constant:
+0:8 5 (const int)
+0:9 Sequence
+0:9 move second child to first child (temp int)
+0:9 'o05' (temp int)
+0:9 Constant:
+0:9 5 (const int)
+0:10 Sequence
+0:10 move second child to first child (temp int)
+0:10 'o006' (temp int)
+0:10 Constant:
+0:10 6 (const int)
+0:11 Sequence
+0:11 move second child to first child (temp int)
+0:11 'o7' (temp int)
+0:11 Constant:
+0:11 7 (const int)
+0:12 Sequence
+0:12 move second child to first child (temp int)
+0:12 'o58' (temp int)
+0:12 Constant:
+0:12 58 (const int)
+0:13 Sequence
+0:13 move second child to first child (temp int)
+0:13 'omax' (temp int)
+0:13 Constant:
+0:13 -1 (const int)
+0:14 Sequence
+0:14 move second child to first child (temp int)
+0:14 'o8' (temp int)
+0:14 Constant:
+0:14 0 (const int)
+0:15 Sequence
+0:15 move second child to first child (temp int)
+0:15 'o08' (temp int)
+0:15 Constant:
+0:15 0 (const int)
+0:16 Sequence
+0:16 move second child to first child (temp int)
+0:16 'o009' (temp int)
+0:16 Constant:
+0:16 0 (const int)
+0:17 Sequence
+0:17 move second child to first child (temp int)
+0:17 'obig' (temp int)
+0:17 Constant:
+0:17 995208915 (const int)
+0:18 Sequence
+0:18 move second child to first child (temp int)
+0:18 'omax1' (temp int)
+0:18 Constant:
+0:18 536870912 (const int)
+0:20 Sequence
+0:20 move second child to first child (temp uint)
+0:20 'uo5' (temp uint)
+0:20 Constant:
+0:20 5 (const uint)
+0:21 Sequence
+0:21 move second child to first child (temp uint)
+0:21 'uo6' (temp uint)
+0:21 Constant:
+0:21 6 (const uint)
+0:22 Sequence
+0:22 move second child to first child (temp uint)
+0:22 'uo7' (temp uint)
+0:22 Constant:
+0:22 7 (const uint)
+0:23 Sequence
+0:23 move second child to first child (temp uint)
+0:23 'uo8' (temp uint)
+0:23 Constant:
+0:23 0 (const uint)
+0:24 Sequence
+0:24 move second child to first child (temp uint)
+0:24 'uo9' (temp uint)
+0:24 Constant:
+0:24 0 (const uint)
+0:26 Sequence
+0:26 move second child to first child (temp int)
+0:26 'h0' (temp int)
+0:26 Constant:
+0:26 0 (const int)
+0:27 Sequence
+0:27 move second child to first child (temp int)
+0:27 'h00' (temp int)
+0:27 Constant:
+0:27 0 (const int)
+0:28 Sequence
+0:28 move second child to first child (temp int)
+0:28 'h000' (temp int)
+0:28 Constant:
+0:28 0 (const int)
+0:29 Sequence
+0:29 move second child to first child (temp int)
+0:29 'h1' (temp int)
+0:29 Constant:
+0:29 1 (const int)
+0:30 Sequence
+0:30 move second child to first child (temp int)
+0:30 'h2' (temp int)
+0:30 Constant:
+0:30 2 (const int)
+0:31 Sequence
+0:31 move second child to first child (temp int)
+0:31 'h300' (temp int)
+0:31 Constant:
+0:31 768 (const int)
+0:32 Sequence
+0:32 move second child to first child (temp int)
+0:32 'hABCDEF' (temp int)
+0:32 Constant:
+0:32 11259375 (const int)
+0:33 Sequence
+0:33 move second child to first child (temp int)
+0:33 'hFFFFFFFF' (temp int)
+0:33 Constant:
+0:33 -1 (const int)
+0:34 Sequence
+0:34 move second child to first child (temp int)
+0:34 'h12345678' (temp int)
+0:34 Constant:
+0:34 12345678 (const int)
+0:35 Sequence
+0:35 move second child to first child (temp int)
+0:35 'hToBeOrNotToBe' (temp int)
+0:35 Constant:
+0:35 -1 (const int)
+0:37 Sequence
+0:37 move second child to first child (temp uint)
+0:37 'uh0' (temp uint)
+0:37 Constant:
+0:37 0 (const uint)
+0:38 Sequence
+0:38 move second child to first child (temp uint)
+0:38 'uhg' (temp uint)
+0:38 Constant:
+0:38 12 (const uint)
+0:39 Sequence
+0:39 move second child to first child (temp uint)
+0:39 'uh000' (temp uint)
+0:39 Constant:
+0:39 0 (const uint)
+0:40 Sequence
+0:40 move second child to first child (temp uint)
+0:40 'uh1' (temp uint)
+0:40 Constant:
+0:40 1 (const uint)
+0:41 Sequence
+0:41 move second child to first child (temp uint)
+0:41 'uh2' (temp uint)
+0:41 Constant:
+0:41 2 (const uint)
+0:42 Sequence
+0:42 move second child to first child (temp uint)
+0:42 'uh300' (temp uint)
+0:42 Constant:
+0:42 768 (const uint)
+0:43 Sequence
+0:43 move second child to first child (temp uint)
+0:43 'uhABCDEF' (temp uint)
+0:43 Constant:
+0:43 11259375 (const uint)
+0:44 Sequence
+0:44 move second child to first child (temp uint)
+0:44 'uhFFFFFFFF' (temp uint)
+0:44 Constant:
+0:44 4294967295 (const uint)
+0:45 Sequence
+0:45 move second child to first child (temp uint)
+0:45 'uh12345678' (temp uint)
+0:45 Constant:
+0:45 12345678 (const uint)
+0:46 Sequence
+0:46 move second child to first child (temp uint)
+0:46 'uhToBeOrNotToBe' (temp uint)
+0:46 Constant:
+0:46 4294967295 (const uint)
+0:49 Sequence
+0:49 move second child to first child (temp int)
+0:49 'he2' (temp int)
+0:49 Constant:
+0:49 0 (const int)
+0:50 Sequence
+0:50 move second child to first child (temp int)
+0:50 'hbig' (temp int)
+0:50 Constant:
+0:50 -1 (const int)
+0:52 Sequence
+0:52 move second child to first child (temp float)
+0:52 'f1' (temp float)
+0:52 Constant:
+0:52 1.000000
+0:53 Sequence
+0:53 move second child to first child (temp float)
+0:53 'f2' (temp float)
+0:53 Constant:
+0:53 2.000000
+0:54 Sequence
+0:54 move second child to first child (temp float)
+0:54 'f3' (temp float)
+0:54 Constant:
+0:54 3.000000
+0:55 Sequence
+0:55 move second child to first child (temp float)
+0:55 'f4' (temp float)
+0:55 Constant:
+0:55 4.000000
+0:56 Sequence
+0:56 move second child to first child (temp float)
+0:56 'f5' (temp float)
+0:56 Constant:
+0:56 5.000000
+0:57 Sequence
+0:57 move second child to first child (temp float)
+0:57 'f6' (temp float)
+0:57 Constant:
+0:57 6.000000
+0:58 Sequence
+0:58 move second child to first child (temp float)
+0:58 'f7' (temp float)
+0:58 Constant:
+0:58 7.000000
+0:59 Sequence
+0:59 move second child to first child (temp float)
+0:59 'f8' (temp float)
+0:59 Constant:
+0:59 8.000000
+0:60 Sequence
+0:60 move second child to first child (temp float)
+0:60 'f9' (temp float)
+0:60 Constant:
+0:60 9.000000
+0:61 Sequence
+0:61 move second child to first child (temp float)
+0:61 'f10' (temp float)
+0:61 Constant:
+0:61 10.000000
+0:62 Sequence
+0:62 move second child to first child (temp float)
+0:62 'f11' (temp float)
+0:62 Constant:
+0:62 11.000000
+0:63 Sequence
+0:63 move second child to first child (temp float)
+0:63 'f12' (temp float)
+0:63 Constant:
+0:63 12.000000
+0:64 Sequence
+0:64 move second child to first child (temp float)
+0:64 'f543' (temp float)
+0:64 Constant:
+0:64 543.000000
+0:65 Sequence
+0:65 move second child to first child (temp float)
+0:65 'f6789' (temp float)
+0:65 Constant:
+0:65 6789.000000
+0:66 Sequence
+0:66 move second child to first child (temp float)
+0:66 'f88' (temp float)
+0:66 Constant:
+0:66 88.000000
+0:68 Sequence
+0:68 move second child to first child (temp float)
+0:68 'g1' (temp float)
+0:68 Constant:
+0:68 53876.000000
+0:69 Sequence
+0:69 move second child to first child (temp float)
+0:69 'g2' (temp float)
+0:69 Constant:
+0:69 0.040000
+0:70 Sequence
+0:70 move second child to first child (temp float)
+0:70 'g3' (temp float)
+0:70 Constant:
+0:70 100000.000000
+0:71 Sequence
+0:71 move second child to first child (temp float)
+0:71 'g4' (temp float)
+0:71 Constant:
+0:71 0.007321
+0:72 Sequence
+0:72 move second child to first child (temp float)
+0:72 'g5' (temp float)
+0:72 Constant:
+0:72 32000.000000
+0:73 Sequence
+0:73 move second child to first child (temp float)
+0:73 'g6' (temp float)
+0:73 Constant:
+0:73 0.000005
+0:74 Sequence
+0:74 move second child to first child (temp float)
+0:74 'g7' (temp float)
+0:74 Constant:
+0:74 0.450000
+0:75 Sequence
+0:75 move second child to first child (temp float)
+0:75 'g8' (temp float)
+0:75 Constant:
+0:75 60000000000.000000
+0:77 Sequence
+0:77 move second child to first child (temp double)
+0:77 'gf1' (temp double)
+0:77 Constant:
+0:77 1.000000
+0:78 Sequence
+0:78 move second child to first child (temp double)
+0:78 'gf2' (temp double)
+0:78 Constant:
+0:78 2.000000
+0:79 Sequence
+0:79 move second child to first child (temp double)
+0:79 'gf3' (temp double)
+0:79 Constant:
+0:79 3.000000
+0:80 Sequence
+0:80 move second child to first child (temp double)
+0:80 'gf4' (temp double)
+0:80 Constant:
+0:80 4.000000
+0:81 Sequence
+0:81 move second child to first child (temp float)
+0:81 'gf5' (temp float)
+0:81 Constant:
+0:81 5.000000
+0:82 Sequence
+0:82 move second child to first child (temp float)
+0:82 'gf6' (temp float)
+0:82 Constant:
+0:82 6.000000
+0:88 Sequence
+0:88 move second child to first child (temp float)
+0:88 'e5' (temp float)
+0:88 Constant:
+0:88 5.000000
+0:98 Sequence
+0:98 move second child to first child (temp uint)
+0:98 'g1' (global uint)
+0:98 Constant:
+0:98 4294967295 (const uint)
+0:99 Sequence
+0:99 move second child to first child (temp uint)
+0:99 'g2' (global uint)
+0:99 Constant:
+0:99 4294967295 (const uint)
+0:100 Sequence
+0:100 move second child to first child (temp uint)
+0:100 'g3' (global uint)
+0:100 Constant:
+0:100 4294967294 (const uint)
+0:101 Sequence
+0:101 move second child to first child (temp int)
+0:101 'g4' (global int)
+0:101 Constant:
+0:101 -1 (const int)
+0:102 Sequence
+0:102 move second child to first child (temp int)
+0:102 'g5' (global int)
+0:102 Constant:
+0:102 -1 (const int)
+0:103 Sequence
+0:103 move second child to first child (temp int)
+0:103 'g6' (global int)
+0:103 Constant:
+0:103 -2 (const int)
+0:? Linker Objects
+0:? 'c2' (layout(location=2 ) out 4-component vector of float)
+0:? 'c3' (layout(location=3 ) out 4-component vector of float)
+0:? 'c4' (layout(location=4 ) out 4-component vector of float)
+0:? 'c5' (layout(location=5 ) out 4-component vector of float)
+0:? 'c6' (layout(location=6 ) out 4-component vector of float)
+0:? 'c7' (layout(location=7 ) out 4-component vector of float)
+0:? 'g1' (global uint)
+0:? 'g2' (global uint)
+0:? 'g3' (global uint)
+0:? 'g4' (global int)
+0:? 'g5' (global int)
+0:? 'g6' (global int)
+
diff --git a/chromium/third_party/glslang/src/Test/baseResults/pointCoord.frag.out b/chromium/third_party/glslang/src/Test/baseResults/pointCoord.frag.out
new file mode 100644
index 00000000000..633d8b9b07c
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/pointCoord.frag.out
@@ -0,0 +1,69 @@
+pointCoord.frag
+Shader version: 100
+0:? Sequence
+0:5 Function Definition: main( (global void)
+0:5 Function Parameters:
+0:? Sequence
+0:9 Test condition and select (temp void)
+0:9 Condition
+0:9 Compare Less Than (temp bool)
+0:9 length (global mediump float)
+0:9 'gl_PointCoord' (gl_PointCoord mediump 2-component vector of float PointCoord)
+0:9 Constant:
+0:9 0.300000
+0:9 true case
+0:10 move second child to first child (temp highp 4-component vector of float)
+0:10 'color' (temp highp 4-component vector of float)
+0:10 texture (global lowp 4-component vector of float)
+0:10 'sampler' (uniform lowp sampler2D)
+0:10 'gl_PointCoord' (gl_PointCoord mediump 2-component vector of float PointCoord)
+0:9 false case
+0:12 move second child to first child (temp highp 4-component vector of float)
+0:12 'color' (temp highp 4-component vector of float)
+0:12 Constant:
+0:12 0.000000
+0:12 0.000000
+0:12 0.000000
+0:12 0.000000
+0:14 move second child to first child (temp highp 4-component vector of float)
+0:14 'gl_FragColor' (fragColor mediump 4-component vector of float FragColor)
+0:14 'color' (temp highp 4-component vector of float)
+0:? Linker Objects
+0:? 'sampler' (uniform lowp sampler2D)
+
+
+Linked fragment stage:
+
+
+Shader version: 100
+0:? Sequence
+0:5 Function Definition: main( (global void)
+0:5 Function Parameters:
+0:? Sequence
+0:9 Test condition and select (temp void)
+0:9 Condition
+0:9 Compare Less Than (temp bool)
+0:9 length (global mediump float)
+0:9 'gl_PointCoord' (gl_PointCoord mediump 2-component vector of float PointCoord)
+0:9 Constant:
+0:9 0.300000
+0:9 true case
+0:10 move second child to first child (temp highp 4-component vector of float)
+0:10 'color' (temp highp 4-component vector of float)
+0:10 texture (global lowp 4-component vector of float)
+0:10 'sampler' (uniform lowp sampler2D)
+0:10 'gl_PointCoord' (gl_PointCoord mediump 2-component vector of float PointCoord)
+0:9 false case
+0:12 move second child to first child (temp highp 4-component vector of float)
+0:12 'color' (temp highp 4-component vector of float)
+0:12 Constant:
+0:12 0.000000
+0:12 0.000000
+0:12 0.000000
+0:12 0.000000
+0:14 move second child to first child (temp highp 4-component vector of float)
+0:14 'gl_FragColor' (fragColor mediump 4-component vector of float FragColor)
+0:14 'color' (temp highp 4-component vector of float)
+0:? Linker Objects
+0:? 'sampler' (uniform lowp sampler2D)
+
diff --git a/chromium/third_party/glslang/src/Test/baseResults/precise.tesc.out b/chromium/third_party/glslang/src/Test/baseResults/precise.tesc.out
new file mode 100644
index 00000000000..962a3c98b74
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/precise.tesc.out
@@ -0,0 +1,768 @@
+precise.tesc
+Warning, version 450 is not yet complete; most version-specific features are present, but some are missing.
+
+Shader version: 450
+Requested GL_EXT_gpu_shader5
+Requested GL_EXT_shader_io_blocks
+Requested GL_EXT_tessellation_shader
+vertices = -1
+0:? Sequence
+0:5 Function Definition: minimal( (global float)
+0:5 Function Parameters:
+0:6 Sequence
+0:6 Sequence
+0:6 move second child to first child (temp float)
+0:6 'result' (noContraction temp float)
+0:6 Constant:
+0:6 5.000000
+0:7 Sequence
+0:7 move second child to first child (temp float)
+0:7 'a' (noContraction temp float)
+0:7 Constant:
+0:7 10.000000
+0:8 Sequence
+0:8 move second child to first child (temp float)
+0:8 'b' (noContraction temp float)
+0:8 Constant:
+0:8 20.000000
+0:9 Sequence
+0:9 move second child to first child (temp float)
+0:9 'c' (noContraction temp float)
+0:9 Constant:
+0:9 30.000000
+0:10 Sequence
+0:10 move second child to first child (temp float)
+0:10 'd' (noContraction temp float)
+0:10 Constant:
+0:10 40.000000
+0:11 move second child to first child (temp float)
+0:11 'result' (noContraction temp float)
+0:11 add (noContraction temp float)
+0:11 component-wise multiply (noContraction temp float)
+0:11 'a' (noContraction temp float)
+0:11 'b' (noContraction temp float)
+0:11 component-wise multiply (noContraction temp float)
+0:11 'c' (noContraction temp float)
+0:11 'd' (noContraction temp float)
+0:12 Branch: Return with expression
+0:12 'result' (noContraction temp float)
+0:15 Function Definition: continuous_assignment( (global void)
+0:15 Function Parameters:
+0:16 Sequence
+0:16 Sequence
+0:16 move second child to first child (temp float)
+0:16 'result' (noContraction temp float)
+0:16 Constant:
+0:16 5.000000
+0:17 Sequence
+0:17 move second child to first child (temp float)
+0:17 'a' (noContraction temp float)
+0:17 Constant:
+0:17 10.000000
+0:18 Sequence
+0:18 move second child to first child (temp float)
+0:18 'b' (noContraction temp float)
+0:18 Constant:
+0:18 20.000000
+0:19 move second child to first child (temp float)
+0:19 'result' (noContraction temp float)
+0:19 move second child to first child (temp float)
+0:19 'a' (noContraction temp float)
+0:19 add (noContraction temp float)
+0:19 'b' (noContraction temp float)
+0:19 Constant:
+0:19 4.000000
+0:22 Function Definition: convert( (global void)
+0:22 Function Parameters:
+0:? Sequence
+0:24 Sequence
+0:24 move second child to first child (temp float)
+0:24 'a' (noContraction temp float)
+0:24 Constant:
+0:24 10.000000
+0:25 Sequence
+0:25 move second child to first child (temp float)
+0:25 'b' (noContraction temp float)
+0:25 Constant:
+0:25 20.000000
+0:26 move second child to first child (temp float)
+0:26 'b' (noContraction temp float)
+0:26 add (noContraction temp float)
+0:26 'a' (noContraction temp float)
+0:26 'b' (noContraction temp float)
+0:27 move second child to first child (temp double)
+0:27 'result' (noContraction temp double)
+0:27 Convert float to double (temp double)
+0:27 'b' (noContraction temp float)
+0:30 Function Definition: loop_for( (global float)
+0:30 Function Parameters:
+0:31 Sequence
+0:31 Sequence
+0:31 move second child to first child (temp float)
+0:31 'r1' (noContraction temp float)
+0:31 Constant:
+0:31 5.000000
+0:32 Sequence
+0:32 move second child to first child (temp float)
+0:32 'r2' (noContraction temp float)
+0:32 Constant:
+0:32 10.000000
+0:33 Sequence
+0:33 move second child to first child (temp int)
+0:33 'a' (temp int)
+0:33 Constant:
+0:33 10 (const int)
+0:34 Sequence
+0:34 move second child to first child (temp int)
+0:34 'b' (noContraction temp int)
+0:34 Constant:
+0:34 20 (const int)
+0:35 Sequence
+0:35 move second child to first child (temp int)
+0:35 'c' (noContraction temp int)
+0:35 Constant:
+0:35 30 (const int)
+0:36 Sequence
+0:36 Sequence
+0:36 move second child to first child (temp int)
+0:36 'i' (noContraction temp int)
+0:36 Constant:
+0:36 0 (const int)
+0:36 Loop with condition tested first
+0:36 Loop Condition
+0:36 Compare Less Than (temp bool)
+0:36 'i' (temp int)
+0:36 'a' (temp int)
+0:36 Loop Body
+0:37 Sequence
+0:37 add second child into first child (noContraction temp float)
+0:37 'r1' (noContraction temp float)
+0:37 add (noContraction temp float)
+0:37 add (noContraction temp float)
+0:37 Constant:
+0:37 3.120000
+0:37 Convert int to float (temp float)
+0:37 'b' (noContraction temp int)
+0:37 Convert int to float (temp float)
+0:37 'i' (noContraction temp int)
+0:38 add second child into first child (noContraction temp int)
+0:38 'c' (noContraction temp int)
+0:38 Constant:
+0:38 1 (const int)
+0:36 Loop Terminal Expression
+0:36 Post-Increment (noContraction temp int)
+0:36 'i' (noContraction temp int)
+0:40 add second child into first child (temp int)
+0:40 'a' (temp int)
+0:40 Constant:
+0:40 1 (const int)
+0:41 move second child to first child (temp float)
+0:41 'r2' (noContraction temp float)
+0:41 Convert int to float (temp float)
+0:41 'c' (noContraction temp int)
+0:42 Branch: Return with expression
+0:42 Construct float (temp float)
+0:42 add (temp float)
+0:42 'r1' (noContraction temp float)
+0:42 'r2' (noContraction temp float)
+0:45 Function Definition: loop_array( (global void)
+0:45 Function Parameters:
+0:? Sequence
+0:48 Sequence
+0:48 move second child to first child (temp int)
+0:48 'x' (noContraction temp int)
+0:48 Constant:
+0:48 22 (const int)
+0:49 Sequence
+0:49 move second child to first child (temp int)
+0:49 'y' (noContraction temp int)
+0:49 Constant:
+0:49 33 (const int)
+0:52 add second child into first child (noContraction temp float)
+0:52 'result' (noContraction temp float)
+0:52 add (noContraction temp float)
+0:52 Convert int to float (temp float)
+0:52 'x' (noContraction temp int)
+0:52 Convert int to float (temp float)
+0:52 'y' (noContraction temp int)
+0:54 Sequence
+0:54 Sequence
+0:54 move second child to first child (temp int)
+0:54 'i' (temp int)
+0:54 Constant:
+0:54 0 (const int)
+0:54 Loop with condition tested first
+0:54 Loop Condition
+0:54 Compare Less Than (temp bool)
+0:54 'i' (temp int)
+0:54 Constant:
+0:54 3 (const int)
+0:54 Loop Body
+0:56 Sequence
+0:56 add second child into first child (noContraction temp float)
+0:56 'result' (noContraction temp float)
+0:56 add (noContraction temp float)
+0:56 indirect index (noContraction temp float)
+0:56 'a0' (temp 3-element array of float)
+0:56 'i' (temp int)
+0:56 Constant:
+0:56 2.000000
+0:58 move second child to first child (temp float)
+0:58 indirect index (noContraction temp float)
+0:58 'a0' (noContraction temp 3-element array of float)
+0:58 'i' (temp int)
+0:58 subtract (noContraction temp float)
+0:58 Constant:
+0:58 3.000000
+0:58 Post-Increment (noContraction temp float)
+0:58 'result' (noContraction temp float)
+0:54 Loop Terminal Expression
+0:54 Pre-Increment (temp int)
+0:54 'i' (temp int)
+0:62 Function Definition: loop_while( (global void)
+0:62 Function Parameters:
+0:63 Sequence
+0:63 Sequence
+0:63 move second child to first child (temp float)
+0:63 'result' (noContraction temp float)
+0:63 Constant:
+0:63 5.000000
+0:64 Sequence
+0:64 move second child to first child (temp int)
+0:64 'a' (noContraction temp int)
+0:64 Constant:
+0:64 10 (const int)
+0:65 Sequence
+0:65 move second child to first child (temp int)
+0:65 'b' (noContraction temp int)
+0:65 Constant:
+0:65 20 (const int)
+0:66 Loop with condition tested first
+0:66 Loop Condition
+0:66 Compare Less Than (temp bool)
+0:66 'result' (noContraction temp float)
+0:66 Constant:
+0:66 10.000000
+0:66 Loop Body
+0:67 Sequence
+0:67 add second child into first child (noContraction temp float)
+0:67 'result' (noContraction temp float)
+0:67 add (noContraction temp float)
+0:67 Constant:
+0:67 3.120000
+0:67 Convert int to float (temp float)
+0:67 'b' (noContraction temp int)
+0:69 move second child to first child (temp float)
+0:69 'result' (noContraction temp float)
+0:69 Convert int to float (temp float)
+0:69 add (temp int)
+0:69 add (temp int)
+0:69 'a' (noContraction temp int)
+0:69 'b' (noContraction temp int)
+0:69 Constant:
+0:69 5 (const int)
+0:70 move second child to first child (temp float)
+0:70 'result' (noContraction temp float)
+0:70 Constant:
+0:70 11.100000
+0:73 Function Definition: fma_not_decorated( (global float)
+0:73 Function Parameters:
+0:? Sequence
+0:75 Sequence
+0:75 move second child to first child (temp float)
+0:75 'a' (noContraction temp float)
+0:75 Constant:
+0:75 1.000000
+0:76 Sequence
+0:76 move second child to first child (temp float)
+0:76 'b' (noContraction temp float)
+0:76 Constant:
+0:76 2.000000
+0:77 Sequence
+0:77 move second child to first child (temp float)
+0:77 'c' (noContraction temp float)
+0:77 Constant:
+0:77 3.000000
+0:78 move second child to first child (temp float)
+0:78 'b' (noContraction temp float)
+0:78 add (noContraction temp float)
+0:78 'b' (noContraction temp float)
+0:78 'c' (noContraction temp float)
+0:79 move second child to first child (temp float)
+0:79 'result' (noContraction temp float)
+0:79 fma (global float)
+0:79 'a' (noContraction temp float)
+0:79 'b' (noContraction temp float)
+0:79 'c' (noContraction temp float)
+0:80 Branch: Return with expression
+0:80 'result' (noContraction temp float)
+0:83 Function Definition: precise_return_exp_func( (noContraction temp float)
+0:83 Function Parameters:
+0:84 Sequence
+0:84 Sequence
+0:84 move second child to first child (temp float)
+0:84 'a' (noContraction temp float)
+0:84 Constant:
+0:84 1.000000
+0:85 Sequence
+0:85 move second child to first child (temp float)
+0:85 'b' (noContraction temp float)
+0:85 Constant:
+0:85 2.000000
+0:86 Branch: Return with expression
+0:86 add (noContraction temp float)
+0:86 'a' (noContraction temp float)
+0:86 'b' (noContraction temp float)
+0:89 Function Definition: precise_return_val_func( (noContraction temp float)
+0:89 Function Parameters:
+0:90 Sequence
+0:90 Sequence
+0:90 move second child to first child (temp float)
+0:90 'a' (noContraction temp float)
+0:90 Constant:
+0:90 1.000000
+0:91 Sequence
+0:91 move second child to first child (temp float)
+0:91 'b' (noContraction temp float)
+0:91 Constant:
+0:91 2.000000
+0:92 Sequence
+0:92 move second child to first child (temp float)
+0:92 'result' (noContraction temp float)
+0:92 add (noContraction temp float)
+0:92 'a' (noContraction temp float)
+0:92 'b' (noContraction temp float)
+0:93 Branch: Return with expression
+0:93 'result' (noContraction temp float)
+0:96 Function Definition: precise_func_parameter(f1;f1; (global float)
+0:96 Function Parameters:
+0:96 'b' (in float)
+0:96 'c' (noContraction out float)
+0:97 Sequence
+0:97 Sequence
+0:97 move second child to first child (temp float)
+0:97 'a' (noContraction temp float)
+0:97 Constant:
+0:97 0.500000
+0:98 move second child to first child (temp float)
+0:98 'c' (noContraction out float)
+0:98 add (noContraction temp float)
+0:98 'a' (noContraction temp float)
+0:98 'b' (noContraction in float)
+0:99 Branch: Return with expression
+0:99 subtract (temp float)
+0:99 'a' (temp float)
+0:99 'b' (in float)
+0:102 Function Definition: matrix(mf23;mf32; (global 3X3 matrix of float)
+0:102 Function Parameters:
+0:102 'a' (in 2X3 matrix of float)
+0:102 'b' (in 3X2 matrix of float)
+0:103 Sequence
+0:103 Sequence
+0:103 move second child to first child (temp 2X3 matrix of float)
+0:103 'c' (noContraction temp 2X3 matrix of float)
+0:103 Constant:
+0:103 1.000000
+0:103 2.000000
+0:103 3.000000
+0:103 4.000000
+0:103 5.000000
+0:103 6.000000
+0:105 move second child to first child (temp 3X3 matrix of float)
+0:105 'result' (noContraction temp 3X3 matrix of float)
+0:105 matrix-multiply (noContraction temp 3X3 matrix of float)
+0:105 add (noContraction temp 2X3 matrix of float)
+0:105 'a' (noContraction in 2X3 matrix of float)
+0:105 'c' (noContraction temp 2X3 matrix of float)
+0:105 'b' (noContraction in 3X2 matrix of float)
+0:106 Branch: Return with expression
+0:106 'result' (noContraction temp 3X3 matrix of float)
+0:109 Function Definition: main( (global void)
+0:109 Function Parameters:
+0:? Linker Objects
+
+
+Linked tessellation control stage:
+
+ERROR: Linking tessellation control stage: At least one shader must specify an output layout(vertices=...)
+
+Shader version: 450
+Requested GL_EXT_gpu_shader5
+Requested GL_EXT_shader_io_blocks
+Requested GL_EXT_tessellation_shader
+vertices = -1
+0:? Sequence
+0:5 Function Definition: minimal( (global float)
+0:5 Function Parameters:
+0:6 Sequence
+0:6 Sequence
+0:6 move second child to first child (temp float)
+0:6 'result' (noContraction temp float)
+0:6 Constant:
+0:6 5.000000
+0:7 Sequence
+0:7 move second child to first child (temp float)
+0:7 'a' (noContraction temp float)
+0:7 Constant:
+0:7 10.000000
+0:8 Sequence
+0:8 move second child to first child (temp float)
+0:8 'b' (noContraction temp float)
+0:8 Constant:
+0:8 20.000000
+0:9 Sequence
+0:9 move second child to first child (temp float)
+0:9 'c' (noContraction temp float)
+0:9 Constant:
+0:9 30.000000
+0:10 Sequence
+0:10 move second child to first child (temp float)
+0:10 'd' (noContraction temp float)
+0:10 Constant:
+0:10 40.000000
+0:11 move second child to first child (temp float)
+0:11 'result' (noContraction temp float)
+0:11 add (noContraction temp float)
+0:11 component-wise multiply (noContraction temp float)
+0:11 'a' (noContraction temp float)
+0:11 'b' (noContraction temp float)
+0:11 component-wise multiply (noContraction temp float)
+0:11 'c' (noContraction temp float)
+0:11 'd' (noContraction temp float)
+0:12 Branch: Return with expression
+0:12 'result' (noContraction temp float)
+0:15 Function Definition: continuous_assignment( (global void)
+0:15 Function Parameters:
+0:16 Sequence
+0:16 Sequence
+0:16 move second child to first child (temp float)
+0:16 'result' (noContraction temp float)
+0:16 Constant:
+0:16 5.000000
+0:17 Sequence
+0:17 move second child to first child (temp float)
+0:17 'a' (noContraction temp float)
+0:17 Constant:
+0:17 10.000000
+0:18 Sequence
+0:18 move second child to first child (temp float)
+0:18 'b' (noContraction temp float)
+0:18 Constant:
+0:18 20.000000
+0:19 move second child to first child (temp float)
+0:19 'result' (noContraction temp float)
+0:19 move second child to first child (temp float)
+0:19 'a' (noContraction temp float)
+0:19 add (noContraction temp float)
+0:19 'b' (noContraction temp float)
+0:19 Constant:
+0:19 4.000000
+0:22 Function Definition: convert( (global void)
+0:22 Function Parameters:
+0:? Sequence
+0:24 Sequence
+0:24 move second child to first child (temp float)
+0:24 'a' (noContraction temp float)
+0:24 Constant:
+0:24 10.000000
+0:25 Sequence
+0:25 move second child to first child (temp float)
+0:25 'b' (noContraction temp float)
+0:25 Constant:
+0:25 20.000000
+0:26 move second child to first child (temp float)
+0:26 'b' (noContraction temp float)
+0:26 add (noContraction temp float)
+0:26 'a' (noContraction temp float)
+0:26 'b' (noContraction temp float)
+0:27 move second child to first child (temp double)
+0:27 'result' (noContraction temp double)
+0:27 Convert float to double (temp double)
+0:27 'b' (noContraction temp float)
+0:30 Function Definition: loop_for( (global float)
+0:30 Function Parameters:
+0:31 Sequence
+0:31 Sequence
+0:31 move second child to first child (temp float)
+0:31 'r1' (noContraction temp float)
+0:31 Constant:
+0:31 5.000000
+0:32 Sequence
+0:32 move second child to first child (temp float)
+0:32 'r2' (noContraction temp float)
+0:32 Constant:
+0:32 10.000000
+0:33 Sequence
+0:33 move second child to first child (temp int)
+0:33 'a' (temp int)
+0:33 Constant:
+0:33 10 (const int)
+0:34 Sequence
+0:34 move second child to first child (temp int)
+0:34 'b' (noContraction temp int)
+0:34 Constant:
+0:34 20 (const int)
+0:35 Sequence
+0:35 move second child to first child (temp int)
+0:35 'c' (noContraction temp int)
+0:35 Constant:
+0:35 30 (const int)
+0:36 Sequence
+0:36 Sequence
+0:36 move second child to first child (temp int)
+0:36 'i' (noContraction temp int)
+0:36 Constant:
+0:36 0 (const int)
+0:36 Loop with condition tested first
+0:36 Loop Condition
+0:36 Compare Less Than (temp bool)
+0:36 'i' (temp int)
+0:36 'a' (temp int)
+0:36 Loop Body
+0:37 Sequence
+0:37 add second child into first child (noContraction temp float)
+0:37 'r1' (noContraction temp float)
+0:37 add (noContraction temp float)
+0:37 add (noContraction temp float)
+0:37 Constant:
+0:37 3.120000
+0:37 Convert int to float (temp float)
+0:37 'b' (noContraction temp int)
+0:37 Convert int to float (temp float)
+0:37 'i' (noContraction temp int)
+0:38 add second child into first child (noContraction temp int)
+0:38 'c' (noContraction temp int)
+0:38 Constant:
+0:38 1 (const int)
+0:36 Loop Terminal Expression
+0:36 Post-Increment (noContraction temp int)
+0:36 'i' (noContraction temp int)
+0:40 add second child into first child (temp int)
+0:40 'a' (temp int)
+0:40 Constant:
+0:40 1 (const int)
+0:41 move second child to first child (temp float)
+0:41 'r2' (noContraction temp float)
+0:41 Convert int to float (temp float)
+0:41 'c' (noContraction temp int)
+0:42 Branch: Return with expression
+0:42 Construct float (temp float)
+0:42 add (temp float)
+0:42 'r1' (noContraction temp float)
+0:42 'r2' (noContraction temp float)
+0:45 Function Definition: loop_array( (global void)
+0:45 Function Parameters:
+0:? Sequence
+0:48 Sequence
+0:48 move second child to first child (temp int)
+0:48 'x' (noContraction temp int)
+0:48 Constant:
+0:48 22 (const int)
+0:49 Sequence
+0:49 move second child to first child (temp int)
+0:49 'y' (noContraction temp int)
+0:49 Constant:
+0:49 33 (const int)
+0:52 add second child into first child (noContraction temp float)
+0:52 'result' (noContraction temp float)
+0:52 add (noContraction temp float)
+0:52 Convert int to float (temp float)
+0:52 'x' (noContraction temp int)
+0:52 Convert int to float (temp float)
+0:52 'y' (noContraction temp int)
+0:54 Sequence
+0:54 Sequence
+0:54 move second child to first child (temp int)
+0:54 'i' (temp int)
+0:54 Constant:
+0:54 0 (const int)
+0:54 Loop with condition tested first
+0:54 Loop Condition
+0:54 Compare Less Than (temp bool)
+0:54 'i' (temp int)
+0:54 Constant:
+0:54 3 (const int)
+0:54 Loop Body
+0:56 Sequence
+0:56 add second child into first child (noContraction temp float)
+0:56 'result' (noContraction temp float)
+0:56 add (noContraction temp float)
+0:56 indirect index (noContraction temp float)
+0:56 'a0' (temp 3-element array of float)
+0:56 'i' (temp int)
+0:56 Constant:
+0:56 2.000000
+0:58 move second child to first child (temp float)
+0:58 indirect index (noContraction temp float)
+0:58 'a0' (noContraction temp 3-element array of float)
+0:58 'i' (temp int)
+0:58 subtract (noContraction temp float)
+0:58 Constant:
+0:58 3.000000
+0:58 Post-Increment (noContraction temp float)
+0:58 'result' (noContraction temp float)
+0:54 Loop Terminal Expression
+0:54 Pre-Increment (temp int)
+0:54 'i' (temp int)
+0:62 Function Definition: loop_while( (global void)
+0:62 Function Parameters:
+0:63 Sequence
+0:63 Sequence
+0:63 move second child to first child (temp float)
+0:63 'result' (noContraction temp float)
+0:63 Constant:
+0:63 5.000000
+0:64 Sequence
+0:64 move second child to first child (temp int)
+0:64 'a' (noContraction temp int)
+0:64 Constant:
+0:64 10 (const int)
+0:65 Sequence
+0:65 move second child to first child (temp int)
+0:65 'b' (noContraction temp int)
+0:65 Constant:
+0:65 20 (const int)
+0:66 Loop with condition tested first
+0:66 Loop Condition
+0:66 Compare Less Than (temp bool)
+0:66 'result' (noContraction temp float)
+0:66 Constant:
+0:66 10.000000
+0:66 Loop Body
+0:67 Sequence
+0:67 add second child into first child (noContraction temp float)
+0:67 'result' (noContraction temp float)
+0:67 add (noContraction temp float)
+0:67 Constant:
+0:67 3.120000
+0:67 Convert int to float (temp float)
+0:67 'b' (noContraction temp int)
+0:69 move second child to first child (temp float)
+0:69 'result' (noContraction temp float)
+0:69 Convert int to float (temp float)
+0:69 add (temp int)
+0:69 add (temp int)
+0:69 'a' (noContraction temp int)
+0:69 'b' (noContraction temp int)
+0:69 Constant:
+0:69 5 (const int)
+0:70 move second child to first child (temp float)
+0:70 'result' (noContraction temp float)
+0:70 Constant:
+0:70 11.100000
+0:73 Function Definition: fma_not_decorated( (global float)
+0:73 Function Parameters:
+0:? Sequence
+0:75 Sequence
+0:75 move second child to first child (temp float)
+0:75 'a' (noContraction temp float)
+0:75 Constant:
+0:75 1.000000
+0:76 Sequence
+0:76 move second child to first child (temp float)
+0:76 'b' (noContraction temp float)
+0:76 Constant:
+0:76 2.000000
+0:77 Sequence
+0:77 move second child to first child (temp float)
+0:77 'c' (noContraction temp float)
+0:77 Constant:
+0:77 3.000000
+0:78 move second child to first child (temp float)
+0:78 'b' (noContraction temp float)
+0:78 add (noContraction temp float)
+0:78 'b' (noContraction temp float)
+0:78 'c' (noContraction temp float)
+0:79 move second child to first child (temp float)
+0:79 'result' (noContraction temp float)
+0:79 fma (global float)
+0:79 'a' (noContraction temp float)
+0:79 'b' (noContraction temp float)
+0:79 'c' (noContraction temp float)
+0:80 Branch: Return with expression
+0:80 'result' (noContraction temp float)
+0:83 Function Definition: precise_return_exp_func( (noContraction temp float)
+0:83 Function Parameters:
+0:84 Sequence
+0:84 Sequence
+0:84 move second child to first child (temp float)
+0:84 'a' (noContraction temp float)
+0:84 Constant:
+0:84 1.000000
+0:85 Sequence
+0:85 move second child to first child (temp float)
+0:85 'b' (noContraction temp float)
+0:85 Constant:
+0:85 2.000000
+0:86 Branch: Return with expression
+0:86 add (noContraction temp float)
+0:86 'a' (noContraction temp float)
+0:86 'b' (noContraction temp float)
+0:89 Function Definition: precise_return_val_func( (noContraction temp float)
+0:89 Function Parameters:
+0:90 Sequence
+0:90 Sequence
+0:90 move second child to first child (temp float)
+0:90 'a' (noContraction temp float)
+0:90 Constant:
+0:90 1.000000
+0:91 Sequence
+0:91 move second child to first child (temp float)
+0:91 'b' (noContraction temp float)
+0:91 Constant:
+0:91 2.000000
+0:92 Sequence
+0:92 move second child to first child (temp float)
+0:92 'result' (noContraction temp float)
+0:92 add (noContraction temp float)
+0:92 'a' (noContraction temp float)
+0:92 'b' (noContraction temp float)
+0:93 Branch: Return with expression
+0:93 'result' (noContraction temp float)
+0:96 Function Definition: precise_func_parameter(f1;f1; (global float)
+0:96 Function Parameters:
+0:96 'b' (in float)
+0:96 'c' (noContraction out float)
+0:97 Sequence
+0:97 Sequence
+0:97 move second child to first child (temp float)
+0:97 'a' (noContraction temp float)
+0:97 Constant:
+0:97 0.500000
+0:98 move second child to first child (temp float)
+0:98 'c' (noContraction out float)
+0:98 add (noContraction temp float)
+0:98 'a' (noContraction temp float)
+0:98 'b' (noContraction in float)
+0:99 Branch: Return with expression
+0:99 subtract (temp float)
+0:99 'a' (temp float)
+0:99 'b' (in float)
+0:102 Function Definition: matrix(mf23;mf32; (global 3X3 matrix of float)
+0:102 Function Parameters:
+0:102 'a' (in 2X3 matrix of float)
+0:102 'b' (in 3X2 matrix of float)
+0:103 Sequence
+0:103 Sequence
+0:103 move second child to first child (temp 2X3 matrix of float)
+0:103 'c' (noContraction temp 2X3 matrix of float)
+0:103 Constant:
+0:103 1.000000
+0:103 2.000000
+0:103 3.000000
+0:103 4.000000
+0:103 5.000000
+0:103 6.000000
+0:105 move second child to first child (temp 3X3 matrix of float)
+0:105 'result' (noContraction temp 3X3 matrix of float)
+0:105 matrix-multiply (noContraction temp 3X3 matrix of float)
+0:105 add (noContraction temp 2X3 matrix of float)
+0:105 'a' (noContraction in 2X3 matrix of float)
+0:105 'c' (noContraction temp 2X3 matrix of float)
+0:105 'b' (noContraction in 3X2 matrix of float)
+0:106 Branch: Return with expression
+0:106 'result' (noContraction temp 3X3 matrix of float)
+0:109 Function Definition: main( (global void)
+0:109 Function Parameters:
+0:? Linker Objects
+
diff --git a/chromium/third_party/glslang/src/Test/baseResults/precise_struct_block.vert.out b/chromium/third_party/glslang/src/Test/baseResults/precise_struct_block.vert.out
new file mode 100644
index 00000000000..9d726d65af3
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/precise_struct_block.vert.out
@@ -0,0 +1,1045 @@
+precise_struct_block.vert
+Warning, version 450 is not yet complete; most version-specific features are present, but some are missing.
+
+Shader version: 450
+0:? Sequence
+0:11 Function Definition: struct_member( (global float)
+0:11 Function Parameters:
+0:12 Sequence
+0:12 Sequence
+0:12 move second child to first child (temp float)
+0:12 'a' (noContraction temp float)
+0:12 Constant:
+0:12 1.000000
+0:13 Sequence
+0:13 move second child to first child (temp float)
+0:13 'b' (temp float)
+0:13 Constant:
+0:13 2.000000
+0:14 Sequence
+0:14 move second child to first child (temp float)
+0:14 'c' (temp float)
+0:14 Constant:
+0:14 3.000000
+0:15 Sequence
+0:15 move second child to first child (temp float)
+0:15 'd' (temp float)
+0:15 Constant:
+0:15 4.000000
+0:21 move second child to first child (temp float)
+0:21 f1: direct index for structure (noContraction global float)
+0:21 'S2' (temp structure{global float f1, global float f2})
+0:21 Constant:
+0:21 0 (const int)
+0:21 add (noContraction temp float)
+0:21 'a' (noContraction temp float)
+0:21 Constant:
+0:21 0.200000
+0:22 move second child to first child (temp float)
+0:22 f2: direct index for structure (global float)
+0:22 'S2' (temp structure{global float f1, global float f2})
+0:22 Constant:
+0:22 1 (const int)
+0:22 add (temp float)
+0:22 'b' (temp float)
+0:22 Constant:
+0:22 0.200000
+0:23 move second child to first child (temp float)
+0:23 f1: direct index for structure (global float)
+0:23 'S3' (temp structure{global float f1, global float f2})
+0:23 Constant:
+0:23 0 (const int)
+0:23 add (temp float)
+0:23 'a' (temp float)
+0:23 'b' (temp float)
+0:24 move second child to first child (temp structure{global float f1, global float f2})
+0:24 'S' (temp structure{global float f1, global float f2})
+0:24 'S2' (temp structure{global float f1, global float f2})
+0:25 move second child to first child (temp float)
+0:25 'result' (noContraction temp float)
+0:25 add (noContraction temp float)
+0:25 f1: direct index for structure (noContraction global float)
+0:25 'S' (temp structure{global float f1, global float f2})
+0:25 Constant:
+0:25 0 (const int)
+0:25 Constant:
+0:25 0.100000
+0:27 Branch: Return with expression
+0:27 'result' (noContraction temp float)
+0:30 Function Definition: complex_array_struct( (global float)
+0:30 Function Parameters:
+0:? Sequence
+0:43 Sequence
+0:43 Sequence
+0:43 move second child to first child (temp int)
+0:43 'i' (noContraction temp int)
+0:43 Constant:
+0:43 0 (const int)
+0:43 Loop with condition tested first
+0:43 Loop Condition
+0:43 Compare Less Than (temp bool)
+0:43 'i' (temp int)
+0:43 Constant:
+0:43 10 (const int)
+0:43 Loop Body
+0:44 Sequence
+0:44 move second child to first child (temp float)
+0:44 f: direct index for structure (temp float)
+0:44 indirect index (temp structure{temp float f, temp structure{temp 5-element array of structure{temp 3-element array of float t1_array, temp float t1_scalar} t1a, temp 6-element array of structure{temp 3-element array of float t1_array, temp float t1_scalar} t1b, temp 7-element array of structure{temp 3-element array of float t1_array, temp float t1_scalar} t1c} t2, temp 4-component vector of float v, temp int p})
+0:44 't3' (temp 10-element array of structure{temp float f, temp structure{temp 5-element array of structure{temp 3-element array of float t1_array, temp float t1_scalar} t1a, temp 6-element array of structure{temp 3-element array of float t1_array, temp float t1_scalar} t1b, temp 7-element array of structure{temp 3-element array of float t1_array, temp float t1_scalar} t1c} t2, temp 4-component vector of float v, temp int p})
+0:44 'i' (temp int)
+0:44 Constant:
+0:44 0 (const int)
+0:44 divide (temp float)
+0:44 Convert int to float (temp float)
+0:44 'i' (temp int)
+0:44 Constant:
+0:44 3.000000
+0:45 move second child to first child (temp 4-component vector of float)
+0:45 v: direct index for structure (noContraction temp 4-component vector of float)
+0:45 indirect index (temp structure{temp float f, temp structure{temp 5-element array of structure{temp 3-element array of float t1_array, temp float t1_scalar} t1a, temp 6-element array of structure{temp 3-element array of float t1_array, temp float t1_scalar} t1b, temp 7-element array of structure{temp 3-element array of float t1_array, temp float t1_scalar} t1c} t2, temp 4-component vector of float v, temp int p})
+0:45 't3' (temp 10-element array of structure{temp float f, temp structure{temp 5-element array of structure{temp 3-element array of float t1_array, temp float t1_scalar} t1a, temp 6-element array of structure{temp 3-element array of float t1_array, temp float t1_scalar} t1b, temp 7-element array of structure{temp 3-element array of float t1_array, temp float t1_scalar} t1c} t2, temp 4-component vector of float v, temp int p})
+0:45 'i' (temp int)
+0:45 Constant:
+0:45 2 (const int)
+0:45 Construct vec4 (temp 4-component vector of float)
+0:45 component-wise multiply (noContraction temp float)
+0:45 Convert int to float (temp float)
+0:45 'i' (noContraction temp int)
+0:45 Constant:
+0:45 1.500000
+0:46 move second child to first child (temp int)
+0:46 p: direct index for structure (temp int)
+0:46 indirect index (temp structure{temp float f, temp structure{temp 5-element array of structure{temp 3-element array of float t1_array, temp float t1_scalar} t1a, temp 6-element array of structure{temp 3-element array of float t1_array, temp float t1_scalar} t1b, temp 7-element array of structure{temp 3-element array of float t1_array, temp float t1_scalar} t1c} t2, temp 4-component vector of float v, temp int p})
+0:46 't3' (temp 10-element array of structure{temp float f, temp structure{temp 5-element array of structure{temp 3-element array of float t1_array, temp float t1_scalar} t1a, temp 6-element array of structure{temp 3-element array of float t1_array, temp float t1_scalar} t1b, temp 7-element array of structure{temp 3-element array of float t1_array, temp float t1_scalar} t1c} t2, temp 4-component vector of float v, temp int p})
+0:46 'i' (temp int)
+0:46 Constant:
+0:46 3 (const int)
+0:46 add (temp int)
+0:46 'i' (temp int)
+0:46 Constant:
+0:46 1 (const int)
+0:47 Sequence
+0:47 Sequence
+0:47 move second child to first child (temp int)
+0:47 'j' (temp int)
+0:47 Constant:
+0:47 0 (const int)
+0:47 Loop with condition tested first
+0:47 Loop Condition
+0:47 Compare Less Than (temp bool)
+0:47 'j' (temp int)
+0:47 Constant:
+0:47 5 (const int)
+0:47 Loop Body
+0:48 Sequence
+0:48 Sequence
+0:48 Sequence
+0:48 move second child to first child (temp int)
+0:48 'k' (temp int)
+0:48 Constant:
+0:48 0 (const int)
+0:48 Loop with condition tested first
+0:48 Loop Condition
+0:48 Compare Less Than (temp bool)
+0:48 'k' (temp int)
+0:48 Constant:
+0:48 3 (const int)
+0:48 Loop Body
+0:49 Sequence
+0:49 move second child to first child (temp float)
+0:49 indirect index (temp float)
+0:49 t1_array: direct index for structure (temp 3-element array of float)
+0:49 indirect index (temp structure{temp 3-element array of float t1_array, temp float t1_scalar})
+0:49 t1a: direct index for structure (temp 5-element array of structure{temp 3-element array of float t1_array, temp float t1_scalar})
+0:49 t2: direct index for structure (temp structure{temp 5-element array of structure{temp 3-element array of float t1_array, temp float t1_scalar} t1a, temp 6-element array of structure{temp 3-element array of float t1_array, temp float t1_scalar} t1b, temp 7-element array of structure{temp 3-element array of float t1_array, temp float t1_scalar} t1c})
+0:49 indirect index (temp structure{temp float f, temp structure{temp 5-element array of structure{temp 3-element array of float t1_array, temp float t1_scalar} t1a, temp 6-element array of structure{temp 3-element array of float t1_array, temp float t1_scalar} t1b, temp 7-element array of structure{temp 3-element array of float t1_array, temp float t1_scalar} t1c} t2, temp 4-component vector of float v, temp int p})
+0:49 't3' (temp 10-element array of structure{temp float f, temp structure{temp 5-element array of structure{temp 3-element array of float t1_array, temp float t1_scalar} t1a, temp 6-element array of structure{temp 3-element array of float t1_array, temp float t1_scalar} t1b, temp 7-element array of structure{temp 3-element array of float t1_array, temp float t1_scalar} t1c} t2, temp 4-component vector of float v, temp int p})
+0:49 'i' (temp int)
+0:49 Constant:
+0:49 1 (const int)
+0:49 Constant:
+0:49 0 (const int)
+0:49 'j' (temp int)
+0:49 Constant:
+0:49 0 (const int)
+0:49 'k' (temp int)
+0:49 Convert int to float (temp float)
+0:49 add (temp int)
+0:49 component-wise multiply (temp int)
+0:49 'i' (temp int)
+0:49 'j' (temp int)
+0:49 'k' (temp int)
+0:48 Loop Terminal Expression
+0:48 Post-Increment (temp int)
+0:48 'k' (temp int)
+0:51 move second child to first child (temp float)
+0:51 t1_scalar: direct index for structure (temp float)
+0:51 indirect index (temp structure{temp 3-element array of float t1_array, temp float t1_scalar})
+0:51 t1a: direct index for structure (temp 5-element array of structure{temp 3-element array of float t1_array, temp float t1_scalar})
+0:51 t2: direct index for structure (temp structure{temp 5-element array of structure{temp 3-element array of float t1_array, temp float t1_scalar} t1a, temp 6-element array of structure{temp 3-element array of float t1_array, temp float t1_scalar} t1b, temp 7-element array of structure{temp 3-element array of float t1_array, temp float t1_scalar} t1c})
+0:51 indirect index (temp structure{temp float f, temp structure{temp 5-element array of structure{temp 3-element array of float t1_array, temp float t1_scalar} t1a, temp 6-element array of structure{temp 3-element array of float t1_array, temp float t1_scalar} t1b, temp 7-element array of structure{temp 3-element array of float t1_array, temp float t1_scalar} t1c} t2, temp 4-component vector of float v, temp int p})
+0:51 't3' (temp 10-element array of structure{temp float f, temp structure{temp 5-element array of structure{temp 3-element array of float t1_array, temp float t1_scalar} t1a, temp 6-element array of structure{temp 3-element array of float t1_array, temp float t1_scalar} t1b, temp 7-element array of structure{temp 3-element array of float t1_array, temp float t1_scalar} t1c} t2, temp 4-component vector of float v, temp int p})
+0:51 'i' (temp int)
+0:51 Constant:
+0:51 1 (const int)
+0:51 Constant:
+0:51 0 (const int)
+0:51 'j' (temp int)
+0:51 Constant:
+0:51 1 (const int)
+0:51 divide (temp float)
+0:51 component-wise multiply (temp float)
+0:51 Convert int to float (temp float)
+0:51 'j' (temp int)
+0:51 Constant:
+0:51 2.000000
+0:51 Convert int to float (temp float)
+0:51 'i' (temp int)
+0:47 Loop Terminal Expression
+0:47 Post-Increment (temp int)
+0:47 'j' (temp int)
+0:54 Sequence
+0:54 Sequence
+0:54 move second child to first child (temp int)
+0:54 'j' (noContraction temp int)
+0:54 Constant:
+0:54 0 (const int)
+0:54 Loop with condition tested first
+0:54 Loop Condition
+0:54 Compare Less Than (temp bool)
+0:54 'j' (temp int)
+0:54 Constant:
+0:54 6 (const int)
+0:54 Loop Body
+0:55 Sequence
+0:55 Sequence
+0:55 Sequence
+0:55 move second child to first child (temp int)
+0:55 'k' (temp int)
+0:55 Constant:
+0:55 0 (const int)
+0:55 Loop with condition tested first
+0:55 Loop Condition
+0:55 Compare Less Than (temp bool)
+0:55 'k' (temp int)
+0:55 Constant:
+0:55 3 (const int)
+0:55 Loop Body
+0:56 Sequence
+0:56 move second child to first child (temp float)
+0:56 indirect index (temp float)
+0:56 t1_array: direct index for structure (temp 3-element array of float)
+0:56 indirect index (temp structure{temp 3-element array of float t1_array, temp float t1_scalar})
+0:56 t1b: direct index for structure (temp 6-element array of structure{temp 3-element array of float t1_array, temp float t1_scalar})
+0:56 t2: direct index for structure (temp structure{temp 5-element array of structure{temp 3-element array of float t1_array, temp float t1_scalar} t1a, temp 6-element array of structure{temp 3-element array of float t1_array, temp float t1_scalar} t1b, temp 7-element array of structure{temp 3-element array of float t1_array, temp float t1_scalar} t1c})
+0:56 indirect index (temp structure{temp float f, temp structure{temp 5-element array of structure{temp 3-element array of float t1_array, temp float t1_scalar} t1a, temp 6-element array of structure{temp 3-element array of float t1_array, temp float t1_scalar} t1b, temp 7-element array of structure{temp 3-element array of float t1_array, temp float t1_scalar} t1c} t2, temp 4-component vector of float v, temp int p})
+0:56 't3' (temp 10-element array of structure{temp float f, temp structure{temp 5-element array of structure{temp 3-element array of float t1_array, temp float t1_scalar} t1a, temp 6-element array of structure{temp 3-element array of float t1_array, temp float t1_scalar} t1b, temp 7-element array of structure{temp 3-element array of float t1_array, temp float t1_scalar} t1c} t2, temp 4-component vector of float v, temp int p})
+0:56 'i' (temp int)
+0:56 Constant:
+0:56 1 (const int)
+0:56 Constant:
+0:56 1 (const int)
+0:56 'j' (temp int)
+0:56 Constant:
+0:56 0 (const int)
+0:56 'k' (temp int)
+0:56 Convert int to float (temp float)
+0:56 add (temp int)
+0:56 component-wise multiply (temp int)
+0:56 'i' (temp int)
+0:56 'j' (temp int)
+0:56 'k' (temp int)
+0:55 Loop Terminal Expression
+0:55 Post-Increment (temp int)
+0:55 'k' (temp int)
+0:58 move second child to first child (temp float)
+0:58 t1_scalar: direct index for structure (noContraction temp float)
+0:58 indirect index (temp structure{temp 3-element array of float t1_array, temp float t1_scalar})
+0:58 t1b: direct index for structure (temp 6-element array of structure{temp 3-element array of float t1_array, temp float t1_scalar})
+0:58 t2: direct index for structure (temp structure{temp 5-element array of structure{temp 3-element array of float t1_array, temp float t1_scalar} t1a, temp 6-element array of structure{temp 3-element array of float t1_array, temp float t1_scalar} t1b, temp 7-element array of structure{temp 3-element array of float t1_array, temp float t1_scalar} t1c})
+0:58 indirect index (temp structure{temp float f, temp structure{temp 5-element array of structure{temp 3-element array of float t1_array, temp float t1_scalar} t1a, temp 6-element array of structure{temp 3-element array of float t1_array, temp float t1_scalar} t1b, temp 7-element array of structure{temp 3-element array of float t1_array, temp float t1_scalar} t1c} t2, temp 4-component vector of float v, temp int p})
+0:58 't3' (temp 10-element array of structure{temp float f, temp structure{temp 5-element array of structure{temp 3-element array of float t1_array, temp float t1_scalar} t1a, temp 6-element array of structure{temp 3-element array of float t1_array, temp float t1_scalar} t1b, temp 7-element array of structure{temp 3-element array of float t1_array, temp float t1_scalar} t1c} t2, temp 4-component vector of float v, temp int p})
+0:58 'i' (temp int)
+0:58 Constant:
+0:58 1 (const int)
+0:58 Constant:
+0:58 1 (const int)
+0:58 'j' (temp int)
+0:58 Constant:
+0:58 1 (const int)
+0:58 divide (noContraction temp float)
+0:58 component-wise multiply (noContraction temp float)
+0:58 Convert int to float (temp float)
+0:58 'j' (noContraction temp int)
+0:58 Constant:
+0:58 2.000000
+0:58 Convert int to float (temp float)
+0:58 'i' (noContraction temp int)
+0:54 Loop Terminal Expression
+0:54 Post-Increment (noContraction temp int)
+0:54 'j' (noContraction temp int)
+0:61 Sequence
+0:61 Sequence
+0:61 move second child to first child (temp int)
+0:61 'j' (noContraction temp int)
+0:61 Constant:
+0:61 0 (const int)
+0:61 Loop with condition tested first
+0:61 Loop Condition
+0:61 Compare Less Than (temp bool)
+0:61 'j' (temp int)
+0:61 Constant:
+0:61 6 (const int)
+0:61 Loop Body
+0:62 Sequence
+0:62 Sequence
+0:62 Sequence
+0:62 move second child to first child (temp int)
+0:62 'k' (noContraction temp int)
+0:62 Constant:
+0:62 0 (const int)
+0:62 Loop with condition tested first
+0:62 Loop Condition
+0:62 Compare Less Than (temp bool)
+0:62 'k' (temp int)
+0:62 Constant:
+0:62 3 (const int)
+0:62 Loop Body
+0:63 Sequence
+0:63 move second child to first child (temp float)
+0:63 indirect index (noContraction temp float)
+0:63 t1_array: direct index for structure (noContraction temp 3-element array of float)
+0:63 indirect index (temp structure{temp 3-element array of float t1_array, temp float t1_scalar})
+0:63 t1c: direct index for structure (temp 7-element array of structure{temp 3-element array of float t1_array, temp float t1_scalar})
+0:63 t2: direct index for structure (temp structure{temp 5-element array of structure{temp 3-element array of float t1_array, temp float t1_scalar} t1a, temp 6-element array of structure{temp 3-element array of float t1_array, temp float t1_scalar} t1b, temp 7-element array of structure{temp 3-element array of float t1_array, temp float t1_scalar} t1c})
+0:63 indirect index (temp structure{temp float f, temp structure{temp 5-element array of structure{temp 3-element array of float t1_array, temp float t1_scalar} t1a, temp 6-element array of structure{temp 3-element array of float t1_array, temp float t1_scalar} t1b, temp 7-element array of structure{temp 3-element array of float t1_array, temp float t1_scalar} t1c} t2, temp 4-component vector of float v, temp int p})
+0:63 't3' (temp 10-element array of structure{temp float f, temp structure{temp 5-element array of structure{temp 3-element array of float t1_array, temp float t1_scalar} t1a, temp 6-element array of structure{temp 3-element array of float t1_array, temp float t1_scalar} t1b, temp 7-element array of structure{temp 3-element array of float t1_array, temp float t1_scalar} t1c} t2, temp 4-component vector of float v, temp int p})
+0:63 'i' (temp int)
+0:63 Constant:
+0:63 1 (const int)
+0:63 Constant:
+0:63 2 (const int)
+0:63 'j' (temp int)
+0:63 Constant:
+0:63 0 (const int)
+0:63 'k' (temp int)
+0:63 Convert int to float (temp float)
+0:63 add (temp int)
+0:63 component-wise multiply (temp int)
+0:63 'i' (noContraction temp int)
+0:63 'j' (noContraction temp int)
+0:63 'k' (noContraction temp int)
+0:62 Loop Terminal Expression
+0:62 Post-Increment (noContraction temp int)
+0:62 'k' (noContraction temp int)
+0:65 move second child to first child (temp float)
+0:65 t1_scalar: direct index for structure (temp float)
+0:65 indirect index (temp structure{temp 3-element array of float t1_array, temp float t1_scalar})
+0:65 t1c: direct index for structure (temp 7-element array of structure{temp 3-element array of float t1_array, temp float t1_scalar})
+0:65 t2: direct index for structure (temp structure{temp 5-element array of structure{temp 3-element array of float t1_array, temp float t1_scalar} t1a, temp 6-element array of structure{temp 3-element array of float t1_array, temp float t1_scalar} t1b, temp 7-element array of structure{temp 3-element array of float t1_array, temp float t1_scalar} t1c})
+0:65 indirect index (temp structure{temp float f, temp structure{temp 5-element array of structure{temp 3-element array of float t1_array, temp float t1_scalar} t1a, temp 6-element array of structure{temp 3-element array of float t1_array, temp float t1_scalar} t1b, temp 7-element array of structure{temp 3-element array of float t1_array, temp float t1_scalar} t1c} t2, temp 4-component vector of float v, temp int p})
+0:65 't3' (temp 10-element array of structure{temp float f, temp structure{temp 5-element array of structure{temp 3-element array of float t1_array, temp float t1_scalar} t1a, temp 6-element array of structure{temp 3-element array of float t1_array, temp float t1_scalar} t1b, temp 7-element array of structure{temp 3-element array of float t1_array, temp float t1_scalar} t1c} t2, temp 4-component vector of float v, temp int p})
+0:65 'i' (temp int)
+0:65 Constant:
+0:65 1 (const int)
+0:65 Constant:
+0:65 2 (const int)
+0:65 'j' (temp int)
+0:65 Constant:
+0:65 1 (const int)
+0:65 divide (temp float)
+0:65 component-wise multiply (temp float)
+0:65 Convert int to float (temp float)
+0:65 'j' (temp int)
+0:65 Constant:
+0:65 2.000000
+0:65 Convert int to float (temp float)
+0:65 'i' (temp int)
+0:61 Loop Terminal Expression
+0:61 Post-Increment (noContraction temp int)
+0:61 'j' (noContraction temp int)
+0:43 Loop Terminal Expression
+0:43 Post-Increment (noContraction temp int)
+0:43 'i' (noContraction temp int)
+0:68 Sequence
+0:68 move second child to first child (temp int)
+0:68 'i' (temp int)
+0:68 Constant:
+0:68 2 (const int)
+0:69 move second child to first child (temp float)
+0:69 'result' (noContraction temp float)
+0:71 add (noContraction temp float)
+0:70 add (noContraction temp float)
+0:69 direct index (noContraction temp float)
+0:69 t1_array: direct index for structure (temp 3-element array of float)
+0:69 direct index (temp structure{temp 3-element array of float t1_array, temp float t1_scalar})
+0:69 t1c: direct index for structure (temp 7-element array of structure{temp 3-element array of float t1_array, temp float t1_scalar})
+0:69 t2: direct index for structure (temp structure{temp 5-element array of structure{temp 3-element array of float t1_array, temp float t1_scalar} t1a, temp 6-element array of structure{temp 3-element array of float t1_array, temp float t1_scalar} t1b, temp 7-element array of structure{temp 3-element array of float t1_array, temp float t1_scalar} t1c})
+0:69 direct index (temp structure{temp float f, temp structure{temp 5-element array of structure{temp 3-element array of float t1_array, temp float t1_scalar} t1a, temp 6-element array of structure{temp 3-element array of float t1_array, temp float t1_scalar} t1b, temp 7-element array of structure{temp 3-element array of float t1_array, temp float t1_scalar} t1c} t2, temp 4-component vector of float v, temp int p})
+0:69 't3' (temp 10-element array of structure{temp float f, temp structure{temp 5-element array of structure{temp 3-element array of float t1_array, temp float t1_scalar} t1a, temp 6-element array of structure{temp 3-element array of float t1_array, temp float t1_scalar} t1b, temp 7-element array of structure{temp 3-element array of float t1_array, temp float t1_scalar} t1c} t2, temp 4-component vector of float v, temp int p})
+0:69 Constant:
+0:69 5 (const int)
+0:69 Constant:
+0:69 1 (const int)
+0:69 Constant:
+0:69 2 (const int)
+0:69 Constant:
+0:69 6 (const int)
+0:69 Constant:
+0:69 0 (const int)
+0:69 Constant:
+0:69 1 (const int)
+0:70 t1_scalar: direct index for structure (noContraction temp float)
+0:70 direct index (temp structure{temp 3-element array of float t1_array, temp float t1_scalar})
+0:70 t1b: direct index for structure (temp 6-element array of structure{temp 3-element array of float t1_array, temp float t1_scalar})
+0:70 t2: direct index for structure (temp structure{temp 5-element array of structure{temp 3-element array of float t1_array, temp float t1_scalar} t1a, temp 6-element array of structure{temp 3-element array of float t1_array, temp float t1_scalar} t1b, temp 7-element array of structure{temp 3-element array of float t1_array, temp float t1_scalar} t1c})
+0:70 direct index (temp structure{temp float f, temp structure{temp 5-element array of structure{temp 3-element array of float t1_array, temp float t1_scalar} t1a, temp 6-element array of structure{temp 3-element array of float t1_array, temp float t1_scalar} t1b, temp 7-element array of structure{temp 3-element array of float t1_array, temp float t1_scalar} t1c} t2, temp 4-component vector of float v, temp int p})
+0:70 't3' (temp 10-element array of structure{temp float f, temp structure{temp 5-element array of structure{temp 3-element array of float t1_array, temp float t1_scalar} t1a, temp 6-element array of structure{temp 3-element array of float t1_array, temp float t1_scalar} t1b, temp 7-element array of structure{temp 3-element array of float t1_array, temp float t1_scalar} t1c} t2, temp 4-component vector of float v, temp int p})
+0:70 Constant:
+0:70 2 (const int)
+0:70 Constant:
+0:70 1 (const int)
+0:70 Constant:
+0:70 1 (const int)
+0:70 Constant:
+0:70 1 (const int)
+0:70 Constant:
+0:70 1 (const int)
+0:71 direct index (noContraction temp float)
+0:71 vector swizzle (temp 2-component vector of float)
+0:71 v: direct index for structure (temp 4-component vector of float)
+0:71 indirect index (temp structure{temp float f, temp structure{temp 5-element array of structure{temp 3-element array of float t1_array, temp float t1_scalar} t1a, temp 6-element array of structure{temp 3-element array of float t1_array, temp float t1_scalar} t1b, temp 7-element array of structure{temp 3-element array of float t1_array, temp float t1_scalar} t1c} t2, temp 4-component vector of float v, temp int p})
+0:71 't3' (temp 10-element array of structure{temp float f, temp structure{temp 5-element array of structure{temp 3-element array of float t1_array, temp float t1_scalar} t1a, temp 6-element array of structure{temp 3-element array of float t1_array, temp float t1_scalar} t1b, temp 7-element array of structure{temp 3-element array of float t1_array, temp float t1_scalar} t1c} t2, temp 4-component vector of float v, temp int p})
+0:71 subtract (temp int)
+0:71 'i' (temp int)
+0:71 Constant:
+0:71 1 (const int)
+0:71 Constant:
+0:71 2 (const int)
+0:71 Sequence
+0:71 Constant:
+0:71 0 (const int)
+0:71 Constant:
+0:71 1 (const int)
+0:71 Constant:
+0:71 0 (const int)
+0:72 Branch: Return with expression
+0:72 'result' (noContraction temp float)
+0:75 Function Definition: out_block( (global float)
+0:75 Function Parameters:
+0:76 Sequence
+0:76 Sequence
+0:76 move second child to first child (temp float)
+0:76 'a' (noContraction temp float)
+0:76 Constant:
+0:76 0.100000
+0:77 Sequence
+0:77 move second child to first child (temp float)
+0:77 'b' (noContraction temp float)
+0:77 Constant:
+0:77 0.200000
+0:78 move second child to first child (temp float)
+0:78 f1: direct index for structure (noContraction global float)
+0:78 s: direct index for structure (noContraction out structure{global float f1, global float f2})
+0:78 'partial_precise_block' (out block{noContraction out structure{global float f1, global float f2} s, out float x})
+0:78 Constant:
+0:78 0 (const int)
+0:78 Constant:
+0:78 0 (const int)
+0:78 add (noContraction temp float)
+0:78 'a' (noContraction temp float)
+0:78 'b' (noContraction temp float)
+0:79 move second child to first child (temp float)
+0:79 f2: direct index for structure (noContraction global float)
+0:79 s: direct index for structure (noContraction out structure{global float f1, global float f2})
+0:79 'partial_precise_block' (out block{noContraction out structure{global float f1, global float f2} s, out float x})
+0:79 Constant:
+0:79 0 (const int)
+0:79 Constant:
+0:79 1 (const int)
+0:79 subtract (noContraction temp float)
+0:79 'a' (noContraction temp float)
+0:79 'b' (noContraction temp float)
+0:80 move second child to first child (temp float)
+0:80 x: direct index for structure (out float)
+0:80 'partial_precise_block' (out block{noContraction out structure{global float f1, global float f2} s, out float x})
+0:80 Constant:
+0:80 1 (const int)
+0:80 component-wise multiply (temp float)
+0:80 'a' (temp float)
+0:80 'b' (temp float)
+0:82 move second child to first child (temp float)
+0:82 f1: direct index for structure (noContraction global float)
+0:82 s: direct index for structure (noContraction out structure{global float f1, global float f2})
+0:82 'all_precise_block' (noContraction out block{out structure{global float f1, global float f2} s, out float x})
+0:82 Constant:
+0:82 0 (const int)
+0:82 Constant:
+0:82 0 (const int)
+0:82 add (noContraction temp float)
+0:82 add (noContraction temp float)
+0:82 'a' (noContraction temp float)
+0:82 'b' (noContraction temp float)
+0:82 Constant:
+0:82 1.000000
+0:83 move second child to first child (temp float)
+0:83 f2: direct index for structure (noContraction global float)
+0:83 s: direct index for structure (noContraction out structure{global float f1, global float f2})
+0:83 'all_precise_block' (noContraction out block{out structure{global float f1, global float f2} s, out float x})
+0:83 Constant:
+0:83 0 (const int)
+0:83 Constant:
+0:83 1 (const int)
+0:83 subtract (noContraction temp float)
+0:83 subtract (noContraction temp float)
+0:83 'a' (noContraction temp float)
+0:83 'b' (noContraction temp float)
+0:83 Constant:
+0:83 1.000000
+0:84 move second child to first child (temp float)
+0:84 x: direct index for structure (noContraction out float)
+0:84 'all_precise_block' (noContraction out block{out structure{global float f1, global float f2} s, out float x})
+0:84 Constant:
+0:84 1 (const int)
+0:84 component-wise multiply (noContraction temp float)
+0:84 component-wise multiply (noContraction temp float)
+0:84 'a' (noContraction temp float)
+0:84 'b' (noContraction temp float)
+0:84 Constant:
+0:84 2.000000
+0:86 Branch: Return with expression
+0:86 add (temp float)
+0:86 'a' (temp float)
+0:86 'b' (temp float)
+0:89 Function Definition: main( (global void)
+0:89 Function Parameters:
+0:? Linker Objects
+0:? 'partial_precise_block' (out block{noContraction out structure{global float f1, global float f2} s, out float x})
+0:? 'all_precise_block' (noContraction out block{out structure{global float f1, global float f2} s, out float x})
+0:? 'gl_VertexID' (gl_VertexId int VertexId)
+0:? 'gl_InstanceID' (gl_InstanceId int InstanceId)
+
+
+Linked vertex stage:
+
+
+Shader version: 450
+0:? Sequence
+0:11 Function Definition: struct_member( (global float)
+0:11 Function Parameters:
+0:12 Sequence
+0:12 Sequence
+0:12 move second child to first child (temp float)
+0:12 'a' (noContraction temp float)
+0:12 Constant:
+0:12 1.000000
+0:13 Sequence
+0:13 move second child to first child (temp float)
+0:13 'b' (temp float)
+0:13 Constant:
+0:13 2.000000
+0:14 Sequence
+0:14 move second child to first child (temp float)
+0:14 'c' (temp float)
+0:14 Constant:
+0:14 3.000000
+0:15 Sequence
+0:15 move second child to first child (temp float)
+0:15 'd' (temp float)
+0:15 Constant:
+0:15 4.000000
+0:21 move second child to first child (temp float)
+0:21 f1: direct index for structure (noContraction global float)
+0:21 'S2' (temp structure{global float f1, global float f2})
+0:21 Constant:
+0:21 0 (const int)
+0:21 add (noContraction temp float)
+0:21 'a' (noContraction temp float)
+0:21 Constant:
+0:21 0.200000
+0:22 move second child to first child (temp float)
+0:22 f2: direct index for structure (global float)
+0:22 'S2' (temp structure{global float f1, global float f2})
+0:22 Constant:
+0:22 1 (const int)
+0:22 add (temp float)
+0:22 'b' (temp float)
+0:22 Constant:
+0:22 0.200000
+0:23 move second child to first child (temp float)
+0:23 f1: direct index for structure (global float)
+0:23 'S3' (temp structure{global float f1, global float f2})
+0:23 Constant:
+0:23 0 (const int)
+0:23 add (temp float)
+0:23 'a' (temp float)
+0:23 'b' (temp float)
+0:24 move second child to first child (temp structure{global float f1, global float f2})
+0:24 'S' (temp structure{global float f1, global float f2})
+0:24 'S2' (temp structure{global float f1, global float f2})
+0:25 move second child to first child (temp float)
+0:25 'result' (noContraction temp float)
+0:25 add (noContraction temp float)
+0:25 f1: direct index for structure (noContraction global float)
+0:25 'S' (temp structure{global float f1, global float f2})
+0:25 Constant:
+0:25 0 (const int)
+0:25 Constant:
+0:25 0.100000
+0:27 Branch: Return with expression
+0:27 'result' (noContraction temp float)
+0:30 Function Definition: complex_array_struct( (global float)
+0:30 Function Parameters:
+0:? Sequence
+0:43 Sequence
+0:43 Sequence
+0:43 move second child to first child (temp int)
+0:43 'i' (noContraction temp int)
+0:43 Constant:
+0:43 0 (const int)
+0:43 Loop with condition tested first
+0:43 Loop Condition
+0:43 Compare Less Than (temp bool)
+0:43 'i' (temp int)
+0:43 Constant:
+0:43 10 (const int)
+0:43 Loop Body
+0:44 Sequence
+0:44 move second child to first child (temp float)
+0:44 f: direct index for structure (temp float)
+0:44 indirect index (temp structure{temp float f, temp structure{temp 5-element array of structure{temp 3-element array of float t1_array, temp float t1_scalar} t1a, temp 6-element array of structure{temp 3-element array of float t1_array, temp float t1_scalar} t1b, temp 7-element array of structure{temp 3-element array of float t1_array, temp float t1_scalar} t1c} t2, temp 4-component vector of float v, temp int p})
+0:44 't3' (temp 10-element array of structure{temp float f, temp structure{temp 5-element array of structure{temp 3-element array of float t1_array, temp float t1_scalar} t1a, temp 6-element array of structure{temp 3-element array of float t1_array, temp float t1_scalar} t1b, temp 7-element array of structure{temp 3-element array of float t1_array, temp float t1_scalar} t1c} t2, temp 4-component vector of float v, temp int p})
+0:44 'i' (temp int)
+0:44 Constant:
+0:44 0 (const int)
+0:44 divide (temp float)
+0:44 Convert int to float (temp float)
+0:44 'i' (temp int)
+0:44 Constant:
+0:44 3.000000
+0:45 move second child to first child (temp 4-component vector of float)
+0:45 v: direct index for structure (noContraction temp 4-component vector of float)
+0:45 indirect index (temp structure{temp float f, temp structure{temp 5-element array of structure{temp 3-element array of float t1_array, temp float t1_scalar} t1a, temp 6-element array of structure{temp 3-element array of float t1_array, temp float t1_scalar} t1b, temp 7-element array of structure{temp 3-element array of float t1_array, temp float t1_scalar} t1c} t2, temp 4-component vector of float v, temp int p})
+0:45 't3' (temp 10-element array of structure{temp float f, temp structure{temp 5-element array of structure{temp 3-element array of float t1_array, temp float t1_scalar} t1a, temp 6-element array of structure{temp 3-element array of float t1_array, temp float t1_scalar} t1b, temp 7-element array of structure{temp 3-element array of float t1_array, temp float t1_scalar} t1c} t2, temp 4-component vector of float v, temp int p})
+0:45 'i' (temp int)
+0:45 Constant:
+0:45 2 (const int)
+0:45 Construct vec4 (temp 4-component vector of float)
+0:45 component-wise multiply (noContraction temp float)
+0:45 Convert int to float (temp float)
+0:45 'i' (noContraction temp int)
+0:45 Constant:
+0:45 1.500000
+0:46 move second child to first child (temp int)
+0:46 p: direct index for structure (temp int)
+0:46 indirect index (temp structure{temp float f, temp structure{temp 5-element array of structure{temp 3-element array of float t1_array, temp float t1_scalar} t1a, temp 6-element array of structure{temp 3-element array of float t1_array, temp float t1_scalar} t1b, temp 7-element array of structure{temp 3-element array of float t1_array, temp float t1_scalar} t1c} t2, temp 4-component vector of float v, temp int p})
+0:46 't3' (temp 10-element array of structure{temp float f, temp structure{temp 5-element array of structure{temp 3-element array of float t1_array, temp float t1_scalar} t1a, temp 6-element array of structure{temp 3-element array of float t1_array, temp float t1_scalar} t1b, temp 7-element array of structure{temp 3-element array of float t1_array, temp float t1_scalar} t1c} t2, temp 4-component vector of float v, temp int p})
+0:46 'i' (temp int)
+0:46 Constant:
+0:46 3 (const int)
+0:46 add (temp int)
+0:46 'i' (temp int)
+0:46 Constant:
+0:46 1 (const int)
+0:47 Sequence
+0:47 Sequence
+0:47 move second child to first child (temp int)
+0:47 'j' (temp int)
+0:47 Constant:
+0:47 0 (const int)
+0:47 Loop with condition tested first
+0:47 Loop Condition
+0:47 Compare Less Than (temp bool)
+0:47 'j' (temp int)
+0:47 Constant:
+0:47 5 (const int)
+0:47 Loop Body
+0:48 Sequence
+0:48 Sequence
+0:48 Sequence
+0:48 move second child to first child (temp int)
+0:48 'k' (temp int)
+0:48 Constant:
+0:48 0 (const int)
+0:48 Loop with condition tested first
+0:48 Loop Condition
+0:48 Compare Less Than (temp bool)
+0:48 'k' (temp int)
+0:48 Constant:
+0:48 3 (const int)
+0:48 Loop Body
+0:49 Sequence
+0:49 move second child to first child (temp float)
+0:49 indirect index (temp float)
+0:49 t1_array: direct index for structure (temp 3-element array of float)
+0:49 indirect index (temp structure{temp 3-element array of float t1_array, temp float t1_scalar})
+0:49 t1a: direct index for structure (temp 5-element array of structure{temp 3-element array of float t1_array, temp float t1_scalar})
+0:49 t2: direct index for structure (temp structure{temp 5-element array of structure{temp 3-element array of float t1_array, temp float t1_scalar} t1a, temp 6-element array of structure{temp 3-element array of float t1_array, temp float t1_scalar} t1b, temp 7-element array of structure{temp 3-element array of float t1_array, temp float t1_scalar} t1c})
+0:49 indirect index (temp structure{temp float f, temp structure{temp 5-element array of structure{temp 3-element array of float t1_array, temp float t1_scalar} t1a, temp 6-element array of structure{temp 3-element array of float t1_array, temp float t1_scalar} t1b, temp 7-element array of structure{temp 3-element array of float t1_array, temp float t1_scalar} t1c} t2, temp 4-component vector of float v, temp int p})
+0:49 't3' (temp 10-element array of structure{temp float f, temp structure{temp 5-element array of structure{temp 3-element array of float t1_array, temp float t1_scalar} t1a, temp 6-element array of structure{temp 3-element array of float t1_array, temp float t1_scalar} t1b, temp 7-element array of structure{temp 3-element array of float t1_array, temp float t1_scalar} t1c} t2, temp 4-component vector of float v, temp int p})
+0:49 'i' (temp int)
+0:49 Constant:
+0:49 1 (const int)
+0:49 Constant:
+0:49 0 (const int)
+0:49 'j' (temp int)
+0:49 Constant:
+0:49 0 (const int)
+0:49 'k' (temp int)
+0:49 Convert int to float (temp float)
+0:49 add (temp int)
+0:49 component-wise multiply (temp int)
+0:49 'i' (temp int)
+0:49 'j' (temp int)
+0:49 'k' (temp int)
+0:48 Loop Terminal Expression
+0:48 Post-Increment (temp int)
+0:48 'k' (temp int)
+0:51 move second child to first child (temp float)
+0:51 t1_scalar: direct index for structure (temp float)
+0:51 indirect index (temp structure{temp 3-element array of float t1_array, temp float t1_scalar})
+0:51 t1a: direct index for structure (temp 5-element array of structure{temp 3-element array of float t1_array, temp float t1_scalar})
+0:51 t2: direct index for structure (temp structure{temp 5-element array of structure{temp 3-element array of float t1_array, temp float t1_scalar} t1a, temp 6-element array of structure{temp 3-element array of float t1_array, temp float t1_scalar} t1b, temp 7-element array of structure{temp 3-element array of float t1_array, temp float t1_scalar} t1c})
+0:51 indirect index (temp structure{temp float f, temp structure{temp 5-element array of structure{temp 3-element array of float t1_array, temp float t1_scalar} t1a, temp 6-element array of structure{temp 3-element array of float t1_array, temp float t1_scalar} t1b, temp 7-element array of structure{temp 3-element array of float t1_array, temp float t1_scalar} t1c} t2, temp 4-component vector of float v, temp int p})
+0:51 't3' (temp 10-element array of structure{temp float f, temp structure{temp 5-element array of structure{temp 3-element array of float t1_array, temp float t1_scalar} t1a, temp 6-element array of structure{temp 3-element array of float t1_array, temp float t1_scalar} t1b, temp 7-element array of structure{temp 3-element array of float t1_array, temp float t1_scalar} t1c} t2, temp 4-component vector of float v, temp int p})
+0:51 'i' (temp int)
+0:51 Constant:
+0:51 1 (const int)
+0:51 Constant:
+0:51 0 (const int)
+0:51 'j' (temp int)
+0:51 Constant:
+0:51 1 (const int)
+0:51 divide (temp float)
+0:51 component-wise multiply (temp float)
+0:51 Convert int to float (temp float)
+0:51 'j' (temp int)
+0:51 Constant:
+0:51 2.000000
+0:51 Convert int to float (temp float)
+0:51 'i' (temp int)
+0:47 Loop Terminal Expression
+0:47 Post-Increment (temp int)
+0:47 'j' (temp int)
+0:54 Sequence
+0:54 Sequence
+0:54 move second child to first child (temp int)
+0:54 'j' (noContraction temp int)
+0:54 Constant:
+0:54 0 (const int)
+0:54 Loop with condition tested first
+0:54 Loop Condition
+0:54 Compare Less Than (temp bool)
+0:54 'j' (temp int)
+0:54 Constant:
+0:54 6 (const int)
+0:54 Loop Body
+0:55 Sequence
+0:55 Sequence
+0:55 Sequence
+0:55 move second child to first child (temp int)
+0:55 'k' (temp int)
+0:55 Constant:
+0:55 0 (const int)
+0:55 Loop with condition tested first
+0:55 Loop Condition
+0:55 Compare Less Than (temp bool)
+0:55 'k' (temp int)
+0:55 Constant:
+0:55 3 (const int)
+0:55 Loop Body
+0:56 Sequence
+0:56 move second child to first child (temp float)
+0:56 indirect index (temp float)
+0:56 t1_array: direct index for structure (temp 3-element array of float)
+0:56 indirect index (temp structure{temp 3-element array of float t1_array, temp float t1_scalar})
+0:56 t1b: direct index for structure (temp 6-element array of structure{temp 3-element array of float t1_array, temp float t1_scalar})
+0:56 t2: direct index for structure (temp structure{temp 5-element array of structure{temp 3-element array of float t1_array, temp float t1_scalar} t1a, temp 6-element array of structure{temp 3-element array of float t1_array, temp float t1_scalar} t1b, temp 7-element array of structure{temp 3-element array of float t1_array, temp float t1_scalar} t1c})
+0:56 indirect index (temp structure{temp float f, temp structure{temp 5-element array of structure{temp 3-element array of float t1_array, temp float t1_scalar} t1a, temp 6-element array of structure{temp 3-element array of float t1_array, temp float t1_scalar} t1b, temp 7-element array of structure{temp 3-element array of float t1_array, temp float t1_scalar} t1c} t2, temp 4-component vector of float v, temp int p})
+0:56 't3' (temp 10-element array of structure{temp float f, temp structure{temp 5-element array of structure{temp 3-element array of float t1_array, temp float t1_scalar} t1a, temp 6-element array of structure{temp 3-element array of float t1_array, temp float t1_scalar} t1b, temp 7-element array of structure{temp 3-element array of float t1_array, temp float t1_scalar} t1c} t2, temp 4-component vector of float v, temp int p})
+0:56 'i' (temp int)
+0:56 Constant:
+0:56 1 (const int)
+0:56 Constant:
+0:56 1 (const int)
+0:56 'j' (temp int)
+0:56 Constant:
+0:56 0 (const int)
+0:56 'k' (temp int)
+0:56 Convert int to float (temp float)
+0:56 add (temp int)
+0:56 component-wise multiply (temp int)
+0:56 'i' (temp int)
+0:56 'j' (temp int)
+0:56 'k' (temp int)
+0:55 Loop Terminal Expression
+0:55 Post-Increment (temp int)
+0:55 'k' (temp int)
+0:58 move second child to first child (temp float)
+0:58 t1_scalar: direct index for structure (noContraction temp float)
+0:58 indirect index (temp structure{temp 3-element array of float t1_array, temp float t1_scalar})
+0:58 t1b: direct index for structure (temp 6-element array of structure{temp 3-element array of float t1_array, temp float t1_scalar})
+0:58 t2: direct index for structure (temp structure{temp 5-element array of structure{temp 3-element array of float t1_array, temp float t1_scalar} t1a, temp 6-element array of structure{temp 3-element array of float t1_array, temp float t1_scalar} t1b, temp 7-element array of structure{temp 3-element array of float t1_array, temp float t1_scalar} t1c})
+0:58 indirect index (temp structure{temp float f, temp structure{temp 5-element array of structure{temp 3-element array of float t1_array, temp float t1_scalar} t1a, temp 6-element array of structure{temp 3-element array of float t1_array, temp float t1_scalar} t1b, temp 7-element array of structure{temp 3-element array of float t1_array, temp float t1_scalar} t1c} t2, temp 4-component vector of float v, temp int p})
+0:58 't3' (temp 10-element array of structure{temp float f, temp structure{temp 5-element array of structure{temp 3-element array of float t1_array, temp float t1_scalar} t1a, temp 6-element array of structure{temp 3-element array of float t1_array, temp float t1_scalar} t1b, temp 7-element array of structure{temp 3-element array of float t1_array, temp float t1_scalar} t1c} t2, temp 4-component vector of float v, temp int p})
+0:58 'i' (temp int)
+0:58 Constant:
+0:58 1 (const int)
+0:58 Constant:
+0:58 1 (const int)
+0:58 'j' (temp int)
+0:58 Constant:
+0:58 1 (const int)
+0:58 divide (noContraction temp float)
+0:58 component-wise multiply (noContraction temp float)
+0:58 Convert int to float (temp float)
+0:58 'j' (noContraction temp int)
+0:58 Constant:
+0:58 2.000000
+0:58 Convert int to float (temp float)
+0:58 'i' (noContraction temp int)
+0:54 Loop Terminal Expression
+0:54 Post-Increment (noContraction temp int)
+0:54 'j' (noContraction temp int)
+0:61 Sequence
+0:61 Sequence
+0:61 move second child to first child (temp int)
+0:61 'j' (noContraction temp int)
+0:61 Constant:
+0:61 0 (const int)
+0:61 Loop with condition tested first
+0:61 Loop Condition
+0:61 Compare Less Than (temp bool)
+0:61 'j' (temp int)
+0:61 Constant:
+0:61 6 (const int)
+0:61 Loop Body
+0:62 Sequence
+0:62 Sequence
+0:62 Sequence
+0:62 move second child to first child (temp int)
+0:62 'k' (noContraction temp int)
+0:62 Constant:
+0:62 0 (const int)
+0:62 Loop with condition tested first
+0:62 Loop Condition
+0:62 Compare Less Than (temp bool)
+0:62 'k' (temp int)
+0:62 Constant:
+0:62 3 (const int)
+0:62 Loop Body
+0:63 Sequence
+0:63 move second child to first child (temp float)
+0:63 indirect index (noContraction temp float)
+0:63 t1_array: direct index for structure (noContraction temp 3-element array of float)
+0:63 indirect index (temp structure{temp 3-element array of float t1_array, temp float t1_scalar})
+0:63 t1c: direct index for structure (temp 7-element array of structure{temp 3-element array of float t1_array, temp float t1_scalar})
+0:63 t2: direct index for structure (temp structure{temp 5-element array of structure{temp 3-element array of float t1_array, temp float t1_scalar} t1a, temp 6-element array of structure{temp 3-element array of float t1_array, temp float t1_scalar} t1b, temp 7-element array of structure{temp 3-element array of float t1_array, temp float t1_scalar} t1c})
+0:63 indirect index (temp structure{temp float f, temp structure{temp 5-element array of structure{temp 3-element array of float t1_array, temp float t1_scalar} t1a, temp 6-element array of structure{temp 3-element array of float t1_array, temp float t1_scalar} t1b, temp 7-element array of structure{temp 3-element array of float t1_array, temp float t1_scalar} t1c} t2, temp 4-component vector of float v, temp int p})
+0:63 't3' (temp 10-element array of structure{temp float f, temp structure{temp 5-element array of structure{temp 3-element array of float t1_array, temp float t1_scalar} t1a, temp 6-element array of structure{temp 3-element array of float t1_array, temp float t1_scalar} t1b, temp 7-element array of structure{temp 3-element array of float t1_array, temp float t1_scalar} t1c} t2, temp 4-component vector of float v, temp int p})
+0:63 'i' (temp int)
+0:63 Constant:
+0:63 1 (const int)
+0:63 Constant:
+0:63 2 (const int)
+0:63 'j' (temp int)
+0:63 Constant:
+0:63 0 (const int)
+0:63 'k' (temp int)
+0:63 Convert int to float (temp float)
+0:63 add (temp int)
+0:63 component-wise multiply (temp int)
+0:63 'i' (noContraction temp int)
+0:63 'j' (noContraction temp int)
+0:63 'k' (noContraction temp int)
+0:62 Loop Terminal Expression
+0:62 Post-Increment (noContraction temp int)
+0:62 'k' (noContraction temp int)
+0:65 move second child to first child (temp float)
+0:65 t1_scalar: direct index for structure (temp float)
+0:65 indirect index (temp structure{temp 3-element array of float t1_array, temp float t1_scalar})
+0:65 t1c: direct index for structure (temp 7-element array of structure{temp 3-element array of float t1_array, temp float t1_scalar})
+0:65 t2: direct index for structure (temp structure{temp 5-element array of structure{temp 3-element array of float t1_array, temp float t1_scalar} t1a, temp 6-element array of structure{temp 3-element array of float t1_array, temp float t1_scalar} t1b, temp 7-element array of structure{temp 3-element array of float t1_array, temp float t1_scalar} t1c})
+0:65 indirect index (temp structure{temp float f, temp structure{temp 5-element array of structure{temp 3-element array of float t1_array, temp float t1_scalar} t1a, temp 6-element array of structure{temp 3-element array of float t1_array, temp float t1_scalar} t1b, temp 7-element array of structure{temp 3-element array of float t1_array, temp float t1_scalar} t1c} t2, temp 4-component vector of float v, temp int p})
+0:65 't3' (temp 10-element array of structure{temp float f, temp structure{temp 5-element array of structure{temp 3-element array of float t1_array, temp float t1_scalar} t1a, temp 6-element array of structure{temp 3-element array of float t1_array, temp float t1_scalar} t1b, temp 7-element array of structure{temp 3-element array of float t1_array, temp float t1_scalar} t1c} t2, temp 4-component vector of float v, temp int p})
+0:65 'i' (temp int)
+0:65 Constant:
+0:65 1 (const int)
+0:65 Constant:
+0:65 2 (const int)
+0:65 'j' (temp int)
+0:65 Constant:
+0:65 1 (const int)
+0:65 divide (temp float)
+0:65 component-wise multiply (temp float)
+0:65 Convert int to float (temp float)
+0:65 'j' (temp int)
+0:65 Constant:
+0:65 2.000000
+0:65 Convert int to float (temp float)
+0:65 'i' (temp int)
+0:61 Loop Terminal Expression
+0:61 Post-Increment (noContraction temp int)
+0:61 'j' (noContraction temp int)
+0:43 Loop Terminal Expression
+0:43 Post-Increment (noContraction temp int)
+0:43 'i' (noContraction temp int)
+0:68 Sequence
+0:68 move second child to first child (temp int)
+0:68 'i' (temp int)
+0:68 Constant:
+0:68 2 (const int)
+0:69 move second child to first child (temp float)
+0:69 'result' (noContraction temp float)
+0:71 add (noContraction temp float)
+0:70 add (noContraction temp float)
+0:69 direct index (noContraction temp float)
+0:69 t1_array: direct index for structure (temp 3-element array of float)
+0:69 direct index (temp structure{temp 3-element array of float t1_array, temp float t1_scalar})
+0:69 t1c: direct index for structure (temp 7-element array of structure{temp 3-element array of float t1_array, temp float t1_scalar})
+0:69 t2: direct index for structure (temp structure{temp 5-element array of structure{temp 3-element array of float t1_array, temp float t1_scalar} t1a, temp 6-element array of structure{temp 3-element array of float t1_array, temp float t1_scalar} t1b, temp 7-element array of structure{temp 3-element array of float t1_array, temp float t1_scalar} t1c})
+0:69 direct index (temp structure{temp float f, temp structure{temp 5-element array of structure{temp 3-element array of float t1_array, temp float t1_scalar} t1a, temp 6-element array of structure{temp 3-element array of float t1_array, temp float t1_scalar} t1b, temp 7-element array of structure{temp 3-element array of float t1_array, temp float t1_scalar} t1c} t2, temp 4-component vector of float v, temp int p})
+0:69 't3' (temp 10-element array of structure{temp float f, temp structure{temp 5-element array of structure{temp 3-element array of float t1_array, temp float t1_scalar} t1a, temp 6-element array of structure{temp 3-element array of float t1_array, temp float t1_scalar} t1b, temp 7-element array of structure{temp 3-element array of float t1_array, temp float t1_scalar} t1c} t2, temp 4-component vector of float v, temp int p})
+0:69 Constant:
+0:69 5 (const int)
+0:69 Constant:
+0:69 1 (const int)
+0:69 Constant:
+0:69 2 (const int)
+0:69 Constant:
+0:69 6 (const int)
+0:69 Constant:
+0:69 0 (const int)
+0:69 Constant:
+0:69 1 (const int)
+0:70 t1_scalar: direct index for structure (noContraction temp float)
+0:70 direct index (temp structure{temp 3-element array of float t1_array, temp float t1_scalar})
+0:70 t1b: direct index for structure (temp 6-element array of structure{temp 3-element array of float t1_array, temp float t1_scalar})
+0:70 t2: direct index for structure (temp structure{temp 5-element array of structure{temp 3-element array of float t1_array, temp float t1_scalar} t1a, temp 6-element array of structure{temp 3-element array of float t1_array, temp float t1_scalar} t1b, temp 7-element array of structure{temp 3-element array of float t1_array, temp float t1_scalar} t1c})
+0:70 direct index (temp structure{temp float f, temp structure{temp 5-element array of structure{temp 3-element array of float t1_array, temp float t1_scalar} t1a, temp 6-element array of structure{temp 3-element array of float t1_array, temp float t1_scalar} t1b, temp 7-element array of structure{temp 3-element array of float t1_array, temp float t1_scalar} t1c} t2, temp 4-component vector of float v, temp int p})
+0:70 't3' (temp 10-element array of structure{temp float f, temp structure{temp 5-element array of structure{temp 3-element array of float t1_array, temp float t1_scalar} t1a, temp 6-element array of structure{temp 3-element array of float t1_array, temp float t1_scalar} t1b, temp 7-element array of structure{temp 3-element array of float t1_array, temp float t1_scalar} t1c} t2, temp 4-component vector of float v, temp int p})
+0:70 Constant:
+0:70 2 (const int)
+0:70 Constant:
+0:70 1 (const int)
+0:70 Constant:
+0:70 1 (const int)
+0:70 Constant:
+0:70 1 (const int)
+0:70 Constant:
+0:70 1 (const int)
+0:71 direct index (noContraction temp float)
+0:71 vector swizzle (temp 2-component vector of float)
+0:71 v: direct index for structure (temp 4-component vector of float)
+0:71 indirect index (temp structure{temp float f, temp structure{temp 5-element array of structure{temp 3-element array of float t1_array, temp float t1_scalar} t1a, temp 6-element array of structure{temp 3-element array of float t1_array, temp float t1_scalar} t1b, temp 7-element array of structure{temp 3-element array of float t1_array, temp float t1_scalar} t1c} t2, temp 4-component vector of float v, temp int p})
+0:71 't3' (temp 10-element array of structure{temp float f, temp structure{temp 5-element array of structure{temp 3-element array of float t1_array, temp float t1_scalar} t1a, temp 6-element array of structure{temp 3-element array of float t1_array, temp float t1_scalar} t1b, temp 7-element array of structure{temp 3-element array of float t1_array, temp float t1_scalar} t1c} t2, temp 4-component vector of float v, temp int p})
+0:71 subtract (temp int)
+0:71 'i' (temp int)
+0:71 Constant:
+0:71 1 (const int)
+0:71 Constant:
+0:71 2 (const int)
+0:71 Sequence
+0:71 Constant:
+0:71 0 (const int)
+0:71 Constant:
+0:71 1 (const int)
+0:71 Constant:
+0:71 0 (const int)
+0:72 Branch: Return with expression
+0:72 'result' (noContraction temp float)
+0:75 Function Definition: out_block( (global float)
+0:75 Function Parameters:
+0:76 Sequence
+0:76 Sequence
+0:76 move second child to first child (temp float)
+0:76 'a' (noContraction temp float)
+0:76 Constant:
+0:76 0.100000
+0:77 Sequence
+0:77 move second child to first child (temp float)
+0:77 'b' (noContraction temp float)
+0:77 Constant:
+0:77 0.200000
+0:78 move second child to first child (temp float)
+0:78 f1: direct index for structure (noContraction global float)
+0:78 s: direct index for structure (noContraction out structure{global float f1, global float f2})
+0:78 'partial_precise_block' (out block{noContraction out structure{global float f1, global float f2} s, out float x})
+0:78 Constant:
+0:78 0 (const int)
+0:78 Constant:
+0:78 0 (const int)
+0:78 add (noContraction temp float)
+0:78 'a' (noContraction temp float)
+0:78 'b' (noContraction temp float)
+0:79 move second child to first child (temp float)
+0:79 f2: direct index for structure (noContraction global float)
+0:79 s: direct index for structure (noContraction out structure{global float f1, global float f2})
+0:79 'partial_precise_block' (out block{noContraction out structure{global float f1, global float f2} s, out float x})
+0:79 Constant:
+0:79 0 (const int)
+0:79 Constant:
+0:79 1 (const int)
+0:79 subtract (noContraction temp float)
+0:79 'a' (noContraction temp float)
+0:79 'b' (noContraction temp float)
+0:80 move second child to first child (temp float)
+0:80 x: direct index for structure (out float)
+0:80 'partial_precise_block' (out block{noContraction out structure{global float f1, global float f2} s, out float x})
+0:80 Constant:
+0:80 1 (const int)
+0:80 component-wise multiply (temp float)
+0:80 'a' (temp float)
+0:80 'b' (temp float)
+0:82 move second child to first child (temp float)
+0:82 f1: direct index for structure (noContraction global float)
+0:82 s: direct index for structure (noContraction out structure{global float f1, global float f2})
+0:82 'all_precise_block' (noContraction out block{out structure{global float f1, global float f2} s, out float x})
+0:82 Constant:
+0:82 0 (const int)
+0:82 Constant:
+0:82 0 (const int)
+0:82 add (noContraction temp float)
+0:82 add (noContraction temp float)
+0:82 'a' (noContraction temp float)
+0:82 'b' (noContraction temp float)
+0:82 Constant:
+0:82 1.000000
+0:83 move second child to first child (temp float)
+0:83 f2: direct index for structure (noContraction global float)
+0:83 s: direct index for structure (noContraction out structure{global float f1, global float f2})
+0:83 'all_precise_block' (noContraction out block{out structure{global float f1, global float f2} s, out float x})
+0:83 Constant:
+0:83 0 (const int)
+0:83 Constant:
+0:83 1 (const int)
+0:83 subtract (noContraction temp float)
+0:83 subtract (noContraction temp float)
+0:83 'a' (noContraction temp float)
+0:83 'b' (noContraction temp float)
+0:83 Constant:
+0:83 1.000000
+0:84 move second child to first child (temp float)
+0:84 x: direct index for structure (noContraction out float)
+0:84 'all_precise_block' (noContraction out block{out structure{global float f1, global float f2} s, out float x})
+0:84 Constant:
+0:84 1 (const int)
+0:84 component-wise multiply (noContraction temp float)
+0:84 component-wise multiply (noContraction temp float)
+0:84 'a' (noContraction temp float)
+0:84 'b' (noContraction temp float)
+0:84 Constant:
+0:84 2.000000
+0:86 Branch: Return with expression
+0:86 add (temp float)
+0:86 'a' (temp float)
+0:86 'b' (temp float)
+0:89 Function Definition: main( (global void)
+0:89 Function Parameters:
+0:? Linker Objects
+0:? 'partial_precise_block' (out block{noContraction out structure{global float f1, global float f2} s, out float x})
+0:? 'all_precise_block' (noContraction out block{out structure{global float f1, global float f2} s, out float x})
+0:? 'gl_VertexID' (gl_VertexId int VertexId)
+0:? 'gl_InstanceID' (gl_InstanceId int InstanceId)
+
diff --git a/chromium/third_party/glslang/src/Test/baseResults/precision.frag.out b/chromium/third_party/glslang/src/Test/baseResults/precision.frag.out
new file mode 100644
index 00000000000..79485b48c6e
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/precision.frag.out
@@ -0,0 +1,245 @@
+precision.frag
+ERROR: 0:3: 'float' : type requires declaration of default precision qualifier
+ERROR: 0:18: 'int' : cannot apply precision statement to this type; use 'float', 'int' or a sampler type
+ERROR: 0:19: 'int' : cannot apply precision statement to this type; use 'float', 'int' or a sampler type
+ERROR: 0:21: 'float' : cannot apply precision statement to this type; use 'float', 'int' or a sampler type
+ERROR: 0:72: 'bool' : cannot apply precision statement to this type; use 'float', 'int' or a sampler type
+ERROR: 0:75: 'structure' : cannot apply precision statement to this type; use 'float', 'int' or a sampler type
+ERROR: 0:76: 'bool' : type cannot have precision qualifier
+ERROR: 7 compilation errors. No code generated.
+
+
+Shader version: 100
+ERROR: node is still EOpNull!
+0:5 Function Definition: foo(vf3; (global lowp 2-component vector of float)
+0:5 Function Parameters:
+0:5 'mv3' (in mediump 3-component vector of float)
+0:? Sequence
+0:8 Branch: Return with expression
+0:8 vector swizzle (temp highp 2-component vector of float)
+0:8 'hv4' (temp highp 4-component vector of float)
+0:8 Sequence
+0:8 Constant:
+0:8 0 (const int)
+0:8 Constant:
+0:8 1 (const int)
+0:25 Function Definition: main( (global void)
+0:25 Function Parameters:
+0:27 Sequence
+0:27 Sequence
+0:27 move second child to first child (temp highp int)
+0:27 'sum' (temp lowp int)
+0:27 add (temp highp int)
+0:27 'global_medium' (global mediump int)
+0:27 'global_high' (global highp int)
+0:29 move second child to first child (temp mediump 4-component vector of float)
+0:29 'gl_FragColor' (fragColor mediump 4-component vector of float FragColor)
+0:29 Construct vec4 (temp mediump 4-component vector of float)
+0:29 'color' (smooth in mediump 3-component vector of float)
+0:29 Constant:
+0:29 1.000000
+0:32 add second child into first child (temp highp int)
+0:32 'sum' (temp lowp int)
+0:32 'level1_high' (temp highp int)
+0:36 add second child into first child (temp lowp int)
+0:36 'sum' (temp lowp int)
+0:36 'level1_low' (temp lowp int)
+0:41 Sequence
+0:41 move second child to first child (temp mediump float)
+0:41 'd' (temp lowp float)
+0:41 distance (global mediump float)
+0:41 'arg1' (temp lowp float)
+0:41 'arg2' (temp mediump float)
+0:? Sequence
+0:45 add second child into first child (temp lowp int)
+0:45 'sum' (temp lowp int)
+0:45 'level2_low' (temp lowp int)
+0:49 add second child into first child (temp highp int)
+0:49 'sum' (temp lowp int)
+0:49 'level2_high' (temp highp int)
+0:58 Loop with condition not tested first
+0:58 Loop Condition
+0:58 Constant:
+0:58 true (const bool)
+0:58 Loop Body
+0:51 Sequence
+0:51 Test condition and select (temp void)
+0:51 Condition
+0:51 Constant:
+0:51 true (const bool)
+0:51 true case
+0:? Sequence
+0:54 add second child into first child (temp mediump int)
+0:54 'sum' (temp lowp int)
+0:54 'level4_medium' (temp mediump int)
+0:57 add second child into first child (temp highp int)
+0:57 'sum' (temp lowp int)
+0:57 'level3_high' (temp highp int)
+0:60 add second child into first child (temp highp int)
+0:60 'sum' (temp lowp int)
+0:60 'level2_high2' (temp highp int)
+0:63 add second child into first child (temp lowp int)
+0:63 'sum' (temp lowp int)
+0:63 'level1_low3' (temp lowp int)
+0:65 add second child into first child (temp lowp int)
+0:65 'sum' (temp lowp int)
+0:65 add (temp lowp int)
+0:65 Constant:
+0:65 4 (const int)
+0:65 direct index (temp lowp int)
+0:65 add (temp lowp 2-component vector of int)
+0:65 component-wise multiply (temp lowp 2-component vector of int)
+0:65 Construct ivec2 (temp lowp 2-component vector of int)
+0:65 'level1_low3' (temp lowp int)
+0:65 Construct ivec2 (temp lowp 2-component vector of int)
+0:65 'level1_high' (temp highp int)
+0:65 Construct ivec2 (temp lowp 2-component vector of int)
+0:65 Comma (temp highp int)
+0:65 'level1_low3' (temp lowp int)
+0:65 'level1_high' (temp highp int)
+0:65 Constant:
+0:65 0 (const int)
+0:67 texture (global lowp 4-component vector of float)
+0:67 'samplerLow' (uniform lowp sampler2D)
+0:67 Constant:
+0:67 0.100000
+0:67 0.200000
+0:68 texture (global mediump 4-component vector of float)
+0:68 'samplerMed' (uniform mediump sampler2D)
+0:68 Constant:
+0:68 0.100000
+0:68 0.200000
+0:69 texture (global highp 4-component vector of float)
+0:69 'samplerHigh' (uniform highp sampler2D)
+0:69 Constant:
+0:69 0.100000
+0:69 0.200000
+0:? Linker Objects
+0:? 'color' (smooth in mediump 3-component vector of float)
+0:? 'global_medium' (global mediump int)
+0:? 'samplerLow' (uniform lowp sampler2D)
+0:? 'samplerMed' (uniform mediump sampler2D)
+0:? 'samplerHigh' (uniform highp sampler2D)
+0:? 'uint' (global mediump 4-component vector of float)
+0:? 'global_high' (global highp int)
+0:? 'b2' (global mediump 2-component vector of bool)
+
+
+Linked fragment stage:
+
+
+Shader version: 100
+ERROR: node is still EOpNull!
+0:5 Function Definition: foo(vf3; (global lowp 2-component vector of float)
+0:5 Function Parameters:
+0:5 'mv3' (in mediump 3-component vector of float)
+0:? Sequence
+0:8 Branch: Return with expression
+0:8 vector swizzle (temp highp 2-component vector of float)
+0:8 'hv4' (temp highp 4-component vector of float)
+0:8 Sequence
+0:8 Constant:
+0:8 0 (const int)
+0:8 Constant:
+0:8 1 (const int)
+0:25 Function Definition: main( (global void)
+0:25 Function Parameters:
+0:27 Sequence
+0:27 Sequence
+0:27 move second child to first child (temp highp int)
+0:27 'sum' (temp lowp int)
+0:27 add (temp highp int)
+0:27 'global_medium' (global mediump int)
+0:27 'global_high' (global highp int)
+0:29 move second child to first child (temp mediump 4-component vector of float)
+0:29 'gl_FragColor' (fragColor mediump 4-component vector of float FragColor)
+0:29 Construct vec4 (temp mediump 4-component vector of float)
+0:29 'color' (smooth in mediump 3-component vector of float)
+0:29 Constant:
+0:29 1.000000
+0:32 add second child into first child (temp highp int)
+0:32 'sum' (temp lowp int)
+0:32 'level1_high' (temp highp int)
+0:36 add second child into first child (temp lowp int)
+0:36 'sum' (temp lowp int)
+0:36 'level1_low' (temp lowp int)
+0:41 Sequence
+0:41 move second child to first child (temp mediump float)
+0:41 'd' (temp lowp float)
+0:41 distance (global mediump float)
+0:41 'arg1' (temp lowp float)
+0:41 'arg2' (temp mediump float)
+0:? Sequence
+0:45 add second child into first child (temp lowp int)
+0:45 'sum' (temp lowp int)
+0:45 'level2_low' (temp lowp int)
+0:49 add second child into first child (temp highp int)
+0:49 'sum' (temp lowp int)
+0:49 'level2_high' (temp highp int)
+0:58 Loop with condition not tested first
+0:58 Loop Condition
+0:58 Constant:
+0:58 true (const bool)
+0:58 Loop Body
+0:51 Sequence
+0:51 Test condition and select (temp void)
+0:51 Condition
+0:51 Constant:
+0:51 true (const bool)
+0:51 true case
+0:? Sequence
+0:54 add second child into first child (temp mediump int)
+0:54 'sum' (temp lowp int)
+0:54 'level4_medium' (temp mediump int)
+0:57 add second child into first child (temp highp int)
+0:57 'sum' (temp lowp int)
+0:57 'level3_high' (temp highp int)
+0:60 add second child into first child (temp highp int)
+0:60 'sum' (temp lowp int)
+0:60 'level2_high2' (temp highp int)
+0:63 add second child into first child (temp lowp int)
+0:63 'sum' (temp lowp int)
+0:63 'level1_low3' (temp lowp int)
+0:65 add second child into first child (temp lowp int)
+0:65 'sum' (temp lowp int)
+0:65 add (temp lowp int)
+0:65 Constant:
+0:65 4 (const int)
+0:65 direct index (temp lowp int)
+0:65 add (temp lowp 2-component vector of int)
+0:65 component-wise multiply (temp lowp 2-component vector of int)
+0:65 Construct ivec2 (temp lowp 2-component vector of int)
+0:65 'level1_low3' (temp lowp int)
+0:65 Construct ivec2 (temp lowp 2-component vector of int)
+0:65 'level1_high' (temp highp int)
+0:65 Construct ivec2 (temp lowp 2-component vector of int)
+0:65 Comma (temp highp int)
+0:65 'level1_low3' (temp lowp int)
+0:65 'level1_high' (temp highp int)
+0:65 Constant:
+0:65 0 (const int)
+0:67 texture (global lowp 4-component vector of float)
+0:67 'samplerLow' (uniform lowp sampler2D)
+0:67 Constant:
+0:67 0.100000
+0:67 0.200000
+0:68 texture (global mediump 4-component vector of float)
+0:68 'samplerMed' (uniform mediump sampler2D)
+0:68 Constant:
+0:68 0.100000
+0:68 0.200000
+0:69 texture (global highp 4-component vector of float)
+0:69 'samplerHigh' (uniform highp sampler2D)
+0:69 Constant:
+0:69 0.100000
+0:69 0.200000
+0:? Linker Objects
+0:? 'color' (smooth in mediump 3-component vector of float)
+0:? 'global_medium' (global mediump int)
+0:? 'samplerLow' (uniform lowp sampler2D)
+0:? 'samplerMed' (uniform mediump sampler2D)
+0:? 'samplerHigh' (uniform highp sampler2D)
+0:? 'uint' (global mediump 4-component vector of float)
+0:? 'global_high' (global highp int)
+0:? 'b2' (global mediump 2-component vector of bool)
+
diff --git a/chromium/third_party/glslang/src/Test/baseResults/precision.vert.out b/chromium/third_party/glslang/src/Test/baseResults/precision.vert.out
new file mode 100644
index 00000000000..f433ba52579
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/precision.vert.out
@@ -0,0 +1,99 @@
+precision.vert
+ERROR: 0:7: 'sampler/image' : type requires declaration of default precision qualifier
+ERROR: 0:8: 'sampler/image' : type requires declaration of default precision qualifier
+ERROR: 0:14: 'sampler/image' : type requires declaration of default precision qualifier
+ERROR: 3 compilation errors. No code generated.
+
+
+Shader version: 300
+ERROR: node is still EOpNull!
+0:18 Function Definition: main( (global void)
+0:18 Function Parameters:
+0:20 Sequence
+0:20 Sequence
+0:20 move second child to first child (temp highp 4-component vector of float)
+0:20 't' (temp highp 4-component vector of float)
+0:20 texture (global lowp 4-component vector of float)
+0:20 's2D' (uniform lowp sampler2D)
+0:20 Constant:
+0:20 0.100000
+0:20 0.200000
+0:21 add second child into first child (temp highp 4-component vector of float)
+0:21 't' (temp highp 4-component vector of float)
+0:21 texture (global highp 4-component vector of float)
+0:21 's2Dhigh' (uniform highp sampler2D)
+0:21 Constant:
+0:21 0.100000
+0:21 0.200000
+0:22 add second child into first child (temp highp 4-component vector of float)
+0:22 't' (temp highp 4-component vector of float)
+0:22 texture (global mediump float)
+0:22 's2dAS' (uniform mediump sampler2DArrayShadow)
+0:22 Constant:
+0:22 0.500000
+0:22 0.500000
+0:22 0.500000
+0:22 0.500000
+0:24 move second child to first child (temp highp 4-component vector of float)
+0:24 'gl_Position' (gl_Position highp 4-component vector of float Position)
+0:24 'pos' (in highp 4-component vector of float)
+0:? Linker Objects
+0:? 'pos' (in highp 4-component vector of float)
+0:? 's2D' (uniform lowp sampler2D)
+0:? 'sCube' (uniform lowp samplerCube)
+0:? 'is2DAbad' (uniform mediump isampler2DArray)
+0:? 's2dASbad' (uniform mediump sampler2DArrayShadow)
+0:? 's2dAS' (uniform mediump sampler2DArrayShadow)
+0:? 'is2DAbad2' (uniform mediump isampler2DArray)
+0:? 's2Dhigh' (uniform highp sampler2D)
+0:? 'gl_VertexID' (gl_VertexId highp int VertexId)
+0:? 'gl_InstanceID' (gl_InstanceId highp int InstanceId)
+
+
+Linked vertex stage:
+
+
+Shader version: 300
+ERROR: node is still EOpNull!
+0:18 Function Definition: main( (global void)
+0:18 Function Parameters:
+0:20 Sequence
+0:20 Sequence
+0:20 move second child to first child (temp highp 4-component vector of float)
+0:20 't' (temp highp 4-component vector of float)
+0:20 texture (global lowp 4-component vector of float)
+0:20 's2D' (uniform lowp sampler2D)
+0:20 Constant:
+0:20 0.100000
+0:20 0.200000
+0:21 add second child into first child (temp highp 4-component vector of float)
+0:21 't' (temp highp 4-component vector of float)
+0:21 texture (global highp 4-component vector of float)
+0:21 's2Dhigh' (uniform highp sampler2D)
+0:21 Constant:
+0:21 0.100000
+0:21 0.200000
+0:22 add second child into first child (temp highp 4-component vector of float)
+0:22 't' (temp highp 4-component vector of float)
+0:22 texture (global mediump float)
+0:22 's2dAS' (uniform mediump sampler2DArrayShadow)
+0:22 Constant:
+0:22 0.500000
+0:22 0.500000
+0:22 0.500000
+0:22 0.500000
+0:24 move second child to first child (temp highp 4-component vector of float)
+0:24 'gl_Position' (gl_Position highp 4-component vector of float Position)
+0:24 'pos' (in highp 4-component vector of float)
+0:? Linker Objects
+0:? 'pos' (in highp 4-component vector of float)
+0:? 's2D' (uniform lowp sampler2D)
+0:? 'sCube' (uniform lowp samplerCube)
+0:? 'is2DAbad' (uniform mediump isampler2DArray)
+0:? 's2dASbad' (uniform mediump sampler2DArrayShadow)
+0:? 's2dAS' (uniform mediump sampler2DArrayShadow)
+0:? 'is2DAbad2' (uniform mediump isampler2DArray)
+0:? 's2Dhigh' (uniform highp sampler2D)
+0:? 'gl_VertexID' (gl_VertexId highp int VertexId)
+0:? 'gl_InstanceID' (gl_InstanceId highp int InstanceId)
+
diff --git a/chromium/third_party/glslang/src/Test/baseResults/prepost.frag.out b/chromium/third_party/glslang/src/Test/baseResults/prepost.frag.out
new file mode 100644
index 00000000000..ac24229597f
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/prepost.frag.out
@@ -0,0 +1,271 @@
+prepost.frag
+Shader version: 140
+0:? Sequence
+0:3 Function Definition: main( (global void)
+0:3 Function Parameters:
+0:? Sequence
+0:10 Sequence
+0:10 move second child to first child (temp int)
+0:10 'index' (temp int)
+0:10 Constant:
+0:10 5 (const int)
+0:12 move second child to first child (temp float)
+0:12 direct index (temp float)
+0:12 y: direct index for structure (temp 5-element array of float)
+0:12 'str' (temp structure{temp 5-element array of float y})
+0:12 Constant:
+0:12 0 (const int)
+0:12 Constant:
+0:12 4 (const int)
+0:12 Constant:
+0:12 2.000000
+0:13 move second child to first child (temp float)
+0:13 't' (temp float)
+0:13 Pre-Increment (temp float)
+0:13 indirect index (temp float)
+0:13 y: direct index for structure (temp 5-element array of float)
+0:13 'str' (temp structure{temp 5-element array of float y})
+0:13 Constant:
+0:13 0 (const int)
+0:13 Pre-Decrement (temp int)
+0:13 'index' (temp int)
+0:14 add second child into first child (temp float)
+0:14 direct index (temp float)
+0:14 y: direct index for structure (temp 5-element array of float)
+0:14 'str' (temp structure{temp 5-element array of float y})
+0:14 Constant:
+0:14 0 (const int)
+0:14 Constant:
+0:14 4 (const int)
+0:14 't' (temp float)
+0:15 move second child to first child (temp float)
+0:15 't' (temp float)
+0:15 Post-Decrement (temp float)
+0:15 direct index (temp float)
+0:15 y: direct index for structure (temp 5-element array of float)
+0:15 'str' (temp structure{temp 5-element array of float y})
+0:15 Constant:
+0:15 0 (const int)
+0:15 Constant:
+0:15 4 (const int)
+0:16 add second child into first child (temp float)
+0:16 indirect index (temp float)
+0:16 y: direct index for structure (temp 5-element array of float)
+0:16 'str' (temp structure{temp 5-element array of float y})
+0:16 Constant:
+0:16 0 (const int)
+0:16 Post-Increment (temp int)
+0:16 'index' (temp int)
+0:16 't' (temp float)
+0:17 Pre-Decrement (temp float)
+0:17 indirect index (temp float)
+0:17 y: direct index for structure (temp 5-element array of float)
+0:17 'str' (temp structure{temp 5-element array of float y})
+0:17 Constant:
+0:17 0 (const int)
+0:17 Pre-Decrement (temp int)
+0:17 'index' (temp int)
+0:19 Sequence
+0:19 move second child to first child (temp float)
+0:19 'x' (temp float)
+0:19 direct index (temp float)
+0:19 y: direct index for structure (temp 5-element array of float)
+0:19 'str' (temp structure{temp 5-element array of float y})
+0:19 Constant:
+0:19 0 (const int)
+0:19 Constant:
+0:19 4 (const int)
+0:20 Pre-Increment (temp float)
+0:20 'x' (temp float)
+0:21 Pre-Decrement (temp float)
+0:21 'x' (temp float)
+0:22 Post-Increment (temp float)
+0:22 'x' (temp float)
+0:23 Post-Decrement (temp float)
+0:23 'x' (temp float)
+0:27 Sequence
+0:27 move second child to first child (temp float)
+0:27 'y' (temp float)
+0:27 component-wise multiply (temp float)
+0:27 'x' (temp float)
+0:27 Pre-Increment (temp float)
+0:27 'x' (temp float)
+0:28 Sequence
+0:28 move second child to first child (temp float)
+0:28 'z' (temp float)
+0:28 component-wise multiply (temp float)
+0:28 'y' (temp float)
+0:28 Post-Decrement (temp float)
+0:28 'x' (temp float)
+0:33 Sequence
+0:33 move second child to first child (temp 4-component vector of float)
+0:33 'v' (temp 4-component vector of float)
+0:33 Constant:
+0:33 1.000000
+0:33 2.000000
+0:33 3.000000
+0:33 4.000000
+0:34 move second child to first child (temp float)
+0:34 direct index (temp float)
+0:34 'v' (temp 4-component vector of float)
+0:34 Constant:
+0:34 1 (const int)
+0:34 Post-Decrement (temp float)
+0:34 direct index (temp float)
+0:34 'v' (temp 4-component vector of float)
+0:34 Constant:
+0:34 2 (const int)
+0:35 move second child to first child (temp float)
+0:35 direct index (temp float)
+0:35 'v' (temp 4-component vector of float)
+0:35 Constant:
+0:35 0 (const int)
+0:35 Pre-Decrement (temp float)
+0:35 direct index (temp float)
+0:35 'v' (temp 4-component vector of float)
+0:35 Constant:
+0:35 3 (const int)
+0:37 move second child to first child (temp 4-component vector of float)
+0:37 'gl_FragColor' (fragColor 4-component vector of float FragColor)
+0:37 vector-scale (temp 4-component vector of float)
+0:37 'z' (temp float)
+0:37 'v' (temp 4-component vector of float)
+0:? Linker Objects
+
+
+Linked fragment stage:
+
+
+Shader version: 140
+0:? Sequence
+0:3 Function Definition: main( (global void)
+0:3 Function Parameters:
+0:? Sequence
+0:10 Sequence
+0:10 move second child to first child (temp int)
+0:10 'index' (temp int)
+0:10 Constant:
+0:10 5 (const int)
+0:12 move second child to first child (temp float)
+0:12 direct index (temp float)
+0:12 y: direct index for structure (temp 5-element array of float)
+0:12 'str' (temp structure{temp 5-element array of float y})
+0:12 Constant:
+0:12 0 (const int)
+0:12 Constant:
+0:12 4 (const int)
+0:12 Constant:
+0:12 2.000000
+0:13 move second child to first child (temp float)
+0:13 't' (temp float)
+0:13 Pre-Increment (temp float)
+0:13 indirect index (temp float)
+0:13 y: direct index for structure (temp 5-element array of float)
+0:13 'str' (temp structure{temp 5-element array of float y})
+0:13 Constant:
+0:13 0 (const int)
+0:13 Pre-Decrement (temp int)
+0:13 'index' (temp int)
+0:14 add second child into first child (temp float)
+0:14 direct index (temp float)
+0:14 y: direct index for structure (temp 5-element array of float)
+0:14 'str' (temp structure{temp 5-element array of float y})
+0:14 Constant:
+0:14 0 (const int)
+0:14 Constant:
+0:14 4 (const int)
+0:14 't' (temp float)
+0:15 move second child to first child (temp float)
+0:15 't' (temp float)
+0:15 Post-Decrement (temp float)
+0:15 direct index (temp float)
+0:15 y: direct index for structure (temp 5-element array of float)
+0:15 'str' (temp structure{temp 5-element array of float y})
+0:15 Constant:
+0:15 0 (const int)
+0:15 Constant:
+0:15 4 (const int)
+0:16 add second child into first child (temp float)
+0:16 indirect index (temp float)
+0:16 y: direct index for structure (temp 5-element array of float)
+0:16 'str' (temp structure{temp 5-element array of float y})
+0:16 Constant:
+0:16 0 (const int)
+0:16 Post-Increment (temp int)
+0:16 'index' (temp int)
+0:16 't' (temp float)
+0:17 Pre-Decrement (temp float)
+0:17 indirect index (temp float)
+0:17 y: direct index for structure (temp 5-element array of float)
+0:17 'str' (temp structure{temp 5-element array of float y})
+0:17 Constant:
+0:17 0 (const int)
+0:17 Pre-Decrement (temp int)
+0:17 'index' (temp int)
+0:19 Sequence
+0:19 move second child to first child (temp float)
+0:19 'x' (temp float)
+0:19 direct index (temp float)
+0:19 y: direct index for structure (temp 5-element array of float)
+0:19 'str' (temp structure{temp 5-element array of float y})
+0:19 Constant:
+0:19 0 (const int)
+0:19 Constant:
+0:19 4 (const int)
+0:20 Pre-Increment (temp float)
+0:20 'x' (temp float)
+0:21 Pre-Decrement (temp float)
+0:21 'x' (temp float)
+0:22 Post-Increment (temp float)
+0:22 'x' (temp float)
+0:23 Post-Decrement (temp float)
+0:23 'x' (temp float)
+0:27 Sequence
+0:27 move second child to first child (temp float)
+0:27 'y' (temp float)
+0:27 component-wise multiply (temp float)
+0:27 'x' (temp float)
+0:27 Pre-Increment (temp float)
+0:27 'x' (temp float)
+0:28 Sequence
+0:28 move second child to first child (temp float)
+0:28 'z' (temp float)
+0:28 component-wise multiply (temp float)
+0:28 'y' (temp float)
+0:28 Post-Decrement (temp float)
+0:28 'x' (temp float)
+0:33 Sequence
+0:33 move second child to first child (temp 4-component vector of float)
+0:33 'v' (temp 4-component vector of float)
+0:33 Constant:
+0:33 1.000000
+0:33 2.000000
+0:33 3.000000
+0:33 4.000000
+0:34 move second child to first child (temp float)
+0:34 direct index (temp float)
+0:34 'v' (temp 4-component vector of float)
+0:34 Constant:
+0:34 1 (const int)
+0:34 Post-Decrement (temp float)
+0:34 direct index (temp float)
+0:34 'v' (temp 4-component vector of float)
+0:34 Constant:
+0:34 2 (const int)
+0:35 move second child to first child (temp float)
+0:35 direct index (temp float)
+0:35 'v' (temp 4-component vector of float)
+0:35 Constant:
+0:35 0 (const int)
+0:35 Pre-Decrement (temp float)
+0:35 direct index (temp float)
+0:35 'v' (temp 4-component vector of float)
+0:35 Constant:
+0:35 3 (const int)
+0:37 move second child to first child (temp 4-component vector of float)
+0:37 'gl_FragColor' (fragColor 4-component vector of float FragColor)
+0:37 vector-scale (temp 4-component vector of float)
+0:37 'z' (temp float)
+0:37 'v' (temp 4-component vector of float)
+0:? Linker Objects
+
diff --git a/chromium/third_party/glslang/src/Test/baseResults/preprocessor.cpp_style___FILE__.vert.err b/chromium/third_party/glslang/src/Test/baseResults/preprocessor.cpp_style___FILE__.vert.err
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/preprocessor.cpp_style___FILE__.vert.err
diff --git a/chromium/third_party/glslang/src/Test/baseResults/preprocessor.cpp_style___FILE__.vert.out b/chromium/third_party/glslang/src/Test/baseResults/preprocessor.cpp_style___FILE__.vert.out
new file mode 100644
index 00000000000..e63d81a61dc
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/preprocessor.cpp_style___FILE__.vert.out
@@ -0,0 +1,37 @@
+#extension GL_GOOGLE_cpp_style_line_directive : enable
+
+0
+
+#line 150 "a.h"
+ "a.h"
+
+#line 24
+ "a.h"
+
+#line 42
+ "a.h"
+
+#line 30 "b.cc"
+ "b.cc"
+
+#line 10 3
+ 3
+
+#line 48
+ 3
+
+#line 4
+ 3
+
+#line 55 100
+ 100
+
+#line 1000 "c"
+ "c"
+
+#line 42 1
+ 1
+
+#line 42 "this-is-a-quite-long-name-maybe-i-should-shorten-it"
+ "this-is-a-quite-long-name-maybe-i-should-shorten-it"
+
diff --git a/chromium/third_party/glslang/src/Test/baseResults/preprocessor.cpp_style_line_directive.vert.err b/chromium/third_party/glslang/src/Test/baseResults/preprocessor.cpp_style_line_directive.vert.err
new file mode 100644
index 00000000000..794ded806b9
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/preprocessor.cpp_style_line_directive.vert.err
@@ -0,0 +1,15 @@
+ERROR: 0:3: '#error' : at 0:3
+ERROR: a.h:150: '#error' : at a.h:150
+ERROR: a.h:24: '#error' : at a.h:24
+ERROR: a.h:42: '#error' : at a.h:42
+ERROR: b.cc:30: '#error' : at b.cc:30
+ERROR: 3:10: '#error' : at 3:10
+ERROR: 3:48: '#error' : at 3:48
+ERROR: 3:4: '#error' : at 3:4
+ERROR: 100:55: '#error' : at 100:55
+ERROR: c:1000: '#error' : at c:1000
+ERROR: 1:42: '#error' : at 1:42
+ERROR: this-is-a-quite-long-name-maybe-i-should-shorten-it:42: '#error' : at this-is-a-quite-long-name-maybe-i-should-shorten-it:42
+ERROR: 12 compilation errors. No code generated.
+
+
diff --git a/chromium/third_party/glslang/src/Test/baseResults/preprocessor.cpp_style_line_directive.vert.out b/chromium/third_party/glslang/src/Test/baseResults/preprocessor.cpp_style_line_directive.vert.out
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/preprocessor.cpp_style_line_directive.vert.out
diff --git a/chromium/third_party/glslang/src/Test/baseResults/preprocessor.defined.vert.err b/chromium/third_party/glslang/src/Test/baseResults/preprocessor.defined.vert.err
new file mode 100644
index 00000000000..8dddabca008
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/preprocessor.defined.vert.err
@@ -0,0 +1,4 @@
+ERROR: 0:2: '#define' : "defined" can't be (un)defined: defined
+ERROR: 1 compilation errors. No code generated.
+
+
diff --git a/chromium/third_party/glslang/src/Test/baseResults/preprocessor.defined.vert.out b/chromium/third_party/glslang/src/Test/baseResults/preprocessor.defined.vert.out
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/preprocessor.defined.vert.out
diff --git a/chromium/third_party/glslang/src/Test/baseResults/preprocessor.edge_cases.vert.err b/chromium/third_party/glslang/src/Test/baseResults/preprocessor.edge_cases.vert.err
new file mode 100644
index 00000000000..5f177e6cc12
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/preprocessor.edge_cases.vert.err
@@ -0,0 +1,2 @@
+Warning, version 310 is not yet complete; most version-specific features are present, but some are missing.
+
diff --git a/chromium/third_party/glslang/src/Test/baseResults/preprocessor.edge_cases.vert.out b/chromium/third_party/glslang/src/Test/baseResults/preprocessor.edge_cases.vert.out
new file mode 100644
index 00000000000..17d9049bfd8
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/preprocessor.edge_cases.vert.out
@@ -0,0 +1,16 @@
+#version 310 es
+
+
+
+
+
+
+
+
+
+
+
+void main(){
+ gl_Position = vec4(3 + 2 + 2 * 4 + 2 + 3 * 2);
+}
+
diff --git a/chromium/third_party/glslang/src/Test/baseResults/preprocessor.eof_missing.vert.err b/chromium/third_party/glslang/src/Test/baseResults/preprocessor.eof_missing.vert.err
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/preprocessor.eof_missing.vert.err
diff --git a/chromium/third_party/glslang/src/Test/baseResults/preprocessor.eof_missing.vert.out b/chromium/third_party/glslang/src/Test/baseResults/preprocessor.eof_missing.vert.out
new file mode 100644
index 00000000000..bf09d53e0a3
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/preprocessor.eof_missing.vert.out
@@ -0,0 +1,2 @@
+noEOF
+
diff --git a/chromium/third_party/glslang/src/Test/baseResults/preprocessor.errors.vert.err b/chromium/third_party/glslang/src/Test/baseResults/preprocessor.errors.vert.err
new file mode 100644
index 00000000000..cfde4041e9f
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/preprocessor.errors.vert.err
@@ -0,0 +1,8 @@
+Warning, version 310 is not yet complete; most version-specific features are present, but some are missing.
+ERROR: 0:9: '#error' : This should show up in pp output .
+ERROR: 0:14: '#' : invalid directive: def
+ERROR: 0:15: 'preprocessor evaluation' : undefined macro in expression not allowed in es profile Y
+ERROR: 0:21: '' : missing #endif
+ERROR: 4 compilation errors. No code generated.
+
+
diff --git a/chromium/third_party/glslang/src/Test/baseResults/preprocessor.errors.vert.out b/chromium/third_party/glslang/src/Test/baseResults/preprocessor.errors.vert.out
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/preprocessor.errors.vert.out
diff --git a/chromium/third_party/glslang/src/Test/baseResults/preprocessor.extensions.vert.err b/chromium/third_party/glslang/src/Test/baseResults/preprocessor.extensions.vert.err
new file mode 100644
index 00000000000..925cc0ca05d
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/preprocessor.extensions.vert.err
@@ -0,0 +1,3 @@
+Warning, version 310 is not yet complete; most version-specific features are present, but some are missing.
+WARNING: 0:6: '#extension' : extension not supported: GL_EXT_shader_texture_image_samples
+
diff --git a/chromium/third_party/glslang/src/Test/baseResults/preprocessor.extensions.vert.out b/chromium/third_party/glslang/src/Test/baseResults/preprocessor.extensions.vert.out
new file mode 100644
index 00000000000..57d2e199fb4
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/preprocessor.extensions.vert.out
@@ -0,0 +1,12 @@
+#version 310 es
+
+#extension GL_EXT_geometry_shader : enable
+#extension GL_EXT_frag_depth : disable
+#extension GL_EXT_gpu_shader5 : require
+#extension GL_EXT_shader_texture_image_samples : warn
+
+#extension unknown_extension : require
+
+int main(){
+}
+
diff --git a/chromium/third_party/glslang/src/Test/baseResults/preprocessor.function_macro.vert.err b/chromium/third_party/glslang/src/Test/baseResults/preprocessor.function_macro.vert.err
new file mode 100644
index 00000000000..5f177e6cc12
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/preprocessor.function_macro.vert.err
@@ -0,0 +1,2 @@
+Warning, version 310 is not yet complete; most version-specific features are present, but some are missing.
+
diff --git a/chromium/third_party/glslang/src/Test/baseResults/preprocessor.function_macro.vert.out b/chromium/third_party/glslang/src/Test/baseResults/preprocessor.function_macro.vert.out
new file mode 100644
index 00000000000..1280ddf644d
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/preprocessor.function_macro.vert.out
@@ -0,0 +1,21 @@
+#version 310 es
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+int main(){
+ gl_Position = vec4(3 + 1, 3 + 4, 3 + 1);
+ gl_Position = vec4(1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12);
+ gl_Position = vec4(4 + 3 + 3);
+}
+
diff --git a/chromium/third_party/glslang/src/Test/baseResults/preprocessor.include.disabled.vert.err b/chromium/third_party/glslang/src/Test/baseResults/preprocessor.include.disabled.vert.err
new file mode 100644
index 00000000000..7d1f0a00588
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/preprocessor.include.disabled.vert.err
@@ -0,0 +1,13 @@
+ERROR: 0:8000: '#include' : required extension not requested: GL_GOOGLE_include_directive
+ERROR: 0:8000: '#include' : must be followed by a file designation
+ERROR: 0:8001: '#include' : required extension not requested: GL_GOOGLE_include_directive
+ERROR: 0:8001: '#include' : must be followed by a file designation
+ERROR: 0:8002: '#include' : required extension not requested: GL_GOOGLE_include_directive
+ERROR: 0:8002: '#include' : unexpected include directive
+ERROR: 0:8003: '#include' : required extension not requested: GL_GOOGLE_include_directive
+ERROR: 0:8003: '#include' : extra content after file designation
+ERROR: 0:8004: '#include' : required extension not requested: GL_GOOGLE_include_directive
+ERROR: 0:8004: '#include' : unexpected include directive
+ERROR: 10 compilation errors. No code generated.
+
+
diff --git a/chromium/third_party/glslang/src/Test/baseResults/preprocessor.include.disabled.vert.out b/chromium/third_party/glslang/src/Test/baseResults/preprocessor.include.disabled.vert.out
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/preprocessor.include.disabled.vert.out
diff --git a/chromium/third_party/glslang/src/Test/baseResults/preprocessor.include.enabled.vert.err b/chromium/third_party/glslang/src/Test/baseResults/preprocessor.include.enabled.vert.err
new file mode 100644
index 00000000000..be8c5cf3a10
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/preprocessor.include.enabled.vert.err
@@ -0,0 +1,8 @@
+ERROR: 0:8000: '#include' : must be followed by a file designation
+ERROR: 0:8001: '#include' : must be followed by a file designation
+ERROR: 0:8002: '#include' : unexpected include directive
+ERROR: 0:8003: '#include' : extra content after file designation
+ERROR: 0:8004: '#include' : unexpected include directive
+ERROR: 5 compilation errors. No code generated.
+
+
diff --git a/chromium/third_party/glslang/src/Test/baseResults/preprocessor.include.enabled.vert.out b/chromium/third_party/glslang/src/Test/baseResults/preprocessor.include.enabled.vert.out
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/preprocessor.include.enabled.vert.out
diff --git a/chromium/third_party/glslang/src/Test/baseResults/preprocessor.line.frag.err b/chromium/third_party/glslang/src/Test/baseResults/preprocessor.line.frag.err
new file mode 100644
index 00000000000..5f177e6cc12
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/preprocessor.line.frag.err
@@ -0,0 +1,2 @@
+Warning, version 310 is not yet complete; most version-specific features are present, but some are missing.
+
diff --git a/chromium/third_party/glslang/src/Test/baseResults/preprocessor.line.frag.out b/chromium/third_party/glslang/src/Test/baseResults/preprocessor.line.frag.out
new file mode 100644
index 00000000000..3e2206f8883
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/preprocessor.line.frag.out
@@ -0,0 +1,5 @@
+#version 310 es
+#line 1 2
+#pragma something
+void main(){ }
+
diff --git a/chromium/third_party/glslang/src/Test/baseResults/preprocessor.line.vert.err b/chromium/third_party/glslang/src/Test/baseResults/preprocessor.line.vert.err
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/preprocessor.line.vert.err
diff --git a/chromium/third_party/glslang/src/Test/baseResults/preprocessor.line.vert.out b/chromium/third_party/glslang/src/Test/baseResults/preprocessor.line.vert.out
new file mode 100644
index 00000000000..2bf09032779
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/preprocessor.line.vert.out
@@ -0,0 +1,39 @@
+#line 300
+
+#line 2
+
+
+
+
+
+#line 10
+
+
+#line 2
+
+#line 0
+
+
+
+#line 4
+
+
+
+
+
+#line 8
+
+void main(){
+ gl_Position = vec4(10);
+}
+
+#line 8 4
+
+
+
+
+#line 12 3
+
+#line 1
+
+
diff --git a/chromium/third_party/glslang/src/Test/baseResults/preprocessor.many.endif.vert.err b/chromium/third_party/glslang/src/Test/baseResults/preprocessor.many.endif.vert.err
new file mode 100644
index 00000000000..49aafc5ab57
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/preprocessor.many.endif.vert.err
@@ -0,0 +1,12 @@
+ERROR: 0:1: '#endif' : mismatched statements
+ERROR: 0:2: '#endif' : mismatched statements
+ERROR: 0:3: '#endif' : mismatched statements
+ERROR: 0:4: '#endif' : mismatched statements
+ERROR: 0:5: '#endif' : mismatched statements
+ERROR: 0:6: '#endif' : mismatched statements
+ERROR: 0:7: '#endif' : mismatched statements
+ERROR: 0:10: 'preprocessor evaluation' : bad expression
+ERROR: 0:11: '' : missing #endif
+ERROR: 9 compilation errors. No code generated.
+
+
diff --git a/chromium/third_party/glslang/src/Test/baseResults/preprocessor.many.endif.vert.out b/chromium/third_party/glslang/src/Test/baseResults/preprocessor.many.endif.vert.out
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/preprocessor.many.endif.vert.out
diff --git a/chromium/third_party/glslang/src/Test/baseResults/preprocessor.pragma.vert.err b/chromium/third_party/glslang/src/Test/baseResults/preprocessor.pragma.vert.err
new file mode 100644
index 00000000000..5f177e6cc12
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/preprocessor.pragma.vert.err
@@ -0,0 +1,2 @@
+Warning, version 310 is not yet complete; most version-specific features are present, but some are missing.
+
diff --git a/chromium/third_party/glslang/src/Test/baseResults/preprocessor.pragma.vert.out b/chromium/third_party/glslang/src/Test/baseResults/preprocessor.pragma.vert.out
new file mode 100644
index 00000000000..8c52814468c
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/preprocessor.pragma.vert.out
@@ -0,0 +1,12 @@
+#version 310 es
+
+#pragma optimize(on)
+#pragma optimize(off)
+#pragma debug(on)
+#pragma debug(off)
+
+#pragma undefined_pragma(x,4)
+
+int main(){
+}
+
diff --git a/chromium/third_party/glslang/src/Test/baseResults/preprocessor.simple.vert.err b/chromium/third_party/glslang/src/Test/baseResults/preprocessor.simple.vert.err
new file mode 100644
index 00000000000..5f177e6cc12
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/preprocessor.simple.vert.err
@@ -0,0 +1,2 @@
+Warning, version 310 is not yet complete; most version-specific features are present, but some are missing.
+
diff --git a/chromium/third_party/glslang/src/Test/baseResults/preprocessor.simple.vert.out b/chromium/third_party/glslang/src/Test/baseResults/preprocessor.simple.vert.out
new file mode 100644
index 00000000000..8737bc81cfd
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/preprocessor.simple.vert.out
@@ -0,0 +1,23 @@
+#version 310 es
+
+
+
+
+
+
+
+
+
+
+
+
+ float fn(float x){ return x + 4.0;}
+
+int main(){
+ gl_Position = vec4(1);
+ gl_Position = clamp(1, 2, 3);
+ gl_Position = vec4(1);
+ gl_Position = vec4(1, 2);
+ gl_Position = vec4(fn(3));
+}
+
diff --git a/chromium/third_party/glslang/src/Test/baseResults/preprocessor.success_if_parse_would_fail.vert.err b/chromium/third_party/glslang/src/Test/baseResults/preprocessor.success_if_parse_would_fail.vert.err
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/preprocessor.success_if_parse_would_fail.vert.err
diff --git a/chromium/third_party/glslang/src/Test/baseResults/preprocessor.success_if_parse_would_fail.vert.out b/chromium/third_party/glslang/src/Test/baseResults/preprocessor.success_if_parse_would_fail.vert.out
new file mode 100644
index 00000000000..624813a01d9
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/preprocessor.success_if_parse_would_fail.vert.out
@@ -0,0 +1,4 @@
+int x(){
+ something that shouldnt compile;
+}
+
diff --git a/chromium/third_party/glslang/src/Test/baseResults/recurse1.vert.out b/chromium/third_party/glslang/src/Test/baseResults/recurse1.vert.out
new file mode 100644
index 00000000000..c2ae0140c36
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/recurse1.vert.out
@@ -0,0 +1,397 @@
+recurse1.vert
+Shader version: 330
+0:? Sequence
+0:3 Function Definition: main( (global void)
+0:3 Function Parameters:
+0:9 Function Definition: self( (global void)
+0:9 Function Parameters:
+0:11 Sequence
+0:11 Function Call: self( (global void)
+0:16 Function Definition: foo(f1; (global void)
+0:16 Function Parameters:
+0:16 '' (in float)
+0:18 Sequence
+0:18 Function Call: bar(i1; (global float)
+0:18 Constant:
+0:18 2 (const int)
+0:21 Function Definition: bar(i1; (global float)
+0:21 Function Parameters:
+0:21 '' (in int)
+0:23 Sequence
+0:23 Function Call: foo(f1; (global void)
+0:23 Constant:
+0:23 4.200000
+0:25 Branch: Return with expression
+0:25 Constant:
+0:25 3.200000
+0:32 Function Definition: A( (global void)
+0:32 Function Parameters:
+0:32 Sequence
+0:32 Function Call: B( (global void)
+0:33 Function Definition: C( (global void)
+0:33 Function Parameters:
+0:33 Sequence
+0:33 Function Call: D( (global void)
+0:34 Function Definition: B( (global void)
+0:34 Function Parameters:
+0:34 Sequence
+0:34 Function Call: C( (global void)
+0:35 Function Definition: D( (global void)
+0:35 Function Parameters:
+0:35 Sequence
+0:35 Function Call: A( (global void)
+0:41 Function Definition: AT( (global void)
+0:41 Function Parameters:
+0:41 Sequence
+0:41 Function Call: BT( (global void)
+0:41 Function Call: BT( (global void)
+0:41 Function Call: BT( (global void)
+0:42 Function Definition: CT( (global void)
+0:42 Function Parameters:
+0:42 Sequence
+0:42 Function Call: DT( (global void)
+0:42 Function Call: AT( (global void)
+0:42 Function Call: DT( (global void)
+0:42 Function Call: BT( (global void)
+0:43 Function Definition: BT( (global void)
+0:43 Function Parameters:
+0:43 Sequence
+0:43 Function Call: CT( (global void)
+0:43 Function Call: CT( (global void)
+0:43 Function Call: CT( (global void)
+0:44 Function Definition: DT( (global void)
+0:44 Function Parameters:
+0:44 Sequence
+0:44 Function Call: AT( (global void)
+0:? Linker Objects
+0:? 'gl_VertexID' (gl_VertexId int VertexId)
+0:? 'gl_InstanceID' (gl_InstanceId int InstanceId)
+
+recurse1.frag
+Shader version: 330
+0:? Sequence
+0:5 Function Definition: main( (global void)
+0:5 Function Parameters:
+0:11 Function Definition: cfoo(f1; (global void)
+0:11 Function Parameters:
+0:11 '' (in float)
+0:13 Sequence
+0:13 Function Call: cbar(i1; (global float)
+0:13 Constant:
+0:13 2 (const int)
+0:20 Function Definition: CA( (global void)
+0:20 Function Parameters:
+0:20 Sequence
+0:20 Function Call: CB( (global void)
+0:21 Function Definition: CC( (global void)
+0:21 Function Parameters:
+0:21 Sequence
+0:21 Function Call: CD( (global void)
+0:27 Function Definition: CAT( (global void)
+0:27 Function Parameters:
+0:27 Sequence
+0:27 Function Call: CBT( (global void)
+0:27 Function Call: CBT( (global void)
+0:27 Function Call: CBT( (global void)
+0:28 Function Definition: CCT( (global void)
+0:28 Function Parameters:
+0:28 Sequence
+0:28 Function Call: CDT( (global void)
+0:28 Function Call: CDT( (global void)
+0:28 Function Call: CBT( (global void)
+0:32 Function Definition: norA( (global void)
+0:32 Function Parameters:
+0:33 Function Definition: norB( (global void)
+0:33 Function Parameters:
+0:33 Sequence
+0:33 Function Call: norA( (global void)
+0:34 Function Definition: norC( (global void)
+0:34 Function Parameters:
+0:34 Sequence
+0:34 Function Call: norA( (global void)
+0:35 Function Definition: norD( (global void)
+0:35 Function Parameters:
+0:35 Sequence
+0:35 Function Call: norA( (global void)
+0:36 Function Definition: norE( (global void)
+0:36 Function Parameters:
+0:36 Sequence
+0:36 Function Call: norB( (global void)
+0:37 Function Definition: norF( (global void)
+0:37 Function Parameters:
+0:37 Sequence
+0:37 Function Call: norB( (global void)
+0:38 Function Definition: norG( (global void)
+0:38 Function Parameters:
+0:38 Sequence
+0:38 Function Call: norE( (global void)
+0:39 Function Definition: norH( (global void)
+0:39 Function Parameters:
+0:39 Sequence
+0:39 Function Call: norE( (global void)
+0:40 Function Definition: norI( (global void)
+0:40 Function Parameters:
+0:40 Sequence
+0:40 Function Call: norE( (global void)
+0:44 Function Definition: norcA( (global void)
+0:44 Function Parameters:
+0:45 Function Definition: norcB( (global void)
+0:45 Function Parameters:
+0:45 Sequence
+0:45 Function Call: norcA( (global void)
+0:46 Function Definition: norcC( (global void)
+0:46 Function Parameters:
+0:46 Sequence
+0:46 Function Call: norcB( (global void)
+0:47 Function Definition: norcD( (global void)
+0:47 Function Parameters:
+0:47 Sequence
+0:47 Function Call: norcC( (global void)
+0:47 Function Call: norcB( (global void)
+0:48 Function Definition: norcE( (global void)
+0:48 Function Parameters:
+0:48 Sequence
+0:48 Function Call: norcD( (global void)
+0:? Linker Objects
+
+recurse2.frag
+Shader version: 330
+0:? Sequence
+0:9 Function Definition: cbar(i1; (global float)
+0:9 Function Parameters:
+0:9 '' (in int)
+0:11 Sequence
+0:11 Function Call: cfoo(f1; (global void)
+0:11 Constant:
+0:11 4.200000
+0:13 Branch: Return with expression
+0:13 Constant:
+0:13 3.200000
+0:20 Function Definition: CB( (global void)
+0:20 Function Parameters:
+0:20 Sequence
+0:20 Function Call: CC( (global void)
+0:21 Function Definition: CD( (global void)
+0:21 Function Parameters:
+0:21 Sequence
+0:21 Function Call: CA( (global void)
+0:27 Function Definition: CBT( (global void)
+0:27 Function Parameters:
+0:27 Sequence
+0:27 Function Call: CCT( (global void)
+0:27 Function Call: CCT( (global void)
+0:27 Function Call: CCT( (global void)
+0:28 Function Definition: CDT( (global void)
+0:28 Function Parameters:
+0:28 Sequence
+0:28 Function Call: CAT( (global void)
+0:? Linker Objects
+
+
+Linked vertex stage:
+
+ERROR: Linking vertex stage: Recursion detected:
+ BT( calling CT(
+ERROR: Linking vertex stage: Recursion detected:
+ AT( calling BT(
+ERROR: Linking vertex stage: Recursion detected:
+ DT( calling AT(
+ERROR: Linking vertex stage: Recursion detected:
+ D( calling A(
+ERROR: Linking vertex stage: Recursion detected:
+ bar(i1; calling foo(f1;
+ERROR: Linking vertex stage: Recursion detected:
+ self( calling self(
+
+Linked fragment stage:
+
+ERROR: Linking fragment stage: Recursion detected:
+ CCT( calling CBT(
+ERROR: Linking fragment stage: Recursion detected:
+ CBT( calling CCT(
+ERROR: Linking fragment stage: Recursion detected:
+ CC( calling CD(
+ERROR: Linking fragment stage: Recursion detected:
+ cfoo(f1; calling cbar(i1;
+
+Shader version: 330
+0:? Sequence
+0:3 Function Definition: main( (global void)
+0:3 Function Parameters:
+0:9 Function Definition: self( (global void)
+0:9 Function Parameters:
+0:11 Sequence
+0:11 Function Call: self( (global void)
+0:16 Function Definition: foo(f1; (global void)
+0:16 Function Parameters:
+0:16 '' (in float)
+0:18 Sequence
+0:18 Function Call: bar(i1; (global float)
+0:18 Constant:
+0:18 2 (const int)
+0:21 Function Definition: bar(i1; (global float)
+0:21 Function Parameters:
+0:21 '' (in int)
+0:23 Sequence
+0:23 Function Call: foo(f1; (global void)
+0:23 Constant:
+0:23 4.200000
+0:25 Branch: Return with expression
+0:25 Constant:
+0:25 3.200000
+0:32 Function Definition: A( (global void)
+0:32 Function Parameters:
+0:32 Sequence
+0:32 Function Call: B( (global void)
+0:33 Function Definition: C( (global void)
+0:33 Function Parameters:
+0:33 Sequence
+0:33 Function Call: D( (global void)
+0:34 Function Definition: B( (global void)
+0:34 Function Parameters:
+0:34 Sequence
+0:34 Function Call: C( (global void)
+0:35 Function Definition: D( (global void)
+0:35 Function Parameters:
+0:35 Sequence
+0:35 Function Call: A( (global void)
+0:41 Function Definition: AT( (global void)
+0:41 Function Parameters:
+0:41 Sequence
+0:41 Function Call: BT( (global void)
+0:41 Function Call: BT( (global void)
+0:41 Function Call: BT( (global void)
+0:42 Function Definition: CT( (global void)
+0:42 Function Parameters:
+0:42 Sequence
+0:42 Function Call: DT( (global void)
+0:42 Function Call: AT( (global void)
+0:42 Function Call: DT( (global void)
+0:42 Function Call: BT( (global void)
+0:43 Function Definition: BT( (global void)
+0:43 Function Parameters:
+0:43 Sequence
+0:43 Function Call: CT( (global void)
+0:43 Function Call: CT( (global void)
+0:43 Function Call: CT( (global void)
+0:44 Function Definition: DT( (global void)
+0:44 Function Parameters:
+0:44 Sequence
+0:44 Function Call: AT( (global void)
+0:? Linker Objects
+0:? 'gl_VertexID' (gl_VertexId int VertexId)
+0:? 'gl_InstanceID' (gl_InstanceId int InstanceId)
+Shader version: 330
+0:? Sequence
+0:5 Function Definition: main( (global void)
+0:5 Function Parameters:
+0:11 Function Definition: cfoo(f1; (global void)
+0:11 Function Parameters:
+0:11 '' (in float)
+0:13 Sequence
+0:13 Function Call: cbar(i1; (global float)
+0:13 Constant:
+0:13 2 (const int)
+0:20 Function Definition: CA( (global void)
+0:20 Function Parameters:
+0:20 Sequence
+0:20 Function Call: CB( (global void)
+0:21 Function Definition: CC( (global void)
+0:21 Function Parameters:
+0:21 Sequence
+0:21 Function Call: CD( (global void)
+0:27 Function Definition: CAT( (global void)
+0:27 Function Parameters:
+0:27 Sequence
+0:27 Function Call: CBT( (global void)
+0:27 Function Call: CBT( (global void)
+0:27 Function Call: CBT( (global void)
+0:28 Function Definition: CCT( (global void)
+0:28 Function Parameters:
+0:28 Sequence
+0:28 Function Call: CDT( (global void)
+0:28 Function Call: CDT( (global void)
+0:28 Function Call: CBT( (global void)
+0:32 Function Definition: norA( (global void)
+0:32 Function Parameters:
+0:33 Function Definition: norB( (global void)
+0:33 Function Parameters:
+0:33 Sequence
+0:33 Function Call: norA( (global void)
+0:34 Function Definition: norC( (global void)
+0:34 Function Parameters:
+0:34 Sequence
+0:34 Function Call: norA( (global void)
+0:35 Function Definition: norD( (global void)
+0:35 Function Parameters:
+0:35 Sequence
+0:35 Function Call: norA( (global void)
+0:36 Function Definition: norE( (global void)
+0:36 Function Parameters:
+0:36 Sequence
+0:36 Function Call: norB( (global void)
+0:37 Function Definition: norF( (global void)
+0:37 Function Parameters:
+0:37 Sequence
+0:37 Function Call: norB( (global void)
+0:38 Function Definition: norG( (global void)
+0:38 Function Parameters:
+0:38 Sequence
+0:38 Function Call: norE( (global void)
+0:39 Function Definition: norH( (global void)
+0:39 Function Parameters:
+0:39 Sequence
+0:39 Function Call: norE( (global void)
+0:40 Function Definition: norI( (global void)
+0:40 Function Parameters:
+0:40 Sequence
+0:40 Function Call: norE( (global void)
+0:44 Function Definition: norcA( (global void)
+0:44 Function Parameters:
+0:45 Function Definition: norcB( (global void)
+0:45 Function Parameters:
+0:45 Sequence
+0:45 Function Call: norcA( (global void)
+0:46 Function Definition: norcC( (global void)
+0:46 Function Parameters:
+0:46 Sequence
+0:46 Function Call: norcB( (global void)
+0:47 Function Definition: norcD( (global void)
+0:47 Function Parameters:
+0:47 Sequence
+0:47 Function Call: norcC( (global void)
+0:47 Function Call: norcB( (global void)
+0:48 Function Definition: norcE( (global void)
+0:48 Function Parameters:
+0:48 Sequence
+0:48 Function Call: norcD( (global void)
+0:9 Function Definition: cbar(i1; (global float)
+0:9 Function Parameters:
+0:9 '' (in int)
+0:11 Sequence
+0:11 Function Call: cfoo(f1; (global void)
+0:11 Constant:
+0:11 4.200000
+0:13 Branch: Return with expression
+0:13 Constant:
+0:13 3.200000
+0:20 Function Definition: CB( (global void)
+0:20 Function Parameters:
+0:20 Sequence
+0:20 Function Call: CC( (global void)
+0:21 Function Definition: CD( (global void)
+0:21 Function Parameters:
+0:21 Sequence
+0:21 Function Call: CA( (global void)
+0:27 Function Definition: CBT( (global void)
+0:27 Function Parameters:
+0:27 Sequence
+0:27 Function Call: CCT( (global void)
+0:27 Function Call: CCT( (global void)
+0:27 Function Call: CCT( (global void)
+0:28 Function Definition: CDT( (global void)
+0:28 Function Parameters:
+0:28 Sequence
+0:28 Function Call: CAT( (global void)
+0:? Linker Objects
+
diff --git a/chromium/third_party/glslang/src/Test/baseResults/reflection.vert.out b/chromium/third_party/glslang/src/Test/baseResults/reflection.vert.out
new file mode 100644
index 00000000000..24ee780900a
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/reflection.vert.out
@@ -0,0 +1,104 @@
+reflection.vert
+Warning, version 440 is not yet complete; most version-specific features are present, but some are missing.
+
+
+Linked vertex stage:
+
+
+Uniform reflection:
+image_ui2D: offset -1, type 9063, size 1, index -1
+sampler_2D: offset -1, type 8b5e, size 1, index -1
+sampler_2DMSArray: offset -1, type 910b, size 1, index -1
+anonMember3: offset 80, type 8b52, size 1, index 0
+s.a: offset -1, type 1404, size 1, index -1
+named.scalar: offset 12, type 1404, size 1, index 1
+m23: offset 16, type 8b67, size 1, index 0
+scalarAfterm23: offset 48, type 1404, size 1, index 0
+c_m23: offset 16, type 8b67, size 1, index 2
+c_scalarAfterm23: offset 64, type 1404, size 1, index 2
+scalarBeforeArray: offset 96, type 1404, size 1, index 0
+floatArray: offset 112, type 1406, size 5, index 0
+scalarAfterArray: offset 192, type 1404, size 1, index 0
+named.memvec2: offset 48, type 8b50, size 1, index 1
+named.memf1: offset 56, type 1406, size 1, index 1
+named.memf2: offset 60, type 8b56, size 1, index 1
+named.memf3: offset 64, type 1404, size 1, index 1
+named.memvec2a: offset 72, type 8b50, size 1, index 1
+named.m22: offset 80, type 8b5a, size 7, index 1
+dm22: offset -1, type 8b5a, size 4, index -1
+m22: offset 208, type 8b5a, size 3, index 0
+nested.foo.n1.a: offset 0, type 1406, size 1, index 3
+nested.foo.n2.b: offset 16, type 1406, size 1, index 3
+nested.foo.n2.c: offset 20, type 1406, size 1, index 3
+nested.foo.n2.d: offset 24, type 1406, size 1, index 3
+deepA[0].d2.d1[2].va: offset -1, type 8b50, size 2, index -1
+deepA[1].d2.d1[2].va: offset -1, type 8b50, size 2, index -1
+deepB[1].d2.d1[0].va: offset -1, type 8b50, size 2, index -1
+deepB[1].d2.d1[1].va: offset -1, type 8b50, size 2, index -1
+deepB[1].d2.d1[2].va: offset -1, type 8b50, size 2, index -1
+deepB[1].d2.d1[3].va: offset -1, type 8b50, size 2, index -1
+deepB[0].d2.d1[0].va: offset -1, type 8b50, size 2, index -1
+deepB[0].d2.d1[1].va: offset -1, type 8b50, size 2, index -1
+deepB[0].d2.d1[2].va: offset -1, type 8b50, size 2, index -1
+deepB[0].d2.d1[3].va: offset -1, type 8b50, size 2, index -1
+deepC[1].iv4: offset -1, type 8b52, size 1, index -1
+deepC[1].d2.i: offset -1, type 1404, size 1, index -1
+deepC[1].d2.d1[0].va: offset -1, type 8b50, size 3, index -1
+deepC[1].d2.d1[0].b: offset -1, type 8b56, size 1, index -1
+deepC[1].d2.d1[1].va: offset -1, type 8b50, size 3, index -1
+deepC[1].d2.d1[1].b: offset -1, type 8b56, size 1, index -1
+deepC[1].d2.d1[2].va: offset -1, type 8b50, size 3, index -1
+deepC[1].d2.d1[2].b: offset -1, type 8b56, size 1, index -1
+deepC[1].d2.d1[3].va: offset -1, type 8b50, size 3, index -1
+deepC[1].d2.d1[3].b: offset -1, type 8b56, size 1, index -1
+deepC[1].v3: offset -1, type 8b54, size 1, index -1
+deepD[0].iv4: offset -1, type 8b52, size 1, index -1
+deepD[0].d2.i: offset -1, type 1404, size 1, index -1
+deepD[0].d2.d1[0].va: offset -1, type 8b50, size 3, index -1
+deepD[0].d2.d1[0].b: offset -1, type 8b56, size 1, index -1
+deepD[0].d2.d1[1].va: offset -1, type 8b50, size 3, index -1
+deepD[0].d2.d1[1].b: offset -1, type 8b56, size 1, index -1
+deepD[0].d2.d1[2].va: offset -1, type 8b50, size 3, index -1
+deepD[0].d2.d1[2].b: offset -1, type 8b56, size 1, index -1
+deepD[0].d2.d1[3].va: offset -1, type 8b50, size 3, index -1
+deepD[0].d2.d1[3].b: offset -1, type 8b56, size 1, index -1
+deepD[0].v3: offset -1, type 8b54, size 1, index -1
+deepD[1].iv4: offset -1, type 8b52, size 1, index -1
+deepD[1].d2.i: offset -1, type 1404, size 1, index -1
+deepD[1].d2.d1[0].va: offset -1, type 8b50, size 3, index -1
+deepD[1].d2.d1[0].b: offset -1, type 8b56, size 1, index -1
+deepD[1].d2.d1[1].va: offset -1, type 8b50, size 3, index -1
+deepD[1].d2.d1[1].b: offset -1, type 8b56, size 1, index -1
+deepD[1].d2.d1[2].va: offset -1, type 8b50, size 3, index -1
+deepD[1].d2.d1[2].b: offset -1, type 8b56, size 1, index -1
+deepD[1].d2.d1[3].va: offset -1, type 8b50, size 3, index -1
+deepD[1].d2.d1[3].b: offset -1, type 8b56, size 1, index -1
+deepD[1].v3: offset -1, type 8b54, size 1, index -1
+abl.foo: offset 0, type 1406, size 1, index 7
+abl2.foo: offset 0, type 1406, size 1, index 11
+anonMember1: offset 0, type 8b51, size 1, index 0
+uf1: offset -1, type 1406, size 1, index -1
+uf2: offset -1, type 1406, size 1, index -1
+named.member3: offset 32, type 8b52, size 1, index 1
+
+Uniform block reflection:
+nameless: offset -1, type ffffffff, size 496, index -1
+named: offset -1, type ffffffff, size 304, index -1
+c_nameless: offset -1, type ffffffff, size 112, index -1
+nested: offset -1, type ffffffff, size 32, index -1
+abl[0]: offset -1, type ffffffff, size 4, index -1
+abl[1]: offset -1, type ffffffff, size 4, index -1
+abl[2]: offset -1, type ffffffff, size 4, index -1
+abl[3]: offset -1, type ffffffff, size 4, index -1
+abl2[0]: offset -1, type ffffffff, size 4, index -1
+abl2[1]: offset -1, type ffffffff, size 4, index -1
+abl2[2]: offset -1, type ffffffff, size 4, index -1
+abl2[3]: offset -1, type ffffffff, size 4, index -1
+
+Vertex attribute reflection:
+attributeFloat: offset 0, type 1406, size 0, index 0
+attributeFloat2: offset 0, type 8b50, size 0, index 0
+attributeFloat3: offset 0, type 8b51, size 0, index 0
+attributeFloat4: offset 0, type 8b52, size 0, index 0
+attributeMat4: offset 0, type 8b5c, size 0, index 0
+
diff --git a/chromium/third_party/glslang/src/Test/baseResults/sample.frag.out b/chromium/third_party/glslang/src/Test/baseResults/sample.frag.out
new file mode 100644
index 00000000000..7ad929554ca
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/sample.frag.out
@@ -0,0 +1,33 @@
+sample.frag
+Shader version: 110
+0:? Sequence
+0:38 Function Definition: main( (global void)
+0:38 Function Parameters:
+0:40 Sequence
+0:40 move second child to first child (temp 4-component vector of float)
+0:40 'gl_FragColor' (fragColor 4-component vector of float FragColor)
+0:40 Construct vec4 (temp 4-component vector of float)
+0:40 'color' (smooth in 3-component vector of float)
+0:40 Constant:
+0:40 1.000000
+0:? Linker Objects
+0:? 'color' (smooth in 3-component vector of float)
+
+
+Linked fragment stage:
+
+
+Shader version: 110
+0:? Sequence
+0:38 Function Definition: main( (global void)
+0:38 Function Parameters:
+0:40 Sequence
+0:40 move second child to first child (temp 4-component vector of float)
+0:40 'gl_FragColor' (fragColor 4-component vector of float FragColor)
+0:40 Construct vec4 (temp 4-component vector of float)
+0:40 'color' (smooth in 3-component vector of float)
+0:40 Constant:
+0:40 1.000000
+0:? Linker Objects
+0:? 'color' (smooth in 3-component vector of float)
+
diff --git a/chromium/third_party/glslang/src/Test/baseResults/sample.vert.out b/chromium/third_party/glslang/src/Test/baseResults/sample.vert.out
new file mode 100644
index 00000000000..e67db5748f3
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/sample.vert.out
@@ -0,0 +1,43 @@
+sample.vert
+Shader version: 110
+0:? Sequence
+0:38 Function Definition: main( (global void)
+0:38 Function Parameters:
+0:40 Sequence
+0:40 move second child to first child (temp 3-component vector of float)
+0:40 'color' (smooth out 3-component vector of float)
+0:40 Constant:
+0:40 1.000000
+0:40 1.000000
+0:40 1.000000
+0:42 move second child to first child (temp 4-component vector of float)
+0:42 'gl_Position' (gl_Position 4-component vector of float Position)
+0:42 matrix-times-vector (temp 4-component vector of float)
+0:42 'gl_ModelViewProjectionMatrix' (uniform 4X4 matrix of float)
+0:42 'gl_Vertex' (in 4-component vector of float Vertex)
+0:? Linker Objects
+0:? 'color' (smooth out 3-component vector of float)
+
+
+Linked vertex stage:
+
+
+Shader version: 110
+0:? Sequence
+0:38 Function Definition: main( (global void)
+0:38 Function Parameters:
+0:40 Sequence
+0:40 move second child to first child (temp 3-component vector of float)
+0:40 'color' (smooth out 3-component vector of float)
+0:40 Constant:
+0:40 1.000000
+0:40 1.000000
+0:40 1.000000
+0:42 move second child to first child (temp 4-component vector of float)
+0:42 'gl_Position' (gl_Position 4-component vector of float Position)
+0:42 matrix-times-vector (temp 4-component vector of float)
+0:42 'gl_ModelViewProjectionMatrix' (uniform 4X4 matrix of float)
+0:42 'gl_Vertex' (in 4-component vector of float Vertex)
+0:? Linker Objects
+0:? 'color' (smooth out 3-component vector of float)
+
diff --git a/chromium/third_party/glslang/src/Test/baseResults/simpleFunctionCall.frag.out b/chromium/third_party/glslang/src/Test/baseResults/simpleFunctionCall.frag.out
new file mode 100644
index 00000000000..2cc42a3be16
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/simpleFunctionCall.frag.out
@@ -0,0 +1,43 @@
+simpleFunctionCall.frag
+WARNING: 0:4: varying deprecated in version 130; may be removed in future release
+
+Shader version: 150
+0:? Sequence
+0:7 Function Definition: foo( (global 4-component vector of float)
+0:7 Function Parameters:
+0:9 Sequence
+0:9 Branch: Return with expression
+0:9 'BaseColor' (smooth in 4-component vector of float)
+0:12 Function Definition: main( (global void)
+0:12 Function Parameters:
+0:14 Sequence
+0:14 move second child to first child (temp 4-component vector of float)
+0:14 'gl_FragColor' (fragColor 4-component vector of float FragColor)
+0:14 Function Call: foo( (global 4-component vector of float)
+0:? Linker Objects
+0:? 'bigColor' (uniform 4-component vector of float)
+0:? 'BaseColor' (smooth in 4-component vector of float)
+0:? 'd' (uniform float)
+
+
+Linked fragment stage:
+
+
+Shader version: 150
+0:? Sequence
+0:7 Function Definition: foo( (global 4-component vector of float)
+0:7 Function Parameters:
+0:9 Sequence
+0:9 Branch: Return with expression
+0:9 'BaseColor' (smooth in 4-component vector of float)
+0:12 Function Definition: main( (global void)
+0:12 Function Parameters:
+0:14 Sequence
+0:14 move second child to first child (temp 4-component vector of float)
+0:14 'gl_FragColor' (fragColor 4-component vector of float FragColor)
+0:14 Function Call: foo( (global 4-component vector of float)
+0:? Linker Objects
+0:? 'bigColor' (uniform 4-component vector of float)
+0:? 'BaseColor' (smooth in 4-component vector of float)
+0:? 'd' (uniform float)
+
diff --git a/chromium/third_party/glslang/src/Test/baseResults/specExamples.frag.out b/chromium/third_party/glslang/src/Test/baseResults/specExamples.frag.out
new file mode 100644
index 00000000000..464a2793f86
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/specExamples.frag.out
@@ -0,0 +1,617 @@
+specExamples.frag
+Warning, version 430 is not yet complete; most version-specific features are present, but some are missing.
+ERROR: 0:6: '=' : cannot convert from 'const uint' to 'global int'
+ERROR: 0:20: '' : numeric literal too big
+ERROR: 0:21: '' : hexidecimal literal too big
+ERROR: 0:37: 'view' : redefinition
+ERROR: 0:63: 'invariant' : can only apply to an output
+ERROR: 0:68: 'lightPosition' : redefinition
+ERROR: 0:75: 'Atten' : member storage qualifier cannot contradict block storage qualifier
+ERROR: 0:87: 'Color' : redefinition
+ERROR: 0:92: 'redeclaration' : cannot redeclare with different qualification: gl_FragCoord
+ERROR: 0:93: 'redeclaration' : cannot redeclare with different qualification: gl_FragCoord
+ERROR: 0:99: 'local_size_x' : there is no such layout identifier for this stage taking an assigned value
+ERROR: 0:99: 'local_size_y' : there is no such layout identifier for this stage taking an assigned value
+ERROR: 0:100: 'local_size_x' : there is no such layout identifier for this stage taking an assigned value
+ERROR: 0:102: 'color' : redefinition
+ERROR: 0:112: 'redeclaration' : all redeclarations must use the same depth layout on gl_FragDepth
+ERROR: 0:118: 'redeclaration' : all redeclarations must use the same depth layout on gl_FragDepth
+ERROR: 0:121: 'redeclaration' : all redeclarations must use the same depth layout on gl_FragDepth
+ERROR: 0:172: 'x' : undeclared identifier
+ERROR: 0:172: '[]' : scalar integer expression required
+ERROR: 0:175: 'x' : undeclared identifier
+ERROR: 0:175: '[]' : scalar integer expression required
+ERROR: 0:175: 'b' : left of '[' is not of type array, matrix, or vector
+ERROR: 0:175: 'a' : vector field selection out of range
+ERROR: 0:175: 'length' : does not operate on this type: const float
+ERROR: 0:175: '' : function call, method, or subroutine call expected
+ERROR: 0:175: '' : no matching overloaded function found
+ERROR: 0:178: '[]' : scalar integer expression required
+ERROR: 0:178: 's' : undeclared identifier
+ERROR: 0:178: 's' : left of '[' is not of type array, matrix, or vector
+ERROR: 0:178: 'a' : vector field selection out of range
+ERROR: 0:178: 'length' : does not operate on this type: const float
+ERROR: 0:178: '' : function call, method, or subroutine call expected
+ERROR: 0:178: '' : no matching overloaded function found
+ERROR: 0:198: 'e' : redefinition
+ERROR: 0:226: 'in' : not allowed in nested scope
+ERROR: 0:227: 'in' : not allowed in nested scope
+ERROR: 0:228: 'in' : not allowed in nested scope
+ERROR: 0:232: 'out' : not allowed in nested scope
+ERROR: 38 compilation errors. No code generated.
+
+
+Shader version: 430
+Requested GL_3DL_array_objects
+gl_FragCoord pixel center is integer
+gl_FragCoord origin is upper left
+using early_fragment_tests
+using depth_greater
+ERROR: node is still EOpNull!
+0:5 Sequence
+0:5 move second child to first child (temp int)
+0:5 'a' (global int)
+0:5 Constant:
+0:5 -1 (const int)
+0:7 Sequence
+0:7 move second child to first child (temp uint)
+0:7 'c' (global uint)
+0:7 Constant:
+0:7 4294967295 (const uint)
+0:8 Sequence
+0:8 move second child to first child (temp uint)
+0:8 'd' (global uint)
+0:8 Constant:
+0:8 4294967295 (const uint)
+0:9 Sequence
+0:9 move second child to first child (temp int)
+0:9 'e' (global int)
+0:9 Constant:
+0:9 -1 (const int)
+0:13 Sequence
+0:13 move second child to first child (temp uint)
+0:13 'f' (global uint)
+0:13 Constant:
+0:13 4294967295 (const uint)
+0:17 Sequence
+0:17 move second child to first child (temp int)
+0:17 'g' (global int)
+0:17 Constant:
+0:17 -1294967296 (const int)
+0:19 Sequence
+0:19 move second child to first child (temp int)
+0:19 'h' (global int)
+0:19 Constant:
+0:19 -1610612736 (const int)
+0:20 Sequence
+0:20 move second child to first child (temp int)
+0:20 'i' (global int)
+0:20 Constant:
+0:20 -1 (const int)
+0:21 Sequence
+0:21 move second child to first child (temp int)
+0:21 'j' (global int)
+0:21 Constant:
+0:21 -1 (const int)
+0:22 Sequence
+0:22 move second child to first child (temp int)
+0:22 'k' (global int)
+0:22 Constant:
+0:22 -2147483648 (const int)
+0:23 Sequence
+0:23 move second child to first child (temp int)
+0:23 'l' (global int)
+0:23 Constant:
+0:23 -2147483648 (const int)
+0:25 Sequence
+0:25 move second child to first child (temp float)
+0:25 'fb' (global float)
+0:25 Constant:
+0:25 1.500000
+0:26 Sequence
+0:26 move second child to first child (temp double)
+0:26 'fd' (global double)
+0:26 Constant:
+0:26 2.000000
+0:127 Function Definition: foo(f1[5]; (global 5-element array of float)
+0:127 Function Parameters:
+0:127 '' (in 5-element array of float)
+0:129 Sequence
+0:129 Branch: Return with expression
+0:129 Constant:
+0:129 3.400000
+0:129 4.200000
+0:129 5.000000
+0:129 5.200000
+0:129 1.100000
+0:137 Function Definition: main( (global void)
+0:137 Function Parameters:
+0:140 Sequence
+0:140 Sequence
+0:140 Sequence
+0:140 move second child to first child (temp 5-element array of float)
+0:140 'a' (temp 5-element array of float)
+0:140 Constant:
+0:140 3.400000
+0:140 4.200000
+0:140 5.000000
+0:140 5.200000
+0:140 1.100000
+0:143 Sequence
+0:143 Sequence
+0:143 move second child to first child (temp 5-element array of float)
+0:143 'a' (temp 5-element array of float)
+0:143 Constant:
+0:143 3.400000
+0:143 4.200000
+0:143 5.000000
+0:143 5.200000
+0:143 1.100000
+0:? Sequence
+0:149 Sequence
+0:149 move second child to first child (temp 2-element array of 4-component vector of float)
+0:149 'b' (temp 2-element array of 4-component vector of float)
+0:149 Constant:
+0:149 0.000000
+0:149 0.000000
+0:149 0.000000
+0:149 0.000000
+0:149 0.100000
+0:149 0.100000
+0:149 0.100000
+0:149 0.100000
+0:150 Sequence
+0:150 move second child to first child (temp 3-element array of 2-element array of 4-component vector of float)
+0:150 'a3' (temp 3-element array of 2-element array of 4-component vector of float)
+0:150 Construct vec4 (temp 3-element array of 2-element array of 4-component vector of float)
+0:150 'b' (temp 2-element array of 4-component vector of float)
+0:150 'b' (temp 2-element array of 4-component vector of float)
+0:150 'b' (temp 2-element array of 4-component vector of float)
+0:152 Sequence
+0:152 move second child to first child (temp 3-element array of 2-element array of 4-component vector of float)
+0:152 'a4' (temp 3-element array of 2-element array of 4-component vector of float)
+0:152 Constant:
+0:152 0.000000
+0:152 0.000000
+0:152 0.000000
+0:152 0.000000
+0:152 1.000000
+0:152 1.000000
+0:152 1.000000
+0:152 1.000000
+0:152 0.000000
+0:152 0.000000
+0:152 0.000000
+0:152 0.000000
+0:152 1.000000
+0:152 1.000000
+0:152 1.000000
+0:152 1.000000
+0:152 0.000000
+0:152 0.000000
+0:152 0.000000
+0:152 0.000000
+0:152 1.000000
+0:152 1.000000
+0:152 1.000000
+0:152 1.000000
+0:? Sequence
+0:159 Sequence
+0:159 Sequence
+0:159 move second child to first child (temp 5-element array of float)
+0:159 'b' (temp 5-element array of float)
+0:159 'a' (temp 5-element array of float)
+0:162 Sequence
+0:162 Sequence
+0:162 move second child to first child (temp 5-element array of float)
+0:162 'b' (temp 5-element array of float)
+0:162 'a' (temp 5-element array of float)
+0:165 Sequence
+0:165 Sequence
+0:165 move second child to first child (temp 5-element array of float)
+0:165 'b' (temp 5-element array of float)
+0:165 Constant:
+0:165 1.000000
+0:165 2.000000
+0:165 3.000000
+0:165 4.000000
+0:165 5.000000
+0:167 Constant:
+0:167 5 (const int)
+0:? Sequence
+0:171 Constant:
+0:171 3 (const int)
+0:172 Constant:
+0:172 2 (const int)
+0:175 Constant:
+0:175 0.000000
+0:178 Constant:
+0:178 0.000000
+0:193 Sequence
+0:193 move second child to first child (temp structure{temp float a, temp int b})
+0:193 'e' (temp structure{temp float a, temp int b})
+0:193 Constant:
+0:193 1.200000
+0:193 2 (const int)
+0:216 Sequence
+0:216 Sequence
+0:216 move second child to first child (temp 5-element array of float)
+0:216 'a' (temp 5-element array of float)
+0:216 Constant:
+0:216 3.400000
+0:216 4.200000
+0:216 5.000000
+0:216 5.200000
+0:216 1.100000
+0:217 Sequence
+0:217 move second child to first child (temp 5-element array of float)
+0:217 'b' (temp 5-element array of float)
+0:217 Constant:
+0:217 3.400000
+0:217 4.200000
+0:217 5.000000
+0:217 5.200000
+0:217 1.100000
+0:218 Sequence
+0:218 move second child to first child (temp 5-element array of float)
+0:218 'c' (temp 5-element array of float)
+0:218 'a' (temp 5-element array of float)
+0:219 Sequence
+0:219 move second child to first child (temp 5-element array of float)
+0:219 'd' (temp 5-element array of float)
+0:219 'b' (temp 5-element array of float)
+0:? Sequence
+0:223 Sequence
+0:223 move second child to first child (temp float)
+0:223 'ceiling' (const (read only) float)
+0:223 Convert int to float (temp float)
+0:223 add (temp int)
+0:223 'a' (global int)
+0:223 'b' (global int)
+0:? Linker Objects
+0:? 'a' (global int)
+0:? 'b' (global int)
+0:? 'c' (global uint)
+0:? 'd' (global uint)
+0:? 'e' (global int)
+0:? 'f' (global uint)
+0:? 'g' (global int)
+0:? 'h' (global int)
+0:? 'i' (global int)
+0:? 'j' (global int)
+0:? 'k' (global int)
+0:? 'l' (global int)
+0:? 'fa' (global float)
+0:? 'fb' (global float)
+0:? 'fc' (global double)
+0:? 'fd' (global double)
+0:? 'texcoord1' (global 2-component vector of float)
+0:? 'texcoord2' (global 2-component vector of float)
+0:? 'position' (global 3-component vector of float)
+0:? 'myRGBA' (global 4-component vector of float)
+0:? 'textureLookup' (global 2-component vector of int)
+0:? 'less' (global 3-component vector of bool)
+0:? 'mat2D' (global 2X2 matrix of float)
+0:? 'optMatrix' (global 3X3 matrix of float)
+0:? 'view' (global 4X4 matrix of float)
+0:? 'projection' (global 4X4 matrix of float)
+0:? 'm' (global 3X2 matrix of float)
+0:? 'highPrecisionMVP' (global 4X4 matrix of double)
+0:? 'dm' (global 2X4 matrix of double)
+0:? 'lightVar' (global structure{global float intensity, global 3-component vector of float position})
+0:? 'frequencies' (global 3-element array of float)
+0:? 'lightPosition' (uniform 4-element array of 4-component vector of float)
+0:? 'lights' (global 2-element array of structure{global float intensity, global 3-component vector of float position})
+0:? 'numLights' (const int)
+0:? 2 (const int)
+0:? 'normal' (smooth in 3-component vector of float)
+0:? 'TexCoord' (centroid smooth in 2-component vector of float)
+0:? 'Color' (invariant centroid smooth in 4-component vector of float)
+0:? 'temperature' (noperspective in float)
+0:? 'myColor' (flat in 3-component vector of float)
+0:? 'myTexCoord' (centroid noperspective in 2-component vector of float)
+0:? 'color' (uniform 3-component vector of float)
+0:? 0.700000
+0:? 0.700000
+0:? 0.200000
+0:? 'anon@0' (in block{smooth in 4-component vector of float Color1, smooth in 4-component vector of float Color2, in 2-component vector of float TexCoordA, in float Atten})
+0:? 'anon@1' (in block{in 4-component vector of float LightPos, in 3-component vector of float LightColor})
+0:? 'Materiala' (in block{in 4-component vector of float Color, in 2-component vector of float TexCoord})
+0:? 'gl_FragCoord' (gl_FragCoord 4-component vector of float FragCoord)
+0:? 'gl_FragCoord' (gl_FragCoord 4-component vector of float FragCoord)
+0:? 'factor' (layout(location=3 index=1 ) out 4-component vector of float)
+0:? 'colors' (layout(location=2 ) out 3-element array of 4-component vector of float)
+0:? 'gl_FragDepth' (gl_FragDepth float FragDepth)
+0:? 'gl_FragDepth' (gl_FragDepth float FragDepth)
+0:? 'anon@2' (in block{in float FogFragCoord gl_FogFragCoord, in implicitly-sized array of 4-component vector of float TexCoord gl_TexCoord, flat in 4-component vector of float Color gl_Color, in 4-component vector of float SecondaryColor gl_SecondaryColor})
+0:? 'anon@2' (in block{in float FogFragCoord gl_FogFragCoord, in implicitly-sized array of 4-component vector of float TexCoord gl_TexCoord, flat in 4-component vector of float Color gl_Color, in 4-component vector of float SecondaryColor gl_SecondaryColor})
+
+
+Linked fragment stage:
+
+
+Shader version: 430
+Requested GL_3DL_array_objects
+gl_FragCoord pixel center is integer
+gl_FragCoord origin is upper left
+using early_fragment_tests
+using depth_greater
+ERROR: node is still EOpNull!
+0:5 Sequence
+0:5 move second child to first child (temp int)
+0:5 'a' (global int)
+0:5 Constant:
+0:5 -1 (const int)
+0:7 Sequence
+0:7 move second child to first child (temp uint)
+0:7 'c' (global uint)
+0:7 Constant:
+0:7 4294967295 (const uint)
+0:8 Sequence
+0:8 move second child to first child (temp uint)
+0:8 'd' (global uint)
+0:8 Constant:
+0:8 4294967295 (const uint)
+0:9 Sequence
+0:9 move second child to first child (temp int)
+0:9 'e' (global int)
+0:9 Constant:
+0:9 -1 (const int)
+0:13 Sequence
+0:13 move second child to first child (temp uint)
+0:13 'f' (global uint)
+0:13 Constant:
+0:13 4294967295 (const uint)
+0:17 Sequence
+0:17 move second child to first child (temp int)
+0:17 'g' (global int)
+0:17 Constant:
+0:17 -1294967296 (const int)
+0:19 Sequence
+0:19 move second child to first child (temp int)
+0:19 'h' (global int)
+0:19 Constant:
+0:19 -1610612736 (const int)
+0:20 Sequence
+0:20 move second child to first child (temp int)
+0:20 'i' (global int)
+0:20 Constant:
+0:20 -1 (const int)
+0:21 Sequence
+0:21 move second child to first child (temp int)
+0:21 'j' (global int)
+0:21 Constant:
+0:21 -1 (const int)
+0:22 Sequence
+0:22 move second child to first child (temp int)
+0:22 'k' (global int)
+0:22 Constant:
+0:22 -2147483648 (const int)
+0:23 Sequence
+0:23 move second child to first child (temp int)
+0:23 'l' (global int)
+0:23 Constant:
+0:23 -2147483648 (const int)
+0:25 Sequence
+0:25 move second child to first child (temp float)
+0:25 'fb' (global float)
+0:25 Constant:
+0:25 1.500000
+0:26 Sequence
+0:26 move second child to first child (temp double)
+0:26 'fd' (global double)
+0:26 Constant:
+0:26 2.000000
+0:127 Function Definition: foo(f1[5]; (global 5-element array of float)
+0:127 Function Parameters:
+0:127 '' (in 5-element array of float)
+0:129 Sequence
+0:129 Branch: Return with expression
+0:129 Constant:
+0:129 3.400000
+0:129 4.200000
+0:129 5.000000
+0:129 5.200000
+0:129 1.100000
+0:137 Function Definition: main( (global void)
+0:137 Function Parameters:
+0:140 Sequence
+0:140 Sequence
+0:140 Sequence
+0:140 move second child to first child (temp 5-element array of float)
+0:140 'a' (temp 5-element array of float)
+0:140 Constant:
+0:140 3.400000
+0:140 4.200000
+0:140 5.000000
+0:140 5.200000
+0:140 1.100000
+0:143 Sequence
+0:143 Sequence
+0:143 move second child to first child (temp 5-element array of float)
+0:143 'a' (temp 5-element array of float)
+0:143 Constant:
+0:143 3.400000
+0:143 4.200000
+0:143 5.000000
+0:143 5.200000
+0:143 1.100000
+0:? Sequence
+0:149 Sequence
+0:149 move second child to first child (temp 2-element array of 4-component vector of float)
+0:149 'b' (temp 2-element array of 4-component vector of float)
+0:149 Constant:
+0:149 0.000000
+0:149 0.000000
+0:149 0.000000
+0:149 0.000000
+0:149 0.100000
+0:149 0.100000
+0:149 0.100000
+0:149 0.100000
+0:150 Sequence
+0:150 move second child to first child (temp 3-element array of 2-element array of 4-component vector of float)
+0:150 'a3' (temp 3-element array of 2-element array of 4-component vector of float)
+0:150 Construct vec4 (temp 3-element array of 2-element array of 4-component vector of float)
+0:150 'b' (temp 2-element array of 4-component vector of float)
+0:150 'b' (temp 2-element array of 4-component vector of float)
+0:150 'b' (temp 2-element array of 4-component vector of float)
+0:152 Sequence
+0:152 move second child to first child (temp 3-element array of 2-element array of 4-component vector of float)
+0:152 'a4' (temp 3-element array of 2-element array of 4-component vector of float)
+0:152 Constant:
+0:152 0.000000
+0:152 0.000000
+0:152 0.000000
+0:152 0.000000
+0:152 1.000000
+0:152 1.000000
+0:152 1.000000
+0:152 1.000000
+0:152 0.000000
+0:152 0.000000
+0:152 0.000000
+0:152 0.000000
+0:152 1.000000
+0:152 1.000000
+0:152 1.000000
+0:152 1.000000
+0:152 0.000000
+0:152 0.000000
+0:152 0.000000
+0:152 0.000000
+0:152 1.000000
+0:152 1.000000
+0:152 1.000000
+0:152 1.000000
+0:? Sequence
+0:159 Sequence
+0:159 Sequence
+0:159 move second child to first child (temp 5-element array of float)
+0:159 'b' (temp 5-element array of float)
+0:159 'a' (temp 5-element array of float)
+0:162 Sequence
+0:162 Sequence
+0:162 move second child to first child (temp 5-element array of float)
+0:162 'b' (temp 5-element array of float)
+0:162 'a' (temp 5-element array of float)
+0:165 Sequence
+0:165 Sequence
+0:165 move second child to first child (temp 5-element array of float)
+0:165 'b' (temp 5-element array of float)
+0:165 Constant:
+0:165 1.000000
+0:165 2.000000
+0:165 3.000000
+0:165 4.000000
+0:165 5.000000
+0:167 Constant:
+0:167 5 (const int)
+0:? Sequence
+0:171 Constant:
+0:171 3 (const int)
+0:172 Constant:
+0:172 2 (const int)
+0:175 Constant:
+0:175 0.000000
+0:178 Constant:
+0:178 0.000000
+0:193 Sequence
+0:193 move second child to first child (temp structure{temp float a, temp int b})
+0:193 'e' (temp structure{temp float a, temp int b})
+0:193 Constant:
+0:193 1.200000
+0:193 2 (const int)
+0:216 Sequence
+0:216 Sequence
+0:216 move second child to first child (temp 5-element array of float)
+0:216 'a' (temp 5-element array of float)
+0:216 Constant:
+0:216 3.400000
+0:216 4.200000
+0:216 5.000000
+0:216 5.200000
+0:216 1.100000
+0:217 Sequence
+0:217 move second child to first child (temp 5-element array of float)
+0:217 'b' (temp 5-element array of float)
+0:217 Constant:
+0:217 3.400000
+0:217 4.200000
+0:217 5.000000
+0:217 5.200000
+0:217 1.100000
+0:218 Sequence
+0:218 move second child to first child (temp 5-element array of float)
+0:218 'c' (temp 5-element array of float)
+0:218 'a' (temp 5-element array of float)
+0:219 Sequence
+0:219 move second child to first child (temp 5-element array of float)
+0:219 'd' (temp 5-element array of float)
+0:219 'b' (temp 5-element array of float)
+0:? Sequence
+0:223 Sequence
+0:223 move second child to first child (temp float)
+0:223 'ceiling' (const (read only) float)
+0:223 Convert int to float (temp float)
+0:223 add (temp int)
+0:223 'a' (global int)
+0:223 'b' (global int)
+0:? Linker Objects
+0:? 'a' (global int)
+0:? 'b' (global int)
+0:? 'c' (global uint)
+0:? 'd' (global uint)
+0:? 'e' (global int)
+0:? 'f' (global uint)
+0:? 'g' (global int)
+0:? 'h' (global int)
+0:? 'i' (global int)
+0:? 'j' (global int)
+0:? 'k' (global int)
+0:? 'l' (global int)
+0:? 'fa' (global float)
+0:? 'fb' (global float)
+0:? 'fc' (global double)
+0:? 'fd' (global double)
+0:? 'texcoord1' (global 2-component vector of float)
+0:? 'texcoord2' (global 2-component vector of float)
+0:? 'position' (global 3-component vector of float)
+0:? 'myRGBA' (global 4-component vector of float)
+0:? 'textureLookup' (global 2-component vector of int)
+0:? 'less' (global 3-component vector of bool)
+0:? 'mat2D' (global 2X2 matrix of float)
+0:? 'optMatrix' (global 3X3 matrix of float)
+0:? 'view' (global 4X4 matrix of float)
+0:? 'projection' (global 4X4 matrix of float)
+0:? 'm' (global 3X2 matrix of float)
+0:? 'highPrecisionMVP' (global 4X4 matrix of double)
+0:? 'dm' (global 2X4 matrix of double)
+0:? 'lightVar' (global structure{global float intensity, global 3-component vector of float position})
+0:? 'frequencies' (global 3-element array of float)
+0:? 'lightPosition' (uniform 4-element array of 4-component vector of float)
+0:? 'lights' (global 2-element array of structure{global float intensity, global 3-component vector of float position})
+0:? 'numLights' (const int)
+0:? 2 (const int)
+0:? 'normal' (smooth in 3-component vector of float)
+0:? 'TexCoord' (centroid smooth in 2-component vector of float)
+0:? 'Color' (invariant centroid smooth in 4-component vector of float)
+0:? 'temperature' (noperspective in float)
+0:? 'myColor' (flat in 3-component vector of float)
+0:? 'myTexCoord' (centroid noperspective in 2-component vector of float)
+0:? 'color' (uniform 3-component vector of float)
+0:? 0.700000
+0:? 0.700000
+0:? 0.200000
+0:? 'anon@0' (in block{smooth in 4-component vector of float Color1, smooth in 4-component vector of float Color2, in 2-component vector of float TexCoordA, in float Atten})
+0:? 'anon@1' (in block{in 4-component vector of float LightPos, in 3-component vector of float LightColor})
+0:? 'Materiala' (in block{in 4-component vector of float Color, in 2-component vector of float TexCoord})
+0:? 'gl_FragCoord' (gl_FragCoord 4-component vector of float FragCoord)
+0:? 'gl_FragCoord' (gl_FragCoord 4-component vector of float FragCoord)
+0:? 'factor' (layout(location=3 index=1 ) out 4-component vector of float)
+0:? 'colors' (layout(location=2 ) out 3-element array of 4-component vector of float)
+0:? 'gl_FragDepth' (gl_FragDepth float FragDepth)
+0:? 'gl_FragDepth' (gl_FragDepth float FragDepth)
+0:? 'anon@2' (in block{in float FogFragCoord gl_FogFragCoord, in 1-element array of 4-component vector of float TexCoord gl_TexCoord, flat in 4-component vector of float Color gl_Color, in 4-component vector of float SecondaryColor gl_SecondaryColor})
+0:? 'anon@2' (in block{in float FogFragCoord gl_FogFragCoord, in 1-element array of 4-component vector of float TexCoord gl_TexCoord, flat in 4-component vector of float Color gl_Color, in 4-component vector of float SecondaryColor gl_SecondaryColor})
+
diff --git a/chromium/third_party/glslang/src/Test/baseResults/specExamples.vert.out b/chromium/third_party/glslang/src/Test/baseResults/specExamples.vert.out
new file mode 100644
index 00000000000..7a880331bf2
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/specExamples.vert.out
@@ -0,0 +1,602 @@
+specExamples.vert
+Warning, version 430 is not yet complete; most version-specific features are present, but some are missing.
+ERROR: 0:29: 'location' : can only apply to uniform, buffer, in, or out storage qualifiers
+ERROR: 0:31: 'triangles' : unrecognized layout identifier, or qualifier requires assignment (e.g., binding = 4)
+ERROR: 0:31: 'invocations' : there is no such layout identifier for this stage taking an assigned value
+ERROR: 0:33: 'lines' : unrecognized layout identifier, or qualifier requires assignment (e.g., binding = 4)
+ERROR: 0:35: 'triangle_strip' : unrecognized layout identifier, or qualifier requires assignment (e.g., binding = 4)
+ERROR: 0:35: 'max_vertices' : there is no such layout identifier for this stage taking an assigned value
+ERROR: 0:36: 'max_vertices' : there is no such layout identifier for this stage taking an assigned value
+ERROR: 0:37: 'triangle_strip' : unrecognized layout identifier, or qualifier requires assignment (e.g., binding = 4)
+ERROR: 0:41: 'stream' : there is no such layout identifier for this stage taking an assigned value
+ERROR: 0:43: 'stream' : there is no such layout identifier for this stage taking an assigned value
+ERROR: 0:45: 'stream' : there is no such layout identifier for this stage taking an assigned value
+ERROR: 0:46: 'stream' : there is no such layout identifier for this stage taking an assigned value
+ERROR: 0:47: 'stream' : there is no such layout identifier for this stage taking an assigned value
+ERROR: 0:50: 'stream' : there is no such layout identifier for this stage taking an assigned value
+ERROR: 0:55: 'stream' : there is no such layout identifier for this stage taking an assigned value
+ERROR: 0:80: 's17' : redefinition
+ERROR: 0:85: 'binding' : atomic_uint binding is too large; see gl_MaxAtomicCounterBindings
+ERROR: 0:87: 'binding' : atomic_uint binding is too large; see gl_MaxAtomicCounterBindings
+ERROR: 0:89: 'binding' : atomic_uint binding is too large
+ERROR: 0:91: 'bar' : redefinition
+ERROR: 0:92: 'atomic_uint' : layout(binding=X) is required
+ERROR: 0:94: 'a2' : redefinition
+ERROR: 0:95: 'binding' : atomic_uint binding is too large; see gl_MaxAtomicCounterBindings
+ERROR: 0:96: 'binding' : atomic_uint binding is too large; see gl_MaxAtomicCounterBindings
+ERROR: 0:97: 'binding' : atomic_uint binding is too large; see gl_MaxAtomicCounterBindings
+ERROR: 0:106: '' : vertex input cannot be further qualified
+ERROR: 0:106: 'redeclaration' : cannot change storage, memory, or auxiliary qualification of gl_FrontColor
+ERROR: 0:112: 'ColorIvn' : identifier not previously declared
+ERROR: 0:132: 'shared' : not supported in this stage: vertex
+ERROR: 0:134: '' : function does not return a value: funcA
+ERROR: 0:136: '' : function does not return a value: funcB
+ERROR: 0:153: '' : function does not return a value: func3
+ERROR: 0:170: 'coherent' : argument cannot drop memory qualifier when passed to formal parameter
+ERROR: 33 compilation errors. No code generated.
+
+
+Shader version: 430
+Requested GL_3DL_array_objects
+ERROR: node is still EOpNull!
+0:134 Function Definition: funcA(I21; (global 4-component vector of float)
+0:134 Function Parameters:
+0:134 'a' (restrict in image2D)
+0:136 Function Definition: funcB(I21; (global 4-component vector of float)
+0:136 Function Parameters:
+0:136 'a' (in image2D)
+0:140 Function Definition: func(f1;f1;f1;f1; (global float)
+0:140 Function Parameters:
+0:140 'e' (in float)
+0:140 'f' (in float)
+0:140 'g' (in float)
+0:140 'h' (in float)
+0:142 Sequence
+0:142 Branch: Return with expression
+0:142 add (temp float)
+0:142 component-wise multiply (temp float)
+0:142 'e' (in float)
+0:142 'f' (in float)
+0:142 component-wise multiply (temp float)
+0:142 'g' (in float)
+0:142 'h' (in float)
+0:146 Function Definition: func2(f1;f1;f1;f1; (global float)
+0:146 Function Parameters:
+0:146 'e' (in float)
+0:146 'f' (in float)
+0:146 'g' (in float)
+0:146 'h' (in float)
+0:148 Sequence
+0:148 Sequence
+0:148 move second child to first child (temp float)
+0:148 'result' (noContraction temp float)
+0:148 add (temp float)
+0:148 component-wise multiply (temp float)
+0:148 'e' (in float)
+0:148 'f' (in float)
+0:148 component-wise multiply (temp float)
+0:148 'g' (in float)
+0:148 'h' (in float)
+0:150 Branch: Return with expression
+0:150 'result' (noContraction temp float)
+0:153 Function Definition: func3(f1;f1;f1; (global float)
+0:153 Function Parameters:
+0:153 'i' (in float)
+0:153 'j' (in float)
+0:153 'k' (noContraction out float)
+0:155 Sequence
+0:155 move second child to first child (temp float)
+0:155 'k' (noContraction out float)
+0:155 add (temp float)
+0:155 component-wise multiply (temp float)
+0:155 'i' (in float)
+0:155 'i' (in float)
+0:155 'j' (in float)
+0:158 Function Definition: main( (global void)
+0:158 Function Parameters:
+0:160 Sequence
+0:160 Sequence
+0:160 move second child to first child (temp 3-component vector of float)
+0:160 'r' (temp 3-component vector of float)
+0:160 Construct vec3 (temp 3-component vector of float)
+0:160 component-wise multiply (temp 4-component vector of float)
+0:160 'a' (in 4-component vector of float)
+0:160 'b' (in 4-component vector of float)
+0:161 Sequence
+0:161 move second child to first child (temp 3-component vector of float)
+0:161 's' (temp 3-component vector of float)
+0:161 Construct vec3 (temp 3-component vector of float)
+0:161 component-wise multiply (temp 4-component vector of float)
+0:161 'c' (in 4-component vector of float)
+0:161 'd' (in 4-component vector of float)
+0:162 move second child to first child (temp 3-component vector of float)
+0:162 vector swizzle (noContraction temp 3-component vector of float)
+0:162 'v' (noContraction smooth out 4-component vector of float)
+0:162 Sequence
+0:162 Constant:
+0:162 0 (const int)
+0:162 Constant:
+0:162 1 (const int)
+0:162 Constant:
+0:162 2 (const int)
+0:162 add (temp 3-component vector of float)
+0:162 'r' (temp 3-component vector of float)
+0:162 's' (temp 3-component vector of float)
+0:163 move second child to first child (temp float)
+0:163 direct index (noContraction temp float)
+0:163 'v' (noContraction smooth out 4-component vector of float)
+0:163 Constant:
+0:163 3 (const int)
+0:163 add (temp float)
+0:163 component-wise multiply (temp float)
+0:163 direct index (temp float)
+0:163 'a' (in 4-component vector of float)
+0:163 Constant:
+0:163 3 (const int)
+0:163 direct index (temp float)
+0:163 'b' (in 4-component vector of float)
+0:163 Constant:
+0:163 3 (const int)
+0:163 component-wise multiply (temp float)
+0:163 direct index (temp float)
+0:163 'c' (in 4-component vector of float)
+0:163 Constant:
+0:163 3 (const int)
+0:163 direct index (temp float)
+0:163 'd' (in 4-component vector of float)
+0:163 Constant:
+0:163 3 (const int)
+0:164 move second child to first child (temp float)
+0:164 direct index (noContraction temp float)
+0:164 'v' (noContraction smooth out 4-component vector of float)
+0:164 Constant:
+0:164 0 (const int)
+0:164 Function Call: func(f1;f1;f1;f1; (global float)
+0:164 direct index (temp float)
+0:164 'a' (in 4-component vector of float)
+0:164 Constant:
+0:164 0 (const int)
+0:164 direct index (temp float)
+0:164 'b' (in 4-component vector of float)
+0:164 Constant:
+0:164 0 (const int)
+0:164 direct index (temp float)
+0:164 'c' (in 4-component vector of float)
+0:164 Constant:
+0:164 0 (const int)
+0:164 direct index (temp float)
+0:164 'd' (in 4-component vector of float)
+0:164 Constant:
+0:164 0 (const int)
+0:166 move second child to first child (temp float)
+0:166 direct index (noContraction temp float)
+0:166 'v' (noContraction smooth out 4-component vector of float)
+0:166 Constant:
+0:166 0 (const int)
+0:166 Function Call: func2(f1;f1;f1;f1; (global float)
+0:166 direct index (temp float)
+0:166 'a' (in 4-component vector of float)
+0:166 Constant:
+0:166 0 (const int)
+0:166 direct index (temp float)
+0:166 'b' (in 4-component vector of float)
+0:166 Constant:
+0:166 0 (const int)
+0:166 direct index (temp float)
+0:166 'c' (in 4-component vector of float)
+0:166 Constant:
+0:166 0 (const int)
+0:166 direct index (temp float)
+0:166 'd' (in 4-component vector of float)
+0:166 Constant:
+0:166 0 (const int)
+0:167 Function Call: func3(f1;f1;f1; (global float)
+0:167 component-wise multiply (temp float)
+0:167 direct index (temp float)
+0:167 'a' (in 4-component vector of float)
+0:167 Constant:
+0:167 0 (const int)
+0:167 direct index (temp float)
+0:167 'b' (in 4-component vector of float)
+0:167 Constant:
+0:167 0 (const int)
+0:167 component-wise multiply (temp float)
+0:167 direct index (temp float)
+0:167 'c' (in 4-component vector of float)
+0:167 Constant:
+0:167 0 (const int)
+0:167 direct index (temp float)
+0:167 'd' (in 4-component vector of float)
+0:167 Constant:
+0:167 0 (const int)
+0:167 direct index (noContraction temp float)
+0:167 'v' (noContraction smooth out 4-component vector of float)
+0:167 Constant:
+0:167 0 (const int)
+0:169 Function Call: funcA(I21; (global 4-component vector of float)
+0:169 'img1' (layout(rgba32f ) uniform image2D)
+0:170 Function Call: funcB(I21; (global 4-component vector of float)
+0:170 'img2' (layout(rgba32f ) coherent uniform image2D)
+0:? Sequence
+0:178 Sequence
+0:178 move second child to first child (temp structure{temp float intensity, temp 3-component vector of float position})
+0:178 'lightVar' (temp structure{temp float intensity, temp 3-component vector of float position})
+0:178 Constant:
+0:178 3.000000
+0:178 1.000000
+0:178 2.000000
+0:178 3.000000
+0:? Sequence
+0:185 Sequence
+0:185 move second child to first child (temp 5-element array of float)
+0:185 'a' (temp 5-element array of float)
+0:185 Construct float (temp 5-element array of float)
+0:185 'g' (temp float)
+0:185 Constant:
+0:185 1.000000
+0:185 'g' (temp float)
+0:185 Constant:
+0:185 2.300000
+0:185 'g' (temp float)
+0:188 move second child to first child (temp 3-element array of float)
+0:188 'b' (temp 3-element array of float)
+0:188 Construct float (temp 3-element array of float)
+0:188 'g' (temp float)
+0:188 add (temp float)
+0:188 'g' (temp float)
+0:188 Constant:
+0:188 1.000000
+0:188 add (temp float)
+0:188 'g' (temp float)
+0:188 Constant:
+0:188 2.000000
+0:191 Sequence
+0:191 Sequence
+0:191 move second child to first child (temp 2-element array of 4-component vector of float)
+0:191 'b' (temp 2-element array of 4-component vector of float)
+0:191 Constant:
+0:191 1.000000
+0:191 1.000000
+0:191 1.000000
+0:191 1.000000
+0:191 1.000000
+0:191 1.000000
+0:191 1.000000
+0:191 1.000000
+0:192 Construct vec4 (temp 3-element array of 2-element array of 4-component vector of float)
+0:192 'b' (temp 2-element array of 4-component vector of float)
+0:192 'b' (temp 2-element array of 4-component vector of float)
+0:192 'b' (temp 2-element array of 4-component vector of float)
+0:193 Construct vec4 (temp 3-element array of 2-element array of 4-component vector of float)
+0:193 'b' (temp 2-element array of 4-component vector of float)
+0:193 'b' (temp 2-element array of 4-component vector of float)
+0:193 'b' (temp 2-element array of 4-component vector of float)
+0:194 Construct vec4 (temp 3-element array of 2-element array of 4-component vector of float)
+0:194 'b' (temp 2-element array of 4-component vector of float)
+0:194 'b' (temp 2-element array of 4-component vector of float)
+0:194 'b' (temp 2-element array of 4-component vector of float)
+0:? Linker Objects
+0:? 'Coords' (out block{out 4-component vector of float Position, out 2-component vector of float Texture})
+0:? 'anon@0' (out block{out 4-component vector of float Color})
+0:? 'transforms' (layout(column_major shared ) uniform 4-element array of block{layout(column_major shared ) uniform 4X4 matrix of float ModelViewMatrix, layout(column_major shared ) uniform 4X4 matrix of float ModelViewProjectionMatrix, layout(column_major shared ) uniform implicitly-sized array of 4-component vector of float a, layout(column_major shared ) uniform float Deformation})
+0:? 'normal' (layout(location=3 ) in 4-component vector of float)
+0:? 'colors' (layout(location=6 ) in 3-element array of 4-component vector of float)
+0:? 'transforms2' (layout(location=9 ) in 2-element array of 4X4 matrix of float)
+0:? 's' (layout(location=3 ) temp structure{global 3-component vector of float a1, global 2X2 matrix of float b, global 2-element array of 4-component vector of float c})
+0:? 'var1' (smooth out 4-component vector of float)
+0:? 'anon@1' (out block{out 4-component vector of float var2, out 2-component vector of float var3, out 3-component vector of float var4})
+0:? 'var5' (smooth out 4-component vector of float)
+0:? 'anon@2' (out block{out 4-component vector of float var6})
+0:? 'var7' (smooth out 4-component vector of float)
+0:? 'anon@3' (layout(row_major std140 ) uniform block{layout(row_major std140 offset=0 ) uniform 4X4 matrix of float M1, layout(column_major std140 offset=64 ) uniform 4X4 matrix of float M2, layout(row_major std140 offset=128 ) uniform 3X3 matrix of float N1})
+0:? 'anon@4' (layout(column_major shared ) uniform block{layout(column_major shared ) uniform 4X4 matrix of float M13, layout(row_major shared ) uniform 4X4 matrix of float m14, layout(column_major shared ) uniform 3X3 matrix of float N12})
+0:? 's17' (layout(binding=3 ) uniform sampler2D)
+0:? 'a2' (layout(binding=2 offset=4 ) uniform atomic_uint)
+0:? 'bar' (layout(binding=2 ) uniform atomic_uint)
+0:? 'bar23' (layout(offset=8 ) uniform atomic_uint)
+0:? 'b2' (layout(binding=2 ) uniform atomic_uint)
+0:? 'c2' (layout(binding=3 ) uniform atomic_uint)
+0:? 'd2' (layout(binding=2 ) uniform atomic_uint)
+0:? 'anon@5' (out block{invariant gl_Position 4-component vector of float Position gl_Position, gl_PointSize float PointSize gl_PointSize, out implicitly-sized array of float ClipDistance gl_ClipDistance, gl_ClipVertex 4-component vector of float ClipVertex gl_ClipVertex, flat out 4-component vector of float FrontColor gl_FrontColor, out 4-component vector of float BackColor gl_BackColor, out 4-component vector of float FrontSecondaryColor gl_FrontSecondaryColor, out 4-component vector of float BackSecondaryColor gl_BackSecondaryColor, out implicitly-sized array of 4-component vector of float TexCoord gl_TexCoord, out float FogFragCoord gl_FogFragCoord})
+0:? 'anon@5' (out block{invariant gl_Position 4-component vector of float Position gl_Position, gl_PointSize float PointSize gl_PointSize, out implicitly-sized array of float ClipDistance gl_ClipDistance, gl_ClipVertex 4-component vector of float ClipVertex gl_ClipVertex, flat out 4-component vector of float FrontColor gl_FrontColor, out 4-component vector of float BackColor gl_BackColor, out 4-component vector of float FrontSecondaryColor gl_FrontSecondaryColor, out 4-component vector of float BackSecondaryColor gl_BackSecondaryColor, out implicitly-sized array of 4-component vector of float TexCoord gl_TexCoord, out float FogFragCoord gl_FogFragCoord})
+0:? 'ColorInv' (smooth out 3-component vector of float)
+0:? 'Color4' (invariant centroid smooth out 3-component vector of float)
+0:? 'position' (noContraction smooth out 4-component vector of float)
+0:? 'Color5' (smooth out 3-component vector of float)
+0:? 'a' (in 4-component vector of float)
+0:? 'b' (in 4-component vector of float)
+0:? 'c' (in 4-component vector of float)
+0:? 'd' (in 4-component vector of float)
+0:? 'v' (noContraction smooth out 4-component vector of float)
+0:? 'anon@6' (layout(column_major shared ) coherent buffer block{layout(column_major shared ) readonly buffer 4-component vector of float member1, layout(column_major shared ) buffer 4-component vector of float member2})
+0:? 'anon@7' (layout(column_major shared ) buffer block{layout(column_major shared ) coherent readonly buffer 4-component vector of float member1A, layout(column_major shared ) coherent buffer 4-component vector of float member2A})
+0:? 'shv' (shared 4-component vector of float)
+0:? 'img1' (layout(rgba32f ) uniform image2D)
+0:? 'img2' (layout(rgba32f ) coherent uniform image2D)
+0:? 'gl_VertexID' (gl_VertexId int VertexId)
+0:? 'gl_InstanceID' (gl_InstanceId int InstanceId)
+
+
+Linked vertex stage:
+
+
+Shader version: 430
+Requested GL_3DL_array_objects
+ERROR: node is still EOpNull!
+0:134 Function Definition: funcA(I21; (global 4-component vector of float)
+0:134 Function Parameters:
+0:134 'a' (restrict in image2D)
+0:136 Function Definition: funcB(I21; (global 4-component vector of float)
+0:136 Function Parameters:
+0:136 'a' (in image2D)
+0:140 Function Definition: func(f1;f1;f1;f1; (global float)
+0:140 Function Parameters:
+0:140 'e' (in float)
+0:140 'f' (in float)
+0:140 'g' (in float)
+0:140 'h' (in float)
+0:142 Sequence
+0:142 Branch: Return with expression
+0:142 add (temp float)
+0:142 component-wise multiply (temp float)
+0:142 'e' (in float)
+0:142 'f' (in float)
+0:142 component-wise multiply (temp float)
+0:142 'g' (in float)
+0:142 'h' (in float)
+0:146 Function Definition: func2(f1;f1;f1;f1; (global float)
+0:146 Function Parameters:
+0:146 'e' (in float)
+0:146 'f' (in float)
+0:146 'g' (in float)
+0:146 'h' (in float)
+0:148 Sequence
+0:148 Sequence
+0:148 move second child to first child (temp float)
+0:148 'result' (noContraction temp float)
+0:148 add (temp float)
+0:148 component-wise multiply (temp float)
+0:148 'e' (in float)
+0:148 'f' (in float)
+0:148 component-wise multiply (temp float)
+0:148 'g' (in float)
+0:148 'h' (in float)
+0:150 Branch: Return with expression
+0:150 'result' (noContraction temp float)
+0:153 Function Definition: func3(f1;f1;f1; (global float)
+0:153 Function Parameters:
+0:153 'i' (in float)
+0:153 'j' (in float)
+0:153 'k' (noContraction out float)
+0:155 Sequence
+0:155 move second child to first child (temp float)
+0:155 'k' (noContraction out float)
+0:155 add (temp float)
+0:155 component-wise multiply (temp float)
+0:155 'i' (in float)
+0:155 'i' (in float)
+0:155 'j' (in float)
+0:158 Function Definition: main( (global void)
+0:158 Function Parameters:
+0:160 Sequence
+0:160 Sequence
+0:160 move second child to first child (temp 3-component vector of float)
+0:160 'r' (temp 3-component vector of float)
+0:160 Construct vec3 (temp 3-component vector of float)
+0:160 component-wise multiply (temp 4-component vector of float)
+0:160 'a' (in 4-component vector of float)
+0:160 'b' (in 4-component vector of float)
+0:161 Sequence
+0:161 move second child to first child (temp 3-component vector of float)
+0:161 's' (temp 3-component vector of float)
+0:161 Construct vec3 (temp 3-component vector of float)
+0:161 component-wise multiply (temp 4-component vector of float)
+0:161 'c' (in 4-component vector of float)
+0:161 'd' (in 4-component vector of float)
+0:162 move second child to first child (temp 3-component vector of float)
+0:162 vector swizzle (noContraction temp 3-component vector of float)
+0:162 'v' (noContraction smooth out 4-component vector of float)
+0:162 Sequence
+0:162 Constant:
+0:162 0 (const int)
+0:162 Constant:
+0:162 1 (const int)
+0:162 Constant:
+0:162 2 (const int)
+0:162 add (temp 3-component vector of float)
+0:162 'r' (temp 3-component vector of float)
+0:162 's' (temp 3-component vector of float)
+0:163 move second child to first child (temp float)
+0:163 direct index (noContraction temp float)
+0:163 'v' (noContraction smooth out 4-component vector of float)
+0:163 Constant:
+0:163 3 (const int)
+0:163 add (temp float)
+0:163 component-wise multiply (temp float)
+0:163 direct index (temp float)
+0:163 'a' (in 4-component vector of float)
+0:163 Constant:
+0:163 3 (const int)
+0:163 direct index (temp float)
+0:163 'b' (in 4-component vector of float)
+0:163 Constant:
+0:163 3 (const int)
+0:163 component-wise multiply (temp float)
+0:163 direct index (temp float)
+0:163 'c' (in 4-component vector of float)
+0:163 Constant:
+0:163 3 (const int)
+0:163 direct index (temp float)
+0:163 'd' (in 4-component vector of float)
+0:163 Constant:
+0:163 3 (const int)
+0:164 move second child to first child (temp float)
+0:164 direct index (noContraction temp float)
+0:164 'v' (noContraction smooth out 4-component vector of float)
+0:164 Constant:
+0:164 0 (const int)
+0:164 Function Call: func(f1;f1;f1;f1; (global float)
+0:164 direct index (temp float)
+0:164 'a' (in 4-component vector of float)
+0:164 Constant:
+0:164 0 (const int)
+0:164 direct index (temp float)
+0:164 'b' (in 4-component vector of float)
+0:164 Constant:
+0:164 0 (const int)
+0:164 direct index (temp float)
+0:164 'c' (in 4-component vector of float)
+0:164 Constant:
+0:164 0 (const int)
+0:164 direct index (temp float)
+0:164 'd' (in 4-component vector of float)
+0:164 Constant:
+0:164 0 (const int)
+0:166 move second child to first child (temp float)
+0:166 direct index (noContraction temp float)
+0:166 'v' (noContraction smooth out 4-component vector of float)
+0:166 Constant:
+0:166 0 (const int)
+0:166 Function Call: func2(f1;f1;f1;f1; (global float)
+0:166 direct index (temp float)
+0:166 'a' (in 4-component vector of float)
+0:166 Constant:
+0:166 0 (const int)
+0:166 direct index (temp float)
+0:166 'b' (in 4-component vector of float)
+0:166 Constant:
+0:166 0 (const int)
+0:166 direct index (temp float)
+0:166 'c' (in 4-component vector of float)
+0:166 Constant:
+0:166 0 (const int)
+0:166 direct index (temp float)
+0:166 'd' (in 4-component vector of float)
+0:166 Constant:
+0:166 0 (const int)
+0:167 Function Call: func3(f1;f1;f1; (global float)
+0:167 component-wise multiply (temp float)
+0:167 direct index (temp float)
+0:167 'a' (in 4-component vector of float)
+0:167 Constant:
+0:167 0 (const int)
+0:167 direct index (temp float)
+0:167 'b' (in 4-component vector of float)
+0:167 Constant:
+0:167 0 (const int)
+0:167 component-wise multiply (temp float)
+0:167 direct index (temp float)
+0:167 'c' (in 4-component vector of float)
+0:167 Constant:
+0:167 0 (const int)
+0:167 direct index (temp float)
+0:167 'd' (in 4-component vector of float)
+0:167 Constant:
+0:167 0 (const int)
+0:167 direct index (noContraction temp float)
+0:167 'v' (noContraction smooth out 4-component vector of float)
+0:167 Constant:
+0:167 0 (const int)
+0:169 Function Call: funcA(I21; (global 4-component vector of float)
+0:169 'img1' (layout(rgba32f ) uniform image2D)
+0:170 Function Call: funcB(I21; (global 4-component vector of float)
+0:170 'img2' (layout(rgba32f ) coherent uniform image2D)
+0:? Sequence
+0:178 Sequence
+0:178 move second child to first child (temp structure{temp float intensity, temp 3-component vector of float position})
+0:178 'lightVar' (temp structure{temp float intensity, temp 3-component vector of float position})
+0:178 Constant:
+0:178 3.000000
+0:178 1.000000
+0:178 2.000000
+0:178 3.000000
+0:? Sequence
+0:185 Sequence
+0:185 move second child to first child (temp 5-element array of float)
+0:185 'a' (temp 5-element array of float)
+0:185 Construct float (temp 5-element array of float)
+0:185 'g' (temp float)
+0:185 Constant:
+0:185 1.000000
+0:185 'g' (temp float)
+0:185 Constant:
+0:185 2.300000
+0:185 'g' (temp float)
+0:188 move second child to first child (temp 3-element array of float)
+0:188 'b' (temp 3-element array of float)
+0:188 Construct float (temp 3-element array of float)
+0:188 'g' (temp float)
+0:188 add (temp float)
+0:188 'g' (temp float)
+0:188 Constant:
+0:188 1.000000
+0:188 add (temp float)
+0:188 'g' (temp float)
+0:188 Constant:
+0:188 2.000000
+0:191 Sequence
+0:191 Sequence
+0:191 move second child to first child (temp 2-element array of 4-component vector of float)
+0:191 'b' (temp 2-element array of 4-component vector of float)
+0:191 Constant:
+0:191 1.000000
+0:191 1.000000
+0:191 1.000000
+0:191 1.000000
+0:191 1.000000
+0:191 1.000000
+0:191 1.000000
+0:191 1.000000
+0:192 Construct vec4 (temp 3-element array of 2-element array of 4-component vector of float)
+0:192 'b' (temp 2-element array of 4-component vector of float)
+0:192 'b' (temp 2-element array of 4-component vector of float)
+0:192 'b' (temp 2-element array of 4-component vector of float)
+0:193 Construct vec4 (temp 3-element array of 2-element array of 4-component vector of float)
+0:193 'b' (temp 2-element array of 4-component vector of float)
+0:193 'b' (temp 2-element array of 4-component vector of float)
+0:193 'b' (temp 2-element array of 4-component vector of float)
+0:194 Construct vec4 (temp 3-element array of 2-element array of 4-component vector of float)
+0:194 'b' (temp 2-element array of 4-component vector of float)
+0:194 'b' (temp 2-element array of 4-component vector of float)
+0:194 'b' (temp 2-element array of 4-component vector of float)
+0:? Linker Objects
+0:? 'Coords' (out block{out 4-component vector of float Position, out 2-component vector of float Texture})
+0:? 'anon@0' (out block{out 4-component vector of float Color})
+0:? 'transforms' (layout(column_major shared ) uniform 4-element array of block{layout(column_major shared ) uniform 4X4 matrix of float ModelViewMatrix, layout(column_major shared ) uniform 4X4 matrix of float ModelViewProjectionMatrix, layout(column_major shared ) uniform 1-element array of 4-component vector of float a, layout(column_major shared ) uniform float Deformation})
+0:? 'normal' (layout(location=3 ) in 4-component vector of float)
+0:? 'colors' (layout(location=6 ) in 3-element array of 4-component vector of float)
+0:? 'transforms2' (layout(location=9 ) in 2-element array of 4X4 matrix of float)
+0:? 's' (layout(location=3 ) temp structure{global 3-component vector of float a1, global 2X2 matrix of float b, global 2-element array of 4-component vector of float c})
+0:? 'var1' (smooth out 4-component vector of float)
+0:? 'anon@1' (out block{out 4-component vector of float var2, out 2-component vector of float var3, out 3-component vector of float var4})
+0:? 'var5' (smooth out 4-component vector of float)
+0:? 'anon@2' (out block{out 4-component vector of float var6})
+0:? 'var7' (smooth out 4-component vector of float)
+0:? 'anon@3' (layout(row_major std140 ) uniform block{layout(row_major std140 offset=0 ) uniform 4X4 matrix of float M1, layout(column_major std140 offset=64 ) uniform 4X4 matrix of float M2, layout(row_major std140 offset=128 ) uniform 3X3 matrix of float N1})
+0:? 'anon@4' (layout(column_major shared ) uniform block{layout(column_major shared ) uniform 4X4 matrix of float M13, layout(row_major shared ) uniform 4X4 matrix of float m14, layout(column_major shared ) uniform 3X3 matrix of float N12})
+0:? 's17' (layout(binding=3 ) uniform sampler2D)
+0:? 'a2' (layout(binding=2 offset=4 ) uniform atomic_uint)
+0:? 'bar' (layout(binding=2 ) uniform atomic_uint)
+0:? 'bar23' (layout(offset=8 ) uniform atomic_uint)
+0:? 'b2' (layout(binding=2 ) uniform atomic_uint)
+0:? 'c2' (layout(binding=3 ) uniform atomic_uint)
+0:? 'd2' (layout(binding=2 ) uniform atomic_uint)
+0:? 'anon@5' (out block{invariant gl_Position 4-component vector of float Position gl_Position, gl_PointSize float PointSize gl_PointSize, out 1-element array of float ClipDistance gl_ClipDistance, gl_ClipVertex 4-component vector of float ClipVertex gl_ClipVertex, flat out 4-component vector of float FrontColor gl_FrontColor, out 4-component vector of float BackColor gl_BackColor, out 4-component vector of float FrontSecondaryColor gl_FrontSecondaryColor, out 4-component vector of float BackSecondaryColor gl_BackSecondaryColor, out 1-element array of 4-component vector of float TexCoord gl_TexCoord, out float FogFragCoord gl_FogFragCoord})
+0:? 'anon@5' (out block{invariant gl_Position 4-component vector of float Position gl_Position, gl_PointSize float PointSize gl_PointSize, out 1-element array of float ClipDistance gl_ClipDistance, gl_ClipVertex 4-component vector of float ClipVertex gl_ClipVertex, flat out 4-component vector of float FrontColor gl_FrontColor, out 4-component vector of float BackColor gl_BackColor, out 4-component vector of float FrontSecondaryColor gl_FrontSecondaryColor, out 4-component vector of float BackSecondaryColor gl_BackSecondaryColor, out 1-element array of 4-component vector of float TexCoord gl_TexCoord, out float FogFragCoord gl_FogFragCoord})
+0:? 'ColorInv' (smooth out 3-component vector of float)
+0:? 'Color4' (invariant centroid smooth out 3-component vector of float)
+0:? 'position' (noContraction smooth out 4-component vector of float)
+0:? 'Color5' (smooth out 3-component vector of float)
+0:? 'a' (in 4-component vector of float)
+0:? 'b' (in 4-component vector of float)
+0:? 'c' (in 4-component vector of float)
+0:? 'd' (in 4-component vector of float)
+0:? 'v' (noContraction smooth out 4-component vector of float)
+0:? 'anon@6' (layout(column_major shared ) coherent buffer block{layout(column_major shared ) readonly buffer 4-component vector of float member1, layout(column_major shared ) buffer 4-component vector of float member2})
+0:? 'anon@7' (layout(column_major shared ) buffer block{layout(column_major shared ) coherent readonly buffer 4-component vector of float member1A, layout(column_major shared ) coherent buffer 4-component vector of float member2A})
+0:? 'shv' (shared 4-component vector of float)
+0:? 'img1' (layout(rgba32f ) uniform image2D)
+0:? 'img2' (layout(rgba32f ) coherent uniform image2D)
+0:? 'gl_VertexID' (gl_VertexId int VertexId)
+0:? 'gl_InstanceID' (gl_InstanceId int InstanceId)
+
diff --git a/chromium/third_party/glslang/src/Test/baseResults/spv.100ops.frag.out b/chromium/third_party/glslang/src/Test/baseResults/spv.100ops.frag.out
new file mode 100755
index 00000000000..9b40c920eb2
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/spv.100ops.frag.out
@@ -0,0 +1,104 @@
+spv.100ops.frag
+Warning, version 310 is not yet complete; most version-specific features are present, but some are missing.
+
+
+Linked fragment stage:
+
+
+// Module Version 10000
+// Generated by (magic number): 80001
+// Id's are bound by 49
+
+ Capability Shader
+ 1: ExtInstImport "GLSL.std.450"
+ MemoryModel Logical GLSL450
+ EntryPoint Fragment 4 "main" 21 26 37
+ ExecutionMode 4 OriginUpperLeft
+ Source ESSL 310
+ Name 4 "main"
+ Name 8 "foo("
+ Name 11 "face1"
+ Name 13 "face2"
+ Name 17 "z"
+ Name 21 "low"
+ Name 26 "high"
+ Name 37 "Color"
+ Decorate 8(foo() RelaxedPrecision
+ Decorate 11(face1) RelaxedPrecision
+ Decorate 13(face2) RelaxedPrecision
+ Decorate 17(z) RelaxedPrecision
+ Decorate 21(low) RelaxedPrecision
+ Decorate 22 RelaxedPrecision
+ Decorate 23 RelaxedPrecision
+ Decorate 25 RelaxedPrecision
+ Decorate 26(high) RelaxedPrecision
+ Decorate 27 RelaxedPrecision
+ Decorate 32 RelaxedPrecision
+ Decorate 34 RelaxedPrecision
+ Decorate 37(Color) RelaxedPrecision
+ Decorate 38 RelaxedPrecision
+ Decorate 39 RelaxedPrecision
+ Decorate 40 RelaxedPrecision
+ Decorate 41 RelaxedPrecision
+ Decorate 42 RelaxedPrecision
+ Decorate 43 RelaxedPrecision
+ Decorate 44 RelaxedPrecision
+ Decorate 45 RelaxedPrecision
+ Decorate 46 RelaxedPrecision
+ 2: TypeVoid
+ 3: TypeFunction 2
+ 6: TypeFloat 32
+ 7: TypeFunction 6(float)
+ 10: TypePointer Private 6(float)
+ 11(face1): 10(ptr) Variable Private
+ 12: 6(float) Constant 1093664768
+ 13(face2): 10(ptr) Variable Private
+ 14: 6(float) Constant 3221225472
+ 15: TypeInt 32 1
+ 16: TypePointer Function 15(int)
+ 18: 15(int) Constant 3
+ 19: 6(float) Constant 1073741824
+ 20: TypePointer Input 6(float)
+ 21(low): 20(ptr) Variable Input
+ 24: 6(float) Constant 1065353216
+ 26(high): 20(ptr) Variable Input
+ 28: TypeBool
+ 33: 15(int) Constant 1
+ 35: TypeVector 6(float) 4
+ 36: TypePointer Output 35(fvec4)
+ 37(Color): 36(ptr) Variable Output
+ 4(main): 2 Function None 3
+ 5: Label
+ 17(z): 16(ptr) Variable Function
+ Store 11(face1) 12
+ Store 13(face2) 14
+ Store 17(z) 18
+ 22: 6(float) Load 21(low)
+ 23: 6(float) FMul 19 22
+ 25: 6(float) FAdd 23 24
+ 27: 6(float) Load 26(high)
+ 29: 28(bool) FOrdLessThan 25 27
+ SelectionMerge 31 None
+ BranchConditional 29 30 31
+ 30: Label
+ 32: 15(int) Load 17(z)
+ 34: 15(int) IAdd 32 33
+ Store 17(z) 34
+ Branch 31
+ 31: Label
+ 38: 6(float) Load 11(face1)
+ 39: 15(int) Load 17(z)
+ 40: 6(float) ConvertSToF 39
+ 41: 35(fvec4) CompositeConstruct 40 40 40 40
+ 42: 35(fvec4) VectorTimesScalar 41 38
+ 43: 6(float) FunctionCall 8(foo()
+ 44: 35(fvec4) CompositeConstruct 43 43 43 43
+ 45: 35(fvec4) FAdd 42 44
+ Store 37(Color) 45
+ Return
+ FunctionEnd
+ 8(foo(): 6(float) Function None 7
+ 9: Label
+ 46: 6(float) Load 13(face2)
+ ReturnValue 46
+ FunctionEnd
diff --git a/chromium/third_party/glslang/src/Test/baseResults/spv.130.frag.out b/chromium/third_party/glslang/src/Test/baseResults/spv.130.frag.out
new file mode 100644
index 00000000000..8d881f50502
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/spv.130.frag.out
@@ -0,0 +1,313 @@
+spv.130.frag
+WARNING: 0:31: '#extension' : extension is only partially supported: GL_ARB_gpu_shader5
+
+
+Linked fragment stage:
+
+
+// Module Version 10000
+// Generated by (magic number): 80001
+// Id's are bound by 205
+
+ Capability Shader
+ Capability ClipDistance
+ Capability SampledRect
+ Capability Sampled1D
+ Capability SampledCubeArray
+ Capability ImageQuery
+ 1: ExtInstImport "GLSL.std.450"
+ MemoryModel Logical GLSL450
+ EntryPoint Fragment 4 "main" 17 68 79 99 173 184 185 186
+ ExecutionMode 4 OriginUpperLeft
+ Source GLSL 140
+ SourceExtension "GL_ARB_gpu_shader5"
+ SourceExtension "GL_ARB_shader_texture_lod"
+ SourceExtension "GL_ARB_shading_language_420pack"
+ SourceExtension "GL_ARB_texture_cube_map_array"
+ SourceExtension "GL_ARB_texture_gather"
+ SourceExtension "GL_ARB_texture_rectangle"
+ Name 4 "main"
+ Name 6 "bar3("
+ Name 8 "bar4("
+ Name 10 "bar5("
+ Name 12 "bar6("
+ Name 17 "o"
+ Name 21 "samp2D"
+ Name 37 "samp2DA"
+ Name 47 "samp2DR"
+ Name 55 "samp2DS"
+ Name 68 "io"
+ Name 72 "Sca"
+ Name 79 "i"
+ Name 87 "Isca"
+ Name 99 "uo"
+ Name 103 "Usca"
+ Name 114 "a"
+ Name 118 "Scas"
+ Name 124 "f"
+ Name 133 "c"
+ Name 154 "a1"
+ Name 157 "m43"
+ Name 160 "b"
+ Name 167 "sampC"
+ Name 173 "gl_ClipDistance"
+ Name 183 "b"
+ Name 184 "fflat"
+ Name 185 "fsmooth"
+ Name 186 "fnop"
+ Name 193 "bounds"
+ Name 194 "s2D"
+ Name 195 "s2DR"
+ Name 199 "s2DRS"
+ Name 203 "s1D"
+ Name 204 "s2DS"
+ Decorate 21(samp2D) DescriptorSet 0
+ Decorate 37(samp2DA) DescriptorSet 0
+ Decorate 47(samp2DR) DescriptorSet 0
+ Decorate 55(samp2DS) DescriptorSet 0
+ Decorate 72(Sca) DescriptorSet 0
+ Decorate 87(Isca) DescriptorSet 0
+ Decorate 103(Usca) DescriptorSet 0
+ Decorate 118(Scas) DescriptorSet 0
+ Decorate 167(sampC) DescriptorSet 0
+ Decorate 173(gl_ClipDistance) BuiltIn ClipDistance
+ Decorate 184(fflat) Flat
+ Decorate 186(fnop) NoPerspective
+ Decorate 193(bounds) DescriptorSet 0
+ Decorate 193(bounds) Binding 0
+ Decorate 194(s2D) DescriptorSet 0
+ Decorate 195(s2DR) DescriptorSet 0
+ Decorate 199(s2DRS) DescriptorSet 0
+ Decorate 203(s1D) DescriptorSet 0
+ Decorate 204(s2DS) DescriptorSet 0
+ 2: TypeVoid
+ 3: TypeFunction 2
+ 14: TypeFloat 32
+ 15: TypeVector 14(float) 4
+ 16: TypePointer Output 15(fvec4)
+ 17(o): 16(ptr) Variable Output
+ 18: TypeImage 14(float) 2D sampled format:Unknown
+ 19: TypeSampledImage 18
+ 20: TypePointer UniformConstant 19
+ 21(samp2D): 20(ptr) Variable UniformConstant
+ 23: TypeVector 14(float) 2
+ 24: 14(float) Constant 1050253722
+ 25: 23(fvec2) ConstantComposite 24 24
+ 26: TypeInt 32 1
+ 27: TypeVector 26(int) 2
+ 28: 26(int) Constant 1
+ 29: 27(ivec2) ConstantComposite 28 28
+ 30: 26(int) Constant 0
+ 34: TypeImage 14(float) 2D array sampled format:Unknown
+ 35: TypeSampledImage 34
+ 36: TypePointer UniformConstant 35
+ 37(samp2DA): 36(ptr) Variable UniformConstant
+ 39: TypeVector 14(float) 3
+ 40: 39(fvec3) ConstantComposite 24 24 24
+ 44: TypeImage 14(float) Rect sampled format:Unknown
+ 45: TypeSampledImage 44
+ 46: TypePointer UniformConstant 45
+ 47(samp2DR): 46(ptr) Variable UniformConstant
+ 52: TypeImage 14(float) 2D depth sampled format:Unknown
+ 53: TypeSampledImage 52
+ 54: TypePointer UniformConstant 53
+ 55(samp2DS): 54(ptr) Variable UniformConstant
+ 57: 14(float) Constant 1067869798
+ 62: 26(int) Constant 2
+ 66: TypeVector 26(int) 3
+ 67: TypePointer Output 66(ivec3)
+ 68(io): 67(ptr) Variable Output
+ 69: TypeImage 14(float) Cube array sampled format:Unknown
+ 70: TypeSampledImage 69
+ 71: TypePointer UniformConstant 70
+ 72(Sca): 71(ptr) Variable UniformConstant
+ 74: 26(int) Constant 3
+ 78: TypePointer Input 15(fvec4)
+ 79(i): 78(ptr) Variable Input
+ 84: TypeImage 26(int) Cube array sampled format:Unknown
+ 85: TypeSampledImage 84
+ 86: TypePointer UniformConstant 85
+ 87(Isca): 86(ptr) Variable UniformConstant
+ 90: 14(float) Constant 1060320051
+ 91: TypeVector 26(int) 4
+ 96: TypeInt 32 0
+ 97: TypeVector 96(int) 4
+ 98: TypePointer Output 97(ivec4)
+ 99(uo): 98(ptr) Variable Output
+ 100: TypeImage 96(int) Cube array sampled format:Unknown
+ 101: TypeSampledImage 100
+ 102: TypePointer UniformConstant 101
+ 103(Usca): 102(ptr) Variable UniformConstant
+ 109: 14(float) Constant 1071225242
+ 113: TypePointer Private 39(fvec3)
+ 114(a): 113(ptr) Variable Private
+ 115: TypeImage 14(float) Cube depth array sampled format:Unknown
+ 116: TypeSampledImage 115
+ 117: TypePointer UniformConstant 116
+ 118(Scas): 117(ptr) Variable UniformConstant
+ 123: TypePointer Function 14(float)
+ 127: 96(int) Constant 1
+ 128: TypePointer Input 14(float)
+ 132: TypePointer Function 91(ivec4)
+ 136: 14(float) Constant 1036831949
+ 137: 39(fvec3) ConstantComposite 136 136 136
+ 138: 14(float) Constant 1045220557
+ 139: 39(fvec3) ConstantComposite 138 138 138
+ 155: TypeMatrix 39(fvec3) 4
+ 156: TypePointer Function 155
+ 161: 14(float) Constant 1073741824
+ 164: TypeImage 14(float) Cube sampled format:Unknown
+ 165: TypeSampledImage 164
+ 166: TypePointer UniformConstant 165
+ 167(sampC): 166(ptr) Variable UniformConstant
+ 170: 96(int) Constant 4
+ 171: TypeArray 14(float) 170
+ 172: TypePointer Input 171
+173(gl_ClipDistance): 172(ptr) Variable Input
+ 176: TypePointer Output 14(float)
+ 182: TypePointer Private 14(float)
+ 183(b): 182(ptr) Variable Private
+ 184(fflat): 128(ptr) Variable Input
+ 185(fsmooth): 128(ptr) Variable Input
+ 186(fnop): 128(ptr) Variable Input
+ 187: 96(int) Constant 3
+ 188: TypeArray 26(int) 187
+ 189: 26(int) Constant 10
+ 190: 26(int) Constant 23
+ 191: 26(int) Constant 32
+ 192: 188 ConstantComposite 189 190 191
+ 193(bounds): 20(ptr) Variable UniformConstant
+ 194(s2D): 20(ptr) Variable UniformConstant
+ 195(s2DR): 46(ptr) Variable UniformConstant
+ 196: TypeImage 14(float) Rect depth sampled format:Unknown
+ 197: TypeSampledImage 196
+ 198: TypePointer UniformConstant 197
+ 199(s2DRS): 198(ptr) Variable UniformConstant
+ 200: TypeImage 14(float) 1D sampled format:Unknown
+ 201: TypeSampledImage 200
+ 202: TypePointer UniformConstant 201
+ 203(s1D): 202(ptr) Variable UniformConstant
+ 204(s2DS): 54(ptr) Variable UniformConstant
+ 4(main): 2 Function None 3
+ 5: Label
+ 168: 165 Load 167(sampC)
+ 169: 15(fvec4) ImageGather 168 139 30
+ Store 17(o) 169
+ 174: 128(ptr) AccessChain 173(gl_ClipDistance) 74
+ 175: 14(float) Load 174
+ 177: 176(ptr) AccessChain 17(o) 127
+ Store 177 175
+ 178: 2 FunctionCall 6(bar3()
+ 179: 2 FunctionCall 8(bar4()
+ 180: 2 FunctionCall 10(bar5()
+ 181: 2 FunctionCall 12(bar6()
+ Return
+ FunctionEnd
+ 6(bar3(): 2 Function None 3
+ 7: Label
+ 22: 19 Load 21(samp2D)
+ 31: 15(fvec4) ImageGather 22 25 30 ConstOffset 29
+ 32: 15(fvec4) Load 17(o)
+ 33: 15(fvec4) FAdd 32 31
+ Store 17(o) 33
+ 38: 35 Load 37(samp2DA)
+ 41: 15(fvec4) ImageGather 38 40 30 ConstOffset 29
+ 42: 15(fvec4) Load 17(o)
+ 43: 15(fvec4) FAdd 42 41
+ Store 17(o) 43
+ Return
+ FunctionEnd
+ 8(bar4(): 2 Function None 3
+ 9: Label
+ 48: 45 Load 47(samp2DR)
+ 49: 15(fvec4) ImageGather 48 25 30 ConstOffset 29
+ 50: 15(fvec4) Load 17(o)
+ 51: 15(fvec4) FAdd 50 49
+ Store 17(o) 51
+ 56: 53 Load 55(samp2DS)
+ 58: 15(fvec4) ImageDrefGather 56 25 57 ConstOffset 29
+ 59: 15(fvec4) Load 17(o)
+ 60: 15(fvec4) FAdd 59 58
+ Store 17(o) 60
+ 61: 19 Load 21(samp2D)
+ 63: 15(fvec4) ImageGather 61 25 62 ConstOffset 29
+ 64: 15(fvec4) Load 17(o)
+ 65: 15(fvec4) FAdd 64 63
+ Store 17(o) 65
+ Return
+ FunctionEnd
+ 10(bar5(): 2 Function None 3
+ 11: Label
+ 124(f): 123(ptr) Variable Function
+ 133(c): 132(ptr) Variable Function
+ 73: 70 Load 72(Sca)
+ 75: 69 Image 73
+ 76: 66(ivec3) ImageQuerySizeLod 75 74
+ Store 68(io) 76
+ 77: 70 Load 72(Sca)
+ 80: 15(fvec4) Load 79(i)
+ 81: 15(fvec4) ImageSampleImplicitLod 77 80
+ 82: 15(fvec4) Load 17(o)
+ 83: 15(fvec4) FAdd 82 81
+ Store 17(o) 83
+ 88: 85 Load 87(Isca)
+ 89: 15(fvec4) Load 79(i)
+ 92: 91(ivec4) ImageSampleImplicitLod 88 89 Bias 90
+ 93: 66(ivec3) VectorShuffle 92 92 0 1 2
+ 94: 66(ivec3) Load 68(io)
+ 95: 66(ivec3) IAdd 94 93
+ Store 68(io) 95
+ 104: 101 Load 103(Usca)
+ 105: 15(fvec4) Load 79(i)
+ 106: 97(ivec4) ImageSampleImplicitLod 104 105
+ Store 99(uo) 106
+ 107: 70 Load 72(Sca)
+ 108: 15(fvec4) Load 79(i)
+ 110: 15(fvec4) ImageSampleExplicitLod 107 108 Lod 109
+ 111: 15(fvec4) Load 17(o)
+ 112: 15(fvec4) FAdd 111 110
+ Store 17(o) 112
+ 119: 116 Load 118(Scas)
+ 120: 115 Image 119
+ 121: 66(ivec3) ImageQuerySizeLod 120 74
+ 122: 39(fvec3) ConvertSToF 121
+ Store 114(a) 122
+ 125: 116 Load 118(Scas)
+ 126: 15(fvec4) Load 79(i)
+ 129: 128(ptr) AccessChain 79(i) 127
+ 130: 14(float) Load 129
+ 131: 14(float) ImageSampleDrefImplicitLod 125 126 130
+ Store 124(f) 131
+ 134: 85 Load 87(Isca)
+ 135: 15(fvec4) Load 79(i)
+ 140: 91(ivec4) ImageSampleExplicitLod 134 135 Grad 137 139
+ Store 133(c) 140
+ 141: 39(fvec3) Load 114(a)
+ 142: 14(float) Load 124(f)
+ 143: 91(ivec4) Load 133(c)
+ 144: 15(fvec4) ConvertSToF 143
+ 145: 15(fvec4) CompositeConstruct 142 142 142 142
+ 146: 15(fvec4) FAdd 145 144
+ 147: 14(float) CompositeExtract 141 0
+ 148: 14(float) CompositeExtract 141 1
+ 149: 14(float) CompositeExtract 141 2
+ 150: 14(float) CompositeExtract 146 0
+ 151: 15(fvec4) CompositeConstruct 147 148 149 150
+ 152: 15(fvec4) Load 17(o)
+ 153: 15(fvec4) FAdd 152 151
+ Store 17(o) 153
+ Return
+ FunctionEnd
+ 12(bar6(): 2 Function None 3
+ 13: Label
+ 154(a1): 123(ptr) Variable Function
+ 157(m43): 156(ptr) Variable Function
+ 160(b): 123(ptr) Variable Function
+ 158: 123(ptr) AccessChain 157(m43) 74 127
+ 159: 14(float) Load 158
+ Store 154(a1) 159
+ 162: 14(float) Load 154(a1)
+ 163: 14(float) FMul 161 162
+ Store 160(b) 163
+ Return
+ FunctionEnd
diff --git a/chromium/third_party/glslang/src/Test/baseResults/spv.140.frag.out b/chromium/third_party/glslang/src/Test/baseResults/spv.140.frag.out
new file mode 100755
index 00000000000..f302478c532
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/spv.140.frag.out
@@ -0,0 +1,181 @@
+spv.140.frag
+
+Linked fragment stage:
+
+
+// Module Version 10000
+// Generated by (magic number): 80001
+// Id's are bound by 101
+
+ Capability Shader
+ Capability ClipDistance
+ Capability SampledRect
+ Capability SampledBuffer
+ Capability ImageQuery
+ 1: ExtInstImport "GLSL.std.450"
+ MemoryModel Logical GLSL450
+ EntryPoint Fragment 4 "main" 16 28 33 43
+ ExecutionMode 4 OriginUpperLeft
+ Source GLSL 140
+ Name 4 "main"
+ Name 8 "foo("
+ Name 11 "i1"
+ Name 16 "gl_FrontFacing"
+ Name 24 "i2"
+ Name 28 "o"
+ Name 33 "gl_ClipDistance"
+ Name 43 "k"
+ Name 55 "sampR"
+ Name 63 "sampB"
+ Name 87 "samp2Da"
+ Name 92 "bn"
+ MemberName 92(bn) 0 "matra"
+ MemberName 92(bn) 1 "matca"
+ MemberName 92(bn) 2 "matr"
+ MemberName 92(bn) 3 "matc"
+ MemberName 92(bn) 4 "matrdef"
+ Name 94 ""
+ Name 97 "bi"
+ MemberName 97(bi) 0 "v"
+ Name 100 "bname"
+ Decorate 16(gl_FrontFacing) BuiltIn FrontFacing
+ Decorate 33(gl_ClipDistance) BuiltIn ClipDistance
+ Decorate 55(sampR) DescriptorSet 0
+ Decorate 63(sampB) DescriptorSet 0
+ Decorate 87(samp2Da) DescriptorSet 0
+ Decorate 90 ArrayStride 64
+ Decorate 91 ArrayStride 64
+ MemberDecorate 92(bn) 0 RowMajor
+ MemberDecorate 92(bn) 0 Offset 0
+ MemberDecorate 92(bn) 0 MatrixStride 16
+ MemberDecorate 92(bn) 1 ColMajor
+ MemberDecorate 92(bn) 1 Offset 256
+ MemberDecorate 92(bn) 1 MatrixStride 16
+ MemberDecorate 92(bn) 2 RowMajor
+ MemberDecorate 92(bn) 2 Offset 512
+ MemberDecorate 92(bn) 2 MatrixStride 16
+ MemberDecorate 92(bn) 3 ColMajor
+ MemberDecorate 92(bn) 3 Offset 576
+ MemberDecorate 92(bn) 3 MatrixStride 16
+ MemberDecorate 92(bn) 4 RowMajor
+ MemberDecorate 92(bn) 4 Offset 640
+ MemberDecorate 92(bn) 4 MatrixStride 16
+ Decorate 92(bn) Block
+ Decorate 94 DescriptorSet 0
+ Decorate 96 ArrayStride 16
+ MemberDecorate 97(bi) 0 Offset 0
+ Decorate 97(bi) Block
+ Decorate 100(bname) DescriptorSet 0
+ 2: TypeVoid
+ 3: TypeFunction 2
+ 6: TypeFloat 32
+ 7: TypeFunction 6(float)
+ 10: TypePointer Private 6(float)
+ 11(i1): 10(ptr) Variable Private
+ 12: TypePointer Function 6(float)
+ 14: TypeBool
+ 15: TypePointer Input 14(bool)
+16(gl_FrontFacing): 15(ptr) Variable Input
+ 20: 6(float) Constant 3221225472
+ 22: 6(float) Constant 1073741824
+ 24(i2): 10(ptr) Variable Private
+ 25: 6(float) Constant 1120665600
+ 26: TypeVector 6(float) 4
+ 27: TypePointer Output 26(fvec4)
+ 28(o): 27(ptr) Variable Output
+ 29: TypeInt 32 0
+ 30: 29(int) Constant 5
+ 31: TypeArray 6(float) 30
+ 32: TypePointer Input 31
+33(gl_ClipDistance): 32(ptr) Variable Input
+ 34: TypeInt 32 1
+ 35: 34(int) Constant 2
+ 36: TypePointer Input 6(float)
+ 39: 29(int) Constant 1
+ 40: TypePointer Output 6(float)
+ 42: TypePointer Input 26(fvec4)
+ 43(k): 42(ptr) Variable Input
+ 45: TypeVector 34(int) 4
+ 50: 29(int) Constant 2
+ 52: TypeImage 6(float) Rect sampled format:Unknown
+ 53: TypeSampledImage 52
+ 54: TypePointer UniformConstant 53
+ 55(sampR): 54(ptr) Variable UniformConstant
+ 58: TypeVector 34(int) 2
+ 60: TypeImage 34(int) Buffer sampled format:Unknown
+ 61: TypeSampledImage 60
+ 62: TypePointer UniformConstant 61
+ 63(sampB): 62(ptr) Variable UniformConstant
+ 69: TypeVector 6(float) 2
+ 72: 6(float) Constant 1120403456
+ 74: 29(int) Constant 3
+ 83: TypeImage 6(float) 2D sampled format:Unknown
+ 84: TypeSampledImage 83
+ 85: TypeArray 84 74
+ 86: TypePointer UniformConstant 85
+ 87(samp2Da): 86(ptr) Variable UniformConstant
+ 88: TypeMatrix 26(fvec4) 4
+ 89: 29(int) Constant 4
+ 90: TypeArray 88 89
+ 91: TypeArray 88 89
+ 92(bn): TypeStruct 90 91 88 88 88
+ 93: TypePointer Uniform 92(bn)
+ 94: 93(ptr) Variable Uniform
+ 95: TypeVector 6(float) 3
+ 96: TypeArray 95(fvec3) 50
+ 97(bi): TypeStruct 96
+ 98: TypeArray 97(bi) 89
+ 99: TypePointer Uniform 98
+ 100(bname): 99(ptr) Variable Uniform
+ 4(main): 2 Function None 3
+ 5: Label
+ 13: 12(ptr) Variable Function
+ 17: 14(bool) Load 16(gl_FrontFacing)
+ SelectionMerge 19 None
+ BranchConditional 17 18 21
+ 18: Label
+ Store 13 20
+ Branch 19
+ 21: Label
+ Store 13 22
+ Branch 19
+ 19: Label
+ 23: 6(float) Load 13
+ Store 11(i1) 23
+ Store 24(i2) 25
+ 37: 36(ptr) AccessChain 33(gl_ClipDistance) 35
+ 38: 6(float) Load 37
+ 41: 40(ptr) AccessChain 28(o) 39
+ Store 41 38
+ 44: 26(fvec4) Load 43(k)
+ 46: 45(ivec4) ConvertFToS 44
+ 47: 34(int) CompositeExtract 46 0
+ 48: 36(ptr) AccessChain 33(gl_ClipDistance) 47
+ 49: 6(float) Load 48
+ 51: 40(ptr) AccessChain 28(o) 50
+ Store 51 49
+ 56: 53 Load 55(sampR)
+ 57: 52 Image 56
+ 59: 58(ivec2) ImageQuerySize 57
+ 64: 61 Load 63(sampB)
+ 65: 60 Image 64
+ 66: 34(int) ImageQuerySize 65
+ 67: 58(ivec2) CompositeConstruct 66 66
+ 68: 58(ivec2) IAdd 59 67
+ 70: 69(fvec2) ConvertSToF 68
+ 71: 6(float) CompositeExtract 70 0
+ 73: 6(float) FDiv 71 72
+ 75: 40(ptr) AccessChain 28(o) 74
+ Store 75 73
+ 76: 6(float) FunctionCall 8(foo()
+ 77: 40(ptr) AccessChain 28(o) 50
+ Store 77 76
+ Return
+ FunctionEnd
+ 8(foo(): 6(float) Function None 7
+ 9: Label
+ 78: 6(float) Load 11(i1)
+ 79: 6(float) Load 24(i2)
+ 80: 6(float) FAdd 78 79
+ ReturnValue 80
+ FunctionEnd
diff --git a/chromium/third_party/glslang/src/Test/baseResults/spv.150.geom.out b/chromium/third_party/glslang/src/Test/baseResults/spv.150.geom.out
new file mode 100755
index 00000000000..8b021ff91d6
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/spv.150.geom.out
@@ -0,0 +1,149 @@
+spv.150.geom
+
+Linked geometry stage:
+
+
+// Module Version 10000
+// Generated by (magic number): 80001
+// Id's are bound by 71
+
+ Capability Geometry
+ Capability GeometryPointSize
+ Capability GeometryStreams
+ 1: ExtInstImport "GLSL.std.450"
+ MemoryModel Logical GLSL450
+ EntryPoint Geometry 4 "main" 10 18 29 33 47 49 51 70
+ ExecutionMode 4 InputTrianglesAdjacency
+ ExecutionMode 4 Invocations 1
+ ExecutionMode 4 OutputTriangleStrip
+ ExecutionMode 4 OutputVertices 30
+ Source GLSL 150
+ Name 4 "main"
+ Name 8 "fromVertex"
+ MemberName 8(fromVertex) 0 "color"
+ Name 10 ""
+ Name 13 "fromVertex"
+ MemberName 13(fromVertex) 0 "color"
+ Name 18 "fromV"
+ Name 27 "gl_PerVertex"
+ MemberName 27(gl_PerVertex) 0 "gl_Position"
+ MemberName 27(gl_PerVertex) 1 "gl_PointSize"
+ MemberName 27(gl_PerVertex) 2 "gl_ClipDistance"
+ Name 29 ""
+ Name 30 "gl_PerVertex"
+ MemberName 30(gl_PerVertex) 0 "gl_Position"
+ MemberName 30(gl_PerVertex) 1 "gl_PointSize"
+ MemberName 30(gl_PerVertex) 2 "gl_ClipDistance"
+ Name 33 "gl_in"
+ Name 47 "gl_PrimitiveID"
+ Name 49 "gl_PrimitiveIDIn"
+ Name 51 "gl_Layer"
+ Name 68 "toFragment"
+ MemberName 68(toFragment) 0 "color"
+ Name 70 "toF"
+ Decorate 8(fromVertex) Block
+ Decorate 8(fromVertex) Stream 3
+ Decorate 10 Stream 3
+ Decorate 13(fromVertex) Block
+ MemberDecorate 27(gl_PerVertex) 0 BuiltIn Position
+ MemberDecorate 27(gl_PerVertex) 1 BuiltIn PointSize
+ MemberDecorate 27(gl_PerVertex) 2 BuiltIn ClipDistance
+ Decorate 27(gl_PerVertex) Block
+ Decorate 27(gl_PerVertex) Stream 0
+ Decorate 29 Stream 0
+ MemberDecorate 30(gl_PerVertex) 0 BuiltIn Position
+ MemberDecorate 30(gl_PerVertex) 1 BuiltIn PointSize
+ MemberDecorate 30(gl_PerVertex) 2 BuiltIn ClipDistance
+ Decorate 30(gl_PerVertex) Block
+ Decorate 47(gl_PrimitiveID) Stream 0
+ Decorate 47(gl_PrimitiveID) BuiltIn PrimitiveId
+ Decorate 49(gl_PrimitiveIDIn) BuiltIn PrimitiveId
+ Decorate 51(gl_Layer) Stream 0
+ Decorate 51(gl_Layer) BuiltIn Layer
+ Decorate 68(toFragment) Block
+ Decorate 68(toFragment) Stream 3
+ Decorate 70(toF) Stream 3
+ 2: TypeVoid
+ 3: TypeFunction 2
+ 6: TypeFloat 32
+ 7: TypeVector 6(float) 3
+ 8(fromVertex): TypeStruct 7(fvec3)
+ 9: TypePointer Output 8(fromVertex)
+ 10: 9(ptr) Variable Output
+ 11: TypeInt 32 1
+ 12: 11(int) Constant 0
+ 13(fromVertex): TypeStruct 7(fvec3)
+ 14: TypeInt 32 0
+ 15: 14(int) Constant 6
+ 16: TypeArray 13(fromVertex) 15
+ 17: TypePointer Input 16
+ 18(fromV): 17(ptr) Variable Input
+ 19: TypePointer Input 7(fvec3)
+ 22: TypePointer Output 7(fvec3)
+ 24: TypeVector 6(float) 4
+ 25: 14(int) Constant 1
+ 26: TypeArray 6(float) 25
+27(gl_PerVertex): TypeStruct 24(fvec4) 6(float) 26
+ 28: TypePointer Output 27(gl_PerVertex)
+ 29: 28(ptr) Variable Output
+30(gl_PerVertex): TypeStruct 24(fvec4) 6(float) 26
+ 31: TypeArray 30(gl_PerVertex) 15
+ 32: TypePointer Input 31
+ 33(gl_in): 32(ptr) Variable Input
+ 34: TypePointer Input 24(fvec4)
+ 37: TypePointer Output 24(fvec4)
+ 39: 11(int) Constant 1
+ 40: 11(int) Constant 3
+ 41: TypePointer Input 6(float)
+ 44: TypePointer Output 6(float)
+ 46: TypePointer Output 11(int)
+47(gl_PrimitiveID): 46(ptr) Variable Output
+ 48: TypePointer Input 11(int)
+49(gl_PrimitiveIDIn): 48(ptr) Variable Input
+ 51(gl_Layer): 46(ptr) Variable Output
+ 52: 11(int) Constant 2
+ 53: 6(float) Constant 1073741824
+ 68(toFragment): TypeStruct 7(fvec3)
+ 69: TypePointer Output 68(toFragment)
+ 70(toF): 69(ptr) Variable Output
+ 4(main): 2 Function None 3
+ 5: Label
+ 20: 19(ptr) AccessChain 18(fromV) 12 12
+ 21: 7(fvec3) Load 20
+ 23: 22(ptr) AccessChain 10 12
+ Store 23 21
+ 35: 34(ptr) AccessChain 33(gl_in) 12 12
+ 36: 24(fvec4) Load 35
+ 38: 37(ptr) AccessChain 29 12
+ Store 38 36
+ 42: 41(ptr) AccessChain 33(gl_in) 40 39
+ 43: 6(float) Load 42
+ 45: 44(ptr) AccessChain 29 39
+ Store 45 43
+ 50: 11(int) Load 49(gl_PrimitiveIDIn)
+ Store 47(gl_PrimitiveID) 50
+ Store 51(gl_Layer) 52
+ EmitVertex
+ 54: 19(ptr) AccessChain 18(fromV) 12 12
+ 55: 7(fvec3) Load 54
+ 56: 7(fvec3) VectorTimesScalar 55 53
+ 57: 22(ptr) AccessChain 10 12
+ Store 57 56
+ 58: 34(ptr) AccessChain 33(gl_in) 12 12
+ 59: 24(fvec4) Load 58
+ 60: 24(fvec4) VectorTimesScalar 59 53
+ 61: 37(ptr) AccessChain 29 12
+ Store 61 60
+ 62: 41(ptr) AccessChain 33(gl_in) 40 39
+ 63: 6(float) Load 62
+ 64: 6(float) FMul 53 63
+ 65: 44(ptr) AccessChain 29 39
+ Store 65 64
+ 66: 11(int) Load 49(gl_PrimitiveIDIn)
+ 67: 11(int) IAdd 66 39
+ Store 47(gl_PrimitiveID) 67
+ Store 51(gl_Layer) 40
+ EmitVertex
+ EndPrimitive
+ Return
+ FunctionEnd
diff --git a/chromium/third_party/glslang/src/Test/baseResults/spv.150.vert.out b/chromium/third_party/glslang/src/Test/baseResults/spv.150.vert.out
new file mode 100755
index 00000000000..5ccf1a812b6
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/spv.150.vert.out
@@ -0,0 +1,107 @@
+spv.150.vert
+
+Linked vertex stage:
+
+
+// Module Version 10000
+// Generated by (magic number): 80001
+// Id's are bound by 63
+
+ Capability Shader
+ Capability ClipDistance
+ 1: ExtInstImport "GLSL.std.450"
+ MemoryModel Logical GLSL450
+ EntryPoint Vertex 4 "main" 13 17 23 38 62
+ Source GLSL 150
+ Name 4 "main"
+ Name 11 "gl_PerVertex"
+ MemberName 11(gl_PerVertex) 0 "gl_Position"
+ MemberName 11(gl_PerVertex) 1 "gl_PointSize"
+ MemberName 11(gl_PerVertex) 2 "gl_ClipDistance"
+ Name 13 ""
+ Name 17 "iv4"
+ Name 23 "ps"
+ Name 34 "s1"
+ MemberName 34(s1) 0 "a"
+ MemberName 34(s1) 1 "a2"
+ MemberName 34(s1) 2 "b"
+ Name 36 "s2"
+ MemberName 36(s2) 0 "c"
+ MemberName 36(s2) 1 "d"
+ Name 38 "s2out"
+ Name 40 "i"
+ Name 47 "s2D"
+ Name 62 "ui"
+ MemberDecorate 11(gl_PerVertex) 0 Invariant
+ MemberDecorate 11(gl_PerVertex) 0 BuiltIn Position
+ MemberDecorate 11(gl_PerVertex) 1 BuiltIn PointSize
+ MemberDecorate 11(gl_PerVertex) 2 BuiltIn ClipDistance
+ Decorate 11(gl_PerVertex) Block
+ Decorate 47(s2D) DescriptorSet 0
+ 2: TypeVoid
+ 3: TypeFunction 2
+ 6: TypeFloat 32
+ 7: TypeVector 6(float) 4
+ 8: TypeInt 32 0
+ 9: 8(int) Constant 4
+ 10: TypeArray 6(float) 9
+11(gl_PerVertex): TypeStruct 7(fvec4) 6(float) 10
+ 12: TypePointer Output 11(gl_PerVertex)
+ 13: 12(ptr) Variable Output
+ 14: TypeInt 32 1
+ 15: 14(int) Constant 0
+ 16: TypePointer Input 7(fvec4)
+ 17(iv4): 16(ptr) Variable Input
+ 19: TypePointer Output 7(fvec4)
+ 21: 14(int) Constant 1
+ 22: TypePointer Input 6(float)
+ 23(ps): 22(ptr) Variable Input
+ 25: TypePointer Output 6(float)
+ 27: 14(int) Constant 2
+ 28: 8(int) Constant 0
+ 32: 8(int) Constant 3
+ 33: TypeArray 7(fvec4) 32
+ 34(s1): TypeStruct 14(int) 14(int) 33
+ 35: TypeArray 34(s1) 9
+ 36(s2): TypeStruct 14(int) 35
+ 37: TypePointer Output 36(s2)
+ 38(s2out): 37(ptr) Variable Output
+ 39: TypePointer Function 14(int)
+ 44: TypeImage 6(float) 2D sampled format:Unknown
+ 45: TypeSampledImage 44
+ 46: TypePointer UniformConstant 45
+ 47(s2D): 46(ptr) Variable UniformConstant
+ 49: TypeVector 6(float) 2
+ 50: 6(float) Constant 1056964608
+ 51: 49(fvec2) ConstantComposite 50 50
+ 52: 6(float) Constant 0
+ 55: TypeVector 6(float) 3
+ 56: 55(fvec3) ConstantComposite 50 50 50
+ 59: 6(float) Constant 1078774989
+ 61: TypePointer Input 14(int)
+ 62(ui): 61(ptr) Variable Input
+ 4(main): 2 Function None 3
+ 5: Label
+ 40(i): 39(ptr) Variable Function
+ 18: 7(fvec4) Load 17(iv4)
+ 20: 19(ptr) AccessChain 13 15
+ Store 20 18
+ 24: 6(float) Load 23(ps)
+ 26: 25(ptr) AccessChain 13 21
+ Store 26 24
+ 29: 22(ptr) AccessChain 17(iv4) 28
+ 30: 6(float) Load 29
+ 31: 25(ptr) AccessChain 13 27 27
+ Store 31 30
+ 41: 14(int) Load 40(i)
+ 42: 6(float) Load 23(ps)
+ 43: 25(ptr) AccessChain 38(s2out) 21 41 27 27 32
+ Store 43 42
+ 48: 45 Load 47(s2D)
+ 53: 7(fvec4) ImageSampleExplicitLod 48 51 Lod 52
+ 54: 45 Load 47(s2D)
+ 57: 7(fvec4) ImageSampleProjExplicitLod 54 56 Lod 52
+ 58: 45 Load 47(s2D)
+ 60: 7(fvec4) ImageSampleExplicitLod 58 51 Lod 59
+ Return
+ FunctionEnd
diff --git a/chromium/third_party/glslang/src/Test/baseResults/spv.300BuiltIns.vert.out b/chromium/third_party/glslang/src/Test/baseResults/spv.300BuiltIns.vert.out
new file mode 100755
index 00000000000..ab07f4a86ad
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/spv.300BuiltIns.vert.out
@@ -0,0 +1,79 @@
+spv.300BuiltIns.vert
+Warning, version 310 is not yet complete; most version-specific features are present, but some are missing.
+
+
+Linked vertex stage:
+
+
+// Module Version 10000
+// Generated by (magic number): 80001
+// Id's are bound by 42
+
+ Capability Shader
+ 1: ExtInstImport "GLSL.std.450"
+ MemoryModel Logical GLSL450
+ EntryPoint Vertex 4 "main" 10 14 21 34
+ Source ESSL 310
+ Name 4 "main"
+ Name 8 "gl_PerVertex"
+ MemberName 8(gl_PerVertex) 0 "gl_Position"
+ MemberName 8(gl_PerVertex) 1 "gl_PointSize"
+ Name 10 ""
+ Name 14 "ps"
+ Name 21 "gl_VertexIndex"
+ Name 34 "gl_InstanceIndex"
+ MemberDecorate 8(gl_PerVertex) 0 Invariant
+ MemberDecorate 8(gl_PerVertex) 0 BuiltIn Position
+ MemberDecorate 8(gl_PerVertex) 1 BuiltIn PointSize
+ Decorate 8(gl_PerVertex) Block
+ Decorate 14(ps) RelaxedPrecision
+ Decorate 15 RelaxedPrecision
+ Decorate 21(gl_VertexIndex) BuiltIn VertexIndex
+ Decorate 30 RelaxedPrecision
+ Decorate 34(gl_InstanceIndex) BuiltIn InstanceIndex
+ 2: TypeVoid
+ 3: TypeFunction 2
+ 6: TypeFloat 32
+ 7: TypeVector 6(float) 4
+ 8(gl_PerVertex): TypeStruct 7(fvec4) 6(float)
+ 9: TypePointer Output 8(gl_PerVertex)
+ 10: 9(ptr) Variable Output
+ 11: TypeInt 32 1
+ 12: 11(int) Constant 0
+ 13: TypePointer Input 6(float)
+ 14(ps): 13(ptr) Variable Input
+ 17: TypePointer Output 7(fvec4)
+ 19: 11(int) Constant 4
+ 20: TypePointer Input 11(int)
+21(gl_VertexIndex): 20(ptr) Variable Input
+ 29: 11(int) Constant 1
+ 31: TypePointer Output 6(float)
+ 33: 11(int) Constant 5
+34(gl_InstanceIndex): 20(ptr) Variable Input
+ 4(main): 2 Function None 3
+ 5: Label
+ 15: 6(float) Load 14(ps)
+ 16: 7(fvec4) CompositeConstruct 15 15 15 15
+ 18: 17(ptr) AccessChain 10 12
+ Store 18 16
+ 22: 11(int) Load 21(gl_VertexIndex)
+ 23: 11(int) ISub 19 22
+ 24: 6(float) ConvertSToF 23
+ 25: 17(ptr) AccessChain 10 12
+ 26: 7(fvec4) Load 25
+ 27: 7(fvec4) VectorTimesScalar 26 24
+ 28: 17(ptr) AccessChain 10 12
+ Store 28 27
+ 30: 6(float) Load 14(ps)
+ 32: 31(ptr) AccessChain 10 29
+ Store 32 30
+ 35: 11(int) Load 34(gl_InstanceIndex)
+ 36: 11(int) ISub 33 35
+ 37: 6(float) ConvertSToF 36
+ 38: 31(ptr) AccessChain 10 29
+ 39: 6(float) Load 38
+ 40: 6(float) FMul 39 37
+ 41: 31(ptr) AccessChain 10 29
+ Store 41 40
+ Return
+ FunctionEnd
diff --git a/chromium/third_party/glslang/src/Test/baseResults/spv.300layout.frag.out b/chromium/third_party/glslang/src/Test/baseResults/spv.300layout.frag.out
new file mode 100755
index 00000000000..e340c1b22ae
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/spv.300layout.frag.out
@@ -0,0 +1,79 @@
+spv.300layout.frag
+Warning, version 310 is not yet complete; most version-specific features are present, but some are missing.
+
+
+Linked fragment stage:
+
+
+// Module Version 10000
+// Generated by (magic number): 80001
+// Id's are bound by 37
+
+ Capability Shader
+ 1: ExtInstImport "GLSL.std.450"
+ MemoryModel Logical GLSL450
+ EntryPoint Fragment 4 "main" 9 11 15 26 29
+ ExecutionMode 4 OriginUpperLeft
+ Source ESSL 310
+ Name 4 "main"
+ Name 9 "c"
+ Name 11 "color"
+ Name 13 "S"
+ MemberName 13(S) 0 "c"
+ MemberName 13(S) 1 "f"
+ Name 15 "s"
+ Name 26 "p"
+ Name 29 "pos"
+ Decorate 9(c) RelaxedPrecision
+ Decorate 9(c) Location 7
+ Decorate 11(color) RelaxedPrecision
+ Decorate 12 RelaxedPrecision
+ MemberDecorate 13(S) 0 RelaxedPrecision
+ MemberDecorate 13(S) 1 RelaxedPrecision
+ Decorate 19 RelaxedPrecision
+ Decorate 20 RelaxedPrecision
+ Decorate 26(p) RelaxedPrecision
+ Decorate 26(p) Location 3
+ Decorate 29(pos) RelaxedPrecision
+ Decorate 30 RelaxedPrecision
+ Decorate 33 RelaxedPrecision
+ Decorate 34 RelaxedPrecision
+ 2: TypeVoid
+ 3: TypeFunction 2
+ 6: TypeFloat 32
+ 7: TypeVector 6(float) 3
+ 8: TypePointer Output 7(fvec3)
+ 9(c): 8(ptr) Variable Output
+ 10: TypePointer Input 7(fvec3)
+ 11(color): 10(ptr) Variable Input
+ 13(S): TypeStruct 7(fvec3) 6(float)
+ 14: TypePointer Input 13(S)
+ 15(s): 14(ptr) Variable Input
+ 16: TypeInt 32 1
+ 17: 16(int) Constant 0
+ 21: TypeVector 6(float) 4
+ 22: TypeInt 32 0
+ 23: 22(int) Constant 2
+ 24: TypeArray 21(fvec4) 23
+ 25: TypePointer Output 24
+ 26(p): 25(ptr) Variable Output
+ 27: 16(int) Constant 1
+ 28: TypePointer Input 21(fvec4)
+ 29(pos): 28(ptr) Variable Input
+ 31: TypePointer Input 6(float)
+ 35: TypePointer Output 21(fvec4)
+ 4(main): 2 Function None 3
+ 5: Label
+ 12: 7(fvec3) Load 11(color)
+ 18: 10(ptr) AccessChain 15(s) 17
+ 19: 7(fvec3) Load 18
+ 20: 7(fvec3) FAdd 12 19
+ Store 9(c) 20
+ 30: 21(fvec4) Load 29(pos)
+ 32: 31(ptr) AccessChain 15(s) 27
+ 33: 6(float) Load 32
+ 34: 21(fvec4) VectorTimesScalar 30 33
+ 36: 35(ptr) AccessChain 26(p) 27
+ Store 36 34
+ Return
+ FunctionEnd
diff --git a/chromium/third_party/glslang/src/Test/baseResults/spv.300layout.vert.out b/chromium/third_party/glslang/src/Test/baseResults/spv.300layout.vert.out
new file mode 100644
index 00000000000..859794a3287
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/spv.300layout.vert.out
@@ -0,0 +1,254 @@
+spv.300layout.vert
+Warning, version 310 is not yet complete; most version-specific features are present, but some are missing.
+
+
+Linked vertex stage:
+
+
+// Module Version 10000
+// Generated by (magic number): 80001
+// Id's are bound by 163
+
+ Capability Shader
+ 1: ExtInstImport "GLSL.std.450"
+ MemoryModel Logical GLSL450
+ EntryPoint Vertex 4 "main" 9 11 98 100 108 114 120 128
+ Source ESSL 310
+ Name 4 "main"
+ Name 9 "pos"
+ Name 11 "p"
+ Name 17 "Transform"
+ MemberName 17(Transform) 0 "M1"
+ MemberName 17(Transform) 1 "M2"
+ MemberName 17(Transform) 2 "N1"
+ MemberName 17(Transform) 3 "iuin"
+ Name 19 "tblock"
+ Name 45 "T3"
+ MemberName 45(T3) 0 "M3"
+ MemberName 45(T3) 1 "M4"
+ MemberName 45(T3) 2 "N2"
+ MemberName 45(T3) 3 "uv3a"
+ Name 47 ""
+ Name 78 "T2"
+ MemberName 78(T2) 0 "b"
+ MemberName 78(T2) 1 "t2m"
+ Name 80 ""
+ Name 98 "color"
+ Name 100 "c"
+ Name 108 "iout"
+ Name 114 "uiuin"
+ Name 120 "aiv2"
+ Name 126 "S"
+ MemberName 126(S) 0 "c"
+ MemberName 126(S) 1 "f"
+ Name 128 "s"
+ Decorate 11(p) Location 3
+ MemberDecorate 17(Transform) 0 RowMajor
+ MemberDecorate 17(Transform) 0 Offset 0
+ MemberDecorate 17(Transform) 0 MatrixStride 16
+ MemberDecorate 17(Transform) 1 ColMajor
+ MemberDecorate 17(Transform) 1 Offset 64
+ MemberDecorate 17(Transform) 1 MatrixStride 16
+ MemberDecorate 17(Transform) 2 RowMajor
+ MemberDecorate 17(Transform) 2 Offset 128
+ MemberDecorate 17(Transform) 2 MatrixStride 16
+ MemberDecorate 17(Transform) 3 Offset 176
+ Decorate 17(Transform) Block
+ Decorate 19(tblock) DescriptorSet 0
+ Decorate 44 ArrayStride 16
+ MemberDecorate 45(T3) 0 ColMajor
+ MemberDecorate 45(T3) 0 Offset 0
+ MemberDecorate 45(T3) 0 MatrixStride 16
+ MemberDecorate 45(T3) 1 RowMajor
+ MemberDecorate 45(T3) 1 Offset 64
+ MemberDecorate 45(T3) 1 MatrixStride 16
+ MemberDecorate 45(T3) 2 ColMajor
+ MemberDecorate 45(T3) 2 Offset 128
+ MemberDecorate 45(T3) 2 MatrixStride 16
+ MemberDecorate 45(T3) 3 Offset 160
+ Decorate 45(T3) Block
+ Decorate 47 DescriptorSet 0
+ MemberDecorate 78(T2) 0 Offset 0
+ MemberDecorate 78(T2) 1 RowMajor
+ MemberDecorate 78(T2) 1 Offset 16
+ MemberDecorate 78(T2) 1 MatrixStride 16
+ Decorate 78(T2) Block
+ Decorate 80 DescriptorSet 0
+ Decorate 100(c) Location 7
+ Decorate 108(iout) Flat
+ Decorate 120(aiv2) Location 9
+ 2: TypeVoid
+ 3: TypeFunction 2
+ 6: TypeFloat 32
+ 7: TypeVector 6(float) 4
+ 8: TypePointer Output 7(fvec4)
+ 9(pos): 8(ptr) Variable Output
+ 10: TypePointer Input 7(fvec4)
+ 11(p): 10(ptr) Variable Input
+ 13: TypeMatrix 7(fvec4) 4
+ 14: TypeVector 6(float) 3
+ 15: TypeMatrix 14(fvec3) 3
+ 16: TypeInt 32 1
+ 17(Transform): TypeStruct 13 13 15 16(int)
+ 18: TypePointer Uniform 17(Transform)
+ 19(tblock): 18(ptr) Variable Uniform
+ 20: 16(int) Constant 0
+ 21: TypePointer Uniform 13
+ 24: 16(int) Constant 1
+ 40: TypeMatrix 14(fvec3) 2
+ 41: TypeInt 32 0
+ 42: TypeVector 41(int) 3
+ 43: 41(int) Constant 4
+ 44: TypeArray 42(ivec3) 43
+ 45(T3): TypeStruct 13 13 40 44
+ 46: TypePointer Uniform 45(T3)
+ 47: 46(ptr) Variable Uniform
+ 78(T2): TypeStruct 41(int) 13
+ 79: TypePointer Uniform 78(T2)
+ 80: 79(ptr) Variable Uniform
+ 97: TypePointer Output 14(fvec3)
+ 98(color): 97(ptr) Variable Output
+ 99: TypePointer Input 14(fvec3)
+ 100(c): 99(ptr) Variable Input
+ 102: 16(int) Constant 2
+ 103: TypePointer Uniform 15
+ 107: TypePointer Output 16(int)
+ 108(iout): 107(ptr) Variable Output
+ 109: 16(int) Constant 3
+ 110: TypePointer Uniform 16(int)
+ 113: TypePointer Input 41(int)
+ 114(uiuin): 113(ptr) Variable Input
+ 118: TypeVector 16(int) 2
+ 119: TypePointer Input 118(ivec2)
+ 120(aiv2): 119(ptr) Variable Input
+ 121: 41(int) Constant 1
+ 122: TypePointer Input 16(int)
+ 126(S): TypeStruct 14(fvec3) 6(float)
+ 127: TypePointer Output 126(S)
+ 128(s): 127(ptr) Variable Output
+ 131: 41(int) Constant 0
+ 132: TypePointer Input 6(float)
+ 135: TypePointer Output 6(float)
+ 137: TypeBool
+ 138: TypePointer Uniform 14(fvec3)
+ 141: 6(float) Constant 1065353216
+ 142: 14(fvec3) ConstantComposite 141 141 141
+ 143: TypeVector 137(bool) 3
+ 149: TypePointer Uniform 42(ivec3)
+ 152: 41(int) Constant 5
+ 153: 42(ivec3) ConstantComposite 152 152 152
+ 4(main): 2 Function None 3
+ 5: Label
+ 12: 7(fvec4) Load 11(p)
+ 22: 21(ptr) AccessChain 19(tblock) 20
+ 23: 13 Load 22
+ 25: 21(ptr) AccessChain 19(tblock) 24
+ 26: 13 Load 25
+ 27: 7(fvec4) CompositeExtract 23 0
+ 28: 7(fvec4) CompositeExtract 26 0
+ 29: 7(fvec4) FAdd 27 28
+ 30: 7(fvec4) CompositeExtract 23 1
+ 31: 7(fvec4) CompositeExtract 26 1
+ 32: 7(fvec4) FAdd 30 31
+ 33: 7(fvec4) CompositeExtract 23 2
+ 34: 7(fvec4) CompositeExtract 26 2
+ 35: 7(fvec4) FAdd 33 34
+ 36: 7(fvec4) CompositeExtract 23 3
+ 37: 7(fvec4) CompositeExtract 26 3
+ 38: 7(fvec4) FAdd 36 37
+ 39: 13 CompositeConstruct 29 32 35 38
+ 48: 21(ptr) AccessChain 47 24
+ 49: 13 Load 48
+ 50: 7(fvec4) CompositeExtract 39 0
+ 51: 7(fvec4) CompositeExtract 49 0
+ 52: 7(fvec4) FAdd 50 51
+ 53: 7(fvec4) CompositeExtract 39 1
+ 54: 7(fvec4) CompositeExtract 49 1
+ 55: 7(fvec4) FAdd 53 54
+ 56: 7(fvec4) CompositeExtract 39 2
+ 57: 7(fvec4) CompositeExtract 49 2
+ 58: 7(fvec4) FAdd 56 57
+ 59: 7(fvec4) CompositeExtract 39 3
+ 60: 7(fvec4) CompositeExtract 49 3
+ 61: 7(fvec4) FAdd 59 60
+ 62: 13 CompositeConstruct 52 55 58 61
+ 63: 21(ptr) AccessChain 47 20
+ 64: 13 Load 63
+ 65: 7(fvec4) CompositeExtract 62 0
+ 66: 7(fvec4) CompositeExtract 64 0
+ 67: 7(fvec4) FAdd 65 66
+ 68: 7(fvec4) CompositeExtract 62 1
+ 69: 7(fvec4) CompositeExtract 64 1
+ 70: 7(fvec4) FAdd 68 69
+ 71: 7(fvec4) CompositeExtract 62 2
+ 72: 7(fvec4) CompositeExtract 64 2
+ 73: 7(fvec4) FAdd 71 72
+ 74: 7(fvec4) CompositeExtract 62 3
+ 75: 7(fvec4) CompositeExtract 64 3
+ 76: 7(fvec4) FAdd 74 75
+ 77: 13 CompositeConstruct 67 70 73 76
+ 81: 21(ptr) AccessChain 80 24
+ 82: 13 Load 81
+ 83: 7(fvec4) CompositeExtract 77 0
+ 84: 7(fvec4) CompositeExtract 82 0
+ 85: 7(fvec4) FAdd 83 84
+ 86: 7(fvec4) CompositeExtract 77 1
+ 87: 7(fvec4) CompositeExtract 82 1
+ 88: 7(fvec4) FAdd 86 87
+ 89: 7(fvec4) CompositeExtract 77 2
+ 90: 7(fvec4) CompositeExtract 82 2
+ 91: 7(fvec4) FAdd 89 90
+ 92: 7(fvec4) CompositeExtract 77 3
+ 93: 7(fvec4) CompositeExtract 82 3
+ 94: 7(fvec4) FAdd 92 93
+ 95: 13 CompositeConstruct 85 88 91 94
+ 96: 7(fvec4) VectorTimesMatrix 12 95
+ Store 9(pos) 96
+ 101: 14(fvec3) Load 100(c)
+ 104: 103(ptr) AccessChain 19(tblock) 102
+ 105: 15 Load 104
+ 106: 14(fvec3) VectorTimesMatrix 101 105
+ Store 98(color) 106
+ 111: 110(ptr) AccessChain 19(tblock) 109
+ 112: 16(int) Load 111
+ 115: 41(int) Load 114(uiuin)
+ 116: 16(int) Bitcast 115
+ 117: 16(int) IAdd 112 116
+ 123: 122(ptr) AccessChain 120(aiv2) 121
+ 124: 16(int) Load 123
+ 125: 16(int) IAdd 117 124
+ Store 108(iout) 125
+ 129: 14(fvec3) Load 100(c)
+ 130: 97(ptr) AccessChain 128(s) 20
+ Store 130 129
+ 133: 132(ptr) AccessChain 11(p) 131
+ 134: 6(float) Load 133
+ 136: 135(ptr) AccessChain 128(s) 24
+ Store 136 134
+ 139: 138(ptr) AccessChain 47 102 24
+ 140: 14(fvec3) Load 139
+ 144: 143(bvec3) FOrdNotEqual 140 142
+ 145: 137(bool) Any 144
+ 146: 137(bool) LogicalNot 145
+ SelectionMerge 148 None
+ BranchConditional 146 147 148
+ 147: Label
+ 150: 149(ptr) AccessChain 47 109 102
+ 151: 42(ivec3) Load 150
+ 154: 143(bvec3) INotEqual 151 153
+ 155: 137(bool) Any 154
+ Branch 148
+ 148: Label
+ 156: 137(bool) Phi 145 5 155 147
+ SelectionMerge 158 None
+ BranchConditional 156 157 158
+ 157: Label
+ 159: 97(ptr) AccessChain 128(s) 20
+ 160: 14(fvec3) Load 159
+ 161: 14(fvec3) CompositeConstruct 141 141 141
+ 162: 14(fvec3) FAdd 160 161
+ Store 159 162
+ Branch 158
+ 158: Label
+ Return
+ FunctionEnd
diff --git a/chromium/third_party/glslang/src/Test/baseResults/spv.300layoutp.vert.out b/chromium/third_party/glslang/src/Test/baseResults/spv.300layoutp.vert.out
new file mode 100755
index 00000000000..ebad96358f6
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/spv.300layoutp.vert.out
@@ -0,0 +1,206 @@
+spv.300layoutp.vert
+Warning, version 310 is not yet complete; most version-specific features are present, but some are missing.
+
+
+Linked vertex stage:
+
+
+// Module Version 10000
+// Generated by (magic number): 80001
+// Id's are bound by 115
+
+ Capability Shader
+ 1: ExtInstImport "GLSL.std.450"
+ MemoryModel Logical GLSL450
+ EntryPoint Vertex 4 "main" 9 11 50 52 60 72 80
+ Source ESSL 310
+ Name 4 "main"
+ Name 9 "pos"
+ Name 11 "p"
+ Name 17 "Transform"
+ MemberName 17(Transform) 0 "M1"
+ MemberName 17(Transform) 1 "M2"
+ MemberName 17(Transform) 2 "N1"
+ MemberName 17(Transform) 3 "iuin"
+ Name 19 "tblock"
+ Name 33 "T3"
+ MemberName 33(T3) 0 "M3"
+ MemberName 33(T3) 1 "M4"
+ MemberName 33(T3) 2 "N2"
+ MemberName 33(T3) 3 "uv3a"
+ Name 35 ""
+ Name 42 "T2"
+ MemberName 42(T2) 0 "b"
+ MemberName 42(T2) 1 "t2m"
+ Name 44 ""
+ Name 50 "color"
+ Name 52 "c"
+ Name 60 "iout"
+ Name 66 "uiuin"
+ Name 72 "aiv2"
+ Name 78 "S"
+ MemberName 78(S) 0 "c"
+ MemberName 78(S) 1 "f"
+ Name 80 "s"
+ Decorate 11(p) Location 3
+ MemberDecorate 17(Transform) 0 RowMajor
+ MemberDecorate 17(Transform) 0 Offset 0
+ MemberDecorate 17(Transform) 0 MatrixStride 16
+ MemberDecorate 17(Transform) 1 ColMajor
+ MemberDecorate 17(Transform) 1 Offset 64
+ MemberDecorate 17(Transform) 1 MatrixStride 16
+ MemberDecorate 17(Transform) 2 RowMajor
+ MemberDecorate 17(Transform) 2 Offset 128
+ MemberDecorate 17(Transform) 2 MatrixStride 16
+ MemberDecorate 17(Transform) 3 Offset 176
+ Decorate 17(Transform) Block
+ Decorate 19(tblock) DescriptorSet 0
+ Decorate 32 ArrayStride 16
+ MemberDecorate 33(T3) 0 ColMajor
+ MemberDecorate 33(T3) 0 Offset 0
+ MemberDecorate 33(T3) 0 MatrixStride 16
+ MemberDecorate 33(T3) 1 RowMajor
+ MemberDecorate 33(T3) 1 Offset 64
+ MemberDecorate 33(T3) 1 MatrixStride 16
+ MemberDecorate 33(T3) 2 ColMajor
+ MemberDecorate 33(T3) 2 Offset 128
+ MemberDecorate 33(T3) 2 MatrixStride 16
+ MemberDecorate 33(T3) 3 Offset 160
+ Decorate 33(T3) Block
+ Decorate 35 DescriptorSet 0
+ MemberDecorate 42(T2) 0 Offset 0
+ MemberDecorate 42(T2) 1 RowMajor
+ MemberDecorate 42(T2) 1 Offset 16
+ MemberDecorate 42(T2) 1 MatrixStride 16
+ Decorate 42(T2) Block
+ Decorate 44 DescriptorSet 0
+ Decorate 52(c) Location 7
+ Decorate 60(iout) Flat
+ Decorate 72(aiv2) Location 9
+ 2: TypeVoid
+ 3: TypeFunction 2
+ 6: TypeFloat 32
+ 7: TypeVector 6(float) 4
+ 8: TypePointer Output 7(fvec4)
+ 9(pos): 8(ptr) Variable Output
+ 10: TypePointer Input 7(fvec4)
+ 11(p): 10(ptr) Variable Input
+ 13: TypeMatrix 7(fvec4) 4
+ 14: TypeVector 6(float) 3
+ 15: TypeMatrix 14(fvec3) 3
+ 16: TypeInt 32 1
+ 17(Transform): TypeStruct 13 13 15 16(int)
+ 18: TypePointer Uniform 17(Transform)
+ 19(tblock): 18(ptr) Variable Uniform
+ 20: 16(int) Constant 0
+ 21: TypePointer Uniform 13
+ 24: 16(int) Constant 1
+ 28: TypeMatrix 14(fvec3) 2
+ 29: TypeInt 32 0
+ 30: TypeVector 29(int) 3
+ 31: 29(int) Constant 4
+ 32: TypeArray 30(ivec3) 31
+ 33(T3): TypeStruct 13 13 28 32
+ 34: TypePointer Uniform 33(T3)
+ 35: 34(ptr) Variable Uniform
+ 42(T2): TypeStruct 29(int) 13
+ 43: TypePointer Uniform 42(T2)
+ 44: 43(ptr) Variable Uniform
+ 49: TypePointer Output 14(fvec3)
+ 50(color): 49(ptr) Variable Output
+ 51: TypePointer Input 14(fvec3)
+ 52(c): 51(ptr) Variable Input
+ 54: 16(int) Constant 2
+ 55: TypePointer Uniform 15
+ 59: TypePointer Output 16(int)
+ 60(iout): 59(ptr) Variable Output
+ 61: 16(int) Constant 3
+ 62: TypePointer Uniform 16(int)
+ 65: TypePointer Private 29(int)
+ 66(uiuin): 65(ptr) Variable Private
+ 70: TypeVector 16(int) 2
+ 71: TypePointer Input 70(ivec2)
+ 72(aiv2): 71(ptr) Variable Input
+ 73: 29(int) Constant 1
+ 74: TypePointer Input 16(int)
+ 78(S): TypeStruct 14(fvec3) 6(float)
+ 79: TypePointer Output 78(S)
+ 80(s): 79(ptr) Variable Output
+ 83: 29(int) Constant 0
+ 84: TypePointer Input 6(float)
+ 87: TypePointer Output 6(float)
+ 89: TypeBool
+ 90: TypePointer Uniform 14(fvec3)
+ 93: 6(float) Constant 1065353216
+ 94: 14(fvec3) ConstantComposite 93 93 93
+ 95: TypeVector 89(bool) 3
+ 101: TypePointer Uniform 30(ivec3)
+ 104: 29(int) Constant 5
+ 105: 30(ivec3) ConstantComposite 104 104 104
+ 4(main): 2 Function None 3
+ 5: Label
+ 12: 7(fvec4) Load 11(p)
+ 22: 21(ptr) AccessChain 19(tblock) 20
+ 23: 13 Load 22
+ 25: 21(ptr) AccessChain 19(tblock) 24
+ 26: 13 Load 25
+ 27: 13 MatrixTimesMatrix 23 26
+ 36: 21(ptr) AccessChain 35 24
+ 37: 13 Load 36
+ 38: 13 MatrixTimesMatrix 27 37
+ 39: 21(ptr) AccessChain 35 20
+ 40: 13 Load 39
+ 41: 13 MatrixTimesMatrix 38 40
+ 45: 21(ptr) AccessChain 44 24
+ 46: 13 Load 45
+ 47: 13 MatrixTimesMatrix 41 46
+ 48: 7(fvec4) VectorTimesMatrix 12 47
+ Store 9(pos) 48
+ 53: 14(fvec3) Load 52(c)
+ 56: 55(ptr) AccessChain 19(tblock) 54
+ 57: 15 Load 56
+ 58: 14(fvec3) VectorTimesMatrix 53 57
+ Store 50(color) 58
+ 63: 62(ptr) AccessChain 19(tblock) 61
+ 64: 16(int) Load 63
+ 67: 29(int) Load 66(uiuin)
+ 68: 16(int) Bitcast 67
+ 69: 16(int) IAdd 64 68
+ 75: 74(ptr) AccessChain 72(aiv2) 73
+ 76: 16(int) Load 75
+ 77: 16(int) IAdd 69 76
+ Store 60(iout) 77
+ 81: 14(fvec3) Load 52(c)
+ 82: 49(ptr) AccessChain 80(s) 20
+ Store 82 81
+ 85: 84(ptr) AccessChain 11(p) 83
+ 86: 6(float) Load 85
+ 88: 87(ptr) AccessChain 80(s) 24
+ Store 88 86
+ 91: 90(ptr) AccessChain 35 54 24
+ 92: 14(fvec3) Load 91
+ 96: 95(bvec3) FOrdNotEqual 92 94
+ 97: 89(bool) Any 96
+ 98: 89(bool) LogicalNot 97
+ SelectionMerge 100 None
+ BranchConditional 98 99 100
+ 99: Label
+ 102: 101(ptr) AccessChain 35 61 54
+ 103: 30(ivec3) Load 102
+ 106: 95(bvec3) INotEqual 103 105
+ 107: 89(bool) Any 106
+ Branch 100
+ 100: Label
+ 108: 89(bool) Phi 97 5 107 99
+ SelectionMerge 110 None
+ BranchConditional 108 109 110
+ 109: Label
+ 111: 49(ptr) AccessChain 80(s) 20
+ 112: 14(fvec3) Load 111
+ 113: 14(fvec3) CompositeConstruct 93 93 93
+ 114: 14(fvec3) FAdd 112 113
+ Store 111 114
+ Branch 110
+ 110: Label
+ Return
+ FunctionEnd
diff --git a/chromium/third_party/glslang/src/Test/baseResults/spv.310.comp.out b/chromium/third_party/glslang/src/Test/baseResults/spv.310.comp.out
new file mode 100755
index 00000000000..3eafc2b58e8
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/spv.310.comp.out
@@ -0,0 +1,127 @@
+spv.310.comp
+Warning, version 310 is not yet complete; most version-specific features are present, but some are missing.
+
+
+Linked compute stage:
+
+
+// Module Version 10000
+// Generated by (magic number): 80001
+// Id's are bound by 66
+
+ Capability Shader
+ 1: ExtInstImport "GLSL.std.450"
+ MemoryModel Logical GLSL450
+ EntryPoint GLCompute 4 "main" 52
+ ExecutionMode 4 LocalSize 16 32 4
+ Source ESSL 310
+ Name 4 "main"
+ Name 12 "outb"
+ MemberName 12(outb) 0 "f"
+ MemberName 12(outb) 1 "g"
+ MemberName 12(outb) 2 "h"
+ MemberName 12(outb) 3 "uns"
+ Name 14 "outbname"
+ Name 18 "s"
+ Name 23 "outbna"
+ MemberName 23(outbna) 0 "k"
+ MemberName 23(outbna) 1 "na"
+ Name 25 "outbnamena"
+ Name 41 "i"
+ Name 47 "outs"
+ MemberName 47(outs) 0 "s"
+ MemberName 47(outs) 1 "va"
+ Name 49 "outnames"
+ Name 52 "gl_LocalInvocationID"
+ Decorate 11 ArrayStride 16
+ MemberDecorate 12(outb) 0 Offset 0
+ MemberDecorate 12(outb) 1 Offset 4
+ MemberDecorate 12(outb) 2 Offset 8
+ MemberDecorate 12(outb) 3 Offset 16
+ Decorate 12(outb) BufferBlock
+ Decorate 14(outbname) DescriptorSet 0
+ MemberDecorate 23(outbna) 0 Offset 0
+ MemberDecorate 23(outbna) 1 Offset 16
+ Decorate 23(outbna) BufferBlock
+ Decorate 25(outbnamena) DescriptorSet 0
+ Decorate 46 ArrayStride 16
+ MemberDecorate 47(outs) 0 Offset 0
+ MemberDecorate 47(outs) 1 Offset 16
+ Decorate 47(outs) BufferBlock
+ Decorate 49(outnames) DescriptorSet 0
+ Decorate 52(gl_LocalInvocationID) BuiltIn LocalInvocationId
+ Decorate 65 BuiltIn WorkgroupSize
+ 2: TypeVoid
+ 3: TypeFunction 2
+ 6: TypeInt 32 0
+ 7: 6(int) Constant 1
+ 8: 6(int) Constant 0
+ 9: TypeFloat 32
+ 10: TypeVector 9(float) 3
+ 11: TypeRuntimeArray 10(fvec3)
+ 12(outb): TypeStruct 9(float) 9(float) 9(float) 11
+ 13: TypePointer Uniform 12(outb)
+ 14(outbname): 13(ptr) Variable Uniform
+ 15: TypeInt 32 1
+ 16: 15(int) Constant 0
+ 17: TypePointer Workgroup 9(float)
+ 18(s): 17(ptr) Variable Workgroup
+ 20: TypePointer Uniform 9(float)
+ 22: TypeVector 9(float) 4
+ 23(outbna): TypeStruct 15(int) 22(fvec4)
+ 24: TypePointer Uniform 23(outbna)
+ 25(outbnamena): 24(ptr) Variable Uniform
+ 26: 15(int) Constant 1
+ 29: TypePointer Uniform 22(fvec4)
+ 31: 15(int) Constant 3
+ 32: 15(int) Constant 18
+ 35: 15(int) Constant 17
+ 36: 9(float) Constant 1077936128
+ 37: 10(fvec3) ConstantComposite 36 36 36
+ 38: TypePointer Uniform 10(fvec3)
+ 40: TypePointer Workgroup 15(int)
+ 41(i): 40(ptr) Variable Workgroup
+ 46: TypeRuntimeArray 22(fvec4)
+ 47(outs): TypeStruct 15(int) 46
+ 48: TypePointer Uniform 47(outs)
+ 49(outnames): 48(ptr) Variable Uniform
+ 50: TypeVector 6(int) 3
+ 51: TypePointer Input 50(ivec3)
+52(gl_LocalInvocationID): 51(ptr) Variable Input
+ 53: TypePointer Input 6(int)
+ 60: TypePointer Uniform 15(int)
+ 62: 6(int) Constant 16
+ 63: 6(int) Constant 32
+ 64: 6(int) Constant 4
+ 65: 50(ivec3) ConstantComposite 62 63 64
+ 4(main): 2 Function None 3
+ 5: Label
+ ControlBarrier 7 7 8
+ 19: 9(float) Load 18(s)
+ 21: 20(ptr) AccessChain 14(outbname) 16
+ Store 21 19
+ 27: 9(float) Load 18(s)
+ 28: 22(fvec4) CompositeConstruct 27 27 27 27
+ 30: 29(ptr) AccessChain 25(outbnamena) 26
+ Store 30 28
+ 33: 20(ptr) AccessChain 14(outbname) 31 32 8
+ 34: 9(float) Load 33
+ Store 18(s) 34
+ 39: 38(ptr) AccessChain 14(outbname) 31 35
+ Store 39 37
+ 42: 15(int) Load 41(i)
+ 43: 9(float) Load 18(s)
+ 44: 10(fvec3) CompositeConstruct 43 43 43
+ 45: 38(ptr) AccessChain 14(outbname) 31 42
+ Store 45 44
+ 54: 53(ptr) AccessChain 52(gl_LocalInvocationID) 8
+ 55: 6(int) Load 54
+ 56: 9(float) Load 18(s)
+ 57: 22(fvec4) CompositeConstruct 56 56 56 56
+ 58: 29(ptr) AccessChain 49(outnames) 26 55
+ Store 58 57
+ 59: 15(int) ArrayLength 14(outbname) 3
+ 61: 60(ptr) AccessChain 49(outnames) 16
+ Store 61 59
+ Return
+ FunctionEnd
diff --git a/chromium/third_party/glslang/src/Test/baseResults/spv.330.geom.out b/chromium/third_party/glslang/src/Test/baseResults/spv.330.geom.out
new file mode 100644
index 00000000000..3077769a508
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/spv.330.geom.out
@@ -0,0 +1,71 @@
+spv.330.geom
+
+Linked geometry stage:
+
+
+// Module Version 10000
+// Generated by (magic number): 80001
+// Id's are bound by 32
+
+ Capability Geometry
+ Capability ClipDistance
+ 1: ExtInstImport "GLSL.std.450"
+ MemoryModel Logical GLSL450
+ EntryPoint Geometry 4 "main" 13 20
+ ExecutionMode 4 Triangles
+ ExecutionMode 4 Invocations 1
+ ExecutionMode 4 OutputTriangleStrip
+ ExecutionMode 4 OutputVertices 3
+ Source GLSL 330
+ SourceExtension "GL_ARB_separate_shader_objects"
+ Name 4 "main"
+ Name 11 "gl_PerVertex"
+ MemberName 11(gl_PerVertex) 0 "gl_Position"
+ MemberName 11(gl_PerVertex) 1 "gl_ClipDistance"
+ Name 13 ""
+ Name 16 "gl_PerVertex"
+ MemberName 16(gl_PerVertex) 0 "gl_Position"
+ MemberName 16(gl_PerVertex) 1 "gl_ClipDistance"
+ Name 20 "gl_in"
+ MemberDecorate 11(gl_PerVertex) 0 BuiltIn Position
+ MemberDecorate 11(gl_PerVertex) 1 BuiltIn ClipDistance
+ Decorate 11(gl_PerVertex) Block
+ MemberDecorate 16(gl_PerVertex) 0 BuiltIn Position
+ MemberDecorate 16(gl_PerVertex) 1 BuiltIn ClipDistance
+ Decorate 16(gl_PerVertex) Block
+ 2: TypeVoid
+ 3: TypeFunction 2
+ 6: TypeFloat 32
+ 7: TypeVector 6(float) 4
+ 8: TypeInt 32 0
+ 9: 8(int) Constant 1
+ 10: TypeArray 6(float) 9
+11(gl_PerVertex): TypeStruct 7(fvec4) 10
+ 12: TypePointer Output 11(gl_PerVertex)
+ 13: 12(ptr) Variable Output
+ 14: TypeInt 32 1
+ 15: 14(int) Constant 0
+16(gl_PerVertex): TypeStruct 7(fvec4) 10
+ 17: 8(int) Constant 3
+ 18: TypeArray 16(gl_PerVertex) 17
+ 19: TypePointer Input 18
+ 20(gl_in): 19(ptr) Variable Input
+ 21: 14(int) Constant 1
+ 22: TypePointer Input 7(fvec4)
+ 25: TypePointer Output 7(fvec4)
+ 27: TypePointer Input 6(float)
+ 30: TypePointer Output 6(float)
+ 4(main): 2 Function None 3
+ 5: Label
+ 23: 22(ptr) AccessChain 20(gl_in) 21 15
+ 24: 7(fvec4) Load 23
+ 26: 25(ptr) AccessChain 13 15
+ Store 26 24
+ 28: 27(ptr) AccessChain 20(gl_in) 21 21 15
+ 29: 6(float) Load 28
+ 31: 30(ptr) AccessChain 13 21 15
+ Store 31 29
+ EmitVertex
+ EndPrimitive
+ Return
+ FunctionEnd
diff --git a/chromium/third_party/glslang/src/Test/baseResults/spv.400.frag.out b/chromium/third_party/glslang/src/Test/baseResults/spv.400.frag.out
new file mode 100644
index 00000000000..4af713c4351
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/spv.400.frag.out
@@ -0,0 +1,1385 @@
+spv.400.frag
+Warning, version 400 is not yet complete; most version-specific features are present, but some are missing.
+
+
+Linked fragment stage:
+
+
+// Module Version 10000
+// Generated by (magic number): 80001
+// Id's are bound by 1112
+
+ Capability Shader
+ Capability Float64
+ Capability ImageGatherExtended
+ Capability ClipDistance
+ Capability SampledRect
+ 1: ExtInstImport "GLSL.std.450"
+ MemoryModel Logical GLSL450
+ EntryPoint Fragment 4 "main" 13 1025 1031 1036 1048 1074 1095 1097 1103 1105
+ ExecutionMode 4 OriginUpperLeft
+ Source GLSL 400
+ SourceExtension "GL_ARB_separate_shader_objects"
+ Name 4 "main"
+ Name 6 "foo23("
+ Name 8 "doubles("
+ Name 13 "outp"
+ Name 17 "u2drs"
+ Name 39 "doublev"
+ Name 43 "dvec2v"
+ Name 48 "dvec3v"
+ Name 53 "dvec4v"
+ Name 428 "boolv"
+ Name 437 "bvec2v"
+ Name 446 "bvec3v"
+ Name 455 "bvec4v"
+ Name 737 "dmat2v"
+ Name 743 "dmat3v"
+ Name 749 "dmat4v"
+ Name 755 "dmat2x3v"
+ Name 761 "dmat3x2v"
+ Name 767 "dmat2x4v"
+ Name 773 "dmat4x2v"
+ Name 779 "dmat3x4v"
+ Name 785 "dmat4x3v"
+ Name 1017 "v"
+ Name 1023 "arrayedSampler"
+ Name 1025 "i"
+ Name 1031 "c2D"
+ Name 1036 "gl_ClipDistance"
+ Name 1048 "uoutp"
+ Name 1052 "samp2dr"
+ Name 1074 "ioutp"
+ Name 1078 "isamp2DA"
+ Name 1095 "gl_FragCoord"
+ Name 1097 "vl2"
+ Name 1103 "uo"
+ Name 1105 "u"
+ Decorate 17(u2drs) DescriptorSet 0
+ Decorate 1023(arrayedSampler) DescriptorSet 0
+ Decorate 1025(i) Flat
+ Decorate 1036(gl_ClipDistance) BuiltIn ClipDistance
+ Decorate 1052(samp2dr) DescriptorSet 0
+ Decorate 1078(isamp2DA) DescriptorSet 0
+ Decorate 1095(gl_FragCoord) BuiltIn FragCoord
+ Decorate 1097(vl2) Location 6
+ Decorate 1105(u) Flat
+ 2: TypeVoid
+ 3: TypeFunction 2
+ 10: TypeFloat 32
+ 11: TypeVector 10(float) 4
+ 12: TypePointer Output 11(fvec4)
+ 13(outp): 12(ptr) Variable Output
+ 14: TypeImage 10(float) Rect depth sampled format:Unknown
+ 15: TypeSampledImage 14
+ 16: TypePointer UniformConstant 15
+ 17(u2drs): 16(ptr) Variable UniformConstant
+ 20: TypeVector 10(float) 2
+ 21: 10(float) Constant 0
+ 22: 20(fvec2) ConstantComposite 21 21
+ 23: TypeInt 32 1
+ 24: TypeVector 23(int) 2
+ 25: 23(int) Constant 3
+ 26: 23(int) Constant 4
+ 27: 24(ivec2) ConstantComposite 25 26
+ 30: TypeInt 32 0
+ 31: 30(int) Constant 0
+ 32: TypePointer Output 10(float)
+ 37: TypeFloat 64
+ 38: TypePointer Function 37(float)
+ 40: 37(float) Constant 2507418074 1073430332
+ 41: TypeVector 37(float) 2
+ 42: TypePointer Function 41(fvec2)
+ 44: 37(float) Constant 796182188 1073367658
+ 45: 41(fvec2) ConstantComposite 44 44
+ 46: TypeVector 37(float) 3
+ 47: TypePointer Function 46(fvec3)
+ 49: 37(float) Constant 1719614413 1073127582
+ 50: 46(fvec3) ConstantComposite 49 49 49
+ 51: TypeVector 37(float) 4
+ 52: TypePointer Function 51(fvec4)
+ 426: TypeBool
+ 427: TypePointer Function 426(bool)
+ 435: TypeVector 426(bool) 2
+ 436: TypePointer Function 435(bvec2)
+ 444: TypeVector 426(bool) 3
+ 445: TypePointer Function 444(bvec3)
+ 453: TypeVector 426(bool) 4
+ 454: TypePointer Function 453(bvec4)
+ 561: 426(bool) ConstantFalse
+ 570: 435(bvec2) ConstantComposite 561 561
+ 579: 444(bvec3) ConstantComposite 561 561 561
+ 588: 453(bvec4) ConstantComposite 561 561 561 561
+ 735: TypeMatrix 41(fvec2) 2
+ 736: TypePointer Function 735
+ 741: TypeMatrix 46(fvec3) 3
+ 742: TypePointer Function 741
+ 747: TypeMatrix 51(fvec4) 4
+ 748: TypePointer Function 747
+ 753: TypeMatrix 46(fvec3) 2
+ 754: TypePointer Function 753
+ 759: TypeMatrix 41(fvec2) 3
+ 760: TypePointer Function 759
+ 765: TypeMatrix 51(fvec4) 2
+ 766: TypePointer Function 765
+ 771: TypeMatrix 41(fvec2) 4
+ 772: TypePointer Function 771
+ 777: TypeMatrix 51(fvec4) 3
+ 778: TypePointer Function 777
+ 783: TypeMatrix 46(fvec3) 4
+ 784: TypePointer Function 783
+ 952: 30(int) Constant 1
+ 956: 30(int) Constant 2
+ 960: 30(int) Constant 3
+ 964: 23(int) Constant 1
+ 968: 23(int) Constant 2
+ 994: 10(float) Constant 1065353216
+ 1016: TypePointer Function 11(fvec4)
+ 1018: TypeImage 10(float) 2D sampled format:Unknown
+ 1019: TypeSampledImage 1018
+ 1020: 30(int) Constant 5
+ 1021: TypeArray 1019 1020
+ 1022: TypePointer UniformConstant 1021
+1023(arrayedSampler): 1022(ptr) Variable UniformConstant
+ 1024: TypePointer Input 23(int)
+ 1025(i): 1024(ptr) Variable Input
+ 1027: TypePointer UniformConstant 1019
+ 1030: TypePointer Input 20(fvec2)
+ 1031(c2D): 1030(ptr) Variable Input
+ 1034: TypeArray 10(float) 956
+ 1035: TypePointer Input 1034
+1036(gl_ClipDistance): 1035(ptr) Variable Input
+ 1037: TypePointer Input 10(float)
+ 1041: TypeVector 10(float) 3
+ 1046: TypeVector 30(int) 4
+ 1047: TypePointer Output 1046(ivec4)
+ 1048(uoutp): 1047(ptr) Variable Output
+ 1049: TypeImage 30(int) Rect sampled format:Unknown
+ 1050: TypeSampledImage 1049
+ 1051: TypePointer UniformConstant 1050
+ 1052(samp2dr): 1051(ptr) Variable UniformConstant
+ 1055: 30(int) Constant 4
+ 1056: TypeArray 24(ivec2) 1055
+ 1057: 24(ivec2) ConstantComposite 964 968
+ 1058: 23(int) Constant 15
+ 1059: 23(int) Constant 16
+ 1060: 24(ivec2) ConstantComposite 1058 1059
+ 1061: 23(int) Constant 4294967294
+ 1062: 23(int) Constant 0
+ 1063: 24(ivec2) ConstantComposite 1061 1062
+ 1064: 1056 ConstantComposite 1057 27 1060 1063
+ 1072: TypeVector 23(int) 4
+ 1073: TypePointer Output 1072(ivec4)
+ 1074(ioutp): 1073(ptr) Variable Output
+ 1075: TypeImage 23(int) 2D array sampled format:Unknown
+ 1076: TypeSampledImage 1075
+ 1077: TypePointer UniformConstant 1076
+ 1078(isamp2DA): 1077(ptr) Variable UniformConstant
+ 1080: 10(float) Constant 1036831949
+ 1081: 1041(fvec3) ConstantComposite 1080 1080 1080
+ 1082: 24(ivec2) ConstantComposite 964 964
+ 1094: TypePointer Input 11(fvec4)
+1095(gl_FragCoord): 1094(ptr) Variable Input
+ 1097(vl2): 1094(ptr) Variable Input
+ 1102: TypePointer Output 30(int)
+ 1103(uo): 1102(ptr) Variable Output
+ 1104: TypePointer Input 30(int)
+ 1105(u): 1104(ptr) Variable Input
+ 4(main): 2 Function None 3
+ 5: Label
+ 1017(v): 1016(ptr) Variable Function
+ 1026: 23(int) Load 1025(i)
+ 1028: 1027(ptr) AccessChain 1023(arrayedSampler) 1026
+ 1029: 1019 Load 1028
+ 1032: 20(fvec2) Load 1031(c2D)
+ 1033: 11(fvec4) ImageSampleImplicitLod 1029 1032
+ Store 1017(v) 1033
+ 1038: 1037(ptr) AccessChain 1036(gl_ClipDistance) 964
+ 1039: 10(float) Load 1038
+ 1040: 32(ptr) AccessChain 13(outp) 31
+ Store 1040 1039
+ 1042: 11(fvec4) Load 1017(v)
+ 1043: 1041(fvec3) VectorShuffle 1042 1042 1 2 3
+ 1044: 11(fvec4) Load 13(outp)
+ 1045: 11(fvec4) VectorShuffle 1044 1043 0 4 5 6
+ Store 13(outp) 1045
+ 1053: 1050 Load 1052(samp2dr)
+ 1054: 20(fvec2) Load 1031(c2D)
+ 1065: 1046(ivec4) ImageGather 1053 1054 968 ConstOffsets 1064
+ Store 1048(uoutp) 1065
+ 1066: 1027(ptr) AccessChain 1023(arrayedSampler) 1062
+ 1067: 1019 Load 1066
+ 1068: 20(fvec2) Load 1031(c2D)
+ 1069: 11(fvec4) ImageGather 1067 1068 1062
+ 1070: 11(fvec4) Load 13(outp)
+ 1071: 11(fvec4) FAdd 1070 1069
+ Store 13(outp) 1071
+ 1079: 1076 Load 1078(isamp2DA)
+ 1083: 1072(ivec4) ImageGather 1079 1081 25 ConstOffset 1082
+ Store 1074(ioutp) 1083
+ 1084: 1076 Load 1078(isamp2DA)
+ 1085: 1072(ivec4) ImageGather 1084 1081 25 ConstOffset 1082
+ 1086: 1072(ivec4) Load 1074(ioutp)
+ 1087: 1072(ivec4) IAdd 1086 1085
+ Store 1074(ioutp) 1087
+ 1088: 1076 Load 1078(isamp2DA)
+ 1089: 23(int) Load 1025(i)
+ 1090: 24(ivec2) CompositeConstruct 1089 1089
+ 1091: 1072(ivec4) ImageGather 1088 1081 1062 Offset 1090
+ 1092: 1072(ivec4) Load 1074(ioutp)
+ 1093: 1072(ivec4) IAdd 1092 1091
+ Store 1074(ioutp) 1093
+ 1096: 11(fvec4) Load 1095(gl_FragCoord)
+ 1098: 11(fvec4) Load 1097(vl2)
+ 1099: 11(fvec4) FAdd 1096 1098
+ 1100: 11(fvec4) Load 13(outp)
+ 1101: 11(fvec4) FAdd 1100 1099
+ Store 13(outp) 1101
+ 1106: 30(int) Load 1105(u)
+ 1107: 23(int) Load 1025(i)
+ 1108: 30(int) Bitcast 1107
+ 1109: 30(int) UMod 1106 1108
+ Store 1103(uo) 1109
+ 1110: 2 FunctionCall 6(foo23()
+ 1111: 2 FunctionCall 8(doubles()
+ Return
+ FunctionEnd
+ 6(foo23(): 2 Function None 3
+ 7: Label
+ 18: 15 Load 17(u2drs)
+ 19: 11(fvec4) Load 13(outp)
+ 28: 10(float) CompositeExtract 19 2
+ 29: 10(float) ImageSampleProjDrefExplicitLod 18 19 28 Grad ConstOffset 22 22 27
+ 33: 32(ptr) AccessChain 13(outp) 31
+ 34: 10(float) Load 33
+ 35: 10(float) FAdd 34 29
+ 36: 32(ptr) AccessChain 13(outp) 31
+ Store 36 35
+ Return
+ FunctionEnd
+ 8(doubles(): 2 Function None 3
+ 9: Label
+ 39(doublev): 38(ptr) Variable Function
+ 43(dvec2v): 42(ptr) Variable Function
+ 48(dvec3v): 47(ptr) Variable Function
+ 53(dvec4v): 52(ptr) Variable Function
+ 428(boolv): 427(ptr) Variable Function
+ 437(bvec2v): 436(ptr) Variable Function
+ 446(bvec3v): 445(ptr) Variable Function
+ 455(bvec4v): 454(ptr) Variable Function
+ 554: 427(ptr) Variable Function
+ 563: 436(ptr) Variable Function
+ 572: 445(ptr) Variable Function
+ 581: 454(ptr) Variable Function
+ 737(dmat2v): 736(ptr) Variable Function
+ 743(dmat3v): 742(ptr) Variable Function
+ 749(dmat4v): 748(ptr) Variable Function
+ 755(dmat2x3v): 754(ptr) Variable Function
+ 761(dmat3x2v): 760(ptr) Variable Function
+ 767(dmat2x4v): 766(ptr) Variable Function
+ 773(dmat4x2v): 772(ptr) Variable Function
+ 779(dmat3x4v): 778(ptr) Variable Function
+ 785(dmat4x3v): 784(ptr) Variable Function
+ Store 39(doublev) 40
+ Store 43(dvec2v) 45
+ Store 48(dvec3v) 50
+ 54: 37(float) Load 39(doublev)
+ 55: 51(fvec4) CompositeConstruct 54 54 54 54
+ 56: 51(fvec4) ExtInst 1(GLSL.std.450) 31(Sqrt) 55
+ Store 53(dvec4v) 56
+ 57: 37(float) Load 39(doublev)
+ 58: 37(float) ExtInst 1(GLSL.std.450) 32(InverseSqrt) 57
+ 59: 37(float) Load 39(doublev)
+ 60: 37(float) FAdd 59 58
+ Store 39(doublev) 60
+ 61: 41(fvec2) Load 43(dvec2v)
+ 62: 41(fvec2) ExtInst 1(GLSL.std.450) 32(InverseSqrt) 61
+ 63: 41(fvec2) Load 43(dvec2v)
+ 64: 41(fvec2) FAdd 63 62
+ Store 43(dvec2v) 64
+ 65: 46(fvec3) Load 48(dvec3v)
+ 66: 46(fvec3) ExtInst 1(GLSL.std.450) 32(InverseSqrt) 65
+ 67: 46(fvec3) Load 48(dvec3v)
+ 68: 46(fvec3) FAdd 67 66
+ Store 48(dvec3v) 68
+ 69: 51(fvec4) Load 53(dvec4v)
+ 70: 51(fvec4) ExtInst 1(GLSL.std.450) 32(InverseSqrt) 69
+ 71: 51(fvec4) Load 53(dvec4v)
+ 72: 51(fvec4) FAdd 71 70
+ Store 53(dvec4v) 72
+ 73: 37(float) Load 39(doublev)
+ 74: 37(float) ExtInst 1(GLSL.std.450) 4(FAbs) 73
+ 75: 37(float) Load 39(doublev)
+ 76: 37(float) FAdd 75 74
+ Store 39(doublev) 76
+ 77: 41(fvec2) Load 43(dvec2v)
+ 78: 41(fvec2) ExtInst 1(GLSL.std.450) 4(FAbs) 77
+ 79: 41(fvec2) Load 43(dvec2v)
+ 80: 41(fvec2) FAdd 79 78
+ Store 43(dvec2v) 80
+ 81: 46(fvec3) Load 48(dvec3v)
+ 82: 46(fvec3) ExtInst 1(GLSL.std.450) 4(FAbs) 81
+ 83: 46(fvec3) Load 48(dvec3v)
+ 84: 46(fvec3) FAdd 83 82
+ Store 48(dvec3v) 84
+ 85: 51(fvec4) Load 53(dvec4v)
+ 86: 51(fvec4) ExtInst 1(GLSL.std.450) 4(FAbs) 85
+ 87: 51(fvec4) Load 53(dvec4v)
+ 88: 51(fvec4) FAdd 87 86
+ Store 53(dvec4v) 88
+ 89: 37(float) Load 39(doublev)
+ 90: 37(float) ExtInst 1(GLSL.std.450) 6(FSign) 89
+ 91: 37(float) Load 39(doublev)
+ 92: 37(float) FAdd 91 90
+ Store 39(doublev) 92
+ 93: 41(fvec2) Load 43(dvec2v)
+ 94: 41(fvec2) ExtInst 1(GLSL.std.450) 6(FSign) 93
+ 95: 41(fvec2) Load 43(dvec2v)
+ 96: 41(fvec2) FAdd 95 94
+ Store 43(dvec2v) 96
+ 97: 46(fvec3) Load 48(dvec3v)
+ 98: 46(fvec3) ExtInst 1(GLSL.std.450) 6(FSign) 97
+ 99: 46(fvec3) Load 48(dvec3v)
+ 100: 46(fvec3) FAdd 99 98
+ Store 48(dvec3v) 100
+ 101: 51(fvec4) Load 53(dvec4v)
+ 102: 51(fvec4) ExtInst 1(GLSL.std.450) 6(FSign) 101
+ 103: 51(fvec4) Load 53(dvec4v)
+ 104: 51(fvec4) FAdd 103 102
+ Store 53(dvec4v) 104
+ 105: 37(float) Load 39(doublev)
+ 106: 37(float) ExtInst 1(GLSL.std.450) 8(Floor) 105
+ 107: 37(float) Load 39(doublev)
+ 108: 37(float) FAdd 107 106
+ Store 39(doublev) 108
+ 109: 41(fvec2) Load 43(dvec2v)
+ 110: 41(fvec2) ExtInst 1(GLSL.std.450) 8(Floor) 109
+ 111: 41(fvec2) Load 43(dvec2v)
+ 112: 41(fvec2) FAdd 111 110
+ Store 43(dvec2v) 112
+ 113: 46(fvec3) Load 48(dvec3v)
+ 114: 46(fvec3) ExtInst 1(GLSL.std.450) 8(Floor) 113
+ 115: 46(fvec3) Load 48(dvec3v)
+ 116: 46(fvec3) FAdd 115 114
+ Store 48(dvec3v) 116
+ 117: 51(fvec4) Load 53(dvec4v)
+ 118: 51(fvec4) ExtInst 1(GLSL.std.450) 8(Floor) 117
+ 119: 51(fvec4) Load 53(dvec4v)
+ 120: 51(fvec4) FAdd 119 118
+ Store 53(dvec4v) 120
+ 121: 37(float) Load 39(doublev)
+ 122: 37(float) ExtInst 1(GLSL.std.450) 3(Trunc) 121
+ 123: 37(float) Load 39(doublev)
+ 124: 37(float) FAdd 123 122
+ Store 39(doublev) 124
+ 125: 41(fvec2) Load 43(dvec2v)
+ 126: 41(fvec2) ExtInst 1(GLSL.std.450) 3(Trunc) 125
+ 127: 41(fvec2) Load 43(dvec2v)
+ 128: 41(fvec2) FAdd 127 126
+ Store 43(dvec2v) 128
+ 129: 46(fvec3) Load 48(dvec3v)
+ 130: 46(fvec3) ExtInst 1(GLSL.std.450) 3(Trunc) 129
+ 131: 46(fvec3) Load 48(dvec3v)
+ 132: 46(fvec3) FAdd 131 130
+ Store 48(dvec3v) 132
+ 133: 51(fvec4) Load 53(dvec4v)
+ 134: 51(fvec4) ExtInst 1(GLSL.std.450) 3(Trunc) 133
+ 135: 51(fvec4) Load 53(dvec4v)
+ 136: 51(fvec4) FAdd 135 134
+ Store 53(dvec4v) 136
+ 137: 37(float) Load 39(doublev)
+ 138: 37(float) ExtInst 1(GLSL.std.450) 1(Round) 137
+ 139: 37(float) Load 39(doublev)
+ 140: 37(float) FAdd 139 138
+ Store 39(doublev) 140
+ 141: 41(fvec2) Load 43(dvec2v)
+ 142: 41(fvec2) ExtInst 1(GLSL.std.450) 1(Round) 141
+ 143: 41(fvec2) Load 43(dvec2v)
+ 144: 41(fvec2) FAdd 143 142
+ Store 43(dvec2v) 144
+ 145: 46(fvec3) Load 48(dvec3v)
+ 146: 46(fvec3) ExtInst 1(GLSL.std.450) 1(Round) 145
+ 147: 46(fvec3) Load 48(dvec3v)
+ 148: 46(fvec3) FAdd 147 146
+ Store 48(dvec3v) 148
+ 149: 51(fvec4) Load 53(dvec4v)
+ 150: 51(fvec4) ExtInst 1(GLSL.std.450) 1(Round) 149
+ 151: 51(fvec4) Load 53(dvec4v)
+ 152: 51(fvec4) FAdd 151 150
+ Store 53(dvec4v) 152
+ 153: 37(float) Load 39(doublev)
+ 154: 37(float) ExtInst 1(GLSL.std.450) 2(RoundEven) 153
+ 155: 37(float) Load 39(doublev)
+ 156: 37(float) FAdd 155 154
+ Store 39(doublev) 156
+ 157: 41(fvec2) Load 43(dvec2v)
+ 158: 41(fvec2) ExtInst 1(GLSL.std.450) 2(RoundEven) 157
+ 159: 41(fvec2) Load 43(dvec2v)
+ 160: 41(fvec2) FAdd 159 158
+ Store 43(dvec2v) 160
+ 161: 46(fvec3) Load 48(dvec3v)
+ 162: 46(fvec3) ExtInst 1(GLSL.std.450) 2(RoundEven) 161
+ 163: 46(fvec3) Load 48(dvec3v)
+ 164: 46(fvec3) FAdd 163 162
+ Store 48(dvec3v) 164
+ 165: 51(fvec4) Load 53(dvec4v)
+ 166: 51(fvec4) ExtInst 1(GLSL.std.450) 2(RoundEven) 165
+ 167: 51(fvec4) Load 53(dvec4v)
+ 168: 51(fvec4) FAdd 167 166
+ Store 53(dvec4v) 168
+ 169: 37(float) Load 39(doublev)
+ 170: 37(float) ExtInst 1(GLSL.std.450) 9(Ceil) 169
+ 171: 37(float) Load 39(doublev)
+ 172: 37(float) FAdd 171 170
+ Store 39(doublev) 172
+ 173: 41(fvec2) Load 43(dvec2v)
+ 174: 41(fvec2) ExtInst 1(GLSL.std.450) 9(Ceil) 173
+ 175: 41(fvec2) Load 43(dvec2v)
+ 176: 41(fvec2) FAdd 175 174
+ Store 43(dvec2v) 176
+ 177: 46(fvec3) Load 48(dvec3v)
+ 178: 46(fvec3) ExtInst 1(GLSL.std.450) 9(Ceil) 177
+ 179: 46(fvec3) Load 48(dvec3v)
+ 180: 46(fvec3) FAdd 179 178
+ Store 48(dvec3v) 180
+ 181: 51(fvec4) Load 53(dvec4v)
+ 182: 51(fvec4) ExtInst 1(GLSL.std.450) 9(Ceil) 181
+ 183: 51(fvec4) Load 53(dvec4v)
+ 184: 51(fvec4) FAdd 183 182
+ Store 53(dvec4v) 184
+ 185: 37(float) Load 39(doublev)
+ 186: 37(float) ExtInst 1(GLSL.std.450) 10(Fract) 185
+ 187: 37(float) Load 39(doublev)
+ 188: 37(float) FAdd 187 186
+ Store 39(doublev) 188
+ 189: 41(fvec2) Load 43(dvec2v)
+ 190: 41(fvec2) ExtInst 1(GLSL.std.450) 10(Fract) 189
+ 191: 41(fvec2) Load 43(dvec2v)
+ 192: 41(fvec2) FAdd 191 190
+ Store 43(dvec2v) 192
+ 193: 46(fvec3) Load 48(dvec3v)
+ 194: 46(fvec3) ExtInst 1(GLSL.std.450) 10(Fract) 193
+ 195: 46(fvec3) Load 48(dvec3v)
+ 196: 46(fvec3) FAdd 195 194
+ Store 48(dvec3v) 196
+ 197: 51(fvec4) Load 53(dvec4v)
+ 198: 51(fvec4) ExtInst 1(GLSL.std.450) 10(Fract) 197
+ 199: 51(fvec4) Load 53(dvec4v)
+ 200: 51(fvec4) FAdd 199 198
+ Store 53(dvec4v) 200
+ 201: 37(float) Load 39(doublev)
+ 202: 37(float) Load 39(doublev)
+ 203: 37(float) FMod 201 202
+ 204: 37(float) Load 39(doublev)
+ 205: 37(float) FAdd 204 203
+ Store 39(doublev) 205
+ 206: 41(fvec2) Load 43(dvec2v)
+ 207: 37(float) Load 39(doublev)
+ 208: 41(fvec2) CompositeConstruct 207 207
+ 209: 41(fvec2) FMod 206 208
+ 210: 41(fvec2) Load 43(dvec2v)
+ 211: 41(fvec2) FAdd 210 209
+ Store 43(dvec2v) 211
+ 212: 46(fvec3) Load 48(dvec3v)
+ 213: 37(float) Load 39(doublev)
+ 214: 46(fvec3) CompositeConstruct 213 213 213
+ 215: 46(fvec3) FMod 212 214
+ 216: 46(fvec3) Load 48(dvec3v)
+ 217: 46(fvec3) FAdd 216 215
+ Store 48(dvec3v) 217
+ 218: 51(fvec4) Load 53(dvec4v)
+ 219: 37(float) Load 39(doublev)
+ 220: 51(fvec4) CompositeConstruct 219 219 219 219
+ 221: 51(fvec4) FMod 218 220
+ 222: 51(fvec4) Load 53(dvec4v)
+ 223: 51(fvec4) FAdd 222 221
+ Store 53(dvec4v) 223
+ 224: 41(fvec2) Load 43(dvec2v)
+ 225: 41(fvec2) Load 43(dvec2v)
+ 226: 41(fvec2) FMod 224 225
+ 227: 41(fvec2) Load 43(dvec2v)
+ 228: 41(fvec2) FAdd 227 226
+ Store 43(dvec2v) 228
+ 229: 46(fvec3) Load 48(dvec3v)
+ 230: 46(fvec3) Load 48(dvec3v)
+ 231: 46(fvec3) FMod 229 230
+ 232: 46(fvec3) Load 48(dvec3v)
+ 233: 46(fvec3) FAdd 232 231
+ Store 48(dvec3v) 233
+ 234: 51(fvec4) Load 53(dvec4v)
+ 235: 51(fvec4) Load 53(dvec4v)
+ 236: 51(fvec4) FMod 234 235
+ 237: 51(fvec4) Load 53(dvec4v)
+ 238: 51(fvec4) FAdd 237 236
+ Store 53(dvec4v) 238
+ 239: 37(float) Load 39(doublev)
+ 240: 37(float) ExtInst 1(GLSL.std.450) 35(Modf) 239 39(doublev)
+ 241: 37(float) Load 39(doublev)
+ 242: 37(float) FAdd 241 240
+ Store 39(doublev) 242
+ 243: 41(fvec2) Load 43(dvec2v)
+ 244: 41(fvec2) ExtInst 1(GLSL.std.450) 35(Modf) 243 43(dvec2v)
+ 245: 41(fvec2) Load 43(dvec2v)
+ 246: 41(fvec2) FAdd 245 244
+ Store 43(dvec2v) 246
+ 247: 46(fvec3) Load 48(dvec3v)
+ 248: 46(fvec3) ExtInst 1(GLSL.std.450) 35(Modf) 247 48(dvec3v)
+ 249: 46(fvec3) Load 48(dvec3v)
+ 250: 46(fvec3) FAdd 249 248
+ Store 48(dvec3v) 250
+ 251: 51(fvec4) Load 53(dvec4v)
+ 252: 51(fvec4) ExtInst 1(GLSL.std.450) 35(Modf) 251 53(dvec4v)
+ 253: 51(fvec4) Load 53(dvec4v)
+ 254: 51(fvec4) FAdd 253 252
+ Store 53(dvec4v) 254
+ 255: 37(float) Load 39(doublev)
+ 256: 37(float) Load 39(doublev)
+ 257: 37(float) ExtInst 1(GLSL.std.450) 37(FMin) 255 256
+ 258: 37(float) Load 39(doublev)
+ 259: 37(float) FAdd 258 257
+ Store 39(doublev) 259
+ 260: 41(fvec2) Load 43(dvec2v)
+ 261: 37(float) Load 39(doublev)
+ 262: 41(fvec2) CompositeConstruct 261 261
+ 263: 41(fvec2) ExtInst 1(GLSL.std.450) 37(FMin) 260 262
+ 264: 41(fvec2) Load 43(dvec2v)
+ 265: 41(fvec2) FAdd 264 263
+ Store 43(dvec2v) 265
+ 266: 46(fvec3) Load 48(dvec3v)
+ 267: 37(float) Load 39(doublev)
+ 268: 46(fvec3) CompositeConstruct 267 267 267
+ 269: 46(fvec3) ExtInst 1(GLSL.std.450) 37(FMin) 266 268
+ 270: 46(fvec3) Load 48(dvec3v)
+ 271: 46(fvec3) FAdd 270 269
+ Store 48(dvec3v) 271
+ 272: 51(fvec4) Load 53(dvec4v)
+ 273: 37(float) Load 39(doublev)
+ 274: 51(fvec4) CompositeConstruct 273 273 273 273
+ 275: 51(fvec4) ExtInst 1(GLSL.std.450) 37(FMin) 272 274
+ 276: 51(fvec4) Load 53(dvec4v)
+ 277: 51(fvec4) FAdd 276 275
+ Store 53(dvec4v) 277
+ 278: 41(fvec2) Load 43(dvec2v)
+ 279: 41(fvec2) Load 43(dvec2v)
+ 280: 41(fvec2) ExtInst 1(GLSL.std.450) 37(FMin) 278 279
+ 281: 41(fvec2) Load 43(dvec2v)
+ 282: 41(fvec2) FAdd 281 280
+ Store 43(dvec2v) 282
+ 283: 46(fvec3) Load 48(dvec3v)
+ 284: 46(fvec3) Load 48(dvec3v)
+ 285: 46(fvec3) ExtInst 1(GLSL.std.450) 37(FMin) 283 284
+ 286: 46(fvec3) Load 48(dvec3v)
+ 287: 46(fvec3) FAdd 286 285
+ Store 48(dvec3v) 287
+ 288: 51(fvec4) Load 53(dvec4v)
+ 289: 51(fvec4) Load 53(dvec4v)
+ 290: 51(fvec4) ExtInst 1(GLSL.std.450) 37(FMin) 288 289
+ 291: 51(fvec4) Load 53(dvec4v)
+ 292: 51(fvec4) FAdd 291 290
+ Store 53(dvec4v) 292
+ 293: 37(float) Load 39(doublev)
+ 294: 37(float) Load 39(doublev)
+ 295: 37(float) ExtInst 1(GLSL.std.450) 40(FMax) 293 294
+ 296: 37(float) Load 39(doublev)
+ 297: 37(float) FAdd 296 295
+ Store 39(doublev) 297
+ 298: 41(fvec2) Load 43(dvec2v)
+ 299: 37(float) Load 39(doublev)
+ 300: 41(fvec2) CompositeConstruct 299 299
+ 301: 41(fvec2) ExtInst 1(GLSL.std.450) 40(FMax) 298 300
+ 302: 41(fvec2) Load 43(dvec2v)
+ 303: 41(fvec2) FAdd 302 301
+ Store 43(dvec2v) 303
+ 304: 46(fvec3) Load 48(dvec3v)
+ 305: 37(float) Load 39(doublev)
+ 306: 46(fvec3) CompositeConstruct 305 305 305
+ 307: 46(fvec3) ExtInst 1(GLSL.std.450) 40(FMax) 304 306
+ 308: 46(fvec3) Load 48(dvec3v)
+ 309: 46(fvec3) FAdd 308 307
+ Store 48(dvec3v) 309
+ 310: 51(fvec4) Load 53(dvec4v)
+ 311: 37(float) Load 39(doublev)
+ 312: 51(fvec4) CompositeConstruct 311 311 311 311
+ 313: 51(fvec4) ExtInst 1(GLSL.std.450) 40(FMax) 310 312
+ 314: 51(fvec4) Load 53(dvec4v)
+ 315: 51(fvec4) FAdd 314 313
+ Store 53(dvec4v) 315
+ 316: 41(fvec2) Load 43(dvec2v)
+ 317: 41(fvec2) Load 43(dvec2v)
+ 318: 41(fvec2) ExtInst 1(GLSL.std.450) 40(FMax) 316 317
+ 319: 41(fvec2) Load 43(dvec2v)
+ 320: 41(fvec2) FAdd 319 318
+ Store 43(dvec2v) 320
+ 321: 46(fvec3) Load 48(dvec3v)
+ 322: 46(fvec3) Load 48(dvec3v)
+ 323: 46(fvec3) ExtInst 1(GLSL.std.450) 40(FMax) 321 322
+ 324: 46(fvec3) Load 48(dvec3v)
+ 325: 46(fvec3) FAdd 324 323
+ Store 48(dvec3v) 325
+ 326: 51(fvec4) Load 53(dvec4v)
+ 327: 51(fvec4) Load 53(dvec4v)
+ 328: 51(fvec4) ExtInst 1(GLSL.std.450) 40(FMax) 326 327
+ 329: 51(fvec4) Load 53(dvec4v)
+ 330: 51(fvec4) FAdd 329 328
+ Store 53(dvec4v) 330
+ 331: 37(float) Load 39(doublev)
+ 332: 37(float) Load 39(doublev)
+ 333: 37(float) Load 39(doublev)
+ 334: 37(float) ExtInst 1(GLSL.std.450) 43(FClamp) 331 332 333
+ 335: 37(float) Load 39(doublev)
+ 336: 37(float) FAdd 335 334
+ Store 39(doublev) 336
+ 337: 41(fvec2) Load 43(dvec2v)
+ 338: 37(float) Load 39(doublev)
+ 339: 37(float) Load 39(doublev)
+ 340: 41(fvec2) CompositeConstruct 338 338
+ 341: 41(fvec2) CompositeConstruct 339 339
+ 342: 41(fvec2) ExtInst 1(GLSL.std.450) 43(FClamp) 337 340 341
+ 343: 41(fvec2) Load 43(dvec2v)
+ 344: 41(fvec2) FAdd 343 342
+ Store 43(dvec2v) 344
+ 345: 46(fvec3) Load 48(dvec3v)
+ 346: 37(float) Load 39(doublev)
+ 347: 37(float) Load 39(doublev)
+ 348: 46(fvec3) CompositeConstruct 346 346 346
+ 349: 46(fvec3) CompositeConstruct 347 347 347
+ 350: 46(fvec3) ExtInst 1(GLSL.std.450) 43(FClamp) 345 348 349
+ 351: 46(fvec3) Load 48(dvec3v)
+ 352: 46(fvec3) FAdd 351 350
+ Store 48(dvec3v) 352
+ 353: 51(fvec4) Load 53(dvec4v)
+ 354: 37(float) Load 39(doublev)
+ 355: 37(float) Load 39(doublev)
+ 356: 51(fvec4) CompositeConstruct 354 354 354 354
+ 357: 51(fvec4) CompositeConstruct 355 355 355 355
+ 358: 51(fvec4) ExtInst 1(GLSL.std.450) 43(FClamp) 353 356 357
+ 359: 51(fvec4) Load 53(dvec4v)
+ 360: 51(fvec4) FAdd 359 358
+ Store 53(dvec4v) 360
+ 361: 41(fvec2) Load 43(dvec2v)
+ 362: 41(fvec2) Load 43(dvec2v)
+ 363: 41(fvec2) Load 43(dvec2v)
+ 364: 41(fvec2) ExtInst 1(GLSL.std.450) 43(FClamp) 361 362 363
+ 365: 41(fvec2) Load 43(dvec2v)
+ 366: 41(fvec2) FAdd 365 364
+ Store 43(dvec2v) 366
+ 367: 46(fvec3) Load 48(dvec3v)
+ 368: 46(fvec3) Load 48(dvec3v)
+ 369: 46(fvec3) Load 48(dvec3v)
+ 370: 46(fvec3) ExtInst 1(GLSL.std.450) 43(FClamp) 367 368 369
+ 371: 46(fvec3) Load 48(dvec3v)
+ 372: 46(fvec3) FAdd 371 370
+ Store 48(dvec3v) 372
+ 373: 51(fvec4) Load 53(dvec4v)
+ 374: 51(fvec4) Load 53(dvec4v)
+ 375: 51(fvec4) Load 53(dvec4v)
+ 376: 51(fvec4) ExtInst 1(GLSL.std.450) 43(FClamp) 373 374 375
+ 377: 51(fvec4) Load 53(dvec4v)
+ 378: 51(fvec4) FAdd 377 376
+ Store 53(dvec4v) 378
+ 379: 37(float) Load 39(doublev)
+ 380: 37(float) Load 39(doublev)
+ 381: 37(float) Load 39(doublev)
+ 382: 37(float) ExtInst 1(GLSL.std.450) 46(FMix) 379 380 381
+ 383: 37(float) Load 39(doublev)
+ 384: 37(float) FAdd 383 382
+ Store 39(doublev) 384
+ 385: 41(fvec2) Load 43(dvec2v)
+ 386: 41(fvec2) Load 43(dvec2v)
+ 387: 37(float) Load 39(doublev)
+ 388: 41(fvec2) CompositeConstruct 387 387
+ 389: 41(fvec2) ExtInst 1(GLSL.std.450) 46(FMix) 385 386 388
+ 390: 41(fvec2) Load 43(dvec2v)
+ 391: 41(fvec2) FAdd 390 389
+ Store 43(dvec2v) 391
+ 392: 46(fvec3) Load 48(dvec3v)
+ 393: 46(fvec3) Load 48(dvec3v)
+ 394: 37(float) Load 39(doublev)
+ 395: 46(fvec3) CompositeConstruct 394 394 394
+ 396: 46(fvec3) ExtInst 1(GLSL.std.450) 46(FMix) 392 393 395
+ 397: 46(fvec3) Load 48(dvec3v)
+ 398: 46(fvec3) FAdd 397 396
+ Store 48(dvec3v) 398
+ 399: 51(fvec4) Load 53(dvec4v)
+ 400: 51(fvec4) Load 53(dvec4v)
+ 401: 37(float) Load 39(doublev)
+ 402: 51(fvec4) CompositeConstruct 401 401 401 401
+ 403: 51(fvec4) ExtInst 1(GLSL.std.450) 46(FMix) 399 400 402
+ 404: 51(fvec4) Load 53(dvec4v)
+ 405: 51(fvec4) FAdd 404 403
+ Store 53(dvec4v) 405
+ 406: 41(fvec2) Load 43(dvec2v)
+ 407: 41(fvec2) Load 43(dvec2v)
+ 408: 41(fvec2) Load 43(dvec2v)
+ 409: 41(fvec2) ExtInst 1(GLSL.std.450) 46(FMix) 406 407 408
+ 410: 41(fvec2) Load 43(dvec2v)
+ 411: 41(fvec2) FAdd 410 409
+ Store 43(dvec2v) 411
+ 412: 46(fvec3) Load 48(dvec3v)
+ 413: 46(fvec3) Load 48(dvec3v)
+ 414: 46(fvec3) Load 48(dvec3v)
+ 415: 46(fvec3) ExtInst 1(GLSL.std.450) 46(FMix) 412 413 414
+ 416: 46(fvec3) Load 48(dvec3v)
+ 417: 46(fvec3) FAdd 416 415
+ Store 48(dvec3v) 417
+ 418: 51(fvec4) Load 53(dvec4v)
+ 419: 51(fvec4) Load 53(dvec4v)
+ 420: 51(fvec4) Load 53(dvec4v)
+ 421: 51(fvec4) ExtInst 1(GLSL.std.450) 46(FMix) 418 419 420
+ 422: 51(fvec4) Load 53(dvec4v)
+ 423: 51(fvec4) FAdd 422 421
+ Store 53(dvec4v) 423
+ 424: 37(float) Load 39(doublev)
+ 425: 37(float) Load 39(doublev)
+ 429: 426(bool) Load 428(boolv)
+ 430: 37(float) Select 429 425 424
+ 431: 37(float) Load 39(doublev)
+ 432: 37(float) FAdd 431 430
+ Store 39(doublev) 432
+ 433: 41(fvec2) Load 43(dvec2v)
+ 434: 41(fvec2) Load 43(dvec2v)
+ 438: 435(bvec2) Load 437(bvec2v)
+ 439: 41(fvec2) Select 438 434 433
+ 440: 41(fvec2) Load 43(dvec2v)
+ 441: 41(fvec2) FAdd 440 439
+ Store 43(dvec2v) 441
+ 442: 46(fvec3) Load 48(dvec3v)
+ 443: 46(fvec3) Load 48(dvec3v)
+ 447: 444(bvec3) Load 446(bvec3v)
+ 448: 46(fvec3) Select 447 443 442
+ 449: 46(fvec3) Load 48(dvec3v)
+ 450: 46(fvec3) FAdd 449 448
+ Store 48(dvec3v) 450
+ 451: 51(fvec4) Load 53(dvec4v)
+ 452: 51(fvec4) Load 53(dvec4v)
+ 456: 453(bvec4) Load 455(bvec4v)
+ 457: 51(fvec4) Select 456 452 451
+ 458: 51(fvec4) Load 53(dvec4v)
+ 459: 51(fvec4) FAdd 458 457
+ Store 53(dvec4v) 459
+ 460: 37(float) Load 39(doublev)
+ 461: 37(float) Load 39(doublev)
+ 462: 37(float) ExtInst 1(GLSL.std.450) 48(Step) 460 461
+ 463: 37(float) Load 39(doublev)
+ 464: 37(float) FAdd 463 462
+ Store 39(doublev) 464
+ 465: 41(fvec2) Load 43(dvec2v)
+ 466: 41(fvec2) Load 43(dvec2v)
+ 467: 41(fvec2) ExtInst 1(GLSL.std.450) 48(Step) 465 466
+ 468: 41(fvec2) Load 43(dvec2v)
+ 469: 41(fvec2) FAdd 468 467
+ Store 43(dvec2v) 469
+ 470: 46(fvec3) Load 48(dvec3v)
+ 471: 46(fvec3) Load 48(dvec3v)
+ 472: 46(fvec3) ExtInst 1(GLSL.std.450) 48(Step) 470 471
+ 473: 46(fvec3) Load 48(dvec3v)
+ 474: 46(fvec3) FAdd 473 472
+ Store 48(dvec3v) 474
+ 475: 51(fvec4) Load 53(dvec4v)
+ 476: 51(fvec4) Load 53(dvec4v)
+ 477: 51(fvec4) ExtInst 1(GLSL.std.450) 48(Step) 475 476
+ 478: 51(fvec4) Load 53(dvec4v)
+ 479: 51(fvec4) FAdd 478 477
+ Store 53(dvec4v) 479
+ 480: 37(float) Load 39(doublev)
+ 481: 41(fvec2) Load 43(dvec2v)
+ 482: 41(fvec2) CompositeConstruct 480 480
+ 483: 41(fvec2) ExtInst 1(GLSL.std.450) 48(Step) 482 481
+ 484: 41(fvec2) Load 43(dvec2v)
+ 485: 41(fvec2) FAdd 484 483
+ Store 43(dvec2v) 485
+ 486: 37(float) Load 39(doublev)
+ 487: 46(fvec3) Load 48(dvec3v)
+ 488: 46(fvec3) CompositeConstruct 486 486 486
+ 489: 46(fvec3) ExtInst 1(GLSL.std.450) 48(Step) 488 487
+ 490: 46(fvec3) Load 48(dvec3v)
+ 491: 46(fvec3) FAdd 490 489
+ Store 48(dvec3v) 491
+ 492: 37(float) Load 39(doublev)
+ 493: 51(fvec4) Load 53(dvec4v)
+ 494: 51(fvec4) CompositeConstruct 492 492 492 492
+ 495: 51(fvec4) ExtInst 1(GLSL.std.450) 48(Step) 494 493
+ 496: 51(fvec4) Load 53(dvec4v)
+ 497: 51(fvec4) FAdd 496 495
+ Store 53(dvec4v) 497
+ 498: 37(float) Load 39(doublev)
+ 499: 37(float) Load 39(doublev)
+ 500: 37(float) Load 39(doublev)
+ 501: 37(float) ExtInst 1(GLSL.std.450) 49(SmoothStep) 498 499 500
+ 502: 37(float) Load 39(doublev)
+ 503: 37(float) FAdd 502 501
+ Store 39(doublev) 503
+ 504: 41(fvec2) Load 43(dvec2v)
+ 505: 41(fvec2) Load 43(dvec2v)
+ 506: 41(fvec2) Load 43(dvec2v)
+ 507: 41(fvec2) ExtInst 1(GLSL.std.450) 49(SmoothStep) 504 505 506
+ 508: 41(fvec2) Load 43(dvec2v)
+ 509: 41(fvec2) FAdd 508 507
+ Store 43(dvec2v) 509
+ 510: 46(fvec3) Load 48(dvec3v)
+ 511: 46(fvec3) Load 48(dvec3v)
+ 512: 46(fvec3) Load 48(dvec3v)
+ 513: 46(fvec3) ExtInst 1(GLSL.std.450) 49(SmoothStep) 510 511 512
+ 514: 46(fvec3) Load 48(dvec3v)
+ 515: 46(fvec3) FAdd 514 513
+ Store 48(dvec3v) 515
+ 516: 51(fvec4) Load 53(dvec4v)
+ 517: 51(fvec4) Load 53(dvec4v)
+ 518: 51(fvec4) Load 53(dvec4v)
+ 519: 51(fvec4) ExtInst 1(GLSL.std.450) 49(SmoothStep) 516 517 518
+ 520: 51(fvec4) Load 53(dvec4v)
+ 521: 51(fvec4) FAdd 520 519
+ Store 53(dvec4v) 521
+ 522: 37(float) Load 39(doublev)
+ 523: 37(float) Load 39(doublev)
+ 524: 41(fvec2) Load 43(dvec2v)
+ 525: 41(fvec2) CompositeConstruct 522 522
+ 526: 41(fvec2) CompositeConstruct 523 523
+ 527: 41(fvec2) ExtInst 1(GLSL.std.450) 49(SmoothStep) 525 526 524
+ 528: 41(fvec2) Load 43(dvec2v)
+ 529: 41(fvec2) FAdd 528 527
+ Store 43(dvec2v) 529
+ 530: 37(float) Load 39(doublev)
+ 531: 37(float) Load 39(doublev)
+ 532: 46(fvec3) Load 48(dvec3v)
+ 533: 46(fvec3) CompositeConstruct 530 530 530
+ 534: 46(fvec3) CompositeConstruct 531 531 531
+ 535: 46(fvec3) ExtInst 1(GLSL.std.450) 49(SmoothStep) 533 534 532
+ 536: 46(fvec3) Load 48(dvec3v)
+ 537: 46(fvec3) FAdd 536 535
+ Store 48(dvec3v) 537
+ 538: 37(float) Load 39(doublev)
+ 539: 37(float) Load 39(doublev)
+ 540: 51(fvec4) Load 53(dvec4v)
+ 541: 51(fvec4) CompositeConstruct 538 538 538 538
+ 542: 51(fvec4) CompositeConstruct 539 539 539 539
+ 543: 51(fvec4) ExtInst 1(GLSL.std.450) 49(SmoothStep) 541 542 540
+ 544: 51(fvec4) Load 53(dvec4v)
+ 545: 51(fvec4) FAdd 544 543
+ Store 53(dvec4v) 545
+ 546: 37(float) Load 39(doublev)
+ 547: 426(bool) IsNan 546
+ Store 428(boolv) 547
+ 548: 41(fvec2) Load 43(dvec2v)
+ 549: 435(bvec2) IsNan 548
+ Store 437(bvec2v) 549
+ 550: 46(fvec3) Load 48(dvec3v)
+ 551: 444(bvec3) IsNan 550
+ Store 446(bvec3v) 551
+ 552: 51(fvec4) Load 53(dvec4v)
+ 553: 453(bvec4) IsNan 552
+ Store 455(bvec4v) 553
+ 555: 426(bool) Load 428(boolv)
+ SelectionMerge 557 None
+ BranchConditional 555 556 560
+ 556: Label
+ 558: 37(float) Load 39(doublev)
+ 559: 426(bool) IsInf 558
+ Store 554 559
+ Branch 557
+ 560: Label
+ Store 554 561
+ Branch 557
+ 557: Label
+ 562: 426(bool) Load 554
+ Store 428(boolv) 562
+ 564: 426(bool) Load 428(boolv)
+ SelectionMerge 566 None
+ BranchConditional 564 565 569
+ 565: Label
+ 567: 41(fvec2) Load 43(dvec2v)
+ 568: 435(bvec2) IsInf 567
+ Store 563 568
+ Branch 566
+ 569: Label
+ Store 563 570
+ Branch 566
+ 566: Label
+ 571: 435(bvec2) Load 563
+ Store 437(bvec2v) 571
+ 573: 426(bool) Load 428(boolv)
+ SelectionMerge 575 None
+ BranchConditional 573 574 578
+ 574: Label
+ 576: 46(fvec3) Load 48(dvec3v)
+ 577: 444(bvec3) IsInf 576
+ Store 572 577
+ Branch 575
+ 578: Label
+ Store 572 579
+ Branch 575
+ 575: Label
+ 580: 444(bvec3) Load 572
+ Store 446(bvec3v) 580
+ 582: 426(bool) Load 428(boolv)
+ SelectionMerge 584 None
+ BranchConditional 582 583 587
+ 583: Label
+ 585: 51(fvec4) Load 53(dvec4v)
+ 586: 453(bvec4) IsInf 585
+ Store 581 586
+ Branch 584
+ 587: Label
+ Store 581 588
+ Branch 584
+ 584: Label
+ 589: 453(bvec4) Load 581
+ Store 455(bvec4v) 589
+ 590: 37(float) Load 39(doublev)
+ 591: 37(float) ExtInst 1(GLSL.std.450) 66(Length) 590
+ 592: 37(float) Load 39(doublev)
+ 593: 37(float) FAdd 592 591
+ Store 39(doublev) 593
+ 594: 41(fvec2) Load 43(dvec2v)
+ 595: 37(float) ExtInst 1(GLSL.std.450) 66(Length) 594
+ 596: 37(float) Load 39(doublev)
+ 597: 37(float) FAdd 596 595
+ Store 39(doublev) 597
+ 598: 46(fvec3) Load 48(dvec3v)
+ 599: 37(float) ExtInst 1(GLSL.std.450) 66(Length) 598
+ 600: 37(float) Load 39(doublev)
+ 601: 37(float) FAdd 600 599
+ Store 39(doublev) 601
+ 602: 51(fvec4) Load 53(dvec4v)
+ 603: 37(float) ExtInst 1(GLSL.std.450) 66(Length) 602
+ 604: 37(float) Load 39(doublev)
+ 605: 37(float) FAdd 604 603
+ Store 39(doublev) 605
+ 606: 37(float) Load 39(doublev)
+ 607: 37(float) Load 39(doublev)
+ 608: 37(float) ExtInst 1(GLSL.std.450) 67(Distance) 606 607
+ 609: 37(float) Load 39(doublev)
+ 610: 37(float) FAdd 609 608
+ Store 39(doublev) 610
+ 611: 41(fvec2) Load 43(dvec2v)
+ 612: 41(fvec2) Load 43(dvec2v)
+ 613: 37(float) ExtInst 1(GLSL.std.450) 67(Distance) 611 612
+ 614: 37(float) Load 39(doublev)
+ 615: 37(float) FAdd 614 613
+ Store 39(doublev) 615
+ 616: 46(fvec3) Load 48(dvec3v)
+ 617: 46(fvec3) Load 48(dvec3v)
+ 618: 37(float) ExtInst 1(GLSL.std.450) 67(Distance) 616 617
+ 619: 37(float) Load 39(doublev)
+ 620: 37(float) FAdd 619 618
+ Store 39(doublev) 620
+ 621: 51(fvec4) Load 53(dvec4v)
+ 622: 51(fvec4) Load 53(dvec4v)
+ 623: 37(float) ExtInst 1(GLSL.std.450) 67(Distance) 621 622
+ 624: 37(float) Load 39(doublev)
+ 625: 37(float) FAdd 624 623
+ Store 39(doublev) 625
+ 626: 37(float) Load 39(doublev)
+ 627: 37(float) Load 39(doublev)
+ 628: 37(float) FMul 626 627
+ 629: 37(float) Load 39(doublev)
+ 630: 37(float) FAdd 629 628
+ Store 39(doublev) 630
+ 631: 41(fvec2) Load 43(dvec2v)
+ 632: 41(fvec2) Load 43(dvec2v)
+ 633: 37(float) Dot 631 632
+ 634: 37(float) Load 39(doublev)
+ 635: 37(float) FAdd 634 633
+ Store 39(doublev) 635
+ 636: 46(fvec3) Load 48(dvec3v)
+ 637: 46(fvec3) Load 48(dvec3v)
+ 638: 37(float) Dot 636 637
+ 639: 37(float) Load 39(doublev)
+ 640: 37(float) FAdd 639 638
+ Store 39(doublev) 640
+ 641: 51(fvec4) Load 53(dvec4v)
+ 642: 51(fvec4) Load 53(dvec4v)
+ 643: 37(float) Dot 641 642
+ 644: 37(float) Load 39(doublev)
+ 645: 37(float) FAdd 644 643
+ Store 39(doublev) 645
+ 646: 46(fvec3) Load 48(dvec3v)
+ 647: 46(fvec3) Load 48(dvec3v)
+ 648: 46(fvec3) ExtInst 1(GLSL.std.450) 68(Cross) 646 647
+ 649: 46(fvec3) Load 48(dvec3v)
+ 650: 46(fvec3) FAdd 649 648
+ Store 48(dvec3v) 650
+ 651: 37(float) Load 39(doublev)
+ 652: 37(float) ExtInst 1(GLSL.std.450) 69(Normalize) 651
+ 653: 37(float) Load 39(doublev)
+ 654: 37(float) FAdd 653 652
+ Store 39(doublev) 654
+ 655: 41(fvec2) Load 43(dvec2v)
+ 656: 41(fvec2) ExtInst 1(GLSL.std.450) 69(Normalize) 655
+ 657: 41(fvec2) Load 43(dvec2v)
+ 658: 41(fvec2) FAdd 657 656
+ Store 43(dvec2v) 658
+ 659: 46(fvec3) Load 48(dvec3v)
+ 660: 46(fvec3) ExtInst 1(GLSL.std.450) 69(Normalize) 659
+ 661: 46(fvec3) Load 48(dvec3v)
+ 662: 46(fvec3) FAdd 661 660
+ Store 48(dvec3v) 662
+ 663: 51(fvec4) Load 53(dvec4v)
+ 664: 51(fvec4) ExtInst 1(GLSL.std.450) 69(Normalize) 663
+ 665: 51(fvec4) Load 53(dvec4v)
+ 666: 51(fvec4) FAdd 665 664
+ Store 53(dvec4v) 666
+ 667: 37(float) Load 39(doublev)
+ 668: 37(float) Load 39(doublev)
+ 669: 37(float) Load 39(doublev)
+ 670: 37(float) ExtInst 1(GLSL.std.450) 70(FaceForward) 667 668 669
+ 671: 37(float) Load 39(doublev)
+ 672: 37(float) FAdd 671 670
+ Store 39(doublev) 672
+ 673: 41(fvec2) Load 43(dvec2v)
+ 674: 41(fvec2) Load 43(dvec2v)
+ 675: 41(fvec2) Load 43(dvec2v)
+ 676: 41(fvec2) ExtInst 1(GLSL.std.450) 70(FaceForward) 673 674 675
+ 677: 41(fvec2) Load 43(dvec2v)
+ 678: 41(fvec2) FAdd 677 676
+ Store 43(dvec2v) 678
+ 679: 46(fvec3) Load 48(dvec3v)
+ 680: 46(fvec3) Load 48(dvec3v)
+ 681: 46(fvec3) Load 48(dvec3v)
+ 682: 46(fvec3) ExtInst 1(GLSL.std.450) 70(FaceForward) 679 680 681
+ 683: 46(fvec3) Load 48(dvec3v)
+ 684: 46(fvec3) FAdd 683 682
+ Store 48(dvec3v) 684
+ 685: 51(fvec4) Load 53(dvec4v)
+ 686: 51(fvec4) Load 53(dvec4v)
+ 687: 51(fvec4) Load 53(dvec4v)
+ 688: 51(fvec4) ExtInst 1(GLSL.std.450) 70(FaceForward) 685 686 687
+ 689: 51(fvec4) Load 53(dvec4v)
+ 690: 51(fvec4) FAdd 689 688
+ Store 53(dvec4v) 690
+ 691: 37(float) Load 39(doublev)
+ 692: 37(float) Load 39(doublev)
+ 693: 37(float) ExtInst 1(GLSL.std.450) 71(Reflect) 691 692
+ 694: 37(float) Load 39(doublev)
+ 695: 37(float) FAdd 694 693
+ Store 39(doublev) 695
+ 696: 41(fvec2) Load 43(dvec2v)
+ 697: 41(fvec2) Load 43(dvec2v)
+ 698: 41(fvec2) ExtInst 1(GLSL.std.450) 71(Reflect) 696 697
+ 699: 41(fvec2) Load 43(dvec2v)
+ 700: 41(fvec2) FAdd 699 698
+ Store 43(dvec2v) 700
+ 701: 46(fvec3) Load 48(dvec3v)
+ 702: 46(fvec3) Load 48(dvec3v)
+ 703: 46(fvec3) ExtInst 1(GLSL.std.450) 71(Reflect) 701 702
+ 704: 46(fvec3) Load 48(dvec3v)
+ 705: 46(fvec3) FAdd 704 703
+ Store 48(dvec3v) 705
+ 706: 51(fvec4) Load 53(dvec4v)
+ 707: 51(fvec4) Load 53(dvec4v)
+ 708: 51(fvec4) ExtInst 1(GLSL.std.450) 71(Reflect) 706 707
+ 709: 51(fvec4) Load 53(dvec4v)
+ 710: 51(fvec4) FAdd 709 708
+ Store 53(dvec4v) 710
+ 711: 37(float) Load 39(doublev)
+ 712: 37(float) Load 39(doublev)
+ 713: 37(float) Load 39(doublev)
+ 714: 37(float) ExtInst 1(GLSL.std.450) 72(Refract) 711 712 713
+ 715: 37(float) Load 39(doublev)
+ 716: 37(float) FAdd 715 714
+ Store 39(doublev) 716
+ 717: 41(fvec2) Load 43(dvec2v)
+ 718: 41(fvec2) Load 43(dvec2v)
+ 719: 37(float) Load 39(doublev)
+ 720: 41(fvec2) ExtInst 1(GLSL.std.450) 72(Refract) 717 718 719
+ 721: 41(fvec2) Load 43(dvec2v)
+ 722: 41(fvec2) FAdd 721 720
+ Store 43(dvec2v) 722
+ 723: 46(fvec3) Load 48(dvec3v)
+ 724: 46(fvec3) Load 48(dvec3v)
+ 725: 37(float) Load 39(doublev)
+ 726: 46(fvec3) ExtInst 1(GLSL.std.450) 72(Refract) 723 724 725
+ 727: 46(fvec3) Load 48(dvec3v)
+ 728: 46(fvec3) FAdd 727 726
+ Store 48(dvec3v) 728
+ 729: 51(fvec4) Load 53(dvec4v)
+ 730: 51(fvec4) Load 53(dvec4v)
+ 731: 37(float) Load 39(doublev)
+ 732: 51(fvec4) ExtInst 1(GLSL.std.450) 72(Refract) 729 730 731
+ 733: 51(fvec4) Load 53(dvec4v)
+ 734: 51(fvec4) FAdd 733 732
+ Store 53(dvec4v) 734
+ 738: 41(fvec2) Load 43(dvec2v)
+ 739: 41(fvec2) Load 43(dvec2v)
+ 740: 735 OuterProduct 738 739
+ Store 737(dmat2v) 740
+ 744: 46(fvec3) Load 48(dvec3v)
+ 745: 46(fvec3) Load 48(dvec3v)
+ 746: 741 OuterProduct 744 745
+ Store 743(dmat3v) 746
+ 750: 51(fvec4) Load 53(dvec4v)
+ 751: 51(fvec4) Load 53(dvec4v)
+ 752: 747 OuterProduct 750 751
+ Store 749(dmat4v) 752
+ 756: 46(fvec3) Load 48(dvec3v)
+ 757: 41(fvec2) Load 43(dvec2v)
+ 758: 753 OuterProduct 756 757
+ Store 755(dmat2x3v) 758
+ 762: 41(fvec2) Load 43(dvec2v)
+ 763: 46(fvec3) Load 48(dvec3v)
+ 764: 759 OuterProduct 762 763
+ Store 761(dmat3x2v) 764
+ 768: 51(fvec4) Load 53(dvec4v)
+ 769: 41(fvec2) Load 43(dvec2v)
+ 770: 765 OuterProduct 768 769
+ Store 767(dmat2x4v) 770
+ 774: 41(fvec2) Load 43(dvec2v)
+ 775: 51(fvec4) Load 53(dvec4v)
+ 776: 771 OuterProduct 774 775
+ Store 773(dmat4x2v) 776
+ 780: 51(fvec4) Load 53(dvec4v)
+ 781: 46(fvec3) Load 48(dvec3v)
+ 782: 777 OuterProduct 780 781
+ Store 779(dmat3x4v) 782
+ 786: 46(fvec3) Load 48(dvec3v)
+ 787: 51(fvec4) Load 53(dvec4v)
+ 788: 783 OuterProduct 786 787
+ Store 785(dmat4x3v) 788
+ 789: 735 Load 737(dmat2v)
+ 790: 735 Load 737(dmat2v)
+ 791: 41(fvec2) CompositeExtract 789 0
+ 792: 41(fvec2) CompositeExtract 790 0
+ 793: 41(fvec2) FMul 791 792
+ 794: 41(fvec2) CompositeExtract 789 1
+ 795: 41(fvec2) CompositeExtract 790 1
+ 796: 41(fvec2) FMul 794 795
+ 797: 735 CompositeConstruct 793 796
+ 798: 735 Load 737(dmat2v)
+ 799: 735 MatrixTimesMatrix 798 797
+ Store 737(dmat2v) 799
+ 800: 741 Load 743(dmat3v)
+ 801: 741 Load 743(dmat3v)
+ 802: 46(fvec3) CompositeExtract 800 0
+ 803: 46(fvec3) CompositeExtract 801 0
+ 804: 46(fvec3) FMul 802 803
+ 805: 46(fvec3) CompositeExtract 800 1
+ 806: 46(fvec3) CompositeExtract 801 1
+ 807: 46(fvec3) FMul 805 806
+ 808: 46(fvec3) CompositeExtract 800 2
+ 809: 46(fvec3) CompositeExtract 801 2
+ 810: 46(fvec3) FMul 808 809
+ 811: 741 CompositeConstruct 804 807 810
+ 812: 741 Load 743(dmat3v)
+ 813: 741 MatrixTimesMatrix 812 811
+ Store 743(dmat3v) 813
+ 814: 747 Load 749(dmat4v)
+ 815: 747 Load 749(dmat4v)
+ 816: 51(fvec4) CompositeExtract 814 0
+ 817: 51(fvec4) CompositeExtract 815 0
+ 818: 51(fvec4) FMul 816 817
+ 819: 51(fvec4) CompositeExtract 814 1
+ 820: 51(fvec4) CompositeExtract 815 1
+ 821: 51(fvec4) FMul 819 820
+ 822: 51(fvec4) CompositeExtract 814 2
+ 823: 51(fvec4) CompositeExtract 815 2
+ 824: 51(fvec4) FMul 822 823
+ 825: 51(fvec4) CompositeExtract 814 3
+ 826: 51(fvec4) CompositeExtract 815 3
+ 827: 51(fvec4) FMul 825 826
+ 828: 747 CompositeConstruct 818 821 824 827
+ 829: 747 Load 749(dmat4v)
+ 830: 747 MatrixTimesMatrix 829 828
+ Store 749(dmat4v) 830
+ 831: 753 Load 755(dmat2x3v)
+ 832: 753 Load 755(dmat2x3v)
+ 833: 46(fvec3) CompositeExtract 831 0
+ 834: 46(fvec3) CompositeExtract 832 0
+ 835: 46(fvec3) FMul 833 834
+ 836: 46(fvec3) CompositeExtract 831 1
+ 837: 46(fvec3) CompositeExtract 832 1
+ 838: 46(fvec3) FMul 836 837
+ 839: 753 CompositeConstruct 835 838
+ Store 755(dmat2x3v) 839
+ 840: 765 Load 767(dmat2x4v)
+ 841: 765 Load 767(dmat2x4v)
+ 842: 51(fvec4) CompositeExtract 840 0
+ 843: 51(fvec4) CompositeExtract 841 0
+ 844: 51(fvec4) FMul 842 843
+ 845: 51(fvec4) CompositeExtract 840 1
+ 846: 51(fvec4) CompositeExtract 841 1
+ 847: 51(fvec4) FMul 845 846
+ 848: 765 CompositeConstruct 844 847
+ Store 767(dmat2x4v) 848
+ 849: 759 Load 761(dmat3x2v)
+ 850: 759 Load 761(dmat3x2v)
+ 851: 41(fvec2) CompositeExtract 849 0
+ 852: 41(fvec2) CompositeExtract 850 0
+ 853: 41(fvec2) FMul 851 852
+ 854: 41(fvec2) CompositeExtract 849 1
+ 855: 41(fvec2) CompositeExtract 850 1
+ 856: 41(fvec2) FMul 854 855
+ 857: 41(fvec2) CompositeExtract 849 2
+ 858: 41(fvec2) CompositeExtract 850 2
+ 859: 41(fvec2) FMul 857 858
+ 860: 759 CompositeConstruct 853 856 859
+ Store 761(dmat3x2v) 860
+ 861: 777 Load 779(dmat3x4v)
+ 862: 777 Load 779(dmat3x4v)
+ 863: 51(fvec4) CompositeExtract 861 0
+ 864: 51(fvec4) CompositeExtract 862 0
+ 865: 51(fvec4) FMul 863 864
+ 866: 51(fvec4) CompositeExtract 861 1
+ 867: 51(fvec4) CompositeExtract 862 1
+ 868: 51(fvec4) FMul 866 867
+ 869: 51(fvec4) CompositeExtract 861 2
+ 870: 51(fvec4) CompositeExtract 862 2
+ 871: 51(fvec4) FMul 869 870
+ 872: 777 CompositeConstruct 865 868 871
+ Store 779(dmat3x4v) 872
+ 873: 771 Load 773(dmat4x2v)
+ 874: 771 Load 773(dmat4x2v)
+ 875: 41(fvec2) CompositeExtract 873 0
+ 876: 41(fvec2) CompositeExtract 874 0
+ 877: 41(fvec2) FMul 875 876
+ 878: 41(fvec2) CompositeExtract 873 1
+ 879: 41(fvec2) CompositeExtract 874 1
+ 880: 41(fvec2) FMul 878 879
+ 881: 41(fvec2) CompositeExtract 873 2
+ 882: 41(fvec2) CompositeExtract 874 2
+ 883: 41(fvec2) FMul 881 882
+ 884: 41(fvec2) CompositeExtract 873 3
+ 885: 41(fvec2) CompositeExtract 874 3
+ 886: 41(fvec2) FMul 884 885
+ 887: 771 CompositeConstruct 877 880 883 886
+ Store 773(dmat4x2v) 887
+ 888: 783 Load 785(dmat4x3v)
+ 889: 783 Load 785(dmat4x3v)
+ 890: 46(fvec3) CompositeExtract 888 0
+ 891: 46(fvec3) CompositeExtract 889 0
+ 892: 46(fvec3) FMul 890 891
+ 893: 46(fvec3) CompositeExtract 888 1
+ 894: 46(fvec3) CompositeExtract 889 1
+ 895: 46(fvec3) FMul 893 894
+ 896: 46(fvec3) CompositeExtract 888 2
+ 897: 46(fvec3) CompositeExtract 889 2
+ 898: 46(fvec3) FMul 896 897
+ 899: 46(fvec3) CompositeExtract 888 3
+ 900: 46(fvec3) CompositeExtract 889 3
+ 901: 46(fvec3) FMul 899 900
+ 902: 783 CompositeConstruct 892 895 898 901
+ Store 785(dmat4x3v) 902
+ 903: 735 Load 737(dmat2v)
+ 904: 735 Transpose 903
+ 905: 735 Load 737(dmat2v)
+ 906: 735 MatrixTimesMatrix 905 904
+ Store 737(dmat2v) 906
+ 907: 741 Load 743(dmat3v)
+ 908: 741 Transpose 907
+ 909: 741 Load 743(dmat3v)
+ 910: 741 MatrixTimesMatrix 909 908
+ Store 743(dmat3v) 910
+ 911: 747 Load 749(dmat4v)
+ 912: 747 Transpose 911
+ 913: 747 Load 749(dmat4v)
+ 914: 747 MatrixTimesMatrix 913 912
+ Store 749(dmat4v) 914
+ 915: 759 Load 761(dmat3x2v)
+ 916: 753 Transpose 915
+ Store 755(dmat2x3v) 916
+ 917: 753 Load 755(dmat2x3v)
+ 918: 759 Transpose 917
+ Store 761(dmat3x2v) 918
+ 919: 771 Load 773(dmat4x2v)
+ 920: 765 Transpose 919
+ Store 767(dmat2x4v) 920
+ 921: 765 Load 767(dmat2x4v)
+ 922: 771 Transpose 921
+ Store 773(dmat4x2v) 922
+ 923: 783 Load 785(dmat4x3v)
+ 924: 777 Transpose 923
+ Store 779(dmat3x4v) 924
+ 925: 777 Load 779(dmat3x4v)
+ 926: 783 Transpose 925
+ Store 785(dmat4x3v) 926
+ 927: 735 Load 737(dmat2v)
+ 928: 37(float) ExtInst 1(GLSL.std.450) 33(Determinant) 927
+ 929: 37(float) Load 39(doublev)
+ 930: 37(float) FAdd 929 928
+ Store 39(doublev) 930
+ 931: 741 Load 743(dmat3v)
+ 932: 37(float) ExtInst 1(GLSL.std.450) 33(Determinant) 931
+ 933: 37(float) Load 39(doublev)
+ 934: 37(float) FAdd 933 932
+ Store 39(doublev) 934
+ 935: 747 Load 749(dmat4v)
+ 936: 37(float) ExtInst 1(GLSL.std.450) 33(Determinant) 935
+ 937: 37(float) Load 39(doublev)
+ 938: 37(float) FAdd 937 936
+ Store 39(doublev) 938
+ 939: 735 Load 737(dmat2v)
+ 940: 735 ExtInst 1(GLSL.std.450) 34(MatrixInverse) 939
+ 941: 735 Load 737(dmat2v)
+ 942: 735 MatrixTimesMatrix 941 940
+ Store 737(dmat2v) 942
+ 943: 741 Load 743(dmat3v)
+ 944: 741 ExtInst 1(GLSL.std.450) 34(MatrixInverse) 943
+ 945: 741 Load 743(dmat3v)
+ 946: 741 MatrixTimesMatrix 945 944
+ Store 743(dmat3v) 946
+ 947: 747 Load 749(dmat4v)
+ 948: 747 ExtInst 1(GLSL.std.450) 34(MatrixInverse) 947
+ 949: 747 Load 749(dmat4v)
+ 950: 747 MatrixTimesMatrix 949 948
+ Store 749(dmat4v) 950
+ 951: 37(float) Load 39(doublev)
+ 953: 38(ptr) AccessChain 43(dvec2v) 952
+ 954: 37(float) Load 953
+ 955: 37(float) FAdd 951 954
+ 957: 38(ptr) AccessChain 48(dvec3v) 956
+ 958: 37(float) Load 957
+ 959: 37(float) FAdd 955 958
+ 961: 38(ptr) AccessChain 53(dvec4v) 960
+ 962: 37(float) Load 961
+ 963: 37(float) FAdd 959 962
+ 965: 38(ptr) AccessChain 737(dmat2v) 964 952
+ 966: 37(float) Load 965
+ 967: 37(float) FAdd 963 966
+ 969: 38(ptr) AccessChain 743(dmat3v) 968 956
+ 970: 37(float) Load 969
+ 971: 37(float) FAdd 967 970
+ 972: 38(ptr) AccessChain 749(dmat4v) 25 960
+ 973: 37(float) Load 972
+ 974: 37(float) FAdd 971 973
+ 975: 38(ptr) AccessChain 755(dmat2x3v) 964 952
+ 976: 37(float) Load 975
+ 977: 37(float) FAdd 974 976
+ 978: 38(ptr) AccessChain 761(dmat3x2v) 964 952
+ 979: 37(float) Load 978
+ 980: 37(float) FAdd 977 979
+ 981: 38(ptr) AccessChain 779(dmat3x4v) 968 956
+ 982: 37(float) Load 981
+ 983: 37(float) FAdd 980 982
+ 984: 38(ptr) AccessChain 785(dmat4x3v) 968 956
+ 985: 37(float) Load 984
+ 986: 37(float) FAdd 983 985
+ 987: 38(ptr) AccessChain 767(dmat2x4v) 964 952
+ 988: 37(float) Load 987
+ 989: 37(float) FAdd 986 988
+ 990: 38(ptr) AccessChain 773(dmat4x2v) 964 952
+ 991: 37(float) Load 990
+ 992: 37(float) FAdd 989 991
+ 993: 426(bool) Load 428(boolv)
+ 995: 10(float) Select 993 994 21
+ 996: 37(float) FConvert 995
+ 997: 37(float) FAdd 992 996
+ 998: 435(bvec2) Load 437(bvec2v)
+ 999: 426(bool) CompositeExtract 998 0
+ 1000: 10(float) Select 999 994 21
+ 1001: 37(float) FConvert 1000
+ 1002: 37(float) FAdd 997 1001
+ 1003: 444(bvec3) Load 446(bvec3v)
+ 1004: 426(bool) CompositeExtract 1003 0
+ 1005: 10(float) Select 1004 994 21
+ 1006: 37(float) FConvert 1005
+ 1007: 37(float) FAdd 1002 1006
+ 1008: 453(bvec4) Load 455(bvec4v)
+ 1009: 426(bool) CompositeExtract 1008 0
+ 1010: 10(float) Select 1009 994 21
+ 1011: 37(float) FConvert 1010
+ 1012: 37(float) FAdd 1007 1011
+ 1013: 10(float) FConvert 1012
+ 1014: 11(fvec4) Load 13(outp)
+ 1015: 11(fvec4) VectorTimesScalar 1014 1013
+ Store 13(outp) 1015
+ Return
+ FunctionEnd
diff --git a/chromium/third_party/glslang/src/Test/baseResults/spv.400.tesc.out b/chromium/third_party/glslang/src/Test/baseResults/spv.400.tesc.out
new file mode 100755
index 00000000000..290a19cdd4e
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/spv.400.tesc.out
@@ -0,0 +1,179 @@
+spv.400.tesc
+Warning, version 400 is not yet complete; most version-specific features are present, but some are missing.
+
+
+Linked tessellation control stage:
+
+
+// Module Version 10000
+// Generated by (magic number): 80001
+// Id's are bound by 94
+
+ Capability Tessellation
+ Capability TessellationPointSize
+ Capability ClipDistance
+ 1: ExtInstImport "GLSL.std.450"
+ MemoryModel Logical GLSL450
+ EntryPoint TessellationControl 4 "main" 24 41 44 47 55 69 74 80 84 85 88 89 92 93
+ ExecutionMode 4 OutputVertices 4
+ Source GLSL 400
+ SourceExtension "GL_ARB_separate_shader_objects"
+ Name 4 "main"
+ Name 12 "a"
+ Name 17 "p"
+ Name 20 "gl_PerVertex"
+ MemberName 20(gl_PerVertex) 0 "gl_Position"
+ MemberName 20(gl_PerVertex) 1 "gl_PointSize"
+ MemberName 20(gl_PerVertex) 2 "gl_ClipDistance"
+ Name 24 "gl_in"
+ Name 31 "ps"
+ Name 35 "cd"
+ Name 39 "pvi"
+ Name 41 "gl_PatchVerticesIn"
+ Name 43 "pid"
+ Name 44 "gl_PrimitiveID"
+ Name 46 "iid"
+ Name 47 "gl_InvocationID"
+ Name 51 "gl_PerVertex"
+ MemberName 51(gl_PerVertex) 0 "gl_Position"
+ MemberName 51(gl_PerVertex) 1 "gl_PointSize"
+ MemberName 51(gl_PerVertex) 2 "gl_ClipDistance"
+ Name 55 "gl_out"
+ Name 69 "gl_TessLevelOuter"
+ Name 74 "gl_TessLevelInner"
+ Name 79 "outa"
+ Name 80 "patchOut"
+ Name 84 "inb"
+ Name 85 "ind"
+ Name 88 "ivla"
+ Name 89 "ivlb"
+ Name 92 "ovla"
+ Name 93 "ovlb"
+ MemberDecorate 20(gl_PerVertex) 0 BuiltIn Position
+ MemberDecorate 20(gl_PerVertex) 1 BuiltIn PointSize
+ MemberDecorate 20(gl_PerVertex) 2 BuiltIn ClipDistance
+ Decorate 20(gl_PerVertex) Block
+ Decorate 41(gl_PatchVerticesIn) BuiltIn PatchVertices
+ Decorate 44(gl_PrimitiveID) BuiltIn PrimitiveId
+ Decorate 47(gl_InvocationID) BuiltIn InvocationId
+ MemberDecorate 51(gl_PerVertex) 0 BuiltIn Position
+ MemberDecorate 51(gl_PerVertex) 1 BuiltIn PointSize
+ MemberDecorate 51(gl_PerVertex) 2 BuiltIn ClipDistance
+ Decorate 51(gl_PerVertex) Block
+ Decorate 69(gl_TessLevelOuter) Patch
+ Decorate 69(gl_TessLevelOuter) BuiltIn TessLevelOuter
+ Decorate 74(gl_TessLevelInner) Patch
+ Decorate 74(gl_TessLevelInner) BuiltIn TessLevelInner
+ Decorate 80(patchOut) Patch
+ Decorate 88(ivla) Location 3
+ Decorate 89(ivlb) Location 4
+ Decorate 92(ovla) Location 3
+ Decorate 93(ovlb) Location 4
+ 2: TypeVoid
+ 3: TypeFunction 2
+ 6: TypeInt 32 0
+ 7: 6(int) Constant 1
+ 8: 6(int) Constant 4062
+ 9: 6(int) Constant 0
+ 10: TypeInt 32 1
+ 11: TypePointer Function 10(int)
+ 13: 10(int) Constant 5392
+ 14: TypeFloat 32
+ 15: TypeVector 14(float) 4
+ 16: TypePointer Function 15(fvec4)
+ 18: 6(int) Constant 3
+ 19: TypeArray 14(float) 18
+20(gl_PerVertex): TypeStruct 15(fvec4) 14(float) 19
+ 21: 6(int) Constant 32
+ 22: TypeArray 20(gl_PerVertex) 21
+ 23: TypePointer Input 22
+ 24(gl_in): 23(ptr) Variable Input
+ 25: 10(int) Constant 1
+ 26: 10(int) Constant 0
+ 27: TypePointer Input 15(fvec4)
+ 30: TypePointer Function 14(float)
+ 32: TypePointer Input 14(float)
+ 36: 10(int) Constant 2
+ 40: TypePointer Input 10(int)
+41(gl_PatchVerticesIn): 40(ptr) Variable Input
+44(gl_PrimitiveID): 40(ptr) Variable Input
+47(gl_InvocationID): 40(ptr) Variable Input
+ 49: 6(int) Constant 2
+ 50: TypeArray 14(float) 49
+51(gl_PerVertex): TypeStruct 15(fvec4) 14(float) 50
+ 52: 6(int) Constant 4
+ 53: TypeArray 51(gl_PerVertex) 52
+ 54: TypePointer Output 53
+ 55(gl_out): 54(ptr) Variable Output
+ 58: TypePointer Output 15(fvec4)
+ 62: TypePointer Output 14(float)
+ 67: TypeArray 14(float) 52
+ 68: TypePointer Output 67
+69(gl_TessLevelOuter): 68(ptr) Variable Output
+ 70: 10(int) Constant 3
+ 71: 14(float) Constant 1078774989
+ 73: TypePointer Output 50
+74(gl_TessLevelInner): 73(ptr) Variable Output
+ 75: 14(float) Constant 1067869798
+ 77: TypeArray 10(int) 52
+ 78: TypePointer Private 77
+ 79(outa): 78(ptr) Variable Private
+ 80(patchOut): 58(ptr) Variable Output
+ 81: TypeVector 14(float) 2
+ 82: TypeArray 81(fvec2) 21
+ 83: TypePointer Input 82
+ 84(inb): 83(ptr) Variable Input
+ 85(ind): 83(ptr) Variable Input
+ 86: TypeArray 15(fvec4) 21
+ 87: TypePointer Input 86
+ 88(ivla): 87(ptr) Variable Input
+ 89(ivlb): 87(ptr) Variable Input
+ 90: TypeArray 15(fvec4) 52
+ 91: TypePointer Output 90
+ 92(ovla): 91(ptr) Variable Output
+ 93(ovlb): 91(ptr) Variable Output
+ 4(main): 2 Function None 3
+ 5: Label
+ 12(a): 11(ptr) Variable Function
+ 17(p): 16(ptr) Variable Function
+ 31(ps): 30(ptr) Variable Function
+ 35(cd): 30(ptr) Variable Function
+ 39(pvi): 11(ptr) Variable Function
+ 43(pid): 11(ptr) Variable Function
+ 46(iid): 11(ptr) Variable Function
+ MemoryBarrier 7 8
+ ControlBarrier 7 7 9
+ Store 12(a) 13
+ 28: 27(ptr) AccessChain 24(gl_in) 25 26
+ 29: 15(fvec4) Load 28
+ Store 17(p) 29
+ 33: 32(ptr) AccessChain 24(gl_in) 25 25
+ 34: 14(float) Load 33
+ Store 31(ps) 34
+ 37: 32(ptr) AccessChain 24(gl_in) 25 36 36
+ 38: 14(float) Load 37
+ Store 35(cd) 38
+ 42: 10(int) Load 41(gl_PatchVerticesIn)
+ Store 39(pvi) 42
+ 45: 10(int) Load 44(gl_PrimitiveID)
+ Store 43(pid) 45
+ 48: 10(int) Load 47(gl_InvocationID)
+ Store 46(iid) 48
+ 56: 10(int) Load 47(gl_InvocationID)
+ 57: 15(fvec4) Load 17(p)
+ 59: 58(ptr) AccessChain 55(gl_out) 56 26
+ Store 59 57
+ 60: 10(int) Load 47(gl_InvocationID)
+ 61: 14(float) Load 31(ps)
+ 63: 62(ptr) AccessChain 55(gl_out) 60 25
+ Store 63 61
+ 64: 10(int) Load 47(gl_InvocationID)
+ 65: 14(float) Load 35(cd)
+ 66: 62(ptr) AccessChain 55(gl_out) 64 36 25
+ Store 66 65
+ 72: 62(ptr) AccessChain 69(gl_TessLevelOuter) 70
+ Store 72 71
+ 76: 62(ptr) AccessChain 74(gl_TessLevelInner) 25
+ Store 76 75
+ Return
+ FunctionEnd
diff --git a/chromium/third_party/glslang/src/Test/baseResults/spv.400.tese.out b/chromium/third_party/glslang/src/Test/baseResults/spv.400.tese.out
new file mode 100755
index 00000000000..51534b122fe
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/spv.400.tese.out
@@ -0,0 +1,189 @@
+spv.400.tese
+Warning, version 400 is not yet complete; most version-specific features are present, but some are missing.
+
+
+Linked tessellation evaluation stage:
+
+
+// Module Version 10000
+// Generated by (magic number): 80001
+// Id's are bound by 96
+
+ Capability Tessellation
+ Capability TessellationPointSize
+ Capability ClipDistance
+ 1: ExtInstImport "GLSL.std.450"
+ MemoryModel Logical GLSL450
+ EntryPoint TessellationEvaluation 4 "main" 21 38 41 47 53 61 66 75 79 80 84 88 91 92 95
+ ExecutionMode 4 Triangles
+ ExecutionMode 4 SpacingFractionalOdd
+ ExecutionMode 4 VertexOrderCcw
+ ExecutionMode 4 PointMode
+ Source GLSL 400
+ SourceExtension "GL_ARB_separate_shader_objects"
+ Name 4 "main"
+ Name 8 "a"
+ Name 13 "p"
+ Name 17 "gl_PerVertex"
+ MemberName 17(gl_PerVertex) 0 "gl_Position"
+ MemberName 17(gl_PerVertex) 1 "gl_PointSize"
+ MemberName 17(gl_PerVertex) 2 "gl_ClipDistance"
+ Name 21 "gl_in"
+ Name 28 "ps"
+ Name 32 "cd"
+ Name 36 "pvi"
+ Name 38 "gl_PatchVerticesIn"
+ Name 40 "pid"
+ Name 41 "gl_PrimitiveID"
+ Name 45 "tc"
+ Name 47 "gl_TessCoord"
+ Name 49 "tlo"
+ Name 53 "gl_TessLevelOuter"
+ Name 57 "tli"
+ Name 61 "gl_TessLevelInner"
+ Name 64 "gl_PerVertex"
+ MemberName 64(gl_PerVertex) 0 "gl_Position"
+ MemberName 64(gl_PerVertex) 1 "gl_PointSize"
+ MemberName 64(gl_PerVertex) 2 "gl_ClipDistance"
+ Name 66 ""
+ Name 75 "patchIn"
+ Name 79 "inb"
+ Name 80 "ind"
+ Name 81 "testblb"
+ MemberName 81(testblb) 0 "f"
+ Name 84 "blb"
+ Name 85 "testbld"
+ MemberName 85(testbld) 0 "f"
+ Name 88 "bld"
+ Name 91 "ivla"
+ Name 92 "ivlb"
+ Name 95 "ovla"
+ MemberDecorate 17(gl_PerVertex) 0 BuiltIn Position
+ MemberDecorate 17(gl_PerVertex) 1 BuiltIn PointSize
+ MemberDecorate 17(gl_PerVertex) 2 BuiltIn ClipDistance
+ Decorate 17(gl_PerVertex) Block
+ Decorate 38(gl_PatchVerticesIn) BuiltIn PatchVertices
+ Decorate 41(gl_PrimitiveID) BuiltIn PrimitiveId
+ Decorate 47(gl_TessCoord) BuiltIn TessCoord
+ Decorate 53(gl_TessLevelOuter) Patch
+ Decorate 53(gl_TessLevelOuter) BuiltIn TessLevelOuter
+ Decorate 61(gl_TessLevelInner) Patch
+ Decorate 61(gl_TessLevelInner) BuiltIn TessLevelInner
+ MemberDecorate 64(gl_PerVertex) 0 BuiltIn Position
+ MemberDecorate 64(gl_PerVertex) 1 BuiltIn PointSize
+ MemberDecorate 64(gl_PerVertex) 2 BuiltIn ClipDistance
+ Decorate 64(gl_PerVertex) Block
+ Decorate 75(patchIn) Patch
+ Decorate 81(testblb) Block
+ Decorate 85(testbld) Block
+ Decorate 91(ivla) Location 23
+ Decorate 92(ivlb) Location 24
+ Decorate 95(ovla) Location 23
+ 2: TypeVoid
+ 3: TypeFunction 2
+ 6: TypeInt 32 1
+ 7: TypePointer Function 6(int)
+ 9: 6(int) Constant 1512
+ 10: TypeFloat 32
+ 11: TypeVector 10(float) 4
+ 12: TypePointer Function 11(fvec4)
+ 14: TypeInt 32 0
+ 15: 14(int) Constant 3
+ 16: TypeArray 10(float) 15
+17(gl_PerVertex): TypeStruct 11(fvec4) 10(float) 16
+ 18: 14(int) Constant 32
+ 19: TypeArray 17(gl_PerVertex) 18
+ 20: TypePointer Input 19
+ 21(gl_in): 20(ptr) Variable Input
+ 22: 6(int) Constant 1
+ 23: 6(int) Constant 0
+ 24: TypePointer Input 11(fvec4)
+ 27: TypePointer Function 10(float)
+ 29: TypePointer Input 10(float)
+ 33: 6(int) Constant 2
+ 37: TypePointer Input 6(int)
+38(gl_PatchVerticesIn): 37(ptr) Variable Input
+41(gl_PrimitiveID): 37(ptr) Variable Input
+ 43: TypeVector 10(float) 3
+ 44: TypePointer Function 43(fvec3)
+ 46: TypePointer Input 43(fvec3)
+47(gl_TessCoord): 46(ptr) Variable Input
+ 50: 14(int) Constant 4
+ 51: TypeArray 10(float) 50
+ 52: TypePointer Input 51
+53(gl_TessLevelOuter): 52(ptr) Variable Input
+ 54: 6(int) Constant 3
+ 58: 14(int) Constant 2
+ 59: TypeArray 10(float) 58
+ 60: TypePointer Input 59
+61(gl_TessLevelInner): 60(ptr) Variable Input
+64(gl_PerVertex): TypeStruct 11(fvec4) 10(float) 16
+ 65: TypePointer Output 64(gl_PerVertex)
+ 66: 65(ptr) Variable Output
+ 68: TypePointer Output 11(fvec4)
+ 71: TypePointer Output 10(float)
+ 75(patchIn): 24(ptr) Variable Input
+ 76: TypeVector 10(float) 2
+ 77: TypeArray 76(fvec2) 18
+ 78: TypePointer Input 77
+ 79(inb): 78(ptr) Variable Input
+ 80(ind): 78(ptr) Variable Input
+ 81(testblb): TypeStruct 6(int)
+ 82: TypeArray 81(testblb) 18
+ 83: TypePointer Input 82
+ 84(blb): 83(ptr) Variable Input
+ 85(testbld): TypeStruct 6(int)
+ 86: TypeArray 85(testbld) 18
+ 87: TypePointer Input 86
+ 88(bld): 87(ptr) Variable Input
+ 89: TypeArray 11(fvec4) 18
+ 90: TypePointer Input 89
+ 91(ivla): 90(ptr) Variable Input
+ 92(ivlb): 90(ptr) Variable Input
+ 93: TypeArray 11(fvec4) 58
+ 94: TypePointer Output 93
+ 95(ovla): 94(ptr) Variable Output
+ 4(main): 2 Function None 3
+ 5: Label
+ 8(a): 7(ptr) Variable Function
+ 13(p): 12(ptr) Variable Function
+ 28(ps): 27(ptr) Variable Function
+ 32(cd): 27(ptr) Variable Function
+ 36(pvi): 7(ptr) Variable Function
+ 40(pid): 7(ptr) Variable Function
+ 45(tc): 44(ptr) Variable Function
+ 49(tlo): 27(ptr) Variable Function
+ 57(tli): 27(ptr) Variable Function
+ Store 8(a) 9
+ 25: 24(ptr) AccessChain 21(gl_in) 22 23
+ 26: 11(fvec4) Load 25
+ Store 13(p) 26
+ 30: 29(ptr) AccessChain 21(gl_in) 22 22
+ 31: 10(float) Load 30
+ Store 28(ps) 31
+ 34: 29(ptr) AccessChain 21(gl_in) 22 33 33
+ 35: 10(float) Load 34
+ Store 32(cd) 35
+ 39: 6(int) Load 38(gl_PatchVerticesIn)
+ Store 36(pvi) 39
+ 42: 6(int) Load 41(gl_PrimitiveID)
+ Store 40(pid) 42
+ 48: 43(fvec3) Load 47(gl_TessCoord)
+ Store 45(tc) 48
+ 55: 29(ptr) AccessChain 53(gl_TessLevelOuter) 54
+ 56: 10(float) Load 55
+ Store 49(tlo) 56
+ 62: 29(ptr) AccessChain 61(gl_TessLevelInner) 22
+ 63: 10(float) Load 62
+ Store 57(tli) 63
+ 67: 11(fvec4) Load 13(p)
+ 69: 68(ptr) AccessChain 66 23
+ Store 69 67
+ 70: 10(float) Load 28(ps)
+ 72: 71(ptr) AccessChain 66 22
+ Store 72 70
+ 73: 10(float) Load 32(cd)
+ 74: 71(ptr) AccessChain 66 33 33
+ Store 74 73
+ Return
+ FunctionEnd
diff --git a/chromium/third_party/glslang/src/Test/baseResults/spv.420.geom.out b/chromium/third_party/glslang/src/Test/baseResults/spv.420.geom.out
new file mode 100644
index 00000000000..78e3aaa2847
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/spv.420.geom.out
@@ -0,0 +1,132 @@
+spv.420.geom
+Warning, version 420 is not yet complete; most version-specific features are present, but some are missing.
+
+
+Linked geometry stage:
+
+
+// Module Version 10000
+// Generated by (magic number): 80001
+// Id's are bound by 72
+
+ Capability Geometry
+ Capability GeometryPointSize
+ Capability ImageGatherExtended
+ Capability GeometryStreams
+ Capability MultiViewport
+ 1: ExtInstImport "GLSL.std.450"
+ MemoryModel Logical GLSL450
+ EntryPoint Geometry 4 "main" 14 23 28 33 46
+ ExecutionMode 4 Triangles
+ ExecutionMode 4 Invocations 4
+ ExecutionMode 4 OutputLineStrip
+ ExecutionMode 4 OutputVertices 127
+ Source GLSL 420
+ Name 4 "main"
+ Name 8 "p"
+ Name 9 "gl_PerVertex"
+ MemberName 9(gl_PerVertex) 0 "gl_PointSize"
+ Name 14 "gl_in"
+ Name 21 "gl_PerVertex"
+ MemberName 21(gl_PerVertex) 0 "gl_PointSize"
+ Name 23 ""
+ Name 28 "gl_ViewportIndex"
+ Name 31 "id"
+ Name 33 "gl_InvocationID"
+ Name 37 "v"
+ Name 41 "s2D"
+ Name 46 "coord"
+ Name 64 "i"
+ Name 67 "indexable"
+ MemberDecorate 9(gl_PerVertex) 0 BuiltIn PointSize
+ Decorate 9(gl_PerVertex) Block
+ MemberDecorate 21(gl_PerVertex) 0 BuiltIn PointSize
+ Decorate 21(gl_PerVertex) Block
+ Decorate 21(gl_PerVertex) Stream 0
+ Decorate 23 Stream 0
+ Decorate 28(gl_ViewportIndex) Stream 0
+ Decorate 28(gl_ViewportIndex) BuiltIn ViewportIndex
+ Decorate 33(gl_InvocationID) BuiltIn InvocationId
+ Decorate 41(s2D) DescriptorSet 0
+ 2: TypeVoid
+ 3: TypeFunction 2
+ 6: TypeFloat 32
+ 7: TypePointer Function 6(float)
+ 9(gl_PerVertex): TypeStruct 6(float)
+ 10: TypeInt 32 0
+ 11: 10(int) Constant 3
+ 12: TypeArray 9(gl_PerVertex) 11
+ 13: TypePointer Input 12
+ 14(gl_in): 13(ptr) Variable Input
+ 15: TypeInt 32 1
+ 16: 15(int) Constant 1
+ 17: 15(int) Constant 0
+ 18: TypePointer Input 6(float)
+21(gl_PerVertex): TypeStruct 6(float)
+ 22: TypePointer Output 21(gl_PerVertex)
+ 23: 22(ptr) Variable Output
+ 25: TypePointer Output 6(float)
+ 27: TypePointer Output 15(int)
+28(gl_ViewportIndex): 27(ptr) Variable Output
+ 29: 15(int) Constant 7
+ 30: TypePointer Function 15(int)
+ 32: TypePointer Input 15(int)
+33(gl_InvocationID): 32(ptr) Variable Input
+ 35: TypeVector 6(float) 4
+ 36: TypePointer Function 35(fvec4)
+ 38: TypeImage 6(float) 2D sampled format:Unknown
+ 39: TypeSampledImage 38
+ 40: TypePointer UniformConstant 39
+ 41(s2D): 40(ptr) Variable UniformConstant
+ 43: TypeVector 6(float) 2
+ 44: TypeArray 43(fvec2) 11
+ 45: TypePointer Input 44
+ 46(coord): 45(ptr) Variable Input
+ 47: TypePointer Input 43(fvec2)
+ 50: TypeVector 15(int) 2
+ 51: 10(int) Constant 5
+ 52: TypeArray 50(ivec2) 51
+ 53: 50(ivec2) ConstantComposite 17 16
+ 54: 15(int) Constant 4294967294
+ 55: 50(ivec2) ConstantComposite 16 54
+ 56: 15(int) Constant 3
+ 57: 50(ivec2) ConstantComposite 17 56
+ 58: 15(int) Constant 4294967293
+ 59: 50(ivec2) ConstantComposite 58 17
+ 60: 15(int) Constant 2
+ 61: 50(ivec2) ConstantComposite 60 16
+ 62: 52 ConstantComposite 53 55 57 59 61
+ 63: TypePointer Private 15(int)
+ 64(i): 63(ptr) Variable Private
+ 66: TypePointer Function 52
+ 68: TypePointer Function 50(ivec2)
+ 4(main): 2 Function None 3
+ 5: Label
+ 8(p): 7(ptr) Variable Function
+ 31(id): 30(ptr) Variable Function
+ 37(v): 36(ptr) Variable Function
+ 67(indexable): 66(ptr) Variable Function
+ 19: 18(ptr) AccessChain 14(gl_in) 16 17
+ 20: 6(float) Load 19
+ Store 8(p) 20
+ 24: 6(float) Load 8(p)
+ 26: 25(ptr) AccessChain 23 17
+ Store 26 24
+ Store 28(gl_ViewportIndex) 29
+ EmitStreamVertex 16
+ EndStreamPrimitive 17
+ EmitVertex
+ EndPrimitive
+ 34: 15(int) Load 33(gl_InvocationID)
+ Store 31(id) 34
+ 42: 39 Load 41(s2D)
+ 48: 47(ptr) AccessChain 46(coord) 17
+ 49: 43(fvec2) Load 48
+ 65: 15(int) Load 64(i)
+ Store 67(indexable) 62
+ 69: 68(ptr) AccessChain 67(indexable) 65
+ 70: 50(ivec2) Load 69
+ 71: 35(fvec4) ImageGather 42 49 17 Offset 70
+ Store 37(v) 71
+ Return
+ FunctionEnd
diff --git a/chromium/third_party/glslang/src/Test/baseResults/spv.430.vert.out b/chromium/third_party/glslang/src/Test/baseResults/spv.430.vert.out
new file mode 100755
index 00000000000..d5332d253d1
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/spv.430.vert.out
@@ -0,0 +1,143 @@
+spv.430.vert
+Warning, version 450 is not yet complete; most version-specific features are present, but some are missing.
+
+
+Linked vertex stage:
+
+
+// Module Version 10000
+// Generated by (magic number): 80001
+// Id's are bound by 66
+
+ Capability Shader
+ Capability ClipDistance
+ 1: ExtInstImport "GLSL.std.450"
+ MemoryModel Logical GLSL450
+ EntryPoint Vertex 4 "main" 12 23 34 38 41 42 62 65
+ Source GLSL 450
+ Name 4 "main"
+ Name 10 "gl_PerVertex"
+ MemberName 10(gl_PerVertex) 0 "gl_ClipDistance"
+ Name 12 ""
+ Name 23 "bad"
+ Name 34 "badorder3"
+ Name 38 "f"
+ Name 41 "badorder"
+ Name 42 "badorder2"
+ Name 43 "boundblock"
+ MemberName 43(boundblock) 0 "aoeu"
+ Name 45 "boundInst"
+ Name 46 "anonblock"
+ MemberName 46(anonblock) 0 "aoeu"
+ Name 48 ""
+ Name 52 "sampb1"
+ Name 55 "sampb2"
+ Name 56 "sampb4"
+ Name 59 "S"
+ MemberName 59(S) 0 "a"
+ MemberName 59(S) 1 "b"
+ MemberName 59(S) 2 "c"
+ Name 60 "SS"
+ MemberName 60(SS) 0 "b"
+ MemberName 60(SS) 1 "s"
+ MemberName 60(SS) 2 "c"
+ Name 62 "var"
+ Name 63 "MS"
+ MemberName 63(MS) 0 "f"
+ Name 65 "outMS"
+ MemberDecorate 10(gl_PerVertex) 0 BuiltIn ClipDistance
+ Decorate 10(gl_PerVertex) Block
+ Decorate 34(badorder3) Flat
+ Decorate 42(badorder2) Invariant
+ MemberDecorate 43(boundblock) 0 Offset 0
+ Decorate 43(boundblock) Block
+ Decorate 45(boundInst) DescriptorSet 0
+ Decorate 45(boundInst) Binding 3
+ MemberDecorate 46(anonblock) 0 Offset 0
+ Decorate 46(anonblock) Block
+ Decorate 48 DescriptorSet 0
+ Decorate 48 Binding 7
+ Decorate 52(sampb1) DescriptorSet 0
+ Decorate 52(sampb1) Binding 4
+ Decorate 55(sampb2) DescriptorSet 0
+ Decorate 55(sampb2) Binding 5
+ Decorate 56(sampb4) DescriptorSet 0
+ Decorate 56(sampb4) Binding 31
+ MemberDecorate 60(SS) 0 Flat
+ MemberDecorate 60(SS) 1 Flat
+ MemberDecorate 60(SS) 2 Flat
+ Decorate 62(var) Location 0
+ MemberDecorate 63(MS) 0 Location 17
+ Decorate 63(MS) Block
+ 2: TypeVoid
+ 3: TypeFunction 2
+ 6: TypeFloat 32
+ 7: TypeInt 32 0
+ 8: 7(int) Constant 3
+ 9: TypeArray 6(float) 8
+10(gl_PerVertex): TypeStruct 9
+ 11: TypePointer Output 10(gl_PerVertex)
+ 12: 11(ptr) Variable Output
+ 13: TypeInt 32 1
+ 14: 13(int) Constant 0
+ 15: 13(int) Constant 2
+ 16: 6(float) Constant 1080872141
+ 17: TypePointer Output 6(float)
+ 19: TypeVector 6(float) 4
+ 20: 7(int) Constant 10
+ 21: TypeArray 19(fvec4) 20
+ 22: TypePointer Input 21
+ 23(bad): 22(ptr) Variable Input
+ 24: 7(int) Constant 0
+ 25: TypePointer Input 6(float)
+ 28: 6(float) Constant 1082549862
+ 29: TypeBool
+ 33: TypePointer Output 19(fvec4)
+ 34(badorder3): 33(ptr) Variable Output
+ 35: TypePointer Input 19(fvec4)
+ 38(f): 25(ptr) Variable Input
+ 41(badorder): 35(ptr) Variable Input
+ 42(badorder2): 33(ptr) Variable Output
+ 43(boundblock): TypeStruct 13(int)
+ 44: TypePointer Uniform 43(boundblock)
+ 45(boundInst): 44(ptr) Variable Uniform
+ 46(anonblock): TypeStruct 13(int)
+ 47: TypePointer Uniform 46(anonblock)
+ 48: 47(ptr) Variable Uniform
+ 49: TypeImage 6(float) 2D sampled format:Unknown
+ 50: TypeSampledImage 49
+ 51: TypePointer UniformConstant 50
+ 52(sampb1): 51(ptr) Variable UniformConstant
+ 53: TypeArray 50 20
+ 54: TypePointer UniformConstant 53
+ 55(sampb2): 54(ptr) Variable UniformConstant
+ 56(sampb4): 51(ptr) Variable UniformConstant
+ 57: TypeVector 7(int) 2
+ 58: TypeVector 6(float) 3
+ 59(S): TypeStruct 6(float) 57(ivec2) 58(fvec3)
+ 60(SS): TypeStruct 19(fvec4) 59(S) 19(fvec4)
+ 61: TypePointer Output 60(SS)
+ 62(var): 61(ptr) Variable Output
+ 63(MS): TypeStruct 6(float)
+ 64: TypePointer Output 63(MS)
+ 65(outMS): 64(ptr) Variable Output
+ 4(main): 2 Function None 3
+ 5: Label
+ 18: 17(ptr) AccessChain 12 14 15
+ Store 18 16
+ 26: 25(ptr) AccessChain 23(bad) 14 24
+ 27: 6(float) Load 26
+ 30: 29(bool) FOrdEqual 27 28
+ SelectionMerge 32 None
+ BranchConditional 30 31 32
+ 31: Label
+ 36: 35(ptr) AccessChain 23(bad) 14
+ 37: 19(fvec4) Load 36
+ Store 34(badorder3) 37
+ Branch 32
+ 32: Label
+ 39: 6(float) Load 38(f)
+ 40: 17(ptr) AccessChain 12 14 14
+ Store 40 39
+ Return
+ FunctionEnd
diff --git a/chromium/third_party/glslang/src/Test/baseResults/spv.AofA.frag.out b/chromium/third_party/glslang/src/Test/baseResults/spv.AofA.frag.out
new file mode 100644
index 00000000000..0dbf69ceda2
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/spv.AofA.frag.out
@@ -0,0 +1,156 @@
+spv.AofA.frag
+Warning, version 430 is not yet complete; most version-specific features are present, but some are missing.
+
+
+Linked fragment stage:
+
+
+// Module Version 10000
+// Generated by (magic number): 80001
+// Id's are bound by 104
+
+ Capability Shader
+ 1: ExtInstImport "GLSL.std.450"
+ MemoryModel Logical GLSL450
+ EntryPoint Fragment 4 "main" 39 44 68 70 72 78
+ ExecutionMode 4 OriginUpperLeft
+ Source GLSL 430
+ Name 4 "main"
+ Name 17 "foo(f1[5][7];"
+ Name 16 "a"
+ Name 20 "r"
+ Name 39 "outfloat"
+ Name 42 "g4"
+ Name 44 "g5"
+ Name 45 "param"
+ Name 48 "u"
+ Name 52 "param"
+ Name 66 "many"
+ Name 68 "i"
+ Name 70 "j"
+ Name 72 "k"
+ Name 78 "infloat"
+ Name 94 "uAofA"
+ MemberName 94(uAofA) 0 "f"
+ Name 98 "nameAofA"
+ Decorate 68(i) Flat
+ Decorate 70(j) Flat
+ Decorate 72(k) Flat
+ Decorate 92 ArrayStride 16
+ Decorate 93 ArrayStride 64
+ MemberDecorate 94(uAofA) 0 Offset 0
+ Decorate 94(uAofA) Block
+ Decorate 98(nameAofA) DescriptorSet 0
+ 2: TypeVoid
+ 3: TypeFunction 2
+ 6: TypeFloat 32
+ 7: TypeInt 32 0
+ 8: 7(int) Constant 7
+ 9: TypeArray 6(float) 8
+ 10: 7(int) Constant 5
+ 11: TypeArray 9 10
+ 12: TypePointer Function 11
+ 13: 7(int) Constant 4
+ 14: TypeArray 9 13
+ 15: TypeFunction 14 12(ptr)
+ 19: TypePointer Function 9
+ 21: TypeInt 32 1
+ 22: 21(int) Constant 2
+ 25: 21(int) Constant 0
+ 28: 21(int) Constant 1
+ 32: 21(int) Constant 3
+ 38: TypePointer Output 6(float)
+ 39(outfloat): 38(ptr) Variable Output
+ 40: 6(float) Constant 0
+ 41: TypePointer Private 14
+ 42(g4): 41(ptr) Variable Private
+ 43: TypePointer Input 11
+ 44(g5): 43(ptr) Variable Input
+ 49: 6(float) Constant 1077936128
+ 50: TypePointer Function 6(float)
+ 55: 7(int) Constant 6
+ 56: TypeArray 6(float) 55
+ 57: TypeArray 56 10
+ 58: TypeArray 57 13
+ 59: 7(int) Constant 3
+ 60: TypeArray 58 59
+ 61: 7(int) Constant 2
+ 62: TypeArray 60 61
+ 63: 7(int) Constant 1
+ 64: TypeArray 62 63
+ 65: TypePointer Private 64
+ 66(many): 65(ptr) Variable Private
+ 67: TypePointer Input 21(int)
+ 68(i): 67(ptr) Variable Input
+ 70(j): 67(ptr) Variable Input
+ 72(k): 67(ptr) Variable Input
+ 77: TypePointer Input 6(float)
+ 78(infloat): 77(ptr) Variable Input
+ 80: TypePointer Private 6(float)
+ 92: TypeArray 6(float) 13
+ 93: TypeArray 92 61
+ 94(uAofA): TypeStruct 93
+ 95: TypeArray 94(uAofA) 10
+ 96: TypeArray 95 59
+ 97: TypePointer Uniform 96
+ 98(nameAofA): 97(ptr) Variable Uniform
+ 99: TypePointer Uniform 6(float)
+ 4(main): 2 Function None 3
+ 5: Label
+ 45(param): 12(ptr) Variable Function
+ 48(u): 12(ptr) Variable Function
+ 52(param): 12(ptr) Variable Function
+ Store 39(outfloat) 40
+ 46: 11 Load 44(g5)
+ Store 45(param) 46
+ 47: 14 FunctionCall 17(foo(f1[5][7];) 45(param)
+ Store 42(g4) 47
+ 51: 50(ptr) AccessChain 48(u) 22 22
+ Store 51 49
+ 53: 11 Load 48(u)
+ Store 52(param) 53
+ 54: 14 FunctionCall 17(foo(f1[5][7];) 52(param)
+ 69: 21(int) Load 68(i)
+ 71: 21(int) Load 70(j)
+ 73: 21(int) Load 72(k)
+ 74: 21(int) Load 68(i)
+ 75: 21(int) Load 70(j)
+ 76: 21(int) Load 72(k)
+ 79: 6(float) Load 78(infloat)
+ 81: 80(ptr) AccessChain 66(many) 69 71 73 74 75 76
+ Store 81 79
+ 82: 21(int) Load 70(j)
+ 83: 21(int) Load 70(j)
+ 84: 21(int) Load 70(j)
+ 85: 21(int) Load 70(j)
+ 86: 21(int) Load 70(j)
+ 87: 21(int) Load 70(j)
+ 88: 80(ptr) AccessChain 66(many) 82 83 84 85 86 87
+ 89: 6(float) Load 88
+ 90: 6(float) Load 39(outfloat)
+ 91: 6(float) FAdd 90 89
+ Store 39(outfloat) 91
+ 100: 99(ptr) AccessChain 98(nameAofA) 28 22 25 25 32
+ 101: 6(float) Load 100
+ 102: 6(float) Load 39(outfloat)
+ 103: 6(float) FAdd 102 101
+ Store 39(outfloat) 103
+ Return
+ FunctionEnd
+17(foo(f1[5][7];): 14 Function None 15
+ 16(a): 12(ptr) FunctionParameter
+ 18: Label
+ 20(r): 19(ptr) Variable Function
+ 23: 19(ptr) AccessChain 16(a) 22
+ 24: 9 Load 23
+ Store 20(r) 24
+ 26: 19(ptr) AccessChain 16(a) 25
+ 27: 9 Load 26
+ 29: 19(ptr) AccessChain 16(a) 28
+ 30: 9 Load 29
+ 31: 9 Load 20(r)
+ 33: 19(ptr) AccessChain 16(a) 32
+ 34: 9 Load 33
+ 35: 14 CompositeConstruct 27 30 31 34
+ ReturnValue 35
+ FunctionEnd
diff --git a/chromium/third_party/glslang/src/Test/baseResults/spv.Operations.frag.out b/chromium/third_party/glslang/src/Test/baseResults/spv.Operations.frag.out
new file mode 100755
index 00000000000..f8b666d5377
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/spv.Operations.frag.out
@@ -0,0 +1,674 @@
+spv.Operations.frag
+Warning, version 450 is not yet complete; most version-specific features are present, but some are missing.
+
+
+Linked fragment stage:
+
+
+// Module Version 10000
+// Generated by (magic number): 80001
+// Id's are bound by 509
+
+ Capability Shader
+ 1: ExtInstImport "GLSL.std.450"
+ MemoryModel Logical GLSL450
+ EntryPoint Fragment 4 "main" 11 22 212 288 485 503 508
+ ExecutionMode 4 OriginUpperLeft
+ Source GLSL 450
+ Name 4 "main"
+ Name 9 "v"
+ Name 11 "uv4"
+ Name 20 "i"
+ Name 22 "ui"
+ Name 181 "ub41"
+ Name 188 "f"
+ Name 212 "uf"
+ Name 285 "u"
+ Name 288 "uui"
+ Name 305 "b"
+ Name 342 "ub42"
+ Name 485 "FragColor"
+ Name 503 "uiv4"
+ Name 505 "ub"
+ Name 508 "uuv4"
+ Decorate 22(ui) Flat
+ Decorate 288(uui) Flat
+ Decorate 503(uiv4) Flat
+ Decorate 508(uuv4) Flat
+ 2: TypeVoid
+ 3: TypeFunction 2
+ 6: TypeFloat 32
+ 7: TypeVector 6(float) 4
+ 8: TypePointer Function 7(fvec4)
+ 10: TypePointer Input 7(fvec4)
+ 11(uv4): 10(ptr) Variable Input
+ 18: TypeInt 32 1
+ 19: TypePointer Function 18(int)
+ 21: TypePointer Input 18(int)
+ 22(ui): 21(ptr) Variable Input
+ 141: TypeInt 32 0
+ 142: 141(int) Constant 0
+ 143: TypePointer Function 6(float)
+ 178: TypeBool
+ 179: TypeVector 178(bool) 4
+ 180: TypePointer Private 179(bvec4)
+ 181(ub41): 180(ptr) Variable Private
+ 211: TypePointer Input 6(float)
+ 212(uf): 211(ptr) Variable Input
+ 284: TypePointer Function 141(int)
+ 287: TypePointer Input 141(int)
+ 288(uui): 287(ptr) Variable Input
+ 304: TypePointer Function 178(bool)
+ 342(ub42): 180(ptr) Variable Private
+ 398: 18(int) Constant 2
+ 405: 18(int) Constant 1
+ 435: TypeVector 6(float) 3
+ 454: 6(float) Constant 1073741824
+ 461: 6(float) Constant 1065353216
+ 466: 18(int) Constant 66
+ 472: 18(int) Constant 17
+ 484: TypePointer Output 7(fvec4)
+ 485(FragColor): 484(ptr) Variable Output
+ 501: TypeVector 18(int) 4
+ 502: TypePointer Input 501(ivec4)
+ 503(uiv4): 502(ptr) Variable Input
+ 504: TypePointer Private 178(bool)
+ 505(ub): 504(ptr) Variable Private
+ 506: TypeVector 141(int) 4
+ 507: TypePointer Input 506(ivec4)
+ 508(uuv4): 507(ptr) Variable Input
+ 4(main): 2 Function None 3
+ 5: Label
+ 9(v): 8(ptr) Variable Function
+ 20(i): 19(ptr) Variable Function
+ 188(f): 143(ptr) Variable Function
+ 285(u): 284(ptr) Variable Function
+ 305(b): 304(ptr) Variable Function
+ 486: 8(ptr) Variable Function
+ 12: 7(fvec4) Load 11(uv4)
+ 13: 7(fvec4) ExtInst 1(GLSL.std.450) 11(Radians) 12
+ Store 9(v) 13
+ 14: 7(fvec4) Load 9(v)
+ 15: 7(fvec4) ExtInst 1(GLSL.std.450) 12(Degrees) 14
+ 16: 7(fvec4) Load 9(v)
+ 17: 7(fvec4) FAdd 16 15
+ Store 9(v) 17
+ 23: 18(int) Load 22(ui)
+ 24: 18(int) Load 22(ui)
+ 25: 18(int) IMul 23 24
+ Store 20(i) 25
+ 26: 7(fvec4) Load 9(v)
+ 27: 7(fvec4) ExtInst 1(GLSL.std.450) 13(Sin) 26
+ 28: 7(fvec4) Load 9(v)
+ 29: 7(fvec4) FAdd 28 27
+ Store 9(v) 29
+ 30: 7(fvec4) Load 9(v)
+ 31: 7(fvec4) ExtInst 1(GLSL.std.450) 14(Cos) 30
+ 32: 7(fvec4) Load 9(v)
+ 33: 7(fvec4) FAdd 32 31
+ Store 9(v) 33
+ 34: 7(fvec4) Load 9(v)
+ 35: 7(fvec4) ExtInst 1(GLSL.std.450) 15(Tan) 34
+ 36: 7(fvec4) Load 9(v)
+ 37: 7(fvec4) FAdd 36 35
+ Store 9(v) 37
+ 38: 7(fvec4) Load 9(v)
+ 39: 7(fvec4) ExtInst 1(GLSL.std.450) 16(Asin) 38
+ 40: 7(fvec4) Load 9(v)
+ 41: 7(fvec4) FAdd 40 39
+ Store 9(v) 41
+ 42: 7(fvec4) Load 9(v)
+ 43: 7(fvec4) ExtInst 1(GLSL.std.450) 17(Acos) 42
+ 44: 7(fvec4) Load 9(v)
+ 45: 7(fvec4) FAdd 44 43
+ Store 9(v) 45
+ 46: 7(fvec4) Load 9(v)
+ 47: 7(fvec4) ExtInst 1(GLSL.std.450) 18(Atan) 46
+ 48: 7(fvec4) Load 9(v)
+ 49: 7(fvec4) FAdd 48 47
+ Store 9(v) 49
+ 50: 7(fvec4) Load 9(v)
+ 51: 7(fvec4) ExtInst 1(GLSL.std.450) 19(Sinh) 50
+ 52: 7(fvec4) Load 9(v)
+ 53: 7(fvec4) FAdd 52 51
+ Store 9(v) 53
+ 54: 7(fvec4) Load 9(v)
+ 55: 7(fvec4) ExtInst 1(GLSL.std.450) 20(Cosh) 54
+ 56: 7(fvec4) Load 9(v)
+ 57: 7(fvec4) FAdd 56 55
+ Store 9(v) 57
+ 58: 7(fvec4) Load 9(v)
+ 59: 7(fvec4) ExtInst 1(GLSL.std.450) 21(Tanh) 58
+ 60: 7(fvec4) Load 9(v)
+ 61: 7(fvec4) FAdd 60 59
+ Store 9(v) 61
+ 62: 7(fvec4) Load 9(v)
+ 63: 7(fvec4) ExtInst 1(GLSL.std.450) 22(Asinh) 62
+ 64: 7(fvec4) Load 9(v)
+ 65: 7(fvec4) FAdd 64 63
+ Store 9(v) 65
+ 66: 7(fvec4) Load 9(v)
+ 67: 7(fvec4) ExtInst 1(GLSL.std.450) 23(Acosh) 66
+ 68: 7(fvec4) Load 9(v)
+ 69: 7(fvec4) FAdd 68 67
+ Store 9(v) 69
+ 70: 7(fvec4) Load 9(v)
+ 71: 7(fvec4) ExtInst 1(GLSL.std.450) 24(Atanh) 70
+ 72: 7(fvec4) Load 9(v)
+ 73: 7(fvec4) FAdd 72 71
+ Store 9(v) 73
+ 74: 7(fvec4) Load 9(v)
+ 75: 7(fvec4) Load 9(v)
+ 76: 7(fvec4) ExtInst 1(GLSL.std.450) 26(Pow) 74 75
+ 77: 7(fvec4) Load 9(v)
+ 78: 7(fvec4) FAdd 77 76
+ Store 9(v) 78
+ 79: 7(fvec4) Load 9(v)
+ 80: 7(fvec4) ExtInst 1(GLSL.std.450) 27(Exp) 79
+ 81: 7(fvec4) Load 9(v)
+ 82: 7(fvec4) FAdd 81 80
+ Store 9(v) 82
+ 83: 7(fvec4) Load 9(v)
+ 84: 7(fvec4) ExtInst 1(GLSL.std.450) 28(Log) 83
+ 85: 7(fvec4) Load 9(v)
+ 86: 7(fvec4) FAdd 85 84
+ Store 9(v) 86
+ 87: 7(fvec4) Load 9(v)
+ 88: 7(fvec4) ExtInst 1(GLSL.std.450) 29(Exp2) 87
+ 89: 7(fvec4) Load 9(v)
+ 90: 7(fvec4) FAdd 89 88
+ Store 9(v) 90
+ 91: 7(fvec4) Load 9(v)
+ 92: 7(fvec4) ExtInst 1(GLSL.std.450) 30(Log2) 91
+ 93: 7(fvec4) Load 9(v)
+ 94: 7(fvec4) FAdd 93 92
+ Store 9(v) 94
+ 95: 7(fvec4) Load 9(v)
+ 96: 7(fvec4) ExtInst 1(GLSL.std.450) 31(Sqrt) 95
+ 97: 7(fvec4) Load 9(v)
+ 98: 7(fvec4) FAdd 97 96
+ Store 9(v) 98
+ 99: 7(fvec4) Load 9(v)
+ 100: 7(fvec4) ExtInst 1(GLSL.std.450) 32(InverseSqrt) 99
+ 101: 7(fvec4) Load 9(v)
+ 102: 7(fvec4) FAdd 101 100
+ Store 9(v) 102
+ 103: 7(fvec4) Load 9(v)
+ 104: 7(fvec4) ExtInst 1(GLSL.std.450) 4(FAbs) 103
+ 105: 7(fvec4) Load 9(v)
+ 106: 7(fvec4) FAdd 105 104
+ Store 9(v) 106
+ 107: 7(fvec4) Load 9(v)
+ 108: 7(fvec4) ExtInst 1(GLSL.std.450) 6(FSign) 107
+ 109: 7(fvec4) Load 9(v)
+ 110: 7(fvec4) FAdd 109 108
+ Store 9(v) 110
+ 111: 7(fvec4) Load 9(v)
+ 112: 7(fvec4) ExtInst 1(GLSL.std.450) 8(Floor) 111
+ 113: 7(fvec4) Load 9(v)
+ 114: 7(fvec4) FAdd 113 112
+ Store 9(v) 114
+ 115: 7(fvec4) Load 9(v)
+ 116: 7(fvec4) ExtInst 1(GLSL.std.450) 3(Trunc) 115
+ 117: 7(fvec4) Load 9(v)
+ 118: 7(fvec4) FAdd 117 116
+ Store 9(v) 118
+ 119: 7(fvec4) Load 9(v)
+ 120: 7(fvec4) ExtInst 1(GLSL.std.450) 1(Round) 119
+ 121: 7(fvec4) Load 9(v)
+ 122: 7(fvec4) FAdd 121 120
+ Store 9(v) 122
+ 123: 7(fvec4) Load 9(v)
+ 124: 7(fvec4) ExtInst 1(GLSL.std.450) 2(RoundEven) 123
+ 125: 7(fvec4) Load 9(v)
+ 126: 7(fvec4) FAdd 125 124
+ Store 9(v) 126
+ 127: 7(fvec4) Load 9(v)
+ 128: 7(fvec4) ExtInst 1(GLSL.std.450) 9(Ceil) 127
+ 129: 7(fvec4) Load 9(v)
+ 130: 7(fvec4) FAdd 129 128
+ Store 9(v) 130
+ 131: 7(fvec4) Load 9(v)
+ 132: 7(fvec4) ExtInst 1(GLSL.std.450) 10(Fract) 131
+ 133: 7(fvec4) Load 9(v)
+ 134: 7(fvec4) FAdd 133 132
+ Store 9(v) 134
+ 135: 7(fvec4) Load 9(v)
+ 136: 7(fvec4) Load 9(v)
+ 137: 7(fvec4) FMod 135 136
+ 138: 7(fvec4) Load 9(v)
+ 139: 7(fvec4) FAdd 138 137
+ Store 9(v) 139
+ 140: 7(fvec4) Load 9(v)
+ 144: 143(ptr) AccessChain 9(v) 142
+ 145: 6(float) Load 144
+ 146: 7(fvec4) CompositeConstruct 145 145 145 145
+ 147: 7(fvec4) FMod 140 146
+ 148: 7(fvec4) Load 9(v)
+ 149: 7(fvec4) FAdd 148 147
+ Store 9(v) 149
+ 150: 7(fvec4) Load 9(v)
+ 151: 7(fvec4) ExtInst 1(GLSL.std.450) 35(Modf) 150 9(v)
+ 152: 7(fvec4) Load 9(v)
+ 153: 7(fvec4) FAdd 152 151
+ Store 9(v) 153
+ 154: 7(fvec4) Load 9(v)
+ 155: 7(fvec4) Load 11(uv4)
+ 156: 7(fvec4) ExtInst 1(GLSL.std.450) 37(FMin) 154 155
+ 157: 7(fvec4) Load 9(v)
+ 158: 7(fvec4) FAdd 157 156
+ Store 9(v) 158
+ 159: 7(fvec4) Load 9(v)
+ 160: 7(fvec4) Load 11(uv4)
+ 161: 7(fvec4) ExtInst 1(GLSL.std.450) 40(FMax) 159 160
+ 162: 7(fvec4) Load 9(v)
+ 163: 7(fvec4) FAdd 162 161
+ Store 9(v) 163
+ 164: 7(fvec4) Load 9(v)
+ 165: 7(fvec4) Load 11(uv4)
+ 166: 7(fvec4) Load 11(uv4)
+ 167: 7(fvec4) ExtInst 1(GLSL.std.450) 43(FClamp) 164 165 166
+ 168: 7(fvec4) Load 9(v)
+ 169: 7(fvec4) FAdd 168 167
+ Store 9(v) 169
+ 170: 7(fvec4) Load 9(v)
+ 171: 7(fvec4) Load 9(v)
+ 172: 7(fvec4) Load 9(v)
+ 173: 7(fvec4) ExtInst 1(GLSL.std.450) 46(FMix) 170 171 172
+ 174: 7(fvec4) Load 9(v)
+ 175: 7(fvec4) FAdd 174 173
+ Store 9(v) 175
+ 176: 7(fvec4) Load 9(v)
+ 177: 7(fvec4) Load 9(v)
+ 182: 179(bvec4) Load 181(ub41)
+ 183: 7(fvec4) Select 182 177 176
+ 184: 7(fvec4) Load 9(v)
+ 185: 7(fvec4) FAdd 184 183
+ Store 9(v) 185
+ 186: 7(fvec4) Load 9(v)
+ 187: 7(fvec4) Load 9(v)
+ 189: 6(float) Load 188(f)
+ 190: 7(fvec4) CompositeConstruct 189 189 189 189
+ 191: 7(fvec4) ExtInst 1(GLSL.std.450) 46(FMix) 186 187 190
+ 192: 7(fvec4) Load 9(v)
+ 193: 7(fvec4) FAdd 192 191
+ Store 9(v) 193
+ 194: 7(fvec4) Load 9(v)
+ 195: 7(fvec4) Load 11(uv4)
+ 196: 7(fvec4) Load 9(v)
+ 197: 7(fvec4) ExtInst 1(GLSL.std.450) 50(Fma) 194 195 196
+ 198: 7(fvec4) Load 9(v)
+ 199: 7(fvec4) FAdd 198 197
+ Store 9(v) 199
+ 200: 7(fvec4) Load 9(v)
+ 201: 7(fvec4) Load 9(v)
+ 202: 7(fvec4) ExtInst 1(GLSL.std.450) 48(Step) 200 201
+ 203: 7(fvec4) Load 9(v)
+ 204: 7(fvec4) FAdd 203 202
+ Store 9(v) 204
+ 205: 7(fvec4) Load 9(v)
+ 206: 7(fvec4) Load 9(v)
+ 207: 7(fvec4) Load 9(v)
+ 208: 7(fvec4) ExtInst 1(GLSL.std.450) 49(SmoothStep) 205 206 207
+ 209: 7(fvec4) Load 9(v)
+ 210: 7(fvec4) FAdd 209 208
+ Store 9(v) 210
+ 213: 6(float) Load 212(uf)
+ 214: 7(fvec4) Load 9(v)
+ 215: 7(fvec4) CompositeConstruct 213 213 213 213
+ 216: 7(fvec4) ExtInst 1(GLSL.std.450) 48(Step) 215 214
+ 217: 7(fvec4) Load 9(v)
+ 218: 7(fvec4) FAdd 217 216
+ Store 9(v) 218
+ 219: 6(float) Load 212(uf)
+ 220: 6(float) Load 212(uf)
+ 221: 7(fvec4) Load 9(v)
+ 222: 7(fvec4) CompositeConstruct 219 219 219 219
+ 223: 7(fvec4) CompositeConstruct 220 220 220 220
+ 224: 7(fvec4) ExtInst 1(GLSL.std.450) 49(SmoothStep) 222 223 221
+ 225: 7(fvec4) Load 9(v)
+ 226: 7(fvec4) FAdd 225 224
+ Store 9(v) 226
+ 227: 7(fvec4) Load 9(v)
+ 228: 7(fvec4) ExtInst 1(GLSL.std.450) 69(Normalize) 227
+ 229: 7(fvec4) Load 9(v)
+ 230: 7(fvec4) FAdd 229 228
+ Store 9(v) 230
+ 231: 7(fvec4) Load 9(v)
+ 232: 7(fvec4) Load 9(v)
+ 233: 7(fvec4) Load 9(v)
+ 234: 7(fvec4) ExtInst 1(GLSL.std.450) 70(FaceForward) 231 232 233
+ 235: 7(fvec4) Load 9(v)
+ 236: 7(fvec4) FAdd 235 234
+ Store 9(v) 236
+ 237: 7(fvec4) Load 9(v)
+ 238: 7(fvec4) Load 9(v)
+ 239: 7(fvec4) ExtInst 1(GLSL.std.450) 71(Reflect) 237 238
+ 240: 7(fvec4) Load 9(v)
+ 241: 7(fvec4) FAdd 240 239
+ Store 9(v) 241
+ 242: 7(fvec4) Load 9(v)
+ 243: 7(fvec4) Load 9(v)
+ 244: 6(float) Load 212(uf)
+ 245: 7(fvec4) ExtInst 1(GLSL.std.450) 72(Refract) 242 243 244
+ 246: 7(fvec4) Load 9(v)
+ 247: 7(fvec4) FAdd 246 245
+ Store 9(v) 247
+ 248: 7(fvec4) Load 9(v)
+ 249: 7(fvec4) DPdx 248
+ 250: 7(fvec4) Load 9(v)
+ 251: 7(fvec4) FAdd 250 249
+ Store 9(v) 251
+ 252: 7(fvec4) Load 9(v)
+ 253: 7(fvec4) DPdy 252
+ 254: 7(fvec4) Load 9(v)
+ 255: 7(fvec4) FAdd 254 253
+ Store 9(v) 255
+ 256: 7(fvec4) Load 9(v)
+ 257: 7(fvec4) Fwidth 256
+ 258: 7(fvec4) Load 9(v)
+ 259: 7(fvec4) FAdd 258 257
+ Store 9(v) 259
+ 260: 18(int) Load 22(ui)
+ 261: 18(int) ExtInst 1(GLSL.std.450) 5(SAbs) 260
+ 262: 18(int) Load 20(i)
+ 263: 18(int) IAdd 262 261
+ Store 20(i) 263
+ 264: 18(int) Load 20(i)
+ 265: 18(int) ExtInst 1(GLSL.std.450) 7(SSign) 264
+ 266: 18(int) Load 20(i)
+ 267: 18(int) IAdd 266 265
+ Store 20(i) 267
+ 268: 18(int) Load 20(i)
+ 269: 18(int) Load 22(ui)
+ 270: 18(int) ExtInst 1(GLSL.std.450) 39(SMin) 268 269
+ 271: 18(int) Load 20(i)
+ 272: 18(int) IAdd 271 270
+ Store 20(i) 272
+ 273: 18(int) Load 20(i)
+ 274: 18(int) Load 22(ui)
+ 275: 18(int) ExtInst 1(GLSL.std.450) 42(SMax) 273 274
+ 276: 18(int) Load 20(i)
+ 277: 18(int) IAdd 276 275
+ Store 20(i) 277
+ 278: 18(int) Load 20(i)
+ 279: 18(int) Load 22(ui)
+ 280: 18(int) Load 22(ui)
+ 281: 18(int) ExtInst 1(GLSL.std.450) 45(SClamp) 278 279 280
+ 282: 18(int) Load 20(i)
+ 283: 18(int) IAdd 282 281
+ Store 20(i) 283
+ 286: 141(int) Load 285(u)
+ 289: 141(int) Load 288(uui)
+ 290: 141(int) ExtInst 1(GLSL.std.450) 38(UMin) 286 289
+ 291: 141(int) Load 285(u)
+ 292: 141(int) IAdd 291 290
+ Store 285(u) 292
+ 293: 141(int) Load 285(u)
+ 294: 141(int) Load 288(uui)
+ 295: 141(int) ExtInst 1(GLSL.std.450) 41(UMax) 293 294
+ 296: 141(int) Load 285(u)
+ 297: 141(int) IAdd 296 295
+ Store 285(u) 297
+ 298: 141(int) Load 285(u)
+ 299: 141(int) Load 288(uui)
+ 300: 141(int) Load 288(uui)
+ 301: 141(int) ExtInst 1(GLSL.std.450) 44(UClamp) 298 299 300
+ 302: 141(int) Load 285(u)
+ 303: 141(int) IAdd 302 301
+ Store 285(u) 303
+ 306: 6(float) Load 212(uf)
+ 307: 178(bool) IsNan 306
+ Store 305(b) 307
+ 308: 6(float) Load 188(f)
+ 309: 178(bool) IsInf 308
+ Store 305(b) 309
+ 310: 7(fvec4) Load 9(v)
+ 311: 7(fvec4) Load 11(uv4)
+ 312: 179(bvec4) FOrdLessThan 310 311
+ 313: 178(bool) Any 312
+ Store 305(b) 313
+ 314: 178(bool) Load 305(b)
+ SelectionMerge 316 None
+ BranchConditional 314 315 316
+ 315: Label
+ 317: 7(fvec4) Load 9(v)
+ 318: 7(fvec4) Load 11(uv4)
+ 319: 179(bvec4) FOrdLessThanEqual 317 318
+ 320: 178(bool) Any 319
+ Branch 316
+ 316: Label
+ 321: 178(bool) Phi 314 5 320 315
+ Store 305(b) 321
+ 322: 178(bool) Load 305(b)
+ SelectionMerge 324 None
+ BranchConditional 322 323 324
+ 323: Label
+ 325: 7(fvec4) Load 9(v)
+ 326: 7(fvec4) Load 11(uv4)
+ 327: 179(bvec4) FOrdGreaterThan 325 326
+ 328: 178(bool) Any 327
+ Branch 324
+ 324: Label
+ 329: 178(bool) Phi 322 316 328 323
+ Store 305(b) 329
+ 330: 178(bool) Load 305(b)
+ SelectionMerge 332 None
+ BranchConditional 330 331 332
+ 331: Label
+ 333: 7(fvec4) Load 9(v)
+ 334: 7(fvec4) Load 11(uv4)
+ 335: 179(bvec4) FOrdGreaterThanEqual 333 334
+ 336: 178(bool) Any 335
+ Branch 332
+ 332: Label
+ 337: 178(bool) Phi 330 324 336 331
+ Store 305(b) 337
+ 338: 178(bool) Load 305(b)
+ SelectionMerge 340 None
+ BranchConditional 338 339 340
+ 339: Label
+ 341: 179(bvec4) Load 181(ub41)
+ 343: 179(bvec4) Load 342(ub42)
+ 344: 179(bvec4) LogicalEqual 341 343
+ 345: 178(bool) Any 344
+ Branch 340
+ 340: Label
+ 346: 178(bool) Phi 338 332 345 339
+ Store 305(b) 346
+ 347: 178(bool) Load 305(b)
+ SelectionMerge 349 None
+ BranchConditional 347 348 349
+ 348: Label
+ 350: 179(bvec4) Load 181(ub41)
+ 351: 179(bvec4) Load 342(ub42)
+ 352: 179(bvec4) LogicalNotEqual 350 351
+ 353: 178(bool) Any 352
+ Branch 349
+ 349: Label
+ 354: 178(bool) Phi 347 340 353 348
+ Store 305(b) 354
+ 355: 178(bool) Load 305(b)
+ 356: 179(bvec4) Load 181(ub41)
+ 357: 178(bool) Any 356
+ 358: 178(bool) LogicalAnd 355 357
+ Store 305(b) 358
+ 359: 178(bool) Load 305(b)
+ 360: 179(bvec4) Load 181(ub41)
+ 361: 178(bool) All 360
+ 362: 178(bool) LogicalAnd 359 361
+ Store 305(b) 362
+ 363: 178(bool) Load 305(b)
+ SelectionMerge 365 None
+ BranchConditional 363 364 365
+ 364: Label
+ 366: 179(bvec4) Load 181(ub41)
+ 367: 179(bvec4) LogicalNot 366
+ 368: 178(bool) Any 367
+ Branch 365
+ 365: Label
+ 369: 178(bool) Phi 363 349 368 364
+ Store 305(b) 369
+ 370: 18(int) Load 20(i)
+ 371: 18(int) Load 22(ui)
+ 372: 18(int) IAdd 370 371
+ 373: 18(int) Load 20(i)
+ 374: 18(int) IMul 372 373
+ 375: 18(int) Load 22(ui)
+ 376: 18(int) ISub 374 375
+ 377: 18(int) Load 20(i)
+ 378: 18(int) SDiv 376 377
+ Store 20(i) 378
+ 379: 18(int) Load 20(i)
+ 380: 18(int) Load 22(ui)
+ 381: 18(int) SMod 379 380
+ Store 20(i) 381
+ 382: 18(int) Load 20(i)
+ 383: 18(int) Load 22(ui)
+ 384: 178(bool) IEqual 382 383
+ 385: 178(bool) LogicalNot 384
+ SelectionMerge 387 None
+ BranchConditional 385 386 387
+ 386: Label
+ 388: 18(int) Load 20(i)
+ 389: 18(int) Load 22(ui)
+ 390: 178(bool) INotEqual 388 389
+ SelectionMerge 392 None
+ BranchConditional 390 391 392
+ 391: Label
+ 393: 18(int) Load 20(i)
+ 394: 18(int) Load 22(ui)
+ 395: 178(bool) IEqual 393 394
+ Branch 392
+ 392: Label
+ 396: 178(bool) Phi 390 386 395 391
+ 397: 18(int) Load 20(i)
+ 399: 178(bool) INotEqual 397 398
+ 400: 178(bool) LogicalNotEqual 396 399
+ Branch 387
+ 387: Label
+ 401: 178(bool) Phi 384 365 400 392
+ SelectionMerge 403 None
+ BranchConditional 401 402 403
+ 402: Label
+ 404: 18(int) Load 20(i)
+ 406: 18(int) IAdd 404 405
+ Store 20(i) 406
+ Branch 403
+ 403: Label
+ 407: 6(float) Load 212(uf)
+ 408: 6(float) Load 212(uf)
+ 409: 6(float) FAdd 407 408
+ 410: 6(float) Load 212(uf)
+ 411: 6(float) FMul 409 410
+ 412: 6(float) Load 212(uf)
+ 413: 6(float) FSub 411 412
+ 414: 6(float) Load 212(uf)
+ 415: 6(float) FDiv 413 414
+ Store 188(f) 415
+ 416: 7(fvec4) Load 9(v)
+ 417: 6(float) ExtInst 1(GLSL.std.450) 66(Length) 416
+ 418: 6(float) Load 188(f)
+ 419: 6(float) FAdd 418 417
+ Store 188(f) 419
+ 420: 7(fvec4) Load 9(v)
+ 421: 7(fvec4) Load 9(v)
+ 422: 6(float) ExtInst 1(GLSL.std.450) 67(Distance) 420 421
+ 423: 6(float) Load 188(f)
+ 424: 6(float) FAdd 423 422
+ Store 188(f) 424
+ 425: 7(fvec4) Load 9(v)
+ 426: 7(fvec4) Load 9(v)
+ 427: 6(float) Dot 425 426
+ 428: 6(float) Load 188(f)
+ 429: 6(float) FAdd 428 427
+ Store 188(f) 429
+ 430: 6(float) Load 188(f)
+ 431: 6(float) Load 212(uf)
+ 432: 6(float) FMul 430 431
+ 433: 6(float) Load 188(f)
+ 434: 6(float) FAdd 433 432
+ Store 188(f) 434
+ 436: 7(fvec4) Load 9(v)
+ 437: 435(fvec3) VectorShuffle 436 436 0 1 2
+ 438: 7(fvec4) Load 9(v)
+ 439: 435(fvec3) VectorShuffle 438 438 0 1 2
+ 440: 435(fvec3) ExtInst 1(GLSL.std.450) 68(Cross) 437 439
+ 441: 6(float) CompositeExtract 440 0
+ 442: 6(float) Load 188(f)
+ 443: 6(float) FAdd 442 441
+ Store 188(f) 443
+ 444: 6(float) Load 188(f)
+ 445: 6(float) Load 212(uf)
+ 446: 178(bool) FOrdEqual 444 445
+ 447: 178(bool) LogicalNot 446
+ SelectionMerge 449 None
+ BranchConditional 447 448 449
+ 448: Label
+ 450: 6(float) Load 188(f)
+ 451: 6(float) Load 212(uf)
+ 452: 178(bool) FOrdNotEqual 450 451
+ 453: 6(float) Load 188(f)
+ 455: 178(bool) FOrdNotEqual 453 454
+ 456: 178(bool) LogicalAnd 452 455
+ Branch 449
+ 449: Label
+ 457: 178(bool) Phi 446 403 456 448
+ SelectionMerge 459 None
+ BranchConditional 457 458 459
+ 458: Label
+ 460: 6(float) Load 188(f)
+ 462: 6(float) FAdd 460 461
+ Store 188(f) 462
+ Branch 459
+ 459: Label
+ 463: 18(int) Load 22(ui)
+ 464: 18(int) Load 20(i)
+ 465: 18(int) BitwiseAnd 464 463
+ Store 20(i) 465
+ 467: 18(int) Load 20(i)
+ 468: 18(int) BitwiseOr 467 466
+ Store 20(i) 468
+ 469: 18(int) Load 22(ui)
+ 470: 18(int) Load 20(i)
+ 471: 18(int) BitwiseXor 470 469
+ Store 20(i) 471
+ 473: 18(int) Load 20(i)
+ 474: 18(int) SMod 473 472
+ Store 20(i) 474
+ 475: 18(int) Load 20(i)
+ 476: 18(int) ShiftRightArithmetic 475 398
+ Store 20(i) 476
+ 477: 18(int) Load 22(ui)
+ 478: 18(int) Load 20(i)
+ 479: 18(int) ShiftLeftLogical 478 477
+ Store 20(i) 479
+ 480: 18(int) Load 20(i)
+ 481: 18(int) Not 480
+ Store 20(i) 481
+ 482: 178(bool) Load 305(b)
+ 483: 178(bool) LogicalNot 482
+ Store 305(b) 483
+ 487: 178(bool) Load 305(b)
+ SelectionMerge 489 None
+ BranchConditional 487 488 498
+ 488: Label
+ 490: 18(int) Load 20(i)
+ 491: 6(float) ConvertSToF 490
+ 492: 7(fvec4) CompositeConstruct 491 491 491 491
+ 493: 6(float) Load 188(f)
+ 494: 7(fvec4) CompositeConstruct 493 493 493 493
+ 495: 7(fvec4) FAdd 492 494
+ 496: 7(fvec4) Load 9(v)
+ 497: 7(fvec4) FAdd 495 496
+ Store 486 497
+ Branch 489
+ 498: Label
+ 499: 7(fvec4) Load 9(v)
+ Store 486 499
+ Branch 489
+ 489: Label
+ 500: 7(fvec4) Load 486
+ Store 485(FragColor) 500
+ Return
+ FunctionEnd
diff --git a/chromium/third_party/glslang/src/Test/baseResults/spv.accessChain.frag.out b/chromium/third_party/glslang/src/Test/baseResults/spv.accessChain.frag.out
new file mode 100755
index 00000000000..e9a9d81bc26
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/spv.accessChain.frag.out
@@ -0,0 +1,323 @@
+spv.accessChain.frag
+Warning, version 420 is not yet complete; most version-specific features are present, but some are missing.
+
+
+Linked fragment stage:
+
+
+// Module Version 10000
+// Generated by (magic number): 80001
+// Id's are bound by 197
+
+ Capability Shader
+ 1: ExtInstImport "GLSL.std.450"
+ MemoryModel Logical GLSL450
+ EntryPoint Fragment 4 "main" 65 149
+ ExecutionMode 4 OriginUpperLeft
+ Source GLSL 420
+ Name 4 "main"
+ Name 8 "S"
+ MemberName 8(S) 0 "color"
+ Name 11 "GetColor1(struct-S-vf31;"
+ Name 10 "i"
+ Name 18 "GetColor2(struct-S-vf31;i1;"
+ Name 16 "i"
+ Name 17 "comp"
+ Name 22 "GetColor3(struct-S-vf31;i1;"
+ Name 20 "i"
+ Name 21 "comp"
+ Name 26 "GetColor4(struct-S-vf31;i1;"
+ Name 24 "i"
+ Name 25 "comp"
+ Name 30 "GetColor5(struct-S-vf31;i1;"
+ Name 28 "i"
+ Name 29 "comp"
+ Name 34 "GetColor6(struct-S-vf31;i1;"
+ Name 32 "i"
+ Name 33 "comp"
+ Name 38 "GetColor7(struct-S-vf31;i1;"
+ Name 36 "i"
+ Name 37 "comp"
+ Name 42 "GetColor8(struct-S-vf31;i1;"
+ Name 40 "i"
+ Name 41 "comp"
+ Name 46 "GetColor9(struct-S-vf31;i1;"
+ Name 44 "i"
+ Name 45 "comp"
+ Name 50 "GetColor10(struct-S-vf31;i1;"
+ Name 48 "i"
+ Name 49 "comp"
+ Name 54 "GetColor11(struct-S-vf31;i1;"
+ Name 52 "i"
+ Name 53 "comp"
+ Name 58 "GetColor12(struct-S-vf31;i1;"
+ Name 56 "i"
+ Name 57 "comp"
+ Name 62 "GetColor13(struct-S-vf31;i1;"
+ Name 60 "i"
+ Name 61 "comp"
+ Name 65 "OutColor"
+ Name 144 "s"
+ Name 149 "u"
+ Name 150 "param"
+ Name 154 "param"
+ Name 158 "param"
+ Name 162 "param"
+ Name 166 "param"
+ Name 170 "param"
+ Name 174 "param"
+ Name 178 "param"
+ Name 182 "param"
+ Name 186 "param"
+ Name 190 "param"
+ Name 194 "param"
+ Decorate 65(OutColor) Location 0
+ Decorate 149(u) Flat
+ 2: TypeVoid
+ 3: TypeFunction 2
+ 6: TypeFloat 32
+ 7: TypeVector 6(float) 3
+ 8(S): TypeStruct 7(fvec3)
+ 9: TypeFunction 2 8(S)
+ 13: TypeInt 32 1
+ 14: TypePointer Function 13(int)
+ 15: TypeFunction 2 8(S) 14(ptr)
+ 64: TypePointer Output 7(fvec3)
+ 65(OutColor): 64(ptr) Variable Output
+ 66: 13(int) Constant 0
+ 67: TypeInt 32 0
+ 68: 67(int) Constant 0
+ 95: TypeVector 6(float) 2
+ 109: 67(int) Constant 2
+ 136: TypePointer Output 6(float)
+ 141: 6(float) Constant 0
+ 142: 7(fvec3) ConstantComposite 141 141 141
+ 143: TypePointer Function 8(S)
+ 148: TypePointer Input 13(int)
+ 149(u): 148(ptr) Variable Input
+ 4(main): 2 Function None 3
+ 5: Label
+ 144(s): 143(ptr) Variable Function
+ 150(param): 14(ptr) Variable Function
+ 154(param): 14(ptr) Variable Function
+ 158(param): 14(ptr) Variable Function
+ 162(param): 14(ptr) Variable Function
+ 166(param): 14(ptr) Variable Function
+ 170(param): 14(ptr) Variable Function
+ 174(param): 14(ptr) Variable Function
+ 178(param): 14(ptr) Variable Function
+ 182(param): 14(ptr) Variable Function
+ 186(param): 14(ptr) Variable Function
+ 190(param): 14(ptr) Variable Function
+ 194(param): 14(ptr) Variable Function
+ Store 65(OutColor) 142
+ 145: 8(S) Load 144(s)
+ 146: 2 FunctionCall 11(GetColor1(struct-S-vf31;) 145
+ 147: 8(S) Load 144(s)
+ 151: 13(int) Load 149(u)
+ Store 150(param) 151
+ 152: 2 FunctionCall 18(GetColor2(struct-S-vf31;i1;) 147 150(param)
+ 153: 8(S) Load 144(s)
+ 155: 13(int) Load 149(u)
+ Store 154(param) 155
+ 156: 2 FunctionCall 22(GetColor3(struct-S-vf31;i1;) 153 154(param)
+ 157: 8(S) Load 144(s)
+ 159: 13(int) Load 149(u)
+ Store 158(param) 159
+ 160: 2 FunctionCall 26(GetColor4(struct-S-vf31;i1;) 157 158(param)
+ 161: 8(S) Load 144(s)
+ 163: 13(int) Load 149(u)
+ Store 162(param) 163
+ 164: 2 FunctionCall 30(GetColor5(struct-S-vf31;i1;) 161 162(param)
+ 165: 8(S) Load 144(s)
+ 167: 13(int) Load 149(u)
+ Store 166(param) 167
+ 168: 2 FunctionCall 34(GetColor6(struct-S-vf31;i1;) 165 166(param)
+ 169: 8(S) Load 144(s)
+ 171: 13(int) Load 149(u)
+ Store 170(param) 171
+ 172: 2 FunctionCall 38(GetColor7(struct-S-vf31;i1;) 169 170(param)
+ 173: 8(S) Load 144(s)
+ 175: 13(int) Load 149(u)
+ Store 174(param) 175
+ 176: 2 FunctionCall 42(GetColor8(struct-S-vf31;i1;) 173 174(param)
+ 177: 8(S) Load 144(s)
+ 179: 13(int) Load 149(u)
+ Store 178(param) 179
+ 180: 2 FunctionCall 46(GetColor9(struct-S-vf31;i1;) 177 178(param)
+ 181: 8(S) Load 144(s)
+ 183: 13(int) Load 149(u)
+ Store 182(param) 183
+ 184: 2 FunctionCall 50(GetColor10(struct-S-vf31;i1;) 181 182(param)
+ 185: 8(S) Load 144(s)
+ 187: 13(int) Load 149(u)
+ Store 186(param) 187
+ 188: 2 FunctionCall 54(GetColor11(struct-S-vf31;i1;) 185 186(param)
+ 189: 8(S) Load 144(s)
+ 191: 13(int) Load 149(u)
+ Store 190(param) 191
+ 192: 2 FunctionCall 58(GetColor12(struct-S-vf31;i1;) 189 190(param)
+ 193: 8(S) Load 144(s)
+ 195: 13(int) Load 149(u)
+ Store 194(param) 195
+ 196: 2 FunctionCall 62(GetColor13(struct-S-vf31;i1;) 193 194(param)
+ Return
+ FunctionEnd
+11(GetColor1(struct-S-vf31;): 2 Function None 9
+ 10(i): 8(S) FunctionParameter
+ 12: Label
+ 69: 6(float) CompositeExtract 10(i) 0 0
+ 70: 7(fvec3) Load 65(OutColor)
+ 71: 7(fvec3) CompositeConstruct 69 69 69
+ 72: 7(fvec3) FAdd 70 71
+ Store 65(OutColor) 72
+ Return
+ FunctionEnd
+18(GetColor2(struct-S-vf31;i1;): 2 Function None 15
+ 16(i): 8(S) FunctionParameter
+ 17(comp): 14(ptr) FunctionParameter
+ 19: Label
+ 73: 13(int) Load 17(comp)
+ 74: 7(fvec3) CompositeExtract 16(i) 0
+ 75: 6(float) VectorExtractDynamic 74 73
+ 76: 7(fvec3) Load 65(OutColor)
+ 77: 7(fvec3) CompositeConstruct 75 75 75
+ 78: 7(fvec3) FAdd 76 77
+ Store 65(OutColor) 78
+ Return
+ FunctionEnd
+22(GetColor3(struct-S-vf31;i1;): 2 Function None 15
+ 20(i): 8(S) FunctionParameter
+ 21(comp): 14(ptr) FunctionParameter
+ 23: Label
+ 79: 13(int) Load 21(comp)
+ 80: 7(fvec3) CompositeExtract 20(i) 0
+ 81: 6(float) VectorExtractDynamic 80 79
+ 82: 7(fvec3) Load 65(OutColor)
+ 83: 7(fvec3) CompositeConstruct 81 81 81
+ 84: 7(fvec3) FAdd 82 83
+ Store 65(OutColor) 84
+ Return
+ FunctionEnd
+26(GetColor4(struct-S-vf31;i1;): 2 Function None 15
+ 24(i): 8(S) FunctionParameter
+ 25(comp): 14(ptr) FunctionParameter
+ 27: Label
+ 85: 13(int) Load 25(comp)
+ 86: 7(fvec3) CompositeExtract 24(i) 0
+ 87: 6(float) VectorExtractDynamic 86 85
+ 88: 7(fvec3) Load 65(OutColor)
+ 89: 7(fvec3) CompositeConstruct 87 87 87
+ 90: 7(fvec3) FAdd 88 89
+ Store 65(OutColor) 90
+ Return
+ FunctionEnd
+30(GetColor5(struct-S-vf31;i1;): 2 Function None 15
+ 28(i): 8(S) FunctionParameter
+ 29(comp): 14(ptr) FunctionParameter
+ 31: Label
+ 91: 7(fvec3) CompositeExtract 28(i) 0
+ 92: 7(fvec3) Load 65(OutColor)
+ 93: 7(fvec3) FAdd 92 91
+ Store 65(OutColor) 93
+ Return
+ FunctionEnd
+34(GetColor6(struct-S-vf31;i1;): 2 Function None 15
+ 32(i): 8(S) FunctionParameter
+ 33(comp): 14(ptr) FunctionParameter
+ 35: Label
+ 94: 13(int) Load 33(comp)
+ 96: 7(fvec3) CompositeExtract 32(i) 0
+ 97: 95(fvec2) VectorShuffle 96 96 1 0
+ 98: 6(float) VectorExtractDynamic 97 94
+ 99: 7(fvec3) Load 65(OutColor)
+ 100: 7(fvec3) CompositeConstruct 98 98 98
+ 101: 7(fvec3) FAdd 99 100
+ Store 65(OutColor) 101
+ Return
+ FunctionEnd
+38(GetColor7(struct-S-vf31;i1;): 2 Function None 15
+ 36(i): 8(S) FunctionParameter
+ 37(comp): 14(ptr) FunctionParameter
+ 39: Label
+ 102: 7(fvec3) CompositeExtract 36(i) 0
+ 103: 95(fvec2) VectorShuffle 102 102 0 1
+ 104: 7(fvec3) Load 65(OutColor)
+ 105: 95(fvec2) VectorShuffle 104 104 0 1
+ 106: 95(fvec2) FAdd 105 103
+ 107: 7(fvec3) Load 65(OutColor)
+ 108: 7(fvec3) VectorShuffle 107 106 3 4 2
+ Store 65(OutColor) 108
+ Return
+ FunctionEnd
+42(GetColor8(struct-S-vf31;i1;): 2 Function None 15
+ 40(i): 8(S) FunctionParameter
+ 41(comp): 14(ptr) FunctionParameter
+ 43: Label
+ 110: 6(float) CompositeExtract 40(i) 0 2
+ 111: 7(fvec3) Load 65(OutColor)
+ 112: 7(fvec3) CompositeConstruct 110 110 110
+ 113: 7(fvec3) FAdd 111 112
+ Store 65(OutColor) 113
+ Return
+ FunctionEnd
+46(GetColor9(struct-S-vf31;i1;): 2 Function None 15
+ 44(i): 8(S) FunctionParameter
+ 45(comp): 14(ptr) FunctionParameter
+ 47: Label
+ 114: 7(fvec3) CompositeExtract 44(i) 0
+ 115: 7(fvec3) Load 65(OutColor)
+ 116: 7(fvec3) VectorShuffle 115 115 2 0 1
+ 117: 7(fvec3) FAdd 116 114
+ 118: 7(fvec3) Load 65(OutColor)
+ 119: 7(fvec3) VectorShuffle 118 117 4 5 3
+ Store 65(OutColor) 119
+ Return
+ FunctionEnd
+50(GetColor10(struct-S-vf31;i1;): 2 Function None 15
+ 48(i): 8(S) FunctionParameter
+ 49(comp): 14(ptr) FunctionParameter
+ 51: Label
+ 120: 7(fvec3) CompositeExtract 48(i) 0
+ 121: 95(fvec2) VectorShuffle 120 120 0 1
+ 122: 7(fvec3) Load 65(OutColor)
+ 123: 95(fvec2) VectorShuffle 122 122 2 1
+ 124: 95(fvec2) FAdd 123 121
+ 125: 7(fvec3) Load 65(OutColor)
+ 126: 7(fvec3) VectorShuffle 125 124 0 4 3
+ Store 65(OutColor) 126
+ Return
+ FunctionEnd
+54(GetColor11(struct-S-vf31;i1;): 2 Function None 15
+ 52(i): 8(S) FunctionParameter
+ 53(comp): 14(ptr) FunctionParameter
+ 55: Label
+ 127: 7(fvec3) CompositeExtract 52(i) 0
+ 128: 95(fvec2) VectorShuffle 127 127 0 1
+ 129: 7(fvec3) Load 65(OutColor)
+ 130: 95(fvec2) VectorShuffle 129 129 0 2
+ 131: 95(fvec2) FAdd 130 128
+ 132: 7(fvec3) Load 65(OutColor)
+ 133: 7(fvec3) VectorShuffle 132 131 3 1 4
+ Store 65(OutColor) 133
+ Return
+ FunctionEnd
+58(GetColor12(struct-S-vf31;i1;): 2 Function None 15
+ 56(i): 8(S) FunctionParameter
+ 57(comp): 14(ptr) FunctionParameter
+ 59: Label
+ 134: 13(int) Load 57(comp)
+ 135: 6(float) CompositeExtract 56(i) 0 0
+ 137: 136(ptr) AccessChain 65(OutColor) 134
+ 138: 6(float) Load 137
+ 139: 6(float) FAdd 138 135
+ 140: 136(ptr) AccessChain 65(OutColor) 134
+ Store 140 139
+ Return
+ FunctionEnd
+62(GetColor13(struct-S-vf31;i1;): 2 Function None 15
+ 60(i): 8(S) FunctionParameter
+ 61(comp): 14(ptr) FunctionParameter
+ 63: Label
+ Return
+ FunctionEnd
diff --git a/chromium/third_party/glslang/src/Test/baseResults/spv.aggOps.frag.out b/chromium/third_party/glslang/src/Test/baseResults/spv.aggOps.frag.out
new file mode 100644
index 00000000000..4888bea4950
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/spv.aggOps.frag.out
@@ -0,0 +1,310 @@
+spv.aggOps.frag
+Warning, version 450 is not yet complete; most version-specific features are present, but some are missing.
+
+
+Linked fragment stage:
+
+
+// Module Version 10000
+// Generated by (magic number): 80001
+// Id's are bound by 215
+
+ Capability Shader
+ 1: ExtInstImport "GLSL.std.450"
+ MemoryModel Logical GLSL450
+ EntryPoint Fragment 4 "main" 16 41 101 213
+ ExecutionMode 4 OriginUpperLeft
+ Source GLSL 450
+ Name 4 "main"
+ Name 8 "s1"
+ MemberName 8(s1) 0 "i"
+ MemberName 8(s1) 1 "f"
+ Name 13 "a"
+ Name 16 "u"
+ Name 37 "b"
+ Name 41 "w"
+ Name 55 "s1"
+ MemberName 55(s1) 0 "i"
+ MemberName 55(s1) 1 "f"
+ Name 56 "s2"
+ MemberName 56(s2) 0 "i"
+ MemberName 56(s2) 1 "f"
+ MemberName 56(s2) 2 "s1_1"
+ Name 57 "ub1"
+ MemberName 57(ub1) 0 "foo2a"
+ Name 59 "uName1"
+ Name 64 "s1"
+ MemberName 64(s1) 0 "i"
+ MemberName 64(s1) 1 "f"
+ Name 65 "s2"
+ MemberName 65(s2) 0 "i"
+ MemberName 65(s2) 1 "f"
+ MemberName 65(s2) 2 "s1_1"
+ Name 66 "ub2"
+ MemberName 66(ub2) 0 "foo2b"
+ Name 68 "uName2"
+ Name 93 "v"
+ Name 97 "samp2D"
+ Name 101 "coord"
+ Name 213 "color"
+ MemberDecorate 55(s1) 0 Offset 0
+ MemberDecorate 55(s1) 1 Offset 4
+ MemberDecorate 56(s2) 0 Offset 0
+ MemberDecorate 56(s2) 1 Offset 4
+ MemberDecorate 56(s2) 2 Offset 16
+ MemberDecorate 57(ub1) 0 Offset 0
+ Decorate 57(ub1) Block
+ Decorate 59(uName1) DescriptorSet 0
+ MemberDecorate 64(s1) 0 Offset 0
+ MemberDecorate 64(s1) 1 Offset 4
+ MemberDecorate 65(s2) 0 Offset 0
+ MemberDecorate 65(s2) 1 Offset 4
+ MemberDecorate 65(s2) 2 Offset 8
+ MemberDecorate 66(ub2) 0 Offset 0
+ Decorate 66(ub2) BufferBlock
+ Decorate 68(uName2) DescriptorSet 0
+ Decorate 97(samp2D) DescriptorSet 0
+ 2: TypeVoid
+ 3: TypeFunction 2
+ 6: TypeInt 32 1
+ 7: TypeFloat 32
+ 8(s1): TypeStruct 6(int) 7(float)
+ 9: TypeInt 32 0
+ 10: 9(int) Constant 3
+ 11: TypeArray 8(s1) 10
+ 12: TypePointer Function 11
+ 14: TypeVector 7(float) 4
+ 15: TypePointer Input 14(fvec4)
+ 16(u): 15(ptr) Variable Input
+ 17: 9(int) Constant 0
+ 18: TypePointer Input 7(float)
+ 22: 9(int) Constant 1
+ 26: 9(int) Constant 2
+ 33: 6(int) Constant 14
+ 34: 7(float) Constant 1096810496
+ 35: 8(s1) ConstantComposite 33 34
+ 38: 6(int) Constant 17
+ 39: 7(float) Constant 1099431936
+ 40: 8(s1) ConstantComposite 38 39
+ 41(w): 15(ptr) Variable Input
+ 55(s1): TypeStruct 6(int) 7(float)
+ 56(s2): TypeStruct 6(int) 7(float) 55(s1)
+ 57(ub1): TypeStruct 56(s2)
+ 58: TypePointer Uniform 57(ub1)
+ 59(uName1): 58(ptr) Variable Uniform
+ 60: 6(int) Constant 0
+ 61: TypePointer Uniform 56(s2)
+ 64(s1): TypeStruct 6(int) 7(float)
+ 65(s2): TypeStruct 6(int) 7(float) 64(s1)
+ 66(ub2): TypeStruct 65(s2)
+ 67: TypePointer Uniform 66(ub2)
+ 68(uName2): 67(ptr) Variable Uniform
+ 69: TypePointer Uniform 65(s2)
+ 72: TypeBool
+ 92: TypePointer Function 14(fvec4)
+ 94: TypeImage 7(float) 2D sampled format:Unknown
+ 95: TypeSampledImage 94
+ 96: TypePointer UniformConstant 95
+ 97(samp2D): 96(ptr) Variable UniformConstant
+ 99: TypeVector 7(float) 2
+ 100: TypePointer Input 99(fvec2)
+ 101(coord): 100(ptr) Variable Input
+ 106: 7(float) Constant 1073741824
+ 112: TypeVector 72(bool) 4
+ 117: 7(float) Constant 1077936128
+ 126: 7(float) Constant 1082130432
+ 132: TypeVector 72(bool) 2
+ 137: 7(float) Constant 1084227584
+ 173: 7(float) Constant 1086324736
+ 209: 7(float) Constant 1088421888
+ 212: TypePointer Output 14(fvec4)
+ 213(color): 212(ptr) Variable Output
+ 4(main): 2 Function None 3
+ 5: Label
+ 13(a): 12(ptr) Variable Function
+ 37(b): 12(ptr) Variable Function
+ 93(v): 92(ptr) Variable Function
+ 19: 18(ptr) AccessChain 16(u) 17
+ 20: 7(float) Load 19
+ 21: 6(int) ConvertFToS 20
+ 23: 18(ptr) AccessChain 16(u) 22
+ 24: 7(float) Load 23
+ 25: 8(s1) CompositeConstruct 21 24
+ 27: 18(ptr) AccessChain 16(u) 26
+ 28: 7(float) Load 27
+ 29: 6(int) ConvertFToS 28
+ 30: 18(ptr) AccessChain 16(u) 10
+ 31: 7(float) Load 30
+ 32: 8(s1) CompositeConstruct 29 31
+ 36: 11 CompositeConstruct 25 32 35
+ Store 13(a) 36
+ 42: 18(ptr) AccessChain 41(w) 17
+ 43: 7(float) Load 42
+ 44: 6(int) ConvertFToS 43
+ 45: 18(ptr) AccessChain 41(w) 22
+ 46: 7(float) Load 45
+ 47: 8(s1) CompositeConstruct 44 46
+ 48: 18(ptr) AccessChain 41(w) 26
+ 49: 7(float) Load 48
+ 50: 6(int) ConvertFToS 49
+ 51: 18(ptr) AccessChain 41(w) 10
+ 52: 7(float) Load 51
+ 53: 8(s1) CompositeConstruct 50 52
+ 54: 11 CompositeConstruct 40 47 53
+ Store 37(b) 54
+ 62: 61(ptr) AccessChain 59(uName1) 60
+ 63: 56(s2) Load 62
+ 70: 69(ptr) AccessChain 68(uName2) 60
+ 71: 65(s2) Load 70
+ 73: 6(int) CompositeExtract 63 0
+ 74: 6(int) CompositeExtract 71 0
+ 75: 72(bool) IEqual 73 74
+ 76: 7(float) CompositeExtract 63 1
+ 77: 7(float) CompositeExtract 71 1
+ 78: 72(bool) FOrdEqual 76 77
+ 79: 72(bool) LogicalAnd 75 78
+ 80: 55(s1) CompositeExtract 63 2
+ 81: 64(s1) CompositeExtract 71 2
+ 82: 6(int) CompositeExtract 80 0
+ 83: 6(int) CompositeExtract 81 0
+ 84: 72(bool) IEqual 82 83
+ 85: 7(float) CompositeExtract 80 1
+ 86: 7(float) CompositeExtract 81 1
+ 87: 72(bool) FOrdEqual 85 86
+ 88: 72(bool) LogicalAnd 84 87
+ 89: 72(bool) LogicalAnd 79 88
+ SelectionMerge 91 None
+ BranchConditional 89 90 104
+ 90: Label
+ 98: 95 Load 97(samp2D)
+ 102: 99(fvec2) Load 101(coord)
+ 103: 14(fvec4) ImageSampleImplicitLod 98 102
+ Store 93(v) 103
+ Branch 91
+ 104: Label
+ 105: 95 Load 97(samp2D)
+ 107: 99(fvec2) Load 101(coord)
+ 108: 99(fvec2) VectorTimesScalar 107 106
+ 109: 14(fvec4) ImageSampleImplicitLod 105 108
+ Store 93(v) 109
+ Branch 91
+ 91: Label
+ 110: 14(fvec4) Load 16(u)
+ 111: 14(fvec4) Load 93(v)
+ 113: 112(bvec4) FOrdEqual 110 111
+ 114: 72(bool) All 113
+ SelectionMerge 116 None
+ BranchConditional 114 115 116
+ 115: Label
+ 118: 14(fvec4) Load 93(v)
+ 119: 14(fvec4) VectorTimesScalar 118 117
+ Store 93(v) 119
+ Branch 116
+ 116: Label
+ 120: 14(fvec4) Load 16(u)
+ 121: 14(fvec4) Load 93(v)
+ 122: 112(bvec4) FOrdNotEqual 120 121
+ 123: 72(bool) Any 122
+ SelectionMerge 125 None
+ BranchConditional 123 124 125
+ 124: Label
+ 127: 14(fvec4) Load 93(v)
+ 128: 14(fvec4) VectorTimesScalar 127 126
+ Store 93(v) 128
+ Branch 125
+ 125: Label
+ 129: 99(fvec2) Load 101(coord)
+ 130: 14(fvec4) Load 93(v)
+ 131: 99(fvec2) VectorShuffle 130 130 1 3
+ 133: 132(bvec2) FOrdEqual 129 131
+ 134: 72(bool) All 133
+ SelectionMerge 136 None
+ BranchConditional 134 135 136
+ 135: Label
+ 138: 14(fvec4) Load 93(v)
+ 139: 14(fvec4) VectorTimesScalar 138 137
+ Store 93(v) 139
+ Branch 136
+ 136: Label
+ 140: 11 Load 13(a)
+ 141: 11 Load 37(b)
+ 142: 8(s1) CompositeExtract 140 0
+ 143: 8(s1) CompositeExtract 141 0
+ 144: 6(int) CompositeExtract 142 0
+ 145: 6(int) CompositeExtract 143 0
+ 146: 72(bool) IEqual 144 145
+ 147: 7(float) CompositeExtract 142 1
+ 148: 7(float) CompositeExtract 143 1
+ 149: 72(bool) FOrdEqual 147 148
+ 150: 72(bool) LogicalAnd 146 149
+ 151: 8(s1) CompositeExtract 140 1
+ 152: 8(s1) CompositeExtract 141 1
+ 153: 6(int) CompositeExtract 151 0
+ 154: 6(int) CompositeExtract 152 0
+ 155: 72(bool) IEqual 153 154
+ 156: 7(float) CompositeExtract 151 1
+ 157: 7(float) CompositeExtract 152 1
+ 158: 72(bool) FOrdEqual 156 157
+ 159: 72(bool) LogicalAnd 155 158
+ 160: 72(bool) LogicalAnd 150 159
+ 161: 8(s1) CompositeExtract 140 2
+ 162: 8(s1) CompositeExtract 141 2
+ 163: 6(int) CompositeExtract 161 0
+ 164: 6(int) CompositeExtract 162 0
+ 165: 72(bool) IEqual 163 164
+ 166: 7(float) CompositeExtract 161 1
+ 167: 7(float) CompositeExtract 162 1
+ 168: 72(bool) FOrdEqual 166 167
+ 169: 72(bool) LogicalAnd 165 168
+ 170: 72(bool) LogicalAnd 160 169
+ SelectionMerge 172 None
+ BranchConditional 170 171 172
+ 171: Label
+ 174: 14(fvec4) Load 93(v)
+ 175: 14(fvec4) VectorTimesScalar 174 173
+ Store 93(v) 175
+ Branch 172
+ 172: Label
+ 176: 11 Load 13(a)
+ 177: 11 Load 37(b)
+ 178: 8(s1) CompositeExtract 176 0
+ 179: 8(s1) CompositeExtract 177 0
+ 180: 6(int) CompositeExtract 178 0
+ 181: 6(int) CompositeExtract 179 0
+ 182: 72(bool) INotEqual 180 181
+ 183: 7(float) CompositeExtract 178 1
+ 184: 7(float) CompositeExtract 179 1
+ 185: 72(bool) FOrdNotEqual 183 184
+ 186: 72(bool) LogicalOr 182 185
+ 187: 8(s1) CompositeExtract 176 1
+ 188: 8(s1) CompositeExtract 177 1
+ 189: 6(int) CompositeExtract 187 0
+ 190: 6(int) CompositeExtract 188 0
+ 191: 72(bool) INotEqual 189 190
+ 192: 7(float) CompositeExtract 187 1
+ 193: 7(float) CompositeExtract 188 1
+ 194: 72(bool) FOrdNotEqual 192 193
+ 195: 72(bool) LogicalOr 191 194
+ 196: 72(bool) LogicalOr 186 195
+ 197: 8(s1) CompositeExtract 176 2
+ 198: 8(s1) CompositeExtract 177 2
+ 199: 6(int) CompositeExtract 197 0
+ 200: 6(int) CompositeExtract 198 0
+ 201: 72(bool) INotEqual 199 200
+ 202: 7(float) CompositeExtract 197 1
+ 203: 7(float) CompositeExtract 198 1
+ 204: 72(bool) FOrdNotEqual 202 203
+ 205: 72(bool) LogicalOr 201 204
+ 206: 72(bool) LogicalOr 196 205
+ SelectionMerge 208 None
+ BranchConditional 206 207 208
+ 207: Label
+ 210: 14(fvec4) Load 93(v)
+ 211: 14(fvec4) VectorTimesScalar 210 209
+ Store 93(v) 211
+ Branch 208
+ 208: Label
+ 214: 14(fvec4) Load 93(v)
+ Store 213(color) 214
+ Return
+ FunctionEnd
diff --git a/chromium/third_party/glslang/src/Test/baseResults/spv.always-discard.frag.out b/chromium/third_party/glslang/src/Test/baseResults/spv.always-discard.frag.out
new file mode 100644
index 00000000000..9102b3bb527
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/spv.always-discard.frag.out
@@ -0,0 +1,113 @@
+spv.always-discard.frag
+
+Linked fragment stage:
+
+
+// Module Version 10000
+// Generated by (magic number): 80001
+// Id's are bound by 84
+
+ Capability Shader
+ 1: ExtInstImport "GLSL.std.450"
+ MemoryModel Logical GLSL450
+ EntryPoint Fragment 4 "main" 21 59
+ ExecutionMode 4 OriginUpperLeft
+ Source GLSL 140
+ Name 4 "main"
+ Name 9 "white"
+ Name 12 "black"
+ Name 15 "color"
+ Name 18 "x"
+ Name 21 "tex_coord"
+ Name 30 "y"
+ Name 36 "radius"
+ Name 59 "gl_FragColor"
+ 2: TypeVoid
+ 3: TypeFunction 2
+ 6: TypeFloat 32
+ 7: TypeVector 6(float) 4
+ 8: TypePointer Function 7(fvec4)
+ 10: 6(float) Constant 1065353216
+ 11: 7(fvec4) ConstantComposite 10 10 10 10
+ 13: 6(float) Constant 1045220557
+ 14: 7(fvec4) ConstantComposite 13 13 13 13
+ 17: TypePointer Function 6(float)
+ 19: TypeVector 6(float) 2
+ 20: TypePointer Input 19(fvec2)
+ 21(tex_coord): 20(ptr) Variable Input
+ 22: TypeInt 32 0
+ 23: 22(int) Constant 0
+ 24: TypePointer Input 6(float)
+ 27: 6(float) Constant 1073741824
+ 31: 22(int) Constant 1
+ 46: TypeBool
+ 51: 6(float) Constant 1066192077
+ 58: TypePointer Output 7(fvec4)
+59(gl_FragColor): 58(ptr) Variable Output
+ 62: 6(float) Constant 1067030938
+ 71: 6(float) Constant 1061158912
+ 76: 6(float) Constant 1098907648
+ 4(main): 2 Function None 3
+ 5: Label
+ 9(white): 8(ptr) Variable Function
+ 12(black): 8(ptr) Variable Function
+ 15(color): 8(ptr) Variable Function
+ 18(x): 17(ptr) Variable Function
+ 30(y): 17(ptr) Variable Function
+ 36(radius): 17(ptr) Variable Function
+ Store 9(white) 11
+ Store 12(black) 14
+ 16: 7(fvec4) Load 9(white)
+ Store 15(color) 16
+ 25: 24(ptr) AccessChain 21(tex_coord) 23
+ 26: 6(float) Load 25
+ 28: 6(float) FMul 26 27
+ 29: 6(float) FSub 28 10
+ Store 18(x) 29
+ 32: 24(ptr) AccessChain 21(tex_coord) 31
+ 33: 6(float) Load 32
+ 34: 6(float) FMul 33 27
+ 35: 6(float) FSub 34 10
+ Store 30(y) 35
+ 37: 6(float) Load 18(x)
+ 38: 6(float) Load 18(x)
+ 39: 6(float) FMul 37 38
+ 40: 6(float) Load 30(y)
+ 41: 6(float) Load 30(y)
+ 42: 6(float) FMul 40 41
+ 43: 6(float) FAdd 39 42
+ 44: 6(float) ExtInst 1(GLSL.std.450) 31(Sqrt) 43
+ Store 36(radius) 44
+ 45: 6(float) Load 36(radius)
+ 47: 46(bool) FOrdGreaterThan 45 10
+ SelectionMerge 49 None
+ BranchConditional 47 48 49
+ 48: Label
+ 50: 6(float) Load 36(radius)
+ 52: 46(bool) FOrdGreaterThan 50 51
+ SelectionMerge 54 None
+ BranchConditional 52 53 54
+ 53: Label
+ 55: 7(fvec4) Load 15(color)
+ 56: 7(fvec4) CompositeConstruct 10 10 10 10
+ 57: 7(fvec4) FAdd 55 56
+ Store 15(color) 57
+ Branch 54
+ 54: Label
+ 60: 7(fvec4) Load 15(color)
+ Store 59(gl_FragColor) 60
+ 61: 6(float) Load 36(radius)
+ 63: 46(bool) FOrdGreaterThan 61 62
+ SelectionMerge 65 None
+ BranchConditional 63 64 65
+ 64: Label
+ 66: 7(fvec4) Load 15(color)
+ 67: 7(fvec4) CompositeConstruct 10 10 10 10
+ 68: 7(fvec4) FAdd 66 67
+ Store 15(color) 68
+ Branch 65
+ 65: Label
+ Branch 49
+ 49: Label
+ Kill
+ FunctionEnd
diff --git a/chromium/third_party/glslang/src/Test/baseResults/spv.always-discard2.frag.out b/chromium/third_party/glslang/src/Test/baseResults/spv.always-discard2.frag.out
new file mode 100755
index 00000000000..7984c8322fd
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/spv.always-discard2.frag.out
@@ -0,0 +1,66 @@
+spv.always-discard2.frag
+
+Linked fragment stage:
+
+
+// Module Version 10000
+// Generated by (magic number): 80001
+// Id's are bound by 40
+
+ Capability Shader
+ 1: ExtInstImport "GLSL.std.450"
+ MemoryModel Logical GLSL450
+ EntryPoint Fragment 4 "main" 21 38
+ ExecutionMode 4 OriginUpperLeft
+ Source GLSL 140
+ Name 4 "main"
+ Name 9 "white"
+ Name 12 "black"
+ Name 15 "color"
+ Name 18 "x"
+ Name 21 "tex_coord"
+ Name 30 "y"
+ Name 38 "gl_FragColor"
+ 2: TypeVoid
+ 3: TypeFunction 2
+ 6: TypeFloat 32
+ 7: TypeVector 6(float) 4
+ 8: TypePointer Function 7(fvec4)
+ 10: 6(float) Constant 1065353216
+ 11: 7(fvec4) ConstantComposite 10 10 10 10
+ 13: 6(float) Constant 1045220557
+ 14: 7(fvec4) ConstantComposite 13 13 13 13
+ 17: TypePointer Function 6(float)
+ 19: TypeVector 6(float) 2
+ 20: TypePointer Input 19(fvec2)
+ 21(tex_coord): 20(ptr) Variable Input
+ 22: TypeInt 32 0
+ 23: 22(int) Constant 0
+ 24: TypePointer Input 6(float)
+ 27: 6(float) Constant 1073741824
+ 31: 22(int) Constant 1
+ 37: TypePointer Output 7(fvec4)
+38(gl_FragColor): 37(ptr) Variable Output
+ 4(main): 2 Function None 3
+ 5: Label
+ 9(white): 8(ptr) Variable Function
+ 12(black): 8(ptr) Variable Function
+ 15(color): 8(ptr) Variable Function
+ 18(x): 17(ptr) Variable Function
+ 30(y): 17(ptr) Variable Function
+ Store 9(white) 11
+ Store 12(black) 14
+ 16: 7(fvec4) Load 9(white)
+ Store 15(color) 16
+ 25: 24(ptr) AccessChain 21(tex_coord) 23
+ 26: 6(float) Load 25
+ 28: 6(float) FMul 26 27
+ 29: 6(float) FSub 28 10
+ Store 18(x) 29
+ 32: 24(ptr) AccessChain 21(tex_coord) 31
+ 33: 6(float) Load 32
+ 34: 6(float) FMul 33 27
+ 35: 6(float) FSub 34 10
+ Store 30(y) 35
+ Kill
+ FunctionEnd
diff --git a/chromium/third_party/glslang/src/Test/baseResults/spv.atomic.comp.out b/chromium/third_party/glslang/src/Test/baseResults/spv.atomic.comp.out
new file mode 100755
index 00000000000..bc8d9b81448
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/spv.atomic.comp.out
@@ -0,0 +1,205 @@
+spv.atomic.comp
+Warning, version 310 is not yet complete; most version-specific features are present, but some are missing.
+
+Shader version: 310
+Requested GL_ARB_gl_spirv
+local_size = (1, 1, 1)
+0:? Sequence
+0:14 Function Definition: func(au1; (global highp uint)
+0:14 Function Parameters:
+0:14 'c' (in highp atomic_uint)
+0:16 Sequence
+0:16 Branch: Return with expression
+0:16 AtomicCounterIncrement (global highp uint)
+0:16 'c' (in highp atomic_uint)
+0:19 Function Definition: main( (global void)
+0:19 Function Parameters:
+0:21 Sequence
+0:21 MemoryBarrierAtomicCounter (global void)
+0:22 Function Call: func(au1; (global highp uint)
+0:22 'counter' (layout(binding=0 offset=0 ) uniform highp atomic_uint)
+0:23 Sequence
+0:23 move second child to first child (temp highp uint)
+0:23 'val' (temp highp uint)
+0:23 AtomicCounter (global highp uint)
+0:23 direct index (layout(binding=0 offset=4 ) temp highp atomic_uint)
+0:23 'countArr' (layout(binding=0 offset=4 ) uniform 4-element array of highp atomic_uint)
+0:23 Constant:
+0:23 2 (const int)
+0:24 AtomicCounterDecrement (global highp uint)
+0:24 'counter' (layout(binding=0 offset=0 ) uniform highp atomic_uint)
+0:36 Function Definition: atoms( (global void)
+0:36 Function Parameters:
+0:38 Sequence
+0:38 Sequence
+0:38 move second child to first child (temp highp int)
+0:38 'origi' (temp highp int)
+0:38 AtomicAdd (global highp int)
+0:38 'atomi' (shared highp int)
+0:38 Constant:
+0:38 3 (const int)
+0:39 Sequence
+0:39 move second child to first child (temp highp uint)
+0:39 'origu' (temp highp uint)
+0:39 AtomicAnd (global highp uint)
+0:39 'atomu' (shared highp uint)
+0:39 'value' (shared highp uint)
+0:40 move second child to first child (temp highp uint)
+0:40 'origu' (temp highp uint)
+0:40 AtomicOr (global highp uint)
+0:40 'atomu' (shared highp uint)
+0:40 Constant:
+0:40 7 (const uint)
+0:41 move second child to first child (temp highp uint)
+0:41 'origu' (temp highp uint)
+0:41 AtomicXor (global highp uint)
+0:41 'atomu' (shared highp uint)
+0:41 Constant:
+0:41 7 (const uint)
+0:42 move second child to first child (temp highp uint)
+0:42 'origu' (temp highp uint)
+0:42 AtomicMin (global highp uint)
+0:42 'atomu' (shared highp uint)
+0:42 'value' (shared highp uint)
+0:43 move second child to first child (temp highp int)
+0:43 'origi' (temp highp int)
+0:43 AtomicMax (global highp int)
+0:43 'atomi' (shared highp int)
+0:43 Constant:
+0:43 7 (const int)
+0:44 move second child to first child (temp highp int)
+0:44 'origi' (temp highp int)
+0:44 AtomicExchange (global highp int)
+0:44 'atomi' (shared highp int)
+0:44 'origi' (temp highp int)
+0:45 move second child to first child (temp highp uint)
+0:45 'origu' (temp highp uint)
+0:45 AtomicCompSwap (global highp uint)
+0:45 'atomu' (shared highp uint)
+0:45 Constant:
+0:45 10 (const uint)
+0:45 'value' (shared highp uint)
+0:46 AtomicAdd (global highp int)
+0:46 direct index (temp highp int)
+0:46 n_frames_rendered: direct index for structure (layout(column_major std140 offset=16 ) buffer highp 4-component vector of int)
+0:46 'result' (layout(binding=0 column_major std140 ) restrict buffer block{layout(column_major std140 offset=0 ) buffer highp float f, layout(column_major std140 offset=16 ) buffer highp 4-component vector of int n_frames_rendered})
+0:46 Constant:
+0:46 1 (const int)
+0:46 Constant:
+0:46 2 (const int)
+0:46 Constant:
+0:46 1 (const int)
+0:? Linker Objects
+0:? 'counter' (layout(binding=0 offset=0 ) uniform highp atomic_uint)
+0:? 'countArr' (layout(binding=0 offset=4 ) uniform 4-element array of highp atomic_uint)
+0:? 'value' (shared highp uint)
+0:? 'arrX' (global 1-element array of highp int)
+0:? 'arrY' (global 1-element array of highp int)
+0:? 'arrZ' (global 1-element array of highp int)
+0:? 'atomi' (shared highp int)
+0:? 'atomu' (shared highp uint)
+0:? 'result' (layout(binding=0 column_major std140 ) restrict buffer block{layout(column_major std140 offset=0 ) buffer highp float f, layout(column_major std140 offset=16 ) buffer highp 4-component vector of int n_frames_rendered})
+
+
+Linked compute stage:
+
+
+Shader version: 310
+Requested GL_ARB_gl_spirv
+local_size = (1, 1, 1)
+0:? Sequence
+0:14 Function Definition: func(au1; (global highp uint)
+0:14 Function Parameters:
+0:14 'c' (in highp atomic_uint)
+0:16 Sequence
+0:16 Branch: Return with expression
+0:16 AtomicCounterIncrement (global highp uint)
+0:16 'c' (in highp atomic_uint)
+0:19 Function Definition: main( (global void)
+0:19 Function Parameters:
+0:21 Sequence
+0:21 MemoryBarrierAtomicCounter (global void)
+0:22 Function Call: func(au1; (global highp uint)
+0:22 'counter' (layout(binding=0 offset=0 ) uniform highp atomic_uint)
+0:23 Sequence
+0:23 move second child to first child (temp highp uint)
+0:23 'val' (temp highp uint)
+0:23 AtomicCounter (global highp uint)
+0:23 direct index (layout(binding=0 offset=4 ) temp highp atomic_uint)
+0:23 'countArr' (layout(binding=0 offset=4 ) uniform 4-element array of highp atomic_uint)
+0:23 Constant:
+0:23 2 (const int)
+0:24 AtomicCounterDecrement (global highp uint)
+0:24 'counter' (layout(binding=0 offset=0 ) uniform highp atomic_uint)
+0:36 Function Definition: atoms( (global void)
+0:36 Function Parameters:
+0:38 Sequence
+0:38 Sequence
+0:38 move second child to first child (temp highp int)
+0:38 'origi' (temp highp int)
+0:38 AtomicAdd (global highp int)
+0:38 'atomi' (shared highp int)
+0:38 Constant:
+0:38 3 (const int)
+0:39 Sequence
+0:39 move second child to first child (temp highp uint)
+0:39 'origu' (temp highp uint)
+0:39 AtomicAnd (global highp uint)
+0:39 'atomu' (shared highp uint)
+0:39 'value' (shared highp uint)
+0:40 move second child to first child (temp highp uint)
+0:40 'origu' (temp highp uint)
+0:40 AtomicOr (global highp uint)
+0:40 'atomu' (shared highp uint)
+0:40 Constant:
+0:40 7 (const uint)
+0:41 move second child to first child (temp highp uint)
+0:41 'origu' (temp highp uint)
+0:41 AtomicXor (global highp uint)
+0:41 'atomu' (shared highp uint)
+0:41 Constant:
+0:41 7 (const uint)
+0:42 move second child to first child (temp highp uint)
+0:42 'origu' (temp highp uint)
+0:42 AtomicMin (global highp uint)
+0:42 'atomu' (shared highp uint)
+0:42 'value' (shared highp uint)
+0:43 move second child to first child (temp highp int)
+0:43 'origi' (temp highp int)
+0:43 AtomicMax (global highp int)
+0:43 'atomi' (shared highp int)
+0:43 Constant:
+0:43 7 (const int)
+0:44 move second child to first child (temp highp int)
+0:44 'origi' (temp highp int)
+0:44 AtomicExchange (global highp int)
+0:44 'atomi' (shared highp int)
+0:44 'origi' (temp highp int)
+0:45 move second child to first child (temp highp uint)
+0:45 'origu' (temp highp uint)
+0:45 AtomicCompSwap (global highp uint)
+0:45 'atomu' (shared highp uint)
+0:45 Constant:
+0:45 10 (const uint)
+0:45 'value' (shared highp uint)
+0:46 AtomicAdd (global highp int)
+0:46 direct index (temp highp int)
+0:46 n_frames_rendered: direct index for structure (layout(column_major std140 offset=16 ) buffer highp 4-component vector of int)
+0:46 'result' (layout(binding=0 column_major std140 ) restrict buffer block{layout(column_major std140 offset=0 ) buffer highp float f, layout(column_major std140 offset=16 ) buffer highp 4-component vector of int n_frames_rendered})
+0:46 Constant:
+0:46 1 (const int)
+0:46 Constant:
+0:46 2 (const int)
+0:46 Constant:
+0:46 1 (const int)
+0:? Linker Objects
+0:? 'counter' (layout(binding=0 offset=0 ) uniform highp atomic_uint)
+0:? 'countArr' (layout(binding=0 offset=4 ) uniform 4-element array of highp atomic_uint)
+0:? 'value' (shared highp uint)
+0:? 'arrX' (global 1-element array of highp int)
+0:? 'arrY' (global 1-element array of highp int)
+0:? 'arrZ' (global 1-element array of highp int)
+0:? 'atomi' (shared highp int)
+0:? 'atomu' (shared highp uint)
+0:? 'result' (layout(binding=0 column_major std140 ) restrict buffer block{layout(column_major std140 offset=0 ) buffer highp float f, layout(column_major std140 offset=16 ) buffer highp 4-component vector of int n_frames_rendered})
+
diff --git a/chromium/third_party/glslang/src/Test/baseResults/spv.bitCast.frag.out b/chromium/third_party/glslang/src/Test/baseResults/spv.bitCast.frag.out
new file mode 100644
index 00000000000..b0dc8104943
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/spv.bitCast.frag.out
@@ -0,0 +1,240 @@
+spv.bitCast.frag
+Warning, version 450 is not yet complete; most version-specific features are present, but some are missing.
+
+
+Linked fragment stage:
+
+
+// Module Version 10000
+// Generated by (magic number): 80001
+// Id's are bound by 172
+
+ Capability Shader
+ 1: ExtInstImport "GLSL.std.450"
+ MemoryModel Logical GLSL450
+ EntryPoint Fragment 4 "main" 14 26 37 48 89 98 107 116 122 130 139 148 154
+ ExecutionMode 4 OriginUpperLeft
+ Source GLSL 450
+ Name 4 "main"
+ Name 9 "idata"
+ Name 14 "f1"
+ Name 26 "f2"
+ Name 37 "f3"
+ Name 48 "f4"
+ Name 55 "udata"
+ Name 85 "fdata"
+ Name 89 "i1"
+ Name 98 "i2"
+ Name 107 "i3"
+ Name 116 "i4"
+ Name 122 "u1"
+ Name 130 "u2"
+ Name 139 "u3"
+ Name 148 "u4"
+ Name 154 "fragColor"
+ Decorate 89(i1) Flat
+ Decorate 98(i2) Flat
+ Decorate 107(i3) Flat
+ Decorate 116(i4) Flat
+ Decorate 122(u1) Flat
+ Decorate 130(u2) Flat
+ Decorate 139(u3) Flat
+ Decorate 148(u4) Flat
+ 2: TypeVoid
+ 3: TypeFunction 2
+ 6: TypeInt 32 1
+ 7: TypeVector 6(int) 4
+ 8: TypePointer Function 7(ivec4)
+ 10: 6(int) Constant 0
+ 11: 7(ivec4) ConstantComposite 10 10 10 10
+ 12: TypeFloat 32
+ 13: TypePointer Input 12(float)
+ 14(f1): 13(ptr) Variable Input
+ 17: TypeInt 32 0
+ 18: 17(int) Constant 0
+ 19: TypePointer Function 6(int)
+ 24: TypeVector 12(float) 2
+ 25: TypePointer Input 24(fvec2)
+ 26(f2): 25(ptr) Variable Input
+ 28: TypeVector 6(int) 2
+ 35: TypeVector 12(float) 3
+ 36: TypePointer Input 35(fvec3)
+ 37(f3): 36(ptr) Variable Input
+ 39: TypeVector 6(int) 3
+ 46: TypeVector 12(float) 4
+ 47: TypePointer Input 46(fvec4)
+ 48(f4): 47(ptr) Variable Input
+ 53: TypeVector 17(int) 4
+ 54: TypePointer Function 53(ivec4)
+ 56: 53(ivec4) ConstantComposite 18 18 18 18
+ 59: TypePointer Function 17(int)
+ 65: TypeVector 17(int) 2
+ 73: TypeVector 17(int) 3
+ 84: TypePointer Function 46(fvec4)
+ 86: 12(float) Constant 0
+ 87: 46(fvec4) ConstantComposite 86 86 86 86
+ 88: TypePointer Input 6(int)
+ 89(i1): 88(ptr) Variable Input
+ 92: TypePointer Function 12(float)
+ 97: TypePointer Input 28(ivec2)
+ 98(i2): 97(ptr) Variable Input
+ 106: TypePointer Input 39(ivec3)
+ 107(i3): 106(ptr) Variable Input
+ 115: TypePointer Input 7(ivec4)
+ 116(i4): 115(ptr) Variable Input
+ 121: TypePointer Input 17(int)
+ 122(u1): 121(ptr) Variable Input
+ 129: TypePointer Input 65(ivec2)
+ 130(u2): 129(ptr) Variable Input
+ 138: TypePointer Input 73(ivec3)
+ 139(u3): 138(ptr) Variable Input
+ 147: TypePointer Input 53(ivec4)
+ 148(u4): 147(ptr) Variable Input
+ 153: TypePointer Output 46(fvec4)
+ 154(fragColor): 153(ptr) Variable Output
+ 159: TypeBool
+ 160: TypeVector 159(bool) 4
+ 168: 12(float) Constant 1045220557
+ 169: 46(fvec4) ConstantComposite 168 168 168 168
+ 4(main): 2 Function None 3
+ 5: Label
+ 9(idata): 8(ptr) Variable Function
+ 55(udata): 54(ptr) Variable Function
+ 85(fdata): 84(ptr) Variable Function
+ 155: 84(ptr) Variable Function
+ Store 9(idata) 11
+ 15: 12(float) Load 14(f1)
+ 16: 6(int) Bitcast 15
+ 20: 19(ptr) AccessChain 9(idata) 18
+ 21: 6(int) Load 20
+ 22: 6(int) IAdd 21 16
+ 23: 19(ptr) AccessChain 9(idata) 18
+ Store 23 22
+ 27: 24(fvec2) Load 26(f2)
+ 29: 28(ivec2) Bitcast 27
+ 30: 7(ivec4) Load 9(idata)
+ 31: 28(ivec2) VectorShuffle 30 30 0 1
+ 32: 28(ivec2) IAdd 31 29
+ 33: 7(ivec4) Load 9(idata)
+ 34: 7(ivec4) VectorShuffle 33 32 4 5 2 3
+ Store 9(idata) 34
+ 38: 35(fvec3) Load 37(f3)
+ 40: 39(ivec3) Bitcast 38
+ 41: 7(ivec4) Load 9(idata)
+ 42: 39(ivec3) VectorShuffle 41 41 0 1 2
+ 43: 39(ivec3) IAdd 42 40
+ 44: 7(ivec4) Load 9(idata)
+ 45: 7(ivec4) VectorShuffle 44 43 4 5 6 3
+ Store 9(idata) 45
+ 49: 46(fvec4) Load 48(f4)
+ 50: 7(ivec4) Bitcast 49
+ 51: 7(ivec4) Load 9(idata)
+ 52: 7(ivec4) IAdd 51 50
+ Store 9(idata) 52
+ Store 55(udata) 56
+ 57: 12(float) Load 14(f1)
+ 58: 17(int) Bitcast 57
+ 60: 59(ptr) AccessChain 55(udata) 18
+ 61: 17(int) Load 60
+ 62: 17(int) IAdd 61 58
+ 63: 59(ptr) AccessChain 55(udata) 18
+ Store 63 62
+ 64: 24(fvec2) Load 26(f2)
+ 66: 65(ivec2) Bitcast 64
+ 67: 53(ivec4) Load 55(udata)
+ 68: 65(ivec2) VectorShuffle 67 67 0 1
+ 69: 65(ivec2) IAdd 68 66
+ 70: 53(ivec4) Load 55(udata)
+ 71: 53(ivec4) VectorShuffle 70 69 4 5 2 3
+ Store 55(udata) 71
+ 72: 35(fvec3) Load 37(f3)
+ 74: 73(ivec3) Bitcast 72
+ 75: 53(ivec4) Load 55(udata)
+ 76: 73(ivec3) VectorShuffle 75 75 0 1 2
+ 77: 73(ivec3) IAdd 76 74
+ 78: 53(ivec4) Load 55(udata)
+ 79: 53(ivec4) VectorShuffle 78 77 4 5 6 3
+ Store 55(udata) 79
+ 80: 46(fvec4) Load 48(f4)
+ 81: 53(ivec4) Bitcast 80
+ 82: 53(ivec4) Load 55(udata)
+ 83: 53(ivec4) IAdd 82 81
+ Store 55(udata) 83
+ Store 85(fdata) 87
+ 90: 6(int) Load 89(i1)
+ 91: 12(float) Bitcast 90
+ 93: 92(ptr) AccessChain 85(fdata) 18
+ 94: 12(float) Load 93
+ 95: 12(float) FAdd 94 91
+ 96: 92(ptr) AccessChain 85(fdata) 18
+ Store 96 95
+ 99: 28(ivec2) Load 98(i2)
+ 100: 24(fvec2) Bitcast 99
+ 101: 46(fvec4) Load 85(fdata)
+ 102: 24(fvec2) VectorShuffle 101 101 0 1
+ 103: 24(fvec2) FAdd 102 100
+ 104: 46(fvec4) Load 85(fdata)
+ 105: 46(fvec4) VectorShuffle 104 103 4 5 2 3
+ Store 85(fdata) 105
+ 108: 39(ivec3) Load 107(i3)
+ 109: 35(fvec3) Bitcast 108
+ 110: 46(fvec4) Load 85(fdata)
+ 111: 35(fvec3) VectorShuffle 110 110 0 1 2
+ 112: 35(fvec3) FAdd 111 109
+ 113: 46(fvec4) Load 85(fdata)
+ 114: 46(fvec4) VectorShuffle 113 112 4 5 6 3
+ Store 85(fdata) 114
+ 117: 7(ivec4) Load 116(i4)
+ 118: 46(fvec4) Bitcast 117
+ 119: 46(fvec4) Load 85(fdata)
+ 120: 46(fvec4) FAdd 119 118
+ Store 85(fdata) 120
+ 123: 17(int) Load 122(u1)
+ 124: 12(float) Bitcast 123
+ 125: 92(ptr) AccessChain 85(fdata) 18
+ 126: 12(float) Load 125
+ 127: 12(float) FAdd 126 124
+ 128: 92(ptr) AccessChain 85(fdata) 18
+ Store 128 127
+ 131: 65(ivec2) Load 130(u2)
+ 132: 24(fvec2) Bitcast 131
+ 133: 46(fvec4) Load 85(fdata)
+ 134: 24(fvec2) VectorShuffle 133 133 0 1
+ 135: 24(fvec2) FAdd 134 132
+ 136: 46(fvec4) Load 85(fdata)
+ 137: 46(fvec4) VectorShuffle 136 135 4 5 2 3
+ Store 85(fdata) 137
+ 140: 73(ivec3) Load 139(u3)
+ 141: 35(fvec3) Bitcast 140
+ 142: 46(fvec4) Load 85(fdata)
+ 143: 35(fvec3) VectorShuffle 142 142 0 1 2
+ 144: 35(fvec3) FAdd 143 141
+ 145: 46(fvec4) Load 85(fdata)
+ 146: 46(fvec4) VectorShuffle 145 144 4 5 6 3
+ Store 85(fdata) 146
+ 149: 53(ivec4) Load 148(u4)
+ 150: 46(fvec4) Bitcast 149
+ 151: 46(fvec4) Load 85(fdata)
+ 152: 46(fvec4) FAdd 151 150
+ Store 85(fdata) 152
+ 156: 7(ivec4) Load 9(idata)
+ 157: 53(ivec4) Bitcast 156
+ 158: 53(ivec4) Load 55(udata)
+ 161: 160(bvec4) IEqual 157 158
+ 162: 159(bool) All 161
+ SelectionMerge 164 None
+ BranchConditional 162 163 166
+ 163: Label
+ 165: 46(fvec4) Load 85(fdata)
+ Store 155 165
+ Branch 164
+ 166: Label
+ 167: 46(fvec4) Load 85(fdata)
+ 170: 46(fvec4) FAdd 167 169
+ Store 155 170
+ Branch 164
+ 164: Label
+ 171: 46(fvec4) Load 155
+ Store 154(fragColor) 171
+ Return
+ FunctionEnd
diff --git a/chromium/third_party/glslang/src/Test/baseResults/spv.bool.vert.out b/chromium/third_party/glslang/src/Test/baseResults/spv.bool.vert.out
new file mode 100644
index 00000000000..49a69a0eb88
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/spv.bool.vert.out
@@ -0,0 +1,94 @@
+spv.bool.vert
+Warning, version 450 is not yet complete; most version-specific features are present, but some are missing.
+
+
+Linked vertex stage:
+
+
+// Module Version 10000
+// Generated by (magic number): 80001
+// Id's are bound by 49
+
+ Capability Shader
+ 1: ExtInstImport "GLSL.std.450"
+ MemoryModel Logical GLSL450
+ EntryPoint Vertex 4 "main" 24
+ Source GLSL 450
+ Name 4 "main"
+ Name 10 "foo(b1;"
+ Name 9 "b"
+ Name 22 "gl_PerVertex"
+ MemberName 22(gl_PerVertex) 0 "gl_Position"
+ MemberName 22(gl_PerVertex) 1 "gl_PointSize"
+ MemberName 22(gl_PerVertex) 2 "gl_ClipDistance"
+ MemberName 22(gl_PerVertex) 3 "gl_CullDistance"
+ Name 24 ""
+ Name 29 "ubname"
+ MemberName 29(ubname) 0 "b"
+ Name 31 "ubinst"
+ Name 32 "param"
+ MemberDecorate 22(gl_PerVertex) 0 BuiltIn Position
+ MemberDecorate 22(gl_PerVertex) 1 BuiltIn PointSize
+ MemberDecorate 22(gl_PerVertex) 2 BuiltIn ClipDistance
+ MemberDecorate 22(gl_PerVertex) 3 BuiltIn CullDistance
+ Decorate 22(gl_PerVertex) Block
+ MemberDecorate 29(ubname) 0 Offset 0
+ Decorate 29(ubname) Block
+ Decorate 31(ubinst) DescriptorSet 0
+ 2: TypeVoid
+ 3: TypeFunction 2
+ 6: TypeBool
+ 7: TypePointer Function 6(bool)
+ 8: TypeFunction 6(bool) 7(ptr)
+ 13: 6(bool) ConstantFalse
+ 17: TypeFloat 32
+ 18: TypeVector 17(float) 4
+ 19: TypeInt 32 0
+ 20: 19(int) Constant 1
+ 21: TypeArray 17(float) 20
+22(gl_PerVertex): TypeStruct 18(fvec4) 17(float) 21 21
+ 23: TypePointer Output 22(gl_PerVertex)
+ 24: 23(ptr) Variable Output
+ 25: TypeInt 32 1
+ 26: 25(int) Constant 0
+ 27: TypePointer Function 18(fvec4)
+ 29(ubname): TypeStruct 19(int)
+ 30: TypePointer Uniform 29(ubname)
+ 31(ubinst): 30(ptr) Variable Uniform
+ 33: TypePointer Uniform 19(int)
+ 36: 19(int) Constant 0
+ 41: 17(float) Constant 0
+ 42: 18(fvec4) ConstantComposite 41 41 41 41
+ 44: 17(float) Constant 1065353216
+ 45: 18(fvec4) ConstantComposite 44 44 44 44
+ 47: TypePointer Output 18(fvec4)
+ 4(main): 2 Function None 3
+ 5: Label
+ 28: 27(ptr) Variable Function
+ 32(param): 7(ptr) Variable Function
+ 34: 33(ptr) AccessChain 31(ubinst) 26
+ 35: 19(int) Load 34
+ 37: 6(bool) INotEqual 35 36
+ Store 32(param) 37
+ 38: 6(bool) FunctionCall 10(foo(b1;) 32(param)
+ SelectionMerge 40 None
+ BranchConditional 38 39 43
+ 39: Label
+ Store 28 42
+ Branch 40
+ 43: Label
+ Store 28 45
+ Branch 40
+ 40: Label
+ 46: 18(fvec4) Load 28
+ 48: 47(ptr) AccessChain 24 26
+ Store 48 46
+ Return
+ FunctionEnd
+ 10(foo(b1;): 6(bool) Function None 8
+ 9(b): 7(ptr) FunctionParameter
+ 11: Label
+ 12: 6(bool) Load 9(b)
+ 14: 6(bool) LogicalNotEqual 12 13
+ ReturnValue 14
+ FunctionEnd
diff --git a/chromium/third_party/glslang/src/Test/baseResults/spv.boolInBlock.frag.out b/chromium/third_party/glslang/src/Test/baseResults/spv.boolInBlock.frag.out
new file mode 100644
index 00000000000..6e7cf40eed2
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/spv.boolInBlock.frag.out
@@ -0,0 +1,169 @@
+spv.boolInBlock.frag
+Warning, version 450 is not yet complete; most version-specific features are present, but some are missing.
+
+
+Linked fragment stage:
+
+
+// Module Version 10000
+// Generated by (magic number): 80001
+// Id's are bound by 107
+
+ Capability Shader
+ 1: ExtInstImport "GLSL.std.450"
+ MemoryModel Logical GLSL450
+ EntryPoint Fragment 4 "main" 75
+ ExecutionMode 4 OriginUpperLeft
+ Source GLSL 450
+ Name 4 "main"
+ Name 14 "foo(vb4;vb2;"
+ Name 12 "paramb4"
+ Name 13 "paramb2"
+ Name 17 "b1"
+ Name 24 "Buffer"
+ MemberName 24(Buffer) 0 "b2"
+ Name 26 ""
+ Name 39 "Uniform"
+ MemberName 39(Uniform) 0 "b4"
+ Name 41 ""
+ Name 62 "param"
+ Name 67 "param"
+ Name 75 "fragColor"
+ MemberDecorate 24(Buffer) 0 Offset 0
+ Decorate 24(Buffer) BufferBlock
+ Decorate 26 DescriptorSet 0
+ Decorate 26 Binding 1
+ MemberDecorate 39(Uniform) 0 Offset 0
+ Decorate 39(Uniform) Block
+ Decorate 41 DescriptorSet 0
+ Decorate 41 Binding 0
+ Decorate 75(fragColor) Location 0
+ 2: TypeVoid
+ 3: TypeFunction 2
+ 6: TypeBool
+ 7: TypeVector 6(bool) 4
+ 8: TypePointer Function 7(bvec4)
+ 9: TypeVector 6(bool) 2
+ 10: TypePointer Function 9(bvec2)
+ 11: TypeFunction 2 8(ptr) 10(ptr)
+ 16: TypePointer Function 6(bool)
+ 22: TypeInt 32 0
+ 23: TypeVector 22(int) 2
+ 24(Buffer): TypeStruct 23(ivec2)
+ 25: TypePointer Uniform 24(Buffer)
+ 26: 25(ptr) Variable Uniform
+ 27: TypeInt 32 1
+ 28: 27(int) Constant 0
+ 29: 6(bool) ConstantFalse
+ 30: 9(bvec2) ConstantComposite 29 29
+ 31: 22(int) Constant 0
+ 32: 23(ivec2) ConstantComposite 31 31
+ 33: 22(int) Constant 1
+ 34: 23(ivec2) ConstantComposite 33 33
+ 36: TypePointer Uniform 23(ivec2)
+ 38: TypeVector 22(int) 4
+ 39(Uniform): TypeStruct 38(ivec4)
+ 40: TypePointer Uniform 39(Uniform)
+ 41: 40(ptr) Variable Uniform
+ 42: TypePointer Uniform 38(ivec4)
+ 65: 38(ivec4) ConstantComposite 31 31 31 31
+ 72: TypeFloat 32
+ 73: TypeVector 72(float) 4
+ 74: TypePointer Output 73(fvec4)
+ 75(fragColor): 74(ptr) Variable Output
+ 87: 72(float) Constant 0
+ 88: 72(float) Constant 1065353216
+ 4(main): 2 Function None 3
+ 5: Label
+ 62(param): 8(ptr) Variable Function
+ 67(param): 10(ptr) Variable Function
+ 35: 23(ivec2) Select 30 34 32
+ 37: 36(ptr) AccessChain 26 28
+ Store 37 35
+ 43: 42(ptr) AccessChain 41 28
+ 44: 38(ivec4) Load 43
+ 45: 22(int) CompositeExtract 44 2
+ 46: 6(bool) INotEqual 45 31
+ SelectionMerge 48 None
+ BranchConditional 46 47 48
+ 47: Label
+ 49: 42(ptr) AccessChain 41 28
+ 50: 38(ivec4) Load 49
+ 51: 22(int) CompositeExtract 50 0
+ 52: 6(bool) INotEqual 51 31
+ 53: 9(bvec2) CompositeConstruct 52 52
+ 54: 23(ivec2) Select 53 34 32
+ 55: 36(ptr) AccessChain 26 28
+ Store 55 54
+ Branch 48
+ 48: Label
+ 56: 36(ptr) AccessChain 26 28
+ 57: 23(ivec2) Load 56
+ 58: 22(int) CompositeExtract 57 0
+ 59: 6(bool) INotEqual 58 31
+ SelectionMerge 61 None
+ BranchConditional 59 60 61
+ 60: Label
+ 63: 42(ptr) AccessChain 41 28
+ 64: 38(ivec4) Load 63
+ 66: 7(bvec4) INotEqual 64 65
+ Store 62(param) 66
+ 68: 2 FunctionCall 14(foo(vb4;vb2;) 62(param) 67(param)
+ 69: 9(bvec2) Load 67(param)
+ 70: 23(ivec2) Select 69 34 32
+ 71: 36(ptr) AccessChain 26 28
+ Store 71 70
+ Branch 61
+ 61: Label
+ 76: 42(ptr) AccessChain 41 28
+ 77: 38(ivec4) Load 76
+ 78: 22(int) CompositeExtract 77 0
+ 79: 6(bool) INotEqual 78 31
+ SelectionMerge 81 None
+ BranchConditional 79 80 81
+ 80: Label
+ 82: 42(ptr) AccessChain 41 28
+ 83: 38(ivec4) Load 82
+ 84: 22(int) CompositeExtract 83 1
+ 85: 6(bool) INotEqual 84 31
+ Branch 81
+ 81: Label
+ 86: 6(bool) Phi 79 61 85 80
+ 89: 72(float) Select 86 88 87
+ 90: 73(fvec4) CompositeConstruct 89 89 89 89
+ Store 75(fragColor) 90
+ 91: 42(ptr) AccessChain 41 28
+ 92: 38(ivec4) Load 91
+ 93: 22(int) CompositeExtract 92 0
+ 94: 6(bool) INotEqual 93 31
+ 95: 6(bool) LogicalNot 94
+ SelectionMerge 97 None
+ BranchConditional 95 96 97
+ 96: Label
+ 98: 42(ptr) AccessChain 41 28
+ 99: 38(ivec4) Load 98
+ 100: 22(int) CompositeExtract 99 1
+ 101: 6(bool) INotEqual 100 31
+ Branch 97
+ 97: Label
+ 102: 6(bool) Phi 94 81 101 96
+ 103: 72(float) Select 102 88 87
+ 104: 73(fvec4) CompositeConstruct 103 103 103 103
+ 105: 73(fvec4) Load 75(fragColor)
+ 106: 73(fvec4) FSub 105 104
+ Store 75(fragColor) 106
+ Return
+ FunctionEnd
+14(foo(vb4;vb2;): 2 Function None 11
+ 12(paramb4): 8(ptr) FunctionParameter
+ 13(paramb2): 10(ptr) FunctionParameter
+ 15: Label
+ 17(b1): 16(ptr) Variable Function
+ 18: 7(bvec4) Load 12(paramb4)
+ 19: 6(bool) CompositeExtract 18 2
+ Store 17(b1) 19
+ 20: 6(bool) Load 17(b1)
+ 21: 9(bvec2) CompositeConstruct 20 20
+ Store 13(paramb2) 21
+ Return
+ FunctionEnd
diff --git a/chromium/third_party/glslang/src/Test/baseResults/spv.branch-return.vert.out b/chromium/third_party/glslang/src/Test/baseResults/spv.branch-return.vert.out
new file mode 100644
index 00000000000..217a863fc9f
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/spv.branch-return.vert.out
@@ -0,0 +1,71 @@
+spv.branch-return.vert
+Warning, version 310 is not yet complete; most version-specific features are present, but some are missing.
+
+
+Linked vertex stage:
+
+
+// Module Version 10000
+// Generated by (magic number): 80001
+// Id's are bound by 38
+
+ Capability Shader
+ 1: ExtInstImport "GLSL.std.450"
+ MemoryModel Logical GLSL450
+ EntryPoint Vertex 4 "main" 8 20
+ Source ESSL 310
+ Name 4 "main"
+ Name 8 "gl_InstanceIndex"
+ Name 18 "gl_PerVertex"
+ MemberName 18(gl_PerVertex) 0 "gl_Position"
+ MemberName 18(gl_PerVertex) 1 "gl_PointSize"
+ Name 20 ""
+ Decorate 8(gl_InstanceIndex) BuiltIn InstanceIndex
+ MemberDecorate 18(gl_PerVertex) 0 BuiltIn Position
+ MemberDecorate 18(gl_PerVertex) 1 BuiltIn PointSize
+ Decorate 18(gl_PerVertex) Block
+ 2: TypeVoid
+ 3: TypeFunction 2
+ 6: TypeInt 32 1
+ 7: TypePointer Input 6(int)
+8(gl_InstanceIndex): 7(ptr) Variable Input
+ 16: TypeFloat 32
+ 17: TypeVector 16(float) 4
+18(gl_PerVertex): TypeStruct 17(fvec4) 16(float)
+ 19: TypePointer Output 18(gl_PerVertex)
+ 20: 19(ptr) Variable Output
+ 21: 6(int) Constant 0
+ 22: 16(float) Constant 0
+ 23: 17(fvec4) ConstantComposite 22 22 22 22
+ 24: TypePointer Output 17(fvec4)
+ 30: 16(float) Constant 1039918957
+ 31: TypeInt 32 0
+ 32: 31(int) Constant 0
+ 33: TypePointer Output 16(float)
+ 4(main): 2 Function None 3
+ 5: Label
+ 9: 6(int) Load 8(gl_InstanceIndex)
+ SelectionMerge 14 None
+ Switch 9 14
+ case 0: 10
+ case 1: 11
+ case 2: 12
+ case 3: 13
+ 10: Label
+ Return
+ 11: Label
+ 25: 24(ptr) AccessChain 20 21
+ Store 25 23
+ Branch 14
+ 12: Label
+ Return
+ 13: Label
+ Return
+ 14: Label
+ 34: 33(ptr) AccessChain 20 21 32
+ 35: 16(float) Load 34
+ 36: 16(float) FAdd 35 30
+ 37: 33(ptr) AccessChain 20 21 32
+ Store 37 36
+ Return
+ FunctionEnd
diff --git a/chromium/third_party/glslang/src/Test/baseResults/spv.conditionalDiscard.frag.out b/chromium/third_party/glslang/src/Test/baseResults/spv.conditionalDiscard.frag.out
new file mode 100755
index 00000000000..ef7e3b4cf91
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/spv.conditionalDiscard.frag.out
@@ -0,0 +1,63 @@
+spv.conditionalDiscard.frag
+Warning, version 400 is not yet complete; most version-specific features are present, but some are missing.
+
+
+Linked fragment stage:
+
+
+// Module Version 10000
+// Generated by (magic number): 80001
+// Id's are bound by 36
+
+ Capability Shader
+ 1: ExtInstImport "GLSL.std.450"
+ MemoryModel Logical GLSL450
+ EntryPoint Fragment 4 "main" 17 34
+ ExecutionMode 4 OriginUpperLeft
+ Source GLSL 400
+ Name 4 "main"
+ Name 9 "v"
+ Name 13 "tex"
+ Name 17 "coord"
+ Name 34 "gl_FragColor"
+ Decorate 13(tex) DescriptorSet 0
+ 2: TypeVoid
+ 3: TypeFunction 2
+ 6: TypeFloat 32
+ 7: TypeVector 6(float) 4
+ 8: TypePointer Function 7(fvec4)
+ 10: TypeImage 6(float) 2D sampled format:Unknown
+ 11: TypeSampledImage 10
+ 12: TypePointer UniformConstant 11
+ 13(tex): 12(ptr) Variable UniformConstant
+ 15: TypeVector 6(float) 2
+ 16: TypePointer Input 15(fvec2)
+ 17(coord): 16(ptr) Variable Input
+ 21: 6(float) Constant 1036831949
+ 22: 6(float) Constant 1045220557
+ 23: 6(float) Constant 1050253722
+ 24: 6(float) Constant 1053609165
+ 25: 7(fvec4) ConstantComposite 21 22 23 24
+ 26: TypeBool
+ 27: TypeVector 26(bool) 4
+ 33: TypePointer Output 7(fvec4)
+34(gl_FragColor): 33(ptr) Variable Output
+ 4(main): 2 Function None 3
+ 5: Label
+ 9(v): 8(ptr) Variable Function
+ 14: 11 Load 13(tex)
+ 18: 15(fvec2) Load 17(coord)
+ 19: 7(fvec4) ImageSampleImplicitLod 14 18
+ Store 9(v) 19
+ 20: 7(fvec4) Load 9(v)
+ 28: 27(bvec4) FOrdEqual 20 25
+ 29: 26(bool) All 28
+ SelectionMerge 31 None
+ BranchConditional 29 30 31
+ 30: Label
+ Kill
+ 31: Label
+ 35: 7(fvec4) Load 9(v)
+ Store 34(gl_FragColor) 35
+ Return
+ FunctionEnd
diff --git a/chromium/third_party/glslang/src/Test/baseResults/spv.conversion.frag.out b/chromium/third_party/glslang/src/Test/baseResults/spv.conversion.frag.out
new file mode 100755
index 00000000000..bc91569857c
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/spv.conversion.frag.out
@@ -0,0 +1,577 @@
+spv.conversion.frag
+
+Linked fragment stage:
+
+
+// Module Version 10000
+// Generated by (magic number): 80001
+// Id's are bound by 455
+
+ Capability Shader
+ 1: ExtInstImport "GLSL.std.450"
+ MemoryModel Logical GLSL450
+ EntryPoint Fragment 4 "main" 39 53 157 322 446 448 450 452 454
+ ExecutionMode 4 OriginUpperLeft
+ Source GLSL 140
+ Name 4 "main"
+ Name 8 "b"
+ Name 11 "u_i"
+ Name 18 "u_f"
+ Name 25 "b2"
+ Name 33 "b3"
+ Name 39 "i_i"
+ Name 45 "b4"
+ Name 53 "i_f"
+ Name 58 "i"
+ Name 68 "i2"
+ Name 71 "u_f2"
+ Name 81 "i3"
+ Name 84 "u_f3"
+ Name 94 "i4"
+ Name 97 "u_f4"
+ Name 106 "f"
+ Name 110 "f2"
+ Name 114 "f3"
+ Name 118 "f4"
+ Name 157 "i_i4"
+ Name 322 "gl_FragColor"
+ Name 417 "cv2"
+ Name 418 "cv5"
+ Name 428 "u_b"
+ Name 430 "u_b2"
+ Name 432 "u_b3"
+ Name 434 "u_b4"
+ Name 436 "u_i2"
+ Name 438 "u_i3"
+ Name 440 "u_i4"
+ Name 441 "i_b"
+ Name 442 "i_b2"
+ Name 443 "i_b3"
+ Name 444 "i_b4"
+ Name 446 "i_i2"
+ Name 448 "i_i3"
+ Name 450 "i_f2"
+ Name 452 "i_f3"
+ Name 454 "i_f4"
+ Decorate 39(i_i) Flat
+ Decorate 157(i_i4) Flat
+ Decorate 446(i_i2) Flat
+ Decorate 448(i_i3) Flat
+ 2: TypeVoid
+ 3: TypeFunction 2
+ 6: TypeBool
+ 7: TypePointer Function 6(bool)
+ 9: TypeInt 32 1
+ 10: TypePointer Private 9(int)
+ 11(u_i): 10(ptr) Variable Private
+ 13: TypeInt 32 0
+ 14: 13(int) Constant 0
+ 16: TypeFloat 32
+ 17: TypePointer Private 16(float)
+ 18(u_f): 17(ptr) Variable Private
+ 20: 16(float) Constant 0
+ 23: TypeVector 6(bool) 2
+ 24: TypePointer Function 23(bvec2)
+ 31: TypeVector 6(bool) 3
+ 32: TypePointer Function 31(bvec3)
+ 38: TypePointer Input 9(int)
+ 39(i_i): 38(ptr) Variable Input
+ 43: TypeVector 6(bool) 4
+ 44: TypePointer Function 43(bvec4)
+ 52: TypePointer Input 16(float)
+ 53(i_f): 52(ptr) Variable Input
+ 57: TypePointer Function 9(int)
+ 62: 9(int) Constant 0
+ 63: 9(int) Constant 1
+ 66: TypeVector 9(int) 2
+ 67: TypePointer Function 66(ivec2)
+ 69: TypeVector 16(float) 2
+ 70: TypePointer Private 69(fvec2)
+ 71(u_f2): 70(ptr) Variable Private
+ 75: 66(ivec2) ConstantComposite 62 62
+ 76: 66(ivec2) ConstantComposite 63 63
+ 79: TypeVector 9(int) 3
+ 80: TypePointer Function 79(ivec3)
+ 82: TypeVector 16(float) 3
+ 83: TypePointer Private 82(fvec3)
+ 84(u_f3): 83(ptr) Variable Private
+ 88: 79(ivec3) ConstantComposite 62 62 62
+ 89: 79(ivec3) ConstantComposite 63 63 63
+ 92: TypeVector 9(int) 4
+ 93: TypePointer Function 92(ivec4)
+ 95: TypeVector 16(float) 4
+ 96: TypePointer Private 95(fvec4)
+ 97(u_f4): 96(ptr) Variable Private
+ 101: 92(ivec4) ConstantComposite 62 62 62 62
+ 102: 92(ivec4) ConstantComposite 63 63 63 63
+ 105: TypePointer Function 16(float)
+ 109: TypePointer Function 69(fvec2)
+ 113: TypePointer Function 82(fvec3)
+ 117: TypePointer Function 95(fvec4)
+ 124: 16(float) Constant 1065353216
+ 132: 69(fvec2) ConstantComposite 20 20
+ 133: 69(fvec2) ConstantComposite 124 124
+ 141: 82(fvec3) ConstantComposite 20 20 20
+ 142: 82(fvec3) ConstantComposite 124 124 124
+ 150: 95(fvec4) ConstantComposite 20 20 20 20
+ 151: 95(fvec4) ConstantComposite 124 124 124 124
+ 156: TypePointer Input 92(ivec4)
+ 157(i_i4): 156(ptr) Variable Input
+ 159: TypeVector 13(int) 4
+ 160: 159(ivec4) ConstantComposite 14 14 14 14
+ 315: 13(int) Constant 1
+ 321: TypePointer Output 95(fvec4)
+322(gl_FragColor): 321(ptr) Variable Output
+ 367: 13(int) Constant 2
+ 380: 13(int) Constant 3
+ 427: TypePointer Private 6(bool)
+ 428(u_b): 427(ptr) Variable Private
+ 429: TypePointer Private 23(bvec2)
+ 430(u_b2): 429(ptr) Variable Private
+ 431: TypePointer Private 31(bvec3)
+ 432(u_b3): 431(ptr) Variable Private
+ 433: TypePointer Private 43(bvec4)
+ 434(u_b4): 433(ptr) Variable Private
+ 435: TypePointer Private 66(ivec2)
+ 436(u_i2): 435(ptr) Variable Private
+ 437: TypePointer Private 79(ivec3)
+ 438(u_i3): 437(ptr) Variable Private
+ 439: TypePointer Private 92(ivec4)
+ 440(u_i4): 439(ptr) Variable Private
+ 441(i_b): 427(ptr) Variable Private
+ 442(i_b2): 429(ptr) Variable Private
+ 443(i_b3): 431(ptr) Variable Private
+ 444(i_b4): 433(ptr) Variable Private
+ 445: TypePointer Input 66(ivec2)
+ 446(i_i2): 445(ptr) Variable Input
+ 447: TypePointer Input 79(ivec3)
+ 448(i_i3): 447(ptr) Variable Input
+ 449: TypePointer Input 69(fvec2)
+ 450(i_f2): 449(ptr) Variable Input
+ 451: TypePointer Input 82(fvec3)
+ 452(i_f3): 451(ptr) Variable Input
+ 453: TypePointer Input 95(fvec4)
+ 454(i_f4): 453(ptr) Variable Input
+ 4(main): 2 Function None 3
+ 5: Label
+ 8(b): 7(ptr) Variable Function
+ 25(b2): 24(ptr) Variable Function
+ 33(b3): 32(ptr) Variable Function
+ 45(b4): 44(ptr) Variable Function
+ 58(i): 57(ptr) Variable Function
+ 68(i2): 67(ptr) Variable Function
+ 81(i3): 80(ptr) Variable Function
+ 94(i4): 93(ptr) Variable Function
+ 106(f): 105(ptr) Variable Function
+ 110(f2): 109(ptr) Variable Function
+ 114(f3): 113(ptr) Variable Function
+ 118(f4): 117(ptr) Variable Function
+ 297: 105(ptr) Variable Function
+ 307: 105(ptr) Variable Function
+ 323: 117(ptr) Variable Function
+ 417(cv2): 93(ptr) Variable Function
+ 418(cv5): 44(ptr) Variable Function
+ 12: 9(int) Load 11(u_i)
+ 15: 6(bool) INotEqual 12 14
+ 19: 16(float) Load 18(u_f)
+ 21: 6(bool) FOrdNotEqual 19 20
+ 22: 6(bool) LogicalNotEqual 15 21
+ Store 8(b) 22
+ 26: 9(int) Load 11(u_i)
+ 27: 6(bool) INotEqual 26 14
+ 28: 16(float) Load 18(u_f)
+ 29: 6(bool) FOrdNotEqual 28 20
+ 30: 23(bvec2) CompositeConstruct 27 29
+ Store 25(b2) 30
+ 34: 9(int) Load 11(u_i)
+ 35: 6(bool) INotEqual 34 14
+ 36: 16(float) Load 18(u_f)
+ 37: 6(bool) FOrdNotEqual 36 20
+ 40: 9(int) Load 39(i_i)
+ 41: 6(bool) INotEqual 40 14
+ 42: 31(bvec3) CompositeConstruct 35 37 41
+ Store 33(b3) 42
+ 46: 9(int) Load 11(u_i)
+ 47: 6(bool) INotEqual 46 14
+ 48: 16(float) Load 18(u_f)
+ 49: 6(bool) FOrdNotEqual 48 20
+ 50: 9(int) Load 39(i_i)
+ 51: 6(bool) INotEqual 50 14
+ 54: 16(float) Load 53(i_f)
+ 55: 6(bool) FOrdNotEqual 54 20
+ 56: 43(bvec4) CompositeConstruct 47 49 51 55
+ Store 45(b4) 56
+ 59: 16(float) Load 18(u_f)
+ 60: 9(int) ConvertFToS 59
+ 61: 6(bool) Load 8(b)
+ 64: 9(int) Select 61 63 62
+ 65: 9(int) IAdd 60 64
+ Store 58(i) 65
+ 72: 69(fvec2) Load 71(u_f2)
+ 73: 66(ivec2) ConvertFToS 72
+ 74: 23(bvec2) Load 25(b2)
+ 77: 66(ivec2) Select 74 76 75
+ 78: 66(ivec2) IAdd 73 77
+ Store 68(i2) 78
+ 85: 82(fvec3) Load 84(u_f3)
+ 86: 79(ivec3) ConvertFToS 85
+ 87: 31(bvec3) Load 33(b3)
+ 90: 79(ivec3) Select 87 89 88
+ 91: 79(ivec3) IAdd 86 90
+ Store 81(i3) 91
+ 98: 95(fvec4) Load 97(u_f4)
+ 99: 92(ivec4) ConvertFToS 98
+ 100: 43(bvec4) Load 45(b4)
+ 103: 92(ivec4) Select 100 102 101
+ 104: 92(ivec4) IAdd 99 103
+ Store 94(i4) 104
+ 107: 9(int) Load 58(i)
+ 108: 16(float) ConvertSToF 107
+ Store 106(f) 108
+ 111: 66(ivec2) Load 68(i2)
+ 112: 69(fvec2) ConvertSToF 111
+ Store 110(f2) 112
+ 115: 79(ivec3) Load 81(i3)
+ 116: 82(fvec3) ConvertSToF 115
+ Store 114(f3) 116
+ 119: 92(ivec4) Load 94(i4)
+ 120: 95(fvec4) ConvertSToF 119
+ Store 118(f4) 120
+ 121: 9(int) Load 58(i)
+ 122: 16(float) ConvertSToF 121
+ 123: 6(bool) Load 8(b)
+ 125: 16(float) Select 123 124 20
+ 126: 16(float) FAdd 122 125
+ 127: 16(float) Load 106(f)
+ 128: 16(float) FAdd 127 126
+ Store 106(f) 128
+ 129: 66(ivec2) Load 68(i2)
+ 130: 69(fvec2) ConvertSToF 129
+ 131: 23(bvec2) Load 25(b2)
+ 134: 69(fvec2) Select 131 133 132
+ 135: 69(fvec2) FAdd 130 134
+ 136: 69(fvec2) Load 110(f2)
+ 137: 69(fvec2) FSub 136 135
+ Store 110(f2) 137
+ 138: 79(ivec3) Load 81(i3)
+ 139: 82(fvec3) ConvertSToF 138
+ 140: 31(bvec3) Load 33(b3)
+ 143: 82(fvec3) Select 140 142 141
+ 144: 82(fvec3) FAdd 139 143
+ 145: 82(fvec3) Load 114(f3)
+ 146: 82(fvec3) FDiv 145 144
+ Store 114(f3) 146
+ 147: 92(ivec4) Load 94(i4)
+ 148: 95(fvec4) ConvertSToF 147
+ 149: 43(bvec4) Load 45(b4)
+ 152: 95(fvec4) Select 149 151 150
+ 153: 95(fvec4) FAdd 148 152
+ 154: 95(fvec4) Load 118(f4)
+ 155: 95(fvec4) FAdd 154 153
+ Store 118(f4) 155
+ 158: 92(ivec4) Load 157(i_i4)
+ 161: 43(bvec4) INotEqual 158 160
+ 162: 95(fvec4) Select 161 151 150
+ 163: 95(fvec4) Load 118(f4)
+ 164: 95(fvec4) FAdd 163 162
+ Store 118(f4) 164
+ 165: 95(fvec4) Load 97(u_f4)
+ 166: 43(bvec4) FOrdNotEqual 165 150
+ 167: 95(fvec4) Select 166 151 150
+ 168: 95(fvec4) Load 118(f4)
+ 169: 95(fvec4) FAdd 168 167
+ Store 118(f4) 169
+ 170: 16(float) Load 106(f)
+ 171: 9(int) Load 58(i)
+ 172: 16(float) ConvertSToF 171
+ 173: 16(float) FSub 170 172
+ 174: 16(float) Load 106(f)
+ 175: 16(float) FAdd 174 173
+ Store 106(f) 175
+ 176: 16(float) Load 106(f)
+ 177: 9(int) Load 58(i)
+ 178: 16(float) ConvertSToF 177
+ 179: 69(fvec2) CompositeConstruct 176 178
+ 180: 66(ivec2) Load 68(i2)
+ 181: 69(fvec2) ConvertSToF 180
+ 182: 69(fvec2) FAdd 179 181
+ 183: 69(fvec2) Load 110(f2)
+ 184: 69(fvec2) FAdd 183 182
+ Store 110(f2) 184
+ 185: 79(ivec3) Load 81(i3)
+ 186: 82(fvec3) ConvertSToF 185
+ 187: 16(float) Load 106(f)
+ 188: 9(int) Load 58(i)
+ 189: 16(float) ConvertSToF 188
+ 190: 16(float) Load 106(f)
+ 191: 82(fvec3) CompositeConstruct 187 189 190
+ 192: 82(fvec3) FAdd 186 191
+ 193: 82(fvec3) Load 114(f3)
+ 194: 82(fvec3) FAdd 193 192
+ Store 114(f3) 194
+ 195: 6(bool) Load 8(b)
+ 196: 16(float) Select 195 124 20
+ 197: 9(int) Load 58(i)
+ 198: 16(float) ConvertSToF 197
+ 199: 16(float) Load 106(f)
+ 200: 9(int) Load 58(i)
+ 201: 16(float) ConvertSToF 200
+ 202: 95(fvec4) CompositeConstruct 196 198 199 201
+ 203: 92(ivec4) Load 94(i4)
+ 204: 95(fvec4) ConvertSToF 203
+ 205: 95(fvec4) FAdd 202 204
+ 206: 95(fvec4) Load 118(f4)
+ 207: 95(fvec4) FAdd 206 205
+ Store 118(f4) 207
+ 208: 16(float) Load 106(f)
+ 209: 9(int) Load 58(i)
+ 210: 16(float) ConvertSToF 209
+ 211: 69(fvec2) CompositeConstruct 208 210
+ 212: 9(int) Load 58(i)
+ 213: 16(float) ConvertSToF 212
+ 214: 69(fvec2) VectorTimesScalar 211 213
+ 215: 69(fvec2) Load 110(f2)
+ 216: 69(fvec2) FAdd 215 214
+ Store 110(f2) 216
+ 217: 16(float) Load 106(f)
+ 218: 9(int) Load 58(i)
+ 219: 16(float) ConvertSToF 218
+ 220: 16(float) Load 106(f)
+ 221: 82(fvec3) CompositeConstruct 217 219 220
+ 222: 9(int) Load 58(i)
+ 223: 16(float) ConvertSToF 222
+ 224: 82(fvec3) CompositeConstruct 223 223 223
+ 225: 82(fvec3) FAdd 221 224
+ 226: 82(fvec3) Load 114(f3)
+ 227: 82(fvec3) FAdd 226 225
+ Store 114(f3) 227
+ 228: 9(int) Load 58(i)
+ 229: 16(float) ConvertSToF 228
+ 230: 6(bool) Load 8(b)
+ 231: 16(float) Select 230 124 20
+ 232: 9(int) Load 58(i)
+ 233: 16(float) ConvertSToF 232
+ 234: 16(float) Load 106(f)
+ 235: 9(int) Load 58(i)
+ 236: 16(float) ConvertSToF 235
+ 237: 95(fvec4) CompositeConstruct 231 233 234 236
+ 238: 95(fvec4) CompositeConstruct 229 229 229 229
+ 239: 95(fvec4) FSub 238 237
+ 240: 95(fvec4) Load 118(f4)
+ 241: 95(fvec4) FAdd 240 239
+ Store 118(f4) 241
+ 242: 16(float) Load 106(f)
+ 243: 9(int) ConvertFToS 242
+ 244: 9(int) Load 58(i)
+ 245: 66(ivec2) CompositeConstruct 243 244
+ 246: 66(ivec2) Load 68(i2)
+ 247: 66(ivec2) IAdd 246 245
+ Store 68(i2) 247
+ 248: 16(float) Load 106(f)
+ 249: 9(int) ConvertFToS 248
+ 250: 9(int) Load 58(i)
+ 251: 16(float) Load 106(f)
+ 252: 9(int) ConvertFToS 251
+ 253: 79(ivec3) CompositeConstruct 249 250 252
+ 254: 79(ivec3) Load 81(i3)
+ 255: 79(ivec3) IAdd 254 253
+ Store 81(i3) 255
+ 256: 6(bool) Load 8(b)
+ 257: 9(int) Select 256 63 62
+ 258: 9(int) Load 58(i)
+ 259: 16(float) Load 106(f)
+ 260: 9(int) ConvertFToS 259
+ 261: 9(int) Load 58(i)
+ 262: 92(ivec4) CompositeConstruct 257 258 260 261
+ 263: 92(ivec4) Load 94(i4)
+ 264: 92(ivec4) IAdd 263 262
+ Store 94(i4) 264
+ 265: 16(float) Load 106(f)
+ 266: 9(int) Load 58(i)
+ 267: 16(float) ConvertSToF 266
+ 268: 6(bool) FOrdLessThan 265 267
+ 269: 6(bool) LogicalNot 268
+ SelectionMerge 271 None
+ BranchConditional 269 270 271
+ 270: Label
+ 272: 9(int) Load 58(i)
+ 273: 16(float) ConvertSToF 272
+ 274: 16(float) Load 106(f)
+ 275: 6(bool) FOrdLessThan 273 274
+ Branch 271
+ 271: Label
+ 276: 6(bool) Phi 268 5 275 270
+ 277: 6(bool) LogicalNot 276
+ SelectionMerge 279 None
+ BranchConditional 277 278 279
+ 278: Label
+ 280: 69(fvec2) Load 110(f2)
+ 281: 66(ivec2) Load 68(i2)
+ 282: 69(fvec2) ConvertSToF 281
+ 283: 23(bvec2) FOrdEqual 280 282
+ 284: 6(bool) All 283
+ Branch 279
+ 279: Label
+ 285: 6(bool) Phi 276 271 284 278
+ 286: 6(bool) LogicalNot 285
+ SelectionMerge 288 None
+ BranchConditional 286 287 288
+ 287: Label
+ 289: 79(ivec3) Load 81(i3)
+ 290: 82(fvec3) ConvertSToF 289
+ 291: 82(fvec3) Load 114(f3)
+ 292: 31(bvec3) FOrdNotEqual 290 291
+ 293: 6(bool) Any 292
+ Branch 288
+ 288: Label
+ 294: 6(bool) Phi 285 279 293 287
+ SelectionMerge 296 None
+ BranchConditional 294 295 296
+ 295: Label
+ 298: 6(bool) Load 8(b)
+ SelectionMerge 300 None
+ BranchConditional 298 299 303
+ 299: Label
+ 301: 9(int) Load 58(i)
+ 302: 16(float) ConvertSToF 301
+ Store 297 302
+ Branch 300
+ 303: Label
+ 304: 105(ptr) AccessChain 110(f2) 14
+ 305: 16(float) Load 304
+ Store 297 305
+ Branch 300
+ 300: Label
+ 306: 16(float) Load 297
+ 308: 23(bvec2) Load 25(b2)
+ 309: 6(bool) CompositeExtract 308 0
+ SelectionMerge 311 None
+ BranchConditional 309 310 314
+ 310: Label
+ 312: 105(ptr) AccessChain 114(f3) 14
+ 313: 16(float) Load 312
+ Store 307 313
+ Branch 311
+ 314: Label
+ 316: 57(ptr) AccessChain 68(i2) 315
+ 317: 9(int) Load 316
+ 318: 16(float) ConvertSToF 317
+ Store 307 318
+ Branch 311
+ 311: Label
+ 319: 16(float) Load 307
+ 320: 16(float) FAdd 306 319
+ Store 106(f) 320
+ Branch 296
+ 296: Label
+ 324: 6(bool) Load 8(b)
+ 325: 23(bvec2) Load 25(b2)
+ 326: 6(bool) CompositeExtract 325 0
+ 327: 6(bool) LogicalOr 324 326
+ 328: 23(bvec2) Load 25(b2)
+ 329: 6(bool) CompositeExtract 328 1
+ 330: 6(bool) LogicalOr 327 329
+ 331: 31(bvec3) Load 33(b3)
+ 332: 6(bool) CompositeExtract 331 0
+ 333: 6(bool) LogicalOr 330 332
+ 334: 31(bvec3) Load 33(b3)
+ 335: 6(bool) CompositeExtract 334 1
+ 336: 6(bool) LogicalOr 333 335
+ 337: 31(bvec3) Load 33(b3)
+ 338: 6(bool) CompositeExtract 337 2
+ 339: 6(bool) LogicalOr 336 338
+ 340: 43(bvec4) Load 45(b4)
+ 341: 6(bool) CompositeExtract 340 0
+ 342: 6(bool) LogicalOr 339 341
+ 343: 43(bvec4) Load 45(b4)
+ 344: 6(bool) CompositeExtract 343 1
+ 345: 6(bool) LogicalOr 342 344
+ 346: 43(bvec4) Load 45(b4)
+ 347: 6(bool) CompositeExtract 346 2
+ 348: 6(bool) LogicalOr 345 347
+ 349: 43(bvec4) Load 45(b4)
+ 350: 6(bool) CompositeExtract 349 3
+ 351: 6(bool) LogicalOr 348 350
+ SelectionMerge 353 None
+ BranchConditional 351 352 415
+ 352: Label
+ 354: 9(int) Load 58(i)
+ 355: 57(ptr) AccessChain 68(i2) 14
+ 356: 9(int) Load 355
+ 357: 9(int) IAdd 354 356
+ 358: 57(ptr) AccessChain 68(i2) 315
+ 359: 9(int) Load 358
+ 360: 9(int) IAdd 357 359
+ 361: 57(ptr) AccessChain 81(i3) 14
+ 362: 9(int) Load 361
+ 363: 9(int) IAdd 360 362
+ 364: 57(ptr) AccessChain 81(i3) 315
+ 365: 9(int) Load 364
+ 366: 9(int) IAdd 363 365
+ 368: 57(ptr) AccessChain 81(i3) 367
+ 369: 9(int) Load 368
+ 370: 9(int) IAdd 366 369
+ 371: 57(ptr) AccessChain 94(i4) 14
+ 372: 9(int) Load 371
+ 373: 9(int) IAdd 370 372
+ 374: 57(ptr) AccessChain 94(i4) 315
+ 375: 9(int) Load 374
+ 376: 9(int) IAdd 373 375
+ 377: 57(ptr) AccessChain 94(i4) 367
+ 378: 9(int) Load 377
+ 379: 9(int) IAdd 376 378
+ 381: 57(ptr) AccessChain 94(i4) 380
+ 382: 9(int) Load 381
+ 383: 9(int) IAdd 379 382
+ 384: 16(float) ConvertSToF 383
+ 385: 16(float) Load 106(f)
+ 386: 16(float) FAdd 384 385
+ 387: 105(ptr) AccessChain 110(f2) 14
+ 388: 16(float) Load 387
+ 389: 16(float) FAdd 386 388
+ 390: 105(ptr) AccessChain 110(f2) 315
+ 391: 16(float) Load 390
+ 392: 16(float) FAdd 389 391
+ 393: 105(ptr) AccessChain 114(f3) 14
+ 394: 16(float) Load 393
+ 395: 16(float) FAdd 392 394
+ 396: 105(ptr) AccessChain 114(f3) 315
+ 397: 16(float) Load 396
+ 398: 16(float) FAdd 395 397
+ 399: 105(ptr) AccessChain 114(f3) 367
+ 400: 16(float) Load 399
+ 401: 16(float) FAdd 398 400
+ 402: 105(ptr) AccessChain 118(f4) 14
+ 403: 16(float) Load 402
+ 404: 16(float) FAdd 401 403
+ 405: 105(ptr) AccessChain 118(f4) 315
+ 406: 16(float) Load 405
+ 407: 16(float) FAdd 404 406
+ 408: 105(ptr) AccessChain 118(f4) 367
+ 409: 16(float) Load 408
+ 410: 16(float) FAdd 407 409
+ 411: 105(ptr) AccessChain 118(f4) 380
+ 412: 16(float) Load 411
+ 413: 16(float) FAdd 410 412
+ 414: 95(fvec4) CompositeConstruct 413 413 413 413
+ Store 323 414
+ Branch 353
+ 415: Label
+ Store 323 151
+ Branch 353
+ 353: Label
+ 416: 95(fvec4) Load 323
+ Store 322(gl_FragColor) 416
+ Store 417(cv2) 102
+ 419: 92(ivec4) Load 417(cv2)
+ 420: 43(bvec4) INotEqual 419 160
+ Store 418(cv5) 420
+ 421: 43(bvec4) Load 418(cv5)
+ 422: 95(fvec4) Select 421 151 150
+ 423: 16(float) CompositeExtract 422 0
+ 424: 95(fvec4) Load 322(gl_FragColor)
+ 425: 95(fvec4) CompositeConstruct 423 423 423 423
+ 426: 95(fvec4) FAdd 424 425
+ Store 322(gl_FragColor) 426
+ Return
+ FunctionEnd
diff --git a/chromium/third_party/glslang/src/Test/baseResults/spv.dataOut.frag.out b/chromium/third_party/glslang/src/Test/baseResults/spv.dataOut.frag.out
new file mode 100755
index 00000000000..651c96e3d15
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/spv.dataOut.frag.out
@@ -0,0 +1,39 @@
+spv.dataOut.frag
+
+Linked fragment stage:
+
+
+// Module Version 10000
+// Generated by (magic number): 80001
+// Id's are bound by 20
+
+ Capability Shader
+ 1: ExtInstImport "GLSL.std.450"
+ MemoryModel Logical GLSL450
+ EntryPoint Fragment 4 "main" 12 16
+ ExecutionMode 4 OriginUpperLeft
+ Source GLSL 140
+ Name 4 "main"
+ Name 12 "gl_FragData"
+ Name 16 "Color"
+ 2: TypeVoid
+ 3: TypeFunction 2
+ 6: TypeFloat 32
+ 7: TypeVector 6(float) 4
+ 8: TypeInt 32 0
+ 9: 8(int) Constant 32
+ 10: TypeArray 7(fvec4) 9
+ 11: TypePointer Output 10
+ 12(gl_FragData): 11(ptr) Variable Output
+ 13: TypeInt 32 1
+ 14: 13(int) Constant 1
+ 15: TypePointer Input 7(fvec4)
+ 16(Color): 15(ptr) Variable Input
+ 18: TypePointer Output 7(fvec4)
+ 4(main): 2 Function None 3
+ 5: Label
+ 17: 7(fvec4) Load 16(Color)
+ 19: 18(ptr) AccessChain 12(gl_FragData) 14
+ Store 19 17
+ Return
+ FunctionEnd
diff --git a/chromium/third_party/glslang/src/Test/baseResults/spv.dataOutIndirect.frag.out b/chromium/third_party/glslang/src/Test/baseResults/spv.dataOutIndirect.frag.out
new file mode 100755
index 00000000000..d1227a5bba0
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/spv.dataOutIndirect.frag.out
@@ -0,0 +1,51 @@
+spv.dataOutIndirect.frag
+
+Linked fragment stage:
+
+
+// Module Version 10000
+// Generated by (magic number): 80001
+// Id's are bound by 26
+
+ Capability Shader
+ 1: ExtInstImport "GLSL.std.450"
+ MemoryModel Logical GLSL450
+ EntryPoint Fragment 4 "main" 12 22
+ ExecutionMode 4 OriginUpperLeft
+ Source GLSL 140
+ Name 4 "main"
+ Name 12 "fcolor"
+ Name 14 "b"
+ MemberName 14(b) 0 "i"
+ Name 16 "bName"
+ Name 22 "Color"
+ MemberDecorate 14(b) 0 Offset 0
+ Decorate 14(b) Block
+ Decorate 16(bName) DescriptorSet 0
+ 2: TypeVoid
+ 3: TypeFunction 2
+ 6: TypeFloat 32
+ 7: TypeVector 6(float) 4
+ 8: TypeInt 32 0
+ 9: 8(int) Constant 4
+ 10: TypeArray 7(fvec4) 9
+ 11: TypePointer Output 10
+ 12(fcolor): 11(ptr) Variable Output
+ 13: TypeInt 32 1
+ 14(b): TypeStruct 13(int)
+ 15: TypePointer Uniform 14(b)
+ 16(bName): 15(ptr) Variable Uniform
+ 17: 13(int) Constant 0
+ 18: TypePointer Uniform 13(int)
+ 21: TypePointer Input 7(fvec4)
+ 22(Color): 21(ptr) Variable Input
+ 24: TypePointer Output 7(fvec4)
+ 4(main): 2 Function None 3
+ 5: Label
+ 19: 18(ptr) AccessChain 16(bName) 17
+ 20: 13(int) Load 19
+ 23: 7(fvec4) Load 22(Color)
+ 25: 24(ptr) AccessChain 12(fcolor) 20
+ Store 25 23
+ Return
+ FunctionEnd
diff --git a/chromium/third_party/glslang/src/Test/baseResults/spv.dataOutIndirect.vert.out b/chromium/third_party/glslang/src/Test/baseResults/spv.dataOutIndirect.vert.out
new file mode 100755
index 00000000000..797c65180b7
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/spv.dataOutIndirect.vert.out
@@ -0,0 +1,70 @@
+spv.dataOutIndirect.vert
+WARNING: 0:3: attribute deprecated in version 130; may be removed in future release
+
+
+Linked vertex stage:
+
+
+// Module Version 10000
+// Generated by (magic number): 80001
+// Id's are bound by 38
+
+ Capability Shader
+ 1: ExtInstImport "GLSL.std.450"
+ MemoryModel Logical GLSL450
+ EntryPoint Vertex 4 "main" 25 28 34
+ Source GLSL 140
+ Name 4 "main"
+ Name 8 "i"
+ Name 25 "colorOut"
+ Name 28 "color"
+ Name 34 "gl_Position"
+ Decorate 34(gl_Position) BuiltIn Position
+ 2: TypeVoid
+ 3: TypeFunction 2
+ 6: TypeInt 32 1
+ 7: TypePointer Function 6(int)
+ 9: 6(int) Constant 1
+ 16: 6(int) Constant 5
+ 17: TypeBool
+ 19: TypeFloat 32
+ 20: TypeVector 19(float) 4
+ 21: TypeInt 32 0
+ 22: 21(int) Constant 6
+ 23: TypeArray 20(fvec4) 22
+ 24: TypePointer Output 23
+ 25(colorOut): 24(ptr) Variable Output
+ 27: TypePointer Input 20(fvec4)
+ 28(color): 27(ptr) Variable Input
+ 30: TypePointer Output 20(fvec4)
+ 34(gl_Position): 30(ptr) Variable Output
+ 35: 6(int) Constant 2
+ 4(main): 2 Function None 3
+ 5: Label
+ 8(i): 7(ptr) Variable Function
+ Store 8(i) 9
+ Branch 10
+ 10: Label
+ LoopMerge 12 13 None
+ Branch 14
+ 14: Label
+ 15: 6(int) Load 8(i)
+ 18: 17(bool) SLessThan 15 16
+ BranchConditional 18 11 12
+ 11: Label
+ 26: 6(int) Load 8(i)
+ 29: 20(fvec4) Load 28(color)
+ 31: 30(ptr) AccessChain 25(colorOut) 26
+ Store 31 29
+ Branch 13
+ 13: Label
+ 32: 6(int) Load 8(i)
+ 33: 6(int) IAdd 32 9
+ Store 8(i) 33
+ Branch 10
+ 12: Label
+ 36: 30(ptr) AccessChain 25(colorOut) 35
+ 37: 20(fvec4) Load 36
+ Store 34(gl_Position) 37
+ Return
+ FunctionEnd
diff --git a/chromium/third_party/glslang/src/Test/baseResults/spv.deepRvalue.frag.out b/chromium/third_party/glslang/src/Test/baseResults/spv.deepRvalue.frag.out
new file mode 100644
index 00000000000..b4894383e5c
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/spv.deepRvalue.frag.out
@@ -0,0 +1,209 @@
+spv.deepRvalue.frag
+
+Linked fragment stage:
+
+
+// Module Version 10000
+// Generated by (magic number): 80001
+// Id's are bound by 155
+
+ Capability Shader
+ 1: ExtInstImport "GLSL.std.450"
+ MemoryModel Logical GLSL450
+ EntryPoint Fragment 4 "main" 149
+ ExecutionMode 4 OriginUpperLeft
+ Source GLSL 330
+ Name 4 "main"
+ Name 9 "v1"
+ Name 15 "v2"
+ Name 21 "v3"
+ Name 27 "v4"
+ Name 35 "m"
+ Name 63 "mm"
+ Name 80 "f"
+ Name 87 "g"
+ Name 106 "h"
+ Name 107 "i"
+ Name 111 "samp2D"
+ Name 134 "str"
+ MemberName 134(str) 0 "a"
+ MemberName 134(str) 1 "b"
+ MemberName 134(str) 2 "c"
+ Name 136 "t"
+ Name 149 "gl_FragColor"
+ Decorate 111(samp2D) DescriptorSet 0
+ 2: TypeVoid
+ 3: TypeFunction 2
+ 6: TypeFloat 32
+ 7: TypeVector 6(float) 4
+ 8: TypePointer Private 7(fvec4)
+ 9(v1): 8(ptr) Variable Private
+ 10: 6(float) Constant 1073741824
+ 11: 6(float) Constant 1077936128
+ 12: 6(float) Constant 1084227584
+ 13: 6(float) Constant 1088421888
+ 14: 7(fvec4) ConstantComposite 10 11 12 13
+ 15(v2): 8(ptr) Variable Private
+ 16: 6(float) Constant 1093664768
+ 17: 6(float) Constant 1095761920
+ 18: 6(float) Constant 1099431936
+ 19: 6(float) Constant 1100480512
+ 20: 7(fvec4) ConstantComposite 16 17 18 19
+ 21(v3): 8(ptr) Variable Private
+ 22: 6(float) Constant 1102577664
+ 23: 6(float) Constant 1105723392
+ 24: 6(float) Constant 1106771968
+ 25: 6(float) Constant 1108606976
+ 26: 7(fvec4) ConstantComposite 22 23 24 25
+ 27(v4): 8(ptr) Variable Private
+ 28: 6(float) Constant 1109655552
+ 29: 6(float) Constant 1110179840
+ 30: 6(float) Constant 1111228416
+ 31: 6(float) Constant 1112801280
+ 32: 7(fvec4) ConstantComposite 28 29 30 31
+ 33: TypeMatrix 7(fvec4) 4
+ 34: TypePointer Function 33
+ 40: 6(float) Constant 1065353216
+ 41: 6(float) Constant 0
+ 79: TypePointer Function 6(float)
+ 81: TypeInt 32 1
+ 82: 81(int) Constant 1
+ 83: TypeInt 32 0
+ 84: 83(int) Constant 3
+ 103: 81(int) Constant 2
+ 104: 83(int) Constant 1
+ 108: TypeImage 6(float) 2D sampled format:Unknown
+ 109: TypeSampledImage 108
+ 110: TypePointer UniformConstant 109
+ 111(samp2D): 110(ptr) Variable UniformConstant
+ 113: TypeVector 6(float) 2
+ 114: 6(float) Constant 1056964608
+ 115: 113(fvec2) ConstantComposite 114 114
+ 118: TypePointer Function 7(fvec4)
+ 121: 6(float) Constant 1036831949
+ 122: TypeBool
+ 133: TypeArray 113(fvec2) 84
+ 134(str): TypeStruct 81(int) 133 122(bool)
+ 135: TypePointer Function 134(str)
+ 137: 113(fvec2) ConstantComposite 10 11
+ 138: 6(float) Constant 1082130432
+ 139: 113(fvec2) ConstantComposite 138 12
+ 140: 6(float) Constant 1086324736
+ 141: 113(fvec2) ConstantComposite 140 13
+ 142: 133 ConstantComposite 137 139 141
+ 143: 122(bool) ConstantTrue
+ 144: 134(str) ConstantComposite 82 142 143
+ 148: TypePointer Output 7(fvec4)
+149(gl_FragColor): 148(ptr) Variable Output
+ 4(main): 2 Function None 3
+ 5: Label
+ 35(m): 34(ptr) Variable Function
+ 63(mm): 34(ptr) Variable Function
+ 80(f): 79(ptr) Variable Function
+ 87(g): 79(ptr) Variable Function
+ 106(h): 79(ptr) Variable Function
+ 107(i): 79(ptr) Variable Function
+ 119: 118(ptr) Variable Function
+ 136(t): 135(ptr) Variable Function
+ Store 9(v1) 14
+ Store 15(v2) 20
+ Store 21(v3) 26
+ Store 27(v4) 32
+ 36: 7(fvec4) Load 9(v1)
+ 37: 7(fvec4) Load 15(v2)
+ 38: 7(fvec4) Load 21(v3)
+ 39: 7(fvec4) Load 27(v4)
+ 42: 6(float) CompositeExtract 36 0
+ 43: 6(float) CompositeExtract 36 1
+ 44: 6(float) CompositeExtract 36 2
+ 45: 6(float) CompositeExtract 36 3
+ 46: 6(float) CompositeExtract 37 0
+ 47: 6(float) CompositeExtract 37 1
+ 48: 6(float) CompositeExtract 37 2
+ 49: 6(float) CompositeExtract 37 3
+ 50: 6(float) CompositeExtract 38 0
+ 51: 6(float) CompositeExtract 38 1
+ 52: 6(float) CompositeExtract 38 2
+ 53: 6(float) CompositeExtract 38 3
+ 54: 6(float) CompositeExtract 39 0
+ 55: 6(float) CompositeExtract 39 1
+ 56: 6(float) CompositeExtract 39 2
+ 57: 6(float) CompositeExtract 39 3
+ 58: 7(fvec4) CompositeConstruct 42 43 44 45
+ 59: 7(fvec4) CompositeConstruct 46 47 48 49
+ 60: 7(fvec4) CompositeConstruct 50 51 52 53
+ 61: 7(fvec4) CompositeConstruct 54 55 56 57
+ 62: 33 CompositeConstruct 58 59 60 61
+ Store 35(m) 62
+ 64: 33 Load 35(m)
+ 65: 33 Load 35(m)
+ 66: 7(fvec4) CompositeExtract 64 0
+ 67: 7(fvec4) CompositeExtract 65 0
+ 68: 7(fvec4) FMul 66 67
+ 69: 7(fvec4) CompositeExtract 64 1
+ 70: 7(fvec4) CompositeExtract 65 1
+ 71: 7(fvec4) FMul 69 70
+ 72: 7(fvec4) CompositeExtract 64 2
+ 73: 7(fvec4) CompositeExtract 65 2
+ 74: 7(fvec4) FMul 72 73
+ 75: 7(fvec4) CompositeExtract 64 3
+ 76: 7(fvec4) CompositeExtract 65 3
+ 77: 7(fvec4) FMul 75 76
+ 78: 33 CompositeConstruct 68 71 74 77
+ Store 63(mm) 78
+ 85: 79(ptr) AccessChain 63(mm) 82 84
+ 86: 6(float) Load 85
+ Store 80(f) 86
+ 88: 33 Load 35(m)
+ 89: 33 Load 35(m)
+ 90: 7(fvec4) CompositeExtract 88 0
+ 91: 7(fvec4) CompositeExtract 89 0
+ 92: 7(fvec4) FMul 90 91
+ 93: 7(fvec4) CompositeExtract 88 1
+ 94: 7(fvec4) CompositeExtract 89 1
+ 95: 7(fvec4) FMul 93 94
+ 96: 7(fvec4) CompositeExtract 88 2
+ 97: 7(fvec4) CompositeExtract 89 2
+ 98: 7(fvec4) FMul 96 97
+ 99: 7(fvec4) CompositeExtract 88 3
+ 100: 7(fvec4) CompositeExtract 89 3
+ 101: 7(fvec4) FMul 99 100
+ 102: 33 CompositeConstruct 92 95 98 101
+ 105: 6(float) CompositeExtract 102 2 1
+ Store 87(g) 105
+ Store 106(h) 12
+ 112: 109 Load 111(samp2D)
+ 116: 7(fvec4) ImageSampleImplicitLod 112 115
+ 117: 6(float) CompositeExtract 116 1
+ Store 107(i) 117
+ 120: 6(float) Load 107(i)
+ 123: 122(bool) FOrdGreaterThan 120 121
+ SelectionMerge 125 None
+ BranchConditional 123 124 127
+ 124: Label
+ 126: 7(fvec4) Load 9(v1)
+ Store 119 126
+ Branch 125
+ 127: Label
+ 128: 7(fvec4) Load 15(v2)
+ Store 119 128
+ Branch 125
+ 125: Label
+ 129: 79(ptr) AccessChain 119 84
+ 130: 6(float) Load 129
+ 131: 6(float) Load 107(i)
+ 132: 6(float) FAdd 131 130
+ Store 107(i) 132
+ Store 136(t) 144
+ 145: 6(float) CompositeExtract 144 1 2 1
+ 146: 6(float) Load 107(i)
+ 147: 6(float) FAdd 146 145
+ Store 107(i) 147
+ 150: 6(float) Load 80(f)
+ 151: 6(float) Load 87(g)
+ 152: 6(float) Load 106(h)
+ 153: 6(float) Load 107(i)
+ 154: 7(fvec4) CompositeConstruct 150 151 152 153
+ Store 149(gl_FragColor) 154
+ Return
+ FunctionEnd
diff --git a/chromium/third_party/glslang/src/Test/baseResults/spv.depthOut.frag.out b/chromium/third_party/glslang/src/Test/baseResults/spv.depthOut.frag.out
new file mode 100755
index 00000000000..6242391fd3a
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/spv.depthOut.frag.out
@@ -0,0 +1,40 @@
+spv.depthOut.frag
+Warning, version 450 is not yet complete; most version-specific features are present, but some are missing.
+
+
+Linked fragment stage:
+
+
+// Module Version 10000
+// Generated by (magic number): 80001
+// Id's are bound by 15
+
+ Capability Shader
+ 1: ExtInstImport "GLSL.std.450"
+ MemoryModel Logical GLSL450
+ EntryPoint Fragment 4 "main" 8 10 14
+ ExecutionMode 4 OriginUpperLeft
+ ExecutionMode 4 DepthGreater
+ ExecutionMode 4 DepthReplacing
+ Source GLSL 450
+ Name 4 "main"
+ Name 8 "gl_FragDepth"
+ Name 10 "Depth"
+ Name 14 "Color"
+ Decorate 8(gl_FragDepth) BuiltIn FragDepth
+ 2: TypeVoid
+ 3: TypeFunction 2
+ 6: TypeFloat 32
+ 7: TypePointer Output 6(float)
+ 8(gl_FragDepth): 7(ptr) Variable Output
+ 9: TypePointer Input 6(float)
+ 10(Depth): 9(ptr) Variable Input
+ 12: TypeVector 6(float) 4
+ 13: TypePointer Input 12(fvec4)
+ 14(Color): 13(ptr) Variable Input
+ 4(main): 2 Function None 3
+ 5: Label
+ 11: 6(float) Load 10(Depth)
+ Store 8(gl_FragDepth) 11
+ Return
+ FunctionEnd
diff --git a/chromium/third_party/glslang/src/Test/baseResults/spv.discard-dce.frag.out b/chromium/third_party/glslang/src/Test/baseResults/spv.discard-dce.frag.out
new file mode 100755
index 00000000000..7668233ba20
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/spv.discard-dce.frag.out
@@ -0,0 +1,130 @@
+spv.discard-dce.frag
+
+Linked fragment stage:
+
+
+// Module Version 10000
+// Generated by (magic number): 80001
+// Id's are bound by 84
+
+ Capability Shader
+ 1: ExtInstImport "GLSL.std.450"
+ MemoryModel Logical GLSL450
+ EntryPoint Fragment 4 "main" 21 59
+ ExecutionMode 4 OriginUpperLeft
+ Source GLSL 140
+ Name 4 "main"
+ Name 9 "white"
+ Name 12 "black"
+ Name 15 "color"
+ Name 18 "x"
+ Name 21 "tex_coord"
+ Name 30 "y"
+ Name 36 "radius"
+ Name 59 "gl_FragColor"
+ 2: TypeVoid
+ 3: TypeFunction 2
+ 6: TypeFloat 32
+ 7: TypeVector 6(float) 4
+ 8: TypePointer Function 7(fvec4)
+ 10: 6(float) Constant 1065353216
+ 11: 7(fvec4) ConstantComposite 10 10 10 10
+ 13: 6(float) Constant 1045220557
+ 14: 7(fvec4) ConstantComposite 13 13 13 13
+ 17: TypePointer Function 6(float)
+ 19: TypeVector 6(float) 2
+ 20: TypePointer Input 19(fvec2)
+ 21(tex_coord): 20(ptr) Variable Input
+ 22: TypeInt 32 0
+ 23: 22(int) Constant 0
+ 24: TypePointer Input 6(float)
+ 27: 6(float) Constant 1073741824
+ 31: 22(int) Constant 1
+ 46: TypeBool
+ 51: 6(float) Constant 1066192077
+ 58: TypePointer Output 7(fvec4)
+59(gl_FragColor): 58(ptr) Variable Output
+ 62: 6(float) Constant 1067030938
+ 71: 6(float) Constant 1061158912
+ 76: 6(float) Constant 1098907648
+ 4(main): 2 Function None 3
+ 5: Label
+ 9(white): 8(ptr) Variable Function
+ 12(black): 8(ptr) Variable Function
+ 15(color): 8(ptr) Variable Function
+ 18(x): 17(ptr) Variable Function
+ 30(y): 17(ptr) Variable Function
+ 36(radius): 17(ptr) Variable Function
+ Store 9(white) 11
+ Store 12(black) 14
+ 16: 7(fvec4) Load 9(white)
+ Store 15(color) 16
+ 25: 24(ptr) AccessChain 21(tex_coord) 23
+ 26: 6(float) Load 25
+ 28: 6(float) FMul 26 27
+ 29: 6(float) FSub 28 10
+ Store 18(x) 29
+ 32: 24(ptr) AccessChain 21(tex_coord) 31
+ 33: 6(float) Load 32
+ 34: 6(float) FMul 33 27
+ 35: 6(float) FSub 34 10
+ Store 30(y) 35
+ 37: 6(float) Load 18(x)
+ 38: 6(float) Load 18(x)
+ 39: 6(float) FMul 37 38
+ 40: 6(float) Load 30(y)
+ 41: 6(float) Load 30(y)
+ 42: 6(float) FMul 40 41
+ 43: 6(float) FAdd 39 42
+ 44: 6(float) ExtInst 1(GLSL.std.450) 31(Sqrt) 43
+ Store 36(radius) 44
+ 45: 6(float) Load 36(radius)
+ 47: 46(bool) FOrdGreaterThan 45 10
+ SelectionMerge 49 None
+ BranchConditional 47 48 49
+ 48: Label
+ 50: 6(float) Load 36(radius)
+ 52: 46(bool) FOrdGreaterThan 50 51
+ SelectionMerge 54 None
+ BranchConditional 52 53 54
+ 53: Label
+ 55: 7(fvec4) Load 15(color)
+ 56: 7(fvec4) CompositeConstruct 10 10 10 10
+ 57: 7(fvec4) FAdd 55 56
+ Store 15(color) 57
+ Branch 54
+ 54: Label
+ 60: 7(fvec4) Load 15(color)
+ Store 59(gl_FragColor) 60
+ 61: 6(float) Load 36(radius)
+ 63: 46(bool) FOrdGreaterThan 61 62
+ SelectionMerge 65 None
+ BranchConditional 63 64 65
+ 64: Label
+ 66: 7(fvec4) Load 15(color)
+ 67: 7(fvec4) CompositeConstruct 10 10 10 10
+ 68: 7(fvec4) FAdd 66 67
+ Store 15(color) 68
+ Branch 65
+ 65: Label
+ Kill
+ 49: Label
+ 70: 6(float) Load 36(radius)
+ 72: 46(bool) FOrdGreaterThanEqual 70 71
+ SelectionMerge 74 None
+ BranchConditional 72 73 74
+ 73: Label
+ 75: 6(float) Load 36(radius)
+ 77: 6(float) ExtInst 1(GLSL.std.450) 26(Pow) 75 76
+ 78: 6(float) FDiv 77 27
+ 79: 6(float) ExtInst 1(GLSL.std.450) 4(FAbs) 78
+ 80: 7(fvec4) Load 15(color)
+ 81: 7(fvec4) CompositeConstruct 79 79 79 79
+ 82: 7(fvec4) FSub 80 81
+ Store 15(color) 82
+ Branch 74
+ 74: Label
+ 83: 7(fvec4) Load 15(color)
+ Store 59(gl_FragColor) 83
+ Return
+ FunctionEnd
diff --git a/chromium/third_party/glslang/src/Test/baseResults/spv.do-simple.vert.out b/chromium/third_party/glslang/src/Test/baseResults/spv.do-simple.vert.out
new file mode 100755
index 00000000000..c0862d1e199
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/spv.do-simple.vert.out
@@ -0,0 +1,46 @@
+spv.do-simple.vert
+Warning, version 310 is not yet complete; most version-specific features are present, but some are missing.
+
+
+Linked vertex stage:
+
+
+// Module Version 10000
+// Generated by (magic number): 80001
+// Id's are bound by 21
+
+ Capability Shader
+ 1: ExtInstImport "GLSL.std.450"
+ MemoryModel Logical GLSL450
+ EntryPoint Vertex 4 "main"
+ Source ESSL 310
+ Name 4 "main"
+ Name 8 "i"
+ 2: TypeVoid
+ 3: TypeFunction 2
+ 6: TypeInt 32 1
+ 7: TypePointer Function 6(int)
+ 9: 6(int) Constant 0
+ 15: 6(int) Constant 1
+ 18: 6(int) Constant 10
+ 19: TypeBool
+ 4(main): 2 Function None 3
+ 5: Label
+ 8(i): 7(ptr) Variable Function
+ Store 8(i) 9
+ Branch 10
+ 10: Label
+ LoopMerge 12 13 None
+ Branch 11
+ 11: Label
+ 14: 6(int) Load 8(i)
+ 16: 6(int) IAdd 14 15
+ Store 8(i) 16
+ Branch 13
+ 13: Label
+ 17: 6(int) Load 8(i)
+ 20: 19(bool) SLessThan 17 18
+ BranchConditional 20 10 12
+ 12: Label
+ Return
+ FunctionEnd
diff --git a/chromium/third_party/glslang/src/Test/baseResults/spv.do-while-continue-break.vert.out b/chromium/third_party/glslang/src/Test/baseResults/spv.do-while-continue-break.vert.out
new file mode 100644
index 00000000000..ebfe85d0e6b
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/spv.do-while-continue-break.vert.out
@@ -0,0 +1,84 @@
+spv.do-while-continue-break.vert
+Warning, version 310 is not yet complete; most version-specific features are present, but some are missing.
+
+
+Linked vertex stage:
+
+
+// Module Version 10000
+// Generated by (magic number): 80001
+// Id's are bound by 43
+
+ Capability Shader
+ 1: ExtInstImport "GLSL.std.450"
+ MemoryModel Logical GLSL450
+ EntryPoint Vertex 4 "main"
+ Source ESSL 310
+ Name 4 "main"
+ Name 8 "i"
+ Name 14 "A"
+ Name 21 "B"
+ Name 24 "C"
+ Name 30 "D"
+ Name 33 "E"
+ Name 35 "F"
+ Name 41 "G"
+ 2: TypeVoid
+ 3: TypeFunction 2
+ 6: TypeInt 32 1
+ 7: TypePointer Function 6(int)
+ 9: 6(int) Constant 0
+ 16: 6(int) Constant 2
+ 17: TypeBool
+ 22: 6(int) Constant 1
+ 26: 6(int) Constant 5
+ 31: 6(int) Constant 3
+ 34: 6(int) Constant 42
+ 36: 6(int) Constant 99
+ 39: 6(int) Constant 19
+ 42: 6(int) Constant 12
+ 4(main): 2 Function None 3
+ 5: Label
+ 8(i): 7(ptr) Variable Function
+ 14(A): 7(ptr) Variable Function
+ 21(B): 7(ptr) Variable Function
+ 24(C): 7(ptr) Variable Function
+ 30(D): 7(ptr) Variable Function
+ 33(E): 7(ptr) Variable Function
+ 35(F): 7(ptr) Variable Function
+ 41(G): 7(ptr) Variable Function
+ Store 8(i) 9
+ Branch 10
+ 10: Label
+ LoopMerge 12 13 None
+ Branch 11
+ 11: Label
+ Store 14(A) 9
+ 15: 6(int) Load 8(i)
+ 18: 17(bool) IEqual 15 16
+ SelectionMerge 20 None
+ BranchConditional 18 19 20
+ 19: Label
+ Store 21(B) 22
+ Branch 13
+ 20: Label
+ 25: 6(int) Load 8(i)
+ 27: 17(bool) IEqual 25 26
+ SelectionMerge 29 None
+ BranchConditional 27 28 29
+ 28: Label
+ Store 30(D) 31
+ Branch 12
+ 29: Label
+ Store 35(F) 36
+ Branch 13
+ 13: Label
+ 37: 6(int) Load 8(i)
+ 38: 6(int) IAdd 37 22
+ Store 8(i) 38
+ 40: 17(bool) SLessThan 38 39
+ BranchConditional 40 10 12
+ 12: Label
+ Store 41(G) 42
+ Return
+ FunctionEnd
diff --git a/chromium/third_party/glslang/src/Test/baseResults/spv.doWhileLoop.frag.out b/chromium/third_party/glslang/src/Test/baseResults/spv.doWhileLoop.frag.out
new file mode 100755
index 00000000000..1d12af108d4
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/spv.doWhileLoop.frag.out
@@ -0,0 +1,63 @@
+spv.doWhileLoop.frag
+
+Linked fragment stage:
+
+
+// Module Version 10000
+// Generated by (magic number): 80001
+// Id's are bound by 34
+
+ Capability Shader
+ 1: ExtInstImport "GLSL.std.450"
+ MemoryModel Logical GLSL450
+ EntryPoint Fragment 4 "main" 11 17 27 32
+ ExecutionMode 4 OriginUpperLeft
+ Source GLSL 140
+ Name 4 "main"
+ Name 9 "color"
+ Name 11 "BaseColor"
+ Name 17 "bigColor"
+ Name 27 "d"
+ Name 32 "gl_FragColor"
+ 2: TypeVoid
+ 3: TypeFunction 2
+ 6: TypeFloat 32
+ 7: TypeVector 6(float) 4
+ 8: TypePointer Function 7(fvec4)
+ 10: TypePointer Input 7(fvec4)
+ 11(BaseColor): 10(ptr) Variable Input
+ 17(bigColor): 10(ptr) Variable Input
+ 21: TypeInt 32 0
+ 22: 21(int) Constant 0
+ 23: TypePointer Function 6(float)
+ 26: TypePointer Input 6(float)
+ 27(d): 26(ptr) Variable Input
+ 29: TypeBool
+ 31: TypePointer Output 7(fvec4)
+32(gl_FragColor): 31(ptr) Variable Output
+ 4(main): 2 Function None 3
+ 5: Label
+ 9(color): 8(ptr) Variable Function
+ 12: 7(fvec4) Load 11(BaseColor)
+ Store 9(color) 12
+ Branch 13
+ 13: Label
+ LoopMerge 15 16 None
+ Branch 14
+ 14: Label
+ 18: 7(fvec4) Load 17(bigColor)
+ 19: 7(fvec4) Load 9(color)
+ 20: 7(fvec4) FAdd 19 18
+ Store 9(color) 20
+ Branch 16
+ 16: Label
+ 24: 23(ptr) AccessChain 9(color) 22
+ 25: 6(float) Load 24
+ 28: 6(float) Load 27(d)
+ 30: 29(bool) FOrdLessThan 25 28
+ BranchConditional 30 13 15
+ 15: Label
+ 33: 7(fvec4) Load 9(color)
+ Store 32(gl_FragColor) 33
+ Return
+ FunctionEnd
diff --git a/chromium/third_party/glslang/src/Test/baseResults/spv.double.comp.out b/chromium/third_party/glslang/src/Test/baseResults/spv.double.comp.out
new file mode 100755
index 00000000000..766f839a0bc
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/spv.double.comp.out
@@ -0,0 +1,104 @@
+spv.double.comp
+Warning, version 430 is not yet complete; most version-specific features are present, but some are missing.
+
+
+Linked compute stage:
+
+
+// Module Version 10000
+// Generated by (magic number): 80001
+// Id's are bound by 60
+
+ Capability Shader
+ Capability Float64
+ 1: ExtInstImport "GLSL.std.450"
+ MemoryModel Logical GLSL450
+ EntryPoint GLCompute 4 "main" 26 33
+ ExecutionMode 4 LocalSize 1 1 1
+ Source GLSL 430
+ Name 4 "main"
+ Name 8 "bufName"
+ MemberName 8(bufName) 0 "f"
+ MemberName 8(bufName) 1 "d"
+ Name 10 "bufInst"
+ Name 22 "storePos"
+ Name 26 "gl_GlobalInvocationID"
+ Name 32 "localCoef"
+ Name 33 "gl_LocalInvocationID"
+ Name 49 "aa"
+ Name 54 "globalCoef"
+ Name 59 "destTex"
+ MemberDecorate 8(bufName) 0 Offset 0
+ MemberDecorate 8(bufName) 1 Offset 8
+ Decorate 8(bufName) BufferBlock
+ Decorate 10(bufInst) DescriptorSet 0
+ Decorate 26(gl_GlobalInvocationID) BuiltIn GlobalInvocationId
+ Decorate 33(gl_LocalInvocationID) BuiltIn LocalInvocationId
+ Decorate 59(destTex) DescriptorSet 0
+ Decorate 59(destTex) NonReadable
+ 2: TypeVoid
+ 3: TypeFunction 2
+ 6: TypeFloat 32
+ 7: TypeFloat 64
+ 8(bufName): TypeStruct 6(float) 7(float)
+ 9: TypePointer Uniform 8(bufName)
+ 10(bufInst): 9(ptr) Variable Uniform
+ 11: TypeInt 32 1
+ 12: 11(int) Constant 1
+ 13: 7(float) Constant 1413754136 1074340347
+ 14: TypePointer Uniform 7(float)
+ 16: 11(int) Constant 0
+ 17: 6(float) Constant 1095307129
+ 18: TypePointer Uniform 6(float)
+ 20: TypeVector 11(int) 2
+ 21: TypePointer Function 20(ivec2)
+ 23: TypeInt 32 0
+ 24: TypeVector 23(int) 3
+ 25: TypePointer Input 24(ivec3)
+26(gl_GlobalInvocationID): 25(ptr) Variable Input
+ 27: TypeVector 23(int) 2
+ 31: TypePointer Function 7(float)
+33(gl_LocalInvocationID): 25(ptr) Variable Input
+ 37: 11(int) Constant 8
+ 40: TypeVector 6(float) 2
+ 42: 6(float) Constant 1090519040
+ 47: TypeVector 7(float) 4
+ 48: TypePointer Function 47(fvec4)
+ 50: 7(float) Constant 2576980378 1071225241
+ 51: 7(float) Constant 2576980378 1070176665
+ 52: 7(float) Constant 858993459 1070805811
+ 53: 47(fvec4) ConstantComposite 50 51 52 50
+ 55: 7(float) Constant 0 1072693248
+ 56: 7(float) Constant 3229815407 1074340298
+ 57: TypeImage 6(float) 2D nonsampled format:Unknown
+ 58: TypePointer UniformConstant 57
+ 59(destTex): 58(ptr) Variable UniformConstant
+ 4(main): 2 Function None 3
+ 5: Label
+ 22(storePos): 21(ptr) Variable Function
+ 32(localCoef): 31(ptr) Variable Function
+ 49(aa): 48(ptr) Variable Function
+ 54(globalCoef): 31(ptr) Variable Function
+ 15: 14(ptr) AccessChain 10(bufInst) 12
+ Store 15 13
+ 19: 18(ptr) AccessChain 10(bufInst) 16
+ Store 19 17
+ 28: 24(ivec3) Load 26(gl_GlobalInvocationID)
+ 29: 27(ivec2) VectorShuffle 28 28 0 1
+ 30: 20(ivec2) Bitcast 29
+ Store 22(storePos) 30
+ 34: 24(ivec3) Load 33(gl_LocalInvocationID)
+ 35: 27(ivec2) VectorShuffle 34 34 0 1
+ 36: 20(ivec2) Bitcast 35
+ 38: 20(ivec2) CompositeConstruct 37 37
+ 39: 20(ivec2) ISub 36 38
+ 41: 40(fvec2) ConvertSToF 39
+ 43: 40(fvec2) CompositeConstruct 42 42
+ 44: 40(fvec2) FDiv 41 43
+ 45: 6(float) ExtInst 1(GLSL.std.450) 66(Length) 44
+ 46: 7(float) FConvert 45
+ Store 32(localCoef) 46
+ Store 49(aa) 53
+ Store 54(globalCoef) 55
+ Return
+ FunctionEnd
diff --git a/chromium/third_party/glslang/src/Test/baseResults/spv.earlyReturnDiscard.frag.out b/chromium/third_party/glslang/src/Test/baseResults/spv.earlyReturnDiscard.frag.out
new file mode 100755
index 00000000000..7e6409e63fa
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/spv.earlyReturnDiscard.frag.out
@@ -0,0 +1,173 @@
+spv.earlyReturnDiscard.frag
+
+Linked fragment stage:
+
+
+// Module Version 10000
+// Generated by (magic number): 80001
+// Id's are bound by 110
+
+ Capability Shader
+ 1: ExtInstImport "GLSL.std.450"
+ MemoryModel Logical GLSL450
+ EntryPoint Fragment 4 "main" 11 14 17 19 25 30 39 51 63 105 109
+ ExecutionMode 4 OriginUpperLeft
+ Source GLSL 140
+ Name 4 "main"
+ Name 9 "color"
+ Name 11 "BaseColor"
+ Name 13 "color2"
+ Name 14 "otherColor"
+ Name 17 "c"
+ Name 19 "d"
+ Name 25 "bigColor"
+ Name 30 "smallColor"
+ Name 39 "minimum"
+ Name 51 "threshhold"
+ Name 63 "threshhold2"
+ Name 77 "b"
+ Name 105 "gl_FragColor"
+ Name 109 "threshhold3"
+ 2: TypeVoid
+ 3: TypeFunction 2
+ 6: TypeFloat 32
+ 7: TypeVector 6(float) 4
+ 8: TypePointer Function 7(fvec4)
+ 10: TypePointer Input 7(fvec4)
+ 11(BaseColor): 10(ptr) Variable Input
+ 14(otherColor): 10(ptr) Variable Input
+ 16: TypePointer Input 6(float)
+ 17(c): 16(ptr) Variable Input
+ 19(d): 16(ptr) Variable Input
+ 21: TypeBool
+ 25(bigColor): 10(ptr) Variable Input
+ 30(smallColor): 10(ptr) Variable Input
+ 34: TypeInt 32 0
+ 35: 34(int) Constant 2
+ 36: TypePointer Function 6(float)
+ 39(minimum): 16(ptr) Variable Input
+ 47: 6(float) Constant 1065353216
+ 51(threshhold): 16(ptr) Variable Input
+ 60: 34(int) Constant 3
+ 63(threshhold2): 16(ptr) Variable Input
+ 76: TypePointer Private 21(bool)
+ 77(b): 76(ptr) Variable Private
+ 85: 34(int) Constant 0
+ 104: TypePointer Output 7(fvec4)
+105(gl_FragColor): 104(ptr) Variable Output
+109(threshhold3): 16(ptr) Variable Input
+ 4(main): 2 Function None 3
+ 5: Label
+ 9(color): 8(ptr) Variable Function
+ 13(color2): 8(ptr) Variable Function
+ 12: 7(fvec4) Load 11(BaseColor)
+ Store 9(color) 12
+ 15: 7(fvec4) Load 14(otherColor)
+ Store 13(color2) 15
+ 18: 6(float) Load 17(c)
+ 20: 6(float) Load 19(d)
+ 22: 21(bool) FOrdGreaterThan 18 20
+ SelectionMerge 24 None
+ BranchConditional 22 23 29
+ 23: Label
+ 26: 7(fvec4) Load 25(bigColor)
+ 27: 7(fvec4) Load 9(color)
+ 28: 7(fvec4) FAdd 27 26
+ Store 9(color) 28
+ Branch 24
+ 29: Label
+ 31: 7(fvec4) Load 30(smallColor)
+ 32: 7(fvec4) Load 9(color)
+ 33: 7(fvec4) FAdd 32 31
+ Store 9(color) 33
+ Branch 24
+ 24: Label
+ 37: 36(ptr) AccessChain 9(color) 35
+ 38: 6(float) Load 37
+ 40: 6(float) Load 39(minimum)
+ 41: 21(bool) FOrdLessThan 38 40
+ SelectionMerge 43 None
+ BranchConditional 41 42 43
+ 42: Label
+ Return
+ 43: Label
+ 45: 36(ptr) AccessChain 9(color) 35
+ 46: 6(float) Load 45
+ 48: 6(float) FAdd 46 47
+ Store 45 48
+ 49: 36(ptr) AccessChain 9(color) 35
+ 50: 6(float) Load 49
+ 52: 6(float) Load 51(threshhold)
+ 53: 21(bool) FOrdGreaterThan 50 52
+ SelectionMerge 55 None
+ BranchConditional 53 54 55
+ 54: Label
+ Kill
+ 55: Label
+ 57: 7(fvec4) Load 9(color)
+ 58: 7(fvec4) CompositeConstruct 47 47 47 47
+ 59: 7(fvec4) FAdd 57 58
+ Store 9(color) 59
+ 61: 36(ptr) AccessChain 9(color) 60
+ 62: 6(float) Load 61
+ 64: 6(float) Load 63(threshhold2)
+ 65: 21(bool) FOrdGreaterThan 62 64
+ SelectionMerge 67 None
+ BranchConditional 65 66 97
+ 66: Label
+ 68: 36(ptr) AccessChain 9(color) 35
+ 69: 6(float) Load 68
+ 70: 6(float) Load 63(threshhold2)
+ 71: 21(bool) FOrdGreaterThan 69 70
+ SelectionMerge 73 None
+ BranchConditional 71 72 75
+ 72: Label
+ Return
+ 75: Label
+ 78: 21(bool) Load 77(b)
+ SelectionMerge 80 None
+ BranchConditional 78 79 84
+ 79: Label
+ 81: 36(ptr) AccessChain 9(color) 35
+ 82: 6(float) Load 81
+ 83: 6(float) FAdd 82 47
+ Store 81 83
+ Branch 80
+ 84: Label
+ 86: 36(ptr) AccessChain 9(color) 85
+ 87: 6(float) Load 86
+ 88: 6(float) Load 39(minimum)
+ 89: 21(bool) FOrdLessThan 87 88
+ SelectionMerge 91 None
+ BranchConditional 89 90 93
+ 90: Label
+ Kill
+ 93: Label
+ 94: 7(fvec4) Load 9(color)
+ 95: 7(fvec4) CompositeConstruct 47 47 47 47
+ 96: 7(fvec4) FAdd 94 95
+ Store 9(color) 96
+ Branch 91
+ 91: Label
+ Branch 80
+ 80: Label
+ Branch 73
+ 73: Label
+ Branch 67
+ 97: Label
+ 98: 21(bool) Load 77(b)
+ SelectionMerge 100 None
+ BranchConditional 98 99 102
+ 99: Label
+ Kill
+ 102: Label
+ Return
+ 100: Label
+ Branch 67
+ 67: Label
+ 106: 7(fvec4) Load 9(color)
+ 107: 7(fvec4) Load 13(color2)
+ 108: 7(fvec4) FMul 106 107
+ Store 105(gl_FragColor) 108
+ Return
+ FunctionEnd
diff --git a/chromium/third_party/glslang/src/Test/baseResults/spv.flowControl.frag.out b/chromium/third_party/glslang/src/Test/baseResults/spv.flowControl.frag.out
new file mode 100755
index 00000000000..7ca61b7a9c5
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/spv.flowControl.frag.out
@@ -0,0 +1,73 @@
+spv.flowControl.frag
+
+Linked fragment stage:
+
+
+// Module Version 10000
+// Generated by (magic number): 80001
+// Id's are bound by 39
+
+ Capability Shader
+ 1: ExtInstImport "GLSL.std.450"
+ MemoryModel Logical GLSL450
+ EntryPoint Fragment 4 "main" 11 14 17 19 25 30 35
+ ExecutionMode 4 OriginUpperLeft
+ Source GLSL 140
+ Name 4 "main"
+ Name 9 "color"
+ Name 11 "BaseColor"
+ Name 13 "color2"
+ Name 14 "otherColor"
+ Name 17 "c"
+ Name 19 "d"
+ Name 25 "bigColor"
+ Name 30 "smallColor"
+ Name 35 "gl_FragColor"
+ 2: TypeVoid
+ 3: TypeFunction 2
+ 6: TypeFloat 32
+ 7: TypeVector 6(float) 4
+ 8: TypePointer Function 7(fvec4)
+ 10: TypePointer Input 7(fvec4)
+ 11(BaseColor): 10(ptr) Variable Input
+ 14(otherColor): 10(ptr) Variable Input
+ 16: TypePointer Input 6(float)
+ 17(c): 16(ptr) Variable Input
+ 19(d): 16(ptr) Variable Input
+ 21: TypeBool
+ 25(bigColor): 10(ptr) Variable Input
+ 30(smallColor): 10(ptr) Variable Input
+ 34: TypePointer Output 7(fvec4)
+35(gl_FragColor): 34(ptr) Variable Output
+ 4(main): 2 Function None 3
+ 5: Label
+ 9(color): 8(ptr) Variable Function
+ 13(color2): 8(ptr) Variable Function
+ 12: 7(fvec4) Load 11(BaseColor)
+ Store 9(color) 12
+ 15: 7(fvec4) Load 14(otherColor)
+ Store 13(color2) 15
+ 18: 6(float) Load 17(c)
+ 20: 6(float) Load 19(d)
+ 22: 21(bool) FOrdGreaterThan 18 20
+ SelectionMerge 24 None
+ BranchConditional 22 23 29
+ 23: Label
+ 26: 7(fvec4) Load 25(bigColor)
+ 27: 7(fvec4) Load 9(color)
+ 28: 7(fvec4) FAdd 27 26
+ Store 9(color) 28
+ Branch 24
+ 29: Label
+ 31: 7(fvec4) Load 30(smallColor)
+ 32: 7(fvec4) Load 9(color)
+ 33: 7(fvec4) FAdd 32 31
+ Store 9(color) 33
+ Branch 24
+ 24: Label
+ 36: 7(fvec4) Load 9(color)
+ 37: 7(fvec4) Load 13(color2)
+ 38: 7(fvec4) FMul 36 37
+ Store 35(gl_FragColor) 38
+ Return
+ FunctionEnd
diff --git a/chromium/third_party/glslang/src/Test/baseResults/spv.for-complex-condition.vert.out b/chromium/third_party/glslang/src/Test/baseResults/spv.for-complex-condition.vert.out
new file mode 100644
index 00000000000..fab7f3d9472
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/spv.for-complex-condition.vert.out
@@ -0,0 +1,72 @@
+spv.for-complex-condition.vert
+Warning, version 450 is not yet complete; most version-specific features are present, but some are missing.
+
+
+Linked vertex stage:
+
+
+// Module Version 10000
+// Generated by (magic number): 80001
+// Id's are bound by 35
+
+ Capability Shader
+ 1: ExtInstImport "GLSL.std.450"
+ MemoryModel Logical GLSL450
+ EntryPoint Vertex 4 "main" 18 31
+ Source GLSL 450
+ Name 4 "main"
+ Name 8 "i"
+ Name 18 "flag"
+ Name 31 "r"
+ Decorate 18(flag) Location 0
+ Decorate 31(r) Location 0
+ 2: TypeVoid
+ 3: TypeFunction 2
+ 6: TypeInt 32 1
+ 7: TypePointer Function 6(int)
+ 9: 6(int) Constant 0
+ 17: TypePointer Input 6(int)
+ 18(flag): 17(ptr) Variable Input
+ 20: 6(int) Constant 1
+ 21: TypeBool
+ 25: 6(int) Constant 10
+ 27: 6(int) Constant 15
+ 30: TypePointer Output 6(int)
+ 31(r): 30(ptr) Variable Output
+ 4(main): 2 Function None 3
+ 5: Label
+ 8(i): 7(ptr) Variable Function
+ 16: 7(ptr) Variable Function
+ Store 8(i) 9
+ Branch 10
+ 10: Label
+ LoopMerge 12 13 None
+ Branch 14
+ 14: Label
+ 15: 6(int) Load 8(i)
+ 19: 6(int) Load 18(flag)
+ 22: 21(bool) IEqual 19 20
+ SelectionMerge 24 None
+ BranchConditional 22 23 26
+ 23: Label
+ Store 16 25
+ Branch 24
+ 26: Label
+ Store 16 27
+ Branch 24
+ 24: Label
+ 28: 6(int) Load 16
+ 29: 21(bool) SLessThan 15 28
+ BranchConditional 29 11 12
+ 11: Label
+ 32: 6(int) Load 8(i)
+ Store 31(r) 32
+ Branch 13
+ 13: Label
+ 33: 6(int) Load 8(i)
+ 34: 6(int) IAdd 33 20
+ Store 8(i) 34
+ Branch 10
+ 12: Label
+ Return
+ FunctionEnd
diff --git a/chromium/third_party/glslang/src/Test/baseResults/spv.for-continue-break.vert.out b/chromium/third_party/glslang/src/Test/baseResults/spv.for-continue-break.vert.out
new file mode 100644
index 00000000000..0ea2f143901
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/spv.for-continue-break.vert.out
@@ -0,0 +1,87 @@
+spv.for-continue-break.vert
+Warning, version 310 is not yet complete; most version-specific features are present, but some are missing.
+
+
+Linked vertex stage:
+
+
+// Module Version 10000
+// Generated by (magic number): 80001
+// Id's are bound by 45
+
+ Capability Shader
+ 1: ExtInstImport "GLSL.std.450"
+ MemoryModel Logical GLSL450
+ EntryPoint Vertex 4 "main"
+ Source ESSL 310
+ Name 4 "main"
+ Name 8 "i"
+ Name 19 "A"
+ Name 27 "B"
+ Name 29 "C"
+ Name 36 "D"
+ Name 38 "E"
+ Name 39 "F"
+ Name 43 "G"
+ 2: TypeVoid
+ 3: TypeFunction 2
+ 6: TypeInt 32 1
+ 7: TypePointer Function 6(int)
+ 9: 6(int) Constant 0
+ 16: 6(int) Constant 10
+ 17: TypeBool
+ 20: 6(int) Constant 1
+ 22: 6(int) Constant 2
+ 31: 6(int) Constant 3
+ 40: 6(int) Constant 12
+ 44: 6(int) Constant 99
+ 4(main): 2 Function None 3
+ 5: Label
+ 8(i): 7(ptr) Variable Function
+ 19(A): 7(ptr) Variable Function
+ 27(B): 7(ptr) Variable Function
+ 29(C): 7(ptr) Variable Function
+ 36(D): 7(ptr) Variable Function
+ 38(E): 7(ptr) Variable Function
+ 39(F): 7(ptr) Variable Function
+ 43(G): 7(ptr) Variable Function
+ Store 8(i) 9
+ Branch 10
+ 10: Label
+ LoopMerge 12 13 None
+ Branch 14
+ 14: Label
+ 15: 6(int) Load 8(i)
+ 18: 17(bool) SLessThan 15 16
+ BranchConditional 18 11 12
+ 11: Label
+ Store 19(A) 20
+ 21: 6(int) Load 8(i)
+ 23: 6(int) SMod 21 22
+ 24: 17(bool) IEqual 23 9
+ SelectionMerge 26 None
+ BranchConditional 24 25 26
+ 25: Label
+ Store 27(B) 20
+ Branch 13
+ 26: Label
+ 30: 6(int) Load 8(i)
+ 32: 6(int) SMod 30 31
+ 33: 17(bool) IEqual 32 9
+ SelectionMerge 35 None
+ BranchConditional 33 34 35
+ 34: Label
+ Store 36(D) 20
+ Branch 12
+ 35: Label
+ Store 39(F) 40
+ Branch 13
+ 13: Label
+ 41: 6(int) Load 8(i)
+ 42: 6(int) IAdd 41 20
+ Store 8(i) 42
+ Branch 10
+ 12: Label
+ Store 43(G) 44
+ Return
+ FunctionEnd
diff --git a/chromium/third_party/glslang/src/Test/baseResults/spv.for-nobody.vert.out b/chromium/third_party/glslang/src/Test/baseResults/spv.for-nobody.vert.out
new file mode 100644
index 00000000000..a127b7099c1
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/spv.for-nobody.vert.out
@@ -0,0 +1,54 @@
+spv.for-nobody.vert
+Warning, version 450 is not yet complete; most version-specific features are present, but some are missing.
+
+
+Linked vertex stage:
+
+
+// Module Version 10000
+// Generated by (magic number): 80001
+// Id's are bound by 25
+
+ Capability Shader
+ 1: ExtInstImport "GLSL.std.450"
+ MemoryModel Logical GLSL450
+ EntryPoint Vertex 4 "main" 23
+ Source GLSL 450
+ Name 4 "main"
+ Name 8 "i"
+ Name 23 "r"
+ Decorate 23(r) Location 0
+ 2: TypeVoid
+ 3: TypeFunction 2
+ 6: TypeInt 32 1
+ 7: TypePointer Function 6(int)
+ 9: 6(int) Constant 0
+ 16: 6(int) Constant 10
+ 17: TypeBool
+ 20: 6(int) Constant 1
+ 22: TypePointer Output 6(int)
+ 23(r): 22(ptr) Variable Output
+ 4(main): 2 Function None 3
+ 5: Label
+ 8(i): 7(ptr) Variable Function
+ Store 8(i) 9
+ Branch 10
+ 10: Label
+ LoopMerge 12 13 None
+ Branch 14
+ 14: Label
+ 15: 6(int) Load 8(i)
+ 18: 17(bool) SLessThan 15 16
+ BranchConditional 18 11 12
+ 11: Label
+ Branch 13
+ 13: Label
+ 19: 6(int) Load 8(i)
+ 21: 6(int) IAdd 19 20
+ Store 8(i) 21
+ Branch 10
+ 12: Label
+ 24: 6(int) Load 8(i)
+ Store 23(r) 24
+ Return
+ FunctionEnd
diff --git a/chromium/third_party/glslang/src/Test/baseResults/spv.for-notest.vert.out b/chromium/third_party/glslang/src/Test/baseResults/spv.for-notest.vert.out
new file mode 100644
index 00000000000..67706701ea1
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/spv.for-notest.vert.out
@@ -0,0 +1,48 @@
+spv.for-notest.vert
+Warning, version 450 is not yet complete; most version-specific features are present, but some are missing.
+
+
+Linked vertex stage:
+
+
+// Module Version 10000
+// Generated by (magic number): 80001
+// Id's are bound by 20
+
+ Capability Shader
+ 1: ExtInstImport "GLSL.std.450"
+ MemoryModel Logical GLSL450
+ EntryPoint Vertex 4 "main" 15
+ Source GLSL 450
+ Name 4 "main"
+ Name 8 "i"
+ Name 15 "r"
+ Decorate 15(r) Location 0
+ 2: TypeVoid
+ 3: TypeFunction 2
+ 6: TypeInt 32 1
+ 7: TypePointer Function 6(int)
+ 9: 6(int) Constant 0
+ 14: TypePointer Output 6(int)
+ 15(r): 14(ptr) Variable Output
+ 18: 6(int) Constant 1
+ 4(main): 2 Function None 3
+ 5: Label
+ 8(i): 7(ptr) Variable Function
+ Store 8(i) 9
+ Branch 10
+ 10: Label
+ LoopMerge 12 13 None
+ Branch 11
+ 11: Label
+ 16: 6(int) Load 8(i)
+ Store 15(r) 16
+ Branch 13
+ 13: Label
+ 17: 6(int) Load 8(i)
+ 19: 6(int) IAdd 17 18
+ Store 8(i) 19
+ Branch 10
+ 12: Label
+ Return
+ FunctionEnd
diff --git a/chromium/third_party/glslang/src/Test/baseResults/spv.for-simple.vert.out b/chromium/third_party/glslang/src/Test/baseResults/spv.for-simple.vert.out
new file mode 100755
index 00000000000..52a047ff099
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/spv.for-simple.vert.out
@@ -0,0 +1,52 @@
+spv.for-simple.vert
+Warning, version 310 is not yet complete; most version-specific features are present, but some are missing.
+
+
+Linked vertex stage:
+
+
+// Module Version 10000
+// Generated by (magic number): 80001
+// Id's are bound by 24
+
+ Capability Shader
+ 1: ExtInstImport "GLSL.std.450"
+ MemoryModel Logical GLSL450
+ EntryPoint Vertex 4 "main"
+ Source ESSL 310
+ Name 4 "main"
+ Name 8 "i"
+ Name 19 "j"
+ 2: TypeVoid
+ 3: TypeFunction 2
+ 6: TypeInt 32 1
+ 7: TypePointer Function 6(int)
+ 9: 6(int) Constant 0
+ 16: 6(int) Constant 10
+ 17: TypeBool
+ 20: 6(int) Constant 12
+ 22: 6(int) Constant 1
+ 4(main): 2 Function None 3
+ 5: Label
+ 8(i): 7(ptr) Variable Function
+ 19(j): 7(ptr) Variable Function
+ Store 8(i) 9
+ Branch 10
+ 10: Label
+ LoopMerge 12 13 None
+ Branch 14
+ 14: Label
+ 15: 6(int) Load 8(i)
+ 18: 17(bool) SLessThan 15 16
+ BranchConditional 18 11 12
+ 11: Label
+ Store 19(j) 20
+ Branch 13
+ 13: Label
+ 21: 6(int) Load 8(i)
+ 23: 6(int) IAdd 21 22
+ Store 8(i) 23
+ Branch 10
+ 12: Label
+ Return
+ FunctionEnd
diff --git a/chromium/third_party/glslang/src/Test/baseResults/spv.forLoop.frag.out b/chromium/third_party/glslang/src/Test/baseResults/spv.forLoop.frag.out
new file mode 100755
index 00000000000..e606f9ccb94
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/spv.forLoop.frag.out
@@ -0,0 +1,215 @@
+spv.forLoop.frag
+
+Linked fragment stage:
+
+
+// Module Version 10000
+// Generated by (magic number): 80001
+// Id's are bound by 131
+
+ Capability Shader
+ 1: ExtInstImport "GLSL.std.450"
+ MemoryModel Logical GLSL450
+ EntryPoint Fragment 4 "main" 11 24 28 36 53 104
+ ExecutionMode 4 OriginUpperLeft
+ Source GLSL 140
+ Name 4 "main"
+ Name 9 "color"
+ Name 11 "BaseColor"
+ Name 15 "i"
+ Name 24 "Count"
+ Name 28 "bigColor"
+ Name 36 "gl_FragColor"
+ Name 39 "sum"
+ Name 41 "i"
+ Name 53 "v4"
+ Name 63 "i"
+ Name 71 "tv4"
+ Name 88 "r"
+ Name 94 "i"
+ Name 104 "f"
+ Name 117 "i"
+ Decorate 24(Count) Flat
+ Decorate 53(v4) Flat
+ 2: TypeVoid
+ 3: TypeFunction 2
+ 6: TypeFloat 32
+ 7: TypeVector 6(float) 4
+ 8: TypePointer Function 7(fvec4)
+ 10: TypePointer Input 7(fvec4)
+ 11(BaseColor): 10(ptr) Variable Input
+ 13: TypeInt 32 1
+ 14: TypePointer Function 13(int)
+ 16: 13(int) Constant 0
+ 23: TypePointer Input 13(int)
+ 24(Count): 23(ptr) Variable Input
+ 26: TypeBool
+ 28(bigColor): 10(ptr) Variable Input
+ 33: 13(int) Constant 1
+ 35: TypePointer Output 7(fvec4)
+36(gl_FragColor): 35(ptr) Variable Output
+ 38: TypePointer Function 6(float)
+ 40: 6(float) Constant 0
+ 48: 13(int) Constant 4
+ 50: TypeInt 32 0
+ 51: TypeVector 50(int) 4
+ 52: TypePointer Input 51(ivec4)
+ 53(v4): 52(ptr) Variable Input
+ 55: TypePointer Input 50(int)
+ 76: 50(int) Constant 4
+ 89: TypeVector 6(float) 3
+ 103: TypePointer Input 6(float)
+ 104(f): 103(ptr) Variable Input
+ 106: 50(int) Constant 3
+ 124: 13(int) Constant 16
+ 4(main): 2 Function None 3
+ 5: Label
+ 9(color): 8(ptr) Variable Function
+ 15(i): 14(ptr) Variable Function
+ 39(sum): 38(ptr) Variable Function
+ 41(i): 14(ptr) Variable Function
+ 63(i): 14(ptr) Variable Function
+ 71(tv4): 8(ptr) Variable Function
+ 88(r): 8(ptr) Variable Function
+ 94(i): 14(ptr) Variable Function
+ 117(i): 14(ptr) Variable Function
+ 12: 7(fvec4) Load 11(BaseColor)
+ Store 9(color) 12
+ Store 15(i) 16
+ Branch 17
+ 17: Label
+ LoopMerge 19 20 None
+ Branch 21
+ 21: Label
+ 22: 13(int) Load 15(i)
+ 25: 13(int) Load 24(Count)
+ 27: 26(bool) SLessThan 22 25
+ BranchConditional 27 18 19
+ 18: Label
+ 29: 7(fvec4) Load 28(bigColor)
+ 30: 7(fvec4) Load 9(color)
+ 31: 7(fvec4) FAdd 30 29
+ Store 9(color) 31
+ Branch 20
+ 20: Label
+ 32: 13(int) Load 15(i)
+ 34: 13(int) IAdd 32 33
+ Store 15(i) 34
+ Branch 17
+ 19: Label
+ 37: 7(fvec4) Load 9(color)
+ Store 36(gl_FragColor) 37
+ Store 39(sum) 40
+ Store 41(i) 16
+ Branch 42
+ 42: Label
+ LoopMerge 44 45 None
+ Branch 46
+ 46: Label
+ 47: 13(int) Load 41(i)
+ 49: 26(bool) SLessThan 47 48
+ BranchConditional 49 43 44
+ 43: Label
+ 54: 13(int) Load 41(i)
+ 56: 55(ptr) AccessChain 53(v4) 54
+ 57: 50(int) Load 56
+ 58: 6(float) ConvertUToF 57
+ 59: 6(float) Load 39(sum)
+ 60: 6(float) FAdd 59 58
+ Store 39(sum) 60
+ Branch 45
+ 45: Label
+ 61: 13(int) Load 41(i)
+ 62: 13(int) IAdd 61 33
+ Store 41(i) 62
+ Branch 42
+ 44: Label
+ Store 63(i) 16
+ Branch 64
+ 64: Label
+ LoopMerge 66 67 None
+ Branch 68
+ 68: Label
+ 69: 13(int) Load 63(i)
+ 70: 26(bool) SLessThan 69 48
+ BranchConditional 70 65 66
+ 65: Label
+ 72: 13(int) Load 63(i)
+ 73: 13(int) Load 63(i)
+ 74: 55(ptr) AccessChain 53(v4) 73
+ 75: 50(int) Load 74
+ 77: 50(int) IMul 75 76
+ 78: 6(float) ConvertUToF 77
+ 79: 38(ptr) AccessChain 71(tv4) 72
+ Store 79 78
+ Branch 67
+ 67: Label
+ 80: 13(int) Load 63(i)
+ 81: 13(int) IAdd 80 33
+ Store 63(i) 81
+ Branch 64
+ 66: Label
+ 82: 6(float) Load 39(sum)
+ 83: 7(fvec4) CompositeConstruct 82 82 82 82
+ 84: 7(fvec4) Load 71(tv4)
+ 85: 7(fvec4) FAdd 83 84
+ 86: 7(fvec4) Load 36(gl_FragColor)
+ 87: 7(fvec4) FAdd 86 85
+ Store 36(gl_FragColor) 87
+ 90: 7(fvec4) Load 11(BaseColor)
+ 91: 89(fvec3) VectorShuffle 90 90 0 1 2
+ 92: 7(fvec4) Load 88(r)
+ 93: 7(fvec4) VectorShuffle 92 91 4 5 6 3
+ Store 88(r) 93
+ Store 94(i) 16
+ Branch 95
+ 95: Label
+ LoopMerge 97 98 None
+ Branch 99
+ 99: Label
+ 100: 13(int) Load 94(i)
+ 101: 13(int) Load 24(Count)
+ 102: 26(bool) SLessThan 100 101
+ BranchConditional 102 96 97
+ 96: Label
+ 105: 6(float) Load 104(f)
+ 107: 38(ptr) AccessChain 88(r) 106
+ Store 107 105
+ Branch 98
+ 98: Label
+ 108: 13(int) Load 94(i)
+ 109: 13(int) IAdd 108 33
+ Store 94(i) 109
+ Branch 95
+ 97: Label
+ 110: 7(fvec4) Load 88(r)
+ 111: 89(fvec3) VectorShuffle 110 110 0 1 2
+ 112: 7(fvec4) Load 36(gl_FragColor)
+ 113: 89(fvec3) VectorShuffle 112 112 0 1 2
+ 114: 89(fvec3) FAdd 113 111
+ 115: 7(fvec4) Load 36(gl_FragColor)
+ 116: 7(fvec4) VectorShuffle 115 114 4 5 6 3
+ Store 36(gl_FragColor) 116
+ Store 117(i) 16
+ Branch 118
+ 118: Label
+ LoopMerge 120 121 None
+ Branch 122
+ 122: Label
+ 123: 13(int) Load 117(i)
+ 125: 26(bool) SLessThan 123 124
+ BranchConditional 125 119 120
+ 119: Label
+ 126: 6(float) Load 104(f)
+ 127: 7(fvec4) Load 36(gl_FragColor)
+ 128: 7(fvec4) VectorTimesScalar 127 126
+ Store 36(gl_FragColor) 128
+ Branch 121
+ 121: Label
+ 129: 13(int) Load 117(i)
+ 130: 13(int) IAdd 129 48
+ Store 117(i) 130
+ Branch 118
+ 120: Label
+ Return
+ FunctionEnd
diff --git a/chromium/third_party/glslang/src/Test/baseResults/spv.forwardFun.frag.out b/chromium/third_party/glslang/src/Test/baseResults/spv.forwardFun.frag.out
new file mode 100755
index 00000000000..346523cbce9
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/spv.forwardFun.frag.out
@@ -0,0 +1,97 @@
+spv.forwardFun.frag
+
+Linked fragment stage:
+
+
+// Module Version 10000
+// Generated by (magic number): 80001
+// Id's are bound by 60
+
+ Capability Shader
+ 1: ExtInstImport "GLSL.std.450"
+ MemoryModel Logical GLSL450
+ EntryPoint Fragment 4 "main" 20 30 36 59
+ ExecutionMode 4 OriginUpperLeft
+ Source GLSL 140
+ Name 4 "main"
+ Name 6 "bar("
+ Name 10 "unreachableReturn("
+ Name 16 "foo(vf4;"
+ Name 15 "bar"
+ Name 18 "color"
+ Name 20 "BaseColor"
+ Name 21 "param"
+ Name 27 "f"
+ Name 30 "gl_FragColor"
+ Name 36 "d"
+ Name 59 "bigColor"
+ 2: TypeVoid
+ 3: TypeFunction 2
+ 8: TypeFloat 32
+ 9: TypeFunction 8(float)
+ 12: TypeVector 8(float) 4
+ 13: TypePointer Function 12(fvec4)
+ 14: TypeFunction 8(float) 13(ptr)
+ 19: TypePointer Input 12(fvec4)
+ 20(BaseColor): 19(ptr) Variable Input
+ 26: TypePointer Function 8(float)
+ 29: TypePointer Output 12(fvec4)
+30(gl_FragColor): 29(ptr) Variable Output
+ 35: TypePointer Input 8(float)
+ 36(d): 35(ptr) Variable Input
+ 38: 8(float) Constant 1082549862
+ 39: TypeBool
+ 43: 8(float) Constant 1067030938
+ 46: 8(float) Constant 1083179008
+ 49: TypeInt 32 0
+ 50: 49(int) Constant 0
+ 53: 49(int) Constant 1
+ 59(bigColor): 19(ptr) Variable Input
+ 4(main): 2 Function None 3
+ 5: Label
+ 18(color): 13(ptr) Variable Function
+ 21(param): 13(ptr) Variable Function
+ 27(f): 26(ptr) Variable Function
+ 22: 12(fvec4) Load 20(BaseColor)
+ Store 21(param) 22
+ 23: 8(float) FunctionCall 16(foo(vf4;) 21(param)
+ 24: 12(fvec4) CompositeConstruct 23 23 23 23
+ Store 18(color) 24
+ 25: 2 FunctionCall 6(bar()
+ 28: 8(float) FunctionCall 10(unreachableReturn()
+ Store 27(f) 28
+ 31: 12(fvec4) Load 18(color)
+ 32: 8(float) Load 27(f)
+ 33: 12(fvec4) VectorTimesScalar 31 32
+ Store 30(gl_FragColor) 33
+ Return
+ FunctionEnd
+ 6(bar(): 2 Function None 3
+ 7: Label
+ Return
+ FunctionEnd
+10(unreachableReturn(): 8(float) Function None 9
+ 11: Label
+ 34: 2 FunctionCall 6(bar()
+ 37: 8(float) Load 36(d)
+ 40: 39(bool) FOrdLessThan 37 38
+ SelectionMerge 42 None
+ BranchConditional 40 41 45
+ 41: Label
+ ReturnValue 43
+ 45: Label
+ ReturnValue 46
+ 42: Label
+ 48: 8(float) Undef
+ ReturnValue 48
+ FunctionEnd
+ 16(foo(vf4;): 8(float) Function None 14
+ 15(bar): 13(ptr) FunctionParameter
+ 17: Label
+ 51: 26(ptr) AccessChain 15(bar) 50
+ 52: 8(float) Load 51
+ 54: 26(ptr) AccessChain 15(bar) 53
+ 55: 8(float) Load 54
+ 56: 8(float) FAdd 52 55
+ ReturnValue 56
+ FunctionEnd
diff --git a/chromium/third_party/glslang/src/Test/baseResults/spv.functionCall.frag.out b/chromium/third_party/glslang/src/Test/baseResults/spv.functionCall.frag.out
new file mode 100755
index 00000000000..db40dd51ae4
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/spv.functionCall.frag.out
@@ -0,0 +1,127 @@
+spv.functionCall.frag
+WARNING: 0:3: varying deprecated in version 130; may be removed in future release
+WARNING: 0:4: varying deprecated in version 130; may be removed in future release
+WARNING: 0:5: varying deprecated in version 130; may be removed in future release
+
+
+Linked fragment stage:
+
+
+// Module Version 10000
+// Generated by (magic number): 80001
+// Id's are bound by 76
+
+ Capability Shader
+ 1: ExtInstImport "GLSL.std.450"
+ MemoryModel Logical GLSL450
+ EntryPoint Fragment 4 "main" 35 58 69 75
+ ExecutionMode 4 OriginUpperLeft
+ Source GLSL 140
+ Name 4 "main"
+ Name 11 "foo(vf4;"
+ Name 10 "bar"
+ Name 13 "bar("
+ Name 16 "unreachableReturn("
+ Name 18 "missingReturn("
+ Name 21 "h"
+ Name 35 "d"
+ Name 56 "color"
+ Name 58 "BaseColor"
+ Name 59 "param"
+ Name 64 "f"
+ Name 66 "g"
+ Name 69 "gl_FragColor"
+ Name 75 "bigColor"
+ 2: TypeVoid
+ 3: TypeFunction 2
+ 6: TypeFloat 32
+ 7: TypeVector 6(float) 4
+ 8: TypePointer Function 7(fvec4)
+ 9: TypeFunction 6(float) 8(ptr)
+ 15: TypeFunction 6(float)
+ 20: TypePointer Private 6(float)
+ 21(h): 20(ptr) Variable Private
+ 22: 6(float) Constant 0
+ 23: TypeInt 32 0
+ 24: 23(int) Constant 0
+ 25: TypePointer Function 6(float)
+ 28: 23(int) Constant 1
+ 34: TypePointer Input 6(float)
+ 35(d): 34(ptr) Variable Input
+ 37: 6(float) Constant 1082549862
+ 38: TypeBool
+ 42: 6(float) Constant 1067030938
+ 45: 6(float) Constant 1083179008
+ 53: 6(float) Constant 1081711002
+ 57: TypePointer Input 7(fvec4)
+ 58(BaseColor): 57(ptr) Variable Input
+ 68: TypePointer Output 7(fvec4)
+69(gl_FragColor): 68(ptr) Variable Output
+ 75(bigColor): 57(ptr) Variable Input
+ 4(main): 2 Function None 3
+ 5: Label
+ 56(color): 8(ptr) Variable Function
+ 59(param): 8(ptr) Variable Function
+ 64(f): 25(ptr) Variable Function
+ 66(g): 25(ptr) Variable Function
+ Store 21(h) 22
+ 60: 7(fvec4) Load 58(BaseColor)
+ Store 59(param) 60
+ 61: 6(float) FunctionCall 11(foo(vf4;) 59(param)
+ 62: 7(fvec4) CompositeConstruct 61 61 61 61
+ Store 56(color) 62
+ 63: 2 FunctionCall 13(bar()
+ 65: 6(float) FunctionCall 16(unreachableReturn()
+ Store 64(f) 65
+ 67: 6(float) FunctionCall 18(missingReturn()
+ Store 66(g) 67
+ 70: 7(fvec4) Load 56(color)
+ 71: 6(float) Load 64(f)
+ 72: 7(fvec4) VectorTimesScalar 70 71
+ 73: 6(float) Load 21(h)
+ 74: 7(fvec4) VectorTimesScalar 72 73
+ Store 69(gl_FragColor) 74
+ Return
+ FunctionEnd
+ 11(foo(vf4;): 6(float) Function None 9
+ 10(bar): 8(ptr) FunctionParameter
+ 12: Label
+ 26: 25(ptr) AccessChain 10(bar) 24
+ 27: 6(float) Load 26
+ 29: 25(ptr) AccessChain 10(bar) 28
+ 30: 6(float) Load 29
+ 31: 6(float) FAdd 27 30
+ ReturnValue 31
+ FunctionEnd
+ 13(bar(): 2 Function None 3
+ 14: Label
+ Return
+ FunctionEnd
+16(unreachableReturn(): 6(float) Function None 15
+ 17: Label
+ 36: 6(float) Load 35(d)
+ 39: 38(bool) FOrdLessThan 36 37
+ SelectionMerge 41 None
+ BranchConditional 39 40 44
+ 40: Label
+ ReturnValue 42
+ 44: Label
+ ReturnValue 45
+ 41: Label
+ 47: 6(float) Undef
+ ReturnValue 47
+ FunctionEnd
+18(missingReturn(): 6(float) Function None 15
+ 19: Label
+ 48: 6(float) Load 35(d)
+ 49: 38(bool) FOrdLessThan 48 45
+ SelectionMerge 51 None
+ BranchConditional 49 50 51
+ 50: Label
+ 52: 6(float) Load 35(d)
+ Store 21(h) 52
+ ReturnValue 53
+ 51: Label
+ 55: 6(float) Undef
+ ReturnValue 55
+ FunctionEnd
diff --git a/chromium/third_party/glslang/src/Test/baseResults/spv.functionSemantics.frag.out b/chromium/third_party/glslang/src/Test/baseResults/spv.functionSemantics.frag.out
new file mode 100755
index 00000000000..aa2abd847c1
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/spv.functionSemantics.frag.out
@@ -0,0 +1,232 @@
+spv.functionSemantics.frag
+Warning, version 400 is not yet complete; most version-specific features are present, but some are missing.
+
+
+Linked fragment stage:
+
+
+// Module Version 10000
+// Generated by (magic number): 80001
+// Id's are bound by 156
+
+ Capability Shader
+ 1: ExtInstImport "GLSL.std.450"
+ MemoryModel Logical GLSL450
+ EntryPoint Fragment 4 "main" 76 152
+ ExecutionMode 4 OriginUpperLeft
+ Source GLSL 400
+ Name 4 "main"
+ Name 15 "foo(i1;i1;i1;i1;i1;i1;"
+ Name 9 "a"
+ Name 10 "b"
+ Name 11 "c"
+ Name 12 "d"
+ Name 13 "e"
+ Name 14 "f"
+ Name 25 "foo2(f1;vf3;i1;"
+ Name 22 "a"
+ Name 23 "b"
+ Name 24 "r"
+ Name 28 "foo3("
+ Name 30 "sum"
+ Name 76 "u"
+ Name 89 "t"
+ Name 92 "s"
+ MemberName 92(s) 0 "t"
+ Name 94 "f"
+ Name 98 "color"
+ Name 104 "e"
+ Name 105 "param"
+ Name 106 "param"
+ Name 107 "param"
+ Name 108 "param"
+ Name 123 "ret"
+ Name 125 "tempReturn"
+ Name 130 "tempArg"
+ Name 131 "param"
+ Name 132 "param"
+ Name 133 "param"
+ Name 136 "arg"
+ Name 152 "gl_FragColor"
+ 2: TypeVoid
+ 3: TypeFunction 2
+ 6: TypeInt 32 1
+ 7: TypePointer Function 6(int)
+ 8: TypeFunction 6(int) 7(ptr) 6(int) 7(ptr) 6(int) 7(ptr) 7(ptr)
+ 17: TypeFloat 32
+ 18: TypePointer Function 17(float)
+ 19: TypeVector 17(float) 3
+ 20: TypePointer Function 19(fvec3)
+ 21: TypeFunction 6(int) 18(ptr) 20(ptr) 7(ptr)
+ 27: TypeFunction 6(int)
+ 38: 6(int) Constant 64
+ 43: 6(int) Constant 1024
+ 62: 17(float) Constant 1077936128
+ 66: 17(float) Constant 1084227584
+ 67: TypeInt 32 0
+ 68: 67(int) Constant 1
+ 75: TypePointer Input 17(float)
+ 76(u): 75(ptr) Variable Input
+ 78: 17(float) Constant 1078774989
+ 79: TypeBool
+ 84: 6(int) Constant 1000000
+ 86: 6(int) Constant 2000000
+ 90: 6(int) Constant 2
+ 91: TypeVector 6(int) 4
+ 92(s): TypeStruct 91(ivec4)
+ 93: TypePointer Function 92(s)
+ 95: 6(int) Constant 0
+ 96: 6(int) Constant 32
+ 99: 6(int) Constant 1
+ 103: 6(int) Constant 8
+ 115: 6(int) Constant 128
+ 124: TypePointer Private 6(int)
+ 125(tempReturn): 124(ptr) Variable Private
+ 126: 17(float) Constant 1082130432
+ 127: 17(float) Constant 1065353216
+ 128: 17(float) Constant 1073741824
+ 129: 19(fvec3) ConstantComposite 127 128 62
+ 150: TypeVector 17(float) 4
+ 151: TypePointer Output 150(fvec4)
+152(gl_FragColor): 151(ptr) Variable Output
+ 4(main): 2 Function None 3
+ 5: Label
+ 89(t): 7(ptr) Variable Function
+ 94(f): 93(ptr) Variable Function
+ 98(color): 7(ptr) Variable Function
+ 104(e): 7(ptr) Variable Function
+ 105(param): 7(ptr) Variable Function
+ 106(param): 7(ptr) Variable Function
+ 107(param): 7(ptr) Variable Function
+ 108(param): 7(ptr) Variable Function
+ 123(ret): 18(ptr) Variable Function
+ 130(tempArg): 7(ptr) Variable Function
+ 131(param): 18(ptr) Variable Function
+ 132(param): 20(ptr) Variable Function
+ 133(param): 7(ptr) Variable Function
+ 136(arg): 18(ptr) Variable Function
+ Store 89(t) 90
+ 97: 7(ptr) AccessChain 94(f) 95 68
+ Store 97 96
+ 100: 6(int) Load 89(t)
+ 101: 6(int) Load 89(t)
+ 102: 6(int) IAdd 100 101
+ Store 105(param) 99
+ Store 106(param) 102
+ 109: 7(ptr) AccessChain 94(f) 95 68
+ 110: 6(int) Load 109
+ Store 108(param) 110
+ 111: 6(int) FunctionCall 15(foo(i1;i1;i1;i1;i1;i1;) 105(param) 90 106(param) 103 107(param) 108(param)
+ 112: 6(int) Load 107(param)
+ Store 104(e) 112
+ 113: 6(int) Load 108(param)
+ 114: 7(ptr) AccessChain 94(f) 95 68
+ Store 114 113
+ Store 98(color) 111
+ 116: 6(int) Load 104(e)
+ 117: 7(ptr) AccessChain 94(f) 95 68
+ 118: 6(int) Load 117
+ 119: 6(int) IAdd 116 118
+ 120: 6(int) IMul 115 119
+ 121: 6(int) Load 98(color)
+ 122: 6(int) IAdd 121 120
+ Store 98(color) 122
+ Store 131(param) 126
+ Store 132(param) 129
+ 134: 6(int) FunctionCall 25(foo2(f1;vf3;i1;) 131(param) 132(param) 133(param)
+ 135: 6(int) Load 133(param)
+ Store 130(tempArg) 135
+ Store 125(tempReturn) 134
+ 137: 6(int) Load 130(tempArg)
+ 138: 17(float) ConvertSToF 137
+ Store 136(arg) 138
+ 139: 6(int) Load 125(tempReturn)
+ 140: 17(float) ConvertSToF 139
+ Store 123(ret) 140
+ 141: 17(float) Load 123(ret)
+ 142: 17(float) Load 136(arg)
+ 143: 17(float) FAdd 141 142
+ 144: 6(int) ConvertFToS 143
+ 145: 6(int) Load 98(color)
+ 146: 6(int) IAdd 145 144
+ Store 98(color) 146
+ 147: 6(int) FunctionCall 28(foo3()
+ 148: 6(int) Load 98(color)
+ 149: 6(int) IAdd 148 147
+ Store 98(color) 149
+ 153: 6(int) Load 98(color)
+ 154: 17(float) ConvertSToF 153
+ 155: 150(fvec4) CompositeConstruct 154 154 154 154
+ Store 152(gl_FragColor) 155
+ Return
+ FunctionEnd
+15(foo(i1;i1;i1;i1;i1;i1;): 6(int) Function None 8
+ 9(a): 7(ptr) FunctionParameter
+ 10(b): 6(int) FunctionParameter
+ 11(c): 7(ptr) FunctionParameter
+ 12(d): 6(int) FunctionParameter
+ 13(e): 7(ptr) FunctionParameter
+ 14(f): 7(ptr) FunctionParameter
+ 16: Label
+ 30(sum): 7(ptr) Variable Function
+ 31: 6(int) Load 9(a)
+ 32: 6(int) IAdd 31 10(b)
+ 33: 6(int) Load 11(c)
+ 34: 6(int) IAdd 32 33
+ 35: 6(int) IAdd 34 12(d)
+ 36: 6(int) Load 14(f)
+ 37: 6(int) IAdd 35 36
+ Store 30(sum) 37
+ 39: 6(int) Load 9(a)
+ 40: 6(int) IMul 39 38
+ Store 9(a) 40
+ 41: 6(int) Load 11(c)
+ 42: 6(int) IMul 41 38
+ Store 11(c) 42
+ Store 13(e) 43
+ 44: 6(int) Load 14(f)
+ 45: 6(int) IMul 44 38
+ Store 14(f) 45
+ 46: 6(int) Load 9(a)
+ 47: 6(int) IMul 38 10(b)
+ 48: 6(int) IAdd 46 47
+ 49: 6(int) Load 11(c)
+ 50: 6(int) IAdd 48 49
+ 51: 6(int) IMul 38 12(d)
+ 52: 6(int) IAdd 50 51
+ 53: 6(int) Load 13(e)
+ 54: 6(int) IAdd 52 53
+ 55: 6(int) Load 14(f)
+ 56: 6(int) IAdd 54 55
+ 57: 6(int) Load 30(sum)
+ 58: 6(int) IAdd 57 56
+ Store 30(sum) 58
+ 59: 6(int) Load 30(sum)
+ ReturnValue 59
+ FunctionEnd
+25(foo2(f1;vf3;i1;): 6(int) Function None 21
+ 22(a): 18(ptr) FunctionParameter
+ 23(b): 20(ptr) FunctionParameter
+ 24(r): 7(ptr) FunctionParameter
+ 26: Label
+ 63: 17(float) Load 22(a)
+ 64: 17(float) FMul 62 63
+ 65: 6(int) ConvertFToS 64
+ Store 24(r) 65
+ 69: 18(ptr) AccessChain 23(b) 68
+ 70: 17(float) Load 69
+ 71: 17(float) FMul 66 70
+ 72: 6(int) ConvertFToS 71
+ ReturnValue 72
+ FunctionEnd
+ 28(foo3(): 6(int) Function None 27
+ 29: Label
+ 77: 17(float) Load 76(u)
+ 80: 79(bool) FOrdGreaterThan 77 78
+ SelectionMerge 82 None
+ BranchConditional 80 81 82
+ 81: Label
+ Kill
+ 82: Label
+ ReturnValue 86
+ FunctionEnd
diff --git a/chromium/third_party/glslang/src/Test/baseResults/spv.image.frag.out b/chromium/third_party/glslang/src/Test/baseResults/spv.image.frag.out
new file mode 100644
index 00000000000..2bd26f79bbb
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/spv.image.frag.out
@@ -0,0 +1,523 @@
+spv.image.frag
+Warning, version 450 is not yet complete; most version-specific features are present, but some are missing.
+
+
+Linked fragment stage:
+
+
+// Module Version 10000
+// Generated by (magic number): 80001
+// Id's are bound by 378
+
+ Capability Shader
+ Capability SampledRect
+ Capability Sampled1D
+ Capability SampledCubeArray
+ Capability SampledBuffer
+ Capability ImageMSArray
+ Capability StorageImageExtendedFormats
+ Capability ImageQuery
+ Capability StorageImageWriteWithoutFormat
+ 1: ExtInstImport "GLSL.std.450"
+ MemoryModel Logical GLSL450
+ EntryPoint Fragment 4 "main" 132 142 152 248 362 377
+ ExecutionMode 4 OriginUpperLeft
+ Source GLSL 450
+ Name 4 "main"
+ Name 9 "iv"
+ Name 15 "i1D"
+ Name 27 "i2D"
+ Name 38 "i3D"
+ Name 45 "iCube"
+ Name 55 "iCubeArray"
+ Name 62 "i2DRect"
+ Name 72 "i1DArray"
+ Name 82 "i2DArray"
+ Name 89 "iBuffer"
+ Name 98 "i2DMS"
+ Name 108 "i2DMSArray"
+ Name 127 "v"
+ Name 132 "ic1D"
+ Name 142 "ic2D"
+ Name 152 "ic3D"
+ Name 229 "ui"
+ Name 232 "ii1D"
+ Name 245 "ui2D"
+ Name 248 "value"
+ Name 357 "wo2D"
+ Name 362 "fragData"
+ Name 377 "ic4D"
+ Decorate 15(i1D) DescriptorSet 0
+ Decorate 15(i1D) Binding 0
+ Decorate 27(i2D) DescriptorSet 0
+ Decorate 27(i2D) Binding 1
+ Decorate 38(i3D) DescriptorSet 0
+ Decorate 38(i3D) Binding 2
+ Decorate 45(iCube) DescriptorSet 0
+ Decorate 45(iCube) Binding 3
+ Decorate 55(iCubeArray) DescriptorSet 0
+ Decorate 55(iCubeArray) Binding 4
+ Decorate 62(i2DRect) DescriptorSet 0
+ Decorate 62(i2DRect) Binding 5
+ Decorate 72(i1DArray) DescriptorSet 0
+ Decorate 72(i1DArray) Binding 6
+ Decorate 82(i2DArray) DescriptorSet 0
+ Decorate 82(i2DArray) Binding 7
+ Decorate 89(iBuffer) DescriptorSet 0
+ Decorate 89(iBuffer) Binding 8
+ Decorate 98(i2DMS) DescriptorSet 0
+ Decorate 98(i2DMS) Binding 9
+ Decorate 108(i2DMSArray) DescriptorSet 0
+ Decorate 108(i2DMSArray) Binding 10
+ Decorate 132(ic1D) Flat
+ Decorate 142(ic2D) Flat
+ Decorate 152(ic3D) Flat
+ Decorate 232(ii1D) DescriptorSet 0
+ Decorate 232(ii1D) Binding 11
+ Decorate 245(ui2D) DescriptorSet 0
+ Decorate 245(ui2D) Binding 12
+ Decorate 248(value) Flat
+ Decorate 357(wo2D) DescriptorSet 0
+ Decorate 357(wo2D) Binding 1
+ Decorate 357(wo2D) NonReadable
+ Decorate 377(ic4D) Flat
+ 2: TypeVoid
+ 3: TypeFunction 2
+ 6: TypeInt 32 1
+ 7: TypeVector 6(int) 3
+ 8: TypePointer Function 7(ivec3)
+ 10: 6(int) Constant 0
+ 11: 7(ivec3) ConstantComposite 10 10 10
+ 12: TypeFloat 32
+ 13: TypeImage 12(float) 1D nonsampled format:Rgba32f
+ 14: TypePointer UniformConstant 13
+ 15(i1D): 14(ptr) Variable UniformConstant
+ 18: TypeInt 32 0
+ 19: 18(int) Constant 0
+ 20: TypePointer Function 6(int)
+ 25: TypeImage 12(float) 2D nonsampled format:Rgba32f
+ 26: TypePointer UniformConstant 25
+ 27(i2D): 26(ptr) Variable UniformConstant
+ 29: TypeVector 6(int) 2
+ 36: TypeImage 12(float) 3D nonsampled format:Rgba32f
+ 37: TypePointer UniformConstant 36
+ 38(i3D): 37(ptr) Variable UniformConstant
+ 43: TypeImage 12(float) Cube nonsampled format:Rgba32f
+ 44: TypePointer UniformConstant 43
+ 45(iCube): 44(ptr) Variable UniformConstant
+ 53: TypeImage 12(float) Cube array nonsampled format:Rgba32f
+ 54: TypePointer UniformConstant 53
+ 55(iCubeArray): 54(ptr) Variable UniformConstant
+ 60: TypeImage 12(float) Rect nonsampled format:Rgba32f
+ 61: TypePointer UniformConstant 60
+ 62(i2DRect): 61(ptr) Variable UniformConstant
+ 70: TypeImage 12(float) 1D array nonsampled format:Rgba32f
+ 71: TypePointer UniformConstant 70
+ 72(i1DArray): 71(ptr) Variable UniformConstant
+ 80: TypeImage 12(float) 2D array nonsampled format:Rg16
+ 81: TypePointer UniformConstant 80
+ 82(i2DArray): 81(ptr) Variable UniformConstant
+ 87: TypeImage 12(float) Buffer nonsampled format:Rgba32f
+ 88: TypePointer UniformConstant 87
+ 89(iBuffer): 88(ptr) Variable UniformConstant
+ 96: TypeImage 12(float) 2D multi-sampled nonsampled format:Rgba32f
+ 97: TypePointer UniformConstant 96
+ 98(i2DMS): 97(ptr) Variable UniformConstant
+ 106: TypeImage 12(float) 2D array multi-sampled nonsampled format:Rgba32f
+ 107: TypePointer UniformConstant 106
+ 108(i2DMSArray): 107(ptr) Variable UniformConstant
+ 125: TypeVector 12(float) 4
+ 126: TypePointer Function 125(fvec4)
+ 128: 12(float) Constant 0
+ 129: 125(fvec4) ConstantComposite 128 128 128 128
+ 131: TypePointer Input 6(int)
+ 132(ic1D): 131(ptr) Variable Input
+ 141: TypePointer Input 29(ivec2)
+ 142(ic2D): 141(ptr) Variable Input
+ 151: TypePointer Input 7(ivec3)
+ 152(ic3D): 151(ptr) Variable Input
+ 210: 6(int) Constant 1
+ 216: 6(int) Constant 2
+ 220: 6(int) Constant 3
+ 226: 6(int) Constant 4
+ 228: TypePointer Function 18(int)
+ 230: TypeImage 6(int) 1D nonsampled format:R32i
+ 231: TypePointer UniformConstant 230
+ 232(ii1D): 231(ptr) Variable UniformConstant
+ 234: 6(int) Constant 10
+ 235: TypePointer Image 6(int)
+ 237: 18(int) Constant 1
+ 243: TypeImage 18(int) 2D nonsampled format:R32ui
+ 244: TypePointer UniformConstant 243
+ 245(ui2D): 244(ptr) Variable UniformConstant
+ 247: TypePointer Input 18(int)
+ 248(value): 247(ptr) Variable Input
+ 250: TypePointer Image 18(int)
+ 256: 6(int) Constant 11
+ 270: 6(int) Constant 12
+ 284: 6(int) Constant 13
+ 298: 6(int) Constant 14
+ 312: 6(int) Constant 15
+ 326: 6(int) Constant 16
+ 340: 6(int) Constant 18
+ 341: 6(int) Constant 17
+ 349: 18(int) Constant 19
+ 355: TypeImage 12(float) 2D nonsampled format:Unknown
+ 356: TypePointer UniformConstant 355
+ 357(wo2D): 356(ptr) Variable UniformConstant
+ 361: TypePointer Output 125(fvec4)
+ 362(fragData): 361(ptr) Variable Output
+ 368: TypeBool
+ 375: TypeVector 6(int) 4
+ 376: TypePointer Input 375(ivec4)
+ 377(ic4D): 376(ptr) Variable Input
+ 4(main): 2 Function None 3
+ 5: Label
+ 9(iv): 8(ptr) Variable Function
+ 127(v): 126(ptr) Variable Function
+ 229(ui): 228(ptr) Variable Function
+ 363: 126(ptr) Variable Function
+ Store 9(iv) 11
+ 16: 13 Load 15(i1D)
+ 17: 6(int) ImageQuerySize 16
+ 21: 20(ptr) AccessChain 9(iv) 19
+ 22: 6(int) Load 21
+ 23: 6(int) IAdd 22 17
+ 24: 20(ptr) AccessChain 9(iv) 19
+ Store 24 23
+ 28: 25 Load 27(i2D)
+ 30: 29(ivec2) ImageQuerySize 28
+ 31: 7(ivec3) Load 9(iv)
+ 32: 29(ivec2) VectorShuffle 31 31 0 1
+ 33: 29(ivec2) IAdd 32 30
+ 34: 7(ivec3) Load 9(iv)
+ 35: 7(ivec3) VectorShuffle 34 33 3 4 2
+ Store 9(iv) 35
+ 39: 36 Load 38(i3D)
+ 40: 7(ivec3) ImageQuerySize 39
+ 41: 7(ivec3) Load 9(iv)
+ 42: 7(ivec3) IAdd 41 40
+ Store 9(iv) 42
+ 46: 43 Load 45(iCube)
+ 47: 29(ivec2) ImageQuerySize 46
+ 48: 7(ivec3) Load 9(iv)
+ 49: 29(ivec2) VectorShuffle 48 48 0 1
+ 50: 29(ivec2) IAdd 49 47
+ 51: 7(ivec3) Load 9(iv)
+ 52: 7(ivec3) VectorShuffle 51 50 3 4 2
+ Store 9(iv) 52
+ 56: 53 Load 55(iCubeArray)
+ 57: 7(ivec3) ImageQuerySize 56
+ 58: 7(ivec3) Load 9(iv)
+ 59: 7(ivec3) IAdd 58 57
+ Store 9(iv) 59
+ 63: 60 Load 62(i2DRect)
+ 64: 29(ivec2) ImageQuerySize 63
+ 65: 7(ivec3) Load 9(iv)
+ 66: 29(ivec2) VectorShuffle 65 65 0 1
+ 67: 29(ivec2) IAdd 66 64
+ 68: 7(ivec3) Load 9(iv)
+ 69: 7(ivec3) VectorShuffle 68 67 3 4 2
+ Store 9(iv) 69
+ 73: 70 Load 72(i1DArray)
+ 74: 29(ivec2) ImageQuerySize 73
+ 75: 7(ivec3) Load 9(iv)
+ 76: 29(ivec2) VectorShuffle 75 75 0 1
+ 77: 29(ivec2) IAdd 76 74
+ 78: 7(ivec3) Load 9(iv)
+ 79: 7(ivec3) VectorShuffle 78 77 3 4 2
+ Store 9(iv) 79
+ 83: 80 Load 82(i2DArray)
+ 84: 7(ivec3) ImageQuerySize 83
+ 85: 7(ivec3) Load 9(iv)
+ 86: 7(ivec3) IAdd 85 84
+ Store 9(iv) 86
+ 90: 87 Load 89(iBuffer)
+ 91: 6(int) ImageQuerySize 90
+ 92: 20(ptr) AccessChain 9(iv) 19
+ 93: 6(int) Load 92
+ 94: 6(int) IAdd 93 91
+ 95: 20(ptr) AccessChain 9(iv) 19
+ Store 95 94
+ 99: 96 Load 98(i2DMS)
+ 100: 29(ivec2) ImageQuerySize 99
+ 101: 7(ivec3) Load 9(iv)
+ 102: 29(ivec2) VectorShuffle 101 101 0 1
+ 103: 29(ivec2) IAdd 102 100
+ 104: 7(ivec3) Load 9(iv)
+ 105: 7(ivec3) VectorShuffle 104 103 3 4 2
+ Store 9(iv) 105
+ 109: 106 Load 108(i2DMSArray)
+ 110: 7(ivec3) ImageQuerySize 109
+ 111: 7(ivec3) Load 9(iv)
+ 112: 7(ivec3) IAdd 111 110
+ Store 9(iv) 112
+ 113: 96 Load 98(i2DMS)
+ 114: 6(int) ImageQuerySamples 113
+ 115: 20(ptr) AccessChain 9(iv) 19
+ 116: 6(int) Load 115
+ 117: 6(int) IAdd 116 114
+ 118: 20(ptr) AccessChain 9(iv) 19
+ Store 118 117
+ 119: 106 Load 108(i2DMSArray)
+ 120: 6(int) ImageQuerySamples 119
+ 121: 20(ptr) AccessChain 9(iv) 19
+ 122: 6(int) Load 121
+ 123: 6(int) IAdd 122 120
+ 124: 20(ptr) AccessChain 9(iv) 19
+ Store 124 123
+ Store 127(v) 129
+ 130: 13 Load 15(i1D)
+ 133: 6(int) Load 132(ic1D)
+ 134: 125(fvec4) ImageRead 130 133
+ 135: 125(fvec4) Load 127(v)
+ 136: 125(fvec4) FAdd 135 134
+ Store 127(v) 136
+ 137: 13 Load 15(i1D)
+ 138: 6(int) Load 132(ic1D)
+ 139: 125(fvec4) Load 127(v)
+ ImageWrite 137 138 139
+ 140: 25 Load 27(i2D)
+ 143: 29(ivec2) Load 142(ic2D)
+ 144: 125(fvec4) ImageRead 140 143
+ 145: 125(fvec4) Load 127(v)
+ 146: 125(fvec4) FAdd 145 144
+ Store 127(v) 146
+ 147: 25 Load 27(i2D)
+ 148: 29(ivec2) Load 142(ic2D)
+ 149: 125(fvec4) Load 127(v)
+ ImageWrite 147 148 149
+ 150: 36 Load 38(i3D)
+ 153: 7(ivec3) Load 152(ic3D)
+ 154: 125(fvec4) ImageRead 150 153
+ 155: 125(fvec4) Load 127(v)
+ 156: 125(fvec4) FAdd 155 154
+ Store 127(v) 156
+ 157: 36 Load 38(i3D)
+ 158: 7(ivec3) Load 152(ic3D)
+ 159: 125(fvec4) Load 127(v)
+ ImageWrite 157 158 159
+ 160: 43 Load 45(iCube)
+ 161: 7(ivec3) Load 152(ic3D)
+ 162: 125(fvec4) ImageRead 160 161
+ 163: 125(fvec4) Load 127(v)
+ 164: 125(fvec4) FAdd 163 162
+ Store 127(v) 164
+ 165: 43 Load 45(iCube)
+ 166: 7(ivec3) Load 152(ic3D)
+ 167: 125(fvec4) Load 127(v)
+ ImageWrite 165 166 167
+ 168: 53 Load 55(iCubeArray)
+ 169: 7(ivec3) Load 152(ic3D)
+ 170: 125(fvec4) ImageRead 168 169
+ 171: 125(fvec4) Load 127(v)
+ 172: 125(fvec4) FAdd 171 170
+ Store 127(v) 172
+ 173: 53 Load 55(iCubeArray)
+ 174: 7(ivec3) Load 152(ic3D)
+ 175: 125(fvec4) Load 127(v)
+ ImageWrite 173 174 175
+ 176: 60 Load 62(i2DRect)
+ 177: 29(ivec2) Load 142(ic2D)
+ 178: 125(fvec4) ImageRead 176 177
+ 179: 125(fvec4) Load 127(v)
+ 180: 125(fvec4) FAdd 179 178
+ Store 127(v) 180
+ 181: 60 Load 62(i2DRect)
+ 182: 29(ivec2) Load 142(ic2D)
+ 183: 125(fvec4) Load 127(v)
+ ImageWrite 181 182 183
+ 184: 70 Load 72(i1DArray)
+ 185: 29(ivec2) Load 142(ic2D)
+ 186: 125(fvec4) ImageRead 184 185
+ 187: 125(fvec4) Load 127(v)
+ 188: 125(fvec4) FAdd 187 186
+ Store 127(v) 188
+ 189: 70 Load 72(i1DArray)
+ 190: 29(ivec2) Load 142(ic2D)
+ 191: 125(fvec4) Load 127(v)
+ ImageWrite 189 190 191
+ 192: 80 Load 82(i2DArray)
+ 193: 7(ivec3) Load 152(ic3D)
+ 194: 125(fvec4) ImageRead 192 193
+ 195: 125(fvec4) Load 127(v)
+ 196: 125(fvec4) FAdd 195 194
+ Store 127(v) 196
+ 197: 80 Load 82(i2DArray)
+ 198: 7(ivec3) Load 152(ic3D)
+ 199: 125(fvec4) Load 127(v)
+ ImageWrite 197 198 199
+ 200: 87 Load 89(iBuffer)
+ 201: 6(int) Load 132(ic1D)
+ 202: 125(fvec4) ImageRead 200 201
+ 203: 125(fvec4) Load 127(v)
+ 204: 125(fvec4) FAdd 203 202
+ Store 127(v) 204
+ 205: 87 Load 89(iBuffer)
+ 206: 6(int) Load 132(ic1D)
+ 207: 125(fvec4) Load 127(v)
+ ImageWrite 205 206 207
+ 208: 96 Load 98(i2DMS)
+ 209: 29(ivec2) Load 142(ic2D)
+ 211: 125(fvec4) ImageRead 208 209 Sample 210
+ 212: 125(fvec4) Load 127(v)
+ 213: 125(fvec4) FAdd 212 211
+ Store 127(v) 213
+ 214: 96 Load 98(i2DMS)
+ 215: 29(ivec2) Load 142(ic2D)
+ 217: 125(fvec4) Load 127(v)
+ ImageWrite 214 215 217 Sample 216
+ 218: 106 Load 108(i2DMSArray)
+ 219: 7(ivec3) Load 152(ic3D)
+ 221: 125(fvec4) ImageRead 218 219 Sample 220
+ 222: 125(fvec4) Load 127(v)
+ 223: 125(fvec4) FAdd 222 221
+ Store 127(v) 223
+ 224: 106 Load 108(i2DMSArray)
+ 225: 7(ivec3) Load 152(ic3D)
+ 227: 125(fvec4) Load 127(v)
+ ImageWrite 224 225 227 Sample 226
+ Store 229(ui) 19
+ 233: 6(int) Load 132(ic1D)
+ 236: 235(ptr) ImageTexelPointer 232(ii1D) 233 19
+ 238: 6(int) AtomicIAdd 236 237 19 234
+ 239: 20(ptr) AccessChain 9(iv) 19
+ 240: 6(int) Load 239
+ 241: 6(int) IAdd 240 238
+ 242: 20(ptr) AccessChain 9(iv) 19
+ Store 242 241
+ 246: 29(ivec2) Load 142(ic2D)
+ 249: 18(int) Load 248(value)
+ 251: 250(ptr) ImageTexelPointer 245(ui2D) 246 19
+ 252: 18(int) AtomicIAdd 251 237 19 249
+ 253: 18(int) Load 229(ui)
+ 254: 18(int) IAdd 253 252
+ Store 229(ui) 254
+ 255: 6(int) Load 132(ic1D)
+ 257: 235(ptr) ImageTexelPointer 232(ii1D) 255 19
+ 258: 6(int) AtomicSMin 257 237 19 256
+ 259: 20(ptr) AccessChain 9(iv) 19
+ 260: 6(int) Load 259
+ 261: 6(int) IAdd 260 258
+ 262: 20(ptr) AccessChain 9(iv) 19
+ Store 262 261
+ 263: 29(ivec2) Load 142(ic2D)
+ 264: 18(int) Load 248(value)
+ 265: 250(ptr) ImageTexelPointer 245(ui2D) 263 19
+ 266: 18(int) AtomicUMin 265 237 19 264
+ 267: 18(int) Load 229(ui)
+ 268: 18(int) IAdd 267 266
+ Store 229(ui) 268
+ 269: 6(int) Load 132(ic1D)
+ 271: 235(ptr) ImageTexelPointer 232(ii1D) 269 19
+ 272: 6(int) AtomicSMax 271 237 19 270
+ 273: 20(ptr) AccessChain 9(iv) 19
+ 274: 6(int) Load 273
+ 275: 6(int) IAdd 274 272
+ 276: 20(ptr) AccessChain 9(iv) 19
+ Store 276 275
+ 277: 29(ivec2) Load 142(ic2D)
+ 278: 18(int) Load 248(value)
+ 279: 250(ptr) ImageTexelPointer 245(ui2D) 277 19
+ 280: 18(int) AtomicUMax 279 237 19 278
+ 281: 18(int) Load 229(ui)
+ 282: 18(int) IAdd 281 280
+ Store 229(ui) 282
+ 283: 6(int) Load 132(ic1D)
+ 285: 235(ptr) ImageTexelPointer 232(ii1D) 283 19
+ 286: 6(int) AtomicAnd 285 237 19 284
+ 287: 20(ptr) AccessChain 9(iv) 19
+ 288: 6(int) Load 287
+ 289: 6(int) IAdd 288 286
+ 290: 20(ptr) AccessChain 9(iv) 19
+ Store 290 289
+ 291: 29(ivec2) Load 142(ic2D)
+ 292: 18(int) Load 248(value)
+ 293: 250(ptr) ImageTexelPointer 245(ui2D) 291 19
+ 294: 18(int) AtomicAnd 293 237 19 292
+ 295: 18(int) Load 229(ui)
+ 296: 18(int) IAdd 295 294
+ Store 229(ui) 296
+ 297: 6(int) Load 132(ic1D)
+ 299: 235(ptr) ImageTexelPointer 232(ii1D) 297 19
+ 300: 6(int) AtomicOr 299 237 19 298
+ 301: 20(ptr) AccessChain 9(iv) 19
+ 302: 6(int) Load 301
+ 303: 6(int) IAdd 302 300
+ 304: 20(ptr) AccessChain 9(iv) 19
+ Store 304 303
+ 305: 29(ivec2) Load 142(ic2D)
+ 306: 18(int) Load 248(value)
+ 307: 250(ptr) ImageTexelPointer 245(ui2D) 305 19
+ 308: 18(int) AtomicOr 307 237 19 306
+ 309: 18(int) Load 229(ui)
+ 310: 18(int) IAdd 309 308
+ Store 229(ui) 310
+ 311: 6(int) Load 132(ic1D)
+ 313: 235(ptr) ImageTexelPointer 232(ii1D) 311 19
+ 314: 6(int) AtomicXor 313 237 19 312
+ 315: 20(ptr) AccessChain 9(iv) 19
+ 316: 6(int) Load 315
+ 317: 6(int) IAdd 316 314
+ 318: 20(ptr) AccessChain 9(iv) 19
+ Store 318 317
+ 319: 29(ivec2) Load 142(ic2D)
+ 320: 18(int) Load 248(value)
+ 321: 250(ptr) ImageTexelPointer 245(ui2D) 319 19
+ 322: 18(int) AtomicXor 321 237 19 320
+ 323: 18(int) Load 229(ui)
+ 324: 18(int) IAdd 323 322
+ Store 229(ui) 324
+ 325: 6(int) Load 132(ic1D)
+ 327: 235(ptr) ImageTexelPointer 232(ii1D) 325 19
+ 328: 6(int) AtomicExchange 327 237 19 326
+ 329: 20(ptr) AccessChain 9(iv) 19
+ 330: 6(int) Load 329
+ 331: 6(int) IAdd 330 328
+ 332: 20(ptr) AccessChain 9(iv) 19
+ Store 332 331
+ 333: 29(ivec2) Load 142(ic2D)
+ 334: 18(int) Load 248(value)
+ 335: 250(ptr) ImageTexelPointer 245(ui2D) 333 19
+ 336: 18(int) AtomicExchange 335 237 19 334
+ 337: 18(int) Load 229(ui)
+ 338: 18(int) IAdd 337 336
+ Store 229(ui) 338
+ 339: 6(int) Load 132(ic1D)
+ 342: 235(ptr) ImageTexelPointer 232(ii1D) 339 19
+ 343: 6(int) AtomicCompareExchange 342 237 19 19 341 340
+ 344: 20(ptr) AccessChain 9(iv) 19
+ 345: 6(int) Load 344
+ 346: 6(int) IAdd 345 343
+ 347: 20(ptr) AccessChain 9(iv) 19
+ Store 347 346
+ 348: 29(ivec2) Load 142(ic2D)
+ 350: 18(int) Load 248(value)
+ 351: 250(ptr) ImageTexelPointer 245(ui2D) 348 19
+ 352: 18(int) AtomicCompareExchange 351 237 19 19 350 349
+ 353: 18(int) Load 229(ui)
+ 354: 18(int) IAdd 353 352
+ Store 229(ui) 354
+ 358: 355 Load 357(wo2D)
+ 359: 29(ivec2) Load 142(ic2D)
+ 360: 125(fvec4) Load 127(v)
+ ImageWrite 358 359 360
+ 364: 18(int) Load 229(ui)
+ 365: 20(ptr) AccessChain 9(iv) 237
+ 366: 6(int) Load 365
+ 367: 18(int) Bitcast 366
+ 369: 368(bool) INotEqual 364 367
+ SelectionMerge 371 None
+ BranchConditional 369 370 373
+ 370: Label
+ 372: 125(fvec4) Load 127(v)
+ Store 363 372
+ Branch 371
+ 373: Label
+ Store 363 129
+ Branch 371
+ 371: Label
+ 374: 125(fvec4) Load 363
+ Store 362(fragData) 374
+ Return
+ FunctionEnd
diff --git a/chromium/third_party/glslang/src/Test/baseResults/spv.int64.frag.out b/chromium/third_party/glslang/src/Test/baseResults/spv.int64.frag.out
new file mode 100644
index 00000000000..fe45013797b
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/spv.int64.frag.out
@@ -0,0 +1,626 @@
+spv.int64.frag
+Warning, version 450 is not yet complete; most version-specific features are present, but some are missing.
+
+
+Linked fragment stage:
+
+
+Missing functionality: shader int64
+// Module Version 10000
+// Generated by (magic number): 80001
+// Id's are bound by 455
+
+ Capability Shader
+ Capability Float64
+ Capability Int64
+ 1: ExtInstImport "GLSL.std.450"
+ MemoryModel Logical GLSL450
+ EntryPoint Fragment 4 "main"
+ ExecutionMode 4 OriginUpperLeft
+ Source GLSL 450
+ SourceExtension "GL_ARB_gpu_shader_int64"
+ Name 4 "main"
+ Name 6 "literal("
+ Name 8 "typeCast("
+ Name 10 "operators("
+ Name 12 "builtinFuncs("
+ Name 16 "i64"
+ Name 24 "Uniforms"
+ MemberName 24(Uniforms) 0 "index"
+ Name 26 ""
+ Name 33 "indexable"
+ Name 38 "u64"
+ Name 47 "indexable"
+ Name 52 "i64v"
+ Name 56 "bv"
+ Name 65 "u64v"
+ Name 74 "iv"
+ Name 81 "uv"
+ Name 89 "fv"
+ Name 95 "dv"
+ Name 132 "u64v"
+ Name 137 "i64"
+ Name 157 "i"
+ Name 164 "uv"
+ Name 216 "b"
+ Name 276 "i64v"
+ Name 279 "i64"
+ Name 289 "u64v"
+ Name 291 "u64"
+ Name 363 "dv"
+ Name 382 "iv"
+ Name 387 "uv"
+ Name 391 "bv"
+ Name 452 "Block"
+ MemberName 452(Block) 0 "i64v"
+ MemberName 452(Block) 1 "u64"
+ Name 454 "block"
+ MemberDecorate 24(Uniforms) 0 Offset 0
+ Decorate 24(Uniforms) Block
+ Decorate 26 DescriptorSet 0
+ Decorate 26 Binding 0
+ MemberDecorate 452(Block) 0 Offset 0
+ MemberDecorate 452(Block) 1 Offset 24
+ Decorate 452(Block) Block
+ Decorate 454(block) DescriptorSet 0
+ Decorate 454(block) Binding 1
+ 2: TypeVoid
+ 3: TypeFunction 2
+ 14: TypeInt 64 1
+ 15: TypePointer Function 14(int)
+ 17: TypeInt 32 0
+ 18: 17(int) Constant 3
+ 19: TypeArray 14(int) 18
+ 20: 14(int) Constant 4008636143 4008636142
+ 21: 14(int) Constant 4294967295 4294967295
+ 22: 14(int) Constant 0 1
+ 23: 19 ConstantComposite 20 21 22
+ 24(Uniforms): TypeStruct 17(int)
+ 25: TypePointer Uniform 24(Uniforms)
+ 26: 25(ptr) Variable Uniform
+ 27: TypeInt 32 1
+ 28: 27(int) Constant 0
+ 29: TypePointer Uniform 17(int)
+ 32: TypePointer Function 19
+ 36: TypeInt 64 0
+ 37: TypePointer Function 36(int)
+ 39: TypeArray 36(int) 18
+ 40: 36(int) Constant 4294967295 4294967295
+ 41: 36(int) Constant 0 1
+ 42: 36(int) Constant 4294967295 1
+ 43: 39 ConstantComposite 40 41 42
+ 46: TypePointer Function 39
+ 50: TypeVector 14(int) 2
+ 51: TypePointer Function 50(ivec2)
+ 53: TypeBool
+ 54: TypeVector 53(bool) 2
+ 55: TypePointer Function 54(bvec2)
+ 58: 14(int) Constant 0 0
+ 59: 14(int) Constant 1 0
+ 60: 50(ivec2) ConstantComposite 58 58
+ 61: 50(ivec2) ConstantComposite 59 59
+ 63: TypeVector 36(int) 2
+ 64: TypePointer Function 63(ivec2)
+ 67: 36(int) Constant 0 0
+ 68: 36(int) Constant 1 0
+ 69: 63(ivec2) ConstantComposite 67 67
+ 70: 63(ivec2) ConstantComposite 68 68
+ 72: TypeVector 27(int) 2
+ 73: TypePointer Function 72(ivec2)
+ 79: TypeVector 17(int) 2
+ 80: TypePointer Function 79(ivec2)
+ 86: TypeFloat 32
+ 87: TypeVector 86(float) 2
+ 88: TypePointer Function 87(fvec2)
+ 92: TypeFloat 64
+ 93: TypeVector 92(float) 2
+ 94: TypePointer Function 93(fvec2)
+ 130: TypeVector 36(int) 3
+ 131: TypePointer Function 130(ivec3)
+ 134: TypeVector 14(int) 3
+ 156: TypePointer Function 27(int)
+ 162: TypeVector 17(int) 3
+ 163: TypePointer Function 162(ivec3)
+ 197: TypeVector 27(int) 3
+ 200: 17(int) Constant 1
+ 201: TypePointer Function 17(int)
+ 207: 17(int) Constant 2
+ 215: TypePointer Function 53(bool)
+ 217: 17(int) Constant 0
+ 287: 50(ivec2) ConstantComposite 21 21
+ 296: 130(ivec3) ConstantComposite 67 67 67
+ 338: 53(bool) ConstantTrue
+ 345: 53(bool) ConstantFalse
+ 346: 54(bvec2) ConstantComposite 345 345
+ 358: TypeVector 53(bool) 3
+ 359: 358(bvec3) ConstantComposite 345 345 345
+ 361: TypeVector 92(float) 3
+ 362: TypePointer Function 361(fvec3)
+ 367: TypePointer Function 92(float)
+ 378: 27(int) Constant 1
+ 379: 27(int) Constant 2
+ 380: 72(ivec2) ConstantComposite 378 379
+ 385: 79(ivec2) ConstantComposite 207 18
+ 390: TypePointer Function 358(bvec3)
+ 452(Block): TypeStruct 134(ivec3) 36(int)
+ 453: TypePointer Uniform 452(Block)
+ 454(block): 453(ptr) Variable Uniform
+ 4(main): 2 Function None 3
+ 5: Label
+ Return
+ FunctionEnd
+ 6(literal(): 2 Function None 3
+ 7: Label
+ 16(i64): 15(ptr) Variable Function
+ 33(indexable): 32(ptr) Variable Function
+ 38(u64): 37(ptr) Variable Function
+ 47(indexable): 46(ptr) Variable Function
+ 30: 29(ptr) AccessChain 26 28
+ 31: 17(int) Load 30
+ Store 33(indexable) 23
+ 34: 15(ptr) AccessChain 33(indexable) 31
+ 35: 14(int) Load 34
+ Store 16(i64) 35
+ 44: 29(ptr) AccessChain 26 28
+ 45: 17(int) Load 44
+ Store 47(indexable) 43
+ 48: 37(ptr) AccessChain 47(indexable) 45
+ 49: 36(int) Load 48
+ Store 38(u64) 49
+ Return
+ FunctionEnd
+ 8(typeCast(): 2 Function None 3
+ 9: Label
+ 52(i64v): 51(ptr) Variable Function
+ 56(bv): 55(ptr) Variable Function
+ 65(u64v): 64(ptr) Variable Function
+ 74(iv): 73(ptr) Variable Function
+ 81(uv): 80(ptr) Variable Function
+ 89(fv): 88(ptr) Variable Function
+ 95(dv): 94(ptr) Variable Function
+ 57: 54(bvec2) Load 56(bv)
+ 62: 50(ivec2) Select 57 61 60
+ Store 52(i64v) 62
+ 66: 54(bvec2) Load 56(bv)
+ 71: 63(ivec2) Select 66 70 69
+ Store 65(u64v) 71
+ 75: 72(ivec2) Load 74(iv)
+ 76: 50(ivec2) SConvert 75
+ Store 52(i64v) 76
+ 77: 50(ivec2) Load 52(i64v)
+ 78: 72(ivec2) SConvert 77
+ Store 74(iv) 78
+ 82: 79(ivec2) Load 81(uv)
+ 83: 63(ivec2) UConvert 82
+ Store 65(u64v) 83
+ 84: 63(ivec2) Load 65(u64v)
+ 85: 79(ivec2) UConvert 84
+ Store 81(uv) 85
+ 90: 50(ivec2) Load 52(i64v)
+ 91: 87(fvec2) ConvertSToF 90
+ Store 89(fv) 91
+ 96: 50(ivec2) Load 52(i64v)
+ 97: 93(fvec2) ConvertSToF 96
+ Store 95(dv) 97
+ 98: 63(ivec2) Load 65(u64v)
+ 99: 87(fvec2) ConvertUToF 98
+ Store 89(fv) 99
+ 100: 63(ivec2) Load 65(u64v)
+ 101: 93(fvec2) ConvertUToF 100
+ Store 95(dv) 101
+ 102: 87(fvec2) Load 89(fv)
+ 103: 50(ivec2) ConvertFToS 102
+ Store 52(i64v) 103
+ 104: 93(fvec2) Load 95(dv)
+ 105: 50(ivec2) ConvertFToS 104
+ Store 52(i64v) 105
+ 106: 87(fvec2) Load 89(fv)
+ 107: 63(ivec2) ConvertFToU 106
+ Store 65(u64v) 107
+ 108: 93(fvec2) Load 95(dv)
+ 109: 63(ivec2) ConvertFToU 108
+ Store 65(u64v) 109
+ 110: 50(ivec2) Load 52(i64v)
+ 111: 54(bvec2) INotEqual 110 69
+ Store 56(bv) 111
+ 112: 63(ivec2) Load 65(u64v)
+ 113: 54(bvec2) INotEqual 112 69
+ Store 56(bv) 113
+ 114: 50(ivec2) Load 52(i64v)
+ 115: 63(ivec2) Bitcast 114
+ Store 65(u64v) 115
+ 116: 63(ivec2) Load 65(u64v)
+ 117: 50(ivec2) Bitcast 116
+ Store 52(i64v) 117
+ 118: 50(ivec2) Load 52(i64v)
+ 119: 72(ivec2) SConvert 118
+ 120: 79(ivec2) Bitcast 119
+ Store 81(uv) 120
+ 121: 79(ivec2) Load 81(uv)
+ 122: 63(ivec2) UConvert 121
+ 123: 50(ivec2) Bitcast 122
+ Store 52(i64v) 123
+ 124: 63(ivec2) Load 65(u64v)
+ 125: 79(ivec2) UConvert 124
+ 126: 72(ivec2) Bitcast 125
+ Store 74(iv) 126
+ 127: 72(ivec2) Load 74(iv)
+ 128: 50(ivec2) SConvert 127
+ 129: 63(ivec2) Bitcast 128
+ Store 65(u64v) 129
+ Return
+ FunctionEnd
+ 10(operators(): 2 Function None 3
+ 11: Label
+ 132(u64v): 131(ptr) Variable Function
+ 137(i64): 15(ptr) Variable Function
+ 157(i): 156(ptr) Variable Function
+ 164(uv): 163(ptr) Variable Function
+ 216(b): 215(ptr) Variable Function
+ 133: 130(ivec3) Load 132(u64v)
+ 135: 134(ivec3) CompositeConstruct 59 59 59
+ 136: 130(ivec3) IAdd 133 135
+ Store 132(u64v) 136
+ 138: 14(int) Load 137(i64)
+ 139: 14(int) ISub 138 59
+ Store 137(i64) 139
+ 140: 14(int) Load 137(i64)
+ 141: 14(int) IAdd 140 59
+ Store 137(i64) 141
+ 142: 130(ivec3) Load 132(u64v)
+ 143: 134(ivec3) CompositeConstruct 59 59 59
+ 144: 130(ivec3) ISub 142 143
+ Store 132(u64v) 144
+ 145: 130(ivec3) Load 132(u64v)
+ 146: 130(ivec3) Not 145
+ Store 132(u64v) 146
+ 147: 14(int) Load 137(i64)
+ Store 137(i64) 147
+ 148: 130(ivec3) Load 132(u64v)
+ 149: 130(ivec3) SNegate 148
+ Store 132(u64v) 149
+ 150: 14(int) Load 137(i64)
+ 151: 14(int) Load 137(i64)
+ 152: 14(int) IAdd 151 150
+ Store 137(i64) 152
+ 153: 130(ivec3) Load 132(u64v)
+ 154: 130(ivec3) Load 132(u64v)
+ 155: 130(ivec3) ISub 154 153
+ Store 132(u64v) 155
+ 158: 27(int) Load 157(i)
+ 159: 14(int) SConvert 158
+ 160: 14(int) Load 137(i64)
+ 161: 14(int) IMul 160 159
+ Store 137(i64) 161
+ 165: 162(ivec3) Load 164(uv)
+ 166: 130(ivec3) UConvert 165
+ 167: 130(ivec3) Load 132(u64v)
+ 168: 130(ivec3) UDiv 167 166
+ Store 132(u64v) 168
+ 169: 27(int) Load 157(i)
+ 170: 14(int) SConvert 169
+ 171: 36(int) Bitcast 170
+ 172: 130(ivec3) Load 132(u64v)
+ 173: 130(ivec3) CompositeConstruct 171 171 171
+ 174: 130(ivec3) UMod 172 173
+ Store 132(u64v) 174
+ 175: 130(ivec3) Load 132(u64v)
+ 176: 162(ivec3) Load 164(uv)
+ 177: 130(ivec3) UConvert 176
+ 178: 130(ivec3) IAdd 175 177
+ Store 132(u64v) 178
+ 179: 14(int) Load 137(i64)
+ 180: 27(int) Load 157(i)
+ 181: 14(int) SConvert 180
+ 182: 14(int) ISub 179 181
+ Store 137(i64) 182
+ 183: 130(ivec3) Load 132(u64v)
+ 184: 162(ivec3) Load 164(uv)
+ 185: 130(ivec3) UConvert 184
+ 186: 130(ivec3) IMul 183 185
+ Store 132(u64v) 186
+ 187: 14(int) Load 137(i64)
+ 188: 27(int) Load 157(i)
+ 189: 14(int) SConvert 188
+ 190: 14(int) IMul 187 189
+ Store 137(i64) 190
+ 191: 14(int) Load 137(i64)
+ 192: 27(int) Load 157(i)
+ 193: 14(int) SConvert 192
+ 194: 14(int) SMod 191 193
+ Store 137(i64) 194
+ 195: 27(int) Load 157(i)
+ 196: 130(ivec3) Load 132(u64v)
+ 198: 197(ivec3) CompositeConstruct 195 195 195
+ 199: 130(ivec3) ShiftLeftLogical 196 198
+ Store 132(u64v) 199
+ 202: 201(ptr) AccessChain 164(uv) 200
+ 203: 17(int) Load 202
+ 204: 14(int) Load 137(i64)
+ 205: 14(int) ShiftRightArithmetic 204 203
+ Store 137(i64) 205
+ 206: 14(int) Load 137(i64)
+ 208: 37(ptr) AccessChain 132(u64v) 207
+ 209: 36(int) Load 208
+ 210: 14(int) ShiftLeftLogical 206 209
+ Store 137(i64) 210
+ 211: 130(ivec3) Load 132(u64v)
+ 212: 14(int) Load 137(i64)
+ 213: 134(ivec3) CompositeConstruct 212 212 212
+ 214: 130(ivec3) ShiftLeftLogical 211 213
+ Store 132(u64v) 214
+ 218: 37(ptr) AccessChain 132(u64v) 217
+ 219: 36(int) Load 218
+ 220: 14(int) Load 137(i64)
+ 221: 36(int) Bitcast 220
+ 222: 53(bool) INotEqual 219 221
+ Store 216(b) 222
+ 223: 14(int) Load 137(i64)
+ 224: 36(int) Bitcast 223
+ 225: 37(ptr) AccessChain 132(u64v) 217
+ 226: 36(int) Load 225
+ 227: 53(bool) IEqual 224 226
+ Store 216(b) 227
+ 228: 37(ptr) AccessChain 132(u64v) 217
+ 229: 36(int) Load 228
+ 230: 201(ptr) AccessChain 164(uv) 200
+ 231: 17(int) Load 230
+ 232: 36(int) UConvert 231
+ 233: 53(bool) UGreaterThan 229 232
+ Store 216(b) 233
+ 234: 14(int) Load 137(i64)
+ 235: 27(int) Load 157(i)
+ 236: 14(int) SConvert 235
+ 237: 53(bool) SLessThan 234 236
+ Store 216(b) 237
+ 238: 37(ptr) AccessChain 132(u64v) 200
+ 239: 36(int) Load 238
+ 240: 201(ptr) AccessChain 164(uv) 217
+ 241: 17(int) Load 240
+ 242: 36(int) UConvert 241
+ 243: 53(bool) UGreaterThanEqual 239 242
+ Store 216(b) 243
+ 244: 14(int) Load 137(i64)
+ 245: 27(int) Load 157(i)
+ 246: 14(int) SConvert 245
+ 247: 53(bool) SLessThanEqual 244 246
+ Store 216(b) 247
+ 248: 27(int) Load 157(i)
+ 249: 14(int) SConvert 248
+ 250: 36(int) Bitcast 249
+ 251: 130(ivec3) Load 132(u64v)
+ 252: 130(ivec3) CompositeConstruct 250 250 250
+ 253: 130(ivec3) BitwiseOr 251 252
+ Store 132(u64v) 253
+ 254: 14(int) Load 137(i64)
+ 255: 27(int) Load 157(i)
+ 256: 14(int) SConvert 255
+ 257: 14(int) BitwiseOr 254 256
+ Store 137(i64) 257
+ 258: 27(int) Load 157(i)
+ 259: 14(int) SConvert 258
+ 260: 14(int) Load 137(i64)
+ 261: 14(int) BitwiseAnd 260 259
+ Store 137(i64) 261
+ 262: 130(ivec3) Load 132(u64v)
+ 263: 162(ivec3) Load 164(uv)
+ 264: 130(ivec3) UConvert 263
+ 265: 130(ivec3) BitwiseAnd 262 264
+ Store 132(u64v) 265
+ 266: 14(int) Load 137(i64)
+ 267: 36(int) Bitcast 266
+ 268: 130(ivec3) Load 132(u64v)
+ 269: 130(ivec3) CompositeConstruct 267 267 267
+ 270: 130(ivec3) BitwiseXor 268 269
+ Store 132(u64v) 270
+ 271: 130(ivec3) Load 132(u64v)
+ 272: 14(int) Load 137(i64)
+ 273: 36(int) Bitcast 272
+ 274: 130(ivec3) CompositeConstruct 273 273 273
+ 275: 130(ivec3) BitwiseXor 271 274
+ Store 132(u64v) 275
+ Return
+ FunctionEnd
+12(builtinFuncs(): 2 Function None 3
+ 13: Label
+ 276(i64v): 51(ptr) Variable Function
+ 279(i64): 15(ptr) Variable Function
+ 289(u64v): 131(ptr) Variable Function
+ 291(u64): 37(ptr) Variable Function
+ 363(dv): 362(ptr) Variable Function
+ 382(iv): 73(ptr) Variable Function
+ 387(uv): 80(ptr) Variable Function
+ 391(bv): 390(ptr) Variable Function
+ 277: 50(ivec2) Load 276(i64v)
+ 278: 50(ivec2) ExtInst 1(GLSL.std.450) 5(SAbs) 277
+ Store 276(i64v) 278
+ 280: 14(int) Load 279(i64)
+ 281: 14(int) ExtInst 1(GLSL.std.450) 7(SSign) 280
+ Store 279(i64) 281
+ 282: 50(ivec2) Load 276(i64v)
+ 283: 14(int) Load 279(i64)
+ 284: 50(ivec2) CompositeConstruct 283 283
+ 285: 50(ivec2) ExtInst 1(GLSL.std.450) 39(SMin) 282 284
+ Store 276(i64v) 285
+ 286: 50(ivec2) Load 276(i64v)
+ 288: 50(ivec2) ExtInst 1(GLSL.std.450) 39(SMin) 286 287
+ Store 276(i64v) 288
+ 290: 130(ivec3) Load 289(u64v)
+ 292: 36(int) Load 291(u64)
+ 293: 130(ivec3) CompositeConstruct 292 292 292
+ 294: 130(ivec3) ExtInst 1(GLSL.std.450) 38(UMin) 290 293
+ Store 289(u64v) 294
+ 295: 130(ivec3) Load 289(u64v)
+ 297: 130(ivec3) ExtInst 1(GLSL.std.450) 38(UMin) 295 296
+ Store 289(u64v) 297
+ 298: 50(ivec2) Load 276(i64v)
+ 299: 14(int) Load 279(i64)
+ 300: 50(ivec2) CompositeConstruct 299 299
+ 301: 50(ivec2) ExtInst 1(GLSL.std.450) 42(SMax) 298 300
+ Store 276(i64v) 301
+ 302: 50(ivec2) Load 276(i64v)
+ 303: 50(ivec2) ExtInst 1(GLSL.std.450) 42(SMax) 302 287
+ Store 276(i64v) 303
+ 304: 130(ivec3) Load 289(u64v)
+ 305: 36(int) Load 291(u64)
+ 306: 130(ivec3) CompositeConstruct 305 305 305
+ 307: 130(ivec3) ExtInst 1(GLSL.std.450) 41(UMax) 304 306
+ Store 289(u64v) 307
+ 308: 130(ivec3) Load 289(u64v)
+ 309: 130(ivec3) ExtInst 1(GLSL.std.450) 41(UMax) 308 296
+ Store 289(u64v) 309
+ 310: 50(ivec2) Load 276(i64v)
+ 311: 14(int) Load 279(i64)
+ 312: 14(int) SNegate 311
+ 313: 14(int) Load 279(i64)
+ 314: 50(ivec2) CompositeConstruct 312 312
+ 315: 50(ivec2) CompositeConstruct 313 313
+ 316: 50(ivec2) ExtInst 1(GLSL.std.450) 45(SClamp) 310 314 315
+ Store 276(i64v) 316
+ 317: 50(ivec2) Load 276(i64v)
+ 318: 50(ivec2) Load 276(i64v)
+ 319: 50(ivec2) SNegate 318
+ 320: 50(ivec2) Load 276(i64v)
+ 321: 50(ivec2) ExtInst 1(GLSL.std.450) 45(SClamp) 317 319 320
+ Store 276(i64v) 321
+ 322: 130(ivec3) Load 289(u64v)
+ 323: 36(int) Load 291(u64)
+ 324: 36(int) SNegate 323
+ 325: 36(int) Load 291(u64)
+ 326: 130(ivec3) CompositeConstruct 324 324 324
+ 327: 130(ivec3) CompositeConstruct 325 325 325
+ 328: 130(ivec3) ExtInst 1(GLSL.std.450) 44(UClamp) 322 326 327
+ Store 289(u64v) 328
+ 329: 130(ivec3) Load 289(u64v)
+ 330: 130(ivec3) Load 289(u64v)
+ 331: 130(ivec3) SNegate 330
+ 332: 130(ivec3) Load 289(u64v)
+ 333: 130(ivec3) ExtInst 1(GLSL.std.450) 44(UClamp) 329 331 332
+ Store 289(u64v) 333
+ 334: 15(ptr) AccessChain 276(i64v) 217
+ 335: 14(int) Load 334
+ 336: 15(ptr) AccessChain 276(i64v) 200
+ 337: 14(int) Load 336
+ 339: 14(int) Select 338 337 335
+ Store 279(i64) 339
+ 340: 14(int) Load 279(i64)
+ 341: 50(ivec2) CompositeConstruct 340 340
+ 342: 14(int) Load 279(i64)
+ 343: 14(int) SNegate 342
+ 344: 50(ivec2) CompositeConstruct 343 343
+ 347: 50(ivec2) Select 346 344 341
+ Store 276(i64v) 347
+ 348: 37(ptr) AccessChain 289(u64v) 217
+ 349: 36(int) Load 348
+ 350: 37(ptr) AccessChain 289(u64v) 200
+ 351: 36(int) Load 350
+ 352: 36(int) Select 338 351 349
+ Store 291(u64) 352
+ 353: 36(int) Load 291(u64)
+ 354: 130(ivec3) CompositeConstruct 353 353 353
+ 355: 36(int) Load 291(u64)
+ 356: 36(int) SNegate 355
+ 357: 130(ivec3) CompositeConstruct 356 356 356
+ 360: 130(ivec3) Select 359 357 354
+ Store 289(u64v) 360
+ 364: 361(fvec3) Load 363(dv)
+ 365: 93(fvec2) VectorShuffle 364 364 0 1
+ 366: 50(ivec2) Bitcast 365
+ Store 276(i64v) 366
+ 368: 367(ptr) AccessChain 363(dv) 207
+ 369: 92(float) Load 368
+ 370: 36(int) Bitcast 369
+ 371: 37(ptr) AccessChain 289(u64v) 217
+ Store 371 370
+ 372: 50(ivec2) Load 276(i64v)
+ 373: 93(fvec2) Bitcast 372
+ 374: 361(fvec3) Load 363(dv)
+ 375: 361(fvec3) VectorShuffle 374 373 3 4 2
+ Store 363(dv) 375
+ 376: 130(ivec3) Load 289(u64v)
+ 377: 361(fvec3) Bitcast 376
+ Store 363(dv) 377
+ 381: 14(int) ExtInst 1(GLSL.std.450) 0(Unknown) 380
+ Store 279(i64) 381
+ 383: 14(int) Load 279(i64)
+ 384: 72(ivec2) ExtInst 1(GLSL.std.450) 0(Unknown) 383
+ Store 382(iv) 384
+ 386: 36(int) ExtInst 1(GLSL.std.450) 0(Unknown) 385
+ Store 291(u64) 386
+ 388: 36(int) Load 291(u64)
+ 389: 79(ivec2) ExtInst 1(GLSL.std.450) 0(Unknown) 388
+ Store 387(uv) 389
+ 392: 130(ivec3) Load 289(u64v)
+ 393: 36(int) Load 291(u64)
+ 394: 130(ivec3) CompositeConstruct 393 393 393
+ 395: 358(bvec3) ULessThan 392 394
+ Store 391(bv) 395
+ 396: 50(ivec2) Load 276(i64v)
+ 397: 14(int) Load 279(i64)
+ 398: 50(ivec2) CompositeConstruct 397 397
+ 399: 54(bvec2) SLessThan 396 398
+ 400: 358(bvec3) Load 391(bv)
+ 401: 358(bvec3) VectorShuffle 400 399 3 4 2
+ Store 391(bv) 401
+ 402: 130(ivec3) Load 289(u64v)
+ 403: 36(int) Load 291(u64)
+ 404: 130(ivec3) CompositeConstruct 403 403 403
+ 405: 358(bvec3) ULessThanEqual 402 404
+ Store 391(bv) 405
+ 406: 50(ivec2) Load 276(i64v)
+ 407: 14(int) Load 279(i64)
+ 408: 50(ivec2) CompositeConstruct 407 407
+ 409: 54(bvec2) SLessThanEqual 406 408
+ 410: 358(bvec3) Load 391(bv)
+ 411: 358(bvec3) VectorShuffle 410 409 3 4 2
+ Store 391(bv) 411
+ 412: 130(ivec3) Load 289(u64v)
+ 413: 36(int) Load 291(u64)
+ 414: 130(ivec3) CompositeConstruct 413 413 413
+ 415: 358(bvec3) UGreaterThan 412 414
+ Store 391(bv) 415
+ 416: 50(ivec2) Load 276(i64v)
+ 417: 14(int) Load 279(i64)
+ 418: 50(ivec2) CompositeConstruct 417 417
+ 419: 54(bvec2) SGreaterThan 416 418
+ 420: 358(bvec3) Load 391(bv)
+ 421: 358(bvec3) VectorShuffle 420 419 3 4 2
+ Store 391(bv) 421
+ 422: 130(ivec3) Load 289(u64v)
+ 423: 36(int) Load 291(u64)
+ 424: 130(ivec3) CompositeConstruct 423 423 423
+ 425: 358(bvec3) UGreaterThanEqual 422 424
+ Store 391(bv) 425
+ 426: 50(ivec2) Load 276(i64v)
+ 427: 14(int) Load 279(i64)
+ 428: 50(ivec2) CompositeConstruct 427 427
+ 429: 54(bvec2) SGreaterThanEqual 426 428
+ 430: 358(bvec3) Load 391(bv)
+ 431: 358(bvec3) VectorShuffle 430 429 3 4 2
+ Store 391(bv) 431
+ 432: 130(ivec3) Load 289(u64v)
+ 433: 36(int) Load 291(u64)
+ 434: 130(ivec3) CompositeConstruct 433 433 433
+ 435: 358(bvec3) IEqual 432 434
+ Store 391(bv) 435
+ 436: 50(ivec2) Load 276(i64v)
+ 437: 14(int) Load 279(i64)
+ 438: 50(ivec2) CompositeConstruct 437 437
+ 439: 54(bvec2) IEqual 436 438
+ 440: 358(bvec3) Load 391(bv)
+ 441: 358(bvec3) VectorShuffle 440 439 3 4 2
+ Store 391(bv) 441
+ 442: 130(ivec3) Load 289(u64v)
+ 443: 36(int) Load 291(u64)
+ 444: 130(ivec3) CompositeConstruct 443 443 443
+ 445: 358(bvec3) INotEqual 442 444
+ Store 391(bv) 445
+ 446: 50(ivec2) Load 276(i64v)
+ 447: 14(int) Load 279(i64)
+ 448: 50(ivec2) CompositeConstruct 447 447
+ 449: 54(bvec2) INotEqual 446 448
+ 450: 358(bvec3) Load 391(bv)
+ 451: 358(bvec3) VectorShuffle 450 449 3 4 2
+ Store 391(bv) 451
+ Return
+ FunctionEnd
diff --git a/chromium/third_party/glslang/src/Test/baseResults/spv.intOps.vert.out b/chromium/third_party/glslang/src/Test/baseResults/spv.intOps.vert.out
new file mode 100644
index 00000000000..926ab7c6ca3
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/spv.intOps.vert.out
@@ -0,0 +1,361 @@
+spv.intOps.vert
+Warning, version 310 is not yet complete; most version-specific features are present, but some are missing.
+
+
+Linked vertex stage:
+
+
+// Module Version 10000
+// Generated by (magic number): 80001
+// Id's are bound by 268
+
+ Capability Shader
+ 1: ExtInstImport "GLSL.std.450"
+ MemoryModel Logical GLSL450
+ EntryPoint Vertex 4 "main" 9 15 21 26 47 67 83 100 121 142 146 156 173 182 247
+ Source ESSL 310
+ Name 4 "main"
+ Name 9 "iout"
+ Name 15 "uout"
+ Name 21 "fout"
+ Name 26 "u2"
+ Name 30 "u2out"
+ Name 31 "ResType"
+ Name 47 "u1"
+ Name 51 "u1out"
+ Name 52 "ResType"
+ Name 67 "u4"
+ Name 71 "u4outHi"
+ Name 72 "u4outLow"
+ Name 73 "ResType"
+ Name 83 "i4"
+ Name 87 "i4outHi"
+ Name 88 "i4outLow"
+ Name 89 "ResType"
+ Name 100 "v3"
+ Name 104 "i3out"
+ Name 105 "ResType"
+ Name 121 "v1"
+ Name 124 "i1out"
+ Name 125 "ResType"
+ Name 142 "v2"
+ Name 146 "i2"
+ Name 156 "i1"
+ Name 173 "u3"
+ Name 182 "i3"
+ Name 247 "v4"
+ Decorate 210 RelaxedPrecision
+ Decorate 216 RelaxedPrecision
+ Decorate 223 RelaxedPrecision
+ Decorate 230 RelaxedPrecision
+ Decorate 234 RelaxedPrecision
+ Decorate 240 RelaxedPrecision
+ Decorate 261 RelaxedPrecision
+ Decorate 265 RelaxedPrecision
+ 2: TypeVoid
+ 3: TypeFunction 2
+ 6: TypeInt 32 1
+ 7: TypeVector 6(int) 4
+ 8: TypePointer Output 7(ivec4)
+ 9(iout): 8(ptr) Variable Output
+ 10: 6(int) Constant 0
+ 11: 7(ivec4) ConstantComposite 10 10 10 10
+ 12: TypeInt 32 0
+ 13: TypeVector 12(int) 4
+ 14: TypePointer Output 13(ivec4)
+ 15(uout): 14(ptr) Variable Output
+ 16: 12(int) Constant 0
+ 17: 13(ivec4) ConstantComposite 16 16 16 16
+ 18: TypeFloat 32
+ 19: TypeVector 18(float) 4
+ 20: TypePointer Output 19(fvec4)
+ 21(fout): 20(ptr) Variable Output
+ 22: 18(float) Constant 0
+ 23: 19(fvec4) ConstantComposite 22 22 22 22
+ 24: TypeVector 12(int) 2
+ 25: TypePointer Input 24(ivec2)
+ 26(u2): 25(ptr) Variable Input
+ 29: TypePointer Function 24(ivec2)
+ 31(ResType): TypeStruct 24(ivec2) 24(ivec2)
+ 46: TypePointer Input 12(int)
+ 47(u1): 46(ptr) Variable Input
+ 50: TypePointer Function 12(int)
+ 52(ResType): TypeStruct 12(int) 12(int)
+ 56: TypePointer Output 12(int)
+ 66: TypePointer Input 13(ivec4)
+ 67(u4): 66(ptr) Variable Input
+ 70: TypePointer Function 13(ivec4)
+ 73(ResType): TypeStruct 13(ivec4) 13(ivec4)
+ 82: TypePointer Input 7(ivec4)
+ 83(i4): 82(ptr) Variable Input
+ 86: TypePointer Function 7(ivec4)
+ 89(ResType): TypeStruct 7(ivec4) 7(ivec4)
+ 98: TypeVector 18(float) 3
+ 99: TypePointer Input 98(fvec3)
+ 100(v3): 99(ptr) Variable Input
+ 102: TypeVector 6(int) 3
+ 103: TypePointer Function 102(ivec3)
+ 105(ResType): TypeStruct 98(fvec3) 102(ivec3)
+ 120: TypePointer Input 18(float)
+ 121(v1): 120(ptr) Variable Input
+ 123: TypePointer Function 6(int)
+ 125(ResType): TypeStruct 18(float) 6(int)
+ 129: TypePointer Output 18(float)
+ 135: TypePointer Output 6(int)
+ 140: TypeVector 18(float) 2
+ 141: TypePointer Input 140(fvec2)
+ 142(v2): 141(ptr) Variable Input
+ 144: TypeVector 6(int) 2
+ 145: TypePointer Input 144(ivec2)
+ 146(i2): 145(ptr) Variable Input
+ 155: TypePointer Input 6(int)
+ 156(i1): 155(ptr) Variable Input
+ 164: 6(int) Constant 4
+ 165: 6(int) Constant 5
+ 171: TypeVector 12(int) 3
+ 172: TypePointer Input 171(ivec3)
+ 173(u3): 172(ptr) Variable Input
+ 181: TypePointer Input 102(ivec3)
+ 182(i3): 181(ptr) Variable Input
+ 246: TypePointer Input 19(fvec4)
+ 247(v4): 246(ptr) Variable Input
+ 4(main): 2 Function None 3
+ 5: Label
+ 30(u2out): 29(ptr) Variable Function
+ 51(u1out): 50(ptr) Variable Function
+ 71(u4outHi): 70(ptr) Variable Function
+ 72(u4outLow): 70(ptr) Variable Function
+ 87(i4outHi): 86(ptr) Variable Function
+ 88(i4outLow): 86(ptr) Variable Function
+ 104(i3out): 103(ptr) Variable Function
+ 124(i1out): 123(ptr) Variable Function
+ Store 9(iout) 11
+ Store 15(uout) 17
+ Store 21(fout) 23
+ 27: 24(ivec2) Load 26(u2)
+ 28: 24(ivec2) Load 26(u2)
+ 32: 31(ResType) IAddCarry 27 28
+ 33: 24(ivec2) CompositeExtract 32 1
+ Store 30(u2out) 33
+ 34: 24(ivec2) CompositeExtract 32 0
+ 35: 13(ivec4) Load 15(uout)
+ 36: 24(ivec2) VectorShuffle 35 35 0 1
+ 37: 24(ivec2) IAdd 36 34
+ 38: 13(ivec4) Load 15(uout)
+ 39: 13(ivec4) VectorShuffle 38 37 4 5 2 3
+ Store 15(uout) 39
+ 40: 24(ivec2) Load 30(u2out)
+ 41: 13(ivec4) Load 15(uout)
+ 42: 24(ivec2) VectorShuffle 41 41 0 1
+ 43: 24(ivec2) IAdd 42 40
+ 44: 13(ivec4) Load 15(uout)
+ 45: 13(ivec4) VectorShuffle 44 43 4 5 2 3
+ Store 15(uout) 45
+ 48: 12(int) Load 47(u1)
+ 49: 12(int) Load 47(u1)
+ 53: 52(ResType) ISubBorrow 48 49
+ 54: 12(int) CompositeExtract 53 1
+ Store 51(u1out) 54
+ 55: 12(int) CompositeExtract 53 0
+ 57: 56(ptr) AccessChain 15(uout) 16
+ 58: 12(int) Load 57
+ 59: 12(int) IAdd 58 55
+ 60: 56(ptr) AccessChain 15(uout) 16
+ Store 60 59
+ 61: 12(int) Load 51(u1out)
+ 62: 56(ptr) AccessChain 15(uout) 16
+ 63: 12(int) Load 62
+ 64: 12(int) IAdd 63 61
+ 65: 56(ptr) AccessChain 15(uout) 16
+ Store 65 64
+ 68: 13(ivec4) Load 67(u4)
+ 69: 13(ivec4) Load 67(u4)
+ 74: 73(ResType) UMulExtended 68 69
+ 75: 13(ivec4) CompositeExtract 74 0
+ Store 72(u4outLow) 75
+ 76: 13(ivec4) CompositeExtract 74 1
+ Store 71(u4outHi) 76
+ 77: 13(ivec4) Load 71(u4outHi)
+ 78: 13(ivec4) Load 72(u4outLow)
+ 79: 13(ivec4) IAdd 77 78
+ 80: 13(ivec4) Load 15(uout)
+ 81: 13(ivec4) IAdd 80 79
+ Store 15(uout) 81
+ 84: 7(ivec4) Load 83(i4)
+ 85: 7(ivec4) Load 83(i4)
+ 90: 89(ResType) SMulExtended 84 85
+ 91: 7(ivec4) CompositeExtract 90 0
+ Store 88(i4outLow) 91
+ 92: 7(ivec4) CompositeExtract 90 1
+ Store 87(i4outHi) 92
+ 93: 7(ivec4) Load 88(i4outLow)
+ 94: 7(ivec4) Load 87(i4outHi)
+ 95: 7(ivec4) IAdd 93 94
+ 96: 7(ivec4) Load 9(iout)
+ 97: 7(ivec4) IAdd 96 95
+ Store 9(iout) 97
+ 101: 98(fvec3) Load 100(v3)
+ 106:105(ResType) ExtInst 1(GLSL.std.450) 52(FrexpStruct) 101
+ 107: 102(ivec3) CompositeExtract 106 1
+ Store 104(i3out) 107
+ 108: 98(fvec3) CompositeExtract 106 0
+ 109: 19(fvec4) Load 21(fout)
+ 110: 98(fvec3) VectorShuffle 109 109 0 1 2
+ 111: 98(fvec3) FAdd 110 108
+ 112: 19(fvec4) Load 21(fout)
+ 113: 19(fvec4) VectorShuffle 112 111 4 5 6 3
+ Store 21(fout) 113
+ 114: 102(ivec3) Load 104(i3out)
+ 115: 7(ivec4) Load 9(iout)
+ 116: 102(ivec3) VectorShuffle 115 115 0 1 2
+ 117: 102(ivec3) IAdd 116 114
+ 118: 7(ivec4) Load 9(iout)
+ 119: 7(ivec4) VectorShuffle 118 117 4 5 6 3
+ Store 9(iout) 119
+ 122: 18(float) Load 121(v1)
+ 126:125(ResType) ExtInst 1(GLSL.std.450) 52(FrexpStruct) 122
+ 127: 6(int) CompositeExtract 126 1
+ Store 124(i1out) 127
+ 128: 18(float) CompositeExtract 126 0
+ 130: 129(ptr) AccessChain 21(fout) 16
+ 131: 18(float) Load 130
+ 132: 18(float) FAdd 131 128
+ 133: 129(ptr) AccessChain 21(fout) 16
+ Store 133 132
+ 134: 6(int) Load 124(i1out)
+ 136: 135(ptr) AccessChain 9(iout) 16
+ 137: 6(int) Load 136
+ 138: 6(int) IAdd 137 134
+ 139: 135(ptr) AccessChain 9(iout) 16
+ Store 139 138
+ 143: 140(fvec2) Load 142(v2)
+ 147: 144(ivec2) Load 146(i2)
+ 148: 140(fvec2) ExtInst 1(GLSL.std.450) 53(Ldexp) 143 147
+ 149: 19(fvec4) Load 21(fout)
+ 150: 140(fvec2) VectorShuffle 149 149 0 1
+ 151: 140(fvec2) FAdd 150 148
+ 152: 19(fvec4) Load 21(fout)
+ 153: 19(fvec4) VectorShuffle 152 151 4 5 2 3
+ Store 21(fout) 153
+ 154: 18(float) Load 121(v1)
+ 157: 6(int) Load 156(i1)
+ 158: 18(float) ExtInst 1(GLSL.std.450) 53(Ldexp) 154 157
+ 159: 129(ptr) AccessChain 21(fout) 16
+ 160: 18(float) Load 159
+ 161: 18(float) FAdd 160 158
+ 162: 129(ptr) AccessChain 21(fout) 16
+ Store 162 161
+ 163: 6(int) Load 156(i1)
+ 166: 6(int) BitFieldSExtract 163 164 165
+ 167: 135(ptr) AccessChain 9(iout) 16
+ 168: 6(int) Load 167
+ 169: 6(int) IAdd 168 166
+ 170: 135(ptr) AccessChain 9(iout) 16
+ Store 170 169
+ 174: 171(ivec3) Load 173(u3)
+ 175: 171(ivec3) BitFieldUExtract 174 164 165
+ 176: 13(ivec4) Load 15(uout)
+ 177: 171(ivec3) VectorShuffle 176 176 0 1 2
+ 178: 171(ivec3) IAdd 177 175
+ 179: 13(ivec4) Load 15(uout)
+ 180: 13(ivec4) VectorShuffle 179 178 4 5 6 3
+ Store 15(uout) 180
+ 183: 102(ivec3) Load 182(i3)
+ 184: 102(ivec3) Load 182(i3)
+ 185: 102(ivec3) BitFieldInsert 183 184 164 165
+ 186: 7(ivec4) Load 9(iout)
+ 187: 102(ivec3) VectorShuffle 186 186 0 1 2
+ 188: 102(ivec3) IAdd 187 185
+ 189: 7(ivec4) Load 9(iout)
+ 190: 7(ivec4) VectorShuffle 189 188 4 5 6 3
+ Store 9(iout) 190
+ 191: 12(int) Load 47(u1)
+ 192: 12(int) Load 47(u1)
+ 193: 12(int) BitFieldInsert 191 192 164 165
+ 194: 56(ptr) AccessChain 15(uout) 16
+ 195: 12(int) Load 194
+ 196: 12(int) IAdd 195 193
+ 197: 56(ptr) AccessChain 15(uout) 16
+ Store 197 196
+ 198: 144(ivec2) Load 146(i2)
+ 199: 144(ivec2) BitReverse 198
+ 200: 7(ivec4) Load 9(iout)
+ 201: 144(ivec2) VectorShuffle 200 200 0 1
+ 202: 144(ivec2) IAdd 201 199
+ 203: 7(ivec4) Load 9(iout)
+ 204: 7(ivec4) VectorShuffle 203 202 4 5 2 3
+ Store 9(iout) 204
+ 205: 13(ivec4) Load 67(u4)
+ 206: 13(ivec4) BitReverse 205
+ 207: 13(ivec4) Load 15(uout)
+ 208: 13(ivec4) IAdd 207 206
+ Store 15(uout) 208
+ 209: 6(int) Load 156(i1)
+ 210: 6(int) BitCount 209
+ 211: 135(ptr) AccessChain 9(iout) 16
+ 212: 6(int) Load 211
+ 213: 6(int) IAdd 212 210
+ 214: 135(ptr) AccessChain 9(iout) 16
+ Store 214 213
+ 215: 171(ivec3) Load 173(u3)
+ 216: 102(ivec3) BitCount 215
+ 217: 7(ivec4) Load 9(iout)
+ 218: 102(ivec3) VectorShuffle 217 217 0 1 2
+ 219: 102(ivec3) IAdd 218 216
+ 220: 7(ivec4) Load 9(iout)
+ 221: 7(ivec4) VectorShuffle 220 219 4 5 6 3
+ Store 9(iout) 221
+ 222: 144(ivec2) Load 146(i2)
+ 223: 144(ivec2) ExtInst 1(GLSL.std.450) 73(FindILsb) 222
+ 224: 7(ivec4) Load 9(iout)
+ 225: 144(ivec2) VectorShuffle 224 224 0 1
+ 226: 144(ivec2) IAdd 225 223
+ 227: 7(ivec4) Load 9(iout)
+ 228: 7(ivec4) VectorShuffle 227 226 4 5 2 3
+ Store 9(iout) 228
+ 229: 13(ivec4) Load 67(u4)
+ 230: 7(ivec4) ExtInst 1(GLSL.std.450) 73(FindILsb) 229
+ 231: 7(ivec4) Load 9(iout)
+ 232: 7(ivec4) IAdd 231 230
+ Store 9(iout) 232
+ 233: 6(int) Load 156(i1)
+ 234: 6(int) ExtInst 1(GLSL.std.450) 74(FindSMsb) 233
+ 235: 135(ptr) AccessChain 9(iout) 16
+ 236: 6(int) Load 235
+ 237: 6(int) IAdd 236 234
+ 238: 135(ptr) AccessChain 9(iout) 16
+ Store 238 237
+ 239: 24(ivec2) Load 26(u2)
+ 240: 144(ivec2) ExtInst 1(GLSL.std.450) 75(FindUMsb) 239
+ 241: 7(ivec4) Load 9(iout)
+ 242: 144(ivec2) VectorShuffle 241 241 0 1
+ 243: 144(ivec2) IAdd 242 240
+ 244: 7(ivec4) Load 9(iout)
+ 245: 7(ivec4) VectorShuffle 244 243 4 5 2 3
+ Store 9(iout) 245
+ 248: 19(fvec4) Load 247(v4)
+ 249: 12(int) ExtInst 1(GLSL.std.450) 55(PackUnorm4x8) 248
+ 250: 56(ptr) AccessChain 15(uout) 16
+ 251: 12(int) Load 250
+ 252: 12(int) IAdd 251 249
+ 253: 56(ptr) AccessChain 15(uout) 16
+ Store 253 252
+ 254: 19(fvec4) Load 247(v4)
+ 255: 12(int) ExtInst 1(GLSL.std.450) 54(PackSnorm4x8) 254
+ 256: 56(ptr) AccessChain 15(uout) 16
+ 257: 12(int) Load 256
+ 258: 12(int) IAdd 257 255
+ 259: 56(ptr) AccessChain 15(uout) 16
+ Store 259 258
+ 260: 12(int) Load 47(u1)
+ 261: 19(fvec4) ExtInst 1(GLSL.std.450) 64(UnpackUnorm4x8) 260
+ 262: 19(fvec4) Load 21(fout)
+ 263: 19(fvec4) FAdd 262 261
+ Store 21(fout) 263
+ 264: 12(int) Load 47(u1)
+ 265: 19(fvec4) ExtInst 1(GLSL.std.450) 63(UnpackSnorm4x8) 264
+ 266: 19(fvec4) Load 21(fout)
+ 267: 19(fvec4) FAdd 266 265
+ Store 21(fout) 267
+ Return
+ FunctionEnd
diff --git a/chromium/third_party/glslang/src/Test/baseResults/spv.interpOps.frag.out b/chromium/third_party/glslang/src/Test/baseResults/spv.interpOps.frag.out
new file mode 100644
index 00000000000..a5076421ba9
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/spv.interpOps.frag.out
@@ -0,0 +1,143 @@
+spv.interpOps.frag
+Warning, version 450 is not yet complete; most version-specific features are present, but some are missing.
+
+
+Linked fragment stage:
+
+
+// Module Version 10000
+// Generated by (magic number): 80001
+// Id's are bound by 100
+
+ Capability Shader
+ Capability InterpolationFunction
+ 1: ExtInstImport "GLSL.std.450"
+ MemoryModel Logical GLSL450
+ EntryPoint Fragment 4 "main" 13 24 33 41 47 72 98
+ ExecutionMode 4 OriginUpperLeft
+ Source GLSL 450
+ Name 4 "main"
+ Name 9 "f4"
+ Name 13 "if1"
+ Name 24 "if2"
+ Name 33 "if3"
+ Name 41 "if4"
+ Name 47 "samp"
+ Name 72 "offset"
+ Name 98 "fragColor"
+ Decorate 47(samp) Flat
+ Decorate 72(offset) Flat
+ 2: TypeVoid
+ 3: TypeFunction 2
+ 6: TypeFloat 32
+ 7: TypeVector 6(float) 4
+ 8: TypePointer Function 7(fvec4)
+ 10: 6(float) Constant 0
+ 11: 7(fvec4) ConstantComposite 10 10 10 10
+ 12: TypePointer Input 6(float)
+ 13(if1): 12(ptr) Variable Input
+ 15: TypeInt 32 0
+ 16: 15(int) Constant 0
+ 17: TypePointer Function 6(float)
+ 22: TypeVector 6(float) 2
+ 23: TypePointer Input 22(fvec2)
+ 24(if2): 23(ptr) Variable Input
+ 31: TypeVector 6(float) 3
+ 32: TypePointer Input 31(fvec3)
+ 33(if3): 32(ptr) Variable Input
+ 40: TypePointer Input 7(fvec4)
+ 41(if4): 40(ptr) Variable Input
+ 45: TypeInt 32 1
+ 46: TypePointer Input 45(int)
+ 47(samp): 46(ptr) Variable Input
+ 72(offset): 23(ptr) Variable Input
+ 97: TypePointer Output 7(fvec4)
+ 98(fragColor): 97(ptr) Variable Output
+ 4(main): 2 Function None 3
+ 5: Label
+ 9(f4): 8(ptr) Variable Function
+ Store 9(f4) 11
+ 14: 6(float) ExtInst 1(GLSL.std.450) 76(InterpolateAtCentroid) 13(if1)
+ 18: 17(ptr) AccessChain 9(f4) 16
+ 19: 6(float) Load 18
+ 20: 6(float) FAdd 19 14
+ 21: 17(ptr) AccessChain 9(f4) 16
+ Store 21 20
+ 25: 22(fvec2) ExtInst 1(GLSL.std.450) 76(InterpolateAtCentroid) 24(if2)
+ 26: 7(fvec4) Load 9(f4)
+ 27: 22(fvec2) VectorShuffle 26 26 0 1
+ 28: 22(fvec2) FAdd 27 25
+ 29: 7(fvec4) Load 9(f4)
+ 30: 7(fvec4) VectorShuffle 29 28 4 5 2 3
+ Store 9(f4) 30
+ 34: 31(fvec3) ExtInst 1(GLSL.std.450) 76(InterpolateAtCentroid) 33(if3)
+ 35: 7(fvec4) Load 9(f4)
+ 36: 31(fvec3) VectorShuffle 35 35 0 1 2
+ 37: 31(fvec3) FAdd 36 34
+ 38: 7(fvec4) Load 9(f4)
+ 39: 7(fvec4) VectorShuffle 38 37 4 5 6 3
+ Store 9(f4) 39
+ 42: 7(fvec4) ExtInst 1(GLSL.std.450) 76(InterpolateAtCentroid) 41(if4)
+ 43: 7(fvec4) Load 9(f4)
+ 44: 7(fvec4) FAdd 43 42
+ Store 9(f4) 44
+ 48: 45(int) Load 47(samp)
+ 49: 6(float) ExtInst 1(GLSL.std.450) 77(InterpolateAtSample) 13(if1) 48
+ 50: 17(ptr) AccessChain 9(f4) 16
+ 51: 6(float) Load 50
+ 52: 6(float) FAdd 51 49
+ 53: 17(ptr) AccessChain 9(f4) 16
+ Store 53 52
+ 54: 45(int) Load 47(samp)
+ 55: 22(fvec2) ExtInst 1(GLSL.std.450) 77(InterpolateAtSample) 24(if2) 54
+ 56: 7(fvec4) Load 9(f4)
+ 57: 22(fvec2) VectorShuffle 56 56 0 1
+ 58: 22(fvec2) FAdd 57 55
+ 59: 7(fvec4) Load 9(f4)
+ 60: 7(fvec4) VectorShuffle 59 58 4 5 2 3
+ Store 9(f4) 60
+ 61: 45(int) Load 47(samp)
+ 62: 31(fvec3) ExtInst 1(GLSL.std.450) 77(InterpolateAtSample) 33(if3) 61
+ 63: 7(fvec4) Load 9(f4)
+ 64: 31(fvec3) VectorShuffle 63 63 0 1 2
+ 65: 31(fvec3) FAdd 64 62
+ 66: 7(fvec4) Load 9(f4)
+ 67: 7(fvec4) VectorShuffle 66 65 4 5 6 3
+ Store 9(f4) 67
+ 68: 45(int) Load 47(samp)
+ 69: 7(fvec4) ExtInst 1(GLSL.std.450) 77(InterpolateAtSample) 41(if4) 68
+ 70: 7(fvec4) Load 9(f4)
+ 71: 7(fvec4) FAdd 70 69
+ Store 9(f4) 71
+ 73: 22(fvec2) Load 72(offset)
+ 74: 6(float) ExtInst 1(GLSL.std.450) 78(InterpolateAtOffset) 13(if1) 73
+ 75: 17(ptr) AccessChain 9(f4) 16
+ 76: 6(float) Load 75
+ 77: 6(float) FAdd 76 74
+ 78: 17(ptr) AccessChain 9(f4) 16
+ Store 78 77
+ 79: 22(fvec2) Load 72(offset)
+ 80: 22(fvec2) ExtInst 1(GLSL.std.450) 78(InterpolateAtOffset) 24(if2) 79
+ 81: 7(fvec4) Load 9(f4)
+ 82: 22(fvec2) VectorShuffle 81 81 0 1
+ 83: 22(fvec2) FAdd 82 80
+ 84: 7(fvec4) Load 9(f4)
+ 85: 7(fvec4) VectorShuffle 84 83 4 5 2 3
+ Store 9(f4) 85
+ 86: 22(fvec2) Load 72(offset)
+ 87: 31(fvec3) ExtInst 1(GLSL.std.450) 78(InterpolateAtOffset) 33(if3) 86
+ 88: 7(fvec4) Load 9(f4)
+ 89: 31(fvec3) VectorShuffle 88 88 0 1 2
+ 90: 31(fvec3) FAdd 89 87
+ 91: 7(fvec4) Load 9(f4)
+ 92: 7(fvec4) VectorShuffle 91 90 4 5 6 3
+ Store 9(f4) 92
+ 93: 22(fvec2) Load 72(offset)
+ 94: 7(fvec4) ExtInst 1(GLSL.std.450) 78(InterpolateAtOffset) 41(if4) 93
+ 95: 7(fvec4) Load 9(f4)
+ 96: 7(fvec4) FAdd 95 94
+ Store 9(f4) 96
+ 99: 7(fvec4) Load 9(f4)
+ Store 98(fragColor) 99
+ Return
+ FunctionEnd
diff --git a/chromium/third_party/glslang/src/Test/baseResults/spv.layoutNested.vert.out b/chromium/third_party/glslang/src/Test/baseResults/spv.layoutNested.vert.out
new file mode 100644
index 00000000000..4f3d67c146c
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/spv.layoutNested.vert.out
@@ -0,0 +1,242 @@
+spv.layoutNested.vert
+Warning, version 450 is not yet complete; most version-specific features are present, but some are missing.
+
+
+Linked vertex stage:
+
+
+// Module Version 10000
+// Generated by (magic number): 80001
+// Id's are bound by 67
+
+ Capability Shader
+ 1: ExtInstImport "GLSL.std.450"
+ MemoryModel Logical GLSL450
+ EntryPoint Vertex 4 "main" 63 66
+ Source GLSL 450
+ Name 4 "main"
+ Name 14 "S"
+ MemberName 14(S) 0 "a"
+ MemberName 14(S) 1 "b"
+ MemberName 14(S) 2 "c"
+ Name 19 "Block140"
+ MemberName 19(Block140) 0 "u"
+ MemberName 19(Block140) 1 "s"
+ MemberName 19(Block140) 2 "v"
+ Name 21 "inst140"
+ Name 23 "S"
+ MemberName 23(S) 0 "a"
+ MemberName 23(S) 1 "b"
+ MemberName 23(S) 2 "c"
+ Name 26 "Block430"
+ MemberName 26(Block430) 0 "u"
+ MemberName 26(Block430) 1 "s"
+ MemberName 26(Block430) 2 "v"
+ Name 28 "inst430"
+ Name 29 "S"
+ MemberName 29(S) 0 "a"
+ MemberName 29(S) 1 "b"
+ MemberName 29(S) 2 "c"
+ Name 31 "s"
+ Name 32 "T"
+ MemberName 32(T) 0 "m"
+ MemberName 32(T) 1 "a"
+ Name 34 "t"
+ Name 35 "T"
+ MemberName 35(T) 0 "m"
+ MemberName 35(T) 1 "a"
+ Name 36 "Nestor"
+ MemberName 36(Nestor) 0 "nestorT"
+ Name 37 "Bt1"
+ MemberName 37(Bt1) 0 "nt"
+ Name 39 "Btn1"
+ Name 40 "T"
+ MemberName 40(T) 0 "m"
+ MemberName 40(T) 1 "a"
+ Name 41 "Nestor"
+ MemberName 41(Nestor) 0 "nestorT"
+ Name 42 "Bt2"
+ MemberName 42(Bt2) 0 "nt"
+ Name 44 "Btn2"
+ Name 45 "Bt3"
+ MemberName 45(Bt3) 0 "ntcol"
+ MemberName 45(Bt3) 1 "ntrow"
+ Name 47 "Btn3"
+ Name 48 "T"
+ MemberName 48(T) 0 "m"
+ MemberName 48(T) 1 "a"
+ Name 49 "Nestor"
+ MemberName 49(Nestor) 0 "nestorT"
+ Name 50 "bBt1"
+ MemberName 50(bBt1) 0 "nt"
+ Name 52 "bBtn1"
+ Name 53 "T"
+ MemberName 53(T) 0 "m"
+ MemberName 53(T) 1 "a"
+ Name 54 "Nestor"
+ MemberName 54(Nestor) 0 "nestorT"
+ Name 55 "bBt2"
+ MemberName 55(bBt2) 0 "nt"
+ Name 57 "bBtn2"
+ Name 58 "bBt3"
+ MemberName 58(bBt3) 0 "ntcol"
+ MemberName 58(bBt3) 1 "ntrow"
+ Name 60 "bBtn3"
+ Name 61 "S"
+ MemberName 61(S) 0 "a"
+ MemberName 61(S) 1 "b"
+ MemberName 61(S) 2 "c"
+ Name 63 "sout"
+ Name 64 "S"
+ MemberName 64(S) 0 "a"
+ MemberName 64(S) 1 "b"
+ MemberName 64(S) 2 "c"
+ Name 66 "soutinv"
+ Decorate 13 ArrayStride 32
+ MemberDecorate 14(S) 0 Offset 0
+ MemberDecorate 14(S) 1 ColMajor
+ MemberDecorate 14(S) 1 Offset 16
+ MemberDecorate 14(S) 1 MatrixStride 16
+ MemberDecorate 14(S) 2 Offset 144
+ Decorate 16 ArrayStride 160
+ Decorate 18 ArrayStride 480
+ MemberDecorate 19(Block140) 0 Offset 0
+ MemberDecorate 19(Block140) 1 Offset 16
+ MemberDecorate 19(Block140) 2 Offset 976
+ Decorate 19(Block140) Block
+ Decorate 21(inst140) DescriptorSet 0
+ Decorate 21(inst140) Binding 0
+ Decorate 22 ArrayStride 16
+ MemberDecorate 23(S) 0 Offset 0
+ MemberDecorate 23(S) 1 ColMajor
+ MemberDecorate 23(S) 1 Offset 16
+ MemberDecorate 23(S) 1 MatrixStride 8
+ MemberDecorate 23(S) 2 Offset 80
+ Decorate 24 ArrayStride 96
+ Decorate 25 ArrayStride 288
+ MemberDecorate 26(Block430) 0 Offset 0
+ MemberDecorate 26(Block430) 1 Offset 16
+ MemberDecorate 26(Block430) 2 Offset 592
+ Decorate 26(Block430) BufferBlock
+ Decorate 28(inst430) DescriptorSet 0
+ Decorate 28(inst430) Binding 1
+ MemberDecorate 35(T) 0 RowMajor
+ MemberDecorate 35(T) 0 Offset 0
+ MemberDecorate 35(T) 0 MatrixStride 16
+ MemberDecorate 35(T) 1 Offset 32
+ MemberDecorate 36(Nestor) 0 Offset 0
+ MemberDecorate 37(Bt1) 0 Offset 0
+ Decorate 37(Bt1) Block
+ Decorate 39(Btn1) DescriptorSet 1
+ Decorate 39(Btn1) Binding 0
+ MemberDecorate 40(T) 0 ColMajor
+ MemberDecorate 40(T) 0 Offset 0
+ MemberDecorate 40(T) 0 MatrixStride 16
+ MemberDecorate 40(T) 1 Offset 32
+ MemberDecorate 41(Nestor) 0 Offset 0
+ MemberDecorate 42(Bt2) 0 Offset 0
+ Decorate 42(Bt2) Block
+ Decorate 44(Btn2) DescriptorSet 1
+ Decorate 44(Btn2) Binding 0
+ MemberDecorate 45(Bt3) 0 Offset 0
+ MemberDecorate 45(Bt3) 1 Offset 48
+ Decorate 45(Bt3) Block
+ Decorate 47(Btn3) DescriptorSet 1
+ Decorate 47(Btn3) Binding 0
+ MemberDecorate 48(T) 0 RowMajor
+ MemberDecorate 48(T) 0 Offset 0
+ MemberDecorate 48(T) 0 MatrixStride 8
+ MemberDecorate 48(T) 1 Offset 16
+ MemberDecorate 49(Nestor) 0 Offset 0
+ MemberDecorate 50(bBt1) 0 Offset 0
+ Decorate 50(bBt1) BufferBlock
+ Decorate 52(bBtn1) DescriptorSet 1
+ Decorate 52(bBtn1) Binding 0
+ MemberDecorate 53(T) 0 ColMajor
+ MemberDecorate 53(T) 0 Offset 0
+ MemberDecorate 53(T) 0 MatrixStride 8
+ MemberDecorate 53(T) 1 Offset 16
+ MemberDecorate 54(Nestor) 0 Offset 0
+ MemberDecorate 55(bBt2) 0 Offset 0
+ Decorate 55(bBt2) BufferBlock
+ Decorate 57(bBtn2) DescriptorSet 1
+ Decorate 57(bBtn2) Binding 0
+ MemberDecorate 58(bBt3) 0 Offset 0
+ MemberDecorate 58(bBt3) 1 Offset 24
+ Decorate 58(bBt3) BufferBlock
+ Decorate 60(bBtn3) DescriptorSet 1
+ Decorate 60(bBtn3) Binding 0
+ MemberDecorate 61(S) 0 Flat
+ MemberDecorate 61(S) 1 Flat
+ MemberDecorate 61(S) 2 Flat
+ MemberDecorate 64(S) 0 Invariant
+ MemberDecorate 64(S) 1 Invariant
+ MemberDecorate 64(S) 2 Invariant
+ Decorate 66(soutinv) Invariant
+ 2: TypeVoid
+ 3: TypeFunction 2
+ 6: TypeInt 32 1
+ 7: TypeInt 32 0
+ 8: TypeVector 7(int) 3
+ 9: TypeFloat 32
+ 10: TypeVector 9(float) 2
+ 11: TypeMatrix 10(fvec2) 2
+ 12: 7(int) Constant 4
+ 13: TypeArray 11 12
+ 14(S): TypeStruct 8(ivec3) 13 7(int)
+ 15: 7(int) Constant 3
+ 16: TypeArray 14(S) 15
+ 17: 7(int) Constant 2
+ 18: TypeArray 16 17
+ 19(Block140): TypeStruct 6(int) 18 10(fvec2)
+ 20: TypePointer Uniform 19(Block140)
+ 21(inst140): 20(ptr) Variable Uniform
+ 22: TypeArray 11 12
+ 23(S): TypeStruct 8(ivec3) 22 7(int)
+ 24: TypeArray 23(S) 15
+ 25: TypeArray 24 17
+ 26(Block430): TypeStruct 6(int) 25 10(fvec2)
+ 27: TypePointer Uniform 26(Block430)
+ 28(inst430): 27(ptr) Variable Uniform
+ 29(S): TypeStruct 8(ivec3) 13 7(int)
+ 30: TypePointer Private 29(S)
+ 31(s): 30(ptr) Variable Private
+ 32(T): TypeStruct 11 6(int)
+ 33: TypePointer Private 32(T)
+ 34(t): 33(ptr) Variable Private
+ 35(T): TypeStruct 11 6(int)
+ 36(Nestor): TypeStruct 35(T)
+ 37(Bt1): TypeStruct 36(Nestor)
+ 38: TypePointer Uniform 37(Bt1)
+ 39(Btn1): 38(ptr) Variable Uniform
+ 40(T): TypeStruct 11 6(int)
+ 41(Nestor): TypeStruct 40(T)
+ 42(Bt2): TypeStruct 41(Nestor)
+ 43: TypePointer Uniform 42(Bt2)
+ 44(Btn2): 43(ptr) Variable Uniform
+ 45(Bt3): TypeStruct 41(Nestor) 36(Nestor)
+ 46: TypePointer Uniform 45(Bt3)
+ 47(Btn3): 46(ptr) Variable Uniform
+ 48(T): TypeStruct 11 6(int)
+ 49(Nestor): TypeStruct 48(T)
+ 50(bBt1): TypeStruct 49(Nestor)
+ 51: TypePointer Uniform 50(bBt1)
+ 52(bBtn1): 51(ptr) Variable Uniform
+ 53(T): TypeStruct 11 6(int)
+ 54(Nestor): TypeStruct 53(T)
+ 55(bBt2): TypeStruct 54(Nestor)
+ 56: TypePointer Uniform 55(bBt2)
+ 57(bBtn2): 56(ptr) Variable Uniform
+ 58(bBt3): TypeStruct 49(Nestor) 54(Nestor)
+ 59: TypePointer Uniform 58(bBt3)
+ 60(bBtn3): 59(ptr) Variable Uniform
+ 61(S): TypeStruct 8(ivec3) 13 7(int)
+ 62: TypePointer Output 61(S)
+ 63(sout): 62(ptr) Variable Output
+ 64(S): TypeStruct 8(ivec3) 13 7(int)
+ 65: TypePointer Output 64(S)
+ 66(soutinv): 65(ptr) Variable Output
+ 4(main): 2 Function None 3
+ 5: Label
+ Return
+ FunctionEnd
diff --git a/chromium/third_party/glslang/src/Test/baseResults/spv.length.frag.out b/chromium/third_party/glslang/src/Test/baseResults/spv.length.frag.out
new file mode 100755
index 00000000000..81f98a61c2b
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/spv.length.frag.out
@@ -0,0 +1,55 @@
+spv.length.frag
+
+Linked fragment stage:
+
+
+// Module Version 10000
+// Generated by (magic number): 80001
+// Id's are bound by 33
+
+ Capability Shader
+ 1: ExtInstImport "GLSL.std.450"
+ MemoryModel Logical GLSL450
+ EntryPoint Fragment 4 "main" 14 26
+ ExecutionMode 4 OriginUpperLeft
+ Source GLSL 140
+ Name 4 "main"
+ Name 9 "t"
+ Name 14 "v"
+ Name 26 "gl_FragColor"
+ Name 32 "u"
+ 2: TypeVoid
+ 3: TypeFunction 2
+ 6: TypeFloat 32
+ 7: TypeVector 6(float) 2
+ 8: TypePointer Function 7(fvec2)
+ 10: TypeInt 32 0
+ 11: 10(int) Constant 2
+ 12: TypeArray 7(fvec2) 11
+ 13: TypePointer Input 12
+ 14(v): 13(ptr) Variable Input
+ 15: TypeInt 32 1
+ 16: 15(int) Constant 0
+ 17: TypePointer Input 7(fvec2)
+ 20: 15(int) Constant 1
+ 24: TypeVector 6(float) 4
+ 25: TypePointer Output 24(fvec4)
+26(gl_FragColor): 25(ptr) Variable Output
+ 27: 6(float) Constant 1106247680
+ 28: 24(fvec4) ConstantComposite 27 27 27 27
+ 29: 10(int) Constant 3
+ 30: TypeArray 24(fvec4) 29
+ 31: TypePointer Private 30
+ 32(u): 31(ptr) Variable Private
+ 4(main): 2 Function None 3
+ 5: Label
+ 9(t): 8(ptr) Variable Function
+ 18: 17(ptr) AccessChain 14(v) 16
+ 19: 7(fvec2) Load 18
+ 21: 17(ptr) AccessChain 14(v) 20
+ 22: 7(fvec2) Load 21
+ 23: 7(fvec2) FAdd 19 22
+ Store 9(t) 23
+ Store 26(gl_FragColor) 28
+ Return
+ FunctionEnd
diff --git a/chromium/third_party/glslang/src/Test/baseResults/spv.localAggregates.frag.out b/chromium/third_party/glslang/src/Test/baseResults/spv.localAggregates.frag.out
new file mode 100755
index 00000000000..cd8afedca0d
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/spv.localAggregates.frag.out
@@ -0,0 +1,256 @@
+spv.localAggregates.frag
+Warning, version 400 is not yet complete; most version-specific features are present, but some are missing.
+
+
+Linked fragment stage:
+
+
+// Module Version 10000
+// Generated by (magic number): 80001
+// Id's are bound by 143
+
+ Capability Shader
+ 1: ExtInstImport "GLSL.std.450"
+ MemoryModel Logical GLSL450
+ EntryPoint Fragment 4 "main" 18 43 93 101 111 138 142
+ ExecutionMode 4 OriginUpperLeft
+ Source GLSL 400
+ Name 4 "main"
+ Name 8 "s1"
+ MemberName 8(s1) 0 "i"
+ MemberName 8(s1) 1 "f"
+ Name 10 "s2"
+ MemberName 10(s2) 0 "i"
+ MemberName 10(s2) 1 "f"
+ MemberName 10(s2) 2 "s1_1"
+ MemberName 10(s2) 3 "bleh"
+ Name 12 "locals2"
+ Name 13 "s1"
+ MemberName 13(s1) 0 "i"
+ MemberName 13(s1) 1 "f"
+ Name 14 "s2"
+ MemberName 14(s2) 0 "i"
+ MemberName 14(s2) 1 "f"
+ MemberName 14(s2) 2 "s1_1"
+ MemberName 14(s2) 3 "bleh"
+ Name 15 "s1"
+ MemberName 15(s1) 0 "i"
+ MemberName 15(s1) 1 "f"
+ Name 16 "s3"
+ MemberName 16(s3) 0 "s2_1"
+ MemberName 16(s3) 1 "i"
+ MemberName 16(s3) 2 "f"
+ MemberName 16(s3) 3 "s1_1"
+ Name 18 "foo3"
+ Name 39 "localFArray"
+ Name 43 "coord"
+ Name 52 "localIArray"
+ Name 71 "x"
+ Name 73 "localArray"
+ Name 78 "i"
+ Name 87 "a"
+ Name 93 "condition"
+ Name 101 "color"
+ Name 111 "gl_FragColor"
+ Name 131 "samp2D"
+ Name 136 "s1"
+ MemberName 136(s1) 0 "i"
+ MemberName 136(s1) 1 "f"
+ Name 138 "foo"
+ Name 139 "s1"
+ MemberName 139(s1) 0 "i"
+ MemberName 139(s1) 1 "f"
+ Name 140 "s2"
+ MemberName 140(s2) 0 "i"
+ MemberName 140(s2) 1 "f"
+ MemberName 140(s2) 2 "s1_1"
+ MemberName 140(s2) 3 "bleh"
+ Name 142 "foo2"
+ MemberDecorate 16(s3) 0 Flat
+ MemberDecorate 16(s3) 1 Flat
+ MemberDecorate 16(s3) 2 Flat
+ MemberDecorate 16(s3) 3 Flat
+ Decorate 93(condition) Flat
+ Decorate 131(samp2D) DescriptorSet 0
+ MemberDecorate 136(s1) 0 Flat
+ MemberDecorate 136(s1) 1 Flat
+ MemberDecorate 140(s2) 0 Flat
+ MemberDecorate 140(s2) 1 Flat
+ MemberDecorate 140(s2) 2 Flat
+ MemberDecorate 140(s2) 3 Flat
+ 2: TypeVoid
+ 3: TypeFunction 2
+ 6: TypeInt 32 1
+ 7: TypeFloat 32
+ 8(s1): TypeStruct 6(int) 7(float)
+ 9: TypeVector 7(float) 4
+ 10(s2): TypeStruct 6(int) 7(float) 8(s1) 9(fvec4)
+ 11: TypePointer Function 10(s2)
+ 13(s1): TypeStruct 6(int) 7(float)
+ 14(s2): TypeStruct 6(int) 7(float) 13(s1) 9(fvec4)
+ 15(s1): TypeStruct 6(int) 7(float)
+ 16(s3): TypeStruct 14(s2) 6(int) 7(float) 15(s1)
+ 17: TypePointer Input 16(s3)
+ 18(foo3): 17(ptr) Variable Input
+ 19: 6(int) Constant 0
+ 20: TypePointer Input 14(s2)
+ 23: TypePointer Input 6(int)
+ 26: TypeBool
+ 30: 6(int) Constant 2
+ 31: 6(int) Constant 1
+ 32: 7(float) Constant 1065353216
+ 33: TypePointer Function 7(float)
+ 35: TypeInt 32 0
+ 36: 35(int) Constant 16
+ 37: TypeArray 7(float) 36
+ 38: TypePointer Function 37
+ 40: 6(int) Constant 4
+ 41: TypeVector 7(float) 2
+ 42: TypePointer Input 41(fvec2)
+ 43(coord): 42(ptr) Variable Input
+ 44: 35(int) Constant 0
+ 45: TypePointer Input 7(float)
+ 49: 35(int) Constant 8
+ 50: TypeArray 6(int) 49
+ 51: TypePointer Function 50
+ 55: TypePointer Function 6(int)
+ 72: 6(int) Constant 5
+ 85: 6(int) Constant 16
+ 89: 7(float) Constant 0
+ 93(condition): 23(ptr) Variable Input
+ 99: 6(int) Constant 3
+ 100: TypePointer Input 9(fvec4)
+ 101(color): 100(ptr) Variable Input
+ 103: TypePointer Function 9(fvec4)
+ 105: 35(int) Constant 1
+ 108: 35(int) Constant 2
+ 110: TypePointer Output 9(fvec4)
+111(gl_FragColor): 110(ptr) Variable Output
+ 128: TypeImage 7(float) 2D sampled format:Unknown
+ 129: TypeSampledImage 128
+ 130: TypePointer UniformConstant 129
+ 131(samp2D): 130(ptr) Variable UniformConstant
+ 136(s1): TypeStruct 6(int) 7(float)
+ 137: TypePointer Input 136(s1)
+ 138(foo): 137(ptr) Variable Input
+ 139(s1): TypeStruct 6(int) 7(float)
+ 140(s2): TypeStruct 6(int) 7(float) 139(s1) 9(fvec4)
+ 141: TypePointer Input 140(s2)
+ 142(foo2): 141(ptr) Variable Input
+ 4(main): 2 Function None 3
+ 5: Label
+ 12(locals2): 11(ptr) Variable Function
+ 39(localFArray): 38(ptr) Variable Function
+ 52(localIArray): 51(ptr) Variable Function
+ 71(x): 55(ptr) Variable Function
+ 73(localArray): 38(ptr) Variable Function
+ 78(i): 55(ptr) Variable Function
+ 87(a): 38(ptr) Variable Function
+ 21: 20(ptr) AccessChain 18(foo3) 19
+ 22: 14(s2) Load 21
+ Store 12(locals2) 22
+ 24: 23(ptr) AccessChain 18(foo3) 19 19
+ 25: 6(int) Load 24
+ 27: 26(bool) SGreaterThan 25 19
+ SelectionMerge 29 None
+ BranchConditional 27 28 57
+ 28: Label
+ 34: 33(ptr) AccessChain 12(locals2) 30 31
+ Store 34 32
+ 46: 45(ptr) AccessChain 43(coord) 44
+ 47: 7(float) Load 46
+ 48: 33(ptr) AccessChain 39(localFArray) 40
+ Store 48 47
+ 53: 23(ptr) AccessChain 18(foo3) 19 19
+ 54: 6(int) Load 53
+ 56: 55(ptr) AccessChain 52(localIArray) 30
+ Store 56 54
+ Branch 29
+ 57: Label
+ 58: 45(ptr) AccessChain 43(coord) 44
+ 59: 7(float) Load 58
+ 60: 33(ptr) AccessChain 12(locals2) 30 31
+ Store 60 59
+ 61: 33(ptr) AccessChain 39(localFArray) 40
+ Store 61 32
+ 62: 55(ptr) AccessChain 52(localIArray) 30
+ Store 62 19
+ Branch 29
+ 29: Label
+ 63: 55(ptr) AccessChain 52(localIArray) 30
+ 64: 6(int) Load 63
+ 65: 26(bool) IEqual 64 19
+ SelectionMerge 67 None
+ BranchConditional 65 66 67
+ 66: Label
+ 68: 33(ptr) AccessChain 39(localFArray) 40
+ 69: 7(float) Load 68
+ 70: 7(float) FAdd 69 32
+ Store 68 70
+ Branch 67
+ 67: Label
+ Store 71(x) 72
+ 74: 6(int) Load 71(x)
+ 75: 45(ptr) AccessChain 43(coord) 44
+ 76: 7(float) Load 75
+ 77: 33(ptr) AccessChain 73(localArray) 74
+ Store 77 76
+ Store 78(i) 19
+ Branch 79
+ 79: Label
+ LoopMerge 81 82 None
+ Branch 83
+ 83: Label
+ 84: 6(int) Load 78(i)
+ 86: 26(bool) SLessThan 84 85
+ BranchConditional 86 80 81
+ 80: Label
+ 88: 6(int) Load 78(i)
+ 90: 33(ptr) AccessChain 87(a) 88
+ Store 90 89
+ Branch 82
+ 82: Label
+ 91: 6(int) Load 78(i)
+ 92: 6(int) IAdd 91 31
+ Store 78(i) 92
+ Branch 79
+ 81: Label
+ 94: 6(int) Load 93(condition)
+ 95: 26(bool) IEqual 94 31
+ SelectionMerge 97 None
+ BranchConditional 95 96 97
+ 96: Label
+ 98: 37 Load 73(localArray)
+ Store 87(a) 98
+ Branch 97
+ 97: Label
+ 102: 9(fvec4) Load 101(color)
+ 104: 103(ptr) AccessChain 12(locals2) 99
+ Store 104 102
+ 106: 45(ptr) AccessChain 43(coord) 105
+ 107: 7(float) Load 106
+ 109: 33(ptr) AccessChain 12(locals2) 99 108
+ Store 109 107
+ 112: 103(ptr) AccessChain 12(locals2) 99
+ 113: 9(fvec4) Load 112
+ 114: 33(ptr) AccessChain 39(localFArray) 40
+ 115: 7(float) Load 114
+ 116: 33(ptr) AccessChain 12(locals2) 30 31
+ 117: 7(float) Load 116
+ 118: 7(float) FAdd 115 117
+ 119: 6(int) Load 71(x)
+ 120: 33(ptr) AccessChain 73(localArray) 119
+ 121: 7(float) Load 120
+ 122: 7(float) FAdd 118 121
+ 123: 6(int) Load 71(x)
+ 124: 33(ptr) AccessChain 87(a) 123
+ 125: 7(float) Load 124
+ 126: 7(float) FAdd 122 125
+ 127: 9(fvec4) VectorTimesScalar 113 126
+ 132: 129 Load 131(samp2D)
+ 133: 41(fvec2) Load 43(coord)
+ 134: 9(fvec4) ImageSampleImplicitLod 132 133
+ 135: 9(fvec4) FMul 127 134
+ Store 111(gl_FragColor) 135
+ Return
+ FunctionEnd
diff --git a/chromium/third_party/glslang/src/Test/baseResults/spv.loops.frag.out b/chromium/third_party/glslang/src/Test/baseResults/spv.loops.frag.out
new file mode 100755
index 00000000000..952f7941790
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/spv.loops.frag.out
@@ -0,0 +1,1108 @@
+spv.loops.frag
+
+Linked fragment stage:
+
+
+// Module Version 10000
+// Generated by (magic number): 80001
+// Id's are bound by 725
+
+ Capability Shader
+ 1: ExtInstImport "GLSL.std.450"
+ MemoryModel Logical GLSL450
+ EntryPoint Fragment 4 "main" 11 54 57 71 106 114 118 131 137 157 160 171 308 344 350 366 380 418 450 469 512 544 552 562 588 615 624 629 649 687 698
+ ExecutionMode 4 OriginUpperLeft
+ Source GLSL 140
+ Name 4 "main"
+ Name 9 "color"
+ Name 11 "BaseColor"
+ Name 54 "d"
+ Name 57 "bigColor"
+ Name 71 "bigColor1_1"
+ Name 106 "d2"
+ Name 114 "d3"
+ Name 118 "bigColor1_2"
+ Name 131 "bigColor1_3"
+ Name 137 "d4"
+ Name 148 "i"
+ Name 157 "Count"
+ Name 160 "bigColor2"
+ Name 171 "bigColor3"
+ Name 179 "i"
+ Name 195 "i"
+ Name 231 "i"
+ Name 254 "i"
+ Name 279 "i"
+ Name 308 "bigColor4"
+ Name 344 "bigColor5"
+ Name 350 "d5"
+ Name 366 "d6"
+ Name 380 "bigColor6"
+ Name 418 "d7"
+ Name 450 "bigColor7"
+ Name 469 "d8"
+ Name 512 "d9"
+ Name 544 "d10"
+ Name 552 "d11"
+ Name 562 "d12"
+ Name 588 "bigColor8"
+ Name 615 "gl_FragColor"
+ Name 624 "d14"
+ Name 629 "d15"
+ Name 649 "d16"
+ Name 687 "d18"
+ Name 698 "d17"
+ Decorate 157(Count) Flat
+ 2: TypeVoid
+ 3: TypeFunction 2
+ 6: TypeFloat 32
+ 7: TypeVector 6(float) 4
+ 8: TypePointer Function 7(fvec4)
+ 10: TypePointer Input 7(fvec4)
+ 11(BaseColor): 10(ptr) Variable Input
+ 18: TypeBool
+ 19: 18(bool) ConstantTrue
+ 20: TypeInt 32 0
+ 21: 20(int) Constant 0
+ 22: TypePointer Function 6(float)
+ 25: 6(float) Constant 1051260355
+ 29: 7(fvec4) ConstantComposite 25 25 25 25
+ 35: 6(float) Constant 1059648963
+ 39: 7(fvec4) ConstantComposite 35 35 35 35
+ 53: TypePointer Input 6(float)
+ 54(d): 53(ptr) Variable Input
+ 57(bigColor): 10(ptr) Variable Input
+ 66: 20(int) Constant 2
+ 71(bigColor1_1): 10(ptr) Variable Input
+ 75: 20(int) Constant 3
+ 93: 6(float) Constant 1109917696
+ 96: 6(float) Constant 1065353216
+ 106(d2): 53(ptr) Variable Input
+ 111: 20(int) Constant 1
+ 114(d3): 53(ptr) Variable Input
+118(bigColor1_2): 10(ptr) Variable Input
+131(bigColor1_3): 10(ptr) Variable Input
+ 137(d4): 53(ptr) Variable Input
+ 146: TypeInt 32 1
+ 147: TypePointer Function 146(int)
+ 149: 146(int) Constant 0
+ 156: TypePointer Input 146(int)
+ 157(Count): 156(ptr) Variable Input
+ 160(bigColor2): 10(ptr) Variable Input
+ 165: 146(int) Constant 1
+ 171(bigColor3): 10(ptr) Variable Input
+ 186: 146(int) Constant 42
+ 202: 146(int) Constant 100
+ 206: 6(float) Constant 1101004800
+ 238: 146(int) Constant 120
+ 308(bigColor4): 10(ptr) Variable Input
+ 344(bigColor5): 10(ptr) Variable Input
+ 350(d5): 53(ptr) Variable Input
+ 366(d6): 53(ptr) Variable Input
+ 380(bigColor6): 10(ptr) Variable Input
+ 418(d7): 53(ptr) Variable Input
+ 445: 6(float) Constant 0
+ 450(bigColor7): 10(ptr) Variable Input
+ 469(d8): 53(ptr) Variable Input
+ 486: 6(float) Constant 1073741824
+ 512(d9): 53(ptr) Variable Input
+ 528: 6(float) Constant 1084227584
+ 544(d10): 53(ptr) Variable Input
+ 552(d11): 53(ptr) Variable Input
+ 562(d12): 53(ptr) Variable Input
+ 586: 6(float) Constant 1092616192
+ 588(bigColor8): 10(ptr) Variable Input
+ 614: TypePointer Output 7(fvec4)
+615(gl_FragColor): 614(ptr) Variable Output
+ 624(d14): 53(ptr) Variable Input
+ 629(d15): 53(ptr) Variable Input
+ 649(d16): 53(ptr) Variable Input
+ 687(d18): 53(ptr) Variable Input
+ 698(d17): 53(ptr) Variable Input
+ 4(main): 2 Function None 3
+ 5: Label
+ 9(color): 8(ptr) Variable Function
+ 148(i): 147(ptr) Variable Function
+ 179(i): 147(ptr) Variable Function
+ 195(i): 147(ptr) Variable Function
+ 231(i): 147(ptr) Variable Function
+ 254(i): 147(ptr) Variable Function
+ 279(i): 147(ptr) Variable Function
+ 12: 7(fvec4) Load 11(BaseColor)
+ Store 9(color) 12
+ Branch 13
+ 13: Label
+ LoopMerge 15 16 None
+ Branch 17
+ 17: Label
+ BranchConditional 19 14 15
+ 14: Label
+ 23: 22(ptr) AccessChain 9(color) 21
+ 24: 6(float) Load 23
+ 26: 18(bool) FOrdLessThan 24 25
+ SelectionMerge 28 None
+ BranchConditional 26 27 28
+ 27: Label
+ 30: 7(fvec4) Load 9(color)
+ 31: 7(fvec4) FAdd 30 29
+ Store 9(color) 31
+ Branch 15
+ 28: Label
+ 33: 22(ptr) AccessChain 9(color) 21
+ 34: 6(float) Load 33
+ 36: 18(bool) FOrdLessThan 34 35
+ SelectionMerge 38 None
+ BranchConditional 36 37 38
+ 37: Label
+ 40: 7(fvec4) Load 9(color)
+ 41: 7(fvec4) FAdd 40 39
+ Store 9(color) 41
+ Branch 15
+ 38: Label
+ 43: 7(fvec4) Load 9(color)
+ 44: 7(fvec4) FAdd 43 29
+ Store 9(color) 44
+ Branch 15
+ 16: Label
+ Branch 13
+ 15: Label
+ Branch 46
+ 46: Label
+ LoopMerge 48 49 None
+ Branch 50
+ 50: Label
+ 51: 22(ptr) AccessChain 9(color) 21
+ 52: 6(float) Load 51
+ 55: 6(float) Load 54(d)
+ 56: 18(bool) FOrdLessThan 52 55
+ BranchConditional 56 47 48
+ 47: Label
+ 58: 7(fvec4) Load 57(bigColor)
+ 59: 7(fvec4) Load 9(color)
+ 60: 7(fvec4) FAdd 59 58
+ Store 9(color) 60
+ Branch 49
+ 49: Label
+ Branch 46
+ 48: Label
+ Branch 61
+ 61: Label
+ LoopMerge 63 64 None
+ Branch 65
+ 65: Label
+ 67: 22(ptr) AccessChain 9(color) 66
+ 68: 6(float) Load 67
+ 69: 6(float) Load 54(d)
+ 70: 18(bool) FOrdLessThan 68 69
+ BranchConditional 70 62 63
+ 62: Label
+ 72: 7(fvec4) Load 71(bigColor1_1)
+ 73: 7(fvec4) Load 9(color)
+ 74: 7(fvec4) FAdd 73 72
+ Store 9(color) 74
+ 76: 22(ptr) AccessChain 9(color) 75
+ 77: 6(float) Load 76
+ 78: 6(float) Load 54(d)
+ 79: 18(bool) FOrdLessThan 77 78
+ SelectionMerge 81 None
+ BranchConditional 79 80 81
+ 80: Label
+ Branch 64
+ 81: Label
+ 83: 7(fvec4) Load 71(bigColor1_1)
+ 84: 7(fvec4) Load 9(color)
+ 85: 7(fvec4) FAdd 84 83
+ Store 9(color) 85
+ Branch 64
+ 64: Label
+ Branch 61
+ 63: Label
+ Branch 86
+ 86: Label
+ LoopMerge 88 89 None
+ Branch 90
+ 90: Label
+ 91: 22(ptr) AccessChain 9(color) 21
+ 92: 6(float) Load 91
+ 94: 18(bool) FOrdLessThan 92 93
+ BranchConditional 94 87 88
+ 87: Label
+ 95: 7(fvec4) Load 9(color)
+ 97: 7(fvec4) CompositeConstruct 96 96 96 96
+ 98: 7(fvec4) FAdd 95 97
+ Store 9(color) 98
+ Branch 89
+ 89: Label
+ Branch 86
+ 88: Label
+ Branch 99
+ 99: Label
+ LoopMerge 101 102 None
+ Branch 103
+ 103: Label
+ 104: 22(ptr) AccessChain 9(color) 75
+ 105: 6(float) Load 104
+ 107: 6(float) Load 106(d2)
+ 108: 18(bool) FOrdLessThan 105 107
+ SelectionMerge 110 None
+ BranchConditional 108 109 110
+ 109: Label
+ 112: 22(ptr) AccessChain 9(color) 111
+ 113: 6(float) Load 112
+ 115: 6(float) Load 114(d3)
+ 116: 18(bool) FOrdLessThan 113 115
+ Branch 110
+ 110: Label
+ 117: 18(bool) Phi 108 103 116 109
+ BranchConditional 117 100 101
+ 100: Label
+ 119: 7(fvec4) Load 118(bigColor1_2)
+ 120: 7(fvec4) Load 9(color)
+ 121: 7(fvec4) FAdd 120 119
+ Store 9(color) 121
+ Branch 102
+ 102: Label
+ Branch 99
+ 101: Label
+ Branch 122
+ 122: Label
+ LoopMerge 124 125 None
+ Branch 126
+ 126: Label
+ 127: 22(ptr) AccessChain 9(color) 66
+ 128: 6(float) Load 127
+ 129: 6(float) Load 114(d3)
+ 130: 18(bool) FOrdLessThan 128 129
+ BranchConditional 130 123 124
+ 123: Label
+ 132: 7(fvec4) Load 131(bigColor1_3)
+ 133: 7(fvec4) Load 9(color)
+ 134: 7(fvec4) FAdd 133 132
+ Store 9(color) 134
+ 135: 22(ptr) AccessChain 9(color) 111
+ 136: 6(float) Load 135
+ 138: 6(float) Load 137(d4)
+ 139: 18(bool) FOrdLessThan 136 138
+ SelectionMerge 141 None
+ BranchConditional 139 140 141
+ 140: Label
+ Branch 124
+ 141: Label
+ 143: 7(fvec4) Load 131(bigColor1_3)
+ 144: 7(fvec4) Load 9(color)
+ 145: 7(fvec4) FAdd 144 143
+ Store 9(color) 145
+ Branch 125
+ 125: Label
+ Branch 122
+ 124: Label
+ Store 148(i) 149
+ Branch 150
+ 150: Label
+ LoopMerge 152 153 None
+ Branch 154
+ 154: Label
+ 155: 146(int) Load 148(i)
+ 158: 146(int) Load 157(Count)
+ 159: 18(bool) SLessThan 155 158
+ BranchConditional 159 151 152
+ 151: Label
+ 161: 7(fvec4) Load 160(bigColor2)
+ 162: 7(fvec4) Load 9(color)
+ 163: 7(fvec4) FAdd 162 161
+ Store 9(color) 163
+ Branch 153
+ 153: Label
+ 164: 146(int) Load 148(i)
+ 166: 146(int) IAdd 164 165
+ Store 148(i) 166
+ Branch 150
+ 152: Label
+ Branch 167
+ 167: Label
+ LoopMerge 169 170 None
+ Branch 168
+ 168: Label
+ 172: 7(fvec4) Load 171(bigColor3)
+ 173: 7(fvec4) Load 9(color)
+ 174: 7(fvec4) FAdd 173 172
+ Store 9(color) 174
+ Branch 170
+ 170: Label
+ 175: 22(ptr) AccessChain 9(color) 21
+ 176: 6(float) Load 175
+ 177: 6(float) Load 106(d2)
+ 178: 18(bool) FOrdLessThan 176 177
+ BranchConditional 178 167 169
+ 169: Label
+ Store 179(i) 149
+ Branch 180
+ 180: Label
+ LoopMerge 182 183 None
+ Branch 184
+ 184: Label
+ 185: 146(int) Load 179(i)
+ 187: 18(bool) SLessThan 185 186
+ BranchConditional 187 181 182
+ 181: Label
+ 188: 6(float) Load 114(d3)
+ 189: 22(ptr) AccessChain 9(color) 66
+ 190: 6(float) Load 189
+ 191: 6(float) FAdd 190 188
+ 192: 22(ptr) AccessChain 9(color) 66
+ Store 192 191
+ Branch 183
+ 183: Label
+ 193: 146(int) Load 179(i)
+ 194: 146(int) IAdd 193 165
+ Store 179(i) 194
+ Branch 180
+ 182: Label
+ Store 195(i) 149
+ Branch 196
+ 196: Label
+ LoopMerge 198 199 None
+ Branch 200
+ 200: Label
+ 201: 146(int) Load 195(i)
+ 203: 18(bool) SLessThan 201 202
+ BranchConditional 203 197 198
+ 197: Label
+ 204: 22(ptr) AccessChain 9(color) 66
+ 205: 6(float) Load 204
+ 207: 18(bool) FOrdLessThan 205 206
+ SelectionMerge 209 None
+ BranchConditional 207 208 213
+ 208: Label
+ 210: 22(ptr) AccessChain 9(color) 21
+ 211: 6(float) Load 210
+ 212: 6(float) FAdd 211 96
+ Store 210 212
+ Branch 209
+ 213: Label
+ 214: 22(ptr) AccessChain 9(color) 111
+ 215: 6(float) Load 214
+ 216: 6(float) FAdd 215 96
+ Store 214 216
+ Branch 209
+ 209: Label
+ 217: 22(ptr) AccessChain 9(color) 75
+ 218: 6(float) Load 217
+ 219: 18(bool) FOrdLessThan 218 206
+ SelectionMerge 221 None
+ BranchConditional 219 220 221
+ 220: Label
+ 222: 22(ptr) AccessChain 9(color) 66
+ 223: 6(float) Load 222
+ 224: 22(ptr) AccessChain 9(color) 111
+ 225: 6(float) Load 224
+ 226: 18(bool) FOrdGreaterThan 223 225
+ SelectionMerge 228 None
+ BranchConditional 226 227 228
+ 227: Label
+ Branch 228
+ 228: Label
+ Branch 221
+ 221: Label
+ Branch 199
+ 199: Label
+ 229: 146(int) Load 195(i)
+ 230: 146(int) IAdd 229 165
+ Store 195(i) 230
+ Branch 196
+ 198: Label
+ Store 231(i) 149
+ Branch 232
+ 232: Label
+ LoopMerge 234 235 None
+ Branch 236
+ 236: Label
+ 237: 146(int) Load 231(i)
+ 239: 18(bool) SLessThan 237 238
+ BranchConditional 239 233 234
+ 233: Label
+ 240: 22(ptr) AccessChain 9(color) 66
+ 241: 6(float) Load 240
+ 242: 18(bool) FOrdLessThan 241 206
+ SelectionMerge 244 None
+ BranchConditional 242 243 248
+ 243: Label
+ 245: 22(ptr) AccessChain 9(color) 21
+ 246: 6(float) Load 245
+ 247: 6(float) FAdd 246 96
+ Store 245 247
+ Branch 244
+ 248: Label
+ 249: 22(ptr) AccessChain 9(color) 111
+ 250: 6(float) Load 249
+ 251: 6(float) FAdd 250 96
+ Store 249 251
+ Branch 244
+ 244: Label
+ Branch 235
+ 235: Label
+ 252: 146(int) Load 231(i)
+ 253: 146(int) IAdd 252 165
+ Store 231(i) 253
+ Branch 232
+ 234: Label
+ Store 254(i) 149
+ Branch 255
+ 255: Label
+ LoopMerge 257 258 None
+ Branch 259
+ 259: Label
+ 260: 146(int) Load 254(i)
+ 261: 18(bool) SLessThan 260 186
+ BranchConditional 261 256 257
+ 256: Label
+ 262: 6(float) Load 114(d3)
+ 263: 22(ptr) AccessChain 9(color) 66
+ 264: 6(float) Load 263
+ 265: 6(float) FAdd 264 262
+ 266: 22(ptr) AccessChain 9(color) 66
+ Store 266 265
+ 267: 22(ptr) AccessChain 9(color) 21
+ 268: 6(float) Load 267
+ 269: 6(float) Load 137(d4)
+ 270: 18(bool) FOrdLessThan 268 269
+ SelectionMerge 272 None
+ BranchConditional 270 271 272
+ 271: Label
+ Branch 258
+ 272: Label
+ 274: 22(ptr) AccessChain 9(color) 75
+ 275: 6(float) Load 274
+ 276: 6(float) FAdd 275 96
+ Store 274 276
+ Branch 258
+ 258: Label
+ 277: 146(int) Load 254(i)
+ 278: 146(int) IAdd 277 165
+ Store 254(i) 278
+ Branch 255
+ 257: Label
+ Store 279(i) 149
+ Branch 280
+ 280: Label
+ LoopMerge 282 283 None
+ Branch 284
+ 284: Label
+ 285: 146(int) Load 279(i)
+ 286: 18(bool) SLessThan 285 186
+ BranchConditional 286 281 282
+ 281: Label
+ 287: 6(float) Load 114(d3)
+ 288: 22(ptr) AccessChain 9(color) 66
+ 289: 6(float) Load 288
+ 290: 6(float) FAdd 289 287
+ 291: 22(ptr) AccessChain 9(color) 66
+ Store 291 290
+ 292: 22(ptr) AccessChain 9(color) 21
+ 293: 6(float) Load 292
+ 294: 6(float) Load 137(d4)
+ 295: 18(bool) FOrdLessThan 293 294
+ SelectionMerge 297 None
+ BranchConditional 295 296 297
+ 296: Label
+ Branch 282
+ 297: Label
+ 299: 22(ptr) AccessChain 9(color) 75
+ 300: 6(float) Load 299
+ 301: 6(float) FAdd 300 96
+ Store 299 301
+ Branch 283
+ 283: Label
+ 302: 146(int) Load 279(i)
+ 303: 146(int) IAdd 302 165
+ Store 279(i) 303
+ Branch 280
+ 282: Label
+ Branch 304
+ 304: Label
+ LoopMerge 306 307 None
+ Branch 305
+ 305: Label
+ 309: 7(fvec4) Load 308(bigColor4)
+ 310: 7(fvec4) Load 9(color)
+ 311: 7(fvec4) FAdd 310 309
+ Store 9(color) 311
+ 312: 22(ptr) AccessChain 9(color) 21
+ 313: 6(float) Load 312
+ 314: 6(float) Load 137(d4)
+ 315: 18(bool) FOrdLessThan 313 314
+ SelectionMerge 317 None
+ BranchConditional 315 316 317
+ 316: Label
+ Branch 307
+ 317: Label
+ 319: 22(ptr) AccessChain 9(color) 111
+ 320: 6(float) Load 319
+ 321: 6(float) Load 137(d4)
+ 322: 18(bool) FOrdLessThan 320 321
+ SelectionMerge 324 None
+ BranchConditional 322 323 330
+ 323: Label
+ 325: 6(float) Load 137(d4)
+ 326: 22(ptr) AccessChain 9(color) 111
+ 327: 6(float) Load 326
+ 328: 6(float) FAdd 327 325
+ 329: 22(ptr) AccessChain 9(color) 111
+ Store 329 328
+ Branch 324
+ 330: Label
+ 331: 6(float) Load 137(d4)
+ 332: 22(ptr) AccessChain 9(color) 21
+ 333: 6(float) Load 332
+ 334: 6(float) FAdd 333 331
+ 335: 22(ptr) AccessChain 9(color) 21
+ Store 335 334
+ Branch 324
+ 324: Label
+ Branch 307
+ 307: Label
+ 336: 22(ptr) AccessChain 9(color) 66
+ 337: 6(float) Load 336
+ 338: 6(float) Load 137(d4)
+ 339: 18(bool) FOrdLessThan 337 338
+ BranchConditional 339 304 306
+ 306: Label
+ Branch 340
+ 340: Label
+ LoopMerge 342 343 None
+ Branch 341
+ 341: Label
+ 345: 7(fvec4) Load 344(bigColor5)
+ 346: 7(fvec4) Load 9(color)
+ 347: 7(fvec4) FAdd 346 345
+ Store 9(color) 347
+ 348: 22(ptr) AccessChain 9(color) 111
+ 349: 6(float) Load 348
+ 351: 6(float) Load 350(d5)
+ 352: 18(bool) FOrdLessThan 349 351
+ SelectionMerge 354 None
+ BranchConditional 352 353 354
+ 353: Label
+ 355: 6(float) Load 350(d5)
+ 356: 22(ptr) AccessChain 9(color) 111
+ 357: 6(float) Load 356
+ 358: 6(float) FAdd 357 355
+ 359: 22(ptr) AccessChain 9(color) 111
+ Store 359 358
+ Branch 354
+ 354: Label
+ Branch 343
+ 343: Label
+ 360: 22(ptr) AccessChain 9(color) 21
+ 361: 6(float) Load 360
+ 362: 6(float) Load 350(d5)
+ 363: 18(bool) FOrdLessThan 361 362
+ BranchConditional 363 340 342
+ 342: Label
+ 364: 22(ptr) AccessChain 9(color) 21
+ 365: 6(float) Load 364
+ 367: 6(float) Load 366(d6)
+ 368: 18(bool) FOrdLessThan 365 367
+ SelectionMerge 370 None
+ BranchConditional 368 369 384
+ 369: Label
+ Branch 371
+ 371: Label
+ LoopMerge 373 374 None
+ Branch 375
+ 375: Label
+ 376: 22(ptr) AccessChain 9(color) 111
+ 377: 6(float) Load 376
+ 378: 6(float) Load 366(d6)
+ 379: 18(bool) FOrdLessThan 377 378
+ BranchConditional 379 372 373
+ 372: Label
+ 381: 7(fvec4) Load 380(bigColor6)
+ 382: 7(fvec4) Load 9(color)
+ 383: 7(fvec4) FAdd 382 381
+ Store 9(color) 383
+ Branch 374
+ 374: Label
+ Branch 371
+ 373: Label
+ Branch 370
+ 384: Label
+ Branch 385
+ 385: Label
+ LoopMerge 387 388 None
+ Branch 389
+ 389: Label
+ 390: 22(ptr) AccessChain 9(color) 66
+ 391: 6(float) Load 390
+ 392: 6(float) Load 366(d6)
+ 393: 18(bool) FOrdLessThan 391 392
+ BranchConditional 393 386 387
+ 386: Label
+ 394: 53(ptr) AccessChain 380(bigColor6) 66
+ 395: 6(float) Load 394
+ 396: 22(ptr) AccessChain 9(color) 66
+ 397: 6(float) Load 396
+ 398: 6(float) FAdd 397 395
+ 399: 22(ptr) AccessChain 9(color) 66
+ Store 399 398
+ Branch 388
+ 388: Label
+ Branch 385
+ 387: Label
+ Branch 370
+ 370: Label
+ 400: 22(ptr) AccessChain 9(color) 21
+ 401: 6(float) Load 400
+ 402: 6(float) Load 366(d6)
+ 403: 18(bool) FOrdLessThan 401 402
+ SelectionMerge 405 None
+ BranchConditional 403 404 424
+ 404: Label
+ Branch 406
+ 406: Label
+ LoopMerge 408 409 None
+ Branch 410
+ 410: Label
+ 411: 22(ptr) AccessChain 9(color) 111
+ 412: 6(float) Load 411
+ 413: 6(float) Load 366(d6)
+ 414: 18(bool) FOrdLessThan 412 413
+ BranchConditional 414 407 408
+ 407: Label
+ 415: 7(fvec4) Load 380(bigColor6)
+ 416: 7(fvec4) Load 9(color)
+ 417: 7(fvec4) FAdd 416 415
+ Store 9(color) 417
+ 419: 6(float) Load 418(d7)
+ 420: 18(bool) FOrdLessThan 419 96
+ SelectionMerge 422 None
+ BranchConditional 420 421 422
+ 421: Label
+ Branch 408
+ 422: Label
+ Branch 409
+ 409: Label
+ Branch 406
+ 408: Label
+ Branch 405
+ 424: Label
+ Branch 425
+ 425: Label
+ LoopMerge 427 428 None
+ Branch 429
+ 429: Label
+ 430: 22(ptr) AccessChain 9(color) 66
+ 431: 6(float) Load 430
+ 432: 6(float) Load 366(d6)
+ 433: 18(bool) FOrdLessThan 431 432
+ BranchConditional 433 426 427
+ 426: Label
+ 434: 53(ptr) AccessChain 380(bigColor6) 66
+ 435: 6(float) Load 434
+ 436: 22(ptr) AccessChain 9(color) 66
+ 437: 6(float) Load 436
+ 438: 6(float) FAdd 437 435
+ 439: 22(ptr) AccessChain 9(color) 66
+ Store 439 438
+ Branch 428
+ 428: Label
+ Branch 425
+ 427: Label
+ Branch 405
+ 405: Label
+ Branch 440
+ 440: Label
+ LoopMerge 442 443 None
+ Branch 441
+ 441: Label
+ 444: 6(float) Load 418(d7)
+ 446: 18(bool) FOrdLessThan 444 445
+ SelectionMerge 448 None
+ BranchConditional 446 447 448
+ 447: Label
+ Branch 442
+ 448: Label
+ 451: 7(fvec4) Load 450(bigColor7)
+ 452: 7(fvec4) Load 9(color)
+ 453: 7(fvec4) FAdd 452 451
+ Store 9(color) 453
+ 454: 6(float) Load 418(d7)
+ 455: 18(bool) FOrdLessThan 454 96
+ SelectionMerge 457 None
+ BranchConditional 455 456 457
+ 456: Label
+ 458: 22(ptr) AccessChain 9(color) 66
+ 459: 6(float) Load 458
+ 460: 6(float) FAdd 459 96
+ Store 458 460
+ Branch 442
+ 457: Label
+ 462: 7(fvec4) Load 11(BaseColor)
+ 463: 7(fvec4) Load 9(color)
+ 464: 7(fvec4) FAdd 463 462
+ Store 9(color) 464
+ Branch 443
+ 443: Label
+ BranchConditional 19 440 442
+ 442: Label
+ Branch 465
+ 465: Label
+ LoopMerge 467 468 None
+ Branch 466
+ 466: Label
+ 470: 6(float) Load 469(d8)
+ 471: 18(bool) FOrdLessThan 470 445
+ SelectionMerge 473 None
+ BranchConditional 471 472 473
+ 472: Label
+ Branch 467
+ 473: Label
+ 475: 7(fvec4) Load 450(bigColor7)
+ 476: 7(fvec4) Load 9(color)
+ 477: 7(fvec4) FAdd 476 475
+ Store 9(color) 477
+ 478: 6(float) Load 469(d8)
+ 479: 18(bool) FOrdLessThan 478 96
+ SelectionMerge 481 None
+ BranchConditional 479 480 481
+ 480: Label
+ 482: 22(ptr) AccessChain 9(color) 66
+ 483: 6(float) Load 482
+ 484: 6(float) FAdd 483 96
+ Store 482 484
+ 485: 6(float) Load 469(d8)
+ 487: 18(bool) FOrdLessThan 485 486
+ SelectionMerge 489 None
+ BranchConditional 487 488 493
+ 488: Label
+ 490: 22(ptr) AccessChain 9(color) 111
+ 491: 6(float) Load 490
+ 492: 6(float) FAdd 491 96
+ Store 490 492
+ Branch 489
+ 493: Label
+ 494: 22(ptr) AccessChain 9(color) 21
+ 495: 6(float) Load 494
+ 496: 6(float) FAdd 495 96
+ Store 494 496
+ Branch 489
+ 489: Label
+ Branch 467
+ 481: Label
+ 498: 7(fvec4) Load 11(BaseColor)
+ 499: 7(fvec4) Load 9(color)
+ 500: 7(fvec4) FAdd 499 498
+ Store 9(color) 500
+ Branch 468
+ 468: Label
+ 501: 22(ptr) AccessChain 9(color) 66
+ 502: 6(float) Load 501
+ 503: 6(float) Load 469(d8)
+ 504: 18(bool) FOrdLessThan 502 503
+ BranchConditional 504 465 467
+ 467: Label
+ Branch 505
+ 505: Label
+ LoopMerge 507 508 None
+ Branch 509
+ 509: Label
+ 510: 22(ptr) AccessChain 9(color) 75
+ 511: 6(float) Load 510
+ 513: 6(float) Load 512(d9)
+ 514: 18(bool) FOrdLessThan 511 513
+ BranchConditional 514 506 507
+ 506: Label
+ 515: 6(float) Load 512(d9)
+ 516: 6(float) Load 469(d8)
+ 517: 18(bool) FOrdGreaterThan 515 516
+ SelectionMerge 519 None
+ BranchConditional 517 518 519
+ 518: Label
+ 520: 22(ptr) AccessChain 9(color) 21
+ 521: 6(float) Load 520
+ 522: 6(float) Load 418(d7)
+ 523: 18(bool) FOrdLessThanEqual 521 522
+ SelectionMerge 525 None
+ BranchConditional 523 524 525
+ 524: Label
+ 526: 22(ptr) AccessChain 9(color) 66
+ 527: 6(float) Load 526
+ 529: 18(bool) FOrdEqual 527 528
+ SelectionMerge 531 None
+ BranchConditional 529 530 535
+ 530: Label
+ 532: 22(ptr) AccessChain 9(color) 75
+ 533: 6(float) Load 532
+ 534: 6(float) FAdd 533 96
+ Store 532 534
+ Branch 531
+ 535: Label
+ Branch 507
+ 531: Label
+ Branch 525
+ 525: Label
+ Branch 519
+ 519: Label
+ Branch 508
+ 508: Label
+ Branch 505
+ 507: Label
+ Branch 537
+ 537: Label
+ LoopMerge 539 540 None
+ Branch 541
+ 541: Label
+ 542: 22(ptr) AccessChain 9(color) 66
+ 543: 6(float) Load 542
+ 545: 6(float) Load 544(d10)
+ 546: 18(bool) FOrdLessThan 543 545
+ BranchConditional 546 538 539
+ 538: Label
+ 547: 22(ptr) AccessChain 9(color) 111
+ 548: 6(float) Load 547
+ 549: 6(float) FAdd 548 96
+ Store 547 549
+ 550: 22(ptr) AccessChain 9(color) 111
+ 551: 6(float) Load 550
+ 553: 6(float) Load 552(d11)
+ 554: 18(bool) FOrdLessThan 551 553
+ SelectionMerge 556 None
+ BranchConditional 554 555 556
+ 555: Label
+ 557: 22(ptr) AccessChain 9(color) 66
+ 558: 6(float) Load 557
+ 559: 6(float) FAdd 558 96
+ Store 557 559
+ 560: 22(ptr) AccessChain 9(color) 75
+ 561: 6(float) Load 560
+ 563: 6(float) Load 562(d12)
+ 564: 18(bool) FOrdLessThan 561 563
+ SelectionMerge 566 None
+ BranchConditional 564 565 570
+ 565: Label
+ 567: 22(ptr) AccessChain 9(color) 75
+ 568: 6(float) Load 567
+ 569: 6(float) FAdd 568 96
+ Store 567 569
+ Branch 566
+ 570: Label
+ 571: 22(ptr) AccessChain 9(color) 21
+ 572: 6(float) Load 571
+ 573: 6(float) FAdd 572 96
+ Store 571 573
+ Branch 566
+ 566: Label
+ Branch 540
+ 556: Label
+ 575: 7(fvec4) Load 9(color)
+ 576: 7(fvec4) CompositeConstruct 96 96 96 96
+ 577: 7(fvec4) FAdd 575 576
+ Store 9(color) 577
+ Branch 539
+ 540: Label
+ Branch 537
+ 539: Label
+ Branch 579
+ 579: Label
+ LoopMerge 581 582 None
+ Branch 583
+ 583: Label
+ 584: 22(ptr) AccessChain 9(color) 21
+ 585: 6(float) Load 584
+ 587: 18(bool) FOrdLessThan 585 586
+ BranchConditional 587 580 581
+ 580: Label
+ 589: 7(fvec4) Load 588(bigColor8)
+ 590: 7(fvec4) Load 9(color)
+ 591: 7(fvec4) FAdd 590 589
+ Store 9(color) 591
+ 592: 22(ptr) AccessChain 9(color) 66
+ 593: 6(float) Load 592
+ 594: 6(float) Load 469(d8)
+ 595: 18(bool) FOrdLessThan 593 594
+ SelectionMerge 597 None
+ BranchConditional 595 596 597
+ 596: Label
+ 598: 22(ptr) AccessChain 9(color) 75
+ 599: 6(float) Load 598
+ 600: 6(float) Load 366(d6)
+ 601: 18(bool) FOrdLessThan 599 600
+ SelectionMerge 603 None
+ BranchConditional 601 602 603
+ 602: Label
+ Branch 582
+ 603: Label
+ Branch 597
+ 597: Label
+ 605: 53(ptr) AccessChain 588(bigColor8) 21
+ 606: 6(float) Load 605
+ 607: 22(ptr) AccessChain 9(color) 111
+ 608: 6(float) Load 607
+ 609: 6(float) FAdd 608 606
+ 610: 22(ptr) AccessChain 9(color) 111
+ Store 610 609
+ Branch 582
+ 582: Label
+ Branch 579
+ 581: Label
+ 611: 7(fvec4) Load 9(color)
+ 612: 7(fvec4) CompositeConstruct 96 96 96 96
+ 613: 7(fvec4) FAdd 611 612
+ Store 9(color) 613
+ 616: 7(fvec4) Load 9(color)
+ Store 615(gl_FragColor) 616
+ Branch 617
+ 617: Label
+ LoopMerge 619 620 None
+ Branch 621
+ 621: Label
+ 622: 22(ptr) AccessChain 9(color) 21
+ 623: 6(float) Load 622
+ 625: 6(float) Load 624(d14)
+ 626: 18(bool) FOrdLessThan 623 625
+ BranchConditional 626 618 619
+ 618: Label
+ 627: 22(ptr) AccessChain 9(color) 111
+ 628: 6(float) Load 627
+ 630: 6(float) Load 629(d15)
+ 631: 18(bool) FOrdLessThan 628 630
+ SelectionMerge 633 None
+ BranchConditional 631 632 635
+ 632: Label
+ Return
+ 635: Label
+ 636: 7(fvec4) Load 9(color)
+ 637: 7(fvec4) CompositeConstruct 96 96 96 96
+ 638: 7(fvec4) FAdd 636 637
+ Store 9(color) 638
+ Branch 633
+ 633: Label
+ Branch 620
+ 620: Label
+ Branch 617
+ 619: Label
+ 639: 7(fvec4) Load 9(color)
+ 640: 7(fvec4) CompositeConstruct 96 96 96 96
+ 641: 7(fvec4) FAdd 639 640
+ Store 9(color) 641
+ Branch 642
+ 642: Label
+ LoopMerge 644 645 None
+ Branch 646
+ 646: Label
+ 647: 22(ptr) AccessChain 9(color) 75
+ 648: 6(float) Load 647
+ 650: 6(float) Load 649(d16)
+ 651: 18(bool) FOrdLessThan 648 650
+ BranchConditional 651 643 644
+ 643: Label
+ 652: 22(ptr) AccessChain 9(color) 75
+ 653: 6(float) Load 652
+ 654: 6(float) FAdd 653 96
+ Store 652 654
+ Branch 645
+ 645: Label
+ Branch 642
+ 644: Label
+ Branch 655
+ 655: Label
+ LoopMerge 657 658 None
+ Branch 659
+ 659: Label
+ 660: 22(ptr) AccessChain 9(color) 75
+ 661: 6(float) Load 660
+ 662: 6(float) Load 106(d2)
+ 663: 18(bool) FOrdLessThan 661 662
+ SelectionMerge 665 None
+ BranchConditional 663 664 665
+ 664: Label
+ 666: 22(ptr) AccessChain 9(color) 111
+ 667: 6(float) Load 666
+ 668: 6(float) Load 114(d3)
+ 669: 18(bool) FOrdLessThan 667 668
+ Branch 665
+ 665: Label
+ 670: 18(bool) Phi 663 659 669 664
+ BranchConditional 670 656 657
+ 656: Label
+ 671: 7(fvec4) Load 118(bigColor1_2)
+ 672: 7(fvec4) Load 9(color)
+ 673: 7(fvec4) FAdd 672 671
+ Store 9(color) 673
+ 674: 22(ptr) AccessChain 9(color) 66
+ 675: 6(float) Load 674
+ 676: 6(float) Load 114(d3)
+ 677: 18(bool) FOrdLessThan 675 676
+ SelectionMerge 679 None
+ BranchConditional 677 678 679
+ 678: Label
+ Return
+ 679: Label
+ Branch 658
+ 658: Label
+ Branch 655
+ 657: Label
+ Branch 681
+ 681: Label
+ LoopMerge 683 684 None
+ Branch 682
+ 682: Label
+ 685: 22(ptr) AccessChain 9(color) 111
+ 686: 6(float) Load 685
+ 688: 6(float) Load 687(d18)
+ 689: 18(bool) FOrdLessThan 686 688
+ SelectionMerge 691 None
+ BranchConditional 689 690 691
+ 690: Label
+ Return
+ 691: Label
+ 693: 7(fvec4) Load 9(color)
+ 694: 7(fvec4) CompositeConstruct 96 96 96 96
+ 695: 7(fvec4) FAdd 693 694
+ Store 9(color) 695
+ Branch 684
+ 684: Label
+ 696: 22(ptr) AccessChain 9(color) 21
+ 697: 6(float) Load 696
+ 699: 6(float) Load 698(d17)
+ 700: 18(bool) FOrdLessThan 697 699
+ BranchConditional 700 681 683
+ 683: Label
+ Branch 701
+ 701: Label
+ LoopMerge 703 704 None
+ Branch 705
+ 705: Label
+ 706: 22(ptr) AccessChain 9(color) 111
+ 707: 6(float) Load 706
+ 708: 6(float) Load 649(d16)
+ 709: 18(bool) FOrdLessThan 707 708
+ BranchConditional 709 702 703
+ 702: Label
+ 710: 22(ptr) AccessChain 9(color) 75
+ 711: 6(float) Load 710
+ 712: 6(float) Load 649(d16)
+ 713: 18(bool) FOrdLessThan 711 712
+ SelectionMerge 715 None
+ BranchConditional 713 714 717
+ 714: Label
+ Kill
+ 717: Label
+ 718: 7(fvec4) Load 9(color)
+ 719: 7(fvec4) CompositeConstruct 96 96 96 96
+ 720: 7(fvec4) FAdd 718 719
+ Store 9(color) 720
+ Branch 715
+ 715: Label
+ Branch 704
+ 704: Label
+ Branch 701
+ 703: Label
+ 721: 7(fvec4) Load 9(color)
+ 722: 7(fvec4) CompositeConstruct 96 96 96 96
+ 723: 7(fvec4) FAdd 721 722
+ Store 9(color) 723
+ 724: 7(fvec4) Load 9(color)
+ Store 615(gl_FragColor) 724
+ Return
+ FunctionEnd
diff --git a/chromium/third_party/glslang/src/Test/baseResults/spv.loopsArtificial.frag.out b/chromium/third_party/glslang/src/Test/baseResults/spv.loopsArtificial.frag.out
new file mode 100755
index 00000000000..5f10bd35901
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/spv.loopsArtificial.frag.out
@@ -0,0 +1,243 @@
+spv.loopsArtificial.frag
+
+Linked fragment stage:
+
+
+// Module Version 10000
+// Generated by (magic number): 80001
+// Id's are bound by 158
+
+ Capability Shader
+ 1: ExtInstImport "GLSL.std.450"
+ MemoryModel Logical GLSL450
+ EntryPoint Fragment 4 "main" 11 17 27 80 140 142 143 144 145 146 147 148 149 150 151 152 153 154 157
+ ExecutionMode 4 OriginUpperLeft
+ Source GLSL 140
+ Name 4 "main"
+ Name 9 "color"
+ Name 11 "BaseColor"
+ Name 17 "bigColor4"
+ Name 27 "d4"
+ Name 80 "d13"
+ Name 140 "gl_FragColor"
+ Name 142 "bigColor"
+ Name 143 "bigColor1_1"
+ Name 144 "bigColor1_2"
+ Name 145 "bigColor1_3"
+ Name 146 "bigColor2"
+ Name 147 "bigColor3"
+ Name 148 "bigColor5"
+ Name 149 "bigColor6"
+ Name 150 "bigColor7"
+ Name 151 "bigColor8"
+ Name 152 "d"
+ Name 153 "d2"
+ Name 154 "d3"
+ Name 157 "Count"
+ Decorate 157(Count) Flat
+ 2: TypeVoid
+ 3: TypeFunction 2
+ 6: TypeFloat 32
+ 7: TypeVector 6(float) 4
+ 8: TypePointer Function 7(fvec4)
+ 10: TypePointer Input 7(fvec4)
+ 11(BaseColor): 10(ptr) Variable Input
+ 17(bigColor4): 10(ptr) Variable Input
+ 21: TypeInt 32 0
+ 22: 21(int) Constant 0
+ 23: TypePointer Function 6(float)
+ 26: TypePointer Input 6(float)
+ 27(d4): 26(ptr) Variable Input
+ 29: TypeBool
+ 33: 6(float) Constant 1073741824
+ 34: 21(int) Constant 2
+ 47: 6(float) Constant 1065353216
+ 50: 21(int) Constant 1
+ 77: 21(int) Constant 3
+ 80(d13): 26(ptr) Variable Input
+ 139: TypePointer Output 7(fvec4)
+140(gl_FragColor): 139(ptr) Variable Output
+ 142(bigColor): 10(ptr) Variable Input
+143(bigColor1_1): 10(ptr) Variable Input
+144(bigColor1_2): 10(ptr) Variable Input
+145(bigColor1_3): 10(ptr) Variable Input
+ 146(bigColor2): 10(ptr) Variable Input
+ 147(bigColor3): 10(ptr) Variable Input
+ 148(bigColor5): 10(ptr) Variable Input
+ 149(bigColor6): 10(ptr) Variable Input
+ 150(bigColor7): 10(ptr) Variable Input
+ 151(bigColor8): 10(ptr) Variable Input
+ 152(d): 26(ptr) Variable Input
+ 153(d2): 26(ptr) Variable Input
+ 154(d3): 26(ptr) Variable Input
+ 155: TypeInt 32 1
+ 156: TypePointer Input 155(int)
+ 157(Count): 156(ptr) Variable Input
+ 4(main): 2 Function None 3
+ 5: Label
+ 9(color): 8(ptr) Variable Function
+ 12: 7(fvec4) Load 11(BaseColor)
+ Store 9(color) 12
+ Branch 13
+ 13: Label
+ LoopMerge 15 16 None
+ Branch 14
+ 14: Label
+ 18: 7(fvec4) Load 17(bigColor4)
+ 19: 7(fvec4) Load 9(color)
+ 20: 7(fvec4) FAdd 19 18
+ Store 9(color) 20
+ 24: 23(ptr) AccessChain 9(color) 22
+ 25: 6(float) Load 24
+ 28: 6(float) Load 27(d4)
+ 30: 29(bool) FOrdLessThan 25 28
+ SelectionMerge 32 None
+ BranchConditional 30 31 32
+ 31: Label
+ 35: 23(ptr) AccessChain 9(color) 34
+ 36: 6(float) Load 35
+ 37: 6(float) FAdd 36 33
+ 38: 23(ptr) AccessChain 9(color) 34
+ Store 38 37
+ 39: 23(ptr) AccessChain 9(color) 34
+ 40: 6(float) Load 39
+ 41: 6(float) Load 27(d4)
+ 42: 29(bool) FOrdLessThan 40 41
+ SelectionMerge 44 None
+ BranchConditional 42 43 44
+ 43: Label
+ 45: 23(ptr) AccessChain 9(color) 22
+ 46: 6(float) Load 45
+ 48: 6(float) FAdd 46 47
+ Store 45 48
+ Branch 16
+ 44: Label
+ Branch 32
+ 32: Label
+ 51: 23(ptr) AccessChain 9(color) 50
+ 52: 6(float) Load 51
+ 53: 6(float) Load 27(d4)
+ 54: 29(bool) FOrdLessThan 52 53
+ SelectionMerge 56 None
+ BranchConditional 54 55 62
+ 55: Label
+ 57: 6(float) Load 27(d4)
+ 58: 23(ptr) AccessChain 9(color) 50
+ 59: 6(float) Load 58
+ 60: 6(float) FAdd 59 57
+ 61: 23(ptr) AccessChain 9(color) 50
+ Store 61 60
+ Branch 56
+ 62: Label
+ 63: 6(float) Load 27(d4)
+ 64: 23(ptr) AccessChain 9(color) 22
+ 65: 6(float) Load 64
+ 66: 6(float) FAdd 65 63
+ 67: 23(ptr) AccessChain 9(color) 22
+ Store 67 66
+ Branch 56
+ 56: Label
+ Branch 16
+ 16: Label
+ 68: 23(ptr) AccessChain 9(color) 34
+ 69: 6(float) Load 68
+ 70: 6(float) Load 27(d4)
+ 71: 29(bool) FOrdLessThan 69 70
+ BranchConditional 71 13 15
+ 15: Label
+ Branch 72
+ 72: Label
+ LoopMerge 74 75 None
+ Branch 76
+ 76: Label
+ 78: 23(ptr) AccessChain 9(color) 77
+ 79: 6(float) Load 78
+ 81: 6(float) Load 80(d13)
+ 82: 29(bool) FOrdLessThan 79 81
+ BranchConditional 82 73 74
+ 73: Label
+ 83: 23(ptr) AccessChain 9(color) 34
+ 84: 6(float) Load 83
+ 85: 6(float) Load 80(d13)
+ 86: 29(bool) FOrdLessThan 84 85
+ SelectionMerge 88 None
+ BranchConditional 86 87 92
+ 87: Label
+ 89: 7(fvec4) Load 9(color)
+ 90: 7(fvec4) CompositeConstruct 47 47 47 47
+ 91: 7(fvec4) FAdd 89 90
+ Store 9(color) 91
+ Branch 88
+ 92: Label
+ 93: 7(fvec4) Load 9(color)
+ 94: 7(fvec4) CompositeConstruct 47 47 47 47
+ 95: 7(fvec4) FSub 93 94
+ Store 9(color) 95
+ Branch 88
+ 88: Label
+ 96: 7(fvec4) Load 17(bigColor4)
+ 97: 7(fvec4) Load 9(color)
+ 98: 7(fvec4) FAdd 97 96
+ Store 9(color) 98
+ 99: 23(ptr) AccessChain 9(color) 22
+ 100: 6(float) Load 99
+ 101: 6(float) Load 27(d4)
+ 102: 29(bool) FOrdLessThan 100 101
+ SelectionMerge 104 None
+ BranchConditional 102 103 104
+ 103: Label
+ 105: 23(ptr) AccessChain 9(color) 34
+ 106: 6(float) Load 105
+ 107: 6(float) FAdd 106 33
+ 108: 23(ptr) AccessChain 9(color) 34
+ Store 108 107
+ 109: 23(ptr) AccessChain 9(color) 34
+ 110: 6(float) Load 109
+ 111: 6(float) Load 27(d4)
+ 112: 29(bool) FOrdLessThan 110 111
+ SelectionMerge 114 None
+ BranchConditional 112 113 114
+ 113: Label
+ 115: 23(ptr) AccessChain 9(color) 22
+ 116: 6(float) Load 115
+ 117: 6(float) FAdd 116 47
+ Store 115 117
+ Branch 75
+ 114: Label
+ Branch 104
+ 104: Label
+ 119: 23(ptr) AccessChain 9(color) 50
+ 120: 6(float) Load 119
+ 121: 6(float) Load 27(d4)
+ 122: 29(bool) FOrdLessThan 120 121
+ SelectionMerge 124 None
+ BranchConditional 122 123 130
+ 123: Label
+ 125: 6(float) Load 27(d4)
+ 126: 23(ptr) AccessChain 9(color) 50
+ 127: 6(float) Load 126
+ 128: 6(float) FAdd 127 125
+ 129: 23(ptr) AccessChain 9(color) 50
+ Store 129 128
+ Branch 124
+ 130: Label
+ 131: 6(float) Load 27(d4)
+ 132: 23(ptr) AccessChain 9(color) 22
+ 133: 6(float) Load 132
+ 134: 6(float) FAdd 133 131
+ 135: 23(ptr) AccessChain 9(color) 22
+ Store 135 134
+ Branch 124
+ 124: Label
+ Branch 75
+ 75: Label
+ Branch 72
+ 74: Label
+ 136: 7(fvec4) Load 9(color)
+ 137: 7(fvec4) CompositeConstruct 47 47 47 47
+ 138: 7(fvec4) FAdd 136 137
+ Store 9(color) 138
+ 141: 7(fvec4) Load 9(color)
+ Store 140(gl_FragColor) 141
+ Return
+ FunctionEnd
diff --git a/chromium/third_party/glslang/src/Test/baseResults/spv.matFun.vert.out b/chromium/third_party/glslang/src/Test/baseResults/spv.matFun.vert.out
new file mode 100755
index 00000000000..0aa0a52da90
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/spv.matFun.vert.out
@@ -0,0 +1,161 @@
+spv.matFun.vert
+Warning, version 400 is not yet complete; most version-specific features are present, but some are missing.
+
+
+Linked vertex stage:
+
+
+// Module Version 10000
+// Generated by (magic number): 80001
+// Id's are bound by 103
+
+ Capability Shader
+ 1: ExtInstImport "GLSL.std.450"
+ MemoryModel Logical GLSL450
+ EntryPoint Vertex 4 "main" 76 81
+ Source GLSL 400
+ Name 4 "main"
+ Name 14 "xf(mf33;vf3;"
+ Name 12 "m"
+ Name 13 "v"
+ Name 21 "Mat3(mf44;"
+ Name 20 "m"
+ Name 26 "mxv(mf44;vf3;"
+ Name 24 "m4"
+ Name 25 "v"
+ Name 65 "param"
+ Name 74 "gl_PerVertex"
+ MemberName 74(gl_PerVertex) 0 "gl_Position"
+ MemberName 74(gl_PerVertex) 1 "gl_PointSize"
+ MemberName 74(gl_PerVertex) 2 "gl_ClipDistance"
+ Name 76 ""
+ Name 77 "bl"
+ MemberName 77(bl) 0 "m4"
+ MemberName 77(bl) 1 "m3"
+ Name 79 "bName"
+ Name 81 "v3"
+ Name 82 "param"
+ Name 86 "param"
+ Name 89 "param"
+ Name 93 "param"
+ MemberDecorate 74(gl_PerVertex) 0 BuiltIn Position
+ MemberDecorate 74(gl_PerVertex) 1 BuiltIn PointSize
+ MemberDecorate 74(gl_PerVertex) 2 BuiltIn ClipDistance
+ Decorate 74(gl_PerVertex) Block
+ MemberDecorate 77(bl) 0 ColMajor
+ MemberDecorate 77(bl) 0 Offset 0
+ MemberDecorate 77(bl) 0 MatrixStride 16
+ MemberDecorate 77(bl) 1 ColMajor
+ MemberDecorate 77(bl) 1 Offset 64
+ MemberDecorate 77(bl) 1 MatrixStride 16
+ Decorate 77(bl) Block
+ Decorate 79(bName) DescriptorSet 0
+ 2: TypeVoid
+ 3: TypeFunction 2
+ 6: TypeFloat 32
+ 7: TypeVector 6(float) 3
+ 8: TypeMatrix 7(fvec3) 3
+ 9: TypePointer Function 8
+ 10: TypePointer Function 7(fvec3)
+ 11: TypeFunction 7(fvec3) 9(ptr) 10(ptr)
+ 16: TypeVector 6(float) 4
+ 17: TypeMatrix 16(fvec4) 4
+ 18: TypePointer Function 17
+ 19: TypeFunction 8 18(ptr)
+ 23: TypeFunction 7(fvec3) 18(ptr) 10(ptr)
+ 33: TypeInt 32 1
+ 34: 33(int) Constant 0
+ 35: TypePointer Function 16(fvec4)
+ 39: 33(int) Constant 1
+ 43: 33(int) Constant 2
+ 47: 6(float) Constant 1065353216
+ 48: 6(float) Constant 0
+ 71: TypeInt 32 0
+ 72: 71(int) Constant 1
+ 73: TypeArray 6(float) 72
+74(gl_PerVertex): TypeStruct 16(fvec4) 6(float) 73
+ 75: TypePointer Output 74(gl_PerVertex)
+ 76: 75(ptr) Variable Output
+ 77(bl): TypeStruct 17 8
+ 78: TypePointer Uniform 77(bl)
+ 79(bName): 78(ptr) Variable Uniform
+ 80: TypePointer Input 7(fvec3)
+ 81(v3): 80(ptr) Variable Input
+ 83: TypePointer Uniform 17
+ 90: TypePointer Uniform 8
+ 101: TypePointer Output 16(fvec4)
+ 4(main): 2 Function None 3
+ 5: Label
+ 82(param): 18(ptr) Variable Function
+ 86(param): 10(ptr) Variable Function
+ 89(param): 9(ptr) Variable Function
+ 93(param): 10(ptr) Variable Function
+ 84: 83(ptr) AccessChain 79(bName) 34
+ 85: 17 Load 84
+ Store 82(param) 85
+ 87: 7(fvec3) Load 81(v3)
+ Store 86(param) 87
+ 88: 7(fvec3) FunctionCall 26(mxv(mf44;vf3;) 82(param) 86(param)
+ 91: 90(ptr) AccessChain 79(bName) 39
+ 92: 8 Load 91
+ Store 89(param) 92
+ 94: 7(fvec3) Load 81(v3)
+ Store 93(param) 94
+ 95: 7(fvec3) FunctionCall 14(xf(mf33;vf3;) 89(param) 93(param)
+ 96: 7(fvec3) FAdd 88 95
+ 97: 6(float) CompositeExtract 96 0
+ 98: 6(float) CompositeExtract 96 1
+ 99: 6(float) CompositeExtract 96 2
+ 100: 16(fvec4) CompositeConstruct 97 98 99 47
+ 102: 101(ptr) AccessChain 76 34
+ Store 102 100
+ Return
+ FunctionEnd
+14(xf(mf33;vf3;): 7(fvec3) Function None 11
+ 12(m): 9(ptr) FunctionParameter
+ 13(v): 10(ptr) FunctionParameter
+ 15: Label
+ 28: 7(fvec3) Load 13(v)
+ 29: 8 Load 12(m)
+ 30: 7(fvec3) VectorTimesMatrix 28 29
+ ReturnValue 30
+ FunctionEnd
+ 21(Mat3(mf44;): 8 Function None 19
+ 20(m): 18(ptr) FunctionParameter
+ 22: Label
+ 36: 35(ptr) AccessChain 20(m) 34
+ 37: 16(fvec4) Load 36
+ 38: 7(fvec3) VectorShuffle 37 37 0 1 2
+ 40: 35(ptr) AccessChain 20(m) 39
+ 41: 16(fvec4) Load 40
+ 42: 7(fvec3) VectorShuffle 41 41 0 1 2
+ 44: 35(ptr) AccessChain 20(m) 43
+ 45: 16(fvec4) Load 44
+ 46: 7(fvec3) VectorShuffle 45 45 0 1 2
+ 49: 6(float) CompositeExtract 38 0
+ 50: 6(float) CompositeExtract 38 1
+ 51: 6(float) CompositeExtract 38 2
+ 52: 6(float) CompositeExtract 42 0
+ 53: 6(float) CompositeExtract 42 1
+ 54: 6(float) CompositeExtract 42 2
+ 55: 6(float) CompositeExtract 46 0
+ 56: 6(float) CompositeExtract 46 1
+ 57: 6(float) CompositeExtract 46 2
+ 58: 7(fvec3) CompositeConstruct 49 50 51
+ 59: 7(fvec3) CompositeConstruct 52 53 54
+ 60: 7(fvec3) CompositeConstruct 55 56 57
+ 61: 8 CompositeConstruct 58 59 60
+ ReturnValue 61
+ FunctionEnd
+26(mxv(mf44;vf3;): 7(fvec3) Function None 23
+ 24(m4): 18(ptr) FunctionParameter
+ 25(v): 10(ptr) FunctionParameter
+ 27: Label
+ 65(param): 18(ptr) Variable Function
+ 64: 7(fvec3) Load 25(v)
+ 66: 17 Load 24(m4)
+ Store 65(param) 66
+ 67: 8 FunctionCall 21(Mat3(mf44;) 65(param)
+ 68: 7(fvec3) VectorTimesMatrix 64 67
+ ReturnValue 68
+ FunctionEnd
diff --git a/chromium/third_party/glslang/src/Test/baseResults/spv.matrix.frag.out b/chromium/third_party/glslang/src/Test/baseResults/spv.matrix.frag.out
new file mode 100644
index 00000000000..7b34fca4dec
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/spv.matrix.frag.out
@@ -0,0 +1,313 @@
+spv.matrix.frag
+Warning, version 420 is not yet complete; most version-specific features are present, but some are missing.
+
+
+Linked fragment stage:
+
+
+// Module Version 10000
+// Generated by (magic number): 80001
+// Id's are bound by 261
+
+ Capability Shader
+ Capability Float64
+ 1: ExtInstImport "GLSL.std.450"
+ MemoryModel Logical GLSL450
+ EntryPoint Fragment 4 "main" 12 14 28 161 169 187
+ ExecutionMode 4 OriginUpperLeft
+ Source GLSL 420
+ Name 4 "main"
+ Name 10 "sum34"
+ Name 12 "m1"
+ Name 14 "m2"
+ Name 28 "f"
+ Name 140 "dm"
+ Name 159 "sum3"
+ Name 161 "v4"
+ Name 166 "sum4"
+ Name 169 "v3"
+ Name 174 "m43"
+ Name 179 "m4"
+ Name 187 "color"
+ 2: TypeVoid
+ 3: TypeFunction 2
+ 6: TypeFloat 32
+ 7: TypeVector 6(float) 4
+ 8: TypeMatrix 7(fvec4) 3
+ 9: TypePointer Function 8
+ 11: TypePointer Input 8
+ 12(m1): 11(ptr) Variable Input
+ 14(m2): 11(ptr) Variable Input
+ 27: TypePointer Input 6(float)
+ 28(f): 27(ptr) Variable Input
+ 81: 6(float) Constant 1065353216
+ 136: TypeFloat 64
+ 137: TypeVector 136(float) 4
+ 138: TypeMatrix 137(fvec4) 3
+ 139: TypePointer Function 138
+ 157: TypeVector 6(float) 3
+ 158: TypePointer Function 157(fvec3)
+ 160: TypePointer Input 7(fvec4)
+ 161(v4): 160(ptr) Variable Input
+ 165: TypePointer Function 7(fvec4)
+ 168: TypePointer Input 157(fvec3)
+ 169(v3): 168(ptr) Variable Input
+ 172: TypeMatrix 157(fvec3) 4
+ 173: TypePointer Function 172
+ 177: TypeMatrix 7(fvec4) 4
+ 178: TypePointer Function 177
+ 186: TypePointer Output 7(fvec4)
+ 187(color): 186(ptr) Variable Output
+ 208: 6(float) Constant 0
+ 4(main): 2 Function None 3
+ 5: Label
+ 10(sum34): 9(ptr) Variable Function
+ 140(dm): 139(ptr) Variable Function
+ 159(sum3): 158(ptr) Variable Function
+ 166(sum4): 165(ptr) Variable Function
+ 174(m43): 173(ptr) Variable Function
+ 179(m4): 178(ptr) Variable Function
+ 13: 8 Load 12(m1)
+ 15: 8 Load 14(m2)
+ 16: 7(fvec4) CompositeExtract 13 0
+ 17: 7(fvec4) CompositeExtract 15 0
+ 18: 7(fvec4) FSub 16 17
+ 19: 7(fvec4) CompositeExtract 13 1
+ 20: 7(fvec4) CompositeExtract 15 1
+ 21: 7(fvec4) FSub 19 20
+ 22: 7(fvec4) CompositeExtract 13 2
+ 23: 7(fvec4) CompositeExtract 15 2
+ 24: 7(fvec4) FSub 22 23
+ 25: 8 CompositeConstruct 18 21 24
+ Store 10(sum34) 25
+ 26: 8 Load 12(m1)
+ 29: 6(float) Load 28(f)
+ 30: 8 MatrixTimesScalar 26 29
+ 31: 8 Load 10(sum34)
+ 32: 7(fvec4) CompositeExtract 31 0
+ 33: 7(fvec4) CompositeExtract 30 0
+ 34: 7(fvec4) FAdd 32 33
+ 35: 7(fvec4) CompositeExtract 31 1
+ 36: 7(fvec4) CompositeExtract 30 1
+ 37: 7(fvec4) FAdd 35 36
+ 38: 7(fvec4) CompositeExtract 31 2
+ 39: 7(fvec4) CompositeExtract 30 2
+ 40: 7(fvec4) FAdd 38 39
+ 41: 8 CompositeConstruct 34 37 40
+ Store 10(sum34) 41
+ 42: 6(float) Load 28(f)
+ 43: 8 Load 12(m1)
+ 44: 8 MatrixTimesScalar 43 42
+ 45: 8 Load 10(sum34)
+ 46: 7(fvec4) CompositeExtract 45 0
+ 47: 7(fvec4) CompositeExtract 44 0
+ 48: 7(fvec4) FAdd 46 47
+ 49: 7(fvec4) CompositeExtract 45 1
+ 50: 7(fvec4) CompositeExtract 44 1
+ 51: 7(fvec4) FAdd 49 50
+ 52: 7(fvec4) CompositeExtract 45 2
+ 53: 7(fvec4) CompositeExtract 44 2
+ 54: 7(fvec4) FAdd 52 53
+ 55: 8 CompositeConstruct 48 51 54
+ Store 10(sum34) 55
+ 56: 8 Load 12(m1)
+ 57: 8 Load 14(m2)
+ 58: 7(fvec4) CompositeExtract 56 0
+ 59: 7(fvec4) CompositeExtract 57 0
+ 60: 7(fvec4) FMul 58 59
+ 61: 7(fvec4) CompositeExtract 56 1
+ 62: 7(fvec4) CompositeExtract 57 1
+ 63: 7(fvec4) FMul 61 62
+ 64: 7(fvec4) CompositeExtract 56 2
+ 65: 7(fvec4) CompositeExtract 57 2
+ 66: 7(fvec4) FMul 64 65
+ 67: 8 CompositeConstruct 60 63 66
+ 68: 8 Load 10(sum34)
+ 69: 7(fvec4) CompositeExtract 68 0
+ 70: 7(fvec4) CompositeExtract 67 0
+ 71: 7(fvec4) FDiv 69 70
+ 72: 7(fvec4) CompositeExtract 68 1
+ 73: 7(fvec4) CompositeExtract 67 1
+ 74: 7(fvec4) FDiv 72 73
+ 75: 7(fvec4) CompositeExtract 68 2
+ 76: 7(fvec4) CompositeExtract 67 2
+ 77: 7(fvec4) FDiv 75 76
+ 78: 8 CompositeConstruct 71 74 77
+ Store 10(sum34) 78
+ 79: 8 Load 12(m1)
+ 80: 6(float) Load 28(f)
+ 82: 6(float) FDiv 81 80
+ 83: 8 MatrixTimesScalar 79 82
+ 84: 8 Load 10(sum34)
+ 85: 7(fvec4) CompositeExtract 84 0
+ 86: 7(fvec4) CompositeExtract 83 0
+ 87: 7(fvec4) FAdd 85 86
+ 88: 7(fvec4) CompositeExtract 84 1
+ 89: 7(fvec4) CompositeExtract 83 1
+ 90: 7(fvec4) FAdd 88 89
+ 91: 7(fvec4) CompositeExtract 84 2
+ 92: 7(fvec4) CompositeExtract 83 2
+ 93: 7(fvec4) FAdd 91 92
+ 94: 8 CompositeConstruct 87 90 93
+ Store 10(sum34) 94
+ 95: 6(float) Load 28(f)
+ 96: 8 Load 12(m1)
+ 97: 7(fvec4) CompositeConstruct 95 95 95 95
+ 98: 7(fvec4) CompositeExtract 96 0
+ 99: 7(fvec4) FDiv 97 98
+ 100: 7(fvec4) CompositeExtract 96 1
+ 101: 7(fvec4) FDiv 97 100
+ 102: 7(fvec4) CompositeExtract 96 2
+ 103: 7(fvec4) FDiv 97 102
+ 104: 8 CompositeConstruct 99 101 103
+ 105: 8 Load 10(sum34)
+ 106: 7(fvec4) CompositeExtract 105 0
+ 107: 7(fvec4) CompositeExtract 104 0
+ 108: 7(fvec4) FAdd 106 107
+ 109: 7(fvec4) CompositeExtract 105 1
+ 110: 7(fvec4) CompositeExtract 104 1
+ 111: 7(fvec4) FAdd 109 110
+ 112: 7(fvec4) CompositeExtract 105 2
+ 113: 7(fvec4) CompositeExtract 104 2
+ 114: 7(fvec4) FAdd 112 113
+ 115: 8 CompositeConstruct 108 111 114
+ Store 10(sum34) 115
+ 116: 6(float) Load 28(f)
+ 117: 8 Load 10(sum34)
+ 118: 7(fvec4) CompositeConstruct 116 116 116 116
+ 119: 7(fvec4) CompositeExtract 117 0
+ 120: 7(fvec4) FAdd 119 118
+ 121: 7(fvec4) CompositeExtract 117 1
+ 122: 7(fvec4) FAdd 121 118
+ 123: 7(fvec4) CompositeExtract 117 2
+ 124: 7(fvec4) FAdd 123 118
+ 125: 8 CompositeConstruct 120 122 124
+ Store 10(sum34) 125
+ 126: 6(float) Load 28(f)
+ 127: 8 Load 10(sum34)
+ 128: 7(fvec4) CompositeConstruct 126 126 126 126
+ 129: 7(fvec4) CompositeExtract 127 0
+ 130: 7(fvec4) FSub 129 128
+ 131: 7(fvec4) CompositeExtract 127 1
+ 132: 7(fvec4) FSub 131 128
+ 133: 7(fvec4) CompositeExtract 127 2
+ 134: 7(fvec4) FSub 133 128
+ 135: 8 CompositeConstruct 130 132 134
+ Store 10(sum34) 135
+ 141: 8 Load 10(sum34)
+ 142: 7(fvec4) CompositeExtract 141 0
+ 143: 137(fvec4) FConvert 142
+ 144: 7(fvec4) CompositeExtract 141 1
+ 145: 137(fvec4) FConvert 144
+ 146: 7(fvec4) CompositeExtract 141 2
+ 147: 137(fvec4) FConvert 146
+ 148: 138 CompositeConstruct 143 145 147
+ Store 140(dm) 148
+ 149: 138 Load 140(dm)
+ 150: 137(fvec4) CompositeExtract 149 0
+ 151: 7(fvec4) FConvert 150
+ 152: 137(fvec4) CompositeExtract 149 1
+ 153: 7(fvec4) FConvert 152
+ 154: 137(fvec4) CompositeExtract 149 2
+ 155: 7(fvec4) FConvert 154
+ 156: 8 CompositeConstruct 151 153 155
+ Store 10(sum34) 156
+ 162: 7(fvec4) Load 161(v4)
+ 163: 8 Load 14(m2)
+ 164: 157(fvec3) VectorTimesMatrix 162 163
+ Store 159(sum3) 164
+ 167: 8 Load 14(m2)
+ 170: 157(fvec3) Load 169(v3)
+ 171: 7(fvec4) MatrixTimesVector 167 170
+ Store 166(sum4) 171
+ 175: 8 Load 10(sum34)
+ 176: 172 Transpose 175
+ Store 174(m43) 176
+ 180: 8 Load 12(m1)
+ 181: 172 Load 174(m43)
+ 182: 177 MatrixTimesMatrix 180 181
+ Store 179(m4) 182
+ 183: 7(fvec4) Load 161(v4)
+ 184: 177 Load 179(m4)
+ 185: 7(fvec4) VectorTimesMatrix 183 184
+ Store 166(sum4) 185
+ 188: 7(fvec4) Load 166(sum4)
+ Store 187(color) 188
+ 189: 8 Load 10(sum34)
+ 190: 7(fvec4) CompositeConstruct 81 81 81 81
+ 191: 7(fvec4) CompositeExtract 189 0
+ 192: 7(fvec4) FAdd 191 190
+ 193: 7(fvec4) CompositeExtract 189 1
+ 194: 7(fvec4) FAdd 193 190
+ 195: 7(fvec4) CompositeExtract 189 2
+ 196: 7(fvec4) FAdd 195 190
+ 197: 8 CompositeConstruct 192 194 196
+ Store 10(sum34) 197
+ 198: 8 Load 10(sum34)
+ 199: 7(fvec4) CompositeConstruct 81 81 81 81
+ 200: 7(fvec4) CompositeExtract 198 0
+ 201: 7(fvec4) FSub 200 199
+ 202: 7(fvec4) CompositeExtract 198 1
+ 203: 7(fvec4) FSub 202 199
+ 204: 7(fvec4) CompositeExtract 198 2
+ 205: 7(fvec4) FSub 204 199
+ 206: 8 CompositeConstruct 201 203 205
+ Store 10(sum34) 206
+ 207: 6(float) Load 28(f)
+ 209: 7(fvec4) CompositeConstruct 207 208 208 208
+ 210: 7(fvec4) CompositeConstruct 208 207 208 208
+ 211: 7(fvec4) CompositeConstruct 208 208 207 208
+ 212: 8 CompositeConstruct 209 210 211
+ 213: 8 Load 10(sum34)
+ 214: 7(fvec4) CompositeExtract 213 0
+ 215: 7(fvec4) CompositeExtract 212 0
+ 216: 7(fvec4) FAdd 214 215
+ 217: 7(fvec4) CompositeExtract 213 1
+ 218: 7(fvec4) CompositeExtract 212 1
+ 219: 7(fvec4) FAdd 217 218
+ 220: 7(fvec4) CompositeExtract 213 2
+ 221: 7(fvec4) CompositeExtract 212 2
+ 222: 7(fvec4) FAdd 220 221
+ 223: 8 CompositeConstruct 216 219 222
+ Store 10(sum34) 223
+ 224: 157(fvec3) Load 169(v3)
+ 225: 6(float) Load 28(f)
+ 226: 157(fvec3) Load 169(v3)
+ 227: 6(float) Load 28(f)
+ 228: 157(fvec3) Load 169(v3)
+ 229: 6(float) Load 28(f)
+ 230: 6(float) CompositeExtract 224 0
+ 231: 6(float) CompositeExtract 224 1
+ 232: 6(float) CompositeExtract 224 2
+ 233: 6(float) CompositeExtract 226 0
+ 234: 6(float) CompositeExtract 226 1
+ 235: 6(float) CompositeExtract 226 2
+ 236: 6(float) CompositeExtract 228 0
+ 237: 6(float) CompositeExtract 228 1
+ 238: 6(float) CompositeExtract 228 2
+ 239: 7(fvec4) CompositeConstruct 230 231 232 225
+ 240: 7(fvec4) CompositeConstruct 233 234 235 227
+ 241: 7(fvec4) CompositeConstruct 236 237 238 229
+ 242: 8 CompositeConstruct 239 240 241
+ 243: 8 Load 10(sum34)
+ 244: 7(fvec4) CompositeExtract 243 0
+ 245: 7(fvec4) CompositeExtract 242 0
+ 246: 7(fvec4) FAdd 244 245
+ 247: 7(fvec4) CompositeExtract 243 1
+ 248: 7(fvec4) CompositeExtract 242 1
+ 249: 7(fvec4) FAdd 247 248
+ 250: 7(fvec4) CompositeExtract 243 2
+ 251: 7(fvec4) CompositeExtract 242 2
+ 252: 7(fvec4) FAdd 250 251
+ 253: 8 CompositeConstruct 246 249 252
+ Store 10(sum34) 253
+ 254: 157(fvec3) Load 159(sum3)
+ 255: 172 Load 174(m43)
+ 256: 7(fvec4) VectorTimesMatrix 254 255
+ 257: 7(fvec4) Load 166(sum4)
+ 258: 7(fvec4) FAdd 256 257
+ 259: 7(fvec4) Load 187(color)
+ 260: 7(fvec4) FAdd 259 258
+ Store 187(color) 260
+ Return
+ FunctionEnd
diff --git a/chromium/third_party/glslang/src/Test/baseResults/spv.matrix2.frag.out b/chromium/third_party/glslang/src/Test/baseResults/spv.matrix2.frag.out
new file mode 100644
index 00000000000..e0497b09d3c
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/spv.matrix2.frag.out
@@ -0,0 +1,273 @@
+spv.matrix2.frag
+
+Linked fragment stage:
+
+
+// Module Version 10000
+// Generated by (magic number): 80001
+// Id's are bound by 221
+
+ Capability Shader
+ 1: ExtInstImport "GLSL.std.450"
+ MemoryModel Logical GLSL450
+ EntryPoint Fragment 4 "main" 12 16 37 38 65 87 147 158 181 218 219 220
+ ExecutionMode 4 OriginUpperLeft
+ Source GLSL 150
+ Name 4 "main"
+ Name 10 "m34"
+ Name 12 "v"
+ Name 16 "u"
+ Name 37 "FragColor"
+ Name 38 "Color"
+ Name 63 "m44"
+ Name 65 "un34"
+ Name 87 "um43"
+ Name 147 "um4"
+ Name 156 "inv"
+ Name 158 "um2"
+ Name 179 "inv3"
+ Name 181 "um3"
+ Name 190 "inv4"
+ Name 218 "colorTransform"
+ Name 219 "m"
+ Name 220 "n"
+ 2: TypeVoid
+ 3: TypeFunction 2
+ 6: TypeFloat 32
+ 7: TypeVector 6(float) 4
+ 8: TypeMatrix 7(fvec4) 3
+ 9: TypePointer Function 8
+ 11: TypePointer Input 7(fvec4)
+ 12(v): 11(ptr) Variable Input
+ 14: TypeVector 6(float) 3
+ 15: TypePointer Input 14(fvec3)
+ 16(u): 15(ptr) Variable Input
+ 19: 6(float) Constant 1082759578
+ 20: 6(float) Constant 0
+ 21: 7(fvec4) ConstantComposite 19 20 20 20
+ 22: 7(fvec4) ConstantComposite 20 19 20 20
+ 23: 7(fvec4) ConstantComposite 20 20 19 20
+ 24: 8 ConstantComposite 21 22 23
+ 36: TypePointer Output 7(fvec4)
+ 37(FragColor): 36(ptr) Variable Output
+ 38(Color): 15(ptr) Variable Input
+ 40: 6(float) Constant 1065353216
+ 54: TypeInt 32 0
+ 55: 54(int) Constant 0
+ 56: TypePointer Input 6(float)
+ 61: TypeMatrix 7(fvec4) 4
+ 62: TypePointer Function 61
+ 64: TypePointer Input 8
+ 65(un34): 64(ptr) Variable Input
+ 85: TypeMatrix 14(fvec3) 4
+ 86: TypePointer Input 85
+ 87(um43): 86(ptr) Variable Input
+ 146: TypePointer Input 61
+ 147(um4): 146(ptr) Variable Input
+ 153: TypeVector 6(float) 2
+ 154: TypeMatrix 153(fvec2) 2
+ 155: TypePointer Function 154
+ 157: TypePointer Input 154
+ 158(um2): 157(ptr) Variable Input
+ 161: TypeInt 32 1
+ 162: 161(int) Constant 0
+ 163: TypePointer Function 6(float)
+ 166: 161(int) Constant 1
+ 169: 54(int) Constant 1
+ 177: TypeMatrix 14(fvec3) 3
+ 178: TypePointer Function 177
+ 180: TypePointer Input 177
+ 181(um3): 180(ptr) Variable Input
+ 184: 161(int) Constant 2
+ 210: 54(int) Constant 3
+ 211: TypePointer Output 6(float)
+218(colorTransform): 180(ptr) Variable Input
+ 219(m): 146(ptr) Variable Input
+ 220(n): 146(ptr) Variable Input
+ 4(main): 2 Function None 3
+ 5: Label
+ 10(m34): 9(ptr) Variable Function
+ 63(m44): 62(ptr) Variable Function
+ 156(inv): 155(ptr) Variable Function
+ 179(inv3): 178(ptr) Variable Function
+ 190(inv4): 62(ptr) Variable Function
+ 13: 7(fvec4) Load 12(v)
+ 17: 14(fvec3) Load 16(u)
+ 18: 8 OuterProduct 13 17
+ Store 10(m34) 18
+ 25: 8 Load 10(m34)
+ 26: 7(fvec4) CompositeExtract 25 0
+ 27: 7(fvec4) CompositeExtract 24 0
+ 28: 7(fvec4) FAdd 26 27
+ 29: 7(fvec4) CompositeExtract 25 1
+ 30: 7(fvec4) CompositeExtract 24 1
+ 31: 7(fvec4) FAdd 29 30
+ 32: 7(fvec4) CompositeExtract 25 2
+ 33: 7(fvec4) CompositeExtract 24 2
+ 34: 7(fvec4) FAdd 32 33
+ 35: 8 CompositeConstruct 28 31 34
+ Store 10(m34) 35
+ 39: 14(fvec3) Load 38(Color)
+ 41: 6(float) CompositeExtract 39 0
+ 42: 6(float) CompositeExtract 39 1
+ 43: 6(float) CompositeExtract 39 2
+ 44: 7(fvec4) CompositeConstruct 41 42 43 40
+ Store 37(FragColor) 44
+ 45: 7(fvec4) Load 37(FragColor)
+ 46: 8 Load 10(m34)
+ 47: 14(fvec3) VectorTimesMatrix 45 46
+ 48: 6(float) CompositeExtract 47 0
+ 49: 6(float) CompositeExtract 47 1
+ 50: 6(float) CompositeExtract 47 2
+ 51: 7(fvec4) CompositeConstruct 48 49 50 40
+ 52: 7(fvec4) Load 37(FragColor)
+ 53: 7(fvec4) FMul 52 51
+ Store 37(FragColor) 53
+ 57: 56(ptr) AccessChain 12(v) 55
+ 58: 6(float) Load 57
+ 59: 8 Load 10(m34)
+ 60: 8 MatrixTimesScalar 59 58
+ Store 10(m34) 60
+ 66: 8 Load 65(un34)
+ 67: 6(float) CompositeExtract 66 0 0
+ 68: 6(float) CompositeExtract 66 0 1
+ 69: 6(float) CompositeExtract 66 0 2
+ 70: 6(float) CompositeExtract 66 0 3
+ 71: 6(float) CompositeExtract 66 1 0
+ 72: 6(float) CompositeExtract 66 1 1
+ 73: 6(float) CompositeExtract 66 1 2
+ 74: 6(float) CompositeExtract 66 1 3
+ 75: 6(float) CompositeExtract 66 2 0
+ 76: 6(float) CompositeExtract 66 2 1
+ 77: 6(float) CompositeExtract 66 2 2
+ 78: 6(float) CompositeExtract 66 2 3
+ 79: 7(fvec4) CompositeConstruct 67 68 69 70
+ 80: 7(fvec4) CompositeConstruct 71 72 73 74
+ 81: 7(fvec4) CompositeConstruct 75 76 77 78
+ 82: 7(fvec4) CompositeConstruct 20 20 20 40
+ 83: 61 CompositeConstruct 79 80 81 82
+ Store 63(m44) 83
+ 84: 8 Load 10(m34)
+ 88: 85 Load 87(um43)
+ 89: 61 MatrixTimesMatrix 84 88
+ 90: 61 Load 63(m44)
+ 91: 7(fvec4) CompositeExtract 90 0
+ 92: 7(fvec4) CompositeExtract 89 0
+ 93: 7(fvec4) FAdd 91 92
+ 94: 7(fvec4) CompositeExtract 90 1
+ 95: 7(fvec4) CompositeExtract 89 1
+ 96: 7(fvec4) FAdd 94 95
+ 97: 7(fvec4) CompositeExtract 90 2
+ 98: 7(fvec4) CompositeExtract 89 2
+ 99: 7(fvec4) FAdd 97 98
+ 100: 7(fvec4) CompositeExtract 90 3
+ 101: 7(fvec4) CompositeExtract 89 3
+ 102: 7(fvec4) FAdd 100 101
+ 103: 61 CompositeConstruct 93 96 99 102
+ Store 63(m44) 103
+ 104: 61 Load 63(m44)
+ 105: 7(fvec4) CompositeExtract 104 0
+ 106: 7(fvec4) FNegate 105
+ 107: 7(fvec4) CompositeExtract 104 1
+ 108: 7(fvec4) FNegate 107
+ 109: 7(fvec4) CompositeExtract 104 2
+ 110: 7(fvec4) FNegate 109
+ 111: 7(fvec4) CompositeExtract 104 3
+ 112: 7(fvec4) FNegate 111
+ 113: 61 CompositeConstruct 106 108 110 112
+ 114: 7(fvec4) Load 12(v)
+ 115: 7(fvec4) MatrixTimesVector 113 114
+ 116: 7(fvec4) Load 37(FragColor)
+ 117: 7(fvec4) FAdd 116 115
+ Store 37(FragColor) 117
+ 118: 61 Load 63(m44)
+ 119: 61 Load 63(m44)
+ 120: 7(fvec4) CompositeExtract 118 0
+ 121: 7(fvec4) CompositeExtract 119 0
+ 122: 7(fvec4) FMul 120 121
+ 123: 7(fvec4) CompositeExtract 118 1
+ 124: 7(fvec4) CompositeExtract 119 1
+ 125: 7(fvec4) FMul 123 124
+ 126: 7(fvec4) CompositeExtract 118 2
+ 127: 7(fvec4) CompositeExtract 119 2
+ 128: 7(fvec4) FMul 126 127
+ 129: 7(fvec4) CompositeExtract 118 3
+ 130: 7(fvec4) CompositeExtract 119 3
+ 131: 7(fvec4) FMul 129 130
+ 132: 61 CompositeConstruct 122 125 128 131
+ 133: 7(fvec4) Load 37(FragColor)
+ 134: 7(fvec4) VectorTimesMatrix 133 132
+ Store 37(FragColor) 134
+ 135: 85 Load 87(um43)
+ 136: 8 Transpose 135
+ Store 10(m34) 136
+ 137: 7(fvec4) Load 37(FragColor)
+ 138: 8 Load 10(m34)
+ 139: 14(fvec3) VectorTimesMatrix 137 138
+ 140: 6(float) CompositeExtract 139 0
+ 141: 6(float) CompositeExtract 139 1
+ 142: 6(float) CompositeExtract 139 2
+ 143: 7(fvec4) CompositeConstruct 140 141 142 40
+ 144: 7(fvec4) Load 37(FragColor)
+ 145: 7(fvec4) FMul 144 143
+ Store 37(FragColor) 145
+ 148: 61 Load 147(um4)
+ 149: 6(float) ExtInst 1(GLSL.std.450) 33(Determinant) 148
+ 150: 7(fvec4) CompositeConstruct 149 149 149 149
+ 151: 7(fvec4) Load 37(FragColor)
+ 152: 7(fvec4) FMul 151 150
+ Store 37(FragColor) 152
+ 159: 154 Load 158(um2)
+ 160: 154 ExtInst 1(GLSL.std.450) 34(MatrixInverse) 159
+ Store 156(inv) 160
+ 164: 163(ptr) AccessChain 156(inv) 162 55
+ 165: 6(float) Load 164
+ 167: 163(ptr) AccessChain 156(inv) 166 55
+ 168: 6(float) Load 167
+ 170: 163(ptr) AccessChain 156(inv) 162 169
+ 171: 6(float) Load 170
+ 172: 163(ptr) AccessChain 156(inv) 166 169
+ 173: 6(float) Load 172
+ 174: 7(fvec4) CompositeConstruct 165 168 171 173
+ 175: 7(fvec4) Load 37(FragColor)
+ 176: 7(fvec4) FMul 175 174
+ Store 37(FragColor) 176
+ 182: 177 Load 181(um3)
+ 183: 177 ExtInst 1(GLSL.std.450) 34(MatrixInverse) 182
+ Store 179(inv3) 183
+ 185: 163(ptr) AccessChain 179(inv3) 184 169
+ 186: 6(float) Load 185
+ 187: 7(fvec4) CompositeConstruct 186 186 186 186
+ 188: 7(fvec4) Load 37(FragColor)
+ 189: 7(fvec4) FMul 188 187
+ Store 37(FragColor) 189
+ 191: 61 Load 147(um4)
+ 192: 61 ExtInst 1(GLSL.std.450) 34(MatrixInverse) 191
+ Store 190(inv4) 192
+ 193: 61 Load 190(inv4)
+ 194: 7(fvec4) Load 37(FragColor)
+ 195: 7(fvec4) VectorTimesMatrix 194 193
+ Store 37(FragColor) 195
+ 196: 7(fvec4) Load 37(FragColor)
+ 197: 8 Load 65(un34)
+ 198: 8 Load 65(un34)
+ 199: 7(fvec4) CompositeExtract 197 0
+ 200: 7(fvec4) CompositeExtract 198 0
+ 201: 7(fvec4) FMul 199 200
+ 202: 7(fvec4) CompositeExtract 197 1
+ 203: 7(fvec4) CompositeExtract 198 1
+ 204: 7(fvec4) FMul 202 203
+ 205: 7(fvec4) CompositeExtract 197 2
+ 206: 7(fvec4) CompositeExtract 198 2
+ 207: 7(fvec4) FMul 205 206
+ 208: 8 CompositeConstruct 201 204 207
+ 209: 14(fvec3) VectorTimesMatrix 196 208
+ 212: 211(ptr) AccessChain 37(FragColor) 210
+ 213: 6(float) Load 212
+ 214: 6(float) CompositeExtract 209 0
+ 215: 6(float) CompositeExtract 209 1
+ 216: 6(float) CompositeExtract 209 2
+ 217: 7(fvec4) CompositeConstruct 214 215 216 213
+ Store 37(FragColor) 217
+ Return
+ FunctionEnd
diff --git a/chromium/third_party/glslang/src/Test/baseResults/spv.memoryQualifier.frag.out b/chromium/third_party/glslang/src/Test/baseResults/spv.memoryQualifier.frag.out
new file mode 100644
index 00000000000..e2bfb392948
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/spv.memoryQualifier.frag.out
@@ -0,0 +1,181 @@
+spv.memoryQualifier.frag
+Warning, version 450 is not yet complete; most version-specific features are present, but some are missing.
+
+
+Linked fragment stage:
+
+
+// Module Version 10000
+// Generated by (magic number): 80001
+// Id's are bound by 97
+
+ Capability Shader
+ Capability SampledRect
+ Capability Sampled1D
+ 1: ExtInstImport "GLSL.std.450"
+ MemoryModel Logical GLSL450
+ EntryPoint Fragment 4 "main"
+ ExecutionMode 4 OriginUpperLeft
+ Source GLSL 450
+ Name 4 "main"
+ Name 9 "texel"
+ Name 12 "i1D"
+ Name 19 "i2D"
+ Name 28 "i2DRect"
+ Name 35 "i3D"
+ Name 44 "iCube"
+ Name 49 "Data"
+ MemberName 49(Data) 0 "f1"
+ MemberName 49(Data) 1 "f2"
+ Name 50 "Buffer"
+ MemberName 50(Buffer) 0 "f1"
+ MemberName 50(Buffer) 1 "f2"
+ MemberName 50(Buffer) 2 "f3"
+ MemberName 50(Buffer) 3 "f4"
+ MemberName 50(Buffer) 4 "i1"
+ MemberName 50(Buffer) 5 "data"
+ Name 52 ""
+ Decorate 12(i1D) DescriptorSet 0
+ Decorate 12(i1D) Binding 0
+ Decorate 12(i1D) Coherent
+ Decorate 19(i2D) DescriptorSet 0
+ Decorate 19(i2D) Binding 1
+ Decorate 19(i2D) Volatile
+ Decorate 28(i2DRect) DescriptorSet 0
+ Decorate 28(i2DRect) Binding 2
+ Decorate 28(i2DRect) Restrict
+ Decorate 35(i3D) DescriptorSet 0
+ Decorate 35(i3D) Binding 3
+ Decorate 35(i3D) NonWritable
+ Decorate 44(iCube) DescriptorSet 0
+ Decorate 44(iCube) Binding 3
+ Decorate 44(iCube) NonReadable
+ MemberDecorate 49(Data) 0 Coherent
+ MemberDecorate 49(Data) 0 Offset 0
+ MemberDecorate 49(Data) 1 Coherent
+ MemberDecorate 49(Data) 1 Offset 8
+ MemberDecorate 50(Buffer) 0 Coherent
+ MemberDecorate 50(Buffer) 0 Volatile
+ MemberDecorate 50(Buffer) 0 Offset 0
+ MemberDecorate 50(Buffer) 1 Coherent
+ MemberDecorate 50(Buffer) 1 Restrict
+ MemberDecorate 50(Buffer) 1 Offset 8
+ MemberDecorate 50(Buffer) 2 Coherent
+ MemberDecorate 50(Buffer) 2 NonWritable
+ MemberDecorate 50(Buffer) 2 Offset 16
+ MemberDecorate 50(Buffer) 3 Coherent
+ MemberDecorate 50(Buffer) 3 NonReadable
+ MemberDecorate 50(Buffer) 3 Offset 32
+ MemberDecorate 50(Buffer) 4 Coherent
+ MemberDecorate 50(Buffer) 4 Offset 48
+ MemberDecorate 50(Buffer) 5 Coherent
+ MemberDecorate 50(Buffer) 5 Offset 56
+ Decorate 50(Buffer) BufferBlock
+ Decorate 52 DescriptorSet 0
+ 2: TypeVoid
+ 3: TypeFunction 2
+ 6: TypeFloat 32
+ 7: TypeVector 6(float) 4
+ 8: TypePointer Function 7(fvec4)
+ 10: TypeImage 6(float) 1D nonsampled format:R32f
+ 11: TypePointer UniformConstant 10
+ 12(i1D): 11(ptr) Variable UniformConstant
+ 14: TypeInt 32 1
+ 15: 14(int) Constant 1
+ 17: TypeImage 6(float) 2D nonsampled format:R32f
+ 18: TypePointer UniformConstant 17
+ 19(i2D): 18(ptr) Variable UniformConstant
+ 21: TypeVector 14(int) 2
+ 22: 21(ivec2) ConstantComposite 15 15
+ 26: TypeImage 6(float) Rect nonsampled format:R32f
+ 27: TypePointer UniformConstant 26
+ 28(i2DRect): 27(ptr) Variable UniformConstant
+ 33: TypeImage 6(float) 3D nonsampled format:R32f
+ 34: TypePointer UniformConstant 33
+ 35(i3D): 34(ptr) Variable UniformConstant
+ 37: TypeVector 14(int) 3
+ 38: 37(ivec3) ConstantComposite 15 15 15
+ 42: TypeImage 6(float) Cube nonsampled format:R32f
+ 43: TypePointer UniformConstant 42
+ 44(iCube): 43(ptr) Variable UniformConstant
+ 47: TypeVector 6(float) 2
+ 48: TypeVector 6(float) 3
+ 49(Data): TypeStruct 6(float) 47(fvec2)
+ 50(Buffer): TypeStruct 6(float) 47(fvec2) 48(fvec3) 7(fvec4) 14(int) 49(Data)
+ 51: TypePointer Uniform 50(Buffer)
+ 52: 51(ptr) Variable Uniform
+ 53: 14(int) Constant 4
+ 54: TypePointer Uniform 14(int)
+ 57: 14(int) Constant 0
+ 58: TypePointer Uniform 6(float)
+ 61: TypePointer Function 6(float)
+ 63: TypePointer Uniform 47(fvec2)
+ 71: 14(int) Constant 2
+ 72: TypePointer Uniform 48(fvec3)
+ 80: 14(int) Constant 5
+ 83: TypeInt 32 0
+ 84: 83(int) Constant 1
+ 88: 83(int) Constant 3
+ 93: 14(int) Constant 3
+ 95: TypePointer Uniform 7(fvec4)
+ 4(main): 2 Function None 3
+ 5: Label
+ 9(texel): 8(ptr) Variable Function
+ 13: 10 Load 12(i1D)
+ 16: 7(fvec4) ImageRead 13 15
+ Store 9(texel) 16
+ 20: 17 Load 19(i2D)
+ 23: 7(fvec4) ImageRead 20 22
+ 24: 7(fvec4) Load 9(texel)
+ 25: 7(fvec4) FAdd 24 23
+ Store 9(texel) 25
+ 29: 26 Load 28(i2DRect)
+ 30: 7(fvec4) ImageRead 29 22
+ 31: 7(fvec4) Load 9(texel)
+ 32: 7(fvec4) FAdd 31 30
+ Store 9(texel) 32
+ 36: 33 Load 35(i3D)
+ 39: 7(fvec4) ImageRead 36 38
+ 40: 7(fvec4) Load 9(texel)
+ 41: 7(fvec4) FAdd 40 39
+ Store 9(texel) 41
+ 45: 42 Load 44(iCube)
+ 46: 7(fvec4) Load 9(texel)
+ ImageWrite 45 38 46
+ 55: 54(ptr) AccessChain 52 53
+ 56: 14(int) Load 55
+ 59: 58(ptr) AccessChain 52 57
+ 60: 6(float) Load 59
+ 62: 61(ptr) AccessChain 9(texel) 56
+ Store 62 60
+ 64: 63(ptr) AccessChain 52 15
+ 65: 47(fvec2) Load 64
+ 66: 7(fvec4) Load 9(texel)
+ 67: 47(fvec2) VectorShuffle 66 66 0 1
+ 68: 47(fvec2) FAdd 67 65
+ 69: 7(fvec4) Load 9(texel)
+ 70: 7(fvec4) VectorShuffle 69 68 4 5 2 3
+ Store 9(texel) 70
+ 73: 72(ptr) AccessChain 52 71
+ 74: 48(fvec3) Load 73
+ 75: 7(fvec4) Load 9(texel)
+ 76: 48(fvec3) VectorShuffle 75 75 0 1 2
+ 77: 48(fvec3) FSub 76 74
+ 78: 7(fvec4) Load 9(texel)
+ 79: 7(fvec4) VectorShuffle 78 77 4 5 6 3
+ Store 9(texel) 79
+ 81: 58(ptr) AccessChain 52 80 57
+ 82: 6(float) Load 81
+ 85: 58(ptr) AccessChain 52 80 15 84
+ 86: 6(float) Load 85
+ 87: 6(float) FAdd 82 86
+ 89: 61(ptr) AccessChain 9(texel) 88
+ 90: 6(float) Load 89
+ 91: 6(float) FAdd 90 87
+ 92: 61(ptr) AccessChain 9(texel) 88
+ Store 92 91
+ 94: 7(fvec4) Load 9(texel)
+ 96: 95(ptr) AccessChain 52 93
+ Store 96 94
+ Return
+ FunctionEnd
diff --git a/chromium/third_party/glslang/src/Test/baseResults/spv.merge-unreachable.frag.out b/chromium/third_party/glslang/src/Test/baseResults/spv.merge-unreachable.frag.out
new file mode 100644
index 00000000000..6e326187b21
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/spv.merge-unreachable.frag.out
@@ -0,0 +1,47 @@
+spv.merge-unreachable.frag
+Warning, version 450 is not yet complete; most version-specific features are present, but some are missing.
+
+
+Linked fragment stage:
+
+
+// Module Version 10000
+// Generated by (magic number): 80001
+// Id's are bound by 25
+
+ Capability Shader
+ 1: ExtInstImport "GLSL.std.450"
+ MemoryModel Logical GLSL450
+ EntryPoint Fragment 4 "main" 9
+ ExecutionMode 4 OriginUpperLeft
+ Source GLSL 450
+ Name 4 "main"
+ Name 9 "v"
+ Decorate 9(v) Location 1
+ 2: TypeVoid
+ 3: TypeFunction 2
+ 6: TypeFloat 32
+ 7: TypeVector 6(float) 4
+ 8: TypePointer Input 7(fvec4)
+ 9(v): 8(ptr) Variable Input
+ 11: 6(float) Constant 1036831949
+ 12: 6(float) Constant 1045220557
+ 13: 6(float) Constant 1050253722
+ 14: 6(float) Constant 1053609165
+ 15: 7(fvec4) ConstantComposite 11 12 13 14
+ 16: TypeBool
+ 17: TypeVector 16(bool) 4
+ 4(main): 2 Function None 3
+ 5: Label
+ 10: 7(fvec4) Load 9(v)
+ 18: 17(bvec4) FOrdEqual 10 15
+ 19: 16(bool) All 18
+ SelectionMerge 21 None
+ BranchConditional 19 20 23
+ 20: Label
+ Kill
+ 23: Label
+ Return
+ 21: Label
+ Return
+ FunctionEnd
diff --git a/chromium/third_party/glslang/src/Test/baseResults/spv.newTexture.frag.out b/chromium/third_party/glslang/src/Test/baseResults/spv.newTexture.frag.out
new file mode 100755
index 00000000000..4390e26d401
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/spv.newTexture.frag.out
@@ -0,0 +1,385 @@
+spv.newTexture.frag
+Warning, version 430 is not yet complete; most version-specific features are present, but some are missing.
+
+
+Linked fragment stage:
+
+
+// Module Version 10000
+// Generated by (magic number): 80001
+// Id's are bound by 282
+
+ Capability Shader
+ Capability SampledRect
+ Capability SampledCubeArray
+ Capability ImageQuery
+ 1: ExtInstImport "GLSL.std.450"
+ MemoryModel Logical GLSL450
+ EntryPoint Fragment 4 "main" 17 26 29 55 81 84 92 251 281
+ ExecutionMode 4 OriginUpperLeft
+ Source GLSL 430
+ Name 4 "main"
+ Name 9 "v"
+ Name 13 "s2D"
+ Name 17 "c2D"
+ Name 23 "sCubeArrayShadow"
+ Name 26 "c4D"
+ Name 29 "c1D"
+ Name 42 "s3D"
+ Name 51 "s2DArray"
+ Name 55 "c3D"
+ Name 64 "s2DShadow"
+ Name 81 "ic3D"
+ Name 84 "ic1D"
+ Name 92 "ic2D"
+ Name 102 "sr"
+ Name 128 "sCube"
+ Name 139 "s2DArrayShadow"
+ Name 167 "iv"
+ Name 171 "is2D"
+ Name 206 "is3D"
+ Name 218 "isCube"
+ Name 230 "is2DArray"
+ Name 241 "iv2"
+ Name 245 "sCubeShadow"
+ Name 251 "FragData"
+ Name 263 "is2Dms"
+ Name 267 "us2D"
+ Name 271 "us3D"
+ Name 275 "usCube"
+ Name 279 "us2DArray"
+ Name 281 "ic4D"
+ Decorate 13(s2D) DescriptorSet 0
+ Decorate 23(sCubeArrayShadow) DescriptorSet 0
+ Decorate 42(s3D) DescriptorSet 0
+ Decorate 51(s2DArray) DescriptorSet 0
+ Decorate 64(s2DShadow) DescriptorSet 0
+ Decorate 81(ic3D) Flat
+ Decorate 84(ic1D) Flat
+ Decorate 92(ic2D) Flat
+ Decorate 102(sr) DescriptorSet 0
+ Decorate 128(sCube) DescriptorSet 0
+ Decorate 139(s2DArrayShadow) DescriptorSet 0
+ Decorate 171(is2D) DescriptorSet 0
+ Decorate 206(is3D) DescriptorSet 0
+ Decorate 218(isCube) DescriptorSet 0
+ Decorate 230(is2DArray) DescriptorSet 0
+ Decorate 245(sCubeShadow) DescriptorSet 0
+ Decorate 263(is2Dms) DescriptorSet 0
+ Decorate 267(us2D) DescriptorSet 0
+ Decorate 271(us3D) DescriptorSet 0
+ Decorate 275(usCube) DescriptorSet 0
+ Decorate 279(us2DArray) DescriptorSet 0
+ Decorate 281(ic4D) Flat
+ 2: TypeVoid
+ 3: TypeFunction 2
+ 6: TypeFloat 32
+ 7: TypeVector 6(float) 4
+ 8: TypePointer Function 7(fvec4)
+ 10: TypeImage 6(float) 2D sampled format:Unknown
+ 11: TypeSampledImage 10
+ 12: TypePointer UniformConstant 11
+ 13(s2D): 12(ptr) Variable UniformConstant
+ 15: TypeVector 6(float) 2
+ 16: TypePointer Input 15(fvec2)
+ 17(c2D): 16(ptr) Variable Input
+ 20: TypeImage 6(float) Cube depth array sampled format:Unknown
+ 21: TypeSampledImage 20
+ 22: TypePointer UniformConstant 21
+23(sCubeArrayShadow): 22(ptr) Variable UniformConstant
+ 25: TypePointer Input 7(fvec4)
+ 26(c4D): 25(ptr) Variable Input
+ 28: TypePointer Input 6(float)
+ 29(c1D): 28(ptr) Variable Input
+ 32: TypeInt 32 0
+ 33: 32(int) Constant 1
+ 34: TypePointer Function 6(float)
+ 39: TypeImage 6(float) 3D sampled format:Unknown
+ 40: TypeSampledImage 39
+ 41: TypePointer UniformConstant 40
+ 42(s3D): 41(ptr) Variable UniformConstant
+ 48: TypeImage 6(float) 2D array sampled format:Unknown
+ 49: TypeSampledImage 48
+ 50: TypePointer UniformConstant 49
+ 51(s2DArray): 50(ptr) Variable UniformConstant
+ 53: TypeVector 6(float) 3
+ 54: TypePointer Input 53(fvec3)
+ 55(c3D): 54(ptr) Variable Input
+ 57: 6(float) Constant 1067030938
+ 61: TypeImage 6(float) 2D depth sampled format:Unknown
+ 62: TypeSampledImage 61
+ 63: TypePointer UniformConstant 62
+ 64(s2DShadow): 63(ptr) Variable UniformConstant
+ 67: TypeInt 32 1
+ 68: TypeVector 67(int) 2
+ 69: 67(int) Constant 3
+ 70: 68(ivec2) ConstantComposite 69 69
+ 79: TypeVector 67(int) 3
+ 80: TypePointer Input 79(ivec3)
+ 81(ic3D): 80(ptr) Variable Input
+ 83: TypePointer Input 67(int)
+ 84(ic1D): 83(ptr) Variable Input
+ 91: TypePointer Input 68(ivec2)
+ 92(ic2D): 91(ptr) Variable Input
+ 94: 67(int) Constant 4
+ 99: TypeImage 6(float) Rect sampled format:Unknown
+ 100: TypeSampledImage 99
+ 101: TypePointer UniformConstant 100
+ 102(sr): 101(ptr) Variable UniformConstant
+ 105: 68(ivec2) ConstantComposite 94 94
+ 125: TypeImage 6(float) Cube sampled format:Unknown
+ 126: TypeSampledImage 125
+ 127: TypePointer UniformConstant 126
+ 128(sCube): 127(ptr) Variable UniformConstant
+ 136: TypeImage 6(float) 2D depth array sampled format:Unknown
+ 137: TypeSampledImage 136
+ 138: TypePointer UniformConstant 137
+139(s2DArrayShadow): 138(ptr) Variable UniformConstant
+ 146: 32(int) Constant 0
+ 165: TypeVector 67(int) 4
+ 166: TypePointer Function 165(ivec4)
+ 168: TypeImage 67(int) 2D sampled format:Unknown
+ 169: TypeSampledImage 168
+ 170: TypePointer UniformConstant 169
+ 171(is2D): 170(ptr) Variable UniformConstant
+ 203: TypeImage 67(int) 3D sampled format:Unknown
+ 204: TypeSampledImage 203
+ 205: TypePointer UniformConstant 204
+ 206(is3D): 205(ptr) Variable UniformConstant
+ 209: 6(float) Constant 1082549862
+ 215: TypeImage 67(int) Cube sampled format:Unknown
+ 216: TypeSampledImage 215
+ 217: TypePointer UniformConstant 216
+ 218(isCube): 217(ptr) Variable UniformConstant
+ 227: TypeImage 67(int) 2D array sampled format:Unknown
+ 228: TypeSampledImage 227
+ 229: TypePointer UniformConstant 228
+ 230(is2DArray): 229(ptr) Variable UniformConstant
+ 240: TypePointer Function 68(ivec2)
+ 242: TypeImage 6(float) Cube depth sampled format:Unknown
+ 243: TypeSampledImage 242
+ 244: TypePointer UniformConstant 243
+245(sCubeShadow): 244(ptr) Variable UniformConstant
+ 247: 67(int) Constant 2
+ 250: TypePointer Output 7(fvec4)
+ 251(FragData): 250(ptr) Variable Output
+ 255: 6(float) Constant 0
+ 260: TypeImage 67(int) 2D multi-sampled sampled format:Unknown
+ 261: TypeSampledImage 260
+ 262: TypePointer UniformConstant 261
+ 263(is2Dms): 262(ptr) Variable UniformConstant
+ 264: TypeImage 32(int) 2D sampled format:Unknown
+ 265: TypeSampledImage 264
+ 266: TypePointer UniformConstant 265
+ 267(us2D): 266(ptr) Variable UniformConstant
+ 268: TypeImage 32(int) 3D sampled format:Unknown
+ 269: TypeSampledImage 268
+ 270: TypePointer UniformConstant 269
+ 271(us3D): 270(ptr) Variable UniformConstant
+ 272: TypeImage 32(int) Cube sampled format:Unknown
+ 273: TypeSampledImage 272
+ 274: TypePointer UniformConstant 273
+ 275(usCube): 274(ptr) Variable UniformConstant
+ 276: TypeImage 32(int) 2D array sampled format:Unknown
+ 277: TypeSampledImage 276
+ 278: TypePointer UniformConstant 277
+ 279(us2DArray): 278(ptr) Variable UniformConstant
+ 280: TypePointer Input 165(ivec4)
+ 281(ic4D): 280(ptr) Variable Input
+ 4(main): 2 Function None 3
+ 5: Label
+ 9(v): 8(ptr) Variable Function
+ 167(iv): 166(ptr) Variable Function
+ 241(iv2): 240(ptr) Variable Function
+ 14: 11 Load 13(s2D)
+ 18: 15(fvec2) Load 17(c2D)
+ 19: 7(fvec4) ImageSampleImplicitLod 14 18
+ Store 9(v) 19
+ 24: 21 Load 23(sCubeArrayShadow)
+ 27: 7(fvec4) Load 26(c4D)
+ 30: 6(float) Load 29(c1D)
+ 31: 6(float) ImageSampleDrefImplicitLod 24 27 30
+ 35: 34(ptr) AccessChain 9(v) 33
+ 36: 6(float) Load 35
+ 37: 6(float) FAdd 36 31
+ 38: 34(ptr) AccessChain 9(v) 33
+ Store 38 37
+ 43: 40 Load 42(s3D)
+ 44: 7(fvec4) Load 26(c4D)
+ 45: 7(fvec4) ImageSampleProjImplicitLod 43 44
+ 46: 7(fvec4) Load 9(v)
+ 47: 7(fvec4) FAdd 46 45
+ Store 9(v) 47
+ 52: 49 Load 51(s2DArray)
+ 56: 53(fvec3) Load 55(c3D)
+ 58: 7(fvec4) ImageSampleExplicitLod 52 56 Lod 57
+ 59: 7(fvec4) Load 9(v)
+ 60: 7(fvec4) FAdd 59 58
+ Store 9(v) 60
+ 65: 62 Load 64(s2DShadow)
+ 66: 53(fvec3) Load 55(c3D)
+ 71: 6(float) Load 29(c1D)
+ 72: 6(float) CompositeExtract 66 2
+ 73: 6(float) ImageSampleDrefImplicitLod 65 66 72 Bias ConstOffset 71 70
+ 74: 34(ptr) AccessChain 9(v) 33
+ 75: 6(float) Load 74
+ 76: 6(float) FAdd 75 73
+ 77: 34(ptr) AccessChain 9(v) 33
+ Store 77 76
+ 78: 40 Load 42(s3D)
+ 82: 79(ivec3) Load 81(ic3D)
+ 85: 67(int) Load 84(ic1D)
+ 86: 39 Image 78
+ 87: 7(fvec4) ImageFetch 86 82 Lod 85
+ 88: 7(fvec4) Load 9(v)
+ 89: 7(fvec4) FAdd 88 87
+ Store 9(v) 89
+ 90: 11 Load 13(s2D)
+ 93: 68(ivec2) Load 92(ic2D)
+ 95: 10 Image 90
+ 96: 7(fvec4) ImageFetch 95 93 Lod ConstOffset 94 70
+ 97: 7(fvec4) Load 9(v)
+ 98: 7(fvec4) FAdd 97 96
+ Store 9(v) 98
+ 103: 100 Load 102(sr)
+ 104: 68(ivec2) Load 92(ic2D)
+ 106: 99 Image 103
+ 107: 7(fvec4) ImageFetch 106 104 ConstOffset 105
+ 108: 7(fvec4) Load 9(v)
+ 109: 7(fvec4) FAdd 108 107
+ Store 9(v) 109
+ 110: 62 Load 64(s2DShadow)
+ 111: 53(fvec3) Load 55(c3D)
+ 112: 6(float) Load 29(c1D)
+ 113: 6(float) CompositeExtract 111 2
+ 114: 6(float) ImageSampleDrefExplicitLod 110 111 113 Lod ConstOffset 112 70
+ 115: 34(ptr) AccessChain 9(v) 33
+ 116: 6(float) Load 115
+ 117: 6(float) FAdd 116 114
+ 118: 34(ptr) AccessChain 9(v) 33
+ Store 118 117
+ 119: 11 Load 13(s2D)
+ 120: 53(fvec3) Load 55(c3D)
+ 121: 6(float) Load 29(c1D)
+ 122: 7(fvec4) ImageSampleProjExplicitLod 119 120 Lod ConstOffset 121 70
+ 123: 7(fvec4) Load 9(v)
+ 124: 7(fvec4) FAdd 123 122
+ Store 9(v) 124
+ 129: 126 Load 128(sCube)
+ 130: 53(fvec3) Load 55(c3D)
+ 131: 53(fvec3) Load 55(c3D)
+ 132: 53(fvec3) Load 55(c3D)
+ 133: 7(fvec4) ImageSampleExplicitLod 129 130 Grad 131 132
+ 134: 7(fvec4) Load 9(v)
+ 135: 7(fvec4) FAdd 134 133
+ Store 9(v) 135
+ 140: 137 Load 139(s2DArrayShadow)
+ 141: 7(fvec4) Load 26(c4D)
+ 142: 15(fvec2) Load 17(c2D)
+ 143: 15(fvec2) Load 17(c2D)
+ 144: 6(float) CompositeExtract 141 3
+ 145: 6(float) ImageSampleDrefExplicitLod 140 141 144 Grad ConstOffset 142 143 70
+ 147: 34(ptr) AccessChain 9(v) 146
+ 148: 6(float) Load 147
+ 149: 6(float) FAdd 148 145
+ 150: 34(ptr) AccessChain 9(v) 146
+ Store 150 149
+ 151: 40 Load 42(s3D)
+ 152: 7(fvec4) Load 26(c4D)
+ 153: 53(fvec3) Load 55(c3D)
+ 154: 53(fvec3) Load 55(c3D)
+ 155: 7(fvec4) ImageSampleProjExplicitLod 151 152 Grad 153 154
+ 156: 7(fvec4) Load 9(v)
+ 157: 7(fvec4) FAdd 156 155
+ Store 9(v) 157
+ 158: 11 Load 13(s2D)
+ 159: 53(fvec3) Load 55(c3D)
+ 160: 15(fvec2) Load 17(c2D)
+ 161: 15(fvec2) Load 17(c2D)
+ 162: 7(fvec4) ImageSampleProjExplicitLod 158 159 Grad ConstOffset 160 161 70
+ 163: 7(fvec4) Load 9(v)
+ 164: 7(fvec4) FAdd 163 162
+ Store 9(v) 164
+ 172: 169 Load 171(is2D)
+ 173: 15(fvec2) Load 17(c2D)
+ 174: 165(ivec4) ImageSampleImplicitLod 172 173
+ Store 167(iv) 174
+ 175: 165(ivec4) Load 167(iv)
+ 176: 7(fvec4) ConvertSToF 175
+ 177: 7(fvec4) Load 9(v)
+ 178: 7(fvec4) FAdd 177 176
+ Store 9(v) 178
+ 179: 169 Load 171(is2D)
+ 180: 7(fvec4) Load 26(c4D)
+ 181: 165(ivec4) ImageSampleProjImplicitLod 179 180 ConstOffset 70
+ Store 167(iv) 181
+ 182: 165(ivec4) Load 167(iv)
+ 183: 7(fvec4) ConvertSToF 182
+ 184: 7(fvec4) Load 9(v)
+ 185: 7(fvec4) FAdd 184 183
+ Store 9(v) 185
+ 186: 169 Load 171(is2D)
+ 187: 53(fvec3) Load 55(c3D)
+ 188: 6(float) Load 29(c1D)
+ 189: 165(ivec4) ImageSampleProjExplicitLod 186 187 Lod 188
+ Store 167(iv) 189
+ 190: 165(ivec4) Load 167(iv)
+ 191: 7(fvec4) ConvertSToF 190
+ 192: 7(fvec4) Load 9(v)
+ 193: 7(fvec4) FAdd 192 191
+ Store 9(v) 193
+ 194: 169 Load 171(is2D)
+ 195: 53(fvec3) Load 55(c3D)
+ 196: 15(fvec2) Load 17(c2D)
+ 197: 15(fvec2) Load 17(c2D)
+ 198: 165(ivec4) ImageSampleProjExplicitLod 194 195 Grad 196 197
+ Store 167(iv) 198
+ 199: 165(ivec4) Load 167(iv)
+ 200: 7(fvec4) ConvertSToF 199
+ 201: 7(fvec4) Load 9(v)
+ 202: 7(fvec4) FAdd 201 200
+ Store 9(v) 202
+ 207: 204 Load 206(is3D)
+ 208: 53(fvec3) Load 55(c3D)
+ 210: 165(ivec4) ImageSampleImplicitLod 207 208 Bias 209
+ Store 167(iv) 210
+ 211: 165(ivec4) Load 167(iv)
+ 212: 7(fvec4) ConvertSToF 211
+ 213: 7(fvec4) Load 9(v)
+ 214: 7(fvec4) FAdd 213 212
+ Store 9(v) 214
+ 219: 216 Load 218(isCube)
+ 220: 53(fvec3) Load 55(c3D)
+ 221: 6(float) Load 29(c1D)
+ 222: 165(ivec4) ImageSampleExplicitLod 219 220 Lod 221
+ Store 167(iv) 222
+ 223: 165(ivec4) Load 167(iv)
+ 224: 7(fvec4) ConvertSToF 223
+ 225: 7(fvec4) Load 9(v)
+ 226: 7(fvec4) FAdd 225 224
+ Store 9(v) 226
+ 231: 228 Load 230(is2DArray)
+ 232: 79(ivec3) Load 81(ic3D)
+ 233: 67(int) Load 84(ic1D)
+ 234: 227 Image 231
+ 235: 165(ivec4) ImageFetch 234 232 Lod 233
+ Store 167(iv) 235
+ 236: 165(ivec4) Load 167(iv)
+ 237: 7(fvec4) ConvertSToF 236
+ 238: 7(fvec4) Load 9(v)
+ 239: 7(fvec4) FAdd 238 237
+ Store 9(v) 239
+ 246: 243 Load 245(sCubeShadow)
+ 248: 242 Image 246
+ 249: 68(ivec2) ImageQuerySizeLod 248 247
+ Store 241(iv2) 249
+ 252: 7(fvec4) Load 9(v)
+ 253: 68(ivec2) Load 241(iv2)
+ 254: 15(fvec2) ConvertSToF 253
+ 256: 6(float) CompositeExtract 254 0
+ 257: 6(float) CompositeExtract 254 1
+ 258: 7(fvec4) CompositeConstruct 256 257 255 255
+ 259: 7(fvec4) FAdd 252 258
+ Store 251(FragData) 259
+ Return
+ FunctionEnd
diff --git a/chromium/third_party/glslang/src/Test/baseResults/spv.noDeadDecorations.vert.out b/chromium/third_party/glslang/src/Test/baseResults/spv.noDeadDecorations.vert.out
new file mode 100644
index 00000000000..e9b23566a4b
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/spv.noDeadDecorations.vert.out
@@ -0,0 +1,64 @@
+spv.noDeadDecorations.vert
+Warning, version 310 is not yet complete; most version-specific features are present, but some are missing.
+
+
+Linked vertex stage:
+
+
+// Module Version 10000
+// Generated by (magic number): 80001
+// Id's are bound by 32
+
+ Capability Shader
+ 1: ExtInstImport "GLSL.std.450"
+ MemoryModel Logical GLSL450
+ EntryPoint Vertex 4 "main" 22
+ Source ESSL 310
+ Name 4 "main"
+ Name 10 "func(f1;"
+ Name 9 "a"
+ Name 20 "gl_PerVertex"
+ MemberName 20(gl_PerVertex) 0 "gl_Position"
+ MemberName 20(gl_PerVertex) 1 "gl_PointSize"
+ Name 22 ""
+ Name 26 "param"
+ Decorate 10(func(f1;) RelaxedPrecision
+ Decorate 9(a) RelaxedPrecision
+ Decorate 12 RelaxedPrecision
+ Decorate 13 RelaxedPrecision
+ MemberDecorate 20(gl_PerVertex) 0 BuiltIn Position
+ MemberDecorate 20(gl_PerVertex) 1 BuiltIn PointSize
+ Decorate 20(gl_PerVertex) Block
+ Decorate 27 RelaxedPrecision
+ 2: TypeVoid
+ 3: TypeFunction 2
+ 6: TypeFloat 32
+ 7: TypePointer Function 6(float)
+ 8: TypeFunction 6(float) 7(ptr)
+ 16: 6(float) Constant 3212836864
+ 19: TypeVector 6(float) 4
+20(gl_PerVertex): TypeStruct 19(fvec4) 6(float)
+ 21: TypePointer Output 20(gl_PerVertex)
+ 22: 21(ptr) Variable Output
+ 23: TypeInt 32 1
+ 24: 23(int) Constant 0
+ 25: 6(float) Constant 0
+ 28: TypeInt 32 0
+ 29: 28(int) Constant 0
+ 30: TypePointer Output 6(float)
+ 4(main): 2 Function None 3
+ 5: Label
+ 26(param): 7(ptr) Variable Function
+ Store 26(param) 25
+ 27: 6(float) FunctionCall 10(func(f1;) 26(param)
+ 31: 30(ptr) AccessChain 22 24 29
+ Store 31 27
+ Return
+ FunctionEnd
+ 10(func(f1;): 6(float) Function None 8
+ 9(a): 7(ptr) FunctionParameter
+ 11: Label
+ 12: 6(float) Load 9(a)
+ 13: 6(float) FNegate 12
+ ReturnValue 13
+ FunctionEnd
diff --git a/chromium/third_party/glslang/src/Test/baseResults/spv.nonSquare.vert.out b/chromium/third_party/glslang/src/Test/baseResults/spv.nonSquare.vert.out
new file mode 100755
index 00000000000..329a71cb299
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/spv.nonSquare.vert.out
@@ -0,0 +1,116 @@
+spv.nonSquare.vert
+
+Linked vertex stage:
+
+
+// Module Version 10000
+// Generated by (magic number): 80001
+// Id's are bound by 90
+
+ Capability Shader
+ 1: ExtInstImport "GLSL.std.450"
+ MemoryModel Logical GLSL450
+ EntryPoint Vertex 4 "main" 12 22 28 55
+ Source GLSL 140
+ Name 4 "main"
+ Name 9 "a"
+ Name 12 "v3"
+ Name 16 "m23"
+ Name 19 "b"
+ Name 22 "m32"
+ Name 28 "gl_Position"
+ Name 55 "v4"
+ Decorate 28(gl_Position) BuiltIn Position
+ 2: TypeVoid
+ 3: TypeFunction 2
+ 6: TypeFloat 32
+ 7: TypeVector 6(float) 2
+ 8: TypePointer Function 7(fvec2)
+ 10: TypeVector 6(float) 3
+ 11: TypePointer Input 10(fvec3)
+ 12(v3): 11(ptr) Variable Input
+ 14: TypeMatrix 10(fvec3) 2
+ 15: TypePointer Function 14
+ 20: TypeMatrix 7(fvec2) 3
+ 21: TypePointer Output 20
+ 22(m32): 21(ptr) Variable Output
+ 26: TypeVector 6(float) 4
+ 27: TypePointer Output 26(fvec4)
+ 28(gl_Position): 27(ptr) Variable Output
+ 31: TypeMatrix 10(fvec3) 3
+ 35: 6(float) Constant 0
+ 40: TypeMatrix 26(fvec4) 4
+ 41: 6(float) Constant 1077936128
+ 42: 6(float) Constant 1086324736
+ 43: 26(fvec4) ConstantComposite 41 42 35 35
+ 44: 6(float) Constant 1091567616
+ 45: 6(float) Constant 1094713344
+ 46: 26(fvec4) ConstantComposite 44 45 35 35
+ 47: 6(float) Constant 1097859072
+ 48: 6(float) Constant 1099956224
+ 49: 26(fvec4) ConstantComposite 47 48 35 35
+ 50: 6(float) Constant 1101529088
+ 51: 6(float) Constant 1103101952
+ 52: 26(fvec4) ConstantComposite 50 51 35 35
+ 53: 40 ConstantComposite 43 46 49 52
+ 54: TypePointer Input 26(fvec4)
+ 55(v4): 54(ptr) Variable Input
+ 59: 6(float) Constant 1112014848
+ 60: 6(float) Constant 1121714176
+ 61: 6(float) Constant 1126825984
+ 62: 6(float) Constant 1130758144
+ 63: 26(fvec4) ConstantComposite 59 60 61 62
+ 65: 6(float) Constant 1106247680
+ 66: 6(float) Constant 1114636288
+ 67: 26(fvec4) ConstantComposite 65 66 35 35
+ 69: 6(float) Constant 1101004800
+ 70: 6(float) Constant 1092616192
+ 71: 6(float) Constant 1084227584
+ 72: 26(fvec4) ConstantComposite 69 70 42 71
+ 74: 7(fvec2) ConstantComposite 70 69
+ 75: TypeMatrix 26(fvec4) 2
+ 76: 26(fvec4) ConstantComposite 41 35 35 35
+ 77: 26(fvec4) ConstantComposite 35 41 35 35
+ 78: 75 ConstantComposite 76 77
+ 79: TypeMatrix 7(fvec2) 4
+ 80: 6(float) Constant 1065353216
+ 81: 6(float) Constant 1073741824
+ 82: 7(fvec2) ConstantComposite 80 81
+ 83: 6(float) Constant 1082130432
+ 84: 7(fvec2) ConstantComposite 41 83
+ 85: 7(fvec2) ConstantComposite 71 42
+ 86: 6(float) Constant 1088421888
+ 87: 6(float) Constant 1090519040
+ 88: 7(fvec2) ConstantComposite 86 87
+ 89: 79 ConstantComposite 82 84 85 88
+ 4(main): 2 Function None 3
+ 5: Label
+ 9(a): 8(ptr) Variable Function
+ 16(m23): 15(ptr) Variable Function
+ 19(b): 8(ptr) Variable Function
+ 13: 10(fvec3) Load 12(v3)
+ 17: 14 Load 16(m23)
+ 18: 7(fvec2) VectorTimesMatrix 13 17
+ Store 9(a) 18
+ 23: 20 Load 22(m32)
+ 24: 10(fvec3) Load 12(v3)
+ 25: 7(fvec2) MatrixTimesVector 23 24
+ Store 19(b) 25
+ 29: 14 Load 16(m23)
+ 30: 20 Load 22(m32)
+ 32: 31 MatrixTimesMatrix 29 30
+ 33: 10(fvec3) Load 12(v3)
+ 34: 10(fvec3) MatrixTimesVector 32 33
+ 36: 6(float) CompositeExtract 34 0
+ 37: 6(float) CompositeExtract 34 1
+ 38: 6(float) CompositeExtract 34 2
+ 39: 26(fvec4) CompositeConstruct 36 37 38 35
+ 56: 26(fvec4) Load 55(v4)
+ 57: 26(fvec4) MatrixTimesVector 53 56
+ 58: 26(fvec4) FAdd 39 57
+ 64: 26(fvec4) FAdd 58 63
+ 68: 26(fvec4) FAdd 64 67
+ 73: 26(fvec4) FAdd 68 72
+ Store 28(gl_Position) 73
+ Return
+ FunctionEnd
diff --git a/chromium/third_party/glslang/src/Test/baseResults/spv.precise.tesc.out b/chromium/third_party/glslang/src/Test/baseResults/spv.precise.tesc.out
new file mode 100644
index 00000000000..0331a14ac00
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/spv.precise.tesc.out
@@ -0,0 +1,122 @@
+spv.precise.tesc
+Warning, version 310 is not yet complete; most version-specific features are present, but some are missing.
+
+
+Linked tessellation control stage:
+
+
+// Module Version 10000
+// Generated by (magic number): 80001
+// Id's are bound by 72
+
+ Capability Tessellation
+ 1: ExtInstImport "GLSL.std.450"
+ MemoryModel Logical GLSL450
+ EntryPoint TessellationControl 4 "main" 12 15 20 30 40 45
+ ExecutionMode 4 OutputVertices 3
+ Source ESSL 310
+ SourceExtension "GL_EXT_gpu_shader5"
+ SourceExtension "GL_EXT_shader_io_blocks"
+ SourceExtension "GL_EXT_tessellation_shader"
+ Name 4 "main"
+ Name 12 "in_te_position"
+ Name 15 "gl_InvocationID"
+ Name 20 "in_tc_position"
+ Name 30 "gl_TessLevelInner"
+ Name 40 "gl_TessLevelOuter"
+ Name 45 "in_tc_tessParam"
+ Decorate 12(in_te_position) Location 0
+ Decorate 15(gl_InvocationID) BuiltIn InvocationId
+ Decorate 20(in_tc_position) Location 0
+ Decorate 30(gl_TessLevelInner) Patch
+ Decorate 30(gl_TessLevelInner) BuiltIn TessLevelInner
+ Decorate 40(gl_TessLevelOuter) Patch
+ Decorate 40(gl_TessLevelOuter) BuiltIn TessLevelOuter
+ Decorate 45(in_tc_tessParam) Location 1
+ Decorate 52 NoContraction
+ Decorate 53 NoContraction
+ Decorate 54 NoContraction
+ Decorate 60 NoContraction
+ Decorate 61 NoContraction
+ Decorate 62 NoContraction
+ Decorate 68 NoContraction
+ Decorate 69 NoContraction
+ Decorate 70 NoContraction
+ 2: TypeVoid
+ 3: TypeFunction 2
+ 6: TypeFloat 32
+ 7: TypeVector 6(float) 2
+ 8: TypeInt 32 0
+ 9: 8(int) Constant 3
+ 10: TypeArray 7(fvec2) 9
+ 11: TypePointer Output 10
+12(in_te_position): 11(ptr) Variable Output
+ 13: TypeInt 32 1
+ 14: TypePointer Input 13(int)
+15(gl_InvocationID): 14(ptr) Variable Input
+ 17: 8(int) Constant 32
+ 18: TypeArray 7(fvec2) 17
+ 19: TypePointer Input 18
+20(in_tc_position): 19(ptr) Variable Input
+ 22: TypePointer Input 7(fvec2)
+ 25: TypePointer Output 7(fvec2)
+ 27: 8(int) Constant 2
+ 28: TypeArray 6(float) 27
+ 29: TypePointer Output 28
+30(gl_TessLevelInner): 29(ptr) Variable Output
+ 31: 13(int) Constant 0
+ 32: 6(float) Constant 1084227584
+ 33: TypePointer Output 6(float)
+ 35: 13(int) Constant 1
+ 37: 8(int) Constant 4
+ 38: TypeArray 6(float) 37
+ 39: TypePointer Output 38
+40(gl_TessLevelOuter): 39(ptr) Variable Output
+ 41: 6(float) Constant 1065353216
+ 42: 6(float) Constant 1105985536
+ 43: TypeArray 6(float) 17
+ 44: TypePointer Input 43
+45(in_tc_tessParam): 44(ptr) Variable Input
+ 46: TypePointer Input 6(float)
+ 49: 13(int) Constant 2
+ 4(main): 2 Function None 3
+ 5: Label
+ 16: 13(int) Load 15(gl_InvocationID)
+ 21: 13(int) Load 15(gl_InvocationID)
+ 23: 22(ptr) AccessChain 20(in_tc_position) 21
+ 24: 7(fvec2) Load 23
+ 26: 25(ptr) AccessChain 12(in_te_position) 16
+ Store 26 24
+ 34: 33(ptr) AccessChain 30(gl_TessLevelInner) 31
+ Store 34 32
+ 36: 33(ptr) AccessChain 30(gl_TessLevelInner) 35
+ Store 36 32
+ 47: 46(ptr) AccessChain 45(in_tc_tessParam) 35
+ 48: 6(float) Load 47
+ 50: 46(ptr) AccessChain 45(in_tc_tessParam) 49
+ 51: 6(float) Load 50
+ 52: 6(float) FAdd 48 51
+ 53: 6(float) FMul 42 52
+ 54: 6(float) FAdd 41 53
+ 55: 33(ptr) AccessChain 40(gl_TessLevelOuter) 31
+ Store 55 54
+ 56: 46(ptr) AccessChain 45(in_tc_tessParam) 49
+ 57: 6(float) Load 56
+ 58: 46(ptr) AccessChain 45(in_tc_tessParam) 31
+ 59: 6(float) Load 58
+ 60: 6(float) FAdd 57 59
+ 61: 6(float) FMul 42 60
+ 62: 6(float) FAdd 41 61
+ 63: 33(ptr) AccessChain 40(gl_TessLevelOuter) 35
+ Store 63 62
+ 64: 46(ptr) AccessChain 45(in_tc_tessParam) 31
+ 65: 6(float) Load 64
+ 66: 46(ptr) AccessChain 45(in_tc_tessParam) 35
+ 67: 6(float) Load 66
+ 68: 6(float) FAdd 65 67
+ 69: 6(float) FMul 42 68
+ 70: 6(float) FAdd 41 69
+ 71: 33(ptr) AccessChain 40(gl_TessLevelOuter) 49
+ Store 71 70
+ Return
+ FunctionEnd
diff --git a/chromium/third_party/glslang/src/Test/baseResults/spv.precise.tese.out b/chromium/third_party/glslang/src/Test/baseResults/spv.precise.tese.out
new file mode 100644
index 00000000000..40339812283
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/spv.precise.tese.out
@@ -0,0 +1,191 @@
+spv.precise.tese
+Warning, version 310 is not yet complete; most version-specific features are present, but some are missing.
+
+
+Linked tessellation evaluation stage:
+
+
+// Module Version 10000
+// Generated by (magic number): 80001
+// Id's are bound by 119
+
+ Capability Tessellation
+ 1: ExtInstImport "GLSL.std.450"
+ MemoryModel Logical GLSL450
+ EntryPoint TessellationEvaluation 4 "main" 12 21 62 112
+ ExecutionMode 4 Triangles
+ ExecutionMode 4 SpacingEqual
+ ExecutionMode 4 VertexOrderCcw
+ Source ESSL 310
+ SourceExtension "GL_EXT_gpu_shader5"
+ SourceExtension "GL_EXT_shader_io_blocks"
+ SourceExtension "GL_EXT_tessellation_shader"
+ Name 4 "main"
+ Name 9 "pos"
+ Name 12 "gl_TessCoord"
+ Name 21 "in_te_position"
+ Name 45 "f"
+ Name 62 "in_f_color"
+ Name 73 "bits"
+ Name 77 "numBits"
+ Name 78 "i"
+ Name 110 "gl_PerVertex"
+ MemberName 110(gl_PerVertex) 0 "gl_Position"
+ MemberName 110(gl_PerVertex) 1 "gl_PointSize"
+ Name 112 ""
+ Decorate 12(gl_TessCoord) BuiltIn TessCoord
+ Decorate 21(in_te_position) Location 0
+ Decorate 27 NoContraction
+ Decorate 34 NoContraction
+ Decorate 35 NoContraction
+ Decorate 42 NoContraction
+ Decorate 43 NoContraction
+ Decorate 62(in_f_color) RelaxedPrecision
+ Decorate 62(in_f_color) Location 0
+ Decorate 67 RelaxedPrecision
+ Decorate 68 RelaxedPrecision
+ Decorate 69 RelaxedPrecision
+ Decorate 70 RelaxedPrecision
+ Decorate 97 NoContraction
+ Decorate 99 NoContraction
+ Decorate 101 NoContraction
+ Decorate 106 NoContraction
+ Decorate 109 NoContraction
+ MemberDecorate 110(gl_PerVertex) 0 BuiltIn Position
+ MemberDecorate 110(gl_PerVertex) 1 BuiltIn PointSize
+ Decorate 110(gl_PerVertex) Block
+ 2: TypeVoid
+ 3: TypeFunction 2
+ 6: TypeFloat 32
+ 7: TypeVector 6(float) 2
+ 8: TypePointer Function 7(fvec2)
+ 10: TypeVector 6(float) 3
+ 11: TypePointer Input 10(fvec3)
+12(gl_TessCoord): 11(ptr) Variable Input
+ 13: TypeInt 32 0
+ 14: 13(int) Constant 0
+ 15: TypePointer Input 6(float)
+ 18: 13(int) Constant 32
+ 19: TypeArray 7(fvec2) 18
+ 20: TypePointer Input 19
+21(in_te_position): 20(ptr) Variable Input
+ 22: TypeInt 32 1
+ 23: 22(int) Constant 0
+ 24: TypePointer Input 7(fvec2)
+ 28: 13(int) Constant 1
+ 31: 22(int) Constant 1
+ 36: 13(int) Constant 2
+ 39: 22(int) Constant 2
+ 44: TypePointer Function 6(float)
+ 46: 6(float) Constant 1077936128
+ 57: 6(float) Constant 1056964608
+ 60: TypeVector 6(float) 4
+ 61: TypePointer Output 60(fvec4)
+ 62(in_f_color): 61(ptr) Variable Output
+ 66: 6(float) Constant 1065353216
+ 71: TypeVector 13(int) 2
+ 72: TypePointer Function 71(ivec2)
+ 76: TypePointer Function 13(int)
+ 85: TypeBool
+ 105: 6(float) Constant 1025758986
+110(gl_PerVertex): TypeStruct 60(fvec4) 6(float)
+ 111: TypePointer Output 110(gl_PerVertex)
+ 112: 111(ptr) Variable Output
+ 114: 6(float) Constant 0
+ 4(main): 2 Function None 3
+ 5: Label
+ 9(pos): 8(ptr) Variable Function
+ 45(f): 44(ptr) Variable Function
+ 73(bits): 72(ptr) Variable Function
+ 77(numBits): 76(ptr) Variable Function
+ 78(i): 76(ptr) Variable Function
+ 16: 15(ptr) AccessChain 12(gl_TessCoord) 14
+ 17: 6(float) Load 16
+ 25: 24(ptr) AccessChain 21(in_te_position) 23
+ 26: 7(fvec2) Load 25
+ 27: 7(fvec2) VectorTimesScalar 26 17
+ 29: 15(ptr) AccessChain 12(gl_TessCoord) 28
+ 30: 6(float) Load 29
+ 32: 24(ptr) AccessChain 21(in_te_position) 31
+ 33: 7(fvec2) Load 32
+ 34: 7(fvec2) VectorTimesScalar 33 30
+ 35: 7(fvec2) FAdd 27 34
+ 37: 15(ptr) AccessChain 12(gl_TessCoord) 36
+ 38: 6(float) Load 37
+ 40: 24(ptr) AccessChain 21(in_te_position) 39
+ 41: 7(fvec2) Load 40
+ 42: 7(fvec2) VectorTimesScalar 41 38
+ 43: 7(fvec2) FAdd 35 42
+ Store 9(pos) 43
+ 47: 15(ptr) AccessChain 12(gl_TessCoord) 14
+ 48: 6(float) Load 47
+ 49: 15(ptr) AccessChain 12(gl_TessCoord) 28
+ 50: 6(float) Load 49
+ 51: 15(ptr) AccessChain 12(gl_TessCoord) 36
+ 52: 6(float) Load 51
+ 53: 6(float) ExtInst 1(GLSL.std.450) 37(FMin) 50 52
+ 54: 6(float) ExtInst 1(GLSL.std.450) 37(FMin) 48 53
+ 55: 6(float) FMul 46 54
+ 56: 6(float) ExtInst 1(GLSL.std.450) 31(Sqrt) 55
+ 58: 6(float) FMul 56 57
+ 59: 6(float) FAdd 58 57
+ Store 45(f) 59
+ 63: 10(fvec3) Load 12(gl_TessCoord)
+ 64: 6(float) Load 45(f)
+ 65: 10(fvec3) VectorTimesScalar 63 64
+ 67: 6(float) CompositeExtract 65 0
+ 68: 6(float) CompositeExtract 65 1
+ 69: 6(float) CompositeExtract 65 2
+ 70: 60(fvec4) CompositeConstruct 67 68 69 66
+ Store 62(in_f_color) 70
+ 74: 7(fvec2) Load 9(pos)
+ 75: 71(ivec2) Bitcast 74
+ Store 73(bits) 75
+ Store 77(numBits) 14
+ Store 78(i) 14
+ Branch 79
+ 79: Label
+ LoopMerge 81 82 None
+ Branch 83
+ 83: Label
+ 84: 13(int) Load 78(i)
+ 86: 85(bool) ULessThan 84 18
+ BranchConditional 86 80 81
+ 80: Label
+ 87: 76(ptr) AccessChain 73(bits) 14
+ 88: 13(int) Load 87
+ 89: 13(int) Load 78(i)
+ 90: 13(int) ShiftLeftLogical 88 89
+ 91: 13(int) BitwiseAnd 90 28
+ 92: 76(ptr) AccessChain 73(bits) 28
+ 93: 13(int) Load 92
+ 94: 13(int) Load 78(i)
+ 95: 13(int) ShiftLeftLogical 93 94
+ 96: 13(int) BitwiseAnd 95 28
+ 97: 13(int) IAdd 91 96
+ 98: 13(int) Load 77(numBits)
+ 99: 13(int) IAdd 98 97
+ Store 77(numBits) 99
+ Branch 82
+ 82: Label
+ 100: 13(int) Load 78(i)
+ 101: 13(int) IAdd 100 31
+ Store 78(i) 101
+ Branch 79
+ 81: Label
+ 102: 13(int) Load 77(numBits)
+ 103: 13(int) BitwiseAnd 102 28
+ 104: 6(float) ConvertUToF 103
+ 106: 6(float) FMul 104 105
+ 107: 7(fvec2) Load 9(pos)
+ 108: 7(fvec2) CompositeConstruct 106 106
+ 109: 7(fvec2) FAdd 107 108
+ Store 9(pos) 109
+ 113: 7(fvec2) Load 9(pos)
+ 115: 6(float) CompositeExtract 113 0
+ 116: 6(float) CompositeExtract 113 1
+ 117: 60(fvec4) CompositeConstruct 115 116 114 66
+ 118: 61(ptr) AccessChain 112 23
+ Store 118 117
+ Return
+ FunctionEnd
diff --git a/chromium/third_party/glslang/src/Test/baseResults/spv.precision.frag.out b/chromium/third_party/glslang/src/Test/baseResults/spv.precision.frag.out
new file mode 100755
index 00000000000..33e4fb204ad
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/spv.precision.frag.out
@@ -0,0 +1,234 @@
+spv.precision.frag
+Warning, version 310 is not yet complete; most version-specific features are present, but some are missing.
+
+
+Linked fragment stage:
+
+
+// Module Version 10000
+// Generated by (magic number): 80001
+// Id's are bound by 127
+
+ Capability Shader
+ 1: ExtInstImport "GLSL.std.450"
+ MemoryModel Logical GLSL450
+ EntryPoint Fragment 4 "main" 23 59 61 73 116
+ ExecutionMode 4 OriginUpperLeft
+ Source ESSL 310
+ Name 4 "main"
+ Name 12 "foo(vf3;"
+ Name 11 "mv3"
+ Name 19 "boolfun(vb2;"
+ Name 18 "bv2"
+ Name 23 "highfin"
+ Name 38 "sum"
+ Name 40 "uniform_medium"
+ Name 42 "uniform_high"
+ Name 48 "uniform_low"
+ Name 53 "arg1"
+ Name 55 "arg2"
+ Name 57 "d"
+ Name 59 "lowfin"
+ Name 61 "mediumfin"
+ Name 65 "global_highp"
+ Name 69 "local_highp"
+ Name 73 "mediumfout"
+ Name 104 "ub2"
+ Name 105 "param"
+ Name 114 "S"
+ MemberName 114(S) 0 "a"
+ MemberName 114(S) 1 "b"
+ Name 116 "s"
+ Decorate 12(foo(vf3;) RelaxedPrecision
+ Decorate 11(mv3) RelaxedPrecision
+ Decorate 38(sum) RelaxedPrecision
+ Decorate 40(uniform_medium) RelaxedPrecision
+ Decorate 41 RelaxedPrecision
+ Decorate 46 RelaxedPrecision
+ Decorate 48(uniform_low) RelaxedPrecision
+ Decorate 49 RelaxedPrecision
+ Decorate 50 RelaxedPrecision
+ Decorate 51 RelaxedPrecision
+ Decorate 53(arg1) RelaxedPrecision
+ Decorate 55(arg2) RelaxedPrecision
+ Decorate 57(d) RelaxedPrecision
+ Decorate 59(lowfin) RelaxedPrecision
+ Decorate 60 RelaxedPrecision
+ Decorate 61(mediumfin) RelaxedPrecision
+ Decorate 62 RelaxedPrecision
+ Decorate 63 RelaxedPrecision
+ Decorate 73(mediumfout) RelaxedPrecision
+ Decorate 74 RelaxedPrecision
+ Decorate 75 RelaxedPrecision
+ Decorate 76 RelaxedPrecision
+ Decorate 77 RelaxedPrecision
+ Decorate 78 RelaxedPrecision
+ Decorate 79 RelaxedPrecision
+ Decorate 83 RelaxedPrecision
+ Decorate 85 RelaxedPrecision
+ Decorate 87 RelaxedPrecision
+ Decorate 88 RelaxedPrecision
+ Decorate 90 RelaxedPrecision
+ Decorate 91 RelaxedPrecision
+ Decorate 94 RelaxedPrecision
+ Decorate 95 RelaxedPrecision
+ Decorate 96 RelaxedPrecision
+ Decorate 97 RelaxedPrecision
+ Decorate 98 RelaxedPrecision
+ Decorate 99 RelaxedPrecision
+ Decorate 100 RelaxedPrecision
+ Decorate 101 RelaxedPrecision
+ Decorate 102 RelaxedPrecision
+ Decorate 110 RelaxedPrecision
+ Decorate 112 RelaxedPrecision
+ Decorate 113 RelaxedPrecision
+ MemberDecorate 114(S) 1 RelaxedPrecision
+ Decorate 120 RelaxedPrecision
+ Decorate 124 RelaxedPrecision
+ Decorate 125 RelaxedPrecision
+ Decorate 126 RelaxedPrecision
+ 2: TypeVoid
+ 3: TypeFunction 2
+ 6: TypeFloat 32
+ 7: TypeVector 6(float) 3
+ 8: TypePointer Function 7(fvec3)
+ 9: TypeVector 6(float) 2
+ 10: TypeFunction 9(fvec2) 8(ptr)
+ 14: TypeBool
+ 15: TypeVector 14(bool) 2
+ 16: TypePointer Function 15(bvec2)
+ 17: TypeFunction 14(bool) 16(ptr)
+ 21: TypeVector 6(float) 4
+ 22: TypePointer Input 21(fvec4)
+ 23(highfin): 22(ptr) Variable Input
+ 29: 14(bool) ConstantFalse
+ 30: 14(bool) ConstantTrue
+ 31: 15(bvec2) ConstantComposite 29 30
+ 36: TypeInt 32 1
+ 37: TypePointer Function 36(int)
+ 39: TypePointer Private 36(int)
+40(uniform_medium): 39(ptr) Variable Private
+42(uniform_high): 39(ptr) Variable Private
+ 48(uniform_low): 39(ptr) Variable Private
+ 52: TypePointer Function 6(float)
+ 54: 6(float) Constant 1078774989
+ 56: 6(float) Constant 1232730691
+ 58: TypePointer Input 6(float)
+ 59(lowfin): 58(ptr) Variable Input
+ 61(mediumfin): 58(ptr) Variable Input
+ 64: TypePointer Private 6(float)
+65(global_highp): 64(ptr) Variable Private
+ 68: TypePointer Function 21(fvec4)
+ 72: TypePointer Output 21(fvec4)
+ 73(mediumfout): 72(ptr) Variable Output
+ 82: 36(int) Constant 4
+ 84: TypeVector 36(int) 2
+ 92: TypeInt 32 0
+ 93: 92(int) Constant 0
+ 103: TypePointer Private 15(bvec2)
+ 104(ub2): 103(ptr) Variable Private
+ 111: 6(float) Constant 1065353216
+ 114(S): TypeStruct 6(float) 6(float)
+ 115: TypePointer Input 114(S)
+ 116(s): 115(ptr) Variable Input
+ 117: 36(int) Constant 0
+ 122: 36(int) Constant 1
+ 4(main): 2 Function None 3
+ 5: Label
+ 38(sum): 37(ptr) Variable Function
+ 53(arg1): 52(ptr) Variable Function
+ 55(arg2): 52(ptr) Variable Function
+ 57(d): 52(ptr) Variable Function
+ 69(local_highp): 68(ptr) Variable Function
+ 105(param): 16(ptr) Variable Function
+ 41: 36(int) Load 40(uniform_medium)
+ 43: 36(int) Load 42(uniform_high)
+ 44: 36(int) IAdd 41 43
+ Store 38(sum) 44
+ 45: 36(int) Load 42(uniform_high)
+ 46: 36(int) Load 38(sum)
+ 47: 36(int) IAdd 46 45
+ Store 38(sum) 47
+ 49: 36(int) Load 48(uniform_low)
+ 50: 36(int) Load 38(sum)
+ 51: 36(int) IAdd 50 49
+ Store 38(sum) 51
+ Store 53(arg1) 54
+ Store 55(arg2) 56
+ 60: 6(float) Load 59(lowfin)
+ 62: 6(float) Load 61(mediumfin)
+ 63: 6(float) ExtInst 1(GLSL.std.450) 67(Distance) 60 62
+ Store 57(d) 63
+ 66: 21(fvec4) Load 23(highfin)
+ 67: 6(float) ExtInst 1(GLSL.std.450) 66(Length) 66
+ Store 65(global_highp) 67
+ 70: 6(float) Load 65(global_highp)
+ 71: 21(fvec4) CompositeConstruct 70 70 70 70
+ Store 69(local_highp) 71
+ 74: 6(float) Load 57(d)
+ 75: 6(float) ExtInst 1(GLSL.std.450) 13(Sin) 74
+ 76: 21(fvec4) CompositeConstruct 75 75 75 75
+ 77: 6(float) Load 55(arg2)
+ 78: 21(fvec4) CompositeConstruct 77 77 77 77
+ 79: 21(fvec4) FAdd 76 78
+ 80: 21(fvec4) Load 69(local_highp)
+ 81: 21(fvec4) FAdd 79 80
+ Store 73(mediumfout) 81
+ 83: 36(int) Load 48(uniform_low)
+ 85: 84(ivec2) CompositeConstruct 83 83
+ 86: 36(int) Load 42(uniform_high)
+ 87: 84(ivec2) CompositeConstruct 86 86
+ 88: 84(ivec2) IMul 85 87
+ 89: 36(int) Load 42(uniform_high)
+ 90: 84(ivec2) CompositeConstruct 89 89
+ 91: 84(ivec2) IAdd 88 90
+ 94: 36(int) CompositeExtract 91 0
+ 95: 36(int) IAdd 82 94
+ 96: 36(int) Load 38(sum)
+ 97: 36(int) IAdd 96 95
+ Store 38(sum) 97
+ 98: 36(int) Load 38(sum)
+ 99: 6(float) ConvertSToF 98
+ 100: 21(fvec4) CompositeConstruct 99 99 99 99
+ 101: 21(fvec4) Load 73(mediumfout)
+ 102: 21(fvec4) FAdd 101 100
+ Store 73(mediumfout) 102
+ 106: 15(bvec2) Load 104(ub2)
+ Store 105(param) 106
+ 107: 14(bool) FunctionCall 19(boolfun(vb2;) 105(param)
+ SelectionMerge 109 None
+ BranchConditional 107 108 109
+ 108: Label
+ 110: 21(fvec4) Load 73(mediumfout)
+ 112: 21(fvec4) CompositeConstruct 111 111 111 111
+ 113: 21(fvec4) FAdd 110 112
+ Store 73(mediumfout) 113
+ Branch 109
+ 109: Label
+ 118: 58(ptr) AccessChain 116(s) 117
+ 119: 6(float) Load 118
+ 120: 21(fvec4) Load 73(mediumfout)
+ 121: 21(fvec4) VectorTimesScalar 120 119
+ Store 73(mediumfout) 121
+ 123: 58(ptr) AccessChain 116(s) 122
+ 124: 6(float) Load 123
+ 125: 21(fvec4) Load 73(mediumfout)
+ 126: 21(fvec4) VectorTimesScalar 125 124
+ Store 73(mediumfout) 126
+ Return
+ FunctionEnd
+ 12(foo(vf3;): 9(fvec2) Function None 10
+ 11(mv3): 8(ptr) FunctionParameter
+ 13: Label
+ 24: 21(fvec4) Load 23(highfin)
+ 25: 9(fvec2) VectorShuffle 24 24 0 1
+ ReturnValue 25
+ FunctionEnd
+19(boolfun(vb2;): 14(bool) Function None 17
+ 18(bv2): 16(ptr) FunctionParameter
+ 20: Label
+ 28: 15(bvec2) Load 18(bv2)
+ 32: 15(bvec2) LogicalEqual 28 31
+ 33: 14(bool) All 32
+ ReturnValue 33
+ FunctionEnd
diff --git a/chromium/third_party/glslang/src/Test/baseResults/spv.prepost.frag.out b/chromium/third_party/glslang/src/Test/baseResults/spv.prepost.frag.out
new file mode 100755
index 00000000000..9581267ba71
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/spv.prepost.frag.out
@@ -0,0 +1,147 @@
+spv.prepost.frag
+
+Linked fragment stage:
+
+
+// Module Version 10000
+// Generated by (magic number): 80001
+// Id's are bound by 94
+
+ Capability Shader
+ 1: ExtInstImport "GLSL.std.450"
+ MemoryModel Logical GLSL450
+ EntryPoint Fragment 4 "main" 90
+ ExecutionMode 4 OriginUpperLeft
+ Source GLSL 140
+ Name 4 "main"
+ Name 8 "index"
+ Name 14 "s"
+ MemberName 14(s) 0 "y"
+ Name 16 "str"
+ Name 22 "t"
+ Name 50 "x"
+ Name 61 "y"
+ Name 66 "z"
+ Name 73 "v"
+ Name 90 "gl_FragColor"
+ 2: TypeVoid
+ 3: TypeFunction 2
+ 6: TypeInt 32 1
+ 7: TypePointer Function 6(int)
+ 9: 6(int) Constant 5
+ 10: TypeFloat 32
+ 11: TypeInt 32 0
+ 12: 11(int) Constant 5
+ 13: TypeArray 10(float) 12
+ 14(s): TypeStruct 13
+ 15: TypePointer Function 14(s)
+ 17: 6(int) Constant 0
+ 18: 6(int) Constant 4
+ 19: 10(float) Constant 1073741824
+ 20: TypePointer Function 10(float)
+ 24: 6(int) Constant 1
+ 28: 10(float) Constant 1065353216
+ 71: TypeVector 10(float) 4
+ 72: TypePointer Function 71(fvec4)
+ 74: 10(float) Constant 1077936128
+ 75: 10(float) Constant 1082130432
+ 76: 71(fvec4) ConstantComposite 28 19 74 75
+ 77: 11(int) Constant 2
+ 81: 11(int) Constant 1
+ 83: 11(int) Constant 3
+ 87: 11(int) Constant 0
+ 89: TypePointer Output 71(fvec4)
+90(gl_FragColor): 89(ptr) Variable Output
+ 4(main): 2 Function None 3
+ 5: Label
+ 8(index): 7(ptr) Variable Function
+ 16(str): 15(ptr) Variable Function
+ 22(t): 20(ptr) Variable Function
+ 50(x): 20(ptr) Variable Function
+ 61(y): 20(ptr) Variable Function
+ 66(z): 20(ptr) Variable Function
+ 73(v): 72(ptr) Variable Function
+ Store 8(index) 9
+ 21: 20(ptr) AccessChain 16(str) 17 18
+ Store 21 19
+ 23: 6(int) Load 8(index)
+ 25: 6(int) ISub 23 24
+ Store 8(index) 25
+ 26: 20(ptr) AccessChain 16(str) 17 25
+ 27: 10(float) Load 26
+ 29: 10(float) FAdd 27 28
+ Store 26 29
+ Store 22(t) 29
+ 30: 10(float) Load 22(t)
+ 31: 20(ptr) AccessChain 16(str) 17 18
+ 32: 10(float) Load 31
+ 33: 10(float) FAdd 32 30
+ 34: 20(ptr) AccessChain 16(str) 17 18
+ Store 34 33
+ 35: 20(ptr) AccessChain 16(str) 17 18
+ 36: 10(float) Load 35
+ 37: 10(float) FSub 36 28
+ Store 35 37
+ Store 22(t) 36
+ 38: 6(int) Load 8(index)
+ 39: 6(int) IAdd 38 24
+ Store 8(index) 39
+ 40: 10(float) Load 22(t)
+ 41: 20(ptr) AccessChain 16(str) 17 38
+ 42: 10(float) Load 41
+ 43: 10(float) FAdd 42 40
+ 44: 20(ptr) AccessChain 16(str) 17 38
+ Store 44 43
+ 45: 6(int) Load 8(index)
+ 46: 6(int) ISub 45 24
+ Store 8(index) 46
+ 47: 20(ptr) AccessChain 16(str) 17 46
+ 48: 10(float) Load 47
+ 49: 10(float) FSub 48 28
+ Store 47 49
+ 51: 20(ptr) AccessChain 16(str) 17 18
+ 52: 10(float) Load 51
+ Store 50(x) 52
+ 53: 10(float) Load 50(x)
+ 54: 10(float) FAdd 53 28
+ Store 50(x) 54
+ 55: 10(float) Load 50(x)
+ 56: 10(float) FSub 55 28
+ Store 50(x) 56
+ 57: 10(float) Load 50(x)
+ 58: 10(float) FAdd 57 28
+ Store 50(x) 58
+ 59: 10(float) Load 50(x)
+ 60: 10(float) FSub 59 28
+ Store 50(x) 60
+ 62: 10(float) Load 50(x)
+ 63: 10(float) Load 50(x)
+ 64: 10(float) FAdd 63 28
+ Store 50(x) 64
+ 65: 10(float) FMul 62 64
+ Store 61(y) 65
+ 67: 10(float) Load 61(y)
+ 68: 10(float) Load 50(x)
+ 69: 10(float) FSub 68 28
+ Store 50(x) 69
+ 70: 10(float) FMul 67 68
+ Store 66(z) 70
+ Store 73(v) 76
+ 78: 20(ptr) AccessChain 73(v) 77
+ 79: 10(float) Load 78
+ 80: 10(float) FSub 79 28
+ Store 78 80
+ 82: 20(ptr) AccessChain 73(v) 81
+ Store 82 79
+ 84: 20(ptr) AccessChain 73(v) 83
+ 85: 10(float) Load 84
+ 86: 10(float) FSub 85 28
+ Store 84 86
+ 88: 20(ptr) AccessChain 73(v) 87
+ Store 88 86
+ 91: 10(float) Load 66(z)
+ 92: 71(fvec4) Load 73(v)
+ 93: 71(fvec4) VectorTimesScalar 92 91
+ Store 90(gl_FragColor) 93
+ Return
+ FunctionEnd
diff --git a/chromium/third_party/glslang/src/Test/baseResults/spv.pushConstant.vert.out b/chromium/third_party/glslang/src/Test/baseResults/spv.pushConstant.vert.out
new file mode 100644
index 00000000000..6b314e082ec
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/spv.pushConstant.vert.out
@@ -0,0 +1,67 @@
+spv.pushConstant.vert
+Warning, version 400 is not yet complete; most version-specific features are present, but some are missing.
+
+
+Linked vertex stage:
+
+
+// Module Version 10000
+// Generated by (magic number): 80001
+// Id's are bound by 35
+
+ Capability Shader
+ 1: ExtInstImport "GLSL.std.450"
+ MemoryModel Logical GLSL450
+ EntryPoint Vertex 4 "main" 24
+ Source GLSL 400
+ Name 4 "main"
+ Name 11 "Material"
+ MemberName 11(Material) 0 "kind"
+ MemberName 11(Material) 1 "fa"
+ Name 13 "matInst"
+ Name 24 "color"
+ Decorate 10 ArrayStride 4
+ MemberDecorate 11(Material) 0 Offset 0
+ MemberDecorate 11(Material) 1 Offset 4
+ Decorate 11(Material) Block
+ 2: TypeVoid
+ 3: TypeFunction 2
+ 6: TypeInt 32 1
+ 7: TypeFloat 32
+ 8: TypeInt 32 0
+ 9: 8(int) Constant 3
+ 10: TypeArray 7(float) 9
+ 11(Material): TypeStruct 6(int) 10
+ 12: TypePointer PushConstant 11(Material)
+ 13(matInst): 12(ptr) Variable PushConstant
+ 14: 6(int) Constant 0
+ 15: TypePointer PushConstant 6(int)
+ 22: TypeVector 7(float) 4
+ 23: TypePointer Output 22(fvec4)
+ 24(color): 23(ptr) Variable Output
+ 25: 7(float) Constant 1045220557
+ 26: 22(fvec4) ConstantComposite 25 25 25 25
+ 28: 7(float) Constant 1056964608
+ 29: 22(fvec4) ConstantComposite 28 28 28 28
+ 31: 7(float) Constant 0
+ 32: 22(fvec4) ConstantComposite 31 31 31 31
+ 4(main): 2 Function None 3
+ 5: Label
+ 16: 15(ptr) AccessChain 13(matInst) 14
+ 17: 6(int) Load 16
+ SelectionMerge 21 None
+ Switch 17 20
+ case 1: 18
+ case 2: 19
+ 20: Label
+ Store 24(color) 32
+ Branch 21
+ 18: Label
+ Store 24(color) 26
+ Branch 21
+ 19: Label
+ Store 24(color) 29
+ Branch 21
+ 21: Label
+ Return
+ FunctionEnd
diff --git a/chromium/third_party/glslang/src/Test/baseResults/spv.qualifiers.vert.out b/chromium/third_party/glslang/src/Test/baseResults/spv.qualifiers.vert.out
new file mode 100755
index 00000000000..d2baf7229ff
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/spv.qualifiers.vert.out
@@ -0,0 +1,54 @@
+spv.qualifiers.vert
+Warning, version 430 is not yet complete; most version-specific features are present, but some are missing.
+
+
+Linked vertex stage:
+
+
+// Module Version 10000
+// Generated by (magic number): 80001
+// Id's are bound by 21
+
+ Capability Shader
+ 1: ExtInstImport "GLSL.std.450"
+ MemoryModel Logical GLSL450
+ EntryPoint Vertex 4 "main" 9 11 13 15 17 19
+ Source GLSL 430
+ Name 4 "main"
+ Name 9 "outVc"
+ Name 11 "inV"
+ Name 13 "outVs"
+ Name 15 "outVf"
+ Name 17 "outVn"
+ Name 19 "outVcn"
+ Decorate 9(outVc) Centroid
+ Decorate 15(outVf) Flat
+ Decorate 17(outVn) NoPerspective
+ Decorate 19(outVcn) NoPerspective
+ Decorate 19(outVcn) Centroid
+ 2: TypeVoid
+ 3: TypeFunction 2
+ 6: TypeFloat 32
+ 7: TypeVector 6(float) 4
+ 8: TypePointer Output 7(fvec4)
+ 9(outVc): 8(ptr) Variable Output
+ 10: TypePointer Input 7(fvec4)
+ 11(inV): 10(ptr) Variable Input
+ 13(outVs): 8(ptr) Variable Output
+ 15(outVf): 8(ptr) Variable Output
+ 17(outVn): 8(ptr) Variable Output
+ 19(outVcn): 8(ptr) Variable Output
+ 4(main): 2 Function None 3
+ 5: Label
+ 12: 7(fvec4) Load 11(inV)
+ Store 9(outVc) 12
+ 14: 7(fvec4) Load 11(inV)
+ Store 13(outVs) 14
+ 16: 7(fvec4) Load 11(inV)
+ Store 15(outVf) 16
+ 18: 7(fvec4) Load 11(inV)
+ Store 17(outVn) 18
+ 20: 7(fvec4) Load 11(inV)
+ Store 19(outVcn) 20
+ Return
+ FunctionEnd
diff --git a/chromium/third_party/glslang/src/Test/baseResults/spv.queryL.frag.out b/chromium/third_party/glslang/src/Test/baseResults/spv.queryL.frag.out
new file mode 100755
index 00000000000..6d2b2b97d26
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/spv.queryL.frag.out
@@ -0,0 +1,331 @@
+spv.queryL.frag
+Warning, version 430 is not yet complete; most version-specific features are present, but some are missing.
+
+
+Linked fragment stage:
+
+
+// Module Version 10000
+// Generated by (magic number): 80001
+// Id's are bound by 237
+
+ Capability Shader
+ Capability SampledRect
+ Capability Sampled1D
+ Capability SampledCubeArray
+ Capability SampledBuffer
+ Capability ImageQuery
+ 1: ExtInstImport "GLSL.std.450"
+ MemoryModel Logical GLSL450
+ EntryPoint Fragment 4 "main"
+ ExecutionMode 4 OriginUpperLeft
+ Source GLSL 430
+ Name 4 "main"
+ Name 9 "lod"
+ Name 13 "samp1D"
+ Name 16 "pf"
+ Name 24 "isamp2D"
+ Name 26 "pf2"
+ Name 36 "usamp3D"
+ Name 40 "pf3"
+ Name 49 "sampCube"
+ Name 59 "isamp1DA"
+ Name 69 "usamp2DA"
+ Name 79 "isampCubeA"
+ Name 89 "samp1Ds"
+ Name 99 "samp2Ds"
+ Name 109 "sampCubes"
+ Name 119 "samp1DAs"
+ Name 129 "samp2DAs"
+ Name 139 "sampCubeAs"
+ Name 147 "levels"
+ Name 154 "usamp2D"
+ Name 163 "isamp3D"
+ Name 172 "isampCube"
+ Name 186 "samp2DA"
+ Name 195 "usampCubeA"
+ Name 232 "sampBuf"
+ Name 236 "sampRect"
+ Decorate 13(samp1D) DescriptorSet 0
+ Decorate 24(isamp2D) DescriptorSet 0
+ Decorate 36(usamp3D) DescriptorSet 0
+ Decorate 49(sampCube) DescriptorSet 0
+ Decorate 59(isamp1DA) DescriptorSet 0
+ Decorate 69(usamp2DA) DescriptorSet 0
+ Decorate 79(isampCubeA) DescriptorSet 0
+ Decorate 89(samp1Ds) DescriptorSet 0
+ Decorate 99(samp2Ds) DescriptorSet 0
+ Decorate 109(sampCubes) DescriptorSet 0
+ Decorate 119(samp1DAs) DescriptorSet 0
+ Decorate 129(samp2DAs) DescriptorSet 0
+ Decorate 139(sampCubeAs) DescriptorSet 0
+ Decorate 154(usamp2D) DescriptorSet 0
+ Decorate 163(isamp3D) DescriptorSet 0
+ Decorate 172(isampCube) DescriptorSet 0
+ Decorate 186(samp2DA) DescriptorSet 0
+ Decorate 195(usampCubeA) DescriptorSet 0
+ Decorate 232(sampBuf) DescriptorSet 0
+ Decorate 236(sampRect) DescriptorSet 0
+ 2: TypeVoid
+ 3: TypeFunction 2
+ 6: TypeFloat 32
+ 7: TypeVector 6(float) 2
+ 8: TypePointer Function 7(fvec2)
+ 10: TypeImage 6(float) 1D sampled format:Unknown
+ 11: TypeSampledImage 10
+ 12: TypePointer UniformConstant 11
+ 13(samp1D): 12(ptr) Variable UniformConstant
+ 15: TypePointer Function 6(float)
+ 20: TypeInt 32 1
+ 21: TypeImage 20(int) 2D sampled format:Unknown
+ 22: TypeSampledImage 21
+ 23: TypePointer UniformConstant 22
+ 24(isamp2D): 23(ptr) Variable UniformConstant
+ 32: TypeInt 32 0
+ 33: TypeImage 32(int) 3D sampled format:Unknown
+ 34: TypeSampledImage 33
+ 35: TypePointer UniformConstant 34
+ 36(usamp3D): 35(ptr) Variable UniformConstant
+ 38: TypeVector 6(float) 3
+ 39: TypePointer Function 38(fvec3)
+ 46: TypeImage 6(float) Cube sampled format:Unknown
+ 47: TypeSampledImage 46
+ 48: TypePointer UniformConstant 47
+ 49(sampCube): 48(ptr) Variable UniformConstant
+ 56: TypeImage 20(int) 1D array sampled format:Unknown
+ 57: TypeSampledImage 56
+ 58: TypePointer UniformConstant 57
+ 59(isamp1DA): 58(ptr) Variable UniformConstant
+ 66: TypeImage 32(int) 2D array sampled format:Unknown
+ 67: TypeSampledImage 66
+ 68: TypePointer UniformConstant 67
+ 69(usamp2DA): 68(ptr) Variable UniformConstant
+ 76: TypeImage 20(int) Cube array sampled format:Unknown
+ 77: TypeSampledImage 76
+ 78: TypePointer UniformConstant 77
+ 79(isampCubeA): 78(ptr) Variable UniformConstant
+ 86: TypeImage 6(float) 1D depth sampled format:Unknown
+ 87: TypeSampledImage 86
+ 88: TypePointer UniformConstant 87
+ 89(samp1Ds): 88(ptr) Variable UniformConstant
+ 96: TypeImage 6(float) 2D depth sampled format:Unknown
+ 97: TypeSampledImage 96
+ 98: TypePointer UniformConstant 97
+ 99(samp2Ds): 98(ptr) Variable UniformConstant
+ 106: TypeImage 6(float) Cube depth sampled format:Unknown
+ 107: TypeSampledImage 106
+ 108: TypePointer UniformConstant 107
+ 109(sampCubes): 108(ptr) Variable UniformConstant
+ 116: TypeImage 6(float) 1D depth array sampled format:Unknown
+ 117: TypeSampledImage 116
+ 118: TypePointer UniformConstant 117
+ 119(samp1DAs): 118(ptr) Variable UniformConstant
+ 126: TypeImage 6(float) 2D depth array sampled format:Unknown
+ 127: TypeSampledImage 126
+ 128: TypePointer UniformConstant 127
+ 129(samp2DAs): 128(ptr) Variable UniformConstant
+ 136: TypeImage 6(float) Cube depth array sampled format:Unknown
+ 137: TypeSampledImage 136
+ 138: TypePointer UniformConstant 137
+ 139(sampCubeAs): 138(ptr) Variable UniformConstant
+ 146: TypePointer Function 20(int)
+ 151: TypeImage 32(int) 2D sampled format:Unknown
+ 152: TypeSampledImage 151
+ 153: TypePointer UniformConstant 152
+ 154(usamp2D): 153(ptr) Variable UniformConstant
+ 160: TypeImage 20(int) 3D sampled format:Unknown
+ 161: TypeSampledImage 160
+ 162: TypePointer UniformConstant 161
+ 163(isamp3D): 162(ptr) Variable UniformConstant
+ 169: TypeImage 20(int) Cube sampled format:Unknown
+ 170: TypeSampledImage 169
+ 171: TypePointer UniformConstant 170
+ 172(isampCube): 171(ptr) Variable UniformConstant
+ 183: TypeImage 6(float) 2D array sampled format:Unknown
+ 184: TypeSampledImage 183
+ 185: TypePointer UniformConstant 184
+ 186(samp2DA): 185(ptr) Variable UniformConstant
+ 192: TypeImage 32(int) Cube array sampled format:Unknown
+ 193: TypeSampledImage 192
+ 194: TypePointer UniformConstant 193
+ 195(usampCubeA): 194(ptr) Variable UniformConstant
+ 229: TypeImage 6(float) Buffer sampled format:Unknown
+ 230: TypeSampledImage 229
+ 231: TypePointer UniformConstant 230
+ 232(sampBuf): 231(ptr) Variable UniformConstant
+ 233: TypeImage 6(float) Rect sampled format:Unknown
+ 234: TypeSampledImage 233
+ 235: TypePointer UniformConstant 234
+ 236(sampRect): 235(ptr) Variable UniformConstant
+ 4(main): 2 Function None 3
+ 5: Label
+ 9(lod): 8(ptr) Variable Function
+ 16(pf): 15(ptr) Variable Function
+ 26(pf2): 8(ptr) Variable Function
+ 40(pf3): 39(ptr) Variable Function
+ 147(levels): 146(ptr) Variable Function
+ 14: 11 Load 13(samp1D)
+ 17: 6(float) Load 16(pf)
+ 18: 10 Image 14
+ 19: 7(fvec2) ImageQueryLod 18 17
+ Store 9(lod) 19
+ 25: 22 Load 24(isamp2D)
+ 27: 7(fvec2) Load 26(pf2)
+ 28: 21 Image 25
+ 29: 7(fvec2) ImageQueryLod 28 27
+ 30: 7(fvec2) Load 9(lod)
+ 31: 7(fvec2) FAdd 30 29
+ Store 9(lod) 31
+ 37: 34 Load 36(usamp3D)
+ 41: 38(fvec3) Load 40(pf3)
+ 42: 33 Image 37
+ 43: 7(fvec2) ImageQueryLod 42 41
+ 44: 7(fvec2) Load 9(lod)
+ 45: 7(fvec2) FAdd 44 43
+ Store 9(lod) 45
+ 50: 47 Load 49(sampCube)
+ 51: 38(fvec3) Load 40(pf3)
+ 52: 46 Image 50
+ 53: 7(fvec2) ImageQueryLod 52 51
+ 54: 7(fvec2) Load 9(lod)
+ 55: 7(fvec2) FAdd 54 53
+ Store 9(lod) 55
+ 60: 57 Load 59(isamp1DA)
+ 61: 6(float) Load 16(pf)
+ 62: 56 Image 60
+ 63: 7(fvec2) ImageQueryLod 62 61
+ 64: 7(fvec2) Load 9(lod)
+ 65: 7(fvec2) FAdd 64 63
+ Store 9(lod) 65
+ 70: 67 Load 69(usamp2DA)
+ 71: 7(fvec2) Load 26(pf2)
+ 72: 66 Image 70
+ 73: 7(fvec2) ImageQueryLod 72 71
+ 74: 7(fvec2) Load 9(lod)
+ 75: 7(fvec2) FAdd 74 73
+ Store 9(lod) 75
+ 80: 77 Load 79(isampCubeA)
+ 81: 38(fvec3) Load 40(pf3)
+ 82: 76 Image 80
+ 83: 7(fvec2) ImageQueryLod 82 81
+ 84: 7(fvec2) Load 9(lod)
+ 85: 7(fvec2) FAdd 84 83
+ Store 9(lod) 85
+ 90: 87 Load 89(samp1Ds)
+ 91: 6(float) Load 16(pf)
+ 92: 86 Image 90
+ 93: 7(fvec2) ImageQueryLod 92 91
+ 94: 7(fvec2) Load 9(lod)
+ 95: 7(fvec2) FAdd 94 93
+ Store 9(lod) 95
+ 100: 97 Load 99(samp2Ds)
+ 101: 7(fvec2) Load 26(pf2)
+ 102: 96 Image 100
+ 103: 7(fvec2) ImageQueryLod 102 101
+ 104: 7(fvec2) Load 9(lod)
+ 105: 7(fvec2) FAdd 104 103
+ Store 9(lod) 105
+ 110: 107 Load 109(sampCubes)
+ 111: 38(fvec3) Load 40(pf3)
+ 112: 106 Image 110
+ 113: 7(fvec2) ImageQueryLod 112 111
+ 114: 7(fvec2) Load 9(lod)
+ 115: 7(fvec2) FAdd 114 113
+ Store 9(lod) 115
+ 120: 117 Load 119(samp1DAs)
+ 121: 6(float) Load 16(pf)
+ 122: 116 Image 120
+ 123: 7(fvec2) ImageQueryLod 122 121
+ 124: 7(fvec2) Load 9(lod)
+ 125: 7(fvec2) FAdd 124 123
+ Store 9(lod) 125
+ 130: 127 Load 129(samp2DAs)
+ 131: 7(fvec2) Load 26(pf2)
+ 132: 126 Image 130
+ 133: 7(fvec2) ImageQueryLod 132 131
+ 134: 7(fvec2) Load 9(lod)
+ 135: 7(fvec2) FAdd 134 133
+ Store 9(lod) 135
+ 140: 137 Load 139(sampCubeAs)
+ 141: 38(fvec3) Load 40(pf3)
+ 142: 136 Image 140
+ 143: 7(fvec2) ImageQueryLod 142 141
+ 144: 7(fvec2) Load 9(lod)
+ 145: 7(fvec2) FAdd 144 143
+ Store 9(lod) 145
+ 148: 11 Load 13(samp1D)
+ 149: 10 Image 148
+ 150: 20(int) ImageQueryLevels 149
+ Store 147(levels) 150
+ 155: 152 Load 154(usamp2D)
+ 156: 151 Image 155
+ 157: 20(int) ImageQueryLevels 156
+ 158: 20(int) Load 147(levels)
+ 159: 20(int) IAdd 158 157
+ Store 147(levels) 159
+ 164: 161 Load 163(isamp3D)
+ 165: 160 Image 164
+ 166: 20(int) ImageQueryLevels 165
+ 167: 20(int) Load 147(levels)
+ 168: 20(int) IAdd 167 166
+ Store 147(levels) 168
+ 173: 170 Load 172(isampCube)
+ 174: 169 Image 173
+ 175: 20(int) ImageQueryLevels 174
+ 176: 20(int) Load 147(levels)
+ 177: 20(int) IAdd 176 175
+ Store 147(levels) 177
+ 178: 57 Load 59(isamp1DA)
+ 179: 56 Image 178
+ 180: 20(int) ImageQueryLevels 179
+ 181: 20(int) Load 147(levels)
+ 182: 20(int) IAdd 181 180
+ Store 147(levels) 182
+ 187: 184 Load 186(samp2DA)
+ 188: 183 Image 187
+ 189: 20(int) ImageQueryLevels 188
+ 190: 20(int) Load 147(levels)
+ 191: 20(int) IAdd 190 189
+ Store 147(levels) 191
+ 196: 193 Load 195(usampCubeA)
+ 197: 192 Image 196
+ 198: 20(int) ImageQueryLevels 197
+ 199: 20(int) Load 147(levels)
+ 200: 20(int) IAdd 199 198
+ Store 147(levels) 200
+ 201: 87 Load 89(samp1Ds)
+ 202: 86 Image 201
+ 203: 20(int) ImageQueryLevels 202
+ Store 147(levels) 203
+ 204: 97 Load 99(samp2Ds)
+ 205: 96 Image 204
+ 206: 20(int) ImageQueryLevels 205
+ 207: 20(int) Load 147(levels)
+ 208: 20(int) IAdd 207 206
+ Store 147(levels) 208
+ 209: 107 Load 109(sampCubes)
+ 210: 106 Image 209
+ 211: 20(int) ImageQueryLevels 210
+ 212: 20(int) Load 147(levels)
+ 213: 20(int) IAdd 212 211
+ Store 147(levels) 213
+ 214: 117 Load 119(samp1DAs)
+ 215: 116 Image 214
+ 216: 20(int) ImageQueryLevels 215
+ 217: 20(int) Load 147(levels)
+ 218: 20(int) IAdd 217 216
+ Store 147(levels) 218
+ 219: 127 Load 129(samp2DAs)
+ 220: 126 Image 219
+ 221: 20(int) ImageQueryLevels 220
+ 222: 20(int) Load 147(levels)
+ 223: 20(int) IAdd 222 221
+ Store 147(levels) 223
+ 224: 137 Load 139(sampCubeAs)
+ 225: 136 Image 224
+ 226: 20(int) ImageQueryLevels 225
+ 227: 20(int) Load 147(levels)
+ 228: 20(int) IAdd 227 226
+ Store 147(levels) 228
+ Return
+ FunctionEnd
diff --git a/chromium/third_party/glslang/src/Test/baseResults/spv.separate.frag.out b/chromium/third_party/glslang/src/Test/baseResults/spv.separate.frag.out
new file mode 100644
index 00000000000..2a71a019ece
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/spv.separate.frag.out
@@ -0,0 +1,427 @@
+spv.separate.frag
+Warning, version 400 is not yet complete; most version-specific features are present, but some are missing.
+
+
+Linked fragment stage:
+
+
+// Module Version 10000
+// Generated by (magic number): 80001
+// Id's are bound by 319
+
+ Capability Shader
+ Capability SampledRect
+ Capability Sampled1D
+ Capability SampledCubeArray
+ Capability SampledBuffer
+ Capability ImageMSArray
+ 1: ExtInstImport "GLSL.std.450"
+ MemoryModel Logical GLSL450
+ EntryPoint Fragment 4 "main" 11 34
+ ExecutionMode 4 OriginUpperLeft
+ Source GLSL 400
+ Name 4 "main"
+ Name 6 "foo("
+ Name 11 "color"
+ Name 14 "t2d"
+ Name 18 "s"
+ Name 31 "t3d"
+ Name 34 "i"
+ Name 41 "sA"
+ Name 58 "tex2D"
+ Name 64 "texCube"
+ Name 71 "texCubeArray"
+ Name 77 "sShadow"
+ Name 84 "itexCubeArray"
+ Name 91 "utexCubeArray"
+ Name 98 "tex1DArray"
+ Name 106 "itex1DArray"
+ Name 113 "utex1D"
+ Name 120 "itex1D"
+ Name 127 "utex1DArray"
+ Name 134 "texBuffer"
+ Name 146 "tex2DArray"
+ Name 158 "itex2D"
+ Name 165 "itex3D"
+ Name 172 "itexCube"
+ Name 179 "itex2DArray"
+ Name 186 "utex2D"
+ Name 193 "utex3D"
+ Name 200 "utexCube"
+ Name 207 "utex2DArray"
+ Name 214 "itex2DRect"
+ Name 221 "utex2DRect"
+ Name 228 "itexBuffer"
+ Name 235 "utexBuffer"
+ Name 242 "tex2DMS"
+ Name 249 "itex2DMS"
+ Name 256 "utex2DMS"
+ Name 263 "tex2DMSArray"
+ Name 270 "itex2DMSArray"
+ Name 277 "utex2DMSArray"
+ Name 284 "tex1D"
+ Name 294 "tex3D"
+ Name 305 "tex2DRect"
+ Decorate 14(t2d) DescriptorSet 0
+ Decorate 18(s) DescriptorSet 0
+ Decorate 31(t3d) DescriptorSet 0
+ Decorate 34(i) Flat
+ Decorate 41(sA) DescriptorSet 0
+ Decorate 58(tex2D) DescriptorSet 0
+ Decorate 64(texCube) DescriptorSet 0
+ Decorate 71(texCubeArray) DescriptorSet 0
+ Decorate 77(sShadow) DescriptorSet 0
+ Decorate 84(itexCubeArray) DescriptorSet 0
+ Decorate 91(utexCubeArray) DescriptorSet 0
+ Decorate 98(tex1DArray) DescriptorSet 0
+ Decorate 106(itex1DArray) DescriptorSet 0
+ Decorate 113(utex1D) DescriptorSet 0
+ Decorate 120(itex1D) DescriptorSet 0
+ Decorate 127(utex1DArray) DescriptorSet 0
+ Decorate 134(texBuffer) DescriptorSet 0
+ Decorate 146(tex2DArray) DescriptorSet 0
+ Decorate 158(itex2D) DescriptorSet 0
+ Decorate 165(itex3D) DescriptorSet 0
+ Decorate 172(itexCube) DescriptorSet 0
+ Decorate 179(itex2DArray) DescriptorSet 0
+ Decorate 186(utex2D) DescriptorSet 0
+ Decorate 193(utex3D) DescriptorSet 0
+ Decorate 200(utexCube) DescriptorSet 0
+ Decorate 207(utex2DArray) DescriptorSet 0
+ Decorate 214(itex2DRect) DescriptorSet 0
+ Decorate 221(utex2DRect) DescriptorSet 0
+ Decorate 228(itexBuffer) DescriptorSet 0
+ Decorate 235(utexBuffer) DescriptorSet 0
+ Decorate 242(tex2DMS) DescriptorSet 0
+ Decorate 249(itex2DMS) DescriptorSet 0
+ Decorate 256(utex2DMS) DescriptorSet 0
+ Decorate 263(tex2DMSArray) DescriptorSet 0
+ Decorate 270(itex2DMSArray) DescriptorSet 0
+ Decorate 277(utex2DMSArray) DescriptorSet 0
+ Decorate 284(tex1D) DescriptorSet 0
+ Decorate 294(tex3D) DescriptorSet 0
+ Decorate 305(tex2DRect) DescriptorSet 0
+ 2: TypeVoid
+ 3: TypeFunction 2
+ 8: TypeFloat 32
+ 9: TypeVector 8(float) 4
+ 10: TypePointer Output 9(fvec4)
+ 11(color): 10(ptr) Variable Output
+ 12: TypeImage 8(float) 2D sampled format:Unknown
+ 13: TypePointer UniformConstant 12
+ 14(t2d): 13(ptr) Variable UniformConstant
+ 16: TypeSampler
+ 17: TypePointer UniformConstant 16
+ 18(s): 17(ptr) Variable UniformConstant
+ 20: TypeSampledImage 12
+ 22: TypeVector 8(float) 2
+ 23: 8(float) Constant 1056964608
+ 24: 22(fvec2) ConstantComposite 23 23
+ 26: TypeImage 8(float) 3D sampled format:Unknown
+ 27: TypeInt 32 0
+ 28: 27(int) Constant 4
+ 29: TypeArray 26 28
+ 30: TypePointer UniformConstant 29
+ 31(t3d): 30(ptr) Variable UniformConstant
+ 32: TypeInt 32 1
+ 33: TypePointer Input 32(int)
+ 34(i): 33(ptr) Variable Input
+ 36: TypePointer UniformConstant 26
+ 39: TypeArray 16 28
+ 40: TypePointer UniformConstant 39
+ 41(sA): 40(ptr) Variable UniformConstant
+ 42: 32(int) Constant 2
+ 45: TypeSampledImage 26
+ 47: TypeVector 8(float) 3
+ 48: 47(fvec3) ConstantComposite 23 23 23
+ 58(tex2D): 13(ptr) Variable UniformConstant
+ 62: TypeImage 8(float) Cube sampled format:Unknown
+ 63: TypePointer UniformConstant 62
+ 64(texCube): 63(ptr) Variable UniformConstant
+ 67: TypeSampledImage 62
+ 69: TypeImage 8(float) Cube array sampled format:Unknown
+ 70: TypePointer UniformConstant 69
+71(texCubeArray): 70(ptr) Variable UniformConstant
+ 74: TypeSampledImage 69
+ 77(sShadow): 17(ptr) Variable UniformConstant
+ 79: TypeImage 8(float) Cube depth array sampled format:Unknown
+ 80: TypeSampledImage 79
+ 82: TypeImage 32(int) Cube array sampled format:Unknown
+ 83: TypePointer UniformConstant 82
+84(itexCubeArray): 83(ptr) Variable UniformConstant
+ 87: TypeSampledImage 82
+ 89: TypeImage 27(int) Cube array sampled format:Unknown
+ 90: TypePointer UniformConstant 89
+91(utexCubeArray): 90(ptr) Variable UniformConstant
+ 94: TypeSampledImage 89
+ 96: TypeImage 8(float) 1D array sampled format:Unknown
+ 97: TypePointer UniformConstant 96
+ 98(tex1DArray): 97(ptr) Variable UniformConstant
+ 101: TypeImage 8(float) 1D depth array sampled format:Unknown
+ 102: TypeSampledImage 101
+ 104: TypeImage 32(int) 1D array sampled format:Unknown
+ 105: TypePointer UniformConstant 104
+106(itex1DArray): 105(ptr) Variable UniformConstant
+ 109: TypeSampledImage 104
+ 111: TypeImage 27(int) 1D sampled format:Unknown
+ 112: TypePointer UniformConstant 111
+ 113(utex1D): 112(ptr) Variable UniformConstant
+ 116: TypeSampledImage 111
+ 118: TypeImage 32(int) 1D sampled format:Unknown
+ 119: TypePointer UniformConstant 118
+ 120(itex1D): 119(ptr) Variable UniformConstant
+ 123: TypeSampledImage 118
+ 125: TypeImage 27(int) 1D array sampled format:Unknown
+ 126: TypePointer UniformConstant 125
+127(utex1DArray): 126(ptr) Variable UniformConstant
+ 130: TypeSampledImage 125
+ 132: TypeImage 8(float) Buffer sampled format:Unknown
+ 133: TypePointer UniformConstant 132
+ 134(texBuffer): 133(ptr) Variable UniformConstant
+ 137: TypeSampledImage 132
+ 141: TypeImage 8(float) Cube depth sampled format:Unknown
+ 142: TypeSampledImage 141
+ 144: TypeImage 8(float) 2D array sampled format:Unknown
+ 145: TypePointer UniformConstant 144
+ 146(tex2DArray): 145(ptr) Variable UniformConstant
+ 149: TypeSampledImage 144
+ 153: TypeImage 8(float) 2D depth array sampled format:Unknown
+ 154: TypeSampledImage 153
+ 156: TypeImage 32(int) 2D sampled format:Unknown
+ 157: TypePointer UniformConstant 156
+ 158(itex2D): 157(ptr) Variable UniformConstant
+ 161: TypeSampledImage 156
+ 163: TypeImage 32(int) 3D sampled format:Unknown
+ 164: TypePointer UniformConstant 163
+ 165(itex3D): 164(ptr) Variable UniformConstant
+ 168: TypeSampledImage 163
+ 170: TypeImage 32(int) Cube sampled format:Unknown
+ 171: TypePointer UniformConstant 170
+ 172(itexCube): 171(ptr) Variable UniformConstant
+ 175: TypeSampledImage 170
+ 177: TypeImage 32(int) 2D array sampled format:Unknown
+ 178: TypePointer UniformConstant 177
+179(itex2DArray): 178(ptr) Variable UniformConstant
+ 182: TypeSampledImage 177
+ 184: TypeImage 27(int) 2D sampled format:Unknown
+ 185: TypePointer UniformConstant 184
+ 186(utex2D): 185(ptr) Variable UniformConstant
+ 189: TypeSampledImage 184
+ 191: TypeImage 27(int) 3D sampled format:Unknown
+ 192: TypePointer UniformConstant 191
+ 193(utex3D): 192(ptr) Variable UniformConstant
+ 196: TypeSampledImage 191
+ 198: TypeImage 27(int) Cube sampled format:Unknown
+ 199: TypePointer UniformConstant 198
+ 200(utexCube): 199(ptr) Variable UniformConstant
+ 203: TypeSampledImage 198
+ 205: TypeImage 27(int) 2D array sampled format:Unknown
+ 206: TypePointer UniformConstant 205
+207(utex2DArray): 206(ptr) Variable UniformConstant
+ 210: TypeSampledImage 205
+ 212: TypeImage 32(int) Rect sampled format:Unknown
+ 213: TypePointer UniformConstant 212
+ 214(itex2DRect): 213(ptr) Variable UniformConstant
+ 217: TypeSampledImage 212
+ 219: TypeImage 27(int) Rect sampled format:Unknown
+ 220: TypePointer UniformConstant 219
+ 221(utex2DRect): 220(ptr) Variable UniformConstant
+ 224: TypeSampledImage 219
+ 226: TypeImage 32(int) Buffer sampled format:Unknown
+ 227: TypePointer UniformConstant 226
+ 228(itexBuffer): 227(ptr) Variable UniformConstant
+ 231: TypeSampledImage 226
+ 233: TypeImage 27(int) Buffer sampled format:Unknown
+ 234: TypePointer UniformConstant 233
+ 235(utexBuffer): 234(ptr) Variable UniformConstant
+ 238: TypeSampledImage 233
+ 240: TypeImage 8(float) 2D multi-sampled sampled format:Unknown
+ 241: TypePointer UniformConstant 240
+ 242(tex2DMS): 241(ptr) Variable UniformConstant
+ 245: TypeSampledImage 240
+ 247: TypeImage 32(int) 2D multi-sampled sampled format:Unknown
+ 248: TypePointer UniformConstant 247
+ 249(itex2DMS): 248(ptr) Variable UniformConstant
+ 252: TypeSampledImage 247
+ 254: TypeImage 27(int) 2D multi-sampled sampled format:Unknown
+ 255: TypePointer UniformConstant 254
+ 256(utex2DMS): 255(ptr) Variable UniformConstant
+ 259: TypeSampledImage 254
+ 261: TypeImage 8(float) 2D array multi-sampled sampled format:Unknown
+ 262: TypePointer UniformConstant 261
+263(tex2DMSArray): 262(ptr) Variable UniformConstant
+ 266: TypeSampledImage 261
+ 268: TypeImage 32(int) 2D array multi-sampled sampled format:Unknown
+ 269: TypePointer UniformConstant 268
+270(itex2DMSArray): 269(ptr) Variable UniformConstant
+ 273: TypeSampledImage 268
+ 275: TypeImage 27(int) 2D array multi-sampled sampled format:Unknown
+ 276: TypePointer UniformConstant 275
+277(utex2DMSArray): 276(ptr) Variable UniformConstant
+ 280: TypeSampledImage 275
+ 282: TypeImage 8(float) 1D sampled format:Unknown
+ 283: TypePointer UniformConstant 282
+ 284(tex1D): 283(ptr) Variable UniformConstant
+ 287: TypeSampledImage 282
+ 291: TypeImage 8(float) 1D depth sampled format:Unknown
+ 292: TypeSampledImage 291
+ 294(tex3D): 36(ptr) Variable UniformConstant
+ 300: TypeImage 8(float) 2D depth sampled format:Unknown
+ 301: TypeSampledImage 300
+ 303: TypeImage 8(float) Rect sampled format:Unknown
+ 304: TypePointer UniformConstant 303
+ 305(tex2DRect): 304(ptr) Variable UniformConstant
+ 308: TypeSampledImage 303
+ 312: TypeImage 8(float) Rect depth sampled format:Unknown
+ 313: TypeSampledImage 312
+ 317: TypeSampledImage 96
+ 4(main): 2 Function None 3
+ 5: Label
+ 15: 12 Load 14(t2d)
+ 19: 16 Load 18(s)
+ 21: 20 SampledImage 15 19
+ 25: 9(fvec4) ImageSampleImplicitLod 21 24
+ Store 11(color) 25
+ 35: 32(int) Load 34(i)
+ 37: 36(ptr) AccessChain 31(t3d) 35
+ 38: 26 Load 37
+ 43: 17(ptr) AccessChain 41(sA) 42
+ 44: 16 Load 43
+ 46: 45 SampledImage 38 44
+ 49: 9(fvec4) ImageSampleImplicitLod 46 48
+ 50: 9(fvec4) Load 11(color)
+ 51: 9(fvec4) FAdd 50 49
+ Store 11(color) 51
+ 52: 12 Load 14(t2d)
+ 53: 16 Load 18(s)
+ 54: 20 SampledImage 52 53
+ 55: 9(fvec4) ImageSampleImplicitLod 54 24
+ 56: 9(fvec4) Load 11(color)
+ 57: 9(fvec4) FAdd 56 55
+ Store 11(color) 57
+ Return
+ FunctionEnd
+ 6(foo(): 2 Function None 3
+ 7: Label
+ 59: 12 Load 58(tex2D)
+ 60: 16 Load 18(s)
+ 61: 20 SampledImage 59 60
+ 65: 62 Load 64(texCube)
+ 66: 16 Load 18(s)
+ 68: 67 SampledImage 65 66
+ 72: 69 Load 71(texCubeArray)
+ 73: 16 Load 18(s)
+ 75: 74 SampledImage 72 73
+ 76: 69 Load 71(texCubeArray)
+ 78: 16 Load 77(sShadow)
+ 81: 80 SampledImage 76 78
+ 85: 82 Load 84(itexCubeArray)
+ 86: 16 Load 18(s)
+ 88: 87 SampledImage 85 86
+ 92: 89 Load 91(utexCubeArray)
+ 93: 16 Load 18(s)
+ 95: 94 SampledImage 92 93
+ 99: 96 Load 98(tex1DArray)
+ 100: 16 Load 77(sShadow)
+ 103: 102 SampledImage 99 100
+ 107: 104 Load 106(itex1DArray)
+ 108: 16 Load 18(s)
+ 110: 109 SampledImage 107 108
+ 114: 111 Load 113(utex1D)
+ 115: 16 Load 18(s)
+ 117: 116 SampledImage 114 115
+ 121: 118 Load 120(itex1D)
+ 122: 16 Load 18(s)
+ 124: 123 SampledImage 121 122
+ 128: 125 Load 127(utex1DArray)
+ 129: 16 Load 18(s)
+ 131: 130 SampledImage 128 129
+ 135: 132 Load 134(texBuffer)
+ 136: 16 Load 18(s)
+ 138: 137 SampledImage 135 136
+ 139: 62 Load 64(texCube)
+ 140: 16 Load 77(sShadow)
+ 143: 142 SampledImage 139 140
+ 147: 144 Load 146(tex2DArray)
+ 148: 16 Load 18(s)
+ 150: 149 SampledImage 147 148
+ 151: 144 Load 146(tex2DArray)
+ 152: 16 Load 77(sShadow)
+ 155: 154 SampledImage 151 152
+ 159: 156 Load 158(itex2D)
+ 160: 16 Load 18(s)
+ 162: 161 SampledImage 159 160
+ 166: 163 Load 165(itex3D)
+ 167: 16 Load 18(s)
+ 169: 168 SampledImage 166 167
+ 173: 170 Load 172(itexCube)
+ 174: 16 Load 18(s)
+ 176: 175 SampledImage 173 174
+ 180: 177 Load 179(itex2DArray)
+ 181: 16 Load 18(s)
+ 183: 182 SampledImage 180 181
+ 187: 184 Load 186(utex2D)
+ 188: 16 Load 18(s)
+ 190: 189 SampledImage 187 188
+ 194: 191 Load 193(utex3D)
+ 195: 16 Load 18(s)
+ 197: 196 SampledImage 194 195
+ 201: 198 Load 200(utexCube)
+ 202: 16 Load 18(s)
+ 204: 203 SampledImage 201 202
+ 208: 205 Load 207(utex2DArray)
+ 209: 16 Load 18(s)
+ 211: 210 SampledImage 208 209
+ 215: 212 Load 214(itex2DRect)
+ 216: 16 Load 18(s)
+ 218: 217 SampledImage 215 216
+ 222: 219 Load 221(utex2DRect)
+ 223: 16 Load 18(s)
+ 225: 224 SampledImage 222 223
+ 229: 226 Load 228(itexBuffer)
+ 230: 16 Load 18(s)
+ 232: 231 SampledImage 229 230
+ 236: 233 Load 235(utexBuffer)
+ 237: 16 Load 18(s)
+ 239: 238 SampledImage 236 237
+ 243: 240 Load 242(tex2DMS)
+ 244: 16 Load 18(s)
+ 246: 245 SampledImage 243 244
+ 250: 247 Load 249(itex2DMS)
+ 251: 16 Load 18(s)
+ 253: 252 SampledImage 250 251
+ 257: 254 Load 256(utex2DMS)
+ 258: 16 Load 18(s)
+ 260: 259 SampledImage 257 258
+ 264: 261 Load 263(tex2DMSArray)
+ 265: 16 Load 18(s)
+ 267: 266 SampledImage 264 265
+ 271: 268 Load 270(itex2DMSArray)
+ 272: 16 Load 18(s)
+ 274: 273 SampledImage 271 272
+ 278: 275 Load 277(utex2DMSArray)
+ 279: 16 Load 18(s)
+ 281: 280 SampledImage 278 279
+ 285: 282 Load 284(tex1D)
+ 286: 16 Load 18(s)
+ 288: 287 SampledImage 285 286
+ 289: 282 Load 284(tex1D)
+ 290: 16 Load 77(sShadow)
+ 293: 292 SampledImage 289 290
+ 295: 26 Load 294(tex3D)
+ 296: 16 Load 18(s)
+ 297: 45 SampledImage 295 296
+ 298: 12 Load 58(tex2D)
+ 299: 16 Load 77(sShadow)
+ 302: 301 SampledImage 298 299
+ 306: 303 Load 305(tex2DRect)
+ 307: 16 Load 18(s)
+ 309: 308 SampledImage 306 307
+ 310: 303 Load 305(tex2DRect)
+ 311: 16 Load 77(sShadow)
+ 314: 313 SampledImage 310 311
+ 315: 96 Load 98(tex1DArray)
+ 316: 16 Load 18(s)
+ 318: 317 SampledImage 315 316
+ Return
+ FunctionEnd
diff --git a/chromium/third_party/glslang/src/Test/baseResults/spv.set.vert.out b/chromium/third_party/glslang/src/Test/baseResults/spv.set.vert.out
new file mode 100755
index 00000000000..72fbaa70dcc
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/spv.set.vert.out
@@ -0,0 +1,51 @@
+spv.set.vert
+Warning, version 450 is not yet complete; most version-specific features are present, but some are missing.
+
+
+Linked vertex stage:
+
+
+// Module Version 10000
+// Generated by (magic number): 80001
+// Id's are bound by 22
+
+ Capability Shader
+ 1: ExtInstImport "GLSL.std.450"
+ MemoryModel Logical GLSL450
+ EntryPoint Vertex 4 "main" 9
+ Source GLSL 450
+ Name 4 "main"
+ Name 9 "color"
+ Name 10 "setBuf"
+ MemberName 10(setBuf) 0 "color"
+ Name 12 "setBufInst"
+ Name 21 "samp2D"
+ MemberDecorate 10(setBuf) 0 Offset 0
+ Decorate 10(setBuf) BufferBlock
+ Decorate 12(setBufInst) DescriptorSet 0
+ Decorate 12(setBufInst) Binding 8
+ Decorate 21(samp2D) DescriptorSet 4
+ Decorate 21(samp2D) Binding 7
+ 2: TypeVoid
+ 3: TypeFunction 2
+ 6: TypeFloat 32
+ 7: TypeVector 6(float) 4
+ 8: TypePointer Output 7(fvec4)
+ 9(color): 8(ptr) Variable Output
+ 10(setBuf): TypeStruct 7(fvec4)
+ 11: TypePointer Uniform 10(setBuf)
+ 12(setBufInst): 11(ptr) Variable Uniform
+ 13: TypeInt 32 1
+ 14: 13(int) Constant 0
+ 15: TypePointer Uniform 7(fvec4)
+ 18: TypeImage 6(float) 2D sampled format:Unknown
+ 19: TypeSampledImage 18
+ 20: TypePointer UniformConstant 19
+ 21(samp2D): 20(ptr) Variable UniformConstant
+ 4(main): 2 Function None 3
+ 5: Label
+ 16: 15(ptr) AccessChain 12(setBufInst) 14
+ 17: 7(fvec4) Load 16
+ Store 9(color) 17
+ Return
+ FunctionEnd
diff --git a/chromium/third_party/glslang/src/Test/baseResults/spv.shaderBallot.comp.out b/chromium/third_party/glslang/src/Test/baseResults/spv.shaderBallot.comp.out
new file mode 100644
index 00000000000..cb2e0130ab2
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/spv.shaderBallot.comp.out
@@ -0,0 +1,314 @@
+spv.shaderBallot.comp
+Warning, version 450 is not yet complete; most version-specific features are present, but some are missing.
+
+
+Linked compute stage:
+
+
+Missing functionality: shader ballot
+// Module Version 10000
+// Generated by (magic number): 80001
+// Id's are bound by 241
+
+ Capability Shader
+ Capability Int64
+ 1: ExtInstImport "GLSL.std.450"
+ MemoryModel Logical GLSL450
+ EntryPoint GLCompute 4 "main" 10 22 24 27 30 33
+ ExecutionMode 4 LocalSize 8 8 1
+ Source GLSL 450
+ SourceExtension "GL_ARB_gpu_shader_int64"
+ SourceExtension "GL_ARB_shader_ballot"
+ Name 4 "main"
+ Name 8 "invocation"
+ Name 10 "gl_SubGroupInvocationARB"
+ Name 13 "gl_SubGroupSizeARB"
+ Name 20 "relMask"
+ Name 22 "gl_SubGroupEqMaskARB"
+ Name 24 "gl_SubGroupGeMaskARB"
+ Name 27 "gl_SubGroupGtMaskARB"
+ Name 30 "gl_SubGroupLeMaskARB"
+ Name 33 "gl_SubGroupLtMaskARB"
+ Name 48 "Buffers"
+ MemberName 48(Buffers) 0 "f4"
+ MemberName 48(Buffers) 1 "i4"
+ MemberName 48(Buffers) 2 "u4"
+ Name 51 "data"
+ MemberDecorate 48(Buffers) 0 Offset 0
+ MemberDecorate 48(Buffers) 1 Offset 16
+ MemberDecorate 48(Buffers) 2 Offset 32
+ Decorate 48(Buffers) BufferBlock
+ Decorate 51(data) DescriptorSet 0
+ Decorate 51(data) Binding 0
+ Decorate 240 BuiltIn WorkgroupSize
+ 2: TypeVoid
+ 3: TypeFunction 2
+ 6: TypeInt 32 0
+ 7: TypePointer Function 6(int)
+ 9: TypePointer Input 6(int)
+10(gl_SubGroupInvocationARB): 9(ptr) Variable Input
+ 12: TypePointer UniformConstant 6(int)
+13(gl_SubGroupSizeARB): 12(ptr) Variable UniformConstant
+ 16: 6(int) Constant 4
+ 18: TypeInt 64 0
+ 19: TypePointer Function 18(int)
+ 21: TypePointer Input 18(int)
+22(gl_SubGroupEqMaskARB): 21(ptr) Variable Input
+24(gl_SubGroupGeMaskARB): 21(ptr) Variable Input
+27(gl_SubGroupGtMaskARB): 21(ptr) Variable Input
+30(gl_SubGroupLeMaskARB): 21(ptr) Variable Input
+33(gl_SubGroupLtMaskARB): 21(ptr) Variable Input
+ 37: TypeBool
+ 38: 37(bool) ConstantTrue
+ 43: TypeFloat 32
+ 44: TypeVector 43(float) 4
+ 45: TypeInt 32 1
+ 46: TypeVector 45(int) 4
+ 47: TypeVector 6(int) 4
+ 48(Buffers): TypeStruct 44(fvec4) 46(ivec4) 47(ivec4)
+ 49: TypeArray 48(Buffers) 16
+ 50: TypePointer Uniform 49
+ 51(data): 50(ptr) Variable Uniform
+ 53: 45(int) Constant 0
+ 54: 6(int) Constant 0
+ 55: TypePointer Uniform 43(float)
+ 62: 45(int) Constant 1
+ 63: TypeVector 43(float) 2
+ 64: TypePointer Uniform 44(fvec4)
+ 74: 45(int) Constant 2
+ 75: TypeVector 43(float) 3
+ 85: 45(int) Constant 3
+ 92: TypePointer Uniform 45(int)
+ 99: TypeVector 45(int) 2
+ 100: TypePointer Uniform 46(ivec4)
+ 110: TypeVector 45(int) 3
+ 126: TypePointer Uniform 6(int)
+ 133: TypeVector 6(int) 2
+ 134: TypePointer Uniform 47(ivec4)
+ 144: TypeVector 6(int) 3
+ 238: 6(int) Constant 8
+ 239: 6(int) Constant 1
+ 240: 144(ivec3) ConstantComposite 238 238 239
+ 4(main): 2 Function None 3
+ 5: Label
+ 8(invocation): 7(ptr) Variable Function
+ 20(relMask): 19(ptr) Variable Function
+ 11: 6(int) Load 10(gl_SubGroupInvocationARB)
+ 14: 6(int) Load 13(gl_SubGroupSizeARB)
+ 15: 6(int) IAdd 11 14
+ 17: 6(int) UMod 15 16
+ Store 8(invocation) 17
+ 23: 18(int) Load 22(gl_SubGroupEqMaskARB)
+ 25: 18(int) Load 24(gl_SubGroupGeMaskARB)
+ 26: 18(int) IAdd 23 25
+ 28: 18(int) Load 27(gl_SubGroupGtMaskARB)
+ 29: 18(int) IAdd 26 28
+ 31: 18(int) Load 30(gl_SubGroupLeMaskARB)
+ 32: 18(int) IAdd 29 31
+ 34: 18(int) Load 33(gl_SubGroupLtMaskARB)
+ 35: 18(int) IAdd 32 34
+ Store 20(relMask) 35
+ 36: 18(int) Load 20(relMask)
+ 39: 18(int) ExtInst 1(GLSL.std.450) 0(Unknown) 38
+ 40: 37(bool) IEqual 36 39
+ SelectionMerge 42 None
+ BranchConditional 40 41 159
+ 41: Label
+ 52: 6(int) Load 8(invocation)
+ 56: 55(ptr) AccessChain 51(data) 53 53 54
+ 57: 43(float) Load 56
+ 58: 6(int) Load 8(invocation)
+ 59: 43(float) ExtInst 1(GLSL.std.450) 0(Unknown) 57 58
+ 60: 55(ptr) AccessChain 51(data) 52 53 54
+ Store 60 59
+ 61: 6(int) Load 8(invocation)
+ 65: 64(ptr) AccessChain 51(data) 62 53
+ 66: 44(fvec4) Load 65
+ 67: 63(fvec2) VectorShuffle 66 66 0 1
+ 68: 6(int) Load 8(invocation)
+ 69: 63(fvec2) ExtInst 1(GLSL.std.450) 0(Unknown) 67 68
+ 70: 64(ptr) AccessChain 51(data) 61 53
+ 71: 44(fvec4) Load 70
+ 72: 44(fvec4) VectorShuffle 71 69 4 5 2 3
+ Store 70 72
+ 73: 6(int) Load 8(invocation)
+ 76: 64(ptr) AccessChain 51(data) 74 53
+ 77: 44(fvec4) Load 76
+ 78: 75(fvec3) VectorShuffle 77 77 0 1 2
+ 79: 6(int) Load 8(invocation)
+ 80: 75(fvec3) ExtInst 1(GLSL.std.450) 0(Unknown) 78 79
+ 81: 64(ptr) AccessChain 51(data) 73 53
+ 82: 44(fvec4) Load 81
+ 83: 44(fvec4) VectorShuffle 82 80 4 5 6 3
+ Store 81 83
+ 84: 6(int) Load 8(invocation)
+ 86: 64(ptr) AccessChain 51(data) 85 53
+ 87: 44(fvec4) Load 86
+ 88: 6(int) Load 8(invocation)
+ 89: 44(fvec4) ExtInst 1(GLSL.std.450) 0(Unknown) 87 88
+ 90: 64(ptr) AccessChain 51(data) 84 53
+ Store 90 89
+ 91: 6(int) Load 8(invocation)
+ 93: 92(ptr) AccessChain 51(data) 53 62 54
+ 94: 45(int) Load 93
+ 95: 6(int) Load 8(invocation)
+ 96: 45(int) ExtInst 1(GLSL.std.450) 0(Unknown) 94 95
+ 97: 92(ptr) AccessChain 51(data) 91 62 54
+ Store 97 96
+ 98: 6(int) Load 8(invocation)
+ 101: 100(ptr) AccessChain 51(data) 62 62
+ 102: 46(ivec4) Load 101
+ 103: 99(ivec2) VectorShuffle 102 102 0 1
+ 104: 6(int) Load 8(invocation)
+ 105: 99(ivec2) ExtInst 1(GLSL.std.450) 0(Unknown) 103 104
+ 106: 100(ptr) AccessChain 51(data) 98 62
+ 107: 46(ivec4) Load 106
+ 108: 46(ivec4) VectorShuffle 107 105 4 5 2 3
+ Store 106 108
+ 109: 6(int) Load 8(invocation)
+ 111: 100(ptr) AccessChain 51(data) 74 62
+ 112: 46(ivec4) Load 111
+ 113: 110(ivec3) VectorShuffle 112 112 0 1 2
+ 114: 6(int) Load 8(invocation)
+ 115: 110(ivec3) ExtInst 1(GLSL.std.450) 0(Unknown) 113 114
+ 116: 100(ptr) AccessChain 51(data) 109 62
+ 117: 46(ivec4) Load 116
+ 118: 46(ivec4) VectorShuffle 117 115 4 5 6 3
+ Store 116 118
+ 119: 6(int) Load 8(invocation)
+ 120: 100(ptr) AccessChain 51(data) 85 62
+ 121: 46(ivec4) Load 120
+ 122: 6(int) Load 8(invocation)
+ 123: 46(ivec4) ExtInst 1(GLSL.std.450) 0(Unknown) 121 122
+ 124: 100(ptr) AccessChain 51(data) 119 62
+ Store 124 123
+ 125: 6(int) Load 8(invocation)
+ 127: 126(ptr) AccessChain 51(data) 53 74 54
+ 128: 6(int) Load 127
+ 129: 6(int) Load 8(invocation)
+ 130: 6(int) ExtInst 1(GLSL.std.450) 0(Unknown) 128 129
+ 131: 126(ptr) AccessChain 51(data) 125 74 54
+ Store 131 130
+ 132: 6(int) Load 8(invocation)
+ 135: 134(ptr) AccessChain 51(data) 62 74
+ 136: 47(ivec4) Load 135
+ 137: 133(ivec2) VectorShuffle 136 136 0 1
+ 138: 6(int) Load 8(invocation)
+ 139: 133(ivec2) ExtInst 1(GLSL.std.450) 0(Unknown) 137 138
+ 140: 134(ptr) AccessChain 51(data) 132 74
+ 141: 47(ivec4) Load 140
+ 142: 47(ivec4) VectorShuffle 141 139 4 5 2 3
+ Store 140 142
+ 143: 6(int) Load 8(invocation)
+ 145: 134(ptr) AccessChain 51(data) 74 74
+ 146: 47(ivec4) Load 145
+ 147: 144(ivec3) VectorShuffle 146 146 0 1 2
+ 148: 6(int) Load 8(invocation)
+ 149: 144(ivec3) ExtInst 1(GLSL.std.450) 0(Unknown) 147 148
+ 150: 134(ptr) AccessChain 51(data) 143 74
+ 151: 47(ivec4) Load 150
+ 152: 47(ivec4) VectorShuffle 151 149 4 5 6 3
+ Store 150 152
+ 153: 6(int) Load 8(invocation)
+ 154: 134(ptr) AccessChain 51(data) 85 74
+ 155: 47(ivec4) Load 154
+ 156: 6(int) Load 8(invocation)
+ 157: 47(ivec4) ExtInst 1(GLSL.std.450) 0(Unknown) 155 156
+ 158: 134(ptr) AccessChain 51(data) 153 74
+ Store 158 157
+ Branch 42
+ 159: Label
+ 160: 6(int) Load 8(invocation)
+ 161: 55(ptr) AccessChain 51(data) 53 53 54
+ 162: 43(float) Load 161
+ 163: 43(float) ExtInst 1(GLSL.std.450) 0(Unknown) 162
+ 164: 55(ptr) AccessChain 51(data) 160 53 54
+ Store 164 163
+ 165: 6(int) Load 8(invocation)
+ 166: 64(ptr) AccessChain 51(data) 62 53
+ 167: 44(fvec4) Load 166
+ 168: 63(fvec2) VectorShuffle 167 167 0 1
+ 169: 63(fvec2) ExtInst 1(GLSL.std.450) 0(Unknown) 168
+ 170: 64(ptr) AccessChain 51(data) 165 53
+ 171: 44(fvec4) Load 170
+ 172: 44(fvec4) VectorShuffle 171 169 4 5 2 3
+ Store 170 172
+ 173: 6(int) Load 8(invocation)
+ 174: 64(ptr) AccessChain 51(data) 74 53
+ 175: 44(fvec4) Load 174
+ 176: 75(fvec3) VectorShuffle 175 175 0 1 2
+ 177: 75(fvec3) ExtInst 1(GLSL.std.450) 0(Unknown) 176
+ 178: 64(ptr) AccessChain 51(data) 173 53
+ 179: 44(fvec4) Load 178
+ 180: 44(fvec4) VectorShuffle 179 177 4 5 6 3
+ Store 178 180
+ 181: 6(int) Load 8(invocation)
+ 182: 64(ptr) AccessChain 51(data) 85 53
+ 183: 44(fvec4) Load 182
+ 184: 44(fvec4) ExtInst 1(GLSL.std.450) 0(Unknown) 183
+ 185: 64(ptr) AccessChain 51(data) 181 53
+ Store 185 184
+ 186: 6(int) Load 8(invocation)
+ 187: 92(ptr) AccessChain 51(data) 53 62 54
+ 188: 45(int) Load 187
+ 189: 45(int) ExtInst 1(GLSL.std.450) 0(Unknown) 188
+ 190: 92(ptr) AccessChain 51(data) 186 62 54
+ Store 190 189
+ 191: 6(int) Load 8(invocation)
+ 192: 100(ptr) AccessChain 51(data) 62 62
+ 193: 46(ivec4) Load 192
+ 194: 99(ivec2) VectorShuffle 193 193 0 1
+ 195: 99(ivec2) ExtInst 1(GLSL.std.450) 0(Unknown) 194
+ 196: 100(ptr) AccessChain 51(data) 191 62
+ 197: 46(ivec4) Load 196
+ 198: 46(ivec4) VectorShuffle 197 195 4 5 2 3
+ Store 196 198
+ 199: 6(int) Load 8(invocation)
+ 200: 100(ptr) AccessChain 51(data) 74 62
+ 201: 46(ivec4) Load 200
+ 202: 110(ivec3) VectorShuffle 201 201 0 1 2
+ 203: 110(ivec3) ExtInst 1(GLSL.std.450) 0(Unknown) 202
+ 204: 100(ptr) AccessChain 51(data) 199 62
+ 205: 46(ivec4) Load 204
+ 206: 46(ivec4) VectorShuffle 205 203 4 5 6 3
+ Store 204 206
+ 207: 6(int) Load 8(invocation)
+ 208: 100(ptr) AccessChain 51(data) 85 62
+ 209: 46(ivec4) Load 208
+ 210: 46(ivec4) ExtInst 1(GLSL.std.450) 0(Unknown) 209
+ 211: 100(ptr) AccessChain 51(data) 207 62
+ Store 211 210
+ 212: 6(int) Load 8(invocation)
+ 213: 126(ptr) AccessChain 51(data) 53 74 54
+ 214: 6(int) Load 213
+ 215: 6(int) ExtInst 1(GLSL.std.450) 0(Unknown) 214
+ 216: 126(ptr) AccessChain 51(data) 212 74 54
+ Store 216 215
+ 217: 6(int) Load 8(invocation)
+ 218: 134(ptr) AccessChain 51(data) 62 74
+ 219: 47(ivec4) Load 218
+ 220: 133(ivec2) VectorShuffle 219 219 0 1
+ 221: 133(ivec2) ExtInst 1(GLSL.std.450) 0(Unknown) 220
+ 222: 134(ptr) AccessChain 51(data) 217 74
+ 223: 47(ivec4) Load 222
+ 224: 47(ivec4) VectorShuffle 223 221 4 5 2 3
+ Store 222 224
+ 225: 6(int) Load 8(invocation)
+ 226: 134(ptr) AccessChain 51(data) 74 74
+ 227: 47(ivec4) Load 226
+ 228: 144(ivec3) VectorShuffle 227 227 0 1 2
+ 229: 144(ivec3) ExtInst 1(GLSL.std.450) 0(Unknown) 228
+ 230: 134(ptr) AccessChain 51(data) 225 74
+ 231: 47(ivec4) Load 230
+ 232: 47(ivec4) VectorShuffle 231 229 4 5 6 3
+ Store 230 232
+ 233: 6(int) Load 8(invocation)
+ 234: 134(ptr) AccessChain 51(data) 85 74
+ 235: 47(ivec4) Load 234
+ 236: 47(ivec4) ExtInst 1(GLSL.std.450) 0(Unknown) 235
+ 237: 134(ptr) AccessChain 51(data) 233 74
+ Store 237 236
+ Branch 42
+ 42: Label
+ Return
+ FunctionEnd
diff --git a/chromium/third_party/glslang/src/Test/baseResults/spv.shaderGroupVote.comp.out b/chromium/third_party/glslang/src/Test/baseResults/spv.shaderGroupVote.comp.out
new file mode 100644
index 00000000000..e63164d024e
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/spv.shaderGroupVote.comp.out
@@ -0,0 +1,71 @@
+spv.shaderGroupVote.comp
+Warning, version 450 is not yet complete; most version-specific features are present, but some are missing.
+
+
+Linked compute stage:
+
+
+// Module Version 10000
+// Generated by (magic number): 80001
+// Id's are bound by 37
+
+ Capability Shader
+ Capability Groups
+ 1: ExtInstImport "GLSL.std.450"
+ MemoryModel Logical GLSL450
+ EntryPoint GLCompute 4 "main"
+ ExecutionMode 4 LocalSize 4 4 1
+ Source GLSL 450
+ SourceExtension "GL_ARB_shader_group_vote"
+ Name 4 "main"
+ Name 8 "b1"
+ Name 10 "Buffers"
+ MemberName 10(Buffers) 0 "b"
+ Name 12 ""
+ MemberDecorate 10(Buffers) 0 Offset 0
+ Decorate 10(Buffers) BufferBlock
+ Decorate 12 DescriptorSet 0
+ Decorate 12 Binding 0
+ Decorate 36 BuiltIn WorkgroupSize
+ 2: TypeVoid
+ 3: TypeFunction 2
+ 6: TypeBool
+ 7: TypePointer Function 6(bool)
+ 9: TypeInt 32 0
+ 10(Buffers): TypeStruct 9(int)
+ 11: TypePointer Uniform 10(Buffers)
+ 12: 11(ptr) Variable Uniform
+ 13: TypeInt 32 1
+ 14: 13(int) Constant 0
+ 15: TypePointer Uniform 9(int)
+ 18: 9(int) Constant 0
+ 21: 9(int) Constant 3
+ 31: 9(int) Constant 1
+ 34: TypeVector 9(int) 3
+ 35: 9(int) Constant 4
+ 36: 34(ivec3) ConstantComposite 35 35 31
+ 4(main): 2 Function None 3
+ 5: Label
+ 8(b1): 7(ptr) Variable Function
+ 16: 15(ptr) AccessChain 12 14
+ 17: 9(int) Load 16
+ 19: 6(bool) INotEqual 17 18
+ Store 8(b1) 19
+ 20: 6(bool) Load 8(b1)
+ 22: 6(bool) GroupAny 21 20
+ Store 8(b1) 22
+ 23: 6(bool) Load 8(b1)
+ 24: 6(bool) GroupAll 21 23
+ Store 8(b1) 24
+ 25: 6(bool) Load 8(b1)
+ 26: 6(bool) GroupAll 21 25
+ 27: 6(bool) GroupAny 21 25
+ 28: 6(bool) LogicalNot 27
+ 29: 6(bool) LogicalOr 26 28
+ Store 8(b1) 29
+ 30: 6(bool) Load 8(b1)
+ 32: 9(int) Select 30 31 18
+ 33: 15(ptr) AccessChain 12 14
+ Store 33 32
+ Return
+ FunctionEnd
diff --git a/chromium/third_party/glslang/src/Test/baseResults/spv.shiftOps.frag.out b/chromium/third_party/glslang/src/Test/baseResults/spv.shiftOps.frag.out
new file mode 100644
index 00000000000..39e40ece737
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/spv.shiftOps.frag.out
@@ -0,0 +1,70 @@
+spv.shiftOps.frag
+Warning, version 450 is not yet complete; most version-specific features are present, but some are missing.
+
+
+Linked fragment stage:
+
+
+// Module Version 10000
+// Generated by (magic number): 80001
+// Id's are bound by 38
+
+ Capability Shader
+ 1: ExtInstImport "GLSL.std.450"
+ MemoryModel Logical GLSL450
+ EntryPoint Fragment 4 "main" 9 11 15 25 27 30
+ ExecutionMode 4 OriginUpperLeft
+ Source GLSL 450
+ Name 4 "main"
+ Name 9 "icolor"
+ Name 11 "i3"
+ Name 15 "u1"
+ Name 25 "ucolor"
+ Name 27 "u3"
+ Name 30 "i1"
+ Decorate 11(i3) Flat
+ Decorate 15(u1) Flat
+ Decorate 27(u3) Flat
+ Decorate 30(i1) Flat
+ 2: TypeVoid
+ 3: TypeFunction 2
+ 6: TypeInt 32 1
+ 7: TypeVector 6(int) 3
+ 8: TypePointer Output 7(ivec3)
+ 9(icolor): 8(ptr) Variable Output
+ 10: TypePointer Input 7(ivec3)
+ 11(i3): 10(ptr) Variable Input
+ 13: TypeInt 32 0
+ 14: TypePointer Input 13(int)
+ 15(u1): 14(ptr) Variable Input
+ 17: TypeVector 13(int) 3
+ 20: 13(int) Constant 4
+ 24: TypePointer Output 17(ivec3)
+ 25(ucolor): 24(ptr) Variable Output
+ 26: TypePointer Input 17(ivec3)
+ 27(u3): 26(ptr) Variable Input
+ 29: TypePointer Input 6(int)
+ 30(i1): 29(ptr) Variable Input
+ 34: 6(int) Constant 5
+ 4(main): 2 Function None 3
+ 5: Label
+ 12: 7(ivec3) Load 11(i3)
+ 16: 13(int) Load 15(u1)
+ 18: 17(ivec3) CompositeConstruct 16 16 16
+ 19: 7(ivec3) ShiftLeftLogical 12 18
+ Store 9(icolor) 19
+ 21: 7(ivec3) Load 9(icolor)
+ 22: 17(ivec3) CompositeConstruct 20 20 20
+ 23: 7(ivec3) ShiftLeftLogical 21 22
+ Store 9(icolor) 23
+ 28: 17(ivec3) Load 27(u3)
+ 31: 6(int) Load 30(i1)
+ 32: 7(ivec3) CompositeConstruct 31 31 31
+ 33: 17(ivec3) ShiftRightLogical 28 32
+ Store 25(ucolor) 33
+ 35: 17(ivec3) Load 25(ucolor)
+ 36: 7(ivec3) CompositeConstruct 34 34 34
+ 37: 17(ivec3) ShiftRightLogical 35 36
+ Store 25(ucolor) 37
+ Return
+ FunctionEnd
diff --git a/chromium/third_party/glslang/src/Test/baseResults/spv.shortCircuit.frag.out b/chromium/third_party/glslang/src/Test/baseResults/spv.shortCircuit.frag.out
new file mode 100644
index 00000000000..5b39b1cba56
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/spv.shortCircuit.frag.out
@@ -0,0 +1,241 @@
+spv.shortCircuit.frag
+Warning, version 400 is not yet complete; most version-specific features are present, but some are missing.
+
+
+Linked fragment stage:
+
+
+// Module Version 10000
+// Generated by (magic number): 80001
+// Id's are bound by 147
+
+ Capability Shader
+ 1: ExtInstImport "GLSL.std.450"
+ MemoryModel Logical GLSL450
+ EntryPoint Fragment 4 "main" 12 24 34 113 140 142
+ ExecutionMode 4 OriginUpperLeft
+ Source GLSL 400
+ Name 4 "main"
+ Name 8 "foo("
+ Name 12 "of1"
+ Name 24 "of4"
+ Name 27 "ub"
+ Name 34 "ui"
+ Name 44 "uba"
+ Name 113 "uf"
+ Name 140 "uiv4"
+ Name 142 "uv4"
+ Name 145 "ub41"
+ Name 146 "ub42"
+ Decorate 34(ui) Flat
+ Decorate 140(uiv4) Flat
+ 2: TypeVoid
+ 3: TypeFunction 2
+ 6: TypeBool
+ 7: TypeFunction 6(bool)
+ 10: TypeFloat 32
+ 11: TypePointer Output 10(float)
+ 12(of1): 11(ptr) Variable Output
+ 14: 10(float) Constant 1065353216
+ 17: 10(float) Constant 1092616192
+ 21: 10(float) Constant 0
+ 22: TypeVector 10(float) 4
+ 23: TypePointer Output 22(fvec4)
+ 24(of4): 23(ptr) Variable Output
+ 25: 22(fvec4) ConstantComposite 21 21 21 21
+ 26: TypePointer Private 6(bool)
+ 27(ub): 26(ptr) Variable Private
+ 32: TypeInt 32 1
+ 33: TypePointer Input 32(int)
+ 34(ui): 33(ptr) Variable Input
+ 36: 32(int) Constant 2
+ 44(uba): 26(ptr) Variable Private
+ 112: TypePointer Input 10(float)
+ 113(uf): 112(ptr) Variable Input
+ 116: 10(float) Constant 1082130432
+ 138: TypeVector 32(int) 4
+ 139: TypePointer Input 138(ivec4)
+ 140(uiv4): 139(ptr) Variable Input
+ 141: TypePointer Input 22(fvec4)
+ 142(uv4): 141(ptr) Variable Input
+ 143: TypeVector 6(bool) 4
+ 144: TypePointer Private 143(bvec4)
+ 145(ub41): 144(ptr) Variable Private
+ 146(ub42): 144(ptr) Variable Private
+ 4(main): 2 Function None 3
+ 5: Label
+ Store 12(of1) 21
+ Store 24(of4) 25
+ 28: 6(bool) Load 27(ub)
+ 29: 6(bool) LogicalNot 28
+ SelectionMerge 31 None
+ BranchConditional 29 30 31
+ 30: Label
+ 35: 32(int) Load 34(ui)
+ 37: 6(bool) SGreaterThan 35 36
+ Branch 31
+ 31: Label
+ 38: 6(bool) Phi 28 5 37 30
+ SelectionMerge 40 None
+ BranchConditional 38 39 40
+ 39: Label
+ 41: 10(float) Load 12(of1)
+ 42: 10(float) FAdd 41 14
+ Store 12(of1) 42
+ Branch 40
+ 40: Label
+ 43: 6(bool) Load 27(ub)
+ 45: 6(bool) Load 44(uba)
+ 46: 6(bool) LogicalNot 45
+ 47: 6(bool) LogicalAnd 43 46
+ SelectionMerge 49 None
+ BranchConditional 47 48 49
+ 48: Label
+ 50: 10(float) Load 12(of1)
+ 51: 10(float) FAdd 50 14
+ Store 12(of1) 51
+ Branch 49
+ 49: Label
+ 52: 6(bool) Load 27(ub)
+ 53: 6(bool) LogicalNot 52
+ SelectionMerge 55 None
+ BranchConditional 53 54 55
+ 54: Label
+ 56: 6(bool) FunctionCall 8(foo()
+ Branch 55
+ 55: Label
+ 57: 6(bool) Phi 52 49 56 54
+ SelectionMerge 59 None
+ BranchConditional 57 58 59
+ 58: Label
+ 60: 10(float) Load 12(of1)
+ 61: 10(float) FAdd 60 14
+ Store 12(of1) 61
+ Branch 59
+ 59: Label
+ 62: 6(bool) Load 27(ub)
+ SelectionMerge 64 None
+ BranchConditional 62 63 64
+ 63: Label
+ 65: 6(bool) FunctionCall 8(foo()
+ Branch 64
+ 64: Label
+ 66: 6(bool) Phi 62 59 65 63
+ SelectionMerge 68 None
+ BranchConditional 66 67 68
+ 67: Label
+ 69: 10(float) Load 12(of1)
+ 70: 10(float) FAdd 69 14
+ Store 12(of1) 70
+ Branch 68
+ 68: Label
+ 71: 6(bool) FunctionCall 8(foo()
+ 72: 6(bool) Load 27(ub)
+ 73: 6(bool) LogicalOr 71 72
+ SelectionMerge 75 None
+ BranchConditional 73 74 75
+ 74: Label
+ 76: 10(float) Load 12(of1)
+ 77: 10(float) FAdd 76 14
+ Store 12(of1) 77
+ Branch 75
+ 75: Label
+ 78: 6(bool) FunctionCall 8(foo()
+ 79: 6(bool) Load 27(ub)
+ 80: 6(bool) LogicalAnd 78 79
+ SelectionMerge 82 None
+ BranchConditional 80 81 82
+ 81: Label
+ 83: 10(float) Load 12(of1)
+ 84: 10(float) FAdd 83 14
+ Store 12(of1) 84
+ Branch 82
+ 82: Label
+ 85: 6(bool) Load 27(ub)
+ 86: 6(bool) LogicalNot 85
+ SelectionMerge 88 None
+ BranchConditional 86 87 88
+ 87: Label
+ 89: 10(float) Load 12(of1)
+ 90: 10(float) FAdd 89 14
+ Store 12(of1) 90
+ 91: 6(bool) FOrdGreaterThan 90 14
+ Branch 88
+ 88: Label
+ 92: 6(bool) Phi 85 82 91 87
+ SelectionMerge 94 None
+ BranchConditional 92 93 94
+ 93: Label
+ 95: 22(fvec4) Load 24(of4)
+ 96: 22(fvec4) CompositeConstruct 14 14 14 14
+ 97: 22(fvec4) FAdd 95 96
+ Store 24(of4) 97
+ Branch 94
+ 94: Label
+ 98: 10(float) Load 12(of1)
+ 99: 10(float) FAdd 98 14
+ Store 12(of1) 99
+ 100: 6(bool) FOrdGreaterThan 99 14
+ 101: 6(bool) Load 27(ub)
+ 102: 6(bool) LogicalOr 100 101
+ SelectionMerge 104 None
+ BranchConditional 102 103 104
+ 103: Label
+ 105: 22(fvec4) Load 24(of4)
+ 106: 22(fvec4) CompositeConstruct 14 14 14 14
+ 107: 22(fvec4) FAdd 105 106
+ Store 24(of4) 107
+ Branch 104
+ 104: Label
+ 108: 6(bool) Load 27(ub)
+ 109: 6(bool) LogicalNot 108
+ SelectionMerge 111 None
+ BranchConditional 109 110 111
+ 110: Label
+ 114: 10(float) Load 113(uf)
+ 115: 10(float) ExtInst 1(GLSL.std.450) 13(Sin) 114
+ 117: 10(float) FMul 115 116
+ 118: 10(float) Load 12(of1)
+ 119: 6(bool) FOrdGreaterThan 117 118
+ Branch 111
+ 111: Label
+ 120: 6(bool) Phi 108 104 119 110
+ SelectionMerge 122 None
+ BranchConditional 120 121 122
+ 121: Label
+ 123: 10(float) Load 12(of1)
+ 124: 10(float) FAdd 123 14
+ Store 12(of1) 124
+ Branch 122
+ 122: Label
+ 125: 6(bool) Load 27(ub)
+ SelectionMerge 127 None
+ BranchConditional 125 126 127
+ 126: Label
+ 128: 10(float) Load 113(uf)
+ 129: 10(float) ExtInst 1(GLSL.std.450) 13(Sin) 128
+ 130: 10(float) FMul 129 116
+ 131: 10(float) Load 12(of1)
+ 132: 6(bool) FOrdGreaterThan 130 131
+ Branch 127
+ 127: Label
+ 133: 6(bool) Phi 125 122 132 126
+ SelectionMerge 135 None
+ BranchConditional 133 134 135
+ 134: Label
+ 136: 10(float) Load 12(of1)
+ 137: 10(float) FAdd 136 14
+ Store 12(of1) 137
+ Branch 135
+ 135: Label
+ Return
+ FunctionEnd
+ 8(foo(): 6(bool) Function None 7
+ 9: Label
+ 13: 10(float) Load 12(of1)
+ 15: 10(float) FAdd 13 14
+ Store 12(of1) 15
+ 16: 10(float) Load 12(of1)
+ 18: 6(bool) FOrdGreaterThan 16 17
+ ReturnValue 18
+ FunctionEnd
diff --git a/chromium/third_party/glslang/src/Test/baseResults/spv.simpleFunctionCall.frag.out b/chromium/third_party/glslang/src/Test/baseResults/spv.simpleFunctionCall.frag.out
new file mode 100755
index 00000000000..458a90dbac1
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/spv.simpleFunctionCall.frag.out
@@ -0,0 +1,39 @@
+spv.simpleFunctionCall.frag
+
+Linked fragment stage:
+
+
+// Module Version 10000
+// Generated by (magic number): 80001
+// Id's are bound by 19
+
+ Capability Shader
+ 1: ExtInstImport "GLSL.std.450"
+ MemoryModel Logical GLSL450
+ EntryPoint Fragment 4 "main" 12 17
+ ExecutionMode 4 OriginUpperLeft
+ Source GLSL 150
+ Name 4 "main"
+ Name 9 "foo("
+ Name 12 "BaseColor"
+ Name 17 "gl_FragColor"
+ 2: TypeVoid
+ 3: TypeFunction 2
+ 6: TypeFloat 32
+ 7: TypeVector 6(float) 4
+ 8: TypeFunction 7(fvec4)
+ 11: TypePointer Input 7(fvec4)
+ 12(BaseColor): 11(ptr) Variable Input
+ 16: TypePointer Output 7(fvec4)
+17(gl_FragColor): 16(ptr) Variable Output
+ 4(main): 2 Function None 3
+ 5: Label
+ 18: 7(fvec4) FunctionCall 9(foo()
+ Store 17(gl_FragColor) 18
+ Return
+ FunctionEnd
+ 9(foo(): 7(fvec4) Function None 8
+ 10: Label
+ 13: 7(fvec4) Load 12(BaseColor)
+ ReturnValue 13
+ FunctionEnd
diff --git a/chromium/third_party/glslang/src/Test/baseResults/spv.simpleMat.vert.out b/chromium/third_party/glslang/src/Test/baseResults/spv.simpleMat.vert.out
new file mode 100755
index 00000000000..3e0f05e19c6
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/spv.simpleMat.vert.out
@@ -0,0 +1,64 @@
+spv.simpleMat.vert
+WARNING: 0:3: varying deprecated in version 130; may be removed in future release
+
+
+Linked vertex stage:
+
+
+// Module Version 10000
+// Generated by (magic number): 80001
+// Id's are bound by 39
+
+ Capability Shader
+ 1: ExtInstImport "GLSL.std.450"
+ MemoryModel Logical GLSL450
+ EntryPoint Vertex 4 "main" 9 12 15 19 23 34
+ Source GLSL 330
+ Name 4 "main"
+ Name 9 "glPos"
+ Name 12 "mvp"
+ Name 15 "v"
+ Name 19 "f"
+ Name 23 "am3"
+ Name 34 "arraym"
+ 2: TypeVoid
+ 3: TypeFunction 2
+ 6: TypeFloat 32
+ 7: TypeVector 6(float) 4
+ 8: TypePointer Output 7(fvec4)
+ 9(glPos): 8(ptr) Variable Output
+ 10: TypeMatrix 7(fvec4) 4
+ 11: TypePointer Output 10
+ 12(mvp): 11(ptr) Variable Output
+ 14: TypePointer Input 7(fvec4)
+ 15(v): 14(ptr) Variable Input
+ 18: TypePointer Output 6(float)
+ 19(f): 18(ptr) Variable Output
+ 20: TypeVector 6(float) 3
+ 21: TypeMatrix 20(fvec3) 3
+ 22: TypePointer Input 21
+ 23(am3): 22(ptr) Variable Input
+ 24: TypeInt 32 1
+ 25: 24(int) Constant 2
+ 26: TypeInt 32 0
+ 27: 26(int) Constant 1
+ 28: TypePointer Input 6(float)
+ 31: 26(int) Constant 3
+ 32: TypeArray 10 31
+ 33: TypePointer Input 32
+ 34(arraym): 33(ptr) Variable Input
+ 35: 24(int) Constant 1
+ 4(main): 2 Function None 3
+ 5: Label
+ 13: 10 Load 12(mvp)
+ 16: 7(fvec4) Load 15(v)
+ 17: 7(fvec4) MatrixTimesVector 13 16
+ Store 9(glPos) 17
+ 29: 28(ptr) AccessChain 23(am3) 25 27
+ 30: 6(float) Load 29
+ 36: 28(ptr) AccessChain 34(arraym) 35 25 31
+ 37: 6(float) Load 36
+ 38: 6(float) FAdd 30 37
+ Store 19(f) 38
+ Return
+ FunctionEnd
diff --git a/chromium/third_party/glslang/src/Test/baseResults/spv.sparseTexture.frag.out b/chromium/third_party/glslang/src/Test/baseResults/spv.sparseTexture.frag.out
new file mode 100644
index 00000000000..ae48f41d72d
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/spv.sparseTexture.frag.out
@@ -0,0 +1,593 @@
+spv.sparseTexture.frag
+Warning, version 450 is not yet complete; most version-specific features are present, but some are missing.
+
+
+Linked fragment stage:
+
+
+// Module Version 10000
+// Generated by (magic number): 80001
+// Id's are bound by 438
+
+ Capability Shader
+ Capability SampledRect
+ Capability SparseResidency
+ Capability SampledCubeArray
+ 1: ExtInstImport "GLSL.std.450"
+ MemoryModel Logical GLSL450
+ EntryPoint Fragment 4 "main" 33 48 89 365 393 405 423
+ ExecutionMode 4 OriginUpperLeft
+ Source GLSL 450
+ SourceExtension "GL_ARB_sparse_texture2"
+ Name 4 "main"
+ Name 8 "resident"
+ Name 13 "texel"
+ Name 18 "itexel"
+ Name 23 "utexel"
+ Name 29 "s2D"
+ Name 33 "c2"
+ Name 35 "ResType"
+ Name 44 "s3D"
+ Name 48 "c3"
+ Name 59 "isCube"
+ Name 62 "ResType"
+ Name 71 "s2DShadow"
+ Name 77 "ResType"
+ Name 86 "sCubeArrayShadow"
+ Name 89 "c4"
+ Name 108 "usCubeArray"
+ Name 111 "ResType"
+ Name 140 "us2DRect"
+ Name 154 "s2DArrayShadow"
+ Name 188 "s2DMS"
+ Name 228 "is2DArray"
+ Name 261 "sCubeShadow"
+ Name 294 "s2DRectShadow"
+ Name 365 "offsets"
+ Name 390 "i2D"
+ Name 393 "ic2"
+ Name 402 "ii3D"
+ Name 405 "ic3"
+ Name 414 "i2DMS"
+ Name 423 "outColor"
+ Decorate 29(s2D) DescriptorSet 0
+ Decorate 44(s3D) DescriptorSet 0
+ Decorate 59(isCube) DescriptorSet 0
+ Decorate 71(s2DShadow) DescriptorSet 0
+ Decorate 86(sCubeArrayShadow) DescriptorSet 0
+ Decorate 108(usCubeArray) DescriptorSet 0
+ Decorate 140(us2DRect) DescriptorSet 0
+ Decorate 154(s2DArrayShadow) DescriptorSet 0
+ Decorate 188(s2DMS) DescriptorSet 0
+ Decorate 228(is2DArray) DescriptorSet 0
+ Decorate 261(sCubeShadow) DescriptorSet 0
+ Decorate 294(s2DRectShadow) DescriptorSet 0
+ Decorate 365(offsets) Flat
+ Decorate 390(i2D) DescriptorSet 0
+ Decorate 393(ic2) Flat
+ Decorate 402(ii3D) DescriptorSet 0
+ Decorate 405(ic3) Flat
+ Decorate 414(i2DMS) DescriptorSet 0
+ 2: TypeVoid
+ 3: TypeFunction 2
+ 6: TypeInt 32 1
+ 7: TypePointer Function 6(int)
+ 9: 6(int) Constant 0
+ 10: TypeFloat 32
+ 11: TypeVector 10(float) 4
+ 12: TypePointer Function 11(fvec4)
+ 14: 10(float) Constant 0
+ 15: 11(fvec4) ConstantComposite 14 14 14 14
+ 16: TypeVector 6(int) 4
+ 17: TypePointer Function 16(ivec4)
+ 19: 16(ivec4) ConstantComposite 9 9 9 9
+ 20: TypeInt 32 0
+ 21: TypeVector 20(int) 4
+ 22: TypePointer Function 21(ivec4)
+ 24: 20(int) Constant 0
+ 25: 21(ivec4) ConstantComposite 24 24 24 24
+ 26: TypeImage 10(float) 2D sampled format:Unknown
+ 27: TypeSampledImage 26
+ 28: TypePointer UniformConstant 27
+ 29(s2D): 28(ptr) Variable UniformConstant
+ 31: TypeVector 10(float) 2
+ 32: TypePointer Input 31(fvec2)
+ 33(c2): 32(ptr) Variable Input
+ 35(ResType): TypeStruct 6(int) 11(fvec4)
+ 41: TypeImage 10(float) 3D sampled format:Unknown
+ 42: TypeSampledImage 41
+ 43: TypePointer UniformConstant 42
+ 44(s3D): 43(ptr) Variable UniformConstant
+ 46: TypeVector 10(float) 3
+ 47: TypePointer Input 46(fvec3)
+ 48(c3): 47(ptr) Variable Input
+ 50: 10(float) Constant 1073741824
+ 56: TypeImage 6(int) Cube sampled format:Unknown
+ 57: TypeSampledImage 56
+ 58: TypePointer UniformConstant 57
+ 59(isCube): 58(ptr) Variable UniformConstant
+ 62(ResType): TypeStruct 6(int) 16(ivec4)
+ 68: TypeImage 10(float) 2D depth sampled format:Unknown
+ 69: TypeSampledImage 68
+ 70: TypePointer UniformConstant 69
+ 71(s2DShadow): 70(ptr) Variable UniformConstant
+ 74: TypePointer Function 10(float)
+ 77(ResType): TypeStruct 6(int) 10(float)
+ 83: TypeImage 10(float) Cube depth array sampled format:Unknown
+ 84: TypeSampledImage 83
+ 85: TypePointer UniformConstant 84
+86(sCubeArrayShadow): 85(ptr) Variable UniformConstant
+ 88: TypePointer Input 11(fvec4)
+ 89(c4): 88(ptr) Variable Input
+ 91: 10(float) Constant 1065353216
+ 105: TypeImage 20(int) Cube array sampled format:Unknown
+ 106: TypeSampledImage 105
+ 107: TypePointer UniformConstant 106
+108(usCubeArray): 107(ptr) Variable UniformConstant
+ 111(ResType): TypeStruct 6(int) 21(ivec4)
+ 119: 20(int) Constant 1
+ 129: TypeVector 6(int) 3
+ 130: 6(int) Constant 2
+ 131: 129(ivec3) ConstantComposite 130 130 130
+ 137: TypeImage 20(int) Rect sampled format:Unknown
+ 138: TypeSampledImage 137
+ 139: TypePointer UniformConstant 138
+ 140(us2DRect): 139(ptr) Variable UniformConstant
+ 143: TypeVector 6(int) 2
+ 144: 6(int) Constant 3
+ 145: 143(ivec2) ConstantComposite 144 144
+ 151: TypeImage 10(float) 2D depth array sampled format:Unknown
+ 152: TypeSampledImage 151
+ 153: TypePointer UniformConstant 152
+154(s2DArrayShadow): 153(ptr) Variable UniformConstant
+ 157: 6(int) Constant 5
+ 158: 143(ivec2) ConstantComposite 157 157
+ 159: 20(int) Constant 2
+ 185: TypeImage 10(float) 2D multi-sampled sampled format:Unknown
+ 186: TypeSampledImage 185
+ 187: TypePointer UniformConstant 186
+ 188(s2DMS): 187(ptr) Variable UniformConstant
+ 192: 6(int) Constant 4
+ 202: 129(ivec3) ConstantComposite 192 192 192
+ 225: TypeImage 6(int) 2D array sampled format:Unknown
+ 226: TypeSampledImage 225
+ 227: TypePointer UniformConstant 226
+ 228(is2DArray): 227(ptr) Variable UniformConstant
+ 231: 6(int) Constant 6
+ 232: 143(ivec2) ConstantComposite 231 231
+ 240: 6(int) Constant 7
+ 241: 143(ivec2) ConstantComposite 240 240
+ 258: TypeImage 10(float) Cube depth sampled format:Unknown
+ 259: TypeSampledImage 258
+ 260: TypePointer UniformConstant 259
+261(sCubeShadow): 260(ptr) Variable UniformConstant
+ 291: TypeImage 10(float) Rect depth sampled format:Unknown
+ 292: TypeSampledImage 291
+ 293: TypePointer UniformConstant 292
+294(s2DRectShadow): 293(ptr) Variable UniformConstant
+ 299: 20(int) Constant 3
+ 311: 143(ivec2) ConstantComposite 130 130
+ 340: 143(ivec2) ConstantComposite 192 192
+ 362: 20(int) Constant 4
+ 363: TypeArray 143(ivec2) 362
+ 364: TypePointer Input 363
+ 365(offsets): 364(ptr) Variable Input
+ 388: TypeImage 10(float) 2D nonsampled format:Rgba32f
+ 389: TypePointer UniformConstant 388
+ 390(i2D): 389(ptr) Variable UniformConstant
+ 392: TypePointer Input 143(ivec2)
+ 393(ic2): 392(ptr) Variable Input
+ 400: TypeImage 6(int) 3D nonsampled format:Rgba32i
+ 401: TypePointer UniformConstant 400
+ 402(ii3D): 401(ptr) Variable UniformConstant
+ 404: TypePointer Input 129(ivec3)
+ 405(ic3): 404(ptr) Variable Input
+ 412: TypeImage 10(float) 2D multi-sampled nonsampled format:Rgba32f
+ 413: TypePointer UniformConstant 412
+ 414(i2DMS): 413(ptr) Variable UniformConstant
+ 422: TypePointer Output 11(fvec4)
+ 423(outColor): 422(ptr) Variable Output
+ 426: TypeBool
+ 4(main): 2 Function None 3
+ 5: Label
+ 8(resident): 7(ptr) Variable Function
+ 13(texel): 12(ptr) Variable Function
+ 18(itexel): 17(ptr) Variable Function
+ 23(utexel): 22(ptr) Variable Function
+ 424: 12(ptr) Variable Function
+ Store 8(resident) 9
+ Store 13(texel) 15
+ Store 18(itexel) 19
+ Store 23(utexel) 25
+ 30: 27 Load 29(s2D)
+ 34: 31(fvec2) Load 33(c2)
+ 36: 35(ResType) ImageSparseSampleImplicitLod 30 34
+ 37: 11(fvec4) CompositeExtract 36 1
+ Store 13(texel) 37
+ 38: 6(int) CompositeExtract 36 0
+ 39: 6(int) Load 8(resident)
+ 40: 6(int) BitwiseOr 39 38
+ Store 8(resident) 40
+ 45: 42 Load 44(s3D)
+ 49: 46(fvec3) Load 48(c3)
+ 51: 35(ResType) ImageSparseSampleImplicitLod 45 49 Bias 50
+ 52: 11(fvec4) CompositeExtract 51 1
+ Store 13(texel) 52
+ 53: 6(int) CompositeExtract 51 0
+ 54: 6(int) Load 8(resident)
+ 55: 6(int) BitwiseOr 54 53
+ Store 8(resident) 55
+ 60: 57 Load 59(isCube)
+ 61: 46(fvec3) Load 48(c3)
+ 63: 62(ResType) ImageSparseSampleImplicitLod 60 61
+ 64: 16(ivec4) CompositeExtract 63 1
+ Store 18(itexel) 64
+ 65: 6(int) CompositeExtract 63 0
+ 66: 6(int) Load 8(resident)
+ 67: 6(int) BitwiseOr 66 65
+ Store 8(resident) 67
+ 72: 69 Load 71(s2DShadow)
+ 73: 46(fvec3) Load 48(c3)
+ 75: 74(ptr) AccessChain 13(texel) 24
+ 76: 10(float) CompositeExtract 73 2
+ 78: 77(ResType) ImageSparseSampleDrefImplicitLod 72 73 76
+ 79: 10(float) CompositeExtract 78 1
+ Store 75 79
+ 80: 6(int) CompositeExtract 78 0
+ 81: 6(int) Load 8(resident)
+ 82: 6(int) BitwiseOr 81 80
+ Store 8(resident) 82
+ 87: 84 Load 86(sCubeArrayShadow)
+ 90: 11(fvec4) Load 89(c4)
+ 92: 74(ptr) AccessChain 13(texel) 24
+ 93: 77(ResType) ImageSparseSampleDrefImplicitLod 87 90 91
+ 94: 10(float) CompositeExtract 93 1
+ Store 92 94
+ 95: 6(int) CompositeExtract 93 0
+ 96: 6(int) Load 8(resident)
+ 97: 6(int) BitwiseOr 96 95
+ Store 8(resident) 97
+ 98: 27 Load 29(s2D)
+ 99: 31(fvec2) Load 33(c2)
+ 100: 35(ResType) ImageSparseSampleExplicitLod 98 99 Lod 50
+ 101: 11(fvec4) CompositeExtract 100 1
+ Store 13(texel) 101
+ 102: 6(int) CompositeExtract 100 0
+ 103: 6(int) Load 8(resident)
+ 104: 6(int) BitwiseOr 103 102
+ Store 8(resident) 104
+ 109: 106 Load 108(usCubeArray)
+ 110: 11(fvec4) Load 89(c4)
+ 112:111(ResType) ImageSparseSampleExplicitLod 109 110 Lod 91
+ 113: 21(ivec4) CompositeExtract 112 1
+ Store 23(utexel) 113
+ 114: 6(int) CompositeExtract 112 0
+ 115: 6(int) Load 8(resident)
+ 116: 6(int) BitwiseOr 115 114
+ Store 8(resident) 116
+ 117: 69 Load 71(s2DShadow)
+ 118: 46(fvec3) Load 48(c3)
+ 120: 74(ptr) AccessChain 13(texel) 119
+ 121: 10(float) CompositeExtract 118 2
+ 122: 77(ResType) ImageSparseSampleDrefExplicitLod 117 118 121 Lod 50
+ 123: 10(float) CompositeExtract 122 1
+ Store 120 123
+ 124: 6(int) CompositeExtract 122 0
+ 125: 6(int) Load 8(resident)
+ 126: 6(int) BitwiseOr 125 124
+ Store 8(resident) 126
+ 127: 42 Load 44(s3D)
+ 128: 46(fvec3) Load 48(c3)
+ 132: 35(ResType) ImageSparseSampleImplicitLod 127 128 Bias ConstOffset 50 131
+ 133: 11(fvec4) CompositeExtract 132 1
+ Store 13(texel) 133
+ 134: 6(int) CompositeExtract 132 0
+ 135: 6(int) Load 8(resident)
+ 136: 6(int) BitwiseOr 135 134
+ Store 8(resident) 136
+ 141: 138 Load 140(us2DRect)
+ 142: 31(fvec2) Load 33(c2)
+ 146:111(ResType) ImageSparseSampleImplicitLod 141 142 ConstOffset 145
+ 147: 21(ivec4) CompositeExtract 146 1
+ Store 23(utexel) 147
+ 148: 6(int) CompositeExtract 146 0
+ 149: 6(int) Load 8(resident)
+ 150: 6(int) BitwiseOr 149 148
+ Store 8(resident) 150
+ 155: 152 Load 154(s2DArrayShadow)
+ 156: 11(fvec4) Load 89(c4)
+ 160: 74(ptr) AccessChain 13(texel) 159
+ 161: 10(float) CompositeExtract 156 3
+ 162: 77(ResType) ImageSparseSampleDrefImplicitLod 155 156 161 ConstOffset 158
+ 163: 10(float) CompositeExtract 162 1
+ Store 160 163
+ 164: 6(int) CompositeExtract 162 0
+ 165: 6(int) Load 8(resident)
+ 166: 6(int) BitwiseOr 165 164
+ Store 8(resident) 166
+ 167: 27 Load 29(s2D)
+ 168: 31(fvec2) Load 33(c2)
+ 169: 143(ivec2) ConvertFToS 168
+ 170: 26 Image 167
+ 171: 35(ResType) ImageSparseFetch 170 169 Lod 130
+ 172: 11(fvec4) CompositeExtract 171 1
+ Store 13(texel) 172
+ 173: 6(int) CompositeExtract 171 0
+ 174: 6(int) Load 8(resident)
+ 175: 6(int) BitwiseOr 174 173
+ Store 8(resident) 175
+ 176: 138 Load 140(us2DRect)
+ 177: 31(fvec2) Load 33(c2)
+ 178: 143(ivec2) ConvertFToS 177
+ 179: 137 Image 176
+ 180:111(ResType) ImageSparseFetch 179 178
+ 181: 21(ivec4) CompositeExtract 180 1
+ Store 23(utexel) 181
+ 182: 6(int) CompositeExtract 180 0
+ 183: 6(int) Load 8(resident)
+ 184: 6(int) BitwiseOr 183 182
+ Store 8(resident) 184
+ 189: 186 Load 188(s2DMS)
+ 190: 31(fvec2) Load 33(c2)
+ 191: 143(ivec2) ConvertFToS 190
+ 193: 185 Image 189
+ 194: 35(ResType) ImageSparseFetch 193 191 Sample 192
+ 195: 11(fvec4) CompositeExtract 194 1
+ Store 13(texel) 195
+ 196: 6(int) CompositeExtract 194 0
+ 197: 6(int) Load 8(resident)
+ 198: 6(int) BitwiseOr 197 196
+ Store 8(resident) 198
+ 199: 42 Load 44(s3D)
+ 200: 46(fvec3) Load 48(c3)
+ 201: 129(ivec3) ConvertFToS 200
+ 203: 41 Image 199
+ 204: 35(ResType) ImageSparseFetch 203 201 Lod ConstOffset 130 202
+ 205: 11(fvec4) CompositeExtract 204 1
+ Store 13(texel) 205
+ 206: 6(int) CompositeExtract 204 0
+ 207: 6(int) Load 8(resident)
+ 208: 6(int) BitwiseOr 207 206
+ Store 8(resident) 208
+ 209: 138 Load 140(us2DRect)
+ 210: 31(fvec2) Load 33(c2)
+ 211: 143(ivec2) ConvertFToS 210
+ 212: 137 Image 209
+ 213:111(ResType) ImageSparseFetch 212 211 ConstOffset 145
+ 214: 21(ivec4) CompositeExtract 213 1
+ Store 23(utexel) 214
+ 215: 6(int) CompositeExtract 213 0
+ 216: 6(int) Load 8(resident)
+ 217: 6(int) BitwiseOr 216 215
+ Store 8(resident) 217
+ 218: 27 Load 29(s2D)
+ 219: 31(fvec2) Load 33(c2)
+ 220: 35(ResType) ImageSparseSampleExplicitLod 218 219 Lod ConstOffset 50 158
+ 221: 11(fvec4) CompositeExtract 220 1
+ Store 13(texel) 221
+ 222: 6(int) CompositeExtract 220 0
+ 223: 6(int) Load 8(resident)
+ 224: 6(int) BitwiseOr 223 222
+ Store 8(resident) 224
+ 229: 226 Load 228(is2DArray)
+ 230: 46(fvec3) Load 48(c3)
+ 233: 62(ResType) ImageSparseSampleExplicitLod 229 230 Lod ConstOffset 50 232
+ 234: 16(ivec4) CompositeExtract 233 1
+ Store 18(itexel) 234
+ 235: 6(int) CompositeExtract 233 0
+ 236: 6(int) Load 8(resident)
+ 237: 6(int) BitwiseOr 236 235
+ Store 8(resident) 237
+ 238: 69 Load 71(s2DShadow)
+ 239: 46(fvec3) Load 48(c3)
+ 242: 74(ptr) AccessChain 13(texel) 159
+ 243: 10(float) CompositeExtract 239 2
+ 244: 77(ResType) ImageSparseSampleDrefExplicitLod 238 239 243 Lod ConstOffset 50 241
+ 245: 10(float) CompositeExtract 244 1
+ Store 242 245
+ 246: 6(int) CompositeExtract 244 0
+ 247: 6(int) Load 8(resident)
+ 248: 6(int) BitwiseOr 247 246
+ Store 8(resident) 248
+ 249: 42 Load 44(s3D)
+ 250: 46(fvec3) Load 48(c3)
+ 251: 46(fvec3) Load 48(c3)
+ 252: 46(fvec3) Load 48(c3)
+ 253: 35(ResType) ImageSparseSampleExplicitLod 249 250 Grad 251 252
+ 254: 11(fvec4) CompositeExtract 253 1
+ Store 13(texel) 254
+ 255: 6(int) CompositeExtract 253 0
+ 256: 6(int) Load 8(resident)
+ 257: 6(int) BitwiseOr 256 255
+ Store 8(resident) 257
+ 262: 259 Load 261(sCubeShadow)
+ 263: 11(fvec4) Load 89(c4)
+ 264: 46(fvec3) Load 48(c3)
+ 265: 46(fvec3) Load 48(c3)
+ 266: 74(ptr) AccessChain 13(texel) 119
+ 267: 10(float) CompositeExtract 263 3
+ 268: 77(ResType) ImageSparseSampleDrefExplicitLod 262 263 267 Grad 264 265
+ 269: 10(float) CompositeExtract 268 1
+ Store 266 269
+ 270: 6(int) CompositeExtract 268 0
+ 271: 6(int) Load 8(resident)
+ 272: 6(int) BitwiseOr 271 270
+ Store 8(resident) 272
+ 273: 106 Load 108(usCubeArray)
+ 274: 11(fvec4) Load 89(c4)
+ 275: 46(fvec3) Load 48(c3)
+ 276: 46(fvec3) Load 48(c3)
+ 277:111(ResType) ImageSparseSampleExplicitLod 273 274 Grad 275 276
+ 278: 21(ivec4) CompositeExtract 277 1
+ Store 23(utexel) 278
+ 279: 6(int) CompositeExtract 277 0
+ 280: 6(int) Load 8(resident)
+ 281: 6(int) BitwiseOr 280 279
+ Store 8(resident) 281
+ 282: 27 Load 29(s2D)
+ 283: 31(fvec2) Load 33(c2)
+ 284: 31(fvec2) Load 33(c2)
+ 285: 31(fvec2) Load 33(c2)
+ 286: 35(ResType) ImageSparseSampleExplicitLod 282 283 Grad ConstOffset 284 285 158
+ 287: 11(fvec4) CompositeExtract 286 1
+ Store 13(texel) 287
+ 288: 6(int) CompositeExtract 286 0
+ 289: 6(int) Load 8(resident)
+ 290: 6(int) BitwiseOr 289 288
+ Store 8(resident) 290
+ 295: 292 Load 294(s2DRectShadow)
+ 296: 46(fvec3) Load 48(c3)
+ 297: 31(fvec2) Load 33(c2)
+ 298: 31(fvec2) Load 33(c2)
+ 300: 74(ptr) AccessChain 13(texel) 299
+ 301: 10(float) CompositeExtract 296 2
+ 302: 77(ResType) ImageSparseSampleDrefExplicitLod 295 296 301 Grad ConstOffset 297 298 232
+ 303: 10(float) CompositeExtract 302 1
+ Store 300 303
+ 304: 6(int) CompositeExtract 302 0
+ 305: 6(int) Load 8(resident)
+ 306: 6(int) BitwiseOr 305 304
+ Store 8(resident) 306
+ 307: 226 Load 228(is2DArray)
+ 308: 46(fvec3) Load 48(c3)
+ 309: 31(fvec2) Load 33(c2)
+ 310: 31(fvec2) Load 33(c2)
+ 312: 62(ResType) ImageSparseSampleExplicitLod 307 308 Grad ConstOffset 309 310 311
+ 313: 16(ivec4) CompositeExtract 312 1
+ Store 18(itexel) 313
+ 314: 6(int) CompositeExtract 312 0
+ 315: 6(int) Load 8(resident)
+ 316: 6(int) BitwiseOr 315 314
+ Store 8(resident) 316
+ 317: 27 Load 29(s2D)
+ 318: 31(fvec2) Load 33(c2)
+ 319: 35(ResType) ImageSparseGather 317 318 9
+ 320: 11(fvec4) CompositeExtract 319 1
+ Store 13(texel) 320
+ 321: 6(int) CompositeExtract 319 0
+ 322: 6(int) Load 8(resident)
+ 323: 6(int) BitwiseOr 322 321
+ Store 8(resident) 323
+ 324: 226 Load 228(is2DArray)
+ 325: 46(fvec3) Load 48(c3)
+ 326: 62(ResType) ImageSparseGather 324 325 130
+ 327: 16(ivec4) CompositeExtract 326 1
+ Store 18(itexel) 327
+ 328: 6(int) CompositeExtract 326 0
+ 329: 6(int) Load 8(resident)
+ 330: 6(int) BitwiseOr 329 328
+ Store 8(resident) 330
+ 331: 152 Load 154(s2DArrayShadow)
+ 332: 46(fvec3) Load 48(c3)
+ 333: 35(ResType) ImageSparseDrefGather 331 332 50
+ 334: 11(fvec4) CompositeExtract 333 1
+ Store 13(texel) 334
+ 335: 6(int) CompositeExtract 333 0
+ 336: 6(int) Load 8(resident)
+ 337: 6(int) BitwiseOr 336 335
+ Store 8(resident) 337
+ 338: 27 Load 29(s2D)
+ 339: 31(fvec2) Load 33(c2)
+ 341: 35(ResType) ImageSparseGather 338 339 9 ConstOffset 340
+ 342: 11(fvec4) CompositeExtract 341 1
+ Store 13(texel) 342
+ 343: 6(int) CompositeExtract 341 0
+ 344: 6(int) Load 8(resident)
+ 345: 6(int) BitwiseOr 344 343
+ Store 8(resident) 345
+ 346: 226 Load 228(is2DArray)
+ 347: 46(fvec3) Load 48(c3)
+ 348: 62(ResType) ImageSparseGather 346 347 130 ConstOffset 158
+ 349: 16(ivec4) CompositeExtract 348 1
+ Store 18(itexel) 349
+ 350: 6(int) CompositeExtract 348 0
+ 351: 6(int) Load 8(resident)
+ 352: 6(int) BitwiseOr 351 350
+ Store 8(resident) 352
+ 353: 292 Load 294(s2DRectShadow)
+ 354: 31(fvec2) Load 33(c2)
+ 355: 35(ResType) ImageSparseDrefGather 353 354 50 ConstOffset 241
+ 356: 11(fvec4) CompositeExtract 355 1
+ Store 13(texel) 356
+ 357: 6(int) CompositeExtract 355 0
+ 358: 6(int) Load 8(resident)
+ 359: 6(int) BitwiseOr 358 357
+ Store 8(resident) 359
+ 360: 27 Load 29(s2D)
+ 361: 31(fvec2) Load 33(c2)
+ 366: 363 Load 365(offsets)
+ 367: 35(ResType) ImageSparseGather 360 361 9 ConstOffsets 366
+ 368: 11(fvec4) CompositeExtract 367 1
+ Store 13(texel) 368
+ 369: 6(int) CompositeExtract 367 0
+ 370: 6(int) Load 8(resident)
+ 371: 6(int) BitwiseOr 370 369
+ Store 8(resident) 371
+ 372: 226 Load 228(is2DArray)
+ 373: 46(fvec3) Load 48(c3)
+ 374: 363 Load 365(offsets)
+ 375: 62(ResType) ImageSparseGather 372 373 130 ConstOffsets 374
+ 376: 16(ivec4) CompositeExtract 375 1
+ Store 18(itexel) 376
+ 377: 6(int) CompositeExtract 375 0
+ 378: 6(int) Load 8(resident)
+ 379: 6(int) BitwiseOr 378 377
+ Store 8(resident) 379
+ 380: 292 Load 294(s2DRectShadow)
+ 381: 31(fvec2) Load 33(c2)
+ 382: 363 Load 365(offsets)
+ 383: 35(ResType) ImageSparseDrefGather 380 381 50 ConstOffsets 382
+ 384: 11(fvec4) CompositeExtract 383 1
+ Store 13(texel) 384
+ 385: 6(int) CompositeExtract 383 0
+ 386: 6(int) Load 8(resident)
+ 387: 6(int) BitwiseOr 386 385
+ Store 8(resident) 387
+ 391: 388 Load 390(i2D)
+ 394: 143(ivec2) Load 393(ic2)
+ 395: 35(ResType) ImageSparseRead 391 394
+ 396: 11(fvec4) CompositeExtract 395 1
+ Store 13(texel) 396
+ 397: 6(int) CompositeExtract 395 0
+ 398: 6(int) Load 8(resident)
+ 399: 6(int) BitwiseOr 398 397
+ Store 8(resident) 399
+ 403: 400 Load 402(ii3D)
+ 406: 129(ivec3) Load 405(ic3)
+ 407: 62(ResType) ImageSparseRead 403 406
+ 408: 16(ivec4) CompositeExtract 407 1
+ Store 18(itexel) 408
+ 409: 6(int) CompositeExtract 407 0
+ 410: 6(int) Load 8(resident)
+ 411: 6(int) BitwiseOr 410 409
+ Store 8(resident) 411
+ 415: 412 Load 414(i2DMS)
+ 416: 143(ivec2) Load 393(ic2)
+ 417: 35(ResType) ImageSparseRead 415 416 Sample 144
+ 418: 11(fvec4) CompositeExtract 417 1
+ Store 13(texel) 418
+ 419: 6(int) CompositeExtract 417 0
+ 420: 6(int) Load 8(resident)
+ 421: 6(int) BitwiseOr 420 419
+ Store 8(resident) 421
+ 425: 6(int) Load 8(resident)
+ 427: 426(bool) ImageSparseTexelsResident 425
+ SelectionMerge 429 None
+ BranchConditional 427 428 431
+ 428: Label
+ 430: 11(fvec4) Load 13(texel)
+ Store 424 430
+ Branch 429
+ 431: Label
+ 432: 16(ivec4) Load 18(itexel)
+ 433: 11(fvec4) ConvertSToF 432
+ 434: 21(ivec4) Load 23(utexel)
+ 435: 11(fvec4) ConvertUToF 434
+ 436: 11(fvec4) FAdd 433 435
+ Store 424 436
+ Branch 429
+ 429: Label
+ 437: 11(fvec4) Load 424
+ Store 423(outColor) 437
+ Return
+ FunctionEnd
diff --git a/chromium/third_party/glslang/src/Test/baseResults/spv.sparseTextureClamp.frag.out b/chromium/third_party/glslang/src/Test/baseResults/spv.sparseTextureClamp.frag.out
new file mode 100644
index 00000000000..1922ac12548
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/spv.sparseTextureClamp.frag.out
@@ -0,0 +1,471 @@
+spv.sparseTextureClamp.frag
+Warning, version 450 is not yet complete; most version-specific features are present, but some are missing.
+
+
+Linked fragment stage:
+
+
+// Module Version 10000
+// Generated by (magic number): 80001
+// Id's are bound by 360
+
+ Capability Shader
+ Capability SampledRect
+ Capability SparseResidency
+ Capability MinLod
+ Capability SampledCubeArray
+ 1: ExtInstImport "GLSL.std.450"
+ MemoryModel Logical GLSL450
+ EntryPoint Fragment 4 "main" 33 36 51 95 345
+ ExecutionMode 4 OriginUpperLeft
+ Source GLSL 450
+ SourceExtension "GL_ARB_sparse_texture_clamp"
+ Name 4 "main"
+ Name 8 "resident"
+ Name 13 "texel"
+ Name 18 "itexel"
+ Name 23 "utexel"
+ Name 29 "s2D"
+ Name 33 "c2"
+ Name 36 "lodClamp"
+ Name 38 "ResType"
+ Name 47 "s3D"
+ Name 51 "c3"
+ Name 63 "isCube"
+ Name 67 "ResType"
+ Name 76 "s2DShadow"
+ Name 83 "ResType"
+ Name 92 "sCubeArrayShadow"
+ Name 95 "c4"
+ Name 154 "us2DRect"
+ Name 161 "ResType"
+ Name 170 "s2DArrayShadow"
+ Name 218 "sCubeShadow"
+ Name 235 "usCubeArray"
+ Name 286 "s2DRectShadow"
+ Name 305 "is2DArray"
+ Name 345 "outColor"
+ Decorate 29(s2D) DescriptorSet 0
+ Decorate 47(s3D) DescriptorSet 0
+ Decorate 63(isCube) DescriptorSet 0
+ Decorate 76(s2DShadow) DescriptorSet 0
+ Decorate 92(sCubeArrayShadow) DescriptorSet 0
+ Decorate 154(us2DRect) DescriptorSet 0
+ Decorate 170(s2DArrayShadow) DescriptorSet 0
+ Decorate 218(sCubeShadow) DescriptorSet 0
+ Decorate 235(usCubeArray) DescriptorSet 0
+ Decorate 286(s2DRectShadow) DescriptorSet 0
+ Decorate 305(is2DArray) DescriptorSet 0
+ 2: TypeVoid
+ 3: TypeFunction 2
+ 6: TypeInt 32 1
+ 7: TypePointer Function 6(int)
+ 9: 6(int) Constant 0
+ 10: TypeFloat 32
+ 11: TypeVector 10(float) 4
+ 12: TypePointer Function 11(fvec4)
+ 14: 10(float) Constant 0
+ 15: 11(fvec4) ConstantComposite 14 14 14 14
+ 16: TypeVector 6(int) 4
+ 17: TypePointer Function 16(ivec4)
+ 19: 16(ivec4) ConstantComposite 9 9 9 9
+ 20: TypeInt 32 0
+ 21: TypeVector 20(int) 4
+ 22: TypePointer Function 21(ivec4)
+ 24: 20(int) Constant 0
+ 25: 21(ivec4) ConstantComposite 24 24 24 24
+ 26: TypeImage 10(float) 2D sampled format:Unknown
+ 27: TypeSampledImage 26
+ 28: TypePointer UniformConstant 27
+ 29(s2D): 28(ptr) Variable UniformConstant
+ 31: TypeVector 10(float) 2
+ 32: TypePointer Input 31(fvec2)
+ 33(c2): 32(ptr) Variable Input
+ 35: TypePointer Input 10(float)
+ 36(lodClamp): 35(ptr) Variable Input
+ 38(ResType): TypeStruct 6(int) 11(fvec4)
+ 44: TypeImage 10(float) 3D sampled format:Unknown
+ 45: TypeSampledImage 44
+ 46: TypePointer UniformConstant 45
+ 47(s3D): 46(ptr) Variable UniformConstant
+ 49: TypeVector 10(float) 3
+ 50: TypePointer Input 49(fvec3)
+ 51(c3): 50(ptr) Variable Input
+ 54: 10(float) Constant 1073741824
+ 60: TypeImage 6(int) Cube sampled format:Unknown
+ 61: TypeSampledImage 60
+ 62: TypePointer UniformConstant 61
+ 63(isCube): 62(ptr) Variable UniformConstant
+ 67(ResType): TypeStruct 6(int) 16(ivec4)
+ 73: TypeImage 10(float) 2D depth sampled format:Unknown
+ 74: TypeSampledImage 73
+ 75: TypePointer UniformConstant 74
+ 76(s2DShadow): 75(ptr) Variable UniformConstant
+ 80: TypePointer Function 10(float)
+ 83(ResType): TypeStruct 6(int) 10(float)
+ 89: TypeImage 10(float) Cube depth array sampled format:Unknown
+ 90: TypeSampledImage 89
+ 91: TypePointer UniformConstant 90
+92(sCubeArrayShadow): 91(ptr) Variable UniformConstant
+ 94: TypePointer Input 11(fvec4)
+ 95(c4): 94(ptr) Variable Input
+ 97: 10(float) Constant 1065353216
+ 142: TypeVector 6(int) 3
+ 143: 6(int) Constant 2
+ 144: 142(ivec3) ConstantComposite 143 143 143
+ 151: TypeImage 20(int) Rect sampled format:Unknown
+ 152: TypeSampledImage 151
+ 153: TypePointer UniformConstant 152
+ 154(us2DRect): 153(ptr) Variable UniformConstant
+ 157: TypeVector 6(int) 2
+ 158: 6(int) Constant 3
+ 159: 157(ivec2) ConstantComposite 158 158
+ 161(ResType): TypeStruct 6(int) 21(ivec4)
+ 167: TypeImage 10(float) 2D depth array sampled format:Unknown
+ 168: TypeSampledImage 167
+ 169: TypePointer UniformConstant 168
+170(s2DArrayShadow): 169(ptr) Variable UniformConstant
+ 173: 6(int) Constant 5
+ 174: 157(ivec2) ConstantComposite 173 173
+ 176: 20(int) Constant 2
+ 215: TypeImage 10(float) Cube depth sampled format:Unknown
+ 216: TypeSampledImage 215
+ 217: TypePointer UniformConstant 216
+218(sCubeShadow): 217(ptr) Variable UniformConstant
+ 224: 20(int) Constant 1
+ 232: TypeImage 20(int) Cube array sampled format:Unknown
+ 233: TypeSampledImage 232
+ 234: TypePointer UniformConstant 233
+235(usCubeArray): 234(ptr) Variable UniformConstant
+ 283: TypeImage 10(float) Rect depth sampled format:Unknown
+ 284: TypeSampledImage 283
+ 285: TypePointer UniformConstant 284
+286(s2DRectShadow): 285(ptr) Variable UniformConstant
+ 291: 6(int) Constant 6
+ 292: 157(ivec2) ConstantComposite 291 291
+ 294: 20(int) Constant 3
+ 302: TypeImage 6(int) 2D array sampled format:Unknown
+ 303: TypeSampledImage 302
+ 304: TypePointer UniformConstant 303
+ 305(is2DArray): 304(ptr) Variable UniformConstant
+ 310: 157(ivec2) ConstantComposite 143 143
+ 344: TypePointer Output 11(fvec4)
+ 345(outColor): 344(ptr) Variable Output
+ 348: TypeBool
+ 4(main): 2 Function None 3
+ 5: Label
+ 8(resident): 7(ptr) Variable Function
+ 13(texel): 12(ptr) Variable Function
+ 18(itexel): 17(ptr) Variable Function
+ 23(utexel): 22(ptr) Variable Function
+ 346: 12(ptr) Variable Function
+ Store 8(resident) 9
+ Store 13(texel) 15
+ Store 18(itexel) 19
+ Store 23(utexel) 25
+ 30: 27 Load 29(s2D)
+ 34: 31(fvec2) Load 33(c2)
+ 37: 10(float) Load 36(lodClamp)
+ 39: 38(ResType) ImageSparseSampleImplicitLod 30 34 MinLod 37
+ 40: 11(fvec4) CompositeExtract 39 1
+ Store 13(texel) 40
+ 41: 6(int) CompositeExtract 39 0
+ 42: 6(int) Load 8(resident)
+ 43: 6(int) BitwiseOr 42 41
+ Store 8(resident) 43
+ 48: 45 Load 47(s3D)
+ 52: 49(fvec3) Load 51(c3)
+ 53: 10(float) Load 36(lodClamp)
+ 55: 38(ResType) ImageSparseSampleImplicitLod 48 52 Bias MinLod 54 53
+ 56: 11(fvec4) CompositeExtract 55 1
+ Store 13(texel) 56
+ 57: 6(int) CompositeExtract 55 0
+ 58: 6(int) Load 8(resident)
+ 59: 6(int) BitwiseOr 58 57
+ Store 8(resident) 59
+ 64: 61 Load 63(isCube)
+ 65: 49(fvec3) Load 51(c3)
+ 66: 10(float) Load 36(lodClamp)
+ 68: 67(ResType) ImageSparseSampleImplicitLod 64 65 MinLod 66
+ 69: 16(ivec4) CompositeExtract 68 1
+ Store 18(itexel) 69
+ 70: 6(int) CompositeExtract 68 0
+ 71: 6(int) Load 8(resident)
+ 72: 6(int) BitwiseOr 71 70
+ Store 8(resident) 72
+ 77: 74 Load 76(s2DShadow)
+ 78: 49(fvec3) Load 51(c3)
+ 79: 10(float) Load 36(lodClamp)
+ 81: 80(ptr) AccessChain 13(texel) 24
+ 82: 10(float) CompositeExtract 78 2
+ 84: 83(ResType) ImageSparseSampleDrefImplicitLod 77 78 82 MinLod 79
+ 85: 10(float) CompositeExtract 84 1
+ Store 81 85
+ 86: 6(int) CompositeExtract 84 0
+ 87: 6(int) Load 8(resident)
+ 88: 6(int) BitwiseOr 87 86
+ Store 8(resident) 88
+ 93: 90 Load 92(sCubeArrayShadow)
+ 96: 11(fvec4) Load 95(c4)
+ 98: 10(float) Load 36(lodClamp)
+ 99: 80(ptr) AccessChain 13(texel) 24
+ 100: 83(ResType) ImageSparseSampleDrefImplicitLod 93 96 97 MinLod 98
+ 101: 10(float) CompositeExtract 100 1
+ Store 99 101
+ 102: 6(int) CompositeExtract 100 0
+ 103: 6(int) Load 8(resident)
+ 104: 6(int) BitwiseOr 103 102
+ Store 8(resident) 104
+ 105: 27 Load 29(s2D)
+ 106: 31(fvec2) Load 33(c2)
+ 107: 10(float) Load 36(lodClamp)
+ 108: 11(fvec4) ImageSampleImplicitLod 105 106 MinLod 107
+ 109: 11(fvec4) Load 13(texel)
+ 110: 11(fvec4) FAdd 109 108
+ Store 13(texel) 110
+ 111: 45 Load 47(s3D)
+ 112: 49(fvec3) Load 51(c3)
+ 113: 10(float) Load 36(lodClamp)
+ 114: 11(fvec4) ImageSampleImplicitLod 111 112 Bias MinLod 54 113
+ 115: 11(fvec4) Load 13(texel)
+ 116: 11(fvec4) FAdd 115 114
+ Store 13(texel) 116
+ 117: 61 Load 63(isCube)
+ 118: 49(fvec3) Load 51(c3)
+ 119: 10(float) Load 36(lodClamp)
+ 120: 16(ivec4) ImageSampleImplicitLod 117 118 MinLod 119
+ 121: 16(ivec4) Load 18(itexel)
+ 122: 16(ivec4) IAdd 121 120
+ Store 18(itexel) 122
+ 123: 74 Load 76(s2DShadow)
+ 124: 49(fvec3) Load 51(c3)
+ 125: 10(float) Load 36(lodClamp)
+ 126: 10(float) CompositeExtract 124 2
+ 127: 10(float) ImageSampleDrefImplicitLod 123 124 126 MinLod 125
+ 128: 80(ptr) AccessChain 13(texel) 24
+ 129: 10(float) Load 128
+ 130: 10(float) FAdd 129 127
+ 131: 80(ptr) AccessChain 13(texel) 24
+ Store 131 130
+ 132: 90 Load 92(sCubeArrayShadow)
+ 133: 11(fvec4) Load 95(c4)
+ 134: 10(float) Load 36(lodClamp)
+ 135: 10(float) ImageSampleDrefImplicitLod 132 133 97 MinLod 134
+ 136: 80(ptr) AccessChain 13(texel) 24
+ 137: 10(float) Load 136
+ 138: 10(float) FAdd 137 135
+ 139: 80(ptr) AccessChain 13(texel) 24
+ Store 139 138
+ 140: 45 Load 47(s3D)
+ 141: 49(fvec3) Load 51(c3)
+ 145: 10(float) Load 36(lodClamp)
+ 146: 38(ResType) ImageSparseSampleImplicitLod 140 141 Bias ConstOffset MinLod 54 144 145
+ 147: 11(fvec4) CompositeExtract 146 1
+ Store 13(texel) 147
+ 148: 6(int) CompositeExtract 146 0
+ 149: 6(int) Load 8(resident)
+ 150: 6(int) BitwiseOr 149 148
+ Store 8(resident) 150
+ 155: 152 Load 154(us2DRect)
+ 156: 31(fvec2) Load 33(c2)
+ 160: 10(float) Load 36(lodClamp)
+ 162:161(ResType) ImageSparseSampleImplicitLod 155 156 ConstOffset MinLod 159 160
+ 163: 21(ivec4) CompositeExtract 162 1
+ Store 23(utexel) 163
+ 164: 6(int) CompositeExtract 162 0
+ 165: 6(int) Load 8(resident)
+ 166: 6(int) BitwiseOr 165 164
+ Store 8(resident) 166
+ 171: 168 Load 170(s2DArrayShadow)
+ 172: 11(fvec4) Load 95(c4)
+ 175: 10(float) Load 36(lodClamp)
+ 177: 80(ptr) AccessChain 13(texel) 176
+ 178: 10(float) CompositeExtract 172 3
+ 179: 83(ResType) ImageSparseSampleDrefImplicitLod 171 172 178 ConstOffset MinLod 174 175
+ 180: 10(float) CompositeExtract 179 1
+ Store 177 180
+ 181: 6(int) CompositeExtract 179 0
+ 182: 6(int) Load 8(resident)
+ 183: 6(int) BitwiseOr 182 181
+ Store 8(resident) 183
+ 184: 45 Load 47(s3D)
+ 185: 49(fvec3) Load 51(c3)
+ 186: 10(float) Load 36(lodClamp)
+ 187: 11(fvec4) ImageSampleImplicitLod 184 185 Bias ConstOffset MinLod 54 144 186
+ 188: 11(fvec4) Load 13(texel)
+ 189: 11(fvec4) FAdd 188 187
+ Store 13(texel) 189
+ 190: 152 Load 154(us2DRect)
+ 191: 31(fvec2) Load 33(c2)
+ 192: 10(float) Load 36(lodClamp)
+ 193: 21(ivec4) ImageSampleImplicitLod 190 191 ConstOffset MinLod 159 192
+ 194: 21(ivec4) Load 23(utexel)
+ 195: 21(ivec4) IAdd 194 193
+ Store 23(utexel) 195
+ 196: 168 Load 170(s2DArrayShadow)
+ 197: 11(fvec4) Load 95(c4)
+ 198: 10(float) Load 36(lodClamp)
+ 199: 10(float) CompositeExtract 197 3
+ 200: 10(float) ImageSampleDrefImplicitLod 196 197 199 ConstOffset MinLod 174 198
+ 201: 80(ptr) AccessChain 13(texel) 176
+ 202: 10(float) Load 201
+ 203: 10(float) FAdd 202 200
+ 204: 80(ptr) AccessChain 13(texel) 176
+ Store 204 203
+ 205: 45 Load 47(s3D)
+ 206: 49(fvec3) Load 51(c3)
+ 207: 49(fvec3) Load 51(c3)
+ 208: 49(fvec3) Load 51(c3)
+ 209: 10(float) Load 36(lodClamp)
+ 210: 38(ResType) ImageSparseSampleExplicitLod 205 206 Grad MinLod 207 208 209
+ 211: 11(fvec4) CompositeExtract 210 1
+ Store 13(texel) 211
+ 212: 6(int) CompositeExtract 210 0
+ 213: 6(int) Load 8(resident)
+ 214: 6(int) BitwiseOr 213 212
+ Store 8(resident) 214
+ 219: 216 Load 218(sCubeShadow)
+ 220: 11(fvec4) Load 95(c4)
+ 221: 49(fvec3) Load 51(c3)
+ 222: 49(fvec3) Load 51(c3)
+ 223: 10(float) Load 36(lodClamp)
+ 225: 80(ptr) AccessChain 13(texel) 224
+ 226: 10(float) CompositeExtract 220 3
+ 227: 83(ResType) ImageSparseSampleDrefExplicitLod 219 220 226 Grad MinLod 221 222 223
+ 228: 10(float) CompositeExtract 227 1
+ Store 225 228
+ 229: 6(int) CompositeExtract 227 0
+ 230: 6(int) Load 8(resident)
+ 231: 6(int) BitwiseOr 230 229
+ Store 8(resident) 231
+ 236: 233 Load 235(usCubeArray)
+ 237: 11(fvec4) Load 95(c4)
+ 238: 49(fvec3) Load 51(c3)
+ 239: 49(fvec3) Load 51(c3)
+ 240: 10(float) Load 36(lodClamp)
+ 241:161(ResType) ImageSparseSampleExplicitLod 236 237 Grad MinLod 238 239 240
+ 242: 21(ivec4) CompositeExtract 241 1
+ Store 23(utexel) 242
+ 243: 6(int) CompositeExtract 241 0
+ 244: 6(int) Load 8(resident)
+ 245: 6(int) BitwiseOr 244 243
+ Store 8(resident) 245
+ 246: 45 Load 47(s3D)
+ 247: 49(fvec3) Load 51(c3)
+ 248: 49(fvec3) Load 51(c3)
+ 249: 49(fvec3) Load 51(c3)
+ 250: 10(float) Load 36(lodClamp)
+ 251: 11(fvec4) ImageSampleExplicitLod 246 247 Grad MinLod 248 249 250
+ 252: 11(fvec4) Load 13(texel)
+ 253: 11(fvec4) FAdd 252 251
+ Store 13(texel) 253
+ 254: 216 Load 218(sCubeShadow)
+ 255: 11(fvec4) Load 95(c4)
+ 256: 49(fvec3) Load 51(c3)
+ 257: 49(fvec3) Load 51(c3)
+ 258: 10(float) Load 36(lodClamp)
+ 259: 10(float) CompositeExtract 255 3
+ 260: 10(float) ImageSampleDrefExplicitLod 254 255 259 Grad MinLod 256 257 258
+ 261: 80(ptr) AccessChain 13(texel) 224
+ 262: 10(float) Load 261
+ 263: 10(float) FAdd 262 260
+ 264: 80(ptr) AccessChain 13(texel) 224
+ Store 264 263
+ 265: 233 Load 235(usCubeArray)
+ 266: 11(fvec4) Load 95(c4)
+ 267: 49(fvec3) Load 51(c3)
+ 268: 49(fvec3) Load 51(c3)
+ 269: 10(float) Load 36(lodClamp)
+ 270: 21(ivec4) ImageSampleExplicitLod 265 266 Grad MinLod 267 268 269
+ 271: 21(ivec4) Load 23(utexel)
+ 272: 21(ivec4) IAdd 271 270
+ Store 23(utexel) 272
+ 273: 27 Load 29(s2D)
+ 274: 31(fvec2) Load 33(c2)
+ 275: 31(fvec2) Load 33(c2)
+ 276: 31(fvec2) Load 33(c2)
+ 277: 10(float) Load 36(lodClamp)
+ 278: 38(ResType) ImageSparseSampleExplicitLod 273 274 Grad ConstOffset MinLod 275 276 174 277
+ 279: 11(fvec4) CompositeExtract 278 1
+ Store 13(texel) 279
+ 280: 6(int) CompositeExtract 278 0
+ 281: 6(int) Load 8(resident)
+ 282: 6(int) BitwiseOr 281 280
+ Store 8(resident) 282
+ 287: 284 Load 286(s2DRectShadow)
+ 288: 49(fvec3) Load 51(c3)
+ 289: 31(fvec2) Load 33(c2)
+ 290: 31(fvec2) Load 33(c2)
+ 293: 10(float) Load 36(lodClamp)
+ 295: 80(ptr) AccessChain 13(texel) 294
+ 296: 10(float) CompositeExtract 288 2
+ 297: 83(ResType) ImageSparseSampleDrefExplicitLod 287 288 296 Grad ConstOffset MinLod 289 290 292 293
+ 298: 10(float) CompositeExtract 297 1
+ Store 295 298
+ 299: 6(int) CompositeExtract 297 0
+ 300: 6(int) Load 8(resident)
+ 301: 6(int) BitwiseOr 300 299
+ Store 8(resident) 301
+ 306: 303 Load 305(is2DArray)
+ 307: 49(fvec3) Load 51(c3)
+ 308: 31(fvec2) Load 33(c2)
+ 309: 31(fvec2) Load 33(c2)
+ 311: 10(float) Load 36(lodClamp)
+ 312: 67(ResType) ImageSparseSampleExplicitLod 306 307 Grad ConstOffset MinLod 308 309 310 311
+ 313: 16(ivec4) CompositeExtract 312 1
+ Store 18(itexel) 313
+ 314: 6(int) CompositeExtract 312 0
+ 315: 6(int) Load 8(resident)
+ 316: 6(int) BitwiseOr 315 314
+ Store 8(resident) 316
+ 317: 27 Load 29(s2D)
+ 318: 31(fvec2) Load 33(c2)
+ 319: 31(fvec2) Load 33(c2)
+ 320: 31(fvec2) Load 33(c2)
+ 321: 10(float) Load 36(lodClamp)
+ 322: 11(fvec4) ImageSampleExplicitLod 317 318 Grad ConstOffset MinLod 319 320 174 321
+ 323: 11(fvec4) Load 13(texel)
+ 324: 11(fvec4) FAdd 323 322
+ Store 13(texel) 324
+ 325: 284 Load 286(s2DRectShadow)
+ 326: 49(fvec3) Load 51(c3)
+ 327: 31(fvec2) Load 33(c2)
+ 328: 31(fvec2) Load 33(c2)
+ 329: 10(float) Load 36(lodClamp)
+ 330: 10(float) CompositeExtract 326 2
+ 331: 10(float) ImageSampleDrefExplicitLod 325 326 330 Grad ConstOffset MinLod 327 328 292 329
+ 332: 80(ptr) AccessChain 13(texel) 294
+ 333: 10(float) Load 332
+ 334: 10(float) FAdd 333 331
+ 335: 80(ptr) AccessChain 13(texel) 294
+ Store 335 334
+ 336: 303 Load 305(is2DArray)
+ 337: 49(fvec3) Load 51(c3)
+ 338: 31(fvec2) Load 33(c2)
+ 339: 31(fvec2) Load 33(c2)
+ 340: 10(float) Load 36(lodClamp)
+ 341: 16(ivec4) ImageSampleExplicitLod 336 337 Grad ConstOffset MinLod 338 339 310 340
+ 342: 16(ivec4) Load 18(itexel)
+ 343: 16(ivec4) IAdd 342 341
+ Store 18(itexel) 343
+ 347: 6(int) Load 8(resident)
+ 349: 348(bool) ImageSparseTexelsResident 347
+ SelectionMerge 351 None
+ BranchConditional 349 350 353
+ 350: Label
+ 352: 11(fvec4) Load 13(texel)
+ Store 346 352
+ Branch 351
+ 353: Label
+ 354: 16(ivec4) Load 18(itexel)
+ 355: 11(fvec4) ConvertSToF 354
+ 356: 21(ivec4) Load 23(utexel)
+ 357: 11(fvec4) ConvertUToF 356
+ 358: 11(fvec4) FAdd 355 357
+ Store 346 358
+ Branch 351
+ 351: Label
+ 359: 11(fvec4) Load 346
+ Store 345(outColor) 359
+ Return
+ FunctionEnd
diff --git a/chromium/third_party/glslang/src/Test/baseResults/spv.specConstant.comp.out b/chromium/third_party/glslang/src/Test/baseResults/spv.specConstant.comp.out
new file mode 100644
index 00000000000..2f16f04d4a7
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/spv.specConstant.comp.out
@@ -0,0 +1,55 @@
+spv.specConstant.comp
+Warning, version 450 is not yet complete; most version-specific features are present, but some are missing.
+
+
+Linked compute stage:
+
+
+// Module Version 10000
+// Generated by (magic number): 80001
+// Id's are bound by 27
+
+ Capability Shader
+ 1: ExtInstImport "GLSL.std.450"
+ MemoryModel Logical GLSL450
+ EntryPoint GLCompute 4 "main"
+ ExecutionMode 4 LocalSize 32 32 1
+ Source GLSL 450
+ Name 4 "main"
+ Name 7 "bn"
+ MemberName 7(bn) 0 "a"
+ Name 9 "bi"
+ MemberDecorate 7(bn) 0 Offset 0
+ Decorate 7(bn) BufferBlock
+ Decorate 9(bi) DescriptorSet 0
+ Decorate 12 SpecId 18
+ Decorate 14 SpecId 19
+ Decorate 16 BuiltIn WorkgroupSize
+ 2: TypeVoid
+ 3: TypeFunction 2
+ 6: TypeInt 32 0
+ 7(bn): TypeStruct 6(int)
+ 8: TypePointer Uniform 7(bn)
+ 9(bi): 8(ptr) Variable Uniform
+ 10: TypeInt 32 1
+ 11: 10(int) Constant 0
+ 12: 6(int) SpecConstant 32
+ 13: 6(int) Constant 32
+ 14: 6(int) SpecConstant 1
+ 15: TypeVector 6(int) 3
+ 16: 15(ivec3) SpecConstantComposite 12 13 14
+ 17: 6(int) Constant 0
+ 18: 6(int) SpecConstantOp 81 16 0
+ 19: 6(int) Constant 1
+ 20: 6(int) SpecConstantOp 81 16 1(GLSL.std.450)
+ 21: 6(int) SpecConstantOp 132 18 20
+ 22: 6(int) Constant 2
+ 23: 6(int) SpecConstantOp 81 16 2
+ 24: 6(int) SpecConstantOp 132 21 23
+ 25: TypePointer Uniform 6(int)
+ 4(main): 2 Function None 3
+ 5: Label
+ 26: 25(ptr) AccessChain 9(bi) 11
+ Store 26 24
+ Return
+ FunctionEnd
diff --git a/chromium/third_party/glslang/src/Test/baseResults/spv.specConstant.vert.out b/chromium/third_party/glslang/src/Test/baseResults/spv.specConstant.vert.out
new file mode 100644
index 00000000000..fb7c70a7309
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/spv.specConstant.vert.out
@@ -0,0 +1,137 @@
+spv.specConstant.vert
+Warning, version 400 is not yet complete; most version-specific features are present, but some are missing.
+
+
+Linked vertex stage:
+
+
+// Module Version 10000
+// Generated by (magic number): 80001
+// Id's are bound by 81
+
+ Capability Shader
+ Capability Float64
+ 1: ExtInstImport "GLSL.std.450"
+ MemoryModel Logical GLSL450
+ EntryPoint Vertex 4 "main" 20 22 28 53
+ Source GLSL 400
+ Name 4 "main"
+ Name 14 "foo(vf4[s1516];"
+ Name 13 "p"
+ Name 17 "builtin_spec_constant("
+ Name 20 "color"
+ Name 22 "ucol"
+ Name 28 "size"
+ Name 47 "param"
+ Name 53 "dupUcol"
+ Name 76 "result"
+ Decorate 9 SpecId 16
+ Decorate 30 SpecId 17
+ Decorate 34 SpecId 22
+ Decorate 39 SpecId 19
+ Decorate 40 SpecId 18
+ Decorate 50 SpecId 116
+ Decorate 60 SpecId 117
+ Decorate 63 SpecId 122
+ Decorate 67 SpecId 119
+ Decorate 68 SpecId 118
+ Decorate 77 SpecId 24
+ 2: TypeVoid
+ 3: TypeFunction 2
+ 6: TypeFloat 32
+ 7: TypeVector 6(float) 4
+ 8: TypeInt 32 1
+ 9: 8(int) SpecConstant 5
+ 10: TypeArray 7(fvec4) 9
+ 11: TypePointer Function 10
+ 12: TypeFunction 2 11(ptr)
+ 16: TypeFunction 8(int)
+ 19: TypePointer Output 7(fvec4)
+ 20(color): 19(ptr) Variable Output
+ 21: TypePointer Input 10
+ 22(ucol): 21(ptr) Variable Input
+ 23: 8(int) Constant 2
+ 24: TypePointer Input 7(fvec4)
+ 27: TypePointer Output 8(int)
+ 28(size): 27(ptr) Variable Output
+ 29: TypeBool
+ 30: 29(bool) SpecConstantTrue
+ 33: TypeInt 32 0
+ 34: 33(int) SpecConstant 2
+ 38: TypeFloat 64
+ 39: 38(float) SpecConstant 1413754136 1074340347
+ 40: 6(float) SpecConstant 1078523331
+ 50: 8(int) SpecConstant 12
+ 51: TypeArray 7(fvec4) 50
+ 52: TypePointer Input 51
+ 53(dupUcol): 52(ptr) Variable Input
+ 60: 29(bool) SpecConstantTrue
+ 63: 33(int) SpecConstant 2
+ 67: 38(float) SpecConstant 1413754136 1074340347
+ 68: 6(float) SpecConstant 1078523331
+ 75: TypePointer Function 8(int)
+ 77: 8(int) SpecConstant 8
+ 4(main): 2 Function None 3
+ 5: Label
+ 47(param): 11(ptr) Variable Function
+ 25: 24(ptr) AccessChain 22(ucol) 23
+ 26: 7(fvec4) Load 25
+ Store 20(color) 26
+ Store 28(size) 9
+ SelectionMerge 32 None
+ BranchConditional 30 31 32
+ 31: Label
+ 35: 6(float) ConvertUToF 34
+ 36: 7(fvec4) Load 20(color)
+ 37: 7(fvec4) VectorTimesScalar 36 35
+ Store 20(color) 37
+ Branch 32
+ 32: Label
+ 41: 38(float) FConvert 40
+ 42: 38(float) FDiv 39 41
+ 43: 6(float) FConvert 42
+ 44: 7(fvec4) Load 20(color)
+ 45: 7(fvec4) CompositeConstruct 43 43 43 43
+ 46: 7(fvec4) FAdd 44 45
+ Store 20(color) 46
+ 48: 10 Load 22(ucol)
+ Store 47(param) 48
+ 49: 2 FunctionCall 14(foo(vf4[s1516];) 47(param)
+ Return
+ FunctionEnd
+14(foo(vf4[s1516];): 2 Function None 12
+ 13(p): 11(ptr) FunctionParameter
+ 15: Label
+ 54: 24(ptr) AccessChain 53(dupUcol) 23
+ 55: 7(fvec4) Load 54
+ 56: 7(fvec4) Load 20(color)
+ 57: 7(fvec4) FAdd 56 55
+ Store 20(color) 57
+ 58: 8(int) Load 28(size)
+ 59: 8(int) IAdd 58 50
+ Store 28(size) 59
+ SelectionMerge 62 None
+ BranchConditional 60 61 62
+ 61: Label
+ 64: 6(float) ConvertUToF 63
+ 65: 7(fvec4) Load 20(color)
+ 66: 7(fvec4) VectorTimesScalar 65 64
+ Store 20(color) 66
+ Branch 62
+ 62: Label
+ 69: 38(float) FConvert 68
+ 70: 38(float) FDiv 67 69
+ 71: 6(float) FConvert 70
+ 72: 7(fvec4) Load 20(color)
+ 73: 7(fvec4) CompositeConstruct 71 71 71 71
+ 74: 7(fvec4) FAdd 72 73
+ Store 20(color) 74
+ Return
+ FunctionEnd
+17(builtin_spec_constant(): 8(int) Function None 16
+ 18: Label
+ 76(result): 75(ptr) Variable Function
+ Store 76(result) 77
+ 78: 8(int) Load 76(result)
+ ReturnValue 78
+ FunctionEnd
diff --git a/chromium/third_party/glslang/src/Test/baseResults/spv.specConstantComposite.vert.out b/chromium/third_party/glslang/src/Test/baseResults/spv.specConstantComposite.vert.out
new file mode 100644
index 00000000000..c4585e40da1
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/spv.specConstantComposite.vert.out
@@ -0,0 +1,89 @@
+spv.specConstantComposite.vert
+Warning, version 450 is not yet complete; most version-specific features are present, but some are missing.
+
+
+Linked vertex stage:
+
+
+// Module Version 10000
+// Generated by (magic number): 80001
+// Id's are bound by 43
+
+ Capability Shader
+ Capability Float64
+ 1: ExtInstImport "GLSL.std.450"
+ MemoryModel Logical GLSL450
+ EntryPoint Vertex 4 "main" 27 42
+ Source GLSL 450
+ Name 4 "main"
+ Name 6 "refer_primary_spec_const("
+ Name 8 "refer_composite_spec_const("
+ Name 10 "refer_copmosite_dot_dereference("
+ Name 12 "refer_composite_bracket_dereference("
+ Name 16 "refer_spec_const_array_length("
+ Name 18 "declare_spec_const_in_func("
+ Name 27 "color"
+ Name 33 "len"
+ Name 42 "global_vec4_array_with_spec_length"
+ Decorate 21 SpecId 203
+ Decorate 28 SpecId 200
+ Decorate 37 SpecId 201
+ Decorate 39 SpecId 202
+ 2: TypeVoid
+ 3: TypeFunction 2
+ 14: TypeInt 32 1
+ 15: TypeFunction 14(int)
+ 20: TypeBool
+ 21: 20(bool) SpecConstantTrue
+ 24: TypeFloat 32
+ 25: TypeVector 24(float) 4
+ 26: TypePointer Output 25(fvec4)
+ 27(color): 26(ptr) Variable Output
+ 28: 14(int) SpecConstant 3
+ 32: TypePointer Function 14(int)
+ 37: 24(float) SpecConstant 1078523331
+ 38: TypeFloat 64
+ 39: 38(float) SpecConstant 1413754136 1074340347
+ 40: TypeArray 25(fvec4) 28
+ 41: TypePointer Input 40
+42(global_vec4_array_with_spec_length): 41(ptr) Variable Input
+ 4(main): 2 Function None 3
+ 5: Label
+ Return
+ FunctionEnd
+6(refer_primary_spec_const(): 2 Function None 3
+ 7: Label
+ SelectionMerge 23 None
+ BranchConditional 21 22 23
+ 22: Label
+ 29: 24(float) ConvertSToF 28
+ 30: 25(fvec4) Load 27(color)
+ 31: 25(fvec4) VectorTimesScalar 30 29
+ Store 27(color) 31
+ Branch 23
+ 23: Label
+ Return
+ FunctionEnd
+8(refer_composite_spec_const(): 2 Function None 3
+ 9: Label
+ Return
+ FunctionEnd
+10(refer_copmosite_dot_dereference(): 2 Function None 3
+ 11: Label
+ Return
+ FunctionEnd
+12(refer_composite_bracket_dereference(): 2 Function None 3
+ 13: Label
+ Return
+ FunctionEnd
+16(refer_spec_const_array_length(): 14(int) Function None 15
+ 17: Label
+ 33(len): 32(ptr) Variable Function
+ Store 33(len) 28
+ 34: 14(int) Load 33(len)
+ ReturnValue 34
+ FunctionEnd
+18(declare_spec_const_in_func(): 2 Function None 3
+ 19: Label
+ Return
+ FunctionEnd
diff --git a/chromium/third_party/glslang/src/Test/baseResults/spv.specConstantOperations.vert.out b/chromium/third_party/glslang/src/Test/baseResults/spv.specConstantOperations.vert.out
new file mode 100644
index 00000000000..ea4c69a2d99
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/spv.specConstantOperations.vert.out
@@ -0,0 +1,164 @@
+spv.specConstantOperations.vert
+Warning, version 450 is not yet complete; most version-specific features are present, but some are missing.
+
+
+Linked vertex stage:
+
+
+// Module Version 10000
+// Generated by (magic number): 80001
+// Id's are bound by 131
+
+ Capability Shader
+ 1: ExtInstImport "GLSL.std.450"
+ MemoryModel Logical GLSL450
+ EntryPoint Vertex 4 "main"
+ Source GLSL 450
+ Name 4 "main"
+ Name 8 "non_const_array_size_from_spec_const("
+ Name 11 "i"
+ Name 27 "array"
+ Decorate 19 SpecId 201
+ Decorate 40 SpecId 200
+ Decorate 42 SpecId 202
+ Decorate 43 SpecId 203
+ 2: TypeVoid
+ 3: TypeFunction 2
+ 6: TypeInt 32 1
+ 7: TypeFunction 6(int)
+ 10: TypePointer Function 6(int)
+ 12: 6(int) Constant 0
+ 19: 6(int) SpecConstant 10
+ 20: 6(int) Constant 2
+ 21: 6(int) SpecConstantOp 128 19 20
+ 22: TypeBool
+ 24: 6(int) SpecConstantOp 128 19 20
+ 25: TypeArray 6(int) 24
+ 26: TypePointer Function 25
+ 29: 6(int) Constant 1023
+ 32: 6(int) Constant 1
+ 34: 6(int) SpecConstantOp 128 19 32
+ 39: TypeFloat 32
+ 40: 39(float) SpecConstant 1078530010
+ 41: TypeInt 32 0
+ 42: 41(int) SpecConstant 100
+ 43: 6(int) SpecConstant 4294967286
+ 44: 41(int) Constant 0
+ 45: 22(bool) SpecConstantOp 171 19 44
+ 46: 22(bool) SpecConstantOp 171 42 44
+ 47: 6(int) SpecConstantOp 169 45 32 12
+ 48: 41(int) Constant 1
+ 49: 41(int) SpecConstantOp 169 45 48 44
+ 50: 41(int) SpecConstantOp 128 43 44
+ 51: 6(int) SpecConstantOp 128 42 44
+ 52: 6(int) SpecConstantOp 126 19
+ 53: 6(int) SpecConstantOp 200 19
+ 54: 6(int) SpecConstantOp 128 19 20
+ 55: 6(int) SpecConstantOp 128 19 20
+ 56: 6(int) Constant 3
+ 57: 6(int) SpecConstantOp 130 55 56
+ 58: 6(int) Constant 4
+ 59: 6(int) SpecConstantOp 130 54 58
+ 60: 6(int) SpecConstantOp 132 43 20
+ 61: 41(int) Constant 2
+ 62: 41(int) SpecConstantOp 132 42 61
+ 63: 6(int) Constant 5
+ 64: 6(int) SpecConstantOp 135 60 63
+ 65: 41(int) Constant 5
+ 66: 41(int) SpecConstantOp 134 62 65
+ 67: 6(int) SpecConstantOp 139 43 58
+ 68: 41(int) Constant 4
+ 69: 41(int) SpecConstantOp 137 42 68
+ 70: 6(int) SpecConstantOp 132 43 56
+ 71: 6(int) SpecConstantOp 135 70 63
+ 72: 6(int) Constant 10
+ 73: 6(int) SpecConstantOp 195 43 72
+ 74: 6(int) Constant 20
+ 75: 41(int) SpecConstantOp 194 42 74
+ 76: 6(int) SpecConstantOp 196 43 32
+ 77: 41(int) SpecConstantOp 196 42 20
+ 78: 6(int) Constant 256
+ 79: 6(int) SpecConstantOp 197 43 78
+ 80: 41(int) Constant 512
+ 81: 41(int) SpecConstantOp 198 42 80
+ 82: 22(bool) SpecConstantOp 177 19 43
+ 83: 22(bool) SpecConstantOp 170 42 42
+ 84: 22(bool) SpecConstantOp 173 19 43
+ 85: 6(int) Constant 30
+ 86: TypeVector 6(int) 4
+ 87: 86(ivec4) SpecConstantComposite 74 85 19 19
+ 88: 41(int) Constant 4294967295
+ 89: 41(int) Constant 4294967294
+ 90: TypeVector 41(int) 4
+ 91: 90(ivec4) SpecConstantComposite 42 42 88 89
+ 92: TypeVector 22(bool) 4
+ 93: 90(ivec4) ConstantComposite 44 44 44 44
+ 94: 92(bvec4) SpecConstantOp 171 87 93
+ 95: 92(bvec4) SpecConstantOp 171 91 93
+ 96: 86(ivec4) ConstantComposite 12 12 12 12
+ 97: 86(ivec4) ConstantComposite 32 32 32 32
+ 98: 86(ivec4) SpecConstantOp 169 94 97 96
+ 99: 90(ivec4) ConstantComposite 48 48 48 48
+ 100: 90(ivec4) SpecConstantOp 169 94 99 93
+ 101: 90(ivec4) SpecConstantOp 128 87 93
+ 102: 86(ivec4) SpecConstantOp 128 91 93
+ 103: 86(ivec4) SpecConstantOp 200 87
+ 104: 86(ivec4) SpecConstantOp 126 87
+ 105: 86(ivec4) ConstantComposite 20 20 20 20
+ 106: 86(ivec4) SpecConstantOp 128 87 105
+ 107: 86(ivec4) SpecConstantOp 128 87 105
+ 108: 86(ivec4) ConstantComposite 56 56 56 56
+ 109: 86(ivec4) SpecConstantOp 130 107 108
+ 110: 86(ivec4) ConstantComposite 58 58 58 58
+ 111: 86(ivec4) SpecConstantOp 130 109 110
+ 112: 86(ivec4) SpecConstantOp 132 87 105
+ 113: 86(ivec4) ConstantComposite 63 63 63 63
+ 114: 86(ivec4) SpecConstantOp 135 112 113
+ 115: 86(ivec4) SpecConstantOp 139 87 110
+ 116: 86(ivec4) ConstantComposite 72 72 72 72
+ 117: 86(ivec4) SpecConstantOp 195 87 116
+ 118: 86(ivec4) SpecConstantOp 196 87 105
+ 119: 6(int) Constant 1024
+ 120: 86(ivec4) ConstantComposite 119 119 119 119
+ 121: 86(ivec4) SpecConstantOp 197 87 120
+ 122: 41(int) Constant 2048
+ 123: 90(ivec4) ConstantComposite 122 122 122 122
+ 124: 90(ivec4) SpecConstantOp 198 91 123
+ 125: 6(int) SpecConstantOp 81 87 0
+ 126: TypeVector 6(int) 2
+ 127: 126(ivec2) SpecConstantOp 79 87 87 1(GLSL.std.450) 0
+ 128: TypeVector 6(int) 3
+ 129: 128(ivec3) SpecConstantOp 79 87 87 2 1(GLSL.std.450) 0
+ 130: 86(ivec4) SpecConstantOp 79 87 87 1(GLSL.std.450) 2 0 3
+ 4(main): 2 Function None 3
+ 5: Label
+ Return
+ FunctionEnd
+8(non_const_array_size_from_spec_const(): 6(int) Function None 7
+ 9: Label
+ 11(i): 10(ptr) Variable Function
+ 27(array): 26(ptr) Variable Function
+ Store 11(i) 12
+ Branch 13
+ 13: Label
+ LoopMerge 15 16 None
+ Branch 17
+ 17: Label
+ 18: 6(int) Load 11(i)
+ 23: 22(bool) SLessThan 18 21
+ BranchConditional 23 14 15
+ 14: Label
+ 28: 6(int) Load 11(i)
+ 30: 10(ptr) AccessChain 27(array) 28
+ Store 30 29
+ Branch 16
+ 16: Label
+ 31: 6(int) Load 11(i)
+ 33: 6(int) IAdd 31 32
+ Store 11(i) 33
+ Branch 13
+ 15: Label
+ 35: 10(ptr) AccessChain 27(array) 34
+ 36: 6(int) Load 35
+ ReturnValue 36
+ FunctionEnd
diff --git a/chromium/third_party/glslang/src/Test/baseResults/spv.structAssignment.frag.out b/chromium/third_party/glslang/src/Test/baseResults/spv.structAssignment.frag.out
new file mode 100755
index 00000000000..7c28e103c6b
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/spv.structAssignment.frag.out
@@ -0,0 +1,93 @@
+spv.structAssignment.frag
+
+Linked fragment stage:
+
+
+// Module Version 10000
+// Generated by (magic number): 80001
+// Id's are bound by 50
+
+ Capability Shader
+ 1: ExtInstImport "GLSL.std.450"
+ MemoryModel Logical GLSL450
+ EntryPoint Fragment 4 "main" 31 44
+ ExecutionMode 4 OriginUpperLeft
+ Source GLSL 140
+ Name 4 "main"
+ Name 8 "lunarStruct1"
+ MemberName 8(lunarStruct1) 0 "i"
+ MemberName 8(lunarStruct1) 1 "f"
+ Name 9 "lunarStruct2"
+ MemberName 9(lunarStruct2) 0 "i"
+ MemberName 9(lunarStruct2) 1 "f"
+ MemberName 9(lunarStruct2) 2 "s1_1"
+ Name 10 "lunarStruct3"
+ MemberName 10(lunarStruct3) 0 "s2_1"
+ MemberName 10(lunarStruct3) 1 "i"
+ MemberName 10(lunarStruct3) 2 "f"
+ MemberName 10(lunarStruct3) 3 "s1_1"
+ Name 12 "foo3"
+ Name 22 "locals2"
+ Name 27 "foo2"
+ Name 31 "gl_FragColor"
+ Name 40 "samp2D"
+ Name 44 "coord"
+ Name 49 "foo"
+ Decorate 40(samp2D) DescriptorSet 0
+ 2: TypeVoid
+ 3: TypeFunction 2
+ 6: TypeInt 32 1
+ 7: TypeFloat 32
+ 8(lunarStruct1): TypeStruct 6(int) 7(float)
+ 9(lunarStruct2): TypeStruct 6(int) 7(float) 8(lunarStruct1)
+10(lunarStruct3): TypeStruct 9(lunarStruct2) 6(int) 7(float) 8(lunarStruct1)
+ 11: TypePointer Private 10(lunarStruct3)
+ 12(foo3): 11(ptr) Variable Private
+ 13: 6(int) Constant 0
+ 14: TypePointer Private 6(int)
+ 17: TypeBool
+ 21: TypePointer Function 9(lunarStruct2)
+ 23: TypePointer Private 9(lunarStruct2)
+ 27(foo2): 23(ptr) Variable Private
+ 29: TypeVector 7(float) 4
+ 30: TypePointer Output 29(fvec4)
+31(gl_FragColor): 30(ptr) Variable Output
+ 32: 6(int) Constant 2
+ 33: 6(int) Constant 1
+ 34: TypePointer Function 7(float)
+ 37: TypeImage 7(float) 2D sampled format:Unknown
+ 38: TypeSampledImage 37
+ 39: TypePointer UniformConstant 38
+ 40(samp2D): 39(ptr) Variable UniformConstant
+ 42: TypeVector 7(float) 2
+ 43: TypePointer Input 42(fvec2)
+ 44(coord): 43(ptr) Variable Input
+ 48: TypePointer Private 8(lunarStruct1)
+ 49(foo): 48(ptr) Variable Private
+ 4(main): 2 Function None 3
+ 5: Label
+ 22(locals2): 21(ptr) Variable Function
+ 15: 14(ptr) AccessChain 12(foo3) 13 13
+ 16: 6(int) Load 15
+ 18: 17(bool) SGreaterThan 16 13
+ SelectionMerge 20 None
+ BranchConditional 18 19 26
+ 19: Label
+ 24: 23(ptr) AccessChain 12(foo3) 13
+ 25:9(lunarStruct2) Load 24
+ Store 22(locals2) 25
+ Branch 20
+ 26: Label
+ 28:9(lunarStruct2) Load 27(foo2)
+ Store 22(locals2) 28
+ Branch 20
+ 20: Label
+ 35: 34(ptr) AccessChain 22(locals2) 32 33
+ 36: 7(float) Load 35
+ 41: 38 Load 40(samp2D)
+ 45: 42(fvec2) Load 44(coord)
+ 46: 29(fvec4) ImageSampleImplicitLod 41 45
+ 47: 29(fvec4) VectorTimesScalar 46 36
+ Store 31(gl_FragColor) 47
+ Return
+ FunctionEnd
diff --git a/chromium/third_party/glslang/src/Test/baseResults/spv.structDeref.frag.out b/chromium/third_party/glslang/src/Test/baseResults/spv.structDeref.frag.out
new file mode 100755
index 00000000000..78ebdc635f1
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/spv.structDeref.frag.out
@@ -0,0 +1,191 @@
+spv.structDeref.frag
+
+Linked fragment stage:
+
+
+// Module Version 10000
+// Generated by (magic number): 80001
+// Id's are bound by 123
+
+ Capability Shader
+ 1: ExtInstImport "GLSL.std.450"
+ MemoryModel Logical GLSL450
+ EntryPoint Fragment 4 "main" 61 99
+ ExecutionMode 4 OriginUpperLeft
+ Source GLSL 140
+ Name 4 "main"
+ Name 8 "s0"
+ MemberName 8(s0) 0 "i"
+ Name 9 "s1"
+ MemberName 9(s1) 0 "i"
+ MemberName 9(s1) 1 "f"
+ MemberName 9(s1) 2 "s0_1"
+ Name 10 "s2"
+ MemberName 10(s2) 0 "i"
+ MemberName 10(s2) 1 "f"
+ MemberName 10(s2) 2 "s1_1"
+ Name 14 "s3"
+ MemberName 14(s3) 0 "s2_1"
+ MemberName 14(s3) 1 "i"
+ MemberName 14(s3) 2 "f"
+ MemberName 14(s3) 3 "s1_1"
+ Name 16 "foo3"
+ Name 27 "locals2"
+ Name 40 "fArray"
+ Name 46 "locals1Array"
+ Name 49 "foo1"
+ Name 53 "locals0"
+ Name 54 "s00"
+ MemberName 54(s00) 0 "s0_0"
+ Name 56 "locals00"
+ Name 61 "coord"
+ Name 71 "foo0"
+ Name 86 "foo00"
+ Name 99 "gl_FragColor"
+ Name 116 "samp2D"
+ Name 122 "foo2"
+ Decorate 116(samp2D) DescriptorSet 0
+ 2: TypeVoid
+ 3: TypeFunction 2
+ 6: TypeInt 32 1
+ 7: TypeFloat 32
+ 8(s0): TypeStruct 6(int)
+ 9(s1): TypeStruct 6(int) 7(float) 8(s0)
+ 10(s2): TypeStruct 6(int) 7(float) 9(s1)
+ 11: TypeInt 32 0
+ 12: 11(int) Constant 12
+ 13: TypeArray 10(s2) 12
+ 14(s3): TypeStruct 13 6(int) 7(float) 9(s1)
+ 15: TypePointer Private 14(s3)
+ 16(foo3): 15(ptr) Variable Private
+ 17: 6(int) Constant 0
+ 18: 6(int) Constant 9
+ 19: TypePointer Private 6(int)
+ 22: TypeBool
+ 26: TypePointer Function 10(s2)
+ 28: 6(int) Constant 1
+ 29: 7(float) Constant 1065353216
+ 30: TypePointer Function 7(float)
+ 32: 6(int) Constant 2
+ 33: 8(s0) ConstantComposite 17
+ 34: 9(s1) ConstantComposite 17 29 33
+ 35: TypePointer Function 9(s1)
+ 37: 11(int) Constant 6
+ 38: TypeArray 7(float) 37
+ 39: TypePointer Function 38
+ 41: 7(float) Constant 0
+ 42: 38 ConstantComposite 41 41 41 41 41 41
+ 43: 11(int) Constant 10
+ 44: TypeArray 9(s1) 43
+ 45: TypePointer Function 44
+ 47: 6(int) Constant 6
+ 48: TypePointer Private 9(s1)
+ 49(foo1): 48(ptr) Variable Private
+ 52: TypePointer Function 8(s0)
+ 54(s00): TypeStruct 8(s0)
+ 55: TypePointer Function 54(s00)
+ 57: 54(s00) ConstantComposite 33
+ 59: TypeVector 7(float) 2
+ 60: TypePointer Input 59(fvec2)
+ 61(coord): 60(ptr) Variable Input
+ 62: 11(int) Constant 0
+ 63: TypePointer Input 7(float)
+ 67: 11(int) Constant 1
+ 70: TypePointer Private 8(s0)
+ 71(foo0): 70(ptr) Variable Private
+ 75: 7(float) Constant 1073741824
+ 76: 7(float) Constant 1077936128
+ 77: 7(float) Constant 1082130432
+ 78: 7(float) Constant 1084227584
+ 79: 38 ConstantComposite 41 29 75 76 77 78
+ 85: TypePointer Private 54(s00)
+ 86(foo00): 85(ptr) Variable Private
+ 88: TypePointer Function 6(int)
+ 91: 6(int) Constant 5
+ 97: TypeVector 7(float) 4
+ 98: TypePointer Output 97(fvec4)
+99(gl_FragColor): 98(ptr) Variable Output
+ 106: 6(int) Constant 3
+ 113: TypeImage 7(float) 2D sampled format:Unknown
+ 114: TypeSampledImage 113
+ 115: TypePointer UniformConstant 114
+ 116(samp2D): 115(ptr) Variable UniformConstant
+ 121: TypePointer Private 10(s2)
+ 122(foo2): 121(ptr) Variable Private
+ 4(main): 2 Function None 3
+ 5: Label
+ 27(locals2): 26(ptr) Variable Function
+ 40(fArray): 39(ptr) Variable Function
+46(locals1Array): 45(ptr) Variable Function
+ 53(locals0): 52(ptr) Variable Function
+ 56(locals00): 55(ptr) Variable Function
+ 20: 19(ptr) AccessChain 16(foo3) 17 18 17
+ 21: 6(int) Load 20
+ 23: 22(bool) SGreaterThan 21 17
+ SelectionMerge 25 None
+ BranchConditional 23 24 58
+ 24: Label
+ 31: 30(ptr) AccessChain 27(locals2) 28
+ Store 31 29
+ 36: 35(ptr) AccessChain 27(locals2) 32
+ Store 36 34
+ Store 40(fArray) 42
+ 50: 9(s1) Load 49(foo1)
+ 51: 35(ptr) AccessChain 46(locals1Array) 47
+ Store 51 50
+ Store 53(locals0) 33
+ Store 56(locals00) 57
+ Branch 25
+ 58: Label
+ 64: 63(ptr) AccessChain 61(coord) 62
+ 65: 7(float) Load 64
+ 66: 30(ptr) AccessChain 27(locals2) 28
+ Store 66 65
+ 68: 63(ptr) AccessChain 61(coord) 67
+ 69: 7(float) Load 68
+ 72: 8(s0) Load 71(foo0)
+ 73: 9(s1) CompositeConstruct 28 69 72
+ 74: 35(ptr) AccessChain 27(locals2) 32
+ Store 74 73
+ Store 40(fArray) 79
+ 80: 35(ptr) AccessChain 27(locals2) 32
+ 81: 9(s1) Load 80
+ 82: 35(ptr) AccessChain 46(locals1Array) 47
+ Store 82 81
+ 83: 70(ptr) AccessChain 49(foo1) 32
+ 84: 8(s0) Load 83
+ Store 53(locals0) 84
+ 87: 54(s00) Load 86(foo00)
+ Store 56(locals00) 87
+ Branch 25
+ 25: Label
+ 89: 88(ptr) AccessChain 53(locals0) 17
+ 90: 6(int) Load 89
+ 92: 22(bool) SGreaterThan 90 91
+ SelectionMerge 94 None
+ BranchConditional 92 93 94
+ 93: Label
+ 95: 52(ptr) AccessChain 56(locals00) 17
+ 96: 8(s0) Load 95
+ Store 53(locals0) 96
+ Branch 94
+ 94: Label
+ 100: 88(ptr) AccessChain 53(locals0) 17
+ 101: 6(int) Load 100
+ 102: 7(float) ConvertSToF 101
+ 103: 30(ptr) AccessChain 46(locals1Array) 47 28
+ 104: 7(float) Load 103
+ 105: 7(float) FAdd 102 104
+ 107: 30(ptr) AccessChain 40(fArray) 106
+ 108: 7(float) Load 107
+ 109: 7(float) FAdd 105 108
+ 110: 30(ptr) AccessChain 27(locals2) 32 28
+ 111: 7(float) Load 110
+ 112: 7(float) FAdd 109 111
+ 117: 114 Load 116(samp2D)
+ 118: 59(fvec2) Load 61(coord)
+ 119: 97(fvec4) ImageSampleImplicitLod 117 118
+ 120: 97(fvec4) VectorTimesScalar 119 112
+ Store 99(gl_FragColor) 120
+ Return
+ FunctionEnd
diff --git a/chromium/third_party/glslang/src/Test/baseResults/spv.structure.frag.out b/chromium/third_party/glslang/src/Test/baseResults/spv.structure.frag.out
new file mode 100755
index 00000000000..8d91ed043af
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/spv.structure.frag.out
@@ -0,0 +1,99 @@
+spv.structure.frag
+
+Linked fragment stage:
+
+
+// Module Version 10000
+// Generated by (magic number): 80001
+// Id's are bound by 60
+
+ Capability Shader
+ 1: ExtInstImport "GLSL.std.450"
+ MemoryModel Logical GLSL450
+ EntryPoint Fragment 4 "main" 45 54
+ ExecutionMode 4 OriginUpperLeft
+ Source GLSL 140
+ Name 4 "main"
+ Name 8 "scale"
+ Name 18 "lunarStruct1"
+ MemberName 18(lunarStruct1) 0 "i"
+ MemberName 18(lunarStruct1) 1 "f"
+ MemberName 18(lunarStruct1) 2 "color"
+ Name 21 "lunarStruct2"
+ MemberName 21(lunarStruct2) 0 "i"
+ MemberName 21(lunarStruct2) 1 "f"
+ MemberName 21(lunarStruct2) 2 "s1_1"
+ Name 24 "foo2"
+ Name 45 "gl_FragColor"
+ Name 50 "samp2D"
+ Name 54 "coord"
+ Name 59 "foo"
+ Decorate 50(samp2D) DescriptorSet 0
+ 2: TypeVoid
+ 3: TypeFunction 2
+ 6: TypeFloat 32
+ 7: TypePointer Function 6(float)
+ 9: 6(float) Constant 0
+ 10: TypeInt 32 1
+ 11: TypeInt 32 0
+ 12: 11(int) Constant 5
+ 13: TypeArray 10(int) 12
+ 14: 11(int) Constant 4
+ 15: TypeArray 6(float) 14
+ 16: TypeVector 6(float) 4
+ 17: TypeArray 16(fvec4) 12
+18(lunarStruct1): TypeStruct 10(int) 15 17
+ 19: 11(int) Constant 7
+ 20: TypeArray 18(lunarStruct1) 19
+21(lunarStruct2): TypeStruct 13 6(float) 20
+ 22: TypeArray 21(lunarStruct2) 12
+ 23: TypePointer Private 22
+ 24(foo2): 23(ptr) Variable Private
+ 25: 10(int) Constant 3
+ 26: 10(int) Constant 0
+ 27: 10(int) Constant 4
+ 28: TypePointer Private 10(int)
+ 31: TypeBool
+ 35: 10(int) Constant 2
+ 36: 11(int) Constant 0
+ 37: TypePointer Private 6(float)
+ 41: 10(int) Constant 1
+ 44: TypePointer Output 16(fvec4)
+45(gl_FragColor): 44(ptr) Variable Output
+ 47: TypeImage 6(float) 2D sampled format:Unknown
+ 48: TypeSampledImage 47
+ 49: TypePointer UniformConstant 48
+ 50(samp2D): 49(ptr) Variable UniformConstant
+ 52: TypeVector 6(float) 2
+ 53: TypePointer Input 52(fvec2)
+ 54(coord): 53(ptr) Variable Input
+ 58: TypePointer Private 18(lunarStruct1)
+ 59(foo): 58(ptr) Variable Private
+ 4(main): 2 Function None 3
+ 5: Label
+ 8(scale): 7(ptr) Variable Function
+ Store 8(scale) 9
+ 29: 28(ptr) AccessChain 24(foo2) 25 26 27
+ 30: 10(int) Load 29
+ 32: 31(bool) SGreaterThan 30 26
+ SelectionMerge 34 None
+ BranchConditional 32 33 40
+ 33: Label
+ 38: 37(ptr) AccessChain 24(foo2) 25 35 35 35 25 36
+ 39: 6(float) Load 38
+ Store 8(scale) 39
+ Branch 34
+ 40: Label
+ 42: 37(ptr) AccessChain 24(foo2) 25 35 35 41 25
+ 43: 6(float) Load 42
+ Store 8(scale) 43
+ Branch 34
+ 34: Label
+ 46: 6(float) Load 8(scale)
+ 51: 48 Load 50(samp2D)
+ 55: 52(fvec2) Load 54(coord)
+ 56: 16(fvec4) ImageSampleImplicitLod 51 55
+ 57: 16(fvec4) VectorTimesScalar 56 46
+ Store 45(gl_FragColor) 57
+ Return
+ FunctionEnd
diff --git a/chromium/third_party/glslang/src/Test/baseResults/spv.subpass.frag.out b/chromium/third_party/glslang/src/Test/baseResults/spv.subpass.frag.out
new file mode 100644
index 00000000000..93d680c71ab
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/spv.subpass.frag.out
@@ -0,0 +1,118 @@
+spv.subpass.frag
+Warning, version 400 is not yet complete; most version-specific features are present, but some are missing.
+
+
+Linked fragment stage:
+
+
+// Module Version 10000
+// Generated by (magic number): 80001
+// Id's are bound by 67
+
+ Capability Shader
+ Capability InputAttachment
+ 1: ExtInstImport "GLSL.std.450"
+ MemoryModel Logical GLSL450
+ EntryPoint Fragment 4 "main" 15 27 53
+ ExecutionMode 4 OriginUpperLeft
+ Source GLSL 400
+ Name 4 "main"
+ Name 11 "foo(iIPM1;"
+ Name 10 "sb"
+ Name 15 "icolor"
+ Name 27 "color"
+ Name 30 "sub"
+ Name 35 "subMS"
+ Name 42 "isub"
+ Name 45 "isubMS"
+ Name 53 "ucolor"
+ Name 56 "usub"
+ Name 61 "usubMS"
+ Decorate 30(sub) DescriptorSet 0
+ Decorate 30(sub) InputAttachmentIndex 1
+ Decorate 35(subMS) DescriptorSet 0
+ Decorate 35(subMS) InputAttachmentIndex 2
+ Decorate 42(isub) DescriptorSet 0
+ Decorate 42(isub) InputAttachmentIndex 3
+ Decorate 45(isubMS) DescriptorSet 0
+ Decorate 45(isubMS) InputAttachmentIndex 4
+ Decorate 56(usub) DescriptorSet 0
+ Decorate 56(usub) InputAttachmentIndex 5
+ Decorate 61(usubMS) DescriptorSet 0
+ Decorate 61(usubMS) InputAttachmentIndex 6
+ 2: TypeVoid
+ 3: TypeFunction 2
+ 6: TypeInt 32 1
+ 7: TypeImage 6(int) SubpassData multi-sampled nonsampled format:Unknown
+ 8: TypePointer UniformConstant 7
+ 9: TypeFunction 2 8(ptr)
+ 13: TypeVector 6(int) 4
+ 14: TypePointer Output 13(ivec4)
+ 15(icolor): 14(ptr) Variable Output
+ 17: 6(int) Constant 3
+ 18: 6(int) Constant 0
+ 19: TypeVector 6(int) 2
+ 20: 19(ivec2) ConstantComposite 18 18
+ 24: TypeFloat 32
+ 25: TypeVector 24(float) 4
+ 26: TypePointer Output 25(fvec4)
+ 27(color): 26(ptr) Variable Output
+ 28: TypeImage 24(float) SubpassData nonsampled format:Unknown
+ 29: TypePointer UniformConstant 28
+ 30(sub): 29(ptr) Variable UniformConstant
+ 33: TypeImage 24(float) SubpassData multi-sampled nonsampled format:Unknown
+ 34: TypePointer UniformConstant 33
+ 35(subMS): 34(ptr) Variable UniformConstant
+ 40: TypeImage 6(int) SubpassData nonsampled format:Unknown
+ 41: TypePointer UniformConstant 40
+ 42(isub): 41(ptr) Variable UniformConstant
+ 45(isubMS): 8(ptr) Variable UniformConstant
+ 50: TypeInt 32 0
+ 51: TypeVector 50(int) 4
+ 52: TypePointer Output 51(ivec4)
+ 53(ucolor): 52(ptr) Variable Output
+ 54: TypeImage 50(int) SubpassData nonsampled format:Unknown
+ 55: TypePointer UniformConstant 54
+ 56(usub): 55(ptr) Variable UniformConstant
+ 59: TypeImage 50(int) SubpassData multi-sampled nonsampled format:Unknown
+ 60: TypePointer UniformConstant 59
+ 61(usubMS): 60(ptr) Variable UniformConstant
+ 4(main): 2 Function None 3
+ 5: Label
+ 31: 28 Load 30(sub)
+ 32: 25(fvec4) ImageRead 31 20
+ Store 27(color) 32
+ 36: 33 Load 35(subMS)
+ 37: 25(fvec4) ImageRead 36 20 Sample 17
+ 38: 25(fvec4) Load 27(color)
+ 39: 25(fvec4) FAdd 38 37
+ Store 27(color) 39
+ 43: 40 Load 42(isub)
+ 44: 13(ivec4) ImageRead 43 20
+ Store 15(icolor) 44
+ 46: 7 Load 45(isubMS)
+ 47: 13(ivec4) ImageRead 46 20 Sample 17
+ 48: 13(ivec4) Load 15(icolor)
+ 49: 13(ivec4) IAdd 48 47
+ Store 15(icolor) 49
+ 57: 54 Load 56(usub)
+ 58: 51(ivec4) ImageRead 57 20
+ Store 53(ucolor) 58
+ 62: 59 Load 61(usubMS)
+ 63: 51(ivec4) ImageRead 62 20 Sample 17
+ 64: 51(ivec4) Load 53(ucolor)
+ 65: 51(ivec4) IAdd 64 63
+ Store 53(ucolor) 65
+ 66: 2 FunctionCall 11(foo(iIPM1;) 45(isubMS)
+ Return
+ FunctionEnd
+ 11(foo(iIPM1;): 2 Function None 9
+ 10(sb): 8(ptr) FunctionParameter
+ 12: Label
+ 16: 7 Load 10(sb)
+ 21: 13(ivec4) ImageRead 16 20 Sample 17
+ 22: 13(ivec4) Load 15(icolor)
+ 23: 13(ivec4) IAdd 22 21
+ Store 15(icolor) 23
+ Return
+ FunctionEnd
diff --git a/chromium/third_party/glslang/src/Test/baseResults/spv.switch.frag.out b/chromium/third_party/glslang/src/Test/baseResults/spv.switch.frag.out
new file mode 100755
index 00000000000..87ea4c87ea7
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/spv.switch.frag.out
@@ -0,0 +1,532 @@
+spv.switch.frag
+Warning, version 310 is not yet complete; most version-specific features are present, but some are missing.
+WARNING: 0:121: 'switch' : last case/default label not followed by statements
+WARNING: 0:134: 'switch' : last case/default label not followed by statements
+WARNING: 0:139: 'switch' : last case/default label not followed by statements
+
+
+Linked fragment stage:
+
+
+// Module Version 10000
+// Generated by (magic number): 80001
+// Id's are bound by 269
+
+ Capability Shader
+ 1: ExtInstImport "GLSL.std.450"
+ MemoryModel Logical GLSL450
+ EntryPoint Fragment 4 "main" 62 75 129 227 233
+ ExecutionMode 4 OriginUpperLeft
+ Source ESSL 310
+ Name 4 "main"
+ Name 15 "foo1(vf4;vf4;i1;"
+ Name 12 "v1"
+ Name 13 "v2"
+ Name 14 "i1"
+ Name 20 "foo2(vf4;vf4;i1;"
+ Name 17 "v1"
+ Name 18 "v2"
+ Name 19 "i1"
+ Name 60 "local"
+ Name 62 "c"
+ Name 73 "f"
+ Name 75 "x"
+ Name 129 "d"
+ Name 155 "i"
+ Name 175 "j"
+ Name 227 "color"
+ Name 233 "v"
+ Name 234 "param"
+ Name 236 "param"
+ Name 238 "param"
+ Name 246 "param"
+ Name 248 "param"
+ Name 250 "param"
+ Decorate 15(foo1(vf4;vf4;i1;) RelaxedPrecision
+ Decorate 12(v1) RelaxedPrecision
+ Decorate 13(v2) RelaxedPrecision
+ Decorate 14(i1) RelaxedPrecision
+ Decorate 20(foo2(vf4;vf4;i1;) RelaxedPrecision
+ Decorate 17(v1) RelaxedPrecision
+ Decorate 18(v2) RelaxedPrecision
+ Decorate 19(i1) RelaxedPrecision
+ Decorate 22 RelaxedPrecision
+ Decorate 27 RelaxedPrecision
+ Decorate 29 RelaxedPrecision
+ Decorate 31 RelaxedPrecision
+ Decorate 32 RelaxedPrecision
+ Decorate 33 RelaxedPrecision
+ Decorate 40 RelaxedPrecision
+ Decorate 46 RelaxedPrecision
+ Decorate 51 RelaxedPrecision
+ Decorate 53 RelaxedPrecision
+ Decorate 54 RelaxedPrecision
+ Decorate 55 RelaxedPrecision
+ Decorate 60(local) RelaxedPrecision
+ Decorate 62(c) RelaxedPrecision
+ Decorate 62(c) Flat
+ Decorate 63 RelaxedPrecision
+ Decorate 64 RelaxedPrecision
+ Decorate 66 RelaxedPrecision
+ Decorate 67 RelaxedPrecision
+ Decorate 73(f) RelaxedPrecision
+ Decorate 75(x) RelaxedPrecision
+ Decorate 76 RelaxedPrecision
+ Decorate 77 RelaxedPrecision
+ Decorate 79 RelaxedPrecision
+ Decorate 80 RelaxedPrecision
+ Decorate 82 RelaxedPrecision
+ Decorate 83 RelaxedPrecision
+ Decorate 85 RelaxedPrecision
+ Decorate 90 RelaxedPrecision
+ Decorate 91 RelaxedPrecision
+ Decorate 92 RelaxedPrecision
+ Decorate 93 RelaxedPrecision
+ Decorate 94 RelaxedPrecision
+ Decorate 95 RelaxedPrecision
+ Decorate 96 RelaxedPrecision
+ Decorate 97 RelaxedPrecision
+ Decorate 99 RelaxedPrecision
+ Decorate 100 RelaxedPrecision
+ Decorate 101 RelaxedPrecision
+ Decorate 102 RelaxedPrecision
+ Decorate 104 RelaxedPrecision
+ Decorate 108 RelaxedPrecision
+ Decorate 109 RelaxedPrecision
+ Decorate 110 RelaxedPrecision
+ Decorate 111 RelaxedPrecision
+ Decorate 113 RelaxedPrecision
+ Decorate 114 RelaxedPrecision
+ Decorate 115 RelaxedPrecision
+ Decorate 116 RelaxedPrecision
+ Decorate 119 RelaxedPrecision
+ Decorate 124 RelaxedPrecision
+ Decorate 125 RelaxedPrecision
+ Decorate 126 RelaxedPrecision
+ Decorate 127 RelaxedPrecision
+ Decorate 129(d) RelaxedPrecision
+ Decorate 129(d) Flat
+ Decorate 130 RelaxedPrecision
+ Decorate 134 RelaxedPrecision
+ Decorate 135 RelaxedPrecision
+ Decorate 136 RelaxedPrecision
+ Decorate 137 RelaxedPrecision
+ Decorate 138 RelaxedPrecision
+ Decorate 139 RelaxedPrecision
+ Decorate 140 RelaxedPrecision
+ Decorate 142 RelaxedPrecision
+ Decorate 143 RelaxedPrecision
+ Decorate 144 RelaxedPrecision
+ Decorate 145 RelaxedPrecision
+ Decorate 146 RelaxedPrecision
+ Decorate 150 RelaxedPrecision
+ Decorate 151 RelaxedPrecision
+ Decorate 152 RelaxedPrecision
+ Decorate 153 RelaxedPrecision
+ Decorate 155(i) RelaxedPrecision
+ Decorate 162 RelaxedPrecision
+ Decorate 166 RelaxedPrecision
+ Decorate 171 RelaxedPrecision
+ Decorate 172 RelaxedPrecision
+ Decorate 173 RelaxedPrecision
+ Decorate 174 RelaxedPrecision
+ Decorate 175(j) RelaxedPrecision
+ Decorate 182 RelaxedPrecision
+ Decorate 185 RelaxedPrecision
+ Decorate 186 RelaxedPrecision
+ Decorate 187 RelaxedPrecision
+ Decorate 193 RelaxedPrecision
+ Decorate 194 RelaxedPrecision
+ Decorate 196 RelaxedPrecision
+ Decorate 197 RelaxedPrecision
+ Decorate 198 RelaxedPrecision
+ Decorate 199 RelaxedPrecision
+ Decorate 202 RelaxedPrecision
+ Decorate 203 RelaxedPrecision
+ Decorate 204 RelaxedPrecision
+ Decorate 205 RelaxedPrecision
+ Decorate 207 RelaxedPrecision
+ Decorate 213 RelaxedPrecision
+ Decorate 214 RelaxedPrecision
+ Decorate 215 RelaxedPrecision
+ Decorate 219 RelaxedPrecision
+ Decorate 220 RelaxedPrecision
+ Decorate 221 RelaxedPrecision
+ Decorate 222 RelaxedPrecision
+ Decorate 227(color) RelaxedPrecision
+ Decorate 228 RelaxedPrecision
+ Decorate 229 RelaxedPrecision
+ Decorate 230 RelaxedPrecision
+ Decorate 231 RelaxedPrecision
+ Decorate 233(v) RelaxedPrecision
+ Decorate 235 RelaxedPrecision
+ Decorate 237 RelaxedPrecision
+ Decorate 239 RelaxedPrecision
+ Decorate 240 RelaxedPrecision
+ Decorate 243 RelaxedPrecision
+ Decorate 244 RelaxedPrecision
+ Decorate 245 RelaxedPrecision
+ Decorate 247 RelaxedPrecision
+ Decorate 249 RelaxedPrecision
+ Decorate 251 RelaxedPrecision
+ Decorate 252 RelaxedPrecision
+ Decorate 254 RelaxedPrecision
+ Decorate 255 RelaxedPrecision
+ Decorate 256 RelaxedPrecision
+ Decorate 257 RelaxedPrecision
+ Decorate 264 RelaxedPrecision
+ 2: TypeVoid
+ 3: TypeFunction 2
+ 6: TypeFloat 32
+ 7: TypeVector 6(float) 4
+ 8: TypePointer Function 7(fvec4)
+ 9: TypeInt 32 1
+ 10: TypePointer Function 9(int)
+ 11: TypeFunction 7(fvec4) 8(ptr) 8(ptr) 10(ptr)
+ 36: 6(float) Constant 0
+ 37: 7(fvec4) ConstantComposite 36 36 36 36
+ 48: 6(float) Constant 1065353216
+ 49: 7(fvec4) ConstantComposite 48 48 48 48
+ 61: TypePointer Input 9(int)
+ 62(c): 61(ptr) Variable Input
+ 65: 9(int) Constant 1
+ 72: TypePointer Function 6(float)
+ 74: TypePointer Input 6(float)
+ 75(x): 74(ptr) Variable Input
+ 129(d): 61(ptr) Variable Input
+ 156: 9(int) Constant 0
+ 163: 9(int) Constant 10
+ 164: TypeBool
+ 176: 9(int) Constant 20
+ 183: 9(int) Constant 30
+ 188: 6(float) Constant 1120429670
+ 208: 6(float) Constant 1079739679
+ 226: TypePointer Output 6(float)
+ 227(color): 226(ptr) Variable Output
+ 232: TypePointer Input 7(fvec4)
+ 233(v): 232(ptr) Variable Input
+ 241: TypeInt 32 0
+ 242: 241(int) Constant 1
+ 253: 241(int) Constant 2
+ 4(main): 2 Function None 3
+ 5: Label
+ 60(local): 10(ptr) Variable Function
+ 73(f): 72(ptr) Variable Function
+ 155(i): 10(ptr) Variable Function
+ 175(j): 10(ptr) Variable Function
+ 234(param): 8(ptr) Variable Function
+ 236(param): 8(ptr) Variable Function
+ 238(param): 10(ptr) Variable Function
+ 246(param): 8(ptr) Variable Function
+ 248(param): 8(ptr) Variable Function
+ 250(param): 10(ptr) Variable Function
+ 63: 9(int) Load 62(c)
+ Store 60(local) 63
+ 64: 9(int) Load 60(local)
+ 66: 9(int) IAdd 64 65
+ Store 60(local) 66
+ 67: 9(int) Load 62(c)
+ SelectionMerge 71 None
+ Switch 67 70
+ case 1: 68
+ case 2: 69
+ 70: Label
+ 82: 6(float) Load 75(x)
+ 83: 6(float) ExtInst 1(GLSL.std.450) 15(Tan) 82
+ Store 73(f) 83
+ Branch 71
+ 68: Label
+ 76: 6(float) Load 75(x)
+ 77: 6(float) ExtInst 1(GLSL.std.450) 13(Sin) 76
+ Store 73(f) 77
+ Branch 71
+ 69: Label
+ 79: 6(float) Load 75(x)
+ 80: 6(float) ExtInst 1(GLSL.std.450) 14(Cos) 79
+ Store 73(f) 80
+ Branch 71
+ 71: Label
+ 85: 9(int) Load 62(c)
+ SelectionMerge 89 None
+ Switch 85 88
+ case 1: 86
+ case 2: 87
+ 88: Label
+ 99: 6(float) Load 75(x)
+ 100: 6(float) ExtInst 1(GLSL.std.450) 15(Tan) 99
+ 101: 6(float) Load 73(f)
+ 102: 6(float) FAdd 101 100
+ Store 73(f) 102
+ Branch 89
+ 86: Label
+ 90: 6(float) Load 75(x)
+ 91: 6(float) ExtInst 1(GLSL.std.450) 13(Sin) 90
+ 92: 6(float) Load 73(f)
+ 93: 6(float) FAdd 92 91
+ Store 73(f) 93
+ Branch 87
+ 87: Label
+ 94: 6(float) Load 75(x)
+ 95: 6(float) ExtInst 1(GLSL.std.450) 14(Cos) 94
+ 96: 6(float) Load 73(f)
+ 97: 6(float) FAdd 96 95
+ Store 73(f) 97
+ Branch 89
+ 89: Label
+ 104: 9(int) Load 62(c)
+ SelectionMerge 107 None
+ Switch 104 107
+ case 1: 105
+ case 2: 106
+ 105: Label
+ 108: 6(float) Load 75(x)
+ 109: 6(float) ExtInst 1(GLSL.std.450) 13(Sin) 108
+ 110: 6(float) Load 73(f)
+ 111: 6(float) FAdd 110 109
+ Store 73(f) 111
+ Branch 107
+ 106: Label
+ 113: 6(float) Load 75(x)
+ 114: 6(float) ExtInst 1(GLSL.std.450) 14(Cos) 113
+ 115: 6(float) Load 73(f)
+ 116: 6(float) FAdd 115 114
+ Store 73(f) 116
+ Branch 107
+ 107: Label
+ 119: 9(int) Load 62(c)
+ SelectionMerge 123 None
+ Switch 119 122
+ case 1: 120
+ case 2: 121
+ 122: Label
+ 150: 6(float) Load 75(x)
+ 151: 6(float) ExtInst 1(GLSL.std.450) 15(Tan) 150
+ 152: 6(float) Load 73(f)
+ 153: 6(float) FAdd 152 151
+ Store 73(f) 153
+ Branch 123
+ 120: Label
+ 124: 6(float) Load 75(x)
+ 125: 6(float) ExtInst 1(GLSL.std.450) 13(Sin) 124
+ 126: 6(float) Load 73(f)
+ 127: 6(float) FAdd 126 125
+ Store 73(f) 127
+ Branch 123
+ 121: Label
+ 130: 9(int) Load 129(d)
+ SelectionMerge 133 None
+ Switch 130 133
+ case 1: 131
+ case 2: 132
+ 131: Label
+ 134: 6(float) Load 75(x)
+ 135: 6(float) Load 75(x)
+ 136: 6(float) FMul 134 135
+ 137: 6(float) Load 75(x)
+ 138: 6(float) FMul 136 137
+ 139: 6(float) Load 73(f)
+ 140: 6(float) FAdd 139 138
+ Store 73(f) 140
+ Branch 133
+ 132: Label
+ 142: 6(float) Load 75(x)
+ 143: 6(float) Load 75(x)
+ 144: 6(float) FMul 142 143
+ 145: 6(float) Load 73(f)
+ 146: 6(float) FAdd 145 144
+ Store 73(f) 146
+ Branch 133
+ 133: Label
+ Branch 123
+ 123: Label
+ Store 155(i) 156
+ Branch 157
+ 157: Label
+ LoopMerge 159 160 None
+ Branch 161
+ 161: Label
+ 162: 9(int) Load 155(i)
+ 165: 164(bool) SLessThan 162 163
+ BranchConditional 165 158 159
+ 158: Label
+ 166: 9(int) Load 62(c)
+ SelectionMerge 170 None
+ Switch 166 169
+ case 1: 167
+ case 2: 168
+ 169: Label
+ 202: 6(float) Load 75(x)
+ 203: 6(float) ExtInst 1(GLSL.std.450) 15(Tan) 202
+ 204: 6(float) Load 73(f)
+ 205: 6(float) FAdd 204 203
+ Store 73(f) 205
+ Branch 170
+ 167: Label
+ 171: 6(float) Load 75(x)
+ 172: 6(float) ExtInst 1(GLSL.std.450) 13(Sin) 171
+ 173: 6(float) Load 73(f)
+ 174: 6(float) FAdd 173 172
+ Store 73(f) 174
+ Store 175(j) 176
+ Branch 177
+ 177: Label
+ LoopMerge 179 180 None
+ Branch 181
+ 181: Label
+ 182: 9(int) Load 175(j)
+ 184: 164(bool) SLessThan 182 183
+ BranchConditional 184 178 179
+ 178: Label
+ 185: 6(float) Load 73(f)
+ 186: 6(float) FAdd 185 48
+ Store 73(f) 186
+ 187: 6(float) Load 73(f)
+ 189: 164(bool) FOrdLessThan 187 188
+ SelectionMerge 191 None
+ BranchConditional 189 190 191
+ 190: Label
+ Branch 179
+ 191: Label
+ Branch 180
+ 180: Label
+ 193: 9(int) Load 175(j)
+ 194: 9(int) IAdd 193 65
+ Store 175(j) 194
+ Branch 177
+ 179: Label
+ Branch 170
+ 168: Label
+ 196: 6(float) Load 75(x)
+ 197: 6(float) ExtInst 1(GLSL.std.450) 14(Cos) 196
+ 198: 6(float) Load 73(f)
+ 199: 6(float) FAdd 198 197
+ Store 73(f) 199
+ Branch 170
+ 170: Label
+ 207: 6(float) Load 73(f)
+ 209: 164(bool) FOrdLessThan 207 208
+ SelectionMerge 211 None
+ BranchConditional 209 210 211
+ 210: Label
+ Branch 159
+ 211: Label
+ Branch 160
+ 160: Label
+ 213: 9(int) Load 155(i)
+ 214: 9(int) IAdd 213 65
+ Store 155(i) 214
+ Branch 157
+ 159: Label
+ 215: 9(int) Load 62(c)
+ SelectionMerge 218 None
+ Switch 215 218
+ case 1: 216
+ case 2: 217
+ 216: Label
+ 219: 6(float) Load 75(x)
+ 220: 6(float) ExtInst 1(GLSL.std.450) 13(Sin) 219
+ 221: 6(float) Load 73(f)
+ 222: 6(float) FAdd 221 220
+ Store 73(f) 222
+ Branch 218
+ 217: Label
+ Branch 218
+ 218: Label
+ 228: 6(float) Load 73(f)
+ 229: 9(int) Load 60(local)
+ 230: 6(float) ConvertSToF 229
+ 231: 6(float) FAdd 228 230
+ Store 227(color) 231
+ 235: 7(fvec4) Load 233(v)
+ Store 234(param) 235
+ 237: 7(fvec4) Load 233(v)
+ Store 236(param) 237
+ 239: 9(int) Load 62(c)
+ Store 238(param) 239
+ 240: 7(fvec4) FunctionCall 15(foo1(vf4;vf4;i1;) 234(param) 236(param) 238(param)
+ 243: 6(float) CompositeExtract 240 1
+ 244: 6(float) Load 227(color)
+ 245: 6(float) FAdd 244 243
+ Store 227(color) 245
+ 247: 7(fvec4) Load 233(v)
+ Store 246(param) 247
+ 249: 7(fvec4) Load 233(v)
+ Store 248(param) 249
+ 251: 9(int) Load 62(c)
+ Store 250(param) 251
+ 252: 7(fvec4) FunctionCall 20(foo2(vf4;vf4;i1;) 246(param) 248(param) 250(param)
+ 254: 6(float) CompositeExtract 252 2
+ 255: 6(float) Load 227(color)
+ 256: 6(float) FAdd 255 254
+ Store 227(color) 256
+ 257: 9(int) Load 62(c)
+ SelectionMerge 260 None
+ Switch 257 259
+ case 0: 258
+ 259: Label
+ Branch 260
+ 258: Label
+ Branch 260
+ 260: Label
+ 264: 9(int) Load 62(c)
+ SelectionMerge 266 None
+ Switch 264 265
+ 265: Label
+ Branch 266
+ 266: Label
+ Return
+ FunctionEnd
+15(foo1(vf4;vf4;i1;): 7(fvec4) Function None 11
+ 12(v1): 8(ptr) FunctionParameter
+ 13(v2): 8(ptr) FunctionParameter
+ 14(i1): 10(ptr) FunctionParameter
+ 16: Label
+ 22: 9(int) Load 14(i1)
+ SelectionMerge 26 None
+ Switch 22 26
+ case 0: 23
+ case 2: 24
+ case 1: 24
+ case 3: 25
+ 23: Label
+ 27: 7(fvec4) Load 12(v1)
+ ReturnValue 27
+ 24: Label
+ 29: 7(fvec4) Load 13(v2)
+ ReturnValue 29
+ 25: Label
+ 31: 7(fvec4) Load 12(v1)
+ 32: 7(fvec4) Load 13(v2)
+ 33: 7(fvec4) FMul 31 32
+ ReturnValue 33
+ 26: Label
+ ReturnValue 37
+ FunctionEnd
+20(foo2(vf4;vf4;i1;): 7(fvec4) Function None 11
+ 17(v1): 8(ptr) FunctionParameter
+ 18(v2): 8(ptr) FunctionParameter
+ 19(i1): 10(ptr) FunctionParameter
+ 21: Label
+ 40: 9(int) Load 19(i1)
+ SelectionMerge 45 None
+ Switch 40 45
+ case 0: 41
+ case 2: 42
+ case 1: 43
+ case 3: 44
+ 41: Label
+ 46: 7(fvec4) Load 17(v1)
+ ReturnValue 46
+ 42: Label
+ ReturnValue 49
+ 43: Label
+ 51: 7(fvec4) Load 18(v2)
+ ReturnValue 51
+ 44: Label
+ 53: 7(fvec4) Load 17(v1)
+ 54: 7(fvec4) Load 18(v2)
+ 55: 7(fvec4) FMul 53 54
+ ReturnValue 55
+ 45: Label
+ ReturnValue 37
+ FunctionEnd
diff --git a/chromium/third_party/glslang/src/Test/baseResults/spv.swizzle.frag.out b/chromium/third_party/glslang/src/Test/baseResults/spv.swizzle.frag.out
new file mode 100755
index 00000000000..471fed1128c
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/spv.swizzle.frag.out
@@ -0,0 +1,170 @@
+spv.swizzle.frag
+
+Linked fragment stage:
+
+
+// Module Version 10000
+// Generated by (magic number): 80001
+// Id's are bound by 108
+
+ Capability Shader
+ 1: ExtInstImport "GLSL.std.450"
+ MemoryModel Logical GLSL450
+ EntryPoint Fragment 4 "main" 14 30 69 107
+ ExecutionMode 4 OriginUpperLeft
+ Source GLSL 140
+ Name 4 "main"
+ Name 8 "blendscale"
+ Name 12 "w"
+ Name 14 "u"
+ Name 16 "w_dep"
+ Name 18 "w_reorder"
+ Name 20 "w2"
+ Name 22 "w_flow"
+ Name 30 "t"
+ Name 49 "w_undef"
+ Name 56 "p"
+ Name 69 "gl_FragColor"
+ Name 81 "c"
+ Name 83 "rep"
+ Name 107 "blend"
+ 2: TypeVoid
+ 3: TypeFunction 2
+ 6: TypeFloat 32
+ 7: TypePointer Function 6(float)
+ 9: 6(float) Constant 1071971828
+ 10: TypeVector 6(float) 4
+ 11: TypePointer Function 10(fvec4)
+ 13: TypePointer Input 10(fvec4)
+ 14(u): 13(ptr) Variable Input
+ 25: TypeInt 32 0
+ 26: 25(int) Constant 2
+ 28: TypeVector 6(float) 2
+ 29: TypePointer Input 28(fvec2)
+ 30(t): 29(ptr) Variable Input
+ 35: 25(int) Constant 0
+ 40: 25(int) Constant 1
+ 54: TypeBool
+ 55: TypePointer Private 54(bool)
+ 56(p): 55(ptr) Variable Private
+ 60: TypePointer Input 6(float)
+ 68: TypePointer Output 10(fvec4)
+69(gl_FragColor): 68(ptr) Variable Output
+ 80: TypePointer Function 28(fvec2)
+ 84: 6(float) Constant 0
+ 85: 6(float) Constant 1065353216
+ 86: 10(fvec4) ConstantComposite 84 84 84 85
+ 92: 6(float) Constant 3212836864
+ 102: 6(float) Constant 1079613850
+ 107(blend): 60(ptr) Variable Input
+ 4(main): 2 Function None 3
+ 5: Label
+ 8(blendscale): 7(ptr) Variable Function
+ 12(w): 11(ptr) Variable Function
+ 16(w_dep): 11(ptr) Variable Function
+ 18(w_reorder): 11(ptr) Variable Function
+ 20(w2): 11(ptr) Variable Function
+ 22(w_flow): 11(ptr) Variable Function
+ 49(w_undef): 11(ptr) Variable Function
+ 81(c): 80(ptr) Variable Function
+ 83(rep): 11(ptr) Variable Function
+ Store 8(blendscale) 9
+ 15: 10(fvec4) Load 14(u)
+ Store 12(w) 15
+ 17: 10(fvec4) Load 14(u)
+ Store 16(w_dep) 17
+ 19: 10(fvec4) Load 14(u)
+ Store 18(w_reorder) 19
+ 21: 10(fvec4) Load 14(u)
+ Store 20(w2) 21
+ 23: 10(fvec4) Load 14(u)
+ Store 22(w_flow) 23
+ 24: 6(float) Load 8(blendscale)
+ 27: 7(ptr) AccessChain 18(w_reorder) 26
+ Store 27 24
+ 31: 28(fvec2) Load 30(t)
+ 32: 10(fvec4) Load 12(w)
+ 33: 10(fvec4) VectorShuffle 32 31 0 5 2 4
+ Store 12(w) 33
+ 34: 6(float) Load 8(blendscale)
+ 36: 7(ptr) AccessChain 18(w_reorder) 35
+ Store 36 34
+ 37: 10(fvec4) Load 14(u)
+ 38: 10(fvec4) VectorShuffle 37 37 2 3 0 1
+ Store 20(w2) 38
+ 39: 6(float) Load 8(blendscale)
+ 41: 7(ptr) AccessChain 18(w_reorder) 40
+ Store 41 39
+ 42: 10(fvec4) Load 20(w2)
+ 43: 28(fvec2) VectorShuffle 42 42 0 2
+ 44: 10(fvec4) Load 16(w_dep)
+ 45: 10(fvec4) VectorShuffle 44 43 4 5 2 3
+ Store 16(w_dep) 45
+ 46: 28(fvec2) Load 30(t)
+ 47: 10(fvec4) Load 16(w_dep)
+ 48: 10(fvec4) VectorShuffle 47 46 0 1 4 5
+ Store 16(w_dep) 48
+ 50: 10(fvec4) Load 14(u)
+ 51: 28(fvec2) VectorShuffle 50 50 2 3
+ 52: 10(fvec4) Load 49(w_undef)
+ 53: 10(fvec4) VectorShuffle 52 51 4 5 2 3
+ Store 49(w_undef) 53
+ 57: 54(bool) Load 56(p)
+ SelectionMerge 59 None
+ BranchConditional 57 58 64
+ 58: Label
+ 61: 60(ptr) AccessChain 30(t) 35
+ 62: 6(float) Load 61
+ 63: 7(ptr) AccessChain 22(w_flow) 35
+ Store 63 62
+ Branch 59
+ 64: Label
+ 65: 60(ptr) AccessChain 30(t) 40
+ 66: 6(float) Load 65
+ 67: 7(ptr) AccessChain 22(w_flow) 35
+ Store 67 66
+ Branch 59
+ 59: Label
+ 70: 10(fvec4) Load 18(w_reorder)
+ 71: 10(fvec4) Load 49(w_undef)
+ 72: 10(fvec4) Load 12(w)
+ 73: 10(fvec4) Load 20(w2)
+ 74: 10(fvec4) FMul 72 73
+ 75: 10(fvec4) Load 16(w_dep)
+ 76: 10(fvec4) FMul 74 75
+ 77: 10(fvec4) Load 22(w_flow)
+ 78: 10(fvec4) FMul 76 77
+ 79: 10(fvec4) ExtInst 1(GLSL.std.450) 46(FMix) 70 71 78
+ Store 69(gl_FragColor) 79
+ 82: 28(fvec2) Load 30(t)
+ Store 81(c) 82
+ Store 83(rep) 86
+ 87: 7(ptr) AccessChain 81(c) 35
+ 88: 6(float) Load 87
+ 89: 54(bool) FOrdLessThan 88 84
+ SelectionMerge 91 None
+ BranchConditional 89 90 91
+ 90: Label
+ 93: 7(ptr) AccessChain 81(c) 35
+ 94: 6(float) Load 93
+ 95: 6(float) FMul 94 92
+ 96: 7(ptr) AccessChain 81(c) 35
+ Store 96 95
+ Branch 91
+ 91: Label
+ 97: 7(ptr) AccessChain 81(c) 35
+ 98: 6(float) Load 97
+ 99: 54(bool) FOrdLessThanEqual 98 85
+ SelectionMerge 101 None
+ BranchConditional 99 100 101
+ 100: Label
+ 103: 7(ptr) AccessChain 83(rep) 35
+ Store 103 102
+ Branch 101
+ 101: Label
+ 104: 10(fvec4) Load 83(rep)
+ 105: 10(fvec4) Load 69(gl_FragColor)
+ 106: 10(fvec4) FAdd 105 104
+ Store 69(gl_FragColor) 106
+ Return
+ FunctionEnd
diff --git a/chromium/third_party/glslang/src/Test/baseResults/spv.test.frag.out b/chromium/third_party/glslang/src/Test/baseResults/spv.test.frag.out
new file mode 100644
index 00000000000..8f1c5260bba
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/spv.test.frag.out
@@ -0,0 +1,90 @@
+spv.test.frag
+Warning, version 400 is not yet complete; most version-specific features are present, but some are missing.
+
+
+Linked fragment stage:
+
+
+// Module Version 10000
+// Generated by (magic number): 80001
+// Id's are bound by 55
+
+ Capability Shader
+ 1: ExtInstImport "GLSL.std.450"
+ MemoryModel Logical GLSL450
+ EntryPoint Fragment 4 "main" 20 22 37 43 46 49
+ ExecutionMode 4 OriginUpperLeft
+ Source GLSL 400
+ Name 4 "main"
+ Name 8 "blendscale"
+ Name 12 "v"
+ Name 16 "texSampler2D"
+ Name 20 "t"
+ Name 22 "scale"
+ Name 29 "w"
+ Name 33 "texSampler3D"
+ Name 37 "coords"
+ Name 43 "gl_FragColor"
+ Name 46 "u"
+ Name 49 "blend"
+ Decorate 16(texSampler2D) DescriptorSet 0
+ Decorate 33(texSampler3D) DescriptorSet 0
+ 2: TypeVoid
+ 3: TypeFunction 2
+ 6: TypeFloat 32
+ 7: TypePointer Function 6(float)
+ 9: 6(float) Constant 1071971828
+ 10: TypeVector 6(float) 4
+ 11: TypePointer Function 10(fvec4)
+ 13: TypeImage 6(float) 2D sampled format:Unknown
+ 14: TypeSampledImage 13
+ 15: TypePointer UniformConstant 14
+16(texSampler2D): 15(ptr) Variable UniformConstant
+ 18: TypeVector 6(float) 2
+ 19: TypePointer Input 18(fvec2)
+ 20(t): 19(ptr) Variable Input
+ 22(scale): 19(ptr) Variable Input
+ 30: TypeImage 6(float) 3D sampled format:Unknown
+ 31: TypeSampledImage 30
+ 32: TypePointer UniformConstant 31
+33(texSampler3D): 32(ptr) Variable UniformConstant
+ 35: TypeVector 6(float) 3
+ 36: TypePointer Input 35(fvec3)
+ 37(coords): 36(ptr) Variable Input
+ 42: TypePointer Output 10(fvec4)
+43(gl_FragColor): 42(ptr) Variable Output
+ 45: TypePointer Input 10(fvec4)
+ 46(u): 45(ptr) Variable Input
+ 48: TypePointer Input 6(float)
+ 49(blend): 48(ptr) Variable Input
+ 4(main): 2 Function None 3
+ 5: Label
+ 8(blendscale): 7(ptr) Variable Function
+ 12(v): 11(ptr) Variable Function
+ 29(w): 11(ptr) Variable Function
+ Store 8(blendscale) 9
+ 17: 14 Load 16(texSampler2D)
+ 21: 18(fvec2) Load 20(t)
+ 23: 18(fvec2) Load 22(scale)
+ 24: 18(fvec2) FAdd 21 23
+ 25: 18(fvec2) Load 22(scale)
+ 26: 18(fvec2) FDiv 24 25
+ 27: 10(fvec4) ImageSampleImplicitLod 17 26
+ 28: 10(fvec4) VectorShuffle 27 27 3 2 1 0
+ Store 12(v) 28
+ 34: 31 Load 33(texSampler3D)
+ 38: 35(fvec3) Load 37(coords)
+ 39: 10(fvec4) ImageSampleImplicitLod 34 38
+ 40: 10(fvec4) Load 12(v)
+ 41: 10(fvec4) FAdd 39 40
+ Store 29(w) 41
+ 44: 10(fvec4) Load 29(w)
+ 47: 10(fvec4) Load 46(u)
+ 50: 6(float) Load 49(blend)
+ 51: 6(float) Load 8(blendscale)
+ 52: 6(float) FMul 50 51
+ 53: 10(fvec4) CompositeConstruct 52 52 52 52
+ 54: 10(fvec4) ExtInst 1(GLSL.std.450) 46(FMix) 44 47 53
+ Store 43(gl_FragColor) 54
+ Return
+ FunctionEnd
diff --git a/chromium/third_party/glslang/src/Test/baseResults/spv.test.vert.out b/chromium/third_party/glslang/src/Test/baseResults/spv.test.vert.out
new file mode 100644
index 00000000000..697e468d4fd
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/spv.test.vert.out
@@ -0,0 +1,49 @@
+spv.test.vert
+WARNING: 0:5: attribute deprecated in version 130; may be removed in future release
+
+
+Linked vertex stage:
+
+
+// Module Version 10000
+// Generated by (magic number): 80001
+// Id's are bound by 24
+
+ Capability Shader
+ 1: ExtInstImport "GLSL.std.450"
+ MemoryModel Logical GLSL450
+ EntryPoint Vertex 4 "main" 9 11 15 18 21
+ Source GLSL 140
+ Name 4 "main"
+ Name 9 "uv"
+ Name 11 "uv_in"
+ Name 15 "gl_Position"
+ Name 18 "transform"
+ Name 21 "position"
+ Decorate 15(gl_Position) BuiltIn Position
+ 2: TypeVoid
+ 3: TypeFunction 2
+ 6: TypeFloat 32
+ 7: TypeVector 6(float) 2
+ 8: TypePointer Output 7(fvec2)
+ 9(uv): 8(ptr) Variable Output
+ 10: TypePointer Input 7(fvec2)
+ 11(uv_in): 10(ptr) Variable Input
+ 13: TypeVector 6(float) 4
+ 14: TypePointer Output 13(fvec4)
+ 15(gl_Position): 14(ptr) Variable Output
+ 16: TypeMatrix 13(fvec4) 4
+ 17: TypePointer Input 16
+ 18(transform): 17(ptr) Variable Input
+ 20: TypePointer Input 13(fvec4)
+ 21(position): 20(ptr) Variable Input
+ 4(main): 2 Function None 3
+ 5: Label
+ 12: 7(fvec2) Load 11(uv_in)
+ Store 9(uv) 12
+ 19: 16 Load 18(transform)
+ 22: 13(fvec4) Load 21(position)
+ 23: 13(fvec4) MatrixTimesVector 19 22
+ Store 15(gl_Position) 23
+ Return
+ FunctionEnd
diff --git a/chromium/third_party/glslang/src/Test/baseResults/spv.texture.frag.out b/chromium/third_party/glslang/src/Test/baseResults/spv.texture.frag.out
new file mode 100755
index 00000000000..b5794751f5a
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/spv.texture.frag.out
@@ -0,0 +1,385 @@
+spv.texture.frag
+WARNING: 0:10: varying deprecated in version 130; may be removed in future release
+WARNING: 0:11: varying deprecated in version 130; may be removed in future release
+WARNING: 0:12: varying deprecated in version 130; may be removed in future release
+
+
+Linked fragment stage:
+
+
+// Module Version 10000
+// Generated by (magic number): 80001
+// Id's are bound by 291
+
+ Capability Shader
+ Capability Sampled1D
+ 1: ExtInstImport "GLSL.std.450"
+ MemoryModel Logical GLSL450
+ EntryPoint Fragment 4 "main" 47 277 280 283 289 290
+ ExecutionMode 4 OriginUpperLeft
+ Source GLSL 140
+ Name 4 "main"
+ Name 8 "blendscale"
+ Name 10 "bias"
+ Name 12 "lod"
+ Name 14 "proj"
+ Name 15 "coords1D"
+ Name 18 "coords3D"
+ Name 24 "coords4D"
+ Name 26 "color"
+ Name 32 "texSampler1D"
+ Name 47 "coords2D"
+ Name 72 "texSampler2D"
+ Name 98 "texSampler3D"
+ Name 124 "texSamplerCube"
+ Name 139 "shadowSampler1D"
+ Name 158 "shadowSampler2D"
+ Name 207 "iCoords2D"
+ Name 212 "iLod"
+ Name 222 "gradX"
+ Name 225 "gradY"
+ Name 277 "gl_FragColor"
+ Name 280 "u"
+ Name 283 "blend"
+ Name 289 "scale"
+ Name 290 "t"
+ Decorate 32(texSampler1D) DescriptorSet 0
+ Decorate 72(texSampler2D) DescriptorSet 0
+ Decorate 98(texSampler3D) DescriptorSet 0
+ Decorate 124(texSamplerCube) DescriptorSet 0
+ Decorate 139(shadowSampler1D) DescriptorSet 0
+ Decorate 158(shadowSampler2D) DescriptorSet 0
+ 2: TypeVoid
+ 3: TypeFunction 2
+ 6: TypeFloat 32
+ 7: TypePointer Function 6(float)
+ 9: 6(float) Constant 1071971828
+ 11: 6(float) Constant 1073741824
+ 13: 6(float) Constant 1077936128
+ 16: TypeVector 6(float) 3
+ 17: TypePointer Function 16(fvec3)
+ 19: 6(float) Constant 1076753334
+ 20: 6(float) Constant 1079836148
+ 21: 16(fvec3) ConstantComposite 9 19 20
+ 22: TypeVector 6(float) 4
+ 23: TypePointer Function 22(fvec4)
+ 25: 22(fvec4) ConstantComposite 9 19 20 11
+ 27: 6(float) Constant 0
+ 28: 22(fvec4) ConstantComposite 27 27 27 27
+ 29: TypeImage 6(float) 1D sampled format:Unknown
+ 30: TypeSampledImage 29
+ 31: TypePointer UniformConstant 30
+32(texSampler1D): 31(ptr) Variable UniformConstant
+ 45: TypeVector 6(float) 2
+ 46: TypePointer Input 45(fvec2)
+ 47(coords2D): 46(ptr) Variable Input
+ 69: TypeImage 6(float) 2D sampled format:Unknown
+ 70: TypeSampledImage 69
+ 71: TypePointer UniformConstant 70
+72(texSampler2D): 71(ptr) Variable UniformConstant
+ 95: TypeImage 6(float) 3D sampled format:Unknown
+ 96: TypeSampledImage 95
+ 97: TypePointer UniformConstant 96
+98(texSampler3D): 97(ptr) Variable UniformConstant
+ 121: TypeImage 6(float) Cube sampled format:Unknown
+ 122: TypeSampledImage 121
+ 123: TypePointer UniformConstant 122
+124(texSamplerCube): 123(ptr) Variable UniformConstant
+ 136: TypeImage 6(float) 1D depth sampled format:Unknown
+ 137: TypeSampledImage 136
+ 138: TypePointer UniformConstant 137
+139(shadowSampler1D): 138(ptr) Variable UniformConstant
+ 155: TypeImage 6(float) 2D depth sampled format:Unknown
+ 156: TypeSampledImage 155
+ 157: TypePointer UniformConstant 156
+158(shadowSampler2D): 157(ptr) Variable UniformConstant
+ 204: TypeInt 32 1
+ 205: TypeVector 204(int) 2
+ 206: TypePointer Function 205(ivec2)
+ 208: 204(int) Constant 0
+ 209: 204(int) Constant 5
+ 210: 205(ivec2) ConstantComposite 208 209
+ 211: TypePointer Function 204(int)
+ 213: 204(int) Constant 1
+ 221: TypePointer Function 45(fvec2)
+ 250: 204(int) Constant 3
+ 251: 204(int) Constant 4294967289
+ 252: 205(ivec2) ConstantComposite 250 251
+ 276: TypePointer Output 22(fvec4)
+277(gl_FragColor): 276(ptr) Variable Output
+ 279: TypePointer Input 22(fvec4)
+ 280(u): 279(ptr) Variable Input
+ 282: TypePointer Input 6(float)
+ 283(blend): 282(ptr) Variable Input
+ 289(scale): 46(ptr) Variable Input
+ 290(t): 46(ptr) Variable Input
+ 4(main): 2 Function None 3
+ 5: Label
+ 8(blendscale): 7(ptr) Variable Function
+ 10(bias): 7(ptr) Variable Function
+ 12(lod): 7(ptr) Variable Function
+ 14(proj): 7(ptr) Variable Function
+ 15(coords1D): 7(ptr) Variable Function
+ 18(coords3D): 17(ptr) Variable Function
+ 24(coords4D): 23(ptr) Variable Function
+ 26(color): 23(ptr) Variable Function
+ 207(iCoords2D): 206(ptr) Variable Function
+ 212(iLod): 211(ptr) Variable Function
+ 222(gradX): 221(ptr) Variable Function
+ 225(gradY): 221(ptr) Variable Function
+ Store 8(blendscale) 9
+ Store 10(bias) 11
+ Store 12(lod) 13
+ Store 14(proj) 11
+ Store 15(coords1D) 9
+ Store 18(coords3D) 21
+ Store 24(coords4D) 25
+ Store 26(color) 28
+ 33: 30 Load 32(texSampler1D)
+ 34: 6(float) Load 15(coords1D)
+ 35: 22(fvec4) ImageSampleImplicitLod 33 34
+ 36: 22(fvec4) Load 26(color)
+ 37: 22(fvec4) FAdd 36 35
+ Store 26(color) 37
+ 38: 30 Load 32(texSampler1D)
+ 39: 6(float) Load 15(coords1D)
+ 40: 6(float) Load 10(bias)
+ 41: 22(fvec4) ImageSampleImplicitLod 38 39 Bias 40
+ 42: 22(fvec4) Load 26(color)
+ 43: 22(fvec4) FAdd 42 41
+ Store 26(color) 43
+ 44: 30 Load 32(texSampler1D)
+ 48: 45(fvec2) Load 47(coords2D)
+ 49: 22(fvec4) ImageSampleProjImplicitLod 44 48
+ 50: 22(fvec4) Load 26(color)
+ 51: 22(fvec4) FAdd 50 49
+ Store 26(color) 51
+ 52: 30 Load 32(texSampler1D)
+ 53: 22(fvec4) Load 24(coords4D)
+ 54: 22(fvec4) ImageSampleProjImplicitLod 52 53
+ 55: 22(fvec4) Load 26(color)
+ 56: 22(fvec4) FAdd 55 54
+ Store 26(color) 56
+ 57: 30 Load 32(texSampler1D)
+ 58: 45(fvec2) Load 47(coords2D)
+ 59: 6(float) Load 10(bias)
+ 60: 22(fvec4) ImageSampleProjImplicitLod 57 58 Bias 59
+ 61: 22(fvec4) Load 26(color)
+ 62: 22(fvec4) FAdd 61 60
+ Store 26(color) 62
+ 63: 30 Load 32(texSampler1D)
+ 64: 22(fvec4) Load 24(coords4D)
+ 65: 6(float) Load 10(bias)
+ 66: 22(fvec4) ImageSampleProjImplicitLod 63 64 Bias 65
+ 67: 22(fvec4) Load 26(color)
+ 68: 22(fvec4) FAdd 67 66
+ Store 26(color) 68
+ 73: 70 Load 72(texSampler2D)
+ 74: 45(fvec2) Load 47(coords2D)
+ 75: 22(fvec4) ImageSampleImplicitLod 73 74
+ 76: 22(fvec4) Load 26(color)
+ 77: 22(fvec4) FAdd 76 75
+ Store 26(color) 77
+ 78: 70 Load 72(texSampler2D)
+ 79: 45(fvec2) Load 47(coords2D)
+ 80: 6(float) Load 10(bias)
+ 81: 22(fvec4) ImageSampleImplicitLod 78 79 Bias 80
+ 82: 22(fvec4) Load 26(color)
+ 83: 22(fvec4) FAdd 82 81
+ Store 26(color) 83
+ 84: 70 Load 72(texSampler2D)
+ 85: 16(fvec3) Load 18(coords3D)
+ 86: 22(fvec4) ImageSampleProjImplicitLod 84 85
+ 87: 22(fvec4) Load 26(color)
+ 88: 22(fvec4) FAdd 87 86
+ Store 26(color) 88
+ 89: 70 Load 72(texSampler2D)
+ 90: 22(fvec4) Load 24(coords4D)
+ 91: 6(float) Load 10(bias)
+ 92: 22(fvec4) ImageSampleProjImplicitLod 89 90 Bias 91
+ 93: 22(fvec4) Load 26(color)
+ 94: 22(fvec4) FAdd 93 92
+ Store 26(color) 94
+ 99: 96 Load 98(texSampler3D)
+ 100: 16(fvec3) Load 18(coords3D)
+ 101: 22(fvec4) ImageSampleImplicitLod 99 100
+ 102: 22(fvec4) Load 26(color)
+ 103: 22(fvec4) FAdd 102 101
+ Store 26(color) 103
+ 104: 96 Load 98(texSampler3D)
+ 105: 16(fvec3) Load 18(coords3D)
+ 106: 6(float) Load 10(bias)
+ 107: 22(fvec4) ImageSampleImplicitLod 104 105 Bias 106
+ 108: 22(fvec4) Load 26(color)
+ 109: 22(fvec4) FAdd 108 107
+ Store 26(color) 109
+ 110: 96 Load 98(texSampler3D)
+ 111: 22(fvec4) Load 24(coords4D)
+ 112: 22(fvec4) ImageSampleProjImplicitLod 110 111
+ 113: 22(fvec4) Load 26(color)
+ 114: 22(fvec4) FAdd 113 112
+ Store 26(color) 114
+ 115: 96 Load 98(texSampler3D)
+ 116: 22(fvec4) Load 24(coords4D)
+ 117: 6(float) Load 10(bias)
+ 118: 22(fvec4) ImageSampleProjImplicitLod 115 116 Bias 117
+ 119: 22(fvec4) Load 26(color)
+ 120: 22(fvec4) FAdd 119 118
+ Store 26(color) 120
+ 125: 122 Load 124(texSamplerCube)
+ 126: 16(fvec3) Load 18(coords3D)
+ 127: 22(fvec4) ImageSampleImplicitLod 125 126
+ 128: 22(fvec4) Load 26(color)
+ 129: 22(fvec4) FAdd 128 127
+ Store 26(color) 129
+ 130: 122 Load 124(texSamplerCube)
+ 131: 16(fvec3) Load 18(coords3D)
+ 132: 6(float) Load 10(bias)
+ 133: 22(fvec4) ImageSampleImplicitLod 130 131 Bias 132
+ 134: 22(fvec4) Load 26(color)
+ 135: 22(fvec4) FAdd 134 133
+ Store 26(color) 135
+ 140: 137 Load 139(shadowSampler1D)
+ 141: 16(fvec3) Load 18(coords3D)
+ 142: 6(float) CompositeExtract 141 2
+ 143: 6(float) ImageSampleDrefImplicitLod 140 141 142
+ 144: 22(fvec4) Load 26(color)
+ 145: 22(fvec4) CompositeConstruct 143 143 143 143
+ 146: 22(fvec4) FAdd 144 145
+ Store 26(color) 146
+ 147: 137 Load 139(shadowSampler1D)
+ 148: 16(fvec3) Load 18(coords3D)
+ 149: 6(float) Load 10(bias)
+ 150: 6(float) CompositeExtract 148 2
+ 151: 6(float) ImageSampleDrefImplicitLod 147 148 150 Bias 149
+ 152: 22(fvec4) Load 26(color)
+ 153: 22(fvec4) CompositeConstruct 151 151 151 151
+ 154: 22(fvec4) FAdd 152 153
+ Store 26(color) 154
+ 159: 156 Load 158(shadowSampler2D)
+ 160: 16(fvec3) Load 18(coords3D)
+ 161: 6(float) CompositeExtract 160 2
+ 162: 6(float) ImageSampleDrefImplicitLod 159 160 161
+ 163: 22(fvec4) Load 26(color)
+ 164: 22(fvec4) CompositeConstruct 162 162 162 162
+ 165: 22(fvec4) FAdd 163 164
+ Store 26(color) 165
+ 166: 156 Load 158(shadowSampler2D)
+ 167: 16(fvec3) Load 18(coords3D)
+ 168: 6(float) Load 10(bias)
+ 169: 6(float) CompositeExtract 167 2
+ 170: 6(float) ImageSampleDrefImplicitLod 166 167 169 Bias 168
+ 171: 22(fvec4) Load 26(color)
+ 172: 22(fvec4) CompositeConstruct 170 170 170 170
+ 173: 22(fvec4) FAdd 171 172
+ Store 26(color) 173
+ 174: 137 Load 139(shadowSampler1D)
+ 175: 22(fvec4) Load 24(coords4D)
+ 176: 6(float) CompositeExtract 175 2
+ 177: 6(float) ImageSampleProjDrefImplicitLod 174 175 176
+ 178: 22(fvec4) Load 26(color)
+ 179: 22(fvec4) CompositeConstruct 177 177 177 177
+ 180: 22(fvec4) FAdd 178 179
+ Store 26(color) 180
+ 181: 137 Load 139(shadowSampler1D)
+ 182: 22(fvec4) Load 24(coords4D)
+ 183: 6(float) Load 10(bias)
+ 184: 6(float) CompositeExtract 182 2
+ 185: 6(float) ImageSampleProjDrefImplicitLod 181 182 184 Bias 183
+ 186: 22(fvec4) Load 26(color)
+ 187: 22(fvec4) CompositeConstruct 185 185 185 185
+ 188: 22(fvec4) FAdd 186 187
+ Store 26(color) 188
+ 189: 156 Load 158(shadowSampler2D)
+ 190: 22(fvec4) Load 24(coords4D)
+ 191: 6(float) CompositeExtract 190 2
+ 192: 6(float) ImageSampleProjDrefImplicitLod 189 190 191
+ 193: 22(fvec4) Load 26(color)
+ 194: 22(fvec4) CompositeConstruct 192 192 192 192
+ 195: 22(fvec4) FAdd 193 194
+ Store 26(color) 195
+ 196: 156 Load 158(shadowSampler2D)
+ 197: 22(fvec4) Load 24(coords4D)
+ 198: 6(float) Load 10(bias)
+ 199: 6(float) CompositeExtract 197 2
+ 200: 6(float) ImageSampleProjDrefImplicitLod 196 197 199 Bias 198
+ 201: 22(fvec4) Load 26(color)
+ 202: 22(fvec4) CompositeConstruct 200 200 200 200
+ 203: 22(fvec4) FAdd 201 202
+ Store 26(color) 203
+ Store 207(iCoords2D) 210
+ Store 212(iLod) 213
+ 214: 70 Load 72(texSampler2D)
+ 215: 205(ivec2) Load 207(iCoords2D)
+ 216: 204(int) Load 212(iLod)
+ 217: 69 Image 214
+ 218: 22(fvec4) ImageFetch 217 215 Lod 216
+ 219: 22(fvec4) Load 26(color)
+ 220: 22(fvec4) FAdd 219 218
+ Store 26(color) 220
+ 223: 45(fvec2) Load 47(coords2D)
+ 224: 45(fvec2) DPdx 223
+ Store 222(gradX) 224
+ 226: 45(fvec2) Load 47(coords2D)
+ 227: 45(fvec2) DPdy 226
+ Store 225(gradY) 227
+ 228: 70 Load 72(texSampler2D)
+ 229: 45(fvec2) Load 47(coords2D)
+ 230: 45(fvec2) Load 222(gradX)
+ 231: 45(fvec2) Load 225(gradY)
+ 232: 22(fvec4) ImageSampleExplicitLod 228 229 Grad 230 231
+ 233: 22(fvec4) Load 26(color)
+ 234: 22(fvec4) FAdd 233 232
+ Store 26(color) 234
+ 235: 70 Load 72(texSampler2D)
+ 236: 45(fvec2) Load 47(coords2D)
+ 237: 6(float) Load 14(proj)
+ 238: 6(float) CompositeExtract 236 0
+ 239: 6(float) CompositeExtract 236 1
+ 240: 16(fvec3) CompositeConstruct 238 239 237
+ 241: 45(fvec2) Load 222(gradX)
+ 242: 45(fvec2) Load 225(gradY)
+ 243: 22(fvec4) ImageSampleProjExplicitLod 235 240 Grad 241 242
+ 244: 22(fvec4) Load 26(color)
+ 245: 22(fvec4) FAdd 244 243
+ Store 26(color) 245
+ 246: 70 Load 72(texSampler2D)
+ 247: 45(fvec2) Load 47(coords2D)
+ 248: 45(fvec2) Load 222(gradX)
+ 249: 45(fvec2) Load 225(gradY)
+ 253: 22(fvec4) ImageSampleExplicitLod 246 247 Grad ConstOffset 248 249 252
+ 254: 22(fvec4) Load 26(color)
+ 255: 22(fvec4) FAdd 254 253
+ Store 26(color) 255
+ 256: 70 Load 72(texSampler2D)
+ 257: 16(fvec3) Load 18(coords3D)
+ 258: 45(fvec2) Load 222(gradX)
+ 259: 45(fvec2) Load 225(gradY)
+ 260: 22(fvec4) ImageSampleProjExplicitLod 256 257 Grad ConstOffset 258 259 252
+ 261: 22(fvec4) Load 26(color)
+ 262: 22(fvec4) FAdd 261 260
+ Store 26(color) 262
+ 263: 156 Load 158(shadowSampler2D)
+ 264: 45(fvec2) Load 47(coords2D)
+ 265: 6(float) Load 12(lod)
+ 266: 6(float) CompositeExtract 264 0
+ 267: 6(float) CompositeExtract 264 1
+ 268: 16(fvec3) CompositeConstruct 266 267 265
+ 269: 45(fvec2) Load 222(gradX)
+ 270: 45(fvec2) Load 225(gradY)
+ 271: 6(float) CompositeExtract 268 2
+ 272: 6(float) ImageSampleDrefExplicitLod 263 268 271 Grad 269 270
+ 273: 22(fvec4) Load 26(color)
+ 274: 22(fvec4) CompositeConstruct 272 272 272 272
+ 275: 22(fvec4) FAdd 273 274
+ Store 26(color) 275
+ 278: 22(fvec4) Load 26(color)
+ 281: 22(fvec4) Load 280(u)
+ 284: 6(float) Load 283(blend)
+ 285: 6(float) Load 8(blendscale)
+ 286: 6(float) FMul 284 285
+ 287: 22(fvec4) CompositeConstruct 286 286 286 286
+ 288: 22(fvec4) ExtInst 1(GLSL.std.450) 46(FMix) 278 281 287
+ Store 277(gl_FragColor) 288
+ Return
+ FunctionEnd
diff --git a/chromium/third_party/glslang/src/Test/baseResults/spv.texture.vert.out b/chromium/third_party/glslang/src/Test/baseResults/spv.texture.vert.out
new file mode 100755
index 00000000000..179e567d4da
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/spv.texture.vert.out
@@ -0,0 +1,197 @@
+spv.texture.vert
+
+Linked vertex stage:
+
+
+// Module Version 10000
+// Generated by (magic number): 80001
+// Id's are bound by 142
+
+ Capability Shader
+ Capability Sampled1D
+ 1: ExtInstImport "GLSL.std.450"
+ MemoryModel Logical GLSL450
+ EntryPoint Vertex 4 "main" 39 140
+ Source GLSL 140
+ Name 4 "main"
+ Name 8 "lod"
+ Name 10 "coords1D"
+ Name 14 "coords3D"
+ Name 20 "coords4D"
+ Name 23 "color"
+ Name 29 "texSampler1D"
+ Name 39 "coords2D"
+ Name 54 "texSampler2D"
+ Name 76 "texSampler3D"
+ Name 92 "texSamplerCube"
+ Name 102 "shadowSampler1D"
+ Name 114 "shadowSampler2D"
+ Name 140 "gl_Position"
+ Decorate 29(texSampler1D) DescriptorSet 0
+ Decorate 54(texSampler2D) DescriptorSet 0
+ Decorate 76(texSampler3D) DescriptorSet 0
+ Decorate 92(texSamplerCube) DescriptorSet 0
+ Decorate 102(shadowSampler1D) DescriptorSet 0
+ Decorate 114(shadowSampler2D) DescriptorSet 0
+ Decorate 140(gl_Position) BuiltIn Position
+ 2: TypeVoid
+ 3: TypeFunction 2
+ 6: TypeFloat 32
+ 7: TypePointer Function 6(float)
+ 9: 6(float) Constant 1077936128
+ 11: 6(float) Constant 1071971828
+ 12: TypeVector 6(float) 3
+ 13: TypePointer Function 12(fvec3)
+ 15: 6(float) Constant 1076753334
+ 16: 6(float) Constant 1079836148
+ 17: 12(fvec3) ConstantComposite 11 15 16
+ 18: TypeVector 6(float) 4
+ 19: TypePointer Function 18(fvec4)
+ 21: 6(float) Constant 1073741824
+ 22: 18(fvec4) ConstantComposite 11 15 16 21
+ 24: 6(float) Constant 0
+ 25: 18(fvec4) ConstantComposite 24 24 24 24
+ 26: TypeImage 6(float) 1D sampled format:Unknown
+ 27: TypeSampledImage 26
+ 28: TypePointer UniformConstant 27
+29(texSampler1D): 28(ptr) Variable UniformConstant
+ 37: TypeVector 6(float) 2
+ 38: TypePointer Input 37(fvec2)
+ 39(coords2D): 38(ptr) Variable Input
+ 51: TypeImage 6(float) 2D sampled format:Unknown
+ 52: TypeSampledImage 51
+ 53: TypePointer UniformConstant 52
+54(texSampler2D): 53(ptr) Variable UniformConstant
+ 73: TypeImage 6(float) 3D sampled format:Unknown
+ 74: TypeSampledImage 73
+ 75: TypePointer UniformConstant 74
+76(texSampler3D): 75(ptr) Variable UniformConstant
+ 89: TypeImage 6(float) Cube sampled format:Unknown
+ 90: TypeSampledImage 89
+ 91: TypePointer UniformConstant 90
+92(texSamplerCube): 91(ptr) Variable UniformConstant
+ 99: TypeImage 6(float) 1D depth sampled format:Unknown
+ 100: TypeSampledImage 99
+ 101: TypePointer UniformConstant 100
+102(shadowSampler1D): 101(ptr) Variable UniformConstant
+ 111: TypeImage 6(float) 2D depth sampled format:Unknown
+ 112: TypeSampledImage 111
+ 113: TypePointer UniformConstant 112
+114(shadowSampler2D): 113(ptr) Variable UniformConstant
+ 139: TypePointer Output 18(fvec4)
+140(gl_Position): 139(ptr) Variable Output
+ 4(main): 2 Function None 3
+ 5: Label
+ 8(lod): 7(ptr) Variable Function
+ 10(coords1D): 7(ptr) Variable Function
+ 14(coords3D): 13(ptr) Variable Function
+ 20(coords4D): 19(ptr) Variable Function
+ 23(color): 19(ptr) Variable Function
+ Store 8(lod) 9
+ Store 10(coords1D) 11
+ Store 14(coords3D) 17
+ Store 20(coords4D) 22
+ Store 23(color) 25
+ 30: 27 Load 29(texSampler1D)
+ 31: 6(float) Load 10(coords1D)
+ 32: 6(float) Load 8(lod)
+ 33: 18(fvec4) ImageSampleExplicitLod 30 31 Lod 32
+ 34: 18(fvec4) Load 23(color)
+ 35: 18(fvec4) FAdd 34 33
+ Store 23(color) 35
+ 36: 27 Load 29(texSampler1D)
+ 40: 37(fvec2) Load 39(coords2D)
+ 41: 6(float) Load 8(lod)
+ 42: 18(fvec4) ImageSampleProjExplicitLod 36 40 Lod 41
+ 43: 18(fvec4) Load 23(color)
+ 44: 18(fvec4) FAdd 43 42
+ Store 23(color) 44
+ 45: 27 Load 29(texSampler1D)
+ 46: 18(fvec4) Load 20(coords4D)
+ 47: 6(float) Load 8(lod)
+ 48: 18(fvec4) ImageSampleProjExplicitLod 45 46 Lod 47
+ 49: 18(fvec4) Load 23(color)
+ 50: 18(fvec4) FAdd 49 48
+ Store 23(color) 50
+ 55: 52 Load 54(texSampler2D)
+ 56: 37(fvec2) Load 39(coords2D)
+ 57: 6(float) Load 8(lod)
+ 58: 18(fvec4) ImageSampleExplicitLod 55 56 Lod 57
+ 59: 18(fvec4) Load 23(color)
+ 60: 18(fvec4) FAdd 59 58
+ Store 23(color) 60
+ 61: 52 Load 54(texSampler2D)
+ 62: 12(fvec3) Load 14(coords3D)
+ 63: 6(float) Load 8(lod)
+ 64: 18(fvec4) ImageSampleProjExplicitLod 61 62 Lod 63
+ 65: 18(fvec4) Load 23(color)
+ 66: 18(fvec4) FAdd 65 64
+ Store 23(color) 66
+ 67: 52 Load 54(texSampler2D)
+ 68: 18(fvec4) Load 20(coords4D)
+ 69: 6(float) Load 8(lod)
+ 70: 18(fvec4) ImageSampleProjExplicitLod 67 68 Lod 69
+ 71: 18(fvec4) Load 23(color)
+ 72: 18(fvec4) FAdd 71 70
+ Store 23(color) 72
+ 77: 74 Load 76(texSampler3D)
+ 78: 12(fvec3) Load 14(coords3D)
+ 79: 6(float) Load 8(lod)
+ 80: 18(fvec4) ImageSampleExplicitLod 77 78 Lod 79
+ 81: 18(fvec4) Load 23(color)
+ 82: 18(fvec4) FAdd 81 80
+ Store 23(color) 82
+ 83: 74 Load 76(texSampler3D)
+ 84: 18(fvec4) Load 20(coords4D)
+ 85: 6(float) Load 8(lod)
+ 86: 18(fvec4) ImageSampleProjExplicitLod 83 84 Lod 85
+ 87: 18(fvec4) Load 23(color)
+ 88: 18(fvec4) FAdd 87 86
+ Store 23(color) 88
+ 93: 90 Load 92(texSamplerCube)
+ 94: 12(fvec3) Load 14(coords3D)
+ 95: 6(float) Load 8(lod)
+ 96: 18(fvec4) ImageSampleExplicitLod 93 94 Lod 95
+ 97: 18(fvec4) Load 23(color)
+ 98: 18(fvec4) FAdd 97 96
+ Store 23(color) 98
+ 103: 100 Load 102(shadowSampler1D)
+ 104: 12(fvec3) Load 14(coords3D)
+ 105: 6(float) Load 8(lod)
+ 106: 6(float) CompositeExtract 104 2
+ 107: 6(float) ImageSampleDrefExplicitLod 103 104 106 Lod 105
+ 108: 18(fvec4) Load 23(color)
+ 109: 18(fvec4) CompositeConstruct 107 107 107 107
+ 110: 18(fvec4) FAdd 108 109
+ Store 23(color) 110
+ 115: 112 Load 114(shadowSampler2D)
+ 116: 12(fvec3) Load 14(coords3D)
+ 117: 6(float) Load 8(lod)
+ 118: 6(float) CompositeExtract 116 2
+ 119: 6(float) ImageSampleDrefExplicitLod 115 116 118 Lod 117
+ 120: 18(fvec4) Load 23(color)
+ 121: 18(fvec4) CompositeConstruct 119 119 119 119
+ 122: 18(fvec4) FAdd 120 121
+ Store 23(color) 122
+ 123: 100 Load 102(shadowSampler1D)
+ 124: 18(fvec4) Load 20(coords4D)
+ 125: 6(float) Load 8(lod)
+ 126: 6(float) CompositeExtract 124 2
+ 127: 6(float) ImageSampleProjDrefExplicitLod 123 124 126 Lod 125
+ 128: 18(fvec4) Load 23(color)
+ 129: 18(fvec4) CompositeConstruct 127 127 127 127
+ 130: 18(fvec4) FAdd 128 129
+ Store 23(color) 130
+ 131: 112 Load 114(shadowSampler2D)
+ 132: 18(fvec4) Load 20(coords4D)
+ 133: 6(float) Load 8(lod)
+ 134: 6(float) CompositeExtract 132 2
+ 135: 6(float) ImageSampleProjDrefExplicitLod 131 132 134 Lod 133
+ 136: 18(fvec4) Load 23(color)
+ 137: 18(fvec4) CompositeConstruct 135 135 135 135
+ 138: 18(fvec4) FAdd 136 137
+ Store 23(color) 138
+ 141: 18(fvec4) Load 23(color)
+ Store 140(gl_Position) 141
+ Return
+ FunctionEnd
diff --git a/chromium/third_party/glslang/src/Test/baseResults/spv.types.frag.out b/chromium/third_party/glslang/src/Test/baseResults/spv.types.frag.out
new file mode 100755
index 00000000000..4295370d385
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/spv.types.frag.out
@@ -0,0 +1,340 @@
+spv.types.frag
+
+Linked fragment stage:
+
+
+// Module Version 10000
+// Generated by (magic number): 80001
+// Id's are bound by 260
+
+ Capability Shader
+ 1: ExtInstImport "GLSL.std.450"
+ MemoryModel Logical GLSL450
+ EntryPoint Fragment 4 "main" 91 93 100 102 109 111 118 120 127 129 136 138 145 147 154 156 160
+ ExecutionMode 4 OriginUpperLeft
+ Source GLSL 140
+ Name 4 "main"
+ Name 8 "b"
+ Name 10 "u_b"
+ Name 12 "i_b"
+ Name 17 "b2"
+ Name 19 "u_b2"
+ Name 22 "i_b2"
+ Name 35 "b3"
+ Name 37 "u_b3"
+ Name 40 "i_b3"
+ Name 59 "b4"
+ Name 61 "u_b4"
+ Name 64 "i_b4"
+ Name 89 "i"
+ Name 91 "u_i"
+ Name 93 "i_i"
+ Name 98 "i2"
+ Name 100 "u_i2"
+ Name 102 "i_i2"
+ Name 107 "i3"
+ Name 109 "u_i3"
+ Name 111 "i_i3"
+ Name 116 "i4"
+ Name 118 "u_i4"
+ Name 120 "i_i4"
+ Name 125 "f"
+ Name 127 "u_f"
+ Name 129 "i_f"
+ Name 134 "f2"
+ Name 136 "u_f2"
+ Name 138 "i_f2"
+ Name 143 "f3"
+ Name 145 "u_f3"
+ Name 147 "i_f3"
+ Name 152 "f4"
+ Name 154 "u_f4"
+ Name 156 "i_f4"
+ Name 160 "gl_FragColor"
+ Decorate 91(u_i) Flat
+ Decorate 93(i_i) Flat
+ Decorate 100(u_i2) Flat
+ Decorate 102(i_i2) Flat
+ Decorate 109(u_i3) Flat
+ Decorate 111(i_i3) Flat
+ Decorate 118(u_i4) Flat
+ Decorate 120(i_i4) Flat
+ 2: TypeVoid
+ 3: TypeFunction 2
+ 6: TypeBool
+ 7: TypePointer Function 6(bool)
+ 9: TypePointer Private 6(bool)
+ 10(u_b): 9(ptr) Variable Private
+ 12(i_b): 9(ptr) Variable Private
+ 15: TypeVector 6(bool) 2
+ 16: TypePointer Function 15(bvec2)
+ 18: TypePointer Private 15(bvec2)
+ 19(u_b2): 18(ptr) Variable Private
+ 22(i_b2): 18(ptr) Variable Private
+ 33: TypeVector 6(bool) 3
+ 34: TypePointer Function 33(bvec3)
+ 36: TypePointer Private 33(bvec3)
+ 37(u_b3): 36(ptr) Variable Private
+ 40(i_b3): 36(ptr) Variable Private
+ 57: TypeVector 6(bool) 4
+ 58: TypePointer Function 57(bvec4)
+ 60: TypePointer Private 57(bvec4)
+ 61(u_b4): 60(ptr) Variable Private
+ 64(i_b4): 60(ptr) Variable Private
+ 87: TypeInt 32 1
+ 88: TypePointer Function 87(int)
+ 90: TypePointer Input 87(int)
+ 91(u_i): 90(ptr) Variable Input
+ 93(i_i): 90(ptr) Variable Input
+ 96: TypeVector 87(int) 2
+ 97: TypePointer Function 96(ivec2)
+ 99: TypePointer Input 96(ivec2)
+ 100(u_i2): 99(ptr) Variable Input
+ 102(i_i2): 99(ptr) Variable Input
+ 105: TypeVector 87(int) 3
+ 106: TypePointer Function 105(ivec3)
+ 108: TypePointer Input 105(ivec3)
+ 109(u_i3): 108(ptr) Variable Input
+ 111(i_i3): 108(ptr) Variable Input
+ 114: TypeVector 87(int) 4
+ 115: TypePointer Function 114(ivec4)
+ 117: TypePointer Input 114(ivec4)
+ 118(u_i4): 117(ptr) Variable Input
+ 120(i_i4): 117(ptr) Variable Input
+ 123: TypeFloat 32
+ 124: TypePointer Function 123(float)
+ 126: TypePointer Input 123(float)
+ 127(u_f): 126(ptr) Variable Input
+ 129(i_f): 126(ptr) Variable Input
+ 132: TypeVector 123(float) 2
+ 133: TypePointer Function 132(fvec2)
+ 135: TypePointer Input 132(fvec2)
+ 136(u_f2): 135(ptr) Variable Input
+ 138(i_f2): 135(ptr) Variable Input
+ 141: TypeVector 123(float) 3
+ 142: TypePointer Function 141(fvec3)
+ 144: TypePointer Input 141(fvec3)
+ 145(u_f3): 144(ptr) Variable Input
+ 147(i_f3): 144(ptr) Variable Input
+ 150: TypeVector 123(float) 4
+ 151: TypePointer Function 150(fvec4)
+ 153: TypePointer Input 150(fvec4)
+ 154(u_f4): 153(ptr) Variable Input
+ 156(i_f4): 153(ptr) Variable Input
+ 159: TypePointer Output 150(fvec4)
+160(gl_FragColor): 159(ptr) Variable Output
+ 193: TypeInt 32 0
+ 194: 193(int) Constant 0
+ 198: 193(int) Constant 1
+ 208: 193(int) Constant 2
+ 221: 193(int) Constant 3
+ 257: 123(float) Constant 1065353216
+ 258: 150(fvec4) ConstantComposite 257 257 257 257
+ 4(main): 2 Function None 3
+ 5: Label
+ 8(b): 7(ptr) Variable Function
+ 17(b2): 16(ptr) Variable Function
+ 35(b3): 34(ptr) Variable Function
+ 59(b4): 58(ptr) Variable Function
+ 89(i): 88(ptr) Variable Function
+ 98(i2): 97(ptr) Variable Function
+ 107(i3): 106(ptr) Variable Function
+ 116(i4): 115(ptr) Variable Function
+ 125(f): 124(ptr) Variable Function
+ 134(f2): 133(ptr) Variable Function
+ 143(f3): 142(ptr) Variable Function
+ 152(f4): 151(ptr) Variable Function
+ 161: 151(ptr) Variable Function
+ 11: 6(bool) Load 10(u_b)
+ 13: 6(bool) Load 12(i_b)
+ 14: 6(bool) LogicalAnd 11 13
+ Store 8(b) 14
+ 20: 15(bvec2) Load 19(u_b2)
+ 21: 6(bool) CompositeExtract 20 0
+ 23: 15(bvec2) Load 22(i_b2)
+ 24: 6(bool) CompositeExtract 23 0
+ 25: 6(bool) LogicalAnd 21 24
+ 26: 15(bvec2) Load 19(u_b2)
+ 27: 6(bool) CompositeExtract 26 1
+ 28: 6(bool) LogicalAnd 25 27
+ 29: 15(bvec2) Load 22(i_b2)
+ 30: 6(bool) CompositeExtract 29 1
+ 31: 6(bool) LogicalAnd 28 30
+ 32: 15(bvec2) CompositeConstruct 31 31
+ Store 17(b2) 32
+ 38: 33(bvec3) Load 37(u_b3)
+ 39: 6(bool) CompositeExtract 38 0
+ 41: 33(bvec3) Load 40(i_b3)
+ 42: 6(bool) CompositeExtract 41 0
+ 43: 6(bool) LogicalAnd 39 42
+ 44: 33(bvec3) Load 37(u_b3)
+ 45: 6(bool) CompositeExtract 44 1
+ 46: 6(bool) LogicalAnd 43 45
+ 47: 33(bvec3) Load 40(i_b3)
+ 48: 6(bool) CompositeExtract 47 1
+ 49: 6(bool) LogicalAnd 46 48
+ 50: 33(bvec3) Load 37(u_b3)
+ 51: 6(bool) CompositeExtract 50 2
+ 52: 6(bool) LogicalAnd 49 51
+ 53: 33(bvec3) Load 40(i_b3)
+ 54: 6(bool) CompositeExtract 53 2
+ 55: 6(bool) LogicalAnd 52 54
+ 56: 33(bvec3) CompositeConstruct 55 55 55
+ Store 35(b3) 56
+ 62: 57(bvec4) Load 61(u_b4)
+ 63: 6(bool) CompositeExtract 62 0
+ 65: 57(bvec4) Load 64(i_b4)
+ 66: 6(bool) CompositeExtract 65 0
+ 67: 6(bool) LogicalAnd 63 66
+ 68: 57(bvec4) Load 61(u_b4)
+ 69: 6(bool) CompositeExtract 68 1
+ 70: 6(bool) LogicalAnd 67 69
+ 71: 57(bvec4) Load 64(i_b4)
+ 72: 6(bool) CompositeExtract 71 1
+ 73: 6(bool) LogicalAnd 70 72
+ 74: 57(bvec4) Load 61(u_b4)
+ 75: 6(bool) CompositeExtract 74 2
+ 76: 6(bool) LogicalAnd 73 75
+ 77: 57(bvec4) Load 64(i_b4)
+ 78: 6(bool) CompositeExtract 77 2
+ 79: 6(bool) LogicalAnd 76 78
+ 80: 57(bvec4) Load 61(u_b4)
+ 81: 6(bool) CompositeExtract 80 3
+ 82: 6(bool) LogicalAnd 79 81
+ 83: 57(bvec4) Load 64(i_b4)
+ 84: 6(bool) CompositeExtract 83 3
+ 85: 6(bool) LogicalAnd 82 84
+ 86: 57(bvec4) CompositeConstruct 85 85 85 85
+ Store 59(b4) 86
+ 92: 87(int) Load 91(u_i)
+ 94: 87(int) Load 93(i_i)
+ 95: 87(int) IAdd 92 94
+ Store 89(i) 95
+ 101: 96(ivec2) Load 100(u_i2)
+ 103: 96(ivec2) Load 102(i_i2)
+ 104: 96(ivec2) IAdd 101 103
+ Store 98(i2) 104
+ 110: 105(ivec3) Load 109(u_i3)
+ 112: 105(ivec3) Load 111(i_i3)
+ 113: 105(ivec3) IAdd 110 112
+ Store 107(i3) 113
+ 119: 114(ivec4) Load 118(u_i4)
+ 121: 114(ivec4) Load 120(i_i4)
+ 122: 114(ivec4) IAdd 119 121
+ Store 116(i4) 122
+ 128: 123(float) Load 127(u_f)
+ 130: 123(float) Load 129(i_f)
+ 131: 123(float) FAdd 128 130
+ Store 125(f) 131
+ 137: 132(fvec2) Load 136(u_f2)
+ 139: 132(fvec2) Load 138(i_f2)
+ 140: 132(fvec2) FAdd 137 139
+ Store 134(f2) 140
+ 146: 141(fvec3) Load 145(u_f3)
+ 148: 141(fvec3) Load 147(i_f3)
+ 149: 141(fvec3) FAdd 146 148
+ Store 143(f3) 149
+ 155: 150(fvec4) Load 154(u_f4)
+ 157: 150(fvec4) Load 156(i_f4)
+ 158: 150(fvec4) FAdd 155 157
+ Store 152(f4) 158
+ 162: 6(bool) Load 8(b)
+ 163: 15(bvec2) Load 17(b2)
+ 164: 6(bool) CompositeExtract 163 0
+ 165: 6(bool) LogicalOr 162 164
+ 166: 15(bvec2) Load 17(b2)
+ 167: 6(bool) CompositeExtract 166 1
+ 168: 6(bool) LogicalOr 165 167
+ 169: 33(bvec3) Load 35(b3)
+ 170: 6(bool) CompositeExtract 169 0
+ 171: 6(bool) LogicalOr 168 170
+ 172: 33(bvec3) Load 35(b3)
+ 173: 6(bool) CompositeExtract 172 1
+ 174: 6(bool) LogicalOr 171 173
+ 175: 33(bvec3) Load 35(b3)
+ 176: 6(bool) CompositeExtract 175 2
+ 177: 6(bool) LogicalOr 174 176
+ 178: 57(bvec4) Load 59(b4)
+ 179: 6(bool) CompositeExtract 178 0
+ 180: 6(bool) LogicalOr 177 179
+ 181: 57(bvec4) Load 59(b4)
+ 182: 6(bool) CompositeExtract 181 1
+ 183: 6(bool) LogicalOr 180 182
+ 184: 57(bvec4) Load 59(b4)
+ 185: 6(bool) CompositeExtract 184 2
+ 186: 6(bool) LogicalOr 183 185
+ 187: 57(bvec4) Load 59(b4)
+ 188: 6(bool) CompositeExtract 187 3
+ 189: 6(bool) LogicalOr 186 188
+ SelectionMerge 191 None
+ BranchConditional 189 190 256
+ 190: Label
+ 192: 87(int) Load 89(i)
+ 195: 88(ptr) AccessChain 98(i2) 194
+ 196: 87(int) Load 195
+ 197: 87(int) IAdd 192 196
+ 199: 88(ptr) AccessChain 98(i2) 198
+ 200: 87(int) Load 199
+ 201: 87(int) IAdd 197 200
+ 202: 88(ptr) AccessChain 107(i3) 194
+ 203: 87(int) Load 202
+ 204: 87(int) IAdd 201 203
+ 205: 88(ptr) AccessChain 107(i3) 198
+ 206: 87(int) Load 205
+ 207: 87(int) IAdd 204 206
+ 209: 88(ptr) AccessChain 107(i3) 208
+ 210: 87(int) Load 209
+ 211: 87(int) IAdd 207 210
+ 212: 88(ptr) AccessChain 116(i4) 194
+ 213: 87(int) Load 212
+ 214: 87(int) IAdd 211 213
+ 215: 88(ptr) AccessChain 116(i4) 198
+ 216: 87(int) Load 215
+ 217: 87(int) IAdd 214 216
+ 218: 88(ptr) AccessChain 116(i4) 208
+ 219: 87(int) Load 218
+ 220: 87(int) IAdd 217 219
+ 222: 88(ptr) AccessChain 116(i4) 221
+ 223: 87(int) Load 222
+ 224: 87(int) IAdd 220 223
+ 225: 123(float) ConvertSToF 224
+ 226: 123(float) Load 125(f)
+ 227: 123(float) FAdd 225 226
+ 228: 124(ptr) AccessChain 134(f2) 194
+ 229: 123(float) Load 228
+ 230: 123(float) FAdd 227 229
+ 231: 124(ptr) AccessChain 134(f2) 198
+ 232: 123(float) Load 231
+ 233: 123(float) FAdd 230 232
+ 234: 124(ptr) AccessChain 143(f3) 194
+ 235: 123(float) Load 234
+ 236: 123(float) FAdd 233 235
+ 237: 124(ptr) AccessChain 143(f3) 198
+ 238: 123(float) Load 237
+ 239: 123(float) FAdd 236 238
+ 240: 124(ptr) AccessChain 143(f3) 208
+ 241: 123(float) Load 240
+ 242: 123(float) FAdd 239 241
+ 243: 124(ptr) AccessChain 152(f4) 194
+ 244: 123(float) Load 243
+ 245: 123(float) FAdd 242 244
+ 246: 124(ptr) AccessChain 152(f4) 198
+ 247: 123(float) Load 246
+ 248: 123(float) FAdd 245 247
+ 249: 124(ptr) AccessChain 152(f4) 208
+ 250: 123(float) Load 249
+ 251: 123(float) FAdd 248 250
+ 252: 124(ptr) AccessChain 152(f4) 221
+ 253: 123(float) Load 252
+ 254: 123(float) FAdd 251 253
+ 255: 150(fvec4) CompositeConstruct 254 254 254 254
+ Store 161 255
+ Branch 191
+ 256: Label
+ Store 161 258
+ Branch 191
+ 191: Label
+ 259: 150(fvec4) Load 161
+ Store 160(gl_FragColor) 259
+ Return
+ FunctionEnd
diff --git a/chromium/third_party/glslang/src/Test/baseResults/spv.uint.frag.out b/chromium/third_party/glslang/src/Test/baseResults/spv.uint.frag.out
new file mode 100755
index 00000000000..7d934ff1ddc
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/spv.uint.frag.out
@@ -0,0 +1,438 @@
+spv.uint.frag
+Warning, version 310 is not yet complete; most version-specific features are present, but some are missing.
+
+
+Linked fragment stage:
+
+
+// Module Version 10000
+// Generated by (magic number): 80001
+// Id's are bound by 207
+
+ Capability Shader
+ 1: ExtInstImport "GLSL.std.450"
+ MemoryModel Logical GLSL450
+ EntryPoint Fragment 4 "main" 15 68 77 200 202 204
+ ExecutionMode 4 OriginUpperLeft
+ Source ESSL 310
+ Name 4 "main"
+ Name 8 "count"
+ Name 12 "u"
+ Name 15 "t"
+ Name 55 "shiftedii"
+ Name 57 "shiftedui"
+ Name 59 "shiftediu"
+ Name 60 "shifteduu"
+ Name 68 "c"
+ Name 72 "usampler"
+ Name 77 "tc"
+ Name 111 "af"
+ Name 115 "ab"
+ Name 118 "ai"
+ Name 152 "mask1"
+ Name 154 "mask2"
+ Name 156 "mask3"
+ Name 160 "mask4"
+ Name 200 "f"
+ Name 202 "v"
+ Name 204 "i"
+ Name 206 "b"
+ Decorate 8(count) RelaxedPrecision
+ Decorate 12(u) RelaxedPrecision
+ Decorate 15(t) RelaxedPrecision
+ Decorate 15(t) Flat
+ Decorate 19 RelaxedPrecision
+ Decorate 21 RelaxedPrecision
+ Decorate 27 RelaxedPrecision
+ Decorate 28 RelaxedPrecision
+ Decorate 32 RelaxedPrecision
+ Decorate 33 RelaxedPrecision
+ Decorate 38 RelaxedPrecision
+ Decorate 39 RelaxedPrecision
+ Decorate 43 RelaxedPrecision
+ Decorate 44 RelaxedPrecision
+ Decorate 48 RelaxedPrecision
+ Decorate 49 RelaxedPrecision
+ Decorate 53 RelaxedPrecision
+ Decorate 54 RelaxedPrecision
+ Decorate 55(shiftedii) RelaxedPrecision
+ Decorate 57(shiftedui) RelaxedPrecision
+ Decorate 59(shiftediu) RelaxedPrecision
+ Decorate 60(shifteduu) RelaxedPrecision
+ Decorate 61 RelaxedPrecision
+ Decorate 62 RelaxedPrecision
+ Decorate 68(c) RelaxedPrecision
+ Decorate 72(usampler) RelaxedPrecision
+ Decorate 72(usampler) DescriptorSet 0
+ Decorate 73 RelaxedPrecision
+ Decorate 77(tc) RelaxedPrecision
+ Decorate 78 RelaxedPrecision
+ Decorate 79 RelaxedPrecision
+ Decorate 80 RelaxedPrecision
+ Decorate 81 RelaxedPrecision
+ Decorate 85 RelaxedPrecision
+ Decorate 86 RelaxedPrecision
+ Decorate 88 RelaxedPrecision
+ Decorate 89 RelaxedPrecision
+ Decorate 90 RelaxedPrecision
+ Decorate 91 RelaxedPrecision
+ Decorate 92 RelaxedPrecision
+ Decorate 97 RelaxedPrecision
+ Decorate 98 RelaxedPrecision
+ Decorate 101 RelaxedPrecision
+ Decorate 102 RelaxedPrecision
+ Decorate 105 RelaxedPrecision
+ Decorate 111(af) RelaxedPrecision
+ Decorate 112 RelaxedPrecision
+ Decorate 113 RelaxedPrecision
+ Decorate 116 RelaxedPrecision
+ Decorate 118(ai) RelaxedPrecision
+ Decorate 119 RelaxedPrecision
+ Decorate 120 RelaxedPrecision
+ Decorate 121 RelaxedPrecision
+ Decorate 122 RelaxedPrecision
+ Decorate 124 RelaxedPrecision
+ Decorate 125 RelaxedPrecision
+ Decorate 126 RelaxedPrecision
+ Decorate 127 RelaxedPrecision
+ Decorate 128 RelaxedPrecision
+ Decorate 129 RelaxedPrecision
+ Decorate 130 RelaxedPrecision
+ Decorate 131 RelaxedPrecision
+ Decorate 135 RelaxedPrecision
+ Decorate 136 RelaxedPrecision
+ Decorate 140 RelaxedPrecision
+ Decorate 141 RelaxedPrecision
+ Decorate 145 RelaxedPrecision
+ Decorate 146 RelaxedPrecision
+ Decorate 150 RelaxedPrecision
+ Decorate 151 RelaxedPrecision
+ Decorate 152(mask1) RelaxedPrecision
+ Decorate 154(mask2) RelaxedPrecision
+ Decorate 156(mask3) RelaxedPrecision
+ Decorate 157 RelaxedPrecision
+ Decorate 159 RelaxedPrecision
+ Decorate 160(mask4) RelaxedPrecision
+ Decorate 162 RelaxedPrecision
+ Decorate 163 RelaxedPrecision
+ Decorate 167 RelaxedPrecision
+ Decorate 168 RelaxedPrecision
+ Decorate 169 RelaxedPrecision
+ Decorate 170 RelaxedPrecision
+ Decorate 171 RelaxedPrecision
+ Decorate 175 RelaxedPrecision
+ Decorate 176 RelaxedPrecision
+ Decorate 177 RelaxedPrecision
+ Decorate 178 RelaxedPrecision
+ Decorate 179 RelaxedPrecision
+ Decorate 180 RelaxedPrecision
+ Decorate 184 RelaxedPrecision
+ Decorate 185 RelaxedPrecision
+ Decorate 186 RelaxedPrecision
+ Decorate 187 RelaxedPrecision
+ Decorate 188 RelaxedPrecision
+ Decorate 192 RelaxedPrecision
+ Decorate 193 RelaxedPrecision
+ Decorate 194 RelaxedPrecision
+ Decorate 195 RelaxedPrecision
+ Decorate 196 RelaxedPrecision
+ Decorate 197 RelaxedPrecision
+ Decorate 198 RelaxedPrecision
+ Decorate 200(f) RelaxedPrecision
+ Decorate 202(v) RelaxedPrecision
+ Decorate 202(v) Flat
+ Decorate 204(i) RelaxedPrecision
+ Decorate 204(i) Flat
+ 2: TypeVoid
+ 3: TypeFunction 2
+ 6: TypeInt 32 1
+ 7: TypePointer Function 6(int)
+ 9: 6(int) Constant 1
+ 10: TypeInt 32 0
+ 11: TypePointer Function 10(int)
+ 13: TypeVector 10(int) 2
+ 14: TypePointer Input 13(ivec2)
+ 15(t): 14(ptr) Variable Input
+ 16: 10(int) Constant 1
+ 17: TypePointer Input 10(int)
+ 20: 10(int) Constant 3
+ 22: TypeBool
+ 23: 22(bool) ConstantTrue
+ 26: 6(int) Constant 2
+ 31: 6(int) Constant 3
+ 34: 22(bool) ConstantFalse
+ 37: 6(int) Constant 5
+ 42: 6(int) Constant 7
+ 47: 6(int) Constant 11
+ 52: 6(int) Constant 13
+ 56: 6(int) Constant 4294967295
+ 58: 10(int) Constant 4194303
+ 66: TypeVector 10(int) 4
+ 67: TypePointer Output 66(ivec4)
+ 68(c): 67(ptr) Variable Output
+ 69: TypeImage 10(int) 2D sampled format:Unknown
+ 70: TypeSampledImage 69
+ 71: TypePointer UniformConstant 70
+ 72(usampler): 71(ptr) Variable UniformConstant
+ 74: TypeFloat 32
+ 75: TypeVector 74(float) 2
+ 76: TypePointer Input 75(fvec2)
+ 77(tc): 76(ptr) Variable Input
+ 87: 74(float) Constant 1065353216
+ 99: 74(float) Constant 1073741824
+ 100: 75(fvec2) ConstantComposite 99 99
+ 103: 10(int) Constant 0
+ 106: 10(int) Constant 4
+ 110: TypePointer Function 74(float)
+ 114: TypePointer Function 22(bool)
+ 134: 6(int) Constant 17
+ 139: 6(int) Constant 19
+ 144: 6(int) Constant 23
+ 149: 6(int) Constant 27
+ 153: 10(int) Constant 161
+ 155: 10(int) Constant 2576
+ 158: 6(int) Constant 4
+ 161: 10(int) Constant 2737
+ 199: TypePointer Input 74(float)
+ 200(f): 199(ptr) Variable Input
+ 201: TypePointer Input 66(ivec4)
+ 202(v): 201(ptr) Variable Input
+ 203: TypePointer Input 6(int)
+ 204(i): 203(ptr) Variable Input
+ 205: TypePointer Private 22(bool)
+ 206(b): 205(ptr) Variable Private
+ 4(main): 2 Function None 3
+ 5: Label
+ 8(count): 7(ptr) Variable Function
+ 12(u): 11(ptr) Variable Function
+ 55(shiftedii): 7(ptr) Variable Function
+ 57(shiftedui): 11(ptr) Variable Function
+ 59(shiftediu): 7(ptr) Variable Function
+ 60(shifteduu): 11(ptr) Variable Function
+ 111(af): 110(ptr) Variable Function
+ 115(ab): 114(ptr) Variable Function
+ 118(ai): 7(ptr) Variable Function
+ 152(mask1): 11(ptr) Variable Function
+ 154(mask2): 11(ptr) Variable Function
+ 156(mask3): 11(ptr) Variable Function
+ 160(mask4): 11(ptr) Variable Function
+ Store 8(count) 9
+ 18: 17(ptr) AccessChain 15(t) 16
+ 19: 10(int) Load 18
+ 21: 10(int) IAdd 19 20
+ Store 12(u) 21
+ SelectionMerge 25 None
+ BranchConditional 23 24 25
+ 24: Label
+ 27: 6(int) Load 8(count)
+ 28: 6(int) IMul 27 26
+ Store 8(count) 28
+ Branch 25
+ 25: Label
+ SelectionMerge 30 None
+ BranchConditional 23 29 30
+ 29: Label
+ 32: 6(int) Load 8(count)
+ 33: 6(int) IMul 32 31
+ Store 8(count) 33
+ Branch 30
+ 30: Label
+ SelectionMerge 36 None
+ BranchConditional 34 35 36
+ 35: Label
+ 38: 6(int) Load 8(count)
+ 39: 6(int) IMul 38 37
+ Store 8(count) 39
+ Branch 36
+ 36: Label
+ SelectionMerge 41 None
+ BranchConditional 23 40 41
+ 40: Label
+ 43: 6(int) Load 8(count)
+ 44: 6(int) IMul 43 42
+ Store 8(count) 44
+ Branch 41
+ 41: Label
+ SelectionMerge 46 None
+ BranchConditional 23 45 46
+ 45: Label
+ 48: 6(int) Load 8(count)
+ 49: 6(int) IMul 48 47
+ Store 8(count) 49
+ Branch 46
+ 46: Label
+ SelectionMerge 51 None
+ BranchConditional 34 50 51
+ 50: Label
+ 53: 6(int) Load 8(count)
+ 54: 6(int) IMul 53 52
+ Store 8(count) 54
+ Branch 51
+ 51: Label
+ Store 55(shiftedii) 56
+ Store 57(shiftedui) 58
+ Store 59(shiftediu) 56
+ Store 60(shifteduu) 58
+ 61: 6(int) Load 55(shiftedii)
+ 62: 6(int) Load 59(shiftediu)
+ 63: 22(bool) IEqual 61 62
+ SelectionMerge 65 None
+ BranchConditional 63 64 65
+ 64: Label
+ 73: 70 Load 72(usampler)
+ 78: 75(fvec2) Load 77(tc)
+ 79: 66(ivec4) ImageSampleImplicitLod 73 78
+ Store 68(c) 79
+ Branch 65
+ 65: Label
+ 80: 10(int) Load 57(shiftedui)
+ 81: 10(int) Load 60(shifteduu)
+ 82: 22(bool) IEqual 80 81
+ SelectionMerge 84 None
+ BranchConditional 82 83 84
+ 83: Label
+ 85: 70 Load 72(usampler)
+ 86: 75(fvec2) Load 77(tc)
+ 88: 75(fvec2) CompositeConstruct 87 87
+ 89: 75(fvec2) FAdd 86 88
+ 90: 66(ivec4) ImageSampleImplicitLod 85 89
+ Store 68(c) 90
+ Branch 84
+ 84: Label
+ 91: 6(int) Load 55(shiftedii)
+ 92: 10(int) Load 57(shiftedui)
+ 93: 6(int) Bitcast 92
+ 94: 22(bool) IEqual 91 93
+ SelectionMerge 96 None
+ BranchConditional 94 95 96
+ 95: Label
+ 97: 70 Load 72(usampler)
+ 98: 75(fvec2) Load 77(tc)
+ 101: 75(fvec2) FSub 98 100
+ 102: 66(ivec4) ImageSampleImplicitLod 97 101
+ Store 68(c) 102
+ Branch 96
+ 96: Label
+ 104: 17(ptr) AccessChain 15(t) 103
+ 105: 10(int) Load 104
+ 107: 22(bool) UGreaterThan 105 106
+ SelectionMerge 109 None
+ BranchConditional 107 108 109
+ 108: Label
+ 112: 10(int) Load 12(u)
+ 113: 74(float) ConvertUToF 112
+ Store 111(af) 113
+ 116: 10(int) Load 12(u)
+ 117: 22(bool) INotEqual 116 103
+ Store 115(ab) 117
+ 119: 10(int) Load 12(u)
+ 120: 6(int) Bitcast 119
+ Store 118(ai) 120
+ 121: 74(float) Load 111(af)
+ 122: 10(int) ConvertFToU 121
+ 123: 22(bool) Load 115(ab)
+ 124: 10(int) Select 123 16 103
+ 125: 6(int) Load 118(ai)
+ 126: 10(int) Bitcast 125
+ 127: 6(int) Load 8(count)
+ 128: 10(int) Bitcast 127
+ 129: 66(ivec4) CompositeConstruct 122 124 126 128
+ 130: 66(ivec4) Load 68(c)
+ 131: 66(ivec4) IAdd 130 129
+ Store 68(c) 131
+ Branch 109
+ 109: Label
+ SelectionMerge 133 None
+ BranchConditional 23 132 133
+ 132: Label
+ 135: 6(int) Load 8(count)
+ 136: 6(int) IMul 135 134
+ Store 8(count) 136
+ Branch 133
+ 133: Label
+ SelectionMerge 138 None
+ BranchConditional 34 137 138
+ 137: Label
+ 140: 6(int) Load 8(count)
+ 141: 6(int) IMul 140 139
+ Store 8(count) 141
+ Branch 138
+ 138: Label
+ SelectionMerge 143 None
+ BranchConditional 23 142 143
+ 142: Label
+ 145: 6(int) Load 8(count)
+ 146: 6(int) IMul 145 144
+ Store 8(count) 146
+ Branch 143
+ 143: Label
+ SelectionMerge 148 None
+ BranchConditional 23 147 148
+ 147: Label
+ 150: 6(int) Load 8(count)
+ 151: 6(int) IMul 150 149
+ Store 8(count) 151
+ Branch 148
+ 148: Label
+ Store 152(mask1) 153
+ Store 154(mask2) 155
+ 157: 10(int) Load 152(mask1)
+ 159: 10(int) ShiftLeftLogical 157 158
+ Store 156(mask3) 159
+ Store 160(mask4) 161
+ 162: 10(int) Load 156(mask3)
+ 163: 10(int) Load 154(mask2)
+ 164: 22(bool) IEqual 162 163
+ SelectionMerge 166 None
+ BranchConditional 164 165 166
+ 165: Label
+ 167: 6(int) Load 8(count)
+ 168: 6(int) IMul 167 26
+ Store 8(count) 168
+ Branch 166
+ 166: Label
+ 169: 10(int) Load 156(mask3)
+ 170: 10(int) Load 152(mask1)
+ 171: 10(int) BitwiseAnd 169 170
+ 172: 22(bool) INotEqual 171 103
+ SelectionMerge 174 None
+ BranchConditional 172 173 174
+ 173: Label
+ 175: 6(int) Load 8(count)
+ 176: 6(int) IMul 175 31
+ Store 8(count) 176
+ Branch 174
+ 174: Label
+ 177: 10(int) Load 152(mask1)
+ 178: 10(int) Load 156(mask3)
+ 179: 10(int) BitwiseOr 177 178
+ 180: 10(int) Load 160(mask4)
+ 181: 22(bool) IEqual 179 180
+ SelectionMerge 183 None
+ BranchConditional 181 182 183
+ 182: Label
+ 184: 6(int) Load 8(count)
+ 185: 6(int) IMul 184 37
+ Store 8(count) 185
+ Branch 183
+ 183: Label
+ 186: 10(int) Load 152(mask1)
+ 187: 10(int) Load 160(mask4)
+ 188: 10(int) BitwiseXor 186 187
+ 189: 22(bool) IEqual 188 155
+ SelectionMerge 191 None
+ BranchConditional 189 190 191
+ 190: Label
+ 192: 6(int) Load 8(count)
+ 193: 6(int) IMul 192 42
+ Store 8(count) 193
+ Branch 191
+ 191: Label
+ 194: 6(int) Load 8(count)
+ 195: 10(int) Bitcast 194
+ 196: 66(ivec4) CompositeConstruct 195 195 195 195
+ 197: 66(ivec4) Load 68(c)
+ 198: 66(ivec4) IAdd 197 196
+ Store 68(c) 198
+ Return
+ FunctionEnd
diff --git a/chromium/third_party/glslang/src/Test/baseResults/spv.uniformArray.frag.out b/chromium/third_party/glslang/src/Test/baseResults/spv.uniformArray.frag.out
new file mode 100644
index 00000000000..e66eda6b109
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/spv.uniformArray.frag.out
@@ -0,0 +1,80 @@
+spv.uniformArray.frag
+
+Linked fragment stage:
+
+
+// Module Version 10000
+// Generated by (magic number): 80001
+// Id's are bound by 53
+
+ Capability Shader
+ 1: ExtInstImport "GLSL.std.450"
+ MemoryModel Logical GLSL450
+ EntryPoint Fragment 4 "main" 14 25 35 47
+ ExecutionMode 4 OriginUpperLeft
+ Source GLSL 140
+ Name 4 "main"
+ Name 9 "texColor"
+ Name 14 "color"
+ Name 25 "inColor"
+ Name 35 "alpha"
+ Name 47 "gl_FragColor"
+ Name 52 "texSampler2D"
+ Decorate 52(texSampler2D) DescriptorSet 0
+ 2: TypeVoid
+ 3: TypeFunction 2
+ 6: TypeFloat 32
+ 7: TypeVector 6(float) 4
+ 8: TypePointer Function 7(fvec4)
+ 10: TypeInt 32 0
+ 11: 10(int) Constant 6
+ 12: TypeArray 7(fvec4) 11
+ 13: TypePointer Input 12
+ 14(color): 13(ptr) Variable Input
+ 15: TypeInt 32 1
+ 16: 15(int) Constant 1
+ 17: TypePointer Input 7(fvec4)
+ 23: TypeVector 6(float) 3
+ 24: TypePointer Input 23(fvec3)
+ 25(inColor): 24(ptr) Variable Input
+ 32: 10(int) Constant 16
+ 33: TypeArray 6(float) 32
+ 34: TypePointer Input 33
+ 35(alpha): 34(ptr) Variable Input
+ 36: 15(int) Constant 12
+ 37: TypePointer Input 6(float)
+ 40: 10(int) Constant 3
+ 41: TypePointer Function 6(float)
+ 46: TypePointer Output 7(fvec4)
+47(gl_FragColor): 46(ptr) Variable Output
+ 49: TypeImage 6(float) 2D sampled format:Unknown
+ 50: TypeSampledImage 49
+ 51: TypePointer UniformConstant 50
+52(texSampler2D): 51(ptr) Variable UniformConstant
+ 4(main): 2 Function None 3
+ 5: Label
+ 9(texColor): 8(ptr) Variable Function
+ 18: 17(ptr) AccessChain 14(color) 16
+ 19: 7(fvec4) Load 18
+ 20: 17(ptr) AccessChain 14(color) 16
+ 21: 7(fvec4) Load 20
+ 22: 7(fvec4) FAdd 19 21
+ Store 9(texColor) 22
+ 26: 23(fvec3) Load 25(inColor)
+ 27: 7(fvec4) Load 9(texColor)
+ 28: 23(fvec3) VectorShuffle 27 27 0 1 2
+ 29: 23(fvec3) FAdd 28 26
+ 30: 7(fvec4) Load 9(texColor)
+ 31: 7(fvec4) VectorShuffle 30 29 4 5 6 3
+ Store 9(texColor) 31
+ 38: 37(ptr) AccessChain 35(alpha) 36
+ 39: 6(float) Load 38
+ 42: 41(ptr) AccessChain 9(texColor) 40
+ 43: 6(float) Load 42
+ 44: 6(float) FAdd 43 39
+ 45: 41(ptr) AccessChain 9(texColor) 40
+ Store 45 44
+ 48: 7(fvec4) Load 9(texColor)
+ Store 47(gl_FragColor) 48
+ Return
+ FunctionEnd
diff --git a/chromium/third_party/glslang/src/Test/baseResults/spv.variableArrayIndex.frag.out b/chromium/third_party/glslang/src/Test/baseResults/spv.variableArrayIndex.frag.out
new file mode 100755
index 00000000000..43df45f52c0
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/spv.variableArrayIndex.frag.out
@@ -0,0 +1,172 @@
+spv.variableArrayIndex.frag
+Warning, version 400 is not yet complete; most version-specific features are present, but some are missing.
+
+
+Linked fragment stage:
+
+
+// Module Version 10000
+// Generated by (magic number): 80001
+// Id's are bound by 97
+
+ Capability Shader
+ 1: ExtInstImport "GLSL.std.450"
+ MemoryModel Logical GLSL450
+ EntryPoint Fragment 4 "main" 10 21 37 40 58 67
+ ExecutionMode 4 OriginUpperLeft
+ Source GLSL 400
+ Name 4 "main"
+ Name 8 "iLocal"
+ Name 10 "Count"
+ Name 13 "lunarStruct1"
+ MemberName 13(lunarStruct1) 0 "i"
+ MemberName 13(lunarStruct1) 1 "f"
+ Name 14 "lunarStruct2"
+ MemberName 14(lunarStruct2) 0 "i"
+ MemberName 14(lunarStruct2) 1 "f"
+ MemberName 14(lunarStruct2) 2 "s1_1"
+ Name 18 "lunarStruct1"
+ MemberName 18(lunarStruct1) 0 "i"
+ MemberName 18(lunarStruct1) 1 "f"
+ Name 19 "lunarStruct3"
+ MemberName 19(lunarStruct3) 0 "s2_1"
+ MemberName 19(lunarStruct3) 1 "i"
+ MemberName 19(lunarStruct3) 2 "f"
+ MemberName 19(lunarStruct3) 3 "s1_1"
+ Name 21 "foo3"
+ Name 31 "scale"
+ Name 32 "lunarStruct1"
+ MemberName 32(lunarStruct1) 0 "i"
+ MemberName 32(lunarStruct1) 1 "f"
+ Name 33 "lunarStruct2"
+ MemberName 33(lunarStruct2) 0 "i"
+ MemberName 33(lunarStruct2) 1 "f"
+ MemberName 33(lunarStruct2) 2 "s1_1"
+ Name 37 "foo2"
+ Name 38 "lunarStruct1"
+ MemberName 38(lunarStruct1) 0 "i"
+ MemberName 38(lunarStruct1) 1 "f"
+ Name 40 "foo"
+ Name 58 "gl_FragColor"
+ Name 63 "samp2D"
+ Name 67 "coord"
+ Name 73 "constructed"
+ Decorate 10(Count) Flat
+ MemberDecorate 19(lunarStruct3) 0 Flat
+ MemberDecorate 19(lunarStruct3) 1 Flat
+ MemberDecorate 19(lunarStruct3) 2 Flat
+ MemberDecorate 19(lunarStruct3) 3 Flat
+ MemberDecorate 33(lunarStruct2) 0 Flat
+ MemberDecorate 33(lunarStruct2) 1 Flat
+ MemberDecorate 33(lunarStruct2) 2 Flat
+ MemberDecorate 38(lunarStruct1) 0 Flat
+ MemberDecorate 38(lunarStruct1) 1 Flat
+ Decorate 63(samp2D) DescriptorSet 0
+ 2: TypeVoid
+ 3: TypeFunction 2
+ 6: TypeInt 32 1
+ 7: TypePointer Function 6(int)
+ 9: TypePointer Input 6(int)
+ 10(Count): 9(ptr) Variable Input
+ 12: TypeFloat 32
+13(lunarStruct1): TypeStruct 6(int) 12(float)
+14(lunarStruct2): TypeStruct 6(int) 12(float) 13(lunarStruct1)
+ 15: TypeInt 32 0
+ 16: 15(int) Constant 3
+ 17: TypeArray 14(lunarStruct2) 16
+18(lunarStruct1): TypeStruct 6(int) 12(float)
+19(lunarStruct3): TypeStruct 17 6(int) 12(float) 18(lunarStruct1)
+ 20: TypePointer Input 19(lunarStruct3)
+ 21(foo3): 20(ptr) Variable Input
+ 22: 6(int) Constant 0
+ 23: 6(int) Constant 1
+ 26: TypeBool
+ 30: TypePointer Function 12(float)
+32(lunarStruct1): TypeStruct 6(int) 12(float)
+33(lunarStruct2): TypeStruct 6(int) 12(float) 32(lunarStruct1)
+ 34: 15(int) Constant 5
+ 35: TypeArray 33(lunarStruct2) 34
+ 36: TypePointer Input 35
+ 37(foo2): 36(ptr) Variable Input
+38(lunarStruct1): TypeStruct 6(int) 12(float)
+ 39: TypePointer Input 38(lunarStruct1)
+ 40(foo): 39(ptr) Variable Input
+ 45: 6(int) Constant 2
+ 50: TypePointer Input 12(float)
+ 56: TypeVector 12(float) 4
+ 57: TypePointer Output 56(fvec4)
+58(gl_FragColor): 57(ptr) Variable Output
+ 60: TypeImage 12(float) 2D sampled format:Unknown
+ 61: TypeSampledImage 60
+ 62: TypePointer UniformConstant 61
+ 63(samp2D): 62(ptr) Variable UniformConstant
+ 65: TypeVector 12(float) 2
+ 66: TypePointer Input 65(fvec2)
+ 67(coord): 66(ptr) Variable Input
+ 71: TypeArray 65(fvec2) 16
+ 72: TypePointer Function 71
+ 77: 12(float) Constant 1065353216
+ 78: 12(float) Constant 1073741824
+ 79: 65(fvec2) ConstantComposite 77 78
+ 83: TypePointer Function 65(fvec2)
+ 4(main): 2 Function None 3
+ 5: Label
+ 8(iLocal): 7(ptr) Variable Function
+ 31(scale): 30(ptr) Variable Function
+ 73(constructed): 72(ptr) Variable Function
+ 11: 6(int) Load 10(Count)
+ Store 8(iLocal) 11
+ 24: 9(ptr) AccessChain 21(foo3) 22 23 22
+ 25: 6(int) Load 24
+ 27: 26(bool) SGreaterThan 25 22
+ SelectionMerge 29 None
+ BranchConditional 27 28 53
+ 28: Label
+ 41: 9(ptr) AccessChain 40(foo) 22
+ 42: 6(int) Load 41
+ 43: 9(ptr) AccessChain 21(foo3) 22 42 22
+ 44: 6(int) Load 43
+ 46: 6(int) IAdd 44 45
+ 47: 6(int) Load 8(iLocal)
+ 48: 6(int) IAdd 47 23
+ Store 8(iLocal) 48
+ 49: 6(int) IAdd 46 48
+ 51: 50(ptr) AccessChain 37(foo2) 49 45 23
+ 52: 12(float) Load 51
+ Store 31(scale) 52
+ Branch 29
+ 53: Label
+ 54: 50(ptr) AccessChain 21(foo3) 22 22 45 23
+ 55: 12(float) Load 54
+ Store 31(scale) 55
+ Branch 29
+ 29: Label
+ 59: 12(float) Load 31(scale)
+ 64: 61 Load 63(samp2D)
+ 68: 65(fvec2) Load 67(coord)
+ 69: 56(fvec4) ImageSampleImplicitLod 64 68
+ 70: 56(fvec4) VectorTimesScalar 69 59
+ Store 58(gl_FragColor) 70
+ 74: 65(fvec2) Load 67(coord)
+ 75: 12(float) Load 31(scale)
+ 76: 65(fvec2) CompositeConstruct 75 75
+ 80: 71 CompositeConstruct 74 76 79
+ Store 73(constructed) 80
+ 81: 9(ptr) AccessChain 40(foo) 22
+ 82: 6(int) Load 81
+ 84: 83(ptr) AccessChain 73(constructed) 82
+ 85: 65(fvec2) Load 84
+ 86: 9(ptr) AccessChain 40(foo) 22
+ 87: 6(int) Load 86
+ 88: 83(ptr) AccessChain 73(constructed) 87
+ 89: 65(fvec2) Load 88
+ 90: 12(float) CompositeExtract 85 0
+ 91: 12(float) CompositeExtract 85 1
+ 92: 12(float) CompositeExtract 89 0
+ 93: 12(float) CompositeExtract 89 1
+ 94: 56(fvec4) CompositeConstruct 90 91 92 93
+ 95: 56(fvec4) Load 58(gl_FragColor)
+ 96: 56(fvec4) FAdd 95 94
+ Store 58(gl_FragColor) 96
+ Return
+ FunctionEnd
diff --git a/chromium/third_party/glslang/src/Test/baseResults/spv.varyingArray.frag.out b/chromium/third_party/glslang/src/Test/baseResults/spv.varyingArray.frag.out
new file mode 100755
index 00000000000..4a7d2ee6268
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/spv.varyingArray.frag.out
@@ -0,0 +1,89 @@
+spv.varyingArray.frag
+
+Linked fragment stage:
+
+
+// Module Version 10000
+// Generated by (magic number): 80001
+// Id's are bound by 61
+
+ Capability Shader
+ 1: ExtInstImport "GLSL.std.450"
+ MemoryModel Logical GLSL450
+ EntryPoint Fragment 4 "main" 19 34 39 45 48
+ ExecutionMode 4 OriginUpperLeft
+ Source GLSL 140
+ Name 4 "main"
+ Name 9 "texColor"
+ Name 13 "texSampler2D"
+ Name 19 "TexCoord"
+ Name 34 "color"
+ Name 39 "alpha"
+ Name 45 "gl_FragColor"
+ Name 48 "foo"
+ Decorate 13(texSampler2D) DescriptorSet 0
+ 2: TypeVoid
+ 3: TypeFunction 2
+ 6: TypeFloat 32
+ 7: TypeVector 6(float) 4
+ 8: TypePointer Function 7(fvec4)
+ 10: TypeImage 6(float) 2D sampled format:Unknown
+ 11: TypeSampledImage 10
+ 12: TypePointer UniformConstant 11
+13(texSampler2D): 12(ptr) Variable UniformConstant
+ 15: TypeInt 32 0
+ 16: 15(int) Constant 6
+ 17: TypeArray 7(fvec4) 16
+ 18: TypePointer Input 17
+ 19(TexCoord): 18(ptr) Variable Input
+ 20: TypeInt 32 1
+ 21: 20(int) Constant 4
+ 22: TypePointer Input 7(fvec4)
+ 25: 20(int) Constant 5
+ 29: TypeVector 6(float) 2
+ 34(color): 22(ptr) Variable Input
+ 38: TypePointer Input 6(float)
+ 39(alpha): 38(ptr) Variable Input
+ 41: 15(int) Constant 3
+ 42: TypePointer Function 6(float)
+ 44: TypePointer Output 7(fvec4)
+45(gl_FragColor): 44(ptr) Variable Output
+ 46: TypeArray 7(fvec4) 41
+ 47: TypePointer Input 46
+ 48(foo): 47(ptr) Variable Input
+ 49: 20(int) Constant 1
+ 52: 20(int) Constant 0
+ 4(main): 2 Function None 3
+ 5: Label
+ 9(texColor): 8(ptr) Variable Function
+ 14: 11 Load 13(texSampler2D)
+ 23: 22(ptr) AccessChain 19(TexCoord) 21
+ 24: 7(fvec4) Load 23
+ 26: 22(ptr) AccessChain 19(TexCoord) 25
+ 27: 7(fvec4) Load 26
+ 28: 7(fvec4) FAdd 24 27
+ 30: 6(float) CompositeExtract 28 0
+ 31: 6(float) CompositeExtract 28 1
+ 32: 29(fvec2) CompositeConstruct 30 31
+ 33: 7(fvec4) ImageSampleImplicitLod 14 32
+ Store 9(texColor) 33
+ 35: 7(fvec4) Load 34(color)
+ 36: 7(fvec4) Load 9(texColor)
+ 37: 7(fvec4) FAdd 36 35
+ Store 9(texColor) 37
+ 40: 6(float) Load 39(alpha)
+ 43: 42(ptr) AccessChain 9(texColor) 41
+ Store 43 40
+ 50: 22(ptr) AccessChain 48(foo) 49
+ 51: 7(fvec4) Load 50
+ 53: 22(ptr) AccessChain 19(TexCoord) 52
+ 54: 7(fvec4) Load 53
+ 55: 7(fvec4) FAdd 51 54
+ 56: 22(ptr) AccessChain 19(TexCoord) 21
+ 57: 7(fvec4) Load 56
+ 58: 7(fvec4) FAdd 55 57
+ 59: 7(fvec4) Load 9(texColor)
+ 60: 7(fvec4) FAdd 58 59
+ Store 45(gl_FragColor) 60
+ Return
+ FunctionEnd
diff --git a/chromium/third_party/glslang/src/Test/baseResults/spv.varyingArrayIndirect.frag.out b/chromium/third_party/glslang/src/Test/baseResults/spv.varyingArrayIndirect.frag.out
new file mode 100755
index 00000000000..410fd3c46a1
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/spv.varyingArrayIndirect.frag.out
@@ -0,0 +1,102 @@
+spv.varyingArrayIndirect.frag
+
+Linked fragment stage:
+
+
+// Module Version 10000
+// Generated by (magic number): 80001
+// Id's are bound by 70
+
+ Capability Shader
+ 1: ExtInstImport "GLSL.std.450"
+ MemoryModel Logical GLSL450
+ EntryPoint Fragment 4 "main" 19 22 30 31 45 50 56
+ ExecutionMode 4 OriginUpperLeft
+ Source GLSL 140
+ Name 4 "main"
+ Name 9 "texColor"
+ Name 13 "texSampler2D"
+ Name 19 "userIn"
+ Name 22 "b"
+ Name 30 "TexCoord"
+ Name 31 "a"
+ Name 45 "color"
+ Name 50 "alpha"
+ Name 56 "gl_FragColor"
+ Decorate 13(texSampler2D) DescriptorSet 0
+ Decorate 22(b) Flat
+ Decorate 31(a) Flat
+ 2: TypeVoid
+ 3: TypeFunction 2
+ 6: TypeFloat 32
+ 7: TypeVector 6(float) 4
+ 8: TypePointer Function 7(fvec4)
+ 10: TypeImage 6(float) 2D sampled format:Unknown
+ 11: TypeSampledImage 10
+ 12: TypePointer UniformConstant 11
+13(texSampler2D): 12(ptr) Variable UniformConstant
+ 15: TypeInt 32 0
+ 16: 15(int) Constant 2
+ 17: TypeArray 7(fvec4) 16
+ 18: TypePointer Input 17
+ 19(userIn): 18(ptr) Variable Input
+ 20: TypeInt 32 1
+ 21: TypePointer Input 20(int)
+ 22(b): 21(ptr) Variable Input
+ 24: TypePointer Input 7(fvec4)
+ 27: 15(int) Constant 6
+ 28: TypeArray 7(fvec4) 27
+ 29: TypePointer Input 28
+ 30(TexCoord): 29(ptr) Variable Input
+ 31(a): 21(ptr) Variable Input
+ 36: 20(int) Constant 5
+ 40: TypeVector 6(float) 2
+ 45(color): 24(ptr) Variable Input
+ 49: TypePointer Input 6(float)
+ 50(alpha): 49(ptr) Variable Input
+ 52: 15(int) Constant 3
+ 53: TypePointer Function 6(float)
+ 55: TypePointer Output 7(fvec4)
+56(gl_FragColor): 55(ptr) Variable Output
+ 57: 20(int) Constant 0
+ 4(main): 2 Function None 3
+ 5: Label
+ 9(texColor): 8(ptr) Variable Function
+ 14: 11 Load 13(texSampler2D)
+ 23: 20(int) Load 22(b)
+ 25: 24(ptr) AccessChain 19(userIn) 23
+ 26: 7(fvec4) Load 25
+ 32: 20(int) Load 31(a)
+ 33: 24(ptr) AccessChain 30(TexCoord) 32
+ 34: 7(fvec4) Load 33
+ 35: 7(fvec4) FAdd 26 34
+ 37: 24(ptr) AccessChain 30(TexCoord) 36
+ 38: 7(fvec4) Load 37
+ 39: 7(fvec4) FAdd 35 38
+ 41: 6(float) CompositeExtract 39 0
+ 42: 6(float) CompositeExtract 39 1
+ 43: 40(fvec2) CompositeConstruct 41 42
+ 44: 7(fvec4) ImageSampleImplicitLod 14 43
+ Store 9(texColor) 44
+ 46: 7(fvec4) Load 45(color)
+ 47: 7(fvec4) Load 9(texColor)
+ 48: 7(fvec4) FAdd 47 46
+ Store 9(texColor) 48
+ 51: 6(float) Load 50(alpha)
+ 54: 53(ptr) AccessChain 9(texColor) 52
+ Store 54 51
+ 58: 24(ptr) AccessChain 30(TexCoord) 57
+ 59: 7(fvec4) Load 58
+ 60: 20(int) Load 22(b)
+ 61: 24(ptr) AccessChain 30(TexCoord) 60
+ 62: 7(fvec4) Load 61
+ 63: 7(fvec4) FAdd 59 62
+ 64: 7(fvec4) Load 9(texColor)
+ 65: 7(fvec4) FAdd 63 64
+ 66: 20(int) Load 31(a)
+ 67: 24(ptr) AccessChain 19(userIn) 66
+ 68: 7(fvec4) Load 67
+ 69: 7(fvec4) FAdd 65 68
+ Store 56(gl_FragColor) 69
+ Return
+ FunctionEnd
diff --git a/chromium/third_party/glslang/src/Test/baseResults/spv.voidFunction.frag.out b/chromium/third_party/glslang/src/Test/baseResults/spv.voidFunction.frag.out
new file mode 100755
index 00000000000..1d4b694b3fe
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/spv.voidFunction.frag.out
@@ -0,0 +1,77 @@
+spv.voidFunction.frag
+Warning, version 400 is not yet complete; most version-specific features are present, but some are missing.
+
+
+Linked fragment stage:
+
+
+// Module Version 10000
+// Generated by (magic number): 80001
+// Id's are bound by 43
+
+ Capability Shader
+ 1: ExtInstImport "GLSL.std.450"
+ MemoryModel Logical GLSL450
+ EntryPoint Fragment 4 "main" 24 37 40 42
+ ExecutionMode 4 OriginUpperLeft
+ Source GLSL 400
+ Name 4 "main"
+ Name 6 "foo("
+ Name 8 "foo2("
+ Name 12 "bar"
+ Name 22 "outColor"
+ Name 24 "bigColor"
+ Name 37 "gl_FragColor"
+ Name 40 "BaseColor"
+ Name 42 "d"
+ 2: TypeVoid
+ 3: TypeFunction 2
+ 10: TypeFloat 32
+ 11: TypePointer Private 10(float)
+ 12(bar): 11(ptr) Variable Private
+ 13: 10(float) Constant 1073741824
+ 15: 10(float) Constant 1065353216
+ 20: TypeVector 10(float) 4
+ 21: TypePointer Function 20(fvec4)
+ 23: TypePointer Input 20(fvec4)
+ 24(bigColor): 23(ptr) Variable Input
+ 29: TypeInt 32 0
+ 30: 29(int) Constant 0
+ 31: TypePointer Function 10(float)
+ 36: TypePointer Output 20(fvec4)
+37(gl_FragColor): 36(ptr) Variable Output
+ 40(BaseColor): 23(ptr) Variable Input
+ 41: TypePointer Input 10(float)
+ 42(d): 41(ptr) Variable Input
+ 4(main): 2 Function None 3
+ 5: Label
+ 22(outColor): 21(ptr) Variable Function
+ Store 12(bar) 13
+ 25: 20(fvec4) Load 24(bigColor)
+ Store 22(outColor) 25
+ 26: 2 FunctionCall 6(foo()
+ 27: 2 FunctionCall 8(foo2()
+ 28: 10(float) Load 12(bar)
+ 32: 31(ptr) AccessChain 22(outColor) 30
+ 33: 10(float) Load 32
+ 34: 10(float) FAdd 33 28
+ 35: 31(ptr) AccessChain 22(outColor) 30
+ Store 35 34
+ 38: 20(fvec4) Load 22(outColor)
+ Store 37(gl_FragColor) 38
+ Return
+ FunctionEnd
+ 6(foo(): 2 Function None 3
+ 7: Label
+ 14: 10(float) Load 12(bar)
+ 16: 10(float) FAdd 14 15
+ Store 12(bar) 16
+ Return
+ FunctionEnd
+ 8(foo2(): 2 Function None 3
+ 9: Label
+ 18: 10(float) Load 12(bar)
+ 19: 10(float) FAdd 18 15
+ Store 12(bar) 19
+ Return
+ FunctionEnd
diff --git a/chromium/third_party/glslang/src/Test/baseResults/spv.while-continue-break.vert.out b/chromium/third_party/glslang/src/Test/baseResults/spv.while-continue-break.vert.out
new file mode 100644
index 00000000000..2ec331024b0
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/spv.while-continue-break.vert.out
@@ -0,0 +1,79 @@
+spv.while-continue-break.vert
+Warning, version 310 is not yet complete; most version-specific features are present, but some are missing.
+
+
+Linked vertex stage:
+
+
+// Module Version 10000
+// Generated by (magic number): 80001
+// Id's are bound by 41
+
+ Capability Shader
+ 1: ExtInstImport "GLSL.std.450"
+ MemoryModel Logical GLSL450
+ EntryPoint Vertex 4 "main"
+ Source ESSL 310
+ Name 4 "main"
+ Name 8 "i"
+ Name 19 "A"
+ Name 27 "B"
+ Name 29 "C"
+ Name 39 "D"
+ 2: TypeVoid
+ 3: TypeFunction 2
+ 6: TypeInt 32 1
+ 7: TypePointer Function 6(int)
+ 9: 6(int) Constant 0
+ 16: 6(int) Constant 10
+ 17: TypeBool
+ 20: 6(int) Constant 1
+ 22: 6(int) Constant 2
+ 31: 6(int) Constant 5
+ 40: 6(int) Constant 3
+ 4(main): 2 Function None 3
+ 5: Label
+ 8(i): 7(ptr) Variable Function
+ 19(A): 7(ptr) Variable Function
+ 27(B): 7(ptr) Variable Function
+ 29(C): 7(ptr) Variable Function
+ 39(D): 7(ptr) Variable Function
+ Store 8(i) 9
+ Branch 10
+ 10: Label
+ LoopMerge 12 13 None
+ Branch 14
+ 14: Label
+ 15: 6(int) Load 8(i)
+ 18: 17(bool) SLessThan 15 16
+ BranchConditional 18 11 12
+ 11: Label
+ Store 19(A) 20
+ 21: 6(int) Load 8(i)
+ 23: 6(int) SMod 21 22
+ 24: 17(bool) IEqual 23 9
+ SelectionMerge 26 None
+ BranchConditional 24 25 26
+ 25: Label
+ Store 27(B) 22
+ Branch 13
+ 26: Label
+ 30: 6(int) Load 8(i)
+ 32: 6(int) SMod 30 31
+ 33: 17(bool) IEqual 32 9
+ SelectionMerge 35 None
+ BranchConditional 33 34 35
+ 34: Label
+ Store 27(B) 22
+ Branch 12
+ 35: Label
+ 37: 6(int) Load 8(i)
+ 38: 6(int) IAdd 37 20
+ Store 8(i) 38
+ Branch 13
+ 13: Label
+ Branch 10
+ 12: Label
+ Store 39(D) 40
+ Return
+ FunctionEnd
diff --git a/chromium/third_party/glslang/src/Test/baseResults/spv.while-simple.vert.out b/chromium/third_party/glslang/src/Test/baseResults/spv.while-simple.vert.out
new file mode 100755
index 00000000000..0c1c822179f
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/spv.while-simple.vert.out
@@ -0,0 +1,48 @@
+spv.while-simple.vert
+Warning, version 310 is not yet complete; most version-specific features are present, but some are missing.
+
+
+Linked vertex stage:
+
+
+// Module Version 10000
+// Generated by (magic number): 80001
+// Id's are bound by 22
+
+ Capability Shader
+ 1: ExtInstImport "GLSL.std.450"
+ MemoryModel Logical GLSL450
+ EntryPoint Vertex 4 "main"
+ Source ESSL 310
+ Name 4 "main"
+ Name 8 "i"
+ 2: TypeVoid
+ 3: TypeFunction 2
+ 6: TypeInt 32 1
+ 7: TypePointer Function 6(int)
+ 9: 6(int) Constant 0
+ 16: 6(int) Constant 10
+ 17: TypeBool
+ 20: 6(int) Constant 1
+ 4(main): 2 Function None 3
+ 5: Label
+ 8(i): 7(ptr) Variable Function
+ Store 8(i) 9
+ Branch 10
+ 10: Label
+ LoopMerge 12 13 None
+ Branch 14
+ 14: Label
+ 15: 6(int) Load 8(i)
+ 18: 17(bool) SLessThan 15 16
+ BranchConditional 18 11 12
+ 11: Label
+ 19: 6(int) Load 8(i)
+ 21: 6(int) IAdd 19 20
+ Store 8(i) 21
+ Branch 13
+ 13: Label
+ Branch 10
+ 12: Label
+ Return
+ FunctionEnd
diff --git a/chromium/third_party/glslang/src/Test/baseResults/spv.whileLoop.frag.out b/chromium/third_party/glslang/src/Test/baseResults/spv.whileLoop.frag.out
new file mode 100755
index 00000000000..8de5e956e0d
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/spv.whileLoop.frag.out
@@ -0,0 +1,65 @@
+spv.whileLoop.frag
+
+Linked fragment stage:
+
+
+// Module Version 10000
+// Generated by (magic number): 80001
+// Id's are bound by 35
+
+ Capability Shader
+ 1: ExtInstImport "GLSL.std.450"
+ MemoryModel Logical GLSL450
+ EntryPoint Fragment 4 "main" 11 24 28 33
+ ExecutionMode 4 OriginUpperLeft
+ Source GLSL 140
+ Name 4 "main"
+ Name 9 "color"
+ Name 11 "BaseColor"
+ Name 24 "d"
+ Name 28 "bigColor"
+ Name 33 "gl_FragColor"
+ 2: TypeVoid
+ 3: TypeFunction 2
+ 6: TypeFloat 32
+ 7: TypeVector 6(float) 4
+ 8: TypePointer Function 7(fvec4)
+ 10: TypePointer Input 7(fvec4)
+ 11(BaseColor): 10(ptr) Variable Input
+ 18: TypeInt 32 0
+ 19: 18(int) Constant 0
+ 20: TypePointer Function 6(float)
+ 23: TypePointer Input 6(float)
+ 24(d): 23(ptr) Variable Input
+ 26: TypeBool
+ 28(bigColor): 10(ptr) Variable Input
+ 32: TypePointer Output 7(fvec4)
+33(gl_FragColor): 32(ptr) Variable Output
+ 4(main): 2 Function None 3
+ 5: Label
+ 9(color): 8(ptr) Variable Function
+ 12: 7(fvec4) Load 11(BaseColor)
+ Store 9(color) 12
+ Branch 13
+ 13: Label
+ LoopMerge 15 16 None
+ Branch 17
+ 17: Label
+ 21: 20(ptr) AccessChain 9(color) 19
+ 22: 6(float) Load 21
+ 25: 6(float) Load 24(d)
+ 27: 26(bool) FOrdLessThan 22 25
+ BranchConditional 27 14 15
+ 14: Label
+ 29: 7(fvec4) Load 28(bigColor)
+ 30: 7(fvec4) Load 9(color)
+ 31: 7(fvec4) FAdd 30 29
+ Store 9(color) 31
+ Branch 16
+ 16: Label
+ Branch 13
+ 15: Label
+ 34: 7(fvec4) Load 9(color)
+ Store 33(gl_FragColor) 34
+ Return
+ FunctionEnd
diff --git a/chromium/third_party/glslang/src/Test/baseResults/structAssignment.frag.out b/chromium/third_party/glslang/src/Test/baseResults/structAssignment.frag.out
new file mode 100644
index 00000000000..75cc44c2b6b
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/structAssignment.frag.out
@@ -0,0 +1,103 @@
+structAssignment.frag
+WARNING: 0:4: varying deprecated in version 130; may be removed in future release
+
+Shader version: 130
+0:? Sequence
+0:29 Function Definition: main( (global void)
+0:29 Function Parameters:
+0:? Sequence
+0:33 Test condition and select (temp void)
+0:33 Condition
+0:33 Compare Greater Than (temp bool)
+0:33 i: direct index for structure (global int)
+0:33 s2_1: direct index for structure (global structure{global int i, global float f, global structure{global int i, global float f} s1_1})
+0:33 'foo3' (uniform structure{global structure{global int i, global float f, global structure{global int i, global float f} s1_1} s2_1, global int i, global float f, global structure{global int i, global float f} s1_1})
+0:33 Constant:
+0:33 0 (const int)
+0:33 Constant:
+0:33 0 (const int)
+0:33 Constant:
+0:33 0 (const int)
+0:33 true case
+0:34 move second child to first child (temp structure{global int i, global float f, global structure{global int i, global float f} s1_1})
+0:34 'locals2' (temp structure{global int i, global float f, global structure{global int i, global float f} s1_1})
+0:34 s2_1: direct index for structure (global structure{global int i, global float f, global structure{global int i, global float f} s1_1})
+0:34 'foo3' (uniform structure{global structure{global int i, global float f, global structure{global int i, global float f} s1_1} s2_1, global int i, global float f, global structure{global int i, global float f} s1_1})
+0:34 Constant:
+0:34 0 (const int)
+0:33 false case
+0:36 move second child to first child (temp structure{global int i, global float f, global structure{global int i, global float f} s1_1})
+0:36 'locals2' (temp structure{global int i, global float f, global structure{global int i, global float f} s1_1})
+0:36 'foo2' (uniform structure{global int i, global float f, global structure{global int i, global float f} s1_1})
+0:38 move second child to first child (temp 4-component vector of float)
+0:38 'gl_FragColor' (fragColor 4-component vector of float FragColor)
+0:38 vector-scale (temp 4-component vector of float)
+0:38 f: direct index for structure (global float)
+0:38 s1_1: direct index for structure (global structure{global int i, global float f})
+0:38 'locals2' (temp structure{global int i, global float f, global structure{global int i, global float f} s1_1})
+0:38 Constant:
+0:38 2 (const int)
+0:38 Constant:
+0:38 1 (const int)
+0:38 texture (global 4-component vector of float)
+0:38 'sampler' (uniform sampler2D)
+0:38 'coord' (smooth in 2-component vector of float)
+0:? Linker Objects
+0:? 'sampler' (uniform sampler2D)
+0:? 'coord' (smooth in 2-component vector of float)
+0:? 'foo' (uniform structure{global int i, global float f})
+0:? 'foo2' (uniform structure{global int i, global float f, global structure{global int i, global float f} s1_1})
+0:? 'foo3' (uniform structure{global structure{global int i, global float f, global structure{global int i, global float f} s1_1} s2_1, global int i, global float f, global structure{global int i, global float f} s1_1})
+
+
+Linked fragment stage:
+
+
+Shader version: 130
+0:? Sequence
+0:29 Function Definition: main( (global void)
+0:29 Function Parameters:
+0:? Sequence
+0:33 Test condition and select (temp void)
+0:33 Condition
+0:33 Compare Greater Than (temp bool)
+0:33 i: direct index for structure (global int)
+0:33 s2_1: direct index for structure (global structure{global int i, global float f, global structure{global int i, global float f} s1_1})
+0:33 'foo3' (uniform structure{global structure{global int i, global float f, global structure{global int i, global float f} s1_1} s2_1, global int i, global float f, global structure{global int i, global float f} s1_1})
+0:33 Constant:
+0:33 0 (const int)
+0:33 Constant:
+0:33 0 (const int)
+0:33 Constant:
+0:33 0 (const int)
+0:33 true case
+0:34 move second child to first child (temp structure{global int i, global float f, global structure{global int i, global float f} s1_1})
+0:34 'locals2' (temp structure{global int i, global float f, global structure{global int i, global float f} s1_1})
+0:34 s2_1: direct index for structure (global structure{global int i, global float f, global structure{global int i, global float f} s1_1})
+0:34 'foo3' (uniform structure{global structure{global int i, global float f, global structure{global int i, global float f} s1_1} s2_1, global int i, global float f, global structure{global int i, global float f} s1_1})
+0:34 Constant:
+0:34 0 (const int)
+0:33 false case
+0:36 move second child to first child (temp structure{global int i, global float f, global structure{global int i, global float f} s1_1})
+0:36 'locals2' (temp structure{global int i, global float f, global structure{global int i, global float f} s1_1})
+0:36 'foo2' (uniform structure{global int i, global float f, global structure{global int i, global float f} s1_1})
+0:38 move second child to first child (temp 4-component vector of float)
+0:38 'gl_FragColor' (fragColor 4-component vector of float FragColor)
+0:38 vector-scale (temp 4-component vector of float)
+0:38 f: direct index for structure (global float)
+0:38 s1_1: direct index for structure (global structure{global int i, global float f})
+0:38 'locals2' (temp structure{global int i, global float f, global structure{global int i, global float f} s1_1})
+0:38 Constant:
+0:38 2 (const int)
+0:38 Constant:
+0:38 1 (const int)
+0:38 texture (global 4-component vector of float)
+0:38 'sampler' (uniform sampler2D)
+0:38 'coord' (smooth in 2-component vector of float)
+0:? Linker Objects
+0:? 'sampler' (uniform sampler2D)
+0:? 'coord' (smooth in 2-component vector of float)
+0:? 'foo' (uniform structure{global int i, global float f})
+0:? 'foo2' (uniform structure{global int i, global float f, global structure{global int i, global float f} s1_1})
+0:? 'foo3' (uniform structure{global structure{global int i, global float f, global structure{global int i, global float f} s1_1} s2_1, global int i, global float f, global structure{global int i, global float f} s1_1})
+
diff --git a/chromium/third_party/glslang/src/Test/baseResults/structDeref.frag.out b/chromium/third_party/glslang/src/Test/baseResults/structDeref.frag.out
new file mode 100644
index 00000000000..fc9d3778e55
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/structDeref.frag.out
@@ -0,0 +1,345 @@
+structDeref.frag
+WARNING: 0:4: varying deprecated in version 130; may be removed in future release
+
+Shader version: 130
+0:? Sequence
+0:41 Function Definition: main( (global void)
+0:41 Function Parameters:
+0:? Sequence
+0:51 Test condition and select (temp void)
+0:51 Condition
+0:51 Compare Greater Than (temp bool)
+0:51 i: direct index for structure (global int)
+0:51 direct index (temp structure{global int i, global float f, global structure{global int i, global float f, global structure{global int i} s0_1} s1_1})
+0:51 s2_1: direct index for structure (global 12-element array of structure{global int i, global float f, global structure{global int i, global float f, global structure{global int i} s0_1} s1_1})
+0:51 'foo3' (uniform structure{global 12-element array of structure{global int i, global float f, global structure{global int i, global float f, global structure{global int i} s0_1} s1_1} s2_1, global int i, global float f, global structure{global int i, global float f, global structure{global int i} s0_1} s1_1})
+0:51 Constant:
+0:51 0 (const int)
+0:51 Constant:
+0:51 9 (const int)
+0:51 Constant:
+0:51 0 (const int)
+0:51 Constant:
+0:51 0 (const int)
+0:51 true case
+0:52 Sequence
+0:52 move second child to first child (temp float)
+0:52 f: direct index for structure (global float)
+0:52 'locals2' (temp structure{global int i, global float f, global structure{global int i, global float f, global structure{global int i} s0_1} s1_1})
+0:52 Constant:
+0:52 1 (const int)
+0:52 Constant:
+0:52 1.000000
+0:53 move second child to first child (temp structure{global int i, global float f, global structure{global int i} s0_1})
+0:53 s1_1: direct index for structure (global structure{global int i, global float f, global structure{global int i} s0_1})
+0:53 'locals2' (temp structure{global int i, global float f, global structure{global int i, global float f, global structure{global int i} s0_1} s1_1})
+0:53 Constant:
+0:53 2 (const int)
+0:53 Constant:
+0:53 0 (const int)
+0:53 1.000000
+0:53 0 (const int)
+0:54 move second child to first child (temp 6-element array of float)
+0:54 'fArray' (temp 6-element array of float)
+0:54 Constant:
+0:54 0.000000
+0:54 0.000000
+0:54 0.000000
+0:54 0.000000
+0:54 0.000000
+0:54 0.000000
+0:55 move second child to first child (temp structure{global int i, global float f, global structure{global int i} s0_1})
+0:55 direct index (temp structure{global int i, global float f, global structure{global int i} s0_1})
+0:55 'locals1Array' (temp 10-element array of structure{global int i, global float f, global structure{global int i} s0_1})
+0:55 Constant:
+0:55 6 (const int)
+0:55 'foo1' (uniform structure{global int i, global float f, global structure{global int i} s0_1})
+0:56 move second child to first child (temp structure{global int i})
+0:56 'locals0' (temp structure{global int i})
+0:56 Constant:
+0:56 0 (const int)
+0:57 move second child to first child (temp structure{global structure{global int i} s0_0})
+0:57 'locals00' (temp structure{global structure{global int i} s0_0})
+0:57 Constant:
+0:57 0 (const int)
+0:51 false case
+0:59 Sequence
+0:59 move second child to first child (temp float)
+0:59 f: direct index for structure (global float)
+0:59 'locals2' (temp structure{global int i, global float f, global structure{global int i, global float f, global structure{global int i} s0_1} s1_1})
+0:59 Constant:
+0:59 1 (const int)
+0:59 direct index (temp float)
+0:59 'coord' (smooth in 2-component vector of float)
+0:59 Constant:
+0:59 0 (const int)
+0:60 move second child to first child (temp structure{global int i, global float f, global structure{global int i} s0_1})
+0:60 s1_1: direct index for structure (global structure{global int i, global float f, global structure{global int i} s0_1})
+0:60 'locals2' (temp structure{global int i, global float f, global structure{global int i, global float f, global structure{global int i} s0_1} s1_1})
+0:60 Constant:
+0:60 2 (const int)
+0:60 Construct structure (temp structure{global int i, global float f, global structure{global int i} s0_1})
+0:60 Constant:
+0:60 1 (const int)
+0:60 direct index (temp float)
+0:60 'coord' (smooth in 2-component vector of float)
+0:60 Constant:
+0:60 1 (const int)
+0:60 'foo0' (uniform structure{global int i})
+0:61 move second child to first child (temp 6-element array of float)
+0:61 'fArray' (temp 6-element array of float)
+0:61 Constant:
+0:61 0.000000
+0:61 1.000000
+0:61 2.000000
+0:61 3.000000
+0:61 4.000000
+0:61 5.000000
+0:62 move second child to first child (temp structure{global int i, global float f, global structure{global int i} s0_1})
+0:62 direct index (temp structure{global int i, global float f, global structure{global int i} s0_1})
+0:62 'locals1Array' (temp 10-element array of structure{global int i, global float f, global structure{global int i} s0_1})
+0:62 Constant:
+0:62 6 (const int)
+0:62 s1_1: direct index for structure (global structure{global int i, global float f, global structure{global int i} s0_1})
+0:62 'locals2' (temp structure{global int i, global float f, global structure{global int i, global float f, global structure{global int i} s0_1} s1_1})
+0:62 Constant:
+0:62 2 (const int)
+0:63 move second child to first child (temp structure{global int i})
+0:63 'locals0' (temp structure{global int i})
+0:63 s0_1: direct index for structure (global structure{global int i})
+0:63 'foo1' (uniform structure{global int i, global float f, global structure{global int i} s0_1})
+0:63 Constant:
+0:63 2 (const int)
+0:64 move second child to first child (temp structure{global structure{global int i} s0_0})
+0:64 'locals00' (temp structure{global structure{global int i} s0_0})
+0:64 'foo00' (uniform structure{global structure{global int i} s0_0})
+0:67 Test condition and select (temp void)
+0:67 Condition
+0:67 Compare Greater Than (temp bool)
+0:67 i: direct index for structure (global int)
+0:67 'locals0' (temp structure{global int i})
+0:67 Constant:
+0:67 0 (const int)
+0:67 Constant:
+0:67 5 (const int)
+0:67 true case
+0:68 move second child to first child (temp structure{global int i})
+0:68 'locals0' (temp structure{global int i})
+0:68 s0_0: direct index for structure (global structure{global int i})
+0:68 'locals00' (temp structure{global structure{global int i} s0_0})
+0:68 Constant:
+0:68 0 (const int)
+0:70 move second child to first child (temp 4-component vector of float)
+0:70 'gl_FragColor' (fragColor 4-component vector of float FragColor)
+0:70 vector-scale (temp 4-component vector of float)
+0:70 add (temp float)
+0:70 add (temp float)
+0:70 add (temp float)
+0:70 Convert int to float (temp float)
+0:70 i: direct index for structure (global int)
+0:70 'locals0' (temp structure{global int i})
+0:70 Constant:
+0:70 0 (const int)
+0:70 f: direct index for structure (global float)
+0:70 direct index (temp structure{global int i, global float f, global structure{global int i} s0_1})
+0:70 'locals1Array' (temp 10-element array of structure{global int i, global float f, global structure{global int i} s0_1})
+0:70 Constant:
+0:70 6 (const int)
+0:70 Constant:
+0:70 1 (const int)
+0:70 direct index (temp float)
+0:70 'fArray' (temp 6-element array of float)
+0:70 Constant:
+0:70 3 (const int)
+0:70 f: direct index for structure (global float)
+0:70 s1_1: direct index for structure (global structure{global int i, global float f, global structure{global int i} s0_1})
+0:70 'locals2' (temp structure{global int i, global float f, global structure{global int i, global float f, global structure{global int i} s0_1} s1_1})
+0:70 Constant:
+0:70 2 (const int)
+0:70 Constant:
+0:70 1 (const int)
+0:70 texture (global 4-component vector of float)
+0:70 'sampler' (uniform sampler2D)
+0:70 'coord' (smooth in 2-component vector of float)
+0:? Linker Objects
+0:? 'sampler' (uniform sampler2D)
+0:? 'coord' (smooth in 2-component vector of float)
+0:? 'foo0' (uniform structure{global int i})
+0:? 'foo1' (uniform structure{global int i, global float f, global structure{global int i} s0_1})
+0:? 'foo2' (uniform structure{global int i, global float f, global structure{global int i, global float f, global structure{global int i} s0_1} s1_1})
+0:? 'foo3' (uniform structure{global 12-element array of structure{global int i, global float f, global structure{global int i, global float f, global structure{global int i} s0_1} s1_1} s2_1, global int i, global float f, global structure{global int i, global float f, global structure{global int i} s0_1} s1_1})
+0:? 'foo00' (uniform structure{global structure{global int i} s0_0})
+
+
+Linked fragment stage:
+
+
+Shader version: 130
+0:? Sequence
+0:41 Function Definition: main( (global void)
+0:41 Function Parameters:
+0:? Sequence
+0:51 Test condition and select (temp void)
+0:51 Condition
+0:51 Compare Greater Than (temp bool)
+0:51 i: direct index for structure (global int)
+0:51 direct index (temp structure{global int i, global float f, global structure{global int i, global float f, global structure{global int i} s0_1} s1_1})
+0:51 s2_1: direct index for structure (global 12-element array of structure{global int i, global float f, global structure{global int i, global float f, global structure{global int i} s0_1} s1_1})
+0:51 'foo3' (uniform structure{global 12-element array of structure{global int i, global float f, global structure{global int i, global float f, global structure{global int i} s0_1} s1_1} s2_1, global int i, global float f, global structure{global int i, global float f, global structure{global int i} s0_1} s1_1})
+0:51 Constant:
+0:51 0 (const int)
+0:51 Constant:
+0:51 9 (const int)
+0:51 Constant:
+0:51 0 (const int)
+0:51 Constant:
+0:51 0 (const int)
+0:51 true case
+0:52 Sequence
+0:52 move second child to first child (temp float)
+0:52 f: direct index for structure (global float)
+0:52 'locals2' (temp structure{global int i, global float f, global structure{global int i, global float f, global structure{global int i} s0_1} s1_1})
+0:52 Constant:
+0:52 1 (const int)
+0:52 Constant:
+0:52 1.000000
+0:53 move second child to first child (temp structure{global int i, global float f, global structure{global int i} s0_1})
+0:53 s1_1: direct index for structure (global structure{global int i, global float f, global structure{global int i} s0_1})
+0:53 'locals2' (temp structure{global int i, global float f, global structure{global int i, global float f, global structure{global int i} s0_1} s1_1})
+0:53 Constant:
+0:53 2 (const int)
+0:53 Constant:
+0:53 0 (const int)
+0:53 1.000000
+0:53 0 (const int)
+0:54 move second child to first child (temp 6-element array of float)
+0:54 'fArray' (temp 6-element array of float)
+0:54 Constant:
+0:54 0.000000
+0:54 0.000000
+0:54 0.000000
+0:54 0.000000
+0:54 0.000000
+0:54 0.000000
+0:55 move second child to first child (temp structure{global int i, global float f, global structure{global int i} s0_1})
+0:55 direct index (temp structure{global int i, global float f, global structure{global int i} s0_1})
+0:55 'locals1Array' (temp 10-element array of structure{global int i, global float f, global structure{global int i} s0_1})
+0:55 Constant:
+0:55 6 (const int)
+0:55 'foo1' (uniform structure{global int i, global float f, global structure{global int i} s0_1})
+0:56 move second child to first child (temp structure{global int i})
+0:56 'locals0' (temp structure{global int i})
+0:56 Constant:
+0:56 0 (const int)
+0:57 move second child to first child (temp structure{global structure{global int i} s0_0})
+0:57 'locals00' (temp structure{global structure{global int i} s0_0})
+0:57 Constant:
+0:57 0 (const int)
+0:51 false case
+0:59 Sequence
+0:59 move second child to first child (temp float)
+0:59 f: direct index for structure (global float)
+0:59 'locals2' (temp structure{global int i, global float f, global structure{global int i, global float f, global structure{global int i} s0_1} s1_1})
+0:59 Constant:
+0:59 1 (const int)
+0:59 direct index (temp float)
+0:59 'coord' (smooth in 2-component vector of float)
+0:59 Constant:
+0:59 0 (const int)
+0:60 move second child to first child (temp structure{global int i, global float f, global structure{global int i} s0_1})
+0:60 s1_1: direct index for structure (global structure{global int i, global float f, global structure{global int i} s0_1})
+0:60 'locals2' (temp structure{global int i, global float f, global structure{global int i, global float f, global structure{global int i} s0_1} s1_1})
+0:60 Constant:
+0:60 2 (const int)
+0:60 Construct structure (temp structure{global int i, global float f, global structure{global int i} s0_1})
+0:60 Constant:
+0:60 1 (const int)
+0:60 direct index (temp float)
+0:60 'coord' (smooth in 2-component vector of float)
+0:60 Constant:
+0:60 1 (const int)
+0:60 'foo0' (uniform structure{global int i})
+0:61 move second child to first child (temp 6-element array of float)
+0:61 'fArray' (temp 6-element array of float)
+0:61 Constant:
+0:61 0.000000
+0:61 1.000000
+0:61 2.000000
+0:61 3.000000
+0:61 4.000000
+0:61 5.000000
+0:62 move second child to first child (temp structure{global int i, global float f, global structure{global int i} s0_1})
+0:62 direct index (temp structure{global int i, global float f, global structure{global int i} s0_1})
+0:62 'locals1Array' (temp 10-element array of structure{global int i, global float f, global structure{global int i} s0_1})
+0:62 Constant:
+0:62 6 (const int)
+0:62 s1_1: direct index for structure (global structure{global int i, global float f, global structure{global int i} s0_1})
+0:62 'locals2' (temp structure{global int i, global float f, global structure{global int i, global float f, global structure{global int i} s0_1} s1_1})
+0:62 Constant:
+0:62 2 (const int)
+0:63 move second child to first child (temp structure{global int i})
+0:63 'locals0' (temp structure{global int i})
+0:63 s0_1: direct index for structure (global structure{global int i})
+0:63 'foo1' (uniform structure{global int i, global float f, global structure{global int i} s0_1})
+0:63 Constant:
+0:63 2 (const int)
+0:64 move second child to first child (temp structure{global structure{global int i} s0_0})
+0:64 'locals00' (temp structure{global structure{global int i} s0_0})
+0:64 'foo00' (uniform structure{global structure{global int i} s0_0})
+0:67 Test condition and select (temp void)
+0:67 Condition
+0:67 Compare Greater Than (temp bool)
+0:67 i: direct index for structure (global int)
+0:67 'locals0' (temp structure{global int i})
+0:67 Constant:
+0:67 0 (const int)
+0:67 Constant:
+0:67 5 (const int)
+0:67 true case
+0:68 move second child to first child (temp structure{global int i})
+0:68 'locals0' (temp structure{global int i})
+0:68 s0_0: direct index for structure (global structure{global int i})
+0:68 'locals00' (temp structure{global structure{global int i} s0_0})
+0:68 Constant:
+0:68 0 (const int)
+0:70 move second child to first child (temp 4-component vector of float)
+0:70 'gl_FragColor' (fragColor 4-component vector of float FragColor)
+0:70 vector-scale (temp 4-component vector of float)
+0:70 add (temp float)
+0:70 add (temp float)
+0:70 add (temp float)
+0:70 Convert int to float (temp float)
+0:70 i: direct index for structure (global int)
+0:70 'locals0' (temp structure{global int i})
+0:70 Constant:
+0:70 0 (const int)
+0:70 f: direct index for structure (global float)
+0:70 direct index (temp structure{global int i, global float f, global structure{global int i} s0_1})
+0:70 'locals1Array' (temp 10-element array of structure{global int i, global float f, global structure{global int i} s0_1})
+0:70 Constant:
+0:70 6 (const int)
+0:70 Constant:
+0:70 1 (const int)
+0:70 direct index (temp float)
+0:70 'fArray' (temp 6-element array of float)
+0:70 Constant:
+0:70 3 (const int)
+0:70 f: direct index for structure (global float)
+0:70 s1_1: direct index for structure (global structure{global int i, global float f, global structure{global int i} s0_1})
+0:70 'locals2' (temp structure{global int i, global float f, global structure{global int i, global float f, global structure{global int i} s0_1} s1_1})
+0:70 Constant:
+0:70 2 (const int)
+0:70 Constant:
+0:70 1 (const int)
+0:70 texture (global 4-component vector of float)
+0:70 'sampler' (uniform sampler2D)
+0:70 'coord' (smooth in 2-component vector of float)
+0:? Linker Objects
+0:? 'sampler' (uniform sampler2D)
+0:? 'coord' (smooth in 2-component vector of float)
+0:? 'foo0' (uniform structure{global int i})
+0:? 'foo1' (uniform structure{global int i, global float f, global structure{global int i} s0_1})
+0:? 'foo2' (uniform structure{global int i, global float f, global structure{global int i, global float f, global structure{global int i} s0_1} s1_1})
+0:? 'foo3' (uniform structure{global 12-element array of structure{global int i, global float f, global structure{global int i, global float f, global structure{global int i} s0_1} s1_1} s2_1, global int i, global float f, global structure{global int i, global float f, global structure{global int i} s0_1} s1_1})
+0:? 'foo00' (uniform structure{global structure{global int i} s0_0})
+
diff --git a/chromium/third_party/glslang/src/Test/baseResults/structure.frag.out b/chromium/third_party/glslang/src/Test/baseResults/structure.frag.out
new file mode 100644
index 00000000000..666b140724b
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/structure.frag.out
@@ -0,0 +1,165 @@
+structure.frag
+WARNING: 0:3: varying deprecated in version 130; may be removed in future release
+
+Shader version: 130
+0:? Sequence
+0:20 Function Definition: main( (global void)
+0:20 Function Parameters:
+0:22 Sequence
+0:22 Sequence
+0:22 move second child to first child (temp float)
+0:22 'scale' (temp float)
+0:22 Constant:
+0:22 0.000000
+0:24 Test condition and select (temp void)
+0:24 Condition
+0:24 Compare Greater Than (temp bool)
+0:24 direct index (temp int)
+0:24 i: direct index for structure (global 5-element array of int)
+0:24 direct index (temp structure{global 5-element array of int i, global float f, global 7-element array of structure{global int i, global 4-element array of float f, global 5-element array of 4-component vector of float color} s1_1})
+0:24 'foo2' (uniform 5-element array of structure{global 5-element array of int i, global float f, global 7-element array of structure{global int i, global 4-element array of float f, global 5-element array of 4-component vector of float color} s1_1})
+0:24 Constant:
+0:24 3 (const int)
+0:24 Constant:
+0:24 0 (const int)
+0:24 Constant:
+0:24 4 (const int)
+0:24 Constant:
+0:24 0 (const int)
+0:24 true case
+0:25 move second child to first child (temp float)
+0:25 'scale' (temp float)
+0:25 direct index (temp float)
+0:25 direct index (temp 4-component vector of float)
+0:25 color: direct index for structure (global 5-element array of 4-component vector of float)
+0:25 direct index (temp structure{global int i, global 4-element array of float f, global 5-element array of 4-component vector of float color})
+0:25 s1_1: direct index for structure (global 7-element array of structure{global int i, global 4-element array of float f, global 5-element array of 4-component vector of float color})
+0:25 direct index (temp structure{global 5-element array of int i, global float f, global 7-element array of structure{global int i, global 4-element array of float f, global 5-element array of 4-component vector of float color} s1_1})
+0:25 'foo2' (uniform 5-element array of structure{global 5-element array of int i, global float f, global 7-element array of structure{global int i, global 4-element array of float f, global 5-element array of 4-component vector of float color} s1_1})
+0:25 Constant:
+0:25 3 (const int)
+0:25 Constant:
+0:25 2 (const int)
+0:25 Constant:
+0:25 2 (const int)
+0:25 Constant:
+0:25 2 (const int)
+0:25 Constant:
+0:25 3 (const int)
+0:25 Constant:
+0:25 0 (const int)
+0:24 false case
+0:27 move second child to first child (temp float)
+0:27 'scale' (temp float)
+0:27 direct index (temp float)
+0:27 f: direct index for structure (global 4-element array of float)
+0:27 direct index (temp structure{global int i, global 4-element array of float f, global 5-element array of 4-component vector of float color})
+0:27 s1_1: direct index for structure (global 7-element array of structure{global int i, global 4-element array of float f, global 5-element array of 4-component vector of float color})
+0:27 direct index (temp structure{global 5-element array of int i, global float f, global 7-element array of structure{global int i, global 4-element array of float f, global 5-element array of 4-component vector of float color} s1_1})
+0:27 'foo2' (uniform 5-element array of structure{global 5-element array of int i, global float f, global 7-element array of structure{global int i, global 4-element array of float f, global 5-element array of 4-component vector of float color} s1_1})
+0:27 Constant:
+0:27 3 (const int)
+0:27 Constant:
+0:27 2 (const int)
+0:27 Constant:
+0:27 2 (const int)
+0:27 Constant:
+0:27 1 (const int)
+0:27 Constant:
+0:27 3 (const int)
+0:29 move second child to first child (temp 4-component vector of float)
+0:29 'gl_FragColor' (fragColor 4-component vector of float FragColor)
+0:29 vector-scale (temp 4-component vector of float)
+0:29 'scale' (temp float)
+0:29 texture (global 4-component vector of float)
+0:29 'sampler' (uniform sampler2D)
+0:29 'coord' (smooth in 2-component vector of float)
+0:? Linker Objects
+0:? 'sampler' (uniform sampler2D)
+0:? 'coord' (smooth in 2-component vector of float)
+0:? 'foo' (uniform structure{global int i, global 4-element array of float f, global 5-element array of 4-component vector of float color})
+0:? 'foo2' (uniform 5-element array of structure{global 5-element array of int i, global float f, global 7-element array of structure{global int i, global 4-element array of float f, global 5-element array of 4-component vector of float color} s1_1})
+
+
+Linked fragment stage:
+
+
+Shader version: 130
+0:? Sequence
+0:20 Function Definition: main( (global void)
+0:20 Function Parameters:
+0:22 Sequence
+0:22 Sequence
+0:22 move second child to first child (temp float)
+0:22 'scale' (temp float)
+0:22 Constant:
+0:22 0.000000
+0:24 Test condition and select (temp void)
+0:24 Condition
+0:24 Compare Greater Than (temp bool)
+0:24 direct index (temp int)
+0:24 i: direct index for structure (global 5-element array of int)
+0:24 direct index (temp structure{global 5-element array of int i, global float f, global 7-element array of structure{global int i, global 4-element array of float f, global 5-element array of 4-component vector of float color} s1_1})
+0:24 'foo2' (uniform 5-element array of structure{global 5-element array of int i, global float f, global 7-element array of structure{global int i, global 4-element array of float f, global 5-element array of 4-component vector of float color} s1_1})
+0:24 Constant:
+0:24 3 (const int)
+0:24 Constant:
+0:24 0 (const int)
+0:24 Constant:
+0:24 4 (const int)
+0:24 Constant:
+0:24 0 (const int)
+0:24 true case
+0:25 move second child to first child (temp float)
+0:25 'scale' (temp float)
+0:25 direct index (temp float)
+0:25 direct index (temp 4-component vector of float)
+0:25 color: direct index for structure (global 5-element array of 4-component vector of float)
+0:25 direct index (temp structure{global int i, global 4-element array of float f, global 5-element array of 4-component vector of float color})
+0:25 s1_1: direct index for structure (global 7-element array of structure{global int i, global 4-element array of float f, global 5-element array of 4-component vector of float color})
+0:25 direct index (temp structure{global 5-element array of int i, global float f, global 7-element array of structure{global int i, global 4-element array of float f, global 5-element array of 4-component vector of float color} s1_1})
+0:25 'foo2' (uniform 5-element array of structure{global 5-element array of int i, global float f, global 7-element array of structure{global int i, global 4-element array of float f, global 5-element array of 4-component vector of float color} s1_1})
+0:25 Constant:
+0:25 3 (const int)
+0:25 Constant:
+0:25 2 (const int)
+0:25 Constant:
+0:25 2 (const int)
+0:25 Constant:
+0:25 2 (const int)
+0:25 Constant:
+0:25 3 (const int)
+0:25 Constant:
+0:25 0 (const int)
+0:24 false case
+0:27 move second child to first child (temp float)
+0:27 'scale' (temp float)
+0:27 direct index (temp float)
+0:27 f: direct index for structure (global 4-element array of float)
+0:27 direct index (temp structure{global int i, global 4-element array of float f, global 5-element array of 4-component vector of float color})
+0:27 s1_1: direct index for structure (global 7-element array of structure{global int i, global 4-element array of float f, global 5-element array of 4-component vector of float color})
+0:27 direct index (temp structure{global 5-element array of int i, global float f, global 7-element array of structure{global int i, global 4-element array of float f, global 5-element array of 4-component vector of float color} s1_1})
+0:27 'foo2' (uniform 5-element array of structure{global 5-element array of int i, global float f, global 7-element array of structure{global int i, global 4-element array of float f, global 5-element array of 4-component vector of float color} s1_1})
+0:27 Constant:
+0:27 3 (const int)
+0:27 Constant:
+0:27 2 (const int)
+0:27 Constant:
+0:27 2 (const int)
+0:27 Constant:
+0:27 1 (const int)
+0:27 Constant:
+0:27 3 (const int)
+0:29 move second child to first child (temp 4-component vector of float)
+0:29 'gl_FragColor' (fragColor 4-component vector of float FragColor)
+0:29 vector-scale (temp 4-component vector of float)
+0:29 'scale' (temp float)
+0:29 texture (global 4-component vector of float)
+0:29 'sampler' (uniform sampler2D)
+0:29 'coord' (smooth in 2-component vector of float)
+0:? Linker Objects
+0:? 'sampler' (uniform sampler2D)
+0:? 'coord' (smooth in 2-component vector of float)
+0:? 'foo' (uniform structure{global int i, global 4-element array of float f, global 5-element array of 4-component vector of float color})
+0:? 'foo2' (uniform 5-element array of structure{global 5-element array of int i, global float f, global 7-element array of structure{global int i, global 4-element array of float f, global 5-element array of 4-component vector of float color} s1_1})
+
diff --git a/chromium/third_party/glslang/src/Test/baseResults/switch.frag.out b/chromium/third_party/glslang/src/Test/baseResults/switch.frag.out
new file mode 100644
index 00000000000..f8b179c0918
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/switch.frag.out
@@ -0,0 +1,691 @@
+switch.frag
+ERROR: 0:11: 'switch' : condition must be a scalar integer expression
+ERROR: 0:14: 'switch' : condition must be a scalar integer expression
+ERROR: 0:21: 'switch' : last case/default label not followed by statements
+ERROR: 0:28: 'switch' : cannot have statements before first case/default label
+ERROR: 0:43: 'default' : duplicate label
+ERROR: 0:63: 'case' : duplicated value
+ERROR: 0:65: 'case' : scalar integer expression required
+ERROR: 0:67: 'case' : constant expression required
+ERROR: 0:89: '' : break statement only allowed in switch and loops
+ERROR: 0:99: 'case' : cannot be nested inside control flow
+ERROR: 0:104: 'case' : cannot be nested inside control flow
+ERROR: 0:108: 'case' : cannot be nested inside control flow
+ERROR: 0:115: 'default' : cannot be nested inside control flow
+ERROR: 0:119: 'case' : cannot appear outside switch statement
+ERROR: 0:120: 'default' : cannot appear outside switch statement
+ERROR: 0:126: 'onlyInSwitch' : undeclared identifier
+ERROR: 0:128: 'switch' : last case/default label not followed by statements
+ERROR: 0:140: 'nestedX' : undeclared identifier
+ERROR: 0:157: 'nestedZ' : undeclared identifier
+ERROR: 19 compilation errors. No code generated.
+
+
+Shader version: 300
+ERROR: node is still EOpNull!
+0:6 Function Definition: main( (global void)
+0:6 Function Parameters:
+0:? Sequence
+0:11 'f' (temp highp float)
+0:14 'a' (temp 2-element array of mediump int)
+0:17 'c' (uniform mediump int)
+0:21 switch
+0:21 condition
+0:21 'c' (uniform mediump int)
+0:21 body
+0:21 Sequence
+0:23 case: with expression
+0:23 Constant:
+0:23 2 (const int)
+0:21 Sequence
+0:21 Branch: Break
+0:26 switch
+0:26 condition
+0:26 'c' (uniform mediump int)
+0:26 body
+0:26 Sequence
+0:28 Sequence
+0:28 move second child to first child (temp highp float)
+0:28 'f' (temp highp float)
+0:28 sine (global highp float)
+0:28 'x' (smooth in highp float)
+0:29 case: with expression
+0:29 Constant:
+0:29 2 (const int)
+0:? Sequence
+0:30 move second child to first child (temp highp float)
+0:30 'f' (temp highp float)
+0:30 cosine (global highp float)
+0:30 'x' (smooth in highp float)
+0:31 Branch: Break
+0:34 switch
+0:34 condition
+0:34 'c' (uniform mediump int)
+0:34 body
+0:34 Sequence
+0:35 default:
+0:? Sequence
+0:36 Branch: Break
+0:37 case: with expression
+0:37 Constant:
+0:37 1 (const int)
+0:? Sequence
+0:38 move second child to first child (temp highp float)
+0:38 'f' (temp highp float)
+0:38 sine (global highp float)
+0:38 'x' (smooth in highp float)
+0:39 Branch: Break
+0:40 case: with expression
+0:40 Constant:
+0:40 2 (const int)
+0:? Sequence
+0:41 move second child to first child (temp highp float)
+0:41 'f' (temp highp float)
+0:41 cosine (global highp float)
+0:41 'x' (smooth in highp float)
+0:42 Branch: Break
+0:43 default:
+0:? Sequence
+0:44 move second child to first child (temp highp float)
+0:44 'f' (temp highp float)
+0:44 tangent (global highp float)
+0:44 'x' (smooth in highp float)
+0:47 switch
+0:47 condition
+0:47 'c' (uniform mediump int)
+0:47 body
+0:47 Sequence
+0:48 case: with expression
+0:48 Constant:
+0:48 1 (const int)
+0:? Sequence
+0:49 move second child to first child (temp highp float)
+0:49 'f' (temp highp float)
+0:49 sine (global highp float)
+0:49 'x' (smooth in highp float)
+0:50 Branch: Break
+0:51 case: with expression
+0:51 Constant:
+0:51 2 (const int)
+0:? Sequence
+0:52 switch
+0:52 condition
+0:52 'd' (uniform mediump int)
+0:52 body
+0:52 Sequence
+0:53 case: with expression
+0:53 Constant:
+0:53 1 (const int)
+0:? Sequence
+0:54 move second child to first child (temp highp float)
+0:54 'f' (temp highp float)
+0:54 component-wise multiply (temp highp float)
+0:54 component-wise multiply (temp highp float)
+0:54 'x' (smooth in highp float)
+0:54 'x' (smooth in highp float)
+0:54 'x' (smooth in highp float)
+0:55 Branch: Break
+0:56 case: with expression
+0:56 Constant:
+0:56 2 (const int)
+0:? Sequence
+0:57 move second child to first child (temp highp float)
+0:57 'f' (temp highp float)
+0:57 component-wise multiply (temp highp float)
+0:57 'x' (smooth in highp float)
+0:57 'x' (smooth in highp float)
+0:58 Branch: Break
+0:60 Branch: Break
+0:61 default:
+0:? Sequence
+0:62 move second child to first child (temp highp float)
+0:62 'f' (temp highp float)
+0:62 tangent (global highp float)
+0:62 'x' (smooth in highp float)
+0:63 case: with expression
+0:63 Constant:
+0:63 1 (const int)
+0:? Sequence
+0:64 Branch: Break
+0:65 case: with expression
+0:65 Constant:
+0:65 3.800000
+0:? Sequence
+0:66 Branch: Break
+0:67 case: with expression
+0:67 'c' (uniform mediump int)
+0:? Sequence
+0:68 Branch: Break
+0:71 switch
+0:71 condition
+0:71 'c' (uniform mediump int)
+0:71 body
+0:71 Sequence
+0:72 case: with expression
+0:72 Constant:
+0:72 1 (const int)
+0:? Sequence
+0:73 move second child to first child (temp highp float)
+0:73 'f' (temp highp float)
+0:73 sine (global highp float)
+0:73 'x' (smooth in highp float)
+0:74 Branch: Break
+0:75 case: with expression
+0:75 Constant:
+0:75 2 (const int)
+0:? Sequence
+0:76 switch
+0:76 condition
+0:76 'd' (uniform mediump int)
+0:76 body
+0:76 Sequence
+0:77 case: with expression
+0:77 Constant:
+0:77 1 (const int)
+0:? Sequence
+0:78 move second child to first child (temp highp float)
+0:78 'f' (temp highp float)
+0:78 component-wise multiply (temp highp float)
+0:78 component-wise multiply (temp highp float)
+0:78 'x' (smooth in highp float)
+0:78 'x' (smooth in highp float)
+0:78 'x' (smooth in highp float)
+0:79 Branch: Break
+0:80 case: with expression
+0:80 Constant:
+0:80 2 (const int)
+0:? Sequence
+0:81 move second child to first child (temp highp float)
+0:81 'f' (temp highp float)
+0:81 component-wise multiply (temp highp float)
+0:81 'x' (smooth in highp float)
+0:81 'x' (smooth in highp float)
+0:82 Branch: Break
+0:84 Branch: Break
+0:85 default:
+0:? Sequence
+0:86 move second child to first child (temp highp float)
+0:86 'f' (temp highp float)
+0:86 tangent (global highp float)
+0:86 'x' (smooth in highp float)
+0:89 Branch: Break
+0:91 switch
+0:91 condition
+0:91 'c' (uniform mediump int)
+0:91 body
+0:91 Sequence
+0:92 case: with expression
+0:92 Constant:
+0:92 1 (const int)
+0:? Sequence
+0:93 move second child to first child (temp highp float)
+0:93 'f' (temp highp float)
+0:93 sine (global highp float)
+0:93 'x' (smooth in highp float)
+0:94 Branch: Break
+0:95 case: with expression
+0:95 Constant:
+0:95 2 (const int)
+0:? Sequence
+0:96 switch
+0:96 condition
+0:96 'd' (uniform mediump int)
+0:96 body
+0:96 Sequence
+0:97 case: with expression
+0:97 Constant:
+0:97 1 (const int)
+0:? Sequence
+0:? Sequence
+0:100 Branch: Break
+0:102 move second child to first child (temp highp float)
+0:102 'f' (temp highp float)
+0:102 component-wise multiply (temp highp float)
+0:102 component-wise multiply (temp highp float)
+0:102 'x' (smooth in highp float)
+0:102 'x' (smooth in highp float)
+0:102 'x' (smooth in highp float)
+0:103 Test condition and select (temp void)
+0:103 Condition
+0:103 Compare Less Than (temp bool)
+0:103 'c' (uniform mediump int)
+0:103 'd' (uniform mediump int)
+0:103 true case
+0:? Sequence
+0:105 move second child to first child (temp highp float)
+0:105 'f' (temp highp float)
+0:105 component-wise multiply (temp highp float)
+0:105 'x' (smooth in highp float)
+0:105 'x' (smooth in highp float)
+0:107 Test condition and select (temp void)
+0:107 Condition
+0:107 Compare Less Than (temp bool)
+0:107 'd' (uniform mediump int)
+0:107 'c' (uniform mediump int)
+0:107 true case is null
+0:109 Branch: Break
+0:111 Branch: Break
+0:112 case: with expression
+0:112 Constant:
+0:112 4 (const int)
+0:? Sequence
+0:113 move second child to first child (temp highp float)
+0:113 'f' (temp highp float)
+0:113 tangent (global highp float)
+0:113 'x' (smooth in highp float)
+0:114 Test condition and select (temp void)
+0:114 Condition
+0:114 Compare Less Than (temp bool)
+0:114 'f' (temp highp float)
+0:114 Constant:
+0:114 0.000000
+0:114 true case is null
+0:116 Branch: Break
+0:122 switch
+0:122 condition
+0:122 Constant:
+0:122 0 (const int)
+0:122 body
+0:122 Sequence
+0:123 default:
+0:? Sequence
+0:124 Sequence
+0:124 move second child to first child (temp mediump int)
+0:124 'onlyInSwitch' (temp mediump int)
+0:124 Constant:
+0:124 0 (const int)
+0:126 'onlyInSwitch' (temp float)
+0:128 switch
+0:128 condition
+0:128 Constant:
+0:128 0 (const int)
+0:128 body
+0:128 Sequence
+0:129 default:
+0:128 Sequence
+0:128 Branch: Break
+0:133 switch
+0:133 condition
+0:133 'c' (uniform mediump int)
+0:133 body
+0:133 Sequence
+0:134 case: with expression
+0:134 Constant:
+0:134 1 (const int)
+0:? Sequence
+0:? Sequence
+0:137 Branch: Break
+0:139 case: with expression
+0:139 Constant:
+0:139 2 (const int)
+0:? Sequence
+0:140 'nestedX' (temp float)
+0:143 Branch: Break
+0:144 case: with expression
+0:144 Constant:
+0:144 3 (const int)
+0:? Sequence
+0:146 Branch: Break
+0:147 Branch: Break
+0:148 case: with expression
+0:148 Constant:
+0:148 4 (const int)
+0:? Sequence
+0:149 Sequence
+0:149 move second child to first child (temp mediump int)
+0:149 'linearY' (temp mediump int)
+0:149 'linearZ' (temp mediump int)
+0:150 Branch: Break
+0:151 case: with expression
+0:151 Constant:
+0:151 5 (const int)
+0:? Sequence
+0:153 Branch: Break
+0:154 case: with expression
+0:154 Constant:
+0:154 6 (const int)
+0:? Sequence
+0:155 Constant:
+0:155 4 (const int)
+0:157 'nestedZ' (temp float)
+0:? Linker Objects
+0:? 'c' (uniform mediump int)
+0:? 'd' (uniform mediump int)
+0:? 'x' (smooth in highp float)
+
+
+Linked fragment stage:
+
+
+Shader version: 300
+ERROR: node is still EOpNull!
+0:6 Function Definition: main( (global void)
+0:6 Function Parameters:
+0:? Sequence
+0:11 'f' (temp highp float)
+0:14 'a' (temp 2-element array of mediump int)
+0:17 'c' (uniform mediump int)
+0:21 switch
+0:21 condition
+0:21 'c' (uniform mediump int)
+0:21 body
+0:21 Sequence
+0:23 case: with expression
+0:23 Constant:
+0:23 2 (const int)
+0:21 Sequence
+0:21 Branch: Break
+0:26 switch
+0:26 condition
+0:26 'c' (uniform mediump int)
+0:26 body
+0:26 Sequence
+0:28 Sequence
+0:28 move second child to first child (temp highp float)
+0:28 'f' (temp highp float)
+0:28 sine (global highp float)
+0:28 'x' (smooth in highp float)
+0:29 case: with expression
+0:29 Constant:
+0:29 2 (const int)
+0:? Sequence
+0:30 move second child to first child (temp highp float)
+0:30 'f' (temp highp float)
+0:30 cosine (global highp float)
+0:30 'x' (smooth in highp float)
+0:31 Branch: Break
+0:34 switch
+0:34 condition
+0:34 'c' (uniform mediump int)
+0:34 body
+0:34 Sequence
+0:35 default:
+0:? Sequence
+0:36 Branch: Break
+0:37 case: with expression
+0:37 Constant:
+0:37 1 (const int)
+0:? Sequence
+0:38 move second child to first child (temp highp float)
+0:38 'f' (temp highp float)
+0:38 sine (global highp float)
+0:38 'x' (smooth in highp float)
+0:39 Branch: Break
+0:40 case: with expression
+0:40 Constant:
+0:40 2 (const int)
+0:? Sequence
+0:41 move second child to first child (temp highp float)
+0:41 'f' (temp highp float)
+0:41 cosine (global highp float)
+0:41 'x' (smooth in highp float)
+0:42 Branch: Break
+0:43 default:
+0:? Sequence
+0:44 move second child to first child (temp highp float)
+0:44 'f' (temp highp float)
+0:44 tangent (global highp float)
+0:44 'x' (smooth in highp float)
+0:47 switch
+0:47 condition
+0:47 'c' (uniform mediump int)
+0:47 body
+0:47 Sequence
+0:48 case: with expression
+0:48 Constant:
+0:48 1 (const int)
+0:? Sequence
+0:49 move second child to first child (temp highp float)
+0:49 'f' (temp highp float)
+0:49 sine (global highp float)
+0:49 'x' (smooth in highp float)
+0:50 Branch: Break
+0:51 case: with expression
+0:51 Constant:
+0:51 2 (const int)
+0:? Sequence
+0:52 switch
+0:52 condition
+0:52 'd' (uniform mediump int)
+0:52 body
+0:52 Sequence
+0:53 case: with expression
+0:53 Constant:
+0:53 1 (const int)
+0:? Sequence
+0:54 move second child to first child (temp highp float)
+0:54 'f' (temp highp float)
+0:54 component-wise multiply (temp highp float)
+0:54 component-wise multiply (temp highp float)
+0:54 'x' (smooth in highp float)
+0:54 'x' (smooth in highp float)
+0:54 'x' (smooth in highp float)
+0:55 Branch: Break
+0:56 case: with expression
+0:56 Constant:
+0:56 2 (const int)
+0:? Sequence
+0:57 move second child to first child (temp highp float)
+0:57 'f' (temp highp float)
+0:57 component-wise multiply (temp highp float)
+0:57 'x' (smooth in highp float)
+0:57 'x' (smooth in highp float)
+0:58 Branch: Break
+0:60 Branch: Break
+0:61 default:
+0:? Sequence
+0:62 move second child to first child (temp highp float)
+0:62 'f' (temp highp float)
+0:62 tangent (global highp float)
+0:62 'x' (smooth in highp float)
+0:63 case: with expression
+0:63 Constant:
+0:63 1 (const int)
+0:? Sequence
+0:64 Branch: Break
+0:65 case: with expression
+0:65 Constant:
+0:65 3.800000
+0:? Sequence
+0:66 Branch: Break
+0:67 case: with expression
+0:67 'c' (uniform mediump int)
+0:? Sequence
+0:68 Branch: Break
+0:71 switch
+0:71 condition
+0:71 'c' (uniform mediump int)
+0:71 body
+0:71 Sequence
+0:72 case: with expression
+0:72 Constant:
+0:72 1 (const int)
+0:? Sequence
+0:73 move second child to first child (temp highp float)
+0:73 'f' (temp highp float)
+0:73 sine (global highp float)
+0:73 'x' (smooth in highp float)
+0:74 Branch: Break
+0:75 case: with expression
+0:75 Constant:
+0:75 2 (const int)
+0:? Sequence
+0:76 switch
+0:76 condition
+0:76 'd' (uniform mediump int)
+0:76 body
+0:76 Sequence
+0:77 case: with expression
+0:77 Constant:
+0:77 1 (const int)
+0:? Sequence
+0:78 move second child to first child (temp highp float)
+0:78 'f' (temp highp float)
+0:78 component-wise multiply (temp highp float)
+0:78 component-wise multiply (temp highp float)
+0:78 'x' (smooth in highp float)
+0:78 'x' (smooth in highp float)
+0:78 'x' (smooth in highp float)
+0:79 Branch: Break
+0:80 case: with expression
+0:80 Constant:
+0:80 2 (const int)
+0:? Sequence
+0:81 move second child to first child (temp highp float)
+0:81 'f' (temp highp float)
+0:81 component-wise multiply (temp highp float)
+0:81 'x' (smooth in highp float)
+0:81 'x' (smooth in highp float)
+0:82 Branch: Break
+0:84 Branch: Break
+0:85 default:
+0:? Sequence
+0:86 move second child to first child (temp highp float)
+0:86 'f' (temp highp float)
+0:86 tangent (global highp float)
+0:86 'x' (smooth in highp float)
+0:89 Branch: Break
+0:91 switch
+0:91 condition
+0:91 'c' (uniform mediump int)
+0:91 body
+0:91 Sequence
+0:92 case: with expression
+0:92 Constant:
+0:92 1 (const int)
+0:? Sequence
+0:93 move second child to first child (temp highp float)
+0:93 'f' (temp highp float)
+0:93 sine (global highp float)
+0:93 'x' (smooth in highp float)
+0:94 Branch: Break
+0:95 case: with expression
+0:95 Constant:
+0:95 2 (const int)
+0:? Sequence
+0:96 switch
+0:96 condition
+0:96 'd' (uniform mediump int)
+0:96 body
+0:96 Sequence
+0:97 case: with expression
+0:97 Constant:
+0:97 1 (const int)
+0:? Sequence
+0:? Sequence
+0:100 Branch: Break
+0:102 move second child to first child (temp highp float)
+0:102 'f' (temp highp float)
+0:102 component-wise multiply (temp highp float)
+0:102 component-wise multiply (temp highp float)
+0:102 'x' (smooth in highp float)
+0:102 'x' (smooth in highp float)
+0:102 'x' (smooth in highp float)
+0:103 Test condition and select (temp void)
+0:103 Condition
+0:103 Compare Less Than (temp bool)
+0:103 'c' (uniform mediump int)
+0:103 'd' (uniform mediump int)
+0:103 true case
+0:? Sequence
+0:105 move second child to first child (temp highp float)
+0:105 'f' (temp highp float)
+0:105 component-wise multiply (temp highp float)
+0:105 'x' (smooth in highp float)
+0:105 'x' (smooth in highp float)
+0:107 Test condition and select (temp void)
+0:107 Condition
+0:107 Compare Less Than (temp bool)
+0:107 'd' (uniform mediump int)
+0:107 'c' (uniform mediump int)
+0:107 true case is null
+0:109 Branch: Break
+0:111 Branch: Break
+0:112 case: with expression
+0:112 Constant:
+0:112 4 (const int)
+0:? Sequence
+0:113 move second child to first child (temp highp float)
+0:113 'f' (temp highp float)
+0:113 tangent (global highp float)
+0:113 'x' (smooth in highp float)
+0:114 Test condition and select (temp void)
+0:114 Condition
+0:114 Compare Less Than (temp bool)
+0:114 'f' (temp highp float)
+0:114 Constant:
+0:114 0.000000
+0:114 true case is null
+0:116 Branch: Break
+0:122 switch
+0:122 condition
+0:122 Constant:
+0:122 0 (const int)
+0:122 body
+0:122 Sequence
+0:123 default:
+0:? Sequence
+0:124 Sequence
+0:124 move second child to first child (temp mediump int)
+0:124 'onlyInSwitch' (temp mediump int)
+0:124 Constant:
+0:124 0 (const int)
+0:126 'onlyInSwitch' (temp float)
+0:128 switch
+0:128 condition
+0:128 Constant:
+0:128 0 (const int)
+0:128 body
+0:128 Sequence
+0:129 default:
+0:128 Sequence
+0:128 Branch: Break
+0:133 switch
+0:133 condition
+0:133 'c' (uniform mediump int)
+0:133 body
+0:133 Sequence
+0:134 case: with expression
+0:134 Constant:
+0:134 1 (const int)
+0:? Sequence
+0:? Sequence
+0:137 Branch: Break
+0:139 case: with expression
+0:139 Constant:
+0:139 2 (const int)
+0:? Sequence
+0:140 'nestedX' (temp float)
+0:143 Branch: Break
+0:144 case: with expression
+0:144 Constant:
+0:144 3 (const int)
+0:? Sequence
+0:146 Branch: Break
+0:147 Branch: Break
+0:148 case: with expression
+0:148 Constant:
+0:148 4 (const int)
+0:? Sequence
+0:149 Sequence
+0:149 move second child to first child (temp mediump int)
+0:149 'linearY' (temp mediump int)
+0:149 'linearZ' (temp mediump int)
+0:150 Branch: Break
+0:151 case: with expression
+0:151 Constant:
+0:151 5 (const int)
+0:? Sequence
+0:153 Branch: Break
+0:154 case: with expression
+0:154 Constant:
+0:154 6 (const int)
+0:? Sequence
+0:155 Constant:
+0:155 4 (const int)
+0:157 'nestedZ' (temp float)
+0:? Linker Objects
+0:? 'c' (uniform mediump int)
+0:? 'd' (uniform mediump int)
+0:? 'x' (smooth in highp float)
+
diff --git a/chromium/third_party/glslang/src/Test/baseResults/swizzle.frag.out b/chromium/third_party/glslang/src/Test/baseResults/swizzle.frag.out
new file mode 100644
index 00000000000..8e1b759c0b7
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/swizzle.frag.out
@@ -0,0 +1,423 @@
+swizzle.frag
+Shader version: 110
+0:? Sequence
+0:9 Function Definition: main( (global void)
+0:9 Function Parameters:
+0:11 Sequence
+0:11 Sequence
+0:11 move second child to first child (temp float)
+0:11 'blendscale' (temp float)
+0:11 Constant:
+0:11 1.789000
+0:13 Sequence
+0:13 move second child to first child (temp 4-component vector of float)
+0:13 'w' (temp 4-component vector of float)
+0:13 'u' (uniform 4-component vector of float)
+0:15 Sequence
+0:15 move second child to first child (temp 4-component vector of float)
+0:15 'w_dep' (temp 4-component vector of float)
+0:15 'u' (uniform 4-component vector of float)
+0:16 Sequence
+0:16 move second child to first child (temp 4-component vector of float)
+0:16 'w_reorder' (temp 4-component vector of float)
+0:16 'u' (uniform 4-component vector of float)
+0:17 Sequence
+0:17 move second child to first child (temp 4-component vector of float)
+0:17 'w2' (temp 4-component vector of float)
+0:17 'u' (uniform 4-component vector of float)
+0:18 Sequence
+0:18 move second child to first child (temp 4-component vector of float)
+0:18 'w_flow' (temp 4-component vector of float)
+0:18 'u' (uniform 4-component vector of float)
+0:20 move second child to first child (temp float)
+0:20 direct index (temp float)
+0:20 'w_reorder' (temp 4-component vector of float)
+0:20 Constant:
+0:20 2 (const int)
+0:20 'blendscale' (temp float)
+0:22 move second child to first child (temp 2-component vector of float)
+0:22 vector swizzle (temp 2-component vector of float)
+0:22 'w' (temp 4-component vector of float)
+0:22 Sequence
+0:22 Constant:
+0:22 3 (const int)
+0:22 Constant:
+0:22 1 (const int)
+0:22 't' (smooth in 2-component vector of float)
+0:24 move second child to first child (temp float)
+0:24 direct index (temp float)
+0:24 'w_reorder' (temp 4-component vector of float)
+0:24 Constant:
+0:24 0 (const int)
+0:24 'blendscale' (temp float)
+0:26 move second child to first child (temp 4-component vector of float)
+0:26 vector swizzle (temp 4-component vector of float)
+0:26 'w2' (temp 4-component vector of float)
+0:26 Sequence
+0:26 Constant:
+0:26 0 (const int)
+0:26 Constant:
+0:26 1 (const int)
+0:26 Constant:
+0:26 2 (const int)
+0:26 Constant:
+0:26 3 (const int)
+0:26 vector swizzle (temp 4-component vector of float)
+0:26 'u' (uniform 4-component vector of float)
+0:26 Sequence
+0:26 Constant:
+0:26 2 (const int)
+0:26 Constant:
+0:26 3 (const int)
+0:26 Constant:
+0:26 0 (const int)
+0:26 Constant:
+0:26 1 (const int)
+0:28 move second child to first child (temp float)
+0:28 direct index (temp float)
+0:28 'w_reorder' (temp 4-component vector of float)
+0:28 Constant:
+0:28 1 (const int)
+0:28 'blendscale' (temp float)
+0:30 move second child to first child (temp 2-component vector of float)
+0:30 vector swizzle (temp 2-component vector of float)
+0:30 'w_dep' (temp 4-component vector of float)
+0:30 Sequence
+0:30 Constant:
+0:30 0 (const int)
+0:30 Constant:
+0:30 1 (const int)
+0:30 vector swizzle (temp 2-component vector of float)
+0:30 'w2' (temp 4-component vector of float)
+0:30 Sequence
+0:30 Constant:
+0:30 0 (const int)
+0:30 Constant:
+0:30 2 (const int)
+0:31 move second child to first child (temp 2-component vector of float)
+0:31 vector swizzle (temp 2-component vector of float)
+0:31 'w_dep' (temp 4-component vector of float)
+0:31 Sequence
+0:31 Constant:
+0:31 2 (const int)
+0:31 Constant:
+0:31 3 (const int)
+0:31 't' (smooth in 2-component vector of float)
+0:33 move second child to first child (temp 2-component vector of float)
+0:33 vector swizzle (temp 2-component vector of float)
+0:33 'w_undef' (temp 4-component vector of float)
+0:33 Sequence
+0:33 Constant:
+0:33 0 (const int)
+0:33 Constant:
+0:33 1 (const int)
+0:33 vector swizzle (temp 2-component vector of float)
+0:33 'u' (uniform 4-component vector of float)
+0:33 Sequence
+0:33 Constant:
+0:33 2 (const int)
+0:33 Constant:
+0:33 3 (const int)
+0:35 Test condition and select (temp void)
+0:35 Condition
+0:35 'p' (uniform bool)
+0:35 true case
+0:36 move second child to first child (temp float)
+0:36 direct index (temp float)
+0:36 'w_flow' (temp 4-component vector of float)
+0:36 Constant:
+0:36 0 (const int)
+0:36 direct index (temp float)
+0:36 't' (smooth in 2-component vector of float)
+0:36 Constant:
+0:36 0 (const int)
+0:35 false case
+0:38 move second child to first child (temp float)
+0:38 direct index (temp float)
+0:38 'w_flow' (temp 4-component vector of float)
+0:38 Constant:
+0:38 0 (const int)
+0:38 direct index (temp float)
+0:38 't' (smooth in 2-component vector of float)
+0:38 Constant:
+0:38 1 (const int)
+0:40 move second child to first child (temp 4-component vector of float)
+0:40 'gl_FragColor' (fragColor 4-component vector of float FragColor)
+0:40 mix (global 4-component vector of float)
+0:40 'w_reorder' (temp 4-component vector of float)
+0:40 'w_undef' (temp 4-component vector of float)
+0:40 component-wise multiply (temp 4-component vector of float)
+0:40 component-wise multiply (temp 4-component vector of float)
+0:40 component-wise multiply (temp 4-component vector of float)
+0:40 'w' (temp 4-component vector of float)
+0:40 'w2' (temp 4-component vector of float)
+0:40 'w_dep' (temp 4-component vector of float)
+0:40 'w_flow' (temp 4-component vector of float)
+0:42 Sequence
+0:42 move second child to first child (temp 2-component vector of float)
+0:42 'c' (temp 2-component vector of float)
+0:42 't' (smooth in 2-component vector of float)
+0:43 Sequence
+0:43 move second child to first child (temp 4-component vector of float)
+0:43 'rep' (temp 4-component vector of float)
+0:43 Constant:
+0:43 0.000000
+0:43 0.000000
+0:43 0.000000
+0:43 1.000000
+0:45 Test condition and select (temp void)
+0:45 Condition
+0:45 Compare Less Than (temp bool)
+0:45 direct index (temp float)
+0:45 'c' (temp 2-component vector of float)
+0:45 Constant:
+0:45 0 (const int)
+0:45 Constant:
+0:45 0.000000
+0:45 true case
+0:46 multiply second child into first child (temp float)
+0:46 direct index (temp float)
+0:46 'c' (temp 2-component vector of float)
+0:46 Constant:
+0:46 0 (const int)
+0:46 Constant:
+0:46 -1.000000
+0:48 Test condition and select (temp void)
+0:48 Condition
+0:48 Compare Less Than or Equal (temp bool)
+0:48 direct index (temp float)
+0:48 'c' (temp 2-component vector of float)
+0:48 Constant:
+0:48 0 (const int)
+0:48 Constant:
+0:48 1.000000
+0:48 true case
+0:49 move second child to first child (temp float)
+0:49 direct index (temp float)
+0:49 'rep' (temp 4-component vector of float)
+0:49 Constant:
+0:49 0 (const int)
+0:49 Constant:
+0:49 3.400000
+0:51 add second child into first child (temp 4-component vector of float)
+0:51 'gl_FragColor' (fragColor 4-component vector of float FragColor)
+0:51 'rep' (temp 4-component vector of float)
+0:? Linker Objects
+0:? 'blend' (uniform float)
+0:? 'u' (uniform 4-component vector of float)
+0:? 'p' (uniform bool)
+0:? 't' (smooth in 2-component vector of float)
+
+
+Linked fragment stage:
+
+
+Shader version: 110
+0:? Sequence
+0:9 Function Definition: main( (global void)
+0:9 Function Parameters:
+0:11 Sequence
+0:11 Sequence
+0:11 move second child to first child (temp float)
+0:11 'blendscale' (temp float)
+0:11 Constant:
+0:11 1.789000
+0:13 Sequence
+0:13 move second child to first child (temp 4-component vector of float)
+0:13 'w' (temp 4-component vector of float)
+0:13 'u' (uniform 4-component vector of float)
+0:15 Sequence
+0:15 move second child to first child (temp 4-component vector of float)
+0:15 'w_dep' (temp 4-component vector of float)
+0:15 'u' (uniform 4-component vector of float)
+0:16 Sequence
+0:16 move second child to first child (temp 4-component vector of float)
+0:16 'w_reorder' (temp 4-component vector of float)
+0:16 'u' (uniform 4-component vector of float)
+0:17 Sequence
+0:17 move second child to first child (temp 4-component vector of float)
+0:17 'w2' (temp 4-component vector of float)
+0:17 'u' (uniform 4-component vector of float)
+0:18 Sequence
+0:18 move second child to first child (temp 4-component vector of float)
+0:18 'w_flow' (temp 4-component vector of float)
+0:18 'u' (uniform 4-component vector of float)
+0:20 move second child to first child (temp float)
+0:20 direct index (temp float)
+0:20 'w_reorder' (temp 4-component vector of float)
+0:20 Constant:
+0:20 2 (const int)
+0:20 'blendscale' (temp float)
+0:22 move second child to first child (temp 2-component vector of float)
+0:22 vector swizzle (temp 2-component vector of float)
+0:22 'w' (temp 4-component vector of float)
+0:22 Sequence
+0:22 Constant:
+0:22 3 (const int)
+0:22 Constant:
+0:22 1 (const int)
+0:22 't' (smooth in 2-component vector of float)
+0:24 move second child to first child (temp float)
+0:24 direct index (temp float)
+0:24 'w_reorder' (temp 4-component vector of float)
+0:24 Constant:
+0:24 0 (const int)
+0:24 'blendscale' (temp float)
+0:26 move second child to first child (temp 4-component vector of float)
+0:26 vector swizzle (temp 4-component vector of float)
+0:26 'w2' (temp 4-component vector of float)
+0:26 Sequence
+0:26 Constant:
+0:26 0 (const int)
+0:26 Constant:
+0:26 1 (const int)
+0:26 Constant:
+0:26 2 (const int)
+0:26 Constant:
+0:26 3 (const int)
+0:26 vector swizzle (temp 4-component vector of float)
+0:26 'u' (uniform 4-component vector of float)
+0:26 Sequence
+0:26 Constant:
+0:26 2 (const int)
+0:26 Constant:
+0:26 3 (const int)
+0:26 Constant:
+0:26 0 (const int)
+0:26 Constant:
+0:26 1 (const int)
+0:28 move second child to first child (temp float)
+0:28 direct index (temp float)
+0:28 'w_reorder' (temp 4-component vector of float)
+0:28 Constant:
+0:28 1 (const int)
+0:28 'blendscale' (temp float)
+0:30 move second child to first child (temp 2-component vector of float)
+0:30 vector swizzle (temp 2-component vector of float)
+0:30 'w_dep' (temp 4-component vector of float)
+0:30 Sequence
+0:30 Constant:
+0:30 0 (const int)
+0:30 Constant:
+0:30 1 (const int)
+0:30 vector swizzle (temp 2-component vector of float)
+0:30 'w2' (temp 4-component vector of float)
+0:30 Sequence
+0:30 Constant:
+0:30 0 (const int)
+0:30 Constant:
+0:30 2 (const int)
+0:31 move second child to first child (temp 2-component vector of float)
+0:31 vector swizzle (temp 2-component vector of float)
+0:31 'w_dep' (temp 4-component vector of float)
+0:31 Sequence
+0:31 Constant:
+0:31 2 (const int)
+0:31 Constant:
+0:31 3 (const int)
+0:31 't' (smooth in 2-component vector of float)
+0:33 move second child to first child (temp 2-component vector of float)
+0:33 vector swizzle (temp 2-component vector of float)
+0:33 'w_undef' (temp 4-component vector of float)
+0:33 Sequence
+0:33 Constant:
+0:33 0 (const int)
+0:33 Constant:
+0:33 1 (const int)
+0:33 vector swizzle (temp 2-component vector of float)
+0:33 'u' (uniform 4-component vector of float)
+0:33 Sequence
+0:33 Constant:
+0:33 2 (const int)
+0:33 Constant:
+0:33 3 (const int)
+0:35 Test condition and select (temp void)
+0:35 Condition
+0:35 'p' (uniform bool)
+0:35 true case
+0:36 move second child to first child (temp float)
+0:36 direct index (temp float)
+0:36 'w_flow' (temp 4-component vector of float)
+0:36 Constant:
+0:36 0 (const int)
+0:36 direct index (temp float)
+0:36 't' (smooth in 2-component vector of float)
+0:36 Constant:
+0:36 0 (const int)
+0:35 false case
+0:38 move second child to first child (temp float)
+0:38 direct index (temp float)
+0:38 'w_flow' (temp 4-component vector of float)
+0:38 Constant:
+0:38 0 (const int)
+0:38 direct index (temp float)
+0:38 't' (smooth in 2-component vector of float)
+0:38 Constant:
+0:38 1 (const int)
+0:40 move second child to first child (temp 4-component vector of float)
+0:40 'gl_FragColor' (fragColor 4-component vector of float FragColor)
+0:40 mix (global 4-component vector of float)
+0:40 'w_reorder' (temp 4-component vector of float)
+0:40 'w_undef' (temp 4-component vector of float)
+0:40 component-wise multiply (temp 4-component vector of float)
+0:40 component-wise multiply (temp 4-component vector of float)
+0:40 component-wise multiply (temp 4-component vector of float)
+0:40 'w' (temp 4-component vector of float)
+0:40 'w2' (temp 4-component vector of float)
+0:40 'w_dep' (temp 4-component vector of float)
+0:40 'w_flow' (temp 4-component vector of float)
+0:42 Sequence
+0:42 move second child to first child (temp 2-component vector of float)
+0:42 'c' (temp 2-component vector of float)
+0:42 't' (smooth in 2-component vector of float)
+0:43 Sequence
+0:43 move second child to first child (temp 4-component vector of float)
+0:43 'rep' (temp 4-component vector of float)
+0:43 Constant:
+0:43 0.000000
+0:43 0.000000
+0:43 0.000000
+0:43 1.000000
+0:45 Test condition and select (temp void)
+0:45 Condition
+0:45 Compare Less Than (temp bool)
+0:45 direct index (temp float)
+0:45 'c' (temp 2-component vector of float)
+0:45 Constant:
+0:45 0 (const int)
+0:45 Constant:
+0:45 0.000000
+0:45 true case
+0:46 multiply second child into first child (temp float)
+0:46 direct index (temp float)
+0:46 'c' (temp 2-component vector of float)
+0:46 Constant:
+0:46 0 (const int)
+0:46 Constant:
+0:46 -1.000000
+0:48 Test condition and select (temp void)
+0:48 Condition
+0:48 Compare Less Than or Equal (temp bool)
+0:48 direct index (temp float)
+0:48 'c' (temp 2-component vector of float)
+0:48 Constant:
+0:48 0 (const int)
+0:48 Constant:
+0:48 1.000000
+0:48 true case
+0:49 move second child to first child (temp float)
+0:49 direct index (temp float)
+0:49 'rep' (temp 4-component vector of float)
+0:49 Constant:
+0:49 0 (const int)
+0:49 Constant:
+0:49 3.400000
+0:51 add second child into first child (temp 4-component vector of float)
+0:51 'gl_FragColor' (fragColor 4-component vector of float FragColor)
+0:51 'rep' (temp 4-component vector of float)
+0:? Linker Objects
+0:? 'blend' (uniform float)
+0:? 'u' (uniform 4-component vector of float)
+0:? 'p' (uniform bool)
+0:? 't' (smooth in 2-component vector of float)
+
diff --git a/chromium/third_party/glslang/src/Test/baseResults/syntaxError.frag.out b/chromium/third_party/glslang/src/Test/baseResults/syntaxError.frag.out
new file mode 100644
index 00000000000..af0e7323539
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/syntaxError.frag.out
@@ -0,0 +1,24 @@
+syntaxError.frag
+ERROR: 0:9: 'vec5' : undeclared identifier
+ERROR: 0:9: '' : syntax error
+ERROR: 2 compilation errors. No code generated.
+
+
+Shader version: 120
+ERROR: node is still EOpNull!
+0:? Linker Objects
+0:? 'bigColor' (uniform 4-component vector of float)
+0:? 'BaseColor' (smooth in 4-component vector of float)
+0:? 'd' (uniform float)
+
+
+Linked fragment stage:
+
+
+Shader version: 120
+ERROR: node is still EOpNull!
+0:? Linker Objects
+0:? 'bigColor' (uniform 4-component vector of float)
+0:? 'BaseColor' (smooth in 4-component vector of float)
+0:? 'd' (uniform float)
+
diff --git a/chromium/third_party/glslang/src/Test/baseResults/test.conf b/chromium/third_party/glslang/src/Test/baseResults/test.conf
new file mode 100644
index 00000000000..f156c5c6d5c
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/test.conf
@@ -0,0 +1,92 @@
+MaxLights 32
+MaxClipPlanes 6
+MaxTextureUnits 32
+MaxTextureCoords 32
+MaxVertexAttribs 64
+MaxVertexUniformComponents 4096
+MaxVaryingFloats 64
+MaxVertexTextureImageUnits 32
+MaxCombinedTextureImageUnits 80
+MaxTextureImageUnits 32
+MaxFragmentUniformComponents 4096
+MaxDrawBuffers 32
+MaxVertexUniformVectors 128
+MaxVaryingVectors 8
+MaxFragmentUniformVectors 16
+MaxVertexOutputVectors 16
+MaxFragmentInputVectors 15
+MinProgramTexelOffset -8
+MaxProgramTexelOffset 7
+MaxClipDistances 8
+MaxComputeWorkGroupCountX 65535
+MaxComputeWorkGroupCountY 65535
+MaxComputeWorkGroupCountZ 65535
+MaxComputeWorkGroupSizeX 1024
+MaxComputeWorkGroupSizeY 1024
+MaxComputeWorkGroupSizeZ 64
+MaxComputeUniformComponents 1024
+MaxComputeTextureImageUnits 16
+MaxComputeImageUniforms 8
+MaxComputeAtomicCounters 8
+MaxComputeAtomicCounterBuffers 1
+MaxVaryingComponents 60
+MaxVertexOutputComponents 64
+MaxGeometryInputComponents 64
+MaxGeometryOutputComponents 128
+MaxFragmentInputComponents 128
+MaxImageUnits 8
+MaxCombinedImageUnitsAndFragmentOutputs 8
+MaxCombinedShaderOutputResources 8
+MaxImageSamples 0
+MaxVertexImageUniforms 0
+MaxTessControlImageUniforms 0
+MaxTessEvaluationImageUniforms 0
+MaxGeometryImageUniforms 0
+MaxFragmentImageUniforms 8
+MaxCombinedImageUniforms 8
+MaxGeometryTextureImageUnits 16
+MaxGeometryOutputVertices 256
+MaxGeometryTotalOutputComponents 1024
+MaxGeometryUniformComponents 1024
+MaxGeometryVaryingComponents 64
+MaxTessControlInputComponents 128
+MaxTessControlOutputComponents 128
+MaxTessControlTextureImageUnits 16
+MaxTessControlUniformComponents 1024
+MaxTessControlTotalOutputComponents 4096
+MaxTessEvaluationInputComponents 128
+MaxTessEvaluationOutputComponents 128
+MaxTessEvaluationTextureImageUnits 16
+MaxTessEvaluationUniformComponents 1024
+MaxTessPatchComponents 120
+MaxPatchVertices 32
+MaxTessGenLevel 64
+MaxViewports 16
+MaxVertexAtomicCounters 0
+MaxTessControlAtomicCounters 0
+MaxTessEvaluationAtomicCounters 0
+MaxGeometryAtomicCounters 0
+MaxFragmentAtomicCounters 8
+MaxCombinedAtomicCounters 8
+MaxAtomicCounterBindings 1
+MaxVertexAtomicCounterBuffers 0
+MaxTessControlAtomicCounterBuffers 0
+MaxTessEvaluationAtomicCounterBuffers 0
+MaxGeometryAtomicCounterBuffers 0
+MaxFragmentAtomicCounterBuffers 1
+MaxCombinedAtomicCounterBuffers 1
+MaxAtomicCounterBufferSize 16384
+MaxTransformFeedbackBuffers 4
+MaxTransformFeedbackInterleavedComponents 64
+MaxCullDistances 8
+MaxCombinedClipAndCullDistances 8
+MaxSamples 4
+nonInductiveForLoops 1
+whileLoops 1
+doWhileLoops 1
+generalUniformIndexing 1
+generalAttributeMatrixVectorIndexing 1
+generalVaryingIndexing 1
+generalSamplerIndexing 1
+generalVariableIndexing 1
+generalConstantMatrixVectorIndexing 1
diff --git a/chromium/third_party/glslang/src/Test/baseResults/test.frag.out b/chromium/third_party/glslang/src/Test/baseResults/test.frag.out
new file mode 100644
index 00000000000..e6b98766f36
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/test.frag.out
@@ -0,0 +1,115 @@
+test.frag
+Shader version: 110
+0:? Sequence
+0:13 Function Definition: main( (global void)
+0:13 Function Parameters:
+0:15 Sequence
+0:15 Sequence
+0:15 move second child to first child (temp float)
+0:15 'blendscale' (temp float)
+0:15 Constant:
+0:15 1.789000
+0:17 Sequence
+0:17 move second child to first child (temp 4-component vector of float)
+0:17 'v' (temp 4-component vector of float)
+0:17 vector swizzle (temp 4-component vector of float)
+0:17 texture (global 4-component vector of float)
+0:17 'texSampler2D' (uniform sampler2D)
+0:17 divide (temp 2-component vector of float)
+0:17 add (temp 2-component vector of float)
+0:17 't' (smooth in 2-component vector of float)
+0:17 'scale' (uniform 2-component vector of float)
+0:17 'scale' (uniform 2-component vector of float)
+0:17 Sequence
+0:17 Constant:
+0:17 3 (const int)
+0:17 Constant:
+0:17 2 (const int)
+0:17 Constant:
+0:17 1 (const int)
+0:17 Constant:
+0:17 0 (const int)
+0:19 Sequence
+0:19 move second child to first child (temp 4-component vector of float)
+0:19 'w' (temp 4-component vector of float)
+0:19 add (temp 4-component vector of float)
+0:19 texture (global 4-component vector of float)
+0:19 'texSampler3D' (uniform sampler3D)
+0:19 'coords' (smooth in 3-component vector of float)
+0:19 'v' (temp 4-component vector of float)
+0:21 move second child to first child (temp 4-component vector of float)
+0:21 'gl_FragColor' (fragColor 4-component vector of float FragColor)
+0:21 mix (global 4-component vector of float)
+0:21 'w' (temp 4-component vector of float)
+0:21 'u' (uniform 4-component vector of float)
+0:21 component-wise multiply (temp float)
+0:21 'blend' (uniform float)
+0:21 'blendscale' (temp float)
+0:? Linker Objects
+0:? 'texSampler2D' (uniform sampler2D)
+0:? 'texSampler3D' (uniform sampler3D)
+0:? 'blend' (uniform float)
+0:? 'scale' (uniform 2-component vector of float)
+0:? 'u' (uniform 4-component vector of float)
+0:? 't' (smooth in 2-component vector of float)
+0:? 'coords' (smooth in 3-component vector of float)
+
+
+Linked fragment stage:
+
+
+Shader version: 110
+0:? Sequence
+0:13 Function Definition: main( (global void)
+0:13 Function Parameters:
+0:15 Sequence
+0:15 Sequence
+0:15 move second child to first child (temp float)
+0:15 'blendscale' (temp float)
+0:15 Constant:
+0:15 1.789000
+0:17 Sequence
+0:17 move second child to first child (temp 4-component vector of float)
+0:17 'v' (temp 4-component vector of float)
+0:17 vector swizzle (temp 4-component vector of float)
+0:17 texture (global 4-component vector of float)
+0:17 'texSampler2D' (uniform sampler2D)
+0:17 divide (temp 2-component vector of float)
+0:17 add (temp 2-component vector of float)
+0:17 't' (smooth in 2-component vector of float)
+0:17 'scale' (uniform 2-component vector of float)
+0:17 'scale' (uniform 2-component vector of float)
+0:17 Sequence
+0:17 Constant:
+0:17 3 (const int)
+0:17 Constant:
+0:17 2 (const int)
+0:17 Constant:
+0:17 1 (const int)
+0:17 Constant:
+0:17 0 (const int)
+0:19 Sequence
+0:19 move second child to first child (temp 4-component vector of float)
+0:19 'w' (temp 4-component vector of float)
+0:19 add (temp 4-component vector of float)
+0:19 texture (global 4-component vector of float)
+0:19 'texSampler3D' (uniform sampler3D)
+0:19 'coords' (smooth in 3-component vector of float)
+0:19 'v' (temp 4-component vector of float)
+0:21 move second child to first child (temp 4-component vector of float)
+0:21 'gl_FragColor' (fragColor 4-component vector of float FragColor)
+0:21 mix (global 4-component vector of float)
+0:21 'w' (temp 4-component vector of float)
+0:21 'u' (uniform 4-component vector of float)
+0:21 component-wise multiply (temp float)
+0:21 'blend' (uniform float)
+0:21 'blendscale' (temp float)
+0:? Linker Objects
+0:? 'texSampler2D' (uniform sampler2D)
+0:? 'texSampler3D' (uniform sampler3D)
+0:? 'blend' (uniform float)
+0:? 'scale' (uniform 2-component vector of float)
+0:? 'u' (uniform 4-component vector of float)
+0:? 't' (smooth in 2-component vector of float)
+0:? 'coords' (smooth in 3-component vector of float)
+
diff --git a/chromium/third_party/glslang/src/Test/baseResults/texture.frag.out b/chromium/third_party/glslang/src/Test/baseResults/texture.frag.out
new file mode 100644
index 00000000000..5e886095d19
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/texture.frag.out
@@ -0,0 +1,564 @@
+texture.frag
+WARNING: 0:14: varying deprecated in version 130; may be removed in future release
+WARNING: 0:15: varying deprecated in version 130; may be removed in future release
+
+Shader version: 130
+0:? Sequence
+0:17 Function Definition: main( (global void)
+0:17 Function Parameters:
+0:19 Sequence
+0:19 Sequence
+0:19 move second child to first child (temp float)
+0:19 'blendscale' (temp float)
+0:19 Constant:
+0:19 1.789000
+0:20 Sequence
+0:20 move second child to first child (temp float)
+0:20 'bias' (temp float)
+0:20 Constant:
+0:20 2.000000
+0:21 Sequence
+0:21 move second child to first child (temp float)
+0:21 'lod' (temp float)
+0:21 Constant:
+0:21 3.000000
+0:22 Sequence
+0:22 move second child to first child (temp float)
+0:22 'proj' (temp float)
+0:22 Constant:
+0:22 2.000000
+0:23 Sequence
+0:23 move second child to first child (temp float)
+0:23 'coords1D' (temp float)
+0:23 Constant:
+0:23 1.789000
+0:24 Sequence
+0:24 move second child to first child (temp 3-component vector of float)
+0:24 'coords3D' (temp 3-component vector of float)
+0:24 Constant:
+0:24 1.789000
+0:24 2.718000
+0:24 3.453000
+0:25 Sequence
+0:25 move second child to first child (temp 4-component vector of float)
+0:25 'coords4D' (temp 4-component vector of float)
+0:25 Constant:
+0:25 1.789000
+0:25 2.718000
+0:25 3.453000
+0:25 2.000000
+0:26 Sequence
+0:26 move second child to first child (temp 4-component vector of float)
+0:26 'color' (temp 4-component vector of float)
+0:26 Constant:
+0:26 0.000000
+0:26 0.000000
+0:26 0.000000
+0:26 0.000000
+0:28 add second child into first child (temp 4-component vector of float)
+0:28 'color' (temp 4-component vector of float)
+0:28 texture (global 4-component vector of float)
+0:28 'texSampler1D' (uniform sampler1D)
+0:28 'coords1D' (temp float)
+0:29 add second child into first child (temp 4-component vector of float)
+0:29 'color' (temp 4-component vector of float)
+0:29 texture (global 4-component vector of float)
+0:29 'texSampler1D' (uniform sampler1D)
+0:29 'coords1D' (temp float)
+0:29 'bias' (temp float)
+0:30 add second child into first child (temp 4-component vector of float)
+0:30 'color' (temp 4-component vector of float)
+0:30 textureProj (global 4-component vector of float)
+0:30 'texSampler1D' (uniform sampler1D)
+0:30 'coords2D' (smooth in 2-component vector of float)
+0:31 add second child into first child (temp 4-component vector of float)
+0:31 'color' (temp 4-component vector of float)
+0:31 textureProj (global 4-component vector of float)
+0:31 'texSampler1D' (uniform sampler1D)
+0:31 'coords4D' (temp 4-component vector of float)
+0:32 add second child into first child (temp 4-component vector of float)
+0:32 'color' (temp 4-component vector of float)
+0:32 textureProj (global 4-component vector of float)
+0:32 'texSampler1D' (uniform sampler1D)
+0:32 'coords2D' (smooth in 2-component vector of float)
+0:32 'bias' (temp float)
+0:33 add second child into first child (temp 4-component vector of float)
+0:33 'color' (temp 4-component vector of float)
+0:33 textureProj (global 4-component vector of float)
+0:33 'texSampler1D' (uniform sampler1D)
+0:33 'coords4D' (temp 4-component vector of float)
+0:33 'bias' (temp float)
+0:35 add second child into first child (temp 4-component vector of float)
+0:35 'color' (temp 4-component vector of float)
+0:35 texture (global 4-component vector of float)
+0:35 'texSampler2D' (uniform sampler2D)
+0:35 'coords2D' (smooth in 2-component vector of float)
+0:36 add second child into first child (temp 4-component vector of float)
+0:36 'color' (temp 4-component vector of float)
+0:36 texture (global 4-component vector of float)
+0:36 'texSampler2D' (uniform sampler2D)
+0:36 'coords2D' (smooth in 2-component vector of float)
+0:36 'bias' (temp float)
+0:37 add second child into first child (temp 4-component vector of float)
+0:37 'color' (temp 4-component vector of float)
+0:37 textureProj (global 4-component vector of float)
+0:37 'texSampler2D' (uniform sampler2D)
+0:37 'coords3D' (temp 3-component vector of float)
+0:38 add second child into first child (temp 4-component vector of float)
+0:38 'color' (temp 4-component vector of float)
+0:38 textureProj (global 4-component vector of float)
+0:38 'texSampler2D' (uniform sampler2D)
+0:38 'coords4D' (temp 4-component vector of float)
+0:38 'bias' (temp float)
+0:40 add second child into first child (temp 4-component vector of float)
+0:40 'color' (temp 4-component vector of float)
+0:40 texture (global 4-component vector of float)
+0:40 'texSampler3D' (uniform sampler3D)
+0:40 'coords3D' (temp 3-component vector of float)
+0:41 add second child into first child (temp 4-component vector of float)
+0:41 'color' (temp 4-component vector of float)
+0:41 texture (global 4-component vector of float)
+0:41 'texSampler3D' (uniform sampler3D)
+0:41 'coords3D' (temp 3-component vector of float)
+0:41 'bias' (temp float)
+0:42 add second child into first child (temp 4-component vector of float)
+0:42 'color' (temp 4-component vector of float)
+0:42 textureProj (global 4-component vector of float)
+0:42 'texSampler3D' (uniform sampler3D)
+0:42 'coords4D' (temp 4-component vector of float)
+0:43 add second child into first child (temp 4-component vector of float)
+0:43 'color' (temp 4-component vector of float)
+0:43 textureProj (global 4-component vector of float)
+0:43 'texSampler3D' (uniform sampler3D)
+0:43 'coords4D' (temp 4-component vector of float)
+0:43 'bias' (temp float)
+0:45 add second child into first child (temp 4-component vector of float)
+0:45 'color' (temp 4-component vector of float)
+0:45 texture (global 4-component vector of float)
+0:45 'texSamplerCube' (uniform samplerCube)
+0:45 'coords3D' (temp 3-component vector of float)
+0:46 add second child into first child (temp 4-component vector of float)
+0:46 'color' (temp 4-component vector of float)
+0:46 texture (global 4-component vector of float)
+0:46 'texSamplerCube' (uniform samplerCube)
+0:46 'coords3D' (temp 3-component vector of float)
+0:46 'bias' (temp float)
+0:48 add second child into first child (temp 4-component vector of float)
+0:48 'color' (temp 4-component vector of float)
+0:48 texture (global 4-component vector of float)
+0:48 'shadowSampler1D' (uniform sampler1DShadow)
+0:48 'coords3D' (temp 3-component vector of float)
+0:49 add second child into first child (temp 4-component vector of float)
+0:49 'color' (temp 4-component vector of float)
+0:49 texture (global 4-component vector of float)
+0:49 'shadowSampler1D' (uniform sampler1DShadow)
+0:49 'coords3D' (temp 3-component vector of float)
+0:49 'bias' (temp float)
+0:50 add second child into first child (temp 4-component vector of float)
+0:50 'color' (temp 4-component vector of float)
+0:50 texture (global 4-component vector of float)
+0:50 'shadowSampler2D' (uniform sampler2DShadow)
+0:50 'coords3D' (temp 3-component vector of float)
+0:51 add second child into first child (temp 4-component vector of float)
+0:51 'color' (temp 4-component vector of float)
+0:51 texture (global 4-component vector of float)
+0:51 'shadowSampler2D' (uniform sampler2DShadow)
+0:51 'coords3D' (temp 3-component vector of float)
+0:51 'bias' (temp float)
+0:52 add second child into first child (temp 4-component vector of float)
+0:52 'color' (temp 4-component vector of float)
+0:52 textureProj (global 4-component vector of float)
+0:52 'shadowSampler1D' (uniform sampler1DShadow)
+0:52 'coords4D' (temp 4-component vector of float)
+0:53 add second child into first child (temp 4-component vector of float)
+0:53 'color' (temp 4-component vector of float)
+0:53 textureProj (global 4-component vector of float)
+0:53 'shadowSampler1D' (uniform sampler1DShadow)
+0:53 'coords4D' (temp 4-component vector of float)
+0:53 'bias' (temp float)
+0:54 add second child into first child (temp 4-component vector of float)
+0:54 'color' (temp 4-component vector of float)
+0:54 textureProj (global 4-component vector of float)
+0:54 'shadowSampler2D' (uniform sampler2DShadow)
+0:54 'coords4D' (temp 4-component vector of float)
+0:55 add second child into first child (temp 4-component vector of float)
+0:55 'color' (temp 4-component vector of float)
+0:55 textureProj (global 4-component vector of float)
+0:55 'shadowSampler2D' (uniform sampler2DShadow)
+0:55 'coords4D' (temp 4-component vector of float)
+0:55 'bias' (temp float)
+0:57 Sequence
+0:57 move second child to first child (temp 2-component vector of int)
+0:57 'iCoords2D' (temp 2-component vector of int)
+0:57 Constant:
+0:57 0 (const int)
+0:57 5 (const int)
+0:58 Sequence
+0:58 move second child to first child (temp int)
+0:58 'iLod' (temp int)
+0:58 Constant:
+0:58 1 (const int)
+0:60 add second child into first child (temp 4-component vector of float)
+0:60 'color' (temp 4-component vector of float)
+0:60 textureFetch (global 4-component vector of float)
+0:60 'texSampler2D' (uniform sampler2D)
+0:60 'iCoords2D' (temp 2-component vector of int)
+0:60 'iLod' (temp int)
+0:62 Sequence
+0:62 move second child to first child (temp 2-component vector of float)
+0:62 'gradX' (temp 2-component vector of float)
+0:62 dPdx (global 2-component vector of float)
+0:62 'coords2D' (smooth in 2-component vector of float)
+0:63 Sequence
+0:63 move second child to first child (temp 2-component vector of float)
+0:63 'gradY' (temp 2-component vector of float)
+0:63 dPdy (global 2-component vector of float)
+0:63 'coords2D' (smooth in 2-component vector of float)
+0:66 add second child into first child (temp 4-component vector of float)
+0:66 'color' (temp 4-component vector of float)
+0:66 textureGrad (global 4-component vector of float)
+0:66 'texSampler2D' (uniform sampler2D)
+0:66 'coords2D' (smooth in 2-component vector of float)
+0:66 'gradX' (temp 2-component vector of float)
+0:66 'gradY' (temp 2-component vector of float)
+0:67 add second child into first child (temp 4-component vector of float)
+0:67 'color' (temp 4-component vector of float)
+0:67 textureProjGrad (global 4-component vector of float)
+0:67 'texSampler2D' (uniform sampler2D)
+0:67 Construct vec3 (temp 3-component vector of float)
+0:67 'coords2D' (smooth in 2-component vector of float)
+0:67 'proj' (temp float)
+0:67 'gradX' (temp 2-component vector of float)
+0:67 'gradY' (temp 2-component vector of float)
+0:68 add second child into first child (temp 4-component vector of float)
+0:68 'color' (temp 4-component vector of float)
+0:68 textureGradOffset (global 4-component vector of float)
+0:68 'texSampler2D' (uniform sampler2D)
+0:68 'coords2D' (smooth in 2-component vector of float)
+0:68 'gradX' (temp 2-component vector of float)
+0:68 'gradY' (temp 2-component vector of float)
+0:68 Constant:
+0:68 3 (const int)
+0:68 -7 (const int)
+0:69 add second child into first child (temp 4-component vector of float)
+0:69 'color' (temp 4-component vector of float)
+0:69 textureProjGradOffset (global 4-component vector of float)
+0:69 'texSampler2D' (uniform sampler2D)
+0:69 'coords3D' (temp 3-component vector of float)
+0:69 'gradX' (temp 2-component vector of float)
+0:69 'gradY' (temp 2-component vector of float)
+0:69 Constant:
+0:69 3 (const int)
+0:69 -7 (const int)
+0:70 add second child into first child (temp 4-component vector of float)
+0:70 'color' (temp 4-component vector of float)
+0:70 textureGrad (global float)
+0:70 'shadowSampler2D' (uniform sampler2DShadow)
+0:70 Construct vec3 (temp 3-component vector of float)
+0:70 'coords2D' (smooth in 2-component vector of float)
+0:70 'lod' (temp float)
+0:70 'gradX' (temp 2-component vector of float)
+0:70 'gradY' (temp 2-component vector of float)
+0:72 move second child to first child (temp 4-component vector of float)
+0:72 'gl_FragColor' (fragColor 4-component vector of float FragColor)
+0:72 mix (global 4-component vector of float)
+0:72 'color' (temp 4-component vector of float)
+0:72 'u' (uniform 4-component vector of float)
+0:72 component-wise multiply (temp float)
+0:72 'blend' (uniform float)
+0:72 'blendscale' (temp float)
+0:? Linker Objects
+0:? 'texSampler1D' (uniform sampler1D)
+0:? 'texSampler2D' (uniform sampler2D)
+0:? 'texSampler3D' (uniform sampler3D)
+0:? 'texSamplerCube' (uniform samplerCube)
+0:? 'shadowSampler1D' (uniform sampler1DShadow)
+0:? 'shadowSampler2D' (uniform sampler2DShadow)
+0:? 'blend' (uniform float)
+0:? 'scale' (uniform 2-component vector of float)
+0:? 'u' (uniform 4-component vector of float)
+0:? 't' (smooth in 2-component vector of float)
+0:? 'coords2D' (smooth in 2-component vector of float)
+
+
+Linked fragment stage:
+
+
+Shader version: 130
+0:? Sequence
+0:17 Function Definition: main( (global void)
+0:17 Function Parameters:
+0:19 Sequence
+0:19 Sequence
+0:19 move second child to first child (temp float)
+0:19 'blendscale' (temp float)
+0:19 Constant:
+0:19 1.789000
+0:20 Sequence
+0:20 move second child to first child (temp float)
+0:20 'bias' (temp float)
+0:20 Constant:
+0:20 2.000000
+0:21 Sequence
+0:21 move second child to first child (temp float)
+0:21 'lod' (temp float)
+0:21 Constant:
+0:21 3.000000
+0:22 Sequence
+0:22 move second child to first child (temp float)
+0:22 'proj' (temp float)
+0:22 Constant:
+0:22 2.000000
+0:23 Sequence
+0:23 move second child to first child (temp float)
+0:23 'coords1D' (temp float)
+0:23 Constant:
+0:23 1.789000
+0:24 Sequence
+0:24 move second child to first child (temp 3-component vector of float)
+0:24 'coords3D' (temp 3-component vector of float)
+0:24 Constant:
+0:24 1.789000
+0:24 2.718000
+0:24 3.453000
+0:25 Sequence
+0:25 move second child to first child (temp 4-component vector of float)
+0:25 'coords4D' (temp 4-component vector of float)
+0:25 Constant:
+0:25 1.789000
+0:25 2.718000
+0:25 3.453000
+0:25 2.000000
+0:26 Sequence
+0:26 move second child to first child (temp 4-component vector of float)
+0:26 'color' (temp 4-component vector of float)
+0:26 Constant:
+0:26 0.000000
+0:26 0.000000
+0:26 0.000000
+0:26 0.000000
+0:28 add second child into first child (temp 4-component vector of float)
+0:28 'color' (temp 4-component vector of float)
+0:28 texture (global 4-component vector of float)
+0:28 'texSampler1D' (uniform sampler1D)
+0:28 'coords1D' (temp float)
+0:29 add second child into first child (temp 4-component vector of float)
+0:29 'color' (temp 4-component vector of float)
+0:29 texture (global 4-component vector of float)
+0:29 'texSampler1D' (uniform sampler1D)
+0:29 'coords1D' (temp float)
+0:29 'bias' (temp float)
+0:30 add second child into first child (temp 4-component vector of float)
+0:30 'color' (temp 4-component vector of float)
+0:30 textureProj (global 4-component vector of float)
+0:30 'texSampler1D' (uniform sampler1D)
+0:30 'coords2D' (smooth in 2-component vector of float)
+0:31 add second child into first child (temp 4-component vector of float)
+0:31 'color' (temp 4-component vector of float)
+0:31 textureProj (global 4-component vector of float)
+0:31 'texSampler1D' (uniform sampler1D)
+0:31 'coords4D' (temp 4-component vector of float)
+0:32 add second child into first child (temp 4-component vector of float)
+0:32 'color' (temp 4-component vector of float)
+0:32 textureProj (global 4-component vector of float)
+0:32 'texSampler1D' (uniform sampler1D)
+0:32 'coords2D' (smooth in 2-component vector of float)
+0:32 'bias' (temp float)
+0:33 add second child into first child (temp 4-component vector of float)
+0:33 'color' (temp 4-component vector of float)
+0:33 textureProj (global 4-component vector of float)
+0:33 'texSampler1D' (uniform sampler1D)
+0:33 'coords4D' (temp 4-component vector of float)
+0:33 'bias' (temp float)
+0:35 add second child into first child (temp 4-component vector of float)
+0:35 'color' (temp 4-component vector of float)
+0:35 texture (global 4-component vector of float)
+0:35 'texSampler2D' (uniform sampler2D)
+0:35 'coords2D' (smooth in 2-component vector of float)
+0:36 add second child into first child (temp 4-component vector of float)
+0:36 'color' (temp 4-component vector of float)
+0:36 texture (global 4-component vector of float)
+0:36 'texSampler2D' (uniform sampler2D)
+0:36 'coords2D' (smooth in 2-component vector of float)
+0:36 'bias' (temp float)
+0:37 add second child into first child (temp 4-component vector of float)
+0:37 'color' (temp 4-component vector of float)
+0:37 textureProj (global 4-component vector of float)
+0:37 'texSampler2D' (uniform sampler2D)
+0:37 'coords3D' (temp 3-component vector of float)
+0:38 add second child into first child (temp 4-component vector of float)
+0:38 'color' (temp 4-component vector of float)
+0:38 textureProj (global 4-component vector of float)
+0:38 'texSampler2D' (uniform sampler2D)
+0:38 'coords4D' (temp 4-component vector of float)
+0:38 'bias' (temp float)
+0:40 add second child into first child (temp 4-component vector of float)
+0:40 'color' (temp 4-component vector of float)
+0:40 texture (global 4-component vector of float)
+0:40 'texSampler3D' (uniform sampler3D)
+0:40 'coords3D' (temp 3-component vector of float)
+0:41 add second child into first child (temp 4-component vector of float)
+0:41 'color' (temp 4-component vector of float)
+0:41 texture (global 4-component vector of float)
+0:41 'texSampler3D' (uniform sampler3D)
+0:41 'coords3D' (temp 3-component vector of float)
+0:41 'bias' (temp float)
+0:42 add second child into first child (temp 4-component vector of float)
+0:42 'color' (temp 4-component vector of float)
+0:42 textureProj (global 4-component vector of float)
+0:42 'texSampler3D' (uniform sampler3D)
+0:42 'coords4D' (temp 4-component vector of float)
+0:43 add second child into first child (temp 4-component vector of float)
+0:43 'color' (temp 4-component vector of float)
+0:43 textureProj (global 4-component vector of float)
+0:43 'texSampler3D' (uniform sampler3D)
+0:43 'coords4D' (temp 4-component vector of float)
+0:43 'bias' (temp float)
+0:45 add second child into first child (temp 4-component vector of float)
+0:45 'color' (temp 4-component vector of float)
+0:45 texture (global 4-component vector of float)
+0:45 'texSamplerCube' (uniform samplerCube)
+0:45 'coords3D' (temp 3-component vector of float)
+0:46 add second child into first child (temp 4-component vector of float)
+0:46 'color' (temp 4-component vector of float)
+0:46 texture (global 4-component vector of float)
+0:46 'texSamplerCube' (uniform samplerCube)
+0:46 'coords3D' (temp 3-component vector of float)
+0:46 'bias' (temp float)
+0:48 add second child into first child (temp 4-component vector of float)
+0:48 'color' (temp 4-component vector of float)
+0:48 texture (global 4-component vector of float)
+0:48 'shadowSampler1D' (uniform sampler1DShadow)
+0:48 'coords3D' (temp 3-component vector of float)
+0:49 add second child into first child (temp 4-component vector of float)
+0:49 'color' (temp 4-component vector of float)
+0:49 texture (global 4-component vector of float)
+0:49 'shadowSampler1D' (uniform sampler1DShadow)
+0:49 'coords3D' (temp 3-component vector of float)
+0:49 'bias' (temp float)
+0:50 add second child into first child (temp 4-component vector of float)
+0:50 'color' (temp 4-component vector of float)
+0:50 texture (global 4-component vector of float)
+0:50 'shadowSampler2D' (uniform sampler2DShadow)
+0:50 'coords3D' (temp 3-component vector of float)
+0:51 add second child into first child (temp 4-component vector of float)
+0:51 'color' (temp 4-component vector of float)
+0:51 texture (global 4-component vector of float)
+0:51 'shadowSampler2D' (uniform sampler2DShadow)
+0:51 'coords3D' (temp 3-component vector of float)
+0:51 'bias' (temp float)
+0:52 add second child into first child (temp 4-component vector of float)
+0:52 'color' (temp 4-component vector of float)
+0:52 textureProj (global 4-component vector of float)
+0:52 'shadowSampler1D' (uniform sampler1DShadow)
+0:52 'coords4D' (temp 4-component vector of float)
+0:53 add second child into first child (temp 4-component vector of float)
+0:53 'color' (temp 4-component vector of float)
+0:53 textureProj (global 4-component vector of float)
+0:53 'shadowSampler1D' (uniform sampler1DShadow)
+0:53 'coords4D' (temp 4-component vector of float)
+0:53 'bias' (temp float)
+0:54 add second child into first child (temp 4-component vector of float)
+0:54 'color' (temp 4-component vector of float)
+0:54 textureProj (global 4-component vector of float)
+0:54 'shadowSampler2D' (uniform sampler2DShadow)
+0:54 'coords4D' (temp 4-component vector of float)
+0:55 add second child into first child (temp 4-component vector of float)
+0:55 'color' (temp 4-component vector of float)
+0:55 textureProj (global 4-component vector of float)
+0:55 'shadowSampler2D' (uniform sampler2DShadow)
+0:55 'coords4D' (temp 4-component vector of float)
+0:55 'bias' (temp float)
+0:57 Sequence
+0:57 move second child to first child (temp 2-component vector of int)
+0:57 'iCoords2D' (temp 2-component vector of int)
+0:57 Constant:
+0:57 0 (const int)
+0:57 5 (const int)
+0:58 Sequence
+0:58 move second child to first child (temp int)
+0:58 'iLod' (temp int)
+0:58 Constant:
+0:58 1 (const int)
+0:60 add second child into first child (temp 4-component vector of float)
+0:60 'color' (temp 4-component vector of float)
+0:60 textureFetch (global 4-component vector of float)
+0:60 'texSampler2D' (uniform sampler2D)
+0:60 'iCoords2D' (temp 2-component vector of int)
+0:60 'iLod' (temp int)
+0:62 Sequence
+0:62 move second child to first child (temp 2-component vector of float)
+0:62 'gradX' (temp 2-component vector of float)
+0:62 dPdx (global 2-component vector of float)
+0:62 'coords2D' (smooth in 2-component vector of float)
+0:63 Sequence
+0:63 move second child to first child (temp 2-component vector of float)
+0:63 'gradY' (temp 2-component vector of float)
+0:63 dPdy (global 2-component vector of float)
+0:63 'coords2D' (smooth in 2-component vector of float)
+0:66 add second child into first child (temp 4-component vector of float)
+0:66 'color' (temp 4-component vector of float)
+0:66 textureGrad (global 4-component vector of float)
+0:66 'texSampler2D' (uniform sampler2D)
+0:66 'coords2D' (smooth in 2-component vector of float)
+0:66 'gradX' (temp 2-component vector of float)
+0:66 'gradY' (temp 2-component vector of float)
+0:67 add second child into first child (temp 4-component vector of float)
+0:67 'color' (temp 4-component vector of float)
+0:67 textureProjGrad (global 4-component vector of float)
+0:67 'texSampler2D' (uniform sampler2D)
+0:67 Construct vec3 (temp 3-component vector of float)
+0:67 'coords2D' (smooth in 2-component vector of float)
+0:67 'proj' (temp float)
+0:67 'gradX' (temp 2-component vector of float)
+0:67 'gradY' (temp 2-component vector of float)
+0:68 add second child into first child (temp 4-component vector of float)
+0:68 'color' (temp 4-component vector of float)
+0:68 textureGradOffset (global 4-component vector of float)
+0:68 'texSampler2D' (uniform sampler2D)
+0:68 'coords2D' (smooth in 2-component vector of float)
+0:68 'gradX' (temp 2-component vector of float)
+0:68 'gradY' (temp 2-component vector of float)
+0:68 Constant:
+0:68 3 (const int)
+0:68 -7 (const int)
+0:69 add second child into first child (temp 4-component vector of float)
+0:69 'color' (temp 4-component vector of float)
+0:69 textureProjGradOffset (global 4-component vector of float)
+0:69 'texSampler2D' (uniform sampler2D)
+0:69 'coords3D' (temp 3-component vector of float)
+0:69 'gradX' (temp 2-component vector of float)
+0:69 'gradY' (temp 2-component vector of float)
+0:69 Constant:
+0:69 3 (const int)
+0:69 -7 (const int)
+0:70 add second child into first child (temp 4-component vector of float)
+0:70 'color' (temp 4-component vector of float)
+0:70 textureGrad (global float)
+0:70 'shadowSampler2D' (uniform sampler2DShadow)
+0:70 Construct vec3 (temp 3-component vector of float)
+0:70 'coords2D' (smooth in 2-component vector of float)
+0:70 'lod' (temp float)
+0:70 'gradX' (temp 2-component vector of float)
+0:70 'gradY' (temp 2-component vector of float)
+0:72 move second child to first child (temp 4-component vector of float)
+0:72 'gl_FragColor' (fragColor 4-component vector of float FragColor)
+0:72 mix (global 4-component vector of float)
+0:72 'color' (temp 4-component vector of float)
+0:72 'u' (uniform 4-component vector of float)
+0:72 component-wise multiply (temp float)
+0:72 'blend' (uniform float)
+0:72 'blendscale' (temp float)
+0:? Linker Objects
+0:? 'texSampler1D' (uniform sampler1D)
+0:? 'texSampler2D' (uniform sampler2D)
+0:? 'texSampler3D' (uniform sampler3D)
+0:? 'texSamplerCube' (uniform samplerCube)
+0:? 'shadowSampler1D' (uniform sampler1DShadow)
+0:? 'shadowSampler2D' (uniform sampler2DShadow)
+0:? 'blend' (uniform float)
+0:? 'scale' (uniform 2-component vector of float)
+0:? 'u' (uniform 4-component vector of float)
+0:? 't' (smooth in 2-component vector of float)
+0:? 'coords2D' (smooth in 2-component vector of float)
+
diff --git a/chromium/third_party/glslang/src/Test/baseResults/tokenLength.vert.out b/chromium/third_party/glslang/src/Test/baseResults/tokenLength.vert.out
new file mode 100644
index 00000000000..26dabf0c08c
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/tokenLength.vert.out
@@ -0,0 +1,222 @@
+tokenLength.vert
+ERROR: 0:9: '' : numeric literal too big
+ERROR: 0:10: '' : numeric literal too big
+ERROR: 0:13: '' : octal literal too big
+ERROR: 0:14: '' : hexidecimal literal too big
+ERROR: 0:23: '' : float literal too long
+ERROR: 0:32: '' : name too long
+ERROR: 0:33: '' : hexidecimal literal too big
+ERROR: 0:34: '' : numeric literal too long
+ERROR: 0:34: '' : octal literal too big
+ERROR: 0:35: '' : numeric literal too long
+ERROR: 0:35: '' : numeric literal too big
+ERROR: 0:36: '' : float literal too long
+ERROR: 0:36: '' : float literal too long
+ERROR: 0:36: '' : float literal too long
+WARNING: 0:39: '#extension' : extension not supported: a000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhooooooooooooooooooooooooooooooohhhhhhhhhhhhhhhhh01234
+ERROR: 0:40: '' : name too long
+WARNING: 0:40: '#extension' : extension not supported: a000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhooooooooooooooooooooooooooooooohhhhhhhhhhhhhhhhh01234
+ERROR: 0:43: '' : name too long
+ERROR: 0:44: '#extension' : ':' missing after extension name
+ERROR: 0:47: '#error' : in long non - zero # if
+ERROR: 0:50: '#error' : in long zero # if
+ERROR: 0:52: '' : numeric literal too long
+ERROR: 0:53: '#error' : in too long # if
+ERROR: 0:56: 'preprocessor evaluation' : undefined macro in expression not allowed in es profile A000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001
+ERROR: 0:59: 'preprocessor evaluation' : undefined macro in expression not allowed in es profile A000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
+ERROR: 0:62: '' : name too long
+ERROR: 0:62: 'preprocessor evaluation' : undefined macro in expression not allowed in es profile A000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
+ERROR: 0:67: '' : numeric literal too long
+ERROR: 0:70: '' : name too long
+ERROR: 0:70: 'preprocessor evaluation' : undefined macro in expression not allowed in es profile A000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
+ERROR: 28 compilation errors. No code generated.
+
+
+Shader version: 300
+ERROR: node is still EOpNull!
+0:9 Sequence
+0:9 move second child to first child (temp highp int)
+0:9 'E1' (global highp int)
+0:9 Constant:
+0:9 -1 (const int)
+0:10 Sequence
+0:10 move second child to first child (temp highp int)
+0:10 'E2' (global highp int)
+0:10 Constant:
+0:10 -1 (const int)
+0:11 Sequence
+0:11 move second child to first child (temp highp int)
+0:11 'B' (global highp int)
+0:11 Constant:
+0:11 -1 (const int)
+0:13 Sequence
+0:13 move second child to first child (temp highp int)
+0:13 'OE' (global highp int)
+0:13 Constant:
+0:13 1073741823 (const int)
+0:14 Sequence
+0:14 move second child to first child (temp highp int)
+0:14 'HE' (global highp int)
+0:14 Constant:
+0:14 -1 (const int)
+0:17 Sequence
+0:17 move second child to first child (temp highp float)
+0:17 'F' (global highp float)
+0:17 Constant:
+0:17 1.012346
+0:20 Sequence
+0:20 move second child to first child (temp highp float)
+0:20 'G' (global highp float)
+0:20 Constant:
+0:20 1.012346
+0:23 Sequence
+0:23 move second child to first child (temp highp float)
+0:23 'E3' (global highp float)
+0:23 Constant:
+0:23 12.000000
+0:25 Function Definition: main( (global void)
+0:25 Function Parameters:
+0:27 Sequence
+0:27 move second child to first child (temp highp 4-component vector of float)
+0:27 'gl_Position' (gl_Position highp 4-component vector of float Position)
+0:28 Construct vec4 (temp highp 4-component vector of float)
+0:27 'ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789' (in highp float)
+0:28 Convert int to float (temp highp float)
+0:28 'B' (global highp int)
+0:28 'F' (global highp float)
+0:28 'G' (global highp float)
+0:33 Sequence
+0:33 move second child to first child (temp highp int)
+0:33 'superH' (global highp int)
+0:33 Constant:
+0:33 -1 (const int)
+0:34 Sequence
+0:34 move second child to first child (temp highp int)
+0:34 'superO' (global highp int)
+0:34 Constant:
+0:34 1073741823 (const int)
+0:35 Sequence
+0:35 move second child to first child (temp highp int)
+0:35 'superI' (global highp int)
+0:35 Constant:
+0:35 -1 (const int)
+0:36 Sequence
+0:36 move second child to first child (temp highp float)
+0:36 'superF' (global highp float)
+0:36 Constant:
+0:36 inf
+0:? Linker Objects
+0:? 'BCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789' (in highp float)
+0:? 'ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789' (in highp float)
+0:? 'E1' (global highp int)
+0:? 'E2' (global highp int)
+0:? 'B' (global highp int)
+0:? 'OE' (global highp int)
+0:? 'HE' (global highp int)
+0:? 'F' (global highp float)
+0:? 'G' (global highp float)
+0:? 'E3' (global highp float)
+0:? 'BCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789B' (global highp float)
+0:? 'superH' (global highp int)
+0:? 'superO' (global highp int)
+0:? 'superI' (global highp int)
+0:? 'superF' (global highp float)
+0:? 'gl_VertexID' (gl_VertexId highp int VertexId)
+0:? 'gl_InstanceID' (gl_InstanceId highp int InstanceId)
+
+
+Linked vertex stage:
+
+
+Shader version: 300
+ERROR: node is still EOpNull!
+0:9 Sequence
+0:9 move second child to first child (temp highp int)
+0:9 'E1' (global highp int)
+0:9 Constant:
+0:9 -1 (const int)
+0:10 Sequence
+0:10 move second child to first child (temp highp int)
+0:10 'E2' (global highp int)
+0:10 Constant:
+0:10 -1 (const int)
+0:11 Sequence
+0:11 move second child to first child (temp highp int)
+0:11 'B' (global highp int)
+0:11 Constant:
+0:11 -1 (const int)
+0:13 Sequence
+0:13 move second child to first child (temp highp int)
+0:13 'OE' (global highp int)
+0:13 Constant:
+0:13 1073741823 (const int)
+0:14 Sequence
+0:14 move second child to first child (temp highp int)
+0:14 'HE' (global highp int)
+0:14 Constant:
+0:14 -1 (const int)
+0:17 Sequence
+0:17 move second child to first child (temp highp float)
+0:17 'F' (global highp float)
+0:17 Constant:
+0:17 1.012346
+0:20 Sequence
+0:20 move second child to first child (temp highp float)
+0:20 'G' (global highp float)
+0:20 Constant:
+0:20 1.012346
+0:23 Sequence
+0:23 move second child to first child (temp highp float)
+0:23 'E3' (global highp float)
+0:23 Constant:
+0:23 12.000000
+0:25 Function Definition: main( (global void)
+0:25 Function Parameters:
+0:27 Sequence
+0:27 move second child to first child (temp highp 4-component vector of float)
+0:27 'gl_Position' (gl_Position highp 4-component vector of float Position)
+0:28 Construct vec4 (temp highp 4-component vector of float)
+0:27 'ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789' (in highp float)
+0:28 Convert int to float (temp highp float)
+0:28 'B' (global highp int)
+0:28 'F' (global highp float)
+0:28 'G' (global highp float)
+0:33 Sequence
+0:33 move second child to first child (temp highp int)
+0:33 'superH' (global highp int)
+0:33 Constant:
+0:33 -1 (const int)
+0:34 Sequence
+0:34 move second child to first child (temp highp int)
+0:34 'superO' (global highp int)
+0:34 Constant:
+0:34 1073741823 (const int)
+0:35 Sequence
+0:35 move second child to first child (temp highp int)
+0:35 'superI' (global highp int)
+0:35 Constant:
+0:35 -1 (const int)
+0:36 Sequence
+0:36 move second child to first child (temp highp float)
+0:36 'superF' (global highp float)
+0:36 Constant:
+0:36 inf
+0:? Linker Objects
+0:? 'BCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789' (in highp float)
+0:? 'ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789' (in highp float)
+0:? 'E1' (global highp int)
+0:? 'E2' (global highp int)
+0:? 'B' (global highp int)
+0:? 'OE' (global highp int)
+0:? 'HE' (global highp int)
+0:? 'F' (global highp float)
+0:? 'G' (global highp float)
+0:? 'E3' (global highp float)
+0:? 'BCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789B' (global highp float)
+0:? 'superH' (global highp int)
+0:? 'superO' (global highp int)
+0:? 'superI' (global highp int)
+0:? 'superF' (global highp float)
+0:? 'gl_VertexID' (gl_VertexId highp int VertexId)
+0:? 'gl_InstanceID' (gl_InstanceId highp int InstanceId)
+
diff --git a/chromium/third_party/glslang/src/Test/baseResults/types.frag.out b/chromium/third_party/glslang/src/Test/baseResults/types.frag.out
new file mode 100644
index 00000000000..475a989c7e4
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/types.frag.out
@@ -0,0 +1,677 @@
+types.frag
+Shader version: 130
+0:? Sequence
+0:33 Function Definition: main( (global void)
+0:33 Function Parameters:
+0:35 Sequence
+0:35 Sequence
+0:35 move second child to first child (temp bool)
+0:35 'b' (temp bool)
+0:35 logical-and (temp bool)
+0:35 'u_b' (uniform bool)
+0:35 'i_b' (uniform bool)
+0:36 Sequence
+0:36 move second child to first child (temp 2-component vector of bool)
+0:36 'b2' (temp 2-component vector of bool)
+0:36 Construct bvec2 (temp 2-component vector of bool)
+0:36 logical-and (temp bool)
+0:36 logical-and (temp bool)
+0:36 logical-and (temp bool)
+0:36 direct index (temp bool)
+0:36 'u_b2' (uniform 2-component vector of bool)
+0:36 Constant:
+0:36 0 (const int)
+0:36 direct index (temp bool)
+0:36 'i_b2' (uniform 2-component vector of bool)
+0:36 Constant:
+0:36 0 (const int)
+0:36 direct index (temp bool)
+0:36 'u_b2' (uniform 2-component vector of bool)
+0:36 Constant:
+0:36 1 (const int)
+0:36 direct index (temp bool)
+0:36 'i_b2' (uniform 2-component vector of bool)
+0:36 Constant:
+0:36 1 (const int)
+0:37 Sequence
+0:37 move second child to first child (temp 3-component vector of bool)
+0:37 'b3' (temp 3-component vector of bool)
+0:37 Construct bvec3 (temp 3-component vector of bool)
+0:37 logical-and (temp bool)
+0:37 logical-and (temp bool)
+0:37 logical-and (temp bool)
+0:37 logical-and (temp bool)
+0:37 logical-and (temp bool)
+0:37 direct index (temp bool)
+0:37 'u_b3' (uniform 3-component vector of bool)
+0:37 Constant:
+0:37 0 (const int)
+0:37 direct index (temp bool)
+0:37 'i_b3' (uniform 3-component vector of bool)
+0:37 Constant:
+0:37 0 (const int)
+0:37 direct index (temp bool)
+0:37 'u_b3' (uniform 3-component vector of bool)
+0:37 Constant:
+0:37 1 (const int)
+0:37 direct index (temp bool)
+0:37 'i_b3' (uniform 3-component vector of bool)
+0:37 Constant:
+0:37 1 (const int)
+0:37 direct index (temp bool)
+0:37 'u_b3' (uniform 3-component vector of bool)
+0:37 Constant:
+0:37 2 (const int)
+0:37 direct index (temp bool)
+0:37 'i_b3' (uniform 3-component vector of bool)
+0:37 Constant:
+0:37 2 (const int)
+0:38 Sequence
+0:38 move second child to first child (temp 4-component vector of bool)
+0:38 'b4' (temp 4-component vector of bool)
+0:38 Construct bvec4 (temp 4-component vector of bool)
+0:38 logical-and (temp bool)
+0:38 logical-and (temp bool)
+0:38 logical-and (temp bool)
+0:38 logical-and (temp bool)
+0:38 logical-and (temp bool)
+0:38 logical-and (temp bool)
+0:38 logical-and (temp bool)
+0:38 direct index (temp bool)
+0:38 'u_b4' (uniform 4-component vector of bool)
+0:38 Constant:
+0:38 0 (const int)
+0:38 direct index (temp bool)
+0:38 'i_b4' (uniform 4-component vector of bool)
+0:38 Constant:
+0:38 0 (const int)
+0:38 direct index (temp bool)
+0:38 'u_b4' (uniform 4-component vector of bool)
+0:38 Constant:
+0:38 1 (const int)
+0:38 direct index (temp bool)
+0:38 'i_b4' (uniform 4-component vector of bool)
+0:38 Constant:
+0:38 1 (const int)
+0:38 direct index (temp bool)
+0:38 'u_b4' (uniform 4-component vector of bool)
+0:38 Constant:
+0:38 2 (const int)
+0:38 direct index (temp bool)
+0:38 'i_b4' (uniform 4-component vector of bool)
+0:38 Constant:
+0:38 2 (const int)
+0:38 direct index (temp bool)
+0:38 'u_b4' (uniform 4-component vector of bool)
+0:38 Constant:
+0:38 3 (const int)
+0:38 direct index (temp bool)
+0:38 'i_b4' (uniform 4-component vector of bool)
+0:38 Constant:
+0:38 3 (const int)
+0:40 Sequence
+0:40 move second child to first child (temp int)
+0:40 'i' (temp int)
+0:40 add (temp int)
+0:40 'u_i' (uniform int)
+0:40 'i_i' (flat in int)
+0:41 Sequence
+0:41 move second child to first child (temp 2-component vector of int)
+0:41 'i2' (temp 2-component vector of int)
+0:41 add (temp 2-component vector of int)
+0:41 'u_i2' (uniform 2-component vector of int)
+0:41 'i_i2' (flat in 2-component vector of int)
+0:42 Sequence
+0:42 move second child to first child (temp 3-component vector of int)
+0:42 'i3' (temp 3-component vector of int)
+0:42 add (temp 3-component vector of int)
+0:42 'u_i3' (uniform 3-component vector of int)
+0:42 'i_i3' (flat in 3-component vector of int)
+0:43 Sequence
+0:43 move second child to first child (temp 4-component vector of int)
+0:43 'i4' (temp 4-component vector of int)
+0:43 add (temp 4-component vector of int)
+0:43 'u_i4' (uniform 4-component vector of int)
+0:43 'i_i4' (flat in 4-component vector of int)
+0:45 Sequence
+0:45 move second child to first child (temp float)
+0:45 'f' (temp float)
+0:45 add (temp float)
+0:45 'u_f' (uniform float)
+0:45 'i_f' (smooth in float)
+0:46 Sequence
+0:46 move second child to first child (temp 2-component vector of float)
+0:46 'f2' (temp 2-component vector of float)
+0:46 add (temp 2-component vector of float)
+0:46 'u_f2' (uniform 2-component vector of float)
+0:46 'i_f2' (smooth in 2-component vector of float)
+0:47 Sequence
+0:47 move second child to first child (temp 3-component vector of float)
+0:47 'f3' (temp 3-component vector of float)
+0:47 add (temp 3-component vector of float)
+0:47 'u_f3' (uniform 3-component vector of float)
+0:47 'i_f3' (smooth in 3-component vector of float)
+0:48 Sequence
+0:48 move second child to first child (temp 4-component vector of float)
+0:48 'f4' (temp 4-component vector of float)
+0:48 add (temp 4-component vector of float)
+0:48 'u_f4' (uniform 4-component vector of float)
+0:48 'i_f4' (smooth in 4-component vector of float)
+0:50 move second child to first child (temp 4-component vector of float)
+0:50 'gl_FragColor' (fragColor 4-component vector of float FragColor)
+0:60 Test condition and select (temp 4-component vector of float)
+0:60 Condition
+0:59 logical-or (temp bool)
+0:58 logical-or (temp bool)
+0:57 logical-or (temp bool)
+0:56 logical-or (temp bool)
+0:55 logical-or (temp bool)
+0:54 logical-or (temp bool)
+0:53 logical-or (temp bool)
+0:52 logical-or (temp bool)
+0:51 logical-or (temp bool)
+0:51 'b' (temp bool)
+0:52 direct index (temp bool)
+0:52 'b2' (temp 2-component vector of bool)
+0:52 Constant:
+0:52 0 (const int)
+0:53 direct index (temp bool)
+0:53 'b2' (temp 2-component vector of bool)
+0:53 Constant:
+0:53 1 (const int)
+0:54 direct index (temp bool)
+0:54 'b3' (temp 3-component vector of bool)
+0:54 Constant:
+0:54 0 (const int)
+0:55 direct index (temp bool)
+0:55 'b3' (temp 3-component vector of bool)
+0:55 Constant:
+0:55 1 (const int)
+0:56 direct index (temp bool)
+0:56 'b3' (temp 3-component vector of bool)
+0:56 Constant:
+0:56 2 (const int)
+0:57 direct index (temp bool)
+0:57 'b4' (temp 4-component vector of bool)
+0:57 Constant:
+0:57 0 (const int)
+0:58 direct index (temp bool)
+0:58 'b4' (temp 4-component vector of bool)
+0:58 Constant:
+0:58 1 (const int)
+0:59 direct index (temp bool)
+0:59 'b4' (temp 4-component vector of bool)
+0:59 Constant:
+0:59 2 (const int)
+0:60 direct index (temp bool)
+0:60 'b4' (temp 4-component vector of bool)
+0:60 Constant:
+0:60 3 (const int)
+0:60 true case
+0:79 Construct vec4 (temp 4-component vector of float)
+0:79 add (temp float)
+0:78 add (temp float)
+0:77 add (temp float)
+0:76 add (temp float)
+0:75 add (temp float)
+0:74 add (temp float)
+0:73 add (temp float)
+0:72 add (temp float)
+0:71 add (temp float)
+0:70 add (temp float)
+0:69 Convert int to float (temp float)
+0:69 add (temp int)
+0:68 add (temp int)
+0:67 add (temp int)
+0:66 add (temp int)
+0:65 add (temp int)
+0:64 add (temp int)
+0:63 add (temp int)
+0:62 add (temp int)
+0:61 add (temp int)
+0:61 'i' (temp int)
+0:62 direct index (temp int)
+0:62 'i2' (temp 2-component vector of int)
+0:62 Constant:
+0:62 0 (const int)
+0:63 direct index (temp int)
+0:63 'i2' (temp 2-component vector of int)
+0:63 Constant:
+0:63 1 (const int)
+0:64 direct index (temp int)
+0:64 'i3' (temp 3-component vector of int)
+0:64 Constant:
+0:64 0 (const int)
+0:65 direct index (temp int)
+0:65 'i3' (temp 3-component vector of int)
+0:65 Constant:
+0:65 1 (const int)
+0:66 direct index (temp int)
+0:66 'i3' (temp 3-component vector of int)
+0:66 Constant:
+0:66 2 (const int)
+0:67 direct index (temp int)
+0:67 'i4' (temp 4-component vector of int)
+0:67 Constant:
+0:67 0 (const int)
+0:68 direct index (temp int)
+0:68 'i4' (temp 4-component vector of int)
+0:68 Constant:
+0:68 1 (const int)
+0:69 direct index (temp int)
+0:69 'i4' (temp 4-component vector of int)
+0:69 Constant:
+0:69 2 (const int)
+0:70 direct index (temp int)
+0:70 'i4' (temp 4-component vector of int)
+0:70 Constant:
+0:70 3 (const int)
+0:71 'f' (temp float)
+0:72 direct index (temp float)
+0:72 'f2' (temp 2-component vector of float)
+0:72 Constant:
+0:72 0 (const int)
+0:73 direct index (temp float)
+0:73 'f2' (temp 2-component vector of float)
+0:73 Constant:
+0:73 1 (const int)
+0:74 direct index (temp float)
+0:74 'f3' (temp 3-component vector of float)
+0:74 Constant:
+0:74 0 (const int)
+0:75 direct index (temp float)
+0:75 'f3' (temp 3-component vector of float)
+0:75 Constant:
+0:75 1 (const int)
+0:76 direct index (temp float)
+0:76 'f3' (temp 3-component vector of float)
+0:76 Constant:
+0:76 2 (const int)
+0:77 direct index (temp float)
+0:77 'f4' (temp 4-component vector of float)
+0:77 Constant:
+0:77 0 (const int)
+0:78 direct index (temp float)
+0:78 'f4' (temp 4-component vector of float)
+0:78 Constant:
+0:78 1 (const int)
+0:79 direct index (temp float)
+0:79 'f4' (temp 4-component vector of float)
+0:79 Constant:
+0:79 2 (const int)
+0:80 direct index (temp float)
+0:80 'f4' (temp 4-component vector of float)
+0:80 Constant:
+0:80 3 (const int)
+0:60 false case
+0:80 Constant:
+0:80 1.000000
+0:80 1.000000
+0:80 1.000000
+0:80 1.000000
+0:? Linker Objects
+0:? 'u_b' (uniform bool)
+0:? 'u_b2' (uniform 2-component vector of bool)
+0:? 'u_b3' (uniform 3-component vector of bool)
+0:? 'u_b4' (uniform 4-component vector of bool)
+0:? 'u_i' (uniform int)
+0:? 'u_i2' (uniform 2-component vector of int)
+0:? 'u_i3' (uniform 3-component vector of int)
+0:? 'u_i4' (uniform 4-component vector of int)
+0:? 'u_f' (uniform float)
+0:? 'u_f2' (uniform 2-component vector of float)
+0:? 'u_f3' (uniform 3-component vector of float)
+0:? 'u_f4' (uniform 4-component vector of float)
+0:? 'i_b' (uniform bool)
+0:? 'i_b2' (uniform 2-component vector of bool)
+0:? 'i_b3' (uniform 3-component vector of bool)
+0:? 'i_b4' (uniform 4-component vector of bool)
+0:? 'i_i' (flat in int)
+0:? 'i_i2' (flat in 2-component vector of int)
+0:? 'i_i3' (flat in 3-component vector of int)
+0:? 'i_i4' (flat in 4-component vector of int)
+0:? 'i_f' (smooth in float)
+0:? 'i_f2' (smooth in 2-component vector of float)
+0:? 'i_f3' (smooth in 3-component vector of float)
+0:? 'i_f4' (smooth in 4-component vector of float)
+
+
+Linked fragment stage:
+
+
+Shader version: 130
+0:? Sequence
+0:33 Function Definition: main( (global void)
+0:33 Function Parameters:
+0:35 Sequence
+0:35 Sequence
+0:35 move second child to first child (temp bool)
+0:35 'b' (temp bool)
+0:35 logical-and (temp bool)
+0:35 'u_b' (uniform bool)
+0:35 'i_b' (uniform bool)
+0:36 Sequence
+0:36 move second child to first child (temp 2-component vector of bool)
+0:36 'b2' (temp 2-component vector of bool)
+0:36 Construct bvec2 (temp 2-component vector of bool)
+0:36 logical-and (temp bool)
+0:36 logical-and (temp bool)
+0:36 logical-and (temp bool)
+0:36 direct index (temp bool)
+0:36 'u_b2' (uniform 2-component vector of bool)
+0:36 Constant:
+0:36 0 (const int)
+0:36 direct index (temp bool)
+0:36 'i_b2' (uniform 2-component vector of bool)
+0:36 Constant:
+0:36 0 (const int)
+0:36 direct index (temp bool)
+0:36 'u_b2' (uniform 2-component vector of bool)
+0:36 Constant:
+0:36 1 (const int)
+0:36 direct index (temp bool)
+0:36 'i_b2' (uniform 2-component vector of bool)
+0:36 Constant:
+0:36 1 (const int)
+0:37 Sequence
+0:37 move second child to first child (temp 3-component vector of bool)
+0:37 'b3' (temp 3-component vector of bool)
+0:37 Construct bvec3 (temp 3-component vector of bool)
+0:37 logical-and (temp bool)
+0:37 logical-and (temp bool)
+0:37 logical-and (temp bool)
+0:37 logical-and (temp bool)
+0:37 logical-and (temp bool)
+0:37 direct index (temp bool)
+0:37 'u_b3' (uniform 3-component vector of bool)
+0:37 Constant:
+0:37 0 (const int)
+0:37 direct index (temp bool)
+0:37 'i_b3' (uniform 3-component vector of bool)
+0:37 Constant:
+0:37 0 (const int)
+0:37 direct index (temp bool)
+0:37 'u_b3' (uniform 3-component vector of bool)
+0:37 Constant:
+0:37 1 (const int)
+0:37 direct index (temp bool)
+0:37 'i_b3' (uniform 3-component vector of bool)
+0:37 Constant:
+0:37 1 (const int)
+0:37 direct index (temp bool)
+0:37 'u_b3' (uniform 3-component vector of bool)
+0:37 Constant:
+0:37 2 (const int)
+0:37 direct index (temp bool)
+0:37 'i_b3' (uniform 3-component vector of bool)
+0:37 Constant:
+0:37 2 (const int)
+0:38 Sequence
+0:38 move second child to first child (temp 4-component vector of bool)
+0:38 'b4' (temp 4-component vector of bool)
+0:38 Construct bvec4 (temp 4-component vector of bool)
+0:38 logical-and (temp bool)
+0:38 logical-and (temp bool)
+0:38 logical-and (temp bool)
+0:38 logical-and (temp bool)
+0:38 logical-and (temp bool)
+0:38 logical-and (temp bool)
+0:38 logical-and (temp bool)
+0:38 direct index (temp bool)
+0:38 'u_b4' (uniform 4-component vector of bool)
+0:38 Constant:
+0:38 0 (const int)
+0:38 direct index (temp bool)
+0:38 'i_b4' (uniform 4-component vector of bool)
+0:38 Constant:
+0:38 0 (const int)
+0:38 direct index (temp bool)
+0:38 'u_b4' (uniform 4-component vector of bool)
+0:38 Constant:
+0:38 1 (const int)
+0:38 direct index (temp bool)
+0:38 'i_b4' (uniform 4-component vector of bool)
+0:38 Constant:
+0:38 1 (const int)
+0:38 direct index (temp bool)
+0:38 'u_b4' (uniform 4-component vector of bool)
+0:38 Constant:
+0:38 2 (const int)
+0:38 direct index (temp bool)
+0:38 'i_b4' (uniform 4-component vector of bool)
+0:38 Constant:
+0:38 2 (const int)
+0:38 direct index (temp bool)
+0:38 'u_b4' (uniform 4-component vector of bool)
+0:38 Constant:
+0:38 3 (const int)
+0:38 direct index (temp bool)
+0:38 'i_b4' (uniform 4-component vector of bool)
+0:38 Constant:
+0:38 3 (const int)
+0:40 Sequence
+0:40 move second child to first child (temp int)
+0:40 'i' (temp int)
+0:40 add (temp int)
+0:40 'u_i' (uniform int)
+0:40 'i_i' (flat in int)
+0:41 Sequence
+0:41 move second child to first child (temp 2-component vector of int)
+0:41 'i2' (temp 2-component vector of int)
+0:41 add (temp 2-component vector of int)
+0:41 'u_i2' (uniform 2-component vector of int)
+0:41 'i_i2' (flat in 2-component vector of int)
+0:42 Sequence
+0:42 move second child to first child (temp 3-component vector of int)
+0:42 'i3' (temp 3-component vector of int)
+0:42 add (temp 3-component vector of int)
+0:42 'u_i3' (uniform 3-component vector of int)
+0:42 'i_i3' (flat in 3-component vector of int)
+0:43 Sequence
+0:43 move second child to first child (temp 4-component vector of int)
+0:43 'i4' (temp 4-component vector of int)
+0:43 add (temp 4-component vector of int)
+0:43 'u_i4' (uniform 4-component vector of int)
+0:43 'i_i4' (flat in 4-component vector of int)
+0:45 Sequence
+0:45 move second child to first child (temp float)
+0:45 'f' (temp float)
+0:45 add (temp float)
+0:45 'u_f' (uniform float)
+0:45 'i_f' (smooth in float)
+0:46 Sequence
+0:46 move second child to first child (temp 2-component vector of float)
+0:46 'f2' (temp 2-component vector of float)
+0:46 add (temp 2-component vector of float)
+0:46 'u_f2' (uniform 2-component vector of float)
+0:46 'i_f2' (smooth in 2-component vector of float)
+0:47 Sequence
+0:47 move second child to first child (temp 3-component vector of float)
+0:47 'f3' (temp 3-component vector of float)
+0:47 add (temp 3-component vector of float)
+0:47 'u_f3' (uniform 3-component vector of float)
+0:47 'i_f3' (smooth in 3-component vector of float)
+0:48 Sequence
+0:48 move second child to first child (temp 4-component vector of float)
+0:48 'f4' (temp 4-component vector of float)
+0:48 add (temp 4-component vector of float)
+0:48 'u_f4' (uniform 4-component vector of float)
+0:48 'i_f4' (smooth in 4-component vector of float)
+0:50 move second child to first child (temp 4-component vector of float)
+0:50 'gl_FragColor' (fragColor 4-component vector of float FragColor)
+0:60 Test condition and select (temp 4-component vector of float)
+0:60 Condition
+0:59 logical-or (temp bool)
+0:58 logical-or (temp bool)
+0:57 logical-or (temp bool)
+0:56 logical-or (temp bool)
+0:55 logical-or (temp bool)
+0:54 logical-or (temp bool)
+0:53 logical-or (temp bool)
+0:52 logical-or (temp bool)
+0:51 logical-or (temp bool)
+0:51 'b' (temp bool)
+0:52 direct index (temp bool)
+0:52 'b2' (temp 2-component vector of bool)
+0:52 Constant:
+0:52 0 (const int)
+0:53 direct index (temp bool)
+0:53 'b2' (temp 2-component vector of bool)
+0:53 Constant:
+0:53 1 (const int)
+0:54 direct index (temp bool)
+0:54 'b3' (temp 3-component vector of bool)
+0:54 Constant:
+0:54 0 (const int)
+0:55 direct index (temp bool)
+0:55 'b3' (temp 3-component vector of bool)
+0:55 Constant:
+0:55 1 (const int)
+0:56 direct index (temp bool)
+0:56 'b3' (temp 3-component vector of bool)
+0:56 Constant:
+0:56 2 (const int)
+0:57 direct index (temp bool)
+0:57 'b4' (temp 4-component vector of bool)
+0:57 Constant:
+0:57 0 (const int)
+0:58 direct index (temp bool)
+0:58 'b4' (temp 4-component vector of bool)
+0:58 Constant:
+0:58 1 (const int)
+0:59 direct index (temp bool)
+0:59 'b4' (temp 4-component vector of bool)
+0:59 Constant:
+0:59 2 (const int)
+0:60 direct index (temp bool)
+0:60 'b4' (temp 4-component vector of bool)
+0:60 Constant:
+0:60 3 (const int)
+0:60 true case
+0:79 Construct vec4 (temp 4-component vector of float)
+0:79 add (temp float)
+0:78 add (temp float)
+0:77 add (temp float)
+0:76 add (temp float)
+0:75 add (temp float)
+0:74 add (temp float)
+0:73 add (temp float)
+0:72 add (temp float)
+0:71 add (temp float)
+0:70 add (temp float)
+0:69 Convert int to float (temp float)
+0:69 add (temp int)
+0:68 add (temp int)
+0:67 add (temp int)
+0:66 add (temp int)
+0:65 add (temp int)
+0:64 add (temp int)
+0:63 add (temp int)
+0:62 add (temp int)
+0:61 add (temp int)
+0:61 'i' (temp int)
+0:62 direct index (temp int)
+0:62 'i2' (temp 2-component vector of int)
+0:62 Constant:
+0:62 0 (const int)
+0:63 direct index (temp int)
+0:63 'i2' (temp 2-component vector of int)
+0:63 Constant:
+0:63 1 (const int)
+0:64 direct index (temp int)
+0:64 'i3' (temp 3-component vector of int)
+0:64 Constant:
+0:64 0 (const int)
+0:65 direct index (temp int)
+0:65 'i3' (temp 3-component vector of int)
+0:65 Constant:
+0:65 1 (const int)
+0:66 direct index (temp int)
+0:66 'i3' (temp 3-component vector of int)
+0:66 Constant:
+0:66 2 (const int)
+0:67 direct index (temp int)
+0:67 'i4' (temp 4-component vector of int)
+0:67 Constant:
+0:67 0 (const int)
+0:68 direct index (temp int)
+0:68 'i4' (temp 4-component vector of int)
+0:68 Constant:
+0:68 1 (const int)
+0:69 direct index (temp int)
+0:69 'i4' (temp 4-component vector of int)
+0:69 Constant:
+0:69 2 (const int)
+0:70 direct index (temp int)
+0:70 'i4' (temp 4-component vector of int)
+0:70 Constant:
+0:70 3 (const int)
+0:71 'f' (temp float)
+0:72 direct index (temp float)
+0:72 'f2' (temp 2-component vector of float)
+0:72 Constant:
+0:72 0 (const int)
+0:73 direct index (temp float)
+0:73 'f2' (temp 2-component vector of float)
+0:73 Constant:
+0:73 1 (const int)
+0:74 direct index (temp float)
+0:74 'f3' (temp 3-component vector of float)
+0:74 Constant:
+0:74 0 (const int)
+0:75 direct index (temp float)
+0:75 'f3' (temp 3-component vector of float)
+0:75 Constant:
+0:75 1 (const int)
+0:76 direct index (temp float)
+0:76 'f3' (temp 3-component vector of float)
+0:76 Constant:
+0:76 2 (const int)
+0:77 direct index (temp float)
+0:77 'f4' (temp 4-component vector of float)
+0:77 Constant:
+0:77 0 (const int)
+0:78 direct index (temp float)
+0:78 'f4' (temp 4-component vector of float)
+0:78 Constant:
+0:78 1 (const int)
+0:79 direct index (temp float)
+0:79 'f4' (temp 4-component vector of float)
+0:79 Constant:
+0:79 2 (const int)
+0:80 direct index (temp float)
+0:80 'f4' (temp 4-component vector of float)
+0:80 Constant:
+0:80 3 (const int)
+0:60 false case
+0:80 Constant:
+0:80 1.000000
+0:80 1.000000
+0:80 1.000000
+0:80 1.000000
+0:? Linker Objects
+0:? 'u_b' (uniform bool)
+0:? 'u_b2' (uniform 2-component vector of bool)
+0:? 'u_b3' (uniform 3-component vector of bool)
+0:? 'u_b4' (uniform 4-component vector of bool)
+0:? 'u_i' (uniform int)
+0:? 'u_i2' (uniform 2-component vector of int)
+0:? 'u_i3' (uniform 3-component vector of int)
+0:? 'u_i4' (uniform 4-component vector of int)
+0:? 'u_f' (uniform float)
+0:? 'u_f2' (uniform 2-component vector of float)
+0:? 'u_f3' (uniform 3-component vector of float)
+0:? 'u_f4' (uniform 4-component vector of float)
+0:? 'i_b' (uniform bool)
+0:? 'i_b2' (uniform 2-component vector of bool)
+0:? 'i_b3' (uniform 3-component vector of bool)
+0:? 'i_b4' (uniform 4-component vector of bool)
+0:? 'i_i' (flat in int)
+0:? 'i_i2' (flat in 2-component vector of int)
+0:? 'i_i3' (flat in 3-component vector of int)
+0:? 'i_i4' (flat in 4-component vector of int)
+0:? 'i_f' (smooth in float)
+0:? 'i_f2' (smooth in 2-component vector of float)
+0:? 'i_f3' (smooth in 3-component vector of float)
+0:? 'i_f4' (smooth in 4-component vector of float)
+
diff --git a/chromium/third_party/glslang/src/Test/baseResults/uint.frag.out b/chromium/third_party/glslang/src/Test/baseResults/uint.frag.out
new file mode 100644
index 00000000000..dbe9578d285
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/uint.frag.out
@@ -0,0 +1,607 @@
+uint.frag
+ERROR: 0:2: 'uint' : must be qualified as flat in
+ERROR: 0:6: 'in' : cannot be bool
+ERROR: 0:20: 'const' : non-matching or non-convertible constant type for const initializer
+ERROR: 0:24: 'const' : non-matching or non-convertible constant type for const initializer
+ERROR: 0:34: 'const' : non-matching or non-convertible constant type for const initializer
+ERROR: 0:37: 'const' : non-matching or non-convertible constant type for const initializer
+ERROR: 0:48: '=' : cannot convert from 'const int' to 'temp mediump uint'
+ERROR: 0:51: '=' : cannot convert from 'const int' to 'temp mediump uint'
+ERROR: 0:63: 'float' : type requires declaration of default precision qualifier
+ERROR: 9 compilation errors. No code generated.
+
+
+Shader version: 300
+ERROR: node is still EOpNull!
+0:15 Function Definition: main( (global void)
+0:15 Function Parameters:
+0:17 Sequence
+0:17 Sequence
+0:17 move second child to first child (temp mediump int)
+0:17 'count' (temp mediump int)
+0:17 Constant:
+0:17 1 (const int)
+0:19 Sequence
+0:19 move second child to first child (temp mediump uint)
+0:19 'u' (temp mediump uint)
+0:19 add (temp mediump uint)
+0:19 direct index (temp mediump uint)
+0:19 't' (flat in mediump 2-component vector of uint)
+0:19 Constant:
+0:19 1 (const int)
+0:19 Constant:
+0:19 3 (const uint)
+0:27 Test condition and select (temp void)
+0:27 Condition
+0:27 Constant:
+0:27 true (const bool)
+0:27 true case
+0:28 multiply second child into first child (temp mediump int)
+0:28 'count' (temp mediump int)
+0:28 Constant:
+0:28 2 (const int)
+0:29 Test condition and select (temp void)
+0:29 Condition
+0:29 Constant:
+0:29 true (const bool)
+0:29 true case
+0:30 multiply second child into first child (temp mediump int)
+0:30 'count' (temp mediump int)
+0:30 Constant:
+0:30 3 (const int)
+0:31 Test condition and select (temp void)
+0:31 Condition
+0:31 Constant:
+0:31 false (const bool)
+0:31 true case
+0:32 multiply second child into first child (temp mediump int)
+0:32 'count' (temp mediump int)
+0:32 Constant:
+0:32 5 (const int)
+0:41 Test condition and select (temp void)
+0:41 Condition
+0:41 Constant:
+0:41 true (const bool)
+0:41 true case
+0:42 multiply second child into first child (temp mediump int)
+0:42 'count' (temp mediump int)
+0:42 Constant:
+0:42 7 (const int)
+0:43 Test condition and select (temp void)
+0:43 Condition
+0:43 Constant:
+0:43 true (const bool)
+0:43 true case
+0:44 multiply second child into first child (temp mediump int)
+0:44 'count' (temp mediump int)
+0:44 Constant:
+0:44 11 (const int)
+0:45 Test condition and select (temp void)
+0:45 Condition
+0:45 Constant:
+0:45 false (const bool)
+0:45 true case
+0:46 multiply second child into first child (temp mediump int)
+0:46 'count' (temp mediump int)
+0:46 Constant:
+0:46 13 (const int)
+0:49 Sequence
+0:49 move second child to first child (temp mediump int)
+0:49 'shiftedii' (temp mediump int)
+0:49 Constant:
+0:49 -1 (const int)
+0:50 Sequence
+0:50 move second child to first child (temp mediump uint)
+0:50 'shiftedui' (temp mediump uint)
+0:50 Constant:
+0:50 4194303 (const uint)
+0:52 Sequence
+0:52 move second child to first child (temp mediump int)
+0:52 'shiftediu' (temp mediump int)
+0:52 Constant:
+0:52 -1 (const int)
+0:53 Sequence
+0:53 move second child to first child (temp mediump uint)
+0:53 'shifteduu' (temp mediump uint)
+0:53 Constant:
+0:53 4194303 (const uint)
+0:55 Test condition and select (temp void)
+0:55 Condition
+0:55 Compare Equal (temp bool)
+0:55 'shiftedii' (temp mediump int)
+0:55 'shiftediu' (temp mediump int)
+0:55 true case
+0:56 move second child to first child (temp mediump 4-component vector of uint)
+0:56 'c' (out mediump 4-component vector of uint)
+0:56 texture (global lowp 4-component vector of uint)
+0:56 'usampler' (uniform lowp usampler2D)
+0:56 'tc' (smooth in highp 2-component vector of float)
+0:57 Test condition and select (temp void)
+0:57 Condition
+0:57 Compare Equal (temp bool)
+0:57 'shiftedui' (temp mediump uint)
+0:57 'shifteduu' (temp mediump uint)
+0:57 true case
+0:58 move second child to first child (temp mediump 4-component vector of uint)
+0:58 'c' (out mediump 4-component vector of uint)
+0:58 texture (global lowp 4-component vector of uint)
+0:58 'usampler' (uniform lowp usampler2D)
+0:58 add (temp highp 2-component vector of float)
+0:58 'tc' (smooth in highp 2-component vector of float)
+0:58 Constant:
+0:58 1.000000
+0:59 Test condition and select (temp void)
+0:59 Condition
+0:59 Compare Equal (temp bool)
+0:59 'shiftedii' (temp mediump int)
+0:59 Convert uint to int (temp int)
+0:59 'shiftedui' (temp mediump uint)
+0:59 true case
+0:60 move second child to first child (temp mediump 4-component vector of uint)
+0:60 'c' (out mediump 4-component vector of uint)
+0:60 texture (global lowp 4-component vector of uint)
+0:60 'usampler' (uniform lowp usampler2D)
+0:60 subtract (temp highp 2-component vector of float)
+0:60 'tc' (smooth in highp 2-component vector of float)
+0:60 Constant:
+0:60 2.000000
+0:60 2.000000
+0:62 Test condition and select (temp void)
+0:62 Condition
+0:62 Compare Greater Than (temp bool)
+0:62 direct index (temp mediump uint)
+0:62 't' (flat in mediump 2-component vector of uint)
+0:62 Constant:
+0:62 0 (const int)
+0:62 Constant:
+0:62 4 (const uint)
+0:62 true case
+0:63 Sequence
+0:63 Sequence
+0:63 move second child to first child (temp mediump float)
+0:63 'af' (temp mediump float)
+0:63 Convert uint to float (temp mediump float)
+0:63 'u' (temp mediump uint)
+0:64 Sequence
+0:64 move second child to first child (temp bool)
+0:64 'ab' (temp bool)
+0:64 Convert uint to bool (temp bool)
+0:64 'u' (temp mediump uint)
+0:65 Sequence
+0:65 move second child to first child (temp mediump int)
+0:65 'ai' (temp mediump int)
+0:65 Convert uint to int (temp mediump int)
+0:65 'u' (temp mediump uint)
+0:67 add second child into first child (temp mediump 4-component vector of uint)
+0:67 'c' (out mediump 4-component vector of uint)
+0:67 Construct uvec4 (temp mediump 4-component vector of uint)
+0:67 Convert float to uint (temp mediump uint)
+0:67 'af' (temp mediump float)
+0:67 Convert bool to uint (temp mediump uint)
+0:67 'ab' (temp bool)
+0:67 Convert int to uint (temp mediump uint)
+0:67 'ai' (temp mediump int)
+0:67 Convert int to uint (temp mediump uint)
+0:67 'count' (temp mediump int)
+0:75 Test condition and select (temp void)
+0:75 Condition
+0:75 Constant:
+0:75 true (const bool)
+0:75 true case
+0:76 multiply second child into first child (temp mediump int)
+0:76 'count' (temp mediump int)
+0:76 Constant:
+0:76 17 (const int)
+0:78 Test condition and select (temp void)
+0:78 Condition
+0:78 Constant:
+0:78 false (const bool)
+0:78 true case
+0:79 multiply second child into first child (temp mediump int)
+0:79 'count' (temp mediump int)
+0:79 Constant:
+0:79 19 (const int)
+0:81 Test condition and select (temp void)
+0:81 Condition
+0:81 Constant:
+0:81 true (const bool)
+0:81 true case
+0:82 multiply second child into first child (temp mediump int)
+0:82 'count' (temp mediump int)
+0:82 Constant:
+0:82 23 (const int)
+0:84 Test condition and select (temp void)
+0:84 Condition
+0:84 Constant:
+0:84 true (const bool)
+0:84 true case
+0:85 multiply second child into first child (temp mediump int)
+0:85 'count' (temp mediump int)
+0:85 Constant:
+0:85 27 (const int)
+0:87 Sequence
+0:87 move second child to first child (temp mediump uint)
+0:87 'mask1' (temp mediump uint)
+0:87 Constant:
+0:87 161 (const uint)
+0:88 Sequence
+0:88 move second child to first child (temp mediump uint)
+0:88 'mask2' (temp mediump uint)
+0:88 Constant:
+0:88 2576 (const uint)
+0:89 Sequence
+0:89 move second child to first child (temp mediump uint)
+0:89 'mask3' (temp mediump uint)
+0:89 left-shift (temp mediump uint)
+0:89 'mask1' (temp mediump uint)
+0:89 Constant:
+0:89 4 (const int)
+0:90 Sequence
+0:90 move second child to first child (temp mediump uint)
+0:90 'mask4' (temp mediump uint)
+0:90 Constant:
+0:90 2737 (const uint)
+0:92 Test condition and select (temp void)
+0:92 Condition
+0:92 Compare Equal (temp bool)
+0:92 'mask3' (temp mediump uint)
+0:92 'mask2' (temp mediump uint)
+0:92 true case
+0:93 multiply second child into first child (temp mediump int)
+0:93 'count' (temp mediump int)
+0:93 Constant:
+0:93 100 (const int)
+0:95 Test condition and select (temp void)
+0:95 Condition
+0:95 Compare Not Equal (temp bool)
+0:95 bitwise and (temp mediump uint)
+0:95 'mask3' (temp mediump uint)
+0:95 'mask1' (temp mediump uint)
+0:95 Constant:
+0:95 0 (const uint)
+0:95 true case
+0:96 multiply second child into first child (temp mediump int)
+0:96 'count' (temp mediump int)
+0:96 Constant:
+0:96 101 (const int)
+0:98 Test condition and select (temp void)
+0:98 Condition
+0:98 Compare Equal (temp bool)
+0:98 inclusive-or (temp mediump uint)
+0:98 'mask1' (temp mediump uint)
+0:98 'mask3' (temp mediump uint)
+0:98 'mask4' (temp mediump uint)
+0:98 true case
+0:99 multiply second child into first child (temp mediump int)
+0:99 'count' (temp mediump int)
+0:99 Constant:
+0:99 102 (const int)
+0:101 Test condition and select (temp void)
+0:101 Condition
+0:101 Compare Equal (temp bool)
+0:101 exclusive-or (temp mediump uint)
+0:101 'mask1' (temp mediump uint)
+0:101 'mask4' (temp mediump uint)
+0:101 Constant:
+0:101 2576 (const uint)
+0:101 true case
+0:102 multiply second child into first child (temp mediump int)
+0:102 'count' (temp mediump int)
+0:102 Constant:
+0:102 103 (const int)
+0:104 add second child into first child (temp mediump 4-component vector of uint)
+0:104 'c' (out mediump 4-component vector of uint)
+0:104 Construct uvec4 (temp mediump 4-component vector of uint)
+0:104 Convert int to uint (temp mediump uint)
+0:104 'count' (temp mediump int)
+0:? Linker Objects
+0:? 'badu' (smooth in mediump 2-component vector of uint)
+0:? 't' (flat in mediump 2-component vector of uint)
+0:? 'f' (smooth in highp float)
+0:? 'tc' (smooth in highp 2-component vector of float)
+0:? 'bad' (smooth in bool)
+0:? 'v' (uniform mediump 4-component vector of uint)
+0:? 'i' (uniform mediump int)
+0:? 'b' (uniform bool)
+0:? 'c' (out mediump 4-component vector of uint)
+0:? 'usampler' (uniform lowp usampler2D)
+
+
+Linked fragment stage:
+
+
+Shader version: 300
+ERROR: node is still EOpNull!
+0:15 Function Definition: main( (global void)
+0:15 Function Parameters:
+0:17 Sequence
+0:17 Sequence
+0:17 move second child to first child (temp mediump int)
+0:17 'count' (temp mediump int)
+0:17 Constant:
+0:17 1 (const int)
+0:19 Sequence
+0:19 move second child to first child (temp mediump uint)
+0:19 'u' (temp mediump uint)
+0:19 add (temp mediump uint)
+0:19 direct index (temp mediump uint)
+0:19 't' (flat in mediump 2-component vector of uint)
+0:19 Constant:
+0:19 1 (const int)
+0:19 Constant:
+0:19 3 (const uint)
+0:27 Test condition and select (temp void)
+0:27 Condition
+0:27 Constant:
+0:27 true (const bool)
+0:27 true case
+0:28 multiply second child into first child (temp mediump int)
+0:28 'count' (temp mediump int)
+0:28 Constant:
+0:28 2 (const int)
+0:29 Test condition and select (temp void)
+0:29 Condition
+0:29 Constant:
+0:29 true (const bool)
+0:29 true case
+0:30 multiply second child into first child (temp mediump int)
+0:30 'count' (temp mediump int)
+0:30 Constant:
+0:30 3 (const int)
+0:31 Test condition and select (temp void)
+0:31 Condition
+0:31 Constant:
+0:31 false (const bool)
+0:31 true case
+0:32 multiply second child into first child (temp mediump int)
+0:32 'count' (temp mediump int)
+0:32 Constant:
+0:32 5 (const int)
+0:41 Test condition and select (temp void)
+0:41 Condition
+0:41 Constant:
+0:41 true (const bool)
+0:41 true case
+0:42 multiply second child into first child (temp mediump int)
+0:42 'count' (temp mediump int)
+0:42 Constant:
+0:42 7 (const int)
+0:43 Test condition and select (temp void)
+0:43 Condition
+0:43 Constant:
+0:43 true (const bool)
+0:43 true case
+0:44 multiply second child into first child (temp mediump int)
+0:44 'count' (temp mediump int)
+0:44 Constant:
+0:44 11 (const int)
+0:45 Test condition and select (temp void)
+0:45 Condition
+0:45 Constant:
+0:45 false (const bool)
+0:45 true case
+0:46 multiply second child into first child (temp mediump int)
+0:46 'count' (temp mediump int)
+0:46 Constant:
+0:46 13 (const int)
+0:49 Sequence
+0:49 move second child to first child (temp mediump int)
+0:49 'shiftedii' (temp mediump int)
+0:49 Constant:
+0:49 -1 (const int)
+0:50 Sequence
+0:50 move second child to first child (temp mediump uint)
+0:50 'shiftedui' (temp mediump uint)
+0:50 Constant:
+0:50 4194303 (const uint)
+0:52 Sequence
+0:52 move second child to first child (temp mediump int)
+0:52 'shiftediu' (temp mediump int)
+0:52 Constant:
+0:52 -1 (const int)
+0:53 Sequence
+0:53 move second child to first child (temp mediump uint)
+0:53 'shifteduu' (temp mediump uint)
+0:53 Constant:
+0:53 4194303 (const uint)
+0:55 Test condition and select (temp void)
+0:55 Condition
+0:55 Compare Equal (temp bool)
+0:55 'shiftedii' (temp mediump int)
+0:55 'shiftediu' (temp mediump int)
+0:55 true case
+0:56 move second child to first child (temp mediump 4-component vector of uint)
+0:56 'c' (out mediump 4-component vector of uint)
+0:56 texture (global lowp 4-component vector of uint)
+0:56 'usampler' (uniform lowp usampler2D)
+0:56 'tc' (smooth in highp 2-component vector of float)
+0:57 Test condition and select (temp void)
+0:57 Condition
+0:57 Compare Equal (temp bool)
+0:57 'shiftedui' (temp mediump uint)
+0:57 'shifteduu' (temp mediump uint)
+0:57 true case
+0:58 move second child to first child (temp mediump 4-component vector of uint)
+0:58 'c' (out mediump 4-component vector of uint)
+0:58 texture (global lowp 4-component vector of uint)
+0:58 'usampler' (uniform lowp usampler2D)
+0:58 add (temp highp 2-component vector of float)
+0:58 'tc' (smooth in highp 2-component vector of float)
+0:58 Constant:
+0:58 1.000000
+0:59 Test condition and select (temp void)
+0:59 Condition
+0:59 Compare Equal (temp bool)
+0:59 'shiftedii' (temp mediump int)
+0:59 Convert uint to int (temp int)
+0:59 'shiftedui' (temp mediump uint)
+0:59 true case
+0:60 move second child to first child (temp mediump 4-component vector of uint)
+0:60 'c' (out mediump 4-component vector of uint)
+0:60 texture (global lowp 4-component vector of uint)
+0:60 'usampler' (uniform lowp usampler2D)
+0:60 subtract (temp highp 2-component vector of float)
+0:60 'tc' (smooth in highp 2-component vector of float)
+0:60 Constant:
+0:60 2.000000
+0:60 2.000000
+0:62 Test condition and select (temp void)
+0:62 Condition
+0:62 Compare Greater Than (temp bool)
+0:62 direct index (temp mediump uint)
+0:62 't' (flat in mediump 2-component vector of uint)
+0:62 Constant:
+0:62 0 (const int)
+0:62 Constant:
+0:62 4 (const uint)
+0:62 true case
+0:63 Sequence
+0:63 Sequence
+0:63 move second child to first child (temp mediump float)
+0:63 'af' (temp mediump float)
+0:63 Convert uint to float (temp mediump float)
+0:63 'u' (temp mediump uint)
+0:64 Sequence
+0:64 move second child to first child (temp bool)
+0:64 'ab' (temp bool)
+0:64 Convert uint to bool (temp bool)
+0:64 'u' (temp mediump uint)
+0:65 Sequence
+0:65 move second child to first child (temp mediump int)
+0:65 'ai' (temp mediump int)
+0:65 Convert uint to int (temp mediump int)
+0:65 'u' (temp mediump uint)
+0:67 add second child into first child (temp mediump 4-component vector of uint)
+0:67 'c' (out mediump 4-component vector of uint)
+0:67 Construct uvec4 (temp mediump 4-component vector of uint)
+0:67 Convert float to uint (temp mediump uint)
+0:67 'af' (temp mediump float)
+0:67 Convert bool to uint (temp mediump uint)
+0:67 'ab' (temp bool)
+0:67 Convert int to uint (temp mediump uint)
+0:67 'ai' (temp mediump int)
+0:67 Convert int to uint (temp mediump uint)
+0:67 'count' (temp mediump int)
+0:75 Test condition and select (temp void)
+0:75 Condition
+0:75 Constant:
+0:75 true (const bool)
+0:75 true case
+0:76 multiply second child into first child (temp mediump int)
+0:76 'count' (temp mediump int)
+0:76 Constant:
+0:76 17 (const int)
+0:78 Test condition and select (temp void)
+0:78 Condition
+0:78 Constant:
+0:78 false (const bool)
+0:78 true case
+0:79 multiply second child into first child (temp mediump int)
+0:79 'count' (temp mediump int)
+0:79 Constant:
+0:79 19 (const int)
+0:81 Test condition and select (temp void)
+0:81 Condition
+0:81 Constant:
+0:81 true (const bool)
+0:81 true case
+0:82 multiply second child into first child (temp mediump int)
+0:82 'count' (temp mediump int)
+0:82 Constant:
+0:82 23 (const int)
+0:84 Test condition and select (temp void)
+0:84 Condition
+0:84 Constant:
+0:84 true (const bool)
+0:84 true case
+0:85 multiply second child into first child (temp mediump int)
+0:85 'count' (temp mediump int)
+0:85 Constant:
+0:85 27 (const int)
+0:87 Sequence
+0:87 move second child to first child (temp mediump uint)
+0:87 'mask1' (temp mediump uint)
+0:87 Constant:
+0:87 161 (const uint)
+0:88 Sequence
+0:88 move second child to first child (temp mediump uint)
+0:88 'mask2' (temp mediump uint)
+0:88 Constant:
+0:88 2576 (const uint)
+0:89 Sequence
+0:89 move second child to first child (temp mediump uint)
+0:89 'mask3' (temp mediump uint)
+0:89 left-shift (temp mediump uint)
+0:89 'mask1' (temp mediump uint)
+0:89 Constant:
+0:89 4 (const int)
+0:90 Sequence
+0:90 move second child to first child (temp mediump uint)
+0:90 'mask4' (temp mediump uint)
+0:90 Constant:
+0:90 2737 (const uint)
+0:92 Test condition and select (temp void)
+0:92 Condition
+0:92 Compare Equal (temp bool)
+0:92 'mask3' (temp mediump uint)
+0:92 'mask2' (temp mediump uint)
+0:92 true case
+0:93 multiply second child into first child (temp mediump int)
+0:93 'count' (temp mediump int)
+0:93 Constant:
+0:93 100 (const int)
+0:95 Test condition and select (temp void)
+0:95 Condition
+0:95 Compare Not Equal (temp bool)
+0:95 bitwise and (temp mediump uint)
+0:95 'mask3' (temp mediump uint)
+0:95 'mask1' (temp mediump uint)
+0:95 Constant:
+0:95 0 (const uint)
+0:95 true case
+0:96 multiply second child into first child (temp mediump int)
+0:96 'count' (temp mediump int)
+0:96 Constant:
+0:96 101 (const int)
+0:98 Test condition and select (temp void)
+0:98 Condition
+0:98 Compare Equal (temp bool)
+0:98 inclusive-or (temp mediump uint)
+0:98 'mask1' (temp mediump uint)
+0:98 'mask3' (temp mediump uint)
+0:98 'mask4' (temp mediump uint)
+0:98 true case
+0:99 multiply second child into first child (temp mediump int)
+0:99 'count' (temp mediump int)
+0:99 Constant:
+0:99 102 (const int)
+0:101 Test condition and select (temp void)
+0:101 Condition
+0:101 Compare Equal (temp bool)
+0:101 exclusive-or (temp mediump uint)
+0:101 'mask1' (temp mediump uint)
+0:101 'mask4' (temp mediump uint)
+0:101 Constant:
+0:101 2576 (const uint)
+0:101 true case
+0:102 multiply second child into first child (temp mediump int)
+0:102 'count' (temp mediump int)
+0:102 Constant:
+0:102 103 (const int)
+0:104 add second child into first child (temp mediump 4-component vector of uint)
+0:104 'c' (out mediump 4-component vector of uint)
+0:104 Construct uvec4 (temp mediump 4-component vector of uint)
+0:104 Convert int to uint (temp mediump uint)
+0:104 'count' (temp mediump int)
+0:? Linker Objects
+0:? 'badu' (smooth in mediump 2-component vector of uint)
+0:? 't' (flat in mediump 2-component vector of uint)
+0:? 'f' (smooth in highp float)
+0:? 'tc' (smooth in highp 2-component vector of float)
+0:? 'bad' (smooth in bool)
+0:? 'v' (uniform mediump 4-component vector of uint)
+0:? 'i' (uniform mediump int)
+0:? 'b' (uniform bool)
+0:? 'c' (out mediump 4-component vector of uint)
+0:? 'usampler' (uniform lowp usampler2D)
+
diff --git a/chromium/third_party/glslang/src/Test/baseResults/uniformArray.frag.out b/chromium/third_party/glslang/src/Test/baseResults/uniformArray.frag.out
new file mode 100644
index 00000000000..4e8ace841e1
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/uniformArray.frag.out
@@ -0,0 +1,97 @@
+uniformArray.frag
+Shader version: 130
+0:? Sequence
+0:7 Function Definition: main( (global void)
+0:7 Function Parameters:
+0:9 Sequence
+0:9 Sequence
+0:9 move second child to first child (temp 4-component vector of float)
+0:9 'texColor' (temp 4-component vector of float)
+0:9 add (temp 4-component vector of float)
+0:9 direct index (temp 4-component vector of float)
+0:9 'color' (uniform 6-element array of 4-component vector of float)
+0:9 Constant:
+0:9 1 (const int)
+0:9 direct index (temp 4-component vector of float)
+0:9 'color' (uniform 6-element array of 4-component vector of float)
+0:9 Constant:
+0:9 1 (const int)
+0:11 add second child into first child (temp 3-component vector of float)
+0:11 vector swizzle (temp 3-component vector of float)
+0:11 'texColor' (temp 4-component vector of float)
+0:11 Sequence
+0:11 Constant:
+0:11 0 (const int)
+0:11 Constant:
+0:11 1 (const int)
+0:11 Constant:
+0:11 2 (const int)
+0:11 'inColor' (uniform 3-component vector of float)
+0:13 add second child into first child (temp float)
+0:13 direct index (temp float)
+0:13 'texColor' (temp 4-component vector of float)
+0:13 Constant:
+0:13 3 (const int)
+0:13 direct index (temp float)
+0:13 'alpha' (uniform 16-element array of float)
+0:13 Constant:
+0:13 12 (const int)
+0:15 move second child to first child (temp 4-component vector of float)
+0:15 'gl_FragColor' (fragColor 4-component vector of float FragColor)
+0:15 'texColor' (temp 4-component vector of float)
+0:? Linker Objects
+0:? 'texSampler2D' (uniform sampler2D)
+0:? 'inColor' (uniform 3-component vector of float)
+0:? 'color' (uniform 6-element array of 4-component vector of float)
+0:? 'alpha' (uniform 16-element array of float)
+
+
+Linked fragment stage:
+
+
+Shader version: 130
+0:? Sequence
+0:7 Function Definition: main( (global void)
+0:7 Function Parameters:
+0:9 Sequence
+0:9 Sequence
+0:9 move second child to first child (temp 4-component vector of float)
+0:9 'texColor' (temp 4-component vector of float)
+0:9 add (temp 4-component vector of float)
+0:9 direct index (temp 4-component vector of float)
+0:9 'color' (uniform 6-element array of 4-component vector of float)
+0:9 Constant:
+0:9 1 (const int)
+0:9 direct index (temp 4-component vector of float)
+0:9 'color' (uniform 6-element array of 4-component vector of float)
+0:9 Constant:
+0:9 1 (const int)
+0:11 add second child into first child (temp 3-component vector of float)
+0:11 vector swizzle (temp 3-component vector of float)
+0:11 'texColor' (temp 4-component vector of float)
+0:11 Sequence
+0:11 Constant:
+0:11 0 (const int)
+0:11 Constant:
+0:11 1 (const int)
+0:11 Constant:
+0:11 2 (const int)
+0:11 'inColor' (uniform 3-component vector of float)
+0:13 add second child into first child (temp float)
+0:13 direct index (temp float)
+0:13 'texColor' (temp 4-component vector of float)
+0:13 Constant:
+0:13 3 (const int)
+0:13 direct index (temp float)
+0:13 'alpha' (uniform 16-element array of float)
+0:13 Constant:
+0:13 12 (const int)
+0:15 move second child to first child (temp 4-component vector of float)
+0:15 'gl_FragColor' (fragColor 4-component vector of float FragColor)
+0:15 'texColor' (temp 4-component vector of float)
+0:? Linker Objects
+0:? 'texSampler2D' (uniform sampler2D)
+0:? 'inColor' (uniform 3-component vector of float)
+0:? 'color' (uniform 6-element array of 4-component vector of float)
+0:? 'alpha' (uniform 16-element array of float)
+
diff --git a/chromium/third_party/glslang/src/Test/baseResults/variableArrayIndex.frag.out b/chromium/third_party/glslang/src/Test/baseResults/variableArrayIndex.frag.out
new file mode 100644
index 00000000000..2a63d115b1b
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/variableArrayIndex.frag.out
@@ -0,0 +1,225 @@
+variableArrayIndex.frag
+WARNING: 0:3: varying deprecated in version 130; may be removed in future release
+
+Shader version: 130
+0:? Sequence
+0:29 Function Definition: main( (global void)
+0:29 Function Parameters:
+0:? Sequence
+0:32 Sequence
+0:32 move second child to first child (temp int)
+0:32 'iLocal' (temp int)
+0:32 'Count' (uniform int)
+0:34 Test condition and select (temp void)
+0:34 Condition
+0:34 Compare Greater Than (temp bool)
+0:34 i: direct index for structure (global int)
+0:34 direct index (temp structure{global int i, global float f, global structure{global int i, global float f} s1_1})
+0:34 s2_1: direct index for structure (global 3-element array of structure{global int i, global float f, global structure{global int i, global float f} s1_1})
+0:34 'foo3' (uniform structure{global 3-element array of structure{global int i, global float f, global structure{global int i, global float f} s1_1} s2_1, global int i, global float f, global structure{global int i, global float f} s1_1})
+0:34 Constant:
+0:34 0 (const int)
+0:34 Constant:
+0:34 1 (const int)
+0:34 Constant:
+0:34 0 (const int)
+0:34 Constant:
+0:34 0 (const int)
+0:34 true case
+0:35 move second child to first child (temp float)
+0:35 'scale' (temp float)
+0:35 f: direct index for structure (global float)
+0:35 s1_1: direct index for structure (global structure{global int i, global float f})
+0:35 indirect index (temp structure{global int i, global float f, global structure{global int i, global float f} s1_1})
+0:35 'foo2' (uniform 5-element array of structure{global int i, global float f, global structure{global int i, global float f} s1_1})
+0:35 add (temp int)
+0:35 add (temp int)
+0:35 i: direct index for structure (global int)
+0:35 indirect index (temp structure{global int i, global float f, global structure{global int i, global float f} s1_1})
+0:35 s2_1: direct index for structure (global 3-element array of structure{global int i, global float f, global structure{global int i, global float f} s1_1})
+0:35 'foo3' (uniform structure{global 3-element array of structure{global int i, global float f, global structure{global int i, global float f} s1_1} s2_1, global int i, global float f, global structure{global int i, global float f} s1_1})
+0:35 Constant:
+0:35 0 (const int)
+0:35 i: direct index for structure (global int)
+0:35 'foo' (uniform structure{global int i, global float f})
+0:35 Constant:
+0:35 0 (const int)
+0:35 Constant:
+0:35 0 (const int)
+0:35 Constant:
+0:35 2 (const int)
+0:35 Pre-Increment (temp int)
+0:35 'iLocal' (temp int)
+0:35 Constant:
+0:35 2 (const int)
+0:35 Constant:
+0:35 1 (const int)
+0:34 false case
+0:37 move second child to first child (temp float)
+0:37 'scale' (temp float)
+0:37 f: direct index for structure (global float)
+0:37 s1_1: direct index for structure (global structure{global int i, global float f})
+0:37 direct index (temp structure{global int i, global float f, global structure{global int i, global float f} s1_1})
+0:37 s2_1: direct index for structure (global 3-element array of structure{global int i, global float f, global structure{global int i, global float f} s1_1})
+0:37 'foo3' (uniform structure{global 3-element array of structure{global int i, global float f, global structure{global int i, global float f} s1_1} s2_1, global int i, global float f, global structure{global int i, global float f} s1_1})
+0:37 Constant:
+0:37 0 (const int)
+0:37 Constant:
+0:37 0 (const int)
+0:37 Constant:
+0:37 2 (const int)
+0:37 Constant:
+0:37 1 (const int)
+0:43 move second child to first child (temp 4-component vector of float)
+0:43 'gl_FragColor' (fragColor 4-component vector of float FragColor)
+0:43 vector-scale (temp 4-component vector of float)
+0:43 'scale' (temp float)
+0:43 texture (global 4-component vector of float)
+0:43 'sampler' (uniform sampler2D)
+0:43 'coord' (smooth in 2-component vector of float)
+0:45 Sequence
+0:45 move second child to first child (temp 3-element array of 2-component vector of float)
+0:45 'constructed' (temp 3-element array of 2-component vector of float)
+0:45 Construct vec2 (temp 3-element array of 2-component vector of float)
+0:45 'coord' (smooth in 2-component vector of float)
+0:45 Construct vec2 (temp 2-component vector of float)
+0:45 'scale' (temp float)
+0:45 Constant:
+0:45 1.000000
+0:45 2.000000
+0:46 add second child into first child (temp 4-component vector of float)
+0:46 'gl_FragColor' (fragColor 4-component vector of float FragColor)
+0:46 Construct vec4 (temp 4-component vector of float)
+0:46 indirect index (temp 2-component vector of float)
+0:46 'constructed' (temp 3-element array of 2-component vector of float)
+0:46 i: direct index for structure (global int)
+0:46 'foo' (uniform structure{global int i, global float f})
+0:46 Constant:
+0:46 0 (const int)
+0:46 indirect index (temp 2-component vector of float)
+0:46 'constructed' (temp 3-element array of 2-component vector of float)
+0:46 i: direct index for structure (global int)
+0:46 'foo' (uniform structure{global int i, global float f})
+0:46 Constant:
+0:46 0 (const int)
+0:? Linker Objects
+0:? 'sampler' (uniform sampler2D)
+0:? 'coord' (smooth in 2-component vector of float)
+0:? 'foo' (uniform structure{global int i, global float f})
+0:? 'foo2' (uniform 5-element array of structure{global int i, global float f, global structure{global int i, global float f} s1_1})
+0:? 'foo3' (uniform structure{global 3-element array of structure{global int i, global float f, global structure{global int i, global float f} s1_1} s2_1, global int i, global float f, global structure{global int i, global float f} s1_1})
+0:? 'Count' (uniform int)
+
+
+Linked fragment stage:
+
+
+Shader version: 130
+0:? Sequence
+0:29 Function Definition: main( (global void)
+0:29 Function Parameters:
+0:? Sequence
+0:32 Sequence
+0:32 move second child to first child (temp int)
+0:32 'iLocal' (temp int)
+0:32 'Count' (uniform int)
+0:34 Test condition and select (temp void)
+0:34 Condition
+0:34 Compare Greater Than (temp bool)
+0:34 i: direct index for structure (global int)
+0:34 direct index (temp structure{global int i, global float f, global structure{global int i, global float f} s1_1})
+0:34 s2_1: direct index for structure (global 3-element array of structure{global int i, global float f, global structure{global int i, global float f} s1_1})
+0:34 'foo3' (uniform structure{global 3-element array of structure{global int i, global float f, global structure{global int i, global float f} s1_1} s2_1, global int i, global float f, global structure{global int i, global float f} s1_1})
+0:34 Constant:
+0:34 0 (const int)
+0:34 Constant:
+0:34 1 (const int)
+0:34 Constant:
+0:34 0 (const int)
+0:34 Constant:
+0:34 0 (const int)
+0:34 true case
+0:35 move second child to first child (temp float)
+0:35 'scale' (temp float)
+0:35 f: direct index for structure (global float)
+0:35 s1_1: direct index for structure (global structure{global int i, global float f})
+0:35 indirect index (temp structure{global int i, global float f, global structure{global int i, global float f} s1_1})
+0:35 'foo2' (uniform 5-element array of structure{global int i, global float f, global structure{global int i, global float f} s1_1})
+0:35 add (temp int)
+0:35 add (temp int)
+0:35 i: direct index for structure (global int)
+0:35 indirect index (temp structure{global int i, global float f, global structure{global int i, global float f} s1_1})
+0:35 s2_1: direct index for structure (global 3-element array of structure{global int i, global float f, global structure{global int i, global float f} s1_1})
+0:35 'foo3' (uniform structure{global 3-element array of structure{global int i, global float f, global structure{global int i, global float f} s1_1} s2_1, global int i, global float f, global structure{global int i, global float f} s1_1})
+0:35 Constant:
+0:35 0 (const int)
+0:35 i: direct index for structure (global int)
+0:35 'foo' (uniform structure{global int i, global float f})
+0:35 Constant:
+0:35 0 (const int)
+0:35 Constant:
+0:35 0 (const int)
+0:35 Constant:
+0:35 2 (const int)
+0:35 Pre-Increment (temp int)
+0:35 'iLocal' (temp int)
+0:35 Constant:
+0:35 2 (const int)
+0:35 Constant:
+0:35 1 (const int)
+0:34 false case
+0:37 move second child to first child (temp float)
+0:37 'scale' (temp float)
+0:37 f: direct index for structure (global float)
+0:37 s1_1: direct index for structure (global structure{global int i, global float f})
+0:37 direct index (temp structure{global int i, global float f, global structure{global int i, global float f} s1_1})
+0:37 s2_1: direct index for structure (global 3-element array of structure{global int i, global float f, global structure{global int i, global float f} s1_1})
+0:37 'foo3' (uniform structure{global 3-element array of structure{global int i, global float f, global structure{global int i, global float f} s1_1} s2_1, global int i, global float f, global structure{global int i, global float f} s1_1})
+0:37 Constant:
+0:37 0 (const int)
+0:37 Constant:
+0:37 0 (const int)
+0:37 Constant:
+0:37 2 (const int)
+0:37 Constant:
+0:37 1 (const int)
+0:43 move second child to first child (temp 4-component vector of float)
+0:43 'gl_FragColor' (fragColor 4-component vector of float FragColor)
+0:43 vector-scale (temp 4-component vector of float)
+0:43 'scale' (temp float)
+0:43 texture (global 4-component vector of float)
+0:43 'sampler' (uniform sampler2D)
+0:43 'coord' (smooth in 2-component vector of float)
+0:45 Sequence
+0:45 move second child to first child (temp 3-element array of 2-component vector of float)
+0:45 'constructed' (temp 3-element array of 2-component vector of float)
+0:45 Construct vec2 (temp 3-element array of 2-component vector of float)
+0:45 'coord' (smooth in 2-component vector of float)
+0:45 Construct vec2 (temp 2-component vector of float)
+0:45 'scale' (temp float)
+0:45 Constant:
+0:45 1.000000
+0:45 2.000000
+0:46 add second child into first child (temp 4-component vector of float)
+0:46 'gl_FragColor' (fragColor 4-component vector of float FragColor)
+0:46 Construct vec4 (temp 4-component vector of float)
+0:46 indirect index (temp 2-component vector of float)
+0:46 'constructed' (temp 3-element array of 2-component vector of float)
+0:46 i: direct index for structure (global int)
+0:46 'foo' (uniform structure{global int i, global float f})
+0:46 Constant:
+0:46 0 (const int)
+0:46 indirect index (temp 2-component vector of float)
+0:46 'constructed' (temp 3-element array of 2-component vector of float)
+0:46 i: direct index for structure (global int)
+0:46 'foo' (uniform structure{global int i, global float f})
+0:46 Constant:
+0:46 0 (const int)
+0:? Linker Objects
+0:? 'sampler' (uniform sampler2D)
+0:? 'coord' (smooth in 2-component vector of float)
+0:? 'foo' (uniform structure{global int i, global float f})
+0:? 'foo2' (uniform 5-element array of structure{global int i, global float f, global structure{global int i, global float f} s1_1})
+0:? 'foo3' (uniform structure{global 3-element array of structure{global int i, global float f, global structure{global int i, global float f} s1_1} s2_1, global int i, global float f, global structure{global int i, global float f} s1_1})
+0:? 'Count' (uniform int)
+
diff --git a/chromium/third_party/glslang/src/Test/baseResults/varyingArray.frag.out b/chromium/third_party/glslang/src/Test/baseResults/varyingArray.frag.out
new file mode 100644
index 00000000000..c6cf6bae2b4
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/varyingArray.frag.out
@@ -0,0 +1,120 @@
+varyingArray.frag
+WARNING: 0:3: varying deprecated in version 130; may be removed in future release
+WARNING: 0:4: varying deprecated in version 130; may be removed in future release
+WARNING: 0:6: varying deprecated in version 130; may be removed in future release
+WARNING: 0:8: varying deprecated in version 130; may be removed in future release
+
+Shader version: 130
+0:? Sequence
+0:10 Function Definition: main( (global void)
+0:10 Function Parameters:
+0:12 Sequence
+0:12 Sequence
+0:12 move second child to first child (temp 4-component vector of float)
+0:12 'texColor' (temp 4-component vector of float)
+0:12 texture (global 4-component vector of float)
+0:12 'texSampler2D' (uniform sampler2D)
+0:12 Construct vec2 (temp 2-component vector of float)
+0:12 add (temp 4-component vector of float)
+0:12 direct index (smooth temp 4-component vector of float TexCoord)
+0:12 'gl_TexCoord' (smooth in 6-element array of 4-component vector of float TexCoord)
+0:12 Constant:
+0:12 4 (const int)
+0:12 direct index (smooth temp 4-component vector of float TexCoord)
+0:12 'gl_TexCoord' (smooth in 6-element array of 4-component vector of float TexCoord)
+0:12 Constant:
+0:12 5 (const int)
+0:14 add second child into first child (temp 4-component vector of float)
+0:14 'texColor' (temp 4-component vector of float)
+0:14 'color' (smooth in 4-component vector of float)
+0:16 move second child to first child (temp float)
+0:16 direct index (temp float)
+0:16 'texColor' (temp 4-component vector of float)
+0:16 Constant:
+0:16 3 (const int)
+0:16 'alpha' (smooth in float)
+0:18 move second child to first child (temp 4-component vector of float)
+0:18 'gl_FragColor' (fragColor 4-component vector of float FragColor)
+0:18 add (temp 4-component vector of float)
+0:18 add (temp 4-component vector of float)
+0:18 add (temp 4-component vector of float)
+0:18 direct index (smooth temp 4-component vector of float)
+0:18 'foo' (smooth in 3-element array of 4-component vector of float)
+0:18 Constant:
+0:18 1 (const int)
+0:18 direct index (smooth temp 4-component vector of float TexCoord)
+0:18 'gl_TexCoord' (smooth in 6-element array of 4-component vector of float TexCoord)
+0:18 Constant:
+0:18 0 (const int)
+0:18 direct index (smooth temp 4-component vector of float TexCoord)
+0:18 'gl_TexCoord' (smooth in 6-element array of 4-component vector of float TexCoord)
+0:18 Constant:
+0:18 4 (const int)
+0:18 'texColor' (temp 4-component vector of float)
+0:? Linker Objects
+0:? 'texSampler2D' (uniform sampler2D)
+0:? 'color' (smooth in 4-component vector of float)
+0:? 'alpha' (smooth in float)
+0:? 'gl_TexCoord' (smooth in 6-element array of 4-component vector of float TexCoord)
+0:? 'gl_TexCoord' (smooth in 6-element array of 4-component vector of float TexCoord)
+0:? 'foo' (smooth in 3-element array of 4-component vector of float)
+
+
+Linked fragment stage:
+
+
+Shader version: 130
+0:? Sequence
+0:10 Function Definition: main( (global void)
+0:10 Function Parameters:
+0:12 Sequence
+0:12 Sequence
+0:12 move second child to first child (temp 4-component vector of float)
+0:12 'texColor' (temp 4-component vector of float)
+0:12 texture (global 4-component vector of float)
+0:12 'texSampler2D' (uniform sampler2D)
+0:12 Construct vec2 (temp 2-component vector of float)
+0:12 add (temp 4-component vector of float)
+0:12 direct index (smooth temp 4-component vector of float TexCoord)
+0:12 'gl_TexCoord' (smooth in 6-element array of 4-component vector of float TexCoord)
+0:12 Constant:
+0:12 4 (const int)
+0:12 direct index (smooth temp 4-component vector of float TexCoord)
+0:12 'gl_TexCoord' (smooth in 6-element array of 4-component vector of float TexCoord)
+0:12 Constant:
+0:12 5 (const int)
+0:14 add second child into first child (temp 4-component vector of float)
+0:14 'texColor' (temp 4-component vector of float)
+0:14 'color' (smooth in 4-component vector of float)
+0:16 move second child to first child (temp float)
+0:16 direct index (temp float)
+0:16 'texColor' (temp 4-component vector of float)
+0:16 Constant:
+0:16 3 (const int)
+0:16 'alpha' (smooth in float)
+0:18 move second child to first child (temp 4-component vector of float)
+0:18 'gl_FragColor' (fragColor 4-component vector of float FragColor)
+0:18 add (temp 4-component vector of float)
+0:18 add (temp 4-component vector of float)
+0:18 add (temp 4-component vector of float)
+0:18 direct index (smooth temp 4-component vector of float)
+0:18 'foo' (smooth in 3-element array of 4-component vector of float)
+0:18 Constant:
+0:18 1 (const int)
+0:18 direct index (smooth temp 4-component vector of float TexCoord)
+0:18 'gl_TexCoord' (smooth in 6-element array of 4-component vector of float TexCoord)
+0:18 Constant:
+0:18 0 (const int)
+0:18 direct index (smooth temp 4-component vector of float TexCoord)
+0:18 'gl_TexCoord' (smooth in 6-element array of 4-component vector of float TexCoord)
+0:18 Constant:
+0:18 4 (const int)
+0:18 'texColor' (temp 4-component vector of float)
+0:? Linker Objects
+0:? 'texSampler2D' (uniform sampler2D)
+0:? 'color' (smooth in 4-component vector of float)
+0:? 'alpha' (smooth in float)
+0:? 'gl_TexCoord' (smooth in 6-element array of 4-component vector of float TexCoord)
+0:? 'gl_TexCoord' (smooth in 6-element array of 4-component vector of float TexCoord)
+0:? 'foo' (smooth in 3-element array of 4-component vector of float)
+
diff --git a/chromium/third_party/glslang/src/Test/baseResults/varyingArrayIndirect.frag.out b/chromium/third_party/glslang/src/Test/baseResults/varyingArrayIndirect.frag.out
new file mode 100644
index 00000000000..02a41f3f1dc
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/varyingArrayIndirect.frag.out
@@ -0,0 +1,126 @@
+varyingArrayIndirect.frag
+WARNING: 0:3: varying deprecated in version 130; may be removed in future release
+WARNING: 0:4: varying deprecated in version 130; may be removed in future release
+WARNING: 0:6: varying deprecated in version 130; may be removed in future release
+WARNING: 0:8: varying deprecated in version 130; may be removed in future release
+
+Shader version: 130
+0:? Sequence
+0:12 Function Definition: main( (global void)
+0:12 Function Parameters:
+0:14 Sequence
+0:14 Sequence
+0:14 move second child to first child (temp 4-component vector of float)
+0:14 'texColor' (temp 4-component vector of float)
+0:14 texture (global 4-component vector of float)
+0:14 'texSampler2D' (uniform sampler2D)
+0:14 Construct vec2 (temp 2-component vector of float)
+0:14 add (temp 4-component vector of float)
+0:14 add (temp 4-component vector of float)
+0:14 indirect index (smooth temp 4-component vector of float)
+0:14 'userIn' (smooth in 2-element array of 4-component vector of float)
+0:14 'b' (uniform int)
+0:14 indirect index (smooth temp 4-component vector of float TexCoord)
+0:14 'gl_TexCoord' (smooth in 6-element array of 4-component vector of float TexCoord)
+0:14 'a' (uniform int)
+0:14 direct index (smooth temp 4-component vector of float TexCoord)
+0:14 'gl_TexCoord' (smooth in 6-element array of 4-component vector of float TexCoord)
+0:14 Constant:
+0:14 5 (const int)
+0:16 add second child into first child (temp 4-component vector of float)
+0:16 'texColor' (temp 4-component vector of float)
+0:16 'color' (smooth in 4-component vector of float)
+0:18 move second child to first child (temp float)
+0:18 direct index (temp float)
+0:18 'texColor' (temp 4-component vector of float)
+0:18 Constant:
+0:18 3 (const int)
+0:18 'alpha' (smooth in float)
+0:20 move second child to first child (temp 4-component vector of float)
+0:20 'gl_FragColor' (fragColor 4-component vector of float FragColor)
+0:20 add (temp 4-component vector of float)
+0:20 add (temp 4-component vector of float)
+0:20 add (temp 4-component vector of float)
+0:20 direct index (smooth temp 4-component vector of float TexCoord)
+0:20 'gl_TexCoord' (smooth in 6-element array of 4-component vector of float TexCoord)
+0:20 Constant:
+0:20 0 (const int)
+0:20 indirect index (smooth temp 4-component vector of float TexCoord)
+0:20 'gl_TexCoord' (smooth in 6-element array of 4-component vector of float TexCoord)
+0:20 'b' (uniform int)
+0:20 'texColor' (temp 4-component vector of float)
+0:20 indirect index (smooth temp 4-component vector of float)
+0:20 'userIn' (smooth in 2-element array of 4-component vector of float)
+0:20 'a' (uniform int)
+0:? Linker Objects
+0:? 'texSampler2D' (uniform sampler2D)
+0:? 'color' (smooth in 4-component vector of float)
+0:? 'alpha' (smooth in float)
+0:? 'gl_TexCoord' (smooth in 6-element array of 4-component vector of float TexCoord)
+0:? 'gl_TexCoord' (smooth in 6-element array of 4-component vector of float TexCoord)
+0:? 'userIn' (smooth in 2-element array of 4-component vector of float)
+0:? 'a' (uniform int)
+0:? 'b' (uniform int)
+
+
+Linked fragment stage:
+
+
+Shader version: 130
+0:? Sequence
+0:12 Function Definition: main( (global void)
+0:12 Function Parameters:
+0:14 Sequence
+0:14 Sequence
+0:14 move second child to first child (temp 4-component vector of float)
+0:14 'texColor' (temp 4-component vector of float)
+0:14 texture (global 4-component vector of float)
+0:14 'texSampler2D' (uniform sampler2D)
+0:14 Construct vec2 (temp 2-component vector of float)
+0:14 add (temp 4-component vector of float)
+0:14 add (temp 4-component vector of float)
+0:14 indirect index (smooth temp 4-component vector of float)
+0:14 'userIn' (smooth in 2-element array of 4-component vector of float)
+0:14 'b' (uniform int)
+0:14 indirect index (smooth temp 4-component vector of float TexCoord)
+0:14 'gl_TexCoord' (smooth in 6-element array of 4-component vector of float TexCoord)
+0:14 'a' (uniform int)
+0:14 direct index (smooth temp 4-component vector of float TexCoord)
+0:14 'gl_TexCoord' (smooth in 6-element array of 4-component vector of float TexCoord)
+0:14 Constant:
+0:14 5 (const int)
+0:16 add second child into first child (temp 4-component vector of float)
+0:16 'texColor' (temp 4-component vector of float)
+0:16 'color' (smooth in 4-component vector of float)
+0:18 move second child to first child (temp float)
+0:18 direct index (temp float)
+0:18 'texColor' (temp 4-component vector of float)
+0:18 Constant:
+0:18 3 (const int)
+0:18 'alpha' (smooth in float)
+0:20 move second child to first child (temp 4-component vector of float)
+0:20 'gl_FragColor' (fragColor 4-component vector of float FragColor)
+0:20 add (temp 4-component vector of float)
+0:20 add (temp 4-component vector of float)
+0:20 add (temp 4-component vector of float)
+0:20 direct index (smooth temp 4-component vector of float TexCoord)
+0:20 'gl_TexCoord' (smooth in 6-element array of 4-component vector of float TexCoord)
+0:20 Constant:
+0:20 0 (const int)
+0:20 indirect index (smooth temp 4-component vector of float TexCoord)
+0:20 'gl_TexCoord' (smooth in 6-element array of 4-component vector of float TexCoord)
+0:20 'b' (uniform int)
+0:20 'texColor' (temp 4-component vector of float)
+0:20 indirect index (smooth temp 4-component vector of float)
+0:20 'userIn' (smooth in 2-element array of 4-component vector of float)
+0:20 'a' (uniform int)
+0:? Linker Objects
+0:? 'texSampler2D' (uniform sampler2D)
+0:? 'color' (smooth in 4-component vector of float)
+0:? 'alpha' (smooth in float)
+0:? 'gl_TexCoord' (smooth in 6-element array of 4-component vector of float TexCoord)
+0:? 'gl_TexCoord' (smooth in 6-element array of 4-component vector of float TexCoord)
+0:? 'userIn' (smooth in 2-element array of 4-component vector of float)
+0:? 'a' (uniform int)
+0:? 'b' (uniform int)
+
diff --git a/chromium/third_party/glslang/src/Test/baseResults/versionsClean.frag.out b/chromium/third_party/glslang/src/Test/baseResults/versionsClean.frag.out
new file mode 100644
index 00000000000..44f04f6aa02
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/versionsClean.frag.out
@@ -0,0 +1,44 @@
+versionsClean.frag
+ERROR: #version: statement must appear first in es-profile shader; before comments or newlines
+ERROR: 0:34: '#version' : must occur first in shader
+ERROR: 2 compilation errors. No code generated.
+
+
+Shader version: 300
+ERROR: node is still EOpNull!
+0:41 Function Definition: main( (global void)
+0:41 Function Parameters:
+0:43 Sequence
+0:43 move second child to first child (temp highp 4-component vector of float)
+0:43 'foo' (out highp 4-component vector of float)
+0:43 Construct vec4 (temp highp 4-component vector of float)
+0:43 'color' (smooth in highp 3-component vector of float)
+0:43 Constant:
+0:43 142.000000
+0:44 Branch: Kill
+0:? Linker Objects
+0:? 'color' (smooth in highp 3-component vector of float)
+0:? 'foo' (out highp 4-component vector of float)
+0:? 'bar' (uniform highp sampler2DArrayShadow)
+
+
+Linked fragment stage:
+
+
+Shader version: 300
+ERROR: node is still EOpNull!
+0:41 Function Definition: main( (global void)
+0:41 Function Parameters:
+0:43 Sequence
+0:43 move second child to first child (temp highp 4-component vector of float)
+0:43 'foo' (out highp 4-component vector of float)
+0:43 Construct vec4 (temp highp 4-component vector of float)
+0:43 'color' (smooth in highp 3-component vector of float)
+0:43 Constant:
+0:43 142.000000
+0:44 Branch: Kill
+0:? Linker Objects
+0:? 'color' (smooth in highp 3-component vector of float)
+0:? 'foo' (out highp 4-component vector of float)
+0:? 'bar' (uniform highp sampler2DArrayShadow)
+
diff --git a/chromium/third_party/glslang/src/Test/baseResults/versionsClean.vert.out b/chromium/third_party/glslang/src/Test/baseResults/versionsClean.vert.out
new file mode 100644
index 00000000000..c5d05a71a62
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/versionsClean.vert.out
@@ -0,0 +1,49 @@
+versionsClean.vert
+Warning, version 420 is not yet complete; most version-specific features are present, but some are missing.
+
+Shader version: 420
+0:? Sequence
+0:40 Function Definition: main( (global void)
+0:40 Function Parameters:
+0:42 Sequence
+0:42 move second child to first child (temp 4-component vector of float)
+0:42 gl_Position: direct index for structure (gl_Position 4-component vector of float Position)
+0:42 'anon@0' (out block{gl_Position 4-component vector of float Position gl_Position, gl_PointSize float PointSize gl_PointSize, out implicitly-sized array of float ClipDistance gl_ClipDistance, gl_ClipVertex 4-component vector of float ClipVertex gl_ClipVertex, out 4-component vector of float FrontColor gl_FrontColor, out 4-component vector of float BackColor gl_BackColor, out 4-component vector of float FrontSecondaryColor gl_FrontSecondaryColor, out 4-component vector of float BackSecondaryColor gl_BackSecondaryColor, out implicitly-sized array of 4-component vector of float TexCoord gl_TexCoord, out float FogFragCoord gl_FogFragCoord})
+0:42 Constant:
+0:42 0 (const uint)
+0:42 Construct vec4 (temp 4-component vector of float)
+0:42 'color' (in 3-component vector of float)
+0:42 Constant:
+0:42 142.000000
+0:? Linker Objects
+0:? 'color' (in 3-component vector of float)
+0:? 'foo' (uniform sampler2DRect)
+0:? 'anon@0' (out block{gl_Position 4-component vector of float Position gl_Position, gl_PointSize float PointSize gl_PointSize, out implicitly-sized array of float ClipDistance gl_ClipDistance, gl_ClipVertex 4-component vector of float ClipVertex gl_ClipVertex, out 4-component vector of float FrontColor gl_FrontColor, out 4-component vector of float BackColor gl_BackColor, out 4-component vector of float FrontSecondaryColor gl_FrontSecondaryColor, out 4-component vector of float BackSecondaryColor gl_BackSecondaryColor, out implicitly-sized array of 4-component vector of float TexCoord gl_TexCoord, out float FogFragCoord gl_FogFragCoord})
+0:? 'gl_VertexID' (gl_VertexId int VertexId)
+0:? 'gl_InstanceID' (gl_InstanceId int InstanceId)
+
+
+Linked vertex stage:
+
+
+Shader version: 420
+0:? Sequence
+0:40 Function Definition: main( (global void)
+0:40 Function Parameters:
+0:42 Sequence
+0:42 move second child to first child (temp 4-component vector of float)
+0:42 gl_Position: direct index for structure (gl_Position 4-component vector of float Position)
+0:42 'anon@0' (out block{gl_Position 4-component vector of float Position gl_Position, gl_PointSize float PointSize gl_PointSize, out 1-element array of float ClipDistance gl_ClipDistance, gl_ClipVertex 4-component vector of float ClipVertex gl_ClipVertex, out 4-component vector of float FrontColor gl_FrontColor, out 4-component vector of float BackColor gl_BackColor, out 4-component vector of float FrontSecondaryColor gl_FrontSecondaryColor, out 4-component vector of float BackSecondaryColor gl_BackSecondaryColor, out 1-element array of 4-component vector of float TexCoord gl_TexCoord, out float FogFragCoord gl_FogFragCoord})
+0:42 Constant:
+0:42 0 (const uint)
+0:42 Construct vec4 (temp 4-component vector of float)
+0:42 'color' (in 3-component vector of float)
+0:42 Constant:
+0:42 142.000000
+0:? Linker Objects
+0:? 'color' (in 3-component vector of float)
+0:? 'foo' (uniform sampler2DRect)
+0:? 'anon@0' (out block{gl_Position 4-component vector of float Position gl_Position, gl_PointSize float PointSize gl_PointSize, out 1-element array of float ClipDistance gl_ClipDistance, gl_ClipVertex 4-component vector of float ClipVertex gl_ClipVertex, out 4-component vector of float FrontColor gl_FrontColor, out 4-component vector of float BackColor gl_BackColor, out 4-component vector of float FrontSecondaryColor gl_FrontSecondaryColor, out 4-component vector of float BackSecondaryColor gl_BackSecondaryColor, out 1-element array of 4-component vector of float TexCoord gl_TexCoord, out float FogFragCoord gl_FogFragCoord})
+0:? 'gl_VertexID' (gl_VertexId int VertexId)
+0:? 'gl_InstanceID' (gl_InstanceId int InstanceId)
+
diff --git a/chromium/third_party/glslang/src/Test/baseResults/versionsErrors.frag.out b/chromium/third_party/glslang/src/Test/baseResults/versionsErrors.frag.out
new file mode 100644
index 00000000000..34182d015c8
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/versionsErrors.frag.out
@@ -0,0 +1,44 @@
+versionsErrors.frag
+ERROR: #version: versions before 150 do not allow a profile token
+ERROR: 0:38: 'attribute' : not supported in this stage: fragment
+ERROR: 0:40: 'sampler2DRect' : Reserved word.
+ERROR: 0:44: 'floating-point suffix' : not supported for this version or the enabled extensions
+ERROR: 4 compilation errors. No code generated.
+
+
+Shader version: 110
+ERROR: node is still EOpNull!
+0:42 Function Definition: main( (global void)
+0:42 Function Parameters:
+0:44 Sequence
+0:44 move second child to first child (temp 4-component vector of float)
+0:44 'gl_FragColor' (fragColor 4-component vector of float FragColor)
+0:44 Construct vec4 (temp 4-component vector of float)
+0:44 'color' (smooth in 3-component vector of float)
+0:44 Constant:
+0:44 142.000000
+0:45 Branch: Kill
+0:? Linker Objects
+0:? 'color' (smooth in 3-component vector of float)
+0:? 'foo' (uniform sampler2DRect)
+
+
+Linked fragment stage:
+
+
+Shader version: 110
+ERROR: node is still EOpNull!
+0:42 Function Definition: main( (global void)
+0:42 Function Parameters:
+0:44 Sequence
+0:44 move second child to first child (temp 4-component vector of float)
+0:44 'gl_FragColor' (fragColor 4-component vector of float FragColor)
+0:44 Construct vec4 (temp 4-component vector of float)
+0:44 'color' (smooth in 3-component vector of float)
+0:44 Constant:
+0:44 142.000000
+0:45 Branch: Kill
+0:? Linker Objects
+0:? 'color' (smooth in 3-component vector of float)
+0:? 'foo' (uniform sampler2DRect)
+
diff --git a/chromium/third_party/glslang/src/Test/baseResults/versionsErrors.vert.out b/chromium/third_party/glslang/src/Test/baseResults/versionsErrors.vert.out
new file mode 100644
index 00000000000..0aeaea8cc3d
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/versionsErrors.vert.out
@@ -0,0 +1,58 @@
+versionsErrors.vert
+Warning, version 420 is not yet complete; most version-specific features are present, but some are missing.
+WARNING: 0:38: attribute deprecated in version 130; may be removed in future release
+ERROR: 0:38: 'attribute' : no longer supported in core profile; removed in version 420
+ERROR: 0:45: 'discard' : not supported in this stage: vertex
+ERROR: 2 compilation errors. No code generated.
+
+
+Shader version: 420
+Requested GL_ARB_texture_rectangle
+ERROR: node is still EOpNull!
+0:42 Function Definition: main( (global void)
+0:42 Function Parameters:
+0:44 Sequence
+0:44 move second child to first child (temp 4-component vector of float)
+0:44 gl_Position: direct index for structure (gl_Position 4-component vector of float Position)
+0:44 'anon@0' (out block{gl_Position 4-component vector of float Position gl_Position, gl_PointSize float PointSize gl_PointSize, out implicitly-sized array of float ClipDistance gl_ClipDistance, gl_ClipVertex 4-component vector of float ClipVertex gl_ClipVertex, out 4-component vector of float FrontColor gl_FrontColor, out 4-component vector of float BackColor gl_BackColor, out 4-component vector of float FrontSecondaryColor gl_FrontSecondaryColor, out 4-component vector of float BackSecondaryColor gl_BackSecondaryColor, out implicitly-sized array of 4-component vector of float TexCoord gl_TexCoord, out float FogFragCoord gl_FogFragCoord})
+0:44 Constant:
+0:44 0 (const uint)
+0:44 Construct vec4 (temp 4-component vector of float)
+0:44 'color' (in 3-component vector of float)
+0:44 Constant:
+0:44 142.000000
+0:45 Branch: Kill
+0:? Linker Objects
+0:? 'color' (in 3-component vector of float)
+0:? 'foo' (uniform sampler2DRect)
+0:? 'anon@0' (out block{gl_Position 4-component vector of float Position gl_Position, gl_PointSize float PointSize gl_PointSize, out implicitly-sized array of float ClipDistance gl_ClipDistance, gl_ClipVertex 4-component vector of float ClipVertex gl_ClipVertex, out 4-component vector of float FrontColor gl_FrontColor, out 4-component vector of float BackColor gl_BackColor, out 4-component vector of float FrontSecondaryColor gl_FrontSecondaryColor, out 4-component vector of float BackSecondaryColor gl_BackSecondaryColor, out implicitly-sized array of 4-component vector of float TexCoord gl_TexCoord, out float FogFragCoord gl_FogFragCoord})
+0:? 'gl_VertexID' (gl_VertexId int VertexId)
+0:? 'gl_InstanceID' (gl_InstanceId int InstanceId)
+
+
+Linked vertex stage:
+
+
+Shader version: 420
+Requested GL_ARB_texture_rectangle
+ERROR: node is still EOpNull!
+0:42 Function Definition: main( (global void)
+0:42 Function Parameters:
+0:44 Sequence
+0:44 move second child to first child (temp 4-component vector of float)
+0:44 gl_Position: direct index for structure (gl_Position 4-component vector of float Position)
+0:44 'anon@0' (out block{gl_Position 4-component vector of float Position gl_Position, gl_PointSize float PointSize gl_PointSize, out 1-element array of float ClipDistance gl_ClipDistance, gl_ClipVertex 4-component vector of float ClipVertex gl_ClipVertex, out 4-component vector of float FrontColor gl_FrontColor, out 4-component vector of float BackColor gl_BackColor, out 4-component vector of float FrontSecondaryColor gl_FrontSecondaryColor, out 4-component vector of float BackSecondaryColor gl_BackSecondaryColor, out 1-element array of 4-component vector of float TexCoord gl_TexCoord, out float FogFragCoord gl_FogFragCoord})
+0:44 Constant:
+0:44 0 (const uint)
+0:44 Construct vec4 (temp 4-component vector of float)
+0:44 'color' (in 3-component vector of float)
+0:44 Constant:
+0:44 142.000000
+0:45 Branch: Kill
+0:? Linker Objects
+0:? 'color' (in 3-component vector of float)
+0:? 'foo' (uniform sampler2DRect)
+0:? 'anon@0' (out block{gl_Position 4-component vector of float Position gl_Position, gl_PointSize float PointSize gl_PointSize, out 1-element array of float ClipDistance gl_ClipDistance, gl_ClipVertex 4-component vector of float ClipVertex gl_ClipVertex, out 4-component vector of float FrontColor gl_FrontColor, out 4-component vector of float BackColor gl_BackColor, out 4-component vector of float FrontSecondaryColor gl_FrontSecondaryColor, out 4-component vector of float BackSecondaryColor gl_BackSecondaryColor, out 1-element array of 4-component vector of float TexCoord gl_TexCoord, out float FogFragCoord gl_FogFragCoord})
+0:? 'gl_VertexID' (gl_VertexId int VertexId)
+0:? 'gl_InstanceID' (gl_InstanceId int InstanceId)
+
diff --git a/chromium/third_party/glslang/src/Test/baseResults/voidFunction.frag.out b/chromium/third_party/glslang/src/Test/baseResults/voidFunction.frag.out
new file mode 100644
index 00000000000..638cfbdd3d8
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/voidFunction.frag.out
@@ -0,0 +1,91 @@
+voidFunction.frag
+Shader version: 120
+0:? Sequence
+0:7 Sequence
+0:7 move second child to first child (temp float)
+0:7 'bar' (global float)
+0:7 Constant:
+0:7 2.000000
+0:9 Function Definition: foo( (global void)
+0:9 Function Parameters:
+0:11 Sequence
+0:11 Post-Increment (temp float)
+0:11 'bar' (global float)
+0:13 Branch: Return
+0:16 Function Definition: foo2( (global void)
+0:16 Function Parameters:
+0:18 Sequence
+0:18 Post-Increment (temp float)
+0:18 'bar' (global float)
+0:21 Function Definition: main( (global void)
+0:21 Function Parameters:
+0:23 Sequence
+0:23 Sequence
+0:23 move second child to first child (temp 4-component vector of float)
+0:23 'outColor' (temp 4-component vector of float)
+0:23 'bigColor' (uniform 4-component vector of float)
+0:25 Function Call: foo( (global void)
+0:27 Function Call: foo2( (global void)
+0:29 add second child into first child (temp float)
+0:29 direct index (temp float)
+0:29 'outColor' (temp 4-component vector of float)
+0:29 Constant:
+0:29 0 (const int)
+0:29 'bar' (global float)
+0:31 move second child to first child (temp 4-component vector of float)
+0:31 'gl_FragColor' (fragColor 4-component vector of float FragColor)
+0:31 'outColor' (temp 4-component vector of float)
+0:33 Branch: Return
+0:? Linker Objects
+0:? 'bigColor' (uniform 4-component vector of float)
+0:? 'BaseColor' (smooth in 4-component vector of float)
+0:? 'd' (uniform float)
+0:? 'bar' (global float)
+
+
+Linked fragment stage:
+
+
+Shader version: 120
+0:? Sequence
+0:7 Sequence
+0:7 move second child to first child (temp float)
+0:7 'bar' (global float)
+0:7 Constant:
+0:7 2.000000
+0:9 Function Definition: foo( (global void)
+0:9 Function Parameters:
+0:11 Sequence
+0:11 Post-Increment (temp float)
+0:11 'bar' (global float)
+0:13 Branch: Return
+0:16 Function Definition: foo2( (global void)
+0:16 Function Parameters:
+0:18 Sequence
+0:18 Post-Increment (temp float)
+0:18 'bar' (global float)
+0:21 Function Definition: main( (global void)
+0:21 Function Parameters:
+0:23 Sequence
+0:23 Sequence
+0:23 move second child to first child (temp 4-component vector of float)
+0:23 'outColor' (temp 4-component vector of float)
+0:23 'bigColor' (uniform 4-component vector of float)
+0:25 Function Call: foo( (global void)
+0:27 Function Call: foo2( (global void)
+0:29 add second child into first child (temp float)
+0:29 direct index (temp float)
+0:29 'outColor' (temp 4-component vector of float)
+0:29 Constant:
+0:29 0 (const int)
+0:29 'bar' (global float)
+0:31 move second child to first child (temp 4-component vector of float)
+0:31 'gl_FragColor' (fragColor 4-component vector of float FragColor)
+0:31 'outColor' (temp 4-component vector of float)
+0:33 Branch: Return
+0:? Linker Objects
+0:? 'bigColor' (uniform 4-component vector of float)
+0:? 'BaseColor' (smooth in 4-component vector of float)
+0:? 'd' (uniform float)
+0:? 'bar' (global float)
+
diff --git a/chromium/third_party/glslang/src/Test/baseResults/vulkan.ast.vert.out b/chromium/third_party/glslang/src/Test/baseResults/vulkan.ast.vert.out
new file mode 100755
index 00000000000..31ac4940ed8
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/vulkan.ast.vert.out
@@ -0,0 +1,324 @@
+vulkan.ast.vert
+Warning, version 450 is not yet complete; most version-specific features are present, but some are missing.
+
+Shader version: 450
+0:? Sequence
+0:7 Function Definition: main( (global void)
+0:7 Function Parameters:
+0:9 Sequence
+0:9 Convert float to bool (temp bool)
+0:9 'scf1' (specialization-constant const float)
+0:9 1.000000
+0:10 Construct bool (specialization-constant const bool)
+0:10 'scbt' (specialization-constant const bool)
+0:10 true (const bool)
+0:11 Convert int to bool (specialization-constant const bool)
+0:11 'sci2' (specialization-constant const int)
+0:11 2 (const int)
+0:13 Construct float (temp float)
+0:13 'scf1' (specialization-constant const float)
+0:13 1.000000
+0:14 Convert bool to float (temp float)
+0:14 'scbt' (specialization-constant const bool)
+0:14 true (const bool)
+0:15 Convert int to float (temp float)
+0:15 'sci2' (specialization-constant const int)
+0:15 2 (const int)
+0:17 Convert float to int (temp int)
+0:17 'scf1' (specialization-constant const float)
+0:17 1.000000
+0:18 Convert bool to int (specialization-constant const int)
+0:18 'scbt' (specialization-constant const bool)
+0:18 true (const bool)
+0:19 Construct int (specialization-constant const int)
+0:19 'sci2' (specialization-constant const int)
+0:19 2 (const int)
+0:21 component-wise multiply (temp float)
+0:21 'scf1' (specialization-constant const float)
+0:21 1.000000
+0:21 'scf1' (specialization-constant const float)
+0:21 1.000000
+0:22 logical-or (specialization-constant const bool)
+0:22 'scbt' (specialization-constant const bool)
+0:22 true (const bool)
+0:22 'scbt' (specialization-constant const bool)
+0:22 true (const bool)
+0:23 component-wise multiply (specialization-constant const int)
+0:23 'sci2' (specialization-constant const int)
+0:23 2 (const int)
+0:23 'sci2' (specialization-constant const int)
+0:23 2 (const int)
+0:24 add (temp float)
+0:24 'scf1' (specialization-constant const float)
+0:24 1.000000
+0:24 Convert int to float (temp float)
+0:24 'sci2' (specialization-constant const int)
+0:24 2 (const int)
+0:26 Negate value (temp float)
+0:26 'scf1' (specialization-constant const float)
+0:26 1.000000
+0:27 Negate conditional (specialization-constant const bool)
+0:27 'scbt' (specialization-constant const bool)
+0:27 true (const bool)
+0:28 Negate value (specialization-constant const int)
+0:28 'sci2' (specialization-constant const int)
+0:28 2 (const int)
+0:30 Compare Greater Than (temp bool)
+0:30 'scf1' (specialization-constant const float)
+0:30 1.000000
+0:30 'scf1' (specialization-constant const float)
+0:30 1.000000
+0:31 Compare Greater Than (specialization-constant const bool)
+0:31 'sci2' (specialization-constant const int)
+0:31 2 (const int)
+0:31 'sci2' (specialization-constant const int)
+0:31 2 (const int)
+0:33 Compare Not Equal (temp bool)
+0:33 'scf1' (specialization-constant const float)
+0:33 1.000000
+0:33 'scf1' (specialization-constant const float)
+0:33 1.000000
+0:34 Compare Not Equal (specialization-constant const bool)
+0:34 'scbt' (specialization-constant const bool)
+0:34 true (const bool)
+0:34 'scbt' (specialization-constant const bool)
+0:34 true (const bool)
+0:35 Compare Not Equal (specialization-constant const bool)
+0:35 'sci2' (specialization-constant const int)
+0:35 2 (const int)
+0:35 'sci2' (specialization-constant const int)
+0:35 2 (const int)
+0:37 Construct ivec2 (specialization-constant const 2-component vector of int)
+0:37 'sci2' (specialization-constant const int)
+0:37 2 (const int)
+0:37 'sci2' (specialization-constant const int)
+0:37 2 (const int)
+0:38 Construct ivec2 (temp 2-element array of 2-component vector of int)
+0:38 Construct ivec2 (specialization-constant const 2-component vector of int)
+0:38 'sci2' (specialization-constant const int)
+0:38 2 (const int)
+0:38 'sci2' (specialization-constant const int)
+0:38 2 (const int)
+0:38 Construct ivec2 (specialization-constant const 2-component vector of int)
+0:38 'sci2' (specialization-constant const int)
+0:38 2 (const int)
+0:38 'sci2' (specialization-constant const int)
+0:38 2 (const int)
+0:40 Construct vec2 (temp 2-component vector of float)
+0:40 'scf1' (specialization-constant const float)
+0:40 1.000000
+0:40 'scf1' (specialization-constant const float)
+0:40 1.000000
+0:41 Construct vec2 (temp 2-element array of 2-component vector of float)
+0:41 Construct vec2 (temp 2-component vector of float)
+0:41 'scf1' (specialization-constant const float)
+0:41 1.000000
+0:41 'scf1' (specialization-constant const float)
+0:41 1.000000
+0:41 Construct vec2 (temp 2-component vector of float)
+0:41 'scf1' (specialization-constant const float)
+0:41 1.000000
+0:41 'scf1' (specialization-constant const float)
+0:41 1.000000
+0:? Linker Objects
+0:? 'scf1' (specialization-constant const float)
+0:? 1.000000
+0:? 'scbt' (specialization-constant const bool)
+0:? true (const bool)
+0:? 'sci2' (specialization-constant const int)
+0:? 2 (const int)
+
+
+Linked vertex stage:
+
+
+Shader version: 450
+0:? Sequence
+0:7 Function Definition: main( (global void)
+0:7 Function Parameters:
+0:9 Sequence
+0:9 Convert float to bool (temp bool)
+0:9 'scf1' (specialization-constant const float)
+0:9 1.000000
+0:10 Construct bool (specialization-constant const bool)
+0:10 'scbt' (specialization-constant const bool)
+0:10 true (const bool)
+0:11 Convert int to bool (specialization-constant const bool)
+0:11 'sci2' (specialization-constant const int)
+0:11 2 (const int)
+0:13 Construct float (temp float)
+0:13 'scf1' (specialization-constant const float)
+0:13 1.000000
+0:14 Convert bool to float (temp float)
+0:14 'scbt' (specialization-constant const bool)
+0:14 true (const bool)
+0:15 Convert int to float (temp float)
+0:15 'sci2' (specialization-constant const int)
+0:15 2 (const int)
+0:17 Convert float to int (temp int)
+0:17 'scf1' (specialization-constant const float)
+0:17 1.000000
+0:18 Convert bool to int (specialization-constant const int)
+0:18 'scbt' (specialization-constant const bool)
+0:18 true (const bool)
+0:19 Construct int (specialization-constant const int)
+0:19 'sci2' (specialization-constant const int)
+0:19 2 (const int)
+0:21 component-wise multiply (temp float)
+0:21 'scf1' (specialization-constant const float)
+0:21 1.000000
+0:21 'scf1' (specialization-constant const float)
+0:21 1.000000
+0:22 logical-or (specialization-constant const bool)
+0:22 'scbt' (specialization-constant const bool)
+0:22 true (const bool)
+0:22 'scbt' (specialization-constant const bool)
+0:22 true (const bool)
+0:23 component-wise multiply (specialization-constant const int)
+0:23 'sci2' (specialization-constant const int)
+0:23 2 (const int)
+0:23 'sci2' (specialization-constant const int)
+0:23 2 (const int)
+0:24 add (temp float)
+0:24 'scf1' (specialization-constant const float)
+0:24 1.000000
+0:24 Convert int to float (temp float)
+0:24 'sci2' (specialization-constant const int)
+0:24 2 (const int)
+0:26 Negate value (temp float)
+0:26 'scf1' (specialization-constant const float)
+0:26 1.000000
+0:27 Negate conditional (specialization-constant const bool)
+0:27 'scbt' (specialization-constant const bool)
+0:27 true (const bool)
+0:28 Negate value (specialization-constant const int)
+0:28 'sci2' (specialization-constant const int)
+0:28 2 (const int)
+0:30 Compare Greater Than (temp bool)
+0:30 'scf1' (specialization-constant const float)
+0:30 1.000000
+0:30 'scf1' (specialization-constant const float)
+0:30 1.000000
+0:31 Compare Greater Than (specialization-constant const bool)
+0:31 'sci2' (specialization-constant const int)
+0:31 2 (const int)
+0:31 'sci2' (specialization-constant const int)
+0:31 2 (const int)
+0:33 Compare Not Equal (temp bool)
+0:33 'scf1' (specialization-constant const float)
+0:33 1.000000
+0:33 'scf1' (specialization-constant const float)
+0:33 1.000000
+0:34 Compare Not Equal (specialization-constant const bool)
+0:34 'scbt' (specialization-constant const bool)
+0:34 true (const bool)
+0:34 'scbt' (specialization-constant const bool)
+0:34 true (const bool)
+0:35 Compare Not Equal (specialization-constant const bool)
+0:35 'sci2' (specialization-constant const int)
+0:35 2 (const int)
+0:35 'sci2' (specialization-constant const int)
+0:35 2 (const int)
+0:37 Construct ivec2 (specialization-constant const 2-component vector of int)
+0:37 'sci2' (specialization-constant const int)
+0:37 2 (const int)
+0:37 'sci2' (specialization-constant const int)
+0:37 2 (const int)
+0:38 Construct ivec2 (temp 2-element array of 2-component vector of int)
+0:38 Construct ivec2 (specialization-constant const 2-component vector of int)
+0:38 'sci2' (specialization-constant const int)
+0:38 2 (const int)
+0:38 'sci2' (specialization-constant const int)
+0:38 2 (const int)
+0:38 Construct ivec2 (specialization-constant const 2-component vector of int)
+0:38 'sci2' (specialization-constant const int)
+0:38 2 (const int)
+0:38 'sci2' (specialization-constant const int)
+0:38 2 (const int)
+0:40 Construct vec2 (temp 2-component vector of float)
+0:40 'scf1' (specialization-constant const float)
+0:40 1.000000
+0:40 'scf1' (specialization-constant const float)
+0:40 1.000000
+0:41 Construct vec2 (temp 2-element array of 2-component vector of float)
+0:41 Construct vec2 (temp 2-component vector of float)
+0:41 'scf1' (specialization-constant const float)
+0:41 1.000000
+0:41 'scf1' (specialization-constant const float)
+0:41 1.000000
+0:41 Construct vec2 (temp 2-component vector of float)
+0:41 'scf1' (specialization-constant const float)
+0:41 1.000000
+0:41 'scf1' (specialization-constant const float)
+0:41 1.000000
+0:? Linker Objects
+0:? 'scf1' (specialization-constant const float)
+0:? 1.000000
+0:? 'scbt' (specialization-constant const bool)
+0:? true (const bool)
+0:? 'sci2' (specialization-constant const int)
+0:? 2 (const int)
+
+// Module Version 10000
+// Generated by (magic number): 80001
+// Id's are bound by 50
+
+ Capability Shader
+ 1: ExtInstImport "GLSL.std.450"
+ MemoryModel Logical GLSL450
+ EntryPoint Vertex 4 "main"
+ Source GLSL 450
+ Name 4 "main"
+ Decorate 7 SpecId 200
+ Decorate 11 SpecId 201
+ Decorate 13 SpecId 202
+ 2: TypeVoid
+ 3: TypeFunction 2
+ 6: TypeFloat 32
+ 7: 6(float) SpecConstant 1065353216
+ 8: TypeBool
+ 9: 6(float) Constant 0
+ 11: 8(bool) SpecConstantTrue
+ 12: TypeInt 32 1
+ 13: 12(int) SpecConstant 2
+ 14: TypeInt 32 0
+ 15: 14(int) Constant 0
+ 16: 8(bool) SpecConstantOp 171 13 15
+ 17: 6(float) Constant 1065353216
+ 21: 12(int) Constant 0
+ 22: 12(int) Constant 1
+ 23: 12(int) SpecConstantOp 169 11 22 21
+ 25: 8(bool) SpecConstantOp 166 11 11
+ 26: 12(int) SpecConstantOp 132 13 13
+ 30: 8(bool) SpecConstantOp 168 11
+ 31: 12(int) SpecConstantOp 126 13
+ 33: 8(bool) SpecConstantOp 173 13 13
+ 35: 8(bool) SpecConstantOp 165 11 11
+ 36: 8(bool) SpecConstantOp 171 13 13
+ 37: TypeVector 12(int) 2
+ 38: 37(ivec2) SpecConstantComposite 13 13
+ 39: 37(ivec2) SpecConstantComposite 13 13
+ 40: 37(ivec2) SpecConstantComposite 13 13
+ 41: 14(int) Constant 2
+ 42: TypeArray 37(ivec2) 41
+ 44: TypeVector 6(float) 2
+ 48: TypeArray 44(fvec2) 41
+ 4(main): 2 Function None 3
+ 5: Label
+ 10: 8(bool) FOrdNotEqual 7 9
+ 18: 6(float) Select 11 17 9
+ 19: 6(float) ConvertSToF 13
+ 20: 12(int) ConvertFToS 7
+ 24: 6(float) FMul 7 7
+ 27: 6(float) ConvertSToF 13
+ 28: 6(float) FAdd 7 27
+ 29: 6(float) FNegate 7
+ 32: 8(bool) FOrdGreaterThan 7 7
+ 34: 8(bool) FOrdNotEqual 7 7
+ 43: 42 CompositeConstruct 39 40
+ 45: 44(fvec2) CompositeConstruct 7 7
+ 46: 44(fvec2) CompositeConstruct 7 7
+ 47: 44(fvec2) CompositeConstruct 7 7
+ 49: 48 CompositeConstruct 46 47
+ Return
+ FunctionEnd
diff --git a/chromium/third_party/glslang/src/Test/baseResults/vulkan.comp.out b/chromium/third_party/glslang/src/Test/baseResults/vulkan.comp.out
new file mode 100644
index 00000000000..7f1fd18ac73
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/vulkan.comp.out
@@ -0,0 +1,11 @@
+vulkan.comp
+Warning, version 450 is not yet complete; most version-specific features are present, but some are missing.
+ERROR: 0:5: 'local_size' : cannot change previously set size
+ERROR: 1 compilation errors. No code generated.
+
+
+
+Linked compute stage:
+
+
+SPIR-V is not generated for failed compile or link
diff --git a/chromium/third_party/glslang/src/Test/baseResults/vulkan.frag.out b/chromium/third_party/glslang/src/Test/baseResults/vulkan.frag.out
new file mode 100644
index 00000000000..fe8b045b3b2
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/vulkan.frag.out
@@ -0,0 +1,44 @@
+vulkan.frag
+Warning, version 450 is not yet complete; most version-specific features are present, but some are missing.
+ERROR: 0:14: 'sampler2D' : sampler-constructor requires two arguments
+ERROR: 0:15: 'sampler2D' : sampler-constructor first argument must be a scalar textureXXX type
+ERROR: 0:16: 'sampler2D' : sampler-constructor first argument must be a scalar textureXXX type
+ERROR: 0:17: 'sampler2D' : sampler-constructor second argument must be a scalar type 'sampler'
+ERROR: 0:18: 'sampler2D' : sampler-constructor second argument must be a scalar type 'sampler'
+ERROR: 0:19: 'sampler2D' : sampler-constructor second argument must be a scalar type 'sampler'
+ERROR: 0:21: 'sampler3D' : sampler-constructor cannot make an array of samplers
+ERROR: 0:22: 'sampler2D' : sampler-constructor first argument must be a scalar textureXXX type
+ERROR: 0:23: 'sampler2D' : sampler-constructor first argument must match type and dimensionality of constructor type
+ERROR: 0:24: 'sampler2D' : sampler-constructor second argument presence of shadow must match constructor presence of shadow
+ERROR: 0:25: 'sampler2DShadow' : sampler-constructor second argument presence of shadow must match constructor presence of shadow
+ERROR: 0:28: 'sampler2D' : sampler/image types can only be used in uniform variables or function parameters: s2D
+ERROR: 0:29: 'sampler3D' : sampler-constructor cannot make an array of samplers
+ERROR: 0:29: 'sampler3D' : sampler/image types can only be used in uniform variables or function parameters: s3d
+ERROR: 0:29: '=' : cannot convert from 'const float' to 'global 4-element array of sampler3D'
+ERROR: 0:39: 'push_constant' : can only be used with a uniform
+ERROR: 0:43: 'non-opaque uniforms outside a block' : not allowed when using GLSL for Vulkan
+ERROR: 0:43: 'push_constant' : can only be used with a block
+ERROR: 0:45: 'push_constant' : cannot declare a default, can only be used on a block
+ERROR: 0:47: 'push_constant' : requires an instance name
+ERROR: 0:52: 'input_attachment_index' : can only be used with a subpass
+ERROR: 0:53: 'input_attachment_index' : can only be used with a subpass
+ERROR: 0:54: 'subpass' : requires an input_attachment_index layout qualifier
+ERROR: 0:60: 'subpassLoadMS' : no matching overloaded function found
+ERROR: 0:61: 'subpassLoad' : no matching overloaded function found
+ERROR: 0:63: 'subpassLoadMS' : no matching overloaded function found
+ERROR: 0:66: 'subroutine' : not allowed when generating SPIR-V
+ERROR: 0:66: 'non-opaque uniforms outside a block' : not allowed when using GLSL for Vulkan
+ERROR: 0:67: 'subroutine' : not allowed when generating SPIR-V
+ERROR: 0:67: 'uniform' : no qualifiers allowed for function return
+ERROR: 0:69: 'non-opaque uniforms outside a block' : not allowed when using GLSL for Vulkan
+ERROR: 0:73: 'texture' : no matching overloaded function found
+ERROR: 0:74: 'imageStore' : no matching overloaded function found
+ERROR: 33 compilation errors. No code generated.
+
+
+
+Linked fragment stage:
+
+ERROR: Linking fragment stage: Only one push_constant block is allowed per stage
+
+SPIR-V is not generated for failed compile or link
diff --git a/chromium/third_party/glslang/src/Test/baseResults/vulkan.vert.out b/chromium/third_party/glslang/src/Test/baseResults/vulkan.vert.out
new file mode 100644
index 00000000000..0cac808ff2f
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/vulkan.vert.out
@@ -0,0 +1,33 @@
+vulkan.vert
+Warning, version 450 is not yet complete; most version-specific features are present, but some are missing.
+ERROR: 0:3: 'subpass input' : not supported in this stage: vertex
+ERROR: 0:4: 'subpass input' : not supported in this stage: vertex
+ERROR: 0:5: 'subpass input' : not supported in this stage: vertex
+ERROR: 0:6: 'subpass input' : not supported in this stage: vertex
+ERROR: 0:7: 'subpass input' : not supported in this stage: vertex
+ERROR: 0:8: 'subpass input' : not supported in this stage: vertex
+ERROR: 0:12: 'constant_id' : can only be applied to a scalar
+ERROR: 0:13: 'constant_id' : specialization-constant id already used
+ERROR: 0:13: 'constant_id' : can only be applied to 'const'-qualified scalar
+ERROR: 0:13: 'constant_id' : cannot be applied to this type
+ERROR: 0:14: 'constant_id' : specialization-constant id is too large
+ERROR: 0:15: 'constant_id' : can only be applied to a scalar
+ERROR: 0:16: 'constant_id' : specialization-constant id already used
+ERROR: 0:16: 'constant_id' : cannot declare a default, can only be used on a scalar
+ERROR: 0:20: 'subpassLoad' : no matching overloaded function found
+ERROR: 0:20: 'assign' : cannot convert from 'const float' to 'smooth out 4-component vector of float'
+ERROR: 0:23: 'atomic counter types' : not allowed when using GLSL for Vulkan
+ERROR: 0:24: 'shared' : not allowed when using GLSL for Vulkan
+ERROR: 0:25: 'packed' : not allowed when using GLSL for Vulkan
+ERROR: 0:32: 'initializer' : can't use with types containing arrays sized with a specialization constant
+ERROR: 0:34: '=' : can't use with types containing arrays sized with a specialization constant
+ERROR: 0:35: '==' : can't use with types containing arrays sized with a specialization constant
+ERROR: 0:39: 'set' : cannot be used with push_constant
+ERROR: 23 compilation errors. No code generated.
+
+
+
+Linked vertex stage:
+
+
+SPIR-V is not generated for failed compile or link
diff --git a/chromium/third_party/glslang/src/Test/baseResults/whileLoop.frag.out b/chromium/third_party/glslang/src/Test/baseResults/whileLoop.frag.out
new file mode 100644
index 00000000000..ad30b361f15
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/baseResults/whileLoop.frag.out
@@ -0,0 +1,65 @@
+whileLoop.frag
+Shader version: 110
+0:? Sequence
+0:7 Function Definition: main( (global void)
+0:7 Function Parameters:
+0:9 Sequence
+0:9 Sequence
+0:9 move second child to first child (temp 4-component vector of float)
+0:9 'color' (temp 4-component vector of float)
+0:9 'BaseColor' (smooth in 4-component vector of float)
+0:11 Loop with condition tested first
+0:11 Loop Condition
+0:11 Compare Less Than (temp bool)
+0:11 direct index (temp float)
+0:11 'color' (temp 4-component vector of float)
+0:11 Constant:
+0:11 0 (const int)
+0:11 'd' (uniform float)
+0:11 Loop Body
+0:12 Sequence
+0:12 add second child into first child (temp 4-component vector of float)
+0:12 'color' (temp 4-component vector of float)
+0:12 'bigColor' (uniform 4-component vector of float)
+0:15 move second child to first child (temp 4-component vector of float)
+0:15 'gl_FragColor' (fragColor 4-component vector of float FragColor)
+0:15 'color' (temp 4-component vector of float)
+0:? Linker Objects
+0:? 'bigColor' (uniform 4-component vector of float)
+0:? 'BaseColor' (smooth in 4-component vector of float)
+0:? 'd' (uniform float)
+
+
+Linked fragment stage:
+
+
+Shader version: 110
+0:? Sequence
+0:7 Function Definition: main( (global void)
+0:7 Function Parameters:
+0:9 Sequence
+0:9 Sequence
+0:9 move second child to first child (temp 4-component vector of float)
+0:9 'color' (temp 4-component vector of float)
+0:9 'BaseColor' (smooth in 4-component vector of float)
+0:11 Loop with condition tested first
+0:11 Loop Condition
+0:11 Compare Less Than (temp bool)
+0:11 direct index (temp float)
+0:11 'color' (temp 4-component vector of float)
+0:11 Constant:
+0:11 0 (const int)
+0:11 'd' (uniform float)
+0:11 Loop Body
+0:12 Sequence
+0:12 add second child into first child (temp 4-component vector of float)
+0:12 'color' (temp 4-component vector of float)
+0:12 'bigColor' (uniform 4-component vector of float)
+0:15 move second child to first child (temp 4-component vector of float)
+0:15 'gl_FragColor' (fragColor 4-component vector of float FragColor)
+0:15 'color' (temp 4-component vector of float)
+0:? Linker Objects
+0:? 'bigColor' (uniform 4-component vector of float)
+0:? 'BaseColor' (smooth in 4-component vector of float)
+0:? 'd' (uniform float)
+
diff --git a/chromium/third_party/glslang/src/Test/bump b/chromium/third_party/glslang/src/Test/bump
new file mode 100755
index 00000000000..f23be33b627
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/bump
@@ -0,0 +1,2 @@
+cp localResults/* baseResults/
+
diff --git a/chromium/third_party/glslang/src/Test/comment.frag b/chromium/third_party/glslang/src/Test/comment.frag
new file mode 100644
index 00000000000..f5c565c22f2
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/comment.frag
@@ -0,0 +1,19 @@
+
+ //
+/* anotehn t* ontuh * / tnoahnt /* oo */
+/* multi line...
+
+ao */
+/* no escape \
+oanot */
+// escape nothing \o oeu
+// escape newline \
+still in a comment
+// escape newline \
+
+// a different comment
+#version 430 core
+in vec4 v;
+void main() {}
+
+
diff --git a/chromium/third_party/glslang/src/Test/conditionalDiscard.frag b/chromium/third_party/glslang/src/Test/conditionalDiscard.frag
new file mode 100644
index 00000000000..ebc82fc616f
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/conditionalDiscard.frag
@@ -0,0 +1,14 @@
+#version 110
+
+uniform sampler2D tex;
+varying vec2 coord;
+
+void main (void)
+{
+ vec4 v = texture2D(tex, coord);
+
+ if (v == vec4(0.1,0.2,0.3,0.4))
+ discard;
+
+ gl_FragColor = v;
+}
diff --git a/chromium/third_party/glslang/src/Test/constErrors.frag b/chromium/third_party/glslang/src/Test/constErrors.frag
new file mode 100644
index 00000000000..0067af1180d
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/constErrors.frag
@@ -0,0 +1,35 @@
+#version 330
+
+in vec4 inVar;
+out vec4 outVar;
+
+const int constInt = 3;
+
+uniform int uniformInt;
+
+void main()
+{
+ const int a1 = 2; // okay
+ const int a2 = constInt; // okay
+ const int a3 = uniformInt; // error
+
+ vec4 c[constInt]; // okay
+ vec4 d[uniformInt]; // error
+ vec4 e[constInt + uniformInt]; // error
+ vec4 f[uniformInt + constInt]; // error
+
+ vec4 g[int(sin(0.3)) + 1]; // okay
+}
+
+const struct S {
+ vec3 v3;
+ ivec2 iv2;
+} s = S(vec3(3.0), ivec2(3, constInt + uniformInt)); // ERROR, non-const y componenent
+
+const struct S2 {
+ vec3 v3;
+ ivec2 iv2;
+ mat2x4 m;
+} s2 = S2(vec3(3.0), ivec2(3, constInt), mat2x4(1.0, 2.0, 3.0, inVar.x, 5.0, 6.0, 7.0, 8.0)); // ERROR, non-constant matrix
+
+const float f = 3; // okay, type conversion
diff --git a/chromium/third_party/glslang/src/Test/constFold.frag b/chromium/third_party/glslang/src/Test/constFold.frag
new file mode 100644
index 00000000000..4e809d60240
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/constFold.frag
@@ -0,0 +1,141 @@
+#version 430
+
+const int a = 1;
+const int b = 2;
+const int c = a + b; // 3
+const int d = c - a; // 2
+const float e = float(d); // 2.0
+const float f = e * float(c); // 6.0
+const float g = f / float(d); // 3.0
+
+const vec2 pytho = vec2(3.0, 4.0);
+
+in vec4 inv;
+out vec4 FragColor;
+out vec2 out2;
+out vec4 out3;
+out vec4 out4;
+out ivec4 out5;
+out vec3 out6;
+out vec4 out7;
+out vec4 out8;
+out vec4 out9;
+out vec4 out10;
+out vec4 out11;
+out ivec2 out12;
+out uvec3 out13;
+
+void main()
+{
+ vec4 dx = dFdx(inv);
+ const ivec4 v = ivec4(a, b, c, d);
+ vec4 array2[v.y]; // 2
+ const ivec4 u = ~v;
+
+ const float h = degrees(g); // 171.88
+
+ FragColor = vec4(e, f, g, h); // 2, 6, 3, 171.88
+
+ vec4 array3[c]; // 3
+ vec4 arrayMax[int(max(float(array2.length()), float(array3.length())))];
+ vec4 arrayMin[int(min(float(array2.length()), float(array3.length())))];
+ FragColor = vec4(arrayMax.length(), arrayMin.length(), sin(3.14), cos(3.14)); // 3, 2, .00159, -.999
+ out2 = length(pytho) + normalize(pytho) + dFdx(pytho) + dFdy(pytho) + fwidth(pytho); // 5+3/5, 5+4/5
+ out3 = vec4(exp(3.0), log(10.0), exp2(4.0), log2(256.0)); // 20.08, 2.3, 16, 8
+ out4 = vec4(sqrt(100.0), inversesqrt(100.0), abs(-4.7), abs(10.9)); // 10, .1, 4.7, 10.9
+ out5 = ivec4(abs(-8) + sign(0), abs(17), sign(-12), sign(9)); // 8, 17, -1, 1
+ out6 = vec3(sign(-8.8), sign(18.0), sign(0.0)); // -1.0, 1.0, 0.0
+ out7 = vec4(floor(4.2), ceil(-4.1), trunc(5.9), trunc(-5.9)); // 4, -4, 5, -5
+ out8 = vec4(round(4.4), round(4.6), roundEven(4.5), roundEven(-5.5)); // 4, 5, 4, -6
+ out9 = vec4(roundEven(7.5), roundEven(-4.5), fract(2.345), fract(-2.6)); // 8, -4, .345, 0.4
+ out10 = vec4(isinf(4.0/0.0), isinf(-3.0/0.0), isinf(0.0/0.0), isinf(-93048593405938405938405.0)); // true, true, false, false -> 1.0, 1.0, 0.0, 0.0
+ out11 = vec4(isnan(4.0/0.0), isnan(-3.0/0.0), isnan(0.0/0.0), isnan(-93048593405938405938405.0)); // false, false, true, false -> 0.0, 1.0, 0.0, 0.0
+ out11 = vec4(tan(0.8), atan(1.029), atan(8.0, 10.0), atan(10000.0)); // 1.029, 0.8, 0.6747, 1.57
+ out11 = vec4(asin(0.0), asin(0.5), acos(0.0), acos(0.5)); // 0.0, .523599, 1.57, 1.047
+
+ const vec4 v1 = vec4(1.0, 0.0, 0.5, -0.2);
+ const vec4 v2 = vec4(0.2, 0.3, 0.4, 0.5);
+ out11 = atan(v1, v2); // 1.373401, 0.0, 0.896055, -0.380506
+
+ const ivec2 v3 = ivec2(15.0, 17.0);
+ const ivec2 v4 = ivec2(17.0, 15.0);
+ out12 = min(v3, 16); // 15, 16
+ out12 = max(v3, v4); // 17, 17
+ out2 = pow(vec2(v3), vec2(2.5, 3.0)); // 871.4, 4913
+ out13 = clamp(uvec3(1, 20, 50), 10u, 30u); // 10, 20, 30
+ out2 = mix(vec2(3.0, 4.0), vec2(5.0, 6.0), bvec2(false, true)); // 3.0, 6.0
+ out2 = mix(vec2(3.0, 4.0), vec2(5.0, 6.0), 0.25); // 3.5, 4.5
+ out2 = step(0.5, vec2(0.2, 0.6)); // 0.0, 1.0
+ out11 = smoothstep(50.0, 60.0, vec4(40.0, 51.0, 55.0, 70.0)); // 0.0, 0.028, 0.5, 1.0
+}
+
+const struct S {
+ vec3 v3;
+ ivec2 iv2;
+ mat2x4 m;
+} s = S(vec3(3.0), ivec2(3, a + b), mat2x4(1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0));
+
+void foo()
+{
+ float a[s.iv2.y]; // 3 element array
+ a[0] = s.m[1].z; // 7.0
+ b % 0; // int
+ b / 0;
+ e / 0;
+ const uint ua = 5;
+ const uvec2 ub = uvec2(6, 7);
+ const uint uc = 8;
+ ub % 4u;
+ 0u % uc;
+ ub % 0u;
+}
+
+const mat2 m2 = mat2(2, 3, 4, 5);
+const mat3 m3 = mat3(m2);
+const int mc = int(m3[2][2]);
+float a1[mc];
+float a2[int(m3[2][1]) + 2]; // size 2
+float a3[int(m3[1][0])]; // size 4
+const vec2 v2 = vec2(1, 2);
+const vec3 v3 = vec3(3, 4, 5);
+float a4[uint(mat3(v2, v3, v2, v2)[2][2])]; // size 2
+
+void foo2()
+{
+ a1[0]; // array size 1
+ a2[0]; // array size 2
+ a3[0]; // array size 4
+ a4[0]; // array size 2
+ v2[-1]; // ERROR
+ v3[4]; // ERROR
+ m3[0][-2]; // ERROR
+ m2[-1][1]; // ERROR
+ m3[1][3]; // ERROR
+ m3[3][1]; // ERROR
+ int p;
+ p = -2147483647 / -1;
+ p = -2147483648 / -1;
+ p = 2147483647 / -1;
+ float f = vec4(7.8 < 2.4 ? -1.333 : 1.444).a;
+ f = vec4(inv.x < 2.4 ? -1.0 : 1.0).a; // not folded, ensuring no propagation
+}
+
+const mat2 mm2 = mat2(1.0, 2.0, 3.0, 4.0);
+const mat3x2 mm32 = mat3x2(10.0, 11.0, 12.0, 13.0, 14.0, 15.0);
+
+void foo3()
+{
+ mat3x2 r32 = mm2 * mm32;
+}
+
+struct cag {
+ int i;
+ float f;
+ bool b;
+};
+const cag a0[3] = cag[3](cag(3, 2.0, true), cag(1, 5.0, true), cag(1, 9.0, false));
+
+void foo4()
+{
+ int a = int(a0[2].f);
+} \ No newline at end of file
diff --git a/chromium/third_party/glslang/src/Test/conversion.frag b/chromium/third_party/glslang/src/Test/conversion.frag
new file mode 100644
index 00000000000..3931f5a2959
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/conversion.frag
@@ -0,0 +1,112 @@
+#version 130
+
+uniform bool u_b;
+uniform bvec2 u_b2;
+uniform bvec3 u_b3;
+uniform bvec4 u_b4;
+
+uniform int u_i;
+uniform ivec2 u_i2;
+uniform ivec3 u_i3;
+uniform ivec4 u_i4;
+
+uniform float u_f;
+uniform vec2 u_f2;
+uniform vec3 u_f3;
+uniform vec4 u_f4;
+
+uniform bool i_b;
+uniform bvec2 i_b2;
+uniform bvec3 i_b3;
+uniform bvec4 i_b4;
+
+flat in int i_i;
+flat in ivec2 i_i2;
+flat in ivec3 i_i3;
+flat in ivec4 i_i4;
+
+in float i_f;
+in vec2 i_f2;
+in vec3 i_f3;
+in vec4 i_f4;
+
+void main()
+{
+ bool b = bool(u_i) ^^ bool(u_f);
+ bvec2 b2 = bvec2(u_i, u_f);
+ bvec3 b3 = bvec3(u_i, u_f, i_i);
+ bvec4 b4 = bvec4(u_i, u_f, i_i, i_f);
+
+ int i = int(u_f) + int(b);
+ ivec2 i2 = ivec2(u_f2) + ivec2(b2);
+ ivec3 i3 = ivec3(u_f3) + ivec3(b3);
+ ivec4 i4 = ivec4(u_f4) + ivec4(b4);
+
+ float f = i;
+ vec2 f2 = i2;
+ vec3 f3 = i3;
+ vec4 f4 = i4;
+
+ f += (float(i) + float(b));
+ f2 -= vec2(i2) + vec2(b2);
+ f3 /= vec3(i3) + vec3(b3);
+ f4 += vec4(i4) + vec4(b4);
+
+ f4 += vec4(bvec4(i_i4));
+ f4 += vec4(bvec4(u_f4));
+
+ f += f - i;
+ f2 += vec2(f, i) + i2;
+ f3 += i3 + vec3(f, i, f);
+ f4 += vec4(b, i, f, i) + i4;
+
+ f2 += vec2(f, i) * i;
+ f3 += vec3(f, i, f) + i;
+ f4 += i - vec4(b, i, f, i);
+
+ i2 += ivec2(f, i);
+ i3 += ivec3(f, i, f);
+ i4 += ivec4(b, i, f, i);
+
+ if (f < i || i < f ||
+ f2 == i2 ||
+ i3 != f3)
+ f = (b ? i : f2.x) + (b2.x ? f3.x : i2.y);
+
+ gl_FragColor =
+ b ||
+ b2.x ||
+ b2.y ||
+ b3.x ||
+ b3.y ||
+ b3.z ||
+ b4.x ||
+ b4.y ||
+ b4.z ||
+ b4.w ? vec4(
+ i +
+ i2.x +
+ i2.y +
+ i3.x +
+ i3.y +
+ i3.z +
+ i4.x +
+ i4.y +
+ i4.z +
+ i4.w +
+ f +
+ f2.x +
+ f2.y +
+ f3.x +
+ f3.y +
+ f3.z +
+ f4.x +
+ f4.y +
+ f4.z +
+ f4.w) : vec4(1.0);
+
+ // with constants...
+ ivec4 cv2 = ivec4(1.0);
+ bvec4 cv5 = bvec4(cv2);
+ gl_FragColor += float(cv5);
+}
diff --git a/chromium/third_party/glslang/src/Test/cppComplexExpr.vert b/chromium/third_party/glslang/src/Test/cppComplexExpr.vert
new file mode 100644
index 00000000000..bce5ffa3797
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/cppComplexExpr.vert
@@ -0,0 +1,183 @@
+#version 300 es
+#define ON1
+#define ON2
+float sum = 0.0;
+
+void main()
+{
+#if defined(ON1) && (defined(OFF) || defined(ON2))
+//yes
+ sum += 1.0;
+#endif
+
+#if !defined(ON1) || (defined(OFF) || (!defined(OFF2) && defined(ON2)))
+//yes
+ sum += 20.0;
+#endif
+
+#if defined(ON1) && (defined(OFF) || !defined(ON2))
+//no
+ sum += 0.1;
+#endif
+
+#if !defined(ON1) || (defined(OFF) || !defined(OFF2) && !defined(ON2))
+//no
+ sum += 0.2;
+#endif
+
+#if !defined(ON1) || !defined(OFF) || defined(ON2) && defined(OFF2)
+//yes
+ sum += 300.0;
+#endif
+
+#if (!defined(ON1) || !defined(OFF) || defined(ON2)) && defined(OFF2)
+//no
+ sum += 0.4;
+#endif
+
+// sum should be 321.0
+ gl_Position = vec4(sum);
+}
+
+#define ADD(a, b) a + b + ((a) + ((b)));
+
+float foo()
+{
+ return ADD(gl_Position.xyxwx, 3.0) // ERROR, should be this line number
+ return ADD(gl_Position.y, 3.0)
+}
+
+#define BIG aonetuhanoethuanoenaoethu snaoetuhs onethausoentuas hnoethaueohnatuoeh santuoehsantouhe snathoensuta hsnoethuasntoe hsnuathoesnuathoenstuh nsoethantseuh toae ua \
+ antoeh uantheount oentahoent uahnsoethasnutoehansteuo santhu sneoathu snoethasnut oesanthoesna thusenotha nsthasunoeth ausntehsunathoensuathoesnta uhnsoetha usntoeh uanhs unosethu \
+ antoehunatoehu natoehua oentha neotuhan toehu natoehu ntahoe nutah eu natoheunathoen uasoenuasoent asntoehsan tuosnthnu aohenuath eontha untoh eunth unth anth unth nth nth nt \
+ a ntoehanu tunth nsont uhansoethausn oehsanthnt heauo eanthuo sh nahnoethansu tohe sanuthoe snathuoesntha snuothe anthusonehtasuntoeh asnuthonsa teauhntoeha onetuha nth \
+ anoethuan toentauh noethauntohe anuthoe nathu noethaun oethanuthoe nathuoe ntahu enotha unetha ntuhenaothu enotahun eotha ntoehu aoehuntha enotuh aonethau noethu anoethuna toheua \
+ ontehanutoe hnuathoena aoteha aonetuha
+
+// identical
+#define BIG aonetuhanoethuanoenaoethu snaoetuhs onethausoentuas hnoethaueohnatuoeh santuoehsantouhe snathoensuta hsnoethuasntoe hsnuathoesnuathoenstuh nsoethantseuh toae ua \
+ antoeh uantheount oentahoent uahnsoethasnutoehansteuo santhu sneoathu snoethasnut oesanthoesna thusenotha nsthasunoeth ausntehsunathoensuathoesnta uhnsoetha usntoeh uanhs unosethu \
+ antoehunatoehu natoehua oentha neotuhan toehu natoehu ntahoe nutah eu natoheunathoen uasoenuasoent asntoehsan tuosnthnu aohenuath eontha untoh eunth unth anth unth nth nth nt \
+ a ntoehanu tunth nsont uhansoethausn oehsanthnt heauo eanthuo sh nahnoethansu tohe sanuthoe snathuoesntha snuothe anthusonehtasuntoeh asnuthonsa teauhntoeha onetuha nth \
+ anoethuan toentauh noethauntohe anuthoe nathu noethaun oethanuthoe nathuoe ntahu enotha unetha ntuhenaothu enotahun eotha ntoehu aoehuntha enotuh aonethau noethu anoethuna toheua \
+ ontehanutoe hnuathoena aoteha aonetuha
+
+// ERROR, one character different
+#define BIG aonetuhanoethuanoenaoethu snaoetuhs onethausoentuas hnoethaueohnatuoeh santuoehsantouhe snathoensuta hsnoethuasntoe hsnuathoesnuathoenstuh nsoethantseuh toae ua \
+ antoeh uantheount oentahoent uahnsoethasnutoehansteuo santhu sneoathu snoethasnut oesanthoesna thusenotha nsthasunoeth ausntehsunathoensuathoesnta uhnsoetha usntoeh uanhs unosethu \
+ antoehunatoehu natoehua oentha neotuhan toehu natoehu ntahoe nutah eu natoheunathoen uasoenuasoent asntoehsan tuosnthnu aohenuath eontha untoh eunth unth anth unth nth nth nt \
+ a ntoehanu tunth nsont uhansoethasn oehsanthnt heauo eanthuo sh nahnoethansu tohe sanuthoe snathuoesntha snuothe anthusonehtasuntoeh asnuthonsa teauhntoeha onetuha nth \
+ anoethuan toentauh noethauntohe anuthoe nathu noethaun oethanuthoe nathuoe ntahu enotha unetha ntuhenaothu enotahun eotha ntoehu aoehuntha enotuh aonethau noethu anoethuna toheua \
+ ontehanutoe hnuathoena aoteha aonetuha
+
+#define BIGARGS1(aonthanotehu, bonthanotehu, conthanotehu, donthanotehu, eonthanotehu, fonthanotehu, gonthanotehu, honthanotehu, ionthanotehu, jonthanotehu, konthanotehu) jonthanotehu
+#define BIGARGS2(aonthanotehu, bonthanotehu, conthanotehu, donthanotehu, eonthanotehu, fonthanotehu, gonthanotehu, honthanotehu, ionthanotehu, jonthanotehu, konthanotehu) jonthanotehu
+#define BIGARGS3(aonthanotehu, bonthanotehu, conthanotehu, donthanotehu, eonthanotehu, fonthanotehu, gonthanotehu, honthanotehu, ionthanotehu, jonthanotehu, konthanotehu) jonthanotehu
+#define BIGARGS4(aonthanotehu, bonthanotehu, conthanotehu, donthanotehu, eonthanotehu, fonthanotehu, gonthanotehu, honthanotehu, ionthanotehu, jonthanotehu, konthanotehu) jonthanotehu
+
+
+#define foobar(a, b) a + b
+
+#if foobar(1.1, 2.2)
+#error good macro
+#else
+#error bad macro
+#endif
+
+#if foobar(1
+;
+#
+#
+#endif
+#if foobar(1,
+;
+#
+#
+#endif
+float c = foobar(1.1, 2.2
+ );
+#if foobar(1.1, 2.2
+)
+#if foobar(1.1, 2.2
+#endif
+#endif
+
+#define VAL0 0
+#define VAL1 1
+
+#if UNDEF
+#error bad 0
+#else
+#error good 0
+#endif
+
+#if VAL1 || UNDEF
+#error good 1
+#else
+#error bad 1
+#endif
+
+#if VAL1 && UNDEF // UNDEF ERROR
+#endif
+
+#if VAL0 || UNDEF // UNDEF ERROR
+#endif
+
+#if VAL0 && UNDEF
+#error bad 2
+#else
+#error good 1
+#endif
+
+#if VAL1 || (VAL1 && UNDEF)
+#error good 3
+#else
+#error bad 3
+#endif
+
+#if VAL1 && (VAL1 || UNDEF)
+#error good 4
+#else
+#error bad 4
+#endif
+
+#if VAL1 < VAL1 || VAL1 > VAL1 || UNDEF // UNDEF ERROR
+#endif
+
+#if VAL1 < VAL1 || VAL1 > VAL1 && UNDEF
+#endif
+
+#if VAL1 || UNDEF && UNDEF2
+#endif
+
+#if VAL0 || UNDEF && UNDEF2 // UNDEF ERROR
+#endif
+
+#if (VAL1 || UNDEF) && UNDEF2 // UNDEF2 ERROR
+#endif
+
+#if (VAL0 && UNDEF) || UNDEF2 // UNDEF2 ERROR
+#endif
+
+#line 3000
+#error line of this error should be 3000
+
+#define __LINE__ 30
+#define __FILE__
+#define __VERSION__
+#define GL_SOME_EXTENSION
+#undef __LINE__
+#undef __FILE__
+#undef __VERSION__
+#undef GL_SOME_EXTENSION
+
+#line 4000
+#line 200 % 0 // ERROR, div by 0
+#if __LINE__ / 0 // ERROR, div by 0
+#endif
+
+#if 7% // ERROR incomplete expression
+
+#line 10000
+#if 0
+// ERROR, EOF \ No newline at end of file
diff --git a/chromium/third_party/glslang/src/Test/cppIndent.vert b/chromium/third_party/glslang/src/Test/cppIndent.vert
new file mode 100644
index 00000000000..49ec8ba3ddd
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/cppIndent.vert
@@ -0,0 +1,61 @@
+#version 110
+
+#define ON
+
+float sum = 0.0;
+
+void main()
+{
+
+#ifdef ON
+//yes
+sum += 1.0;
+#endif
+
+#ifdef OFF
+ //no
+ sum += 20.0;
+#endif
+
+ #if defined(ON)
+ //yes
+ sum += 300.0;
+ #endif
+
+ #if defined(OFF)
+ //no
+ sum += 4000.0;
+ #endif
+
+ #if !defined(ON)
+ //no
+ sum += 50000.0;
+ #endif
+
+ #if !defined(OFF)
+ //yes
+ sum += 600000.0;
+ #endif
+
+ #if defined (ON) && defined (OFF)
+//no
+sum += 7000000.0;
+ #endif
+
+#if defined ( ON ) && ! defined(OFF)
+//yes
+sum += 80000000.0;
+#endif
+
+#if defined(OFF) || defined(ON)
+//yes
+sum += 900000000.0;
+#endif
+
+// sum should be 980600301.0
+ gl_Position = vec4(sum);
+}
+
+#define FUNC(a,b) a+b
+// needs to be last test in file due to syntax error
+void foo986(){ FUNC( (((2)))), 4); } // ERROR, too many )
diff --git a/chromium/third_party/glslang/src/Test/cppNest.vert b/chromium/third_party/glslang/src/Test/cppNest.vert
new file mode 100644
index 00000000000..26038ea965d
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/cppNest.vert
@@ -0,0 +1,177 @@
+#version 110
+
+#define ON
+
+float sum = 0.0;
+
+void main()
+{
+
+#ifdef ON
+//yes
+sum += 1.0;
+
+ #ifdef OFF
+ //no
+ sum += 20.0;
+ #endif
+
+ #if defined(ON)
+ //yes
+ sum += 300.0;
+ #endif
+
+#endif
+
+
+#if defined(OFF)
+//no
+sum += 4000.0;
+
+#if !defined(ON)
+//no
+sum += 50000.0;
+#endif
+
+ //no
+ sum += 0.1;
+ #ifdef ON
+ //no
+ sum += 0.2;
+ #endif
+
+ //no
+ sum += 0.01;
+ #ifdef ON
+ //no
+ sum += 0.02;
+ #else
+ //no
+ sum += 0.03;
+ #endif
+
+//no
+ sum + 0.3;
+
+#endif
+
+
+#if !defined(OFF)
+//yes
+sum += 600000.0;
+
+ #if defined(ON) && !defined(OFF)
+ //yes
+ sum += 80000000.0;
+
+ #if defined(OFF) || defined(ON)
+ //yes
+ sum += 900000000.0;
+
+ #if defined(ON) && defined(OFF)
+ //no
+ sum += 0.7;
+ #elif !defined(OFF)
+ //yes
+ sum += 7000000.0;
+ #endif
+
+ #endif
+
+ #endif
+
+#endif
+
+// sum should be 987600301.0
+ gl_Position = vec4(sum);
+}
+
+#define A 1
+#define C 0
+#define E 0
+#define F 1
+#if A
+ #if C
+ #if E
+ int selected4 = 1;
+ #elif F
+ int selected4 = 2;
+ #else
+ int selected4 = 3;
+ #endif
+ #endif
+ int selected4 = 4;
+#endif
+
+#define ZA 1
+#define ZC 1
+#define ZE 0
+#define ZF 1
+#if ZA
+ #if ZC
+ #if ZE
+ int selected2 = 1;
+ #elif ZF
+ int selected2 = 2;
+ #else
+ int selected2 = 3;
+ #endif
+ #endif
+#endif
+
+#define AZA 1
+#define AZC 1
+#define AZE 0
+#define AZF 0
+#if AZA
+ #if AZC
+ #if AZE
+ int selected3 = 1;
+ #elif AZF
+ int selected3 = 2;
+ #else
+ int selected3 = 3;
+ #endif
+ #endif
+#endif
+
+// ERROR cases...
+
+#if 0
+int;
+#else
+int;
+#elif 1
+int;
+#endif
+
+#if 0
+int;
+#else
+int;
+#else
+int;
+#endif
+
+#if 0
+ #if 0
+ int;
+ #else
+ int;
+ #elif 1
+ int;
+ #endif
+
+ #if 0
+ int;
+ #else
+ int;
+ #else
+ int;
+ #endif
+#endif
+
+#define FUNC(a,b) a+b
+void foo985(){ FUNC( (((2))), ((3),4)); }
+// needs to be last test in file
+void foo987(){ FUNC(((); } // ERROR, EOF in argument
diff --git a/chromium/third_party/glslang/src/Test/cppSimple.vert b/chromium/third_party/glslang/src/Test/cppSimple.vert
new file mode 100644
index 00000000000..198203a69d7
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/cppSimple.vert
@@ -0,0 +1,343 @@
+#version 400
+
+#define ON
+
+float sum = 0.0;
+
+void main()
+{
+
+#ifdef ON
+//yes
+sum += 1.0;
+#endif
+
+#ifdef OFF
+//no
+sum += 20.0;
+#endif
+
+#if defined(ON)
+//yes
+sum += 300.0;
+#endif
+
+#if defined(OFF)
+//no
+sum += 4000.0;
+#endif
+
+#if !defined(ON)
+//no
+sum += 50000.0;
+#endif
+
+#ifndef OFF
+//yes
+sum += 600000.0;
+#else
+//no
+sum += 0.6;
+#endif
+
+#if defined(ON) && defined(OFF)
+//no
+sum += 0.7;
+#elif !defined(OFF)
+//yes
+sum += 7000000.0;
+#endif
+
+#if defined(ON) && !defined(OFF)
+//yes
+sum += 80000000.0;
+#endif
+
+#if defined(OFF) || defined(ON)
+//yes
+sum += 900000000.0;
+#endif
+
+#if NEVER_DEFINED
+//no
+sum += 0.04;
+#else
+sum += 0.05;
+#endif
+
+// sum should be 987600301.7
+ gl_Position = vec4(sum);
+}
+
+#define A 0
+# define B 0
+ # define C 0
+
+#if (A == B) || (A == C)
+#error good1
+#endif
+
+#if A == B || (A == C)
+#error good2
+#endif
+
+#if (A == B || (A == C))
+#error good3
+#endif
+
+#if (AA == BB) || (AA == CC)
+#error good4
+#endif
+
+#if AA == BB || (AA == CC)
+#error good5
+#endif
+
+#if ((AA == BB || (AA == CC)))
+#error good6
+#endif
+
+#if (A == B || (A == C)
+#error bad1
+#endif
+
+#if A == B || A == C)
+#error bad2
+#endif
+
+#if (A == B || (A == C)
+#error bad3
+#endif
+
+#if AA == BB) || (AA == CC)
+#error bad4
+#endif
+
+#if AA == BB || (AA == CC
+#error bad5
+#endif
+
+#if ((AA == BB || (AA == CC))))
+#error bad6
+#endif extra tokens
+
+int linenumber = __LINE__;
+int filenumber = __FILE__;
+int version = __VERSION__;
+
+#define PI (3.14)
+#define TWOPI (2.0 * PI)
+float twoPi = TWOPI;
+
+//#define PASTE(a,b) a ## b
+//float PASTE(tod, ay) = 17;
+
+"boo" // ERROR
+int a = length("aoenatuh"); // ERROR
+#define QUOTE "abcd" // okay
+'int'; // ERROR
+#define SINGLE 'a' // okay
+// ERROR: all the following are reserved
+#define GL_
+#define GL_Macro 1
+#define __M
+#define M__
+#define ABC__DE abc
+
+#if 4
+#else extra
+#elif
+// ERROR elif after else
+#endif
+
+#if blah
+ #if 0
+ #else extra
+ #ifdef M
+ #else
+ #else
+ // ERROR else after else
+ #endif extra
+ #endif
+#endif
+
+#define m1(a,a) // ERROR
+#define m2(a,b)
+
+// okay
+#define m3 (a)
+#define m3 (a)
+
+// ERROR
+#define m4(b)
+#define m4 (b)
+
+// ERROR
+#define m5 (b)
+#define m5(b)
+
+// ERROR
+#define m6(a)
+#define m6
+
+// ERROR (whitespace)
+#define m7 (a)
+#define m7 ( a)
+
+#define m80(a,b) is + exactly m3 the same
+#define m80(a,b) is + exactly m3 the same
+
+// ERROR
+#define m8(a,b) almost + exactly m3 the same
+#define m8(a,b) almost + exactly m3 thee same
+
+// ERROR
+#define m9(a,b,c) aoe
+#define m9(a,d,c) aoe
+
+#define n1 0xf
+int n = n1;
+
+#define f1 .08e-2Lf
+double f = f1;
+
+#undef __VERSION__
+#undef GL_ARB_texture_rectangle
+
+#
+ #
+ #
+##
+# #
+# 0x25
+####
+####ff
+#########ff fg 0x25
+#pragma
+#pragma(aoent)
+ # pragma
+#pragma STDGL
+#pragma optimize( on)
+#pragma optimize(off)
+#pragma debug( on)
+#pragma debug(off )
+#pragma optimize( on) anoteun
+#pragma optimize(off
+#pragma debug( on) (
+#pragma debug(off aoeua)
+#pragma optimize( on)
+#pragma optimize(off,)
+#pragma debug( on, aoeu)
+#pragma debugoff )
+#pragma aontheu natoeh uantheo uasotea noeahuonea uonethau onethuanoeth aunotehau noeth anthoeua anoethuantoeh uantoehu natoehu naoteh unotaehu noethua onetuh aou
+# \
+
+# \
+ error good continuation
+
+#flizbit
+
+#define directive error
+
+#directive directive was expanded
+
+#line 12000
+#error line should be 12000
+#line 13000 7
+#error line should be 13000, string 7
+#define L1 14000
+#define L2 13
+#define F1 5
+#define F2 7
+#line L1 + L2
+#error line should be 14013, string 7
+#line L1 + L2 F1 + F2 // antoeuh sat comment
+#error line should be 14013, string 12
+#line L1 + L2 + F1 + F2
+#error line should be 14025, string 12
+#line 1234 F1 + F2 extra
+#define empty_extra
+#line 1235 F1 + F2 empty_extra
+#define moreEmpty empty_extra
+#line 1236 F1 + F2 moreEmpty empty_extra // okay, lots of nothin
+#line 1237 F1 + F2 moreEmpty empty_extra extra // ERROR, 'extra'
+#line 1238 F1 + F2 moreEmpty empty_extra
+#line 1239 empty_extra F1 empty_extra + empty_extra F2 empty_extra moreEmpty empty_extra
+#line (20000)
+#error line should be 20000
+#line (20000+10)
+#error line should be 20010
+#line +20020
+#error line should be 20020
+
+#define VAL1 1.0
+#define VAL2 2.0
+
+#define RES2 /* test a multiline
+ comment in a macro definition */ (RES1 * VAL2)
+#define RES1 (VAL2 / VAL1)
+#define RES2 /* comment */(RES1 * VAL2)
+#define /* */SUM_VALUES (RES2 + RES1)
+
+void foo234()
+{
+ gl_Position = vec4(SUM_VALUES);
+}
+
+// more whitespace recording tests
+#define SPACE_AT_END(a,b) spaceAtEndIsOkay
+#define SPACE_AT_END(a,b) spaceAtEndIsOkay // space at end
+
+#define SPACE_AT_BEGIN(a,b)spaceAtBeginIsOkay
+#define SPACE_AT_BEGIN(a,b) spaceAtBeginIsOkay
+
+// space in middle is an error
+#define SPACE_IN_MIDDLE(a,b) space +in middle
+#define SPACE_IN_MIDDLE(a,b) space + in middle
+
+#define FIRSTPART 17
+#define SECONDPART + 5
+
+#if FIRSTPART SECONDPART == 22
+#error good evaluation 1
+#endif
+
+#if moreEmpty FIRSTPART moreEmpty SECONDPART moreEmpty == moreEmpty 22 moreEmpty
+#error good evaluation 2
+#endif
+
+// ERRORS...
+#line 9000
+#if defined(OUNH
+#endif
+#if defined OUNH)
+#endif
+
+// recursion (okay)
+#define RECURSE RECURSE
+int RECURSE;
+#define R2 R1
+#define R1 R2
+#undef RECURSE
+int R1 = RECURSE;
+
+#define FOOOM(a,b) a + b
+int aoeua = FOOOM;
+#if FOOOM
+#endif
+
+#line 9500
+#if\376
+#endif
+#if \376
+#endif
+#if \377
+#endif
+#error\377
+#error \ 376
+#error \377
+
+#line 10000
+#if 1
+#else
+// ERROR, missing #endif \ No newline at end of file
diff --git a/chromium/third_party/glslang/src/Test/dataOut.frag b/chromium/third_party/glslang/src/Test/dataOut.frag
new file mode 100644
index 00000000000..6aaa7cfbb0e
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/dataOut.frag
@@ -0,0 +1,8 @@
+#version 130
+
+varying vec4 Color;
+
+void main()
+{
+ gl_FragData[1] = Color;
+}
diff --git a/chromium/third_party/glslang/src/Test/dataOutIndirect.frag b/chromium/third_party/glslang/src/Test/dataOutIndirect.frag
new file mode 100644
index 00000000000..0dc3494a51c
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/dataOutIndirect.frag
@@ -0,0 +1,10 @@
+#version 130
+
+varying vec4 Color;
+
+uniform int i;
+
+void main()
+{
+ gl_FragData[i] = Color;
+}
diff --git a/chromium/third_party/glslang/src/Test/dce.frag b/chromium/third_party/glslang/src/Test/dce.frag
new file mode 100644
index 00000000000..df62fc57172
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/dce.frag
@@ -0,0 +1,56 @@
+#version 400
+
+const bool flag = false;
+
+int c = 0;
+
+void bar()
+{
+ if (flag)
+ ++c; // should still show up in AST
+ else
+ ++c;
+
+ flag ? ++c : ++c; // both should still show up in AST
+
+ switch (c) {
+ case 1:
+ ++c;
+ break;
+ ++c; // should still show up in AST
+ case 2:
+ break;
+ ++c; // should still show up in AST
+ default:
+ break;
+ }
+
+ for (int i = 0; i < 0; ++i)
+ ++c; // should still show up in AST
+
+ for (int i = 0; i < 10; ++i) {
+ if (c < 3) {
+ break;
+ ++c; // should still show up in AST
+ } else {
+ continue;
+ ++c; // should still show up in AST
+ }
+ }
+
+ return;
+
+ ++c; // should still show up in AST
+}
+
+int foo() // not called, but should still show up in AST
+{
+ if (c > 4) {
+ return 4;
+ ++c; // should still show up in AST
+ }
+
+ return 5;
+
+ ++c; // should still show up in AST
+}
diff --git a/chromium/third_party/glslang/src/Test/decls.frag b/chromium/third_party/glslang/src/Test/decls.frag
new file mode 100644
index 00000000000..5d2683448be
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/decls.frag
@@ -0,0 +1,49 @@
+#version 120
+
+int a;
+int b, c;
+int d1 = 1;
+int e2 = 2, f;
+int g, h3 = 3;
+
+int i4[4];
+int j, k5[5];
+int m6[6], m7[7];
+int n8[8], p;
+
+int ii4[4] = int[](1, 2, 3, 4);
+int ij, ik5[5] = int[](5, 6, 7, 8, 9);
+int im2[2] = int[](10, 11), im3[3] = int[](12, 13, 14);
+int in8[4] = int[](21, 22, 23, 24), ip;
+
+void vi4[4] = int[](1, 2, 3, 4);
+void vj, vk5[5] = int[](5, 6, 7, 8, 9);
+void vm2[2] = int[](10, 11), vm3[3] = int[](12, 13, 14);
+void vn8[4] = int[](21, 22, 23, 24), vp;
+
+const int cii4[4] = int[](1, 2, 3, 4);
+const int cij, cik5[5] = int[](5, 6, 7, 8, 9);
+const int cim2[2] = int[](10, 11), cim3[3] = int[](12, 13, 14);
+const int cin8[4] = int[](21, 22, 23, 24), cip;
+
+uniform int uii4[4] = int[](1, 2, 3, 4);
+uniform int uij, uik5[5] = int[](5, 6, 7, 8, 9);
+uniform int uim2[2] = int[](10, 11), uim3[3] = int[](12, 13, 14);
+uniform int uin8[4] = int[](21, 22, 23, 24), uip;
+
+int gl_vi4[4] = int[](1, 2, 3, 4);
+int gl_vj, gl_vk5[5] = int[](5, 6, 7, 8, 9);
+int gl_vm2[2] = int[](10, 11), gl_vm3[3] = int[](12, 13, 14);
+int gl_vn8[4] = int[](21, 22, 23, 24), gl_vp;
+
+void main()
+{
+ while (bool cond = b < c);
+ while (int icond = b);
+ while (bool gl_cond = b < c);
+}
+
+int foob__vi4[4] = int[](1, 2, 3, 4);
+int foob__vj, foob__vk5[5] = int[](5, 6, 7, 8, 9);
+int __foobvm2[2] = int[](10, 11), __foobvm3[3] = int[](12, 13, 14);
+int foob__vn8[4] = int[](21, 22, 23, 24), foob__vp;
diff --git a/chromium/third_party/glslang/src/Test/deepRvalue.frag b/chromium/third_party/glslang/src/Test/deepRvalue.frag
new file mode 100644
index 00000000000..71e9cdb3c7d
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/deepRvalue.frag
@@ -0,0 +1,36 @@
+#version 120
+
+uniform sampler2D sampler;
+
+vec4 v1 = vec4(2.0, 3.0, 5.0, 7.0);
+vec4 v2 = vec4(11.0, 13.0, 17.0, 19.0);
+vec4 v3 = vec4(23.0, 29.0, 31.0, 37.0);
+vec4 v4 = vec4(41.0, 43.0, 47.0, 53.0);
+
+struct str {
+ int a;
+ vec2 b[3];
+ bool c;
+};
+
+void main()
+{
+ mat4 m = mat4(v1, v2, v3, v4);
+
+ mat4 mm = matrixCompMult(m, m);
+ float f = mm[1].w; // should be 19 * 19 = 361
+
+ // do a deep access to a spontaneous r-value
+ float g = matrixCompMult(m, m)[2].y; // should be 29 * 29 = 841
+
+ float h = str(1, vec2[3](vec2(2.0, 3.0), vec2(4.0, 5.0), vec2(6.0, 7.0)), true).b[1][1]; // should be 5.0
+
+ float i = texture2D(sampler, vec2(0.5,0.5)).y;
+
+ i += (i > 0.1 ? v1 : v2)[3];
+
+ str t;
+ i += (t = str(1, vec2[3](vec2(2.0, 3.0), vec2(4.0, 5.0), vec2(6.0, 7.0)), true)).b[2].y; // should be 7.0
+
+ gl_FragColor = vec4(f, g, h, i);
+}
diff --git a/chromium/third_party/glslang/src/Test/depthOut.frag b/chromium/third_party/glslang/src/Test/depthOut.frag
new file mode 100644
index 00000000000..9b08962eec3
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/depthOut.frag
@@ -0,0 +1,10 @@
+#version 130
+
+varying vec4 Color;
+varying float Depth;
+
+void main()
+{
+ gl_FragDepth = Depth;
+ gl_FragColor = Color;
+}
diff --git a/chromium/third_party/glslang/src/Test/discard-dce.frag b/chromium/third_party/glslang/src/Test/discard-dce.frag
new file mode 100644
index 00000000000..dbdcee67982
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/discard-dce.frag
@@ -0,0 +1,35 @@
+#version 110
+varying vec2 tex_coord;
+
+void main (void)
+{
+ vec4 white = vec4(1.0);
+ vec4 black = vec4(0.2);
+ vec4 color = white;
+
+ // First, cut out our circle
+ float x = tex_coord.x*2.0 - 1.0;
+ float y = tex_coord.y*2.0 - 1.0;
+
+ float radius = sqrt(x*x + y*y);
+ if (radius > 1.0) {
+ if (radius > 1.1) {
+ ++color;
+ }
+
+ gl_FragColor = color;
+
+ if (radius > 1.2) {
+ ++color;
+ }
+
+ discard;
+ }
+
+ // If we're near an edge, darken us a tiny bit
+ if (radius >= 0.75)
+ color -= abs(pow(radius, 16.0)/2.0);
+
+ gl_FragColor = color;
+
+}
diff --git a/chromium/third_party/glslang/src/Test/doWhileLoop.frag b/chromium/third_party/glslang/src/Test/doWhileLoop.frag
new file mode 100644
index 00000000000..eaacaba217e
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/doWhileLoop.frag
@@ -0,0 +1,16 @@
+#version 110
+
+uniform vec4 bigColor;
+varying vec4 BaseColor;
+uniform float d;
+
+void main()
+{
+ vec4 color = BaseColor;
+
+ do {
+ color += bigColor;
+ } while (color.x < d);
+
+ gl_FragColor = color;
+}
diff --git a/chromium/third_party/glslang/src/Test/earlyReturnDiscard.frag b/chromium/third_party/glslang/src/Test/earlyReturnDiscard.frag
new file mode 100644
index 00000000000..ecd5594659b
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/earlyReturnDiscard.frag
@@ -0,0 +1,102 @@
+#version 110
+
+uniform float d;
+uniform vec4 bigColor, smallColor;
+uniform vec4 otherColor;
+
+varying float c;
+
+uniform float threshhold;
+uniform float threshhold2;
+uniform float threshhold3;
+
+uniform float minimum;
+
+varying vec4 BaseColor;
+
+uniform bool b;
+
+void main()
+{
+ vec4 color = BaseColor;
+ vec4 color2;
+
+ color2 = otherColor;
+
+ if (c > d)
+ color += bigColor;
+ else
+ color += smallColor;
+
+ if (color.z < minimum)
+ return;
+
+ color.z++;
+
+ if (color.z > threshhold)
+ discard;
+
+ color++;
+
+ // Two path, different rest
+ if (color.w > threshhold2) {
+ if (color.z > threshhold2)
+ return;
+ else if (b)
+ color.z++;
+ else {
+ if (color.x < minimum) {
+ discard;
+ } else {
+ color++;
+ }
+ }
+ } else {
+ if (b)
+ discard;
+ else
+ return;
+ }
+
+
+ // // Two path, shared rest
+ // if (color.w > threshhold2) {
+ // if (color.z > threshhold2)
+ // return;
+ // else if (b)
+ // color++;
+ // else {
+ // if (color.x < minimum) {
+ // discard;
+ // } else {
+ // color++;
+ // }
+ // }
+ // } else {
+ // if (b)
+ // discard;
+ // else
+ // return;
+ // }
+
+
+ // // One path
+ // if (color.w > threshhold2) {
+ // if (color.z > threshhold2)
+ // return;
+ // else {
+ // if (color.x < minimum) {
+ // discard;
+ // } else {
+ // color++;
+ // }
+ // }
+ // } else {
+ // if (b)
+ // discard;
+ // else
+ // return;
+ // }
+
+ gl_FragColor = color * color2;
+}
diff --git a/chromium/third_party/glslang/src/Test/empty.frag b/chromium/third_party/glslang/src/Test/empty.frag
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/empty.frag
diff --git a/chromium/third_party/glslang/src/Test/empty2.frag b/chromium/third_party/glslang/src/Test/empty2.frag
new file mode 100644
index 00000000000..8b137891791
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/empty2.frag
@@ -0,0 +1 @@
+
diff --git a/chromium/third_party/glslang/src/Test/empty3.frag b/chromium/third_party/glslang/src/Test/empty3.frag
new file mode 100644
index 00000000000..14cd83d77f7
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/empty3.frag
@@ -0,0 +1 @@
+#version 110
diff --git a/chromium/third_party/glslang/src/Test/errors.frag b/chromium/third_party/glslang/src/Test/errors.frag
new file mode 100644
index 00000000000..99cf2b9365d
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/errors.frag
@@ -0,0 +1,4 @@
+int main(int foo)
+{
+ return 1;
+}
diff --git a/chromium/third_party/glslang/src/Test/es-link1.frag b/chromium/third_party/glslang/src/Test/es-link1.frag
new file mode 100644
index 00000000000..fe4da41d034
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/es-link1.frag
@@ -0,0 +1,8 @@
+#version 100
+
+mediump vec4 calculateColor();
+
+void main()
+{
+ gl_FragColor = calculateColor();
+}
diff --git a/chromium/third_party/glslang/src/Test/es-link2.frag b/chromium/third_party/glslang/src/Test/es-link2.frag
new file mode 100644
index 00000000000..e7b5a4779b7
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/es-link2.frag
@@ -0,0 +1,8 @@
+#version 100
+
+varying mediump vec4 varyingColor;
+
+mediump vec4 calculateColor()
+{
+ return varyingColor * 0.5;
+}
diff --git a/chromium/third_party/glslang/src/Test/flowControl.frag b/chromium/third_party/glslang/src/Test/flowControl.frag
new file mode 100644
index 00000000000..a6ef419d29d
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/flowControl.frag
@@ -0,0 +1,23 @@
+#version 120
+
+uniform float d;
+uniform vec4 bigColor, smallColor;
+uniform vec4 otherColor;
+
+varying float c;
+varying vec4 BaseColor;
+
+void main()
+{
+ vec4 color = BaseColor;
+ vec4 color2;
+
+ color2 = otherColor;
+
+ if (c > d)
+ color += bigColor;
+ else
+ color += smallColor;
+
+ gl_FragColor = color * color2;
+}
diff --git a/chromium/third_party/glslang/src/Test/forLoop.frag b/chromium/third_party/glslang/src/Test/forLoop.frag
new file mode 100644
index 00000000000..c26700aeb17
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/forLoop.frag
@@ -0,0 +1,41 @@
+#version 130
+
+uniform vec4 bigColor;
+in vec4 BaseColor;
+in float f;
+
+uniform int Count;
+uniform uvec4 v4;
+
+void main()
+{
+ vec4 color = BaseColor;
+
+ for (int i = 0; i < Count; ++i) {
+ color += bigColor;
+ }
+
+ gl_FragColor = color;
+
+ float sum = 0.0;
+ for (int i = 0; i < 4; ++i)
+ sum += v4[i];
+
+ vec4 tv4;
+
+ for (int i = 0; i < 4; ++i)
+ tv4[i] = v4[i] * 4u;
+
+ gl_FragColor += vec4(sum) + tv4;
+
+ vec4 r;
+ r.xyz = BaseColor.xyz;
+
+ for (int i = 0; i < Count; ++i)
+ r.w = f;
+
+ gl_FragColor.xyz += r.xyz;
+
+ for (int i = 0; i < 16; i += 4)
+ gl_FragColor *= f;
+}
diff --git a/chromium/third_party/glslang/src/Test/forwardRef.frag b/chromium/third_party/glslang/src/Test/forwardRef.frag
new file mode 100644
index 00000000000..49f3504eacf
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/forwardRef.frag
@@ -0,0 +1,37 @@
+#version 110
+
+uniform vec4 bigColor;
+varying vec4 BaseColor;
+uniform float d;
+
+void bar();
+float foo(vec4);
+float unreachableReturn();
+
+void main()
+{
+ vec4 color = vec4(foo(BaseColor));
+
+ bar();
+ float f = unreachableReturn();
+
+ gl_FragColor = color * f;
+}
+
+void bar()
+{
+}
+
+float unreachableReturn()
+{
+ bar();
+ if (d < 4.2)
+ return 1.2;
+ else
+ return 4.5;
+}
+
+float foo(vec4 bar)
+{
+ return bar.x + bar.y;
+}
diff --git a/chromium/third_party/glslang/src/Test/functionCall.frag b/chromium/third_party/glslang/src/Test/functionCall.frag
new file mode 100644
index 00000000000..ca2866271c6
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/functionCall.frag
@@ -0,0 +1,44 @@
+#version 130
+
+uniform vec4 bigColor;
+varying vec4 BaseColor;
+uniform float d;
+
+float h = 0.0;
+
+float foo(vec4 bar)
+{
+ return bar.x + bar.y;
+}
+
+void bar()
+{
+}
+
+float unreachableReturn()
+{
+ if (d < 4.2)
+ return 1.2;
+ else
+ return 4.5;
+ // might be another return inserted here by builders, has to be correct type
+}
+
+float missingReturn()
+{
+ if (d < 4.5) {
+ h = d;
+ return 3.9;
+ }
+}
+
+void main()
+{
+ vec4 color = vec4(foo(BaseColor));
+
+ bar();
+ float f = unreachableReturn();
+ float g = missingReturn();
+
+ gl_FragColor = color * f * h;
+}
diff --git a/chromium/third_party/glslang/src/Test/functionSemantics.frag b/chromium/third_party/glslang/src/Test/functionSemantics.frag
new file mode 100644
index 00000000000..780a87966c8
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/functionSemantics.frag
@@ -0,0 +1,70 @@
+#version 400
+
+uniform float u;
+
+int foo(int a, const int b, in int c, const in int d, out int e, inout int f)
+{
+ int sum = a + b + c + d + f; // no e, it is out only
+ // sum should be 47 now
+
+ a *= 64;
+ // no b, it is read only
+ c *= 64;
+ // no d, it is read only
+ e = 64 * 16; // e starts undefined
+ f *= 64;
+
+ sum += a + 64 * b + c + 64 * d + e + f; // everything has a value now, totaling of 64(1+2+4+8+16+32) = 64*63 = 4032
+ // sum should be 4032 + 47 = 4079
+
+ return sum;
+}
+
+int foo2(float a, vec3 b, out int r)
+{
+ r = int(3.0 * a);
+ return int(5.0 * b.y);
+}
+
+int foo3()
+{
+ if (u > 3.2) {
+ discard;
+ return 1000000;
+ }
+
+ return 2000000;
+}
+
+void main()
+{
+ int e;
+ int t = 2;
+ struct s {
+ ivec4 t;
+ } f;
+ f.t.y = 32;
+
+ // test the different qualifers
+ int color = foo(1, 2, t+t, 8, e, f.t.y);
+
+ color += 128 * (e + f.t.y); // right side should be 128(64(16 + 32)) = 393216
+ // sum should be 4079 + 393216 = 397295
+
+ // test conversions
+ float arg;
+ float ret;
+ ret = foo2(4, ivec3(1,2,3), arg); // ret = 10, param = 12.0
+ color += int(ret + arg); // adds 22, for total of 397317
+
+ color += foo3(); // theoretically, add 2000000, for total of 2397317
+
+ gl_FragColor = vec4(color);
+}
+
+vec3 m(vec2);
+void aggCall()
+{
+ float F;
+ m(ivec2(F)); // test input conversion of single argument that's an aggregate; other function tests in 120.vert
+}
diff --git a/chromium/third_party/glslang/src/Test/glslangValidator b/chromium/third_party/glslang/src/Test/glslangValidator
new file mode 100755
index 00000000000..856aa1a9957
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/glslangValidator
@@ -0,0 +1,2 @@
+#!/usr/bin/env bash
+../build/install/bin/glslangValidator $*
diff --git a/chromium/third_party/glslang/src/Test/hlsl.assoc.frag b/chromium/third_party/glslang/src/Test/hlsl.assoc.frag
new file mode 100644
index 00000000000..8ce1050cd1b
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/hlsl.assoc.frag
@@ -0,0 +1,11 @@
+float4 PixelShaderFunction(
+ float4 a1,
+ float4 a2,
+ float4 a3,
+ float4 a4,
+ float4 a5
+ ) : COLOR0
+{
+ a1 = a2 = a3 = a4 = a5;
+ return a1 + a2 + a3 + a4 + a5;
+}
diff --git a/chromium/third_party/glslang/src/Test/hlsl.attribute.frag b/chromium/third_party/glslang/src/Test/hlsl.attribute.frag
new file mode 100644
index 00000000000..25c72d46efd
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/hlsl.attribute.frag
@@ -0,0 +1,13 @@
+float4 PixelShaderFunction(float4 input) : COLOR0
+{
+ [unroll];
+ [];
+ [][][];
+ [unroll(4)];
+ [allow_uav_condition];
+ [unroll(4)] [allow_uav_condition];
+ [ loop ];
+ [fastopt];
+ [branch] if (0);
+ [flatten];
+}
diff --git a/chromium/third_party/glslang/src/Test/hlsl.cast.frag b/chromium/third_party/glslang/src/Test/hlsl.cast.frag
new file mode 100644
index 00000000000..c8dc8212d06
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/hlsl.cast.frag
@@ -0,0 +1,4 @@
+float4 PixelShaderFunction(float4 input) : COLOR0
+{
+ return (float4)input + (int4)input + (float4)1.198;
+}
diff --git a/chromium/third_party/glslang/src/Test/hlsl.doLoop.frag b/chromium/third_party/glslang/src/Test/hlsl.doLoop.frag
new file mode 100644
index 00000000000..546b2c2ca76
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/hlsl.doLoop.frag
@@ -0,0 +1,6 @@
+float4 PixelShaderFunction(float4 input) : COLOR0
+{
+ [unroll] do {} while (false);
+ [unroll] do {;} while (false);
+ do { return input; } while (input == input);
+}
diff --git a/chromium/third_party/glslang/src/Test/hlsl.float1.frag b/chromium/third_party/glslang/src/Test/hlsl.float1.frag
new file mode 100644
index 00000000000..5000dcedcf1
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/hlsl.float1.frag
@@ -0,0 +1,7 @@
+float1 f1 = float1(1.0);
+float scalar = 2.0;
+
+float1 ShaderFunction(float1 inFloat1, float inScalar) : COLOR0
+{
+ return f1 * scalar + inFloat1 * inScalar;
+}
diff --git a/chromium/third_party/glslang/src/Test/hlsl.float4.frag b/chromium/third_party/glslang/src/Test/hlsl.float4.frag
new file mode 100644
index 00000000000..df871225dcc
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/hlsl.float4.frag
@@ -0,0 +1,11 @@
+float4 AmbientColor = float4(1, 0.5, 0, 1);
+
+bool ff1 : SV_IsFrontFace;
+float4 ff2 : packoffset(c0.y);
+float4 ff3 : packoffset(c0.y) : register(ps_5_0, s[0]) ;
+float4 ff4 : VPOS : packoffset(c0.y) : register(ps_5_0, s[0]) <int bambam=30;> ;
+
+float4 ShaderFunction(float4 input) : COLOR0
+{
+ return input * AmbientColor;
+}
diff --git a/chromium/third_party/glslang/src/Test/hlsl.forLoop.frag b/chromium/third_party/glslang/src/Test/hlsl.forLoop.frag
new file mode 100644
index 00000000000..9109de79be3
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/hlsl.forLoop.frag
@@ -0,0 +1,8 @@
+float4 PixelShaderFunction(float4 input) : COLOR0
+{
+ for (;;) ;
+ for (++input; ; ) ;
+ [unroll] for (; input != input; ) {}
+ for (; input != input; ) { return -input; }
+ for (--input; input != input; input += 2) { return -input; }
+}
diff --git a/chromium/third_party/glslang/src/Test/hlsl.frag b/chromium/third_party/glslang/src/Test/hlsl.frag
new file mode 100644
index 00000000000..1620ed58822
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/hlsl.frag
@@ -0,0 +1,12 @@
+float4 AmbientColor = float4(1, 0.5, 0, 1);
+float AmbientIntensity = 0.1;
+
+float4 PixelShaderFunction(float4 input) : COLOR0
+{
+ return input * AmbientIntensity + AmbientColor;
+ return input * input + input * input;
+ return input + input * input + input;
+ return ++input * -+-+--input;
+ return input++ + ++input;
+ return sin(input);
+}
diff --git a/chromium/third_party/glslang/src/Test/hlsl.if.frag b/chromium/third_party/glslang/src/Test/hlsl.if.frag
new file mode 100644
index 00000000000..1f0dde713e1
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/hlsl.if.frag
@@ -0,0 +1,28 @@
+float4 PixelShaderFunction(float4 input) : COLOR0
+{
+ if (input == input)
+ return input;
+
+ if (input == input)
+ return input;
+ else
+ return -input;
+
+ if (input == input)
+ ;
+
+ if (input == input)
+ ;
+ else
+ ;
+
+ [flatten] if (input == input) {
+ return input;
+ }
+
+ if (input == input) {
+ return input;
+ } else {
+ return -input;
+ }
+}
diff --git a/chromium/third_party/glslang/src/Test/hlsl.intrinsics.frag b/chromium/third_party/glslang/src/Test/hlsl.intrinsics.frag
new file mode 100644
index 00000000000..a8a49a0fc16
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/hlsl.intrinsics.frag
@@ -0,0 +1,407 @@
+float PixelShaderFunction(float inF0, float inF1, float inF2)
+{
+ all(inF0);
+ abs(inF0);
+ acos(inF0);
+ any(inF0);
+ asin(inF0);
+ atan(inF0);
+ atan2(inF0, inF1);
+ ceil(inF0);
+ clamp(inF0, inF1, inF2);
+ clip(inF0);
+ cos(inF0);
+ cosh(inF0);
+ countbits(7);
+ ddx(inF0);
+ ddx_coarse(inF0);
+ ddx_fine(inF0);
+ ddy(inF0);
+ ddy_coarse(inF0);
+ ddy_fine(inF0);
+ degrees(inF0);
+ // EvaluateAttributeAtCentroid(inF0);
+ // EvaluateAttributeAtSample(inF0, 0);
+ // TODO: EvaluateAttributeSnapped(inF0, int2(1,2));
+ exp(inF0);
+ exp2(inF0);
+ firstbithigh(7);
+ firstbitlow(7);
+ floor(inF0);
+ // TODO: fma(inD0, inD1, inD2);
+ fmod(inF0, inF1);
+ frac(inF0);
+ frexp(inF0, inF1);
+ fwidth(inF0);
+ isinf(inF0);
+ isnan(inF0);
+ ldexp(inF0, inF1);
+ log(inF0);
+ log10(inF0);
+ log2(inF0);
+ max(inF0, inF1);
+ min(inF0, inF1);
+ pow(inF0, inF1);
+ radians(inF0);
+ rcp(inF0);
+ reversebits(2);
+ round(inF0);
+ rsqrt(inF0);
+ saturate(inF0);
+ sign(inF0);
+ sin(inF0);
+ sincos(inF0, inF1, inF2);
+ sinh(inF0);
+ smoothstep(inF0, inF1, inF2);
+ sqrt(inF0);
+ step(inF0, inF1);
+ tan(inF0);
+ tanh(inF0);
+ // TODO: sampler intrinsics, when we can declare the types.
+ trunc(inF0);
+
+ return 0.0;
+}
+
+float1 PixelShaderFunction(float1 inF0, float1 inF1, float1 inF2)
+{
+ // TODO: ... add when float1 prototypes are generated
+ return 0.0;
+}
+
+float2 PixelShaderFunction(float2 inF0, float2 inF1, float2 inF2)
+{
+ all(inF0);
+ abs(inF0);
+ acos(inF0);
+ any(inF0);
+ asin(inF0);
+ atan(inF0);
+ atan2(inF0, inF1);
+ ceil(inF0);
+ clamp(inF0, inF1, inF2);
+ clip(inF0);
+ cos(inF0);
+ cosh(inF0);
+ countbits(int2(7,3));
+ ddx(inF0);
+ ddx_coarse(inF0);
+ ddx_fine(inF0);
+ ddy(inF0);
+ ddy_coarse(inF0);
+ ddy_fine(inF0);
+ degrees(inF0);
+ distance(inF0, inF1);
+ dot(inF0, inF1);
+ // EvaluateAttributeAtCentroid(inF0);
+ // EvaluateAttributeAtSample(inF0, 0);
+ // TODO: EvaluateAttributeSnapped(inF0, int2(1,2));
+ exp(inF0);
+ exp2(inF0);
+ faceforward(inF0, inF1, inF2);
+ firstbithigh(7);
+ firstbitlow(7);
+ floor(inF0);
+ // TODO: fma(inD0, inD1, inD2);
+ fmod(inF0, inF1);
+ frac(inF0);
+ frexp(inF0, inF1);
+ fwidth(inF0);
+ isinf(inF0);
+ isnan(inF0);
+ ldexp(inF0, inF1);
+ length(inF0);
+ log(inF0);
+ log10(inF0);
+ log2(inF0);
+ max(inF0, inF1);
+ min(inF0, inF1);
+ normalize(inF0);
+ pow(inF0, inF1);
+ radians(inF0);
+ rcp(inF0);
+ reflect(inF0, inF1);
+ refract(inF0, inF1, 2.0);
+ reversebits(int2(1,2));
+ round(inF0);
+ rsqrt(inF0);
+ saturate(inF0);
+ sign(inF0);
+ sin(inF0);
+ sincos(inF0, inF1, inF2);
+ sinh(inF0);
+ smoothstep(inF0, inF1, inF2);
+ sqrt(inF0);
+ step(inF0, inF1);
+ tan(inF0);
+ tanh(inF0);
+ // TODO: sampler intrinsics, when we can declare the types.
+ trunc(inF0);
+
+ // TODO: ... add when float1 prototypes are generated
+ return float2(1,2);
+}
+
+float3 PixelShaderFunction(float3 inF0, float3 inF1, float3 inF2)
+{
+ all(inF0);
+ abs(inF0);
+ acos(inF0);
+ any(inF0);
+ asin(inF0);
+ atan(inF0);
+ atan2(inF0, inF1);
+ ceil(inF0);
+ clamp(inF0, inF1, inF2);
+ clip(inF0);
+ cos(inF0);
+ cosh(inF0);
+ countbits(int3(7,3,5));
+ cross(inF0, inF1);
+ ddx(inF0);
+ ddx_coarse(inF0);
+ ddx_fine(inF0);
+ ddy(inF0);
+ ddy_coarse(inF0);
+ ddy_fine(inF0);
+ degrees(inF0);
+ distance(inF0, inF1);
+ dot(inF0, inF1);
+ // EvaluateAttributeAtCentroid(inF0);
+ // EvaluateAttributeAtSample(inF0, 0);
+ // TODO: EvaluateAttributeSnapped(inF0, int2(1,2));
+ exp(inF0);
+ exp2(inF0);
+ faceforward(inF0, inF1, inF2);
+ firstbithigh(7);
+ firstbitlow(7);
+ floor(inF0);
+ // TODO: fma(inD0, inD1, inD2);
+ fmod(inF0, inF1);
+ frac(inF0);
+ frexp(inF0, inF1);
+ fwidth(inF0);
+ isinf(inF0);
+ isnan(inF0);
+ ldexp(inF0, inF1);
+ length(inF0);
+ log(inF0);
+ log10(inF0);
+ log2(inF0);
+ max(inF0, inF1);
+ min(inF0, inF1);
+ normalize(inF0);
+ pow(inF0, inF1);
+ radians(inF0);
+ rcp(inF0);
+ reflect(inF0, inF1);
+ refract(inF0, inF1, 2.0);
+ reversebits(int3(1,2,3));
+ round(inF0);
+ rsqrt(inF0);
+ saturate(inF0);
+ sign(inF0);
+ sin(inF0);
+ sincos(inF0, inF1, inF2);
+ sinh(inF0);
+ smoothstep(inF0, inF1, inF2);
+ sqrt(inF0);
+ step(inF0, inF1);
+ tan(inF0);
+ tanh(inF0);
+ // TODO: sampler intrinsics, when we can declare the types.
+ trunc(inF0);
+
+ // TODO: ... add when float1 prototypes are generated
+ return float3(1,2,3);
+}
+
+float4 PixelShaderFunction(float4 inF0, float4 inF1, float4 inF2)
+{
+ all(inF0);
+ abs(inF0);
+ acos(inF0);
+ any(inF0);
+ asin(inF0);
+ atan(inF0);
+ atan2(inF0, inF1);
+ ceil(inF0);
+ clamp(inF0, inF1, inF2);
+ clip(inF0);
+ cos(inF0);
+ cosh(inF0);
+ countbits(int4(7,3,5,2));
+ ddx(inF0);
+ ddx_coarse(inF0);
+ ddx_fine(inF0);
+ ddy(inF0);
+ ddy_coarse(inF0);
+ ddy_fine(inF0);
+ degrees(inF0);
+ distance(inF0, inF1);
+ dot(inF0, inF1);
+ dst(inF0, inF1);
+ // EvaluateAttributeAtCentroid(inF0);
+ // EvaluateAttributeAtSample(inF0, 0);
+ // TODO: EvaluateAttributeSnapped(inF0, int2(1,2));
+ exp(inF0);
+ exp2(inF0);
+ faceforward(inF0, inF1, inF2);
+ firstbithigh(7);
+ firstbitlow(7);
+ floor(inF0);
+ // TODO: fma(inD0, inD1, inD2);
+ fmod(inF0, inF1);
+ frac(inF0);
+ frexp(inF0, inF1);
+ fwidth(inF0);
+ isinf(inF0);
+ isnan(inF0);
+ ldexp(inF0, inF1);
+ length(inF0);
+ log(inF0);
+ log10(inF0);
+ log2(inF0);
+ max(inF0, inF1);
+ min(inF0, inF1);
+ normalize(inF0);
+ pow(inF0, inF1);
+ radians(inF0);
+ rcp(inF0);
+ reflect(inF0, inF1);
+ refract(inF0, inF1, 2.0);
+ reversebits(int4(1,2,3,4));
+ round(inF0);
+ rsqrt(inF0);
+ saturate(inF0);
+ sign(inF0);
+ sin(inF0);
+ sincos(inF0, inF1, inF2);
+ sinh(inF0);
+ smoothstep(inF0, inF1, inF2);
+ sqrt(inF0);
+ step(inF0, inF1);
+ tan(inF0);
+ tanh(inF0);
+ // TODO: sampler intrinsics, when we can declare the types.
+ trunc(inF0);
+
+ // TODO: ... add when float1 prototypes are generated
+ return float4(1,2,3,4);
+}
+
+// TODO: FXC doesn't accept this with (), but glslang doesn't accept it without.
+#define MATFNS() \
+ all(inF0); \
+ abs(inF0); \
+ acos(inF0); \
+ any(inF0); \
+ asin(inF0); \
+ atan(inF0); \
+ atan2(inF0, inF1); \
+ ceil(inF0); \
+ clip(inF0); \
+ clamp(inF0, inF1, inF2); \
+ cos(inF0); \
+ cosh(inF0); \
+ ddx(inF0); \
+ ddx_coarse(inF0); \
+ ddx_fine(inF0); \
+ ddy(inF0); \
+ ddy_coarse(inF0); \
+ ddy_fine(inF0); \
+ degrees(inF0); \
+ determinant(inF0); \
+ exp(inF0); \
+ exp2(inF0); \
+ firstbithigh(7); \
+ firstbitlow(7); \
+ floor(inF0); \
+ fmod(inF0, inF1); \
+ frac(inF0); \
+ frexp(inF0, inF1); \
+ fwidth(inF0); \
+ ldexp(inF0, inF1); \
+ log(inF0); \
+ log10(inF0); \
+ log2(inF0); \
+ max(inF0, inF1); \
+ min(inF0, inF1); \
+ pow(inF0, inF1); \
+ radians(inF0); \
+ round(inF0); \
+ rsqrt(inF0); \
+ saturate(inF0); \
+ sign(inF0); \
+ sin(inF0); \
+ sincos(inF0, inF1, inF2); \
+ sinh(inF0); \
+ smoothstep(inF0, inF1, inF2); \
+ sqrt(inF0); \
+ step(inF0, inF1); \
+ tan(inF0); \
+ tanh(inF0); \
+ transpose(inF0); \
+ trunc(inF0);
+
+// TODO: turn on non-square matrix tests when protos are available.
+
+float2x2 PixelShaderFunction(float2x2 inF0, float2x2 inF1, float2x2 inF2)
+{
+ // TODO: FXC doesn't accept this with (), but glslang doesn't accept it without.
+ MATFNS()
+
+ // TODO: ... add when float1 prototypes are generated
+ return float2x2(2,2,2,2);
+}
+
+float3x3 PixelShaderFunction(float3x3 inF0, float3x3 inF1, float3x3 inF2)
+{
+ // TODO: FXC doesn't accept this with (), but glslang doesn't accept it without.
+ MATFNS()
+
+ // TODO: ... add when float1 prototypes are generated
+ return float3x3(3,3,3,3,3,3,3,3,3);
+}
+
+float4x4 PixelShaderFunction(float4x4 inF0, float4x4 inF1, float4x4 inF2)
+{
+ // TODO: FXC doesn't accept this with (), but glslang doesn't accept it without.
+ MATFNS()
+
+ // TODO: ... add when float1 prototypes are generated
+ return float4x4(4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4);
+}
+
+#define TESTGENMUL(ST, VT, MT) \
+ ST r0 = mul(inF0, inF1); \
+ VT r1 = mul(inFV0, inF0); \
+ VT r2 = mul(inF0, inFV0); \
+ ST r3 = mul(inFV0, inFV1); \
+ VT r4 = mul(inFM0, inFV0); \
+ VT r5 = mul(inFV0, inFM0); \
+ MT r6 = mul(inFM0, inF0); \
+ MT r7 = mul(inF0, inFM0); \
+ MT r8 = mul(inFM0, inFM1);
+
+
+void TestGenMul(float inF0, float inF1,
+ float2 inFV0, float2 inFV1,
+ float2x2 inFM0, float2x2 inFM1)
+{
+ TESTGENMUL(float, float2, float2x2);
+}
+
+void TestGenMul(float inF0, float inF1,
+ float3 inFV0, float3 inFV1,
+ float3x3 inFM0, float3x3 inFM1)
+{
+ TESTGENMUL(float, float3, float3x3);
+}
+
+void TestGenMul(float inF0, float inF1,
+ float4 inFV0, float4 inFV1,
+ float4x4 inFM0, float4x4 inFM1)
+{
+ TESTGENMUL(float, float4, float4x4);
+}
diff --git a/chromium/third_party/glslang/src/Test/hlsl.intrinsics.negative.frag b/chromium/third_party/glslang/src/Test/hlsl.intrinsics.negative.frag
new file mode 100644
index 00000000000..b93f104d3db
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/hlsl.intrinsics.negative.frag
@@ -0,0 +1,137 @@
+float PixelShaderFunction(float inF0, float inF1, float inF2, int inI0)
+{
+ // AllMemoryBarrier(); // TODO: expected error: invalid in fragment stage
+ // AllMemoryBarrierWithGroupSync(); // TODO: expected error: invalid in fragment stage
+ asdouble(inF0, inF1); // expected error: only integer inputs
+ CheckAccessFullyMapped(3.0); // expected error: only valid on integers
+ countbits(inF0); // expected error: only integer inputs
+ cross(inF0, inF1); // expected error: only on float3 inputs
+ D3DCOLORtoUBYTE4(inF0); // expected error: only on float4 inputs
+ determinant(inF0); // expected error: only valid on mats
+ // DeviceMemoryBarrierWithGroupSync(); // TODO: expected error: only valid in compute stage
+ f16tof32(inF0); // expected error: only integer inputs
+ firstbithigh(inF0); // expected error: only integer inputs
+ firstbitlow(inF0); // expected error: only integer inputs
+ fma(inF0, inF1, inF2); // expected error: only double inputs
+ // InterlockedAdd(inI0, inI0, 3); // expected error: last parameter is out TODO: accepted even though marked as out in proto generator
+ // InterlockedAnd(inI0, inI0, 3); // expected error: last parameter is out TODO: accepted even though marked as out i // InterlockedMax(inI0, inI0, 3); // expected error: last parameter is out TODO: accepted even though marked as out in proto generator
+ // InterlockedMin(inI0, inI0, 3); // expected error: last parameter is out TODO: accepted even though marked as out in proto generator
+ // InterlockedOor(inI0, inI0, 3); // expected error: last parameter is out TODO: accepted even though marked as out in proto generator
+ // InterlockedXor(inI0, inI0, 3); // expected error: last parameter is out TODO: accepted even though marked as out in proto generator
+ // GroupMemoryBarrier(); // TODO: expected error: invalid in fragment stage
+ // GroupMemoryBarrierWithGroupSync(); // TODO: expected error: invalid in fragment stage
+ length(inF0); // expected error: invalid on scalars
+ msad4(inF0, float2(0), float4(0)); // expected error: only integer inputs
+ normalize(inF0); // expected error: invalid on scalars
+ reflect(inF0, inF1); // expected error: invalid on scalars
+ refract(inF0, inF1, inF2); // expected error: invalid on scalars
+ refract(float2(0), float2(0), float2(0)); // expected error: last parameter only scalar
+ reversebits(inF0); // expected error: only integer inputs
+ transpose(inF0); // expected error: only valid on mats
+
+ return 0.0;
+}
+
+float1 PixelShaderFunction(float1 inF0, float1 inF1, float1 inF2, int1 inI0)
+{
+ // TODO: ... add when float1 prototypes are generated
+
+ GetRenderTargetSamplePosition(inF0); // expected error: only integer inputs
+
+ return 0.0;
+}
+
+float2 PixelShaderFunction(float2 inF0, float2 inF1, float2 inF2, int2 inI0)
+{
+ asdouble(inF0, inF1); // expected error: only integer inputs
+ CheckAccessFullyMapped(inF0); // expected error: only valid on scalars
+ countbits(inF0); // expected error: only integer inputs
+ cross(inF0, inF1); // expected error: only on float3 inputs
+ D3DCOLORtoUBYTE4(inF0); // expected error: only on float4 inputs
+ determinant(inF0); // expected error: only valid on mats
+ f16tof32(inF0); // expected error: only integer inputs
+ firstbithigh(inF0); // expected error: only integer inputs
+ firstbitlow(inF0); // expected error: only integer inputs
+ fma(inF0, inF1, inF2); // expected error: only double inputs
+ reversebits(inF0); // expected error: only integer inputs
+ transpose(inF0); // expected error: only valid on mats
+
+ return float2(1,2);
+}
+
+float3 PixelShaderFunction(float3 inF0, float3 inF1, float3 inF2, int3 inI0)
+{
+ CheckAccessFullyMapped(inF0); // expected error: only valid on scalars
+ countbits(inF0); // expected error: only integer inputs
+ D3DCOLORtoUBYTE4(inF0); // expected error: only on float4 inputs
+ determinant(inF0); // expected error: only valid on mats
+ f16tof32(inF0); // expected error: only integer inputs
+ firstbithigh(inF0); // expected error: only integer inputs
+ firstbitlow(inF0); // expected error: only integer inputs
+ fma(inF0, inF1, inF2); // expected error: only double inputs
+ reversebits(inF0); // expected error: only integer inputs
+ transpose(inF0); // expected error: only valid on mats
+
+
+ return float3(1,2,3);
+}
+
+float4 PixelShaderFunction(float4 inF0, float4 inF1, float4 inF2, int4 inI0)
+{
+ CheckAccessFullyMapped(inF0); // expected error: only valid on scalars
+ countbits(inF0); // expected error: only integer inputs
+ cross(inF0, inF1); // expected error: only on float3 inputs
+ determinant(inF0); // expected error: only valid on mats
+ f16tof32(inF0); // expected error: only integer inputs
+ firstbithigh(inF0); // expected error: only integer inputs
+ firstbitlow(inF0); // expected error: only integer inputs
+ fma(inF0, inF1, inF2); // expected error: only double inputs
+ reversebits(inF0); // expected error: only integer inputs
+ transpose(inF0); // expected error: only valid on mats
+
+ return float4(1,2,3,4);
+}
+
+// TODO: FXC doesn't accept this with (), but glslang doesn't accept it without.
+#define MATFNS() \
+ countbits(inF0); \
+ D3DCOLORtoUBYTE4(inF0); \
+ cross(inF0, inF1); \
+ f16tof32(inF0); \
+ firstbithigh(inF0); \
+ firstbitlow(inF0); \
+ fma(inF0, inF1, inF2); \
+ reversebits(inF0); \
+ length(inF0); \
+ noise(inF0); \
+ normalize(inF0); \
+ reflect(inF0, inF1); \
+ refract(inF0, inF1, 1.0); \
+ reversebits(inF0); \
+
+
+// TODO: turn on non-square matrix tests when protos are available.
+
+float2x2 PixelShaderFunction(float2x2 inF0, float2x2 inF1, float2x2 inF2)
+{
+ // TODO: FXC doesn't accept this with (), but glslang doesn't accept it without.
+ MATFNS()
+
+ return float2x2(2,2,2,2);
+}
+
+float3x3 PixelShaderFunction(float3x3 inF0, float3x3 inF1, float3x3 inF2)
+{
+ // TODO: FXC doesn't accept this with (), but glslang doesn't accept it without.
+ MATFNS()
+
+ return float3x3(3,3,3,3,3,3,3,3,3);
+}
+
+float4x4 PixelShaderFunction(float4x4 inF0, float4x4 inF1, float4x4 inF2)
+{
+ // TODO: FXC doesn't accept this with (), but glslang doesn't accept it without.
+ MATFNS()
+
+ return float4x4(4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4);
+}
diff --git a/chromium/third_party/glslang/src/Test/hlsl.intrinsics.negative.vert b/chromium/third_party/glslang/src/Test/hlsl.intrinsics.negative.vert
new file mode 100644
index 00000000000..ee2a29d54e0
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/hlsl.intrinsics.negative.vert
@@ -0,0 +1,196 @@
+float VertexShaderFunction(float inF0, float inF1, float inF2, int inI0)
+{
+ // AllMemoryBarrier(); // invalid in fragment stage TODO: parser currently crashes on empty arg list
+ // AllMemoryBarrierWithGroupSync(); // invalid in fragment stage TODO: parser currently crashes on empty arg list
+ asdouble(inF0, inF1); // expected error: only integer inputs
+ CheckAccessFullyMapped(3.0); // expected error: only valid on integers
+ CheckAccessFullyMapped(3); // expected error: only valid in pixel & compute stages
+ clip(inF0); // expected error: only valid in pixel & compute stages
+ countbits(inF0); // expected error: only integer inputs
+ cross(inF0, inF1); // expected error: only on float3 inputs
+ D3DCOLORtoUBYTE4(inF0); // expected error: only on float4 inputs
+ // DeviceMemoryBarrier(); // TODO: expected error: only valid in pixel & compute stages
+ // DeviceMemoryBarrierWithGroupSync(); // TODO: expected error: only valid in compute stage
+ ddx(inF0); // expected error: only valid in pixel & compute stages
+ ddx_coarse(inF0); // expected error: only valid in pixel & compute stages
+ ddx_fine(inF0); // expected error: only valid in pixel & compute stages
+ ddy(inF0); // expected error: only valid in pixel & compute stages
+ ddy_coarse(inF0); // expected error: only valid in pixel & compute stages
+ ddy_fine(inF0); // expected error: only valid in pixel & compute stages
+ determinant(inF0); // expected error: only valid on mats
+ EvaluateAttributeAtCentroid(inF0); // expected error: only valid in pixel stage
+ EvaluateAttributeAtSample(inF0, 2); // expected error: only valid in pixel stage
+ EvaluateAttributeSnapped(inF0, int2(2)); // expected error: only valid in pixel stage
+ f16tof32(inF0); // expected error: only integer inputs
+ firstbithigh(inF0); // expected error: only integer inputs
+ firstbitlow(inF0); // expected error: only integer inputs
+ fma(inF0, inF1, inF2); // expected error: only double inputs
+ // InterlockedAdd(inI0, inI0, 3); // expected error: last parameter is out TODO: accepted even though marked as out in proto generator
+ // InterlockedAnd(inI0, inI0, 3); // expected error: last parameter is out TODO: accepted even though marked as out i // InterlockedMax(inI0, inI0, 3); // expected error: last parameter is out TODO: accepted even though marked as out in proto generator
+ // InterlockedMin(inI0, inI0, 3); // expected error: last parameter is out TODO: accepted even though marked as out in proto generator
+ // InterlockedOor(inI0, inI0, 3); // expected error: last parameter is out TODO: accepted even though marked as out in proto generator
+ // InterlockedXor(inI0, inI0, 3); // expected error: last parameter is out TODO: accepted even though marked as out in proto generator
+ // GroupMemoryBarrier(); // TODO: expected error: only valid in compute stage
+ // GroupMemoryBarrierWithGroupSync(); // TODO: expected error: only valid in compute stage
+ length(inF0); // expect error: invalid on scalars
+ msad4(inF0, float2(0), float4(0)); // expected error: only integer inputs
+ normalize(inF0); // expect error: invalid on scalars
+ reflect(inF0, inF1); // expect error: invalid on scalars
+ refract(inF0, inF1, inF2); // expect error: invalid on scalars
+ refract(float2(0), float2(0), float2(0)); // expected error: last parameter only scalar
+ reversebits(inF0); // expected error: only integer inputs
+ transpose(inF0); // expect error: only valid on mats
+
+ // TODO: texture intrinsics, when we can declare samplers.
+
+ return 0.0;
+}
+
+float1 VertexShaderFunction(float1 inF0, float1 inF1, float1 inF2, int1 inI0)
+{
+ // TODO: ... add when float1 prototypes are generated
+
+ GetRenderTargetSamplePosition(inF0); // expected error: only integer inputs
+
+ return 0.0;
+}
+
+float2 VertexShaderFunction(float2 inF0, float2 inF1, float2 inF2, int2 inI0)
+{
+ asdouble(inF0, inF1); // expected error: only integer inputs
+ CheckAccessFullyMapped(inF0); // expect error: only valid on scalars
+ countbits(inF0); // expected error: only integer inputs
+ cross(inF0, inF1); // expected error: only on float3 inputs
+ D3DCOLORtoUBYTE4(inF0); // expected error: only on float4 inputs
+ ddx(inF0); // only valid in pixel & compute stages
+ ddx_coarse(inF0); // only valid in pixel & compute stages
+ ddx_fine(inF0); // only valid in pixel & compute stages
+ ddy(inF0); // only valid in pixel & compute stages
+ ddy_coarse(inF0); // only valid in pixel & compute stages
+ ddy_fine(inF0); // only valid in pixel & compute stages
+ determinant(inF0); // expect error: only valid on mats
+ EvaluateAttributeAtCentroid(inF0); // expected error: only valid in pixel stage
+ EvaluateAttributeAtSample(inF0, 2); // expected error: only valid in pixel stage
+ EvaluateAttributeSnapped(inF0, int2(2)); // expected error: only valid in pixel stage
+ f16tof32(inF0); // expected error: only integer inputs
+ firstbithigh(inF0); // expected error: only integer inputs
+ firstbitlow(inF0); // expected error: only integer inputs
+ fma(inF0, inF1, inF2); // expected error: only double inputs
+ noise(inF0); // expected error: only valid in pixel stage
+ reversebits(inF0); // expected error: only integer inputs
+ transpose(inF0); // expect error: only valid on mats
+
+ // TODO: texture intrinsics, when we can declare samplers.
+
+ return float2(1,2);
+}
+
+float3 VertexShaderFunction(float3 inF0, float3 inF1, float3 inF2, int3 inI0)
+{
+ CheckAccessFullyMapped(inF0); // expect error: only valid on scalars
+ countbits(inF0); // expected error: only integer inputs
+ ddx(inF0); // only valid in pixel & compute stages
+ ddx_coarse(inF0); // only valid in pixel & compute stages
+ ddx_fine(inF0); // only valid in pixel & compute stages
+ ddy(inF0); // only valid in pixel & compute stages
+ ddy_coarse(inF0); // only valid in pixel & compute stages
+ ddy_fine(inF0); // only valid in pixel & compute stages
+ D3DCOLORtoUBYTE4(inF0); // expected error: only on float4 inputs
+ determinant(inF0); // expect error: only valid on mats
+ EvaluateAttributeAtCentroid(inF0); // expected error: only valid in pixel stage
+ EvaluateAttributeAtSample(inF0, 2); // expected error: only valid in pixel stage
+ EvaluateAttributeSnapped(inF0, int2(2)); // expected error: only valid in pixel stage
+ f16tof32(inF0); // expected error: only integer inputs
+ firstbithigh(inF0); // expected error: only integer inputs
+ firstbitlow(inF0); // expected error: only integer inputs
+ fma(inF0, inF1, inF2); // expected error: only double inputs
+ noise(inF0); // expected error: only valid in pixel stage
+ reversebits(inF0); // expected error: only integer inputs
+ transpose(inF0); // expect error: only valid on mats
+
+ // TODO: texture intrinsics, when we can declare samplers.
+
+ return float3(1,2,3);
+}
+
+float4 VertexShaderFunction(float4 inF0, float4 inF1, float4 inF2, int4 inI0)
+{
+ CheckAccessFullyMapped(inF0); // expect error: only valid on scalars
+ countbits(inF0); // expected error: only integer inputs
+ cross(inF0, inF1); // expected error: only on float3 inputs
+ determinant(inF0); // expect error: only valid on mats
+ ddx(inF0); // only valid in pixel & compute stages
+ ddx_coarse(inF0); // only valid in pixel & compute stages
+ ddx_fine(inF0); // only valid in pixel & compute stages
+ ddy(inF0); // only valid in pixel & compute stages
+ ddy_coarse(inF0); // only valid in pixel & compute stages
+ ddy_fine(inF0); // only valid in pixel & compute stages
+ EvaluateAttributeAtCentroid(inF0); // expected error: only valid in pixel stage
+ EvaluateAttributeAtSample(inF0, 2); // expected error: only valid in pixel stage
+ EvaluateAttributeSnapped(inF0, int2(2)); // expected error: only valid in pixel stage
+ f16tof32(inF0); // expected error: only integer inputs
+ firstbithigh(inF0); // expected error: only integer inputs
+ firstbitlow(inF0); // expected error: only integer inputs
+ fma(inF0, inF1, inF2); // expected error: only double inputs
+ noise(inF0); // expected error: only valid in pixel stage
+ reversebits(inF0); // expected error: only integer inputs
+ transpose(inF0); // expect error: only valid on mats
+
+ // TODO: texture intrinsics, when we can declare samplers.
+
+ return float4(1,2,3,4);
+}
+
+// TODO: FXC doesn't accept this with (), but glslang doesn't accept it without.
+#define MATFNS() \
+ countbits(inF0); \
+ cross(inF0, inF1); \
+ D3DCOLORtoUBYTE4(inF0); \
+ ddx(inF0); \
+ ddx_coarse(inF0); \
+ ddx_fine(inF0); \
+ ddy(inF0); \
+ ddy_coarse(inF0); \
+ ddy_fine(inF0); \
+ EvaluateAttributeAtCentroid(inF0); \
+ EvaluateAttributeAtSample(inF0, 2); \
+ EvaluateAttributeSnapped(inF0, int2(2)); \
+ f16tof32(inF0); \
+ firstbithigh(inF0); \
+ firstbitlow(inF0); \
+ fma(inF0, inF1, inF2); \
+ noise(inF0); \
+ reversebits(inF0); \
+ length(inF0); \
+ noise(inF0); \
+ normalize(inF0); \
+ reflect(inF0, inF1); \
+ refract(inF0, inF1, 1.0); \
+ reversebits(inF0); \
+
+
+// TODO: turn on non-square matrix tests when protos are available.
+
+float2x2 VertexShaderFunction(float2x2 inF0, float2x2 inF1, float2x2 inF2)
+{
+ // TODO: FXC doesn't accept this with (), but glslang doesn't accept it without.
+ MATFNS()
+
+ return float2x2(2,2,2,2);
+}
+
+float3x3 VertexShaderFunction(float3x3 inF0, float3x3 inF1, float3x3 inF2)
+{
+ // TODO: FXC doesn't accept this with (), but glslang doesn't accept it without.
+ MATFNS()
+
+ return float3x3(3,3,3,3,3,3,3,3,3);
+}
+
+float4x4 VertexShaderFunction(float4x4 inF0, float4x4 inF1, float4x4 inF2)
+{
+ // TODO: FXC doesn't accept this with (), but glslang doesn't accept it without.
+ MATFNS()
+
+ return float4x4(4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4);
+}
diff --git a/chromium/third_party/glslang/src/Test/hlsl.intrinsics.vert b/chromium/third_party/glslang/src/Test/hlsl.intrinsics.vert
new file mode 100644
index 00000000000..cab79a83490
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/hlsl.intrinsics.vert
@@ -0,0 +1,372 @@
+float VertexShaderFunction(float inF0, float inF1, float inF2)
+{
+ all(inF0);
+ abs(inF0);
+ acos(inF0);
+ any(inF0);
+ asin(inF0);
+ atan(inF0);
+ atan2(inF0, inF1);
+ ceil(inF0);
+ clamp(inF0, inF1, inF2);
+ cos(inF0);
+ cosh(inF0);
+ countbits(7);
+ degrees(inF0);
+ // EvaluateAttributeAtCentroid(inF0);
+ // EvaluateAttributeAtSample(inF0, 0);
+ // TODO: EvaluateAttributeSnapped(inF0, int2(1,2));
+ exp(inF0);
+ exp2(inF0);
+ firstbithigh(7);
+ firstbitlow(7);
+ floor(inF0);
+ // TODO: fma(inD0, inD1, inD2);
+ fmod(inF0, inF1);
+ frac(inF0);
+ frexp(inF0, inF1);
+ fwidth(inF0);
+ isinf(inF0);
+ isnan(inF0);
+ ldexp(inF0, inF1);
+ log(inF0);
+ log10(inF0);
+ log2(inF0);
+ max(inF0, inF1);
+ min(inF0, inF1);
+ // TODO: mul(inF0, inF1);
+ pow(inF0, inF1);
+ radians(inF0);
+ reversebits(2);
+ round(inF0);
+ rsqrt(inF0);
+ saturate(inF0);
+ sign(inF0);
+ sin(inF0);
+ sincos(inF0, inF1, inF2);
+ sinh(inF0);
+ smoothstep(inF0, inF1, inF2);
+ sqrt(inF0);
+ step(inF0, inF1);
+ tan(inF0);
+ tanh(inF0);
+ // TODO: sampler intrinsics, when we can declare the types.
+ trunc(inF0);
+
+ return 0.0;
+}
+
+float1 VertexShaderFunction(float1 inF0, float1 inF1, float1 inF2)
+{
+ // TODO: ... add when float1 prototypes are generated
+ return 0.0;
+}
+
+float2 VertexShaderFunction(float2 inF0, float2 inF1, float2 inF2)
+{
+ all(inF0);
+ abs(inF0);
+ acos(inF0);
+ any(inF0);
+ asin(inF0);
+ atan(inF0);
+ atan2(inF0, inF1);
+ ceil(inF0);
+ clamp(inF0, inF1, inF2);
+ cos(inF0);
+ cosh(inF0);
+ countbits(int2(7,3));
+ degrees(inF0);
+ distance(inF0, inF1);
+ dot(inF0, inF1);
+ // EvaluateAttributeAtCentroid(inF0);
+ // EvaluateAttributeAtSample(inF0, 0);
+ // TODO: EvaluateAttributeSnapped(inF0, int2(1,2));
+ exp(inF0);
+ exp2(inF0);
+ faceforward(inF0, inF1, inF2);
+ firstbithigh(7);
+ firstbitlow(7);
+ floor(inF0);
+ // TODO: fma(inD0, inD1, inD2);
+ fmod(inF0, inF1);
+ frac(inF0);
+ frexp(inF0, inF1);
+ fwidth(inF0);
+ isinf(inF0);
+ isnan(inF0);
+ ldexp(inF0, inF1);
+ length(inF0);
+ log(inF0);
+ log10(inF0);
+ log2(inF0);
+ max(inF0, inF1);
+ min(inF0, inF1);
+ // TODO: mul(inF0, inF1);
+ normalize(inF0);
+ pow(inF0, inF1);
+ radians(inF0);
+ reflect(inF0, inF1);
+ refract(inF0, inF1, 2.0);
+ reversebits(int2(1,2));
+ round(inF0);
+ rsqrt(inF0);
+ saturate(inF0);
+ sign(inF0);
+ sin(inF0);
+ sincos(inF0, inF1, inF2);
+ sinh(inF0);
+ smoothstep(inF0, inF1, inF2);
+ sqrt(inF0);
+ step(inF0, inF1);
+ tan(inF0);
+ tanh(inF0);
+ // TODO: sampler intrinsics, when we can declare the types.
+ trunc(inF0);
+
+ // TODO: ... add when float1 prototypes are generated
+ return float2(1,2);
+}
+
+float3 VertexShaderFunction(float3 inF0, float3 inF1, float3 inF2)
+{
+ all(inF0);
+ abs(inF0);
+ acos(inF0);
+ any(inF0);
+ asin(inF0);
+ atan(inF0);
+ atan2(inF0, inF1);
+ ceil(inF0);
+ clamp(inF0, inF1, inF2);
+ cos(inF0);
+ cosh(inF0);
+ countbits(int3(7,3,5));
+ cross(inF0, inF1);
+ degrees(inF0);
+ distance(inF0, inF1);
+ dot(inF0, inF1);
+ // EvaluateAttributeAtCentroid(inF0);
+ // EvaluateAttributeAtSample(inF0, 0);
+ // TODO: EvaluateAttributeSnapped(inF0, int2(1,2));
+ exp(inF0);
+ exp2(inF0);
+ faceforward(inF0, inF1, inF2);
+ firstbithigh(7);
+ firstbitlow(7);
+ floor(inF0);
+ // TODO: fma(inD0, inD1, inD2);
+ fmod(inF0, inF1);
+ frac(inF0);
+ frexp(inF0, inF1);
+ fwidth(inF0);
+ isinf(inF0);
+ isnan(inF0);
+ ldexp(inF0, inF1);
+ length(inF0);
+ log(inF0);
+ log10(inF0);
+ log2(inF0);
+ max(inF0, inF1);
+ min(inF0, inF1);
+ // TODO: mul(inF0, inF1);
+ normalize(inF0);
+ pow(inF0, inF1);
+ radians(inF0);
+ reflect(inF0, inF1);
+ refract(inF0, inF1, 2.0);
+ reversebits(int3(1,2,3));
+ round(inF0);
+ rsqrt(inF0);
+ saturate(inF0);
+ sign(inF0);
+ sin(inF0);
+ sincos(inF0, inF1, inF2);
+ sinh(inF0);
+ smoothstep(inF0, inF1, inF2);
+ sqrt(inF0);
+ step(inF0, inF1);
+ tan(inF0);
+ tanh(inF0);
+ // TODO: sampler intrinsics, when we can declare the types.
+ trunc(inF0);
+
+ // TODO: ... add when float1 prototypes are generated
+ return float3(1,2,3);
+}
+
+float4 VertexShaderFunction(float4 inF0, float4 inF1, float4 inF2)
+{
+ all(inF0);
+ abs(inF0);
+ acos(inF0);
+ any(inF0);
+ asin(inF0);
+ atan(inF0);
+ atan2(inF0, inF1);
+ ceil(inF0);
+ clamp(inF0, inF1, inF2);
+ cos(inF0);
+ cosh(inF0);
+ countbits(int4(7,3,5,2));
+ degrees(inF0);
+ distance(inF0, inF1);
+ dot(inF0, inF1);
+ dst(inF0, inF1);
+ // EvaluateAttributeAtCentroid(inF0);
+ // EvaluateAttributeAtSample(inF0, 0);
+ // TODO: EvaluateAttributeSnapped(inF0, int2(1,2));
+ exp(inF0);
+ exp2(inF0);
+ faceforward(inF0, inF1, inF2);
+ firstbithigh(7);
+ firstbitlow(7);
+ floor(inF0);
+ // TODO: fma(inD0, inD1, inD2);
+ fmod(inF0, inF1);
+ frac(inF0);
+ frexp(inF0, inF1);
+ fwidth(inF0);
+ isinf(inF0);
+ isnan(inF0);
+ ldexp(inF0, inF1);
+ length(inF0);
+ log(inF0);
+ log10(inF0);
+ log2(inF0);
+ max(inF0, inF1);
+ min(inF0, inF1);
+ // TODO: mul(inF0, inF1);
+ normalize(inF0);
+ pow(inF0, inF1);
+ radians(inF0);
+ reflect(inF0, inF1);
+ refract(inF0, inF1, 2.0);
+ reversebits(int4(1,2,3,4));
+ round(inF0);
+ rsqrt(inF0);
+ saturate(inF0);
+ sign(inF0);
+ sin(inF0);
+ sincos(inF0, inF1, inF2);
+ sinh(inF0);
+ smoothstep(inF0, inF1, inF2);
+ sqrt(inF0);
+ step(inF0, inF1);
+ tan(inF0);
+ tanh(inF0);
+ // TODO: sampler intrinsics, when we can declare the types.
+ trunc(inF0);
+
+ // TODO: ... add when float1 prototypes are generated
+ return float4(1,2,3,4);
+}
+
+// TODO: FXC doesn't accept this with (), but glslang doesn't accept it without.
+#define MATFNS() \
+ all(inF0); \
+ abs(inF0); \
+ acos(inF0); \
+ any(inF0); \
+ asin(inF0); \
+ atan(inF0); \
+ atan2(inF0, inF1); \
+ ceil(inF0); \
+ clamp(inF0, inF1, inF2); \
+ cos(inF0); \
+ cosh(inF0); \
+ degrees(inF0); \
+ determinant(inF0); \
+ exp(inF0); \
+ exp2(inF0); \
+ firstbithigh(7); \
+ firstbitlow(7); \
+ floor(inF0); \
+ fmod(inF0, inF1); \
+ frac(inF0); \
+ frexp(inF0, inF1); \
+ fwidth(inF0); \
+ ldexp(inF0, inF1); \
+ log(inF0); \
+ log10(inF0); \
+ log2(inF0); \
+ max(inF0, inF1); \
+ min(inF0, inF1); \
+ pow(inF0, inF1); \
+ radians(inF0); \
+ round(inF0); \
+ rsqrt(inF0); \
+ saturate(inF0); \
+ sign(inF0); \
+ sin(inF0); \
+ sincos(inF0, inF1, inF2); \
+ sinh(inF0); \
+ smoothstep(inF0, inF1, inF2); \
+ sqrt(inF0); \
+ step(inF0, inF1); \
+ tan(inF0); \
+ tanh(inF0); \
+ transpose(inF0); \
+ trunc(inF0);
+
+// TODO: turn on non-square matrix tests when protos are available.
+
+float2x2 VertexShaderFunction(float2x2 inF0, float2x2 inF1, float2x2 inF2)
+{
+ // TODO: FXC doesn't accept this with (), but glslang doesn't accept it without.
+ MATFNS();
+
+ // TODO: ... add when float1 prototypes are generated
+ return float2x2(2,2,2,2);
+}
+
+float3x3 VertexShaderFunction(float3x3 inF0, float3x3 inF1, float3x3 inF2)
+{
+ // TODO: FXC doesn't accept this with (), but glslang doesn't accept it without.
+ MATFNS();
+
+ // TODO: ... add when float1 prototypes are generated
+ return float3x3(3,3,3,3,3,3,3,3,3);
+}
+
+float4x4 VertexShaderFunction(float4x4 inF0, float4x4 inF1, float4x4 inF2)
+{
+ // TODO: FXC doesn't accept this with (), but glslang doesn't accept it without.
+ MATFNS();
+
+ // TODO: ... add when float1 prototypes are generated
+ return float4x4(4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4);
+}
+
+#define TESTGENMUL(ST, VT, MT) \
+ ST r0 = mul(inF0, inF1); \
+ VT r1 = mul(inFV0, inF0); \
+ VT r2 = mul(inF0, inFV0); \
+ ST r3 = mul(inFV0, inFV1); \
+ VT r4 = mul(inFM0, inFV0); \
+ VT r5 = mul(inFV0, inFM0); \
+ MT r6 = mul(inFM0, inF0); \
+ MT r7 = mul(inF0, inFM0); \
+ MT r8 = mul(inFM0, inFM1);
+
+
+void TestGenMul(float inF0, float inF1,
+ float2 inFV0, float2 inFV1,
+ float2x2 inFM0, float2x2 inFM1)
+{
+ TESTGENMUL(float, float2, float2x2);
+}
+
+void TestGenMul(float inF0, float inF1,
+ float3 inFV0, float3 inFV1,
+ float3x3 inFM0, float3x3 inFM1)
+{
+ TESTGENMUL(float, float3, float3x3);
+}
+
+void TestGenMul(float inF0, float inF1,
+ float4 inFV0, float4 inFV1,
+ float4x4 inFM0, float4x4 inFM1)
+{
+ TESTGENMUL(float, float4, float4x4);
+}
diff --git a/chromium/third_party/glslang/src/Test/hlsl.matType.frag b/chromium/third_party/glslang/src/Test/hlsl.matType.frag
new file mode 100644
index 00000000000..36d71e3bab3
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/hlsl.matType.frag
@@ -0,0 +1,10 @@
+float1 f1 = float1(1.0);
+float1x1 fmat11;
+float4x1 fmat41;
+float1x2 fmat12;
+double2x3 dmat23;
+int4x4 int44;
+
+float1 ShaderFunction(float1 inFloat1, float inScalar) : COLOR0
+{
+}
diff --git a/chromium/third_party/glslang/src/Test/hlsl.max.frag b/chromium/third_party/glslang/src/Test/hlsl.max.frag
new file mode 100644
index 00000000000..6d1ea0b1291
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/hlsl.max.frag
@@ -0,0 +1,4 @@
+float4 PixelShaderFunction(float4 input1, float4 input2) : COLOR0
+{
+ return max(input1, input2);
+}
diff --git a/chromium/third_party/glslang/src/Test/hlsl.precedence.frag b/chromium/third_party/glslang/src/Test/hlsl.precedence.frag
new file mode 100644
index 00000000000..eae0435e074
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/hlsl.precedence.frag
@@ -0,0 +1,9 @@
+float4 PixelShaderFunction(
+ float4 a1,
+ float4 a2,
+ float4 a3,
+ float4 a4
+ ) : COLOR0
+{
+ return a1 + a2 * a3 + a4;
+}
diff --git a/chromium/third_party/glslang/src/Test/hlsl.precedence2.frag b/chromium/third_party/glslang/src/Test/hlsl.precedence2.frag
new file mode 100644
index 00000000000..0d3f583a819
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/hlsl.precedence2.frag
@@ -0,0 +1,9 @@
+int PixelShaderFunction(
+ int a1,
+ int a2,
+ int a3,
+ int a4
+ ) : COLOR0
+{
+ return (a1 * a2 + a3 << a4) + (a1 << a2 + a3 * a4);
+}
diff --git a/chromium/third_party/glslang/src/Test/hlsl.scope.frag b/chromium/third_party/glslang/src/Test/hlsl.scope.frag
new file mode 100644
index 00000000000..0d8cc1ad98d
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/hlsl.scope.frag
@@ -0,0 +1,30 @@
+float4 PixelShaderFunction(float4 input) : COLOR0
+{
+ int x;
+ x;
+ {
+ float x;
+ x;
+ {
+ bool x;
+ x;
+ {
+ float3 x;
+ x;
+ }
+ x;
+ }
+ x;
+ }
+ x;
+
+ if (x > 0)
+ bool x;
+
+ while (x > 0)
+ bool x;
+
+ do {
+ bool x;
+ } while (x > 0);
+}
diff --git a/chromium/third_party/glslang/src/Test/hlsl.sin.frag b/chromium/third_party/glslang/src/Test/hlsl.sin.frag
new file mode 100644
index 00000000000..edf087deb4e
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/hlsl.sin.frag
@@ -0,0 +1,4 @@
+float4 PixelShaderFunction(float4 input) : COLOR0
+{
+ return sin(input);
+}
diff --git a/chromium/third_party/glslang/src/Test/hlsl.struct.frag b/chromium/third_party/glslang/src/Test/hlsl.struct.frag
new file mode 100644
index 00000000000..aded037cc20
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/hlsl.struct.frag
@@ -0,0 +1,39 @@
+struct {
+};
+
+struct {
+ bool b;
+};
+
+struct myS {
+ bool b, c;
+ float4 a, d;
+};
+
+myS s1;
+
+struct {
+ float4 i;
+} s2;
+
+struct {
+ linear float4 a;
+ nointerpolation bool b;
+ noperspective centroid float1 c;
+ sample centroid float2 d;
+ bool ff1 : SV_IsFrontFace;
+ bool ff2 : packoffset(c0.y);
+ bool ff3 : packoffset(c0.y) : register(ps_5_0, s[0]) ;
+ float4 ff4 : VPOS : packoffset(c0.y) : register(ps_5_0, s[0]) <int bambam=30;> ;
+} s4;
+
+float4 PixelShaderFunction(float4 input) : COLOR0
+{
+ struct FS {
+ bool3 b3;
+ } s3;
+
+ s3 == s3;
+
+ return input;
+} \ No newline at end of file
diff --git a/chromium/third_party/glslang/src/Test/hlsl.void.frag b/chromium/third_party/glslang/src/Test/hlsl.void.frag
new file mode 100644
index 00000000000..9bf06b72652
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/hlsl.void.frag
@@ -0,0 +1,8 @@
+void foo1() {}
+void foo2(void) {}
+
+float4 PixelShaderFunction(float4 input) : COLOR0
+{
+ foo1();
+ foo2();
+} \ No newline at end of file
diff --git a/chromium/third_party/glslang/src/Test/hlsl.whileLoop.frag b/chromium/third_party/glslang/src/Test/hlsl.whileLoop.frag
new file mode 100644
index 00000000000..f282375ddd5
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/hlsl.whileLoop.frag
@@ -0,0 +1,7 @@
+float4 PixelShaderFunction(float4 input) : COLOR0
+{
+ while (input != input) { return input; }
+ while (false) ;
+ [unroll] while (false) { }
+ while ((false)) { }
+}
diff --git a/chromium/third_party/glslang/src/Test/length.frag b/chromium/third_party/glslang/src/Test/length.frag
new file mode 100644
index 00000000000..6520facdc81
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/length.frag
@@ -0,0 +1,18 @@
+#version 120
+
+uniform vec4 u[3];
+
+#ifdef TEST_POST_110
+varying vec2 v[];
+#else
+varying vec2 v[2];
+#endif
+
+void main()
+{
+ int a[5];
+
+ vec2 t = v[0] + v[1];
+
+ gl_FragColor = vec4(u.length() * v.length() * a.length());
+}
diff --git a/chromium/third_party/glslang/src/Test/lineContinuation.vert b/chromium/third_party/glslang/src/Test/lineContinuation.vert
new file mode 100644
index 00000000000..471f3a34227
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/lineContinuation.vert
@@ -0,0 +1,151 @@
+#version 300 es
+
+// this file cont\
+ains no errors other than the #error which are there to see if line numbering for errors is correct
+
+#error e1
+
+float f\
+oo; // same as 'float foo;'
+
+#error e2
+
+#define MAIN void main() \
+ { \
+gl_Position = vec4(foo); \
+}
+
+#error e3
+
+MAIN
+
+vec4 foo2(vec4 a)
+{
+ vec4 b = a; \
+ return b;
+}
+
+// aoeuntheo unatehutna \ antaehnathe
+// anteonuth $ natohe " '
+// anteonuth natohe
+
+#define FOO int /* \
+*/ goodDecl;
+
+FOO
+
+#define A int q1 = \ 1
+#define B int q2 = \1
+#define C int q3 = $ 1
+#define D int q4 = @ 1
+
+const highp int a1 = \ 4; // ERROR
+const highp int a2 = @ 3; // ERROR
+const highp int a3 = $4; // ERROR
+const highp int a4 = a2\; // ERROR
+
+A;
+B;
+C;
+D;
+
+# \
+
+# \
+ error good continuation
+
+#define AA1 a \ b
+#define AA2 a \\ b
+#define AA3 a \\\ b
+#define AA4 a \\\\ b
+
+// anoetuh nonaetu \\\\\\
+still in comment
+
+const int abdece = 10;
+const int aoeuntaoehu = abd\
+\
+\
+\
+\
+\
+ece;
+
+float funkyf = \
+.\
+1\
+2\
+3\
+e\
++\
+1\
+7\
+;\
+int funkyh\
+=\
+0\
+x\
+f\
+4\
+;
+int funkyo =\
+0\
+4\
+2\
+;
+int c = \
+11;
+int d = 1\
+2;
+
+#define FOOM(a,b) a + b
+
+#if FO\
+OM(2\
+,\
+3)
+int bar103 = 17;
+#endif
+
+// ERROR
+#if FOOM(2,
+3)
+int bar104 = 19;
+#endif
+
+// ERROR
+#if FOOM(
+2,3)
+int bar105 = 19;
+#endif
+
+int bar106 = FOOM(5,7);
+int bar107 = FOOM // okay
+ (
+ 2
+ ,
+ 3
+ )
+ ;
+
+void foo203209409()
+{
+ bar107 \
++= 37;
+ bar107 *\
+= 38;
+ bar107 /=\
+39;
+ bar107 +\
+41;
+}
+
+#define QUOTE "ab\
+cd"
+
+void foo230920394()
+{
+ // syntax error
+ bar107 +\
+ = 42;
+}
diff --git a/chromium/third_party/glslang/src/Test/lineContinuation100.vert b/chromium/third_party/glslang/src/Test/lineContinuation100.vert
new file mode 100644
index 00000000000..955be3f8d35
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/lineContinuation100.vert
@@ -0,0 +1,56 @@
+#version 100
+
+// non-line continuation comment \
+#error good error
+
+
+
+float f\
+oo; // same as 'float foo;'
+
+#error e2
+
+#define MAIN void main() \
+ { \
+gl_Position = vec4(foo); \
+}
+
+#error e3
+
+MAIN
+
+vec4 foo2(vec4 a)
+{
+ vec4 b = a; \
+ return b;
+}
+
+// aoeuntheo unatehutna \ antaehnathe
+// anteonuth $ natohe " '
+// anteonuth natohe
+/*@*/
+/* *@/*/
+//@
+
+#define A int q1 = \ 1
+#define B int q2 = \1
+#define C int q3 = $ 1
+#define D int q4 = @ 1
+
+const highp int a1 = \ 4; // ERROR
+const highp int a2 = @ 3; // ERROR
+const highp int a3 = $4; // ERROR
+const highp int a4 = a2\; // ERROR
+
+A;
+B;
+C;
+D;
+
+# \
+
+# \
+ error bad continuation
+
+#define QUOTE "ab\
+cd"
diff --git a/chromium/third_party/glslang/src/Test/link1.frag b/chromium/third_party/glslang/src/Test/link1.frag
new file mode 100644
index 00000000000..31676813c19
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/link1.frag
@@ -0,0 +1,38 @@
+#version 130
+
+uniform vec4 uv4;
+uniform vec3 glass;
+
+const int ci = 8;
+
+vec4 a = ci * uv4;
+
+in vec3 iv3;
+in vec4 cup;
+
+void main()
+{
+}
+
+vec4 b = ci * a;
+
+ivec2 foo(mat2 m)
+{
+ return ivec2(m[0]);
+}
+
+vec4 c = b * b;
+
+const vec3 cv3 = vec3(43.0, 0.34, 9.9);
+const vec3 cv3n = vec3(43.0, 0.34, 9.9);
+const vec3 cv3e = vec3(43.0, 0.34, 9.9);
+uniform mat2 um2 = mat2(4.0);
+uniform mat2 um2n = mat2(4.0);
+uniform mat2 um2e = mat2(4.0);
+struct S {
+ int a;
+ float b;
+};
+uniform S s = S(82, 3.9);
+uniform S sn;
+uniform S se = S(82, 3.9);
diff --git a/chromium/third_party/glslang/src/Test/link2.frag b/chromium/third_party/glslang/src/Test/link2.frag
new file mode 100644
index 00000000000..301c2717d34
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/link2.frag
@@ -0,0 +1,36 @@
+#version 130
+
+uniform vec4 uv4;
+uniform vec2 glass;
+
+const int ci = 8;
+
+vec4 d = ci * uv4;
+
+in vec3 iv3;
+flat in vec4 cup;
+
+vec4 e = ci * d;
+
+ivec2 foo()
+{
+ return ivec2(2);
+}
+
+vec4 f = e * e;
+
+const vec3 cv3 = vec3(43.0, 0.34, 9.9);
+const vec3 cv3e = vec3(43.0, 0.34, 2.9);
+uniform mat2 um2 = mat2(4.0);
+uniform mat2 um2n;
+uniform mat2 um2e = mat2(3.0);
+struct S {
+ int a;
+ float b;
+};
+uniform S s = S(82, 3.9);
+uniform S sn = S(82, 3.9);
+uniform S se = S(81, 3.9);
+
+#extension GL_OES_texture_3D : enable
+#extension GL_OES_standard_derivatives : enable
diff --git a/chromium/third_party/glslang/src/Test/link3.frag b/chromium/third_party/glslang/src/Test/link3.frag
new file mode 100644
index 00000000000..015ad35b2f3
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/link3.frag
@@ -0,0 +1,9 @@
+#version 300 es
+
+precision highp float;
+
+in vec2 iv3;
+
+#extension GL_OES_standard_derivatives : enable
+#extension GL_OES_EGL_image_external : require
+#extension GL_OES_texture_3D : enable
diff --git a/chromium/third_party/glslang/src/Test/localAggregates.frag b/chromium/third_party/glslang/src/Test/localAggregates.frag
new file mode 100644
index 00000000000..dbc9725b451
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/localAggregates.frag
@@ -0,0 +1,72 @@
+#version 130
+
+uniform sampler2D sampler;
+varying vec2 coord;
+varying vec4 color;
+
+struct s1 {
+ int i;
+ float f;
+};
+
+struct s2 {
+ int i;
+ float f;
+ s1 s1_1;
+ vec4 bleh;
+};
+
+struct s3 {
+ s2 s2_1;
+ int i;
+ float f;
+ s1 s1_1;
+};
+
+
+uniform s1 foo;
+uniform s2 foo2;
+uniform s3 foo3;
+
+uniform float[16] uFloatArray;
+uniform int condition;
+
+void main()
+{
+ s2 locals2;
+ s3 locals3;
+ float localFArray[16];
+ int localIArray[8];
+
+ locals2 = foo3.s2_1;
+
+ if (foo3.s2_1.i > 0) {
+ locals2.s1_1.f = 1.0;
+ localFArray[4] = coord.x;
+ localIArray[2] = foo3.s2_1.i;
+ } else {
+ locals2.s1_1.f = coord.x;
+ localFArray[4] = 1.0;
+ localIArray[2] = 0;
+ }
+
+ if (localIArray[2] == 0)
+ ++localFArray[4];
+
+ float localArray[16];
+ int x = 5;
+ localArray[x] = coord.x;
+
+ float[16] a;
+
+ for (int i = 0; i < 16; i++)
+ a[i] = 0.0;
+
+ if (condition == 1)
+ a = localArray;
+
+ locals2.bleh = color;
+ locals2.bleh.z = coord.y;
+
+ gl_FragColor = locals2.bleh * (localFArray[4] + locals2.s1_1.f + localArray[x] + a[x]) * texture2D(sampler, coord);
+}
diff --git a/chromium/third_party/glslang/src/Test/loops.frag b/chromium/third_party/glslang/src/Test/loops.frag
new file mode 100644
index 00000000000..44f13bcd803
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/loops.frag
@@ -0,0 +1,320 @@
+#version 130
+uniform vec4 bigColor;
+uniform vec4 bigColor1_1;
+uniform vec4 bigColor1_2;
+uniform vec4 bigColor1_3;
+uniform vec4 bigColor2;
+uniform vec4 bigColor3;
+uniform vec4 bigColor4;
+uniform vec4 bigColor5;
+uniform vec4 bigColor6;
+uniform vec4 bigColor7;
+uniform vec4 bigColor8;
+
+varying vec4 BaseColor;
+
+uniform float d;
+uniform float d2;
+uniform float d3;
+uniform float d4;
+uniform float d5;
+uniform float d6;
+uniform float d7;
+uniform float d8;
+uniform float d9;
+uniform float d10;
+uniform float d11;
+uniform float d12;
+uniform float d13;
+uniform float d14;
+uniform float d15;
+uniform float d16;
+uniform float d17;
+uniform float d18;
+uniform float d19;
+uniform float d20;
+uniform float d21;
+uniform float d22;
+uniform float d23;
+uniform float d24;
+uniform float d25;
+uniform float d26;
+uniform float d27;
+uniform float d28;
+uniform float d29;
+uniform float d30;
+uniform float d31;
+uniform float d32;
+uniform float d33;
+uniform float d34;
+
+uniform int Count;
+
+void main()
+{
+ vec4 color = BaseColor;
+
+ // Not a real loop
+ while (true) {
+ if (color.x < 0.33) {
+ color += vec4(0.33);
+ break;
+ }
+ if (color.x < 0.66) {
+ color += vec4(0.66);
+ break;
+ }
+
+ color += vec4(0.33);
+ break;
+ }
+
+ // While
+ while (color.x < d) {
+ color += bigColor;
+ }
+
+ // While (latchy)
+ while (color.z < d) {
+ color += bigColor1_1;
+ if (color.w < d)
+ continue;
+
+ color += bigColor1_1;
+ }
+
+ // While (constant)
+ while (color.x < 42.0) {
+ ++color;
+ }
+
+ // While (complicated-conditional)
+ while (color.w < d2 && color.y < d3) {
+ color += bigColor1_2;
+ }
+
+ // While (multi-exit)
+ while (color.z < d3) {
+ color += bigColor1_3;
+ if (color.y < d4)
+ break;
+ color += bigColor1_3;
+ }
+
+ // For (dynamic)
+ for (int i = 0; i < Count; ++i) {
+ color += bigColor2;
+ }
+
+ // Do while
+ do {
+ color += bigColor3;
+ } while (color.x < d2);
+
+ // For (static)
+ for (int i = 0; i < 42; ++i) {
+ color.z += d3;
+ }
+
+ // For (static) flow-control
+ for (int i = 0; i < 100; ++i) {
+ if (color.z < 20.0)
+ color.x++;
+ else
+ color.y++;
+ if (color.w < 20.0)
+ if (color.z > color.y)
+ 0; // do nothing
+ }
+
+ // For (static) flow-control with latch merge
+ for (int i = 0; i < 120; ++i) {
+ if (color.z < 20.0)
+ color.x++;
+ else
+ color.y++;
+ }
+
+ // For (static) latchy
+ for (int i = 0; i < 42; ++i) {
+ color.z += d3;
+ if (color.x < d4)
+ continue;
+ ++color.w;
+ }
+
+ // For (static) multi-exit
+ for (int i = 0; i < 42; ++i) {
+ color.z += d3;
+ if (color.x < d4)
+ break;
+ ++color.w;
+ }
+
+ // Latchy
+ do {
+ color += bigColor4;
+ if (color.x < d4)
+ continue;
+ if (color.y < d4)
+ color.y += d4;
+ else
+ color.x += d4;
+ } while (color.z < d4);
+
+ // Do while flow control
+ do {
+ color += bigColor5;
+ if (color.y < d5)
+ color.y += d5;
+ } while (color.x < d5);
+
+ // If then loop
+ if (color.x < d6) {
+ while (color.y < d6)
+ color += bigColor6;
+ } else {
+ while (color.z < d6)
+ color.z += bigColor6.z;
+ }
+
+ // If then multi-exit
+ if (color.x < d6) {
+ while (color.y < d6) {
+ color += bigColor6;
+ if (d7 < 1.0)
+ break;
+ }
+
+ } else {
+ while (color.z < d6)
+ color.z += bigColor6.z;
+ }
+
+
+ // Multi-exit
+ do {
+ if (d7 < 0.0)
+ break;
+
+ color += bigColor7;
+
+ if (d7 < 1.0) {
+ color.z++;
+ break;
+ }
+
+ color += BaseColor;
+
+ } while (true);
+
+
+ // Multi-exit2
+ do {
+ // invariant conditional break at the top of the loop. This could be a
+ // situation where unswitching the loop has no real increases in code
+ // size.
+ if (d8 < 0.0)
+ break;
+
+ color += bigColor7;
+
+ if (d8 < 1.0) {
+ color.z++;
+ if (d8 < 2.0) {
+ color.y++;
+ } else {
+ color.x++;
+ }
+ break;
+ }
+
+ color += BaseColor;
+
+ } while (color.z < d8);
+
+ // Deep exit
+ while (color.w < d9) {
+ if (d9 > d8) {
+ if (color.x <= d7) {
+ if (color.z == 5.0)
+ color.w++;
+ else
+ break;
+ }
+ }
+
+ }
+
+ // No end loop-back.
+ while (color.z < d10) {
+ color.y++;
+ if (color.y < d11) {
+ color.z++;
+ if (color.w < d12)
+ color.w++;
+ else
+ color.x++;
+ continue;
+ }
+
+ color++;
+ break;
+ }
+
+ // Multi-continue
+ while (color.x < 10.0) {
+ color += bigColor8;
+
+ if (color.z < d8)
+ if (color.w < d6)
+ continue;
+
+ color.y += bigColor8.x;
+ }
+
+ color++;
+ gl_FragColor = color;
+
+ // Early Return
+ while (color.x < d14) {
+ if (color.y < d15) {
+ return;
+ }
+ else
+ color++;
+ }
+
+ color++;
+
+ while (color.w < d16) {
+ color.w++;
+ }
+
+
+ // While (complicated-conditional)
+ while (color.w < d2 && color.y < d3) {
+ color += bigColor1_2;
+ if (color.z < d3)
+ return;
+ }
+
+
+ do {
+ if (color.y < d18)
+ return;
+ color++;
+ } while (color.x < d17);
+
+ // Early Discard
+ while (color.y < d16) {
+ if (color.w < d16) {
+ discard;
+ } else
+ color++;
+ }
+
+ color++;
+
+ gl_FragColor = color;
+}
diff --git a/chromium/third_party/glslang/src/Test/loopsArtificial.frag b/chromium/third_party/glslang/src/Test/loopsArtificial.frag
new file mode 100644
index 00000000000..7195a4f87c8
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/loopsArtificial.frag
@@ -0,0 +1,96 @@
+#version 130
+uniform vec4 bigColor;
+uniform vec4 bigColor1_1;
+uniform vec4 bigColor1_2;
+uniform vec4 bigColor1_3;
+uniform vec4 bigColor2;
+uniform vec4 bigColor3;
+uniform vec4 bigColor4;
+uniform vec4 bigColor5;
+uniform vec4 bigColor6;
+uniform vec4 bigColor7;
+uniform vec4 bigColor8;
+
+varying vec4 BaseColor;
+
+uniform float d;
+uniform float d2;
+uniform float d3;
+uniform float d4;
+uniform float d5;
+uniform float d6;
+uniform float d7;
+uniform float d8;
+uniform float d9;
+uniform float d10;
+uniform float d11;
+uniform float d12;
+uniform float d13;
+uniform float d14;
+uniform float d15;
+uniform float d16;
+uniform float d17;
+uniform float d18;
+uniform float d19;
+uniform float d20;
+uniform float d21;
+uniform float d22;
+uniform float d23;
+uniform float d24;
+uniform float d25;
+uniform float d26;
+uniform float d27;
+uniform float d28;
+uniform float d29;
+uniform float d30;
+uniform float d31;
+uniform float d32;
+uniform float d33;
+uniform float d34;
+
+uniform int Count;
+
+void main()
+{
+ vec4 color = BaseColor;
+
+ // Latchy2
+ do {
+ color += bigColor4;
+ if (color.x < d4) {
+ color.z += 2.0;
+ if (color.z < d4) {
+ color.x++;
+ continue;
+ }
+ }
+ if (color.y < d4)
+ color.y += d4;
+ else
+ color.x += d4;
+ } while (color.z < d4);
+
+ // Immediate dominator
+ while (color.w < d13) {
+ if (color.z < d13)
+ color++;
+ else
+ color--;
+ // code from Latchy 2
+ color += bigColor4;
+ if (color.x < d4) {
+ color.z += 2.0;
+ if (color.z < d4) {
+ color.x++;
+ continue;
+ }
+ }
+ if (color.y < d4)
+ color.y += d4;
+ else
+ color.x += d4;
+ }
+
+ color++;
+ gl_FragColor = color;
+}
diff --git a/chromium/third_party/glslang/src/Test/mains.frag b/chromium/third_party/glslang/src/Test/mains.frag
new file mode 100644
index 00000000000..d6e17f966e5
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/mains.frag
@@ -0,0 +1,9 @@
+#version 300 es
+
+void main()
+{
+}
+
+void main()
+{
+}
diff --git a/chromium/third_party/glslang/src/Test/mains1.frag b/chromium/third_party/glslang/src/Test/mains1.frag
new file mode 100644
index 00000000000..b2beec6d7a8
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/mains1.frag
@@ -0,0 +1,5 @@
+#version 110
+
+void main()
+{
+}
diff --git a/chromium/third_party/glslang/src/Test/mains2.frag b/chromium/third_party/glslang/src/Test/mains2.frag
new file mode 100644
index 00000000000..b2beec6d7a8
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/mains2.frag
@@ -0,0 +1,5 @@
+#version 110
+
+void main()
+{
+}
diff --git a/chromium/third_party/glslang/src/Test/makeDoc b/chromium/third_party/glslang/src/Test/makeDoc
new file mode 100644
index 00000000000..c9d598ec418
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/makeDoc
@@ -0,0 +1,3 @@
+#!/usr/bin/env bash
+./glslangValidator -p > instDesc
+asciidoc --backend=html5 instDesc
diff --git a/chromium/third_party/glslang/src/Test/matrix.frag b/chromium/third_party/glslang/src/Test/matrix.frag
new file mode 100644
index 00000000000..0c0be7417fd
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/matrix.frag
@@ -0,0 +1,55 @@
+#version 130
+
+//#define TEST_POST_110
+
+uniform mat3 colorTransform;
+varying vec3 Color;
+uniform mat4 m, n;
+
+#ifdef TEST_POST_110
+uniform mat4x3 um43;
+uniform mat3x4 un34;
+#else
+uniform mat4 um43;
+uniform mat4 un34;
+#endif
+
+varying vec4 v;
+
+#ifdef TEST_POST_110
+varying vec3 u;
+#else
+varying vec4 u;
+#endif
+
+void main()
+{
+ gl_FragColor = vec4(un34[1]);
+ gl_FragColor += vec4(Color * colorTransform, 1.0);
+
+ if (m != n)
+ gl_FragColor += v;
+ else {
+ gl_FragColor += m * v;
+ gl_FragColor += v * (m - n);
+ }
+
+#ifdef TEST_POST_110
+ mat3x4 m34 = outerProduct(v, u);
+ m34 += mat4(v.x);
+ m34 += mat4(u, u.x, u, u.x, u, u.x, u.x);
+#else
+ mat4 m34 = mat4(v.x*u.x, v.x*u.y, v.x*u.z, v.x*u.w,
+ v.y*u.x, v.y*u.y, v.y*u.z, v.y*u.w,
+ v.z*u.x, v.z*u.y, v.z*u.z, v.z*u.w,
+ v.w*u.x, v.w*u.y, v.w*u.z, v.w*u.w);
+ m34 += mat4(v.x);
+ m34 += mat4(u, u.x, u, u.x, u, u.x, u.x);
+
+#endif
+
+ if (m34 == un34)
+ gl_FragColor += m34 * u;
+ else
+ gl_FragColor += (un34 * um43) * v;
+}
diff --git a/chromium/third_party/glslang/src/Test/matrix2.frag b/chromium/third_party/glslang/src/Test/matrix2.frag
new file mode 100644
index 00000000000..193c99d3eae
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/matrix2.frag
@@ -0,0 +1,50 @@
+#version 150
+
+uniform mat3 colorTransform;
+varying vec3 Color;
+uniform mat4 m, n;
+
+uniform mat4x3 um43;
+uniform mat3x4 un34;
+uniform mat2 um2;
+uniform mat3 um3;
+uniform mat4 um4;
+
+varying vec4 v;
+
+varying vec3 u;
+
+out vec4 FragColor;
+
+void main()
+{
+ mat3x4 m34 = outerProduct(v, u);
+
+ m34 += mat3x4(4.3);
+
+ FragColor = vec4(Color, 1.0);
+ FragColor *= vec4(FragColor * m34, 1.0);
+
+ m34 *= v.x;
+
+ mat4 m44 = mat4(un34);
+
+ m44 += m34 * um43;
+
+ FragColor += (-m44) * v;
+
+ FragColor *= matrixCompMult(m44, m44);
+
+ m34 = transpose(um43);
+ FragColor *= vec4(FragColor * m34, 1.0);
+ FragColor *= vec4(determinant(um4));
+ mat2 inv = inverse(um2);
+ FragColor *= vec4(inv[0][0], inv[1][0], inv[0][1], inv[1][1]);
+ mat3 inv3 = inverse(um3);
+ FragColor *= vec4(inv3[2][1]);
+
+ mat4 inv4 = inverse(um4);
+ FragColor *= inv4;
+
+ FragColor = vec4(FragColor * matrixCompMult(un34, un34), FragColor.w);
+}
diff --git a/chromium/third_party/glslang/src/Test/matrixError.vert b/chromium/third_party/glslang/src/Test/matrixError.vert
new file mode 100644
index 00000000000..3c8cc11fec5
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/matrixError.vert
@@ -0,0 +1,22 @@
+#version 120
+
+attribute vec3 v3;
+
+uniform mat3x2 m32;
+
+const mat2x4 m24 = mat2x4(1.0, 2.0,
+ 3.0, 4.0,
+ 3.0, 4.0,
+ 3.0, 4.0, 5.0); // ERROR, too many arguments
+
+void main()
+{
+ mat2x3 m23;
+ vec3 a, b;
+
+ a = v3 * m23; // ERROR, type mismatch
+ b = m32 * v3; // ERROR, type mismatch
+ m23.xy; // ERROR, can't use .
+
+ gl_Position = vec4(m23 * m32 * v3, m24[2][4]); // ERROR, 2 and 4 are out of range
+}
diff --git a/chromium/third_party/glslang/src/Test/max_vertices_0.geom b/chromium/third_party/glslang/src/Test/max_vertices_0.geom
new file mode 100644
index 00000000000..08fd6e6f240
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/max_vertices_0.geom
@@ -0,0 +1,12 @@
+#version 330
+
+layout(points) in;
+layout(triangle_strip, max_vertices = 0) out;
+in highp vec4 v_geom_FragColor[];
+out highp vec4 v_frag_FragColor;
+
+void main (void)
+{
+ EndPrimitive();
+ EndPrimitive();
+}
diff --git a/chromium/third_party/glslang/src/Test/negativeArraySize.comp b/chromium/third_party/glslang/src/Test/negativeArraySize.comp
new file mode 100644
index 00000000000..20636c0a7d0
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/negativeArraySize.comp
@@ -0,0 +1,10 @@
+#version 310 es
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+
+void main()
+{
+ float f[-2]; // cannot declare arrays with negative size
+}
diff --git a/chromium/third_party/glslang/src/Test/newTexture.frag b/chromium/third_party/glslang/src/Test/newTexture.frag
new file mode 100644
index 00000000000..4f807691f70
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/newTexture.frag
@@ -0,0 +1,75 @@
+#version 430
+
+uniform samplerBuffer sb;
+uniform sampler2DRect sr;
+uniform sampler2D s2D;
+uniform sampler3D s3D;
+uniform samplerCube sCube;
+uniform samplerCubeShadow sCubeShadow;
+uniform sampler2DShadow s2DShadow;
+uniform sampler2DArray s2DArray;
+uniform sampler2DArrayShadow s2DArrayShadow;
+
+uniform isampler2D is2D;
+uniform isampler3D is3D;
+uniform isamplerCube isCube;
+uniform isampler2DArray is2DArray;
+uniform isampler2DMS is2Dms;
+
+uniform usampler2D us2D;
+uniform usampler3D us3D;
+uniform usamplerCube usCube;
+uniform usampler2DArray us2DArray;
+
+in float c1D;
+in vec2 c2D;
+in vec3 c3D;
+in vec4 c4D;
+
+flat in int ic1D;
+flat in ivec2 ic2D;
+flat in ivec3 ic3D;
+flat in ivec4 ic4D;
+
+out vec4 FragData;
+
+void main()
+{
+ vec4 v = texture(s2D, c2D);
+ v += textureProj(s3D, c4D);
+ v += textureLod(s2DArray, c3D, 1.2);
+ v.y += textureOffset(s2DShadow, c3D, ivec2(3), c1D);
+ v += texelFetch(s3D, ic3D, ic1D);
+ v += texelFetchOffset(s2D, ic2D, 4, ivec2(3));
+ v += texelFetchOffset(sr, ic2D, ivec2(4));
+ v.y += textureLodOffset(s2DShadow, c3D, c1D, ivec2(3));
+ v += textureProjLodOffset(s2D, c3D, c1D, ivec2(3));
+ v += textureGrad(sCube, c3D, c3D, c3D);
+ v.x += textureGradOffset(s2DArrayShadow, c4D, c2D, c2D, ivec2(3));
+ v += textureProjGrad(s3D, c4D, c3D, c3D);
+ v += textureProjGradOffset(s2D, c3D, c2D, c2D, ivec2(3));
+
+ ivec4 iv = texture(is2D, c2D);
+ v += vec4(iv);
+ iv = textureProjOffset(is2D, c4D, ivec2(3));
+ v += vec4(iv);
+ iv = textureProjLod(is2D, c3D, c1D);
+ v += vec4(iv);
+ iv = textureProjGrad(is2D, c3D, c2D, c2D);
+ v += vec4(iv);
+ iv = texture(is3D, c3D, 4.2);
+ v += vec4(iv);
+ iv = textureLod(isCube, c3D, c1D);
+ v += vec4(iv);
+ iv = texelFetch(is2DArray, ic3D, ic1D);
+ v += vec4(iv);
+ iv += texelFetch(is2Dms, ic2D, ic1D);
+ v += vec4(iv);
+ v += texelFetch(sb, ic1D);
+ v += texelFetch(sr, ic2D);
+
+ ivec2 iv2 = textureSize(sCubeShadow, 2);
+ // iv2 += textureSize(is2Dms);
+
+ FragData = v + vec4(iv2, 0.0, 0.0);
+}
diff --git a/chromium/third_party/glslang/src/Test/noMain.vert b/chromium/third_party/glslang/src/Test/noMain.vert
new file mode 100644
index 00000000000..27be67df3e5
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/noMain.vert
@@ -0,0 +1,5 @@
+#version 300 es
+
+void foo()
+{
+}
diff --git a/chromium/third_party/glslang/src/Test/noMain1.geom b/chromium/third_party/glslang/src/Test/noMain1.geom
new file mode 100644
index 00000000000..4fa1b768c2a
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/noMain1.geom
@@ -0,0 +1,7 @@
+#version 110
+
+void foo()
+{
+}
+
+layout(points) out; \ No newline at end of file
diff --git a/chromium/third_party/glslang/src/Test/noMain2.geom b/chromium/third_party/glslang/src/Test/noMain2.geom
new file mode 100644
index 00000000000..d7c96c95661
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/noMain2.geom
@@ -0,0 +1,7 @@
+#version 150
+
+void bar()
+{
+}
+
+layout(line_strip) out;
diff --git a/chromium/third_party/glslang/src/Test/nonSquare.vert b/chromium/third_party/glslang/src/Test/nonSquare.vert
new file mode 100644
index 00000000000..0974425917e
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/nonSquare.vert
@@ -0,0 +1,25 @@
+#version 120
+
+attribute vec3 v3;
+attribute vec4 v4;
+
+uniform mat3x2 m32;
+
+const vec2 cv2 = vec2(10.0, 20.0);
+const mat2x4 m24 = mat2x4(3.0);
+const mat4x2 m42 = mat4x2(1.0, 2.0,
+ 3.0, 4.0,
+ 5.0, 6.0,
+ 7.0, 8.0);
+
+void main()
+{
+ mat2x3 m23;
+ vec2 a, b;
+
+ a = v3 * m23;
+ b = m32 * v3;
+
+ gl_Position = vec4(m23 * m32 * v3, m24[1][3]) +
+ (m24 * m42) * v4 + cv2 * m42 + m24 * cv2 + vec4(cv2[1], cv2.x, m42[2][1], m42[2][0]);
+}
diff --git a/chromium/third_party/glslang/src/Test/nonVulkan.frag b/chromium/third_party/glslang/src/Test/nonVulkan.frag
new file mode 100644
index 00000000000..05c818d7ce5
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/nonVulkan.frag
@@ -0,0 +1,9 @@
+#version 450
+
+layout(constant_id = 17) const int arraySize = 12; // ERROR
+layout(input_attachment_index = 1) int foo; // ERROR
+layout(push_constant) uniform ubn { int a; } ubi; // ERROR
+
+#ifdef VULKAN
+#error VULKAN should not be defined
+#endif
diff --git a/chromium/third_party/glslang/src/Test/numeral.frag b/chromium/third_party/glslang/src/Test/numeral.frag
new file mode 100644
index 00000000000..789f1b43859
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/numeral.frag
@@ -0,0 +1,103 @@
+#version 400
+
+void main()
+{
+ int o00 = 00;
+ int o000 = 000;
+ int o0000 = 0000;
+ int o5 = 05;
+ int o05 = 005;
+ int o006 = 0006;
+ int o7 = 07;
+ int o58 = 072;
+ int omax = 037777777777;
+ int o8 = 08; // ERROR
+ int o08 = 008; // ERROR
+ int o009 = 0009; // ERROR
+ int obig = 07324327323472347234; // ERROR
+ int omax1 = 040000000000; // ERROR
+
+ uint uo5 = 05u;
+ uint uo6 = 06u;
+ uint uo7 = 07u;
+ uint uo8 = 08u; // ERROR
+ uint uo9 = 09u; // ERROR
+
+ int h0 = 0x0;
+ int h00 = 0x00;
+ int h000 = 0x000;
+ int h1 = 0x1;
+ int h2 = 0x00000002;
+ int h300 = 0x000300;
+ int hABCDEF = 0xAbCdEF;
+ int hFFFFFFFF = 0xFFFFFFFF;
+ int h12345678 = 0xBC614E;
+ int hToBeOrNotToBe = 0x2b | ~0x2B;
+
+ uint uh0 = 0x0u;
+ uint uhg = (0xcu);
+ uint uh000 = 0x000u;
+ uint uh1 = 0x1u;
+ uint uh2 = 0x00000002u;
+ uint uh300 = 0x000300u;
+ uint uhABCDEF = 0xAbCdEFu;
+ uint uhFFFFFFFF = 0xFFFFFFFFu;
+ uint uh12345678 = 0xBC614Eu;
+ uint uhToBeOrNotToBe = 0x2bu | ~0x2BU;
+
+ //int he1 = 0xG; // ERROR
+ int he2 = 0x; // ERROR
+ int hbig = 0xFFFFFFFF1; // ERROR
+
+ float f1 = 1.0;
+ float f2 = 2.;
+ float f3 = 3e0;
+ float f4 = 40e-1;
+ float f5 = 05.;
+ float f6 = 006.;
+ float f7 = .7e1;
+ float f8 = 08e0;
+ float f9 = .9e+1;
+ float f10 = 10.0;
+ float f11 = .011e+3;
+ float f12 = .0012e4;
+ float f543 = 000000543.;
+ float f6789 = 00006789.;
+ float f88 = 0000088.;
+
+ float g1 = 5.3876e4;
+ float g2 = 4000000000e-11;
+ float g3 = 1e+5;
+ float g4 = 7.321E-3;
+ float g5 = 3.2E+4;
+ float g6 = 0.5e-5;
+ float g7 = 0.45;
+ float g8 = 6.e10;
+
+ double gf1 = 1.0lf;
+ double gf2 = 2.Lf;
+ double gf3 = .3e1lF;
+ double gf4 = .4e1LF;
+ float gf5 = 5.f;
+ float gf6 = 6.F;
+
+ //float e1 = 1..; // ERROR
+ //float e2 = 2.l; // ERROR
+ //float e3 = ..3; // ERROR
+ //float e4 = 4ee1; // ERROR
+ float e5 = 5f; // ERROR
+}
+
+layout (location = 2) out vec4 c2;
+layout (location = 3u) out vec4 c3;
+layout (location = 04) out vec4 c4;
+layout (location = 005u) out vec4 c5;
+layout (location = 0x6) out vec4 c6;
+layout (location = 0x7u) out vec4 c7;
+
+uint g1 = 4294967296u; // ERROR, too big
+uint g2 = 4294967295u;
+uint g3 = 4294967294u;
+int g4 = 4294967296; // ERROR, too big
+int g5 = 4294967295;
+int g6 = 4294967294;
diff --git a/chromium/third_party/glslang/src/Test/pointCoord.frag b/chromium/third_party/glslang/src/Test/pointCoord.frag
new file mode 100644
index 00000000000..8dc9e746db4
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/pointCoord.frag
@@ -0,0 +1,15 @@
+precision highp float;
+
+uniform sampler2D sampler;
+
+void main()
+{
+ vec4 color;
+
+ if (length(gl_PointCoord) < 0.3)
+ color = texture2D(sampler, gl_PointCoord);
+ else
+ color = vec4(0.0);
+
+ gl_FragColor = color;
+}
diff --git a/chromium/third_party/glslang/src/Test/precise.tesc b/chromium/third_party/glslang/src/Test/precise.tesc
new file mode 100644
index 00000000000..c541540cbbb
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/precise.tesc
@@ -0,0 +1,109 @@
+#version 450
+#extension GL_EXT_tessellation_shader : require
+#extension GL_EXT_gpu_shader5 : require
+
+float minimal() {
+ precise float result = 5.0;
+ float a = 10.0;
+ float b = 20.0;
+ float c = 30.0;
+ float d = 40.0;
+ result = a * b + c * d; // c * d, a * b and rvalue1 + rvalue2 should be 'noContraction'.
+ return result;
+}
+
+void continuous_assignment() {
+ precise float result = 5.0;
+ float a = 10.0;
+ float b = 20.0;
+ result = a = b + 4; // b + 4 should be 'noContraction'.
+}
+
+void convert() {
+ precise double result;
+ float a = 10.0;
+ float b = 20.0;
+ b = a + b; // a + b should be 'noContraction'.
+ result = double(b); // convert operation should not be 'noContraction'.
+}
+
+float loop_for() {
+ precise float r1 = 5.0;
+ precise float r2 = 10.0;
+ int a = 10;
+ int b = 20;
+ int c = 30;
+ for (int i = 0; i < a; i++) {
+ r1 += 3.12 + b + i; // 'noContration', this make i++ also 'noContraction'
+ c += 1; // 'noContration'
+ }
+ a += 1; // a + 1 should not be 'noContraction'.
+ r2 = c; // The calculation of c should be 'noContration'.
+ return float(r1 + r2); // conversion should not be 'noContration'.
+}
+
+void loop_array(void) {
+ precise float result;
+
+ int x = 22;
+ int y = 33;
+
+ float a0[3];
+ result += float(x) + float(y); // x + y should be 'noContraction' also result + rvalue.
+
+ for (int i = 0; i < 3; ++i) {
+ // a's dereference + 2 should be 'noContraction'.
+ result += a0[i] + 2;
+ // result + 1 and 3 - rvalue should be 'noContraction'.
+ a0[i] = 3 - result++;
+ }
+}
+
+void loop_while() {
+ precise float result = 5.0;
+ int a = 10;
+ int b = 20;
+ while (result < 10) {
+ result += 3.12 + b; // result + 3.12 should be 'noContraction'.
+ }
+ result = a + b + 5; // b + 5 should not be 'noCtraction' because all operands are integers.
+ result = 11.1;
+}
+
+float fma_not_decorated() {
+ precise float result;
+ float a = 1.0;
+ float b = 2.0;
+ float c = 3.0;
+ b = b + c; // b + c should be decorated with 'noContraction'
+ result = fma(a, b, c); // fma() should not be decorated with 'noContradtion'
+ return result;
+}
+
+precise float precise_return_exp_func() {
+ float a = 1.0;
+ float b = 2.0;
+ return a + b; // the ADD operation should be 'noContraction'
+}
+
+precise float precise_return_val_func() {
+ float a = 1.0;
+ float b = 2.0;
+ float result = a + b; // the ADD operation should be 'noContraction'
+ return result;
+}
+
+float precise_func_parameter(float b, precise out float c) {
+ float a = 0.5;
+ c = a + b; // noContration
+ return a - b; // Not noContraction
+}
+
+mat3 matrix (mat2x3 a, mat3x2 b) {
+ mat2x3 c = mat2x3(1.0, 2.0, 3.0, 4.0, 5.0, 6.0);
+ precise mat3 result;
+ result = (a + c) * b; // should be noContraction
+ return result;
+}
+
+void main(){}
diff --git a/chromium/third_party/glslang/src/Test/precise_struct_block.vert b/chromium/third_party/glslang/src/Test/precise_struct_block.vert
new file mode 100644
index 00000000000..279b4b09df5
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/precise_struct_block.vert
@@ -0,0 +1,89 @@
+#version 450
+
+struct T {
+ float f1;
+ float f2;
+};
+
+out B1 {precise T s; float x;} partial_precise_block;
+precise out B2 {T s; float x;} all_precise_block;
+
+float struct_member() {
+ float a = 1.0;
+ float b = 2.0;
+ float c = 3.0;
+ float d = 4.0;
+
+ precise float result;
+
+ T S, S2, S3;
+
+ S2.f1 = a + 0.2; // NoContraction
+ S2.f2 = b + 0.2; // NOT NoContraction
+ S3.f1 = a + b; // NOT NoContraction
+ S = S2; // "precise" propagated through parent object nodes
+ result = S.f1 + 0.1; // the ADD operation should be NoContraction
+
+ return result;
+}
+
+float complex_array_struct() {
+ precise float result;
+ struct T1 {
+ float t1_array[3];
+ float t1_scalar;
+ };
+ struct T2 {
+ T1 t1a[5];
+ T1 t1b[6];
+ T1 t1c[7];
+ };
+ struct T3 {float f; T2 t2; vec4 v; int p;};
+ T3 t3[10];
+ for(int i=0; i<10; i++) {
+ t3[i].f = i / 3.0; // Not NoContraction
+ t3[i].v = vec4(i * 1.5); // NoContraction
+ t3[i].p = i + 1;
+ for(int j=0; j<5; j++) {
+ for(int k = 0; k<3; k++) {
+ t3[i].t2.t1a[j].t1_array[k] = i * j + k; // Not NoContraction
+ }
+ t3[i].t2.t1a[j].t1_scalar = j * 2.0 / i; // Not NoContration
+ }
+
+ for(int j=0; j<6; j++) {
+ for(int k = 0; k<3; k++) {
+ t3[i].t2.t1b[j].t1_array[k] = i * j + k; // Not NoContraction
+ }
+ t3[i].t2.t1b[j].t1_scalar = j * 2.0 / i; // NoContraction
+ }
+
+ for(int j=0; j<6; j++) {
+ for(int k = 0; k<3; k++) {
+ t3[i].t2.t1c[j].t1_array[k] = i * j + k; // Not NoContraction because all operands are integers
+ }
+ t3[i].t2.t1c[j].t1_scalar = j * 2.0 / i; // Not NoContraction
+ }
+ }
+ int i = 2;
+ result = t3[5].t2.t1c[6].t1_array[1]
+ + t3[2].t2.t1b[1].t1_scalar
+ + t3[i - 1].v.xy.x; // NoContraction
+ return result;
+}
+
+float out_block() {
+ float a = 0.1;
+ float b = 0.2;
+ partial_precise_block.s.f1 = a + b; // NoContraction
+ partial_precise_block.s.f2 = a - b; // NoContraction
+ partial_precise_block.x = a * b; // Not NoContraction
+
+ all_precise_block.s.f1 = a + b + 1.0; // NoContraction
+ all_precise_block.s.f2 = a - b - 1.0; // NoContraction
+ all_precise_block.x = a * b * 2.0; // Also NoContraction
+
+ return a + b; // Not NoContraction
+}
+
+void main(){}
diff --git a/chromium/third_party/glslang/src/Test/precision.frag b/chromium/third_party/glslang/src/Test/precision.frag
new file mode 100644
index 00000000000..02bc6ca8986
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/precision.frag
@@ -0,0 +1,76 @@
+#version 100
+
+varying vec3 color; // ERRROR, there is no default qualifier for float
+
+lowp vec2 foo(mediump vec3 mv3)
+{
+ highp vec4 hv4;
+ return hv4.xy;
+}
+
+int global_medium;
+
+uniform lowp sampler2D samplerLow;
+uniform mediump sampler2D samplerMed;
+uniform highp sampler2D samplerHigh;
+
+precision highp int;
+precision highp ivec2; // ERROR
+precision mediump int[2]; // ERROR
+vec4 uint; // okay
+precision mediump vec4; // ERROR
+
+int global_high;
+
+void main()
+{
+ lowp int sum = global_medium + global_high;
+
+ gl_FragColor = vec4(color, 1.0);
+
+ int level1_high;
+ sum += level1_high;
+
+ precision lowp int;
+ int level1_low;
+ sum += level1_low;
+
+ // test maxing precisions of args to get precision of builtin
+ lowp float arg1;
+ mediump float arg2;
+ lowp float d = distance(arg1, arg2);
+
+ {
+ int level2_low;
+ sum += level2_low;
+
+ precision highp int;
+ int level2_high;
+ sum += level2_high;
+ do {
+ if (true) {
+ precision mediump int;
+ int level4_medium;
+ sum += level4_medium;
+ }
+ int level3_high;
+ sum += level3_high;
+ } while (true);
+ int level2_high2;
+ sum += level2_high2;
+ }
+ int level1_low3;
+ sum += level1_low3;
+
+ sum += 4 + ((ivec2(level1_low3) * ivec2(level1_high) + ivec2((/* comma operator */level1_low3, level1_high)))).x;
+
+ texture2D(samplerLow, vec2(0.1, 0.2));
+ texture2D(samplerMed, vec2(0.1, 0.2));
+ texture2D(samplerHigh, vec2(0.1, 0.2));
+}
+
+precision mediump bool; // ERROR
+//precision mediump struct { int a; } s; // ERROR
+struct s {int a;};
+precision mediump s; // ERROR
+mediump bvec2 b2; // ERROR
diff --git a/chromium/third_party/glslang/src/Test/precision.vert b/chromium/third_party/glslang/src/Test/precision.vert
new file mode 100644
index 00000000000..5d073488c90
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/precision.vert
@@ -0,0 +1,25 @@
+#version 300 es
+
+in vec4 pos;
+
+uniform sampler2D s2D;
+uniform samplerCube sCube;
+uniform isampler2DArray is2DAbad; // ERROR, no default precision
+uniform sampler2DArrayShadow s2dASbad; // ERROR, no default precision
+
+precision highp sampler2D;
+precision mediump sampler2DArrayShadow;
+
+uniform sampler2DArrayShadow s2dAS;
+uniform isampler2DArray is2DAbad2; // ERROR, still no default precision
+
+uniform sampler2D s2Dhigh;
+
+void main()
+{
+ vec4 t = texture(s2D, vec2(0.1, 0.2));
+ t += texture(s2Dhigh, vec2(0.1, 0.2));
+ t += texture(s2dAS, vec4(0.5));
+
+ gl_Position = pos;
+}
diff --git a/chromium/third_party/glslang/src/Test/prepost.frag b/chromium/third_party/glslang/src/Test/prepost.frag
new file mode 100644
index 00000000000..9627b7e2d99
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/prepost.frag
@@ -0,0 +1,38 @@
+#version 140
+
+void main()
+{
+ struct s {
+ float y[5];
+ } str;
+
+ float t;
+ int index = 5; // all indexing is 4
+
+ str.y[4] = 2.0; // 2.0
+ t = ++str.y[--index]; // 3.0
+ str.y[4] += t; // 6.0
+ t = str.y[4]--; // 5.0 (t = 6.0)
+ str.y[index++] += t; // 11.0
+ --str.y[--index]; // 10.0
+
+ float x = str.y[4];
+ ++x;
+ --x;
+ x++;
+ x--;
+
+ // x is 10.0
+
+ float y = x * ++x; // 10 * 11
+ float z = y * x--; // 110 * 11
+
+ // x is 10.0
+ // z is 1210.0
+
+ vec4 v = vec4(1.0, 2.0, 3.0, 4.0);
+ v.y = v.z--; // (1,3,2,4)
+ v.x = --v.w; // (3,3,2,3)
+
+ gl_FragColor = z * v;// (3630.0, 3630.0, 2420.0, 3630.0)
+}
diff --git a/chromium/third_party/glslang/src/Test/preprocessor.cpp_style___FILE__.vert b/chromium/third_party/glslang/src/Test/preprocessor.cpp_style___FILE__.vert
new file mode 100644
index 00000000000..6d2bc1d810e
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/preprocessor.cpp_style___FILE__.vert
@@ -0,0 +1,36 @@
+#extension GL_GOOGLE_cpp_style_line_directive : enable
+
+__FILE__
+
+#line 150 "a.h"
+__FILE__
+
+#line 24
+__FILE__
+
+#line 42
+__FILE__
+
+#line 30 "b.cc"
+__FILE__
+
+#line 10 3
+__FILE__
+
+#line 48
+__FILE__
+
+#line 4
+__FILE__
+
+#line 55 100
+__FILE__
+
+#line 1000 "c"
+__FILE__
+
+#line 42 1
+__FILE__
+
+#line 42 "this-is-a-quite-long-name-maybe-i-should-shorten-it"
+__FILE__
diff --git a/chromium/third_party/glslang/src/Test/preprocessor.cpp_style_line_directive.vert b/chromium/third_party/glslang/src/Test/preprocessor.cpp_style_line_directive.vert
new file mode 100644
index 00000000000..90fb2614d5e
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/preprocessor.cpp_style_line_directive.vert
@@ -0,0 +1,36 @@
+#extension GL_GOOGLE_cpp_style_line_directive : enable
+
+#error at "0:3"
+
+#line 150 "a.h"
+#error at "a.h:150"
+
+#line 24
+#error at "a.h:24"
+
+#line 42
+#error at "a.h:42"
+
+#line 30 "b.cc"
+#error at "b.cc:30"
+
+#line 10 3
+#error at "3:10"
+
+#line 48
+#error at "3:48"
+
+#line 4
+#error at "3:4"
+
+#line 55 100
+#error at "100:55"
+
+#line 1000 "c"
+#error at "c:1000"
+
+#line 42 1
+#error at "1:42"
+
+#line 42 "this-is-a-quite-long-name-maybe-i-should-shorten-it"
+#error at "this-is-a-quite-long-name-maybe-i-should-shorten-it:42"
diff --git a/chromium/third_party/glslang/src/Test/preprocessor.defined.vert b/chromium/third_party/glslang/src/Test/preprocessor.defined.vert
new file mode 100644
index 00000000000..375e4d3d7ed
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/preprocessor.defined.vert
@@ -0,0 +1,2 @@
+#define defined_not_really
+#define defined // ERROR: "defined" can't be (un)defined:
diff --git a/chromium/third_party/glslang/src/Test/preprocessor.edge_cases.vert b/chromium/third_party/glslang/src/Test/preprocessor.edge_cases.vert
new file mode 100644
index 00000000000..ebea94f2eaf
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/preprocessor.edge_cases.vert
@@ -0,0 +1,15 @@
+#version 310 es
+#define X(Y) /*
+ */ Y + 2
+
+#define Y(Z) 2 * Z// asdf
+
+#define Z(Y) /*
+ */ \
+ 2 /*
+ */ + 3 \
+ * Y
+
+void main() {
+ gl_Position = vec4(X(3) + Y(4) + Z(2));
+}
diff --git a/chromium/third_party/glslang/src/Test/preprocessor.eof_missing.vert b/chromium/third_party/glslang/src/Test/preprocessor.eof_missing.vert
new file mode 100644
index 00000000000..9177314832a
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/preprocessor.eof_missing.vert
@@ -0,0 +1 @@
+noEOF \ No newline at end of file
diff --git a/chromium/third_party/glslang/src/Test/preprocessor.errors.vert b/chromium/third_party/glslang/src/Test/preprocessor.errors.vert
new file mode 100644
index 00000000000..86b3962429e
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/preprocessor.errors.vert
@@ -0,0 +1,20 @@
+#version 310 es
+
+#define X 1
+
+#if X
+ #ifdef Y
+ #error This should not show up in pp output.
+ #endif
+ #error This should show up in pp output.
+#else
+ #error This should not show up in pp output.
+#endif
+
+#def X
+#if Y
+
+#extension a
+
+int main() {
+}
diff --git a/chromium/third_party/glslang/src/Test/preprocessor.extensions.vert b/chromium/third_party/glslang/src/Test/preprocessor.extensions.vert
new file mode 100644
index 00000000000..89012960cc2
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/preprocessor.extensions.vert
@@ -0,0 +1,12 @@
+#version 310 es
+
+#extension GL_EXT_geometry_shader: enable
+#extension GL_EXT_frag_depth: disable
+#extension GL_EXT_gpu_shader5: require
+#extension GL_EXT_shader_texture_image_samples: warn
+
+#extension unknown_extension: require
+
+int main() {
+}
+
diff --git a/chromium/third_party/glslang/src/Test/preprocessor.function_macro.vert b/chromium/third_party/glslang/src/Test/preprocessor.function_macro.vert
new file mode 100644
index 00000000000..3ae7c62af3b
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/preprocessor.function_macro.vert
@@ -0,0 +1,20 @@
+#version 310 es
+
+
+#define X(n) n + 1
+#define Y(n, z) n + z
+#define Z(f) X(f)
+
+#define REALLY_LONG_MACRO_NAME_WITH_MANY_PARAMETERS(X1, X2, X3, X4, X5, X6, X7,\
+ X8, X9, X10, X11, X12) X1+X2+X3+X4+X5+X6+X7+X8+X9+X10+X11+X12
+
+#define A(\
+ Y\
+ )\
+4 + 3 + Y
+
+int main() {
+ gl_Position = vec4(X(3), Y(3, 4), Z(3));
+ gl_Position = vec4(REALLY_LONG_MACRO_NAME_WITH_MANY_PARAMETERS(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12));
+ gl_Position = vec4(A(3));
+}
diff --git a/chromium/third_party/glslang/src/Test/preprocessor.include.disabled.vert b/chromium/third_party/glslang/src/Test/preprocessor.include.disabled.vert
new file mode 100644
index 00000000000..130d928e52d
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/preprocessor.include.disabled.vert
@@ -0,0 +1,7 @@
+#line 8000
+#include
+#include 123
+#include "foo"
+#include "foo" garbage
+#include "no-eol"
+
diff --git a/chromium/third_party/glslang/src/Test/preprocessor.include.enabled.vert b/chromium/third_party/glslang/src/Test/preprocessor.include.enabled.vert
new file mode 100644
index 00000000000..62a7428bfd2
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/preprocessor.include.enabled.vert
@@ -0,0 +1,7 @@
+#extension GL_GOOGLE_include_directive : enable
+#line 8000
+#include
+#include 123
+#include "foo"
+#include "foo" garbage
+#include "no-eol"
diff --git a/chromium/third_party/glslang/src/Test/preprocessor.line.frag b/chromium/third_party/glslang/src/Test/preprocessor.line.frag
new file mode 100644
index 00000000000..0b7ac7663f9
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/preprocessor.line.frag
@@ -0,0 +1,4 @@
+#version 310 es
+#line 1 2
+#pragma something
+void main() {}
diff --git a/chromium/third_party/glslang/src/Test/preprocessor.line.vert b/chromium/third_party/glslang/src/Test/preprocessor.line.vert
new file mode 100644
index 00000000000..22d2907dea8
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/preprocessor.line.vert
@@ -0,0 +1,39 @@
+#line 300
+
+#line 2
+
+
+
+
+
+#line __LINE__ + 3
+
+
+#line __FILE__ + 2
+
+#line __FILE__ * __LINE__
+
+
+#define X 4
+
+#line X
+
+#undef X
+
+#define X(y) y + 3 + 2
+
+#line X(3)
+
+void main() {
+ gl_Position = vec4(__LINE__);
+}
+
+#line X(3) 4
+
+#define Z(y, q) \
+ y*q*2 q
+
+#line Z(2, 3)
+
+#line 1
+
diff --git a/chromium/third_party/glslang/src/Test/preprocessor.many.endif.vert b/chromium/third_party/glslang/src/Test/preprocessor.many.endif.vert
new file mode 100644
index 00000000000..7b049629fd5
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/preprocessor.many.endif.vert
@@ -0,0 +1,10 @@
+#endif
+#endif
+#endif
+#endif
+#endif
+#endif
+#endif
+
+#if
+#else
diff --git a/chromium/third_party/glslang/src/Test/preprocessor.pragma.vert b/chromium/third_party/glslang/src/Test/preprocessor.pragma.vert
new file mode 100644
index 00000000000..17424738756
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/preprocessor.pragma.vert
@@ -0,0 +1,11 @@
+#version 310 es
+
+#pragma optimize(on)
+#pragma optimize(off)
+#pragma debug(on)
+#pragma debug(off)
+
+#pragma undefined_pragma(x, 4)
+
+int main() {
+}
diff --git a/chromium/third_party/glslang/src/Test/preprocessor.simple.vert b/chromium/third_party/glslang/src/Test/preprocessor.simple.vert
new file mode 100644
index 00000000000..d25334ab821
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/preprocessor.simple.vert
@@ -0,0 +1,22 @@
+#version 310 es
+#define X 1
+#define Y clamp
+#define Z X
+
+#define F 1, 2
+
+#define make_function \
+ float fn ( float x ) \
+ {\
+ return x + 4.0; \
+ }
+
+make_function
+
+int main() {
+ gl_Position = vec4(X);
+ gl_Position = Y(1, 2, 3);
+ gl_Position = vec4(Z);
+ gl_Position = vec4(F);
+ gl_Position = vec4(fn(3));
+}
diff --git a/chromium/third_party/glslang/src/Test/preprocessor.success_if_parse_would_fail.vert b/chromium/third_party/glslang/src/Test/preprocessor.success_if_parse_would_fail.vert
new file mode 100644
index 00000000000..ed1ad0c0ee1
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/preprocessor.success_if_parse_would_fail.vert
@@ -0,0 +1,4 @@
+int x() {
+ something that shouldnt compile;
+}
+
diff --git a/chromium/third_party/glslang/src/Test/recurse1.frag b/chromium/third_party/glslang/src/Test/recurse1.frag
new file mode 100644
index 00000000000..447a8827d67
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/recurse1.frag
@@ -0,0 +1,48 @@
+#version 330 core
+
+// cross-unit recursion
+
+void main() {}
+
+// two-level recursion
+
+float cbar(int);
+
+void cfoo(float)
+{
+ cbar(2);
+}
+
+// four-level, out of order
+
+void CB();
+void CD();
+void CA() { CB(); }
+void CC() { CD(); }
+
+// high degree
+
+void CBT();
+void CDT();
+void CAT() { CBT(); CBT(); CBT(); }
+void CCT() { CDT(); CDT(); CBT(); }
+
+// not recursive
+
+void norA() {}
+void norB() { norA(); }
+void norC() { norA(); }
+void norD() { norA(); }
+void norE() { norB(); }
+void norF() { norB(); }
+void norG() { norE(); }
+void norH() { norE(); }
+void norI() { norE(); }
+
+// not recursive, but with a call leading into a cycle if ignoring direction
+
+void norcA() { }
+void norcB() { norcA(); }
+void norcC() { norcB(); }
+void norcD() { norcC(); norcB(); } // head of cycle
+void norcE() { norcD(); } // lead into cycle
diff --git a/chromium/third_party/glslang/src/Test/recurse1.vert b/chromium/third_party/glslang/src/Test/recurse1.vert
new file mode 100644
index 00000000000..bb5b245e8c2
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/recurse1.vert
@@ -0,0 +1,44 @@
+#version 330 core
+
+void main() {}
+
+float bar(int);
+
+// direct recursion
+
+void self()
+{
+ self();
+}
+
+// two-level recursion
+
+void foo(float)
+{
+ bar(2);
+}
+
+float bar(int)
+{
+ foo(4.2);
+
+ return 3.2;
+}
+
+// four-level, out of order
+
+void B();
+void D();
+void A() { B(); }
+void C() { D(); }
+void B() { C(); }
+void D() { A(); }
+
+// high degree
+
+void BT();
+void DT();
+void AT() { BT(); BT(); BT(); }
+void CT() { DT(); AT(); DT(); BT(); }
+void BT() { CT(); CT(); CT(); }
+void DT() { AT(); }
diff --git a/chromium/third_party/glslang/src/Test/recurse2.frag b/chromium/third_party/glslang/src/Test/recurse2.frag
new file mode 100644
index 00000000000..6bd4067f1a8
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/recurse2.frag
@@ -0,0 +1,28 @@
+#version 330 core
+
+// cross-unit recursion
+
+// two-level recursion
+
+void cfoo(float);
+
+float cbar(int)
+{
+ cfoo(4.2);
+
+ return 3.2;
+}
+
+// four-level, out of order
+
+void CA();
+void CC();
+void CB() { CC(); }
+void CD() { CA(); }
+
+// high degree
+
+void CAT();
+void CCT();
+void CBT() { CCT(); CCT(); CCT(); }
+void CDT() { CAT(); }
diff --git a/chromium/third_party/glslang/src/Test/reflection.vert b/chromium/third_party/glslang/src/Test/reflection.vert
new file mode 100644
index 00000000000..a60d045046e
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/reflection.vert
@@ -0,0 +1,182 @@
+#version 440 core
+
+layout(std140, row_major) uniform nameless {
+ vec3 anonMember1;
+ mat3x2 m23;
+ int scalarAfterm23;
+ vec4 anonDeadMember2;
+ vec4 anonMember3;
+ int scalarBeforeArray;
+ float floatArray[5];
+ int scalarAfterArray;
+ mat2x2 m22[9];
+};
+
+layout(std140, column_major) uniform c_nameless {
+ vec3 c_anonMember1;
+ mat3x2 c_m23;
+ int c_scalarAfterm23;
+ vec4 c_anonDeadMember2;
+ vec4 c_anonMember3;
+};
+
+layout(std140) uniform named {
+ vec3 deadMember1;
+ int scalar;
+ vec4 member2;
+ vec4 member3;
+ vec2 memvec2;
+ float memf1;
+ bool memf2;
+ int memf3;
+ vec2 memvec2a;
+ mat2x2 m22[7];
+} ablock;
+
+layout(std140) uniform namelessdead {
+ int a;
+};
+
+layout(std140) uniform namedDead {
+ int b;
+} bblock;
+
+struct N1 {
+ float a;
+};
+
+struct N2 {
+ float b;
+ float c;
+ float d;
+};
+
+struct N3 {
+ N1 n1;
+ N2 n2;
+};
+
+layout(std140) uniform nested {
+ N3 foo;
+} nest;
+
+struct TS {
+ int a;
+ int dead;
+};
+
+uniform TS s;
+
+uniform float uf1;
+uniform float uf2;
+uniform float ufDead3;
+uniform float ufDead4;
+
+uniform writeonly uimage2D image_ui2D;
+uniform sampler2D sampler_2D;
+uniform sampler2DMSArray sampler_2DMSArray;
+
+uniform mat2 dm22[10];
+
+struct deep1 {
+ vec2 va[3];
+ bool b;
+};
+
+struct deep2 {
+ int i;
+ deep1 d1[4];
+};
+
+struct deep3 {
+ vec4 iv4;
+ deep2 d2;
+ ivec3 v3;
+};
+
+in float attributeFloat;
+layout(location = 2) in vec2 attributeFloat2;
+in vec3 attributeFloat3;
+in vec4 attributeFloat4;
+in mat4 attributeMat4;
+
+uniform deep3 deepA[2], deepB[2], deepC[3], deepD[2];
+
+const bool control = true;
+
+void deadFunction()
+{
+ vec3 v3 = ablock.deadMember1;
+ vec4 v = anonDeadMember2;
+ float f = ufDead4;
+}
+
+void liveFunction2()
+{
+ vec3 v = anonMember1;
+ float f = uf1;
+}
+
+void liveFunction1(writeonly uimage2D p_ui2D, sampler2D p_2D, sampler2DMSArray p_2DMSArray)
+
+{
+ liveFunction2();
+ float f = uf2;
+ vec4 v = ablock.member3;
+}
+
+uniform abl {
+ float foo;
+} arrBl[4];
+
+uniform abl2 {
+ float foo;
+} arrBl2[4];
+
+void main()
+{
+ liveFunction1(image_ui2D, sampler_2D, sampler_2DMSArray);
+ liveFunction2();
+
+ if (! control)
+ deadFunction();
+
+ float f;
+ int i;
+ if (control) {
+ liveFunction2();
+ f = anonMember3.z;
+ f = s.a;
+ f = ablock.scalar;
+ f = m23[1].y + scalarAfterm23;
+ f = c_m23[1].y + c_scalarAfterm23;
+ f += scalarBeforeArray;
+ f += floatArray[2];
+ f += floatArray[4];
+ f += scalarAfterArray;
+ f += ablock.memvec2.x;
+ f += ablock.memf1;
+ f += float(ablock.memf2);
+ f += ablock.memf3;
+ f += ablock.memvec2a.y;
+ f += ablock.m22[i][1][0];
+ f += dm22[3][0][1];
+ f += m22[2][1].y;
+ f += nest.foo.n1.a + nest.foo.n2.b + nest.foo.n2.c + nest.foo.n2.d;
+ f += deepA[i].d2.d1[2].va[1].x;
+ f += deepB[1].d2.d1[i].va[1].x;
+ f += deepB[i].d2.d1[i].va[1].x;
+ deep3 d = deepC[1];
+ deep3 da[2] = deepD;
+ } else
+ f = ufDead3;
+
+ f += arrBl[2].foo + arrBl[0].foo;
+ f += arrBl2[i].foo;
+
+ f += attributeFloat;
+ f += attributeFloat2.x;
+ f += attributeFloat3.x;
+ f += attributeFloat4.x;
+ f += attributeMat4[0][1];
+}
diff --git a/chromium/third_party/glslang/src/Test/runtests b/chromium/third_party/glslang/src/Test/runtests
new file mode 100755
index 00000000000..d54fb580e82
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/runtests
@@ -0,0 +1,130 @@
+#!/usr/bin/env bash
+
+TARGETDIR=localResults
+BASEDIR=baseResults
+EXE=../build/install/bin/glslangValidator
+HASERROR=0
+mkdir -p localResults
+
+#
+# configuration file tests
+#
+echo running configuration file test
+$EXE -c > $TARGETDIR/test.conf
+diff -b $BASEDIR/test.conf $TARGETDIR/test.conf || HASERROR=1
+$EXE -i -l $TARGETDIR/test.conf specExamples.vert > $TARGETDIR/specExamples.vert.out
+diff -b $BASEDIR/specExamples.vert.out $TARGETDIR || HASERROR=1
+$EXE -l 100Limits.vert 100.conf > $TARGETDIR/100LimitsConf.vert.out
+diff -b $BASEDIR/100LimitsConf.vert.out $TARGETDIR/100LimitsConf.vert.out || HASERROR=1
+
+#
+# isolated compilation tests
+#
+while read t; do
+ echo Running $t...
+ b=`basename $t`
+ $EXE -i -l $t > $TARGETDIR/$b.out
+ diff -b $BASEDIR/$b.out $TARGETDIR/$b.out || HASERROR=1
+done < testlist
+
+if [ -a localtestlist ]
+ then
+ while read t; do
+ echo Running $t...
+ b=`basename $t`
+ $EXE -i -l $t > $TARGETDIR/$b.out
+ diff -b $BASEDIR/$b.out $TARGETDIR/$b.out || HASERROR=1
+ done < localtestlist
+fi
+
+#
+# SPIR-V code generation tests
+#
+while read t; do
+ case $t in
+ \#*)
+ # Skip comment lines in the test list file.
+ ;;
+ *)
+ echo Running SPIR-V $t...
+ b=`basename $t`
+ $EXE -H $t > $TARGETDIR/$b.out
+ diff -b $BASEDIR/$b.out $TARGETDIR/$b.out || HASERROR=1
+ ;;
+ esac
+done < test-spirv-list
+rm -f comp.spv frag.spv geom.spv tesc.spv tese.spv vert.spv
+
+#
+# HLSL -> SPIR-V code generation tests
+#
+while read t; do
+ case $t in
+ \#*)
+ # Skip comment lines in the test list file.
+ ;;
+ *)
+ echo Running HLSL-to-SPIR-V $t...
+ b=`basename $t`
+ $EXE -D -e PixelShaderFunction -H -i $t > $TARGETDIR/$b.out
+ diff -b $BASEDIR/$b.out $TARGETDIR/$b.out || HASERROR=1
+ ;;
+ esac
+done < test-hlsl-spirv-list
+rm -f comp.spv frag.spv geom.spv tesc.spv tese.spv vert.spv
+
+#
+# Preprocessor tests
+#
+while read t; do
+ echo Running Preprocessor $t...
+ b=`basename $t`
+ $EXE -E $t > $TARGETDIR/$b.out 2> $TARGETDIR/$b.err
+ diff -b $BASEDIR/$b.out $TARGETDIR/$b.out || HASERROR=1
+ diff -b $BASEDIR/$b.err $TARGETDIR/$b.err || HASERROR=1
+done < test-preprocessor-list
+
+#
+# grouped shaders for bulk (faster) tests
+#
+function runBulkTest {
+ echo Running $*...
+ $EXE -i -l -t $* > $TARGETDIR/$1.out
+ diff -b $BASEDIR/$1.out $TARGETDIR/$1.out || HASERROR=1
+}
+
+runBulkTest mains1.frag mains2.frag noMain1.geom noMain2.geom
+runBulkTest noMain.vert mains.frag
+runBulkTest link1.frag link2.frag link3.frag
+runBulkTest es-link1.frag es-link2.frag
+runBulkTest recurse1.vert recurse1.frag recurse2.frag
+runBulkTest 300link.frag
+runBulkTest 300link2.frag
+runBulkTest 300link3.frag
+runBulkTest empty.frag empty2.frag empty3.frag
+runBulkTest 150.tesc 150.tese 400.tesc 400.tese 410.tesc 420.tesc 420.tese
+runBulkTest max_vertices_0.geom
+
+#
+# reflection tests
+#
+echo Running reflection...
+$EXE -l -q reflection.vert > $TARGETDIR/reflection.vert.out
+diff -b $BASEDIR/reflection.vert.out $TARGETDIR/reflection.vert.out || HASERROR=1
+
+#
+# multi-threaded test
+#
+echo Comparing single thread to multithread for all tests in current directory...
+$EXE -i *.vert *.geom *.frag *.tes* *.comp > singleThread.out
+$EXE -i *.vert *.geom *.frag *.tes* *.comp -t > multiThread.out
+diff singleThread.out multiThread.out || HASERROR=1
+
+if [ $HASERROR -eq 0 ]
+then
+ echo Tests Succeeded.
+else
+ echo Tests Failed.
+fi
+
+exit $HASERROR
diff --git a/chromium/third_party/glslang/src/Test/sample.frag b/chromium/third_party/glslang/src/Test/sample.frag
new file mode 100644
index 00000000000..014b54a4091
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/sample.frag
@@ -0,0 +1,41 @@
+//
+//Copyright (C) 2002-2004 3Dlabs Inc. Ltd.
+//All rights reserved.
+//
+//Redistribution and use in source and binary forms, with or without
+//modification, are permitted provided that the following conditions
+//are met:
+//
+// Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 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.
+//
+// Neither the name of 3Dlabs Inc. Ltd. nor the names of its
+// contributors may be used to endorse or promote products derived
+// from this software without specific prior written permission.
+//
+//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+//"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 THE
+//COPYRIGHT HOLDERS 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.
+//
+#version 110
+
+varying vec3 color;
+
+void main()
+{
+ gl_FragColor = vec4(color, 1.0);
+}
diff --git a/chromium/third_party/glslang/src/Test/sample.frag.out b/chromium/third_party/glslang/src/Test/sample.frag.out
new file mode 100644
index 00000000000..8885dbac07c
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/sample.frag.out
@@ -0,0 +1,15 @@
+#### BEGIN COMPILER 0 INFO LOG ####
+0:? Sequence
+0:37 Function Definition: main( (void)
+0:37 Function Parameters:
+0:39 Sequence
+0:39 move second child to first child (4-component vector of float)
+0:39 'gl_FragColor' (FragColor 4-component vector of float)
+0:39 Construct vec4 (4-component vector of float)
+0:39 'color' (varying in 3-component vector of float)
+0:39 1.000000 (const float)
+
+#### END COMPILER 0 INFO LOG ####
+#### BEGIN LINKER INFO LOG ####
+
+#### END LINKER INFO LOG ####
diff --git a/chromium/third_party/glslang/src/Test/sample.vert b/chromium/third_party/glslang/src/Test/sample.vert
new file mode 100644
index 00000000000..675bfec117f
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/sample.vert
@@ -0,0 +1,43 @@
+//
+//Copyright (C) 2002-2004 3Dlabs Inc. Ltd.
+//All rights reserved.
+//
+//Redistribution and use in source and binary forms, with or without
+//modification, are permitted provided that the following conditions
+//are met:
+//
+// Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 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.
+//
+// Neither the name of 3Dlabs Inc. Ltd. nor the names of its
+// contributors may be used to endorse or promote products derived
+// from this software without specific prior written permission.
+//
+//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+//"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 THE
+//COPYRIGHT HOLDERS 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.
+//
+#version 110
+
+varying vec3 color;
+
+void main()
+{
+ color = vec3(1.0, 1.0, 1.0);
+
+ gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;
+}
diff --git a/chromium/third_party/glslang/src/Test/sample.vert.out b/chromium/third_party/glslang/src/Test/sample.vert.out
new file mode 100644
index 00000000000..aef6bb144bd
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/sample.vert.out
@@ -0,0 +1,20 @@
+#### BEGIN COMPILER 0 INFO LOG ####
+0:? Sequence
+0:37 Function Definition: main( (void)
+0:37 Function Parameters:
+0:39 Sequence
+0:39 move second child to first child (3-component vector of float)
+0:39 'color' (varying out 3-component vector of float)
+0:39 1.000000 (const float)
+0:39 1.000000 (const float)
+0:39 1.000000 (const float)
+0:41 move second child to first child (4-component vector of float)
+0:41 'gl_Position' (Position 4-component vector of float)
+0:41 matrix-times-vector (4-component vector of float)
+0:41 'gl_ModelViewProjectionMatrix' (uniform 4X4 matrix of float)
+0:41 'gl_Vertex' (attribute 4-component vector of float)
+
+#### END COMPILER 0 INFO LOG ####
+#### BEGIN LINKER INFO LOG ####
+
+#### END LINKER INFO LOG ####
diff --git a/chromium/third_party/glslang/src/Test/simpleFunctionCall.frag b/chromium/third_party/glslang/src/Test/simpleFunctionCall.frag
new file mode 100644
index 00000000000..1adddd562de
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/simpleFunctionCall.frag
@@ -0,0 +1,15 @@
+#version 150
+
+uniform vec4 bigColor;
+varying vec4 BaseColor;
+uniform float d;
+
+vec4 foo()
+{
+ return BaseColor;
+}
+
+void main()
+{
+ gl_FragColor = foo();
+}
diff --git a/chromium/third_party/glslang/src/Test/specExamples.frag b/chromium/third_party/glslang/src/Test/specExamples.frag
new file mode 100644
index 00000000000..177a0a799e5
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/specExamples.frag
@@ -0,0 +1,237 @@
+#version 430
+
+#extension GL_3DL_array_objects : enable
+
+int a = 0xffffffff; // 32 bits, a gets the value -1
+int b = 0xffffffffU; // ERROR: can't convert uint to int
+uint c = 0xffffffff; // 32 bits, c gets the value 0xFFFFFFFF
+uint d = 0xffffffffU; // 32 bits, d gets the value 0xFFFFFFFF
+int e = -1; // the literal is "1", then negation is performed,
+ // and the resulting non-literal 32-bit signed
+ // bit pattern of 0xFFFFFFFF is assigned, giving e
+ // the value of -1.
+uint f = -1u; // the literal is "1u", then negation is performed,
+ // and the resulting non-literal 32-bit unsigned
+ // bit pattern of 0xFFFFFFFF is assigned, giving f
+ // the value of 0xFFFFFFFF.
+int g = 3000000000; // a signed decimal literal taking 32 bits,
+ // setting the sign bit, g gets -1294967296
+int h = 0xA0000000; // okay, 32-bit signed hexadecimal
+int i = 5000000000; // ERROR: needs more than 32 bits
+int j = 0xFFFFFFFFF; // ERROR: needs more that 32 bits
+int k = 0x80000000; // k gets -2147483648 == 0x80000000
+int l = 2147483648; // l gets -2147483648 (the literal set the sign bit)
+
+float fa, fb = 1.5; // single-precision floating-point
+double fc, fd = 2.0LF; // double-precision floating-point
+
+vec2 texcoord1, texcoord2;
+vec3 position;
+vec4 myRGBA;
+ivec2 textureLookup;
+bvec3 less;
+
+mat2 mat2D;
+mat3 optMatrix;
+mat4 view, projection;
+mat4x4 view; // an alternate way of declaring a mat4
+mat3x2 m; // a matrix with 3 columns and 2 rows
+dmat4 highPrecisionMVP;
+dmat2x4 dm;
+
+struct light {
+ float intensity;
+ vec3 position;
+} lightVar;
+
+struct S { float f; };
+
+struct T {
+ //S; // Error: anonymous structures disallowed
+ //struct { ... }; // Error: embedded structures disallowed
+ S s; // Okay: nested structures with name are allowed
+};
+
+float frequencies[3];
+uniform vec4 lightPosition[4];
+light lights[];
+const int numLights = 2;
+light lights[numLights];
+
+in vec3 normal;
+centroid in vec2 TexCoord;
+invariant centroid in vec4 Color;
+noperspective in float temperature;
+flat in vec3 myColor;
+noperspective centroid in vec2 myTexCoord;
+
+uniform vec4 lightPosition;
+uniform vec3 color = vec3(0.7, 0.7, 0.2); // value assigned at link time
+
+in Material {
+ smooth in vec4 Color1; // legal, input inside in block
+ smooth vec4 Color2; // legal, 'in' inherited from 'in Material'
+ vec2 TexCoordA; // legal, TexCoord is an input
+ uniform float Atten; // illegal, mismatched storage qualifier
+
+};
+
+in Light {
+ vec4 LightPos;
+ vec3 LightColor;
+};
+in ColoredTexture {
+ vec4 Color;
+ vec2 TexCoord;
+} Materiala; // instance name
+vec3 Color; // different Color than Material.Color
+
+in vec4 gl_FragCoord; // redeclaration that changes nothing is allowed
+
+// All the following are allowed redeclaration that change behavior
+layout(origin_upper_left) in vec4 gl_FragCoord;
+layout(pixel_center_integer) in vec4 gl_FragCoord;
+layout(origin_upper_left, pixel_center_integer) in vec4 gl_FragCoord;
+
+layout(early_fragment_tests) in;
+
+// compute shader:
+layout (local_size_x = 32, local_size_y = 32) in;
+layout (local_size_x = 8) in;
+
+layout(location = 3) out vec4 color;
+layout(location = 3, index = 1) out vec4 factor;
+layout(location = 2) out vec4 colors[3];
+
+layout (depth_greater) out float gl_FragDepth;
+
+// redeclaration that changes nothing is allowed
+out float gl_FragDepth;
+
+// assume it may be modified in any way
+layout (depth_any) out float gl_FragDepth;
+
+// assume it may be modified such that its value will only increase
+layout (depth_greater) out float gl_FragDepth;
+
+// assume it may be modified such that its value will only decrease
+layout (depth_less) out float gl_FragDepth;
+
+// assume it will not be modified
+layout (depth_unchanged) out float gl_FragDepth;
+
+in vec4 gl_Color; // predeclared by the fragment language
+flat in vec4 gl_Color; // redeclared by user to be flat
+
+
+float[5] foo(float[5])
+{
+ return float[5](3.4, 4.2, 5.0, 5.2, 1.1);
+}
+
+precision highp float;
+precision highp int;
+precision mediump int;
+precision highp float;
+
+void main()
+{
+ {
+ float a[5] = float[5](3.4, 4.2, 5.0, 5.2, 1.1);
+ }
+ {
+ float a[5] = float[](3.4, 4.2, 5.0, 5.2, 1.1); // same thing
+ }
+ {
+ vec4 a[3][2]; // size-3 array of size-2 array of vec4
+ vec4[2] a1[3]; // size-3 array of size-2 array of vec4
+ vec4[3][2] a2; // size-3 array of size-2 array of vec4
+ vec4 b[2] = vec4[2](vec4(0.0), vec4(0.1));
+ vec4[3][2] a3 = vec4[3][2](b, b, b); // constructor
+ void foo(vec4[3][2]); // prototype with unnamed parameter
+ vec4 a4[3][2] = {vec4[2](vec4(0.0), vec4(1.0)),
+ vec4[2](vec4(0.0), vec4(1.0)),
+ vec4[2](vec4(0.0), vec4(1.0)) };
+ }
+ {
+ float a[5];
+ {
+ float b[] = a; // b is explicitly size 5
+ }
+ {
+ float b[5] = a; // means the same thing
+ }
+ {
+ float b[] = float[](1,2,3,4,5); // also explicitly sizes to 5
+ }
+ a.length(); // returns 5
+ }
+ {
+ vec4 a[3][2];
+ a.length(); // this is 3
+ a[x].length(); // this is 2
+ }
+ // for an array b containing a member array a:
+ b[++x].a.length(); // b is never dereferenced, but “++x” is evaluated
+
+ // for an array s of a shader storage object containing a member array a:
+ s[x].a.length(); // s is dereferenced; x needs to be a valid index
+ //
+ //All of the following declarations result in a compile-time error.
+ //float a[2] = { 3.4, 4.2, 5.0 }; // illegal
+ //vec2 b = { 1.0, 2.0, 3.0 }; // illegal
+ //mat3x3 c = { vec3(0.0), vec3(1.0), vec3(2.0), vec3(3.0) }; // illegal
+ //mat2x2 d = { 1.0, 0.0, 0.0, 1.0 }; // illegal, can't flatten nesting
+ //struct {
+ // float a;
+ // int b;
+ //} e = { 1.2, 2, 3 }; // illegal
+
+ struct {
+ float a;
+ int b;
+ } e = { 1.2, 2 }; // legal, all types match
+
+ struct {
+ float a;
+ int b;
+ } e = { 1, 3 }; // legal, first initializer is converted
+
+ //All of the following declarations result in a compile-time error.
+ //int a = true; // illegal
+ //vec4 b[2] = { vec4(0.0), 1.0 }; // illegal
+ //mat4x2 c = { vec3(0.0), vec3(1.0) }; // illegal
+
+ //struct S1 {
+ // vec4 a;
+ // vec4 b;
+ //};
+
+ //struct {
+ // float s;
+ // float t;
+ //} d[] = { S1(vec4(0.0), vec4(1.1)) }; // illegal
+
+ {
+ float a[] = float[](3.4, 4.2, 5.0, 5.2, 1.1);
+ float b[] = { 3.4, 4.2, 5.0, 5.2, 1.1 };
+ float c[] = a; // c is explicitly size 5
+ float d[5] = b; // means the same thing
+ }
+ {
+ const vec3 zAxis = vec3 (0.0, 0.0, 1.0);
+ const float ceiling = a + b; // a and b not necessarily constants
+ }
+ {
+ in vec4 position;
+ in vec3 normal;
+ in vec2 texCoord[4];
+ }
+ {
+ lowp float color;
+ out mediump vec2 P;
+ lowp ivec2 foo(lowp mat3);
+ highp mat4 m;
+ }
+
+}
diff --git a/chromium/third_party/glslang/src/Test/specExamples.vert b/chromium/third_party/glslang/src/Test/specExamples.vert
new file mode 100644
index 00000000000..30f61042d9d
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/specExamples.vert
@@ -0,0 +1,196 @@
+#version 430
+
+#extension GL_3DL_array_objects : enable
+
+out Vertex {
+ vec4 Position; // API transform/feedback will use “Vertex.Position”
+ vec2 Texture;
+} Coords; // shader will use “Coords.Position”
+
+out Vertex2 {
+ vec4 Color; // API will use “Color”
+};
+
+uniform Transform { // API uses “Transform[2]” to refer to instance 2
+ mat4 ModelViewMatrix;
+ mat4 ModelViewProjectionMatrix;
+ vec4 a[]; // array will get implicitly sized
+ float Deformation;
+} transforms[4];
+
+layout(location = 3) in vec4 normal;
+layout(location = 6) in vec4 colors[3];
+layout(location = 9) in mat4 transforms2[2];
+
+layout(location = 3) struct S {
+ vec3 a1;
+ mat2 b;
+ vec4 c[2];
+} s;
+
+layout(triangles, invocations = 6) in;
+
+layout(lines) in; // legal for Color2, input size is 2, matching Color2
+
+layout(triangle_strip, max_vertices = 60) out; // order does not matter
+layout(max_vertices = 60) out; // redeclaration okay
+layout(triangle_strip) out; // redeclaration okay
+//layout(points) out; // error, contradicts triangle_strip
+//layout(max_vertices = 30) out; // error, contradicts 60
+
+layout(stream = 1) out;
+
+layout(stream=1) out; // default is now stream 1
+out vec4 var1; // var1 gets default stream (1)
+layout(stream=2) out Block1 { // "Block1" belongs to stream 2
+ layout(stream=2) vec4 var2; // redundant block member stream decl
+ layout(stream=3) vec2 var3; // ILLEGAL (must match block stream)
+ vec3 var4; // belongs to stream 2
+};
+layout(stream=0) out; // default is now stream 0
+out vec4 var5; // var5 gets default stream (0)
+out Block2 { // "Block2" gets default stream (0)
+ vec4 var6;
+};
+layout(stream=3) out vec4 var7; // var7 belongs to stream 3
+
+layout(shared, column_major) uniform;
+layout(shared, column_major) buffer;
+
+layout(row_major, column_major)
+
+layout(shared, row_major) uniform; // default is now shared and row_major
+
+layout(std140) uniform Transform2 { // layout of this block is std140
+ mat4 M1; // row_major
+ layout(column_major) mat4 M2; // column major
+ mat3 N1; // row_major
+};
+
+layout(column_major) uniform T3 { // shared and column_major
+ mat4 M13; // column_major
+ layout(row_major) mat4 m14; // row major
+ mat3 N12; // column_major
+};
+
+// in one compilation unit...
+layout(binding=3) uniform sampler2D s17; // s bound to unit 3
+
+// in another compilation unit...
+uniform sampler2D s17; // okay, s still bound at 3
+
+// in another compilation unit...
+//layout(binding=4) uniform sampler2D s; // ERROR: contradictory bindings
+
+layout (binding = 2, offset = 4) uniform atomic_uint a2;
+
+layout (binding = 2) uniform atomic_uint bar;
+
+layout (binding = 2, offset = 4) uniform atomic_uint;
+
+layout (binding = 2) uniform atomic_uint bar; // offset is 4
+layout (offset = 8) uniform atomic_uint bar23; // error, no default binding
+
+layout (binding=3, offset=4) uniform atomic_uint a2; // offset = 4
+layout (binding=2) uniform atomic_uint b2; // offset = 0
+layout (binding=3) uniform atomic_uint c2; // offset = 8
+layout (binding=2) uniform atomic_uint d2; // offset = 4
+
+//layout (offset=4) // error, must include binding
+//layout (binding=1, offset=0) a; // okay
+//layout (binding=2, offset=0) b; // okay
+//layout (binding=1, offset=0) c; // error, offsets must not be shared
+// // between a and c
+//layout (binding=1, offset=2) d; // error, overlaps offset 0 of a
+
+flat in vec4 gl_FrontColor; // input to geometry shader, no “gl_in[]”
+flat out vec4 gl_FrontColor; // output from geometry shader
+
+invariant gl_Position; // make existing gl_Position be invariant
+
+out vec3 ColorInv;
+invariant ColorIvn; // make existing Color be invariant
+
+invariant centroid out vec3 Color4;
+precise out vec4 position;
+
+out vec3 Color5;
+precise Color5; // make existing Color be precise
+in vec4 a, b, c, d;
+precise out vec4 v;
+
+coherent buffer Block {
+ readonly vec4 member1;
+ vec4 member2;
+};
+
+buffer Block2a {
+ coherent readonly vec4 member1A;
+ coherent vec4 member2A;
+};
+
+shared vec4 shv;
+
+vec4 funcA(restrict image2D a) { }
+
+vec4 funcB(image2D a) { }
+layout(rgba32f) uniform image2D img1;
+layout(rgba32f) coherent uniform image2D img2;
+
+float func(float e, float f, float g, float h)
+{
+ return (e*f) + (g*h); // no constraint on order or
+ // operator consistency
+}
+
+float func2(float e, float f, float g, float h)
+{
+ precise float result = (e*f) + (g*h); // ensures same precision for
+ // the two multiplies
+ return result;
+}
+
+float func3(float i, float j, precise out float k)
+{
+ k = i * i + j; // precise, due to <k> declaration
+}
+
+void main()
+{
+ vec3 r = vec3(a * b); // precise, used to compute v.xyz
+ vec3 s = vec3(c * d); // precise, used to compute v.xyz
+ v.xyz = r + s; // precise
+ v.w = (a.w * b.w) + (c.w * d.w); // precise
+ v.x = func(a.x, b.x, c.x, d.x); // values computed in func()
+ // are NOT precise
+ v.x = func2(a.x, b.x, c.x, d.x); // precise!
+ func3(a.x * b.x, c.x * d.x, v.x); // precise!
+
+ funcA(img1); // OK, adding "restrict" is allowed
+ funcB(img2); // illegal, stripping "coherent" is not
+
+ {
+ struct light {
+ float intensity;
+ vec3 position;
+ };
+
+ light lightVar = light(3.0, vec3(1.0, 2.0, 3.0));
+ }
+ {
+ const float c[3] = float[3](5.0, 7.2, 1.1);
+ const float d[3] = float[](5.0, 7.2, 1.1);
+
+ float g;
+ float a[5] = float[5](g, 1, g, 2.3, g);
+ float b[3];
+
+ b = float[3](g, g + 1.0, g + 2.0);
+ }
+ {
+ vec4 b[2] = { vec4(1.0), vec4(1.0) };
+ vec4[3][2](b, b, b); // constructor
+ vec4[][2](b, b, b); // constructor, valid, size deduced
+ vec4[3][](b, b, b); // compile-time error, invalid type constructed
+ }
+}
diff --git a/chromium/third_party/glslang/src/Test/spv.100ops.frag b/chromium/third_party/glslang/src/Test/spv.100ops.frag
new file mode 100644
index 00000000000..1265786661d
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/spv.100ops.frag
@@ -0,0 +1,27 @@
+#version 310 es
+
+lowp float foo();
+
+in lowp float low, high;
+
+lowp float face1 = 11.0;
+
+out lowp vec4 Color;
+
+void main()
+{
+ int z = 3;
+
+ if (2.0 * low + 1.0 < high)
+ ++z;
+
+ Color = face1 * vec4(z) + foo();
+}
+
+lowp float face2 = -2.0;
+
+lowp float foo()
+{
+ // testing if face2 initializer insert logic is correct in main
+ return face2;
+}
diff --git a/chromium/third_party/glslang/src/Test/spv.130.frag b/chromium/third_party/glslang/src/Test/spv.130.frag
new file mode 100644
index 00000000000..55a165912df
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/spv.130.frag
@@ -0,0 +1,93 @@
+#version 140
+#extension GL_ARB_texture_gather : enable
+
+vec3 a;
+float b;
+
+in vec4 i;
+out vec4 o;
+out ivec3 io;
+out uvec4 uo;
+
+flat in float fflat;
+smooth in float fsmooth;
+noperspective in float fnop;
+
+uniform samplerCube sampC;
+
+#extension GL_ARB_texture_rectangle : enable
+
+uniform sampler2D samp2D;
+uniform sampler2DShadow samp2DS;
+uniform sampler2DRect samp2DR;
+uniform sampler2DArray samp2DA;
+
+void bar3()
+{
+ o += textureGatherOffset(samp2D, vec2(0.3), ivec2(1));
+ o += textureGatherOffset(samp2DA, vec3(0.3), ivec2(1));
+}
+
+#extension GL_ARB_gpu_shader5 : enable
+
+void bar4()
+{
+ o += textureGatherOffset(samp2DR, vec2(0.3), ivec2(1));
+ o += textureGatherOffset(samp2DS, vec2(0.3), 1.3, ivec2(1));
+ o += textureGatherOffset(samp2D, vec2(0.3), ivec2(1), 2);
+}
+
+#extension GL_ARB_texture_cube_map_array : enable
+
+uniform samplerCubeArray Sca;
+uniform isamplerCubeArray Isca;
+uniform usamplerCubeArray Usca;
+uniform samplerCubeArrayShadow Scas;
+
+void bar5()
+{
+ io = textureSize(Sca, 3);
+ o += texture(Sca, i);
+ io += texture(Isca, i, 0.7).xyz;
+ uo = texture(Usca, i);
+
+ o += textureLod(Sca, i, 1.7);
+ a = textureSize(Scas, 3);
+ float f = texture(Scas, i, i.y);
+ ivec4 c = textureGrad(Isca, i, vec3(0.1), vec3(0.2));
+ o += vec4(a, f + c);
+}
+
+#extension GL_ARB_shading_language_420pack : enable
+
+const int ai[3] = { 10, 23, 32 };
+uniform layout(binding=0) sampler2D bounds;
+
+void bar6()
+{
+ mat4x3 m43;
+ float a1 = m43[3].y;
+ //int a2 = m43.length(); // ERROR until shading_language_420pack is fully implemented
+ const float b = 2 * a1;
+ //a.x = gl_MinProgramTexelOffset + gl_MaxProgramTexelOffset; // ERROR until shading_language_420pack is fully implemented
+}
+
+
+#extension GL_ARB_texture_rectangle : enable
+#extension GL_ARB_shader_texture_lod : require
+
+uniform sampler2D s2D;
+uniform sampler2DRect s2DR;
+uniform sampler2DRectShadow s2DRS;
+uniform sampler1D s1D;
+uniform sampler2DShadow s2DS;
+
+void main()
+{
+ o = textureGather(sampC, vec3(0.2));
+ o.y = gl_ClipDistance[3];
+ bar3();
+ bar4();
+ bar5();
+ bar6();
+} \ No newline at end of file
diff --git a/chromium/third_party/glslang/src/Test/spv.140.frag b/chromium/third_party/glslang/src/Test/spv.140.frag
new file mode 100644
index 00000000000..c7e00573227
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/spv.140.frag
@@ -0,0 +1,46 @@
+#version 140
+
+in vec4 k;
+out vec4 o;
+
+in float gl_ClipDistance[5];
+
+layout(row_major) uniform;
+
+uniform sampler2D samp2Da[3];
+
+layout(std140) uniform bn {
+ layout(row_major) mat4 matra[4];
+ layout(column_major) mat4 matca[4];
+ layout(row_major) mat4 matr;
+ layout(column_major) mat4 matc;
+ mat4 matrdef;
+};
+
+uniform sampler2DRect sampR;
+uniform isamplerBuffer sampB;
+
+float foo();
+
+void main()
+{
+ o.y = gl_ClipDistance[2];
+ o.z = gl_ClipDistance[int(k)];
+ o.w = float(textureSize(sampR) + textureSize(sampB)) / 100.0;
+ o.z = foo();
+}
+
+// Test extra-function initializers
+
+float i1 = gl_FrontFacing ? -2.0 : 2.0;
+float i2 = 102;
+
+float foo()
+{
+ return i1 + i2;
+}
+
+// test arrayed block
+layout(std140) uniform bi {
+ vec3 v[2];
+} bname[4];
diff --git a/chromium/third_party/glslang/src/Test/spv.150.geom b/chromium/third_party/glslang/src/Test/spv.150.geom
new file mode 100644
index 00000000000..0c0dfba63cb
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/spv.150.geom
@@ -0,0 +1,39 @@
+#version 150 core
+
+layout(triangles_adjacency) in;
+layout(max_vertices = 30) out;
+layout(stream = 3, triangle_strip) out;
+
+in fromVertex {
+ in vec3 color;
+} fromV[];
+
+out toFragment {
+ out vec3 color;
+} toF;
+
+out fromVertex {
+ vec3 color;
+};
+
+void main()
+{
+ color = fromV[0].color;
+ //?? gl_ClipDistance[3] = gl_in[1].gl_ClipDistance[2];
+ gl_Position = gl_in[0].gl_Position;
+ gl_PointSize = gl_in[3].gl_PointSize;
+ gl_PrimitiveID = gl_PrimitiveIDIn;
+ gl_Layer = 2;
+
+ EmitVertex();
+
+ color = 2 * fromV[0].color;
+ gl_Position = 2.0 * gl_in[0].gl_Position;
+ gl_PointSize = 2.0 * gl_in[3].gl_PointSize;
+ gl_PrimitiveID = gl_PrimitiveIDIn + 1;
+ gl_Layer = 3;
+
+ EmitVertex();
+
+ EndPrimitive();
+}
diff --git a/chromium/third_party/glslang/src/Test/spv.150.vert b/chromium/third_party/glslang/src/Test/spv.150.vert
new file mode 100644
index 00000000000..c5b6fd24658
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/spv.150.vert
@@ -0,0 +1,38 @@
+#version 150 core
+
+in vec4 iv4;
+
+in float ps;
+in int ui;
+uniform sampler2D s2D;
+
+invariant gl_Position;
+
+struct s1 {
+ int a;
+ int a2;
+ vec4 b[3];
+};
+
+struct s2 {
+ int c;
+ s1 d[4];
+};
+
+out s2 s2out;
+
+void main()
+{
+ gl_Position = iv4;
+ gl_PointSize = ps;
+ gl_ClipDistance[2] = iv4.x;
+ int i;
+ s2out.d[i].b[2].w = ps;
+
+ // test non-implicit lod
+ texture(s2D, vec2(0.5));
+ textureProj(s2D, vec3(0.5));
+ textureLod(s2D, vec2(0.5), 3.2);
+}
+
+out float gl_ClipDistance[4];
diff --git a/chromium/third_party/glslang/src/Test/spv.300BuiltIns.vert b/chromium/third_party/glslang/src/Test/spv.300BuiltIns.vert
new file mode 100644
index 00000000000..847448fb66a
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/spv.300BuiltIns.vert
@@ -0,0 +1,14 @@
+#version 310 es
+
+in mediump float ps;
+
+invariant gl_Position;
+
+void main()
+{
+ gl_Position = vec4(ps);
+ gl_Position *= float(4 - gl_VertexIndex);
+
+ gl_PointSize = ps;
+ gl_PointSize *= float(5 - gl_InstanceIndex);
+}
diff --git a/chromium/third_party/glslang/src/Test/spv.300layout.frag b/chromium/third_party/glslang/src/Test/spv.300layout.frag
new file mode 100644
index 00000000000..69687f6db3a
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/spv.300layout.frag
@@ -0,0 +1,22 @@
+#version 310 es
+
+precision mediump float;
+
+in vec4 pos;
+in vec3 color;
+
+layout(location = 7) out vec3 c;
+layout(LocatioN = 3) out vec4 p[2];
+
+struct S {
+ vec3 c;
+ float f;
+};
+
+in S s;
+
+void main()
+{
+ c = color + s.c;
+ p[1] = pos * s.f;
+}
diff --git a/chromium/third_party/glslang/src/Test/spv.300layout.vert b/chromium/third_party/glslang/src/Test/spv.300layout.vert
new file mode 100644
index 00000000000..df154eb8a7a
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/spv.300layout.vert
@@ -0,0 +1,49 @@
+#version 310 es
+
+layout(location = 7) in vec3 c;
+layout(LocatioN = 3) in vec4 p;
+layout(location = 9) in ivec2 aiv2;
+out vec4 pos;
+out vec3 color;
+flat out int iout;
+
+layout(row_major) uniform; // default is now row_major
+
+layout(std140) uniform Transform { // layout of this block is std140
+ mat4 M1; // row_major
+ layout(column_major) mat4 M2; // column major
+ mat3 N1; // row_major
+ int iuin;
+} tblock;
+
+uniform T2 { // layout of this block is shared
+ bool b;
+ mat4 t2m;
+};
+
+layout(column_major) uniform T3 { // shared and column_major
+ mat4 M3; // column_major
+ layout(row_major) mat4 M4; // row major
+ mat2x3 N2; // column_major
+ uvec3 uv3a[4];
+};
+
+in uint uiuin;
+
+struct S {
+ vec3 c;
+ float f;
+};
+
+out S s;
+
+void main()
+{
+ pos = p * (tblock.M1 + tblock.M2 + M4 + M3 + t2m);
+ color = c * tblock.N1;
+ iout = tblock.iuin + int(uiuin) + aiv2.y;
+ s.c = c;
+ s.f = p.x;
+ if (N2[1] != vec3(1.0) || uv3a[2] != uvec3(5))
+ ++s.c;
+}
diff --git a/chromium/third_party/glslang/src/Test/spv.300layoutp.vert b/chromium/third_party/glslang/src/Test/spv.300layoutp.vert
new file mode 100644
index 00000000000..3b2e6b96d50
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/spv.300layoutp.vert
@@ -0,0 +1,49 @@
+#version 310 es
+
+layout(location = 7) in vec3 c;
+layout(LocatioN = 3) in vec4 p;
+layout(location = 9) in ivec2 aiv2;
+out vec4 pos;
+out vec3 color;
+flat out int iout;
+
+layout(row_major) uniform; // default is now row_major
+
+layout(std140) uniform Transform { // layout of this block is std140
+ mat4 M1; // row_major
+ layout(column_major) mat4 M2; // column major
+ mat3 N1; // row_major
+ int iuin;
+} tblock;
+
+uniform T2 { // layout of this block is shared
+ bool b;
+ mat4 t2m;
+};
+
+layout(column_major) uniform T3 { // shared and column_major
+ mat4 M3; // column_major
+ layout(row_major) mat4 M4; // row major
+ mat2x3 N2; // column_major
+ uvec3 uv3a[4];
+};
+
+uint uiuin;
+
+struct S {
+ vec3 c;
+ float f;
+};
+
+out S s;
+
+void main()
+{
+ pos = p * (tblock.M1 * tblock.M2 * M4 * M3 * t2m);
+ color = c * tblock.N1;
+ iout = tblock.iuin + int(uiuin) + aiv2.y;
+ s.c = c;
+ s.f = p.x;
+ if (N2[1] != vec3(1.0) || uv3a[2] != uvec3(5))
+ ++s.c;
+}
diff --git a/chromium/third_party/glslang/src/Test/spv.310.comp b/chromium/third_party/glslang/src/Test/spv.310.comp
new file mode 100644
index 00000000000..bd183e042be
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/spv.310.comp
@@ -0,0 +1,37 @@
+#version 310 es
+
+precision highp float;
+
+layout (local_size_x = 16, local_size_y = 32, local_size_z = 4) in;
+
+shared float s;
+shared int i;
+
+buffer outb {
+ float f;
+ float g;
+ float h;
+ vec3 uns[];
+} outbname;
+
+buffer outbna {
+ int k;
+ vec4 na;
+} outbnamena;
+
+buffer outs {
+ int s;
+ vec4 va[];
+} outnames;
+
+void main()
+{
+ barrier();
+ outbname.f = s;
+ outbnamena.na = vec4(s);
+ s = outbname.uns[18].x;
+ outbname.uns[17] = vec3(3.0);
+ outbname.uns[i] = vec3(s);
+ outnames.va[gl_LocalInvocationID.x] = vec4(s);
+ outnames.s = outbname.uns.length();
+}
diff --git a/chromium/third_party/glslang/src/Test/spv.330.geom b/chromium/third_party/glslang/src/Test/spv.330.geom
new file mode 100644
index 00000000000..b7962657b84
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/spv.330.geom
@@ -0,0 +1,26 @@
+#version 330 core
+#extension GL_ARB_separate_shader_objects : enable
+
+in gl_PerVertex
+{
+ float gl_ClipDistance[1];
+ vec4 gl_Position;
+} gl_in[];
+
+out gl_PerVertex
+{
+ vec4 gl_Position;
+ float gl_ClipDistance[1];
+};
+
+layout( triangles ) in;
+layout( triangle_strip, max_vertices = 3 ) out;
+
+void main()
+{
+ vec4 v;
+ gl_Position = gl_in[1].gl_Position;
+ gl_ClipDistance[0] = gl_in[1].gl_ClipDistance[0];
+ EmitVertex();
+ EndPrimitive();
+}
diff --git a/chromium/third_party/glslang/src/Test/spv.400.frag b/chromium/third_party/glslang/src/Test/spv.400.frag
new file mode 100644
index 00000000000..58036b1e05a
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/spv.400.frag
@@ -0,0 +1,263 @@
+#version 400 core
+
+in vec2 c2D;
+flat in int i;
+flat in uint u;
+out uint uo;
+out vec4 outp;
+out ivec4 ioutp;
+out uvec4 uoutp;
+uniform sampler2D arrayedSampler[5];
+uniform usampler2DRect samp2dr;
+uniform isampler2DArray isamp2DA;
+uniform sampler2DRectShadow u2drs;
+
+#extension GL_ARB_separate_shader_objects : enable
+
+layout(location = 6) in vec4 vl2;
+
+void foo23()
+{
+ const ivec2[3] offsets = ivec2[3](ivec2(1,2), ivec2(3,4), ivec2(15,16));
+
+ outp.x += textureProjGradOffset(u2drs, outp, vec2(0.0), vec2(0.0), offsets[1]);
+}
+
+void doubles()
+{
+ double doublev;
+ dvec2 dvec2v;
+ dvec3 dvec3v;
+ dvec4 dvec4v;
+
+ bool boolv;
+ bvec2 bvec2v;
+ bvec3 bvec3v;
+ bvec4 bvec4v;
+
+ doublev = sqrt(2.9);
+ dvec2v = sqrt(dvec2(2.7));
+ dvec3v = sqrt(dvec3(2.0));
+ dvec4v = sqrt(dvec4(doublev));
+
+ doublev += inversesqrt(doublev);
+ dvec2v += inversesqrt(dvec2v);
+ dvec3v += inversesqrt(dvec3v);
+ dvec4v += inversesqrt(dvec4v);
+
+ doublev += abs(doublev);
+ dvec2v += abs(dvec2v);
+ dvec3v += abs(dvec3v);
+ dvec4v += abs(dvec4v);
+
+ doublev += sign(doublev);
+ dvec2v += sign(dvec2v);
+ dvec3v += sign(dvec3v);
+ dvec4v += sign(dvec4v);
+
+ doublev += floor(doublev);
+ dvec2v += floor(dvec2v);
+ dvec3v += floor(dvec3v);
+ dvec4v += floor(dvec4v);
+
+ doublev += trunc(doublev);
+ dvec2v += trunc(dvec2v);
+ dvec3v += trunc(dvec3v);
+ dvec4v += trunc(dvec4v);
+
+ doublev += round(doublev);
+ dvec2v += round(dvec2v);
+ dvec3v += round(dvec3v);
+ dvec4v += round(dvec4v);
+
+ doublev += roundEven(doublev);
+ dvec2v += roundEven(dvec2v);
+ dvec3v += roundEven(dvec3v);
+ dvec4v += roundEven(dvec4v);
+
+ doublev += ceil(doublev);
+ dvec2v += ceil(dvec2v);
+ dvec3v += ceil(dvec3v);
+ dvec4v += ceil(dvec4v);
+
+ doublev += fract(doublev);
+ dvec2v += fract(dvec2v);
+ dvec3v += fract(dvec3v);
+ dvec4v += fract(dvec4v);
+
+ doublev += mod(doublev, doublev);
+ dvec2v += mod(dvec2v, doublev);
+ dvec3v += mod(dvec3v, doublev);
+ dvec4v += mod(dvec4v, doublev);
+ dvec2v += mod(dvec2v, dvec2v);
+ dvec3v += mod(dvec3v, dvec3v);
+ dvec4v += mod(dvec4v, dvec4v);
+
+ doublev += modf(doublev, doublev);
+ dvec2v += modf(dvec2v, dvec2v);
+ dvec3v += modf(dvec3v, dvec3v);
+ dvec4v += modf(dvec4v, dvec4v);
+
+ doublev += min(doublev, doublev);
+ dvec2v += min(dvec2v, doublev);
+ dvec3v += min(dvec3v, doublev);
+ dvec4v += min(dvec4v, doublev);
+ dvec2v += min(dvec2v, dvec2v);
+ dvec3v += min(dvec3v, dvec3v);
+ dvec4v += min(dvec4v, dvec4v);
+
+ doublev += max(doublev, doublev);
+ dvec2v += max(dvec2v, doublev);
+ dvec3v += max(dvec3v, doublev);
+ dvec4v += max(dvec4v, doublev);
+ dvec2v += max(dvec2v, dvec2v);
+ dvec3v += max(dvec3v, dvec3v);
+ dvec4v += max(dvec4v, dvec4v);
+
+ doublev += clamp(doublev, doublev, doublev);
+ dvec2v += clamp(dvec2v, doublev, doublev);
+ dvec3v += clamp(dvec3v, doublev, doublev);
+ dvec4v += clamp(dvec4v, doublev, doublev);
+ dvec2v += clamp(dvec2v, dvec2v, dvec2v);
+ dvec3v += clamp(dvec3v, dvec3v, dvec3v);
+ dvec4v += clamp(dvec4v, dvec4v, dvec4v);
+
+ doublev += mix(doublev, doublev, doublev);
+ dvec2v += mix(dvec2v, dvec2v, doublev);
+ dvec3v += mix(dvec3v, dvec3v, doublev);
+ dvec4v += mix(dvec4v, dvec4v, doublev);
+ dvec2v += mix(dvec2v, dvec2v, dvec2v);
+ dvec3v += mix(dvec3v, dvec3v, dvec3v);
+ dvec4v += mix(dvec4v, dvec4v, dvec4v);
+ doublev += mix(doublev, doublev, boolv);
+ dvec2v += mix(dvec2v, dvec2v, bvec2v);
+ dvec3v += mix(dvec3v, dvec3v, bvec3v);
+ dvec4v += mix(dvec4v, dvec4v, bvec4v);
+
+ doublev += step(doublev, doublev);
+ dvec2v += step(dvec2v, dvec2v);
+ dvec3v += step(dvec3v, dvec3v);
+ dvec4v += step(dvec4v, dvec4v);
+ dvec2v += step(doublev, dvec2v);
+ dvec3v += step(doublev, dvec3v);
+ dvec4v += step(doublev, dvec4v);
+
+ doublev += smoothstep(doublev, doublev, doublev);
+ dvec2v += smoothstep(dvec2v, dvec2v, dvec2v);
+ dvec3v += smoothstep(dvec3v, dvec3v, dvec3v);
+ dvec4v += smoothstep(dvec4v, dvec4v, dvec4v);
+ dvec2v += smoothstep(doublev, doublev, dvec2v);
+ dvec3v += smoothstep(doublev, doublev, dvec3v);
+ dvec4v += smoothstep(doublev, doublev, dvec4v);
+
+ boolv = isnan(doublev);
+ bvec2v = isnan(dvec2v);
+ bvec3v = isnan(dvec3v);
+ bvec4v = isnan(dvec4v);
+
+ boolv = boolv ? isinf(doublev) : false;
+ bvec2v = boolv ? isinf(dvec2v) : bvec2(false);
+ bvec3v = boolv ? isinf(dvec3v) : bvec3(false);
+ bvec4v = boolv ? isinf(dvec4v) : bvec4(false);
+
+ doublev += length(doublev);
+ doublev += length(dvec2v);
+ doublev += length(dvec3v);
+ doublev += length(dvec4v);
+
+ doublev += distance(doublev, doublev);
+ doublev += distance(dvec2v, dvec2v);
+ doublev += distance(dvec3v, dvec3v);
+ doublev += distance(dvec4v, dvec4v);
+
+ doublev += dot(doublev, doublev);
+ doublev += dot(dvec2v, dvec2v);
+ doublev += dot(dvec3v, dvec3v);
+ doublev += dot(dvec4v, dvec4v);
+
+ dvec3v += cross(dvec3v, dvec3v);
+
+ doublev += normalize(doublev);
+ dvec2v += normalize(dvec2v);
+ dvec3v += normalize(dvec3v);
+ dvec4v += normalize(dvec4v);
+
+ doublev += faceforward(doublev, doublev, doublev);
+ dvec2v += faceforward(dvec2v, dvec2v, dvec2v);
+ dvec3v += faceforward(dvec3v, dvec3v, dvec3v);
+ dvec4v += faceforward(dvec4v, dvec4v, dvec4v);
+
+ doublev += reflect(doublev, doublev);
+ dvec2v += reflect(dvec2v, dvec2v);
+ dvec3v += reflect(dvec3v, dvec3v);
+ dvec4v += reflect(dvec4v, dvec4v);
+
+ doublev += refract(doublev, doublev, doublev);
+ dvec2v += refract(dvec2v, dvec2v, doublev);
+ dvec3v += refract(dvec3v, dvec3v, doublev);
+ dvec4v += refract(dvec4v, dvec4v, doublev);
+
+ dmat2 dmat2v = outerProduct(dvec2v, dvec2v);
+ dmat3 dmat3v = outerProduct(dvec3v, dvec3v);
+ dmat4 dmat4v = outerProduct(dvec4v, dvec4v);
+ dmat2x3 dmat2x3v = outerProduct(dvec3v, dvec2v);
+ dmat3x2 dmat3x2v = outerProduct(dvec2v, dvec3v);
+ dmat2x4 dmat2x4v = outerProduct(dvec4v, dvec2v);
+ dmat4x2 dmat4x2v = outerProduct(dvec2v, dvec4v);
+ dmat3x4 dmat3x4v = outerProduct(dvec4v, dvec3v);
+ dmat4x3 dmat4x3v = outerProduct(dvec3v, dvec4v);
+
+ dmat2v *= matrixCompMult(dmat2v, dmat2v);
+ dmat3v *= matrixCompMult(dmat3v, dmat3v);
+ dmat4v *= matrixCompMult(dmat4v, dmat4v);
+ dmat2x3v = matrixCompMult(dmat2x3v, dmat2x3v); // For now, relying on no dead-code elimination
+ dmat2x4v = matrixCompMult(dmat2x4v, dmat2x4v);
+ dmat3x2v = matrixCompMult(dmat3x2v, dmat3x2v);
+ dmat3x4v = matrixCompMult(dmat3x4v, dmat3x4v);
+ dmat4x2v = matrixCompMult(dmat4x2v, dmat4x2v);
+ dmat4x3v = matrixCompMult(dmat4x3v, dmat4x3v);
+
+ dmat2v *= transpose(dmat2v);
+ dmat3v *= transpose(dmat3v);
+ dmat4v *= transpose(dmat4v);
+ dmat2x3v = transpose(dmat3x2v); // For now, relying on no dead-code elimination
+ dmat3x2v = transpose(dmat2x3v);
+ dmat2x4v = transpose(dmat4x2v);
+ dmat4x2v = transpose(dmat2x4v);
+ dmat3x4v = transpose(dmat4x3v);
+ dmat4x3v = transpose(dmat3x4v);
+
+ doublev += determinant(dmat2v);
+ doublev += determinant(dmat3v);
+ doublev += determinant(dmat4v);
+
+ dmat2v *= inverse(dmat2v);
+ dmat3v *= inverse(dmat3v);
+ dmat4v *= inverse(dmat4v);
+
+ outp *= float(doublev + dvec2v.y + dvec3v.z + dvec4v.w +
+ dmat2v[1][1] + dmat3v[2][2] + dmat4v[3][3] + dmat2x3v[1][1] + dmat3x2v[1][1] + dmat3x4v[2][2] + dmat4x3v[2][2] + dmat2x4v[1][1] + dmat4x2v[1][1] +
+ float(boolv) + float(bvec2v.x) + float(bvec3v.x) + float(bvec4v.x));
+}
+
+void main()
+{
+ vec4 v;
+ v = texture(arrayedSampler[i], c2D);
+ outp.x = gl_ClipDistance[1];
+ outp.yzw = v.yzw;
+
+ ivec2 offsets[4];
+ const ivec2 constOffsets[4] = ivec2[4](ivec2(1,2), ivec2(3,4), ivec2(15,16), ivec2(-2,0));
+ uoutp = textureGatherOffsets(samp2dr, c2D, constOffsets, 2);
+ outp += textureGather(arrayedSampler[0], c2D);
+ ioutp = textureGatherOffset(isamp2DA, vec3(0.1), ivec2(1), 3);
+ ioutp += textureGatherOffset(isamp2DA, vec3(0.1), ivec2(1), 1+2);
+ ioutp += textureGatherOffset(isamp2DA, vec3(0.1), ivec2(i));
+
+ outp += gl_FragCoord + vl2;
+ uo = u % i;
+ foo23();
+ doubles();
+}
+
diff --git a/chromium/third_party/glslang/src/Test/spv.400.tesc b/chromium/third_party/glslang/src/Test/spv.400.tesc
new file mode 100644
index 00000000000..fa08fcdfdf4
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/spv.400.tesc
@@ -0,0 +1,43 @@
+#version 400 core
+
+layout(vertices = 4) out;
+int outa[gl_out.length()];
+
+patch out vec4 patchOut;
+
+void main()
+{
+ barrier();
+
+ int a = gl_MaxTessControlInputComponents +
+ gl_MaxTessControlOutputComponents +
+ gl_MaxTessControlTextureImageUnits +
+ gl_MaxTessControlUniformComponents +
+ gl_MaxTessControlTotalOutputComponents;
+
+ vec4 p = gl_in[1].gl_Position;
+ float ps = gl_in[1].gl_PointSize;
+ float cd = gl_in[1].gl_ClipDistance[2];
+
+ int pvi = gl_PatchVerticesIn;
+ int pid = gl_PrimitiveID;
+ int iid = gl_InvocationID;
+
+ gl_out[gl_InvocationID].gl_Position = p;
+ gl_out[gl_InvocationID].gl_PointSize = ps;
+ gl_out[gl_InvocationID].gl_ClipDistance[1] = cd;
+
+ gl_TessLevelOuter[3] = 3.2;
+ gl_TessLevelInner[1] = 1.3;
+}
+
+in vec2 inb[];
+in vec2 ind[gl_MaxPatchVertices];
+
+#extension GL_ARB_separate_shader_objects : enable
+
+layout(location = 3) in vec4 ivla[];
+layout(location = 4) in vec4 ivlb[];
+
+layout(location = 3) out vec4 ovla[];
+layout(location = 4) out vec4 ovlb[];
diff --git a/chromium/third_party/glslang/src/Test/spv.400.tese b/chromium/third_party/glslang/src/Test/spv.400.tese
new file mode 100644
index 00000000000..6eb1861f81a
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/spv.400.tese
@@ -0,0 +1,52 @@
+#version 400 core
+
+layout(triangles, ccw) in;
+
+layout(fractional_odd_spacing) in;
+
+layout(point_mode) in;
+
+patch in vec4 patchIn;
+
+void main()
+{
+ int a = gl_MaxTessEvaluationInputComponents +
+ gl_MaxTessEvaluationOutputComponents +
+ gl_MaxTessEvaluationTextureImageUnits +
+ gl_MaxTessEvaluationUniformComponents +
+ gl_MaxTessPatchComponents +
+ gl_MaxPatchVertices +
+ gl_MaxTessGenLevel;
+
+ vec4 p = gl_in[1].gl_Position;
+ float ps = gl_in[1].gl_PointSize;
+ float cd = gl_in[1].gl_ClipDistance[2];
+
+ int pvi = gl_PatchVerticesIn;
+ int pid = gl_PrimitiveID;
+ vec3 tc = gl_TessCoord;
+ float tlo = gl_TessLevelOuter[3];
+ float tli = gl_TessLevelInner[1];
+
+ gl_Position = p;
+ gl_PointSize = ps;
+ gl_ClipDistance[2] = cd;
+}
+
+#extension GL_ARB_separate_shader_objects : enable
+
+in vec2 inb[];
+in vec2 ind[gl_MaxPatchVertices];
+
+in testblb {
+ int f;
+} blb[];
+
+in testbld {
+ int f;
+} bld[gl_MaxPatchVertices];
+
+layout(location = 23) in vec4 ivla[];
+layout(location = 24) in vec4 ivlb[];
+
+layout(location = 23) out vec4 ovla[2];
diff --git a/chromium/third_party/glslang/src/Test/spv.420.geom b/chromium/third_party/glslang/src/Test/spv.420.geom
new file mode 100644
index 00000000000..3c0a0512188
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/spv.420.geom
@@ -0,0 +1,43 @@
+#version 420 core
+
+layout(triangles) in;
+
+in gl_PerVertex {
+ float gl_PointSize;
+} gl_in[];
+
+out gl_PerVertex {
+ float gl_PointSize;
+};
+
+layout(line_strip) out;
+layout(max_vertices = 127) out;
+layout(invocations = 4) in;
+
+uniform sampler2D s2D;
+in vec2 coord[];
+
+int i;
+
+void main()
+{
+ float p = gl_in[1].gl_PointSize;
+ gl_PointSize = p;
+ gl_ViewportIndex = 7;
+
+ EmitStreamVertex(1);
+ EndStreamPrimitive(0);
+ EmitVertex();
+ EndPrimitive();
+ int id = gl_InvocationID;
+
+ const ivec2 offsets[5] =
+ {
+ ivec2(0,1),
+ ivec2(1,-2),
+ ivec2(0,3),
+ ivec2(-3,0),
+ ivec2(2,1)
+ };
+ vec4 v = textureGatherOffset(s2D, coord[0], offsets[i].xy);
+}
diff --git a/chromium/third_party/glslang/src/Test/spv.430.vert b/chromium/third_party/glslang/src/Test/spv.430.vert
new file mode 100644
index 00000000000..82a445738a1
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/spv.430.vert
@@ -0,0 +1,37 @@
+#version 450 core
+
+
+
+out gl_PerVertex {
+ float gl_ClipDistance[];
+};
+
+const float cx = 4.20;
+const float dx = 4.20;
+in vec4 bad[10];
+highp in vec4 badorder;
+out invariant vec4 badorder2;
+out flat vec4 badorder3;
+
+in float f;
+
+void main()
+{
+ gl_ClipDistance[2] = 3.7;
+
+ if (bad[0].x == cx.x)
+ badorder3 = bad[0];
+
+ gl_ClipDistance[0] = f.x;
+}
+
+layout(binding = 3) uniform boundblock { int aoeu; } boundInst;
+layout(binding = 7) uniform anonblock { int aoeu; } ;
+layout(binding = 4) uniform sampler2D sampb1;
+layout(binding = 5) uniform sampler2D sampb2[10];
+layout(binding = 31) uniform sampler2D sampb4;
+
+struct S { mediump float a; highp uvec2 b; highp vec3 c; };
+struct SS { vec4 b; S s; vec4 c; };
+layout(location = 0) flat out SS var;
+out MS { layout(location = 17) float f; } outMS;
diff --git a/chromium/third_party/glslang/src/Test/spv.AofA.frag b/chromium/third_party/glslang/src/Test/spv.AofA.frag
new file mode 100644
index 00000000000..562fc98e9a1
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/spv.AofA.frag
@@ -0,0 +1,43 @@
+#version 430
+
+in float infloat;
+out float outfloat;
+
+uniform uAofA {
+ float f[2][4];
+} nameAofA[3][5];
+
+float[4][5][6] many[1][2][3];
+
+float g4[4][7];
+in float g5[5][7];
+
+flat in int i, j, k;
+
+float[4][7] foo(float a[5][7])
+{
+ float r[7];
+ r = a[2];
+
+ return float[4][7](a[0], a[1], r, a[3]);
+}
+
+void main()
+{
+ outfloat = 0.0;
+
+ g4 = foo(g5);
+
+// if (foo(g5) == g4)
+// ++outfloat;
+
+ float u[][7];
+ u[2][2] = 3.0;
+ float u[5][7];
+
+ foo(u);
+
+ many[i][j][k][i][j][k] = infloat;
+ outfloat += many[j][j][j][j][j][j];
+ outfloat += nameAofA[1][2].f[0][3];
+}
diff --git a/chromium/third_party/glslang/src/Test/spv.Operations.frag b/chromium/third_party/glslang/src/Test/spv.Operations.frag
new file mode 100644
index 00000000000..7dfd7ffe166
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/spv.Operations.frag
@@ -0,0 +1,138 @@
+#version 450
+
+flat in ivec4 uiv4;
+in vec4 uv4;
+bool ub;
+bvec4 ub41, ub42;
+in float uf;
+flat in int ui;
+flat in uvec4 uuv4;
+flat in uint uui;
+
+out vec4 FragColor;
+
+void main()
+{
+ vec4 v;
+ float f;
+ bool b;
+ bvec4 bv4;
+ int i;
+ uint u;
+
+ // floating point
+ v = radians(uv4);
+ v += degrees(v);
+ v += (i = ui*ui, sin(v));
+ v += cos(v);
+ v += tan(v);
+ v += asin(v);
+ v += acos(v);
+
+ v += atan(v);
+ v += sinh(v);
+ v += cosh(v);
+ v += tanh(v);
+ v += asinh(v);
+ v += acosh(v);
+ v += atanh(v);
+
+ v += pow(v, v);
+ v += exp(v);
+ v += log(v);
+ v += exp2(v);
+ v += log2(v);
+ v += sqrt(v);
+ v += inversesqrt(v);
+ v += abs(v);
+ v += sign(v);
+ v += floor(v);
+
+ v += trunc(v);
+ v += round(v);
+ v += roundEven(v);
+
+ v += ceil(v);
+ v += fract(v);
+ v += mod(v, v);
+ v += mod(v, v.x);
+
+ v += modf(v, v);
+
+ v += min(v, uv4);
+ v += max(v, uv4);
+ v += clamp(v, uv4, uv4);
+ v += mix(v,v,v);
+
+ v += mix(v,v,ub41);
+ v += mix(v,v,f);
+//spv v += intBitsToFloat(ui);
+// v += uintBitsToFloat(uui);
+// i += floatBitsToInt(f);
+// u += floatBitsToUint(f);
+ v += fma(v, uv4, v);
+
+ v += step(v,v);
+ v += smoothstep(v,v,v);
+ v += step(uf,v);
+ v += smoothstep(uf,uf,v);
+ v += normalize(v);
+ v += faceforward(v, v, v);
+ v += reflect(v, v);
+ v += refract(v, v, uf);
+ v += dFdx(v);
+ v += dFdy(v);
+ v += fwidth(v);
+
+ // signed integer
+ i += abs(ui);
+ i += sign(i);
+ i += min(i, ui);
+ i += max(i, ui);
+ i += clamp(i, ui, ui);
+
+ // unsigned integer
+ u += min(u, uui);
+ u += max(u, uui);
+ u += clamp(u, uui, uui);
+
+ //// bool
+ b = isnan(uf);
+ b = isinf(f);
+ b = any(lessThan(v, uv4));
+ b = (b && any(lessThanEqual(v, uv4)));
+ b = (b && any(greaterThan(v, uv4)));
+ b = (b && any(greaterThanEqual(v, uv4)));
+ b = (b && any(equal(ub41, ub42)));
+ b = (b && any(notEqual(ub41, ub42)));
+ b = (b && any(ub41));
+ b = (b && all(ub41));
+ b = (b && any(not(ub41)));
+
+ i = ((i + ui) * i - ui) / i;
+ i = i % ui;
+ if (i == ui || i != ui && i == ui ^^ i != 2)
+ ++i;
+
+ f = ((uf + uf) * uf - uf) / uf;
+
+ f += length(v);
+ f += distance(v, v);
+ f += dot(v, v);
+ f += dot(f, uf);
+ f += cross(v.xyz, v.xyz).x;
+
+ if (f == uf || f != uf && f != 2.0)
+ ++f;
+
+ i &= ui;
+ i |= 0x42;
+ i ^= ui;
+ i %= 17;
+ i >>= 2;
+ i <<= ui;
+ i = ~i;
+ b = !b;
+
+ FragColor = b ? vec4(i) + vec4(f) + v : v;
+}
diff --git a/chromium/third_party/glslang/src/Test/spv.accessChain.frag b/chromium/third_party/glslang/src/Test/spv.accessChain.frag
new file mode 100644
index 00000000000..faf0ddd1284
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/spv.accessChain.frag
@@ -0,0 +1,94 @@
+#version 420
+
+struct S
+{
+ vec3 color;
+};
+
+layout(location = 0) out vec3 OutColor;
+
+flat in int u;
+
+void GetColor1(const S i)
+{
+ OutColor += i.color.x;
+}
+
+void GetColor2(const S i, int comp)
+{
+ OutColor += i.color[comp];
+}
+
+void GetColor3(const S i, int comp)
+{
+ OutColor += i.color[comp].x;
+}
+
+void GetColor4(const S i, int comp)
+{
+ OutColor += i.color[comp].x;
+}
+
+void GetColor5(const S i, int comp)
+{
+ OutColor += i.color;
+}
+
+void GetColor6(const S i, int comp)
+{
+ OutColor += i.color.yx[comp];
+}
+
+void GetColor7(const S i, int comp)
+{
+ OutColor.xy += i.color.yxz.yx;
+}
+
+void GetColor8(const S i, int comp)
+{
+ OutColor += i.color.yzx.yx.x.x;
+}
+
+void GetColor9(const S i, int comp)
+{
+ OutColor.zxy += i.color;
+}
+
+void GetColor10(const S i, int comp)
+{
+ OutColor.zy += i.color.xy;
+}
+
+void GetColor11(const S i, int comp)
+{
+ OutColor.zxy.yx += i.color.xy;
+}
+
+void GetColor12(const S i, int comp)
+{
+ OutColor[comp] += i.color.x;
+}
+
+void GetColor13(const S i, int comp)
+{
+ // OutColor.zy[comp] += i.color.x; // not yet supported
+}
+
+void main()
+{
+ S s;
+ OutColor = vec3(0.0);
+ GetColor1(s);
+ GetColor2(s, u);
+ GetColor3(s, u);
+ GetColor4(s, u);
+ GetColor5(s, u);
+ GetColor6(s, u);
+ GetColor7(s, u);
+ GetColor8(s, u);
+ GetColor9(s, u);
+ GetColor10(s, u);
+ GetColor11(s, u);
+ GetColor12(s, u);
+ GetColor13(s, u);
+}
diff --git a/chromium/third_party/glslang/src/Test/spv.aggOps.frag b/chromium/third_party/glslang/src/Test/spv.aggOps.frag
new file mode 100644
index 00000000000..1a889ffd856
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/spv.aggOps.frag
@@ -0,0 +1,51 @@
+#version 450
+
+uniform sampler2D samp2D;
+in mediump vec2 coord;
+
+in vec4 u, w;
+out vec4 color;
+
+struct s1 {
+ int i;
+ float f;
+};
+
+struct s2 {
+ int i;
+ float f;
+ s1 s1_1;
+};
+
+layout(std140) uniform ub1 { s2 foo2a; } uName1;
+layout(std430) buffer ub2 { s2 foo2b; } uName2;
+
+void main()
+{
+ vec4 v;
+ s1 a[3], b[3];
+ a = s1[3](s1(int(u.x), u.y), s1(int(u.z), u.w), s1(14, 14.0));
+ b = s1[3](s1(17, 17.0), s1(int(w.x), w.y), s1(int(w.z), w.w));
+
+ if (uName1.foo2a == uName2.foo2b)
+ v = texture(samp2D, coord);
+ else
+ v = texture(samp2D, 2.0*coord);
+
+ if (u == v)
+ v *= 3.0;
+
+ if (u != v)
+ v *= 4.0;
+
+ if (coord == v.yw)
+ v *= 5.0;
+
+ if (a == b)
+ v *= 6.0;
+
+ if (a != b)
+ v *= 7.0;
+
+ color = v;
+}
diff --git a/chromium/third_party/glslang/src/Test/spv.always-discard.frag b/chromium/third_party/glslang/src/Test/spv.always-discard.frag
new file mode 100644
index 00000000000..2d7d38950d9
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/spv.always-discard.frag
@@ -0,0 +1,36 @@
+#version 140
+in vec2 tex_coord;
+
+void main (void)
+{
+ vec4 white = vec4(1.0);
+ vec4 black = vec4(0.2);
+ vec4 color = white;
+
+ // First, cut out our circle
+ float x = tex_coord.x*2.0 - 1.0;
+ float y = tex_coord.y*2.0 - 1.0;
+
+ float radius = sqrt(x*x + y*y);
+ if (radius > 1.0) {
+ if (radius > 1.1) {
+ ++color;
+ }
+
+ gl_FragColor = color;
+
+ if (radius > 1.2) {
+ ++color;
+ }
+
+ }
+
+ discard;
+
+ // If we're near an edge, darken us a tiny bit
+ if (radius >= 0.75)
+ color -= abs(pow(radius, 16.0)/2.0);
+
+ gl_FragColor = color;
+
+}
diff --git a/chromium/third_party/glslang/src/Test/spv.always-discard2.frag b/chromium/third_party/glslang/src/Test/spv.always-discard2.frag
new file mode 100644
index 00000000000..3005e48a33b
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/spv.always-discard2.frag
@@ -0,0 +1,19 @@
+#version 140
+in vec2 tex_coord;
+
+void main (void)
+{
+ vec4 white = vec4(1.0);
+ vec4 black = vec4(0.2);
+ vec4 color = white;
+
+ // First, cut out our circle
+ float x = tex_coord.x*2.0 - 1.0;
+ float y = tex_coord.y*2.0 - 1.0;
+
+ discard;
+
+
+ gl_FragColor = color;
+
+}
diff --git a/chromium/third_party/glslang/src/Test/spv.atomic.comp b/chromium/third_party/glslang/src/Test/spv.atomic.comp
new file mode 100644
index 00000000000..827adefe2b2
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/spv.atomic.comp
@@ -0,0 +1,47 @@
+#version 310 es
+
+#extension GL_ARB_gl_spirv : enable
+
+layout(binding = 0) uniform atomic_uint counter;
+
+layout(binding = 0, offset = 4) uniform atomic_uint countArr[4];
+shared uint value;
+
+int arrX[gl_WorkGroupSize.x];
+int arrY[gl_WorkGroupSize.y];
+int arrZ[gl_WorkGroupSize.z];
+
+uint func(atomic_uint c)
+{
+ return atomicCounterIncrement(c);
+}
+
+void main()
+{
+ memoryBarrierAtomicCounter();
+ func(counter);
+ uint val = atomicCounter(countArr[2]);
+ atomicCounterDecrement(counter);
+}
+
+shared int atomi;
+shared uint atomu;
+
+layout (std140, binding = 0) restrict buffer dataSSB
+{
+ float f;
+ ivec4 n_frames_rendered;
+} result;
+
+void atoms()
+{
+ int origi = atomicAdd(atomi, 3);
+ uint origu = atomicAnd(atomu, value);
+ origu = atomicOr(atomu, 7u);
+ origu = atomicXor(atomu, 7u);
+ origu = atomicMin(atomu, value);
+ origi = atomicMax(atomi, 7);
+ origi = atomicExchange(atomi, origi);
+ origu = atomicCompSwap(atomu, 10u, value);
+ atomicAdd(result.n_frames_rendered.z, 1);
+}
diff --git a/chromium/third_party/glslang/src/Test/spv.bitCast.frag b/chromium/third_party/glslang/src/Test/spv.bitCast.frag
new file mode 100644
index 00000000000..8bd1e91e99e
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/spv.bitCast.frag
@@ -0,0 +1,45 @@
+#version 450
+
+flat in int i1;
+flat in ivec2 i2;
+flat in ivec3 i3;
+flat in ivec4 i4;
+
+flat in uint u1;
+flat in uvec2 u2;
+flat in uvec3 u3;
+flat in uvec4 u4;
+
+in float f1;
+in vec2 f2;
+in vec3 f3;
+in vec4 f4;
+
+out vec4 fragColor;
+
+void main()
+{
+ ivec4 idata = ivec4(0);
+ idata.x += floatBitsToInt(f1);
+ idata.xy += floatBitsToInt(f2);
+ idata.xyz += floatBitsToInt(f3);
+ idata += floatBitsToInt(f4);
+
+ uvec4 udata = uvec4(0);
+ udata.x += floatBitsToUint(f1);
+ udata.xy += floatBitsToUint(f2);
+ udata.xyz += floatBitsToUint(f3);
+ udata += floatBitsToUint(f4);
+
+ vec4 fdata = vec4(0.0);
+ fdata.x += intBitsToFloat(i1);
+ fdata.xy += intBitsToFloat(i2);
+ fdata.xyz += intBitsToFloat(i3);
+ fdata += intBitsToFloat(i4);
+ fdata.x += uintBitsToFloat(u1);
+ fdata.xy += uintBitsToFloat(u2);
+ fdata.xyz += uintBitsToFloat(u3);
+ fdata += uintBitsToFloat(u4);
+
+ fragColor = (idata == udata) ? fdata : fdata + vec4(0.2);
+} \ No newline at end of file
diff --git a/chromium/third_party/glslang/src/Test/spv.bool.vert b/chromium/third_party/glslang/src/Test/spv.bool.vert
new file mode 100644
index 00000000000..cc8a1857b90
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/spv.bool.vert
@@ -0,0 +1,17 @@
+#version 450
+
+const bool condition = false;
+
+uniform ubname {
+ bool b;
+} ubinst;
+
+bool foo(bool b)
+{
+ return b != condition;
+}
+
+void main()
+{
+ gl_Position = foo(ubinst.b) ? vec4(0.0) : vec4(1.0);
+}
diff --git a/chromium/third_party/glslang/src/Test/spv.boolInBlock.frag b/chromium/third_party/glslang/src/Test/spv.boolInBlock.frag
new file mode 100644
index 00000000000..71866facfa6
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/spv.boolInBlock.frag
@@ -0,0 +1,31 @@
+#version 450
+
+layout(binding = 0, std140) uniform Uniform
+{
+ bvec4 b4;
+};
+
+layout(binding = 1, std430) buffer Buffer
+{
+ bvec2 b2;
+};
+
+void foo(bvec4 paramb4, out bvec2 paramb2)
+{
+ bool b1 = paramb4.z;
+ paramb2 = bvec2(b1);
+}
+
+layout(location = 0) out vec4 fragColor;
+
+void main()
+{
+ b2 = bvec2(0.0);
+ if (b4.z)
+ b2 = bvec2(b4.x);
+ if (b2.x)
+ foo(b4, b2);
+
+ fragColor = vec4(b4.x && b4.y);
+ fragColor -= vec4(b4.x || b4.y);
+} \ No newline at end of file
diff --git a/chromium/third_party/glslang/src/Test/spv.branch-return.vert b/chromium/third_party/glslang/src/Test/spv.branch-return.vert
new file mode 100644
index 00000000000..4b2f5d447cd
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/spv.branch-return.vert
@@ -0,0 +1,10 @@
+#version 310 es
+void main() {
+ switch (gl_InstanceIndex) {
+ case 0: return;
+ case 1: gl_Position = vec4(0.0); break;
+ case 2: return;
+ case 3: return;
+ }
+ gl_Position.x += 0.123;
+}
diff --git a/chromium/third_party/glslang/src/Test/spv.conditionalDiscard.frag b/chromium/third_party/glslang/src/Test/spv.conditionalDiscard.frag
new file mode 100644
index 00000000000..7e52e436e60
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/spv.conditionalDiscard.frag
@@ -0,0 +1,14 @@
+#version 400
+
+uniform sampler2D tex;
+in vec2 coord;
+
+void main (void)
+{
+ vec4 v = texture(tex, coord);
+
+ if (v == vec4(0.1,0.2,0.3,0.4))
+ discard;
+
+ gl_FragColor = v;
+}
diff --git a/chromium/third_party/glslang/src/Test/spv.conversion.frag b/chromium/third_party/glslang/src/Test/spv.conversion.frag
new file mode 100644
index 00000000000..1a13279763f
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/spv.conversion.frag
@@ -0,0 +1,112 @@
+#version 140
+
+bool u_b;
+bvec2 u_b2;
+bvec3 u_b3;
+bvec4 u_b4;
+
+int u_i;
+ivec2 u_i2;
+ivec3 u_i3;
+ivec4 u_i4;
+
+float u_f;
+vec2 u_f2;
+vec3 u_f3;
+vec4 u_f4;
+
+bool i_b;
+bvec2 i_b2;
+bvec3 i_b3;
+bvec4 i_b4;
+
+flat in int i_i;
+flat in ivec2 i_i2;
+flat in ivec3 i_i3;
+flat in ivec4 i_i4;
+
+in float i_f;
+in vec2 i_f2;
+in vec3 i_f3;
+in vec4 i_f4;
+
+void main()
+{
+ bool b = bool(u_i) ^^ bool(u_f);
+ bvec2 b2 = bvec2(u_i, u_f);
+ bvec3 b3 = bvec3(u_i, u_f, i_i);
+ bvec4 b4 = bvec4(u_i, u_f, i_i, i_f);
+
+ int i = int(u_f) + int(b);
+ ivec2 i2 = ivec2(u_f2) + ivec2(b2);
+ ivec3 i3 = ivec3(u_f3) + ivec3(b3);
+ ivec4 i4 = ivec4(u_f4) + ivec4(b4);
+
+ float f = i;
+ vec2 f2 = i2;
+ vec3 f3 = i3;
+ vec4 f4 = i4;
+
+ f += (float(i) + float(b));
+ f2 -= vec2(i2) + vec2(b2);
+ f3 /= vec3(i3) + vec3(b3);
+ f4 += vec4(i4) + vec4(b4);
+
+ f4 += vec4(bvec4(i_i4));
+ f4 += vec4(bvec4(u_f4));
+
+ f += f - i;
+ f2 += vec2(f, i) + i2;
+ f3 += i3 + vec3(f, i, f);
+ f4 += vec4(b, i, f, i) + i4;
+
+ f2 += vec2(f, i) * i;
+ f3 += vec3(f, i, f) + i;
+ f4 += i - vec4(b, i, f, i);
+
+ i2 += ivec2(f, i);
+ i3 += ivec3(f, i, f);
+ i4 += ivec4(b, i, f, i);
+
+ if (f < i || i < f ||
+ f2 == i2 ||
+ i3 != f3)
+ f = (b ? i : f2.x) + (b2.x ? f3.x : i2.y);
+
+ gl_FragColor =
+ b ||
+ b2.x ||
+ b2.y ||
+ b3.x ||
+ b3.y ||
+ b3.z ||
+ b4.x ||
+ b4.y ||
+ b4.z ||
+ b4.w ? vec4(
+ i +
+ i2.x +
+ i2.y +
+ i3.x +
+ i3.y +
+ i3.z +
+ i4.x +
+ i4.y +
+ i4.z +
+ i4.w +
+ f +
+ f2.x +
+ f2.y +
+ f3.x +
+ f3.y +
+ f3.z +
+ f4.x +
+ f4.y +
+ f4.z +
+ f4.w) : vec4(1.0);
+
+ // with constants...
+ ivec4 cv2 = ivec4(1.0);
+ bvec4 cv5 = bvec4(cv2);
+ gl_FragColor += float(cv5);
+}
diff --git a/chromium/third_party/glslang/src/Test/spv.dataOut.frag b/chromium/third_party/glslang/src/Test/spv.dataOut.frag
new file mode 100644
index 00000000000..7f4208afb39
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/spv.dataOut.frag
@@ -0,0 +1,8 @@
+#version 140
+
+in vec4 Color;
+
+void main()
+{
+ gl_FragData[1] = Color;
+}
diff --git a/chromium/third_party/glslang/src/Test/spv.dataOutIndirect.frag b/chromium/third_party/glslang/src/Test/spv.dataOutIndirect.frag
new file mode 100644
index 00000000000..1d8795f57c0
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/spv.dataOutIndirect.frag
@@ -0,0 +1,12 @@
+#version 140
+
+in vec4 Color;
+
+out vec4 fcolor[4];
+
+uniform b { int i; } bName;
+
+void main()
+{
+ fcolor[bName.i] = Color;
+}
diff --git a/chromium/third_party/glslang/src/Test/spv.dataOutIndirect.vert b/chromium/third_party/glslang/src/Test/spv.dataOutIndirect.vert
new file mode 100644
index 00000000000..8606d9f3d2c
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/spv.dataOutIndirect.vert
@@ -0,0 +1,12 @@
+#version 140
+
+attribute vec4 color;
+out vec4 colorOut[6];
+
+void main()
+{
+ for (int i = 1; i < 5; ++i)
+ colorOut[i] = color;
+
+ gl_Position = colorOut[2];
+}
diff --git a/chromium/third_party/glslang/src/Test/spv.deepRvalue.frag b/chromium/third_party/glslang/src/Test/spv.deepRvalue.frag
new file mode 100644
index 00000000000..49c348ec4e4
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/spv.deepRvalue.frag
@@ -0,0 +1,36 @@
+#version 330
+
+uniform sampler2D samp2D;
+
+vec4 v1 = vec4(2.0, 3.0, 5.0, 7.0);
+vec4 v2 = vec4(11.0, 13.0, 17.0, 19.0);
+vec4 v3 = vec4(23.0, 29.0, 31.0, 37.0);
+vec4 v4 = vec4(41.0, 43.0, 47.0, 53.0);
+
+struct str {
+ int a;
+ vec2 b[3];
+ bool c;
+};
+
+void main()
+{
+ mat4 m = mat4(v1, v2, v3, v4);
+
+ mat4 mm = matrixCompMult(m, m);
+ float f = mm[1].w; // should be 19 * 19 = 361
+
+ // do a deep access to a spontaneous r-value
+ float g = matrixCompMult(m, m)[2].y; // should be 29 * 29 = 841
+
+ float h = str(1, vec2[3](vec2(2.0, 3.0), vec2(4.0, 5.0), vec2(6.0, 7.0)), true).b[1][1]; // should be 5.0
+
+ float i = texture(samp2D, vec2(0.5,0.5)).y;
+
+ i += (i > 0.1 ? v1 : v2)[3];
+
+ str t;
+ i += (t = str(1, vec2[3](vec2(2.0, 3.0), vec2(4.0, 5.0), vec2(6.0, 7.0)), true)).b[2].y; // should be 7.0
+
+ gl_FragColor = vec4(f, g, h, i);
+}
diff --git a/chromium/third_party/glslang/src/Test/spv.depthOut.frag b/chromium/third_party/glslang/src/Test/spv.depthOut.frag
new file mode 100644
index 00000000000..d90fc0f8cd2
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/spv.depthOut.frag
@@ -0,0 +1,11 @@
+#version 450
+
+in vec4 Color;
+in float Depth;
+
+layout(depth_greater) out float gl_FragDepth;
+
+void main()
+{
+ gl_FragDepth = Depth;
+}
diff --git a/chromium/third_party/glslang/src/Test/spv.discard-dce.frag b/chromium/third_party/glslang/src/Test/spv.discard-dce.frag
new file mode 100644
index 00000000000..b4a708d5044
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/spv.discard-dce.frag
@@ -0,0 +1,35 @@
+#version 140
+in vec2 tex_coord;
+
+void main (void)
+{
+ vec4 white = vec4(1.0);
+ vec4 black = vec4(0.2);
+ vec4 color = white;
+
+ // First, cut out our circle
+ float x = tex_coord.x*2.0 - 1.0;
+ float y = tex_coord.y*2.0 - 1.0;
+
+ float radius = sqrt(x*x + y*y);
+ if (radius > 1.0) {
+ if (radius > 1.1) {
+ ++color;
+ }
+
+ gl_FragColor = color;
+
+ if (radius > 1.2) {
+ ++color;
+ }
+
+ discard;
+ }
+
+ // If we're near an edge, darken us a tiny bit
+ if (radius >= 0.75)
+ color -= abs(pow(radius, 16.0)/2.0);
+
+ gl_FragColor = color;
+
+}
diff --git a/chromium/third_party/glslang/src/Test/spv.do-simple.vert b/chromium/third_party/glslang/src/Test/spv.do-simple.vert
new file mode 100644
index 00000000000..77677a6df94
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/spv.do-simple.vert
@@ -0,0 +1,7 @@
+#version 310 es
+void main() {
+ int i = 0;
+ do {
+ i++;
+ } while(i<10);
+}
diff --git a/chromium/third_party/glslang/src/Test/spv.do-while-continue-break.vert b/chromium/third_party/glslang/src/Test/spv.do-while-continue-break.vert
new file mode 100644
index 00000000000..c085551e8b6
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/spv.do-while-continue-break.vert
@@ -0,0 +1,20 @@
+#version 310 es
+void main() {
+ int i = 0;
+ int A, B, C, D, E, F, G;
+ do {
+ A = 0;
+ if (i == 2) {
+ B = 1;
+ continue;
+ C = 2;
+ }
+ if (i == 5) {
+ D = 3;
+ break;
+ E = 42;
+ }
+ F = 99;
+ } while (++i < 19);
+ G = 12;
+}
diff --git a/chromium/third_party/glslang/src/Test/spv.doWhileLoop.frag b/chromium/third_party/glslang/src/Test/spv.doWhileLoop.frag
new file mode 100644
index 00000000000..685fe419cb4
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/spv.doWhileLoop.frag
@@ -0,0 +1,16 @@
+#version 140
+
+in vec4 bigColor;
+in vec4 BaseColor;
+in float d;
+
+void main()
+{
+ vec4 color = BaseColor;
+
+ do {
+ color += bigColor;
+ } while (color.x < d);
+
+ gl_FragColor = color;
+}
diff --git a/chromium/third_party/glslang/src/Test/spv.double.comp b/chromium/third_party/glslang/src/Test/spv.double.comp
new file mode 100644
index 00000000000..51434cab0f3
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/spv.double.comp
@@ -0,0 +1,25 @@
+#version 430
+
+const double d1 = 3.1415926535897932384626433832795LF;
+const double d2 = 3.1415;
+const double d3 = 3.1415926535897932384626433832795LF;
+const double d4 = 3.1415926535897932384626433832795;
+
+buffer bufName {
+ float f;
+ double d;
+} bufInst;
+
+
+uniform writeonly image2D destTex;
+
+void main()
+{
+ bufInst.d = float(d1);
+ bufInst.f = float(d1 + d2 + d3 + d4);
+
+ ivec2 storePos = ivec2(gl_GlobalInvocationID.xy);
+ double localCoef = length(vec2(ivec2(gl_LocalInvocationID.xy)-8)/8.0);
+ dvec4 aa = dvec4(0.4, 0.2, 0.3, 0.4);
+ double globalCoef = 1.0;
+}
diff --git a/chromium/third_party/glslang/src/Test/spv.earlyReturnDiscard.frag b/chromium/third_party/glslang/src/Test/spv.earlyReturnDiscard.frag
new file mode 100644
index 00000000000..43e4666c542
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/spv.earlyReturnDiscard.frag
@@ -0,0 +1,102 @@
+#version 140
+
+in float d;
+in vec4 bigColor, smallColor;
+in vec4 otherColor;
+
+in float c;
+
+in float threshhold;
+in float threshhold2;
+in float threshhold3;
+
+in float minimum;
+
+in vec4 BaseColor;
+
+bool b;
+
+void main()
+{
+ vec4 color = BaseColor;
+ vec4 color2;
+
+ color2 = otherColor;
+
+ if (c > d)
+ color += bigColor;
+ else
+ color += smallColor;
+
+ if (color.z < minimum)
+ return;
+
+ color.z++;
+
+ if (color.z > threshhold)
+ discard;
+
+ color++;
+
+ // Two path, different rest
+ if (color.w > threshhold2) {
+ if (color.z > threshhold2)
+ return;
+ else if (b)
+ color.z++;
+ else {
+ if (color.x < minimum) {
+ discard;
+ } else {
+ color++;
+ }
+ }
+ } else {
+ if (b)
+ discard;
+ else
+ return;
+ }
+
+
+ // // Two path, shared rest
+ // if (color.w > threshhold2) {
+ // if (color.z > threshhold2)
+ // return;
+ // else if (b)
+ // color++;
+ // else {
+ // if (color.x < minimum) {
+ // discard;
+ // } else {
+ // color++;
+ // }
+ // }
+ // } else {
+ // if (b)
+ // discard;
+ // else
+ // return;
+ // }
+
+
+ // // One path
+ // if (color.w > threshhold2) {
+ // if (color.z > threshhold2)
+ // return;
+ // else {
+ // if (color.x < minimum) {
+ // discard;
+ // } else {
+ // color++;
+ // }
+ // }
+ // } else {
+ // if (b)
+ // discard;
+ // else
+ // return;
+ // }
+
+ gl_FragColor = color * color2;
+}
diff --git a/chromium/third_party/glslang/src/Test/spv.flowControl.frag b/chromium/third_party/glslang/src/Test/spv.flowControl.frag
new file mode 100644
index 00000000000..8d343df786f
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/spv.flowControl.frag
@@ -0,0 +1,23 @@
+#version 140
+
+in float d;
+in vec4 bigColor, smallColor;
+in vec4 otherColor;
+
+in float c;
+in vec4 BaseColor;
+
+void main()
+{
+ vec4 color = BaseColor;
+ vec4 color2;
+
+ color2 = otherColor;
+
+ if (c > d)
+ color += bigColor;
+ else
+ color += smallColor;
+
+ gl_FragColor = color * color2;
+}
diff --git a/chromium/third_party/glslang/src/Test/spv.for-complex-condition.vert b/chromium/third_party/glslang/src/Test/spv.for-complex-condition.vert
new file mode 100644
index 00000000000..81dd648974a
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/spv.for-complex-condition.vert
@@ -0,0 +1,7 @@
+#version 450
+layout(location=0) out highp int r;
+layout(location=0) in lowp int flag;
+void main() {
+ int i;
+ for (i=0; i < (flag==1 ? 10 : 15) ; i++) { r = i; }
+}
diff --git a/chromium/third_party/glslang/src/Test/spv.for-continue-break.vert b/chromium/third_party/glslang/src/Test/spv.for-continue-break.vert
new file mode 100644
index 00000000000..afa31f2b3e8
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/spv.for-continue-break.vert
@@ -0,0 +1,20 @@
+#version 310 es
+void main() {
+ int i;
+ int A, B, C, D, E, F, G;
+ for (i=0; i < 10 ; i++) {
+ A = 1;
+ if (i%2 ==0) {
+ B = 1;
+ continue;
+ C = 1;
+ }
+ if (i%3 == 0) {
+ D = 1;
+ break;
+ E = 1;
+ }
+ F = 12;
+ }
+ G = 99;
+}
diff --git a/chromium/third_party/glslang/src/Test/spv.for-nobody.vert b/chromium/third_party/glslang/src/Test/spv.for-nobody.vert
new file mode 100644
index 00000000000..99634761c8c
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/spv.for-nobody.vert
@@ -0,0 +1,7 @@
+#version 450
+layout(location=0) out highp int r;
+void main() {
+ int i;
+ for (i=0; i<10; i++);
+ r = i;
+}
diff --git a/chromium/third_party/glslang/src/Test/spv.for-notest.vert b/chromium/third_party/glslang/src/Test/spv.for-notest.vert
new file mode 100644
index 00000000000..f40e66644c7
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/spv.for-notest.vert
@@ -0,0 +1,6 @@
+#version 450
+layout(location=0) out highp int r;
+void main() {
+ int i;
+ for (i=0; ; i++) { r = i; }
+}
diff --git a/chromium/third_party/glslang/src/Test/spv.for-simple.vert b/chromium/third_party/glslang/src/Test/spv.for-simple.vert
new file mode 100644
index 00000000000..a5be6db2d50
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/spv.for-simple.vert
@@ -0,0 +1,8 @@
+#version 310 es
+void main() {
+ int i;
+ int j;
+ for (i=0; i < 10 ; i++) {
+ j = 12;
+ }
+}
diff --git a/chromium/third_party/glslang/src/Test/spv.forLoop.frag b/chromium/third_party/glslang/src/Test/spv.forLoop.frag
new file mode 100644
index 00000000000..a96f50d5320
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/spv.forLoop.frag
@@ -0,0 +1,41 @@
+#version 140
+
+in vec4 bigColor;
+in vec4 BaseColor;
+in float f;
+
+flat in int Count;
+flat in uvec4 v4;
+
+void main()
+{
+ vec4 color = BaseColor;
+
+ for (int i = 0; i < Count; ++i) {
+ color += bigColor;
+ }
+
+ gl_FragColor = color;
+
+ float sum = 0.0;
+ for (int i = 0; i < 4; ++i)
+ sum += v4[i];
+
+ vec4 tv4;
+
+ for (int i = 0; i < 4; ++i)
+ tv4[i] = v4[i] * 4u;
+
+ gl_FragColor += vec4(sum) + tv4;
+
+ vec4 r;
+ r.xyz = BaseColor.xyz;
+
+ for (int i = 0; i < Count; ++i)
+ r.w = f;
+
+ gl_FragColor.xyz += r.xyz;
+
+ for (int i = 0; i < 16; i += 4)
+ gl_FragColor *= f;
+}
diff --git a/chromium/third_party/glslang/src/Test/spv.forwardFun.frag b/chromium/third_party/glslang/src/Test/spv.forwardFun.frag
new file mode 100644
index 00000000000..c52cefd153a
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/spv.forwardFun.frag
@@ -0,0 +1,39 @@
+#version 140
+
+precision mediump float;
+
+in vec4 bigColor;
+in vec4 BaseColor;
+in float d;
+
+void bar();
+float foo(vec4);
+float unreachableReturn();
+
+void main()
+{
+ vec4 color = vec4(foo(BaseColor));
+
+ bar();
+ float f = unreachableReturn();
+
+ gl_FragColor = color * f;
+}
+
+void bar()
+{
+}
+
+float unreachableReturn()
+{
+ bar();
+ if (d < 4.2)
+ return 1.2;
+ else
+ return 4.5;
+}
+
+float foo(vec4 bar)
+{
+ return bar.x + bar.y;
+}
diff --git a/chromium/third_party/glslang/src/Test/spv.functionCall.frag b/chromium/third_party/glslang/src/Test/spv.functionCall.frag
new file mode 100644
index 00000000000..0c36f4263bd
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/spv.functionCall.frag
@@ -0,0 +1,44 @@
+#version 140
+
+varying vec4 bigColor;
+varying vec4 BaseColor;
+varying float d;
+
+float h = 0.0;
+
+float foo(vec4 bar)
+{
+ return bar.x + bar.y;
+}
+
+void bar()
+{
+}
+
+float unreachableReturn()
+{
+ if (d < 4.2)
+ return 1.2;
+ else
+ return 4.5;
+ // might be another return inserted here by builders, has to be correct type
+}
+
+float missingReturn()
+{
+ if (d < 4.5) {
+ h = d;
+ return 3.9;
+ }
+}
+
+void main()
+{
+ vec4 color = vec4(foo(BaseColor));
+
+ bar();
+ float f = unreachableReturn();
+ float g = missingReturn();
+
+ gl_FragColor = color * f * h;
+}
diff --git a/chromium/third_party/glslang/src/Test/spv.functionSemantics.frag b/chromium/third_party/glslang/src/Test/spv.functionSemantics.frag
new file mode 100644
index 00000000000..9ec236756ef
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/spv.functionSemantics.frag
@@ -0,0 +1,63 @@
+#version 400
+
+in float u;
+
+int foo(int a, const int b, in int c, const in int d, out int e, inout int f)
+{
+ int sum = a + b + c + d + f; // no e, it is out only
+ // sum should be 47 now
+
+ a *= 64;
+ // no b, it is read only
+ c *= 64;
+ // no d, it is read only
+ e = 64 * 16; // e starts undefined
+ f *= 64;
+
+ sum += a + 64 * b + c + 64 * d + e + f; // everything has a value now, totaling of 64(1+2+4+8+16+32) = 64*63 = 4032
+ // sum should be 4032 + 47 = 4079
+
+ return sum;
+}
+
+int foo2(float a, vec3 b, out int r)
+{
+ r = int(3.0 * a);
+ return int(5.0 * b.y);
+}
+
+int foo3()
+{
+ if (u > 3.2) {
+ discard;
+ return 1000000;
+ }
+
+ return 2000000;
+}
+
+void main()
+{
+ int e;
+ int t = 2;
+ struct s {
+ ivec4 t;
+ } f;
+ f.t.y = 32;
+
+ // test the different qualifers
+ int color = foo(1, 2, t+t, 8, e, f.t.y);
+
+ color += 128 * (e + f.t.y); // right side should be 128(64(16 + 32)) = 393216
+ // sum should be 4079 + 393216 = 397295
+
+ // test conversions
+ float arg;
+ float ret;
+ ret = foo2(4, ivec3(1,2,3), arg); // ret = 10, param = 12.0
+ color += int(ret + arg); // adds 22, for total of 397317
+
+ color += foo3(); // theoretically, add 2000000, for total of 2397317
+
+ gl_FragColor = vec4(color);
+}
diff --git a/chromium/third_party/glslang/src/Test/spv.image.frag b/chromium/third_party/glslang/src/Test/spv.image.frag
new file mode 100644
index 00000000000..6ecf0f972b9
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/spv.image.frag
@@ -0,0 +1,93 @@
+#version 450
+
+layout(rgba32f, binding = 0) uniform image1D i1D;
+layout(rgba32f, binding = 1) uniform image2D i2D;
+layout(rgba32f, binding = 2) uniform image3D i3D;
+layout(rgba32f, binding = 3) uniform imageCube iCube;
+layout(rgba32f, binding = 4) uniform imageCubeArray iCubeArray;
+layout(rgba32f, binding = 5) uniform image2DRect i2DRect;
+layout(rgba32f, binding = 6) uniform image1DArray i1DArray;
+layout(rg16, binding = 7) uniform image2DArray i2DArray;
+layout(rgba32f, binding = 8) uniform imageBuffer iBuffer;
+layout(rgba32f, binding = 9) uniform image2DMS i2DMS;
+layout(rgba32f, binding = 10) uniform image2DMSArray i2DMSArray;
+
+layout(r32i, binding = 11) uniform iimage1D ii1D;
+layout(r32ui, binding = 12) uniform uimage2D ui2D;
+
+flat in int ic1D;
+flat in ivec2 ic2D;
+flat in ivec3 ic3D;
+flat in ivec4 ic4D;
+
+writeonly layout(binding = 1) uniform image2D wo2D;
+
+flat in uint value;
+
+out vec4 fragData;
+
+void main()
+{
+ ivec3 iv = ivec3(0);
+ iv.x += imageSize(i1D);
+ iv.xy += imageSize(i2D);
+ iv.xyz += imageSize(i3D);
+ iv.xy += imageSize(iCube);
+ iv.xyz += imageSize(iCubeArray);
+ iv.xy += imageSize(i2DRect);
+ iv.xy += imageSize(i1DArray);
+ iv.xyz += imageSize(i2DArray);
+ iv.x += imageSize(iBuffer);
+ iv.xy += imageSize(i2DMS);
+ iv.xyz += imageSize(i2DMSArray);
+
+ iv.x += imageSamples(i2DMS);
+ iv.x += imageSamples(i2DMSArray);
+
+ vec4 v = vec4(0.0);
+ v += imageLoad(i1D, ic1D);
+ imageStore(i1D, ic1D, v);
+ v += imageLoad(i2D, ic2D);
+ imageStore(i2D, ic2D, v);
+ v += imageLoad(i3D, ic3D);
+ imageStore(i3D, ic3D, v);
+ v += imageLoad(iCube, ic3D);
+ imageStore(iCube, ic3D, v);
+ v += imageLoad(iCubeArray, ic3D);
+ imageStore(iCubeArray, ic3D, v);
+ v += imageLoad(i2DRect, ic2D);
+ imageStore(i2DRect, ic2D, v);
+ v += imageLoad(i1DArray, ic2D);
+ imageStore(i1DArray, ic2D, v);
+ v += imageLoad(i2DArray, ic3D);
+ imageStore(i2DArray, ic3D, v);
+ v += imageLoad(iBuffer, ic1D);
+ imageStore(iBuffer, ic1D, v);
+ v += imageLoad(i2DMS, ic2D, 1);
+ imageStore(i2DMS, ic2D, 2, v);
+ v += imageLoad(i2DMSArray, ic3D, 3);
+ imageStore(i2DMSArray, ic3D, 4, v);
+
+ uint ui = 0;
+ iv.x += imageAtomicAdd(ii1D, ic1D, 10);
+ ui += imageAtomicAdd(ui2D, ic2D, value);
+ iv.x += imageAtomicMin(ii1D, ic1D, 11);
+ ui += imageAtomicMin(ui2D, ic2D, value);
+ iv.x += imageAtomicMax(ii1D, ic1D, 12);
+ ui += imageAtomicMax(ui2D, ic2D, value);
+ iv.x += imageAtomicAnd(ii1D, ic1D, 13);
+ ui += imageAtomicAnd(ui2D, ic2D, value);
+ iv.x += imageAtomicOr(ii1D, ic1D, 14);
+ ui += imageAtomicOr(ui2D, ic2D, value);
+ iv.x += imageAtomicXor(ii1D, ic1D, 15);
+ ui += imageAtomicXor(ui2D, ic2D, value);
+ iv.x += imageAtomicExchange(ii1D, ic1D, 16);
+ ui += imageAtomicExchange(ui2D, ic2D, value);
+ iv.x += imageAtomicCompSwap(ii1D, ic1D, 18, 17);
+ ui += imageAtomicCompSwap(ui2D, ic2D, 19u, value);
+
+ imageStore(wo2D, ic2D, v);
+
+ fragData = ui != iv.y ? v : vec4(0.0);
+}
+
diff --git a/chromium/third_party/glslang/src/Test/spv.int64.frag b/chromium/third_party/glslang/src/Test/spv.int64.frag
new file mode 100644
index 00000000000..ad2213b92ab
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/spv.int64.frag
@@ -0,0 +1,228 @@
+#version 450
+
+#extension GL_ARB_gpu_shader_int64: enable
+
+layout(binding = 0) uniform Uniforms
+{
+ uint index;
+};
+
+layout(std140, binding = 1) uniform Block
+{
+ i64vec3 i64v;
+ uint64_t u64;
+} block;
+
+void main()
+{
+}
+
+void literal()
+{
+ const int64_t i64Const[3] =
+ {
+ -0x1111111111111111l, // Hex
+ -1l, // Dec
+ 040000000000l, // Oct
+ };
+
+ int64_t i64 = i64Const[index];
+
+ const uint64_t u64Const[] =
+ {
+ 0xFFFFFFFFFFFFFFFFul, // Hex
+ 4294967296UL, // Dec
+ 077777777777ul, // Oct
+ };
+
+ uint64_t u64 = u64Const[index];
+}
+
+void typeCast()
+{
+ bvec2 bv;
+ ivec2 iv;
+ uvec2 uv;
+ vec2 fv;
+ dvec2 dv;
+
+ i64vec2 i64v;
+ u64vec2 u64v;
+
+ i64v = i64vec2(bv); // bool -> int64
+ u64v = u64vec2(bv); // bool -> uint64
+
+ i64v = iv; // int -> int64
+ iv = ivec2(i64v); // int64 -> int
+
+ u64v = uv; // uint -> uint64
+ uv = uvec2(u64v); // uint64 -> uint
+
+ fv = vec2(i64v); // int64 -> float
+ dv = i64v; // int64 -> double
+
+ fv = vec2(u64v); // uint64 -> float
+ dv = u64v; // uint64 -> double
+
+ i64v = i64vec2(fv); // float -> int64
+ i64v = i64vec2(dv); // double -> int64
+
+ u64v = u64vec2(fv); // float -> uint64
+ u64v = u64vec2(dv); // double -> uint64
+
+ bv = bvec2(i64v); // int64 -> bool
+ bv = bvec2(u64v); // uint64 -> bool
+
+ u64v = i64v; // int64 -> uint64
+ i64v = i64vec2(u64v); // uint64 -> int64
+
+ uv = uvec2(i64v); // int64 -> uint
+ i64v = i64vec2(uv); // uint -> int64
+ iv = ivec2(u64v); // uint64 -> int
+ u64v = iv; // int -> uint64
+}
+
+void operators()
+{
+ u64vec3 u64v;
+ int64_t i64;
+ uvec3 uv;
+ int i;
+ bool b;
+
+ // Unary
+ u64v++;
+ i64--;
+ ++i64;
+ --u64v;
+
+ u64v = ~u64v;
+
+ i64 = +i64;
+ u64v = -u64v;
+
+ // Arithmetic
+ i64 += i64;
+ u64v -= u64v;
+ i64 *= i;
+ u64v /= uv;
+ u64v %= i;
+
+ u64v = u64v + uv;
+ i64 = i64 - i;
+ u64v = u64v * uv;
+ i64 = i64 * i;
+ i64 = i64 % i;
+
+ // Shift
+ u64v <<= i;
+ i64 >>= uv.y;
+
+ i64 = i64 << u64v.z;
+ u64v = u64v << i64;
+
+ // Relational
+ b = (u64v.x != i64);
+ b = (i64 == u64v.x);
+ b = (u64v.x > uv.y);
+ b = (i64 < i);
+ b = (u64v.y >= uv.x);
+ b = (i64 <= i);
+
+ // Bitwise
+ u64v |= i;
+ i64 = i64 | i;
+ i64 &= i;
+ u64v = u64v & uv;
+ u64v ^= i64;
+ u64v = u64v ^ i64;
+}
+
+void builtinFuncs()
+{
+ i64vec2 i64v;
+ u64vec3 u64v;
+ dvec3 dv;
+ bvec3 bv;
+
+ int64_t i64;
+ uint64_t u64;
+
+ // abs()
+ i64v = abs(i64v);
+
+ // sign()
+ i64 = sign(i64);
+
+ // min()
+ i64v = min(i64v, i64);
+ i64v = min(i64v, i64vec2(-1));
+ u64v = min(u64v, u64);
+ u64v = min(u64v, u64vec3(0));
+
+ // max()
+ i64v = max(i64v, i64);
+ i64v = max(i64v, i64vec2(-1));
+ u64v = max(u64v, u64);
+ u64v = max(u64v, u64vec3(0));
+
+ // clamp()
+ i64v = clamp(i64v, -i64, i64);
+ i64v = clamp(i64v, -i64v, i64v);
+ u64v = clamp(u64v, -u64, u64);
+ u64v = clamp(u64v, -u64v, u64v);
+
+ // mix()
+ i64 = mix(i64v.x, i64v.y, true);
+ i64v = mix(i64vec2(i64), i64vec2(-i64), bvec2(false));
+ u64 = mix(u64v.x, u64v.y, true);
+ u64v = mix(u64vec3(u64), u64vec3(-u64), bvec3(false));
+
+ // doubleBitsToInt64()
+ i64v = doubleBitsToInt64(dv.xy);
+
+ // doubleBitsToUint64()
+ u64v.x = doubleBitsToUint64(dv.z);
+
+ // int64BitsToDouble()
+ dv.xy = int64BitsToDouble(i64v);
+
+ // uint64BitsToDouble()
+ dv = uint64BitsToDouble(u64v);
+
+ // packInt2x32()
+ i64 = packInt2x32(ivec2(1, 2));
+
+ // unpackInt2x32()
+ ivec2 iv = unpackInt2x32(i64);
+
+ // packUint2x32()
+ u64 = packUint2x32(uvec2(2, 3));
+
+ // unpackUint2x32()
+ uvec2 uv = unpackUint2x32(u64);
+
+ // lessThan()
+ bv = lessThan(u64v, u64vec3(u64));
+ bv.xy = lessThan(i64v, i64vec2(i64));
+
+ // lessThanEqual()
+ bv = lessThanEqual(u64v, u64vec3(u64));
+ bv.xy = lessThanEqual(i64v, i64vec2(i64));
+
+ // greaterThan()
+ bv = greaterThan(u64v, u64vec3(u64));
+ bv.xy = greaterThan(i64v, i64vec2(i64));
+
+ // greaterThanEqual()
+ bv = greaterThanEqual(u64v, u64vec3(u64));
+ bv.xy = greaterThanEqual(i64v, i64vec2(i64));
+
+ // equal()
+ bv = equal(u64v, u64vec3(u64));
+ bv.xy = equal(i64v, i64vec2(i64));
+
+ // notEqual()
+ bv = notEqual(u64v, u64vec3(u64));
+ bv.xy = notEqual(i64v, i64vec2(i64));
+} \ No newline at end of file
diff --git a/chromium/third_party/glslang/src/Test/spv.intOps.vert b/chromium/third_party/glslang/src/Test/spv.intOps.vert
new file mode 100644
index 00000000000..30f20f93d73
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/spv.intOps.vert
@@ -0,0 +1,72 @@
+#version 310 es
+
+in uint u1;
+in uvec2 u2;
+in uvec3 u3;
+in uvec4 u4;
+
+in float v1;
+in vec2 v2;
+in vec3 v3;
+in vec4 v4;
+
+in int i1;
+in ivec2 i2;
+in ivec3 i3;
+in ivec4 i4;
+
+out uvec4 uout;
+out ivec4 iout;
+out vec4 fout;
+
+void main()
+{
+ iout = ivec4(0);
+ uout = uvec4(0);
+ fout = vec4(0.0);
+
+ uvec2 u2out;
+ uout.xy += uaddCarry(u2, u2, u2out);
+ uout.xy += u2out;
+
+ uint u1out;
+ uout.x += usubBorrow(u1, u1, u1out);
+ uout.x += u1out;
+
+ uvec4 u4outHi, u4outLow;
+ umulExtended(u4, u4, u4outHi, u4outLow);
+ uout += u4outHi + u4outLow;
+
+ ivec4 i4outHi, i4outLow;
+ imulExtended(i4, i4, i4outHi, i4outLow);
+ iout += i4outLow + i4outHi;
+
+ ivec3 i3out;
+ fout.xyz += frexp(v3, i3out);
+ iout.xyz += i3out;
+ int i1out;
+ fout.x += frexp(v1, i1out);
+ iout.x += i1out;
+
+ fout.xy += ldexp(v2, i2);
+ fout.x += ldexp(v1, i1);
+
+ iout.x += bitfieldExtract(i1, 4, 5);
+ uout.xyz += bitfieldExtract(u3, 4, 5);
+ iout.xyz += bitfieldInsert(i3, i3, 4, 5);
+ uout.x += bitfieldInsert(u1, u1, 4, 5);
+ iout.xy += bitfieldReverse(i2);
+ uout += bitfieldReverse(u4);
+ iout.x += bitCount(i1);
+ iout.xyz += bitCount(u3);
+
+ iout.xy += findLSB(i2);
+ iout += findLSB(u4);
+ iout.x += findMSB(i1);
+ iout.xy += findMSB(u2);
+
+ uout.x += packUnorm4x8(v4);
+ uout.x += packSnorm4x8(v4);
+ fout += unpackUnorm4x8(u1);
+ fout += unpackSnorm4x8(u1);
+}
diff --git a/chromium/third_party/glslang/src/Test/spv.interpOps.frag b/chromium/third_party/glslang/src/Test/spv.interpOps.frag
new file mode 100644
index 00000000000..24c55bf9fc7
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/spv.interpOps.frag
@@ -0,0 +1,32 @@
+#version 450
+
+in float if1;
+in vec2 if2;
+in vec3 if3;
+in vec4 if4;
+
+flat in int samp;
+flat in vec2 offset;
+
+out vec4 fragColor;
+
+void main()
+{
+ vec4 f4 = vec4(0.0);
+ f4.x += interpolateAtCentroid(if1);
+ f4.xy += interpolateAtCentroid(if2);
+ f4.xyz += interpolateAtCentroid(if3);
+ f4 += interpolateAtCentroid(if4);
+
+ f4.x += interpolateAtSample(if1, samp);
+ f4.xy += interpolateAtSample(if2, samp);
+ f4.xyz += interpolateAtSample(if3, samp);
+ f4 += interpolateAtSample(if4, samp);
+
+ f4.x += interpolateAtOffset(if1, offset);
+ f4.xy += interpolateAtOffset(if2, offset);
+ f4.xyz += interpolateAtOffset(if3, offset);
+ f4 += interpolateAtOffset(if4, offset);
+
+ fragColor = f4;
+}
diff --git a/chromium/third_party/glslang/src/Test/spv.layoutNested.vert b/chromium/third_party/glslang/src/Test/spv.layoutNested.vert
new file mode 100644
index 00000000000..0c4f09f1435
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/spv.layoutNested.vert
@@ -0,0 +1,76 @@
+#version 450
+
+// should get 3 SPV types for S: no layout, 140, and 430, plus extras for interpolation or invariant differences
+struct S
+{
+ highp uvec3 a;
+ mediump mat2 b[4];
+ lowp uint c;
+};
+
+layout(set = 0, binding = 0, std140) uniform Block140
+{
+ mediump int u;
+ S s[2][3];
+ mediump vec2 v;
+} inst140;
+
+layout(set = 0, binding = 1, std430) buffer Block430
+{
+ mediump int u;
+ S s[2][3];
+ mediump vec2 v;
+} inst430;
+
+S s;
+
+// should get 5 SPV types for T: no layout, 140/row, 140/col, 430/row, and 430/col
+struct T {
+ mat2 m;
+ int a;
+};
+
+T t;
+
+struct Nestor {
+ T nestorT;
+};
+
+layout(set = 1, binding = 0, std140) uniform Bt1
+{
+ layout(row_major) Nestor nt;
+} Btn1;
+
+layout(set = 1, binding = 0, std140) uniform Bt2
+{
+ layout(column_major) Nestor nt;
+} Btn2;
+
+layout(row_major, set = 1, binding = 0, std140) uniform Bt3
+{
+ layout(column_major) Nestor ntcol;
+ Nestor ntrow; // should be row major decoration version of Nestor
+} Btn3;
+
+layout(set = 1, binding = 0, std430) buffer bBt1
+{
+ layout(row_major) Nestor nt;
+} bBtn1;
+
+layout(set = 1, binding = 0, std430) buffer bBt2
+{
+ layout(column_major) Nestor nt;
+} bBtn2;
+
+layout(set = 1, binding = 0, std430) buffer bBt3
+{
+ layout(row_major) Nestor ntcol;
+ Nestor ntrow; // should be col major decoration version of Nestor
+} bBtn3;
+
+void main()
+{
+}
+
+flat out S sout;
+invariant out S soutinv;
diff --git a/chromium/third_party/glslang/src/Test/spv.length.frag b/chromium/third_party/glslang/src/Test/spv.length.frag
new file mode 100644
index 00000000000..20e74102b3e
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/spv.length.frag
@@ -0,0 +1,14 @@
+#version 140
+
+vec4 u[3];
+
+in vec2 v[2];
+
+void main()
+{
+ int a[5];
+
+ vec2 t = v[0] + v[1];
+
+ gl_FragColor = vec4(u.length() * v.length() * a.length());
+}
diff --git a/chromium/third_party/glslang/src/Test/spv.localAggregates.frag b/chromium/third_party/glslang/src/Test/spv.localAggregates.frag
new file mode 100644
index 00000000000..9c86aba57ba
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/spv.localAggregates.frag
@@ -0,0 +1,72 @@
+#version 400
+
+uniform sampler2D samp2D;
+in vec2 coord;
+in vec4 color;
+
+struct s1 {
+ int i;
+ float f;
+};
+
+struct s2 {
+ int i;
+ float f;
+ s1 s1_1;
+ vec4 bleh;
+};
+
+struct s3 {
+ s2 s2_1;
+ int i;
+ float f;
+ s1 s1_1;
+};
+
+
+flat in s1 foo;
+flat in s2 foo2;
+flat in s3 foo3;
+
+
+flat in int condition;
+
+void main()
+{
+ s2 locals2;
+ s3 locals3;
+ float localFArray[16];
+ int localIArray[8];
+
+ locals2 = foo3.s2_1;
+
+ if (foo3.s2_1.i > 0) {
+ locals2.s1_1.f = 1.0;
+ localFArray[4] = coord.x;
+ localIArray[2] = foo3.s2_1.i;
+ } else {
+ locals2.s1_1.f = coord.x;
+ localFArray[4] = 1.0;
+ localIArray[2] = 0;
+ }
+
+ if (localIArray[2] == 0)
+ ++localFArray[4];
+
+ float localArray[16];
+ int x = 5;
+ localArray[x] = coord.x;
+
+ float[16] a;
+
+ for (int i = 0; i < 16; i++)
+ a[i] = 0.0;
+
+ if (condition == 1)
+ a = localArray;
+
+ locals2.bleh = color;
+ locals2.bleh.z = coord.y;
+
+ gl_FragColor = locals2.bleh * (localFArray[4] + locals2.s1_1.f + localArray[x] + a[x]) * texture(samp2D, coord);
+}
diff --git a/chromium/third_party/glslang/src/Test/spv.loops.frag b/chromium/third_party/glslang/src/Test/spv.loops.frag
new file mode 100644
index 00000000000..c00449cff12
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/spv.loops.frag
@@ -0,0 +1,302 @@
+#version 140
+in vec4 bigColor;
+in vec4 bigColor1_1;
+in vec4 bigColor1_2;
+in vec4 bigColor1_3;
+in vec4 bigColor2;
+in vec4 bigColor3;
+in vec4 bigColor4;
+in vec4 bigColor5;
+in vec4 bigColor6;
+in vec4 bigColor7;
+in vec4 bigColor8;
+
+in vec4 BaseColor;
+
+in float d;
+in float d2;
+in float d3;
+in float d4;
+in float d5;
+in float d6;
+in float d7;
+in float d8;
+in float d9;
+in float d10;
+in float d11;
+in float d12;
+in float d14;
+in float d15;
+in float d16;
+in float d17;
+in float d18;
+flat in int Count;
+
+void main()
+{
+ vec4 color = BaseColor;
+
+ // Not a real loop
+ while (true) {
+ if (color.x < 0.33) {
+ color += vec4(0.33);
+ break;
+ }
+ if (color.x < 0.66) {
+ color += vec4(0.66);
+ break;
+ }
+
+ color += vec4(0.33);
+ break;
+ }
+
+ // While
+ while (color.x < d) {
+ color += bigColor;
+ }
+
+ // While (latchy)
+ while (color.z < d) {
+ color += bigColor1_1;
+ if (color.w < d)
+ continue;
+
+ color += bigColor1_1;
+ }
+
+ // While (constant)
+ while (color.x < 42.0) {
+ ++color;
+ }
+
+ // While (complicated-conditional)
+ while (color.w < d2 && color.y < d3) {
+ color += bigColor1_2;
+ }
+
+ // While (multi-exit)
+ while (color.z < d3) {
+ color += bigColor1_3;
+ if (color.y < d4)
+ break;
+ color += bigColor1_3;
+ }
+
+ // For (dynamic)
+ for (int i = 0; i < Count; ++i) {
+ color += bigColor2;
+ }
+
+ // Do while
+ do {
+ color += bigColor3;
+ } while (color.x < d2);
+
+ // For (static)
+ for (int i = 0; i < 42; ++i) {
+ color.z += d3;
+ }
+
+ // For (static) flow-control
+ for (int i = 0; i < 100; ++i) {
+ if (color.z < 20.0)
+ color.x++;
+ else
+ color.y++;
+ if (color.w < 20.0)
+ if (color.z > color.y)
+ 0; // do nothing
+ }
+
+ // For (static) flow-control with latch merge
+ for (int i = 0; i < 120; ++i) {
+ if (color.z < 20.0)
+ color.x++;
+ else
+ color.y++;
+ }
+
+ // For (static) latchy
+ for (int i = 0; i < 42; ++i) {
+ color.z += d3;
+ if (color.x < d4)
+ continue;
+ ++color.w;
+ }
+
+ // For (static) multi-exit
+ for (int i = 0; i < 42; ++i) {
+ color.z += d3;
+ if (color.x < d4)
+ break;
+ ++color.w;
+ }
+
+ // Latchy
+ do {
+ color += bigColor4;
+ if (color.x < d4)
+ continue;
+ if (color.y < d4)
+ color.y += d4;
+ else
+ color.x += d4;
+ } while (color.z < d4);
+
+ // Do while flow control
+ do {
+ color += bigColor5;
+ if (color.y < d5)
+ color.y += d5;
+ } while (color.x < d5);
+
+ // If then loop
+ if (color.x < d6) {
+ while (color.y < d6)
+ color += bigColor6;
+ } else {
+ while (color.z < d6)
+ color.z += bigColor6.z;
+ }
+
+ // If then multi-exit
+ if (color.x < d6) {
+ while (color.y < d6) {
+ color += bigColor6;
+ if (d7 < 1.0)
+ break;
+ }
+
+ } else {
+ while (color.z < d6)
+ color.z += bigColor6.z;
+ }
+
+
+ // Multi-exit
+ do {
+ if (d7 < 0.0)
+ break;
+
+ color += bigColor7;
+
+ if (d7 < 1.0) {
+ color.z++;
+ break;
+ }
+
+ color += BaseColor;
+
+ } while (true);
+
+
+ // Multi-exit2
+ do {
+ // invariant conditional break at the top of the loop. This could be a
+ // situation where unswitching the loop has no real increases in code
+ // size.
+ if (d8 < 0.0)
+ break;
+
+ color += bigColor7;
+
+ if (d8 < 1.0) {
+ color.z++;
+ if (d8 < 2.0) {
+ color.y++;
+ } else {
+ color.x++;
+ }
+ break;
+ }
+
+ color += BaseColor;
+
+ } while (color.z < d8);
+
+ // Deep exit
+ while (color.w < d9) {
+ if (d9 > d8) {
+ if (color.x <= d7) {
+ if (color.z == 5.0)
+ color.w++;
+ else
+ break;
+ }
+ }
+
+ }
+
+ // No end loop-back.
+ while (color.z < d10) {
+ color.y++;
+ if (color.y < d11) {
+ color.z++;
+ if (color.w < d12)
+ color.w++;
+ else
+ color.x++;
+ continue;
+ }
+
+ color++;
+ break;
+ }
+
+ // Multi-continue
+ while (color.x < 10.0) {
+ color += bigColor8;
+
+ if (color.z < d8)
+ if (color.w < d6)
+ continue;
+
+ color.y += bigColor8.x;
+ }
+
+ color++;
+ gl_FragColor = color;
+
+ // Early Return
+ while (color.x < d14) {
+ if (color.y < d15) {
+ return;
+ }
+ else
+ color++;
+ }
+
+ color++;
+
+ while (color.w < d16) {
+ color.w++;
+ }
+
+
+ // While (complicated-conditional)
+ while (color.w < d2 && color.y < d3) {
+ color += bigColor1_2;
+ if (color.z < d3)
+ return;
+ }
+
+
+ do {
+ if (color.y < d18)
+ return;
+ color++;
+ } while (color.x < d17);
+
+ // Early Discard
+ while (color.y < d16) {
+ if (color.w < d16) {
+ discard;
+ } else
+ color++;
+ }
+
+ color++;
+
+ gl_FragColor = color;
+}
diff --git a/chromium/third_party/glslang/src/Test/spv.loopsArtificial.frag b/chromium/third_party/glslang/src/Test/spv.loopsArtificial.frag
new file mode 100644
index 00000000000..4eb44c2092e
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/spv.loopsArtificial.frag
@@ -0,0 +1,67 @@
+#version 140
+in vec4 bigColor;
+in vec4 bigColor1_1;
+in vec4 bigColor1_2;
+in vec4 bigColor1_3;
+in vec4 bigColor2;
+in vec4 bigColor3;
+in vec4 bigColor4;
+in vec4 bigColor5;
+in vec4 bigColor6;
+in vec4 bigColor7;
+in vec4 bigColor8;
+
+in vec4 BaseColor;
+
+in float d;
+in float d2;
+in float d3;
+in float d4;
+in float d13;
+
+flat in int Count;
+
+void main()
+{
+ vec4 color = BaseColor;
+
+ // Latchy2
+ do {
+ color += bigColor4;
+ if (color.x < d4) {
+ color.z += 2.0;
+ if (color.z < d4) {
+ color.x++;
+ continue;
+ }
+ }
+ if (color.y < d4)
+ color.y += d4;
+ else
+ color.x += d4;
+ } while (color.z < d4);
+
+ // Immediate dominator
+ while (color.w < d13) {
+ if (color.z < d13)
+ color++;
+ else
+ color--;
+ // code from Latchy 2
+ color += bigColor4;
+ if (color.x < d4) {
+ color.z += 2.0;
+ if (color.z < d4) {
+ color.x++;
+ continue;
+ }
+ }
+ if (color.y < d4)
+ color.y += d4;
+ else
+ color.x += d4;
+ }
+
+ color++;
+ gl_FragColor = color;
+}
diff --git a/chromium/third_party/glslang/src/Test/spv.matFun.vert b/chromium/third_party/glslang/src/Test/spv.matFun.vert
new file mode 100644
index 00000000000..70e9f81da5e
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/spv.matFun.vert
@@ -0,0 +1,28 @@
+#version 400
+
+uniform bl {
+ uniform mat4 m4;
+ uniform mat3 m3;
+} bName;
+
+in vec3 v3;
+
+vec3 xf(mat3 m, vec3 v)
+{
+ return v * m;
+}
+
+mat3 Mat3(mat4 m)
+{
+ return mat3(m[0].xyz, m[1].xyz, m[2].xyz);
+}
+
+vec3 mxv(mat4 m4, vec3 v)
+{
+ return v * Mat3(m4);
+}
+
+void main()
+{
+ gl_Position = vec4(mxv(bName.m4, v3) + xf(bName.m3, v3), 1.0);
+}
diff --git a/chromium/third_party/glslang/src/Test/spv.matrix.frag b/chromium/third_party/glslang/src/Test/spv.matrix.frag
new file mode 100644
index 00000000000..9fa564a59c4
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/spv.matrix.frag
@@ -0,0 +1,46 @@
+#version 420
+
+in mat3x4 m1;
+in mat3x4 m2;
+in float f;
+in vec3 v3;
+in vec4 v4;
+
+out vec4 color;
+
+void main()
+{
+ mat3x4 sum34;
+ dmat3x4 dm;
+ vec3 sum3;
+ vec4 sum4;
+
+ sum34 = m1 - m2;
+ sum34 += m1 * f;
+ sum34 += f * m1;
+ sum34 /= matrixCompMult(m1, m2);
+ sum34 += m1 / f;
+ sum34 += f / m1;
+ sum34 += f;
+ sum34 -= f;
+ dm = dmat3x4(sum34);
+ sum34 = mat3x4(dm);
+
+ sum3 = v4 * m2;
+ sum4 = m2 * v3;
+
+ mat4x3 m43 = transpose(sum34);
+ mat4 m4 = m1 * m43;
+
+ sum4 = v4 * m4;
+
+ color = sum4;
+
+ ++sum34;
+ --sum34;
+
+ sum34 += mat3x4(f);
+ sum34 += mat3x4(v3, f, v3, f, v3, f);
+
+ color += sum3 * m43 + sum4;
+}
diff --git a/chromium/third_party/glslang/src/Test/spv.matrix2.frag b/chromium/third_party/glslang/src/Test/spv.matrix2.frag
new file mode 100644
index 00000000000..b14d5b18faf
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/spv.matrix2.frag
@@ -0,0 +1,50 @@
+#version 150
+
+in mat3 colorTransform;
+in vec3 Color;
+in mat4 m, n;
+
+in mat4x3 um43;
+in mat3x4 un34;
+in mat2 um2;
+in mat3 um3;
+in mat4 um4;
+
+in vec4 v;
+
+in vec3 u;
+
+out vec4 FragColor;
+
+void main()
+{
+ mat3x4 m34 = outerProduct(v, u);
+
+ m34 += mat3x4(4.3);
+
+ FragColor = vec4(Color, 1.0);
+ FragColor *= vec4(FragColor * m34, 1.0);
+
+ m34 *= v.x;
+
+ mat4 m44 = mat4(un34);
+
+ m44 += m34 * um43;
+
+ FragColor += (-m44) * v;
+
+ FragColor *= matrixCompMult(m44, m44);
+
+ m34 = transpose(um43);
+ FragColor *= vec4(FragColor * m34, 1.0);
+ FragColor *= vec4(determinant(um4));
+ mat2 inv = inverse(um2);
+ FragColor *= vec4(inv[0][0], inv[1][0], inv[0][1], inv[1][1]);
+ mat3 inv3 = inverse(um3);
+ FragColor *= vec4(inv3[2][1]);
+
+ mat4 inv4 = inverse(um4);
+ FragColor *= inv4;
+
+ FragColor = vec4(FragColor * matrixCompMult(un34, un34), FragColor.w);
+}
diff --git a/chromium/third_party/glslang/src/Test/spv.memoryQualifier.frag b/chromium/third_party/glslang/src/Test/spv.memoryQualifier.frag
new file mode 100644
index 00000000000..889ad9bd582
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/spv.memoryQualifier.frag
@@ -0,0 +1,38 @@
+#version 450
+
+layout(binding = 0, r32f) uniform coherent image1D i1D;
+layout(binding = 1, r32f) uniform volatile image2D i2D;
+layout(binding = 2, r32f) uniform restrict image2DRect i2DRect;
+layout(binding = 3, r32f) uniform readonly image3D i3D;
+layout(binding = 3, r32f) uniform writeonly imageCube iCube;
+
+struct Data
+{
+ float f1;
+ vec2 f2;
+};
+
+coherent buffer Buffer
+{
+ volatile float f1;
+ restrict vec2 f2;
+ readonly vec3 f3;
+ writeonly vec4 f4;
+ int i1;
+ Data data;
+};
+
+void main()
+{
+ vec4 texel = imageLoad(i1D, 1);
+ texel += imageLoad(i2D, ivec2(1));
+ texel += imageLoad(i2DRect, ivec2(1));
+ texel += imageLoad(i3D, ivec3(1));
+ imageStore(iCube, ivec3(1), texel);
+
+ texel[i1] = f1;
+ texel.xy += f2;
+ texel.xyz -= f3;
+ texel.w += data.f1 + data.f2[1];
+ f4 = texel;
+} \ No newline at end of file
diff --git a/chromium/third_party/glslang/src/Test/spv.merge-unreachable.frag b/chromium/third_party/glslang/src/Test/spv.merge-unreachable.frag
new file mode 100644
index 00000000000..aa93e4431c5
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/spv.merge-unreachable.frag
@@ -0,0 +1,7 @@
+#version 450
+layout(location=1) in highp vec4 v;
+void main (void)
+{
+ if (v == vec4(0.1,0.2,0.3,0.4)) discard;
+ else return;
+}
diff --git a/chromium/third_party/glslang/src/Test/spv.newTexture.frag b/chromium/third_party/glslang/src/Test/spv.newTexture.frag
new file mode 100644
index 00000000000..1a2c8e6f2ae
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/spv.newTexture.frag
@@ -0,0 +1,72 @@
+#version 430
+
+uniform sampler2D s2D;
+uniform sampler2DRect sr;
+uniform sampler3D s3D;
+uniform samplerCube sCube;
+uniform samplerCubeShadow sCubeShadow;
+uniform samplerCubeArrayShadow sCubeArrayShadow;
+uniform sampler2DShadow s2DShadow;
+uniform sampler2DArray s2DArray;
+uniform sampler2DArrayShadow s2DArrayShadow;
+
+uniform isampler2D is2D;
+uniform isampler3D is3D;
+uniform isamplerCube isCube;
+uniform isampler2DArray is2DArray;
+uniform isampler2DMS is2Dms;
+
+uniform usampler2D us2D;
+uniform usampler3D us3D;
+uniform usamplerCube usCube;
+uniform usampler2DArray us2DArray;
+
+in float c1D;
+in vec2 c2D;
+in vec3 c3D;
+in vec4 c4D;
+
+flat in int ic1D;
+flat in ivec2 ic2D;
+flat in ivec3 ic3D;
+flat in ivec4 ic4D;
+
+out vec4 FragData;
+
+void main()
+{
+ vec4 v = texture(s2D, c2D);
+ v.y += texture(sCubeArrayShadow, c4D, c1D);
+ v += textureProj(s3D, c4D);
+ v += textureLod(s2DArray, c3D, 1.2);
+ v.y += textureOffset(s2DShadow, c3D, ivec2(3), c1D);
+ v += texelFetch(s3D, ic3D, ic1D);
+ v += texelFetchOffset(s2D, ic2D, 4, ivec2(3));
+ v += texelFetchOffset(sr, ic2D, ivec2(4));
+ v.y += textureLodOffset(s2DShadow, c3D, c1D, ivec2(3));
+ v += textureProjLodOffset(s2D, c3D, c1D, ivec2(3));
+ v += textureGrad(sCube, c3D, c3D, c3D);
+ v.x += textureGradOffset(s2DArrayShadow, c4D, c2D, c2D, ivec2(3));
+ v += textureProjGrad(s3D, c4D, c3D, c3D);
+ v += textureProjGradOffset(s2D, c3D, c2D, c2D, ivec2(3));
+
+ ivec4 iv = texture(is2D, c2D);
+ v += vec4(iv);
+ iv = textureProjOffset(is2D, c4D, ivec2(3));
+ v += vec4(iv);
+ iv = textureProjLod(is2D, c3D, c1D);
+ v += vec4(iv);
+ iv = textureProjGrad(is2D, c3D, c2D, c2D);
+ v += vec4(iv);
+ iv = texture(is3D, c3D, 4.2);
+ v += vec4(iv);
+ iv = textureLod(isCube, c3D, c1D);
+ v += vec4(iv);
+ iv = texelFetch(is2DArray, ic3D, ic1D);
+ v += vec4(iv);
+
+ ivec2 iv2 = textureSize(sCubeShadow, 2);
+ // iv2 += textureSize(is2Dms);
+
+ FragData = v + vec4(iv2, 0.0, 0.0);
+}
diff --git a/chromium/third_party/glslang/src/Test/spv.noDeadDecorations.vert b/chromium/third_party/glslang/src/Test/spv.noDeadDecorations.vert
new file mode 100644
index 00000000000..88984970b53
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/spv.noDeadDecorations.vert
@@ -0,0 +1,13 @@
+#version 310 es
+precision mediump float;
+
+float func(float a)
+{
+ return -a;
+ a = a * -1.0;
+}
+
+void main()
+{
+ gl_Position.x = func(0.0);
+}
diff --git a/chromium/third_party/glslang/src/Test/spv.nonSquare.vert b/chromium/third_party/glslang/src/Test/spv.nonSquare.vert
new file mode 100644
index 00000000000..70682d0134a
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/spv.nonSquare.vert
@@ -0,0 +1,25 @@
+#version 140
+
+in vec3 v3;
+in vec4 v4;
+
+out mat3x2 m32;
+
+const vec2 cv2 = vec2(10.0, 20.0);
+const mat2x4 m24 = mat2x4(3.0);
+const mat4x2 m42 = mat4x2(1.0, 2.0,
+ 3.0, 4.0,
+ 5.0, 6.0,
+ 7.0, 8.0);
+
+void main()
+{
+ mat2x3 m23;
+ vec2 a, b;
+
+ a = v3 * m23;
+ b = m32 * v3;
+
+ gl_Position = vec4(m23 * m32 * v3, m24[1][3]) +
+ (m24 * m42) * v4 + cv2 * m42 + m24 * cv2 + vec4(cv2[1], cv2.x, m42[2][1], m42[2][0]);
+}
diff --git a/chromium/third_party/glslang/src/Test/spv.precise.tesc b/chromium/third_party/glslang/src/Test/spv.precise.tesc
new file mode 100644
index 00000000000..35de26b8fc5
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/spv.precise.tesc
@@ -0,0 +1,24 @@
+#version 310 es
+#extension GL_EXT_tessellation_shader : require
+#extension GL_EXT_gpu_shader5 : require
+
+layout(vertices = 3) out;
+
+layout(location = 0) in highp vec2 in_tc_position[];
+layout(location = 1) in highp float in_tc_tessParam[];
+
+layout(location = 0) out highp vec2 in_te_position[];
+
+precise gl_TessLevelOuter;
+
+void main (void)
+{
+ in_te_position[gl_InvocationID] = in_tc_position[gl_InvocationID];
+
+ gl_TessLevelInner[0] = 5.0;
+ gl_TessLevelInner[1] = 5.0;
+
+ gl_TessLevelOuter[0] = 1.0 + 59.0 * 0.5 * (in_tc_tessParam[1] + in_tc_tessParam[2]);
+ gl_TessLevelOuter[1] = 1.0 + 59.0 * 0.5 * (in_tc_tessParam[2] + in_tc_tessParam[0]);
+ gl_TessLevelOuter[2] = 1.0 + 59.0 * 0.5 * (in_tc_tessParam[0] + in_tc_tessParam[1]);
+}
diff --git a/chromium/third_party/glslang/src/Test/spv.precise.tese b/chromium/third_party/glslang/src/Test/spv.precise.tese
new file mode 100644
index 00000000000..874ea840888
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/spv.precise.tese
@@ -0,0 +1,36 @@
+#version 310 es
+#extension GL_EXT_tessellation_shader : require
+#extension GL_EXT_gpu_shader5 : require
+
+layout(triangles, equal_spacing) in;
+
+layout(location = 0) in highp vec2 in_te_position[];
+
+layout(location = 0) out mediump vec4 in_f_color;
+
+precise gl_Position;
+
+void main(void) {
+ highp vec2 pos = gl_TessCoord.x * in_te_position[0] +
+ gl_TessCoord.y * in_te_position[1] +
+ gl_TessCoord.z * in_te_position[2];
+
+ highp float f =
+ sqrt(3.0 * min(gl_TessCoord.x, min(gl_TessCoord.y, gl_TessCoord.z))) *
+ 0.5 +
+ 0.5;
+ in_f_color = vec4(gl_TessCoord * f, 1.0);
+
+ // Offset the position slightly, based on the parity of the bits in the float
+ // representation.
+ // This is done to detect possible small differences in edge vertex positions
+ // between patches.
+ uvec2 bits = floatBitsToUint(pos);
+ uint numBits = 0u;
+ for (uint i = 0u; i < 32u; i++)
+ numBits +=
+ ((bits[0] << i) & 1u) + ((bits[1] << i) & 1u);
+ pos += float(numBits & 1u) * 0.04;
+
+ gl_Position = vec4(pos, 0.0, 1.0);
+}
diff --git a/chromium/third_party/glslang/src/Test/spv.precision.frag b/chromium/third_party/glslang/src/Test/spv.precision.frag
new file mode 100644
index 00000000000..0d282d740a3
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/spv.precision.frag
@@ -0,0 +1,60 @@
+#version 310 es
+precision mediump float;
+in lowp float lowfin;
+in mediump float mediumfin;
+in highp vec4 highfin;
+
+highp int uniform_high;
+mediump int uniform_medium;
+lowp int uniform_low;
+bvec2 ub2;
+
+out mediump vec4 mediumfout;
+
+highp float global_highp;
+
+lowp vec2 foo(mediump vec3 mv3)
+{
+ return highfin.xy;
+}
+
+bool boolfun(bvec2 bv2)
+{
+ return bv2 == bvec2(false, true);
+}
+
+struct S {
+ highp float a;
+ lowp float b;
+};
+
+in S s;
+
+void main()
+{
+ lowp int sum = uniform_medium + uniform_high;
+
+ sum += uniform_high;
+ sum += uniform_low;
+
+ // test maxing precisions of args to get precision of builtin
+ lowp float arg1 = 3.2;
+ mediump float arg2 = 1023908.2;
+ lowp float d = distance(lowfin, mediumfin);
+
+ global_highp = length(highfin);
+
+ highp vec4 local_highp = vec4(global_highp);
+
+ mediumfout = vec4(sin(d)) + arg2 + local_highp;
+
+ sum += 4 + ((ivec2(uniform_low) * ivec2(uniform_high) + ivec2((/* comma operator */uniform_low, uniform_high)))).x;
+
+ mediumfout += vec4(sum);
+
+ if (boolfun(ub2))
+ ++mediumfout;
+
+ mediumfout *= s.a;
+ mediumfout *= s.b;
+}
diff --git a/chromium/third_party/glslang/src/Test/spv.prepost.frag b/chromium/third_party/glslang/src/Test/spv.prepost.frag
new file mode 100644
index 00000000000..9627b7e2d99
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/spv.prepost.frag
@@ -0,0 +1,38 @@
+#version 140
+
+void main()
+{
+ struct s {
+ float y[5];
+ } str;
+
+ float t;
+ int index = 5; // all indexing is 4
+
+ str.y[4] = 2.0; // 2.0
+ t = ++str.y[--index]; // 3.0
+ str.y[4] += t; // 6.0
+ t = str.y[4]--; // 5.0 (t = 6.0)
+ str.y[index++] += t; // 11.0
+ --str.y[--index]; // 10.0
+
+ float x = str.y[4];
+ ++x;
+ --x;
+ x++;
+ x--;
+
+ // x is 10.0
+
+ float y = x * ++x; // 10 * 11
+ float z = y * x--; // 110 * 11
+
+ // x is 10.0
+ // z is 1210.0
+
+ vec4 v = vec4(1.0, 2.0, 3.0, 4.0);
+ v.y = v.z--; // (1,3,2,4)
+ v.x = --v.w; // (3,3,2,3)
+
+ gl_FragColor = z * v;// (3630.0, 3630.0, 2420.0, 3630.0)
+}
diff --git a/chromium/third_party/glslang/src/Test/spv.pushConstant.vert b/chromium/third_party/glslang/src/Test/spv.pushConstant.vert
new file mode 100644
index 00000000000..5fb64adf704
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/spv.pushConstant.vert
@@ -0,0 +1,17 @@
+#version 400
+
+layout(push_constant) uniform Material {
+ int kind;
+ float fa[3];
+} matInst;
+
+out vec4 color;
+
+void main()
+{
+ switch (matInst.kind) {
+ case 1: color = vec4(0.2); break;
+ case 2: color = vec4(0.5); break;
+ default: color = vec4(0.0); break;
+ }
+}
diff --git a/chromium/third_party/glslang/src/Test/spv.qualifiers.vert b/chromium/third_party/glslang/src/Test/spv.qualifiers.vert
new file mode 100644
index 00000000000..ee3330f4080
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/spv.qualifiers.vert
@@ -0,0 +1,19 @@
+#version 430 core
+
+in vec4 inV;
+
+centroid out vec4 outVc;
+smooth out vec4 outVs;
+flat out vec4 outVf;
+noperspective out vec4 outVn;
+
+centroid noperspective out vec4 outVcn;
+
+void main()
+{
+ outVc = inV;
+ outVs = inV;
+ outVf = inV;
+ outVn = inV;
+ outVcn = inV;
+}
diff --git a/chromium/third_party/glslang/src/Test/spv.queryL.frag b/chromium/third_party/glslang/src/Test/spv.queryL.frag
new file mode 100644
index 00000000000..91df38330ab
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/spv.queryL.frag
@@ -0,0 +1,64 @@
+#version 430 core
+
+uniform sampler1D samp1D;
+uniform isampler2D isamp2D;
+uniform usampler2D usamp2D;
+uniform isampler3D isamp3D;
+uniform usampler3D usamp3D;
+uniform samplerCube sampCube;
+uniform isamplerCube isampCube;
+uniform isampler1DArray isamp1DA;
+uniform sampler2DArray samp2DA;
+uniform usampler2DArray usamp2DA;
+uniform isamplerCubeArray isampCubeA;
+uniform usamplerCubeArray usampCubeA;
+
+uniform sampler1DShadow samp1Ds;
+uniform sampler2DShadow samp2Ds;
+uniform samplerCubeShadow sampCubes;
+uniform sampler1DArrayShadow samp1DAs;
+uniform sampler2DArrayShadow samp2DAs;
+uniform samplerCubeArrayShadow sampCubeAs;
+
+uniform samplerBuffer sampBuf;
+uniform sampler2DRect sampRect;
+
+void main()
+{
+ vec2 lod;
+ float pf;
+ vec2 pf2;
+ vec3 pf3;
+
+ lod = textureQueryLod(samp1D, pf);
+ lod += textureQueryLod(isamp2D, pf2);
+ lod += textureQueryLod(usamp3D, pf3);
+ lod += textureQueryLod(sampCube, pf3);
+ lod += textureQueryLod(isamp1DA, pf);
+ lod += textureQueryLod(usamp2DA, pf2);
+ lod += textureQueryLod(isampCubeA, pf3);
+
+ lod += textureQueryLod(samp1Ds, pf);
+ lod += textureQueryLod(samp2Ds, pf2);
+ lod += textureQueryLod(sampCubes, pf3);
+ lod += textureQueryLod(samp1DAs, pf);
+ lod += textureQueryLod(samp2DAs, pf2);
+ lod += textureQueryLod(sampCubeAs, pf3);
+
+ int levels;
+
+ levels = textureQueryLevels(samp1D);
+ levels += textureQueryLevels(usamp2D);
+ levels += textureQueryLevels(isamp3D);
+ levels += textureQueryLevels(isampCube);
+ levels += textureQueryLevels(isamp1DA);
+ levels += textureQueryLevels(samp2DA);
+ levels += textureQueryLevels(usampCubeA);
+
+ levels = textureQueryLevels(samp1Ds);
+ levels += textureQueryLevels(samp2Ds);
+ levels += textureQueryLevels(sampCubes);
+ levels += textureQueryLevels(samp1DAs);
+ levels += textureQueryLevels(samp2DAs);
+ levels += textureQueryLevels(sampCubeAs);
+}
diff --git a/chromium/third_party/glslang/src/Test/spv.separate.frag b/chromium/third_party/glslang/src/Test/spv.separate.frag
new file mode 100644
index 00000000000..10704509bef
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/spv.separate.frag
@@ -0,0 +1,95 @@
+#version 400
+
+uniform sampler s;
+uniform samplerShadow sShadow;
+uniform sampler sA[4];
+uniform texture2D t2d;
+uniform texture3D t3d[4];
+flat in int i;
+
+out vec4 color;
+
+void main()
+{
+ color = texture(sampler2D(t2d, s), vec2(0.5));
+ color += texture(sampler3D(t3d[i], sA[2]), vec3(0.5));
+ color += texture(sampler2D(t2d, s), vec2(0.5));
+}
+
+uniform texture2D tex2D;
+uniform textureCube texCube;
+uniform textureCubeArray texCubeArray;
+uniform itextureCubeArray itexCubeArray;
+uniform utextureCubeArray utexCubeArray;
+uniform itexture1DArray itex1DArray;
+uniform utexture1D utex1D;
+uniform itexture1D itex1D;
+uniform utexture1DArray utex1DArray;
+uniform textureBuffer texBuffer;
+uniform texture2DArray tex2DArray;
+uniform itexture2D itex2D;
+uniform itexture3D itex3D;
+uniform itextureCube itexCube;
+uniform itexture2DArray itex2DArray;
+uniform utexture2D utex2D;
+uniform utexture3D utex3D;
+uniform utextureCube utexCube;
+uniform utexture2DArray utex2DArray;
+uniform itexture2DRect itex2DRect;
+uniform utexture2DRect utex2DRect;
+uniform itextureBuffer itexBuffer;
+uniform utextureBuffer utexBuffer;
+uniform texture2DMS tex2DMS;
+uniform itexture2DMS itex2DMS;
+uniform utexture2DMS utex2DMS;
+uniform texture2DMSArray tex2DMSArray;
+uniform itexture2DMSArray itex2DMSArray;
+uniform utexture2DMSArray utex2DMSArray;
+uniform texture1D tex1D;
+uniform texture3D tex3D;
+uniform texture2DRect tex2DRect;
+uniform texture1DArray tex1DArray;
+
+void foo()
+{
+ sampler2D (tex2D, s);
+ samplerCube (texCube, s);
+ samplerCubeArray (texCubeArray, s);
+ samplerCubeArrayShadow (texCubeArray, sShadow);
+ isamplerCubeArray (itexCubeArray, s);
+ usamplerCubeArray (utexCubeArray, s);
+ sampler1DArrayShadow (tex1DArray, sShadow);
+ isampler1DArray (itex1DArray, s);
+ usampler1D (utex1D, s);
+ isampler1D (itex1D, s);
+ usampler1DArray (utex1DArray, s);
+ samplerBuffer (texBuffer, s);
+ samplerCubeShadow (texCube, sShadow);
+ sampler2DArray (tex2DArray, s);
+ sampler2DArrayShadow (tex2DArray, sShadow);
+ isampler2D (itex2D, s);
+ isampler3D (itex3D, s);
+ isamplerCube (itexCube, s);
+ isampler2DArray (itex2DArray, s);
+ usampler2D (utex2D, s);
+ usampler3D (utex3D, s);
+ usamplerCube (utexCube, s);
+ usampler2DArray (utex2DArray, s);
+ isampler2DRect (itex2DRect, s);
+ usampler2DRect (utex2DRect, s);
+ isamplerBuffer (itexBuffer, s);
+ usamplerBuffer (utexBuffer, s);
+ sampler2DMS (tex2DMS, s);
+ isampler2DMS (itex2DMS, s);
+ usampler2DMS (utex2DMS, s);
+ sampler2DMSArray (tex2DMSArray, s);
+ isampler2DMSArray (itex2DMSArray, s);
+ usampler2DMSArray (utex2DMSArray, s);
+ sampler1D (tex1D, s);
+ sampler1DShadow (tex1D, sShadow);
+ sampler3D (tex3D, s);
+ sampler2DShadow (tex2D, sShadow);
+ sampler2DRect (tex2DRect, s);
+ sampler2DRectShadow (tex2DRect, sShadow);
+ sampler1DArray (tex1DArray, s);
+}
diff --git a/chromium/third_party/glslang/src/Test/spv.set.vert b/chromium/third_party/glslang/src/Test/spv.set.vert
new file mode 100644
index 00000000000..e116c02bca2
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/spv.set.vert
@@ -0,0 +1,14 @@
+#version 450
+
+layout(set = 4, binding = 7) uniform sampler2D samp2D;
+
+layout(set = 0, binding = 8) buffer setBuf {
+ vec4 color;
+} setBufInst;
+
+out vec4 color;
+
+void main()
+{
+ color = setBufInst.color;
+}
diff --git a/chromium/third_party/glslang/src/Test/spv.shaderBallot.comp b/chromium/third_party/glslang/src/Test/spv.shaderBallot.comp
new file mode 100644
index 00000000000..6b28c67c8d0
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/spv.shaderBallot.comp
@@ -0,0 +1,59 @@
+#version 450
+
+#extension GL_ARB_gpu_shader_int64: enable
+#extension GL_ARB_shader_ballot: enable
+
+layout (local_size_x = 8, local_size_y = 8, local_size_z = 1) in;
+
+layout(binding = 0) buffer Buffers
+{
+ vec4 f4;
+ ivec4 i4;
+ uvec4 u4;
+} data[4];
+
+void main()
+{
+ uint invocation = (gl_SubGroupInvocationARB + gl_SubGroupSizeARB) % 4;
+
+ uint64_t relMask = gl_SubGroupEqMaskARB +
+ gl_SubGroupGeMaskARB +
+ gl_SubGroupGtMaskARB +
+ gl_SubGroupLeMaskARB +
+ gl_SubGroupLtMaskARB;
+
+ if (relMask == ballotARB(true))
+ {
+ data[invocation].f4.x = readInvocationARB(data[0].f4.x, invocation);
+ data[invocation].f4.xy = readInvocationARB(data[1].f4.xy, invocation);
+ data[invocation].f4.xyz = readInvocationARB(data[2].f4.xyz, invocation);
+ data[invocation].f4 = readInvocationARB(data[3].f4, invocation);
+
+ data[invocation].i4.x = readInvocationARB(data[0].i4.x, invocation);
+ data[invocation].i4.xy = readInvocationARB(data[1].i4.xy, invocation);
+ data[invocation].i4.xyz = readInvocationARB(data[2].i4.xyz, invocation);
+ data[invocation].i4 = readInvocationARB(data[3].i4, invocation);
+
+ data[invocation].u4.x = readInvocationARB(data[0].u4.x, invocation);
+ data[invocation].u4.xy = readInvocationARB(data[1].u4.xy, invocation);
+ data[invocation].u4.xyz = readInvocationARB(data[2].u4.xyz, invocation);
+ data[invocation].u4 = readInvocationARB(data[3].u4, invocation);
+ }
+ else
+ {
+ data[invocation].f4.x = readFirstInvocationARB(data[0].f4.x);
+ data[invocation].f4.xy = readFirstInvocationARB(data[1].f4.xy);
+ data[invocation].f4.xyz = readFirstInvocationARB(data[2].f4.xyz);
+ data[invocation].f4 = readFirstInvocationARB(data[3].f4);
+
+ data[invocation].i4.x = readFirstInvocationARB(data[0].i4.x);
+ data[invocation].i4.xy = readFirstInvocationARB(data[1].i4.xy);
+ data[invocation].i4.xyz = readFirstInvocationARB(data[2].i4.xyz);
+ data[invocation].i4 = readFirstInvocationARB(data[3].i4);
+
+ data[invocation].u4.x = readFirstInvocationARB(data[0].u4.x);
+ data[invocation].u4.xy = readFirstInvocationARB(data[1].u4.xy);
+ data[invocation].u4.xyz = readFirstInvocationARB(data[2].u4.xyz);
+ data[invocation].u4 = readFirstInvocationARB(data[3].u4);
+ }
+} \ No newline at end of file
diff --git a/chromium/third_party/glslang/src/Test/spv.shaderGroupVote.comp b/chromium/third_party/glslang/src/Test/spv.shaderGroupVote.comp
new file mode 100644
index 00000000000..513d06a633a
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/spv.shaderGroupVote.comp
@@ -0,0 +1,21 @@
+#version 450
+
+#extension GL_ARB_shader_group_vote : enable
+
+layout(local_size_x = 4, local_size_y = 4) in;
+
+layout(std430, binding = 0) buffer Buffers
+{
+ bool b;
+};
+
+void main()
+{
+ bool b1 = b;
+
+ b1 = anyInvocationARB(b1);
+ b1 = allInvocationsARB(b1);
+ b1 = allInvocationsEqualARB(b1);
+
+ b = b1;
+}
diff --git a/chromium/third_party/glslang/src/Test/spv.shiftOps.frag b/chromium/third_party/glslang/src/Test/spv.shiftOps.frag
new file mode 100644
index 00000000000..5049cc84bdc
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/spv.shiftOps.frag
@@ -0,0 +1,18 @@
+#version 450
+
+flat in int i1;
+flat in uint u1;
+flat in ivec3 i3;
+flat in uvec3 u3;
+
+out ivec3 icolor;
+out uvec3 ucolor;
+
+void main()
+{
+ icolor = i3 << u1;
+ icolor <<= 4u;
+
+ ucolor = u3 >> i1;
+ ucolor >>= 5;
+}
diff --git a/chromium/third_party/glslang/src/Test/spv.shortCircuit.frag b/chromium/third_party/glslang/src/Test/spv.shortCircuit.frag
new file mode 100755
index 00000000000..ca031c2d00c
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/spv.shortCircuit.frag
@@ -0,0 +1,50 @@
+#version 400
+
+flat in ivec4 uiv4;
+in vec4 uv4;
+bool ub;
+bool uba;
+bvec4 ub41, ub42;
+in float uf;
+flat in int ui;
+
+out float of1;
+out vec4 of4;
+
+bool foo() { ++of1; return of1 > 10.0; }
+
+void main()
+{
+ of1 = 0.0;
+ of4 = vec4(0.0);
+
+ if (ub || ui > 2) // not worth short circuiting
+ ++of1;
+
+ if (ub && !uba) // not worth short circuiting
+ ++of1;
+
+ if (ub || foo()) // must short circuit
+ ++of1;
+
+ if (ub && foo()) // must short circuit
+ ++of1;
+
+ if (foo() || ub) // not worth short circuiting
+ ++of1;
+
+ if (foo() && ub) // not worth short circuiting
+ ++of1;
+
+ if (ub || ++of1 > 1.0) // must short circuit
+ ++of4;
+
+ if (++of1 > 1.0 || ub) // not worth short circuiting
+ ++of4;
+
+ if (ub || sin(uf) * 4.0 > of1) // worth short circuiting
+ ++of1;
+
+ if (ub && sin(uf) * 4.0 > of1) // worth short circuiting
+ ++of1;
+}
diff --git a/chromium/third_party/glslang/src/Test/spv.simpleFunctionCall.frag b/chromium/third_party/glslang/src/Test/spv.simpleFunctionCall.frag
new file mode 100644
index 00000000000..7513ce317e1
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/spv.simpleFunctionCall.frag
@@ -0,0 +1,13 @@
+#version 150
+
+in vec4 BaseColor;
+
+vec4 foo()
+{
+ return BaseColor;
+}
+
+void main()
+{
+ gl_FragColor = foo();
+}
diff --git a/chromium/third_party/glslang/src/Test/spv.simpleMat.vert b/chromium/third_party/glslang/src/Test/spv.simpleMat.vert
new file mode 100644
index 00000000000..22f5a379162
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/spv.simpleMat.vert
@@ -0,0 +1,19 @@
+#version 330
+
+varying mat4 mvp;
+
+in vec4 v;
+in mat3 am3;
+in mat4 arraym[3];
+
+out float f;
+out vec4 glPos;
+//out mat4 mout[2];
+
+void main()
+{
+ //needs complex output blocks to work: gl_Position = mvp * v;
+ glPos = mvp * v;
+ f = am3[2][1] + arraym[1][2][3];
+ //mout[1] = arraym[2];
+}
diff --git a/chromium/third_party/glslang/src/Test/spv.sparseTexture.frag b/chromium/third_party/glslang/src/Test/spv.sparseTexture.frag
new file mode 100644
index 00000000000..8f8c0cbf065
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/spv.sparseTexture.frag
@@ -0,0 +1,91 @@
+#version 450
+#extension GL_ARB_sparse_texture2: enable
+
+uniform sampler2D s2D;
+uniform sampler3D s3D;
+uniform sampler2DShadow s2DShadow;
+uniform samplerCubeShadow sCubeShadow;
+uniform sampler2DArrayShadow s2DArrayShadow;
+uniform sampler2DRectShadow s2DRectShadow;
+uniform samplerCubeArrayShadow sCubeArrayShadow;
+uniform sampler2DMS s2DMS;
+
+uniform isamplerCube isCube;
+uniform isampler2DArray is2DArray;
+
+uniform usamplerCubeArray usCubeArray;
+uniform usampler2DRect us2DRect;
+
+layout(rgba32f) uniform image2D i2D;
+layout(rgba32i) uniform iimage3D ii3D;
+layout(rgba32f) uniform image2DMS i2DMS;
+
+in vec2 c2;
+in vec3 c3;
+in vec4 c4;
+
+in flat ivec2 ic2;
+in flat ivec3 ic3;
+
+in flat ivec2 offsets[4];
+
+out vec4 outColor;
+
+void main()
+{
+ int resident = 0;
+ vec4 texel = vec4(0.0);
+ ivec4 itexel = ivec4(0);
+ uvec4 utexel = uvec4(0);
+
+ resident |= sparseTextureARB(s2D, c2, texel);
+ resident |= sparseTextureARB(s3D, c3, texel, 2.0);
+ resident |= sparseTextureARB(isCube, c3, itexel);
+ resident |= sparseTextureARB(s2DShadow, c3, texel.x);
+ resident |= sparseTextureARB(sCubeArrayShadow, c4, 1.0, texel.x);
+
+ resident |= sparseTextureLodARB(s2D, c2, 2.0, texel);
+ resident |= sparseTextureLodARB(usCubeArray, c4, 1.0, utexel);
+ resident |= sparseTextureLodARB(s2DShadow, c3, 2.0, texel.y);
+
+ resident |= sparseTextureOffsetARB(s3D, c3, ivec3(2), texel, 2.0);
+ resident |= sparseTextureOffsetARB(us2DRect, c2, ivec2(3), utexel);
+ resident |= sparseTextureOffsetARB(s2DArrayShadow, c4, ivec2(5), texel.z);
+
+ resident |= sparseTexelFetchARB(s2D, ivec2(c2), 2, texel);
+ resident |= sparseTexelFetchARB(us2DRect, ivec2(c2), utexel);
+ resident |= sparseTexelFetchARB(s2DMS, ivec2(c2), 4, texel);
+
+ resident |= sparseTexelFetchOffsetARB(s3D, ivec3(c3), 2, ivec3(4), texel);
+ resident |= sparseTexelFetchOffsetARB(us2DRect, ivec2(c2), ivec2(3), utexel);
+
+ resident |= sparseTextureLodOffsetARB(s2D, c2, 2.0, ivec2(5), texel);
+ resident |= sparseTextureLodOffsetARB(is2DArray, c3, 2.0, ivec2(6), itexel);
+ resident |= sparseTextureLodOffsetARB(s2DShadow, c3, 2.0, ivec2(7), texel.z);
+
+ resident |= sparseTextureGradARB(s3D, c3, c3, c3, texel);
+ resident |= sparseTextureGradARB(sCubeShadow, c4, c3, c3, texel.y);
+ resident |= sparseTextureGradARB(usCubeArray, c4, c3, c3, utexel);
+
+ resident |= sparseTextureGradOffsetARB(s2D, c2, c2, c2, ivec2(5), texel);
+ resident |= sparseTextureGradOffsetARB(s2DRectShadow, c3, c2, c2, ivec2(6), texel.w);
+ resident |= sparseTextureGradOffsetARB(is2DArray, c3, c2, c2, ivec2(2), itexel);
+
+ resident |= sparseTextureGatherARB(s2D, c2, texel);
+ resident |= sparseTextureGatherARB(is2DArray, c3, itexel, 2);
+ resident |= sparseTextureGatherARB(s2DArrayShadow, c3, 2.0, texel);
+
+ resident |= sparseTextureGatherOffsetARB(s2D, c2, ivec2(4), texel);
+ resident |= sparseTextureGatherOffsetARB(is2DArray, c3, ivec2(5), itexel, 2);
+ resident |= sparseTextureGatherOffsetARB(s2DRectShadow, c2, 2.0, ivec2(7), texel);
+
+ resident |= sparseTextureGatherOffsetsARB(s2D, c2, offsets, texel);
+ resident |= sparseTextureGatherOffsetsARB(is2DArray, c3, offsets, itexel, 2);
+ resident |= sparseTextureGatherOffsetsARB(s2DRectShadow, c2, 2.0, offsets, texel);
+
+ resident |= sparseImageLoadARB(i2D, ic2, texel);
+ resident |= sparseImageLoadARB(ii3D, ic3, itexel);
+ resident |= sparseImageLoadARB(i2DMS, ic2, 3, texel);
+
+ outColor = sparseTexelsResidentARB(resident) ? texel : vec4(itexel) + vec4(utexel);
+} \ No newline at end of file
diff --git a/chromium/third_party/glslang/src/Test/spv.sparseTextureClamp.frag b/chromium/third_party/glslang/src/Test/spv.sparseTextureClamp.frag
new file mode 100644
index 00000000000..5040782f227
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/spv.sparseTextureClamp.frag
@@ -0,0 +1,70 @@
+#version 450
+#extension GL_ARB_sparse_texture_clamp: enable
+
+uniform sampler2D s2D;
+uniform sampler3D s3D;
+uniform sampler2DShadow s2DShadow;
+uniform samplerCubeShadow sCubeShadow;
+uniform sampler2DArrayShadow s2DArrayShadow;
+uniform sampler2DRectShadow s2DRectShadow;
+uniform samplerCubeArrayShadow sCubeArrayShadow;
+
+uniform isamplerCube isCube;
+uniform isampler2DArray is2DArray;
+
+uniform usamplerCubeArray usCubeArray;
+uniform usampler2DRect us2DRect;
+
+in vec2 c2;
+in vec3 c3;
+in vec4 c4;
+
+in float lodClamp;
+
+out vec4 outColor;
+
+void main()
+{
+ int resident = 0;
+ vec4 texel = vec4(0.0);
+ ivec4 itexel = ivec4(0);
+ uvec4 utexel = uvec4(0);
+
+ resident |= sparseTextureClampARB(s2D, c2, lodClamp, texel);
+ resident |= sparseTextureClampARB(s3D, c3, lodClamp, texel, 2.0);
+ resident |= sparseTextureClampARB(isCube, c3, lodClamp, itexel);
+ resident |= sparseTextureClampARB(s2DShadow, c3, lodClamp, texel.x);
+ resident |= sparseTextureClampARB(sCubeArrayShadow, c4, 1.0, lodClamp, texel.x);
+
+ texel += textureClampARB(s2D, c2, lodClamp);
+ texel += textureClampARB(s3D, c3, lodClamp, 2.0);
+ itexel += textureClampARB(isCube, c3, lodClamp);
+ texel.x += textureClampARB(s2DShadow, c3, lodClamp);
+ texel.x += textureClampARB(sCubeArrayShadow, c4, 1.0, lodClamp);
+
+ resident |= sparseTextureOffsetClampARB(s3D, c3, ivec3(2), lodClamp, texel, 2.0);
+ resident |= sparseTextureOffsetClampARB(us2DRect, c2, ivec2(3), lodClamp, utexel);
+ resident |= sparseTextureOffsetClampARB(s2DArrayShadow, c4, ivec2(5), lodClamp, texel.z);
+
+ texel += textureOffsetClampARB(s3D, c3, ivec3(2), lodClamp, 2.0);
+ utexel += textureOffsetClampARB(us2DRect, c2, ivec2(3), lodClamp);
+ texel.z += textureOffsetClampARB(s2DArrayShadow, c4, ivec2(5), lodClamp);
+
+ resident |= sparseTextureGradClampARB(s3D, c3, c3, c3, lodClamp, texel);
+ resident |= sparseTextureGradClampARB(sCubeShadow, c4, c3, c3, lodClamp, texel.y);
+ resident |= sparseTextureGradClampARB(usCubeArray, c4, c3, c3, lodClamp, utexel);
+
+ texel += textureGradClampARB(s3D, c3, c3, c3, lodClamp);
+ texel.y += textureGradClampARB(sCubeShadow, c4, c3, c3, lodClamp);
+ utexel += textureGradClampARB(usCubeArray, c4, c3, c3, lodClamp);
+
+ resident |= sparseTextureGradOffsetClampARB(s2D, c2, c2, c2, ivec2(5), lodClamp, texel);
+ resident |= sparseTextureGradOffsetClampARB(s2DRectShadow, c3, c2, c2, ivec2(6), lodClamp, texel.w);
+ resident |= sparseTextureGradOffsetClampARB(is2DArray, c3, c2, c2, ivec2(2), lodClamp, itexel);
+
+ texel += textureGradOffsetClampARB(s2D, c2, c2, c2, ivec2(5), lodClamp);
+ texel.w += textureGradOffsetClampARB(s2DRectShadow, c3, c2, c2, ivec2(6), lodClamp);
+ itexel += textureGradOffsetClampARB(is2DArray, c3, c2, c2, ivec2(2), lodClamp);
+
+ outColor = sparseTexelsResidentARB(resident) ? texel : vec4(itexel) + vec4(utexel);
+} \ No newline at end of file
diff --git a/chromium/third_party/glslang/src/Test/spv.specConstant.comp b/chromium/third_party/glslang/src/Test/spv.specConstant.comp
new file mode 100644
index 00000000000..e50f40d847e
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/spv.specConstant.comp
@@ -0,0 +1,13 @@
+#version 450
+
+layout(local_size_x_id = 18, local_size_z_id = 19) in;
+layout(local_size_x = 32, local_size_y = 32) in;
+
+buffer bn {
+ uint a;
+} bi;
+
+void main()
+{
+ bi.a = gl_WorkGroupSize.x * gl_WorkGroupSize.y * gl_WorkGroupSize.z;
+}
diff --git a/chromium/third_party/glslang/src/Test/spv.specConstant.vert b/chromium/third_party/glslang/src/Test/spv.specConstant.vert
new file mode 100644
index 00000000000..871220a2a18
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/spv.specConstant.vert
@@ -0,0 +1,51 @@
+#version 400
+
+layout(constant_id = 16) const int arraySize = 5;
+in vec4 ucol[arraySize];
+
+layout(constant_id = 17) const bool spBool = true;
+layout(constant_id = 18) const float spFloat = 3.14;
+layout(constant_id = 19) const double spDouble = 3.1415926535897932384626433832795;
+layout(constant_id = 22) const uint scale = 2;
+
+layout(constant_id = 24) gl_MaxImageUnits;
+
+out vec4 color;
+out int size;
+
+// parameter should be considered same type as ucol
+void foo(vec4 p[arraySize]);
+
+void main()
+{
+ color = ucol[2];
+ size = arraySize;
+ if (spBool)
+ color *= scale;
+ color += float(spDouble / spFloat);
+
+ foo(ucol);
+}
+
+layout(constant_id = 116) const int dupArraySize = 12;
+in vec4 dupUcol[dupArraySize];
+
+layout(constant_id = 117) const bool spDupBool = true;
+layout(constant_id = 118) const float spDupFloat = 3.14;
+layout(constant_id = 119) const double spDupDouble = 3.1415926535897932384626433832795;
+layout(constant_id = 122) const uint dupScale = 2;
+
+void foo(vec4 p[arraySize])
+{
+ color += dupUcol[2];
+ size += dupArraySize;
+ if (spDupBool)
+ color *= dupScale;
+ color += float(spDupDouble / spDupFloat);
+}
+
+int builtin_spec_constant()
+{
+ int result = gl_MaxImageUnits;
+ return result;
+}
diff --git a/chromium/third_party/glslang/src/Test/spv.specConstantComposite.vert b/chromium/third_party/glslang/src/Test/spv.specConstantComposite.vert
new file mode 100644
index 00000000000..d9d07a3ed59
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/spv.specConstantComposite.vert
@@ -0,0 +1,98 @@
+#version 450
+
+// constant_id specified scalar spec constants
+layout(constant_id = 200) const int spec_int = 3;
+layout(constant_id = 201) const float spec_float = 3.14;
+layout(constant_id = 202) const
+ double spec_double = 3.1415926535897932384626433832795;
+layout(constant_id = 203) const bool spec_bool = true;
+
+// const float cast_spec_float = float(spec_float);
+
+// Flat struct
+struct flat_struct {
+ int i;
+ float f;
+ double d;
+ bool b;
+};
+
+// Nesting struct
+struct nesting_struct {
+ flat_struct nested;
+ vec4 v;
+ int i;
+};
+
+// Expect OpSpecConstantComposite
+// Flat struct initializer
+//const flat_struct spec_flat_struct_all_spec = {spec_int, spec_float,
+// spec_double, spec_bool};
+//const flat_struct spec_flat_struct_partial_spec = {30, 30.14, spec_double,
+// spec_bool};
+
+// Nesting struct initializer
+//const nesting_struct nesting_struct_ctor = {
+// {spec_int, spec_float, spec_double, false},
+// vec4(0.1, 0.1, 0.1, 0.1),
+// spec_int};
+
+// Vector constructor
+//const vec4 spec_vec4_all_spec =
+// vec4(spec_float, spec_float, spec_float, spec_float);
+//const vec4 spec_vec4_partial_spec =
+// vec4(spec_float, spec_float, 300.14, 300.14);
+//const vec4 spec_vec4_from_one_scalar = vec4(spec_float);
+
+// Matrix constructor
+//const mat2x3 spec_mat2x3 = mat2x3(spec_float, spec_float, spec_float, 1.1, 2.2, 3.3);
+//const mat2x3 spec_mat2x3_from_one_scalar = mat2x3(spec_float);
+
+// Struct nesting constructor
+//const nesting_struct spec_nesting_struct_all_spec = {
+// spec_flat_struct_all_spec, spec_vec4_all_spec, spec_int};
+//const nesting_struct spec_nesting_struct_partial_spec = {
+// spec_flat_struct_partial_spec, spec_vec4_partial_spec, 3000};
+
+//const float spec_float_array[5] = {spec_float, spec_float, 1.0, 2.0, 3.0};
+//const int spec_int_array[5] = {spec_int, spec_int, 1, 2, 30};
+
+// global_vec4_array_with_spec_length is not a spec constant, but its array
+// size is. When calling global_vec4_array_with_spec_length.length(), A
+// TIntermSymbol Node should be returned, instead of a TIntermConstantUnion
+// node which represents a known constant value.
+in vec4 global_vec4_array_with_spec_length[spec_int];
+
+out vec4 color;
+
+void refer_primary_spec_const() {
+ if (spec_bool) color *= spec_int;
+}
+
+void refer_composite_spec_const() {
+ //color += spec_vec4_all_spec;
+ //color -= spec_vec4_partial_spec;
+}
+
+void refer_copmosite_dot_dereference() {
+ //color *= spec_nesting_struct_all_spec.i;
+ //color += spec_vec4_all_spec.x;
+}
+
+void refer_composite_bracket_dereference() {
+ //color -= spec_float_array[1];
+ //color /= spec_int_array[spec_int_array[spec_int]];
+}
+
+int refer_spec_const_array_length() {
+ int len = global_vec4_array_with_spec_length.length();
+ return len;
+}
+
+void declare_spec_const_in_func() {
+ //const nesting_struct spec_const_declared_in_func = {
+ // spec_flat_struct_partial_spec, spec_vec4_partial_spec, 10};
+ //color /= spec_const_declared_in_func.i;
+}
+
+void main() {}
diff --git a/chromium/third_party/glslang/src/Test/spv.specConstantOperations.vert b/chromium/third_party/glslang/src/Test/spv.specConstantOperations.vert
new file mode 100644
index 00000000000..b5e46ad4c01
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/spv.specConstantOperations.vert
@@ -0,0 +1,110 @@
+#version 450
+
+layout(constant_id = 200) const float sp_float = 3.1415926;
+layout(constant_id = 201) const int sp_int = 10;
+layout(constant_id = 202) const uint sp_uint = 100;
+layout(constant_id = 203) const int sp_sint = -10;
+
+
+//
+// Scalars
+//
+
+// uint/int <-> bool conversion
+const bool bool_from_int = bool(sp_int);
+const bool bool_from_uint = bool(sp_uint);
+const int int_from_bool = int(bool_from_int);
+const uint uint_from_bool = uint(bool_from_int);
+
+// uint <-> int
+const uint sp_uint_from_sint = uint(sp_sint);
+const int sp_sint_from_uint = int(sp_uint);
+
+// Negate and Not
+const int negate_int = -sp_int;
+const int not_int = ~sp_int;
+
+// Add and Subtract
+const int sp_int_add_two = sp_int + 2;
+const int sp_int_add_two_sub_three = sp_int + 2 - 3;
+const int sp_int_add_two_sub_four = sp_int_add_two - 4;
+
+// Mul, Div and Rem
+const int sp_sint_mul_two = sp_sint * 2;
+const uint sp_uint_mul_two = sp_uint * 2;
+const int sp_sint_mul_two_div_five = sp_sint_mul_two / 5;
+const uint sp_uint_mul_two_div_five = sp_uint_mul_two / 5;
+const int sp_sint_rem_four = sp_sint % 4;
+const uint sp_uint_rem_four = sp_uint % 4;
+const int sp_sint_mul_three_div_five = sp_sint * 3 / 5;
+
+// Shift
+const int sp_sint_shift_right_arithmetic = sp_sint >> 10;
+const uint sp_uint_shift_right_arithmetic = sp_uint >> 20;
+const int sp_sint_shift_left = sp_sint << 1;
+const uint sp_uint_shift_left = sp_uint << 2;
+
+// Bitwise And, Or, Xor
+const int sp_sint_or_256 = sp_sint | 0x100;
+const uint sp_uint_xor_512 = sp_uint ^ 0x200;
+
+/* // Scalar comparison */
+const bool sp_int_lt_sp_sint = sp_int < sp_sint;
+const bool sp_uint_equal_sp_uint = sp_uint == sp_uint;
+const bool sp_int_gt_sp_sint = sp_int > sp_sint;
+
+//
+// Vectors
+//
+const ivec4 iv = ivec4(20, 30, sp_int, sp_int);
+const uvec4 uv = uvec4(sp_uint, sp_uint, -1, -2);
+//const vec4 fv = vec4(sp_float, 1.25, sp_float, 1.25);
+
+// uint/int <-> bool conversion
+const bvec4 bv_from_iv = bvec4(iv);
+const bvec4 bv_from_uv = bvec4(uv);
+const ivec4 iv_from_bv = ivec4(bv_from_iv);
+const uvec4 uv_from_bv = uvec4(bv_from_iv);
+
+// uint <-> int
+const uvec4 uv_from_iv = uvec4(iv);
+const ivec4 iv_from_uv = ivec4(uv);
+
+// Negate and Not
+const ivec4 not_iv = ~iv;
+const ivec4 negate_iv = -iv;
+
+// Add and Subtract
+const ivec4 iv_add_two = iv + 2;
+const ivec4 iv_add_two_sub_three = iv + 2 - 3;
+const ivec4 iv_add_two_sub_four = iv_add_two_sub_three - 4;
+
+// Mul, Div and Rem
+const ivec4 iv_mul_two = iv * 2;
+const ivec4 iv_mul_two_div_five = iv_mul_two / 5;
+const ivec4 iv_rem_four = iv % 4;
+
+// Shift
+const ivec4 iv_shift_right_arithmetic = iv >> 10;
+const ivec4 iv_shift_left = iv << 2;
+
+// Bitwise And, Or, Xor
+const ivec4 iv_or_1024 = iv | 0x400;
+const uvec4 uv_xor_2048 = uv ^ 0x800;
+
+// Swizzles
+const int iv_x = iv.x;
+const ivec2 iv_yx = iv.yx;
+const ivec3 iv_zyx = iv.zyx;
+const ivec4 iv_yzxw = iv.yzxw;
+
+int non_const_array_size_from_spec_const() {
+ int array[sp_int + 2];
+ for (int i = 0; i < sp_int + 2; i++) {
+ array[i] = 1023;
+ }
+ return array[sp_int + 1];
+}
+
+void main() {}
+
diff --git a/chromium/third_party/glslang/src/Test/spv.structAssignment.frag b/chromium/third_party/glslang/src/Test/spv.structAssignment.frag
new file mode 100644
index 00000000000..3be0e9f1a50
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/spv.structAssignment.frag
@@ -0,0 +1,39 @@
+#version 140
+
+uniform sampler2D samp2D;
+in mediump vec2 coord;
+
+struct lunarStruct1 {
+ int i;
+ float f;
+};
+
+struct lunarStruct2 {
+ int i;
+ float f;
+ lunarStruct1 s1_1;
+};
+
+struct lunarStruct3 {
+ lunarStruct2 s2_1;
+ int i;
+ float f;
+ lunarStruct1 s1_1;
+};
+
+
+lunarStruct1 foo;
+lunarStruct2 foo2;
+lunarStruct3 foo3;
+
+void main()
+{
+ lunarStruct2 locals2;
+
+ if (foo3.s2_1.i > 0)
+ locals2 = foo3.s2_1;
+ else
+ locals2 = foo2;
+
+ gl_FragColor = locals2.s1_1.f * texture(samp2D, coord);
+}
diff --git a/chromium/third_party/glslang/src/Test/spv.structDeref.frag b/chromium/third_party/glslang/src/Test/spv.structDeref.frag
new file mode 100644
index 00000000000..94232ad203e
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/spv.structDeref.frag
@@ -0,0 +1,71 @@
+#version 140
+
+uniform sampler2D samp2D;
+in vec2 coord;
+
+struct s0 {
+ int i;
+};
+
+struct s00 {
+ s0 s0_0;
+};
+
+struct s1 {
+ int i;
+ float f;
+ s0 s0_1;
+};
+
+struct s2 {
+ int i;
+ float f;
+ s1 s1_1;
+};
+
+struct s3 {
+ s2[12] s2_1;
+ int i;
+ float f;
+ s1 s1_1;
+};
+
+
+s0 foo0;
+s1 foo1;
+s2 foo2;
+s3 foo3;
+
+s00 foo00;
+
+void main()
+{
+ s0 locals0;
+ s2 locals2;
+ s00 locals00;
+
+ float[6] fArray;
+
+ s1[10] locals1Array;
+
+ if (foo3.s2_1[9].i > 0) {
+ locals2.f = 1.0;
+ locals2.s1_1 = s1(0, 1.0, s0(0));
+ fArray = float[6]( 0.0, 0.0, 0.0, 0.0, 0.0, 0.0);
+ locals1Array[6] = foo1;
+ locals0 = s0(0);
+ locals00 = s00(s0(0));
+ } else {
+ locals2.f = coord.x;
+ locals2.s1_1 = s1(1, coord.y, foo0);
+ fArray = float[6]( 0.0, 1.0, 2.0, 3.0, 4.0, 5.0);
+ locals1Array[6] = locals2.s1_1;
+ locals0 = foo1.s0_1;
+ locals00 = foo00;
+ }
+
+ if (locals0.i > 5)
+ locals0 = locals00.s0_0;
+
+ gl_FragColor = (float(locals0.i) + locals1Array[6].f + fArray[3] + locals2.s1_1.f) * texture(samp2D, coord);
+}
diff --git a/chromium/third_party/glslang/src/Test/spv.structure.frag b/chromium/third_party/glslang/src/Test/spv.structure.frag
new file mode 100644
index 00000000000..76751a7f9c6
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/spv.structure.frag
@@ -0,0 +1,31 @@
+#version 140
+uniform sampler2D samp2D;
+in vec2 coord;
+
+struct lunarStruct1 {
+ int i;
+ float f[4];
+ vec4 color[5];
+};
+
+struct lunarStruct2 {
+ int i[5];
+ float f;
+ lunarStruct1 s1_1[7];
+};
+
+lunarStruct1 foo;
+lunarStruct2 foo2[5];
+
+void main()
+{
+ float scale = 0.0;
+
+ if (foo2[3].i[4] > 0)
+ scale = foo2[3].s1_1[2].color[3].x;
+ else
+ scale = foo2[3].s1_1[2].f[3];
+
+ gl_FragColor = scale * texture(samp2D, coord);
+}
+
diff --git a/chromium/third_party/glslang/src/Test/spv.subpass.frag b/chromium/third_party/glslang/src/Test/spv.subpass.frag
new file mode 100644
index 00000000000..7856c64cdf8
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/spv.subpass.frag
@@ -0,0 +1,29 @@
+#version 400
+
+layout(input_attachment_index = 1) uniform subpassInput sub;
+layout(input_attachment_index = 2) uniform subpassInputMS subMS;
+layout(input_attachment_index = 3) uniform isubpassInput isub;
+layout(input_attachment_index = 4) uniform isubpassInputMS isubMS;
+layout(input_attachment_index = 5) uniform usubpassInput usub;
+layout(input_attachment_index = 6) uniform usubpassInputMS usubMS;
+
+out vec4 color;
+out ivec4 icolor;
+out uvec4 ucolor;
+
+void foo(isubpassInputMS sb)
+{
+ icolor += subpassLoad(sb, 3);
+}
+
+void main()
+{
+ color = subpassLoad(sub);
+ color += subpassLoad(subMS, 3);
+ icolor = subpassLoad(isub);
+ icolor += subpassLoad(isubMS, 3);
+ ucolor = subpassLoad(usub);
+ ucolor += subpassLoad(usubMS, 3);
+
+ foo(isubMS);
+}
diff --git a/chromium/third_party/glslang/src/Test/spv.switch.frag b/chromium/third_party/glslang/src/Test/spv.switch.frag
new file mode 100644
index 00000000000..c01a3ef0d70
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/spv.switch.frag
@@ -0,0 +1,142 @@
+#version 310 es
+precision mediump float;
+flat in int c, d;
+in float x;
+out float color;
+in vec4 v;
+
+vec4 foo1(vec4 v1, vec4 v2, int i1)
+{
+ switch (i1)
+ {
+ case 0:
+ return v1;
+ case 2:
+ case 1:
+ return v2;
+ case 3:
+ return v1 * v2;
+ }
+
+ return vec4(0.0);
+}
+
+vec4 foo2(vec4 v1, vec4 v2, int i1)
+{
+ switch (i1)
+ {
+ case 0:
+ return v1;
+ case 2:
+ return vec4(1.0);
+ case 1:
+ return v2;
+ case 3:
+ return v1 * v2;
+ }
+
+ return vec4(0.0);
+}
+
+void main()
+{
+ float f;
+ int a[2];
+ int local = c;
+
+ switch(++local)
+ {
+ }
+
+ switch (c) {
+ case 1:
+ f = sin(x);
+ break;
+ case 2:
+ f = cos(x);
+ break;
+ default:
+ f = tan(x);
+ }
+
+ switch (c) {
+ case 1:
+ f += sin(x);
+ case 2:
+ f += cos(x);
+ break;
+ default:
+ f += tan(x);
+ }
+
+ switch (c) {
+ case 1:
+ f += sin(x);
+ break;
+ case 2:
+ f += cos(x);
+ break;
+ }
+
+ switch (c) {
+ case 1:
+ f += sin(x);
+ break;
+ case 2:
+ switch (d) {
+ case 1:
+ f += x * x * x;
+ break;
+ case 2:
+ f += x * x;
+ break;
+ }
+ break;
+ default:
+ f += tan(x);
+ }
+
+ for (int i = 0; i < 10; ++i) {
+ switch (c) {
+ case 1:
+ f += sin(x);
+ for (int j = 20; j < 30; ++j) {
+ ++f;
+ if (f < 100.2)
+ break;
+ }
+ break;
+ case 2:
+ f += cos(x);
+ break;
+ break;
+ default:
+ f += tan(x);
+ }
+
+ if (f < 3.43)
+ break;
+ }
+
+ switch (c) {
+ case 1:
+ f += sin(x);
+ break;
+ case 2:
+ // test no statements at end
+ }
+
+ color = f + float(local);
+
+ color += foo1(v,v,c).y;
+ color += foo2(v,v,c).z;
+
+ switch (c) {
+ case 0: break;
+ default:
+ }
+
+ switch (c) {
+ default:
+ }
+}
diff --git a/chromium/third_party/glslang/src/Test/spv.swizzle.frag b/chromium/third_party/glslang/src/Test/spv.swizzle.frag
new file mode 100644
index 00000000000..3f34311235c
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/spv.swizzle.frag
@@ -0,0 +1,52 @@
+#version 140
+
+in float blend;
+in vec4 u;
+bool p;
+
+in vec2 t;
+
+void main()
+{
+ float blendscale = 1.789;
+
+ vec4 w = u;
+ vec4 w_undef; // test undef
+ vec4 w_dep = u; // test dependent swizzles
+ vec4 w_reorder = u; // test reordering
+ vec4 w2 = u;
+ vec4 w_flow = u; // test flowControl
+
+ w_reorder.z = blendscale;
+
+ w.wy = t;
+
+ w_reorder.x = blendscale;
+
+ w2.xyzw = u.zwxy;
+
+ w_reorder.y = blendscale;
+
+ w_dep.xy = w2.xz;
+ w_dep.zw = t;
+
+ w_undef.xy = u.zw;
+
+ if (p)
+ w_flow.x = t.x;
+ else
+ w_flow.x = t.y;
+
+ gl_FragColor = mix(w_reorder, w_undef, w * w2 * w_dep * w_flow);
+
+ vec2 c = t;
+ vec4 rep = vec4(0.0, 0.0, 0.0, 1.0);
+
+ if (c.x < 0.0)
+ c.x *= -1.0;
+
+ if (c.x <= 1.0)
+ rep.x = 3.4;
+
+ gl_FragColor += rep;
+}
diff --git a/chromium/third_party/glslang/src/Test/spv.test.frag b/chromium/third_party/glslang/src/Test/spv.test.frag
new file mode 100644
index 00000000000..68e712824e5
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/spv.test.frag
@@ -0,0 +1,22 @@
+#version 400
+
+uniform sampler2D texSampler2D;
+uniform sampler3D texSampler3D;
+
+in float blend;
+in vec2 scale;
+in vec4 u;
+
+in vec2 t;
+in vec3 coords;
+
+void main()
+{
+ float blendscale = 1.789;
+
+ vec4 v = texture(texSampler2D, (t + scale) / scale ).wzyx;
+
+ vec4 w = texture(texSampler3D, coords) + v;
+
+ gl_FragColor = mix(w, u, blend * blendscale);
+}
diff --git a/chromium/third_party/glslang/src/Test/spv.test.vert b/chromium/third_party/glslang/src/Test/spv.test.vert
new file mode 100644
index 00000000000..e917f6d7969
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/spv.test.vert
@@ -0,0 +1,14 @@
+#version 140
+
+in mat4 transform;
+
+attribute vec4 position;
+in vec2 uv_in;
+
+out vec2 uv;
+
+void main()
+{
+ uv = uv_in;
+ gl_Position = transform * position;
+}
diff --git a/chromium/third_party/glslang/src/Test/spv.texture.frag b/chromium/third_party/glslang/src/Test/spv.texture.frag
new file mode 100644
index 00000000000..883c3124fd1
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/spv.texture.frag
@@ -0,0 +1,73 @@
+#version 140
+
+uniform sampler1D texSampler1D;
+uniform sampler2D texSampler2D;
+uniform sampler3D texSampler3D;
+uniform samplerCube texSamplerCube;
+uniform sampler1DShadow shadowSampler1D;
+uniform sampler2DShadow shadowSampler2D;
+
+varying float blend;
+varying vec2 scale;
+varying vec4 u;
+
+in vec2 t;
+in vec2 coords2D;
+
+void main()
+{
+ float blendscale = 1.789;
+ float bias = 2.0;
+ float lod = 3.0;
+ float proj = 2.0;
+ float coords1D = 1.789;
+ vec3 coords3D = vec3(1.789, 2.718, 3.453);
+ vec4 coords4D = vec4(1.789, 2.718, 3.453, 2.0);
+ vec4 color = vec4(0.0, 0.0, 0.0, 0.0);
+
+ color += texture (texSampler1D, coords1D);
+ color += texture (texSampler1D, coords1D, bias);
+ color += textureProj(texSampler1D, coords2D);
+ color += textureProj(texSampler1D, coords4D);
+ color += textureProj(texSampler1D, coords2D, bias);
+ color += textureProj(texSampler1D, coords4D, bias);
+
+ color += texture (texSampler2D, coords2D);
+ color += texture (texSampler2D, coords2D, bias);
+ color += textureProj (texSampler2D, coords3D);
+ color += textureProj (texSampler2D, coords4D, bias);
+
+ color += texture (texSampler3D, coords3D);
+ color += texture (texSampler3D, coords3D, bias);
+ color += textureProj (texSampler3D, coords4D);
+ color += textureProj (texSampler3D, coords4D, bias);
+
+ color += texture (texSamplerCube, coords3D);
+ color += texture (texSamplerCube, coords3D, bias);
+
+ color += texture (shadowSampler1D, coords3D);
+ color += texture (shadowSampler1D, coords3D, bias);
+ color += texture (shadowSampler2D, coords3D);
+ color += texture (shadowSampler2D, coords3D, bias);
+ color += textureProj (shadowSampler1D, coords4D);
+ color += textureProj (shadowSampler1D, coords4D, bias);
+ color += textureProj (shadowSampler2D, coords4D);
+ color += textureProj (shadowSampler2D, coords4D, bias);
+
+ ivec2 iCoords2D = ivec2(0, 5);
+ int iLod = 1;
+
+ color += texelFetch(texSampler2D, iCoords2D, iLod);
+
+ vec2 gradX = dFdx(coords2D);
+ vec2 gradY = dFdy(coords2D);
+ const ivec2 offset = ivec2(3, -7);
+
+ color += textureGrad(texSampler2D, coords2D, gradX, gradY);
+ color += textureProjGrad(texSampler2D, vec3(coords2D, proj), gradX, gradY);
+ color += textureGradOffset(texSampler2D, coords2D, gradX, gradY, offset);
+ color += textureProjGradOffset(texSampler2D, coords3D, gradX, gradY, offset);
+ color += textureGrad(shadowSampler2D, vec3(coords2D, lod), gradX, gradY);
+
+ gl_FragColor = mix(color, u, blend * blendscale);
+} \ No newline at end of file
diff --git a/chromium/third_party/glslang/src/Test/spv.texture.vert b/chromium/third_party/glslang/src/Test/spv.texture.vert
new file mode 100644
index 00000000000..f571a7cd317
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/spv.texture.vert
@@ -0,0 +1,39 @@
+#version 140
+
+uniform sampler1D texSampler1D;
+uniform sampler2D texSampler2D;
+uniform sampler3D texSampler3D;
+uniform samplerCube texSamplerCube;
+uniform sampler1DShadow shadowSampler1D;
+uniform sampler2DShadow shadowSampler2D;
+
+in vec2 coords2D;
+
+void main()
+{
+ float lod = 3.0;
+ float coords1D = 1.789;
+ vec3 coords3D = vec3(1.789, 2.718, 3.453);
+ vec4 coords4D = vec4(1.789, 2.718, 3.453, 2.0);
+ vec4 color = vec4(0.0, 0.0, 0.0, 0.0);
+
+ color += textureLod(texSampler1D, coords1D, lod);
+ color += textureProjLod(texSampler1D, coords2D, lod);
+ color += textureProjLod(texSampler1D, coords4D, lod);
+
+ color += textureLod (texSampler2D, coords2D, lod);
+ color += textureProjLod (texSampler2D, coords3D, lod);
+ color += textureProjLod (texSampler2D, coords4D, lod);
+
+ color += textureLod (texSampler3D, coords3D, lod);
+ color += textureProjLod (texSampler3D, coords4D, lod);
+
+ color += textureLod (texSamplerCube, coords3D, lod);
+
+ color += textureLod (shadowSampler1D, coords3D, lod);
+ color += textureLod (shadowSampler2D, coords3D, lod);
+ color += textureProjLod(shadowSampler1D, coords4D, lod);
+ color += textureProjLod(shadowSampler2D, coords4D, lod);
+
+ gl_Position = color;
+}
diff --git a/chromium/third_party/glslang/src/Test/spv.types.frag b/chromium/third_party/glslang/src/Test/spv.types.frag
new file mode 100644
index 00000000000..fe0bf4cb6d3
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/spv.types.frag
@@ -0,0 +1,78 @@
+#version 140
+
+bool u_b;
+bvec2 u_b2;
+bvec3 u_b3;
+bvec4 u_b4;
+flat in int u_i;
+flat in ivec2 u_i2;
+flat in ivec3 u_i3;
+flat in ivec4 u_i4;
+ in float u_f;
+ in vec2 u_f2;
+ in vec3 u_f3;
+ in vec4 u_f4;
+bool i_b;
+bvec2 i_b2;
+bvec3 i_b3;
+bvec4 i_b4;
+
+flat in int i_i;
+flat in ivec2 i_i2;
+flat in ivec3 i_i3;
+flat in ivec4 i_i4;
+
+in float i_f;
+in vec2 i_f2;
+in vec3 i_f3;
+in vec4 i_f4;
+
+void main()
+{
+ bool b = u_b && i_b;
+ bvec2 b2 = bvec2(u_b2.x && i_b2.x && u_b2.y && i_b2.y);
+ bvec3 b3 = bvec3(u_b3.x && i_b3.x && u_b3.y && i_b3.y && u_b3.z && i_b3.z);
+ bvec4 b4 = bvec4(u_b4.x && i_b4.x && u_b4.y && i_b4.y && u_b4.z && i_b4.z && u_b4.w && i_b4.w);
+
+ int i = u_i + i_i;
+ ivec2 i2 = u_i2 + i_i2;
+ ivec3 i3 = u_i3 + i_i3;
+ ivec4 i4 = u_i4 + i_i4;
+
+ float f = u_f + i_f;
+ vec2 f2 = u_f2 + i_f2;
+ vec3 f3 = u_f3 + i_f3;
+ vec4 f4 = u_f4 + i_f4;
+
+ gl_FragColor =
+ b ||
+ b2.x ||
+ b2.y ||
+ b3.x ||
+ b3.y ||
+ b3.z ||
+ b4.x ||
+ b4.y ||
+ b4.z ||
+ b4.w ? vec4(
+ i +
+ i2.x +
+ i2.y +
+ i3.x +
+ i3.y +
+ i3.z +
+ i4.x +
+ i4.y +
+ i4.z +
+ i4.w +
+ f +
+ f2.x +
+ f2.y +
+ f3.x +
+ f3.y +
+ f3.z +
+ f4.x +
+ f4.y +
+ f4.z +
+ f4.w) : vec4(1.0);
+}
diff --git a/chromium/third_party/glslang/src/Test/spv.uint.frag b/chromium/third_party/glslang/src/Test/spv.uint.frag
new file mode 100644
index 00000000000..004b85605c9
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/spv.uint.frag
@@ -0,0 +1,99 @@
+#version 310 es
+precision mediump float;
+flat in uvec2 t;
+in float f;
+in vec2 tc;
+
+flat in uvec4 v;
+flat in int i;
+bool b;
+
+out uvec4 c;
+
+uniform mediump usampler2D usampler;
+
+void main()
+{
+ int count = 1;
+
+ uint u = t.y + 3u;
+ const uint cu1 = 0xFFFFFFFFU;
+ const uint cu2 = -1u; // 0xFFFFFFFF
+ const uint cu3 = 1U;
+ const uint cu4 = 1u;
+
+ if (cu1 == cu2)
+ count *= 2; // 2
+ if (cu3 == cu4)
+ count *= 3; // 6
+ if (cu2 == cu3)
+ count *= 5; // not done
+
+ const int cshiftedii = 0xFFFFFFFF >> 10;
+ const uint cushiftedui = 0xFFFFFFFFu >> 10;
+ const int cshiftediu = 0xFFFFFFFF >> 10u;
+ const uint cushifteduu = 0xFFFFFFFFu >> 10u;
+
+ if (cshiftedii == cshiftediu)
+ count *= 7; // 42
+ if (cushiftedui == cushifteduu)
+ count *= 11; // 462
+ if (cshiftedii == int(cushiftedui))
+ count *= 13; // not done
+
+ int shiftedii = 0xFFFFFFFF >> 10;
+ uint shiftedui = 0xFFFFFFFFu >> 10;
+ int shiftediu = 0xFFFFFFFF >> 10u;
+ uint shifteduu = 0xFFFFFFFFu >> 10u;
+
+ if (shiftedii == shiftediu)
+ c = texture(usampler, tc);
+ if (shiftedui == shifteduu)
+ c = texture(usampler, tc + float(1u));
+ if (shiftedii == int(shiftedui))
+ c = texture(usampler, tc - vec2(2u));
+
+ if (t.x > 4u) {
+ float af = float(u);
+ bool ab = bool(u);
+ int ai = int(u);
+
+ c += uvec4(uint(af), uint(ab), uint(ai), count);
+ }
+
+ const uint cmask1 = 0x0A1u;
+ const uint cmask2 = 0xA10u;
+ const uint cmask3 = cmask1 << 4;
+ const uint cmask4 = 0xAB1u;
+
+ if (cmask3 == cmask2)
+ count *= 17; // 7854
+
+ if ((cmask3 & cmask1) != 0u)
+ count *= 19; // not done
+
+ if ((cmask1 | cmask3) == cmask4)
+ count *= 23; // 180642
+
+ if ((cmask1 ^ cmask4) == 0xA10u)
+ count *= 27; // 4877334
+
+ uint mask1 = 0x0A1u;
+ uint mask2 = 0xA10u;
+ uint mask3 = mask1 << 4;
+ uint mask4 = 0xAB1u;
+
+ if (mask3 == mask2)
+ count *= 2; // 9754668
+
+ if ((mask3 & mask1) != 0u)
+ count *= 3; // not done
+
+ if ((mask1 | mask3) == mask4)
+ count *= 5; // 48773340
+
+ if ((mask1 ^ mask4) == 0xA10u)
+ count *= 7; // 341413380
+
+ c += uvec4(count);
+}
diff --git a/chromium/third_party/glslang/src/Test/spv.uniformArray.frag b/chromium/third_party/glslang/src/Test/spv.uniformArray.frag
new file mode 100644
index 00000000000..4f642e6e971
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/spv.uniformArray.frag
@@ -0,0 +1,17 @@
+#version 140
+
+uniform sampler2D texSampler2D;
+in vec3 inColor;
+in vec4 color[6];
+in float alpha[16];
+
+void main()
+{
+ vec4 texColor = color[1] + color[1];
+
+ texColor.xyz += inColor;
+
+ texColor.a += alpha[12];
+
+ gl_FragColor = texColor;
+}
diff --git a/chromium/third_party/glslang/src/Test/spv.variableArrayIndex.frag b/chromium/third_party/glslang/src/Test/spv.variableArrayIndex.frag
new file mode 100644
index 00000000000..ab52f548e8d
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/spv.variableArrayIndex.frag
@@ -0,0 +1,49 @@
+#version 400
+
+uniform sampler2D samp2D;
+in vec2 coord;
+
+struct lunarStruct1 {
+ int i;
+ float f;
+};
+
+struct lunarStruct2 {
+ int i;
+ float f;
+ lunarStruct1 s1_1;
+};
+
+struct lunarStruct3 {
+ lunarStruct2 s2_1[3];
+ int i;
+ float f;
+ lunarStruct1 s1_1;
+};
+
+
+flat in lunarStruct1 foo;
+flat in lunarStruct2 foo2[5];
+flat in lunarStruct3 foo3;
+flat in int Count;
+
+void main()
+{
+ float scale;
+ int iLocal = Count;
+
+ if (foo3.s2_1[1].i > 0)
+ scale = foo2[foo3.s2_1[foo.i].i + 2 + ++iLocal].s1_1.f;
+ else
+ scale = foo3.s2_1[0].s1_1.f;
+
+ //for (int i = 0; i < iLocal; ++i) {
+ // scale += foo2[i].f;
+ //}
+
+ gl_FragColor = scale * texture(samp2D, coord);
+
+ vec2[3] constructed = vec2[3](coord, vec2(scale), vec2(1.0, 2.0));
+ gl_FragColor += vec4(constructed[foo.i], constructed[foo.i]);
+}
+
diff --git a/chromium/third_party/glslang/src/Test/spv.varyingArray.frag b/chromium/third_party/glslang/src/Test/spv.varyingArray.frag
new file mode 100644
index 00000000000..9baa3467414
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/spv.varyingArray.frag
@@ -0,0 +1,19 @@
+#version 140
+uniform sampler2D texSampler2D;
+in vec4 color;
+in float alpha;
+
+in vec4 TexCoord[6];
+
+in vec4 foo[3];
+
+void main()
+{
+ vec4 texColor = texture(texSampler2D, vec2(TexCoord[4] + TexCoord[5]));
+
+ texColor += color;
+
+ texColor.a = alpha;
+
+ gl_FragColor = foo[1] + TexCoord[0] + TexCoord[4] + texColor;
+}
diff --git a/chromium/third_party/glslang/src/Test/spv.varyingArrayIndirect.frag b/chromium/third_party/glslang/src/Test/spv.varyingArrayIndirect.frag
new file mode 100644
index 00000000000..34733ed9db7
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/spv.varyingArrayIndirect.frag
@@ -0,0 +1,21 @@
+#version 140
+uniform sampler2D texSampler2D;
+in vec4 color;
+in float alpha;
+
+in vec4 TexCoord[6];
+
+in vec4 userIn[2];
+
+flat in int a, b;
+
+void main()
+{
+ vec4 texColor = texture(texSampler2D, vec2(userIn[b] + TexCoord[a] + TexCoord[5]));
+
+ texColor += color;
+
+ texColor.a = alpha;
+
+ gl_FragColor = TexCoord[0] + TexCoord[b] + texColor + userIn[a];
+}
diff --git a/chromium/third_party/glslang/src/Test/spv.voidFunction.frag b/chromium/third_party/glslang/src/Test/spv.voidFunction.frag
new file mode 100644
index 00000000000..c3bc45c2f7c
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/spv.voidFunction.frag
@@ -0,0 +1,34 @@
+#version 400
+
+in vec4 bigColor;
+in vec4 BaseColor;
+in float d;
+
+float bar = 2.0;
+
+void foo()
+{
+ bar++;
+
+ return;
+}
+
+void foo2()
+{
+ bar++;
+}
+
+void main()
+{
+ vec4 outColor = bigColor;
+
+ foo();
+
+ foo2();
+
+ outColor.x += bar;
+
+ gl_FragColor = outColor;
+
+ return;
+}
diff --git a/chromium/third_party/glslang/src/Test/spv.while-continue-break.vert b/chromium/third_party/glslang/src/Test/spv.while-continue-break.vert
new file mode 100644
index 00000000000..c81e8d28c23
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/spv.while-continue-break.vert
@@ -0,0 +1,20 @@
+#version 310 es
+void main() {
+ int i = 0;
+ int A, B, C, D;
+ while (i<10) {
+ A = 1;
+ if (i%2 == 0) {
+ B = 2;
+ continue;
+ C = 2;
+ }
+ if (i%5 == 0) {
+ B = 2;
+ break;
+ C = 2;
+ }
+ i++;
+ }
+ D = 3;
+}
diff --git a/chromium/third_party/glslang/src/Test/spv.while-simple.vert b/chromium/third_party/glslang/src/Test/spv.while-simple.vert
new file mode 100644
index 00000000000..0f38325d0e0
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/spv.while-simple.vert
@@ -0,0 +1,7 @@
+#version 310 es
+void main() {
+ int i = 0;
+ while (i<10) {
+ i++;
+ }
+}
diff --git a/chromium/third_party/glslang/src/Test/spv.whileLoop.frag b/chromium/third_party/glslang/src/Test/spv.whileLoop.frag
new file mode 100644
index 00000000000..062bff2c5a1
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/spv.whileLoop.frag
@@ -0,0 +1,16 @@
+#version 140
+
+in vec4 bigColor;
+in vec4 BaseColor;
+in float d;
+
+void main()
+{
+ vec4 color = BaseColor;
+
+ while (color.x < d) {
+ color += bigColor;
+ }
+
+ gl_FragColor = color;
+}
diff --git a/chromium/third_party/glslang/src/Test/structAssignment.frag b/chromium/third_party/glslang/src/Test/structAssignment.frag
new file mode 100644
index 00000000000..1f6466683f6
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/structAssignment.frag
@@ -0,0 +1,39 @@
+#version 130
+
+uniform sampler2D sampler;
+varying mediump vec2 coord;
+
+struct lunarStruct1 {
+ int i;
+ float f;
+};
+
+struct lunarStruct2 {
+ int i;
+ float f;
+ lunarStruct1 s1_1;
+};
+
+struct lunarStruct3 {
+ lunarStruct2 s2_1;
+ int i;
+ float f;
+ lunarStruct1 s1_1;
+};
+
+
+uniform lunarStruct1 foo;
+uniform lunarStruct2 foo2;
+uniform lunarStruct3 foo3;
+
+void main()
+{
+ lunarStruct2 locals2;
+
+ if (foo3.s2_1.i > 0)
+ locals2 = foo3.s2_1;
+ else
+ locals2 = foo2;
+
+ gl_FragColor = locals2.s1_1.f * texture2D(sampler, coord);
+}
diff --git a/chromium/third_party/glslang/src/Test/structDeref.frag b/chromium/third_party/glslang/src/Test/structDeref.frag
new file mode 100644
index 00000000000..97fd383b6cc
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/structDeref.frag
@@ -0,0 +1,71 @@
+#version 130
+
+uniform sampler2D sampler;
+varying vec2 coord;
+
+struct s0 {
+ int i;
+};
+
+struct s00 {
+ s0 s0_0;
+};
+
+struct s1 {
+ int i;
+ float f;
+ s0 s0_1;
+};
+
+struct s2 {
+ int i;
+ float f;
+ s1 s1_1;
+};
+
+struct s3 {
+ s2[12] s2_1;
+ int i;
+ float f;
+ s1 s1_1;
+};
+
+
+uniform s0 foo0;
+uniform s1 foo1;
+uniform s2 foo2;
+uniform s3 foo3;
+
+uniform s00 foo00;
+
+void main()
+{
+ s0 locals0;
+ s2 locals2;
+ s00 locals00;
+
+ float[6] fArray;
+
+ s1[10] locals1Array;
+
+ if (foo3.s2_1[9].i > 0) {
+ locals2.f = 1.0;
+ locals2.s1_1 = s1(0, 1.0, s0(0));
+ fArray = float[6]( 0.0, 0.0, 0.0, 0.0, 0.0, 0.0);
+ locals1Array[6] = foo1;
+ locals0 = s0(0);
+ locals00 = s00(s0(0));
+ } else {
+ locals2.f = coord.x;
+ locals2.s1_1 = s1(1, coord.y, foo0);
+ fArray = float[6]( 0.0, 1.0, 2.0, 3.0, 4.0, 5.0);
+ locals1Array[6] = locals2.s1_1;
+ locals0 = foo1.s0_1;
+ locals00 = foo00;
+ }
+
+ if (locals0.i > 5)
+ locals0 = locals00.s0_0;
+
+ gl_FragColor = (float(locals0.i) + locals1Array[6].f + fArray[3] + locals2.s1_1.f) * texture2D(sampler, coord);
+}
diff --git a/chromium/third_party/glslang/src/Test/structure.frag b/chromium/third_party/glslang/src/Test/structure.frag
new file mode 100644
index 00000000000..867a0273d8a
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/structure.frag
@@ -0,0 +1,31 @@
+#version 130
+uniform sampler2D sampler;
+varying vec2 coord;
+
+struct lunarStruct1 {
+ int i;
+ float f[4];
+ vec4 color[5];
+};
+
+struct lunarStruct2 {
+ int i[5];
+ float f;
+ lunarStruct1 s1_1[7];
+};
+
+uniform lunarStruct1 foo;
+uniform lunarStruct2 foo2[5];
+
+void main()
+{
+ float scale = 0.0;
+
+ if (foo2[3].i[4] > 0)
+ scale = foo2[3].s1_1[2].color[3].x;
+ else
+ scale = foo2[3].s1_1[2].f[3];
+
+ gl_FragColor = scale * texture2D(sampler, coord);
+}
+
diff --git a/chromium/third_party/glslang/src/Test/switch.frag b/chromium/third_party/glslang/src/Test/switch.frag
new file mode 100644
index 00000000000..f0860fae810
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/switch.frag
@@ -0,0 +1,158 @@
+#version 300 es
+precision highp float;
+uniform int c, d;
+in highp float x;
+
+void main()
+{
+ float f;
+ int a[2];
+
+ switch(f) { // ERROR
+ }
+
+ switch(a) { // ERROR
+ }
+
+ switch(c)
+ {
+ }
+
+ switch(c) // WARNING, not enough stuff after last label
+ {
+ case 2:
+ }
+
+ switch(c)
+ {
+ f = sin(x); // ERRROR
+ case 2:
+ f = cos(x);
+ break;
+ }
+
+ switch (c) {
+ default:
+ break;
+ case 1:
+ f = sin(x);
+ break;
+ case 2:
+ f = cos(x);
+ break;
+ default: // ERROR, 2nd default
+ f = tan(x);
+ }
+
+ switch (c) {
+ case 1:
+ f = sin(x);
+ break;
+ case 2:
+ switch (d) {
+ case 1:
+ f = x * x * x;
+ break;
+ case 2:
+ f = x * x;
+ break;
+ }
+ break;
+ default:
+ f = tan(x);
+ case 1: // ERROR, 2nd 'case 1'
+ break;
+ case 3.8: // ERROR, non-int
+ break;
+ case c: // ERROR, non-constant
+ break;
+ }
+
+ switch (c) { // a no-error normal switch
+ case 1:
+ f = sin(x);
+ break;
+ case 2:
+ switch (d) {
+ case 1:
+ f = x * x * x;
+ break;
+ case 2:
+ f = x * x;
+ break;
+ }
+ break;
+ default:
+ f = tan(x);
+ }
+
+ break; // ERROR
+
+ switch (c) {
+ case 1:
+ f = sin(x);
+ break;
+ case 2:
+ switch (d) {
+ case 1:
+ {
+ case 4: // ERROR
+ break;
+ }
+ f = x * x * x;
+ if (c < d) {
+ case 2: // ERROR
+ f = x * x;
+ }
+ if (d < c)
+ case 3: // ERROR
+ break;
+ }
+ break;
+ case 4:
+ f = tan(x);
+ if (f < 0.0)
+ default: // ERROR
+ break;
+ }
+
+ case 5: // ERROR
+ default: // ERROR
+
+ switch (0) {
+ default:
+ int onlyInSwitch = 0;
+ }
+ onlyInSwitch; // ERROR
+
+ switch (0) {
+ default:
+ int x; // WARNING (was "no statement" ERROR, but spec. changed because unclear what a statement is)
+ }
+
+ switch (c) {
+ case 1:
+ {
+ int nestedX;
+ break;
+ }
+ case 2:
+ nestedX; // ERROR
+ int nestedZ;
+ float a; // okay, hiding outer 'a'
+ break;
+ case 3:
+ int linearZ;
+ break;
+ break;
+ case 4:
+ int linearY = linearZ;
+ break;
+ case 5: // okay that branch bypassed an initializer
+ const int linearC = 4;
+ break;
+ case 6: // okay that branch bypassed an initializer
+ linearC;
+ }
+ nestedZ; // ERROR, no longer in scope
+}
diff --git a/chromium/third_party/glslang/src/Test/swizzle.frag b/chromium/third_party/glslang/src/Test/swizzle.frag
new file mode 100644
index 00000000000..e336b67ebf8
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/swizzle.frag
@@ -0,0 +1,52 @@
+#version 110
+
+uniform float blend;
+uniform vec4 u;
+uniform bool p;
+
+varying vec2 t;
+
+void main()
+{
+ float blendscale = 1.789;
+
+ vec4 w = u;
+ vec4 w_undef; // test undef
+ vec4 w_dep = u; // test dependent swizzles
+ vec4 w_reorder = u; // test reordering
+ vec4 w2 = u;
+ vec4 w_flow = u; // test flowControl
+
+ w_reorder.z = blendscale;
+
+ w.wy = t;
+
+ w_reorder.x = blendscale;
+
+ w2.xyzw = u.zwxy;
+
+ w_reorder.y = blendscale;
+
+ w_dep.xy = w2.xz;
+ w_dep.zw = t;
+
+ w_undef.xy = u.zw;
+
+ if (p)
+ w_flow.x = t.x;
+ else
+ w_flow.x = t.y;
+
+ gl_FragColor = mix(w_reorder, w_undef, w * w2 * w_dep * w_flow);
+
+ vec2 c = t;
+ vec4 rep = vec4(0.0, 0.0, 0.0, 1.0);
+
+ if (c.x < 0.0)
+ c.x *= -1.0;
+
+ if (c.x <= 1.0)
+ rep.x = 3.4;
+
+ gl_FragColor += rep;
+}
diff --git a/chromium/third_party/glslang/src/Test/syntaxError.frag b/chromium/third_party/glslang/src/Test/syntaxError.frag
new file mode 100644
index 00000000000..ac46bf10f25
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/syntaxError.frag
@@ -0,0 +1,16 @@
+#version 120
+
+uniform vec4 bigColor;
+varying vec4 BaseColor;
+uniform float d;
+
+void main()
+{
+ vec5 color = BaseColor;
+
+ do {
+ color += bigColor;
+ } while (color.x < d);
+
+ gl_FragColor = color;
+}
diff --git a/chromium/third_party/glslang/src/Test/test-hlsl-spirv-list b/chromium/third_party/glslang/src/Test/test-hlsl-spirv-list
new file mode 100644
index 00000000000..d98a3cb4f36
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/test-hlsl-spirv-list
@@ -0,0 +1,4 @@
+# Test looping constructs.
+# No tests yet for making sure break and continue from a nested loop
+# goes to the innermost target.
+hlsl.frag
diff --git a/chromium/third_party/glslang/src/Test/test-preprocessor-list b/chromium/third_party/glslang/src/Test/test-preprocessor-list
new file mode 100644
index 00000000000..bd7e963be29
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/test-preprocessor-list
@@ -0,0 +1,16 @@
+preprocessor.cpp_style_line_directive.vert
+preprocessor.cpp_style___FILE__.vert
+preprocessor.edge_cases.vert
+preprocessor.errors.vert
+preprocessor.extensions.vert
+preprocessor.function_macro.vert
+preprocessor.include.enabled.vert
+preprocessor.include.disabled.vert
+preprocessor.line.vert
+preprocessor.line.frag
+preprocessor.pragma.vert
+preprocessor.simple.vert
+preprocessor.success_if_parse_would_fail.vert
+preprocessor.defined.vert
+preprocessor.many.endif.vert
+preprocessor.eof_missing.vert
diff --git a/chromium/third_party/glslang/src/Test/test-spirv-list b/chromium/third_party/glslang/src/Test/test-spirv-list
new file mode 100644
index 00000000000..03f4432e17e
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/test-spirv-list
@@ -0,0 +1,115 @@
+# Test looping constructs.
+# No tests yet for making sure break and continue from a nested loop
+# goes to the innermost target.
+spv.do-simple.vert
+spv.do-while-continue-break.vert
+spv.for-complex-condition.vert
+spv.for-continue-break.vert
+spv.for-simple.vert
+spv.for-notest.vert
+spv.for-nobody.vert
+spv.while-continue-break.vert
+spv.while-simple.vert
+# vulkan-specific tests
+spv.set.vert
+spv.double.comp
+spv.100ops.frag
+spv.130.frag
+spv.140.frag
+spv.150.geom
+spv.150.vert
+spv.300BuiltIns.vert
+spv.300layout.frag
+spv.300layout.vert
+spv.300layoutp.vert
+spv.310.comp
+spv.330.geom
+spv.400.frag
+spv.400.tesc
+spv.400.tese
+spv.420.geom
+spv.430.vert
+spv.accessChain.frag
+spv.aggOps.frag
+spv.always-discard.frag
+spv.always-discard2.frag
+spv.bitCast.frag
+spv.bool.vert
+spv.boolInBlock.frag
+spv.branch-return.vert
+spv.conditionalDiscard.frag
+spv.conversion.frag
+spv.dataOut.frag
+spv.dataOutIndirect.frag
+spv.dataOutIndirect.vert
+spv.deepRvalue.frag
+spv.depthOut.frag
+spv.discard-dce.frag
+spv.doWhileLoop.frag
+spv.earlyReturnDiscard.frag
+spv.flowControl.frag
+spv.forLoop.frag
+spv.forwardFun.frag
+spv.functionCall.frag
+spv.functionSemantics.frag
+spv.interpOps.frag
+spv.int64.frag
+spv.layoutNested.vert
+spv.length.frag
+spv.localAggregates.frag
+spv.loops.frag
+spv.loopsArtificial.frag
+spv.matFun.vert
+spv.matrix.frag
+spv.matrix2.frag
+spv.memoryQualifier.frag
+spv.merge-unreachable.frag
+spv.newTexture.frag
+spv.noDeadDecorations.vert
+spv.nonSquare.vert
+spv.Operations.frag
+spv.intOps.vert
+spv.precision.frag
+spv.prepost.frag
+spv.qualifiers.vert
+spv.shaderBallot.comp
+spv.shaderGroupVote.comp
+spv.shiftOps.frag
+spv.simpleFunctionCall.frag
+spv.simpleMat.vert
+spv.sparseTexture.frag
+spv.sparseTextureClamp.frag
+spv.structAssignment.frag
+spv.structDeref.frag
+spv.structure.frag
+spv.switch.frag
+spv.swizzle.frag
+spv.test.frag
+spv.test.vert
+spv.texture.frag
+spv.texture.vert
+spv.image.frag
+spv.types.frag
+spv.uint.frag
+spv.uniformArray.frag
+spv.variableArrayIndex.frag
+spv.varyingArray.frag
+spv.varyingArrayIndirect.frag
+spv.voidFunction.frag
+spv.whileLoop.frag
+spv.AofA.frag
+spv.queryL.frag
+spv.separate.frag
+spv.shortCircuit.frag
+spv.pushConstant.vert
+spv.subpass.frag
+spv.specConstant.vert
+spv.specConstant.comp
+spv.specConstantComposite.vert
+spv.specConstantOperations.vert
+spv.precise.tese
+spv.precise.tesc
+# GLSL-level semantics
+vulkan.frag
+vulkan.vert
+vulkan.comp
diff --git a/chromium/third_party/glslang/src/Test/test.frag b/chromium/third_party/glslang/src/Test/test.frag
new file mode 100644
index 00000000000..ac9446e1544
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/test.frag
@@ -0,0 +1,22 @@
+#version 110
+
+uniform sampler2D texSampler2D;
+uniform sampler3D texSampler3D;
+
+uniform float blend;
+uniform vec2 scale;
+uniform vec4 u;
+
+varying vec2 t;
+varying vec3 coords;
+
+void main()
+{
+ float blendscale = 1.789;
+
+ vec4 v = texture2D(texSampler2D, (t + scale) / scale ).wzyx;
+
+ vec4 w = texture3D(texSampler3D, coords) + v;
+
+ gl_FragColor = mix(w, u, blend * blendscale);
+}
diff --git a/chromium/third_party/glslang/src/Test/testlist b/chromium/third_party/glslang/src/Test/testlist
new file mode 100644
index 00000000000..dd682b2d0a8
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/testlist
@@ -0,0 +1,134 @@
+sample.frag
+sample.vert
+decls.frag
+specExamples.frag
+specExamples.vert
+versionsClean.frag
+versionsClean.vert
+versionsErrors.frag
+versionsErrors.vert
+100.frag
+120.vert
+120.frag
+130.vert
+130.frag
+140.vert
+140.frag
+150.vert
+150.geom
+150.frag
+precision.frag
+precision.vert
+nonSquare.vert
+matrixError.vert
+cppSimple.vert
+cppIndent.vert
+cppNest.vert
+cppComplexExpr.vert
+badChars.frag
+pointCoord.frag
+array.frag
+array100.frag
+comment.frag
+300.vert
+300.frag
+300BuiltIns.frag
+300layout.vert
+300layout.frag
+300operations.frag
+300block.frag
+310.comp
+310.vert
+310.geom
+310.frag
+310.tesc
+310.tese
+310implicitSizeArrayError.vert
+310AofA.vert
+330.frag
+330comp.frag
+constErrors.frag
+constFold.frag
+errors.frag
+forwardRef.frag
+uint.frag
+switch.frag
+tokenLength.vert
+100Limits.vert
+100scope.vert
+110scope.vert
+300scope.vert
+400.frag
+420.frag
+420.vert
+420.geom
+420_size_gl_in.geom
+430scope.vert
+lineContinuation100.vert
+lineContinuation.vert
+numeral.frag
+400.geom
+400.tesc
+400.tese
+410.tesc
+420.tesc
+420.tese
+410.geom
+430.vert
+430.comp
+430AofA.frag
+440.vert
+440.frag
+450.vert
+450.geom
+450.tesc
+450.tese
+450.frag
+450.comp
+dce.frag
+atomic_uint.frag
+aggOps.frag
+always-discard.frag
+always-discard2.frag
+conditionalDiscard.frag
+conversion.frag
+dataOut.frag
+dataOutIndirect.frag
+deepRvalue.frag
+depthOut.frag
+discard-dce.frag
+doWhileLoop.frag
+earlyReturnDiscard.frag
+flowControl.frag
+forLoop.frag
+functionCall.frag
+functionSemantics.frag
+length.frag
+localAggregates.frag
+loops.frag
+loopsArtificial.frag
+matrix.frag
+matrix2.frag
+newTexture.frag
+Operations.frag
+prepost.frag
+simpleFunctionCall.frag
+structAssignment.frag
+structDeref.frag
+structure.frag
+swizzle.frag
+syntaxError.frag
+test.frag
+texture.frag
+types.frag
+uniformArray.frag
+variableArrayIndex.frag
+varyingArray.frag
+varyingArrayIndirect.frag
+voidFunction.frag
+whileLoop.frag
+nonVulkan.frag
+negativeArraySize.comp
+spv.atomic.comp
+precise.tesc
+precise_struct_block.vert
diff --git a/chromium/third_party/glslang/src/Test/texture.frag b/chromium/third_party/glslang/src/Test/texture.frag
new file mode 100644
index 00000000000..67c48a44069
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/texture.frag
@@ -0,0 +1,73 @@
+#version 130
+
+uniform sampler1D texSampler1D;
+uniform sampler2D texSampler2D;
+uniform sampler3D texSampler3D;
+uniform samplerCube texSamplerCube;
+uniform sampler1DShadow shadowSampler1D;
+uniform sampler2DShadow shadowSampler2D;
+
+uniform float blend;
+uniform vec2 scale;
+uniform vec4 u;
+
+varying vec2 t;
+varying vec2 coords2D;
+
+void main()
+{
+ float blendscale = 1.789;
+ float bias = 2.0;
+ float lod = 3.0;
+ float proj = 2.0;
+ float coords1D = 1.789;
+ vec3 coords3D = vec3(1.789, 2.718, 3.453);
+ vec4 coords4D = vec4(1.789, 2.718, 3.453, 2.0);
+ vec4 color = vec4(0.0, 0.0, 0.0, 0.0);
+
+ color += texture1D (texSampler1D, coords1D);
+ color += texture1D (texSampler1D, coords1D, bias);
+ color += texture1DProj(texSampler1D, coords2D);
+ color += texture1DProj(texSampler1D, coords4D);
+ color += texture1DProj(texSampler1D, coords2D, bias);
+ color += texture1DProj(texSampler1D, coords4D, bias);
+
+ color += texture2D (texSampler2D, coords2D);
+ color += texture2D (texSampler2D, coords2D, bias);
+ color += texture2DProj (texSampler2D, coords3D);
+ color += texture2DProj (texSampler2D, coords4D, bias);
+
+ color += texture3D (texSampler3D, coords3D);
+ color += texture3D (texSampler3D, coords3D, bias);
+ color += texture3DProj (texSampler3D, coords4D);
+ color += texture3DProj (texSampler3D, coords4D, bias);
+
+ color += textureCube (texSamplerCube, coords3D);
+ color += textureCube (texSamplerCube, coords3D, bias);
+
+ color += shadow1D (shadowSampler1D, coords3D);
+ color += shadow1D (shadowSampler1D, coords3D, bias);
+ color += shadow2D (shadowSampler2D, coords3D);
+ color += shadow2D (shadowSampler2D, coords3D, bias);
+ color += shadow1DProj (shadowSampler1D, coords4D);
+ color += shadow1DProj (shadowSampler1D, coords4D, bias);
+ color += shadow2DProj (shadowSampler2D, coords4D);
+ color += shadow2DProj (shadowSampler2D, coords4D, bias);
+
+ ivec2 iCoords2D = ivec2(0, 5);
+ int iLod = 1;
+
+ color += texelFetch(texSampler2D, iCoords2D, iLod);
+
+ vec2 gradX = dFdx(coords2D);
+ vec2 gradY = dFdy(coords2D);
+ const ivec2 offset = ivec2(3, -7);
+
+ color += textureGrad(texSampler2D, coords2D, gradX, gradY);
+ color += textureProjGrad(texSampler2D, vec3(coords2D, proj), gradX, gradY);
+ color += textureGradOffset(texSampler2D, coords2D, gradX, gradY, offset);
+ color += textureProjGradOffset(texSampler2D, coords3D, gradX, gradY, offset);
+ color += textureGrad(shadowSampler2D, vec3(coords2D, lod), gradX, gradY);
+
+ gl_FragColor = mix(color, u, blend * blendscale);
+} \ No newline at end of file
diff --git a/chromium/third_party/glslang/src/Test/tokenLength.vert b/chromium/third_party/glslang/src/Test/tokenLength.vert
new file mode 100644
index 00000000000..691b104234b
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/tokenLength.vert
@@ -0,0 +1,72 @@
+#version 300 es
+
+// 1023 characters
+in float BCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789;
+
+// 1024 characters (okay)
+in float ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789;
+
+int E1 = 5000000000; // ERROR
+int E2 = 50000000000; // ERROR
+int B = 4294967295; // okay
+
+int OE = 0777777777777777777777; // ERROR
+int HE = 0x1234567890ABCDEF0; // ERROR
+
+// 1023 character fraction
+float F = 1.0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890;
+
+// 1024 character value
+float G = 1.01234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678890;
+
+// 1025 character fraction
+float E3 = 1.012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012;
+
+void main()
+{
+ gl_Position = vec4(ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789,
+ B, F, G);
+}
+
+// super long
+float BCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789BCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789BCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789BCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789;
+int superH = 0xBCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789BCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789BCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789BCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789;
+int superO = 0777777777777777777777077777777777777777777707777777777777777777770777777777777777777777077777777777777777777707777777777777777777770777777777777777777777077777777777777777777707777777777777777777770777777777777777777777077777777777777777777707777777777777777777770777777777777777777777077777777777777777777707777777777777777777770777777777777777777777077777777777777777777707777777777777777777770777777777777777777777077777777777777777777707777777777777777777770777777777777777777777077777777777777777777707777777777777777777770777777777777777777777077777777777777777777707777777777777777777770777777777777777777777077777777777777777777707777777777777777777770777777777777777777777077777777777777777777707777777777777777777770777777777777777777777077777777777777777777707777777777777777777770777777777777777777777077777777777777777777707777777777777777777770777777777777777777777077777777777777777777707777777777777777777770777777777777777777777077777777777777777777707777777777777777777770777777777777777777777077777777777777777777707777777777777777777770777777777777777777777077777777777777777777707777777777777777777770777777777777777777777077777777777777777777707777777777777777777770777777777777777777777077777777777777777777707777777777777777777770777777777777777777777077777777777777777777707777777777777777777770777777777777777777777077777777777777777777707777777777777777777770777777777777777777777077777777777777777777707777777777777777777770777777777777777777777077777777777777777777707777777777777777777770777777777777777777777077777777777777777777707777777777777777777770777777777777777777777077777777777777777777707777777777777777777770777777777777777777777077777777777777777777707777777777777777777770777777777777777777777077777777777777777777707777777777777777777770777777777777777777777077777777777777777777707777777777777777777770777777777777777777777077777777777777777777707777777777777777777770777777777777777777777077777777777777777777707777777777777777777770777777777777777777777077777777777777777777707777777777777777777770777777777777777777777077777777777777777777707777777777777777777770777777777777777777777077777777777777777777707777777777777777777770777777777777777777777077777777777777777777707777777777777777777770777777777777777777777077777777777777777777707777777777777777777770777777777777777777777077777777777777777777707777777777777777777770777777777777777777777077777777777777777777707777777777777777777770777777777777777777777077777777777777777777707777777777777777777770777777777777777777777077777777777777777777707777777777777777777770777777777777777777777077777777777777777777707777777777777777777770777777777777777777777077777777777777777777707777777777777777777770777777777777777777777077777777777777777777707777777777777777777770777777777777777777777077777777777777777777707777777777777777777770777777777777777777777077777777777777777777707777777777777777777770777777777777777777777077777777777777777777707777777777777777777770777777777777777777777077777777777777777777707777777777777777777770777777777777777777777077777777777777777777707777777777777777777770777777777777777777777077777777777777777777707777777777777777777770777777777777777777777077777777777777777777707777777777777777777770777777777777777777777077777777777777777777707777777777777777777770777777777777777777777077777777777777777777707777777777777777777770777777777777777777777077777777777777777777707777777777777777777770777777777777777777777077777777777777777777707777777777777777777770777777777777777777777077777777777777777777707777777777777777777770777777777777777777777077777777777777777777707777777777777777777770777777777777777777777077777777777777777777707777777777777777777770777777777777777777777077777777777777777777707777777777777777777770777777777777777777777077777777777777777777707777777777777777777770777777777777777777777077777777777777777777707777777777777777777770777777777777777777777077777777777777777777707777777777777777777770777777777777777777777077777777777777777777707777777777777777777770777777777777777777777077777777777777777777707777777777777777777770777777777777777777777077777777777777777777707777777777777777777770777777777777777777777077777777777777777777707777777777777777777770777777777777777777777077777777777777777777707777777777777777777770777777777777777777777;
+int superI = 429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295;
+float superF = 1.012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890121234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901212345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012;
+
+// Boundary cases
+#extension a000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhooooooooooooooooooooooooooooooohhhhhhhhhhhhhhhhh01234 : enable
+#extension a000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhooooooooooooooooooooooooooooooohhhhhhhhhhhhhhhhh012345 : enable
+
+// Super long
+#extension A29496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295429496729542949672954294967295
+
+// Boundary cases
+#if 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001
+#error in long non-zero #if
+#endif
+#if 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 == 0
+#error in long zero #if
+#endif
+#if 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 == 0
+#error in too long #if
+#endif
+
+#if A000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001
+#error in long macro #if
+#endif
+#if A000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
+#error in long macro #if
+#endif
+#if A0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
+#error in too long macro #if
+#endif
+
+// Super long
+#if 000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
+#error in super long #if
+#endif
+#if A000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
+#error in super long macro #if
+#endif
diff --git a/chromium/third_party/glslang/src/Test/types.frag b/chromium/third_party/glslang/src/Test/types.frag
new file mode 100644
index 00000000000..ee6d9d05e8f
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/types.frag
@@ -0,0 +1,81 @@
+#version 130
+
+uniform bool u_b;
+uniform bvec2 u_b2;
+uniform bvec3 u_b3;
+uniform bvec4 u_b4;
+
+uniform int u_i;
+uniform ivec2 u_i2;
+uniform ivec3 u_i3;
+uniform ivec4 u_i4;
+
+uniform float u_f;
+uniform vec2 u_f2;
+uniform vec3 u_f3;
+uniform vec4 u_f4;
+
+uniform bool i_b;
+uniform bvec2 i_b2;
+uniform bvec3 i_b3;
+uniform bvec4 i_b4;
+
+flat in int i_i;
+flat in ivec2 i_i2;
+flat in ivec3 i_i3;
+flat in ivec4 i_i4;
+
+in float i_f;
+in vec2 i_f2;
+in vec3 i_f3;
+in vec4 i_f4;
+
+void main()
+{
+ bool b = u_b && i_b;
+ bvec2 b2 = bvec2(u_b2.x && i_b2.x && u_b2.y && i_b2.y);
+ bvec3 b3 = bvec3(u_b3.x && i_b3.x && u_b3.y && i_b3.y && u_b3.z && i_b3.z);
+ bvec4 b4 = bvec4(u_b4.x && i_b4.x && u_b4.y && i_b4.y && u_b4.z && i_b4.z && u_b4.w && i_b4.w);
+
+ int i = u_i + i_i;
+ ivec2 i2 = u_i2 + i_i2;
+ ivec3 i3 = u_i3 + i_i3;
+ ivec4 i4 = u_i4 + i_i4;
+
+ float f = u_f + i_f;
+ vec2 f2 = u_f2 + i_f2;
+ vec3 f3 = u_f3 + i_f3;
+ vec4 f4 = u_f4 + i_f4;
+
+ gl_FragColor =
+ b ||
+ b2.x ||
+ b2.y ||
+ b3.x ||
+ b3.y ||
+ b3.z ||
+ b4.x ||
+ b4.y ||
+ b4.z ||
+ b4.w ? vec4(
+ i +
+ i2.x +
+ i2.y +
+ i3.x +
+ i3.y +
+ i3.z +
+ i4.x +
+ i4.y +
+ i4.z +
+ i4.w +
+ f +
+ f2.x +
+ f2.y +
+ f3.x +
+ f3.y +
+ f3.z +
+ f4.x +
+ f4.y +
+ f4.z +
+ f4.w) : vec4(1.0);
+}
diff --git a/chromium/third_party/glslang/src/Test/uint.frag b/chromium/third_party/glslang/src/Test/uint.frag
new file mode 100644
index 00000000000..6dd69ac9fbc
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/uint.frag
@@ -0,0 +1,105 @@
+#version 300 es
+in uvec2 badu; // ERROR
+flat in uvec2 t;
+in highp float f;
+in highp vec2 tc;
+in bool bad; // ERROR
+uniform uvec4 v;
+uniform int i;
+uniform bool b;
+
+out uvec4 c;
+
+uniform lowp usampler2D usampler;
+
+void main()
+{
+ int count = 1;
+
+ uint u = t.y + 3u;
+ const uint cu1error = 0xFFFFFFFF; // ERROR
+ const uint cu1 = 0xFFFFFFFFU;
+ const uint cu2 = -1u; // 0xFFFFFFFF
+ const uint cu3 = 1U;
+ const uint cu4error = 1; // ERROR
+ const uint cu4 = 1u;
+
+ if (cu1 == cu2)
+ count *= 2; // done
+ if (cu3 == cu4)
+ count *= 3; // done
+ if (cu2 == cu3)
+ count *= 5; // not done
+
+ const uint cushiftediierror = 0xFFFFFFFF >> 10; // ERROR
+ const int cshiftedii = 0xFFFFFFFF >> 10;
+ const uint cushiftedui = 0xFFFFFFFFu >> 10;
+ const uint cushiftediuerror = 0xFFFFFFFF >> 10u; // ERROR
+ const int cshiftediu = 0xFFFFFFFF >> 10u;
+ const uint cushifteduu = 0xFFFFFFFFu >> 10u;
+
+ if (cshiftedii == cshiftediu)
+ count *= 7; // done
+ if (cushiftedui == cushifteduu)
+ count *= 11; // done
+ if (cshiftedii == int(cushiftedui))
+ count *= 13; // not done
+
+ uint shiftediierror = 0xFFFFFFFF >> 10; // ERROR
+ int shiftedii = 0xFFFFFFFF >> 10;
+ uint shiftedui = 0xFFFFFFFFu >> 10;
+ uint shiftediuerror = 0xFFFFFFFF >> 10u; // ERROR
+ int shiftediu = 0xFFFFFFFF >> 10u;
+ uint shifteduu = 0xFFFFFFFFu >> 10u;
+
+ if (shiftedii == shiftediu)
+ c = texture(usampler, tc);
+ if (shiftedui == shifteduu)
+ c = texture(usampler, tc + float(1u));
+ if (shiftedii == int(shiftedui))
+ c = texture(usampler, tc - vec2(2u));
+
+ if (t.x > 4u) {
+ float af = float(u);
+ bool ab = bool(u);
+ int ai = int(u);
+
+ c += uvec4(uint(af), uint(ab), uint(ai), count);
+ }
+
+ const uint cmask1 = 0x0A1u;
+ const uint cmask2 = 0xA10u;
+ const uint cmask3 = cmask1 << 4;
+ const uint cmask4 = 0xAB1u;
+
+ if (cmask3 == cmask2)
+ count *= 17; // done
+
+ if ((cmask3 & cmask1) != 0u)
+ count *= 19; // not done
+
+ if ((cmask1 | cmask3) == cmask4)
+ count *= 23; // done
+
+ if ((cmask1 ^ cmask4) == 0xA10u)
+ count *= 27; // done
+
+ uint mask1 = 0x0A1u;
+ uint mask2 = 0xA10u;
+ uint mask3 = mask1 << 4;
+ uint mask4 = 0xAB1u;
+
+ if (mask3 == mask2)
+ count *= 100;
+
+ if ((mask3 & mask1) != 0u)
+ count *= 101;
+
+ if ((mask1 | mask3) == mask4)
+ count *= 102;
+
+ if ((mask1 ^ mask4) == 0xA10u)
+ count *= 103;
+
+ c += uvec4(count);
+}
diff --git a/chromium/third_party/glslang/src/Test/uniformArray.frag b/chromium/third_party/glslang/src/Test/uniformArray.frag
new file mode 100644
index 00000000000..358b54f66d9
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/uniformArray.frag
@@ -0,0 +1,16 @@
+#version 130
+uniform sampler2D texSampler2D;
+uniform vec3 inColor;
+uniform vec4 color[6];
+uniform float alpha[16];
+
+void main()
+{
+ vec4 texColor = color[1] + color[1];
+
+ texColor.xyz += inColor;
+
+ texColor.a += alpha[12];
+
+ gl_FragColor = texColor;
+}
diff --git a/chromium/third_party/glslang/src/Test/variableArrayIndex.frag b/chromium/third_party/glslang/src/Test/variableArrayIndex.frag
new file mode 100644
index 00000000000..18c7e7b7eae
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/variableArrayIndex.frag
@@ -0,0 +1,48 @@
+#version 130
+uniform sampler2D sampler;
+varying vec2 coord;
+
+struct lunarStruct1 {
+ int i;
+ float f;
+};
+
+struct lunarStruct2 {
+ int i;
+ float f;
+ lunarStruct1 s1_1;
+};
+
+struct lunarStruct3 {
+ lunarStruct2 s2_1[3];
+ int i;
+ float f;
+ lunarStruct1 s1_1;
+};
+
+
+uniform lunarStruct1 foo;
+uniform lunarStruct2 foo2[5];
+uniform lunarStruct3 foo3;
+uniform int Count;
+
+void main()
+{
+ float scale;
+ int iLocal = Count;
+
+ if (foo3.s2_1[1].i > 0)
+ scale = foo2[foo3.s2_1[foo.i].i + 2 + ++iLocal].s1_1.f;
+ else
+ scale = foo3.s2_1[0].s1_1.f;
+
+ //for (int i = 0; i < iLocal; ++i) {
+ // scale += foo2[i].f;
+ //}
+
+ gl_FragColor = scale * texture2D(sampler, coord);
+
+ vec2[3] constructed = vec2[3](coord, vec2(scale), vec2(1.0, 2.0));
+ gl_FragColor += vec4(constructed[foo.i], constructed[foo.i]);
+}
+
diff --git a/chromium/third_party/glslang/src/Test/varyingArray.frag b/chromium/third_party/glslang/src/Test/varyingArray.frag
new file mode 100644
index 00000000000..1364cd60d05
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/varyingArray.frag
@@ -0,0 +1,19 @@
+#version 130
+uniform sampler2D texSampler2D;
+varying vec4 color;
+varying float alpha;
+
+varying vec4 gl_TexCoord[6];
+
+varying vec4 foo[3];
+
+void main()
+{
+ vec4 texColor = texture2D(texSampler2D, vec2(gl_TexCoord[4] + gl_TexCoord[5]));
+
+ texColor += color;
+
+ texColor.a = alpha;
+
+ gl_FragColor = foo[1] + gl_TexCoord[0] + gl_TexCoord[4] + texColor;
+}
diff --git a/chromium/third_party/glslang/src/Test/varyingArrayIndirect.frag b/chromium/third_party/glslang/src/Test/varyingArrayIndirect.frag
new file mode 100644
index 00000000000..7463cdce71d
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/varyingArrayIndirect.frag
@@ -0,0 +1,21 @@
+#version 130
+uniform sampler2D texSampler2D;
+varying vec4 color;
+varying float alpha;
+
+varying vec4 gl_TexCoord[6];
+
+varying vec4 userIn[2];
+
+uniform int a, b;
+
+void main()
+{
+ vec4 texColor = texture2D(texSampler2D, vec2(userIn[b] + gl_TexCoord[a] + gl_TexCoord[5]));
+
+ texColor += color;
+
+ texColor.a = alpha;
+
+ gl_FragColor = gl_TexCoord[0] + gl_TexCoord[b] + texColor + userIn[a];
+}
diff --git a/chromium/third_party/glslang/src/Test/versionsClean.frag b/chromium/third_party/glslang/src/Test/versionsClean.frag
new file mode 100644
index 00000000000..0790addbf7c
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/versionsClean.frag
@@ -0,0 +1,45 @@
+//
+//Copyright (C) 2012 LunarG, 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:
+//
+// Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 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.
+//
+// Neither the name of LunarG Inc. nor the names of its
+// contributors may be used to endorse or promote products derived
+// from this software without specific prior written permission.
+//
+//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+//"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 THE
+//COPYRIGHT HOLDERS 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.
+//
+#version 300 es
+
+in highp vec3 color;
+out highp vec4 foo;
+
+uniform highp sampler2DArrayShadow bar;
+
+void main()
+{
+ foo = vec4(color, 142.0f);
+ discard;
+}
diff --git a/chromium/third_party/glslang/src/Test/versionsClean.vert b/chromium/third_party/glslang/src/Test/versionsClean.vert
new file mode 100644
index 00000000000..4d3479ccbcd
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/versionsClean.vert
@@ -0,0 +1,43 @@
+//
+//Copyright (C) 2012 LunarG, 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:
+//
+// Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 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.
+//
+// Neither the name of LunarG Inc. nor the names of its
+// contributors may be used to endorse or promote products derived
+// from this software without specific prior written permission.
+//
+//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+//"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 THE
+//COPYRIGHT HOLDERS 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.
+//
+#version 420 compatibility
+
+attribute vec3 color;
+
+uniform sampler2DRect foo;
+
+void main()
+{
+ gl_Position = vec4(color, 142.0f);
+}
diff --git a/chromium/third_party/glslang/src/Test/versionsErrors.frag b/chromium/third_party/glslang/src/Test/versionsErrors.frag
new file mode 100644
index 00000000000..ad451e527c0
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/versionsErrors.frag
@@ -0,0 +1,46 @@
+//
+//Copyright (C) 2012 LunarG, 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:
+//
+// Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 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.
+//
+// Neither the name of LunarG Inc. nor the names of its
+// contributors may be used to endorse or promote products derived
+// from this software without specific prior written permission.
+//
+//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+//"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 THE
+//COPYRIGHT HOLDERS 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.
+//
+#version 110 es
+
+#extension GL_ARB_texture_rectangle : disable
+
+attribute vec3 color;
+
+uniform sampler2DRect foo;
+
+void main()
+{
+ gl_FragColor = vec4(color, 142.0f);
+ discard;
+}
diff --git a/chromium/third_party/glslang/src/Test/versionsErrors.vert b/chromium/third_party/glslang/src/Test/versionsErrors.vert
new file mode 100644
index 00000000000..0b5b011df33
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/versionsErrors.vert
@@ -0,0 +1,46 @@
+//
+//Copyright (C) 2012 LunarG, 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:
+//
+// Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 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.
+//
+// Neither the name of LunarG Inc. nor the names of its
+// contributors may be used to endorse or promote products derived
+// from this software without specific prior written permission.
+//
+//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+//"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 THE
+//COPYRIGHT HOLDERS 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.
+//
+#version 420 core
+
+#extension GL_ARB_texture_rectangle : enable
+
+attribute vec3 color;
+
+uniform sampler2DRect foo;
+
+void main()
+{
+ gl_Position = vec4(color, 142.0f);
+ discard;
+}
diff --git a/chromium/third_party/glslang/src/Test/voidFunction.frag b/chromium/third_party/glslang/src/Test/voidFunction.frag
new file mode 100644
index 00000000000..573d5f2ce42
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/voidFunction.frag
@@ -0,0 +1,34 @@
+#version 120
+
+uniform vec4 bigColor;
+varying vec4 BaseColor;
+uniform float d;
+
+float bar = 2.0;
+
+void foo()
+{
+ bar++;
+
+ return;
+}
+
+void foo2()
+{
+ bar++;
+}
+
+void main()
+{
+ vec4 outColor = bigColor;
+
+ foo();
+
+ foo2();
+
+ outColor.x += bar;
+
+ gl_FragColor = outColor;
+
+ return;
+}
diff --git a/chromium/third_party/glslang/src/Test/vulkan.ast.vert b/chromium/third_party/glslang/src/Test/vulkan.ast.vert
new file mode 100644
index 00000000000..c5a6a42c7d8
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/vulkan.ast.vert
@@ -0,0 +1,42 @@
+#version 450
+
+layout(constant_id = 200) const float scf1 = 1.0;
+layout(constant_id = 201) const bool scbt = true;
+layout(constant_id = 202) const int sci2 = 2;
+
+void main()
+{
+ bool(scf1); // not a spec-const
+ bool(scbt); // spec-const
+ bool(sci2); // spec-const
+
+ float(scf1); // not a spec-const
+ float(scbt); // not a spec-const
+ float(sci2); // not a spec-const
+
+ int(scf1); // not a spec-const
+ int(scbt); // spec-const
+ int(sci2); // spec-const
+
+ scf1 * scf1; // not a spec-const
+ scbt || scbt; // spec-const
+ sci2 * sci2; // spec-const
+ scf1 + sci2; // implicit conversion not a spec-const
+
+ -scf1; // not a spec-const
+ !scbt; // spec-const
+ -sci2; // spec-const
+
+ scf1 > scf1; // not a spec-const
+ sci2 > sci2; // spec-const
+
+ scf1 != scf1; // not a spec-const
+ scbt != scbt; // spec-const
+ sci2 != sci2; // spec-const
+
+ ivec2(sci2, sci2); // spec-const
+ ivec2[2](ivec2(sci2, sci2), ivec2(sci2, sci2)); // not a spec-const
+
+ vec2(scf1, scf1); // not spec-const
+ vec2[2](vec2(scf1, scf1), vec2(scf1, scf1)); // not a spec-const
+}
diff --git a/chromium/third_party/glslang/src/Test/vulkan.comp b/chromium/third_party/glslang/src/Test/vulkan.comp
new file mode 100644
index 00000000000..fe5637492ca
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/vulkan.comp
@@ -0,0 +1,12 @@
+#version 450
+
+layout(local_size_x_id = 18, local_size_z_id = 19) in;
+layout(local_size_x = 32, local_size_y = 32) in;
+layout(local_size_z_id = 14) in; // ERROR, can't change this
+
+void main()
+{
+ gl_WorkGroupSize;
+}
+
+layout(local_size_y_id = 19) in; // ERROR, already used: TODO not yet reported
diff --git a/chromium/third_party/glslang/src/Test/vulkan.frag b/chromium/third_party/glslang/src/Test/vulkan.frag
new file mode 100644
index 00000000000..8dd7a12dfc0
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/vulkan.frag
@@ -0,0 +1,75 @@
+#version 450
+
+uniform sampler s;
+uniform sampler sA[4];
+uniform texture2D t2d;
+uniform texture3D t3d[4];
+int i;
+uniform samplerShadow sShadow;
+uniform texture3D t3d5[5];
+writeonly uniform image2D i2d;
+
+void badConst()
+{
+ sampler2D(t2d); // ERROR, need 2 args
+ sampler2D(s, s); // ERROR, wrong type
+ sampler2D(i, i); // ERROR, wrong type
+ sampler2D(t2d, i); // ERROR, wrong type
+ sampler2D(t2d, t2d); // ERROR, wrong type
+ sampler2D(t2d, sA); // ERROR, wrong type
+
+ sampler3D[4](t3d5, sA[2]); // ERROR, can't make array
+ sampler2D(i2d, s); // ERROR, image instead of texture
+ sampler2D(t3d[1], s); // ERROR, 3D not 2D
+ sampler2D(t2d, sShadow); // ERROR, shadow mismatch
+ sampler2DShadow(t2d, s); // ERROR, shadow mismatch
+}
+
+sampler2D s2D = sampler2D(t2d, s); // ERROR, no sampler constructor
+sampler3D s3d[4] = sampler3D[4](t3d, sA[2]); // ERROR, no sampler constructor
+
+out vec4 color;
+
+void main()
+{
+ color = texture(s2D, vec2(0.5));
+ color += texture(s3d[i], vec3(0.5));
+}
+
+layout(push_constant) buffer pcb { // ERROR, not on a buffer
+ int a;
+} pcbInst;
+
+layout(push_constant) uniform float pcfloat; // ERROR 2X: not on a non-block, and non-opaque outside block
+
+layout(push_constant) uniform; // ERROR, needs an object
+
+layout(push_constant) uniform pcb2 {
+ int a;
+}; // ERROR, no instance name
+
+layout(input_attachment_index = 2) uniform subpassInput subD;
+layout(input_attachment_index = 3) uniform texture2D subDbad1; // ERROR, not a texture
+layout(input_attachment_index = 4) writeonly uniform image2D subDbad2; // ERROR, not an image
+uniform subpassInput subDbad3; // ERROR, need attachment number
+layout(input_attachment_index = 2) uniform subpassInputMS subDMS;
+
+void foo()
+{
+ vec4 v = subpassLoad(subD);
+ v += subpassLoadMS(subD); // ERROR, no such function
+ v += subpassLoad(subD, 2); // ERROR, no such sig.
+ v += subpassLoad(subDMS, 2);
+ v += subpassLoadMS(subDMS, 2); // ERROR, no such function
+}
+
+subroutine int fooS; // ERROR, not in SPV
+subroutine int fooSub(); // ERROR, not in SPV
+
+uniform vec4 dv4; // ERROR, no default uniforms
+
+void fooTex()
+{
+ texture(t2d, vec2(1.0)); // ERROR, need a sampler, not a pure texture
+ imageStore(t2d, ivec2(4, 5), vec4(1.2)); // ERROR, need an image, not a pure texture
+} \ No newline at end of file
diff --git a/chromium/third_party/glslang/src/Test/vulkan.vert b/chromium/third_party/glslang/src/Test/vulkan.vert
new file mode 100644
index 00000000000..efc9d9d0c39
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/vulkan.vert
@@ -0,0 +1,47 @@
+#version 450
+
+layout(input_attachment_index = 2) uniform subpassInput subD1; // ERROR, not this stage
+layout(input_attachment_index = 2) uniform isubpassInput subD2; // ERROR, not this stage
+layout(input_attachment_index = 2) uniform usubpassInput subD3; // ERROR, not this stage
+layout(input_attachment_index = 2) uniform subpassInputMS subD4; // ERROR, not this stage
+layout(input_attachment_index = 2) uniform isubpassInputMS subD5; // ERROR, not this stage
+layout(input_attachment_index = 2) uniform usubpassInputMS subD6; // ERROR, not this stage
+
+out vec4 color;
+
+layout(constant_id = 17) const ivec2 arraySizes = ivec2(12,13); // ERROR, not a scalar
+layout(constant_id = 17) uniform sampler2D s2D; // ERROR, not the right type or qualifier
+layout(constant_id = 4000) const int c1 = 12; // ERROR, too big
+layout(constant_id = 4) const float c2[2] = float[2](1.0, 2.0); // ERROR, not a scalar
+layout(constant_id = 4) in;
+
+void main()
+{
+ color = subpassLoad(subD1); // ERROR, no such function in this stage
+}
+
+layout(binding = 0) uniform atomic_uint aui; // ERROR, no atomics in Vulkan
+layout(shared) uniform ub1n { int a; } ub1i; // ERROR, no shared
+layout(packed) uniform ub2n { int a; } ub2i; // ERROR, no packed
+
+layout(constant_id=222) const int arraySize = 4;
+
+void foo()
+{
+ int a1[arraySize];
+ int a2[arraySize] = a1; // ERROR, can't use in initializer
+
+ a1 = a2; // ERROR, can't assign, even though the same type
+ if (a1 == a2) // ERROR, can't compare either
+ ++color;
+}
+
+layout(set = 1, push_constant) uniform badpc { int a; } badpcI; // ERROR, no descriptor set with push_constant
+
+#ifndef VULKAN
+#error VULKAN should be defined
+#endif
+
+#if VULKAN != 100
+#error VULKAN should be 100
+#endif
diff --git a/chromium/third_party/glslang/src/Test/whileLoop.frag b/chromium/third_party/glslang/src/Test/whileLoop.frag
new file mode 100644
index 00000000000..126fdb12cf1
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/whileLoop.frag
@@ -0,0 +1,16 @@
+#version 110
+
+uniform vec4 bigColor;
+varying vec4 BaseColor;
+uniform float d;
+
+void main()
+{
+ vec4 color = BaseColor;
+
+ while (color.x < d) {
+ color += bigColor;
+ }
+
+ gl_FragColor = color;
+}
diff --git a/chromium/third_party/glslang/src/glslang/CMakeLists.txt b/chromium/third_party/glslang/src/glslang/CMakeLists.txt
new file mode 100644
index 00000000000..f431cc1125e
--- /dev/null
+++ b/chromium/third_party/glslang/src/glslang/CMakeLists.txt
@@ -0,0 +1,91 @@
+if(WIN32)
+ add_subdirectory(OSDependent/Windows)
+elseif(UNIX)
+ add_subdirectory(OSDependent/Unix)
+else(WIN32)
+ message("unknown platform")
+endif(WIN32)
+
+set(SOURCES
+ MachineIndependent/glslang.y
+ MachineIndependent/glslang_tab.cpp
+ MachineIndependent/Constant.cpp
+ MachineIndependent/InfoSink.cpp
+ MachineIndependent/Initialize.cpp
+ MachineIndependent/IntermTraverse.cpp
+ MachineIndependent/Intermediate.cpp
+ MachineIndependent/ParseHelper.cpp
+ MachineIndependent/PoolAlloc.cpp
+ MachineIndependent/RemoveTree.cpp
+ MachineIndependent/Scan.cpp
+ MachineIndependent/ShaderLang.cpp
+ MachineIndependent/SymbolTable.cpp
+ MachineIndependent/Versions.cpp
+ MachineIndependent/intermOut.cpp
+ MachineIndependent/limits.cpp
+ MachineIndependent/linkValidate.cpp
+ MachineIndependent/parseConst.cpp
+ MachineIndependent/reflection.cpp
+ MachineIndependent/preprocessor/Pp.cpp
+ MachineIndependent/preprocessor/PpAtom.cpp
+ MachineIndependent/preprocessor/PpContext.cpp
+ MachineIndependent/preprocessor/PpMemory.cpp
+ MachineIndependent/preprocessor/PpScanner.cpp
+ MachineIndependent/preprocessor/PpSymbols.cpp
+ MachineIndependent/preprocessor/PpTokens.cpp
+ MachineIndependent/propagateNoContraction.cpp
+ GenericCodeGen/CodeGen.cpp
+ GenericCodeGen/Link.cpp)
+
+set(HEADERS
+ Public/ShaderLang.h
+ Include/arrays.h
+ Include/BaseTypes.h
+ Include/Common.h
+ Include/ConstantUnion.h
+ Include/InfoSink.h
+ Include/InitializeGlobals.h
+ Include/intermediate.h
+ Include/PoolAlloc.h
+ Include/ResourceLimits.h
+ Include/revision.h
+ Include/ShHandle.h
+ Include/Types.h
+ MachineIndependent/glslang_tab.cpp.h
+ MachineIndependent/gl_types.h
+ MachineIndependent/Initialize.h
+ MachineIndependent/localintermediate.h
+ MachineIndependent/ParseHelper.h
+ MachineIndependent/reflection.h
+ MachineIndependent/RemoveTree.h
+ MachineIndependent/Scan.h
+ MachineIndependent/ScanContext.h
+ MachineIndependent/SymbolTable.h
+ MachineIndependent/Versions.h
+ MachineIndependent/parseVersions.h
+ MachineIndependent/propagateNoContraction.h
+ MachineIndependent/preprocessor/PpContext.h
+ MachineIndependent/preprocessor/PpTokens.h)
+
+# This might be useful for making grammar changes:
+#
+# find_package(BISON)
+# add_custom_command(OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/MachineIndependent/glslang_tab.cpp ${CMAKE_CURRENT_SOURCE_DIR}/MachineIndependent/glslang_tab.cpp.h
+# COMMAND ${BISON_EXECUTABLE} --defines=${CMAKE_CURRENT_SOURCE_DIR}/MachineIndependent/glslang_tab.cpp.h -t ${CMAKE_CURRENT_SOURCE_DIR}/MachineIndependent/glslang.y -o ${CMAKE_CURRENT_SOURCE_DIR}/MachineIndependent/glslang_tab.cpp
+# MAIN_DEPENDENCY MachineIndependent/glslang.y
+# WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
+# set(BISON_GLSLParser_OUTPUT_SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/MachineIndependent/glslang_tab.cpp)
+
+add_library(glslang STATIC ${BISON_GLSLParser_OUTPUT_SOURCE} ${SOURCES} ${HEADERS})
+set_property(TARGET glslang PROPERTY FOLDER glslang)
+
+if(WIN32)
+ source_group("Public" REGULAR_EXPRESSION "Public/*")
+ source_group("MachineIndependent" REGULAR_EXPRESSION "MachineIndependent/[^/]*")
+ source_group("Include" REGULAR_EXPRESSION "Include/[^/]*")
+ source_group("GenericCodeGen" REGULAR_EXPRESSION "GenericCodeGen/*")
+ source_group("MachineIndependent\\Preprocessor" REGULAR_EXPRESSION "MachineIndependent/preprocessor/*")
+endif(WIN32)
+
+install(TARGETS glslang
+ ARCHIVE DESTINATION lib)
diff --git a/chromium/third_party/glslang/src/glslang/GenericCodeGen/CodeGen.cpp b/chromium/third_party/glslang/src/glslang/GenericCodeGen/CodeGen.cpp
new file mode 100644
index 00000000000..dc78342ac96
--- /dev/null
+++ b/chromium/third_party/glslang/src/glslang/GenericCodeGen/CodeGen.cpp
@@ -0,0 +1,76 @@
+//
+//Copyright (C) 2002-2005 3Dlabs Inc. Ltd.
+//All rights reserved.
+//
+//Redistribution and use in source and binary forms, with or without
+//modification, are permitted provided that the following conditions
+//are met:
+//
+// Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 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.
+//
+// Neither the name of 3Dlabs Inc. Ltd. nor the names of its
+// contributors may be used to endorse or promote products derived
+// from this software without specific prior written permission.
+//
+//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+//"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 THE
+//COPYRIGHT HOLDERS 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.
+//
+
+#include "../Include/Common.h"
+#include "../Include/ShHandle.h"
+#include "../MachineIndependent/Versions.h"
+
+//
+// Here is where real machine specific high-level data would be defined.
+//
+class TGenericCompiler : public TCompiler {
+public:
+ TGenericCompiler(EShLanguage l, int dOptions) : TCompiler(l, infoSink), debugOptions(dOptions) { }
+ virtual bool compile(TIntermNode* root, int version = 0, EProfile profile = ENoProfile);
+ TInfoSink infoSink;
+ int debugOptions;
+};
+
+//
+// This function must be provided to create the actual
+// compile object used by higher level code. It returns
+// a subclass of TCompiler.
+//
+TCompiler* ConstructCompiler(EShLanguage language, int debugOptions)
+{
+ return new TGenericCompiler(language, debugOptions);
+}
+
+//
+// Delete the compiler made by ConstructCompiler
+//
+void DeleteCompiler(TCompiler* compiler)
+{
+ delete compiler;
+}
+
+//
+// Generate code from the given parse tree
+//
+bool TGenericCompiler::compile(TIntermNode* /*root*/, int /*version*/, EProfile /*profile*/)
+{
+ haveValidObjectCode = true;
+
+ return haveValidObjectCode;
+}
diff --git a/chromium/third_party/glslang/src/glslang/GenericCodeGen/Link.cpp b/chromium/third_party/glslang/src/glslang/GenericCodeGen/Link.cpp
new file mode 100644
index 00000000000..81609992066
--- /dev/null
+++ b/chromium/third_party/glslang/src/glslang/GenericCodeGen/Link.cpp
@@ -0,0 +1,91 @@
+//
+//Copyright (C) 2002-2005 3Dlabs Inc. Ltd.
+//All rights reserved.
+//
+//Redistribution and use in source and binary forms, with or without
+//modification, are permitted provided that the following conditions
+//are met:
+//
+// Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 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.
+//
+// Neither the name of 3Dlabs Inc. Ltd. nor the names of its
+// contributors may be used to endorse or promote products derived
+// from this software without specific prior written permission.
+//
+//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+//"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 THE
+//COPYRIGHT HOLDERS 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.
+//
+
+//
+// The top level algorithms for linking multiple
+// shaders together.
+//
+#include "../Include/Common.h"
+#include "../Include/ShHandle.h"
+
+//
+// Actual link object, derived from the shader handle base classes.
+//
+class TGenericLinker : public TLinker {
+public:
+ TGenericLinker(EShExecutable e, int dOptions) : TLinker(e, infoSink), debugOptions(dOptions) { }
+ bool link(TCompilerList&, TUniformMap*) { return true; }
+ void getAttributeBindings(ShBindingTable const **) const { }
+ TInfoSink infoSink;
+ int debugOptions;
+};
+
+//
+// The internal view of a uniform/float object exchanged with the driver.
+//
+class TUniformLinkedMap : public TUniformMap {
+public:
+ TUniformLinkedMap() { }
+ virtual int getLocation(const char*) { return 0; }
+};
+
+TShHandleBase* ConstructLinker(EShExecutable executable, int debugOptions)
+{
+ return new TGenericLinker(executable, debugOptions);
+}
+
+void DeleteLinker(TShHandleBase* linker)
+{
+ delete linker;
+}
+
+TUniformMap* ConstructUniformMap()
+{
+ return new TUniformLinkedMap();
+}
+
+void DeleteUniformMap(TUniformMap* map)
+{
+ delete map;
+}
+
+TShHandleBase* ConstructBindings()
+{
+ return 0;
+}
+
+void DeleteBindingList(TShHandleBase* bindingList)
+{
+ delete bindingList;
+}
diff --git a/chromium/third_party/glslang/src/glslang/Include/BaseTypes.h b/chromium/third_party/glslang/src/glslang/Include/BaseTypes.h
new file mode 100644
index 00000000000..2c2757724b8
--- /dev/null
+++ b/chromium/third_party/glslang/src/glslang/Include/BaseTypes.h
@@ -0,0 +1,315 @@
+//
+//Copyright (C) 2002-2005 3Dlabs Inc. Ltd.
+//Copyright (C) 2012-2013 LunarG, 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:
+//
+// Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 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.
+//
+// Neither the name of 3Dlabs Inc. Ltd. nor the names of its
+// contributors may be used to endorse or promote products derived
+// from this software without specific prior written permission.
+//
+//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+//"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 THE
+//COPYRIGHT HOLDERS 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.
+//
+
+#ifndef _BASICTYPES_INCLUDED_
+#define _BASICTYPES_INCLUDED_
+
+namespace glslang {
+
+//
+// Basic type. Arrays, vectors, sampler details, etc., are orthogonal to this.
+//
+enum TBasicType {
+ EbtVoid,
+ EbtFloat,
+ EbtDouble,
+ EbtInt,
+ EbtUint,
+ EbtInt64,
+ EbtUint64,
+ EbtBool,
+ EbtAtomicUint,
+ EbtSampler,
+ EbtStruct,
+ EbtBlock,
+ EbtNumTypes
+};
+
+//
+// Storage qualifiers. Should align with different kinds of storage or
+// resource or GLSL storage qualifier. Expansion is deprecated.
+//
+// N.B.: You probably DON'T want to add anything here, but rather just add it
+// to the built-in variables. See the comment above TBuiltInVariable.
+//
+// A new built-in variable will normally be an existing qualifier, like 'in', 'out', etc.
+// DO NOT follow the design pattern of, say EvqInstanceId, etc.
+//
+enum TStorageQualifier {
+ EvqTemporary, // For temporaries (within a function), read/write
+ EvqGlobal, // For globals read/write
+ EvqConst, // User-defined constant values, will be semantically constant and constant folded
+ EvqVaryingIn, // pipeline input, read only, also supercategory for all built-ins not included in this enum (see TBuiltInVariable)
+ EvqVaryingOut, // pipeline output, read/write, also supercategory for all built-ins not included in this enum (see TBuiltInVariable)
+ EvqUniform, // read only, shared with app
+ EvqBuffer, // read/write, shared with app
+ EvqShared, // compute shader's read/write 'shared' qualifier
+
+ // parameters
+ EvqIn, // also, for 'in' in the grammar before we know if it's a pipeline input or an 'in' parameter
+ EvqOut, // also, for 'out' in the grammar before we know if it's a pipeline output or an 'out' parameter
+ EvqInOut,
+ EvqConstReadOnly, // input; also other read-only types having neither a constant value nor constant-value semantics
+
+ // built-ins read by vertex shader
+ EvqVertexId,
+ EvqInstanceId,
+
+ // built-ins written by vertex shader
+ EvqPosition,
+ EvqPointSize,
+ EvqClipVertex,
+
+ // built-ins read by fragment shader
+ EvqFace,
+ EvqFragCoord,
+ EvqPointCoord,
+
+ // built-ins written by fragment shader
+ EvqFragColor,
+ EvqFragDepth,
+
+ // end of list
+ EvqLast
+};
+
+//
+// Subcategories of the TStorageQualifier, simply to give a direct mapping
+// between built-in variable names and an numerical value (the enum).
+//
+// For backward compatibility, there is some redundancy between the
+// TStorageQualifier and these. Existing members should both be maintained accurately.
+// However, any new built-in variable (and any existing non-redundant one)
+// must follow the pattern that the specific built-in is here, and only its
+// general qualifier is in TStorageQualifier.
+//
+// Something like gl_Position, which is sometimes 'in' and sometimes 'out'
+// shows up as two different built-in variables in a single stage, but
+// only has a single enum in TBuiltInVariable, so both the
+// TStorageQualifier and the TBuitinVariable are needed to distinguish
+// between them.
+//
+enum TBuiltInVariable {
+ EbvNone,
+ EbvNumWorkGroups,
+ EbvWorkGroupSize,
+ EbvWorkGroupId,
+ EbvLocalInvocationId,
+ EbvGlobalInvocationId,
+ EbvLocalInvocationIndex,
+ EbvSubGroupSize,
+ EbvSubGroupInvocation,
+ EbvSubGroupEqMask,
+ EbvSubGroupGeMask,
+ EbvSubGroupGtMask,
+ EbvSubGroupLeMask,
+ EbvSubGroupLtMask,
+ EbvVertexId,
+ EbvInstanceId,
+ EbvVertexIndex,
+ EbvInstanceIndex,
+ EbvBaseVertex,
+ EbvBaseInstance,
+ EbvDrawId,
+ EbvPosition,
+ EbvPointSize,
+ EbvClipVertex,
+ EbvClipDistance,
+ EbvCullDistance,
+ EbvNormal,
+ EbvVertex,
+ EbvMultiTexCoord0,
+ EbvMultiTexCoord1,
+ EbvMultiTexCoord2,
+ EbvMultiTexCoord3,
+ EbvMultiTexCoord4,
+ EbvMultiTexCoord5,
+ EbvMultiTexCoord6,
+ EbvMultiTexCoord7,
+ EbvFrontColor,
+ EbvBackColor,
+ EbvFrontSecondaryColor,
+ EbvBackSecondaryColor,
+ EbvTexCoord,
+ EbvFogFragCoord,
+ EbvInvocationId,
+ EbvPrimitiveId,
+ EbvLayer,
+ EbvViewportIndex,
+ EbvPatchVertices,
+ EbvTessLevelOuter,
+ EbvTessLevelInner,
+ EbvBoundingBox,
+ EbvTessCoord,
+ EbvColor,
+ EbvSecondaryColor,
+ EbvFace,
+ EbvFragCoord,
+ EbvPointCoord,
+ EbvFragColor,
+ EbvFragData,
+ EbvFragDepth,
+ EbvSampleId,
+ EbvSamplePosition,
+ EbvSampleMask,
+ EbvHelperInvocation,
+
+ EbvLast
+};
+
+// These will show up in error messages
+__inline const char* GetStorageQualifierString(TStorageQualifier q)
+{
+ switch (q) {
+ case EvqTemporary: return "temp"; break;
+ case EvqGlobal: return "global"; break;
+ case EvqConst: return "const"; break;
+ case EvqConstReadOnly: return "const (read only)"; break;
+ case EvqVaryingIn: return "in"; break;
+ case EvqVaryingOut: return "out"; break;
+ case EvqUniform: return "uniform"; break;
+ case EvqBuffer: return "buffer"; break;
+ case EvqShared: return "shared"; break;
+ case EvqIn: return "in"; break;
+ case EvqOut: return "out"; break;
+ case EvqInOut: return "inout"; break;
+ case EvqVertexId: return "gl_VertexId"; break;
+ case EvqInstanceId: return "gl_InstanceId"; break;
+ case EvqPosition: return "gl_Position"; break;
+ case EvqPointSize: return "gl_PointSize"; break;
+ case EvqClipVertex: return "gl_ClipVertex"; break;
+ case EvqFace: return "gl_FrontFacing"; break;
+ case EvqFragCoord: return "gl_FragCoord"; break;
+ case EvqPointCoord: return "gl_PointCoord"; break;
+ case EvqFragColor: return "fragColor"; break;
+ case EvqFragDepth: return "gl_FragDepth"; break;
+ default: return "unknown qualifier";
+ }
+}
+
+__inline const char* GetBuiltInVariableString(TBuiltInVariable v)
+{
+ switch (v) {
+ case EbvNone: return "";
+ case EbvNumWorkGroups: return "NumWorkGroups";
+ case EbvWorkGroupSize: return "WorkGroupSize";
+ case EbvWorkGroupId: return "WorkGroupID";
+ case EbvLocalInvocationId: return "LocalInvocationID";
+ case EbvGlobalInvocationId: return "GlobalInvocationID";
+ case EbvLocalInvocationIndex: return "LocalInvocationIndex";
+ case EbvSubGroupSize: return "SubGroupSize";
+ case EbvSubGroupInvocation: return "SubGroupInvocation";
+ case EbvSubGroupEqMask: return "SubGroupEqMask";
+ case EbvSubGroupGeMask: return "SubGroupGeMask";
+ case EbvSubGroupGtMask: return "SubGroupGtMask";
+ case EbvSubGroupLeMask: return "SubGroupLeMask";
+ case EbvSubGroupLtMask: return "SubGroupLtMask";
+ case EbvVertexId: return "VertexId";
+ case EbvInstanceId: return "InstanceId";
+ case EbvVertexIndex: return "VertexIndex";
+ case EbvInstanceIndex: return "InstanceIndex";
+ case EbvBaseVertex: return "BaseVertex";
+ case EbvBaseInstance: return "BaseInstance";
+ case EbvDrawId: return "DrawId";
+ case EbvPosition: return "Position";
+ case EbvPointSize: return "PointSize";
+ case EbvClipVertex: return "ClipVertex";
+ case EbvClipDistance: return "ClipDistance";
+ case EbvCullDistance: return "CullDistance";
+ case EbvNormal: return "Normal";
+ case EbvVertex: return "Vertex";
+ case EbvMultiTexCoord0: return "MultiTexCoord0";
+ case EbvMultiTexCoord1: return "MultiTexCoord1";
+ case EbvMultiTexCoord2: return "MultiTexCoord2";
+ case EbvMultiTexCoord3: return "MultiTexCoord3";
+ case EbvMultiTexCoord4: return "MultiTexCoord4";
+ case EbvMultiTexCoord5: return "MultiTexCoord5";
+ case EbvMultiTexCoord6: return "MultiTexCoord6";
+ case EbvMultiTexCoord7: return "MultiTexCoord7";
+ case EbvFrontColor: return "FrontColor";
+ case EbvBackColor: return "BackColor";
+ case EbvFrontSecondaryColor: return "FrontSecondaryColor";
+ case EbvBackSecondaryColor: return "BackSecondaryColor";
+ case EbvTexCoord: return "TexCoord";
+ case EbvFogFragCoord: return "FogFragCoord";
+ case EbvInvocationId: return "InvocationID";
+ case EbvPrimitiveId: return "PrimitiveID";
+ case EbvLayer: return "Layer";
+ case EbvViewportIndex: return "ViewportIndex";
+ case EbvPatchVertices: return "PatchVertices";
+ case EbvTessLevelOuter: return "TessLevelOuter";
+ case EbvTessLevelInner: return "TessLevelInner";
+ case EbvBoundingBox: return "BoundingBox";
+ case EbvTessCoord: return "TessCoord";
+ case EbvColor: return "Color";
+ case EbvSecondaryColor: return "SecondaryColor";
+ case EbvFace: return "Face";
+ case EbvFragCoord: return "FragCoord";
+ case EbvPointCoord: return "PointCoord";
+ case EbvFragColor: return "FragColor";
+ case EbvFragData: return "FragData";
+ case EbvFragDepth: return "FragDepth";
+ case EbvSampleId: return "SampleId";
+ case EbvSamplePosition: return "SamplePosition";
+ case EbvSampleMask: return "SampleMaskIn";
+ case EbvHelperInvocation: return "HelperInvocation";
+ default: return "unknown built-in variable";
+ }
+}
+
+// In this enum, order matters; users can assume higher precision is a bigger value
+// and EpqNone is 0.
+enum TPrecisionQualifier {
+ EpqNone = 0,
+ EpqLow,
+ EpqMedium,
+ EpqHigh
+};
+
+__inline const char* GetPrecisionQualifierString(TPrecisionQualifier p)
+{
+ switch(p) {
+ case EpqNone: return ""; break;
+ case EpqLow: return "lowp"; break;
+ case EpqMedium: return "mediump"; break;
+ case EpqHigh: return "highp"; break;
+ default: return "unknown precision qualifier";
+ }
+}
+
+} // end namespace glslang
+
+#endif // _BASICTYPES_INCLUDED_
diff --git a/chromium/third_party/glslang/src/glslang/Include/Common.h b/chromium/third_party/glslang/src/glslang/Include/Common.h
new file mode 100644
index 00000000000..efb78d44f8c
--- /dev/null
+++ b/chromium/third_party/glslang/src/glslang/Include/Common.h
@@ -0,0 +1,257 @@
+//
+//Copyright (C) 2002-2005 3Dlabs Inc. Ltd.
+//Copyright (C) 2012-2013 LunarG, 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:
+//
+// Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 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.
+//
+// Neither the name of 3Dlabs Inc. Ltd. nor the names of its
+// contributors may be used to endorse or promote products derived
+// from this software without specific prior written permission.
+//
+//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+//"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 THE
+//COPYRIGHT HOLDERS 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.
+//
+
+#ifndef _COMMON_INCLUDED_
+#define _COMMON_INCLUDED_
+
+#if (defined(_MSC_VER) && _MSC_VER < 1900 /*vs2015*/) || defined MINGW_HAS_SECURE_API
+ #include <basetsd.h>
+ #define snprintf sprintf_s
+ #define safe_vsprintf(buf,max,format,args) vsnprintf_s((buf), (max), (max), (format), (args))
+#elif defined (solaris)
+ #define safe_vsprintf(buf,max,format,args) vsnprintf((buf), (max), (format), (args))
+ #include <sys/int_types.h>
+ #define UINT_PTR uintptr_t
+#else
+ #define safe_vsprintf(buf,max,format,args) vsnprintf((buf), (max), (format), (args))
+ #include <stdint.h>
+ #define UINT_PTR uintptr_t
+#endif
+
+#if defined(__ANDROID__) || _MSC_VER < 1700
+#include <sstream>
+namespace std {
+template<typename T>
+std::string to_string(const T& val) {
+ std::ostringstream os;
+ os << val;
+ return os.str();
+}
+}
+#endif
+
+#if defined(_MSC_VER) && _MSC_VER < 1700
+inline long long int strtoll (const char* str, char** endptr, int base)
+{
+ return _strtoi64(str, endptr, base);
+}
+inline long long int atoll (const char* str)
+{
+ return strtoll(str, NULL, 10);
+}
+#endif
+
+/* windows only pragma */
+#ifdef _MSC_VER
+ #pragma warning(disable : 4786) // Don't warn about too long identifiers
+ #pragma warning(disable : 4514) // unused inline method
+ #pragma warning(disable : 4201) // nameless union
+#endif
+
+#include <set>
+#include <unordered_set>
+#include <vector>
+#include <map>
+#include <unordered_map>
+#include <list>
+#include <algorithm>
+#include <string>
+#include <stdio.h>
+#include <assert.h>
+
+#include "PoolAlloc.h"
+
+//
+// Put POOL_ALLOCATOR_NEW_DELETE in base classes to make them use this scheme.
+//
+#define POOL_ALLOCATOR_NEW_DELETE(A) \
+ void* operator new(size_t s) { return (A).allocate(s); } \
+ void* operator new(size_t, void *_Where) { return (_Where); } \
+ void operator delete(void*) { } \
+ void operator delete(void *, void *) { } \
+ void* operator new[](size_t s) { return (A).allocate(s); } \
+ void* operator new[](size_t, void *_Where) { return (_Where); } \
+ void operator delete[](void*) { } \
+ void operator delete[](void *, void *) { }
+
+namespace glslang {
+
+ //
+ // Pool version of string.
+ //
+ typedef pool_allocator<char> TStringAllocator;
+ typedef std::basic_string <char, std::char_traits<char>, TStringAllocator> TString;
+
+} // end namespace glslang
+
+// Repackage the std::hash for use by unordered map/set with a TString key.
+namespace std {
+
+ template<> struct hash<glslang::TString> {
+ std::size_t operator()(const glslang::TString& s) const
+ {
+ const unsigned _FNV_offset_basis = 2166136261U;
+ const unsigned _FNV_prime = 16777619U;
+ unsigned _Val = _FNV_offset_basis;
+ size_t _Count = s.size();
+ const char* _First = s.c_str();
+ for (size_t _Next = 0; _Next < _Count; ++_Next)
+ {
+ _Val ^= (unsigned)_First[_Next];
+ _Val *= _FNV_prime;
+ }
+
+ return _Val;
+ }
+ };
+}
+
+namespace glslang {
+
+inline TString* NewPoolTString(const char* s)
+{
+ void* memory = GetThreadPoolAllocator().allocate(sizeof(TString));
+ return new(memory) TString(s);
+}
+
+template<class T> inline T* NewPoolObject(T)
+{
+ return new(GetThreadPoolAllocator().allocate(sizeof(T))) T;
+}
+
+template<class T> inline T* NewPoolObject(T, int instances)
+{
+ return new(GetThreadPoolAllocator().allocate(instances * sizeof(T))) T[instances];
+}
+
+//
+// Pool allocator versions of vectors, lists, and maps
+//
+template <class T> class TVector : public std::vector<T, pool_allocator<T> > {
+public:
+ POOL_ALLOCATOR_NEW_DELETE(GetThreadPoolAllocator())
+
+ typedef typename std::vector<T, pool_allocator<T> >::size_type size_type;
+ TVector() : std::vector<T, pool_allocator<T> >() {}
+ TVector(const pool_allocator<T>& a) : std::vector<T, pool_allocator<T> >(a) {}
+ TVector(size_type i) : std::vector<T, pool_allocator<T> >(i) {}
+ TVector(size_type i, const T& val) : std::vector<T, pool_allocator<T> >(i, val) {}
+};
+
+template <class T> class TList : public std::list<T, pool_allocator<T> > {
+};
+
+template <class K, class D, class CMP = std::less<K> >
+class TMap : public std::map<K, D, CMP, pool_allocator<std::pair<K const, D> > > {
+};
+
+template <class K, class D, class HASH = std::hash<K>, class PRED = std::equal_to<K> >
+class TUnorderedMap : public std::unordered_map<K, D, HASH, PRED, pool_allocator<std::pair<K const, D> > > {
+};
+
+//
+// Persistent string memory. Should only be used for strings that survive
+// across compiles/links.
+//
+typedef std::basic_string<char> TPersistString;
+
+//
+// templatized min and max functions.
+//
+template <class T> T Min(const T a, const T b) { return a < b ? a : b; }
+template <class T> T Max(const T a, const T b) { return a > b ? a : b; }
+
+//
+// Create a TString object from an integer.
+//
+inline const TString String(const int i, const int base = 10)
+{
+ char text[16]; // 32 bit ints are at most 10 digits in base 10
+
+ #if defined _MSC_VER || defined MINGW_HAS_SECURE_API
+ _itoa_s(i, text, sizeof(text), base);
+ #else
+ // we assume base 10 for all cases
+ snprintf(text, sizeof(text), "%d", i);
+ #endif
+
+ return text;
+}
+
+struct TSourceLoc {
+ void init() { name = nullptr; string = 0; line = 0; column = 0; }
+ // Returns the name if it exists. Otherwise, returns the string number.
+ std::string getStringNameOrNum(bool quoteStringName = true) const
+ {
+ if (name != nullptr)
+ return quoteStringName ? ("\"" + std::string(name) + "\"") : name;
+ return std::to_string((long long)string);
+ }
+ const char* name; // descriptive name for this string
+ int string;
+ int line;
+ int column;
+};
+
+typedef TMap<TString, TString> TPragmaTable;
+
+const int MaxTokenLength = 1024;
+
+template <class T> bool IsPow2(T powerOf2)
+{
+ if (powerOf2 <= 0)
+ return false;
+
+ return (powerOf2 & (powerOf2 - 1)) == 0;
+}
+
+// Round number up to a multiple of the given powerOf2, which is not
+// a power, just a number that must be a power of 2.
+template <class T> void RoundToPow2(T& number, int powerOf2)
+{
+ assert(IsPow2(powerOf2));
+ number = (number + powerOf2 - 1) & ~(powerOf2 - 1);
+}
+
+template <class T> bool IsMultipleOfPow2(T number, int powerOf2)
+{
+ assert(IsPow2(powerOf2));
+ return ! (number & (powerOf2 - 1));
+}
+
+} // end namespace glslang
+
+#endif // _COMMON_INCLUDED_
diff --git a/chromium/third_party/glslang/src/glslang/Include/ConstantUnion.h b/chromium/third_party/glslang/src/glslang/Include/ConstantUnion.h
new file mode 100644
index 00000000000..8ee2c84ccf2
--- /dev/null
+++ b/chromium/third_party/glslang/src/glslang/Include/ConstantUnion.h
@@ -0,0 +1,617 @@
+//
+//Copyright (C) 2002-2005 3Dlabs Inc. Ltd.
+//Copyright (C) 2013 LunarG, 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:
+//
+// Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 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.
+//
+// Neither the name of 3Dlabs Inc. Ltd. nor the names of its
+// contributors may be used to endorse or promote products derived
+// from this software without specific prior written permission.
+//
+//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+//"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 THE
+//COPYRIGHT HOLDERS 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.
+//
+
+#ifndef _CONSTANT_UNION_INCLUDED_
+#define _CONSTANT_UNION_INCLUDED_
+
+namespace glslang {
+
+class TConstUnion {
+public:
+ POOL_ALLOCATOR_NEW_DELETE(GetThreadPoolAllocator())
+
+ TConstUnion() : iConst(0), type(EbtInt) { }
+
+ void setIConst(int i)
+ {
+ iConst = i;
+ type = EbtInt;
+ }
+
+ void setUConst(unsigned int u)
+ {
+ uConst = u;
+ type = EbtUint;
+ }
+
+ void setI64Const(long long i64)
+ {
+ i64Const = i64;
+ type = EbtInt64;
+ }
+
+ void setU64Const(unsigned long long u64)
+ {
+ u64Const = u64;
+ type = EbtUint64;
+ }
+
+ void setDConst(double d)
+ {
+ dConst = d;
+ type = EbtDouble;
+ }
+
+ void setBConst(bool b)
+ {
+ bConst = b;
+ type = EbtBool;
+ }
+
+ int getIConst() const { return iConst; }
+ unsigned int getUConst() const { return uConst; }
+ long long getI64Const() const { return i64Const; }
+ unsigned long long getU64Const() const { return u64Const; }
+ double getDConst() const { return dConst; }
+ bool getBConst() const { return bConst; }
+
+ bool operator==(const int i) const
+ {
+ if (i == iConst)
+ return true;
+
+ return false;
+ }
+
+ bool operator==(const unsigned int u) const
+ {
+ if (u == uConst)
+ return true;
+
+ return false;
+ }
+
+ bool operator==(const long long i64) const
+ {
+ if (i64 == i64Const)
+ return true;
+
+ return false;
+ }
+
+ bool operator==(const unsigned long long u64) const
+ {
+ if (u64 == u64Const)
+ return true;
+
+ return false;
+ }
+
+ bool operator==(const double d) const
+ {
+ if (d == dConst)
+ return true;
+
+ return false;
+ }
+
+ bool operator==(const bool b) const
+ {
+ if (b == bConst)
+ return true;
+
+ return false;
+ }
+
+ bool operator==(const TConstUnion& constant) const
+ {
+ if (constant.type != type)
+ return false;
+
+ switch (type) {
+ case EbtInt:
+ if (constant.iConst == iConst)
+ return true;
+
+ break;
+ case EbtUint:
+ if (constant.uConst == uConst)
+ return true;
+
+ break;
+ case EbtInt64:
+ if (constant.i64Const == i64Const)
+ return true;
+
+ break;
+ case EbtUint64:
+ if (constant.u64Const == u64Const)
+ return true;
+
+ break;
+ case EbtDouble:
+ if (constant.dConst == dConst)
+ return true;
+
+ break;
+ case EbtBool:
+ if (constant.bConst == bConst)
+ return true;
+
+ break;
+ default:
+ assert(false && "Default missing");
+ }
+
+ return false;
+ }
+
+ bool operator!=(const int i) const
+ {
+ return !operator==(i);
+ }
+
+ bool operator!=(const unsigned int u) const
+ {
+ return !operator==(u);
+ }
+
+ bool operator!=(const long long i) const
+ {
+ return !operator==(i);
+ }
+
+ bool operator!=(const unsigned long long u) const
+ {
+ return !operator==(u);
+ }
+
+ bool operator!=(const float f) const
+ {
+ return !operator==(f);
+ }
+
+ bool operator!=(const bool b) const
+ {
+ return !operator==(b);
+ }
+
+ bool operator!=(const TConstUnion& constant) const
+ {
+ return !operator==(constant);
+ }
+
+ bool operator>(const TConstUnion& constant) const
+ {
+ assert(type == constant.type);
+ switch (type) {
+ case EbtInt:
+ if (iConst > constant.iConst)
+ return true;
+
+ return false;
+ case EbtUint:
+ if (uConst > constant.uConst)
+ return true;
+
+ return false;
+ case EbtInt64:
+ if (i64Const > constant.i64Const)
+ return true;
+
+ return false;
+ case EbtUint64:
+ if (u64Const > constant.u64Const)
+ return true;
+
+ return false;
+ case EbtDouble:
+ if (dConst > constant.dConst)
+ return true;
+
+ return false;
+ default:
+ assert(false && "Default missing");
+ return false;
+ }
+ }
+
+ bool operator<(const TConstUnion& constant) const
+ {
+ assert(type == constant.type);
+ switch (type) {
+ case EbtInt:
+ if (iConst < constant.iConst)
+ return true;
+
+ return false;
+ case EbtUint:
+ if (uConst < constant.uConst)
+ return true;
+
+ return false;
+ case EbtInt64:
+ if (i64Const < constant.i64Const)
+ return true;
+
+ return false;
+ case EbtUint64:
+ if (u64Const < constant.u64Const)
+ return true;
+
+ return false;
+ case EbtDouble:
+ if (dConst < constant.dConst)
+ return true;
+
+ return false;
+ default:
+ assert(false && "Default missing");
+ return false;
+ }
+ }
+
+ TConstUnion operator+(const TConstUnion& constant) const
+ {
+ TConstUnion returnValue;
+ assert(type == constant.type);
+ switch (type) {
+ case EbtInt: returnValue.setIConst(iConst + constant.iConst); break;
+ case EbtInt64: returnValue.setI64Const(i64Const + constant.i64Const); break;
+ case EbtUint: returnValue.setUConst(uConst + constant.uConst); break;
+ case EbtUint64: returnValue.setU64Const(u64Const + constant.u64Const); break;
+ case EbtDouble: returnValue.setDConst(dConst + constant.dConst); break;
+ default: assert(false && "Default missing");
+ }
+
+ return returnValue;
+ }
+
+ TConstUnion operator-(const TConstUnion& constant) const
+ {
+ TConstUnion returnValue;
+ assert(type == constant.type);
+ switch (type) {
+ case EbtInt: returnValue.setIConst(iConst - constant.iConst); break;
+ case EbtInt64: returnValue.setI64Const(i64Const - constant.i64Const); break;
+ case EbtUint: returnValue.setUConst(uConst - constant.uConst); break;
+ case EbtUint64: returnValue.setU64Const(u64Const - constant.u64Const); break;
+ case EbtDouble: returnValue.setDConst(dConst - constant.dConst); break;
+ default: assert(false && "Default missing");
+ }
+
+ return returnValue;
+ }
+
+ TConstUnion operator*(const TConstUnion& constant) const
+ {
+ TConstUnion returnValue;
+ assert(type == constant.type);
+ switch (type) {
+ case EbtInt: returnValue.setIConst(iConst * constant.iConst); break;
+ case EbtInt64: returnValue.setI64Const(i64Const * constant.i64Const); break;
+ case EbtUint: returnValue.setUConst(uConst * constant.uConst); break;
+ case EbtUint64: returnValue.setU64Const(u64Const * constant.u64Const); break;
+ case EbtDouble: returnValue.setDConst(dConst * constant.dConst); break;
+ default: assert(false && "Default missing");
+ }
+
+ return returnValue;
+ }
+
+ TConstUnion operator%(const TConstUnion& constant) const
+ {
+ TConstUnion returnValue;
+ assert(type == constant.type);
+ switch (type) {
+ case EbtInt: returnValue.setIConst(iConst % constant.iConst); break;
+ case EbtInt64: returnValue.setI64Const(i64Const % constant.i64Const); break;
+ case EbtUint: returnValue.setUConst(uConst % constant.uConst); break;
+ case EbtUint64: returnValue.setU64Const(u64Const % constant.u64Const); break;
+ default: assert(false && "Default missing");
+ }
+
+ return returnValue;
+ }
+
+ TConstUnion operator>>(const TConstUnion& constant) const
+ {
+ TConstUnion returnValue;
+ switch (type) {
+ case EbtInt:
+ switch (constant.type) {
+ case EbtInt: returnValue.setIConst(iConst >> constant.iConst); break;
+ case EbtUint: returnValue.setIConst(iConst >> constant.uConst); break;
+ case EbtInt64: returnValue.setIConst(iConst >> constant.i64Const); break;
+ case EbtUint64: returnValue.setIConst(iConst >> constant.u64Const); break;
+ default: assert(false && "Default missing");
+ }
+ break;
+ case EbtUint:
+ switch (constant.type) {
+ case EbtInt: returnValue.setUConst(uConst >> constant.iConst); break;
+ case EbtUint: returnValue.setUConst(uConst >> constant.uConst); break;
+ case EbtInt64: returnValue.setUConst(uConst >> constant.i64Const); break;
+ case EbtUint64: returnValue.setUConst(uConst >> constant.u64Const); break;
+ default: assert(false && "Default missing");
+ }
+ break;
+ case EbtInt64:
+ switch (constant.type) {
+ case EbtInt: returnValue.setI64Const(i64Const >> constant.iConst); break;
+ case EbtUint: returnValue.setI64Const(i64Const >> constant.uConst); break;
+ case EbtInt64: returnValue.setI64Const(i64Const >> constant.i64Const); break;
+ case EbtUint64: returnValue.setI64Const(i64Const >> constant.u64Const); break;
+ default: assert(false && "Default missing");
+ }
+ break;
+ case EbtUint64:
+ switch (constant.type) {
+ case EbtInt: returnValue.setU64Const(u64Const >> constant.iConst); break;
+ case EbtUint: returnValue.setU64Const(u64Const >> constant.uConst); break;
+ case EbtInt64: returnValue.setU64Const(u64Const >> constant.i64Const); break;
+ case EbtUint64: returnValue.setU64Const(u64Const >> constant.u64Const); break;
+ default: assert(false && "Default missing");
+ }
+ break;
+ default: assert(false && "Default missing");
+ }
+
+ return returnValue;
+ }
+
+ TConstUnion operator<<(const TConstUnion& constant) const
+ {
+ TConstUnion returnValue;
+ switch (type) {
+ case EbtInt:
+ switch (constant.type) {
+ case EbtInt: returnValue.setIConst(iConst << constant.iConst); break;
+ case EbtUint: returnValue.setIConst(iConst << constant.uConst); break;
+ case EbtInt64: returnValue.setIConst(iConst << constant.i64Const); break;
+ case EbtUint64: returnValue.setIConst(iConst << constant.u64Const); break;
+ default: assert(false && "Default missing");
+ }
+ break;
+ case EbtUint:
+ switch (constant.type) {
+ case EbtInt: returnValue.setUConst(uConst << constant.iConst); break;
+ case EbtUint: returnValue.setUConst(uConst << constant.uConst); break;
+ case EbtInt64: returnValue.setUConst(uConst << constant.i64Const); break;
+ case EbtUint64: returnValue.setUConst(uConst << constant.u64Const); break;
+ default: assert(false && "Default missing");
+ }
+ break;
+ case EbtInt64:
+ switch (constant.type) {
+ case EbtInt: returnValue.setI64Const(i64Const << constant.iConst); break;
+ case EbtUint: returnValue.setI64Const(i64Const << constant.uConst); break;
+ case EbtInt64: returnValue.setI64Const(i64Const << constant.i64Const); break;
+ case EbtUint64: returnValue.setI64Const(i64Const << constant.u64Const); break;
+ default: assert(false && "Default missing");
+ }
+ break;
+ case EbtUint64:
+ switch (constant.type) {
+ case EbtInt: returnValue.setU64Const(u64Const << constant.iConst); break;
+ case EbtUint: returnValue.setU64Const(u64Const << constant.uConst); break;
+ case EbtInt64: returnValue.setU64Const(u64Const << constant.i64Const); break;
+ case EbtUint64: returnValue.setU64Const(u64Const << constant.u64Const); break;
+ default: assert(false && "Default missing");
+ }
+ break;
+ default: assert(false && "Default missing");
+ }
+
+ return returnValue;
+ }
+
+ TConstUnion operator&(const TConstUnion& constant) const
+ {
+ TConstUnion returnValue;
+ assert(type == constant.type);
+ switch (type) {
+ case EbtInt: returnValue.setIConst(iConst & constant.iConst); break;
+ case EbtUint: returnValue.setUConst(uConst & constant.uConst); break;
+ case EbtInt64: returnValue.setI64Const(i64Const & constant.i64Const); break;
+ case EbtUint64: returnValue.setU64Const(u64Const & constant.u64Const); break;
+ default: assert(false && "Default missing");
+ }
+
+ return returnValue;
+ }
+
+ TConstUnion operator|(const TConstUnion& constant) const
+ {
+ TConstUnion returnValue;
+ assert(type == constant.type);
+ switch (type) {
+ case EbtInt: returnValue.setIConst(iConst | constant.iConst); break;
+ case EbtUint: returnValue.setUConst(uConst | constant.uConst); break;
+ case EbtInt64: returnValue.setI64Const(i64Const | constant.i64Const); break;
+ case EbtUint64: returnValue.setU64Const(u64Const | constant.u64Const); break;
+ default: assert(false && "Default missing");
+ }
+
+ return returnValue;
+ }
+
+ TConstUnion operator^(const TConstUnion& constant) const
+ {
+ TConstUnion returnValue;
+ assert(type == constant.type);
+ switch (type) {
+ case EbtInt: returnValue.setIConst(iConst ^ constant.iConst); break;
+ case EbtUint: returnValue.setUConst(uConst ^ constant.uConst); break;
+ case EbtInt64: returnValue.setI64Const(i64Const ^ constant.i64Const); break;
+ case EbtUint64: returnValue.setU64Const(u64Const ^ constant.u64Const); break;
+ default: assert(false && "Default missing");
+ }
+
+ return returnValue;
+ }
+
+ TConstUnion operator~() const
+ {
+ TConstUnion returnValue;
+ switch (type) {
+ case EbtInt: returnValue.setIConst(~iConst); break;
+ case EbtUint: returnValue.setUConst(~uConst); break;
+ case EbtInt64: returnValue.setI64Const(~i64Const); break;
+ case EbtUint64: returnValue.setU64Const(~u64Const); break;
+ default: assert(false && "Default missing");
+ }
+
+ return returnValue;
+ }
+
+ TConstUnion operator&&(const TConstUnion& constant) const
+ {
+ TConstUnion returnValue;
+ assert(type == constant.type);
+ switch (type) {
+ case EbtBool: returnValue.setBConst(bConst && constant.bConst); break;
+ default: assert(false && "Default missing");
+ }
+
+ return returnValue;
+ }
+
+ TConstUnion operator||(const TConstUnion& constant) const
+ {
+ TConstUnion returnValue;
+ assert(type == constant.type);
+ switch (type) {
+ case EbtBool: returnValue.setBConst(bConst || constant.bConst); break;
+ default: assert(false && "Default missing");
+ }
+
+ return returnValue;
+ }
+
+ TBasicType getType() const { return type; }
+
+private:
+ union {
+ int iConst; // used for ivec, scalar ints
+ unsigned int uConst; // used for uvec, scalar uints
+ long long i64Const; // used for i64vec, scalar int64s
+ unsigned long long u64Const; // used for u64vec, scalar uint64s
+ bool bConst; // used for bvec, scalar bools
+ double dConst; // used for vec, dvec, mat, dmat, scalar floats and doubles
+ };
+
+ TBasicType type;
+};
+
+// Encapsulate having a pointer to an array of TConstUnion,
+// which only needs to be allocated if it's size is going to be
+// bigger than 0.
+//
+// One convenience is being able to use [] to go inside the array, instead
+// of C++ assuming it as an array of pointers to vectors.
+//
+// General usage is that the size is known up front, and it is
+// created once with the proper size.
+//
+class TConstUnionArray {
+public:
+ POOL_ALLOCATOR_NEW_DELETE(GetThreadPoolAllocator())
+
+ TConstUnionArray() : unionArray(nullptr) { }
+ virtual ~TConstUnionArray() { }
+
+ explicit TConstUnionArray(int size)
+ {
+ if (size == 0)
+ unionArray = nullptr;
+ else
+ unionArray = new TConstUnionVector(size);
+ }
+ TConstUnionArray(const TConstUnionArray& a) : unionArray(a.unionArray) { }
+ TConstUnionArray(const TConstUnionArray& a, int start, int size)
+ {
+ unionArray = new TConstUnionVector(size);
+ for (int i = 0; i < size; ++i)
+ (*unionArray)[i] = a[start + i];
+ }
+
+ // Use this constructor for a smear operation
+ TConstUnionArray(int size, const TConstUnion& val)
+ {
+ unionArray = new TConstUnionVector(size, val);
+ }
+
+ int size() const { return unionArray ? (int)unionArray->size() : 0; }
+ TConstUnion& operator[](size_t index) { return (*unionArray)[index]; }
+ const TConstUnion& operator[](size_t index) const { return (*unionArray)[index]; }
+ bool operator==(const TConstUnionArray& rhs) const
+ {
+ // this includes the case that both are unallocated
+ if (unionArray == rhs.unionArray)
+ return true;
+
+ if (! unionArray || ! rhs.unionArray)
+ return false;
+
+ if (! unionArray || ! rhs.unionArray)
+ return false;
+
+ return *unionArray == *rhs.unionArray;
+ }
+ bool operator!=(const TConstUnionArray& rhs) const { return ! operator==(rhs); }
+
+ double dot(const TConstUnionArray& rhs)
+ {
+ assert(rhs.unionArray->size() == unionArray->size());
+ double sum = 0.0;
+
+ for (size_t comp = 0; comp < unionArray->size(); ++comp)
+ sum += (*this)[comp].getDConst() * rhs[comp].getDConst();
+
+ return sum;
+ }
+
+ bool empty() const { return unionArray == nullptr; }
+
+protected:
+ typedef TVector<TConstUnion> TConstUnionVector;
+ TConstUnionVector* unionArray;
+};
+
+} // end namespace glslang
+
+#endif // _CONSTANT_UNION_INCLUDED_
diff --git a/chromium/third_party/glslang/src/glslang/Include/InfoSink.h b/chromium/third_party/glslang/src/glslang/Include/InfoSink.h
new file mode 100644
index 00000000000..5862e5d8a5c
--- /dev/null
+++ b/chromium/third_party/glslang/src/glslang/Include/InfoSink.h
@@ -0,0 +1,145 @@
+//
+//Copyright (C) 2002-2005 3Dlabs Inc. Ltd.
+//All rights reserved.
+//
+//Redistribution and use in source and binary forms, with or without
+//modification, are permitted provided that the following conditions
+//are met:
+//
+// Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 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.
+//
+// Neither the name of 3Dlabs Inc. Ltd. nor the names of its
+// contributors may be used to endorse or promote products derived
+// from this software without specific prior written permission.
+//
+//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+//"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 THE
+//COPYRIGHT HOLDERS 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.
+//
+
+#ifndef _INFOSINK_INCLUDED_
+#define _INFOSINK_INCLUDED_
+
+#include "../Include/Common.h"
+#include <math.h>
+
+namespace glslang {
+
+//
+// TPrefixType is used to centralize how info log messages start.
+// See below.
+//
+enum TPrefixType {
+ EPrefixNone,
+ EPrefixWarning,
+ EPrefixError,
+ EPrefixInternalError,
+ EPrefixUnimplemented,
+ EPrefixNote
+};
+
+enum TOutputStream {
+ ENull = 0,
+ EDebugger = 0x01,
+ EStdOut = 0x02,
+ EString = 0x04,
+};
+//
+// Encapsulate info logs for all objects that have them.
+//
+// The methods are a general set of tools for getting a variety of
+// messages and types inserted into the log.
+//
+class TInfoSinkBase {
+public:
+ TInfoSinkBase() : outputStream(4) {}
+ void erase() { sink.erase(); }
+ TInfoSinkBase& operator<<(const TPersistString& t) { append(t); return *this; }
+ TInfoSinkBase& operator<<(char c) { append(1, c); return *this; }
+ TInfoSinkBase& operator<<(const char* s) { append(s); return *this; }
+ TInfoSinkBase& operator<<(int n) { append(String(n)); return *this; }
+ TInfoSinkBase& operator<<(unsigned int n) { append(String(n)); return *this; }
+ TInfoSinkBase& operator<<(long unsigned int n) { append(String(n)); return *this; }
+ TInfoSinkBase& operator<<(float n) { const int size = 40; char buf[size];
+ snprintf(buf, size, (fabs(n) > 1e-8 && fabs(n) < 1e8) || n == 0.0f ? "%f" : "%g", n);
+ append(buf);
+ return *this; }
+ TInfoSinkBase& operator+(const TPersistString& t) { append(t); return *this; }
+ TInfoSinkBase& operator+(const TString& t) { append(t); return *this; }
+ TInfoSinkBase& operator<<(const TString& t) { append(t); return *this; }
+ TInfoSinkBase& operator+(const char* s) { append(s); return *this; }
+ const char* c_str() const { return sink.c_str(); }
+ void prefix(TPrefixType message) {
+ switch(message) {
+ case EPrefixNone: break;
+ case EPrefixWarning: append("WARNING: "); break;
+ case EPrefixError: append("ERROR: "); break;
+ case EPrefixInternalError: append("INTERNAL ERROR: "); break;
+ case EPrefixUnimplemented: append("UNIMPLEMENTED: "); break;
+ case EPrefixNote: append("NOTE: "); break;
+ default: append("UNKNOWN ERROR: "); break;
+ }
+ }
+ void location(const TSourceLoc& loc) {
+ const int maxSize = 24;
+ char locText[maxSize];
+ snprintf(locText, maxSize, ":%d", loc.line);
+ append(loc.getStringNameOrNum(false).c_str());
+ append(locText);
+ append(": ");
+ }
+ void message(TPrefixType message, const char* s) {
+ prefix(message);
+ append(s);
+ append("\n");
+ }
+ void message(TPrefixType message, const char* s, const TSourceLoc& loc) {
+ prefix(message);
+ location(loc);
+ append(s);
+ append("\n");
+ }
+
+ void setOutputStream(int output = 4)
+ {
+ outputStream = output;
+ }
+
+protected:
+ void append(const char* s);
+
+ void append(int count, char c);
+ void append(const TPersistString& t);
+ void append(const TString& t);
+
+ void checkMem(size_t growth) { if (sink.capacity() < sink.size() + growth + 2)
+ sink.reserve(sink.capacity() + sink.capacity() / 2); }
+ void appendToStream(const char* s);
+ TPersistString sink;
+ int outputStream;
+};
+
+} // end namespace glslang
+
+class TInfoSink {
+public:
+ glslang::TInfoSinkBase info;
+ glslang::TInfoSinkBase debug;
+};
+
+#endif // _INFOSINK_INCLUDED_
diff --git a/chromium/third_party/glslang/src/glslang/Include/InitializeGlobals.h b/chromium/third_party/glslang/src/glslang/Include/InitializeGlobals.h
new file mode 100644
index 00000000000..6c9f54a03d4
--- /dev/null
+++ b/chromium/third_party/glslang/src/glslang/Include/InitializeGlobals.h
@@ -0,0 +1,47 @@
+//
+//Copyright (C) 2002-2005 3Dlabs Inc. Ltd.
+//All rights reserved.
+//
+//Redistribution and use in source and binary forms, with or without
+//modification, are permitted provided that the following conditions
+//are met:
+//
+// Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 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.
+//
+// Neither the name of 3Dlabs Inc. Ltd. nor the names of its
+// contributors may be used to endorse or promote products derived
+// from this software without specific prior written permission.
+//
+//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+//"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 THE
+//COPYRIGHT HOLDERS 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.
+//
+
+#ifndef __INITIALIZE_GLOBALS_INCLUDED_
+#define __INITIALIZE_GLOBALS_INCLUDED_
+
+namespace glslang {
+
+void InitializeMemoryPools();
+void FreeGlobalPools();
+bool InitializePoolIndex();
+void FreePoolIndex();
+
+} // end namespace glslang
+
+#endif // __INITIALIZE_GLOBALS_INCLUDED_
diff --git a/chromium/third_party/glslang/src/glslang/Include/PoolAlloc.h b/chromium/third_party/glslang/src/glslang/Include/PoolAlloc.h
new file mode 100644
index 00000000000..c3bebc6317e
--- /dev/null
+++ b/chromium/third_party/glslang/src/glslang/Include/PoolAlloc.h
@@ -0,0 +1,325 @@
+//
+//Copyright (C) 2002-2005 3Dlabs Inc. Ltd.
+//Copyright (C) 2012-2013 LunarG, 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:
+//
+// Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 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.
+//
+// Neither the name of 3Dlabs Inc. Ltd. nor the names of its
+// contributors may be used to endorse or promote products derived
+// from this software without specific prior written permission.
+//
+//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+//"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 THE
+//COPYRIGHT HOLDERS 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.
+//
+
+#ifndef _POOLALLOC_INCLUDED_
+#define _POOLALLOC_INCLUDED_
+
+#ifdef _DEBUG
+# define GUARD_BLOCKS // define to enable guard block sanity checking
+#endif
+
+//
+// This header defines an allocator that can be used to efficiently
+// allocate a large number of small requests for heap memory, with the
+// intention that they are not individually deallocated, but rather
+// collectively deallocated at one time.
+//
+// This simultaneously
+//
+// * Makes each individual allocation much more efficient; the
+// typical allocation is trivial.
+// * Completely avoids the cost of doing individual deallocation.
+// * Saves the trouble of tracking down and plugging a large class of leaks.
+//
+// Individual classes can use this allocator by supplying their own
+// new and delete methods.
+//
+// STL containers can use this allocator by using the pool_allocator
+// class as the allocator (second) template argument.
+//
+
+#include <stddef.h>
+#include <string.h>
+#include <vector>
+
+namespace glslang {
+
+// If we are using guard blocks, we must track each indivual
+// allocation. If we aren't using guard blocks, these
+// never get instantiated, so won't have any impact.
+//
+
+class TAllocation {
+public:
+ TAllocation(size_t size, unsigned char* mem, TAllocation* prev = 0) :
+ size(size), mem(mem), prevAlloc(prev) {
+ // Allocations are bracketed:
+ // [allocationHeader][initialGuardBlock][userData][finalGuardBlock]
+ // This would be cleaner with if (guardBlockSize)..., but that
+ // makes the compiler print warnings about 0 length memsets,
+ // even with the if() protecting them.
+# ifdef GUARD_BLOCKS
+ memset(preGuard(), guardBlockBeginVal, guardBlockSize);
+ memset(data(), userDataFill, size);
+ memset(postGuard(), guardBlockEndVal, guardBlockSize);
+# endif
+ }
+
+ void check() const {
+ checkGuardBlock(preGuard(), guardBlockBeginVal, "before");
+ checkGuardBlock(postGuard(), guardBlockEndVal, "after");
+ }
+
+ void checkAllocList() const;
+
+ // Return total size needed to accommodate user buffer of 'size',
+ // plus our tracking data.
+ inline static size_t allocationSize(size_t size) {
+ return size + 2 * guardBlockSize + headerSize();
+ }
+
+ // Offset from surrounding buffer to get to user data buffer.
+ inline static unsigned char* offsetAllocation(unsigned char* m) {
+ return m + guardBlockSize + headerSize();
+ }
+
+private:
+ void checkGuardBlock(unsigned char* blockMem, unsigned char val, const char* locText) const;
+
+ // Find offsets to pre and post guard blocks, and user data buffer
+ unsigned char* preGuard() const { return mem + headerSize(); }
+ unsigned char* data() const { return preGuard() + guardBlockSize; }
+ unsigned char* postGuard() const { return data() + size; }
+
+ size_t size; // size of the user data area
+ unsigned char* mem; // beginning of our allocation (pts to header)
+ TAllocation* prevAlloc; // prior allocation in the chain
+
+ const static unsigned char guardBlockBeginVal;
+ const static unsigned char guardBlockEndVal;
+ const static unsigned char userDataFill;
+
+ const static size_t guardBlockSize;
+# ifdef GUARD_BLOCKS
+ inline static size_t headerSize() { return sizeof(TAllocation); }
+# else
+ inline static size_t headerSize() { return 0; }
+# endif
+};
+
+//
+// There are several stacks. One is to track the pushing and popping
+// of the user, and not yet implemented. The others are simply a
+// repositories of free pages or used pages.
+//
+// Page stacks are linked together with a simple header at the beginning
+// of each allocation obtained from the underlying OS. Multi-page allocations
+// are returned to the OS. Individual page allocations are kept for future
+// re-use.
+//
+// The "page size" used is not, nor must it match, the underlying OS
+// page size. But, having it be about that size or equal to a set of
+// pages is likely most optimal.
+//
+class TPoolAllocator {
+public:
+ TPoolAllocator(int growthIncrement = 8*1024, int allocationAlignment = 16);
+
+ //
+ // Don't call the destructor just to free up the memory, call pop()
+ //
+ ~TPoolAllocator();
+
+ //
+ // Call push() to establish a new place to pop memory too. Does not
+ // have to be called to get things started.
+ //
+ void push();
+
+ //
+ // Call pop() to free all memory allocated since the last call to push(),
+ // or if no last call to push, frees all memory since first allocation.
+ //
+ void pop();
+
+ //
+ // Call popAll() to free all memory allocated.
+ //
+ void popAll();
+
+ //
+ // Call allocate() to actually acquire memory. Returns 0 if no memory
+ // available, otherwise a properly aligned pointer to 'numBytes' of memory.
+ //
+ void* allocate(size_t numBytes);
+
+ //
+ // There is no deallocate. The point of this class is that
+ // deallocation can be skipped by the user of it, as the model
+ // of use is to simultaneously deallocate everything at once
+ // by calling pop(), and to not have to solve memory leak problems.
+ //
+
+protected:
+ friend struct tHeader;
+
+ struct tHeader {
+ tHeader(tHeader* nextPage, size_t pageCount) :
+#ifdef GUARD_BLOCKS
+ lastAllocation(0),
+#endif
+ nextPage(nextPage), pageCount(pageCount) { }
+
+ ~tHeader() {
+#ifdef GUARD_BLOCKS
+ if (lastAllocation)
+ lastAllocation->checkAllocList();
+#endif
+ }
+
+#ifdef GUARD_BLOCKS
+ TAllocation* lastAllocation;
+#endif
+ tHeader* nextPage;
+ size_t pageCount;
+ };
+
+ struct tAllocState {
+ size_t offset;
+ tHeader* page;
+ };
+ typedef std::vector<tAllocState> tAllocStack;
+
+ // Track allocations if and only if we're using guard blocks
+#ifndef GUARD_BLOCKS
+ void* initializeAllocation(tHeader*, unsigned char* memory, size_t) {
+#else
+ void* initializeAllocation(tHeader* block, unsigned char* memory, size_t numBytes) {
+ new(memory) TAllocation(numBytes, memory, block->lastAllocation);
+ block->lastAllocation = reinterpret_cast<TAllocation*>(memory);
+#endif
+
+ // This is optimized entirely away if GUARD_BLOCKS is not defined.
+ return TAllocation::offsetAllocation(memory);
+ }
+
+ size_t pageSize; // granularity of allocation from the OS
+ size_t alignment; // all returned allocations will be aligned at
+ // this granularity, which will be a power of 2
+ size_t alignmentMask;
+ size_t headerSkip; // amount of memory to skip to make room for the
+ // header (basically, size of header, rounded
+ // up to make it aligned
+ size_t currentPageOffset; // next offset in top of inUseList to allocate from
+ tHeader* freeList; // list of popped memory
+ tHeader* inUseList; // list of all memory currently being used
+ tAllocStack stack; // stack of where to allocate from, to partition pool
+
+ int numCalls; // just an interesting statistic
+ size_t totalBytes; // just an interesting statistic
+private:
+ TPoolAllocator& operator=(const TPoolAllocator&); // don't allow assignment operator
+ TPoolAllocator(const TPoolAllocator&); // don't allow default copy constructor
+};
+
+
+//
+// There could potentially be many pools with pops happening at
+// different times. But a simple use is to have a global pop
+// with everyone using the same global allocator.
+//
+typedef TPoolAllocator* PoolAllocatorPointer;
+extern TPoolAllocator& GetThreadPoolAllocator();
+
+struct TThreadMemoryPools
+{
+ TPoolAllocator* threadPoolAllocator;
+};
+
+void SetThreadPoolAllocator(TPoolAllocator& poolAllocator);
+
+//
+// This STL compatible allocator is intended to be used as the allocator
+// parameter to templatized STL containers, like vector and map.
+//
+// It will use the pools for allocation, and not
+// do any deallocation, but will still do destruction.
+//
+template<class T>
+class pool_allocator {
+public:
+ typedef size_t size_type;
+ typedef ptrdiff_t difference_type;
+ typedef T *pointer;
+ typedef const T *const_pointer;
+ typedef T& reference;
+ typedef const T& const_reference;
+ typedef T value_type;
+ template<class Other>
+ struct rebind {
+ typedef pool_allocator<Other> other;
+ };
+ pointer address(reference x) const { return &x; }
+ const_pointer address(const_reference x) const { return &x; }
+
+ pool_allocator() : allocator(GetThreadPoolAllocator()) { }
+ pool_allocator(TPoolAllocator& a) : allocator(a) { }
+ pool_allocator(const pool_allocator<T>& p) : allocator(p.allocator) { }
+
+ template<class Other>
+ pool_allocator(const pool_allocator<Other>& p) : allocator(p.getAllocator()) { }
+
+ pointer allocate(size_type n) {
+ return reinterpret_cast<pointer>(getAllocator().allocate(n * sizeof(T))); }
+ pointer allocate(size_type n, const void*) {
+ return reinterpret_cast<pointer>(getAllocator().allocate(n * sizeof(T))); }
+
+ void deallocate(void*, size_type) { }
+ void deallocate(pointer, size_type) { }
+
+ pointer _Charalloc(size_t n) {
+ return reinterpret_cast<pointer>(getAllocator().allocate(n)); }
+
+ void construct(pointer p, const T& val) { new ((void *)p) T(val); }
+ void destroy(pointer p) { p->T::~T(); }
+
+ bool operator==(const pool_allocator& rhs) const { return &getAllocator() == &rhs.getAllocator(); }
+ bool operator!=(const pool_allocator& rhs) const { return &getAllocator() != &rhs.getAllocator(); }
+
+ 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; }
+
+protected:
+ pool_allocator& operator=(const pool_allocator&) { return *this; }
+ TPoolAllocator& allocator;
+};
+
+} // end namespace glslang
+
+#endif // _POOLALLOC_INCLUDED_
diff --git a/chromium/third_party/glslang/src/glslang/Include/ResourceLimits.h b/chromium/third_party/glslang/src/glslang/Include/ResourceLimits.h
new file mode 100644
index 00000000000..e8c743d6b7c
--- /dev/null
+++ b/chromium/third_party/glslang/src/glslang/Include/ResourceLimits.h
@@ -0,0 +1,140 @@
+//
+//Copyright (C) 2002-2005 3Dlabs Inc. Ltd.
+//Copyright (C) 2013 LunarG, 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:
+//
+// Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 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.
+//
+// Neither the name of 3Dlabs Inc. Ltd. nor the names of its
+// contributors may be used to endorse or promote products derived
+// from this software without specific prior written permission.
+//
+//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+//"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 THE
+//COPYRIGHT HOLDERS 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.
+//
+
+#ifndef _RESOURCE_LIMITS_INCLUDED_
+#define _RESOURCE_LIMITS_INCLUDED_
+
+struct TLimits {
+ bool nonInductiveForLoops;
+ bool whileLoops;
+ bool doWhileLoops;
+ bool generalUniformIndexing;
+ bool generalAttributeMatrixVectorIndexing;
+ bool generalVaryingIndexing;
+ bool generalSamplerIndexing;
+ bool generalVariableIndexing;
+ bool generalConstantMatrixVectorIndexing;
+};
+
+struct TBuiltInResource {
+ int maxLights;
+ int maxClipPlanes;
+ int maxTextureUnits;
+ int maxTextureCoords;
+ int maxVertexAttribs;
+ int maxVertexUniformComponents;
+ int maxVaryingFloats;
+ int maxVertexTextureImageUnits;
+ int maxCombinedTextureImageUnits;
+ int maxTextureImageUnits;
+ int maxFragmentUniformComponents;
+ int maxDrawBuffers;
+ int maxVertexUniformVectors;
+ int maxVaryingVectors;
+ int maxFragmentUniformVectors;
+ int maxVertexOutputVectors;
+ int maxFragmentInputVectors;
+ int minProgramTexelOffset;
+ int maxProgramTexelOffset;
+ int maxClipDistances;
+ int maxComputeWorkGroupCountX;
+ int maxComputeWorkGroupCountY;
+ int maxComputeWorkGroupCountZ;
+ int maxComputeWorkGroupSizeX;
+ int maxComputeWorkGroupSizeY;
+ int maxComputeWorkGroupSizeZ;
+ int maxComputeUniformComponents;
+ int maxComputeTextureImageUnits;
+ int maxComputeImageUniforms;
+ int maxComputeAtomicCounters;
+ int maxComputeAtomicCounterBuffers;
+ int maxVaryingComponents;
+ int maxVertexOutputComponents;
+ int maxGeometryInputComponents;
+ int maxGeometryOutputComponents;
+ int maxFragmentInputComponents;
+ int maxImageUnits;
+ int maxCombinedImageUnitsAndFragmentOutputs;
+ int maxCombinedShaderOutputResources;
+ int maxImageSamples;
+ int maxVertexImageUniforms;
+ int maxTessControlImageUniforms;
+ int maxTessEvaluationImageUniforms;
+ int maxGeometryImageUniforms;
+ int maxFragmentImageUniforms;
+ int maxCombinedImageUniforms;
+ int maxGeometryTextureImageUnits;
+ int maxGeometryOutputVertices;
+ int maxGeometryTotalOutputComponents;
+ int maxGeometryUniformComponents;
+ int maxGeometryVaryingComponents;
+ int maxTessControlInputComponents;
+ int maxTessControlOutputComponents;
+ int maxTessControlTextureImageUnits;
+ int maxTessControlUniformComponents;
+ int maxTessControlTotalOutputComponents;
+ int maxTessEvaluationInputComponents;
+ int maxTessEvaluationOutputComponents;
+ int maxTessEvaluationTextureImageUnits;
+ int maxTessEvaluationUniformComponents;
+ int maxTessPatchComponents;
+ int maxPatchVertices;
+ int maxTessGenLevel;
+ int maxViewports;
+ int maxVertexAtomicCounters;
+ int maxTessControlAtomicCounters;
+ int maxTessEvaluationAtomicCounters;
+ int maxGeometryAtomicCounters;
+ int maxFragmentAtomicCounters;
+ int maxCombinedAtomicCounters;
+ int maxAtomicCounterBindings;
+ int maxVertexAtomicCounterBuffers;
+ int maxTessControlAtomicCounterBuffers;
+ int maxTessEvaluationAtomicCounterBuffers;
+ int maxGeometryAtomicCounterBuffers;
+ int maxFragmentAtomicCounterBuffers;
+ int maxCombinedAtomicCounterBuffers;
+ int maxAtomicCounterBufferSize;
+ int maxTransformFeedbackBuffers;
+ int maxTransformFeedbackInterleavedComponents;
+ int maxCullDistances;
+ int maxCombinedClipAndCullDistances;
+ int maxSamples;
+
+ TLimits limits;
+};
+
+#endif // _RESOURCE_LIMITS_INCLUDED_
diff --git a/chromium/third_party/glslang/src/glslang/Include/ShHandle.h b/chromium/third_party/glslang/src/glslang/Include/ShHandle.h
new file mode 100644
index 00000000000..fee641396cd
--- /dev/null
+++ b/chromium/third_party/glslang/src/glslang/Include/ShHandle.h
@@ -0,0 +1,174 @@
+//
+//Copyright (C) 2002-2005 3Dlabs Inc. Ltd.
+//All rights reserved.
+//
+//Redistribution and use in source and binary forms, with or without
+//modification, are permitted provided that the following conditions
+//are met:
+//
+// Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 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.
+//
+// Neither the name of 3Dlabs Inc. Ltd. nor the names of its
+// contributors may be used to endorse or promote products derived
+// from this software without specific prior written permission.
+//
+//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+//"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 THE
+//COPYRIGHT HOLDERS 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.
+//
+
+#ifndef _SHHANDLE_INCLUDED_
+#define _SHHANDLE_INCLUDED_
+
+//
+// Machine independent part of the compiler private objects
+// sent as ShHandle to the driver.
+//
+// This should not be included by driver code.
+//
+
+
+#define SH_EXPORTING
+#include "../Public/ShaderLang.h"
+#include "../MachineIndependent/Versions.h"
+#include "InfoSink.h"
+
+class TCompiler;
+class TLinker;
+class TUniformMap;
+
+//
+// The base class used to back handles returned to the driver.
+//
+class TShHandleBase {
+public:
+ TShHandleBase() { }
+ virtual ~TShHandleBase() { }
+ virtual TCompiler* getAsCompiler() { return 0; }
+ virtual TLinker* getAsLinker() { return 0; }
+ virtual TUniformMap* getAsUniformMap() { return 0; }
+};
+
+//
+// The base class for the machine dependent linker to derive from
+// for managing where uniforms live.
+//
+class TUniformMap : public TShHandleBase {
+public:
+ TUniformMap() { }
+ virtual ~TUniformMap() { }
+ virtual TUniformMap* getAsUniformMap() { return this; }
+ virtual int getLocation(const char* name) = 0;
+ virtual TInfoSink& getInfoSink() { return infoSink; }
+ TInfoSink infoSink;
+};
+
+class TIntermNode;
+
+//
+// The base class for the machine dependent compiler to derive from
+// for managing object code from the compile.
+//
+class TCompiler : public TShHandleBase {
+public:
+ TCompiler(EShLanguage l, TInfoSink& sink) : infoSink(sink) , language(l), haveValidObjectCode(false) { }
+ virtual ~TCompiler() { }
+ EShLanguage getLanguage() { return language; }
+ virtual TInfoSink& getInfoSink() { return infoSink; }
+
+ virtual bool compile(TIntermNode* root, int version = 0, EProfile profile = ENoProfile) = 0;
+
+ virtual TCompiler* getAsCompiler() { return this; }
+ virtual bool linkable() { return haveValidObjectCode; }
+
+ TInfoSink& infoSink;
+protected:
+ TCompiler& operator=(TCompiler&);
+
+ EShLanguage language;
+ bool haveValidObjectCode;
+};
+
+//
+// Link operations are based on a list of compile results...
+//
+typedef glslang::TVector<TCompiler*> TCompilerList;
+typedef glslang::TVector<TShHandleBase*> THandleList;
+
+//
+// The base class for the machine dependent linker to derive from
+// to manage the resulting executable.
+//
+
+class TLinker : public TShHandleBase {
+public:
+ TLinker(EShExecutable e, TInfoSink& iSink) :
+ infoSink(iSink),
+ executable(e),
+ haveReturnableObjectCode(false),
+ appAttributeBindings(0),
+ fixedAttributeBindings(0),
+ excludedAttributes(0),
+ excludedCount(0),
+ uniformBindings(0) { }
+ virtual TLinker* getAsLinker() { return this; }
+ virtual ~TLinker() { }
+ virtual bool link(TCompilerList&, TUniformMap*) = 0;
+ virtual bool link(THandleList&) { return false; }
+ virtual void setAppAttributeBindings(const ShBindingTable* t) { appAttributeBindings = t; }
+ virtual void setFixedAttributeBindings(const ShBindingTable* t) { fixedAttributeBindings = t; }
+ virtual void getAttributeBindings(ShBindingTable const **t) const = 0;
+ virtual void setExcludedAttributes(const int* attributes, int count) { excludedAttributes = attributes; excludedCount = count; }
+ virtual ShBindingTable* getUniformBindings() const { return uniformBindings; }
+ virtual const void* getObjectCode() const { return 0; } // a real compiler would be returning object code here
+ virtual TInfoSink& getInfoSink() { return infoSink; }
+ TInfoSink& infoSink;
+protected:
+ TLinker& operator=(TLinker&);
+ EShExecutable executable;
+ bool haveReturnableObjectCode; // true when objectCode is acceptable to send to driver
+
+ const ShBindingTable* appAttributeBindings;
+ const ShBindingTable* fixedAttributeBindings;
+ const int* excludedAttributes;
+ int excludedCount;
+ ShBindingTable* uniformBindings; // created by the linker
+};
+
+//
+// This is the interface between the machine independent code
+// and the machine dependent code.
+//
+// The machine dependent code should derive from the classes
+// above. Then Construct*() and Delete*() will create and
+// destroy the machine dependent objects, which contain the
+// above machine independent information.
+//
+TCompiler* ConstructCompiler(EShLanguage, int);
+
+TShHandleBase* ConstructLinker(EShExecutable, int);
+TShHandleBase* ConstructBindings();
+void DeleteLinker(TShHandleBase*);
+void DeleteBindingList(TShHandleBase* bindingList);
+
+TUniformMap* ConstructUniformMap();
+void DeleteCompiler(TCompiler*);
+
+void DeleteUniformMap(TUniformMap*);
+
+#endif // _SHHANDLE_INCLUDED_
diff --git a/chromium/third_party/glslang/src/glslang/Include/Types.h b/chromium/third_party/glslang/src/glslang/Include/Types.h
new file mode 100644
index 00000000000..e37c77cdb78
--- /dev/null
+++ b/chromium/third_party/glslang/src/glslang/Include/Types.h
@@ -0,0 +1,1714 @@
+//
+//Copyright (C) 2002-2005 3Dlabs Inc. Ltd.
+//Copyright (C) 2012-2016 LunarG, Inc.
+//Copyright (C) 2015-2016 Google, 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:
+//
+// Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 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.
+//
+// Neither the name of 3Dlabs Inc. Ltd. nor the names of its
+// contributors may be used to endorse or promote products derived
+// from this software without specific prior written permission.
+//
+//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+//"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 THE
+//COPYRIGHT HOLDERS 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.
+//
+
+#ifndef _TYPES_INCLUDED
+#define _TYPES_INCLUDED
+
+#include "../Include/Common.h"
+#include "../Include/BaseTypes.h"
+#include "../Public/ShaderLang.h"
+#include "arrays.h"
+
+namespace glslang {
+
+const int GlslangMaxTypeLength = 200; // TODO: need to print block/struct one member per line, so this can stay bounded
+
+const char* const AnonymousPrefix = "anon@"; // for something like a block whose members can be directly accessed
+inline bool IsAnonymous(const TString& name)
+{
+ return name.compare(0, 5, AnonymousPrefix) == 0;
+}
+
+//
+// Details within a sampler type
+//
+enum TSamplerDim {
+ EsdNone,
+ Esd1D,
+ Esd2D,
+ Esd3D,
+ EsdCube,
+ EsdRect,
+ EsdBuffer,
+ EsdSubpass, // goes only with non-sampled image (image is true)
+ EsdNumDims
+};
+
+struct TSampler { // misnomer now; includes images, textures without sampler, and textures with sampler
+ TBasicType type : 8; // type returned by sampler
+ TSamplerDim dim : 8;
+ bool arrayed : 1;
+ bool shadow : 1;
+ bool ms : 1;
+ bool image : 1; // image, combined should be false
+ bool combined : 1; // true means texture is combined with a sampler, false means texture with no sampler
+ bool sampler : 1; // true means a pure sampler, other fields should be clear()
+ bool external : 1; // GL_OES_EGL_image_external
+
+ bool isImage() const { return image && dim != EsdSubpass; }
+ bool isSubpass() const { return dim == EsdSubpass; }
+ bool isCombined() const { return combined; }
+ bool isPureSampler() const { return sampler; }
+ bool isTexture() const { return !sampler && !image; }
+
+ void clear()
+ {
+ type = EbtVoid;
+ dim = EsdNone;
+ arrayed = false;
+ shadow = false;
+ ms = false;
+ image = false;
+ combined = false;
+ sampler = false;
+ external = false;
+ }
+
+ // make a combined sampler and texture
+ void set(TBasicType t, TSamplerDim d, bool a = false, bool s = false, bool m = false)
+ {
+ clear();
+ type = t;
+ dim = d;
+ arrayed = a;
+ shadow = s;
+ ms = m;
+ combined = true;
+ }
+
+ // make an image
+ void setImage(TBasicType t, TSamplerDim d, bool a = false, bool s = false, bool m = false)
+ {
+ clear();
+ type = t;
+ dim = d;
+ arrayed = a;
+ shadow = s;
+ ms = m;
+ image = true;
+ }
+
+ // make a texture with no sampler
+ void setTexture(TBasicType t, TSamplerDim d, bool a = false, bool s = false, bool m = false)
+ {
+ clear();
+ type = t;
+ dim = d;
+ arrayed = a;
+ shadow = s;
+ ms = m;
+ }
+
+ // make a subpass input attachment
+ void setSubpass(TBasicType t, bool m = false)
+ {
+ clear();
+ type = t;
+ image = true;
+ dim = EsdSubpass;
+ ms = m;
+ }
+
+ // make a pure sampler, no texture, no image, nothing combined, the 'sampler' keyword
+ void setPureSampler(bool s)
+ {
+ clear();
+ sampler = true;
+ shadow = s;
+ }
+
+ bool operator==(const TSampler& right) const
+ {
+ return type == right.type &&
+ dim == right.dim &&
+ arrayed == right.arrayed &&
+ shadow == right.shadow &&
+ ms == right.ms &&
+ image == right.image &&
+ combined == right.combined &&
+ sampler == right.sampler &&
+ external == right.external;
+ }
+
+ bool operator!=(const TSampler& right) const
+ {
+ return ! operator==(right);
+ }
+
+ TString getString() const
+ {
+ TString s;
+
+ if (sampler) {
+ s.append("sampler");
+ return s;
+ }
+
+ switch (type) {
+ case EbtFloat: break;
+ case EbtInt: s.append("i"); break;
+ case EbtUint: s.append("u"); break;
+ case EbtInt64: s.append("i64"); break;
+ case EbtUint64: s.append("u64"); break;
+ default: break; // some compilers want this
+ }
+ if (image) {
+ if (dim == EsdSubpass)
+ s.append("subpass");
+ else
+ s.append("image");
+ } else if (combined) {
+ s.append("sampler");
+ } else {
+ s.append("texture");
+ }
+ if (external) {
+ s.append("ExternalOES");
+ return s;
+ }
+ switch (dim) {
+ case Esd1D: s.append("1D"); break;
+ case Esd2D: s.append("2D"); break;
+ case Esd3D: s.append("3D"); break;
+ case EsdCube: s.append("Cube"); break;
+ case EsdRect: s.append("2DRect"); break;
+ case EsdBuffer: s.append("Buffer"); break;
+ case EsdSubpass: s.append("Input"); break;
+ default: break; // some compilers want this
+ }
+ if (ms)
+ s.append("MS");
+ if (arrayed)
+ s.append("Array");
+ if (shadow)
+ s.append("Shadow");
+
+ return s;
+ }
+};
+
+//
+// Need to have association of line numbers to types in a list for building structs.
+//
+class TType;
+struct TTypeLoc {
+ TType* type;
+ TSourceLoc loc;
+};
+typedef TVector<TTypeLoc> TTypeList;
+
+typedef TVector<TString*> TIdentifierList;
+
+//
+// Following are a series of helper enums for managing layouts and qualifiers,
+// used for TPublicType, TType, others.
+//
+
+enum TLayoutPacking {
+ ElpNone,
+ ElpShared, // default, but different than saying nothing
+ ElpStd140,
+ ElpStd430,
+ ElpPacked,
+ ElpCount // If expanding, see bitfield width below
+};
+
+enum TLayoutMatrix {
+ ElmNone,
+ ElmRowMajor,
+ ElmColumnMajor, // default, but different than saying nothing
+ ElmCount // If expanding, see bitfield width below
+};
+
+// Union of geometry shader and tessellation shader geometry types.
+// They don't go into TType, but rather have current state per shader or
+// active parser type (TPublicType).
+enum TLayoutGeometry {
+ ElgNone,
+ ElgPoints,
+ ElgLines,
+ ElgLinesAdjacency,
+ ElgLineStrip,
+ ElgTriangles,
+ ElgTrianglesAdjacency,
+ ElgTriangleStrip,
+ ElgQuads,
+ ElgIsolines,
+};
+
+enum TVertexSpacing {
+ EvsNone,
+ EvsEqual,
+ EvsFractionalEven,
+ EvsFractionalOdd
+};
+
+enum TVertexOrder {
+ EvoNone,
+ EvoCw,
+ EvoCcw
+};
+
+// Note: order matters, as type of format is done by comparison.
+enum TLayoutFormat {
+ ElfNone,
+
+ // Float image
+ ElfRgba32f,
+ ElfRgba16f,
+ ElfR32f,
+ ElfRgba8,
+ ElfRgba8Snorm,
+
+ ElfEsFloatGuard, // to help with comparisons
+
+ ElfRg32f,
+ ElfRg16f,
+ ElfR11fG11fB10f,
+ ElfR16f,
+ ElfRgba16,
+ ElfRgb10A2,
+ ElfRg16,
+ ElfRg8,
+ ElfR16,
+ ElfR8,
+ ElfRgba16Snorm,
+ ElfRg16Snorm,
+ ElfRg8Snorm,
+ ElfR16Snorm,
+ ElfR8Snorm,
+
+ ElfFloatGuard, // to help with comparisons
+
+ // Int image
+ ElfRgba32i,
+ ElfRgba16i,
+ ElfRgba8i,
+ ElfR32i,
+
+ ElfEsIntGuard, // to help with comparisons
+
+ ElfRg32i,
+ ElfRg16i,
+ ElfRg8i,
+ ElfR16i,
+ ElfR8i,
+
+ ElfIntGuard, // to help with comparisons
+
+ // Uint image
+ ElfRgba32ui,
+ ElfRgba16ui,
+ ElfRgba8ui,
+ ElfR32ui,
+
+ ElfEsUintGuard, // to help with comparisons
+
+ ElfRg32ui,
+ ElfRg16ui,
+ ElfRgb10a2ui,
+ ElfRg8ui,
+ ElfR16ui,
+ ElfR8ui,
+
+ ElfCount
+};
+
+enum TLayoutDepth {
+ EldNone,
+ EldAny,
+ EldGreater,
+ EldLess,
+ EldUnchanged,
+
+ EldCount
+};
+
+enum TBlendEquationShift {
+ // No 'EBlendNone':
+ // These are used as bit-shift amounts. A mask of such shifts will have type 'int',
+ // and in that space, 0 means no bits set, or none. In this enum, 0 means (1 << 0), a bit is set.
+ EBlendMultiply,
+ EBlendScreen,
+ EBlendOverlay,
+ EBlendDarken,
+ EBlendLighten,
+ EBlendColordodge,
+ EBlendColorburn,
+ EBlendHardlight,
+ EBlendSoftlight,
+ EBlendDifference,
+ EBlendExclusion,
+ EBlendHslHue,
+ EBlendHslSaturation,
+ EBlendHslColor,
+ EBlendHslLuminosity,
+ EBlendAllEquations,
+
+ EBlendCount
+};
+
+class TQualifier {
+public:
+ static const int layoutNotSet = -1;
+
+ void clear()
+ {
+ precision = EpqNone;
+ invariant = false;
+ noContraction = false;
+ makeTemporary();
+ }
+
+ // drop qualifiers that don't belong in a temporary variable
+ void makeTemporary()
+ {
+ storage = EvqTemporary;
+ builtIn = EbvNone;
+ centroid = false;
+ smooth = false;
+ flat = false;
+ nopersp = false;
+ patch = false;
+ sample = false;
+ coherent = false;
+ volatil = false;
+ restrict = false;
+ readonly = false;
+ writeonly = false;
+ specConstant = false;
+ clearLayout();
+ }
+
+ // Drop just the storage qualification, which perhaps should
+ // never be done, as it is fundamentally inconsistent, but need to
+ // explore what downstream consumers need.
+ // E.g., in a deference, it is an inconsistency between:
+ // A) partially dereferenced resource is still in the storage class it started in
+ // B) partially dereferenced resource is a new temporary object
+ // If A, then nothing should change, if B, then everything should change, but this is half way.
+ void makePartialTemporary()
+ {
+ storage = EvqTemporary;
+ specConstant = false;
+ }
+
+ TStorageQualifier storage : 6;
+ TBuiltInVariable builtIn : 8;
+ TPrecisionQualifier precision : 3;
+ bool invariant : 1; // require canonical treatment for cross-shader invariance
+ bool noContraction: 1; // prevent contraction and reassociation, e.g., for 'precise' keyword, and expressions it affects
+ bool centroid : 1;
+ bool smooth : 1;
+ bool flat : 1;
+ bool nopersp : 1;
+ bool patch : 1;
+ bool sample : 1;
+ bool coherent : 1;
+ bool volatil : 1;
+ bool restrict : 1;
+ bool readonly : 1;
+ bool writeonly : 1;
+ bool specConstant : 1; // having a constant_id is not sufficient: expressions have no id, but are still specConstant
+
+ bool isMemory() const
+ {
+ return coherent || volatil || restrict || readonly || writeonly;
+ }
+ bool isInterpolation() const
+ {
+ return flat || smooth || nopersp;
+ }
+ bool isAuxiliary() const
+ {
+ return centroid || patch || sample;
+ }
+
+ bool isPipeInput() const
+ {
+ switch (storage) {
+ case EvqVaryingIn:
+ case EvqFragCoord:
+ case EvqPointCoord:
+ case EvqFace:
+ case EvqVertexId:
+ case EvqInstanceId:
+ return true;
+ default:
+ return false;
+ }
+ }
+
+ bool isPipeOutput() const
+ {
+ switch (storage) {
+ case EvqPosition:
+ case EvqPointSize:
+ case EvqClipVertex:
+ case EvqVaryingOut:
+ case EvqFragColor:
+ case EvqFragDepth:
+ return true;
+ default:
+ return false;
+ }
+ }
+
+ bool isParamInput() const
+ {
+ switch (storage) {
+ case EvqIn:
+ case EvqInOut:
+ case EvqConstReadOnly:
+ return true;
+ default:
+ return false;
+ }
+ }
+
+ bool isParamOutput() const
+ {
+ switch (storage) {
+ case EvqOut:
+ case EvqInOut:
+ return true;
+ default:
+ return false;
+ }
+ }
+
+ bool isUniformOrBuffer() const
+ {
+ switch (storage) {
+ case EvqUniform:
+ case EvqBuffer:
+ return true;
+ default:
+ return false;
+ }
+ }
+
+ bool isIo() const
+ {
+ switch (storage) {
+ case EvqUniform:
+ case EvqBuffer:
+ case EvqVaryingIn:
+ case EvqFragCoord:
+ case EvqPointCoord:
+ case EvqFace:
+ case EvqVertexId:
+ case EvqInstanceId:
+ case EvqPosition:
+ case EvqPointSize:
+ case EvqClipVertex:
+ case EvqVaryingOut:
+ case EvqFragColor:
+ case EvqFragDepth:
+ return true;
+ default:
+ return false;
+ }
+ }
+
+ // True if this type of IO is supposed to be arrayed with extra level for per-vertex data
+ bool isArrayedIo(EShLanguage language) const
+ {
+ switch (language) {
+ case EShLangGeometry:
+ return isPipeInput();
+ case EShLangTessControl:
+ return ! patch && (isPipeInput() || isPipeOutput());
+ case EShLangTessEvaluation:
+ return ! patch && isPipeInput();
+ default:
+ return false;
+ }
+ }
+
+ // Implementing an embedded layout-qualifier class here, since C++ can't have a real class bitfield
+ void clearLayout()
+ {
+ layoutMatrix = ElmNone;
+ layoutPacking = ElpNone;
+ layoutOffset = layoutNotSet;
+ layoutAlign = layoutNotSet;
+
+ layoutLocation = layoutLocationEnd;
+ layoutComponent = layoutComponentEnd;
+ layoutSet = layoutSetEnd;
+ layoutBinding = layoutBindingEnd;
+ layoutIndex = layoutIndexEnd;
+
+ layoutStream = layoutStreamEnd;
+
+ layoutXfbBuffer = layoutXfbBufferEnd;
+ layoutXfbStride = layoutXfbStrideEnd;
+ layoutXfbOffset = layoutXfbOffsetEnd;
+ layoutAttachment = layoutAttachmentEnd;
+ layoutSpecConstantId = layoutSpecConstantIdEnd;
+
+ layoutFormat = ElfNone;
+
+ layoutPushConstant = false;
+ }
+ bool hasLayout() const
+ {
+ return hasUniformLayout() ||
+ hasAnyLocation() ||
+ hasBinding() ||
+ hasStream() ||
+ hasXfb() ||
+ hasFormat() ||
+ layoutPushConstant;
+ }
+ TLayoutMatrix layoutMatrix : 3;
+ TLayoutPacking layoutPacking : 4;
+ int layoutOffset;
+ int layoutAlign;
+
+ unsigned int layoutLocation :12;
+ static const unsigned int layoutLocationEnd = 0xFFF;
+
+ unsigned int layoutComponent : 3;
+ static const unsigned int layoutComponentEnd = 4;
+
+ unsigned int layoutSet : 7;
+ static const unsigned int layoutSetEnd = 0x3F;
+
+ unsigned int layoutBinding : 8;
+ static const unsigned int layoutBindingEnd = 0xFF;
+
+ unsigned int layoutIndex : 8;
+ static const unsigned int layoutIndexEnd = 0xFF;
+
+ unsigned int layoutStream : 8;
+ static const unsigned int layoutStreamEnd = 0xFF;
+
+ unsigned int layoutXfbBuffer : 4;
+ static const unsigned int layoutXfbBufferEnd = 0xF;
+
+ unsigned int layoutXfbStride : 10;
+ static const unsigned int layoutXfbStrideEnd = 0x3FF;
+
+ unsigned int layoutXfbOffset : 10;
+ static const unsigned int layoutXfbOffsetEnd = 0x3FF;
+
+ unsigned int layoutAttachment : 8; // for input_attachment_index
+ static const unsigned int layoutAttachmentEnd = 0XFF;
+
+ unsigned int layoutSpecConstantId : 11;
+ static const unsigned int layoutSpecConstantIdEnd = 0x7FF;
+
+ TLayoutFormat layoutFormat : 8;
+
+ bool layoutPushConstant;
+
+ bool hasUniformLayout() const
+ {
+ return hasMatrix() ||
+ hasPacking() ||
+ hasOffset() ||
+ hasBinding() ||
+ hasAlign();
+ }
+ bool hasMatrix() const
+ {
+ return layoutMatrix != ElmNone;
+ }
+ bool hasPacking() const
+ {
+ return layoutPacking != ElpNone;
+ }
+ bool hasOffset() const
+ {
+ return layoutOffset != layoutNotSet;
+ }
+ bool hasAlign() const
+ {
+ return layoutAlign != layoutNotSet;
+ }
+ bool hasAnyLocation() const
+ {
+ return hasLocation() ||
+ hasComponent() ||
+ hasIndex();
+ }
+ bool hasLocation() const
+ {
+ return layoutLocation != layoutLocationEnd;
+ }
+ bool hasComponent() const
+ {
+ return layoutComponent != layoutComponentEnd;
+ }
+ bool hasIndex() const
+ {
+ return layoutIndex != layoutIndexEnd;
+ }
+ bool hasSet() const
+ {
+ return layoutSet != layoutSetEnd;
+ }
+ bool hasBinding() const
+ {
+ return layoutBinding != layoutBindingEnd;
+ }
+ bool hasStream() const
+ {
+ return layoutStream != layoutStreamEnd;
+ }
+ bool hasFormat() const
+ {
+ return layoutFormat != ElfNone;
+ }
+ bool hasXfb() const
+ {
+ return hasXfbBuffer() ||
+ hasXfbStride() ||
+ hasXfbOffset();
+ }
+ bool hasXfbBuffer() const
+ {
+ return layoutXfbBuffer != layoutXfbBufferEnd;
+ }
+ bool hasXfbStride() const
+ {
+ return layoutXfbStride != layoutXfbStrideEnd;
+ }
+ bool hasXfbOffset() const
+ {
+ return layoutXfbOffset != layoutXfbOffsetEnd;
+ }
+ bool hasAttachment() const
+ {
+ return layoutAttachment != layoutAttachmentEnd;
+ }
+ bool hasSpecConstantId() const
+ {
+ // Not the same thing as being a specialization constant, this
+ // is just whether or not it was declared with an ID.
+ return layoutSpecConstantId != layoutSpecConstantIdEnd;
+ }
+ bool isSpecConstant() const
+ {
+ // True if type is a specialization constant, whether or not it
+ // had a specialization-constant ID, and false if it is not a
+ // true front-end constant.
+ return specConstant;
+ }
+ bool isFrontEndConstant() const
+ {
+ // True if the front-end knows the final constant value.
+ // This allows front-end constant folding.
+ return storage == EvqConst && ! specConstant;
+ }
+ bool isConstant() const
+ {
+ // True if is either kind of constant; specialization or regular.
+ return isFrontEndConstant() || isSpecConstant();
+ }
+ void makeSpecConstant()
+ {
+ storage = EvqConst;
+ specConstant = true;
+ }
+ static const char* getLayoutPackingString(TLayoutPacking packing)
+ {
+ switch (packing) {
+ case ElpPacked: return "packed";
+ case ElpShared: return "shared";
+ case ElpStd140: return "std140";
+ case ElpStd430: return "std430";
+ default: return "none";
+ }
+ }
+ static const char* getLayoutMatrixString(TLayoutMatrix m)
+ {
+ switch (m) {
+ case ElmColumnMajor: return "column_major";
+ case ElmRowMajor: return "row_major";
+ default: return "none";
+ }
+ }
+ static const char* getLayoutFormatString(TLayoutFormat f)
+ {
+ switch (f) {
+ case ElfRgba32f: return "rgba32f";
+ case ElfRgba16f: return "rgba16f";
+ case ElfRg32f: return "rg32f";
+ case ElfRg16f: return "rg16f";
+ case ElfR11fG11fB10f: return "r11f_g11f_b10f";
+ case ElfR32f: return "r32f";
+ case ElfR16f: return "r16f";
+ case ElfRgba16: return "rgba16";
+ case ElfRgb10A2: return "rgb10_a2";
+ case ElfRgba8: return "rgba8";
+ case ElfRg16: return "rg16";
+ case ElfRg8: return "rg8";
+ case ElfR16: return "r16";
+ case ElfR8: return "r8";
+ case ElfRgba16Snorm: return "rgba16_snorm";
+ case ElfRgba8Snorm: return "rgba8_snorm";
+ case ElfRg16Snorm: return "rg16_snorm";
+ case ElfRg8Snorm: return "rg8_snorm";
+ case ElfR16Snorm: return "r16_snorm";
+ case ElfR8Snorm: return "r8_snorm";
+
+ case ElfRgba32i: return "rgba32i";
+ case ElfRgba16i: return "rgba16i";
+ case ElfRgba8i: return "rgba8i";
+ case ElfRg32i: return "rg32i";
+ case ElfRg16i: return "rg16i";
+ case ElfRg8i: return "rg8i";
+ case ElfR32i: return "r32i";
+ case ElfR16i: return "r16i";
+ case ElfR8i: return "r8i";
+
+ case ElfRgba32ui: return "rgba32ui";
+ case ElfRgba16ui: return "rgba16ui";
+ case ElfRgba8ui: return "rgba8ui";
+ case ElfRg32ui: return "rg32ui";
+ case ElfRg16ui: return "rg16ui";
+ case ElfRgb10a2ui: return "rgb10_a2ui";
+ case ElfRg8ui: return "rg8ui";
+ case ElfR32ui: return "r32ui";
+ case ElfR16ui: return "r16ui";
+ case ElfR8ui: return "r8ui";
+ default: return "none";
+ }
+ }
+ static const char* getLayoutDepthString(TLayoutDepth d)
+ {
+ switch (d) {
+ case EldAny: return "depth_any";
+ case EldGreater: return "depth_greater";
+ case EldLess: return "depth_less";
+ case EldUnchanged: return "depth_unchanged";
+ default: return "none";
+ }
+ }
+ static const char* getBlendEquationString(TBlendEquationShift e)
+ {
+ switch (e) {
+ case EBlendMultiply: return "blend_support_multiply";
+ case EBlendScreen: return "blend_support_screen";
+ case EBlendOverlay: return "blend_support_overlay";
+ case EBlendDarken: return "blend_support_darken";
+ case EBlendLighten: return "blend_support_lighten";
+ case EBlendColordodge: return "blend_support_colordodge";
+ case EBlendColorburn: return "blend_support_colorburn";
+ case EBlendHardlight: return "blend_support_hardlight";
+ case EBlendSoftlight: return "blend_support_softlight";
+ case EBlendDifference: return "blend_support_difference";
+ case EBlendExclusion: return "blend_support_exclusion";
+ case EBlendHslHue: return "blend_support_hsl_hue";
+ case EBlendHslSaturation: return "blend_support_hsl_saturation";
+ case EBlendHslColor: return "blend_support_hsl_color";
+ case EBlendHslLuminosity: return "blend_support_hsl_luminosity";
+ case EBlendAllEquations: return "blend_support_all_equations";
+ default: return "unknown";
+ }
+ }
+ static const char* getGeometryString(TLayoutGeometry geometry)
+ {
+ switch (geometry) {
+ case ElgPoints: return "points";
+ case ElgLines: return "lines";
+ case ElgLinesAdjacency: return "lines_adjacency";
+ case ElgLineStrip: return "line_strip";
+ case ElgTriangles: return "triangles";
+ case ElgTrianglesAdjacency: return "triangles_adjacency";
+ case ElgTriangleStrip: return "triangle_strip";
+ case ElgQuads: return "quads";
+ case ElgIsolines: return "isolines";
+ default: return "none";
+ }
+ }
+ static const char* getVertexSpacingString(TVertexSpacing spacing)
+ {
+ switch (spacing) {
+ case EvsEqual: return "equal_spacing";
+ case EvsFractionalEven: return "fractional_even_spacing";
+ case EvsFractionalOdd: return "fractional_odd_spacing";
+ default: return "none";
+ }
+ }
+ static const char* getVertexOrderString(TVertexOrder order)
+ {
+ switch (order) {
+ case EvoCw: return "cw";
+ case EvoCcw: return "ccw";
+ default: return "none";
+ }
+ }
+ static int mapGeometryToSize(TLayoutGeometry geometry)
+ {
+ switch (geometry) {
+ case ElgPoints: return 1;
+ case ElgLines: return 2;
+ case ElgLinesAdjacency: return 4;
+ case ElgTriangles: return 3;
+ case ElgTrianglesAdjacency: return 6;
+ default: return 0;
+ }
+ }
+};
+
+// Qualifiers that don't need to be keep per object. They have shader scope, not object scope.
+// So, they will not be part of TType, TQualifier, etc.
+struct TShaderQualifiers {
+ TLayoutGeometry geometry; // geometry/tessellation shader in/out primitives
+ bool pixelCenterInteger; // fragment shader
+ bool originUpperLeft; // fragment shader
+ int invocations;
+ int vertices; // both for tessellation "vertices" and geometry "max_vertices"
+ TVertexSpacing spacing;
+ TVertexOrder order;
+ bool pointMode;
+ int localSize[3]; // compute shader
+ int localSizeSpecId[3]; // compute shader specialization id for gl_WorkGroupSize
+ bool earlyFragmentTests; // fragment input
+ TLayoutDepth layoutDepth;
+ bool blendEquation; // true if any blend equation was specified
+
+ void init()
+ {
+ geometry = ElgNone;
+ originUpperLeft = false;
+ pixelCenterInteger = false;
+ invocations = TQualifier::layoutNotSet;
+ vertices = TQualifier::layoutNotSet;
+ spacing = EvsNone;
+ order = EvoNone;
+ pointMode = false;
+ localSize[0] = 1;
+ localSize[1] = 1;
+ localSize[2] = 1;
+ localSizeSpecId[0] = TQualifier::layoutNotSet;
+ localSizeSpecId[1] = TQualifier::layoutNotSet;
+ localSizeSpecId[2] = TQualifier::layoutNotSet;
+ earlyFragmentTests = false;
+ layoutDepth = EldNone;
+ blendEquation = false;
+ }
+
+ // Merge in characteristics from the 'src' qualifier. They can override when
+ // set, but never erase when not set.
+ void merge(const TShaderQualifiers& src)
+ {
+ if (src.geometry != ElgNone)
+ geometry = src.geometry;
+ if (src.pixelCenterInteger)
+ pixelCenterInteger = src.pixelCenterInteger;
+ if (src.originUpperLeft)
+ originUpperLeft = src.originUpperLeft;
+ if (src.invocations != TQualifier::layoutNotSet)
+ invocations = src.invocations;
+ if (src.vertices != TQualifier::layoutNotSet)
+ vertices = src.vertices;
+ if (src.spacing != EvsNone)
+ spacing = src.spacing;
+ if (src.order != EvoNone)
+ order = src.order;
+ if (src.pointMode)
+ pointMode = true;
+ for (int i = 0; i < 3; ++i) {
+ if (src.localSize[i] > 1)
+ localSize[i] = src.localSize[i];
+ }
+ for (int i = 0; i < 3; ++i) {
+ if (src.localSizeSpecId[i] != TQualifier::layoutNotSet)
+ localSizeSpecId[i] = src.localSizeSpecId[i];
+ }
+ if (src.earlyFragmentTests)
+ earlyFragmentTests = true;
+ if (src.layoutDepth)
+ layoutDepth = src.layoutDepth;
+ if (src.blendEquation)
+ blendEquation = src.blendEquation;
+ }
+};
+
+//
+// TPublicType is just temporarily used while parsing and not quite the same
+// information kept per node in TType. Due to the bison stack, it can't have
+// types that it thinks have non-trivial constructors. It should
+// just be used while recognizing the grammar, not anything else.
+// Once enough is known about the situation, the proper information
+// moved into a TType, or the parse context, etc.
+//
+class TPublicType {
+public:
+ TBasicType basicType;
+ TSampler sampler;
+ TQualifier qualifier;
+ TShaderQualifiers shaderQualifiers;
+ int vectorSize : 4;
+ int matrixCols : 4;
+ int matrixRows : 4;
+ TArraySizes* arraySizes;
+ const TType* userDef;
+ TSourceLoc loc;
+
+ void initType(const TSourceLoc& l)
+ {
+ basicType = EbtVoid;
+ vectorSize = 1;
+ matrixRows = 0;
+ matrixCols = 0;
+ arraySizes = nullptr;
+ userDef = nullptr;
+ loc = l;
+ }
+
+ void initQualifiers(bool global = false)
+ {
+ qualifier.clear();
+ if (global)
+ qualifier.storage = EvqGlobal;
+ }
+
+ void init(const TSourceLoc& l, bool global = false)
+ {
+ initType(l);
+ sampler.clear();
+ initQualifiers(global);
+ shaderQualifiers.init();
+ }
+
+ void setVector(int s)
+ {
+ matrixRows = 0;
+ matrixCols = 0;
+ vectorSize = s;
+ }
+
+ void setMatrix(int c, int r)
+ {
+ matrixRows = r;
+ matrixCols = c;
+ vectorSize = 0;
+ }
+
+ bool isScalar() const
+ {
+ return matrixCols == 0 && vectorSize == 1 && arraySizes == nullptr && userDef == nullptr;
+ }
+
+ // "Image" is a superset of "Subpass"
+ bool isImage() const { return basicType == EbtSampler && sampler.isImage(); }
+ bool isSubpass() const { return basicType == EbtSampler && sampler.isSubpass(); }
+};
+
+//
+// Base class for things that have a type.
+//
+class TType {
+public:
+ POOL_ALLOCATOR_NEW_DELETE(GetThreadPoolAllocator())
+
+ // for "empty" type (no args) or simple scalar/vector/matrix
+ explicit TType(TBasicType t = EbtVoid, TStorageQualifier q = EvqTemporary, int vs = 1, int mc = 0, int mr = 0,
+ bool isVector = false) :
+ basicType(t), vectorSize(vs), matrixCols(mc), matrixRows(mr), vector1(isVector && vs == 1),
+ arraySizes(nullptr), structure(nullptr), fieldName(nullptr), typeName(nullptr)
+ {
+ sampler.clear();
+ qualifier.clear();
+ qualifier.storage = q;
+ }
+ // for explicit precision qualifier
+ TType(TBasicType t, TStorageQualifier q, TPrecisionQualifier p, int vs = 1, int mc = 0, int mr = 0,
+ bool isVector = false) :
+ basicType(t), vectorSize(vs), matrixCols(mc), matrixRows(mr), vector1(isVector && vs == 1),
+ arraySizes(nullptr), structure(nullptr), fieldName(nullptr), typeName(nullptr)
+ {
+ sampler.clear();
+ qualifier.clear();
+ qualifier.storage = q;
+ qualifier.precision = p;
+ assert(p >= 0 && p <= EpqHigh);
+ }
+ // for turning a TPublicType into a TType, using a shallow copy
+ explicit TType(const TPublicType& p) :
+ basicType(p.basicType),
+ vectorSize(p.vectorSize), matrixCols(p.matrixCols), matrixRows(p.matrixRows), vector1(false),
+ arraySizes(p.arraySizes), structure(nullptr), fieldName(nullptr), typeName(nullptr)
+ {
+ if (basicType == EbtSampler)
+ sampler = p.sampler;
+ else
+ sampler.clear();
+ qualifier = p.qualifier;
+ if (p.userDef) {
+ structure = p.userDef->getWritableStruct(); // public type is short-lived; there are no sharing issues
+ typeName = NewPoolTString(p.userDef->getTypeName().c_str());
+ }
+ }
+ // to efficiently make a dereferenced type
+ // without ever duplicating the outer structure that will be thrown away
+ // and using only shallow copy
+ TType(const TType& type, int derefIndex, bool rowMajor = false)
+ {
+ if (type.isArray()) {
+ shallowCopy(type);
+ if (type.getArraySizes()->getNumDims() == 1) {
+ arraySizes = nullptr;
+ } else {
+ // want our own copy of the array, so we can edit it
+ arraySizes = new TArraySizes;
+ arraySizes->copyDereferenced(*type.arraySizes);
+ }
+ } else if (type.basicType == EbtStruct || type.basicType == EbtBlock) {
+ // do a structure dereference
+ const TTypeList& memberList = *type.getStruct();
+ shallowCopy(*memberList[derefIndex].type);
+ return;
+ } else {
+ // do a vector/matrix dereference
+ shallowCopy(type);
+ if (matrixCols > 0) {
+ // dereference from matrix to vector
+ if (rowMajor)
+ vectorSize = matrixCols;
+ else
+ vectorSize = matrixRows;
+ matrixCols = 0;
+ matrixRows = 0;
+ if (vectorSize == 1)
+ vector1 = true;
+ } else if (isVector()) {
+ // dereference from vector to scalar
+ vectorSize = 1;
+ vector1 = false;
+ }
+ }
+ }
+ // for making structures, ...
+ TType(TTypeList* userDef, const TString& n) :
+ basicType(EbtStruct), vectorSize(1), matrixCols(0), matrixRows(0), vector1(false),
+ arraySizes(nullptr), structure(userDef), fieldName(nullptr)
+ {
+ sampler.clear();
+ qualifier.clear();
+ typeName = NewPoolTString(n.c_str());
+ }
+ // For interface blocks
+ TType(TTypeList* userDef, const TString& n, const TQualifier& q) :
+ basicType(EbtBlock), vectorSize(1), matrixCols(0), matrixRows(0), vector1(false),
+ qualifier(q), arraySizes(nullptr), structure(userDef), fieldName(nullptr)
+ {
+ sampler.clear();
+ typeName = NewPoolTString(n.c_str());
+ }
+ virtual ~TType() {}
+
+ // Not for use across pool pops; it will cause multiple instances of TType to point to the same information.
+ // This only works if that information (like a structure's list of types) does not change and
+ // the instances are sharing the same pool.
+ void shallowCopy(const TType& copyOf)
+ {
+ basicType = copyOf.basicType;
+ sampler = copyOf.sampler;
+ qualifier = copyOf.qualifier;
+ vectorSize = copyOf.vectorSize;
+ matrixCols = copyOf.matrixCols;
+ matrixRows = copyOf.matrixRows;
+ vector1 = copyOf.vector1;
+ arraySizes = copyOf.arraySizes; // copying the pointer only, not the contents
+ structure = copyOf.structure;
+ fieldName = copyOf.fieldName;
+ typeName = copyOf.typeName;
+ }
+
+ void deepCopy(const TType& copyOf)
+ {
+ shallowCopy(copyOf);
+
+ if (copyOf.arraySizes) {
+ arraySizes = new TArraySizes;
+ *arraySizes = *copyOf.arraySizes;
+ }
+
+ if (copyOf.structure) {
+ structure = new TTypeList;
+ for (unsigned int i = 0; i < copyOf.structure->size(); ++i) {
+ TTypeLoc typeLoc;
+ typeLoc.loc = (*copyOf.structure)[i].loc;
+ typeLoc.type = new TType();
+ typeLoc.type->deepCopy(*(*copyOf.structure)[i].type);
+ structure->push_back(typeLoc);
+ }
+ }
+
+ if (copyOf.fieldName)
+ fieldName = NewPoolTString(copyOf.fieldName->c_str());
+ if (copyOf.typeName)
+ typeName = NewPoolTString(copyOf.typeName->c_str());
+ }
+
+ TType* clone()
+ {
+ TType *newType = new TType();
+ newType->deepCopy(*this);
+
+ return newType;
+ }
+
+ void makeVector() { vector1 = true; }
+
+ // Merge type from parent, where a parentType is at the beginning of a declaration,
+ // establishing some characteristics for all subsequent names, while this type
+ // is on the individual names.
+ void mergeType(const TPublicType& parentType)
+ {
+ // arrayness is currently the only child aspect that has to be preserved
+ basicType = parentType.basicType;
+ vectorSize = parentType.vectorSize;
+ matrixCols = parentType.matrixCols;
+ matrixRows = parentType.matrixRows;
+ vector1 = false; // TPublicType is only GLSL which so far has no vec1
+ qualifier = parentType.qualifier;
+ sampler = parentType.sampler;
+ if (parentType.arraySizes)
+ newArraySizes(*parentType.arraySizes);
+ if (parentType.userDef) {
+ structure = parentType.userDef->getWritableStruct();
+ setTypeName(parentType.userDef->getTypeName());
+ }
+ }
+
+ virtual void hideMember() { basicType = EbtVoid; vectorSize = 1; }
+ virtual bool hiddenMember() const { return basicType == EbtVoid; }
+
+ virtual void setTypeName(const TString& n) { typeName = NewPoolTString(n.c_str()); }
+ virtual void setFieldName(const TString& n) { fieldName = NewPoolTString(n.c_str()); }
+ virtual const TString& getTypeName() const
+ {
+ assert(typeName);
+ return *typeName;
+ }
+
+ virtual const TString& getFieldName() const
+ {
+ assert(fieldName);
+ return *fieldName;
+ }
+
+ virtual TBasicType getBasicType() const { return basicType; }
+ virtual const TSampler& getSampler() const { return sampler; }
+
+ virtual TQualifier& getQualifier() { return qualifier; }
+ virtual const TQualifier& getQualifier() const { return qualifier; }
+
+ virtual int getVectorSize() const { return vectorSize; } // returns 1 for either scalar or vector of size 1, valid for both
+ virtual int getMatrixCols() const { return matrixCols; }
+ virtual int getMatrixRows() const { return matrixRows; }
+ virtual int getOuterArraySize() const { return arraySizes->getOuterSize(); }
+ virtual TIntermTyped* getOuterArrayNode() const { return arraySizes->getOuterNode(); }
+ virtual int getCumulativeArraySize() const { return arraySizes->getCumulativeSize(); }
+ virtual bool isArrayOfArrays() const { return arraySizes != nullptr && arraySizes->getNumDims() > 1; }
+ virtual int getImplicitArraySize() const { return arraySizes->getImplicitSize(); }
+ virtual const TArraySizes* getArraySizes() const { return arraySizes; }
+ virtual TArraySizes& getArraySizes() { assert(arraySizes != nullptr); return *arraySizes; }
+
+ virtual bool isScalar() const { return ! isVector() && ! isMatrix() && ! isStruct() && ! isArray(); }
+ virtual bool isVector() const { return vectorSize > 1 || vector1; }
+ virtual bool isMatrix() const { return matrixCols ? true : false; }
+ virtual bool isArray() const { return arraySizes != nullptr; }
+ virtual bool isExplicitlySizedArray() const { return isArray() && getOuterArraySize() != UnsizedArraySize; }
+ virtual bool isImplicitlySizedArray() const { return isArray() && getOuterArraySize() == UnsizedArraySize && qualifier.storage != EvqBuffer; }
+ virtual bool isRuntimeSizedArray() const { return isArray() && getOuterArraySize() == UnsizedArraySize && qualifier.storage == EvqBuffer; }
+ virtual bool isStruct() const { return structure != nullptr; }
+ virtual bool isFloatingDomain() const { return basicType == EbtFloat || basicType == EbtDouble; }
+
+ virtual bool isOpaque() const { return basicType == EbtSampler || basicType == EbtAtomicUint; }
+
+ // "Image" is a superset of "Subpass"
+ virtual bool isImage() const { return basicType == EbtSampler && getSampler().isImage(); }
+ virtual bool isSubpass() const { return basicType == EbtSampler && getSampler().isSubpass(); }
+
+ // Recursively checks if the type contains the given basic type
+ virtual bool containsBasicType(TBasicType checkType) const
+ {
+ if (basicType == checkType)
+ return true;
+ if (! structure)
+ return false;
+ for (unsigned int i = 0; i < structure->size(); ++i) {
+ if ((*structure)[i].type->containsBasicType(checkType))
+ return true;
+ }
+ return false;
+ }
+
+ // Recursively check the structure for any arrays, needed for some error checks
+ virtual bool containsArray() const
+ {
+ if (isArray())
+ return true;
+ if (structure == nullptr)
+ return false;
+ for (unsigned int i = 0; i < structure->size(); ++i) {
+ if ((*structure)[i].type->containsArray())
+ return true;
+ }
+ return false;
+ }
+
+ // Check the structure for any structures, needed for some error checks
+ virtual bool containsStructure() const
+ {
+ if (structure == nullptr)
+ return false;
+ for (unsigned int i = 0; i < structure->size(); ++i) {
+ if ((*structure)[i].type->structure)
+ return true;
+ }
+ return false;
+ }
+
+ // Recursively check the structure for any implicitly-sized arrays, needed for triggering a copyUp().
+ virtual bool containsImplicitlySizedArray() const
+ {
+ if (isImplicitlySizedArray())
+ return true;
+ if (structure == nullptr)
+ return false;
+ for (unsigned int i = 0; i < structure->size(); ++i) {
+ if ((*structure)[i].type->containsImplicitlySizedArray())
+ return true;
+ }
+ return false;
+ }
+
+ virtual bool containsOpaque() const
+ {
+ if (isOpaque())
+ return true;
+ if (! structure)
+ return false;
+ for (unsigned int i = 0; i < structure->size(); ++i) {
+ if ((*structure)[i].type->containsOpaque())
+ return true;
+ }
+ return false;
+ }
+
+ virtual bool containsNonOpaque() const
+ {
+ // list all non-opaque types
+ switch (basicType) {
+ case EbtVoid:
+ case EbtFloat:
+ case EbtDouble:
+ case EbtInt:
+ case EbtUint:
+ case EbtInt64:
+ case EbtUint64:
+ case EbtBool:
+ return true;
+ default:
+ break;
+ }
+ if (! structure)
+ return false;
+ for (unsigned int i = 0; i < structure->size(); ++i) {
+ if ((*structure)[i].type->containsNonOpaque())
+ return true;
+ }
+ return false;
+ }
+
+ virtual bool containsSpecializationSize() const
+ {
+ if (isArray() && arraySizes->containsNode())
+ return true;
+ if (! structure)
+ return false;
+ for (unsigned int i = 0; i < structure->size(); ++i) {
+ if ((*structure)[i].type->containsSpecializationSize())
+ return true;
+ }
+ return false;
+ }
+
+ // Array editing methods. Array descriptors can be shared across
+ // type instances. This allows all uses of the same array
+ // to be updated at once. E.g., all nodes can be explicitly sized
+ // by tracking and correcting one implicit size. Or, all nodes
+ // can get the explicit size on a redeclaration that gives size.
+ //
+ // N.B.: Don't share with the shared symbol tables (symbols are
+ // marked as isReadOnly(). Such symbols with arrays that will be
+ // edited need to copyUp() on first use, so that
+ // A) the edits don't effect the shared symbol table, and
+ // B) the edits are shared across all users.
+ void updateArraySizes(const TType& type)
+ {
+ // For when we may already be sharing existing array descriptors,
+ // keeping the pointers the same, just updating the contents.
+ assert(arraySizes != nullptr);
+ assert(type.arraySizes != nullptr);
+ *arraySizes = *type.arraySizes;
+ }
+ void newArraySizes(const TArraySizes& s)
+ {
+ // For setting a fresh new set of array sizes, not yet worrying about sharing.
+ arraySizes = new TArraySizes;
+ *arraySizes = s;
+ }
+ void clearArraySizes()
+ {
+ arraySizes = 0;
+ }
+ void addArrayOuterSizes(const TArraySizes& s)
+ {
+ if (arraySizes == nullptr)
+ newArraySizes(s);
+ else
+ arraySizes->addOuterSizes(s);
+ }
+ void changeOuterArraySize(int s) { arraySizes->changeOuterSize(s); }
+ void setImplicitArraySize(int s) { arraySizes->setImplicitSize(s); }
+
+ // Recursively make the implicit array size the explicit array size, through the type tree.
+ void adoptImplicitArraySizes()
+ {
+ if (isImplicitlySizedArray())
+ changeOuterArraySize(getImplicitArraySize());
+ if (isStruct()) {
+ for (int i = 0; i < (int)structure->size(); ++i)
+ (*structure)[i].type->adoptImplicitArraySizes();
+ }
+ }
+
+ const char* getBasicString() const
+ {
+ return TType::getBasicString(basicType);
+ }
+
+ static const char* getBasicString(TBasicType t)
+ {
+ switch (t) {
+ case EbtVoid: return "void";
+ case EbtFloat: return "float";
+ case EbtDouble: return "double";
+ case EbtInt: return "int";
+ case EbtUint: return "uint";
+ case EbtInt64: return "int64_t";
+ case EbtUint64: return "uint64_t";
+ case EbtBool: return "bool";
+ case EbtAtomicUint: return "atomic_uint";
+ case EbtSampler: return "sampler/image";
+ case EbtStruct: return "structure";
+ case EbtBlock: return "block";
+ default: return "unknown type";
+ }
+ }
+
+ TString getCompleteString() const
+ {
+ const int maxSize = GlslangMaxTypeLength;
+ char buf[maxSize];
+ char* p = &buf[0];
+ char* end = &buf[maxSize];
+
+ if (qualifier.hasLayout()) {
+ // To reduce noise, skip this if the only layout is an xfb_buffer
+ // with no triggering xfb_offset.
+ TQualifier noXfbBuffer = qualifier;
+ noXfbBuffer.layoutXfbBuffer = TQualifier::layoutXfbBufferEnd;
+ if (noXfbBuffer.hasLayout()) {
+ p += snprintf(p, end - p, "layout(");
+ if (qualifier.hasAnyLocation()) {
+ p += snprintf(p, end - p, "location=%d ", qualifier.layoutLocation);
+ if (qualifier.hasComponent())
+ p += snprintf(p, end - p, "component=%d ", qualifier.layoutComponent);
+ if (qualifier.hasIndex())
+ p += snprintf(p, end - p, "index=%d ", qualifier.layoutIndex);
+ }
+ if (qualifier.hasSet())
+ p += snprintf(p, end - p, "set=%d ", qualifier.layoutSet);
+ if (qualifier.hasBinding())
+ p += snprintf(p, end - p, "binding=%d ", qualifier.layoutBinding);
+ if (qualifier.hasStream())
+ p += snprintf(p, end - p, "stream=%d ", qualifier.layoutStream);
+ if (qualifier.hasMatrix())
+ p += snprintf(p, end - p, "%s ", TQualifier::getLayoutMatrixString(qualifier.layoutMatrix));
+ if (qualifier.hasPacking())
+ p += snprintf(p, end - p, "%s ", TQualifier::getLayoutPackingString(qualifier.layoutPacking));
+ if (qualifier.hasOffset())
+ p += snprintf(p, end - p, "offset=%d ", qualifier.layoutOffset);
+ if (qualifier.hasAlign())
+ p += snprintf(p, end - p, "align=%d ", qualifier.layoutAlign);
+ if (qualifier.hasFormat())
+ p += snprintf(p, end - p, "%s ", TQualifier::getLayoutFormatString(qualifier.layoutFormat));
+ if (qualifier.hasXfbBuffer() && qualifier.hasXfbOffset())
+ p += snprintf(p, end - p, "xfb_buffer=%d ", qualifier.layoutXfbBuffer);
+ if (qualifier.hasXfbOffset())
+ p += snprintf(p, end - p, "xfb_offset=%d ", qualifier.layoutXfbOffset);
+ if (qualifier.hasXfbStride())
+ p += snprintf(p, end - p, "xfb_stride=%d ", qualifier.layoutXfbStride);
+ if (qualifier.hasAttachment())
+ p += snprintf(p, end - p, "input_attachment_index=%d ", qualifier.layoutAttachment);
+ if (qualifier.hasSpecConstantId())
+ p += snprintf(p, end - p, "constant_id=%d ", qualifier.layoutSpecConstantId);
+ if (qualifier.layoutPushConstant)
+ p += snprintf(p, end - p, "push_constant ");
+ p += snprintf(p, end - p, ") ");
+ }
+ }
+
+ if (qualifier.invariant)
+ p += snprintf(p, end - p, "invariant ");
+ if (qualifier.noContraction)
+ p += snprintf(p, end - p, "noContraction ");
+ if (qualifier.centroid)
+ p += snprintf(p, end - p, "centroid ");
+ if (qualifier.smooth)
+ p += snprintf(p, end - p, "smooth ");
+ if (qualifier.flat)
+ p += snprintf(p, end - p, "flat ");
+ if (qualifier.nopersp)
+ p += snprintf(p, end - p, "noperspective ");
+ if (qualifier.patch)
+ p += snprintf(p, end - p, "patch ");
+ if (qualifier.sample)
+ p += snprintf(p, end - p, "sample ");
+ if (qualifier.coherent)
+ p += snprintf(p, end - p, "coherent ");
+ if (qualifier.volatil)
+ p += snprintf(p, end - p, "volatile ");
+ if (qualifier.restrict)
+ p += snprintf(p, end - p, "restrict ");
+ if (qualifier.readonly)
+ p += snprintf(p, end - p, "readonly ");
+ if (qualifier.writeonly)
+ p += snprintf(p, end - p, "writeonly ");
+ if (qualifier.specConstant)
+ p += snprintf(p, end - p, "specialization-constant ");
+ p += snprintf(p, end - p, "%s ", getStorageQualifierString());
+ if (isArray()) {
+ for(int i = 0; i < (int)arraySizes->getNumDims(); ++i) {
+ int size = arraySizes->getDimSize(i);
+ if (size == 0)
+ p += snprintf(p, end - p, "implicitly-sized array of ");
+ else
+ p += snprintf(p, end - p, "%d-element array of ", arraySizes->getDimSize(i));
+ }
+ }
+ if (qualifier.precision != EpqNone)
+ p += snprintf(p, end - p, "%s ", getPrecisionQualifierString());
+ if (isMatrix())
+ p += snprintf(p, end - p, "%dX%d matrix of ", matrixCols, matrixRows);
+ else if (isVector())
+ p += snprintf(p, end - p, "%d-component vector of ", vectorSize);
+
+ *p = 0;
+ TString s(buf);
+ s.append(getBasicTypeString());
+
+ if (qualifier.builtIn != EbvNone) {
+ s.append(" ");
+ s.append(getBuiltInVariableString());
+ }
+
+ // Add struct/block members
+ if (structure) {
+ s.append("{");
+ for (size_t i = 0; i < structure->size(); ++i) {
+ if (! (*structure)[i].type->hiddenMember()) {
+ s.append((*structure)[i].type->getCompleteString());
+ s.append(" ");
+ s.append((*structure)[i].type->getFieldName());
+ if (i < structure->size() - 1)
+ s.append(", ");
+ }
+ }
+ s.append("}");
+ }
+
+ return s;
+ }
+
+ TString getBasicTypeString() const
+ {
+ if (basicType == EbtSampler)
+ return sampler.getString();
+ else
+ return getBasicString();
+ }
+
+ const char* getStorageQualifierString() const { return GetStorageQualifierString(qualifier.storage); }
+ const char* getBuiltInVariableString() const { return GetBuiltInVariableString(qualifier.builtIn); }
+ const char* getPrecisionQualifierString() const { return GetPrecisionQualifierString(qualifier.precision); }
+ const TTypeList* getStruct() const { return structure; }
+ TTypeList* getWritableStruct() const { return structure; } // This should only be used when known to not be sharing with other threads
+
+ int computeNumComponents() const
+ {
+ int components = 0;
+
+ if (getBasicType() == EbtStruct || getBasicType() == EbtBlock) {
+ for (TTypeList::const_iterator tl = getStruct()->begin(); tl != getStruct()->end(); tl++)
+ components += ((*tl).type)->computeNumComponents();
+ } else if (matrixCols)
+ components = matrixCols * matrixRows;
+ else
+ components = vectorSize;
+
+ if (arraySizes != nullptr) {
+ components *= arraySizes->getCumulativeSize();
+ }
+
+ return components;
+ }
+
+ // append this type's mangled name to the passed in 'name'
+ void appendMangledName(TString& name)
+ {
+ buildMangledName(name);
+ name += ';' ;
+ }
+
+ // Do two structure types match? They could be declared independently,
+ // in different places, but still might satisfy the definition of matching.
+ // From the spec:
+ //
+ // "Structures must have the same name, sequence of type names, and
+ // type definitions, and member names to be considered the same type.
+ // This rule applies recursively for nested or embedded types."
+ //
+ bool sameStructType(const TType& right) const
+ {
+ // Most commonly, they are both nullptr, or the same pointer to the same actual structure
+ if (structure == right.structure)
+ return true;
+
+ // Both being nullptr was caught above, now they both have to be structures of the same number of elements
+ if (structure == nullptr || right.structure == nullptr ||
+ structure->size() != right.structure->size())
+ return false;
+
+ // Structure names have to match
+ if (*typeName != *right.typeName)
+ return false;
+
+ // Compare the names and types of all the members, which have to match
+ for (unsigned int i = 0; i < structure->size(); ++i) {
+ if ((*structure)[i].type->getFieldName() != (*right.structure)[i].type->getFieldName())
+ return false;
+
+ if (*(*structure)[i].type != *(*right.structure)[i].type)
+ return false;
+ }
+
+ return true;
+ }
+
+ // See if two types match, in all aspects except arrayness
+ bool sameElementType(const TType& right) const
+ {
+ return basicType == right.basicType && sameElementShape(right);
+ }
+
+ // See if two type's arrayness match
+ bool sameArrayness(const TType& right) const
+ {
+ return ((arraySizes == nullptr && right.arraySizes == nullptr) ||
+ (arraySizes != nullptr && right.arraySizes != nullptr && *arraySizes == *right.arraySizes));
+ }
+
+ // See if two type's arrayness match in everything except their outer dimension
+ bool sameInnerArrayness(const TType& right) const
+ {
+ assert(arraySizes != nullptr && right.arraySizes != nullptr);
+ return arraySizes->sameInnerArrayness(*right.arraySizes);
+ }
+
+ // See if two type's elements match in all ways except basic type
+ bool sameElementShape(const TType& right) const
+ {
+ return sampler == right.sampler &&
+ vectorSize == right.vectorSize &&
+ matrixCols == right.matrixCols &&
+ matrixRows == right.matrixRows &&
+ vector1 == right.vector1 &&
+ sameStructType(right);
+ }
+
+ // See if two types match in all ways (just the actual type, not qualification)
+ bool operator==(const TType& right) const
+ {
+ return sameElementType(right) && sameArrayness(right);
+ }
+
+ bool operator!=(const TType& right) const
+ {
+ return ! operator==(right);
+ }
+
+protected:
+ // Require consumer to pick between deep copy and shallow copy.
+ TType(const TType& type);
+ TType& operator=(const TType& type);
+
+ void buildMangledName(TString&);
+
+ TBasicType basicType : 8;
+ int vectorSize : 4; // 1 means either scalar or 1-component vector; see vector1 to disambiguate.
+ int matrixCols : 4;
+ int matrixRows : 4;
+ bool vector1 : 1; // Backward-compatible tracking of a 1-component vector distinguished from a scalar.
+ // GLSL 4.5 never has a 1-component vector; so this will always be false until such
+ // functionality is added.
+ // HLSL does have a 1-component vectors, so this will be true to disambiguate
+ // from a scalar.
+ TSampler sampler;
+ TQualifier qualifier;
+
+ TArraySizes* arraySizes; // nullptr unless an array; can be shared across types
+ TTypeList* structure; // nullptr unless this is a struct; can be shared across types
+ TString *fieldName; // for structure field names
+ TString *typeName; // for structure type name
+};
+
+} // end namespace glslang
+
+#endif // _TYPES_INCLUDED_
diff --git a/chromium/third_party/glslang/src/glslang/Include/arrays.h b/chromium/third_party/glslang/src/glslang/Include/arrays.h
new file mode 100644
index 00000000000..a50088d2dbe
--- /dev/null
+++ b/chromium/third_party/glslang/src/glslang/Include/arrays.h
@@ -0,0 +1,318 @@
+//
+//Copyright (C) 2002-2005 3Dlabs Inc. Ltd.
+//Copyright (C) 2012-2013 LunarG, 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:
+//
+// Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 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.
+//
+// Neither the name of 3Dlabs Inc. Ltd. nor the names of its
+// contributors may be used to endorse or promote products derived
+// from this software without specific prior written permission.
+//
+//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+//"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 THE
+//COPYRIGHT HOLDERS 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.
+//
+
+//
+// Implement types for tracking GLSL arrays, arrays of arrays, etc.
+//
+
+#ifndef _ARRAYS_INCLUDED
+#define _ARRAYS_INCLUDED
+
+namespace glslang {
+
+// This is used to mean there is no size yet (unsized), it is waiting to get a size from somewhere else.
+const int UnsizedArraySize = 0;
+
+class TIntermTyped;
+extern bool SameSpecializationConstants(TIntermTyped*, TIntermTyped*);
+
+// Specialization constants need both a nominal size and a node that defines
+// the specialization constant being used. Array types are the same when their
+// size and specialization constant nodes are the same.
+struct TArraySize {
+ unsigned int size;
+ TIntermTyped* node; // nullptr means no specialization constant node
+ bool operator==(const TArraySize& rhs) const
+ {
+ if (size != rhs.size)
+ return false;
+ if (node == nullptr || rhs.node == nullptr)
+ return node == rhs.node;
+
+ return SameSpecializationConstants(node, rhs.node);
+ }
+};
+
+//
+// TSmallArrayVector is used as the container for the set of sizes in TArraySizes.
+// It has generic-container semantics, while TArraySizes has array-of-array semantics.
+// That is, TSmallArrayVector should be more focused on mechanism and TArraySizes on policy.
+//
+struct TSmallArrayVector {
+ //
+ // TODO: memory: TSmallArrayVector is intended to be smaller.
+ // Almost all arrays could be handled by two sizes each fitting
+ // in 16 bits, needing a real vector only in the cases where there
+ // are more than 3 sizes or a size needing more than 16 bits.
+ //
+ POOL_ALLOCATOR_NEW_DELETE(GetThreadPoolAllocator())
+
+ TSmallArrayVector() : sizes(nullptr) { }
+ virtual ~TSmallArrayVector() { dealloc(); }
+
+ // For breaking into two non-shared copies, independently modifiable.
+ TSmallArrayVector& operator=(const TSmallArrayVector& from)
+ {
+ if (from.sizes == nullptr)
+ sizes = nullptr;
+ else {
+ alloc();
+ *sizes = *from.sizes;
+ }
+
+ return *this;
+ }
+
+ int size() const
+ {
+ if (sizes == nullptr)
+ return 0;
+ return (int)sizes->size();
+ }
+
+ unsigned int frontSize() const
+ {
+ assert(sizes != nullptr && sizes->size() > 0);
+ return sizes->front().size;
+ }
+
+ TIntermTyped* frontNode() const
+ {
+ assert(sizes != nullptr && sizes->size() > 0);
+ return sizes->front().node;
+ }
+
+ void changeFront(unsigned int s)
+ {
+ assert(sizes != nullptr);
+ // this should only happen for implicitly sized arrays, not specialization constants
+ assert(sizes->front().node == nullptr);
+ sizes->front().size = s;
+ }
+
+ void push_back(unsigned int e, TIntermTyped* n)
+ {
+ alloc();
+ TArraySize pair = { e, n };
+ sizes->push_back(pair);
+ }
+
+ void push_front(const TSmallArrayVector& newDims)
+ {
+ alloc();
+ sizes->insert(sizes->begin(), newDims.sizes->begin(), newDims.sizes->end());
+ }
+
+ void pop_front()
+ {
+ assert(sizes != nullptr && sizes->size() > 0);
+ if (sizes->size() == 1)
+ dealloc();
+ else
+ sizes->erase(sizes->begin());
+ }
+
+ // 'this' should currently not be holding anything, and copyNonFront
+ // will make it hold a copy of all but the first element of rhs.
+ // (This would be useful for making a type that is dereferenced by
+ // one dimension.)
+ void copyNonFront(const TSmallArrayVector& rhs)
+ {
+ assert(sizes == nullptr);
+ if (rhs.size() > 1) {
+ alloc();
+ sizes->insert(sizes->begin(), rhs.sizes->begin() + 1, rhs.sizes->end());
+ }
+ }
+
+ unsigned int getDimSize(int i) const
+ {
+ assert(sizes != nullptr && (int)sizes->size() > i);
+ return (*sizes)[i].size;
+ }
+
+ void setDimSize(int i, unsigned int size) const
+ {
+ assert(sizes != nullptr && (int)sizes->size() > i);
+ assert((*sizes)[i].node == nullptr);
+ (*sizes)[i].size = size;
+ }
+
+ TIntermTyped* getDimNode(int i) const
+ {
+ assert(sizes != nullptr && (int)sizes->size() > i);
+ return (*sizes)[i].node;
+ }
+
+ bool operator==(const TSmallArrayVector& rhs) const
+ {
+ if (sizes == nullptr && rhs.sizes == nullptr)
+ return true;
+ if (sizes == nullptr || rhs.sizes == nullptr)
+ return false;
+ return *sizes == *rhs.sizes;
+ }
+ bool operator!=(const TSmallArrayVector& rhs) const { return ! operator==(rhs); }
+
+protected:
+ TSmallArrayVector(const TSmallArrayVector&);
+
+ void alloc()
+ {
+ if (sizes == nullptr)
+ sizes = new TVector<TArraySize>;
+ }
+ void dealloc()
+ {
+ delete sizes;
+ sizes = nullptr;
+ }
+
+ TVector<TArraySize>* sizes; // will either hold such a pointer, or in the future, hold the two array sizes
+};
+
+//
+// Represent an array, or array of arrays, to arbitrary depth. This is not
+// done through a hierarchy of types in a type tree, rather all contiguous arrayness
+// in the type hierarchy is localized into this single cumulative object.
+//
+// The arrayness in TTtype is a pointer, so that it can be non-allocated and zero
+// for the vast majority of types that are non-array types.
+//
+// Order Policy: these are all identical:
+// - left to right order within a contiguous set of ...[..][..][..]... in the source language
+// - index order 0, 1, 2, ... within the 'sizes' member below
+// - outer-most to inner-most
+//
+struct TArraySizes {
+ POOL_ALLOCATOR_NEW_DELETE(GetThreadPoolAllocator())
+
+ TArraySizes() : implicitArraySize(1) { }
+
+ // For breaking into two non-shared copies, independently modifiable.
+ TArraySizes& operator=(const TArraySizes& from)
+ {
+ implicitArraySize = from.implicitArraySize;
+ sizes = from.sizes;
+
+ return *this;
+ }
+
+ // translate from array-of-array semantics to container semantics
+ int getNumDims() const { return sizes.size(); }
+ int getDimSize(int dim) const { return sizes.getDimSize(dim); }
+ TIntermTyped* getDimNode(int dim) const { return sizes.getDimNode(dim); }
+ void setDimSize(int dim, int size) { sizes.setDimSize(dim, size); }
+ int getOuterSize() const { return sizes.frontSize(); }
+ TIntermTyped* getOuterNode() const { return sizes.frontNode(); }
+ int getCumulativeSize() const
+ {
+ int size = 1;
+ for (int d = 0; d < sizes.size(); ++d) {
+ // this only makes sense in paths that have a known array size
+ assert(sizes.getDimSize(d) != UnsizedArraySize);
+ size *= sizes.getDimSize(d);
+ }
+ return size;
+ }
+ void addInnerSize() { addInnerSize((unsigned)UnsizedArraySize); }
+ void addInnerSize(int s) { addInnerSize((unsigned)s, nullptr); }
+ void addInnerSize(int s, TIntermTyped* n) { sizes.push_back((unsigned)s, n); }
+ void addInnerSize(TArraySize pair) { sizes.push_back(pair.size, pair.node); }
+ void changeOuterSize(int s) { sizes.changeFront((unsigned)s); }
+ int getImplicitSize() const { return (int)implicitArraySize; }
+ void setImplicitSize(int s) { implicitArraySize = s; }
+ bool isInnerImplicit() const
+ {
+ for (int d = 1; d < sizes.size(); ++d) {
+ if (sizes.getDimSize(d) == (unsigned)UnsizedArraySize)
+ return true;
+ }
+
+ return false;
+ }
+ bool isImplicit() const { return getOuterSize() == UnsizedArraySize || isInnerImplicit(); }
+ void addOuterSizes(const TArraySizes& s) { sizes.push_front(s.sizes); }
+ void dereference() { sizes.pop_front(); }
+ void copyDereferenced(const TArraySizes& rhs)
+ {
+ assert(sizes.size() == 0);
+ if (rhs.sizes.size() > 1)
+ sizes.copyNonFront(rhs.sizes);
+ }
+
+ bool sameInnerArrayness(const TArraySizes& rhs) const
+ {
+ if (sizes.size() != rhs.sizes.size())
+ return false;
+
+ for (int d = 1; d < sizes.size(); ++d) {
+ if (sizes.getDimSize(d) != rhs.sizes.getDimSize(d) ||
+ sizes.getDimNode(d) != rhs.sizes.getDimNode(d))
+ return false;
+ }
+
+ return true;
+ }
+
+ // Returns true if any of the dimensions of the array is sized with a node
+ // instead of a front-end compile-time constant.
+ bool containsNode()
+ {
+ for (int d = 0; d < sizes.size(); ++d) {
+ if (sizes.getDimNode(d) != nullptr)
+ return true;
+ }
+
+ return false;
+ }
+
+ bool operator==(const TArraySizes& rhs) { return sizes == rhs.sizes; }
+ bool operator!=(const TArraySizes& rhs) { return sizes != rhs.sizes; }
+
+protected:
+ TSmallArrayVector sizes;
+
+ TArraySizes(const TArraySizes&);
+
+ // for tracking maximum referenced index, before an explicit size is given
+ // applies only to the outer-most dimension
+ int implicitArraySize;
+};
+
+} // end namespace glslang
+
+#endif // _ARRAYS_INCLUDED_
diff --git a/chromium/third_party/glslang/src/glslang/Include/intermediate.h b/chromium/third_party/glslang/src/glslang/Include/intermediate.h
new file mode 100644
index 00000000000..1759c867301
--- /dev/null
+++ b/chromium/third_party/glslang/src/glslang/Include/intermediate.h
@@ -0,0 +1,1090 @@
+//
+//Copyright (C) 2002-2005 3Dlabs Inc. Ltd.
+//Copyright (C) 2012-2016 LunarG, 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:
+//
+// Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 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.
+//
+// Neither the name of 3Dlabs Inc. Ltd. nor the names of its
+// contributors may be used to endorse or promote products derived
+// from this software without specific prior written permission.
+//
+//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+//"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 THE
+//COPYRIGHT HOLDERS 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.
+//
+
+//
+// Definition of the in-memory high-level intermediate representation
+// of shaders. This is a tree that parser creates.
+//
+// Nodes in the tree are defined as a hierarchy of classes derived from
+// TIntermNode. Each is a node in a tree. There is no preset branching factor;
+// each node can have it's own type of list of children.
+//
+
+#ifndef __INTERMEDIATE_H
+#define __INTERMEDIATE_H
+
+#include "../Include/Common.h"
+#include "../Include/Types.h"
+#include "../Include/ConstantUnion.h"
+
+namespace glslang {
+
+//
+// Operators used by the high-level (parse tree) representation.
+//
+enum TOperator {
+ EOpNull, // if in a node, should only mean a node is still being built
+ EOpSequence, // denotes a list of statements, or parameters, etc.
+ EOpLinkerObjects, // for aggregate node of objects the linker may need, if not reference by the rest of the AST
+ EOpFunctionCall,
+ EOpFunction, // For function definition
+ EOpParameters, // an aggregate listing the parameters to a function
+
+ //
+ // Unary operators
+ //
+
+ EOpNegative,
+ EOpLogicalNot,
+ EOpVectorLogicalNot,
+ EOpBitwiseNot,
+
+ EOpPostIncrement,
+ EOpPostDecrement,
+ EOpPreIncrement,
+ EOpPreDecrement,
+
+ EOpConvIntToBool,
+ EOpConvUintToBool,
+ EOpConvFloatToBool,
+ EOpConvDoubleToBool,
+ EOpConvInt64ToBool,
+ EOpConvUint64ToBool,
+ EOpConvBoolToFloat,
+ EOpConvIntToFloat,
+ EOpConvUintToFloat,
+ EOpConvDoubleToFloat,
+ EOpConvInt64ToFloat,
+ EOpConvUint64ToFloat,
+ EOpConvUintToInt,
+ EOpConvFloatToInt,
+ EOpConvBoolToInt,
+ EOpConvDoubleToInt,
+ EOpConvInt64ToInt,
+ EOpConvUint64ToInt,
+ EOpConvIntToUint,
+ EOpConvFloatToUint,
+ EOpConvBoolToUint,
+ EOpConvDoubleToUint,
+ EOpConvInt64ToUint,
+ EOpConvUint64ToUint,
+ EOpConvIntToDouble,
+ EOpConvUintToDouble,
+ EOpConvFloatToDouble,
+ EOpConvBoolToDouble,
+ EOpConvInt64ToDouble,
+ EOpConvUint64ToDouble,
+ EOpConvBoolToInt64,
+ EOpConvIntToInt64,
+ EOpConvUintToInt64,
+ EOpConvFloatToInt64,
+ EOpConvDoubleToInt64,
+ EOpConvUint64ToInt64,
+ EOpConvBoolToUint64,
+ EOpConvIntToUint64,
+ EOpConvUintToUint64,
+ EOpConvFloatToUint64,
+ EOpConvDoubleToUint64,
+ EOpConvInt64ToUint64,
+
+ //
+ // binary operations
+ //
+
+ EOpAdd,
+ EOpSub,
+ EOpMul,
+ EOpDiv,
+ EOpMod,
+ EOpRightShift,
+ EOpLeftShift,
+ EOpAnd,
+ EOpInclusiveOr,
+ EOpExclusiveOr,
+ EOpEqual,
+ EOpNotEqual,
+ EOpVectorEqual,
+ EOpVectorNotEqual,
+ EOpLessThan,
+ EOpGreaterThan,
+ EOpLessThanEqual,
+ EOpGreaterThanEqual,
+ EOpComma,
+
+ EOpVectorTimesScalar,
+ EOpVectorTimesMatrix,
+ EOpMatrixTimesVector,
+ EOpMatrixTimesScalar,
+
+ EOpLogicalOr,
+ EOpLogicalXor,
+ EOpLogicalAnd,
+
+ EOpIndexDirect,
+ EOpIndexIndirect,
+ EOpIndexDirectStruct,
+
+ EOpVectorSwizzle,
+
+ EOpMethod,
+
+ //
+ // Built-in functions mapped to operators
+ //
+
+ EOpRadians,
+ EOpDegrees,
+ EOpSin,
+ EOpCos,
+ EOpTan,
+ EOpAsin,
+ EOpAcos,
+ EOpAtan,
+ EOpSinh,
+ EOpCosh,
+ EOpTanh,
+ EOpAsinh,
+ EOpAcosh,
+ EOpAtanh,
+
+ EOpPow,
+ EOpExp,
+ EOpLog,
+ EOpExp2,
+ EOpLog2,
+ EOpSqrt,
+ EOpInverseSqrt,
+
+ EOpAbs,
+ EOpSign,
+ EOpFloor,
+ EOpTrunc,
+ EOpRound,
+ EOpRoundEven,
+ EOpCeil,
+ EOpFract,
+ EOpModf,
+ EOpMin,
+ EOpMax,
+ EOpClamp,
+ EOpMix,
+ EOpStep,
+ EOpSmoothStep,
+
+ EOpIsNan,
+ EOpIsInf,
+
+ EOpFma,
+
+ EOpFrexp,
+ EOpLdexp,
+
+ EOpFloatBitsToInt,
+ EOpFloatBitsToUint,
+ EOpIntBitsToFloat,
+ EOpUintBitsToFloat,
+ EOpDoubleBitsToInt64,
+ EOpDoubleBitsToUint64,
+ EOpInt64BitsToDouble,
+ EOpUint64BitsToDouble,
+ EOpPackSnorm2x16,
+ EOpUnpackSnorm2x16,
+ EOpPackUnorm2x16,
+ EOpUnpackUnorm2x16,
+ EOpPackSnorm4x8,
+ EOpUnpackSnorm4x8,
+ EOpPackUnorm4x8,
+ EOpUnpackUnorm4x8,
+ EOpPackHalf2x16,
+ EOpUnpackHalf2x16,
+ EOpPackDouble2x32,
+ EOpUnpackDouble2x32,
+ EOpPackInt2x32,
+ EOpUnpackInt2x32,
+ EOpPackUint2x32,
+ EOpUnpackUint2x32,
+
+ EOpLength,
+ EOpDistance,
+ EOpDot,
+ EOpCross,
+ EOpNormalize,
+ EOpFaceForward,
+ EOpReflect,
+ EOpRefract,
+
+ EOpDPdx, // Fragment only
+ EOpDPdy, // Fragment only
+ EOpFwidth, // Fragment only
+ EOpDPdxFine, // Fragment only
+ EOpDPdyFine, // Fragment only
+ EOpFwidthFine, // Fragment only
+ EOpDPdxCoarse, // Fragment only
+ EOpDPdyCoarse, // Fragment only
+ EOpFwidthCoarse, // Fragment only
+
+ EOpInterpolateAtCentroid, // Fragment only
+ EOpInterpolateAtSample, // Fragment only
+ EOpInterpolateAtOffset, // Fragment only
+
+ EOpMatrixTimesMatrix,
+ EOpOuterProduct,
+ EOpDeterminant,
+ EOpMatrixInverse,
+ EOpTranspose,
+
+ EOpFtransform,
+
+ EOpNoise,
+
+ EOpEmitVertex, // geometry only
+ EOpEndPrimitive, // geometry only
+ EOpEmitStreamVertex, // geometry only
+ EOpEndStreamPrimitive, // geometry only
+
+ EOpBarrier,
+ EOpMemoryBarrier,
+ EOpMemoryBarrierAtomicCounter,
+ EOpMemoryBarrierBuffer,
+ EOpMemoryBarrierImage,
+ EOpMemoryBarrierShared, // compute only
+ EOpGroupMemoryBarrier, // compute only
+
+ EOpBallot,
+ EOpReadInvocation,
+ EOpReadFirstInvocation,
+
+ EOpAnyInvocation,
+ EOpAllInvocations,
+ EOpAllInvocationsEqual,
+
+ EOpAtomicAdd,
+ EOpAtomicMin,
+ EOpAtomicMax,
+ EOpAtomicAnd,
+ EOpAtomicOr,
+ EOpAtomicXor,
+ EOpAtomicExchange,
+ EOpAtomicCompSwap,
+
+ EOpAtomicCounterIncrement,
+ EOpAtomicCounterDecrement,
+ EOpAtomicCounter,
+
+ EOpAny,
+ EOpAll,
+
+ //
+ // Branch
+ //
+
+ EOpKill, // Fragment only
+ EOpReturn,
+ EOpBreak,
+ EOpContinue,
+ EOpCase,
+ EOpDefault,
+
+ //
+ // Constructors
+ //
+
+ EOpConstructGuardStart,
+ EOpConstructInt, // these first scalar forms also identify what implicit conversion is needed
+ EOpConstructUint,
+ EOpConstructInt64,
+ EOpConstructUint64,
+ EOpConstructBool,
+ EOpConstructFloat,
+ EOpConstructDouble,
+ EOpConstructVec2,
+ EOpConstructVec3,
+ EOpConstructVec4,
+ EOpConstructDVec2,
+ EOpConstructDVec3,
+ EOpConstructDVec4,
+ EOpConstructBVec2,
+ EOpConstructBVec3,
+ EOpConstructBVec4,
+ EOpConstructIVec2,
+ EOpConstructIVec3,
+ EOpConstructIVec4,
+ EOpConstructUVec2,
+ EOpConstructUVec3,
+ EOpConstructUVec4,
+ EOpConstructI64Vec2,
+ EOpConstructI64Vec3,
+ EOpConstructI64Vec4,
+ EOpConstructU64Vec2,
+ EOpConstructU64Vec3,
+ EOpConstructU64Vec4,
+ EOpConstructMat2x2,
+ EOpConstructMat2x3,
+ EOpConstructMat2x4,
+ EOpConstructMat3x2,
+ EOpConstructMat3x3,
+ EOpConstructMat3x4,
+ EOpConstructMat4x2,
+ EOpConstructMat4x3,
+ EOpConstructMat4x4,
+ EOpConstructDMat2x2,
+ EOpConstructDMat2x3,
+ EOpConstructDMat2x4,
+ EOpConstructDMat3x2,
+ EOpConstructDMat3x3,
+ EOpConstructDMat3x4,
+ EOpConstructDMat4x2,
+ EOpConstructDMat4x3,
+ EOpConstructDMat4x4,
+ EOpConstructStruct,
+ EOpConstructTextureSampler,
+ EOpConstructGuardEnd,
+
+ //
+ // moves
+ //
+
+ EOpAssign,
+ EOpAddAssign,
+ EOpSubAssign,
+ EOpMulAssign,
+ EOpVectorTimesMatrixAssign,
+ EOpVectorTimesScalarAssign,
+ EOpMatrixTimesScalarAssign,
+ EOpMatrixTimesMatrixAssign,
+ EOpDivAssign,
+ EOpModAssign,
+ EOpAndAssign,
+ EOpInclusiveOrAssign,
+ EOpExclusiveOrAssign,
+ EOpLeftShiftAssign,
+ EOpRightShiftAssign,
+
+ //
+ // Array operators
+ //
+
+ EOpArrayLength, // "Array" distinguishes from length(v) built-in function, but it applies to vectors and matrices as well.
+
+ //
+ // Image operations
+ //
+
+ EOpImageGuardBegin,
+
+ EOpImageQuerySize,
+ EOpImageQuerySamples,
+ EOpImageLoad,
+ EOpImageStore,
+ EOpImageAtomicAdd,
+ EOpImageAtomicMin,
+ EOpImageAtomicMax,
+ EOpImageAtomicAnd,
+ EOpImageAtomicOr,
+ EOpImageAtomicXor,
+ EOpImageAtomicExchange,
+ EOpImageAtomicCompSwap,
+
+ EOpSubpassLoad,
+ EOpSubpassLoadMS,
+ EOpSparseImageLoad,
+
+ EOpImageGuardEnd,
+
+ //
+ // Texture operations
+ //
+
+ EOpTextureGuardBegin,
+
+ EOpTextureQuerySize,
+ EOpTextureQueryLod,
+ EOpTextureQueryLevels,
+ EOpTextureQuerySamples,
+ EOpTexture,
+ EOpTextureProj,
+ EOpTextureLod,
+ EOpTextureOffset,
+ EOpTextureFetch,
+ EOpTextureFetchOffset,
+ EOpTextureProjOffset,
+ EOpTextureLodOffset,
+ EOpTextureProjLod,
+ EOpTextureProjLodOffset,
+ EOpTextureGrad,
+ EOpTextureGradOffset,
+ EOpTextureProjGrad,
+ EOpTextureProjGradOffset,
+ EOpTextureGather,
+ EOpTextureGatherOffset,
+ EOpTextureGatherOffsets,
+ EOpTextureClamp,
+ EOpTextureOffsetClamp,
+ EOpTextureGradClamp,
+ EOpTextureGradOffsetClamp,
+
+ EOpSparseTextureGuardBegin,
+
+ EOpSparseTexture,
+ EOpSparseTextureLod,
+ EOpSparseTextureOffset,
+ EOpSparseTextureFetch,
+ EOpSparseTextureFetchOffset,
+ EOpSparseTextureLodOffset,
+ EOpSparseTextureGrad,
+ EOpSparseTextureGradOffset,
+ EOpSparseTextureGather,
+ EOpSparseTextureGatherOffset,
+ EOpSparseTextureGatherOffsets,
+ EOpSparseTexelsResident,
+ EOpSparseTextureClamp,
+ EOpSparseTextureOffsetClamp,
+ EOpSparseTextureGradClamp,
+ EOpSparseTextureGradOffsetClamp,
+
+ EOpSparseTextureGuardEnd,
+
+ EOpTextureGuardEnd,
+
+ //
+ // Integer operations
+ //
+
+ EOpAddCarry,
+ EOpSubBorrow,
+ EOpUMulExtended,
+ EOpIMulExtended,
+ EOpBitfieldExtract,
+ EOpBitfieldInsert,
+ EOpBitFieldReverse,
+ EOpBitCount,
+ EOpFindLSB,
+ EOpFindMSB,
+
+ //
+ // HLSL operations
+ //
+
+ EOpClip,
+ EOpIsFinite,
+ EOpLog10,
+ EOpRcp,
+ EOpSaturate,
+ EOpSinCos,
+ EOpGenMul, // mul(x,y) on any of mat/vec/scalars
+ EOpDst,
+};
+
+class TIntermTraverser;
+class TIntermOperator;
+class TIntermAggregate;
+class TIntermUnary;
+class TIntermBinary;
+class TIntermConstantUnion;
+class TIntermSelection;
+class TIntermSwitch;
+class TIntermBranch;
+class TIntermTyped;
+class TIntermMethod;
+class TIntermSymbol;
+
+} // end namespace glslang
+
+//
+// Base class for the tree nodes
+//
+// (Put outside the glslang namespace, as it's used as part of the external interface.)
+//
+class TIntermNode {
+public:
+ POOL_ALLOCATOR_NEW_DELETE(glslang::GetThreadPoolAllocator())
+
+ TIntermNode() { loc.init(); }
+ virtual const glslang::TSourceLoc& getLoc() const { return loc; }
+ virtual void setLoc(const glslang::TSourceLoc& l) { loc = l; }
+ virtual void traverse(glslang::TIntermTraverser*) = 0;
+ virtual glslang::TIntermTyped* getAsTyped() { return 0; }
+ virtual glslang::TIntermOperator* getAsOperator() { return 0; }
+ virtual glslang::TIntermConstantUnion* getAsConstantUnion() { return 0; }
+ virtual glslang::TIntermAggregate* getAsAggregate() { return 0; }
+ virtual glslang::TIntermUnary* getAsUnaryNode() { return 0; }
+ virtual glslang::TIntermBinary* getAsBinaryNode() { return 0; }
+ virtual glslang::TIntermSelection* getAsSelectionNode() { return 0; }
+ virtual glslang::TIntermSwitch* getAsSwitchNode() { return 0; }
+ virtual glslang::TIntermMethod* getAsMethodNode() { return 0; }
+ virtual glslang::TIntermSymbol* getAsSymbolNode() { return 0; }
+ virtual glslang::TIntermBranch* getAsBranchNode() { return 0; }
+
+ virtual const glslang::TIntermTyped* getAsTyped() const { return 0; }
+ virtual const glslang::TIntermOperator* getAsOperator() const { return 0; }
+ virtual const glslang::TIntermConstantUnion* getAsConstantUnion() const { return 0; }
+ virtual const glslang::TIntermAggregate* getAsAggregate() const { return 0; }
+ virtual const glslang::TIntermUnary* getAsUnaryNode() const { return 0; }
+ virtual const glslang::TIntermBinary* getAsBinaryNode() const { return 0; }
+ virtual const glslang::TIntermSelection* getAsSelectionNode() const { return 0; }
+ virtual const glslang::TIntermSwitch* getAsSwitchNode() const { return 0; }
+ virtual const glslang::TIntermMethod* getAsMethodNode() const { return 0; }
+ virtual const glslang::TIntermSymbol* getAsSymbolNode() const { return 0; }
+ virtual const glslang::TIntermBranch* getAsBranchNode() const { return 0; }
+ virtual ~TIntermNode() { }
+protected:
+ glslang::TSourceLoc loc;
+};
+
+namespace glslang {
+
+//
+// This is just to help yacc.
+//
+struct TIntermNodePair {
+ TIntermNode* node1;
+ TIntermNode* node2;
+};
+
+//
+// Intermediate class for nodes that have a type.
+//
+class TIntermTyped : public TIntermNode {
+public:
+ TIntermTyped(const TType& t) { type.shallowCopy(t); }
+ TIntermTyped(TBasicType basicType) { TType bt(basicType); type.shallowCopy(bt); }
+ virtual TIntermTyped* getAsTyped() { return this; }
+ virtual const TIntermTyped* getAsTyped() const { return this; }
+ virtual void setType(const TType& t) { type.shallowCopy(t); }
+ virtual const TType& getType() const { return type; }
+ virtual TType& getWritableType() { return type; }
+
+ virtual TBasicType getBasicType() const { return type.getBasicType(); }
+ virtual TQualifier& getQualifier() { return type.getQualifier(); }
+ virtual const TQualifier& getQualifier() const { return type.getQualifier(); }
+ virtual void propagatePrecision(TPrecisionQualifier);
+ virtual int getVectorSize() const { return type.getVectorSize(); }
+ virtual int getMatrixCols() const { return type.getMatrixCols(); }
+ virtual int getMatrixRows() const { return type.getMatrixRows(); }
+ virtual bool isMatrix() const { return type.isMatrix(); }
+ virtual bool isArray() const { return type.isArray(); }
+ virtual bool isVector() const { return type.isVector(); }
+ virtual bool isScalar() const { return type.isScalar(); }
+ virtual bool isStruct() const { return type.isStruct(); }
+ TString getCompleteString() const { return type.getCompleteString(); }
+
+protected:
+ TType type;
+};
+
+//
+// Handle for, do-while, and while loops.
+//
+class TIntermLoop : public TIntermNode {
+public:
+ TIntermLoop(TIntermNode* aBody, TIntermTyped* aTest, TIntermTyped* aTerminal, bool testFirst) :
+ body(aBody),
+ test(aTest),
+ terminal(aTerminal),
+ first(testFirst) { }
+ virtual void traverse(TIntermTraverser*);
+ TIntermNode* getBody() const { return body; }
+ TIntermTyped* getTest() const { return test; }
+ TIntermTyped* getTerminal() const { return terminal; }
+ bool testFirst() const { return first; }
+protected:
+ TIntermNode* body; // code to loop over
+ TIntermTyped* test; // exit condition associated with loop, could be 0 for 'for' loops
+ TIntermTyped* terminal; // exists for for-loops
+ bool first; // true for while and for, not for do-while
+};
+
+//
+// Handle case, break, continue, return, and kill.
+//
+class TIntermBranch : public TIntermNode {
+public:
+ TIntermBranch(TOperator op, TIntermTyped* e) :
+ flowOp(op),
+ expression(e) { }
+ virtual TIntermBranch* getAsBranchNode() { return this; }
+ virtual const TIntermBranch* getAsBranchNode() const { return this; }
+ virtual void traverse(TIntermTraverser*);
+ TOperator getFlowOp() const { return flowOp; }
+ TIntermTyped* getExpression() const { return expression; }
+protected:
+ TOperator flowOp;
+ TIntermTyped* expression;
+};
+
+//
+// Represent method names before seeing their calling signature
+// or resolving them to operations. Just an expression as the base object
+// and a textural name.
+//
+class TIntermMethod : public TIntermTyped {
+public:
+ TIntermMethod(TIntermTyped* o, const TType& t, const TString& m) : TIntermTyped(t), object(o), method(m) { }
+ virtual TIntermMethod* getAsMethodNode() { return this; }
+ virtual const TIntermMethod* getAsMethodNode() const { return this; }
+ virtual const TString& getMethodName() const { return method; }
+ virtual TIntermTyped* getObject() const { return object; }
+ virtual void traverse(TIntermTraverser*);
+protected:
+ TIntermTyped* object;
+ TString method;
+};
+
+//
+// Nodes that correspond to symbols or constants in the source code.
+//
+class TIntermSymbol : public TIntermTyped {
+public:
+ // if symbol is initialized as symbol(sym), the memory comes from the pool allocator of sym. If sym comes from
+ // per process threadPoolAllocator, then it causes increased memory usage per compile
+ // it is essential to use "symbol = sym" to assign to symbol
+ TIntermSymbol(int i, const TString& n, const TType& t)
+ : TIntermTyped(t), id(i), constSubtree(nullptr)
+ { name = n; }
+ virtual int getId() const { return id; }
+ virtual const TString& getName() const { return name; }
+ virtual void traverse(TIntermTraverser*);
+ virtual TIntermSymbol* getAsSymbolNode() { return this; }
+ virtual const TIntermSymbol* getAsSymbolNode() const { return this; }
+ void setConstArray(const TConstUnionArray& c) { constArray = c; }
+ const TConstUnionArray& getConstArray() const { return constArray; }
+ void setConstSubtree(TIntermTyped* subtree) { constSubtree = subtree; }
+ TIntermTyped* getConstSubtree() const { return constSubtree; }
+protected:
+ int id; // the unique id of the symbol this node represents
+ TString name; // the name of the symbol this node represents
+ TConstUnionArray constArray; // if the symbol is a front-end compile-time constant, this is its value
+ TIntermTyped* constSubtree;
+};
+
+class TIntermConstantUnion : public TIntermTyped {
+public:
+ TIntermConstantUnion(const TConstUnionArray& ua, const TType& t) : TIntermTyped(t), constArray(ua), literal(false) { }
+ const TConstUnionArray& getConstArray() const { return constArray; }
+ virtual TIntermConstantUnion* getAsConstantUnion() { return this; }
+ virtual const TIntermConstantUnion* getAsConstantUnion() const { return this; }
+ virtual void traverse(TIntermTraverser*);
+ virtual TIntermTyped* fold(TOperator, const TIntermTyped*) const;
+ virtual TIntermTyped* fold(TOperator, const TType&) const;
+ void setLiteral() { literal = true; }
+ void setExpression() { literal = false; }
+ bool isLiteral() const { return literal; }
+protected:
+ const TConstUnionArray constArray;
+ bool literal; // true if node represents a literal in the source code
+};
+
+// Represent the independent aspects of a texturing TOperator
+struct TCrackedTextureOp {
+ bool query;
+ bool proj;
+ bool lod;
+ bool fetch;
+ bool offset;
+ bool offsets;
+ bool gather;
+ bool grad;
+ bool subpass;
+ bool lodClamp;
+};
+
+//
+// Intermediate class for node types that hold operators.
+//
+class TIntermOperator : public TIntermTyped {
+public:
+ virtual TIntermOperator* getAsOperator() { return this; }
+ virtual const TIntermOperator* getAsOperator() const { return this; }
+ TOperator getOp() const { return op; }
+ virtual bool promote() { return true; }
+ bool modifiesState() const;
+ bool isConstructor() const;
+ bool isTexture() const { return op > EOpTextureGuardBegin && op < EOpTextureGuardEnd; }
+ bool isImage() const { return op > EOpImageGuardBegin && op < EOpImageGuardEnd; }
+ bool isSparseTexture() const { return op > EOpSparseTextureGuardBegin && op < EOpSparseTextureGuardEnd; }
+ bool isSparseImage() const { return op == EOpSparseImageLoad; }
+
+ // Crack the op into the individual dimensions of texturing operation.
+ void crackTexture(TSampler sampler, TCrackedTextureOp& cracked) const
+ {
+ cracked.query = false;
+ cracked.proj = false;
+ cracked.lod = false;
+ cracked.fetch = false;
+ cracked.offset = false;
+ cracked.offsets = false;
+ cracked.gather = false;
+ cracked.grad = false;
+ cracked.subpass = false;
+ cracked.lodClamp = false;
+
+ switch (op) {
+ case EOpImageQuerySize:
+ case EOpImageQuerySamples:
+ case EOpTextureQuerySize:
+ case EOpTextureQueryLod:
+ case EOpTextureQueryLevels:
+ case EOpTextureQuerySamples:
+ case EOpSparseTexelsResident:
+ cracked.query = true;
+ break;
+ case EOpTexture:
+ case EOpSparseTexture:
+ break;
+ case EOpTextureClamp:
+ case EOpSparseTextureClamp:
+ cracked.lodClamp = true;
+ break;
+ case EOpTextureProj:
+ cracked.proj = true;
+ break;
+ case EOpTextureLod:
+ case EOpSparseTextureLod:
+ cracked.lod = true;
+ break;
+ case EOpTextureOffset:
+ case EOpSparseTextureOffset:
+ cracked.offset = true;
+ break;
+ case EOpTextureOffsetClamp:
+ case EOpSparseTextureOffsetClamp:
+ cracked.offset = true;
+ cracked.lodClamp = true;
+ break;
+ case EOpTextureFetch:
+ case EOpSparseTextureFetch:
+ cracked.fetch = true;
+ if (sampler.dim == Esd1D || (sampler.dim == Esd2D && ! sampler.ms) || sampler.dim == Esd3D)
+ cracked.lod = true;
+ break;
+ case EOpTextureFetchOffset:
+ case EOpSparseTextureFetchOffset:
+ cracked.fetch = true;
+ cracked.offset = true;
+ if (sampler.dim == Esd1D || (sampler.dim == Esd2D && ! sampler.ms) || sampler.dim == Esd3D)
+ cracked.lod = true;
+ break;
+ case EOpTextureProjOffset:
+ cracked.offset = true;
+ cracked.proj = true;
+ break;
+ case EOpTextureLodOffset:
+ case EOpSparseTextureLodOffset:
+ cracked.offset = true;
+ cracked.lod = true;
+ break;
+ case EOpTextureProjLod:
+ cracked.lod = true;
+ cracked.proj = true;
+ break;
+ case EOpTextureProjLodOffset:
+ cracked.offset = true;
+ cracked.lod = true;
+ cracked.proj = true;
+ break;
+ case EOpTextureGrad:
+ case EOpSparseTextureGrad:
+ cracked.grad = true;
+ break;
+ case EOpTextureGradClamp:
+ case EOpSparseTextureGradClamp:
+ cracked.grad = true;
+ cracked.lodClamp = true;
+ break;
+ case EOpTextureGradOffset:
+ case EOpSparseTextureGradOffset:
+ cracked.grad = true;
+ cracked.offset = true;
+ break;
+ case EOpTextureProjGrad:
+ cracked.grad = true;
+ cracked.proj = true;
+ break;
+ case EOpTextureProjGradOffset:
+ cracked.grad = true;
+ cracked.offset = true;
+ cracked.proj = true;
+ break;
+ case EOpTextureGradOffsetClamp:
+ case EOpSparseTextureGradOffsetClamp:
+ cracked.grad = true;
+ cracked.offset = true;
+ cracked.lodClamp = true;
+ break;
+ case EOpTextureGather:
+ case EOpSparseTextureGather:
+ cracked.gather = true;
+ break;
+ case EOpTextureGatherOffset:
+ case EOpSparseTextureGatherOffset:
+ cracked.gather = true;
+ cracked.offset = true;
+ break;
+ case EOpTextureGatherOffsets:
+ case EOpSparseTextureGatherOffsets:
+ cracked.gather = true;
+ cracked.offsets = true;
+ break;
+ case EOpSubpassLoad:
+ case EOpSubpassLoadMS:
+ cracked.subpass = true;
+ break;
+ default:
+ break;
+ }
+ }
+
+protected:
+ TIntermOperator(TOperator o) : TIntermTyped(EbtFloat), op(o) {}
+ TIntermOperator(TOperator o, TType& t) : TIntermTyped(t), op(o) {}
+ TOperator op;
+};
+
+//
+// Nodes for all the basic binary math operators.
+//
+class TIntermBinary : public TIntermOperator {
+public:
+ TIntermBinary(TOperator o) : TIntermOperator(o) {}
+ virtual void traverse(TIntermTraverser*);
+ virtual void setLeft(TIntermTyped* n) { left = n; }
+ virtual void setRight(TIntermTyped* n) { right = n; }
+ virtual TIntermTyped* getLeft() const { return left; }
+ virtual TIntermTyped* getRight() const { return right; }
+ virtual TIntermBinary* getAsBinaryNode() { return this; }
+ virtual const TIntermBinary* getAsBinaryNode() const { return this; }
+ virtual bool promote();
+ virtual void updatePrecision();
+protected:
+ TIntermTyped* left;
+ TIntermTyped* right;
+};
+
+//
+// Nodes for unary math operators.
+//
+class TIntermUnary : public TIntermOperator {
+public:
+ TIntermUnary(TOperator o, TType& t) : TIntermOperator(o, t), operand(0) {}
+ TIntermUnary(TOperator o) : TIntermOperator(o), operand(0) {}
+ virtual void traverse(TIntermTraverser*);
+ virtual void setOperand(TIntermTyped* o) { operand = o; }
+ virtual TIntermTyped* getOperand() { return operand; }
+ virtual const TIntermTyped* getOperand() const { return operand; }
+ virtual TIntermUnary* getAsUnaryNode() { return this; }
+ virtual const TIntermUnary* getAsUnaryNode() const { return this; }
+ virtual bool promote();
+ virtual void updatePrecision();
+protected:
+ TIntermTyped* operand;
+};
+
+typedef TVector<TIntermNode*> TIntermSequence;
+typedef TVector<int> TQualifierList;
+//
+// Nodes that operate on an arbitrary sized set of children.
+//
+class TIntermAggregate : public TIntermOperator {
+public:
+ TIntermAggregate() : TIntermOperator(EOpNull), userDefined(false), pragmaTable(0) { }
+ TIntermAggregate(TOperator o) : TIntermOperator(o), pragmaTable(0) { }
+ ~TIntermAggregate() { delete pragmaTable; }
+ virtual TIntermAggregate* getAsAggregate() { return this; }
+ virtual const TIntermAggregate* getAsAggregate() const { return this; }
+ virtual void setOperator(TOperator o) { op = o; }
+ virtual TIntermSequence& getSequence() { return sequence; }
+ virtual const TIntermSequence& getSequence() const { return sequence; }
+ virtual void setName(const TString& n) { name = n; }
+ virtual const TString& getName() const { return name; }
+ virtual void traverse(TIntermTraverser*);
+ virtual void setUserDefined() { userDefined = true; }
+ virtual bool isUserDefined() { return userDefined; }
+ virtual TQualifierList& getQualifierList() { return qualifier; }
+ virtual const TQualifierList& getQualifierList() const { return qualifier; }
+ void setOptimize(bool o) { optimize = o; }
+ void setDebug(bool d) { debug = d; }
+ bool getOptimize() const { return optimize; }
+ bool getDebug() const { return debug; }
+ void addToPragmaTable(const TPragmaTable& pTable);
+ const TPragmaTable& getPragmaTable() const { return *pragmaTable; }
+protected:
+ TIntermAggregate(const TIntermAggregate&); // disallow copy constructor
+ TIntermAggregate& operator=(const TIntermAggregate&); // disallow assignment operator
+ TIntermSequence sequence;
+ TQualifierList qualifier;
+ TString name;
+ bool userDefined; // used for user defined function names
+ bool optimize;
+ bool debug;
+ TPragmaTable* pragmaTable;
+};
+
+//
+// For if tests.
+//
+class TIntermSelection : public TIntermTyped {
+public:
+ TIntermSelection(TIntermTyped* cond, TIntermNode* trueB, TIntermNode* falseB) :
+ TIntermTyped(EbtVoid), condition(cond), trueBlock(trueB), falseBlock(falseB) {}
+ TIntermSelection(TIntermTyped* cond, TIntermNode* trueB, TIntermNode* falseB, const TType& type) :
+ TIntermTyped(type), condition(cond), trueBlock(trueB), falseBlock(falseB) {}
+ virtual void traverse(TIntermTraverser*);
+ virtual TIntermTyped* getCondition() const { return condition; }
+ virtual TIntermNode* getTrueBlock() const { return trueBlock; }
+ virtual TIntermNode* getFalseBlock() const { return falseBlock; }
+ virtual TIntermSelection* getAsSelectionNode() { return this; }
+ virtual const TIntermSelection* getAsSelectionNode() const { return this; }
+protected:
+ TIntermTyped* condition;
+ TIntermNode* trueBlock;
+ TIntermNode* falseBlock;
+};
+
+//
+// For switch statements. Designed use is that a switch will have sequence of nodes
+// that are either case/default nodes or a *single* node that represents all the code
+// in between (if any) consecutive case/defaults. So, a traversal need only deal with
+// 0 or 1 nodes per case/default statement.
+//
+class TIntermSwitch : public TIntermNode {
+public:
+ TIntermSwitch(TIntermTyped* cond, TIntermAggregate* b) : condition(cond), body(b) { }
+ virtual void traverse(TIntermTraverser*);
+ virtual TIntermNode* getCondition() const { return condition; }
+ virtual TIntermAggregate* getBody() const { return body; }
+ virtual TIntermSwitch* getAsSwitchNode() { return this; }
+ virtual const TIntermSwitch* getAsSwitchNode() const { return this; }
+protected:
+ TIntermTyped* condition;
+ TIntermAggregate* body;
+};
+
+enum TVisit
+{
+ EvPreVisit,
+ EvInVisit,
+ EvPostVisit
+};
+
+//
+// For traversing the tree. User should derive from this,
+// put their traversal specific data in it, and then pass
+// it to a Traverse method.
+//
+// When using this, just fill in the methods for nodes you want visited.
+// Return false from a pre-visit to skip visiting that node's subtree.
+//
+// Explicitly set postVisit to true if you want post visiting, otherwise,
+// filled in methods will only be called at pre-visit time (before processing
+// the subtree). Similarly for inVisit for in-order visiting of nodes with
+// multiple children.
+//
+// If you only want post-visits, explicitly turn off preVisit (and inVisit)
+// and turn on postVisit.
+//
+// In general, for the visit*() methods, return true from interior nodes
+// to have the traversal continue on to children.
+//
+// If you process children yourself, or don't want them processed, return false.
+//
+class TIntermTraverser {
+public:
+ POOL_ALLOCATOR_NEW_DELETE(glslang::GetThreadPoolAllocator())
+ TIntermTraverser(bool preVisit = true, bool inVisit = false, bool postVisit = false, bool rightToLeft = false) :
+ preVisit(preVisit),
+ inVisit(inVisit),
+ postVisit(postVisit),
+ rightToLeft(rightToLeft),
+ depth(0),
+ maxDepth(0) { }
+ virtual ~TIntermTraverser() { }
+
+ virtual void visitSymbol(TIntermSymbol*) { }
+ virtual void visitConstantUnion(TIntermConstantUnion*) { }
+ virtual bool visitBinary(TVisit, TIntermBinary*) { return true; }
+ virtual bool visitUnary(TVisit, TIntermUnary*) { return true; }
+ virtual bool visitSelection(TVisit, TIntermSelection*) { return true; }
+ virtual bool visitAggregate(TVisit, TIntermAggregate*) { return true; }
+ virtual bool visitLoop(TVisit, TIntermLoop*) { return true; }
+ virtual bool visitBranch(TVisit, TIntermBranch*) { return true; }
+ virtual bool visitSwitch(TVisit, TIntermSwitch*) { return true; }
+
+ int getMaxDepth() const { return maxDepth; }
+
+ void incrementDepth(TIntermNode *current)
+ {
+ depth++;
+ maxDepth = (std::max)(maxDepth, depth);
+ path.push_back(current);
+ }
+
+ void decrementDepth()
+ {
+ depth--;
+ path.pop_back();
+ }
+
+ TIntermNode *getParentNode()
+ {
+ return path.size() == 0 ? NULL : path.back();
+ }
+
+ const bool preVisit;
+ const bool inVisit;
+ const bool postVisit;
+ const bool rightToLeft;
+
+protected:
+ TIntermTraverser& operator=(TIntermTraverser&);
+
+ int depth;
+ int maxDepth;
+
+ // All the nodes from root to the current node's parent during traversing.
+ TVector<TIntermNode *> path;
+};
+
+// KHR_vulkan_glsl says "Two arrays sized with specialization constants are the same type only if
+// sized with the same symbol, involving no operations"
+inline bool SameSpecializationConstants(TIntermTyped* node1, TIntermTyped* node2)
+{
+ return node1->getAsSymbolNode() && node2->getAsSymbolNode() &&
+ node1->getAsSymbolNode()->getId() == node2->getAsSymbolNode()->getId();
+}
+
+} // end namespace glslang
+
+#endif // __INTERMEDIATE_H
diff --git a/chromium/third_party/glslang/src/glslang/Include/revision.h b/chromium/third_party/glslang/src/glslang/Include/revision.h
new file mode 100644
index 00000000000..e338849d452
--- /dev/null
+++ b/chromium/third_party/glslang/src/glslang/Include/revision.h
@@ -0,0 +1,6 @@
+// This header is generated by the make-revision script.
+// For the version, it uses the latest git tag followed by the number of commits.
+// For the date, it uses the current date (when then script is run).
+
+#define GLSLANG_REVISION "SPIRV99.947"
+#define GLSLANG_DATE "15-Feb-2016"
diff --git a/chromium/third_party/glslang/src/glslang/Include/revision.template b/chromium/third_party/glslang/src/glslang/Include/revision.template
new file mode 100644
index 00000000000..1d189e9372f
--- /dev/null
+++ b/chromium/third_party/glslang/src/glslang/Include/revision.template
@@ -0,0 +1,13 @@
+// The file revision.h should be updated to the latest version, somehow, on
+// check-in, if glslang has changed.
+//
+// revision.template is the source for revision.h when using SubWCRev as the
+// method of updating revision.h. You don't have to do it this way, the
+// requirement is only that revision.h gets updated.
+//
+// revision.h is under source control so that not all consumers of glslang
+// source have to figure out how to create revision.h just to get a build
+// going. However, if it is not updated, it can be a version behind.
+
+#define GLSLANG_REVISION "$WCREV$"
+#define GLSLANG_DATE "$WCDATE$"
diff --git a/chromium/third_party/glslang/src/glslang/MachineIndependent/Constant.cpp b/chromium/third_party/glslang/src/glslang/MachineIndependent/Constant.cpp
new file mode 100644
index 00000000000..03033bce821
--- /dev/null
+++ b/chromium/third_party/glslang/src/glslang/MachineIndependent/Constant.cpp
@@ -0,0 +1,965 @@
+//
+//Copyright (C) 2002-2005 3Dlabs Inc. Ltd.
+//Copyright (C) 2012-2013 LunarG, 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:
+//
+// Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 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.
+//
+// Neither the name of 3Dlabs Inc. Ltd. nor the names of its
+// contributors may be used to endorse or promote products derived
+// from this software without specific prior written permission.
+//
+//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+//"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 THE
+//COPYRIGHT HOLDERS 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.
+//
+
+#include "localintermediate.h"
+#include <cmath>
+#include <cfloat>
+#include <cstdlib>
+
+namespace {
+
+using namespace glslang;
+
+typedef union {
+ double d;
+ int i[2];
+} DoubleIntUnion;
+
+// Some helper functions
+
+bool isNan(double x)
+{
+ DoubleIntUnion u;
+ // tough to find a platform independent library function, do it directly
+ u.d = x;
+ int bitPatternL = u.i[0];
+ int bitPatternH = u.i[1];
+ return (bitPatternH & 0x7ff80000) == 0x7ff80000 &&
+ ((bitPatternH & 0xFFFFF) != 0 || bitPatternL != 0);
+}
+
+bool isInf(double x)
+{
+ DoubleIntUnion u;
+ // tough to find a platform independent library function, do it directly
+ u.d = x;
+ int bitPatternL = u.i[0];
+ int bitPatternH = u.i[1];
+ return (bitPatternH & 0x7ff00000) == 0x7ff00000 &&
+ (bitPatternH & 0xFFFFF) == 0 && bitPatternL == 0;
+}
+
+const double pi = 3.1415926535897932384626433832795;
+
+} // end anonymous namespace
+
+
+namespace glslang {
+
+//
+// The fold functions see if an operation on a constant can be done in place,
+// without generating run-time code.
+//
+// Returns the node to keep using, which may or may not be the node passed in.
+//
+// Note: As of version 1.2, all constant operations must be folded. It is
+// not opportunistic, but rather a semantic requirement.
+//
+
+//
+// Do folding between a pair of nodes.
+// 'this' is the left-hand operand and 'rightConstantNode' is the right-hand operand.
+//
+// Returns a new node representing the result.
+//
+TIntermTyped* TIntermConstantUnion::fold(TOperator op, const TIntermTyped* rightConstantNode) const
+{
+ // For most cases, the return type matches the argument type, so set that
+ // up and just code to exceptions below.
+ TType returnType;
+ returnType.shallowCopy(getType());
+
+ //
+ // A pair of nodes is to be folded together
+ //
+
+ const TIntermConstantUnion *rightNode = rightConstantNode->getAsConstantUnion();
+ TConstUnionArray leftUnionArray = getConstArray();
+ TConstUnionArray rightUnionArray = rightNode->getConstArray();
+
+ // Figure out the size of the result
+ int newComps;
+ int constComps;
+ switch(op) {
+ case EOpMatrixTimesMatrix:
+ newComps = rightNode->getMatrixCols() * getMatrixRows();
+ break;
+ case EOpMatrixTimesVector:
+ newComps = getMatrixRows();
+ break;
+ case EOpVectorTimesMatrix:
+ newComps = rightNode->getMatrixCols();
+ break;
+ default:
+ newComps = getType().computeNumComponents();
+ constComps = rightConstantNode->getType().computeNumComponents();
+ if (constComps == 1 && newComps > 1) {
+ // for a case like vec4 f = vec4(2,3,4,5) + 1.2;
+ TConstUnionArray smearedArray(newComps, rightNode->getConstArray()[0]);
+ rightUnionArray = smearedArray;
+ } else if (constComps > 1 && newComps == 1) {
+ // for a case like vec4 f = 1.2 + vec4(2,3,4,5);
+ newComps = constComps;
+ rightUnionArray = rightNode->getConstArray();
+ TConstUnionArray smearedArray(newComps, getConstArray()[0]);
+ leftUnionArray = smearedArray;
+ returnType.shallowCopy(rightNode->getType());
+ }
+ break;
+ }
+
+ TConstUnionArray newConstArray(newComps);
+ TType constBool(EbtBool, EvqConst);
+
+ switch(op) {
+ case EOpAdd:
+ for (int i = 0; i < newComps; i++)
+ newConstArray[i] = leftUnionArray[i] + rightUnionArray[i];
+ break;
+ case EOpSub:
+ for (int i = 0; i < newComps; i++)
+ newConstArray[i] = leftUnionArray[i] - rightUnionArray[i];
+ break;
+
+ case EOpMul:
+ case EOpVectorTimesScalar:
+ case EOpMatrixTimesScalar:
+ for (int i = 0; i < newComps; i++)
+ newConstArray[i] = leftUnionArray[i] * rightUnionArray[i];
+ break;
+ case EOpMatrixTimesMatrix:
+ for (int row = 0; row < getMatrixRows(); row++) {
+ for (int column = 0; column < rightNode->getMatrixCols(); column++) {
+ double sum = 0.0f;
+ for (int i = 0; i < rightNode->getMatrixRows(); i++)
+ sum += leftUnionArray[i * getMatrixRows() + row].getDConst() * rightUnionArray[column * rightNode->getMatrixRows() + i].getDConst();
+ newConstArray[column * getMatrixRows() + row].setDConst(sum);
+ }
+ }
+ returnType.shallowCopy(TType(getType().getBasicType(), EvqConst, 0, rightNode->getMatrixCols(), getMatrixRows()));
+ break;
+ case EOpDiv:
+ for (int i = 0; i < newComps; i++) {
+ switch (getType().getBasicType()) {
+ case EbtDouble:
+ case EbtFloat:
+ newConstArray[i].setDConst(leftUnionArray[i].getDConst() / rightUnionArray[i].getDConst());
+ break;
+
+ case EbtInt:
+ if (rightUnionArray[i] == 0)
+ newConstArray[i].setIConst(0x7FFFFFFF);
+ else if (rightUnionArray[i].getIConst() == -1 && leftUnionArray[i].getIConst() == (int)0x80000000)
+ newConstArray[i].setIConst(0x80000000);
+ else
+ newConstArray[i].setIConst(leftUnionArray[i].getIConst() / rightUnionArray[i].getIConst());
+ break;
+
+ case EbtUint:
+ if (rightUnionArray[i] == 0) {
+ newConstArray[i].setUConst(0xFFFFFFFF);
+ } else
+ newConstArray[i].setUConst(leftUnionArray[i].getUConst() / rightUnionArray[i].getUConst());
+ break;
+
+ case EbtInt64:
+ if (rightUnionArray[i] == 0)
+ newConstArray[i].setI64Const(0x7FFFFFFFFFFFFFFFll);
+ else if (rightUnionArray[i].getI64Const() == -1 && leftUnionArray[i].getI64Const() == (long long)0x8000000000000000)
+ newConstArray[i].setI64Const(0x8000000000000000);
+ else
+ newConstArray[i].setI64Const(leftUnionArray[i].getI64Const() / rightUnionArray[i].getI64Const());
+ break;
+
+ case EbtUint64:
+ if (rightUnionArray[i] == 0) {
+ newConstArray[i].setU64Const(0xFFFFFFFFFFFFFFFFull);
+ } else
+ newConstArray[i].setU64Const(leftUnionArray[i].getU64Const() / rightUnionArray[i].getU64Const());
+ break;
+ default:
+ return 0;
+ }
+ }
+ break;
+
+ case EOpMatrixTimesVector:
+ for (int i = 0; i < getMatrixRows(); i++) {
+ double sum = 0.0f;
+ for (int j = 0; j < rightNode->getVectorSize(); j++) {
+ sum += leftUnionArray[j*getMatrixRows() + i].getDConst() * rightUnionArray[j].getDConst();
+ }
+ newConstArray[i].setDConst(sum);
+ }
+
+ returnType.shallowCopy(TType(getBasicType(), EvqConst, getMatrixRows()));
+ break;
+
+ case EOpVectorTimesMatrix:
+ for (int i = 0; i < rightNode->getMatrixCols(); i++) {
+ double sum = 0.0f;
+ for (int j = 0; j < getVectorSize(); j++)
+ sum += leftUnionArray[j].getDConst() * rightUnionArray[i*rightNode->getMatrixRows() + j].getDConst();
+ newConstArray[i].setDConst(sum);
+ }
+
+ returnType.shallowCopy(TType(getBasicType(), EvqConst, rightNode->getMatrixCols()));
+ break;
+
+ case EOpMod:
+ for (int i = 0; i < newComps; i++) {
+ if (rightUnionArray[i] == 0)
+ newConstArray[i] = leftUnionArray[i];
+ else
+ newConstArray[i] = leftUnionArray[i] % rightUnionArray[i];
+ }
+ break;
+
+ case EOpRightShift:
+ for (int i = 0; i < newComps; i++)
+ newConstArray[i] = leftUnionArray[i] >> rightUnionArray[i];
+ break;
+
+ case EOpLeftShift:
+ for (int i = 0; i < newComps; i++)
+ newConstArray[i] = leftUnionArray[i] << rightUnionArray[i];
+ break;
+
+ case EOpAnd:
+ for (int i = 0; i < newComps; i++)
+ newConstArray[i] = leftUnionArray[i] & rightUnionArray[i];
+ break;
+ case EOpInclusiveOr:
+ for (int i = 0; i < newComps; i++)
+ newConstArray[i] = leftUnionArray[i] | rightUnionArray[i];
+ break;
+ case EOpExclusiveOr:
+ for (int i = 0; i < newComps; i++)
+ newConstArray[i] = leftUnionArray[i] ^ rightUnionArray[i];
+ break;
+
+ case EOpLogicalAnd: // this code is written for possible future use, will not get executed currently
+ for (int i = 0; i < newComps; i++)
+ newConstArray[i] = leftUnionArray[i] && rightUnionArray[i];
+ break;
+
+ case EOpLogicalOr: // this code is written for possible future use, will not get executed currently
+ for (int i = 0; i < newComps; i++)
+ newConstArray[i] = leftUnionArray[i] || rightUnionArray[i];
+ break;
+
+ case EOpLogicalXor:
+ for (int i = 0; i < newComps; i++) {
+ switch (getType().getBasicType()) {
+ case EbtBool: newConstArray[i].setBConst((leftUnionArray[i] == rightUnionArray[i]) ? false : true); break;
+ default: assert(false && "Default missing");
+ }
+ }
+ break;
+
+ case EOpLessThan:
+ newConstArray[0].setBConst(leftUnionArray[0] < rightUnionArray[0]);
+ returnType.shallowCopy(constBool);
+ break;
+ case EOpGreaterThan:
+ newConstArray[0].setBConst(leftUnionArray[0] > rightUnionArray[0]);
+ returnType.shallowCopy(constBool);
+ break;
+ case EOpLessThanEqual:
+ newConstArray[0].setBConst(! (leftUnionArray[0] > rightUnionArray[0]));
+ returnType.shallowCopy(constBool);
+ break;
+ case EOpGreaterThanEqual:
+ newConstArray[0].setBConst(! (leftUnionArray[0] < rightUnionArray[0]));
+ returnType.shallowCopy(constBool);
+ break;
+ case EOpEqual:
+ newConstArray[0].setBConst(rightNode->getConstArray() == leftUnionArray);
+ returnType.shallowCopy(constBool);
+ break;
+ case EOpNotEqual:
+ newConstArray[0].setBConst(rightNode->getConstArray() != leftUnionArray);
+ returnType.shallowCopy(constBool);
+ break;
+
+ default:
+ return 0;
+ }
+
+ TIntermConstantUnion *newNode = new TIntermConstantUnion(newConstArray, returnType);
+ newNode->setLoc(getLoc());
+
+ return newNode;
+}
+
+//
+// Do single unary node folding
+//
+// Returns a new node representing the result.
+//
+TIntermTyped* TIntermConstantUnion::fold(TOperator op, const TType& returnType) const
+{
+ // First, size the result, which is mostly the same as the argument's size,
+ // but not always, and classify what is componentwise.
+ // Also, eliminate cases that can't be compile-time constant.
+ int resultSize;
+ bool componentWise = true;
+
+ int objectSize = getType().computeNumComponents();
+ switch (op) {
+ case EOpDeterminant:
+ case EOpAny:
+ case EOpAll:
+ case EOpLength:
+ componentWise = false;
+ resultSize = 1;
+ break;
+
+ case EOpEmitStreamVertex:
+ case EOpEndStreamPrimitive:
+ // These don't actually fold
+ return 0;
+
+ case EOpPackSnorm2x16:
+ case EOpPackUnorm2x16:
+ case EOpPackHalf2x16:
+ componentWise = false;
+ resultSize = 1;
+ break;
+
+ case EOpUnpackSnorm2x16:
+ case EOpUnpackUnorm2x16:
+ case EOpUnpackHalf2x16:
+ componentWise = false;
+ resultSize = 2;
+ break;
+
+ case EOpNormalize:
+ componentWise = false;
+ resultSize = objectSize;
+ break;
+
+ default:
+ resultSize = objectSize;
+ break;
+ }
+
+ // Set up for processing
+ TConstUnionArray newConstArray(resultSize);
+ const TConstUnionArray& unionArray = getConstArray();
+
+ // Process non-component-wise operations
+ switch (op) {
+ case EOpLength:
+ case EOpNormalize:
+ {
+ double sum = 0;
+ for (int i = 0; i < objectSize; i++)
+ sum += unionArray[i].getDConst() * unionArray[i].getDConst();
+ double length = sqrt(sum);
+ if (op == EOpLength)
+ newConstArray[0].setDConst(length);
+ else {
+ for (int i = 0; i < objectSize; i++)
+ newConstArray[i].setDConst(unionArray[i].getDConst() / length);
+ }
+ break;
+ }
+
+ // TODO: 3.0 Functionality: unary constant folding: the rest of the ops have to be fleshed out
+
+ case EOpPackSnorm2x16:
+ case EOpPackUnorm2x16:
+ case EOpPackHalf2x16:
+
+ case EOpUnpackSnorm2x16:
+ case EOpUnpackUnorm2x16:
+ case EOpUnpackHalf2x16:
+
+ case EOpDeterminant:
+ case EOpMatrixInverse:
+ case EOpTranspose:
+
+ case EOpAny:
+ case EOpAll:
+ return 0;
+
+ default:
+ assert(componentWise);
+ break;
+ }
+
+ // Turn off the componentwise loop
+ if (! componentWise)
+ objectSize = 0;
+
+ // Process component-wise operations
+ for (int i = 0; i < objectSize; i++) {
+ switch (op) {
+ case EOpNegative:
+ switch (getType().getBasicType()) {
+ case EbtDouble:
+ case EbtFloat: newConstArray[i].setDConst(-unionArray[i].getDConst()); break;
+ case EbtInt: newConstArray[i].setIConst(-unionArray[i].getIConst()); break;
+ case EbtUint: newConstArray[i].setUConst(static_cast<unsigned int>(-static_cast<int>(unionArray[i].getUConst()))); break;
+ case EbtInt64: newConstArray[i].setI64Const(-unionArray[i].getI64Const()); break;
+ case EbtUint64: newConstArray[i].setU64Const(static_cast<unsigned int>(-static_cast<int>(unionArray[i].getU64Const()))); break;
+ default:
+ return 0;
+ }
+ break;
+ case EOpLogicalNot:
+ case EOpVectorLogicalNot:
+ switch (getType().getBasicType()) {
+ case EbtBool: newConstArray[i].setBConst(!unionArray[i].getBConst()); break;
+ default:
+ return 0;
+ }
+ break;
+ case EOpBitwiseNot:
+ newConstArray[i] = ~unionArray[i];
+ break;
+ case EOpRadians:
+ newConstArray[i].setDConst(unionArray[i].getDConst() * pi / 180.0);
+ break;
+ case EOpDegrees:
+ newConstArray[i].setDConst(unionArray[i].getDConst() * 180.0 / pi);
+ break;
+ case EOpSin:
+ newConstArray[i].setDConst(sin(unionArray[i].getDConst()));
+ break;
+ case EOpCos:
+ newConstArray[i].setDConst(cos(unionArray[i].getDConst()));
+ break;
+ case EOpTan:
+ newConstArray[i].setDConst(tan(unionArray[i].getDConst()));
+ break;
+ case EOpAsin:
+ newConstArray[i].setDConst(asin(unionArray[i].getDConst()));
+ break;
+ case EOpAcos:
+ newConstArray[i].setDConst(acos(unionArray[i].getDConst()));
+ break;
+ case EOpAtan:
+ newConstArray[i].setDConst(atan(unionArray[i].getDConst()));
+ break;
+
+ case EOpDPdx:
+ case EOpDPdy:
+ case EOpFwidth:
+ case EOpDPdxFine:
+ case EOpDPdyFine:
+ case EOpFwidthFine:
+ case EOpDPdxCoarse:
+ case EOpDPdyCoarse:
+ case EOpFwidthCoarse:
+ // The derivatives are all mandated to create a constant 0.
+ newConstArray[i].setDConst(0.0);
+ break;
+
+ case EOpExp:
+ newConstArray[i].setDConst(exp(unionArray[i].getDConst()));
+ break;
+ case EOpLog:
+ newConstArray[i].setDConst(log(unionArray[i].getDConst()));
+ break;
+ case EOpExp2:
+ {
+ const double inv_log2_e = 0.69314718055994530941723212145818;
+ newConstArray[i].setDConst(exp(unionArray[i].getDConst() * inv_log2_e));
+ break;
+ }
+ case EOpLog2:
+ {
+ const double log2_e = 1.4426950408889634073599246810019;
+ newConstArray[i].setDConst(log2_e * log(unionArray[i].getDConst()));
+ break;
+ }
+ case EOpSqrt:
+ newConstArray[i].setDConst(sqrt(unionArray[i].getDConst()));
+ break;
+ case EOpInverseSqrt:
+ newConstArray[i].setDConst(1.0 / sqrt(unionArray[i].getDConst()));
+ break;
+
+ case EOpAbs:
+ if (unionArray[i].getType() == EbtDouble)
+ newConstArray[i].setDConst(fabs(unionArray[i].getDConst()));
+ else if (unionArray[i].getType() == EbtInt)
+ newConstArray[i].setIConst(abs(unionArray[i].getIConst()));
+ else
+ newConstArray[i] = unionArray[i];
+ break;
+ case EOpSign:
+ #define SIGN(X) (X == 0 ? 0 : (X < 0 ? -1 : 1))
+ if (unionArray[i].getType() == EbtDouble)
+ newConstArray[i].setDConst(SIGN(unionArray[i].getDConst()));
+ else
+ newConstArray[i].setIConst(SIGN(unionArray[i].getIConst()));
+ break;
+ case EOpFloor:
+ newConstArray[i].setDConst(floor(unionArray[i].getDConst()));
+ break;
+ case EOpTrunc:
+ if (unionArray[i].getDConst() > 0)
+ newConstArray[i].setDConst(floor(unionArray[i].getDConst()));
+ else
+ newConstArray[i].setDConst(ceil(unionArray[i].getDConst()));
+ break;
+ case EOpRound:
+ newConstArray[i].setDConst(floor(0.5 + unionArray[i].getDConst()));
+ break;
+ case EOpRoundEven:
+ {
+ double flr = floor(unionArray[i].getDConst());
+ bool even = flr / 2.0 == floor(flr / 2.0);
+ double rounded = even ? ceil(unionArray[i].getDConst() - 0.5) : floor(unionArray[i].getDConst() + 0.5);
+ newConstArray[i].setDConst(rounded);
+ break;
+ }
+ case EOpCeil:
+ newConstArray[i].setDConst(ceil(unionArray[i].getDConst()));
+ break;
+ case EOpFract:
+ {
+ double x = unionArray[i].getDConst();
+ newConstArray[i].setDConst(x - floor(x));
+ break;
+ }
+
+ case EOpIsNan:
+ {
+ newConstArray[i].setBConst(isNan(unionArray[i].getDConst()));
+ break;
+ }
+ case EOpIsInf:
+ {
+ newConstArray[i].setBConst(isInf(unionArray[i].getDConst()));
+ break;
+ }
+
+ // TODO: 3.0 Functionality: unary constant folding: the rest of the ops have to be fleshed out
+
+ case EOpSinh:
+ case EOpCosh:
+ case EOpTanh:
+ case EOpAsinh:
+ case EOpAcosh:
+ case EOpAtanh:
+
+ case EOpFloatBitsToInt:
+ case EOpFloatBitsToUint:
+ case EOpIntBitsToFloat:
+ case EOpUintBitsToFloat:
+ case EOpDoubleBitsToInt64:
+ case EOpDoubleBitsToUint64:
+
+ default:
+ return 0;
+ }
+ }
+
+ TIntermConstantUnion *newNode = new TIntermConstantUnion(newConstArray, returnType);
+ newNode->getWritableType().getQualifier().storage = EvqConst;
+ newNode->setLoc(getLoc());
+
+ return newNode;
+}
+
+//
+// Do constant folding for an aggregate node that has all its children
+// as constants and an operator that requires constant folding.
+//
+TIntermTyped* TIntermediate::fold(TIntermAggregate* aggrNode)
+{
+ if (! areAllChildConst(aggrNode))
+ return aggrNode;
+
+ if (aggrNode->isConstructor())
+ return foldConstructor(aggrNode);
+
+ TIntermSequence& children = aggrNode->getSequence();
+
+ // First, see if this is an operation to constant fold, kick out if not,
+ // see what size the result is if so.
+
+ bool componentwise = false; // will also say componentwise if a scalar argument gets repeated to make per-component results
+ int objectSize;
+ switch (aggrNode->getOp()) {
+ case EOpAtan:
+ case EOpPow:
+ case EOpMin:
+ case EOpMax:
+ case EOpMix:
+ case EOpClamp:
+ case EOpLessThan:
+ case EOpGreaterThan:
+ case EOpLessThanEqual:
+ case EOpGreaterThanEqual:
+ case EOpVectorEqual:
+ case EOpVectorNotEqual:
+ componentwise = true;
+ objectSize = children[0]->getAsConstantUnion()->getType().computeNumComponents();
+ break;
+ case EOpCross:
+ case EOpReflect:
+ case EOpRefract:
+ case EOpFaceForward:
+ objectSize = children[0]->getAsConstantUnion()->getType().computeNumComponents();
+ break;
+ case EOpDistance:
+ case EOpDot:
+ objectSize = 1;
+ break;
+ case EOpOuterProduct:
+ objectSize = children[0]->getAsTyped()->getType().getVectorSize() *
+ children[1]->getAsTyped()->getType().getVectorSize();
+ break;
+ case EOpStep:
+ componentwise = true;
+ objectSize = std::max(children[0]->getAsTyped()->getType().getVectorSize(),
+ children[1]->getAsTyped()->getType().getVectorSize());
+ break;
+ case EOpSmoothStep:
+ componentwise = true;
+ objectSize = std::max(children[0]->getAsTyped()->getType().getVectorSize(),
+ children[2]->getAsTyped()->getType().getVectorSize());
+ break;
+ default:
+ return aggrNode;
+ }
+ TConstUnionArray newConstArray(objectSize);
+
+ TVector<TConstUnionArray> childConstUnions;
+ for (unsigned int arg = 0; arg < children.size(); ++arg)
+ childConstUnions.push_back(children[arg]->getAsConstantUnion()->getConstArray());
+
+ // Second, do the actual folding
+
+ bool isFloatingPoint = children[0]->getAsTyped()->getBasicType() == EbtFloat ||
+ children[0]->getAsTyped()->getBasicType() == EbtDouble;
+ bool isSigned = children[0]->getAsTyped()->getBasicType() == EbtInt ||
+ children[0]->getAsTyped()->getBasicType() == EbtInt64;
+ bool isInt64 = children[0]->getAsTyped()->getBasicType() == EbtInt64 ||
+ children[0]->getAsTyped()->getBasicType() == EbtUint64;
+ if (componentwise) {
+ for (int comp = 0; comp < objectSize; comp++) {
+
+ // some arguments are scalars instead of matching vectors; simulate a smear
+ int arg0comp = std::min(comp, children[0]->getAsTyped()->getType().getVectorSize() - 1);
+ int arg1comp = 0;
+ if (children.size() > 1)
+ arg1comp = std::min(comp, children[1]->getAsTyped()->getType().getVectorSize() - 1);
+ int arg2comp = 0;
+ if (children.size() > 2)
+ arg2comp = std::min(comp, children[2]->getAsTyped()->getType().getVectorSize() - 1);
+
+ switch (aggrNode->getOp()) {
+ case EOpAtan:
+ newConstArray[comp].setDConst(atan2(childConstUnions[0][arg0comp].getDConst(), childConstUnions[1][arg1comp].getDConst()));
+ break;
+ case EOpPow:
+ newConstArray[comp].setDConst(pow(childConstUnions[0][arg0comp].getDConst(), childConstUnions[1][arg1comp].getDConst()));
+ break;
+ case EOpMin:
+ if (isFloatingPoint)
+ newConstArray[comp].setDConst(std::min(childConstUnions[0][arg0comp].getDConst(), childConstUnions[1][arg1comp].getDConst()));
+ else if (isSigned) {
+ if (isInt64)
+ newConstArray[comp].setI64Const(std::min(childConstUnions[0][arg0comp].getI64Const(), childConstUnions[1][arg1comp].getI64Const()));
+ else
+ newConstArray[comp].setIConst(std::min(childConstUnions[0][arg0comp].getIConst(), childConstUnions[1][arg1comp].getIConst()));
+ } else {
+ if (isInt64)
+ newConstArray[comp].setU64Const(std::min(childConstUnions[0][arg0comp].getU64Const(), childConstUnions[1][arg1comp].getU64Const()));
+ else
+ newConstArray[comp].setUConst(std::min(childConstUnions[0][arg0comp].getUConst(), childConstUnions[1][arg1comp].getUConst()));
+ }
+ break;
+ case EOpMax:
+ if (isFloatingPoint)
+ newConstArray[comp].setDConst(std::max(childConstUnions[0][arg0comp].getDConst(), childConstUnions[1][arg1comp].getDConst()));
+ else if (isSigned) {
+ if (isInt64)
+ newConstArray[comp].setI64Const(std::max(childConstUnions[0][arg0comp].getI64Const(), childConstUnions[1][arg1comp].getI64Const()));
+ else
+ newConstArray[comp].setIConst(std::max(childConstUnions[0][arg0comp].getIConst(), childConstUnions[1][arg1comp].getIConst()));
+ } else {
+ if (isInt64)
+ newConstArray[comp].setU64Const(std::max(childConstUnions[0][arg0comp].getU64Const(), childConstUnions[1][arg1comp].getU64Const()));
+ else
+ newConstArray[comp].setUConst(std::max(childConstUnions[0][arg0comp].getUConst(), childConstUnions[1][arg1comp].getUConst()));
+ }
+ break;
+ case EOpClamp:
+ if (isFloatingPoint)
+ newConstArray[comp].setDConst(std::min(std::max(childConstUnions[0][arg0comp].getDConst(), childConstUnions[1][arg1comp].getDConst()),
+ childConstUnions[2][arg2comp].getDConst()));
+ else if (isSigned) {
+ if (isInt64)
+ newConstArray[comp].setI64Const(std::min(std::max(childConstUnions[0][arg0comp].getI64Const(), childConstUnions[1][arg1comp].getI64Const()),
+ childConstUnions[2][arg2comp].getI64Const()));
+ else
+ newConstArray[comp].setIConst(std::min(std::max(childConstUnions[0][arg0comp].getIConst(), childConstUnions[1][arg1comp].getIConst()),
+ childConstUnions[2][arg2comp].getIConst()));
+ } else {
+ if (isInt64)
+ newConstArray[comp].setU64Const(std::min(std::max(childConstUnions[0][arg0comp].getU64Const(), childConstUnions[1][arg1comp].getU64Const()),
+ childConstUnions[2][arg2comp].getU64Const()));
+ else
+ newConstArray[comp].setUConst(std::min(std::max(childConstUnions[0][arg0comp].getUConst(), childConstUnions[1][arg1comp].getUConst()),
+ childConstUnions[2][arg2comp].getUConst()));
+ }
+ break;
+ case EOpLessThan:
+ newConstArray[comp].setBConst(childConstUnions[0][arg0comp] < childConstUnions[1][arg1comp]);
+ break;
+ case EOpGreaterThan:
+ newConstArray[comp].setBConst(childConstUnions[0][arg0comp] > childConstUnions[1][arg1comp]);
+ break;
+ case EOpLessThanEqual:
+ newConstArray[comp].setBConst(! (childConstUnions[0][arg0comp] > childConstUnions[1][arg1comp]));
+ break;
+ case EOpGreaterThanEqual:
+ newConstArray[comp].setBConst(! (childConstUnions[0][arg0comp] < childConstUnions[1][arg1comp]));
+ break;
+ case EOpVectorEqual:
+ newConstArray[comp].setBConst(childConstUnions[0][arg0comp] == childConstUnions[1][arg1comp]);
+ break;
+ case EOpVectorNotEqual:
+ newConstArray[comp].setBConst(childConstUnions[0][arg0comp] != childConstUnions[1][arg1comp]);
+ break;
+ case EOpMix:
+ if (children[2]->getAsTyped()->getBasicType() == EbtBool)
+ newConstArray[comp].setDConst(childConstUnions[2][arg2comp].getBConst() ? childConstUnions[1][arg1comp].getDConst() :
+ childConstUnions[0][arg0comp].getDConst());
+ else
+ newConstArray[comp].setDConst(childConstUnions[0][arg0comp].getDConst() * (1.0 - childConstUnions[2][arg2comp].getDConst()) +
+ childConstUnions[1][arg1comp].getDConst() * childConstUnions[2][arg2comp].getDConst());
+ break;
+ case EOpStep:
+ newConstArray[comp].setDConst(childConstUnions[1][arg1comp].getDConst() < childConstUnions[0][arg0comp].getDConst() ? 0.0 : 1.0);
+ break;
+ case EOpSmoothStep:
+ {
+ double t = (childConstUnions[2][arg2comp].getDConst() - childConstUnions[0][arg0comp].getDConst()) /
+ (childConstUnions[1][arg1comp].getDConst() - childConstUnions[0][arg0comp].getDConst());
+ if (t < 0.0)
+ t = 0.0;
+ if (t > 1.0)
+ t = 1.0;
+ newConstArray[comp].setDConst(t * t * (3.0 - 2.0 * t));
+ break;
+ }
+ default:
+ return aggrNode;
+ }
+ }
+ } else {
+ // Non-componentwise...
+
+ int numComps = children[0]->getAsConstantUnion()->getType().computeNumComponents();
+ double dot;
+
+ switch (aggrNode->getOp()) {
+ case EOpDistance:
+ {
+ double sum = 0.0;
+ for (int comp = 0; comp < numComps; ++comp) {
+ double diff = childConstUnions[1][comp].getDConst() - childConstUnions[0][comp].getDConst();
+ sum += diff * diff;
+ }
+ newConstArray[0].setDConst(sqrt(sum));
+ break;
+ }
+ case EOpDot:
+ newConstArray[0].setDConst(childConstUnions[0].dot(childConstUnions[1]));
+ break;
+ case EOpCross:
+ newConstArray[0] = childConstUnions[0][1] * childConstUnions[1][2] - childConstUnions[0][2] * childConstUnions[1][1];
+ newConstArray[1] = childConstUnions[0][2] * childConstUnions[1][0] - childConstUnions[0][0] * childConstUnions[1][2];
+ newConstArray[2] = childConstUnions[0][0] * childConstUnions[1][1] - childConstUnions[0][1] * childConstUnions[1][0];
+ break;
+ case EOpFaceForward:
+ // If dot(Nref, I) < 0 return N, otherwise return –N: Arguments are (N, I, Nref).
+ dot = childConstUnions[1].dot(childConstUnions[2]);
+ for (int comp = 0; comp < numComps; ++comp) {
+ if (dot < 0.0)
+ newConstArray[comp] = childConstUnions[0][comp];
+ else
+ newConstArray[comp].setDConst(-childConstUnions[0][comp].getDConst());
+ }
+ break;
+ case EOpReflect:
+ // I - 2 * dot(N, I) * N: Arguments are (I, N).
+ dot = childConstUnions[0].dot(childConstUnions[1]);
+ dot *= 2.0;
+ for (int comp = 0; comp < numComps; ++comp)
+ newConstArray[comp].setDConst(childConstUnions[0][comp].getDConst() - dot * childConstUnions[1][comp].getDConst());
+ break;
+ case EOpRefract:
+ {
+ // Arguments are (I, N, eta).
+ // k = 1.0 - eta * eta * (1.0 - dot(N, I) * dot(N, I))
+ // if (k < 0.0)
+ // return dvec(0.0)
+ // else
+ // return eta * I - (eta * dot(N, I) + sqrt(k)) * N
+ dot = childConstUnions[0].dot(childConstUnions[1]);
+ double eta = childConstUnions[2][0].getDConst();
+ double k = 1.0 - eta * eta * (1.0 - dot * dot);
+ if (k < 0.0) {
+ for (int comp = 0; comp < numComps; ++comp)
+ newConstArray[comp].setDConst(0.0);
+ } else {
+ for (int comp = 0; comp < numComps; ++comp)
+ newConstArray[comp].setDConst(eta * childConstUnions[0][comp].getDConst() - (eta * dot + sqrt(k)) * childConstUnions[1][comp].getDConst());
+ }
+ break;
+ }
+ case EOpOuterProduct:
+ {
+ int numRows = numComps;
+ int numCols = children[1]->getAsConstantUnion()->getType().computeNumComponents();
+ for (int row = 0; row < numRows; ++row)
+ for (int col = 0; col < numCols; ++col)
+ newConstArray[col * numRows + row] = childConstUnions[0][row] * childConstUnions[1][col];
+ break;
+ }
+ default:
+ return aggrNode;
+ }
+ }
+
+ TIntermConstantUnion *newNode = new TIntermConstantUnion(newConstArray, aggrNode->getType());
+ newNode->getWritableType().getQualifier().storage = EvqConst;
+ newNode->setLoc(aggrNode->getLoc());
+
+ return newNode;
+}
+
+bool TIntermediate::areAllChildConst(TIntermAggregate* aggrNode)
+{
+ bool allConstant = true;
+
+ // check if all the child nodes are constants so that they can be inserted into
+ // the parent node
+ if (aggrNode) {
+ TIntermSequence& childSequenceVector = aggrNode->getSequence();
+ for (TIntermSequence::iterator p = childSequenceVector.begin();
+ p != childSequenceVector.end(); p++) {
+ if (!(*p)->getAsTyped()->getAsConstantUnion())
+ return false;
+ }
+ }
+
+ return allConstant;
+}
+
+TIntermTyped* TIntermediate::foldConstructor(TIntermAggregate* aggrNode)
+{
+ bool error = false;
+
+ TConstUnionArray unionArray(aggrNode->getType().computeNumComponents());
+ if (aggrNode->getSequence().size() == 1)
+ error = parseConstTree(aggrNode, unionArray, aggrNode->getOp(), aggrNode->getType(), true);
+ else
+ error = parseConstTree(aggrNode, unionArray, aggrNode->getOp(), aggrNode->getType());
+
+ if (error)
+ return aggrNode;
+
+ return addConstantUnion(unionArray, aggrNode->getType(), aggrNode->getLoc());
+}
+
+//
+// Constant folding of a bracket (array-style) dereference or struct-like dot
+// dereference. Can handle anything except a multi-character swizzle, though
+// all swizzles may go to foldSwizzle().
+//
+TIntermTyped* TIntermediate::foldDereference(TIntermTyped* node, int index, const TSourceLoc& loc)
+{
+ TType dereferencedType(node->getType(), index);
+ dereferencedType.getQualifier().storage = EvqConst;
+ TIntermTyped* result = 0;
+ int size = dereferencedType.computeNumComponents();
+
+ // arrays, vectors, matrices, all use simple multiplicative math
+ // while structures need to add up heterogeneous members
+ int start;
+ if (node->isArray() || ! node->isStruct())
+ start = size * index;
+ else {
+ // it is a structure
+ assert(node->isStruct());
+ start = 0;
+ for (int i = 0; i < index; ++i)
+ start += (*node->getType().getStruct())[i].type->computeNumComponents();
+ }
+
+ result = addConstantUnion(TConstUnionArray(node->getAsConstantUnion()->getConstArray(), start, size), node->getType(), loc);
+
+ if (result == 0)
+ result = node;
+ else
+ result->setType(dereferencedType);
+
+ return result;
+}
+
+//
+// Make a constant vector node or constant scalar node, representing a given
+// constant vector and constant swizzle into it.
+//
+TIntermTyped* TIntermediate::foldSwizzle(TIntermTyped* node, TVectorFields& fields, const TSourceLoc& loc)
+{
+ const TConstUnionArray& unionArray = node->getAsConstantUnion()->getConstArray();
+ TConstUnionArray constArray(fields.num);
+
+ for (int i = 0; i < fields.num; i++)
+ constArray[i] = unionArray[fields.offsets[i]];
+
+ TIntermTyped* result = addConstantUnion(constArray, node->getType(), loc);
+
+ if (result == 0)
+ result = node;
+ else
+ result->setType(TType(node->getBasicType(), EvqConst, fields.num));
+
+ return result;
+}
+
+} // end namespace glslang
diff --git a/chromium/third_party/glslang/src/glslang/MachineIndependent/InfoSink.cpp b/chromium/third_party/glslang/src/glslang/MachineIndependent/InfoSink.cpp
new file mode 100644
index 00000000000..2e8888270b7
--- /dev/null
+++ b/chromium/third_party/glslang/src/glslang/MachineIndependent/InfoSink.cpp
@@ -0,0 +1,109 @@
+//
+//Copyright (C) 2002-2005 3Dlabs Inc. Ltd.
+//All rights reserved.
+//
+//Redistribution and use in source and binary forms, with or without
+//modification, are permitted provided that the following conditions
+//are met:
+//
+// Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 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.
+//
+// Neither the name of 3Dlabs Inc. Ltd. nor the names of its
+// contributors may be used to endorse or promote products derived
+// from this software without specific prior written permission.
+//
+//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+//"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 THE
+//COPYRIGHT HOLDERS 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.
+//
+
+#include "../Include/InfoSink.h"
+
+#include <string.h>
+
+namespace glslang {
+
+void TInfoSinkBase::append(const char* s)
+{
+ if (outputStream & EString) {
+ checkMem(strlen(s));
+ sink.append(s);
+ }
+
+//#ifdef _WIN32
+// if (outputStream & EDebugger)
+// OutputDebugString(s);
+//#endif
+
+ if (outputStream & EStdOut)
+ fprintf(stdout, "%s", s);
+}
+
+void TInfoSinkBase::append(int count, char c)
+{
+ if (outputStream & EString) {
+ checkMem(count);
+ sink.append(count, c);
+ }
+
+//#ifdef _WIN32
+// if (outputStream & EDebugger) {
+// char str[2];
+// str[0] = c;
+// str[1] = '\0';
+// OutputDebugString(str);
+// }
+//#endif
+
+ if (outputStream & EStdOut)
+ fprintf(stdout, "%c", c);
+}
+
+void TInfoSinkBase::append(const TPersistString& t)
+{
+ if (outputStream & EString) {
+ checkMem(t.size());
+ sink.append(t);
+ }
+
+//#ifdef _WIN32
+// if (outputStream & EDebugger)
+// OutputDebugString(t.c_str());
+//#endif
+
+ if (outputStream & EStdOut)
+ fprintf(stdout, "%s", t.c_str());
+}
+
+void TInfoSinkBase::append(const TString& t)
+{
+ if (outputStream & EString) {
+ checkMem(t.size());
+ sink.append(t.c_str());
+ }
+
+//#ifdef _WIN32
+// if (outputStream & EDebugger)
+// OutputDebugString(t.c_str());
+//#endif
+
+ if (outputStream & EStdOut)
+ fprintf(stdout, "%s", t.c_str());
+}
+
+} // end namespace glslang
diff --git a/chromium/third_party/glslang/src/glslang/MachineIndependent/Initialize.cpp b/chromium/third_party/glslang/src/glslang/MachineIndependent/Initialize.cpp
new file mode 100644
index 00000000000..6a9fb20192c
--- /dev/null
+++ b/chromium/third_party/glslang/src/glslang/MachineIndependent/Initialize.cpp
@@ -0,0 +1,4312 @@
+//
+//Copyright (C) 2002-2005 3Dlabs Inc. Ltd.
+//Copyright (C) 2012-2016 LunarG, Inc.
+//Copyright (C) 2015-2016 Google, 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:
+//
+// Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 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.
+//
+// Neither the name of 3Dlabs Inc. Ltd. nor the names of its
+// contributors may be used to endorse or promote products derived
+// from this software without specific prior written permission.
+//
+//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+//"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 THE
+//COPYRIGHT HOLDERS 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.
+//
+
+//
+// Create strings that declare built-in definitions, add built-ins programmatically
+// that cannot be expressed in the strings, and establish mappings between
+// built-in functions and operators.
+//
+// Where to put a built-in:
+// TBuiltIns::initialize(version,profile) context-independent textual built-ins; add them to the right string
+// TBuiltIns::initialize(resources,...) context-dependent textual built-ins; add them to the right string
+// TBuiltIns::identifyBuiltIns(...,symbolTable) context-independent programmatic additions/mappings to the symbol table,
+// including identifying what extensions are needed if a version does not allow a symbol
+// TBuiltIns::identifyBuiltIns(...,symbolTable, resources) context-dependent programmatic additions/mappings to the symbol table,
+// including identifying what extensions are needed if a version does not allow a symbol
+//
+
+#include "../Include/intermediate.h"
+#include "Initialize.h"
+
+namespace glslang {
+
+// TODO: ARB_Compatability: do full extension support
+const bool ARBCompatibility = true;
+
+const bool ForwardCompatibility = false;
+
+// change this back to false if depending on textual spellings of texturing calls when consuming the AST
+// Using PureOperatorBuiltins=false is deprecated.
+bool PureOperatorBuiltins = true;
+
+inline bool IncludeLegacy(int version, EProfile profile, int spv)
+{
+ return profile != EEsProfile && (version <= 130 || (spv == 0 && ARBCompatibility) || profile == ECompatibilityProfile);
+}
+
+// Construct TBuiltInParseables base class. This can be used for language-common constructs.
+TBuiltInParseables::TBuiltInParseables()
+{
+}
+
+// Destroy TBuiltInParseables.
+TBuiltInParseables::~TBuiltInParseables()
+{
+}
+
+TBuiltIns::TBuiltIns()
+{
+ // Set up textual representations for making all the permutations
+ // of texturing/imaging functions.
+ prefixes[EbtFloat] = "";
+ prefixes[EbtInt] = "i";
+ prefixes[EbtUint] = "u";
+ prefixes[EbtInt64] = "i64";
+ prefixes[EbtUint64] = "u64";
+ postfixes[2] = "2";
+ postfixes[3] = "3";
+ postfixes[4] = "4";
+
+ // Map from symbolic class of texturing dimension to numeric dimensions.
+ dimMap[Esd1D] = 1;
+ dimMap[Esd2D] = 2;
+ dimMap[EsdRect] = 2;
+ dimMap[Esd3D] = 3;
+ dimMap[EsdCube] = 3;
+ dimMap[EsdBuffer] = 1;
+ dimMap[EsdSubpass] = 2; // potientially unused for now
+}
+
+TBuiltIns::~TBuiltIns()
+{
+}
+
+
+//
+// Add all context-independent built-in functions and variables that are present
+// for the given version and profile. Share common ones across stages, otherwise
+// make stage-specific entries.
+//
+// Most built-ins variables can be added as simple text strings. Some need to
+// be added programmatically, which is done later in IdentifyBuiltIns() below.
+//
+void TBuiltIns::initialize(int version, EProfile profile, int spv, int vulkan)
+{
+ //============================================================================
+ //
+ // Prototypes for built-in functions seen by both vertex and fragment shaders.
+ //
+ //============================================================================
+
+ //
+ // Angle and Trigonometric Functions.
+ //
+ commonBuiltins.append(
+ "float radians(float degrees);"
+ "vec2 radians(vec2 degrees);"
+ "vec3 radians(vec3 degrees);"
+ "vec4 radians(vec4 degrees);"
+
+ "float degrees(float radians);"
+ "vec2 degrees(vec2 radians);"
+ "vec3 degrees(vec3 radians);"
+ "vec4 degrees(vec4 radians);"
+
+ "float sin(float angle);"
+ "vec2 sin(vec2 angle);"
+ "vec3 sin(vec3 angle);"
+ "vec4 sin(vec4 angle);"
+
+ "float cos(float angle);"
+ "vec2 cos(vec2 angle);"
+ "vec3 cos(vec3 angle);"
+ "vec4 cos(vec4 angle);"
+
+ "float tan(float angle);"
+ "vec2 tan(vec2 angle);"
+ "vec3 tan(vec3 angle);"
+ "vec4 tan(vec4 angle);"
+
+ "float asin(float x);"
+ "vec2 asin(vec2 x);"
+ "vec3 asin(vec3 x);"
+ "vec4 asin(vec4 x);"
+
+ "float acos(float x);"
+ "vec2 acos(vec2 x);"
+ "vec3 acos(vec3 x);"
+ "vec4 acos(vec4 x);"
+
+ "float atan(float y, float x);"
+ "vec2 atan(vec2 y, vec2 x);"
+ "vec3 atan(vec3 y, vec3 x);"
+ "vec4 atan(vec4 y, vec4 x);"
+
+ "float atan(float y_over_x);"
+ "vec2 atan(vec2 y_over_x);"
+ "vec3 atan(vec3 y_over_x);"
+ "vec4 atan(vec4 y_over_x);"
+
+ "\n");
+
+ if (version >= 130) {
+ commonBuiltins.append(
+ "float sinh(float angle);"
+ "vec2 sinh(vec2 angle);"
+ "vec3 sinh(vec3 angle);"
+ "vec4 sinh(vec4 angle);"
+
+ "float cosh(float angle);"
+ "vec2 cosh(vec2 angle);"
+ "vec3 cosh(vec3 angle);"
+ "vec4 cosh(vec4 angle);"
+
+ "float tanh(float angle);"
+ "vec2 tanh(vec2 angle);"
+ "vec3 tanh(vec3 angle);"
+ "vec4 tanh(vec4 angle);"
+
+ "float asinh(float x);"
+ "vec2 asinh(vec2 x);"
+ "vec3 asinh(vec3 x);"
+ "vec4 asinh(vec4 x);"
+
+ "float acosh(float x);"
+ "vec2 acosh(vec2 x);"
+ "vec3 acosh(vec3 x);"
+ "vec4 acosh(vec4 x);"
+
+ "float atanh(float y_over_x);"
+ "vec2 atanh(vec2 y_over_x);"
+ "vec3 atanh(vec3 y_over_x);"
+ "vec4 atanh(vec4 y_over_x);"
+
+ "\n");
+ }
+
+ //
+ // Exponential Functions.
+ //
+ commonBuiltins.append(
+ "float pow(float x, float y);"
+ "vec2 pow(vec2 x, vec2 y);"
+ "vec3 pow(vec3 x, vec3 y);"
+ "vec4 pow(vec4 x, vec4 y);"
+
+ "float exp(float x);"
+ "vec2 exp(vec2 x);"
+ "vec3 exp(vec3 x);"
+ "vec4 exp(vec4 x);"
+
+ "float log(float x);"
+ "vec2 log(vec2 x);"
+ "vec3 log(vec3 x);"
+ "vec4 log(vec4 x);"
+
+ "float exp2(float x);"
+ "vec2 exp2(vec2 x);"
+ "vec3 exp2(vec3 x);"
+ "vec4 exp2(vec4 x);"
+
+ "float log2(float x);"
+ "vec2 log2(vec2 x);"
+ "vec3 log2(vec3 x);"
+ "vec4 log2(vec4 x);"
+
+ "float sqrt(float x);"
+ "vec2 sqrt(vec2 x);"
+ "vec3 sqrt(vec3 x);"
+ "vec4 sqrt(vec4 x);"
+
+ "float inversesqrt(float x);"
+ "vec2 inversesqrt(vec2 x);"
+ "vec3 inversesqrt(vec3 x);"
+ "vec4 inversesqrt(vec4 x);"
+
+ "\n");
+
+ //
+ // Common Functions.
+ //
+ commonBuiltins.append(
+ "float abs(float x);"
+ "vec2 abs(vec2 x);"
+ "vec3 abs(vec3 x);"
+ "vec4 abs(vec4 x);"
+
+ "float sign(float x);"
+ "vec2 sign(vec2 x);"
+ "vec3 sign(vec3 x);"
+ "vec4 sign(vec4 x);"
+
+ "float floor(float x);"
+ "vec2 floor(vec2 x);"
+ "vec3 floor(vec3 x);"
+ "vec4 floor(vec4 x);"
+
+ "float ceil(float x);"
+ "vec2 ceil(vec2 x);"
+ "vec3 ceil(vec3 x);"
+ "vec4 ceil(vec4 x);"
+
+ "float fract(float x);"
+ "vec2 fract(vec2 x);"
+ "vec3 fract(vec3 x);"
+ "vec4 fract(vec4 x);"
+
+ "float mod(float x, float y);"
+ "vec2 mod(vec2 x, float y);"
+ "vec3 mod(vec3 x, float y);"
+ "vec4 mod(vec4 x, float y);"
+ "vec2 mod(vec2 x, vec2 y);"
+ "vec3 mod(vec3 x, vec3 y);"
+ "vec4 mod(vec4 x, vec4 y);"
+
+ "float min(float x, float y);"
+ "vec2 min(vec2 x, float y);"
+ "vec3 min(vec3 x, float y);"
+ "vec4 min(vec4 x, float y);"
+ "vec2 min(vec2 x, vec2 y);"
+ "vec3 min(vec3 x, vec3 y);"
+ "vec4 min(vec4 x, vec4 y);"
+
+ "float max(float x, float y);"
+ "vec2 max(vec2 x, float y);"
+ "vec3 max(vec3 x, float y);"
+ "vec4 max(vec4 x, float y);"
+ "vec2 max(vec2 x, vec2 y);"
+ "vec3 max(vec3 x, vec3 y);"
+ "vec4 max(vec4 x, vec4 y);"
+
+ "float clamp(float x, float minVal, float maxVal);"
+ "vec2 clamp(vec2 x, float minVal, float maxVal);"
+ "vec3 clamp(vec3 x, float minVal, float maxVal);"
+ "vec4 clamp(vec4 x, float minVal, float maxVal);"
+ "vec2 clamp(vec2 x, vec2 minVal, vec2 maxVal);"
+ "vec3 clamp(vec3 x, vec3 minVal, vec3 maxVal);"
+ "vec4 clamp(vec4 x, vec4 minVal, vec4 maxVal);"
+
+ "float mix(float x, float y, float a);"
+ "vec2 mix(vec2 x, vec2 y, float a);"
+ "vec3 mix(vec3 x, vec3 y, float a);"
+ "vec4 mix(vec4 x, vec4 y, float a);"
+ "vec2 mix(vec2 x, vec2 y, vec2 a);"
+ "vec3 mix(vec3 x, vec3 y, vec3 a);"
+ "vec4 mix(vec4 x, vec4 y, vec4 a);"
+
+ "float step(float edge, float x);"
+ "vec2 step(vec2 edge, vec2 x);"
+ "vec3 step(vec3 edge, vec3 x);"
+ "vec4 step(vec4 edge, vec4 x);"
+ "vec2 step(float edge, vec2 x);"
+ "vec3 step(float edge, vec3 x);"
+ "vec4 step(float edge, vec4 x);"
+
+ "float smoothstep(float edge0, float edge1, float x);"
+ "vec2 smoothstep(vec2 edge0, vec2 edge1, vec2 x);"
+ "vec3 smoothstep(vec3 edge0, vec3 edge1, vec3 x);"
+ "vec4 smoothstep(vec4 edge0, vec4 edge1, vec4 x);"
+ "vec2 smoothstep(float edge0, float edge1, vec2 x);"
+ "vec3 smoothstep(float edge0, float edge1, vec3 x);"
+ "vec4 smoothstep(float edge0, float edge1, vec4 x);"
+
+ "\n");
+
+ if (version >= 130) {
+ commonBuiltins.append(
+ " int abs( int x);"
+ "ivec2 abs(ivec2 x);"
+ "ivec3 abs(ivec3 x);"
+ "ivec4 abs(ivec4 x);"
+
+ " int sign( int x);"
+ "ivec2 sign(ivec2 x);"
+ "ivec3 sign(ivec3 x);"
+ "ivec4 sign(ivec4 x);"
+
+ "float trunc(float x);"
+ "vec2 trunc(vec2 x);"
+ "vec3 trunc(vec3 x);"
+ "vec4 trunc(vec4 x);"
+
+ "float round(float x);"
+ "vec2 round(vec2 x);"
+ "vec3 round(vec3 x);"
+ "vec4 round(vec4 x);"
+
+ "float roundEven(float x);"
+ "vec2 roundEven(vec2 x);"
+ "vec3 roundEven(vec3 x);"
+ "vec4 roundEven(vec4 x);"
+
+ "float modf(float, out float);"
+ "vec2 modf(vec2, out vec2 );"
+ "vec3 modf(vec3, out vec3 );"
+ "vec4 modf(vec4, out vec4 );"
+
+ " int min(int x, int y);"
+ "ivec2 min(ivec2 x, int y);"
+ "ivec3 min(ivec3 x, int y);"
+ "ivec4 min(ivec4 x, int y);"
+ "ivec2 min(ivec2 x, ivec2 y);"
+ "ivec3 min(ivec3 x, ivec3 y);"
+ "ivec4 min(ivec4 x, ivec4 y);"
+
+ " uint min(uint x, uint y);"
+ "uvec2 min(uvec2 x, uint y);"
+ "uvec3 min(uvec3 x, uint y);"
+ "uvec4 min(uvec4 x, uint y);"
+ "uvec2 min(uvec2 x, uvec2 y);"
+ "uvec3 min(uvec3 x, uvec3 y);"
+ "uvec4 min(uvec4 x, uvec4 y);"
+
+ " int max(int x, int y);"
+ "ivec2 max(ivec2 x, int y);"
+ "ivec3 max(ivec3 x, int y);"
+ "ivec4 max(ivec4 x, int y);"
+ "ivec2 max(ivec2 x, ivec2 y);"
+ "ivec3 max(ivec3 x, ivec3 y);"
+ "ivec4 max(ivec4 x, ivec4 y);"
+
+ " uint max(uint x, uint y);"
+ "uvec2 max(uvec2 x, uint y);"
+ "uvec3 max(uvec3 x, uint y);"
+ "uvec4 max(uvec4 x, uint y);"
+ "uvec2 max(uvec2 x, uvec2 y);"
+ "uvec3 max(uvec3 x, uvec3 y);"
+ "uvec4 max(uvec4 x, uvec4 y);"
+
+ "int clamp(int x, int minVal, int maxVal);"
+ "ivec2 clamp(ivec2 x, int minVal, int maxVal);"
+ "ivec3 clamp(ivec3 x, int minVal, int maxVal);"
+ "ivec4 clamp(ivec4 x, int minVal, int maxVal);"
+ "ivec2 clamp(ivec2 x, ivec2 minVal, ivec2 maxVal);"
+ "ivec3 clamp(ivec3 x, ivec3 minVal, ivec3 maxVal);"
+ "ivec4 clamp(ivec4 x, ivec4 minVal, ivec4 maxVal);"
+
+ "uint clamp(uint x, uint minVal, uint maxVal);"
+ "uvec2 clamp(uvec2 x, uint minVal, uint maxVal);"
+ "uvec3 clamp(uvec3 x, uint minVal, uint maxVal);"
+ "uvec4 clamp(uvec4 x, uint minVal, uint maxVal);"
+ "uvec2 clamp(uvec2 x, uvec2 minVal, uvec2 maxVal);"
+ "uvec3 clamp(uvec3 x, uvec3 minVal, uvec3 maxVal);"
+ "uvec4 clamp(uvec4 x, uvec4 minVal, uvec4 maxVal);"
+
+ "float mix(float x, float y, bool a);"
+ "vec2 mix(vec2 x, vec2 y, bvec2 a);"
+ "vec3 mix(vec3 x, vec3 y, bvec3 a);"
+ "vec4 mix(vec4 x, vec4 y, bvec4 a);"
+
+ "bool isnan(float x);"
+ "bvec2 isnan(vec2 x);"
+ "bvec3 isnan(vec3 x);"
+ "bvec4 isnan(vec4 x);"
+
+ "bool isinf(float x);"
+ "bvec2 isinf(vec2 x);"
+ "bvec3 isinf(vec3 x);"
+ "bvec4 isinf(vec4 x);"
+
+ "\n");
+ }
+
+ //
+ // double functions added to desktop 4.00, but not fma, frexp, ldexp, or pack/unpack
+ //
+ if (profile != EEsProfile && version >= 400) {
+ commonBuiltins.append(
+
+ "double sqrt(double);"
+ "dvec2 sqrt(dvec2);"
+ "dvec3 sqrt(dvec3);"
+ "dvec4 sqrt(dvec4);"
+
+ "double inversesqrt(double);"
+ "dvec2 inversesqrt(dvec2);"
+ "dvec3 inversesqrt(dvec3);"
+ "dvec4 inversesqrt(dvec4);"
+
+ "double abs(double);"
+ "dvec2 abs(dvec2);"
+ "dvec3 abs(dvec3);"
+ "dvec4 abs(dvec4);"
+
+ "double sign(double);"
+ "dvec2 sign(dvec2);"
+ "dvec3 sign(dvec3);"
+ "dvec4 sign(dvec4);"
+
+ "double floor(double);"
+ "dvec2 floor(dvec2);"
+ "dvec3 floor(dvec3);"
+ "dvec4 floor(dvec4);"
+
+ "double trunc(double);"
+ "dvec2 trunc(dvec2);"
+ "dvec3 trunc(dvec3);"
+ "dvec4 trunc(dvec4);"
+
+ "double round(double);"
+ "dvec2 round(dvec2);"
+ "dvec3 round(dvec3);"
+ "dvec4 round(dvec4);"
+
+ "double roundEven(double);"
+ "dvec2 roundEven(dvec2);"
+ "dvec3 roundEven(dvec3);"
+ "dvec4 roundEven(dvec4);"
+
+ "double ceil(double);"
+ "dvec2 ceil(dvec2);"
+ "dvec3 ceil(dvec3);"
+ "dvec4 ceil(dvec4);"
+
+ "double fract(double);"
+ "dvec2 fract(dvec2);"
+ "dvec3 fract(dvec3);"
+ "dvec4 fract(dvec4);"
+
+ "double mod(double, double);"
+ "dvec2 mod(dvec2 , double);"
+ "dvec3 mod(dvec3 , double);"
+ "dvec4 mod(dvec4 , double);"
+ "dvec2 mod(dvec2 , dvec2);"
+ "dvec3 mod(dvec3 , dvec3);"
+ "dvec4 mod(dvec4 , dvec4);"
+
+ "double modf(double, out double);"
+ "dvec2 modf(dvec2, out dvec2);"
+ "dvec3 modf(dvec3, out dvec3);"
+ "dvec4 modf(dvec4, out dvec4);"
+
+ "double min(double, double);"
+ "dvec2 min(dvec2, double);"
+ "dvec3 min(dvec3, double);"
+ "dvec4 min(dvec4, double);"
+ "dvec2 min(dvec2, dvec2);"
+ "dvec3 min(dvec3, dvec3);"
+ "dvec4 min(dvec4, dvec4);"
+
+ "double max(double, double);"
+ "dvec2 max(dvec2 , double);"
+ "dvec3 max(dvec3 , double);"
+ "dvec4 max(dvec4 , double);"
+ "dvec2 max(dvec2 , dvec2);"
+ "dvec3 max(dvec3 , dvec3);"
+ "dvec4 max(dvec4 , dvec4);"
+
+ "double clamp(double, double, double);"
+ "dvec2 clamp(dvec2 , double, double);"
+ "dvec3 clamp(dvec3 , double, double);"
+ "dvec4 clamp(dvec4 , double, double);"
+ "dvec2 clamp(dvec2 , dvec2 , dvec2);"
+ "dvec3 clamp(dvec3 , dvec3 , dvec3);"
+ "dvec4 clamp(dvec4 , dvec4 , dvec4);"
+
+ "double mix(double, double, double);"
+ "dvec2 mix(dvec2, dvec2, double);"
+ "dvec3 mix(dvec3, dvec3, double);"
+ "dvec4 mix(dvec4, dvec4, double);"
+ "dvec2 mix(dvec2, dvec2, dvec2);"
+ "dvec3 mix(dvec3, dvec3, dvec3);"
+ "dvec4 mix(dvec4, dvec4, dvec4);"
+ "double mix(double, double, bool);"
+ "dvec2 mix(dvec2, dvec2, bvec2);"
+ "dvec3 mix(dvec3, dvec3, bvec3);"
+ "dvec4 mix(dvec4, dvec4, bvec4);"
+
+ "double step(double, double);"
+ "dvec2 step(dvec2 , dvec2);"
+ "dvec3 step(dvec3 , dvec3);"
+ "dvec4 step(dvec4 , dvec4);"
+ "dvec2 step(double, dvec2);"
+ "dvec3 step(double, dvec3);"
+ "dvec4 step(double, dvec4);"
+
+ "double smoothstep(double, double, double);"
+ "dvec2 smoothstep(dvec2 , dvec2 , dvec2);"
+ "dvec3 smoothstep(dvec3 , dvec3 , dvec3);"
+ "dvec4 smoothstep(dvec4 , dvec4 , dvec4);"
+ "dvec2 smoothstep(double, double, dvec2);"
+ "dvec3 smoothstep(double, double, dvec3);"
+ "dvec4 smoothstep(double, double, dvec4);"
+
+ "bool isnan(double);"
+ "bvec2 isnan(dvec2);"
+ "bvec3 isnan(dvec3);"
+ "bvec4 isnan(dvec4);"
+
+ "bool isinf(double);"
+ "bvec2 isinf(dvec2);"
+ "bvec3 isinf(dvec3);"
+ "bvec4 isinf(dvec4);"
+
+ "double length(double);"
+ "double length(dvec2);"
+ "double length(dvec3);"
+ "double length(dvec4);"
+
+ "double distance(double, double);"
+ "double distance(dvec2 , dvec2);"
+ "double distance(dvec3 , dvec3);"
+ "double distance(dvec4 , dvec4);"
+
+ "double dot(double, double);"
+ "double dot(dvec2 , dvec2);"
+ "double dot(dvec3 , dvec3);"
+ "double dot(dvec4 , dvec4);"
+
+ "dvec3 cross(dvec3, dvec3);"
+
+ "double normalize(double);"
+ "dvec2 normalize(dvec2);"
+ "dvec3 normalize(dvec3);"
+ "dvec4 normalize(dvec4);"
+
+ "double faceforward(double, double, double);"
+ "dvec2 faceforward(dvec2, dvec2, dvec2);"
+ "dvec3 faceforward(dvec3, dvec3, dvec3);"
+ "dvec4 faceforward(dvec4, dvec4, dvec4);"
+
+ "double reflect(double, double);"
+ "dvec2 reflect(dvec2 , dvec2 );"
+ "dvec3 reflect(dvec3 , dvec3 );"
+ "dvec4 reflect(dvec4 , dvec4 );"
+
+ "double refract(double, double, double);"
+ "dvec2 refract(dvec2 , dvec2 , double);"
+ "dvec3 refract(dvec3 , dvec3 , double);"
+ "dvec4 refract(dvec4 , dvec4 , double);"
+
+ "dmat2 matrixCompMult(dmat2, dmat2);"
+ "dmat3 matrixCompMult(dmat3, dmat3);"
+ "dmat4 matrixCompMult(dmat4, dmat4);"
+ "dmat2x3 matrixCompMult(dmat2x3, dmat2x3);"
+ "dmat2x4 matrixCompMult(dmat2x4, dmat2x4);"
+ "dmat3x2 matrixCompMult(dmat3x2, dmat3x2);"
+ "dmat3x4 matrixCompMult(dmat3x4, dmat3x4);"
+ "dmat4x2 matrixCompMult(dmat4x2, dmat4x2);"
+ "dmat4x3 matrixCompMult(dmat4x3, dmat4x3);"
+
+ "dmat2 outerProduct(dvec2, dvec2);"
+ "dmat3 outerProduct(dvec3, dvec3);"
+ "dmat4 outerProduct(dvec4, dvec4);"
+ "dmat2x3 outerProduct(dvec3, dvec2);"
+ "dmat3x2 outerProduct(dvec2, dvec3);"
+ "dmat2x4 outerProduct(dvec4, dvec2);"
+ "dmat4x2 outerProduct(dvec2, dvec4);"
+ "dmat3x4 outerProduct(dvec4, dvec3);"
+ "dmat4x3 outerProduct(dvec3, dvec4);"
+
+ "dmat2 transpose(dmat2);"
+ "dmat3 transpose(dmat3);"
+ "dmat4 transpose(dmat4);"
+ "dmat2x3 transpose(dmat3x2);"
+ "dmat3x2 transpose(dmat2x3);"
+ "dmat2x4 transpose(dmat4x2);"
+ "dmat4x2 transpose(dmat2x4);"
+ "dmat3x4 transpose(dmat4x3);"
+ "dmat4x3 transpose(dmat3x4);"
+
+ "double determinant(dmat2);"
+ "double determinant(dmat3);"
+ "double determinant(dmat4);"
+
+ "dmat2 inverse(dmat2);"
+ "dmat3 inverse(dmat3);"
+ "dmat4 inverse(dmat4);"
+
+ "bvec2 lessThan(dvec2, dvec2);"
+ "bvec3 lessThan(dvec3, dvec3);"
+ "bvec4 lessThan(dvec4, dvec4);"
+
+ "bvec2 lessThanEqual(dvec2, dvec2);"
+ "bvec3 lessThanEqual(dvec3, dvec3);"
+ "bvec4 lessThanEqual(dvec4, dvec4);"
+
+ "bvec2 greaterThan(dvec2, dvec2);"
+ "bvec3 greaterThan(dvec3, dvec3);"
+ "bvec4 greaterThan(dvec4, dvec4);"
+
+ "bvec2 greaterThanEqual(dvec2, dvec2);"
+ "bvec3 greaterThanEqual(dvec3, dvec3);"
+ "bvec4 greaterThanEqual(dvec4, dvec4);"
+
+ "bvec2 equal(dvec2, dvec2);"
+ "bvec3 equal(dvec3, dvec3);"
+ "bvec4 equal(dvec4, dvec4);"
+
+ "bvec2 notEqual(dvec2, dvec2);"
+ "bvec3 notEqual(dvec3, dvec3);"
+ "bvec4 notEqual(dvec4, dvec4);"
+
+ "\n");
+ }
+
+ if (profile != EEsProfile && version >= 450) {
+ commonBuiltins.append(
+
+ "int64_t abs(int64_t);"
+ "i64vec2 abs(i64vec2);"
+ "i64vec3 abs(i64vec3);"
+ "i64vec4 abs(i64vec4);"
+
+ "int64_t sign(int64_t);"
+ "i64vec2 sign(i64vec2);"
+ "i64vec3 sign(i64vec3);"
+ "i64vec4 sign(i64vec4);"
+
+ "int64_t min(int64_t, int64_t);"
+ "i64vec2 min(i64vec2, int64_t);"
+ "i64vec3 min(i64vec3, int64_t);"
+ "i64vec4 min(i64vec4, int64_t);"
+ "i64vec2 min(i64vec2, i64vec2);"
+ "i64vec3 min(i64vec3, i64vec3);"
+ "i64vec4 min(i64vec4, i64vec4);"
+ "uint64_t min(uint64_t, uint64_t);"
+ "u64vec2 min(u64vec2, uint64_t);"
+ "u64vec3 min(u64vec3, uint64_t);"
+ "u64vec4 min(u64vec4, uint64_t);"
+ "u64vec2 min(u64vec2, u64vec2);"
+ "u64vec3 min(u64vec3, u64vec3);"
+ "u64vec4 min(u64vec4, u64vec4);"
+
+ "int64_t max(int64_t, int64_t);"
+ "i64vec2 max(i64vec2, int64_t);"
+ "i64vec3 max(i64vec3, int64_t);"
+ "i64vec4 max(i64vec4, int64_t);"
+ "i64vec2 max(i64vec2, i64vec2);"
+ "i64vec3 max(i64vec3, i64vec3);"
+ "i64vec4 max(i64vec4, i64vec4);"
+ "uint64_t max(uint64_t, uint64_t);"
+ "u64vec2 max(u64vec2, uint64_t);"
+ "u64vec3 max(u64vec3, uint64_t);"
+ "u64vec4 max(u64vec4, uint64_t);"
+ "u64vec2 max(u64vec2, u64vec2);"
+ "u64vec3 max(u64vec3, u64vec3);"
+ "u64vec4 max(u64vec4, u64vec4);"
+
+ "int64_t clamp(int64_t, int64_t, int64_t);"
+ "i64vec2 clamp(i64vec2, int64_t, int64_t);"
+ "i64vec3 clamp(i64vec3, int64_t, int64_t);"
+ "i64vec4 clamp(i64vec4, int64_t, int64_t);"
+ "i64vec2 clamp(i64vec2, i64vec2, i64vec2);"
+ "i64vec3 clamp(i64vec3, i64vec3, i64vec3);"
+ "i64vec4 clamp(i64vec4, i64vec4, i64vec4);"
+ "uint64_t clamp(uint64_t, uint64_t, uint64_t);"
+ "u64vec2 clamp(u64vec2, uint64_t, uint64_t);"
+ "u64vec3 clamp(u64vec3, uint64_t, uint64_t);"
+ "u64vec4 clamp(u64vec4, uint64_t, uint64_t);"
+ "u64vec2 clamp(u64vec2, u64vec2, u64vec2);"
+ "u64vec3 clamp(u64vec3, u64vec3, u64vec3);"
+ "u64vec4 clamp(u64vec4, u64vec4, u64vec4);"
+
+ "int64_t mix(int64_t, int64_t, bool);"
+ "i64vec2 mix(i64vec2, i64vec2, bvec2);"
+ "i64vec3 mix(i64vec3, i64vec3, bvec3);"
+ "i64vec4 mix(i64vec4, i64vec4, bvec4);"
+ "uint64_t mix(uint64_t, uint64_t, bool);"
+ "u64vec2 mix(u64vec2, u64vec2, bvec2);"
+ "u64vec3 mix(u64vec3, u64vec3, bvec3);"
+ "u64vec4 mix(u64vec4, u64vec4, bvec4);"
+
+ "int64_t doubleBitsToInt64(double);"
+ "i64vec2 doubleBitsToInt64(dvec2);"
+ "i64vec3 doubleBitsToInt64(dvec3);"
+ "i64vec4 doubleBitsToInt64(dvec4);"
+
+ "uint64_t doubleBitsToUint64(double);"
+ "u64vec2 doubleBitsToUint64(dvec2);"
+ "u64vec3 doubleBitsToUint64(dvec3);"
+ "u64vec4 doubleBitsToUint64(dvec4);"
+
+ "double int64BitsToDouble(int64_t);"
+ "dvec2 int64BitsToDouble(i64vec2);"
+ "dvec3 int64BitsToDouble(i64vec3);"
+ "dvec4 int64BitsToDouble(i64vec4);"
+
+ "double uint64BitsToDouble(uint64_t);"
+ "dvec2 uint64BitsToDouble(u64vec2);"
+ "dvec3 uint64BitsToDouble(u64vec3);"
+ "dvec4 uint64BitsToDouble(u64vec4);"
+
+ "int64_t packInt2x32(ivec2);"
+ "uint64_t packUint2x32(uvec2);"
+ "ivec2 unpackInt2x32(int64_t);"
+ "uvec2 unpackUint2x32(uint64_t);"
+
+ "bvec2 lessThan(i64vec2, i64vec2);"
+ "bvec3 lessThan(i64vec3, i64vec3);"
+ "bvec4 lessThan(i64vec4, i64vec4);"
+ "bvec2 lessThan(u64vec2, u64vec2);"
+ "bvec3 lessThan(u64vec3, u64vec3);"
+ "bvec4 lessThan(u64vec4, u64vec4);"
+
+ "bvec2 lessThanEqual(i64vec2, i64vec2);"
+ "bvec3 lessThanEqual(i64vec3, i64vec3);"
+ "bvec4 lessThanEqual(i64vec4, i64vec4);"
+ "bvec2 lessThanEqual(u64vec2, u64vec2);"
+ "bvec3 lessThanEqual(u64vec3, u64vec3);"
+ "bvec4 lessThanEqual(u64vec4, u64vec4);"
+
+ "bvec2 greaterThan(i64vec2, i64vec2);"
+ "bvec3 greaterThan(i64vec3, i64vec3);"
+ "bvec4 greaterThan(i64vec4, i64vec4);"
+ "bvec2 greaterThan(u64vec2, u64vec2);"
+ "bvec3 greaterThan(u64vec3, u64vec3);"
+ "bvec4 greaterThan(u64vec4, u64vec4);"
+
+ "bvec2 greaterThanEqual(i64vec2, i64vec2);"
+ "bvec3 greaterThanEqual(i64vec3, i64vec3);"
+ "bvec4 greaterThanEqual(i64vec4, i64vec4);"
+ "bvec2 greaterThanEqual(u64vec2, u64vec2);"
+ "bvec3 greaterThanEqual(u64vec3, u64vec3);"
+ "bvec4 greaterThanEqual(u64vec4, u64vec4);"
+
+ "bvec2 equal(i64vec2, i64vec2);"
+ "bvec3 equal(i64vec3, i64vec3);"
+ "bvec4 equal(i64vec4, i64vec4);"
+ "bvec2 equal(u64vec2, u64vec2);"
+ "bvec3 equal(u64vec3, u64vec3);"
+ "bvec4 equal(u64vec4, u64vec4);"
+
+ "bvec2 notEqual(i64vec2, i64vec2);"
+ "bvec3 notEqual(i64vec3, i64vec3);"
+ "bvec4 notEqual(i64vec4, i64vec4);"
+ "bvec2 notEqual(u64vec2, u64vec2);"
+ "bvec3 notEqual(u64vec3, u64vec3);"
+ "bvec4 notEqual(u64vec4, u64vec4);"
+
+ "\n"
+ );
+ }
+
+ if ((profile == EEsProfile && version >= 310) ||
+ (profile != EEsProfile && version >= 430)) {
+ commonBuiltins.append(
+ "uint atomicAdd(coherent volatile inout uint, uint);"
+ " int atomicAdd(coherent volatile inout int, int);"
+
+ "uint atomicMin(coherent volatile inout uint, uint);"
+ " int atomicMin(coherent volatile inout int, int);"
+
+ "uint atomicMax(coherent volatile inout uint, uint);"
+ " int atomicMax(coherent volatile inout int, int);"
+
+ "uint atomicAnd(coherent volatile inout uint, uint);"
+ " int atomicAnd(coherent volatile inout int, int);"
+
+ "uint atomicOr (coherent volatile inout uint, uint);"
+ " int atomicOr (coherent volatile inout int, int);"
+
+ "uint atomicXor(coherent volatile inout uint, uint);"
+ " int atomicXor(coherent volatile inout int, int);"
+
+ "uint atomicExchange(coherent volatile inout uint, uint);"
+ " int atomicExchange(coherent volatile inout int, int);"
+
+ "uint atomicCompSwap(coherent volatile inout uint, uint, uint);"
+ " int atomicCompSwap(coherent volatile inout int, int, int);"
+
+ "\n");
+ }
+
+ if ((profile == EEsProfile && version >= 310) ||
+ (profile != EEsProfile && version >= 450)) {
+ commonBuiltins.append(
+ "int mix(int x, int y, bool a);"
+ "ivec2 mix(ivec2 x, ivec2 y, bvec2 a);"
+ "ivec3 mix(ivec3 x, ivec3 y, bvec3 a);"
+ "ivec4 mix(ivec4 x, ivec4 y, bvec4 a);"
+
+ "uint mix(uint x, uint y, bool a);"
+ "uvec2 mix(uvec2 x, uvec2 y, bvec2 a);"
+ "uvec3 mix(uvec3 x, uvec3 y, bvec3 a);"
+ "uvec4 mix(uvec4 x, uvec4 y, bvec4 a);"
+
+ "bool mix(bool x, bool y, bool a);"
+ "bvec2 mix(bvec2 x, bvec2 y, bvec2 a);"
+ "bvec3 mix(bvec3 x, bvec3 y, bvec3 a);"
+ "bvec4 mix(bvec4 x, bvec4 y, bvec4 a);"
+
+ "\n");
+ }
+
+ if ((profile == EEsProfile && version >= 300) ||
+ (profile != EEsProfile && version >= 330)) {
+ commonBuiltins.append(
+ "int floatBitsToInt(float value);"
+ "ivec2 floatBitsToInt(vec2 value);"
+ "ivec3 floatBitsToInt(vec3 value);"
+ "ivec4 floatBitsToInt(vec4 value);"
+
+ "uint floatBitsToUint(float value);"
+ "uvec2 floatBitsToUint(vec2 value);"
+ "uvec3 floatBitsToUint(vec3 value);"
+ "uvec4 floatBitsToUint(vec4 value);"
+
+ "float intBitsToFloat(int value);"
+ "vec2 intBitsToFloat(ivec2 value);"
+ "vec3 intBitsToFloat(ivec3 value);"
+ "vec4 intBitsToFloat(ivec4 value);"
+
+ "float uintBitsToFloat(uint value);"
+ "vec2 uintBitsToFloat(uvec2 value);"
+ "vec3 uintBitsToFloat(uvec3 value);"
+ "vec4 uintBitsToFloat(uvec4 value);"
+
+ "\n");
+ }
+
+ if ((profile != EEsProfile && version >= 400) ||
+ (profile == EEsProfile && version >= 310)) { // GL_OES_gpu_shader5
+
+ commonBuiltins.append(
+ "float fma(float, float, float );"
+ "vec2 fma(vec2, vec2, vec2 );"
+ "vec3 fma(vec3, vec3, vec3 );"
+ "vec4 fma(vec4, vec4, vec4 );"
+ "\n");
+
+ if (profile != EEsProfile) {
+ commonBuiltins.append(
+ "double fma(double, double, double);"
+ "dvec2 fma(dvec2, dvec2, dvec2 );"
+ "dvec3 fma(dvec3, dvec3, dvec3 );"
+ "dvec4 fma(dvec4, dvec4, dvec4 );"
+ "\n");
+ }
+ }
+
+ if ((profile == EEsProfile && version >= 310) ||
+ (profile != EEsProfile && version >= 400)) {
+ commonBuiltins.append(
+ "highp float frexp(highp float, out highp int);"
+ "highp vec2 frexp(highp vec2, out highp ivec2);"
+ "highp vec3 frexp(highp vec3, out highp ivec3);"
+ "highp vec4 frexp(highp vec4, out highp ivec4);"
+
+ "highp float ldexp(highp float, highp int);"
+ "highp vec2 ldexp(highp vec2, highp ivec2);"
+ "highp vec3 ldexp(highp vec3, highp ivec3);"
+ "highp vec4 ldexp(highp vec4, highp ivec4);"
+
+ "\n");
+ }
+
+ if (profile != EEsProfile && version >= 400) {
+ commonBuiltins.append(
+ "double frexp(double, out int);"
+ "dvec2 frexp( dvec2, out ivec2);"
+ "dvec3 frexp( dvec3, out ivec3);"
+ "dvec4 frexp( dvec4, out ivec4);"
+
+ "double ldexp(double, int);"
+ "dvec2 ldexp( dvec2, ivec2);"
+ "dvec3 ldexp( dvec3, ivec3);"
+ "dvec4 ldexp( dvec4, ivec4);"
+
+ "double packDouble2x32(uvec2);"
+ "uvec2 unpackDouble2x32(double);"
+
+ "\n");
+ }
+
+ if ((profile == EEsProfile && version >= 300) ||
+ (profile != EEsProfile && version >= 400)) {
+ commonBuiltins.append(
+ "highp uint packUnorm2x16(vec2);"
+ "highp vec2 unpackUnorm2x16(highp uint);"
+ "\n");
+ }
+
+ if ((profile == EEsProfile && version >= 300) ||
+ (profile != EEsProfile && version >= 420)) {
+ commonBuiltins.append(
+ "highp uint packSnorm2x16(vec2);"
+ "highp vec2 unpackSnorm2x16(highp uint);"
+ "highp uint packHalf2x16(mediump vec2);"
+ "mediump vec2 unpackHalf2x16(highp uint);"
+ "\n");
+ }
+
+ if ((profile == EEsProfile && version >= 310) ||
+ (profile != EEsProfile && version >= 400)) {
+ commonBuiltins.append(
+ "highp uint packSnorm4x8 (mediump vec4);"
+ "mediump vec4 unpackSnorm4x8(highp uint);"
+ "highp uint packUnorm4x8 (mediump vec4);"
+ "mediump vec4 unpackUnorm4x8(highp uint);"
+ "\n");
+ }
+
+ //
+ // Geometric Functions.
+ //
+ commonBuiltins.append(
+ "float length(float x);"
+ "float length(vec2 x);"
+ "float length(vec3 x);"
+ "float length(vec4 x);"
+
+ "float distance(float p0, float p1);"
+ "float distance(vec2 p0, vec2 p1);"
+ "float distance(vec3 p0, vec3 p1);"
+ "float distance(vec4 p0, vec4 p1);"
+
+ "float dot(float x, float y);"
+ "float dot(vec2 x, vec2 y);"
+ "float dot(vec3 x, vec3 y);"
+ "float dot(vec4 x, vec4 y);"
+
+ "vec3 cross(vec3 x, vec3 y);"
+ "float normalize(float x);"
+ "vec2 normalize(vec2 x);"
+ "vec3 normalize(vec3 x);"
+ "vec4 normalize(vec4 x);"
+
+ "float faceforward(float N, float I, float Nref);"
+ "vec2 faceforward(vec2 N, vec2 I, vec2 Nref);"
+ "vec3 faceforward(vec3 N, vec3 I, vec3 Nref);"
+ "vec4 faceforward(vec4 N, vec4 I, vec4 Nref);"
+
+ "float reflect(float I, float N);"
+ "vec2 reflect(vec2 I, vec2 N);"
+ "vec3 reflect(vec3 I, vec3 N);"
+ "vec4 reflect(vec4 I, vec4 N);"
+
+ "float refract(float I, float N, float eta);"
+ "vec2 refract(vec2 I, vec2 N, float eta);"
+ "vec3 refract(vec3 I, vec3 N, float eta);"
+ "vec4 refract(vec4 I, vec4 N, float eta);"
+
+ "\n");
+
+ //
+ // Matrix Functions.
+ //
+ commonBuiltins.append(
+ "mat2 matrixCompMult(mat2 x, mat2 y);"
+ "mat3 matrixCompMult(mat3 x, mat3 y);"
+ "mat4 matrixCompMult(mat4 x, mat4 y);"
+
+ "\n");
+
+ // 120 is correct for both ES and desktop
+ if (version >= 120) {
+ commonBuiltins.append(
+ "mat2 outerProduct(vec2 c, vec2 r);"
+ "mat3 outerProduct(vec3 c, vec3 r);"
+ "mat4 outerProduct(vec4 c, vec4 r);"
+ "mat2x3 outerProduct(vec3 c, vec2 r);"
+ "mat3x2 outerProduct(vec2 c, vec3 r);"
+ "mat2x4 outerProduct(vec4 c, vec2 r);"
+ "mat4x2 outerProduct(vec2 c, vec4 r);"
+ "mat3x4 outerProduct(vec4 c, vec3 r);"
+ "mat4x3 outerProduct(vec3 c, vec4 r);"
+
+ "mat2 transpose(mat2 m);"
+ "mat3 transpose(mat3 m);"
+ "mat4 transpose(mat4 m);"
+ "mat2x3 transpose(mat3x2 m);"
+ "mat3x2 transpose(mat2x3 m);"
+ "mat2x4 transpose(mat4x2 m);"
+ "mat4x2 transpose(mat2x4 m);"
+ "mat3x4 transpose(mat4x3 m);"
+ "mat4x3 transpose(mat3x4 m);"
+
+ "mat2x3 matrixCompMult(mat2x3, mat2x3);"
+ "mat2x4 matrixCompMult(mat2x4, mat2x4);"
+ "mat3x2 matrixCompMult(mat3x2, mat3x2);"
+ "mat3x4 matrixCompMult(mat3x4, mat3x4);"
+ "mat4x2 matrixCompMult(mat4x2, mat4x2);"
+ "mat4x3 matrixCompMult(mat4x3, mat4x3);"
+
+ "\n");
+
+ // 150 is correct for both ES and desktop
+ if (version >= 150) {
+ commonBuiltins.append(
+ "float determinant(mat2 m);"
+ "float determinant(mat3 m);"
+ "float determinant(mat4 m);"
+
+ "mat2 inverse(mat2 m);"
+ "mat3 inverse(mat3 m);"
+ "mat4 inverse(mat4 m);"
+
+ "\n");
+ }
+ }
+
+ //
+ // Vector relational functions.
+ //
+ commonBuiltins.append(
+ "bvec2 lessThan(vec2 x, vec2 y);"
+ "bvec3 lessThan(vec3 x, vec3 y);"
+ "bvec4 lessThan(vec4 x, vec4 y);"
+
+ "bvec2 lessThan(ivec2 x, ivec2 y);"
+ "bvec3 lessThan(ivec3 x, ivec3 y);"
+ "bvec4 lessThan(ivec4 x, ivec4 y);"
+
+ "bvec2 lessThanEqual(vec2 x, vec2 y);"
+ "bvec3 lessThanEqual(vec3 x, vec3 y);"
+ "bvec4 lessThanEqual(vec4 x, vec4 y);"
+
+ "bvec2 lessThanEqual(ivec2 x, ivec2 y);"
+ "bvec3 lessThanEqual(ivec3 x, ivec3 y);"
+ "bvec4 lessThanEqual(ivec4 x, ivec4 y);"
+
+ "bvec2 greaterThan(vec2 x, vec2 y);"
+ "bvec3 greaterThan(vec3 x, vec3 y);"
+ "bvec4 greaterThan(vec4 x, vec4 y);"
+
+ "bvec2 greaterThan(ivec2 x, ivec2 y);"
+ "bvec3 greaterThan(ivec3 x, ivec3 y);"
+ "bvec4 greaterThan(ivec4 x, ivec4 y);"
+
+ "bvec2 greaterThanEqual(vec2 x, vec2 y);"
+ "bvec3 greaterThanEqual(vec3 x, vec3 y);"
+ "bvec4 greaterThanEqual(vec4 x, vec4 y);"
+
+ "bvec2 greaterThanEqual(ivec2 x, ivec2 y);"
+ "bvec3 greaterThanEqual(ivec3 x, ivec3 y);"
+ "bvec4 greaterThanEqual(ivec4 x, ivec4 y);"
+
+ "bvec2 equal(vec2 x, vec2 y);"
+ "bvec3 equal(vec3 x, vec3 y);"
+ "bvec4 equal(vec4 x, vec4 y);"
+
+ "bvec2 equal(ivec2 x, ivec2 y);"
+ "bvec3 equal(ivec3 x, ivec3 y);"
+ "bvec4 equal(ivec4 x, ivec4 y);"
+
+ "bvec2 equal(bvec2 x, bvec2 y);"
+ "bvec3 equal(bvec3 x, bvec3 y);"
+ "bvec4 equal(bvec4 x, bvec4 y);"
+
+ "bvec2 notEqual(vec2 x, vec2 y);"
+ "bvec3 notEqual(vec3 x, vec3 y);"
+ "bvec4 notEqual(vec4 x, vec4 y);"
+
+ "bvec2 notEqual(ivec2 x, ivec2 y);"
+ "bvec3 notEqual(ivec3 x, ivec3 y);"
+ "bvec4 notEqual(ivec4 x, ivec4 y);"
+
+ "bvec2 notEqual(bvec2 x, bvec2 y);"
+ "bvec3 notEqual(bvec3 x, bvec3 y);"
+ "bvec4 notEqual(bvec4 x, bvec4 y);"
+
+ "bool any(bvec2 x);"
+ "bool any(bvec3 x);"
+ "bool any(bvec4 x);"
+
+ "bool all(bvec2 x);"
+ "bool all(bvec3 x);"
+ "bool all(bvec4 x);"
+
+ "bvec2 not(bvec2 x);"
+ "bvec3 not(bvec3 x);"
+ "bvec4 not(bvec4 x);"
+
+ "\n");
+
+ if (version >= 130) {
+ commonBuiltins.append(
+ "bvec2 lessThan(uvec2 x, uvec2 y);"
+ "bvec3 lessThan(uvec3 x, uvec3 y);"
+ "bvec4 lessThan(uvec4 x, uvec4 y);"
+
+ "bvec2 lessThanEqual(uvec2 x, uvec2 y);"
+ "bvec3 lessThanEqual(uvec3 x, uvec3 y);"
+ "bvec4 lessThanEqual(uvec4 x, uvec4 y);"
+
+ "bvec2 greaterThan(uvec2 x, uvec2 y);"
+ "bvec3 greaterThan(uvec3 x, uvec3 y);"
+ "bvec4 greaterThan(uvec4 x, uvec4 y);"
+
+ "bvec2 greaterThanEqual(uvec2 x, uvec2 y);"
+ "bvec3 greaterThanEqual(uvec3 x, uvec3 y);"
+ "bvec4 greaterThanEqual(uvec4 x, uvec4 y);"
+
+ "bvec2 equal(uvec2 x, uvec2 y);"
+ "bvec3 equal(uvec3 x, uvec3 y);"
+ "bvec4 equal(uvec4 x, uvec4 y);"
+
+ "bvec2 notEqual(uvec2 x, uvec2 y);"
+ "bvec3 notEqual(uvec3 x, uvec3 y);"
+ "bvec4 notEqual(uvec4 x, uvec4 y);"
+
+ "\n");
+ }
+
+ //
+ // Original-style texture functions existing in all stages.
+ // (Per-stage functions below.)
+ //
+ if ((profile == EEsProfile && version == 100) ||
+ profile == ECompatibilityProfile ||
+ (profile == ECoreProfile && version < 420) ||
+ profile == ENoProfile) {
+ if (spv == 0) {
+ commonBuiltins.append(
+ "vec4 texture2D(sampler2D, vec2);"
+
+ "vec4 texture2DProj(sampler2D, vec3);"
+ "vec4 texture2DProj(sampler2D, vec4);"
+
+ "vec4 texture3D(sampler3D, vec3);" // OES_texture_3D, but caught by keyword check
+ "vec4 texture3DProj(sampler3D, vec4);" // OES_texture_3D, but caught by keyword check
+
+ "vec4 textureCube(samplerCube, vec3);"
+
+ "\n");
+ }
+ }
+
+ if ( profile == ECompatibilityProfile ||
+ (profile == ECoreProfile && version < 420) ||
+ profile == ENoProfile) {
+ if (spv == 0) {
+ commonBuiltins.append(
+ "vec4 texture1D(sampler1D, float);"
+
+ "vec4 texture1DProj(sampler1D, vec2);"
+ "vec4 texture1DProj(sampler1D, vec4);"
+
+ "vec4 shadow1D(sampler1DShadow, vec3);"
+ "vec4 shadow2D(sampler2DShadow, vec3);"
+ "vec4 shadow1DProj(sampler1DShadow, vec4);"
+ "vec4 shadow2DProj(sampler2DShadow, vec4);"
+
+ "vec4 texture2DRect(sampler2DRect, vec2);" // GL_ARB_texture_rectangle, caught by keyword check
+ "vec4 texture2DRectProj(sampler2DRect, vec3);" // GL_ARB_texture_rectangle, caught by keyword check
+ "vec4 texture2DRectProj(sampler2DRect, vec4);" // GL_ARB_texture_rectangle, caught by keyword check
+ "vec4 shadow2DRect(sampler2DRectShadow, vec3);" // GL_ARB_texture_rectangle, caught by keyword check
+ "vec4 shadow2DRectProj(sampler2DRectShadow, vec4);" // GL_ARB_texture_rectangle, caught by keyword check
+
+ "\n");
+ }
+ }
+
+ if (profile == EEsProfile) {
+ if (spv == 0) {
+ commonBuiltins.append(
+ "vec4 texture2D(samplerExternalOES, vec2 coord);" // GL_OES_EGL_image_external, caught by keyword check
+ "vec4 texture2DProj(samplerExternalOES, vec3);" // GL_OES_EGL_image_external, caught by keyword check
+ "vec4 texture2DProj(samplerExternalOES, vec4);" // GL_OES_EGL_image_external, caught by keyword check
+ "vec4 texture2DGradEXT(sampler2D, vec2, vec2, vec2);" // GL_EXT_shader_texture_lod
+ "vec4 texture2DProjGradEXT(sampler2D, vec3, vec2, vec2);" // GL_EXT_shader_texture_lod
+ "vec4 texture2DProjGradEXT(sampler2D, vec4, vec2, vec2);" // GL_EXT_shader_texture_lod
+ "vec4 textureCubeGradEXT(samplerCube, vec3, vec3, vec3);" // GL_EXT_shader_texture_lod
+
+ "\n");
+ }
+ }
+
+ //
+ // Noise functions.
+ //
+ if (profile != EEsProfile) {
+ commonBuiltins.append(
+ "float noise1(float x);"
+ "float noise1(vec2 x);"
+ "float noise1(vec3 x);"
+ "float noise1(vec4 x);"
+
+ "vec2 noise2(float x);"
+ "vec2 noise2(vec2 x);"
+ "vec2 noise2(vec3 x);"
+ "vec2 noise2(vec4 x);"
+
+ "vec3 noise3(float x);"
+ "vec3 noise3(vec2 x);"
+ "vec3 noise3(vec3 x);"
+ "vec3 noise3(vec4 x);"
+
+ "vec4 noise4(float x);"
+ "vec4 noise4(vec2 x);"
+ "vec4 noise4(vec3 x);"
+ "vec4 noise4(vec4 x);"
+
+ "\n");
+ }
+
+ if (vulkan == 0) {
+ //
+ // Atomic counter functions.
+ //
+ if ((profile != EEsProfile && version >= 300) ||
+ (profile == EEsProfile && version >= 310)) {
+ commonBuiltins.append(
+ "uint atomicCounterIncrement(atomic_uint x);"
+ "uint atomicCounterDecrement(atomic_uint x);"
+ "uint atomicCounter(atomic_uint x);"
+
+ "\n");
+ }
+ }
+
+ // Bitfield
+ if ((profile == EEsProfile && version >= 310) ||
+ (profile != EEsProfile && version >= 400)) {
+ commonBuiltins.append(
+ " int bitfieldExtract( int, int, int);"
+ "ivec2 bitfieldExtract(ivec2, int, int);"
+ "ivec3 bitfieldExtract(ivec3, int, int);"
+ "ivec4 bitfieldExtract(ivec4, int, int);"
+
+ " uint bitfieldExtract( uint, int, int);"
+ "uvec2 bitfieldExtract(uvec2, int, int);"
+ "uvec3 bitfieldExtract(uvec3, int, int);"
+ "uvec4 bitfieldExtract(uvec4, int, int);"
+
+ " int bitfieldInsert( int base, int, int, int);"
+ "ivec2 bitfieldInsert(ivec2 base, ivec2, int, int);"
+ "ivec3 bitfieldInsert(ivec3 base, ivec3, int, int);"
+ "ivec4 bitfieldInsert(ivec4 base, ivec4, int, int);"
+
+ " uint bitfieldInsert( uint base, uint, int, int);"
+ "uvec2 bitfieldInsert(uvec2 base, uvec2, int, int);"
+ "uvec3 bitfieldInsert(uvec3 base, uvec3, int, int);"
+ "uvec4 bitfieldInsert(uvec4 base, uvec4, int, int);"
+
+ "lowp int findLSB( int);"
+ "lowp ivec2 findLSB(ivec2);"
+ "lowp ivec3 findLSB(ivec3);"
+ "lowp ivec4 findLSB(ivec4);"
+
+ "lowp int findLSB( uint);"
+ "lowp ivec2 findLSB(uvec2);"
+ "lowp ivec3 findLSB(uvec3);"
+ "lowp ivec4 findLSB(uvec4);"
+
+ "\n");
+ }
+
+ if (profile != EEsProfile && version >= 400) {
+ commonBuiltins.append(
+ " uint uaddCarry( uint, uint, out uint carry);"
+ "uvec2 uaddCarry(uvec2, uvec2, out uvec2 carry);"
+ "uvec3 uaddCarry(uvec3, uvec3, out uvec3 carry);"
+ "uvec4 uaddCarry(uvec4, uvec4, out uvec4 carry);"
+
+ " uint usubBorrow( uint, uint, out uint borrow);"
+ "uvec2 usubBorrow(uvec2, uvec2, out uvec2 borrow);"
+ "uvec3 usubBorrow(uvec3, uvec3, out uvec3 borrow);"
+ "uvec4 usubBorrow(uvec4, uvec4, out uvec4 borrow);"
+
+ "void umulExtended( uint, uint, out uint, out uint lsb);"
+ "void umulExtended(uvec2, uvec2, out uvec2, out uvec2 lsb);"
+ "void umulExtended(uvec3, uvec3, out uvec3, out uvec3 lsb);"
+ "void umulExtended(uvec4, uvec4, out uvec4, out uvec4 lsb);"
+
+ "void imulExtended( int, int, out int, out int lsb);"
+ "void imulExtended(ivec2, ivec2, out ivec2, out ivec2 lsb);"
+ "void imulExtended(ivec3, ivec3, out ivec3, out ivec3 lsb);"
+ "void imulExtended(ivec4, ivec4, out ivec4, out ivec4 lsb);"
+
+ " int bitfieldReverse( int);"
+ "ivec2 bitfieldReverse(ivec2);"
+ "ivec3 bitfieldReverse(ivec3);"
+ "ivec4 bitfieldReverse(ivec4);"
+
+ " uint bitfieldReverse( uint);"
+ "uvec2 bitfieldReverse(uvec2);"
+ "uvec3 bitfieldReverse(uvec3);"
+ "uvec4 bitfieldReverse(uvec4);"
+
+ " int bitCount( int);"
+ "ivec2 bitCount(ivec2);"
+ "ivec3 bitCount(ivec3);"
+ "ivec4 bitCount(ivec4);"
+
+ " int bitCount( uint);"
+ "ivec2 bitCount(uvec2);"
+ "ivec3 bitCount(uvec3);"
+ "ivec4 bitCount(uvec4);"
+
+ " int findMSB( int);"
+ "ivec2 findMSB(ivec2);"
+ "ivec3 findMSB(ivec3);"
+ "ivec4 findMSB(ivec4);"
+
+ " int findMSB( uint);"
+ "ivec2 findMSB(uvec2);"
+ "ivec3 findMSB(uvec3);"
+ "ivec4 findMSB(uvec4);"
+
+ "\n");
+ }
+
+ if (profile == EEsProfile && version >= 310) {
+ commonBuiltins.append(
+ "highp uint uaddCarry(highp uint, highp uint, out lowp uint carry);"
+ "highp uvec2 uaddCarry(highp uvec2, highp uvec2, out lowp uvec2 carry);"
+ "highp uvec3 uaddCarry(highp uvec3, highp uvec3, out lowp uvec3 carry);"
+ "highp uvec4 uaddCarry(highp uvec4, highp uvec4, out lowp uvec4 carry);"
+
+ "highp uint usubBorrow(highp uint, highp uint, out lowp uint borrow);"
+ "highp uvec2 usubBorrow(highp uvec2, highp uvec2, out lowp uvec2 borrow);"
+ "highp uvec3 usubBorrow(highp uvec3, highp uvec3, out lowp uvec3 borrow);"
+ "highp uvec4 usubBorrow(highp uvec4, highp uvec4, out lowp uvec4 borrow);"
+
+ "void umulExtended(highp uint, highp uint, highp out uint, out highp uint lsb);"
+ "void umulExtended(highp uvec2, highp uvec2, highp out uvec2, out highp uvec2 lsb);"
+ "void umulExtended(highp uvec3, highp uvec3, highp out uvec3, out highp uvec3 lsb);"
+ "void umulExtended(highp uvec4, highp uvec4, highp out uvec4, out highp uvec4 lsb);"
+
+ "void imulExtended(highp int, highp int, highp out int, out highp int lsb);"
+ "void imulExtended(highp ivec2, highp ivec2, highp out ivec2, out highp ivec2 lsb);"
+ "void imulExtended(highp ivec3, highp ivec3, highp out ivec3, out highp ivec3 lsb);"
+ "void imulExtended(highp ivec4, highp ivec4, highp out ivec4, out highp ivec4 lsb);"
+
+ "highp int bitfieldReverse(highp int);"
+ "highp ivec2 bitfieldReverse(highp ivec2);"
+ "highp ivec3 bitfieldReverse(highp ivec3);"
+ "highp ivec4 bitfieldReverse(highp ivec4);"
+
+ "highp uint bitfieldReverse(highp uint);"
+ "highp uvec2 bitfieldReverse(highp uvec2);"
+ "highp uvec3 bitfieldReverse(highp uvec3);"
+ "highp uvec4 bitfieldReverse(highp uvec4);"
+
+ "lowp int bitCount( int);"
+ "lowp ivec2 bitCount(ivec2);"
+ "lowp ivec3 bitCount(ivec3);"
+ "lowp ivec4 bitCount(ivec4);"
+
+ "lowp int bitCount( uint);"
+ "lowp ivec2 bitCount(uvec2);"
+ "lowp ivec3 bitCount(uvec3);"
+ "lowp ivec4 bitCount(uvec4);"
+
+ "lowp int findMSB(highp int);"
+ "lowp ivec2 findMSB(highp ivec2);"
+ "lowp ivec3 findMSB(highp ivec3);"
+ "lowp ivec4 findMSB(highp ivec4);"
+
+ "lowp int findMSB(highp uint);"
+ "lowp ivec2 findMSB(highp uvec2);"
+ "lowp ivec3 findMSB(highp uvec3);"
+ "lowp ivec4 findMSB(highp uvec4);"
+
+ "\n");
+ }
+
+ // GL_ARB_shader_ballot
+ if (profile != EEsProfile && version >= 450) {
+ commonBuiltins.append(
+ "uint64_t ballotARB(bool);"
+
+ "float readInvocationARB(float, uint);"
+ "vec2 readInvocationARB(vec2, uint);"
+ "vec3 readInvocationARB(vec3, uint);"
+ "vec4 readInvocationARB(vec4, uint);"
+
+ "int readInvocationARB(int, uint);"
+ "ivec2 readInvocationARB(ivec2, uint);"
+ "ivec3 readInvocationARB(ivec3, uint);"
+ "ivec4 readInvocationARB(ivec4, uint);"
+
+ "uint readInvocationARB(uint, uint);"
+ "uvec2 readInvocationARB(uvec2, uint);"
+ "uvec3 readInvocationARB(uvec3, uint);"
+ "uvec4 readInvocationARB(uvec4, uint);"
+
+ "float readFirstInvocationARB(float);"
+ "vec2 readFirstInvocationARB(vec2);"
+ "vec3 readFirstInvocationARB(vec3);"
+ "vec4 readFirstInvocationARB(vec4);"
+
+ "int readFirstInvocationARB(int);"
+ "ivec2 readFirstInvocationARB(ivec2);"
+ "ivec3 readFirstInvocationARB(ivec3);"
+ "ivec4 readFirstInvocationARB(ivec4);"
+
+ "uint readFirstInvocationARB(uint);"
+ "uvec2 readFirstInvocationARB(uvec2);"
+ "uvec3 readFirstInvocationARB(uvec3);"
+ "uvec4 readFirstInvocationARB(uvec4);"
+
+ "\n");
+ }
+
+ // GL_ARB_shader_group_vote
+ if (profile != EEsProfile && version >= 430) {
+ commonBuiltins.append(
+ "bool anyInvocationARB(bool);"
+ "bool allInvocationsARB(bool);"
+ "bool allInvocationsEqualARB(bool);"
+
+ "\n");
+ }
+
+ //============================================================================
+ //
+ // Prototypes for built-in functions seen by vertex shaders only.
+ // (Except legacy lod functions, where it depends which release they are
+ // vertex only.)
+ //
+ //============================================================================
+
+ //
+ // Geometric Functions.
+ //
+ if (IncludeLegacy(version, profile, spv))
+ stageBuiltins[EShLangVertex].append("vec4 ftransform();");
+
+ //
+ // Original-style texture Functions with lod.
+ //
+ TString* s;
+ if (version == 100)
+ s = &stageBuiltins[EShLangVertex];
+ else
+ s = &commonBuiltins;
+ if ((profile == EEsProfile && version == 100) ||
+ profile == ECompatibilityProfile ||
+ (profile == ECoreProfile && version < 420) ||
+ profile == ENoProfile) {
+ if (spv == 0) {
+ s->append(
+ "vec4 texture2DLod(sampler2D, vec2, float);" // GL_ARB_shader_texture_lod
+ "vec4 texture2DProjLod(sampler2D, vec3, float);" // GL_ARB_shader_texture_lod
+ "vec4 texture2DProjLod(sampler2D, vec4, float);" // GL_ARB_shader_texture_lod
+ "vec4 texture3DLod(sampler3D, vec3, float);" // GL_ARB_shader_texture_lod // OES_texture_3D, but caught by keyword check
+ "vec4 texture3DProjLod(sampler3D, vec4, float);" // GL_ARB_shader_texture_lod // OES_texture_3D, but caught by keyword check
+ "vec4 textureCubeLod(samplerCube, vec3, float);" // GL_ARB_shader_texture_lod
+
+ "\n");
+ }
+ }
+ if ( profile == ECompatibilityProfile ||
+ (profile == ECoreProfile && version < 420) ||
+ profile == ENoProfile) {
+ if (spv == 0) {
+ s->append(
+ "vec4 texture1DLod(sampler1D, float, float);" // GL_ARB_shader_texture_lod
+ "vec4 texture1DProjLod(sampler1D, vec2, float);" // GL_ARB_shader_texture_lod
+ "vec4 texture1DProjLod(sampler1D, vec4, float);" // GL_ARB_shader_texture_lod
+ "vec4 shadow1DLod(sampler1DShadow, vec3, float);" // GL_ARB_shader_texture_lod
+ "vec4 shadow2DLod(sampler2DShadow, vec3, float);" // GL_ARB_shader_texture_lod
+ "vec4 shadow1DProjLod(sampler1DShadow, vec4, float);" // GL_ARB_shader_texture_lod
+ "vec4 shadow2DProjLod(sampler2DShadow, vec4, float);" // GL_ARB_shader_texture_lod
+
+ "vec4 texture1DGradARB(sampler1D, float, float, float);" // GL_ARB_shader_texture_lod
+ "vec4 texture1DProjGradARB(sampler1D, vec2, float, float);" // GL_ARB_shader_texture_lod
+ "vec4 texture1DProjGradARB(sampler1D, vec4, float, float);" // GL_ARB_shader_texture_lod
+ "vec4 texture2DGradARB(sampler2D, vec2, vec2, vec2);" // GL_ARB_shader_texture_lod
+ "vec4 texture2DProjGradARB(sampler2D, vec3, vec2, vec2);" // GL_ARB_shader_texture_lod
+ "vec4 texture2DProjGradARB(sampler2D, vec4, vec2, vec2);" // GL_ARB_shader_texture_lod
+ "vec4 texture3DGradARB(sampler3D, vec3, vec3, vec3);" // GL_ARB_shader_texture_lod
+ "vec4 texture3DProjGradARB(sampler3D, vec4, vec3, vec3);" // GL_ARB_shader_texture_lod
+ "vec4 textureCubeGradARB(samplerCube, vec3, vec3, vec3);" // GL_ARB_shader_texture_lod
+ "vec4 shadow1DGradARB(sampler1DShadow, vec3, float, float);" // GL_ARB_shader_texture_lod
+ "vec4 shadow1DProjGradARB( sampler1DShadow, vec4, float, float);" // GL_ARB_shader_texture_lod
+ "vec4 shadow2DGradARB(sampler2DShadow, vec3, vec2, vec2);" // GL_ARB_shader_texture_lod
+ "vec4 shadow2DProjGradARB( sampler2DShadow, vec4, vec2, vec2);" // GL_ARB_shader_texture_lod
+ "vec4 texture2DRectGradARB(sampler2DRect, vec2, vec2, vec2);" // GL_ARB_shader_texture_lod
+ "vec4 texture2DRectProjGradARB( sampler2DRect, vec3, vec2, vec2);" // GL_ARB_shader_texture_lod
+ "vec4 texture2DRectProjGradARB( sampler2DRect, vec4, vec2, vec2);" // GL_ARB_shader_texture_lod
+ "vec4 shadow2DRectGradARB( sampler2DRectShadow, vec3, vec2, vec2);" // GL_ARB_shader_texture_lod
+ "vec4 shadow2DRectProjGradARB(sampler2DRectShadow, vec4, vec2, vec2);" // GL_ARB_shader_texture_lod
+
+ "\n");
+ }
+ }
+
+ if ((profile != EEsProfile && version >= 150) ||
+ (profile == EEsProfile && version >= 310)) {
+ //============================================================================
+ //
+ // Prototypes for built-in functions seen by geometry shaders only.
+ //
+ //============================================================================
+
+ if (profile != EEsProfile && version >= 400) {
+ stageBuiltins[EShLangGeometry].append(
+ "void EmitStreamVertex(int);"
+ "void EndStreamPrimitive(int);"
+ );
+ }
+ stageBuiltins[EShLangGeometry].append(
+ "void EmitVertex();"
+ "void EndPrimitive();"
+ "\n");
+ }
+
+ //============================================================================
+ //
+ // Prototypes for all control functions.
+ //
+ //============================================================================
+ bool esBarrier = (profile == EEsProfile && version >= 310);
+ if ((profile != EEsProfile && version >= 150) || esBarrier)
+ stageBuiltins[EShLangTessControl].append(
+ "void barrier();"
+ );
+ if ((profile != EEsProfile && version >= 420) || esBarrier)
+ stageBuiltins[EShLangCompute].append(
+ "void barrier();"
+ );
+ if ((profile != EEsProfile && version >= 130) || esBarrier)
+ commonBuiltins.append(
+ "void memoryBarrier();"
+ );
+ if ((profile != EEsProfile && version >= 420) || esBarrier) {
+ commonBuiltins.append(
+ "void memoryBarrierAtomicCounter();"
+ "void memoryBarrierBuffer();"
+ "void memoryBarrierImage();"
+ );
+ stageBuiltins[EShLangCompute].append(
+ "void memoryBarrierShared();"
+ "void groupMemoryBarrier();"
+ );
+ }
+
+ //============================================================================
+ //
+ // Prototypes for built-in functions seen by fragment shaders only.
+ //
+ //============================================================================
+
+ //
+ // Original-style texture Functions with bias.
+ //
+ if (spv == 0 && (profile != EEsProfile || version == 100)) {
+ stageBuiltins[EShLangFragment].append(
+ "vec4 texture2D(sampler2D, vec2, float);"
+ "vec4 texture2DProj(sampler2D, vec3, float);"
+ "vec4 texture2DProj(sampler2D, vec4, float);"
+ "vec4 texture3D(sampler3D, vec3, float);" // OES_texture_3D
+ "vec4 texture3DProj(sampler3D, vec4, float);" // OES_texture_3D
+ "vec4 textureCube(samplerCube, vec3, float);"
+
+ "\n");
+ }
+ if (spv == 0 && (profile != EEsProfile && version > 100)) {
+ stageBuiltins[EShLangFragment].append(
+ "vec4 texture1D(sampler1D, float, float);"
+ "vec4 texture1DProj(sampler1D, vec2, float);"
+ "vec4 texture1DProj(sampler1D, vec4, float);"
+ "vec4 shadow1D(sampler1DShadow, vec3, float);"
+ "vec4 shadow2D(sampler2DShadow, vec3, float);"
+ "vec4 shadow1DProj(sampler1DShadow, vec4, float);"
+ "vec4 shadow2DProj(sampler2DShadow, vec4, float);"
+
+ "\n");
+ }
+ if (spv == 0 && profile == EEsProfile) {
+ stageBuiltins[EShLangFragment].append(
+ "vec4 texture2DLodEXT(sampler2D, vec2, float);" // GL_EXT_shader_texture_lod
+ "vec4 texture2DProjLodEXT(sampler2D, vec3, float);" // GL_EXT_shader_texture_lod
+ "vec4 texture2DProjLodEXT(sampler2D, vec4, float);" // GL_EXT_shader_texture_lod
+ "vec4 textureCubeLodEXT(samplerCube, vec3, float);" // GL_EXT_shader_texture_lod
+
+ "\n");
+ }
+
+ stageBuiltins[EShLangFragment].append(
+ "float dFdx(float p);"
+ "vec2 dFdx(vec2 p);"
+ "vec3 dFdx(vec3 p);"
+ "vec4 dFdx(vec4 p);"
+
+ "float dFdy(float p);"
+ "vec2 dFdy(vec2 p);"
+ "vec3 dFdy(vec3 p);"
+ "vec4 dFdy(vec4 p);"
+
+ "float fwidth(float p);"
+ "vec2 fwidth(vec2 p);"
+ "vec3 fwidth(vec3 p);"
+ "vec4 fwidth(vec4 p);"
+
+ "\n");
+
+ // GL_ARB_derivative_control
+ if (profile != EEsProfile && version >= 400) {
+ stageBuiltins[EShLangFragment].append(
+ "float dFdxFine(float p);"
+ "vec2 dFdxFine(vec2 p);"
+ "vec3 dFdxFine(vec3 p);"
+ "vec4 dFdxFine(vec4 p);"
+
+ "float dFdyFine(float p);"
+ "vec2 dFdyFine(vec2 p);"
+ "vec3 dFdyFine(vec3 p);"
+ "vec4 dFdyFine(vec4 p);"
+
+ "float fwidthFine(float p);"
+ "vec2 fwidthFine(vec2 p);"
+ "vec3 fwidthFine(vec3 p);"
+ "vec4 fwidthFine(vec4 p);"
+
+ "\n");
+
+ stageBuiltins[EShLangFragment].append(
+ "float dFdxCoarse(float p);"
+ "vec2 dFdxCoarse(vec2 p);"
+ "vec3 dFdxCoarse(vec3 p);"
+ "vec4 dFdxCoarse(vec4 p);"
+
+ "float dFdyCoarse(float p);"
+ "vec2 dFdyCoarse(vec2 p);"
+ "vec3 dFdyCoarse(vec3 p);"
+ "vec4 dFdyCoarse(vec4 p);"
+
+ "float fwidthCoarse(float p);"
+ "vec2 fwidthCoarse(vec2 p);"
+ "vec3 fwidthCoarse(vec3 p);"
+ "vec4 fwidthCoarse(vec4 p);"
+
+ "\n");
+ }
+
+ // GL_OES_shader_multisample_interpolation
+ if ((profile == EEsProfile && version >= 310) ||
+ (profile != EEsProfile && version >= 400)) {
+ stageBuiltins[EShLangFragment].append(
+ "float interpolateAtCentroid(float);"
+ "vec2 interpolateAtCentroid(vec2);"
+ "vec3 interpolateAtCentroid(vec3);"
+ "vec4 interpolateAtCentroid(vec4);"
+
+ "float interpolateAtSample(float, int);"
+ "vec2 interpolateAtSample(vec2, int);"
+ "vec3 interpolateAtSample(vec3, int);"
+ "vec4 interpolateAtSample(vec4, int);"
+
+ "float interpolateAtOffset(float, vec2);"
+ "vec2 interpolateAtOffset(vec2, vec2);"
+ "vec3 interpolateAtOffset(vec3, vec2);"
+ "vec4 interpolateAtOffset(vec4, vec2);"
+
+ "\n");
+ }
+
+ //============================================================================
+ //
+ // Standard Uniforms
+ //
+ //============================================================================
+
+ //
+ // Depth range in window coordinates, p. 33
+ //
+ if (vulkan == 0) {
+ commonBuiltins.append(
+ "struct gl_DepthRangeParameters {"
+ );
+ if (profile == EEsProfile) {
+ commonBuiltins.append(
+ "highp float near;" // n
+ "highp float far;" // f
+ "highp float diff;" // f - n
+ );
+ } else {
+ commonBuiltins.append(
+ "float near;" // n
+ "float far;" // f
+ "float diff;" // f - n
+ );
+ }
+
+ commonBuiltins.append(
+ "};"
+ "uniform gl_DepthRangeParameters gl_DepthRange;"
+ "\n");
+ }
+
+ if (vulkan == 0 && IncludeLegacy(version, profile, spv)) {
+ //
+ // Matrix state. p. 31, 32, 37, 39, 40.
+ //
+ commonBuiltins.append(
+ "uniform mat4 gl_ModelViewMatrix;"
+ "uniform mat4 gl_ProjectionMatrix;"
+ "uniform mat4 gl_ModelViewProjectionMatrix;"
+
+ //
+ // Derived matrix state that provides inverse and transposed versions
+ // of the matrices above.
+ //
+ "uniform mat3 gl_NormalMatrix;"
+
+ "uniform mat4 gl_ModelViewMatrixInverse;"
+ "uniform mat4 gl_ProjectionMatrixInverse;"
+ "uniform mat4 gl_ModelViewProjectionMatrixInverse;"
+
+ "uniform mat4 gl_ModelViewMatrixTranspose;"
+ "uniform mat4 gl_ProjectionMatrixTranspose;"
+ "uniform mat4 gl_ModelViewProjectionMatrixTranspose;"
+
+ "uniform mat4 gl_ModelViewMatrixInverseTranspose;"
+ "uniform mat4 gl_ProjectionMatrixInverseTranspose;"
+ "uniform mat4 gl_ModelViewProjectionMatrixInverseTranspose;"
+
+ //
+ // Normal scaling p. 39.
+ //
+ "uniform float gl_NormalScale;"
+
+ //
+ // Point Size, p. 66, 67.
+ //
+ "struct gl_PointParameters {"
+ "float size;"
+ "float sizeMin;"
+ "float sizeMax;"
+ "float fadeThresholdSize;"
+ "float distanceConstantAttenuation;"
+ "float distanceLinearAttenuation;"
+ "float distanceQuadraticAttenuation;"
+ "};"
+
+ "uniform gl_PointParameters gl_Point;"
+
+ //
+ // Material State p. 50, 55.
+ //
+ "struct gl_MaterialParameters {"
+ "vec4 emission;" // Ecm
+ "vec4 ambient;" // Acm
+ "vec4 diffuse;" // Dcm
+ "vec4 specular;" // Scm
+ "float shininess;" // Srm
+ "};"
+ "uniform gl_MaterialParameters gl_FrontMaterial;"
+ "uniform gl_MaterialParameters gl_BackMaterial;"
+
+ //
+ // Light State p 50, 53, 55.
+ //
+ "struct gl_LightSourceParameters {"
+ "vec4 ambient;" // Acli
+ "vec4 diffuse;" // Dcli
+ "vec4 specular;" // Scli
+ "vec4 position;" // Ppli
+ "vec4 halfVector;" // Derived: Hi
+ "vec3 spotDirection;" // Sdli
+ "float spotExponent;" // Srli
+ "float spotCutoff;" // Crli
+ // (range: [0.0,90.0], 180.0)
+ "float spotCosCutoff;" // Derived: cos(Crli)
+ // (range: [1.0,0.0],-1.0)
+ "float constantAttenuation;" // K0
+ "float linearAttenuation;" // K1
+ "float quadraticAttenuation;"// K2
+ "};"
+
+
+ "struct gl_LightModelParameters {"
+ "vec4 ambient;" // Acs
+ "};"
+
+ "uniform gl_LightModelParameters gl_LightModel;"
+
+ //
+ // Derived state from products of light and material.
+ //
+ "struct gl_LightModelProducts {"
+ "vec4 sceneColor;" // Derived. Ecm + Acm * Acs
+ "};"
+
+ "uniform gl_LightModelProducts gl_FrontLightModelProduct;"
+ "uniform gl_LightModelProducts gl_BackLightModelProduct;"
+
+ "struct gl_LightProducts {"
+ "vec4 ambient;" // Acm * Acli
+ "vec4 diffuse;" // Dcm * Dcli
+ "vec4 specular;" // Scm * Scli
+ "};"
+
+ //
+ // Fog p. 161
+ //
+ "struct gl_FogParameters {"
+ "vec4 color;"
+ "float density;"
+ "float start;"
+ "float end;"
+ "float scale;" // 1 / (gl_FogEnd - gl_FogStart)
+ "};"
+
+ "uniform gl_FogParameters gl_Fog;"
+
+ "\n");
+ }
+
+ //============================================================================
+ //
+ // Define the interface to the compute shader.
+ //
+ //============================================================================
+
+ if ((profile != EEsProfile && version >= 420) ||
+ (profile == EEsProfile && version >= 310)) {
+ stageBuiltins[EShLangCompute].append(
+ "in highp uvec3 gl_NumWorkGroups;"
+ "const highp uvec3 gl_WorkGroupSize = uvec3(1,1,1);"
+
+ "in highp uvec3 gl_WorkGroupID;"
+ "in highp uvec3 gl_LocalInvocationID;"
+
+ "in highp uvec3 gl_GlobalInvocationID;"
+ "in highp uint gl_LocalInvocationIndex;"
+
+ "\n");
+ }
+
+ //============================================================================
+ //
+ // Define the interface to the vertex shader.
+ //
+ //============================================================================
+
+ if (profile != EEsProfile) {
+ if (version < 130) {
+ stageBuiltins[EShLangVertex].append(
+ "attribute vec4 gl_Color;"
+ "attribute vec4 gl_SecondaryColor;"
+ "attribute vec3 gl_Normal;"
+ "attribute vec4 gl_Vertex;"
+ "attribute vec4 gl_MultiTexCoord0;"
+ "attribute vec4 gl_MultiTexCoord1;"
+ "attribute vec4 gl_MultiTexCoord2;"
+ "attribute vec4 gl_MultiTexCoord3;"
+ "attribute vec4 gl_MultiTexCoord4;"
+ "attribute vec4 gl_MultiTexCoord5;"
+ "attribute vec4 gl_MultiTexCoord6;"
+ "attribute vec4 gl_MultiTexCoord7;"
+ "attribute float gl_FogCoord;"
+ "\n");
+ } else if (IncludeLegacy(version, profile, spv)) {
+ stageBuiltins[EShLangVertex].append(
+ "in vec4 gl_Color;"
+ "in vec4 gl_SecondaryColor;"
+ "in vec3 gl_Normal;"
+ "in vec4 gl_Vertex;"
+ "in vec4 gl_MultiTexCoord0;"
+ "in vec4 gl_MultiTexCoord1;"
+ "in vec4 gl_MultiTexCoord2;"
+ "in vec4 gl_MultiTexCoord3;"
+ "in vec4 gl_MultiTexCoord4;"
+ "in vec4 gl_MultiTexCoord5;"
+ "in vec4 gl_MultiTexCoord6;"
+ "in vec4 gl_MultiTexCoord7;"
+ "in float gl_FogCoord;"
+ "\n");
+ }
+
+ if (version < 150) {
+ if (version < 130) {
+ stageBuiltins[EShLangVertex].append(
+ " vec4 gl_ClipVertex;" // needs qualifier fixed later
+ "varying vec4 gl_FrontColor;"
+ "varying vec4 gl_BackColor;"
+ "varying vec4 gl_FrontSecondaryColor;"
+ "varying vec4 gl_BackSecondaryColor;"
+ "varying vec4 gl_TexCoord[];"
+ "varying float gl_FogFragCoord;"
+ "\n");
+ } else if (IncludeLegacy(version, profile, spv)) {
+ stageBuiltins[EShLangVertex].append(
+ " vec4 gl_ClipVertex;" // needs qualifier fixed later
+ "out vec4 gl_FrontColor;"
+ "out vec4 gl_BackColor;"
+ "out vec4 gl_FrontSecondaryColor;"
+ "out vec4 gl_BackSecondaryColor;"
+ "out vec4 gl_TexCoord[];"
+ "out float gl_FogFragCoord;"
+ "\n");
+ }
+ stageBuiltins[EShLangVertex].append(
+ "vec4 gl_Position;" // needs qualifier fixed later
+ "float gl_PointSize;" // needs qualifier fixed later
+ );
+
+ if (version == 130 || version == 140)
+ stageBuiltins[EShLangVertex].append(
+ "out float gl_ClipDistance[];"
+ );
+ } else {
+ // version >= 150
+ stageBuiltins[EShLangVertex].append(
+ "out gl_PerVertex {"
+ "vec4 gl_Position;" // needs qualifier fixed later
+ "float gl_PointSize;" // needs qualifier fixed later
+ "float gl_ClipDistance[];"
+ );
+ if (IncludeLegacy(version, profile, spv))
+ stageBuiltins[EShLangVertex].append(
+ "vec4 gl_ClipVertex;" // needs qualifier fixed later
+ "vec4 gl_FrontColor;"
+ "vec4 gl_BackColor;"
+ "vec4 gl_FrontSecondaryColor;"
+ "vec4 gl_BackSecondaryColor;"
+ "vec4 gl_TexCoord[];"
+ "float gl_FogFragCoord;"
+ );
+ if (version >= 450)
+ stageBuiltins[EShLangVertex].append(
+ "float gl_CullDistance[];"
+ );
+ stageBuiltins[EShLangVertex].append(
+ "};"
+ "\n");
+ }
+ if (version >= 130 && vulkan == 0)
+ stageBuiltins[EShLangVertex].append(
+ "int gl_VertexID;" // needs qualifier fixed later
+ );
+ if (version >= 140 && vulkan == 0)
+ stageBuiltins[EShLangVertex].append(
+ "int gl_InstanceID;" // needs qualifier fixed later
+ );
+ if (vulkan > 0 && version >= 140)
+ stageBuiltins[EShLangVertex].append(
+ "in int gl_VertexIndex;"
+ "in int gl_InstanceIndex;"
+ );
+ if (version >= 440) {
+ stageBuiltins[EShLangVertex].append(
+ "in int gl_BaseVertexARB;"
+ "in int gl_BaseInstanceARB;"
+ "in int gl_DrawIDARB;"
+ );
+ }
+ } else {
+ // ES profile
+ if (version == 100) {
+ stageBuiltins[EShLangVertex].append(
+ "highp vec4 gl_Position;" // needs qualifier fixed later
+ "mediump float gl_PointSize;" // needs qualifier fixed later
+ );
+ } else {
+ if (vulkan == 0)
+ stageBuiltins[EShLangVertex].append(
+ "in highp int gl_VertexID;" // needs qualifier fixed later
+ "in highp int gl_InstanceID;" // needs qualifier fixed later
+ );
+ if (vulkan > 0)
+ stageBuiltins[EShLangVertex].append(
+ "in highp int gl_VertexIndex;"
+ "in highp int gl_InstanceIndex;"
+ );
+ if (version < 310)
+ stageBuiltins[EShLangVertex].append(
+ "highp vec4 gl_Position;" // needs qualifier fixed later
+ "highp float gl_PointSize;" // needs qualifier fixed later
+ );
+ else
+ stageBuiltins[EShLangVertex].append(
+ "out gl_PerVertex {"
+ "highp vec4 gl_Position;" // needs qualifier fixed later
+ "highp float gl_PointSize;" // needs qualifier fixed later
+ "};"
+ );
+ }
+ }
+
+ //============================================================================
+ //
+ // Define the interface to the geometry shader.
+ //
+ //============================================================================
+
+ if (profile == ECoreProfile || profile == ECompatibilityProfile) {
+ stageBuiltins[EShLangGeometry].append(
+ "in gl_PerVertex {"
+ "vec4 gl_Position;"
+ "float gl_PointSize;"
+ "float gl_ClipDistance[];"
+ );
+ if (profile == ECompatibilityProfile)
+ stageBuiltins[EShLangGeometry].append(
+ "vec4 gl_ClipVertex;"
+ "vec4 gl_FrontColor;"
+ "vec4 gl_BackColor;"
+ "vec4 gl_FrontSecondaryColor;"
+ "vec4 gl_BackSecondaryColor;"
+ "vec4 gl_TexCoord[];"
+ "float gl_FogFragCoord;"
+ );
+ if (version >= 450)
+ stageBuiltins[EShLangGeometry].append(
+ "float gl_CullDistance[];"
+ );
+ stageBuiltins[EShLangGeometry].append(
+ "} gl_in[];"
+
+ "in int gl_PrimitiveIDIn;"
+ "out gl_PerVertex {"
+ "vec4 gl_Position;"
+ "float gl_PointSize;"
+ "float gl_ClipDistance[];"
+ "\n");
+ if (profile == ECompatibilityProfile && version >= 400)
+ stageBuiltins[EShLangGeometry].append(
+ "vec4 gl_ClipVertex;"
+ "vec4 gl_FrontColor;"
+ "vec4 gl_BackColor;"
+ "vec4 gl_FrontSecondaryColor;"
+ "vec4 gl_BackSecondaryColor;"
+ "vec4 gl_TexCoord[];"
+ "float gl_FogFragCoord;"
+ );
+ if (version >= 450)
+ stageBuiltins[EShLangGeometry].append(
+ "float gl_CullDistance[];"
+ );
+ stageBuiltins[EShLangGeometry].append(
+ "};"
+
+ "out int gl_PrimitiveID;"
+ "out int gl_Layer;");
+
+ if (profile == ECompatibilityProfile && version < 400)
+ stageBuiltins[EShLangGeometry].append(
+ "out vec4 gl_ClipVertex;"
+ );
+
+ if (version >= 400)
+ stageBuiltins[EShLangGeometry].append(
+ "in int gl_InvocationID;"
+ );
+ // GL_ARB_viewport_array
+ if (version >= 150)
+ stageBuiltins[EShLangGeometry].append(
+ "out int gl_ViewportIndex;"
+ );
+ stageBuiltins[EShLangGeometry].append("\n");
+ } else if (profile == EEsProfile && version >= 310) {
+ stageBuiltins[EShLangGeometry].append(
+ "in gl_PerVertex {"
+ "highp vec4 gl_Position;"
+ "highp float gl_PointSize;"
+ "} gl_in[];"
+ "\n"
+ "in highp int gl_PrimitiveIDIn;"
+ "in highp int gl_InvocationID;"
+ "\n"
+ "out gl_PerVertex {"
+ "highp vec4 gl_Position;"
+ "highp float gl_PointSize;"
+ "};"
+ "\n"
+ "out highp int gl_PrimitiveID;"
+ "out highp int gl_Layer;"
+ "\n"
+ );
+ }
+
+
+ //============================================================================
+ //
+ // Define the interface to the tessellation control shader.
+ //
+ //============================================================================
+
+ if (profile != EEsProfile && version >= 150) {
+ // Note: "in gl_PerVertex {...} gl_in[gl_MaxPatchVertices];" is declared in initialize() below,
+ // as it depends on the resource sizing of gl_MaxPatchVertices.
+
+ stageBuiltins[EShLangTessControl].append(
+ "in int gl_PatchVerticesIn;"
+ "in int gl_PrimitiveID;"
+ "in int gl_InvocationID;"
+
+ "out gl_PerVertex {"
+ "vec4 gl_Position;"
+ "float gl_PointSize;"
+ "float gl_ClipDistance[];"
+ );
+ if (profile == ECompatibilityProfile)
+ stageBuiltins[EShLangTessControl].append(
+ "vec4 gl_ClipVertex;"
+ "vec4 gl_FrontColor;"
+ "vec4 gl_BackColor;"
+ "vec4 gl_FrontSecondaryColor;"
+ "vec4 gl_BackSecondaryColor;"
+ "vec4 gl_TexCoord[];"
+ "float gl_FogFragCoord;"
+ );
+ if (version >= 450)
+ stageBuiltins[EShLangTessControl].append(
+ "float gl_CullDistance[];"
+ );
+ stageBuiltins[EShLangTessControl].append(
+ "} gl_out[];"
+
+ "patch out float gl_TessLevelOuter[4];"
+ "patch out float gl_TessLevelInner[2];"
+ "\n");
+ } else {
+ // Note: "in gl_PerVertex {...} gl_in[gl_MaxPatchVertices];" is declared in initialize() below,
+ // as it depends on the resource sizing of gl_MaxPatchVertices.
+
+ stageBuiltins[EShLangTessControl].append(
+ "in highp int gl_PatchVerticesIn;"
+ "in highp int gl_PrimitiveID;"
+ "in highp int gl_InvocationID;"
+
+ "out gl_PerVertex {"
+ "highp vec4 gl_Position;"
+ "highp float gl_PointSize;"
+ );
+ stageBuiltins[EShLangTessControl].append(
+ "} gl_out[];"
+
+ "patch out highp float gl_TessLevelOuter[4];"
+ "patch out highp float gl_TessLevelInner[2];"
+ "patch out highp vec4 gl_BoundingBoxOES[2];"
+ "\n");
+ }
+
+ //============================================================================
+ //
+ // Define the interface to the tessellation evaluation shader.
+ //
+ //============================================================================
+
+ if (profile != EEsProfile && version >= 150) {
+ // Note: "in gl_PerVertex {...} gl_in[gl_MaxPatchVertices];" is declared in initialize() below,
+ // as it depends on the resource sizing of gl_MaxPatchVertices.
+
+ stageBuiltins[EShLangTessEvaluation].append(
+ "in int gl_PatchVerticesIn;"
+ "in int gl_PrimitiveID;"
+ "in vec3 gl_TessCoord;"
+
+ "patch in float gl_TessLevelOuter[4];"
+ "patch in float gl_TessLevelInner[2];"
+
+ "out gl_PerVertex {"
+ "vec4 gl_Position;"
+ "float gl_PointSize;"
+ "float gl_ClipDistance[];"
+ );
+ if (version >= 400 && profile == ECompatibilityProfile)
+ stageBuiltins[EShLangTessEvaluation].append(
+ "vec4 gl_ClipVertex;"
+ "vec4 gl_FrontColor;"
+ "vec4 gl_BackColor;"
+ "vec4 gl_FrontSecondaryColor;"
+ "vec4 gl_BackSecondaryColor;"
+ "vec4 gl_TexCoord[];"
+ "float gl_FogFragCoord;"
+ );
+ if (version >= 450)
+ stageBuiltins[EShLangTessEvaluation].append(
+ "float gl_CullDistance[];"
+ );
+ stageBuiltins[EShLangTessEvaluation].append(
+ "};"
+ "\n");
+ } else if (profile == EEsProfile && version >= 310) {
+ // Note: "in gl_PerVertex {...} gl_in[gl_MaxPatchVertices];" is declared in initialize() below,
+ // as it depends on the resource sizing of gl_MaxPatchVertices.
+
+ stageBuiltins[EShLangTessEvaluation].append(
+ "in highp int gl_PatchVerticesIn;"
+ "in highp int gl_PrimitiveID;"
+ "in highp vec3 gl_TessCoord;"
+
+ "patch in highp float gl_TessLevelOuter[4];"
+ "patch in highp float gl_TessLevelInner[2];"
+
+ "out gl_PerVertex {"
+ "highp vec4 gl_Position;"
+ "highp float gl_PointSize;"
+ );
+ stageBuiltins[EShLangTessEvaluation].append(
+ "};"
+ "\n");
+ }
+
+ //============================================================================
+ //
+ // Define the interface to the fragment shader.
+ //
+ //============================================================================
+
+ if (profile != EEsProfile) {
+
+ stageBuiltins[EShLangFragment].append(
+ "vec4 gl_FragCoord;" // needs qualifier fixed later
+ "bool gl_FrontFacing;" // needs qualifier fixed later
+ "float gl_FragDepth;" // needs qualifier fixed later
+ );
+ if (version >= 120)
+ stageBuiltins[EShLangFragment].append(
+ "vec2 gl_PointCoord;" // needs qualifier fixed later
+ );
+ if (IncludeLegacy(version, profile, spv) || (! ForwardCompatibility && version < 420))
+ stageBuiltins[EShLangFragment].append(
+ "vec4 gl_FragColor;" // needs qualifier fixed later
+ );
+
+ if (version < 130) {
+ stageBuiltins[EShLangFragment].append(
+ "varying vec4 gl_Color;"
+ "varying vec4 gl_SecondaryColor;"
+ "varying vec4 gl_TexCoord[];"
+ "varying float gl_FogFragCoord;"
+ );
+ } else {
+ stageBuiltins[EShLangFragment].append(
+ "in float gl_ClipDistance[];"
+ );
+
+ if (IncludeLegacy(version, profile, spv)) {
+ if (version < 150)
+ stageBuiltins[EShLangFragment].append(
+ "in float gl_FogFragCoord;"
+ "in vec4 gl_TexCoord[];"
+ "in vec4 gl_Color;"
+ "in vec4 gl_SecondaryColor;"
+ );
+ else
+ stageBuiltins[EShLangFragment].append(
+ "in gl_PerFragment {"
+ "in float gl_FogFragCoord;"
+ "in vec4 gl_TexCoord[];"
+ "in vec4 gl_Color;"
+ "in vec4 gl_SecondaryColor;"
+ "};"
+ );
+ }
+ }
+
+ if (version >= 150)
+ stageBuiltins[EShLangFragment].append(
+ "flat in int gl_PrimitiveID;"
+ );
+
+ if (version >= 400)
+ stageBuiltins[EShLangFragment].append(
+ "flat in int gl_SampleID;"
+ " in vec2 gl_SamplePosition;"
+ "flat in int gl_SampleMaskIn[];"
+ " out int gl_SampleMask[];"
+ "uniform int gl_NumSamples;"
+ );
+
+ if (version >= 430)
+ stageBuiltins[EShLangFragment].append(
+ "flat in int gl_Layer;"
+ "flat in int gl_ViewportIndex;"
+ );
+
+ if (version >= 450)
+ stageBuiltins[EShLangFragment].append(
+ "in float gl_CullDistance[];"
+ "bool gl_HelperInvocation;" // needs qualifier fixed later
+ );
+ } else {
+ // ES profile
+
+ if (version == 100) {
+ stageBuiltins[EShLangFragment].append(
+ "mediump vec4 gl_FragCoord;" // needs qualifier fixed later
+ " bool gl_FrontFacing;" // needs qualifier fixed later
+ "mediump vec4 gl_FragColor;" // needs qualifier fixed later
+ "mediump vec2 gl_PointCoord;" // needs qualifier fixed later
+ );
+ }
+ if (version >= 300) {
+ stageBuiltins[EShLangFragment].append(
+ "highp vec4 gl_FragCoord;" // needs qualifier fixed later
+ " bool gl_FrontFacing;" // needs qualifier fixed later
+ "mediump vec2 gl_PointCoord;" // needs qualifier fixed later
+ "highp float gl_FragDepth;" // needs qualifier fixed later
+ );
+ }
+ if (version >= 310) {
+ stageBuiltins[EShLangFragment].append(
+ "bool gl_HelperInvocation;" // needs qualifier fixed later
+ "flat in highp int gl_PrimitiveID;" // needs qualifier fixed later
+ "flat in highp int gl_Layer;" // needs qualifier fixed later
+ );
+
+ stageBuiltins[EShLangFragment].append( // GL_OES_sample_variables
+ "flat lowp in int gl_SampleID;"
+ " mediump in vec2 gl_SamplePosition;"
+ "flat highp in int gl_SampleMaskIn[];"
+ " highp out int gl_SampleMask[];"
+ "uniform lowp int gl_NumSamples;"
+ );
+ }
+ stageBuiltins[EShLangFragment].append(
+ "highp float gl_FragDepthEXT;" // GL_EXT_frag_depth
+ );
+ }
+ stageBuiltins[EShLangFragment].append("\n");
+
+ if (version >= 130)
+ add2ndGenerationSamplingImaging(version, profile, spv, vulkan);
+
+ // GL_ARB_shader_ballot
+ if (profile != EEsProfile && version >= 450) {
+ commonBuiltins.append(
+ "uniform uint gl_SubGroupSizeARB;"
+
+ "in uint gl_SubGroupInvocationARB;"
+ "in uint64_t gl_SubGroupEqMaskARB;"
+ "in uint64_t gl_SubGroupGeMaskARB;"
+ "in uint64_t gl_SubGroupGtMaskARB;"
+ "in uint64_t gl_SubGroupLeMaskARB;"
+ "in uint64_t gl_SubGroupLtMaskARB;"
+
+ "\n");
+ }
+
+ //printf("%s\n", commonBuiltins.c_str());
+ //printf("%s\n", stageBuiltins[EShLangFragment].c_str());
+}
+
+//
+// Helper function for initialize(), to add the second set of names for texturing,
+// when adding context-independent built-in functions.
+//
+void TBuiltIns::add2ndGenerationSamplingImaging(int version, EProfile profile, int /*spv*/, int vulkan)
+{
+ //
+ // In this function proper, enumerate the types, then calls the next set of functions
+ // to enumerate all the uses for that type.
+ //
+
+ TBasicType bTypes[3] = { EbtFloat, EbtInt, EbtUint };
+ bool skipBuffer = (profile == EEsProfile && version < 310) || (profile != EEsProfile && version < 140);
+ bool skipCubeArrayed = (profile == EEsProfile && version < 310) || (profile != EEsProfile && version < 130);
+
+ // enumerate all the types
+ for (int image = 0; image <= 1; ++image) { // loop over "bool" image vs sampler
+
+ for (int shadow = 0; shadow <= 1; ++shadow) { // loop over "bool" shadow or not
+ for (int ms = 0; ms <=1; ++ms) {
+ if ((ms || image) && shadow)
+ continue;
+ if (ms && profile != EEsProfile && version < 150)
+ continue;
+ if (ms && image && profile == EEsProfile)
+ continue;
+ if (ms && profile == EEsProfile && version < 310)
+ continue;
+
+ for (int arrayed = 0; arrayed <= 1; ++arrayed) { // loop over "bool" arrayed or not
+ for (int dim = Esd1D; dim < EsdNumDims; ++dim) { // 1D, 2D, ..., buffer
+ if (dim == EsdSubpass && vulkan == 0)
+ continue;
+ if (dim == EsdSubpass && (image || shadow || arrayed))
+ continue;
+ if ((dim == Esd1D || dim == EsdRect) && profile == EEsProfile)
+ continue;
+ if (dim != Esd2D && dim != EsdSubpass && ms)
+ continue;
+ if ((dim == Esd3D || dim == EsdRect) && arrayed)
+ continue;
+ if (dim == Esd3D && shadow)
+ continue;
+ if (dim == EsdCube && arrayed && skipCubeArrayed)
+ continue;
+ if (dim == EsdBuffer && skipBuffer)
+ continue;
+ if (dim == EsdBuffer && (shadow || arrayed || ms))
+ continue;
+ if (ms && arrayed && profile == EEsProfile && version < 310)
+ continue;
+
+ for (int bType = 0; bType < 3; ++bType) { // float, int, uint results
+
+ if (shadow && bType > 0)
+ continue;
+
+ if (dim == EsdRect && version < 140 && bType > 0)
+ continue;
+
+ //
+ // Now, make all the function prototypes for the type we just built...
+ //
+
+ TSampler sampler;
+ if (dim == EsdSubpass) {
+ sampler.setSubpass(bTypes[bType], ms ? true : false);
+ } else if (image) {
+ sampler.setImage(bTypes[bType], (TSamplerDim)dim, arrayed ? true : false,
+ shadow ? true : false,
+ ms ? true : false);
+ } else {
+ sampler.set(bTypes[bType], (TSamplerDim)dim, arrayed ? true : false,
+ shadow ? true : false,
+ ms ? true : false);
+ }
+
+ TString typeName = sampler.getString();
+
+ if (dim == EsdSubpass) {
+ addSubpassSampling(sampler, typeName, version, profile);
+ continue;
+ }
+
+ addQueryFunctions(sampler, typeName, version, profile);
+
+ if (image)
+ addImageFunctions(sampler, typeName, version, profile);
+ else {
+ addSamplingFunctions(sampler, typeName, version, profile);
+ addGatherFunctions(sampler, typeName, version, profile);
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+
+ //
+ // sparseTexelsResidentARB()
+ //
+
+ if (profile != EEsProfile && version >= 450) {
+ commonBuiltins.append("bool sparseTexelsResidentARB(int code);\n");
+ }
+}
+
+//
+// Helper function for add2ndGenerationSamplingImaging(),
+// when adding context-independent built-in functions.
+//
+// Add all the query functions for the given type.
+//
+void TBuiltIns::addQueryFunctions(TSampler sampler, TString& typeName, int version, EProfile profile)
+{
+ if (sampler.image && ((profile == EEsProfile && version < 310) || (profile != EEsProfile && version < 430)))
+ return;
+
+ //
+ // textureSize() and imageSize()
+ //
+
+ int sizeDims = dimMap[sampler.dim] + (sampler.arrayed ? 1 : 0) - (sampler.dim == EsdCube ? 1 : 0);
+ if (profile == EEsProfile)
+ commonBuiltins.append("highp ");
+ if (sizeDims == 1)
+ commonBuiltins.append("int");
+ else {
+ commonBuiltins.append("ivec");
+ commonBuiltins.append(postfixes[sizeDims]);
+ }
+ if (sampler.image)
+ commonBuiltins.append(" imageSize(readonly writeonly volatile coherent ");
+ else
+ commonBuiltins.append(" textureSize(");
+ commonBuiltins.append(typeName);
+ if (! sampler.image && sampler.dim != EsdRect && sampler.dim != EsdBuffer && ! sampler.ms)
+ commonBuiltins.append(",int);\n");
+ else
+ commonBuiltins.append(");\n");
+
+ //
+ // textureSamples() and imageSamples()
+ //
+
+ // GL_ARB_shader_texture_image_samples
+ // TODO: spec issue? there are no memory qualifiers; how to query a writeonly/readonly image, etc?
+ if (profile != EEsProfile && version >= 430 && sampler.ms) {
+ commonBuiltins.append("int ");
+ if (sampler.image)
+ commonBuiltins.append("imageSamples(readonly writeonly volatile coherent ");
+ else
+ commonBuiltins.append("textureSamples(");
+ commonBuiltins.append(typeName);
+ commonBuiltins.append(");\n");
+ }
+
+ //
+ // textureQueryLod(), fragment stage only
+ //
+
+ if (profile != EEsProfile && version >= 400 && ! sampler.image && sampler.dim != EsdRect && ! sampler.ms && sampler.dim != EsdBuffer) {
+ stageBuiltins[EShLangFragment].append("vec2 textureQueryLod(");
+ stageBuiltins[EShLangFragment].append(typeName);
+ if (dimMap[sampler.dim] == 1)
+ stageBuiltins[EShLangFragment].append(", float");
+ else {
+ stageBuiltins[EShLangFragment].append(", vec");
+ stageBuiltins[EShLangFragment].append(postfixes[dimMap[sampler.dim]]);
+ }
+ stageBuiltins[EShLangFragment].append(");\n");
+ }
+
+ //
+ // textureQueryLevels()
+ //
+
+ if (profile != EEsProfile && version >= 430 && ! sampler.image && sampler.dim != EsdRect && ! sampler.ms && sampler.dim != EsdBuffer) {
+ commonBuiltins.append("int textureQueryLevels(");
+ commonBuiltins.append(typeName);
+ commonBuiltins.append(");\n");
+ }
+}
+
+//
+// Helper function for add2ndGenerationSamplingImaging(),
+// when adding context-independent built-in functions.
+//
+// Add all the image access functions for the given type.
+//
+void TBuiltIns::addImageFunctions(TSampler sampler, TString& typeName, int version, EProfile profile)
+{
+ int dims = dimMap[sampler.dim];
+ // most things with an array add a dimension, except for cubemaps
+ if (sampler.arrayed && sampler.dim != EsdCube)
+ ++dims;
+
+ TString imageParams = typeName;
+ if (dims == 1)
+ imageParams.append(", int");
+ else {
+ imageParams.append(", ivec");
+ imageParams.append(postfixes[dims]);
+ }
+ if (sampler.ms)
+ imageParams.append(", int");
+
+ if (profile == EEsProfile)
+ commonBuiltins.append("highp ");
+ commonBuiltins.append(prefixes[sampler.type]);
+ commonBuiltins.append("vec4 imageLoad(readonly volatile coherent ");
+ commonBuiltins.append(imageParams);
+ commonBuiltins.append(");\n");
+
+ commonBuiltins.append("void imageStore(writeonly volatile coherent ");
+ commonBuiltins.append(imageParams);
+ commonBuiltins.append(", ");
+ commonBuiltins.append(prefixes[sampler.type]);
+ commonBuiltins.append("vec4);\n");
+
+ if (sampler.dim != Esd1D && sampler.dim != EsdBuffer && profile != EEsProfile && version >= 450) {
+ commonBuiltins.append("int sparseImageLoadARB(readonly volatile coherent ");
+ commonBuiltins.append(imageParams);
+ commonBuiltins.append(", out ");
+ commonBuiltins.append(prefixes[sampler.type]);
+ commonBuiltins.append("vec4");
+ commonBuiltins.append(");\n");
+ }
+
+ if ( profile != EEsProfile ||
+ (profile == EEsProfile && version >= 310)) {
+ if (sampler.type == EbtInt || sampler.type == EbtUint) {
+ const char* dataType = sampler.type == EbtInt ? "highp int" : "highp uint";
+
+ const int numBuiltins = 7;
+
+ static const char* atomicFunc[numBuiltins] = {
+ " imageAtomicAdd(volatile coherent ",
+ " imageAtomicMin(volatile coherent ",
+ " imageAtomicMax(volatile coherent ",
+ " imageAtomicAnd(volatile coherent ",
+ " imageAtomicOr(volatile coherent ",
+ " imageAtomicXor(volatile coherent ",
+ " imageAtomicExchange(volatile coherent "
+ };
+
+ for (size_t i = 0; i < numBuiltins; ++i) {
+ commonBuiltins.append(dataType);
+ commonBuiltins.append(atomicFunc[i]);
+ commonBuiltins.append(imageParams);
+ commonBuiltins.append(", ");
+ commonBuiltins.append(dataType);
+ commonBuiltins.append(");\n");
+ }
+
+ commonBuiltins.append(dataType);
+ commonBuiltins.append(" imageAtomicCompSwap(volatile coherent ");
+ commonBuiltins.append(imageParams);
+ commonBuiltins.append(", ");
+ commonBuiltins.append(dataType);
+ commonBuiltins.append(", ");
+ commonBuiltins.append(dataType);
+ commonBuiltins.append(");\n");
+ } else {
+ // not int or uint
+ // GL_ARB_ES3_1_compatibility
+ // TODO: spec issue: are there restrictions on the kind of layout() that can be used? what about dropping memory qualifiers?
+ if ((profile != EEsProfile && version >= 450) ||
+ (profile == EEsProfile && version >= 310)) {
+ commonBuiltins.append("float imageAtomicExchange(volatile coherent ");
+ commonBuiltins.append(imageParams);
+ commonBuiltins.append(", float);\n");
+ }
+ }
+ }
+}
+
+//
+// Helper function for initialize(),
+// when adding context-independent built-in functions.
+//
+// Add all the subpass access functions for the given type.
+//
+void TBuiltIns::addSubpassSampling(TSampler sampler, TString& typeName, int /*version*/, EProfile /*profile*/)
+{
+ stageBuiltins[EShLangFragment].append(prefixes[sampler.type]);
+ stageBuiltins[EShLangFragment].append("vec4 subpassLoad");
+ stageBuiltins[EShLangFragment].append("(");
+ stageBuiltins[EShLangFragment].append(typeName.c_str());
+ if (sampler.ms)
+ stageBuiltins[EShLangFragment].append(", int");
+ stageBuiltins[EShLangFragment].append(");\n");
+}
+
+//
+// Helper function for add2ndGenerationSamplingImaging(),
+// when adding context-independent built-in functions.
+//
+// Add all the texture lookup functions for the given type.
+//
+void TBuiltIns::addSamplingFunctions(TSampler sampler, TString& typeName, int version, EProfile profile)
+{
+ //
+ // texturing
+ //
+ for (int proj = 0; proj <= 1; ++proj) { // loop over "bool" projective or not
+
+ if (proj && (sampler.dim == EsdCube || sampler.dim == EsdBuffer || sampler.arrayed || sampler.ms))
+ continue;
+
+ for (int lod = 0; lod <= 1; ++lod) {
+
+ if (lod && (sampler.dim == EsdBuffer || sampler.dim == EsdRect || sampler.ms))
+ continue;
+ if (lod && sampler.dim == Esd2D && sampler.arrayed && sampler.shadow)
+ continue;
+ if (lod && sampler.dim == EsdCube && sampler.shadow)
+ continue;
+
+ for (int bias = 0; bias <= 1; ++bias) {
+
+ if (bias && (lod || sampler.ms))
+ continue;
+ if (bias && sampler.dim == Esd2D && sampler.shadow && sampler.arrayed)
+ continue;
+ if (bias && (sampler.dim == EsdRect || sampler.dim == EsdBuffer))
+ continue;
+
+ for (int offset = 0; offset <= 1; ++offset) { // loop over "bool" offset or not
+
+ if (proj + offset + bias + lod > 3)
+ continue;
+ if (offset && (sampler.dim == EsdCube || sampler.dim == EsdBuffer || sampler.ms))
+ continue;
+
+ for (int fetch = 0; fetch <= 1; ++fetch) { // loop over "bool" fetch or not
+
+ if (proj + offset + fetch + bias + lod > 3)
+ continue;
+ if (fetch && (lod || bias))
+ continue;
+ if (fetch && (sampler.shadow || sampler.dim == EsdCube))
+ continue;
+ if (fetch == 0 && (sampler.ms || sampler.dim == EsdBuffer))
+ continue;
+
+ for (int grad = 0; grad <= 1; ++grad) { // loop over "bool" grad or not
+
+ if (grad && (lod || bias || sampler.ms))
+ continue;
+ if (grad && sampler.dim == EsdBuffer)
+ continue;
+ if (proj + offset + fetch + grad + bias + lod > 3)
+ continue;
+
+ for (int extraProj = 0; extraProj <= 1; ++extraProj) {
+ bool compare = false;
+ int totalDims = dimMap[sampler.dim] + (sampler.arrayed ? 1 : 0);
+ // skip dummy unused second component for 1D non-array shadows
+ if (sampler.shadow && totalDims < 2)
+ totalDims = 2;
+ totalDims += (sampler.shadow ? 1 : 0) + proj;
+ if (totalDims > 4 && sampler.shadow) {
+ compare = true;
+ totalDims = 4;
+ }
+ assert(totalDims <= 4);
+
+ if (extraProj && ! proj)
+ continue;
+ if (extraProj && (sampler.dim == Esd3D || sampler.shadow))
+ continue;
+
+ for (int lodClamp = 0; lodClamp <= 1 ;++lodClamp) { // loop over "bool" lod clamp
+
+ if (lodClamp && (profile == EEsProfile || version < 450))
+ continue;
+ if (lodClamp && (proj || lod || fetch))
+ continue;
+
+ for (int sparse = 0; sparse <= 1; ++sparse) { // loop over "bool" sparse or not
+
+ if (sparse && (profile == EEsProfile || version < 450))
+ continue;
+ // Sparse sampling is not for 1D/1D array texture, buffer texture, and projective texture
+ if (sparse && (sampler.dim == Esd1D || sampler.dim == EsdBuffer || proj))
+ continue;
+
+ TString s;
+
+ // return type
+ if (sparse)
+ s.append("int ");
+ else {
+ if (sampler.shadow)
+ s.append("float ");
+ else {
+ s.append(prefixes[sampler.type]);
+ s.append("vec4 ");
+ }
+ }
+
+ // name
+ if (sparse) {
+ if (fetch)
+ s.append("sparseTexel");
+ else
+ s.append("sparseTexture");
+ } else {
+ if (fetch)
+ s.append("texel");
+ else
+ s.append("texture");
+ }
+ if (proj)
+ s.append("Proj");
+ if (lod)
+ s.append("Lod");
+ if (grad)
+ s.append("Grad");
+ if (fetch)
+ s.append("Fetch");
+ if (offset)
+ s.append("Offset");
+ if (lodClamp)
+ s.append("Clamp");
+ if (lodClamp || sparse)
+ s.append("ARB");
+ s.append("(");
+
+ // sampler type
+ s.append(typeName);
+
+ // P coordinate
+ if (extraProj)
+ s.append(",vec4");
+ else {
+ s.append(",");
+ TBasicType t = fetch ? EbtInt : EbtFloat;
+ if (totalDims == 1)
+ s.append(TType::getBasicString(t));
+ else {
+ s.append(prefixes[t]);
+ s.append("vec");
+ s.append(postfixes[totalDims]);
+ }
+ }
+
+ if (bias && compare)
+ continue;
+
+ // non-optional lod argument (lod that's not driven by lod loop) or sample
+ if ((fetch && sampler.dim != EsdBuffer && sampler.dim != EsdRect && !sampler.ms) ||
+ (sampler.ms && fetch))
+ s.append(",int");
+
+ // non-optional lod
+ if (lod)
+ s.append(",float");
+
+ // gradient arguments
+ if (grad) {
+ if (dimMap[sampler.dim] == 1)
+ s.append(",float,float");
+ else {
+ s.append(",vec");
+ s.append(postfixes[dimMap[sampler.dim]]);
+ s.append(",vec");
+ s.append(postfixes[dimMap[sampler.dim]]);
+ }
+ }
+
+ // offset
+ if (offset) {
+ if (dimMap[sampler.dim] == 1)
+ s.append(",int");
+ else {
+ s.append(",ivec");
+ s.append(postfixes[dimMap[sampler.dim]]);
+ }
+ }
+
+ // non-optional compare
+ if (compare)
+ s.append(",float");
+
+ // lod clamp
+ if (lodClamp)
+ s.append(",float");
+
+ // texel out (for sparse texture)
+ if (sparse) {
+ s.append(",out ");
+ if (sampler.shadow)
+ s.append("float ");
+ else {
+ s.append(prefixes[sampler.type]);
+ s.append("vec4 ");
+ }
+ }
+
+ // optional bias
+ if (bias)
+ s.append(",float");
+
+ s.append(");\n");
+
+ // Add to the per-language set of built-ins
+
+ if (bias)
+ stageBuiltins[EShLangFragment].append(s);
+ else
+ commonBuiltins.append(s);
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+}
+
+
+//
+// Helper function for add2ndGenerationSamplingImaging(),
+// when adding context-independent built-in functions.
+//
+// Add all the texture gather functions for the given type.
+//
+void TBuiltIns::addGatherFunctions(TSampler sampler, TString& typeName, int version, EProfile profile)
+{
+ switch (sampler.dim) {
+ case Esd2D:
+ case EsdRect:
+ case EsdCube:
+ break;
+ default:
+ return;
+ }
+
+ if (sampler.ms)
+ return;
+
+ if (version < 140 && sampler.dim == EsdRect && sampler.type != EbtFloat)
+ return;
+
+ for (int offset = 0; offset < 3; ++offset) { // loop over three forms of offset in the call name: none, Offset, and Offsets
+
+ for (int comp = 0; comp < 2; ++comp) { // loop over presence of comp argument
+
+ if (comp > 0 && sampler.shadow)
+ continue;
+
+ if (offset > 0 && sampler.dim == EsdCube)
+ continue;
+
+ for (int sparse = 0; sparse <= 1; ++sparse) { // loop over "bool" sparse or not
+ if (sparse && (profile == EEsProfile || version < 450))
+ continue;
+
+ TString s;
+
+ // return type
+ if (sparse)
+ s.append("int ");
+ else {
+ s.append(prefixes[sampler.type]);
+ s.append("vec4 ");
+ }
+
+ // name
+ if (sparse)
+ s.append("sparseTextureGather");
+ else
+ s.append("textureGather");
+ switch (offset) {
+ case 1:
+ s.append("Offset");
+ break;
+ case 2:
+ s.append("Offsets");
+ default:
+ break;
+ }
+ if (sparse)
+ s.append("ARB");
+ s.append("(");
+
+ // sampler type argument
+ s.append(typeName);
+
+ // P coordinate argument
+ s.append(",vec");
+ int totalDims = dimMap[sampler.dim] + (sampler.arrayed ? 1 : 0);
+ s.append(postfixes[totalDims]);
+
+ // refZ argument
+ if (sampler.shadow)
+ s.append(",float");
+
+ // offset argument
+ if (offset > 0) {
+ s.append(",ivec2");
+ if (offset == 2)
+ s.append("[4]");
+ }
+
+ // texel out (for sparse texture)
+ if (sparse) {
+ s.append(",out ");
+ s.append(prefixes[sampler.type]);
+ s.append("vec4 ");
+ }
+
+ // comp argument
+ if (comp)
+ s.append(",int");
+
+ s.append(");\n");
+ commonBuiltins.append(s);
+ }
+ }
+ }
+}
+
+//
+// Add context-dependent built-in functions and variables that are present
+// for the given version and profile. All the results are put into just the
+// commonBuiltins, because it is called for just a specific stage. So,
+// add stage-specific entries to the commonBuiltins, and only if that stage
+// was requested.
+//
+void TBuiltIns::initialize(const TBuiltInResource &resources, int version, EProfile profile, int spv, int vulkan, EShLanguage language)
+{
+ //
+ // Initialize the context-dependent (resource-dependent) built-in strings for parsing.
+ //
+
+ //============================================================================
+ //
+ // Standard Uniforms
+ //
+ //============================================================================
+
+ TString& s = commonBuiltins;
+ const int maxSize = 80;
+ char builtInConstant[maxSize];
+
+ //
+ // Build string of implementation dependent constants.
+ //
+
+ if (profile == EEsProfile) {
+ snprintf(builtInConstant, maxSize, "const mediump int gl_MaxVertexAttribs = %d;", resources.maxVertexAttribs);
+ s.append(builtInConstant);
+
+ snprintf(builtInConstant, maxSize, "const mediump int gl_MaxVertexUniformVectors = %d;", resources.maxVertexUniformVectors);
+ s.append(builtInConstant);
+
+ snprintf(builtInConstant, maxSize, "const mediump int gl_MaxVertexTextureImageUnits = %d;", resources.maxVertexTextureImageUnits);
+ s.append(builtInConstant);
+
+ snprintf(builtInConstant, maxSize, "const mediump int gl_MaxCombinedTextureImageUnits = %d;", resources.maxCombinedTextureImageUnits);
+ s.append(builtInConstant);
+
+ snprintf(builtInConstant, maxSize, "const mediump int gl_MaxTextureImageUnits = %d;", resources.maxTextureImageUnits);
+ s.append(builtInConstant);
+
+ snprintf(builtInConstant, maxSize, "const mediump int gl_MaxFragmentUniformVectors = %d;", resources.maxFragmentUniformVectors);
+ s.append(builtInConstant);
+
+ snprintf(builtInConstant, maxSize, "const mediump int gl_MaxDrawBuffers = %d;", resources.maxDrawBuffers);
+ s.append(builtInConstant);
+
+ if (version == 100) {
+ snprintf(builtInConstant, maxSize, "const mediump int gl_MaxVaryingVectors = %d;", resources.maxVaryingVectors);
+ s.append(builtInConstant);
+ } else {
+ snprintf(builtInConstant, maxSize, "const mediump int gl_MaxVertexOutputVectors = %d;", resources.maxVertexOutputVectors);
+ s.append(builtInConstant);
+
+ snprintf(builtInConstant, maxSize, "const mediump int gl_MaxFragmentInputVectors = %d;", resources.maxFragmentInputVectors);
+ s.append(builtInConstant);
+
+ snprintf(builtInConstant, maxSize, "const mediump int gl_MinProgramTexelOffset = %d;", resources.minProgramTexelOffset);
+ s.append(builtInConstant);
+
+ snprintf(builtInConstant, maxSize, "const mediump int gl_MaxProgramTexelOffset = %d;", resources.maxProgramTexelOffset);
+ s.append(builtInConstant);
+ }
+
+ if (version >= 310) {
+ // geometry
+
+ snprintf(builtInConstant, maxSize, "const int gl_MaxGeometryInputComponents = %d;", resources.maxGeometryInputComponents);
+ s.append(builtInConstant);
+ snprintf(builtInConstant, maxSize, "const int gl_MaxGeometryOutputComponents = %d;", resources.maxGeometryOutputComponents);
+ s.append(builtInConstant);
+ snprintf(builtInConstant, maxSize, "const int gl_MaxGeometryImageUniforms = %d;", resources.maxGeometryImageUniforms);
+ s.append(builtInConstant);
+ snprintf(builtInConstant, maxSize, "const int gl_MaxGeometryTextureImageUnits = %d;", resources.maxGeometryTextureImageUnits);
+ s.append(builtInConstant);
+ snprintf(builtInConstant, maxSize, "const int gl_MaxGeometryOutputVertices = %d;", resources.maxGeometryOutputVertices);
+ s.append(builtInConstant);
+ snprintf(builtInConstant, maxSize, "const int gl_MaxGeometryTotalOutputComponents = %d;", resources.maxGeometryTotalOutputComponents);
+ s.append(builtInConstant);
+ snprintf(builtInConstant, maxSize, "const int gl_MaxGeometryUniformComponents = %d;", resources.maxGeometryUniformComponents);
+ s.append(builtInConstant);
+ snprintf(builtInConstant, maxSize, "const int gl_MaxGeometryAtomicCounters = %d;", resources.maxGeometryAtomicCounters);
+ s.append(builtInConstant);
+ snprintf(builtInConstant, maxSize, "const int gl_MaxGeometryAtomicCounterBuffers = %d;", resources.maxGeometryAtomicCounterBuffers);
+ s.append(builtInConstant);
+
+ // tessellation
+
+ snprintf(builtInConstant, maxSize, "const int gl_MaxTessControlInputComponents = %d;", resources.maxTessControlInputComponents);
+ s.append(builtInConstant);
+ snprintf(builtInConstant, maxSize, "const int gl_MaxTessControlOutputComponents = %d;", resources.maxTessControlOutputComponents);
+ s.append(builtInConstant);
+ snprintf(builtInConstant, maxSize, "const int gl_MaxTessControlTextureImageUnits = %d;", resources.maxTessControlTextureImageUnits);
+ s.append(builtInConstant);
+ snprintf(builtInConstant, maxSize, "const int gl_MaxTessControlUniformComponents = %d;", resources.maxTessControlUniformComponents);
+ s.append(builtInConstant);
+ snprintf(builtInConstant, maxSize, "const int gl_MaxTessControlTotalOutputComponents = %d;", resources.maxTessControlTotalOutputComponents);
+ s.append(builtInConstant);
+
+ snprintf(builtInConstant, maxSize, "const int gl_MaxTessEvaluationInputComponents = %d;", resources.maxTessEvaluationInputComponents);
+ s.append(builtInConstant);
+ snprintf(builtInConstant, maxSize, "const int gl_MaxTessEvaluationOutputComponents = %d;", resources.maxTessEvaluationOutputComponents);
+ s.append(builtInConstant);
+ snprintf(builtInConstant, maxSize, "const int gl_MaxTessEvaluationTextureImageUnits = %d;", resources.maxTessEvaluationTextureImageUnits);
+ s.append(builtInConstant);
+ snprintf(builtInConstant, maxSize, "const int gl_MaxTessEvaluationUniformComponents = %d;", resources.maxTessEvaluationUniformComponents);
+ s.append(builtInConstant);
+
+ snprintf(builtInConstant, maxSize, "const int gl_MaxTessPatchComponents = %d;", resources.maxTessPatchComponents);
+ s.append(builtInConstant);
+
+ snprintf(builtInConstant, maxSize, "const int gl_MaxPatchVertices = %d;", resources.maxPatchVertices);
+ s.append(builtInConstant);
+ snprintf(builtInConstant, maxSize, "const int gl_MaxTessGenLevel = %d;", resources.maxTessGenLevel);
+ s.append(builtInConstant);
+
+ // this is here instead of with the others in initialize(version, profile) due to the dependence on gl_MaxPatchVertices
+ if (language == EShLangTessControl || language == EShLangTessEvaluation) {
+ s.append(
+ "in gl_PerVertex {"
+ "highp vec4 gl_Position;"
+ "highp float gl_PointSize;"
+ "} gl_in[gl_MaxPatchVertices];"
+ "\n");
+ }
+ }
+
+ } else {
+ // non-ES profile
+
+ snprintf(builtInConstant, maxSize, "const int gl_MaxVertexAttribs = %d;", resources.maxVertexAttribs);
+ s.append(builtInConstant);
+
+ snprintf(builtInConstant, maxSize, "const int gl_MaxVertexTextureImageUnits = %d;", resources.maxVertexTextureImageUnits);
+ s.append(builtInConstant);
+
+ snprintf(builtInConstant, maxSize, "const int gl_MaxCombinedTextureImageUnits = %d;", resources.maxCombinedTextureImageUnits);
+ s.append(builtInConstant);
+
+ snprintf(builtInConstant, maxSize, "const int gl_MaxTextureImageUnits = %d;", resources.maxTextureImageUnits);
+ s.append(builtInConstant);
+
+ snprintf(builtInConstant, maxSize, "const int gl_MaxDrawBuffers = %d;", resources.maxDrawBuffers);
+ s.append(builtInConstant);
+
+ snprintf(builtInConstant, maxSize, "const int gl_MaxLights = %d;", resources.maxLights);
+ s.append(builtInConstant);
+
+ snprintf(builtInConstant, maxSize, "const int gl_MaxClipPlanes = %d;", resources.maxClipPlanes);
+ s.append(builtInConstant);
+
+ snprintf(builtInConstant, maxSize, "const int gl_MaxTextureUnits = %d;", resources.maxTextureUnits);
+ s.append(builtInConstant);
+
+ snprintf(builtInConstant, maxSize, "const int gl_MaxTextureCoords = %d;", resources.maxTextureCoords);
+ s.append(builtInConstant);
+
+ snprintf(builtInConstant, maxSize, "const int gl_MaxVertexUniformComponents = %d;", resources.maxVertexUniformComponents);
+ s.append(builtInConstant);
+
+ if (version < 150 || ARBCompatibility) {
+ snprintf(builtInConstant, maxSize, "const int gl_MaxVaryingFloats = %d;", resources.maxVaryingFloats);
+ s.append(builtInConstant);
+ }
+
+ snprintf(builtInConstant, maxSize, "const int gl_MaxFragmentUniformComponents = %d;", resources.maxFragmentUniformComponents);
+ s.append(builtInConstant);
+
+ if (vulkan == 0 && IncludeLegacy(version, profile, spv)) {
+ //
+ // OpenGL'uniform' state. Page numbers are in reference to version
+ // 1.4 of the OpenGL specification.
+ //
+
+ //
+ // Matrix state. p. 31, 32, 37, 39, 40.
+ //
+ s.append("uniform mat4 gl_TextureMatrix[gl_MaxTextureCoords];"
+
+ //
+ // Derived matrix state that provides inverse and transposed versions
+ // of the matrices above.
+ //
+ "uniform mat4 gl_TextureMatrixInverse[gl_MaxTextureCoords];"
+
+ "uniform mat4 gl_TextureMatrixTranspose[gl_MaxTextureCoords];"
+
+ "uniform mat4 gl_TextureMatrixInverseTranspose[gl_MaxTextureCoords];"
+
+ //
+ // Clip planes p. 42.
+ //
+ "uniform vec4 gl_ClipPlane[gl_MaxClipPlanes];"
+
+ //
+ // Light State p 50, 53, 55.
+ //
+ "uniform gl_LightSourceParameters gl_LightSource[gl_MaxLights];"
+
+ //
+ // Derived state from products of light.
+ //
+ "uniform gl_LightProducts gl_FrontLightProduct[gl_MaxLights];"
+ "uniform gl_LightProducts gl_BackLightProduct[gl_MaxLights];"
+
+ //
+ // Texture Environment and Generation, p. 152, p. 40-42.
+ //
+ "uniform vec4 gl_TextureEnvColor[gl_MaxTextureImageUnits];"
+ "uniform vec4 gl_EyePlaneS[gl_MaxTextureCoords];"
+ "uniform vec4 gl_EyePlaneT[gl_MaxTextureCoords];"
+ "uniform vec4 gl_EyePlaneR[gl_MaxTextureCoords];"
+ "uniform vec4 gl_EyePlaneQ[gl_MaxTextureCoords];"
+ "uniform vec4 gl_ObjectPlaneS[gl_MaxTextureCoords];"
+ "uniform vec4 gl_ObjectPlaneT[gl_MaxTextureCoords];"
+ "uniform vec4 gl_ObjectPlaneR[gl_MaxTextureCoords];"
+ "uniform vec4 gl_ObjectPlaneQ[gl_MaxTextureCoords];");
+ }
+
+ if (version >= 130) {
+ snprintf(builtInConstant, maxSize, "const int gl_MaxClipDistances = %d;", resources.maxClipDistances);
+ s.append(builtInConstant);
+ snprintf(builtInConstant, maxSize, "const int gl_MaxVaryingComponents = %d;", resources.maxVaryingComponents);
+ s.append(builtInConstant);
+
+ // GL_ARB_shading_language_420pack
+ snprintf(builtInConstant, maxSize, "const mediump int gl_MinProgramTexelOffset = %d;", resources.minProgramTexelOffset);
+ s.append(builtInConstant);
+ snprintf(builtInConstant, maxSize, "const mediump int gl_MaxProgramTexelOffset = %d;", resources.maxProgramTexelOffset);
+ s.append(builtInConstant);
+ }
+
+ // geometry
+ if (version >= 150) {
+ snprintf(builtInConstant, maxSize, "const int gl_MaxGeometryInputComponents = %d;", resources.maxGeometryInputComponents);
+ s.append(builtInConstant);
+ snprintf(builtInConstant, maxSize, "const int gl_MaxGeometryOutputComponents = %d;", resources.maxGeometryOutputComponents);
+ s.append(builtInConstant);
+ snprintf(builtInConstant, maxSize, "const int gl_MaxGeometryTextureImageUnits = %d;", resources.maxGeometryTextureImageUnits);
+ s.append(builtInConstant);
+ snprintf(builtInConstant, maxSize, "const int gl_MaxGeometryOutputVertices = %d;", resources.maxGeometryOutputVertices);
+ s.append(builtInConstant);
+ snprintf(builtInConstant, maxSize, "const int gl_MaxGeometryTotalOutputComponents = %d;", resources.maxGeometryTotalOutputComponents);
+ s.append(builtInConstant);
+ snprintf(builtInConstant, maxSize, "const int gl_MaxGeometryUniformComponents = %d;", resources.maxGeometryUniformComponents);
+ s.append(builtInConstant);
+ snprintf(builtInConstant, maxSize, "const int gl_MaxGeometryVaryingComponents = %d;", resources.maxGeometryVaryingComponents);
+ s.append(builtInConstant);
+
+ }
+
+ if (version >= 150) {
+ snprintf(builtInConstant, maxSize, "const int gl_MaxVertexOutputComponents = %d;", resources.maxVertexOutputComponents);
+ s.append(builtInConstant);
+ snprintf(builtInConstant, maxSize, "const int gl_MaxFragmentInputComponents = %d;", resources.maxFragmentInputComponents);
+ s.append(builtInConstant);
+ }
+
+ // tessellation
+ if (version >= 150) {
+ snprintf(builtInConstant, maxSize, "const int gl_MaxTessControlInputComponents = %d;", resources.maxTessControlInputComponents);
+ s.append(builtInConstant);
+ snprintf(builtInConstant, maxSize, "const int gl_MaxTessControlOutputComponents = %d;", resources.maxTessControlOutputComponents);
+ s.append(builtInConstant);
+ snprintf(builtInConstant, maxSize, "const int gl_MaxTessControlTextureImageUnits = %d;", resources.maxTessControlTextureImageUnits);
+ s.append(builtInConstant);
+ snprintf(builtInConstant, maxSize, "const int gl_MaxTessControlUniformComponents = %d;", resources.maxTessControlUniformComponents);
+ s.append(builtInConstant);
+ snprintf(builtInConstant, maxSize, "const int gl_MaxTessControlTotalOutputComponents = %d;", resources.maxTessControlTotalOutputComponents);
+ s.append(builtInConstant);
+
+ snprintf(builtInConstant, maxSize, "const int gl_MaxTessEvaluationInputComponents = %d;", resources.maxTessEvaluationInputComponents);
+ s.append(builtInConstant);
+ snprintf(builtInConstant, maxSize, "const int gl_MaxTessEvaluationOutputComponents = %d;", resources.maxTessEvaluationOutputComponents);
+ s.append(builtInConstant);
+ snprintf(builtInConstant, maxSize, "const int gl_MaxTessEvaluationTextureImageUnits = %d;", resources.maxTessEvaluationTextureImageUnits);
+ s.append(builtInConstant);
+ snprintf(builtInConstant, maxSize, "const int gl_MaxTessEvaluationUniformComponents = %d;", resources.maxTessEvaluationUniformComponents);
+ s.append(builtInConstant);
+
+ snprintf(builtInConstant, maxSize, "const int gl_MaxTessPatchComponents = %d;", resources.maxTessPatchComponents);
+ s.append(builtInConstant);
+ snprintf(builtInConstant, maxSize, "const int gl_MaxTessGenLevel = %d;", resources.maxTessGenLevel);
+ s.append(builtInConstant);
+ snprintf(builtInConstant, maxSize, "const int gl_MaxPatchVertices = %d;", resources.maxPatchVertices);
+ s.append(builtInConstant);
+
+ // this is here instead of with the others in initialize(version, profile) due to the dependence on gl_MaxPatchVertices
+ if (language == EShLangTessControl || language == EShLangTessEvaluation) {
+ s.append(
+ "in gl_PerVertex {"
+ "vec4 gl_Position;"
+ "float gl_PointSize;"
+ "float gl_ClipDistance[];"
+ );
+ if (profile == ECompatibilityProfile)
+ s.append(
+ "vec4 gl_ClipVertex;"
+ "vec4 gl_FrontColor;"
+ "vec4 gl_BackColor;"
+ "vec4 gl_FrontSecondaryColor;"
+ "vec4 gl_BackSecondaryColor;"
+ "vec4 gl_TexCoord[];"
+ "float gl_FogFragCoord;"
+ );
+ if (profile != EEsProfile && version >= 450)
+ s.append(
+ "float gl_CullDistance[];"
+ );
+ s.append(
+ "} gl_in[gl_MaxPatchVertices];"
+ "\n");
+ }
+ }
+
+ if (version >= 150) {
+ snprintf(builtInConstant, maxSize, "const int gl_MaxViewports = %d;", resources.maxViewports);
+ s.append(builtInConstant);
+ }
+
+ // images
+ if (version >= 130) {
+ snprintf(builtInConstant, maxSize, "const int gl_MaxCombinedImageUnitsAndFragmentOutputs = %d;", resources.maxCombinedImageUnitsAndFragmentOutputs);
+ s.append(builtInConstant);
+ snprintf(builtInConstant, maxSize, "const int gl_MaxImageSamples = %d;", resources.maxImageSamples);
+ s.append(builtInConstant);
+ snprintf(builtInConstant, maxSize, "const int gl_MaxTessControlImageUniforms = %d;", resources.maxTessControlImageUniforms);
+ s.append(builtInConstant);
+ snprintf(builtInConstant, maxSize, "const int gl_MaxTessEvaluationImageUniforms = %d;", resources.maxTessEvaluationImageUniforms);
+ s.append(builtInConstant);
+ snprintf(builtInConstant, maxSize, "const int gl_MaxGeometryImageUniforms = %d;", resources.maxGeometryImageUniforms);
+ s.append(builtInConstant);
+ }
+
+ // enhanced layouts
+ if (version >= 430) {
+ snprintf(builtInConstant, maxSize, "const int gl_MaxTransformFeedbackBuffers = %d;", resources.maxTransformFeedbackBuffers);
+ s.append(builtInConstant);
+ snprintf(builtInConstant, maxSize, "const int gl_MaxTransformFeedbackInterleavedComponents = %d;", resources.maxTransformFeedbackInterleavedComponents);
+ s.append(builtInConstant);
+ }
+ }
+
+ // images (some in compute below)
+ if ((profile == EEsProfile && version >= 310) ||
+ (profile != EEsProfile && version >= 130)) {
+ snprintf(builtInConstant, maxSize, "const int gl_MaxImageUnits = %d;", resources.maxImageUnits);
+ s.append(builtInConstant);
+ snprintf(builtInConstant, maxSize, "const int gl_MaxCombinedShaderOutputResources = %d;", resources.maxCombinedShaderOutputResources);
+ s.append(builtInConstant);
+ snprintf(builtInConstant, maxSize, "const int gl_MaxVertexImageUniforms = %d;", resources.maxVertexImageUniforms);
+ s.append(builtInConstant);
+ snprintf(builtInConstant, maxSize, "const int gl_MaxFragmentImageUniforms = %d;", resources.maxFragmentImageUniforms);
+ s.append(builtInConstant);
+ snprintf(builtInConstant, maxSize, "const int gl_MaxCombinedImageUniforms = %d;", resources.maxCombinedImageUniforms);
+ s.append(builtInConstant);
+ }
+
+ // atomic counters (some in compute below)
+ if ((profile == EEsProfile && version >= 310) ||
+ (profile != EEsProfile && version >= 420)) {
+ snprintf(builtInConstant, maxSize, "const int gl_MaxVertexAtomicCounters = %d;", resources. maxVertexAtomicCounters);
+ s.append(builtInConstant);
+ snprintf(builtInConstant, maxSize, "const int gl_MaxFragmentAtomicCounters = %d;", resources. maxFragmentAtomicCounters);
+ s.append(builtInConstant);
+ snprintf(builtInConstant, maxSize, "const int gl_MaxCombinedAtomicCounters = %d;", resources. maxCombinedAtomicCounters);
+ s.append(builtInConstant);
+ snprintf(builtInConstant, maxSize, "const int gl_MaxAtomicCounterBindings = %d;", resources. maxAtomicCounterBindings);
+ s.append(builtInConstant);
+ snprintf(builtInConstant, maxSize, "const int gl_MaxVertexAtomicCounterBuffers = %d;", resources. maxVertexAtomicCounterBuffers);
+ s.append(builtInConstant);
+ snprintf(builtInConstant, maxSize, "const int gl_MaxFragmentAtomicCounterBuffers = %d;", resources. maxFragmentAtomicCounterBuffers);
+ s.append(builtInConstant);
+ snprintf(builtInConstant, maxSize, "const int gl_MaxCombinedAtomicCounterBuffers = %d;", resources. maxCombinedAtomicCounterBuffers);
+ s.append(builtInConstant);
+ snprintf(builtInConstant, maxSize, "const int gl_MaxAtomicCounterBufferSize = %d;", resources. maxAtomicCounterBufferSize);
+ s.append(builtInConstant);
+ }
+ if (profile != EEsProfile && version >= 420) {
+ snprintf(builtInConstant, maxSize, "const int gl_MaxTessControlAtomicCounters = %d;", resources. maxTessControlAtomicCounters);
+ s.append(builtInConstant);
+ snprintf(builtInConstant, maxSize, "const int gl_MaxTessEvaluationAtomicCounters = %d;", resources. maxTessEvaluationAtomicCounters);
+ s.append(builtInConstant);
+ snprintf(builtInConstant, maxSize, "const int gl_MaxGeometryAtomicCounters = %d;", resources. maxGeometryAtomicCounters);
+ s.append(builtInConstant);
+ snprintf(builtInConstant, maxSize, "const int gl_MaxTessControlAtomicCounterBuffers = %d;", resources. maxTessControlAtomicCounterBuffers);
+ s.append(builtInConstant);
+ snprintf(builtInConstant, maxSize, "const int gl_MaxTessEvaluationAtomicCounterBuffers = %d;", resources. maxTessEvaluationAtomicCounterBuffers);
+ s.append(builtInConstant);
+ snprintf(builtInConstant, maxSize, "const int gl_MaxGeometryAtomicCounterBuffers = %d;", resources. maxGeometryAtomicCounterBuffers);
+ s.append(builtInConstant);
+
+ s.append("\n");
+ }
+
+
+ // compute
+ if ((profile == EEsProfile && version >= 310) || (profile != EEsProfile && version >= 420)) {
+ snprintf(builtInConstant, maxSize, "const ivec3 gl_MaxComputeWorkGroupCount = ivec3(%d,%d,%d);", resources.maxComputeWorkGroupCountX,
+ resources.maxComputeWorkGroupCountY,
+ resources.maxComputeWorkGroupCountZ);
+ s.append(builtInConstant);
+ snprintf(builtInConstant, maxSize, "const ivec3 gl_MaxComputeWorkGroupSize = ivec3(%d,%d,%d);", resources.maxComputeWorkGroupSizeX,
+ resources.maxComputeWorkGroupSizeY,
+ resources.maxComputeWorkGroupSizeZ);
+ s.append(builtInConstant);
+
+ snprintf(builtInConstant, maxSize, "const int gl_MaxComputeUniformComponents = %d;", resources.maxComputeUniformComponents);
+ s.append(builtInConstant);
+ snprintf(builtInConstant, maxSize, "const int gl_MaxComputeTextureImageUnits = %d;", resources.maxComputeTextureImageUnits);
+ s.append(builtInConstant);
+ snprintf(builtInConstant, maxSize, "const int gl_MaxComputeImageUniforms = %d;", resources.maxComputeImageUniforms);
+ s.append(builtInConstant);
+ snprintf(builtInConstant, maxSize, "const int gl_MaxComputeAtomicCounters = %d;", resources.maxComputeAtomicCounters);
+ s.append(builtInConstant);
+ snprintf(builtInConstant, maxSize, "const int gl_MaxComputeAtomicCounterBuffers = %d;", resources.maxComputeAtomicCounterBuffers);
+ s.append(builtInConstant);
+
+ s.append("\n");
+ }
+
+ // GL_ARB_cull_distance
+ if (profile != EEsProfile && version >= 450) {
+ snprintf(builtInConstant, maxSize, "const int gl_MaxCullDistances = %d;", resources.maxCullDistances);
+ s.append(builtInConstant);
+ snprintf(builtInConstant, maxSize, "const int gl_MaxCombinedClipAndCullDistances = %d;", resources.maxCombinedClipAndCullDistances);
+ s.append(builtInConstant);
+ }
+
+ // GL_ARB_ES3_1_compatibility
+ if ((profile != EEsProfile && version >= 450) ||
+ (profile == EEsProfile && version >= 310)) {
+ snprintf(builtInConstant, maxSize, "const int gl_MaxSamples = %d;", resources.maxSamples);
+ s.append(builtInConstant);
+ }
+
+ s.append("\n");
+}
+
+//
+// To support special built-ins that have a special qualifier that cannot be declared textually
+// in a shader, like gl_Position.
+//
+// This lets the type of the built-in be declared textually, and then have just its qualifier be
+// updated afterward.
+//
+// Safe to call even if name is not present.
+//
+// Only use this for built-in variables that have a special qualifier in TStorageQualifier.
+// New built-in variables should use a generic (textually declarable) qualifier in
+// TStoraregQualifier and only call BuiltInVariable().
+//
+static void SpecialQualifier(const char* name, TStorageQualifier qualifier, TBuiltInVariable builtIn, TSymbolTable& symbolTable)
+{
+ TSymbol* symbol = symbolTable.find(name);
+ if (symbol) {
+ TQualifier& symQualifier = symbol->getWritableType().getQualifier();
+ symQualifier.storage = qualifier;
+ symQualifier.builtIn = builtIn;
+ }
+}
+
+//
+// To tag built-in variables with their TBuiltInVariable enum. Use this when the
+// normal declaration text already gets the qualifier right, and all that's needed
+// is setting the builtIn field. This should be the normal way for all new
+// built-in variables.
+//
+// If SpecialQualifier() was called, this does not need to be called.
+//
+// Safe to call even if name is not present.
+//
+static void BuiltInVariable(const char* name, TBuiltInVariable builtIn, TSymbolTable& symbolTable)
+{
+ TSymbol* symbol = symbolTable.find(name);
+ if (! symbol)
+ return;
+
+ TQualifier& symQualifier = symbol->getWritableType().getQualifier();
+ symQualifier.builtIn = builtIn;
+}
+
+//
+// For built-in variables inside a named block.
+// SpecialQualifier() won't ever go inside a block; their member's qualifier come
+// from the qualification of the block.
+//
+// See comments above for other detail.
+//
+static void BuiltInVariable(const char* blockName, const char* name, TBuiltInVariable builtIn, TSymbolTable& symbolTable)
+{
+ TSymbol* symbol = symbolTable.find(blockName);
+ if (! symbol)
+ return;
+
+ TTypeList& structure = *symbol->getWritableType().getWritableStruct();
+ for (int i = 0; i < (int)structure.size(); ++i) {
+ if (structure[i].type->getFieldName().compare(name) == 0) {
+ structure[i].type->getQualifier().builtIn = builtIn;
+ return;
+ }
+ }
+}
+
+//
+// Finish adding/processing context-independent built-in symbols.
+// 1) Programmatically add symbols that could not be added by simple text strings above.
+// 2) Map built-in functions to operators, for those that will turn into an operation node
+// instead of remaining a function call.
+// 3) Tag extension-related symbols added to their base version with their extensions, so
+// that if an early version has the extension turned off, there is an error reported on use.
+//
+void TBuiltIns::identifyBuiltIns(int version, EProfile profile, int spv, int vulkan, EShLanguage language, TSymbolTable& symbolTable)
+{
+ //
+ // Tag built-in variables and functions with additional qualifier and extension information
+ // that cannot be declared with the text strings.
+ //
+
+ // N.B.: a symbol should only be tagged once, and this function is called multiple times, once
+ // per stage that's used for this profile. So
+ // - generally, stick common ones in the fragment stage to ensure they are tagged exactly once
+ // - for ES, which has different precisions for different stages, the coarsest-grained tagging
+ // for a built-in used in many stages needs to be once for the fragment stage and once for
+ // the vertex stage
+
+ switch(language) {
+ case EShLangVertex:
+ if (profile != EEsProfile) {
+ symbolTable.setVariableExtensions("gl_BaseVertexARB", 1, &E_GL_ARB_shader_draw_parameters);
+ symbolTable.setVariableExtensions("gl_BaseInstanceARB", 1, &E_GL_ARB_shader_draw_parameters);
+ symbolTable.setVariableExtensions("gl_DrawIDARB", 1, &E_GL_ARB_shader_draw_parameters);
+
+ BuiltInVariable("gl_BaseVertexARB", EbvBaseVertex, symbolTable);
+ BuiltInVariable("gl_BaseInstanceARB", EbvBaseInstance, symbolTable);
+ BuiltInVariable("gl_DrawIDARB", EbvDrawId, symbolTable);
+ }
+
+ if (profile != EEsProfile) {
+ symbolTable.setVariableExtensions("gl_SubGroupSizeARB", 1, &E_GL_ARB_shader_ballot);
+ symbolTable.setVariableExtensions("gl_SubGroupInvocationARB", 1, &E_GL_ARB_shader_ballot);
+ symbolTable.setVariableExtensions("gl_SubGroupEqMaskARB", 1, &E_GL_ARB_shader_ballot);
+ symbolTable.setVariableExtensions("gl_SubGroupGeMaskARB", 1, &E_GL_ARB_shader_ballot);
+ symbolTable.setVariableExtensions("gl_SubGroupGtMaskARB", 1, &E_GL_ARB_shader_ballot);
+ symbolTable.setVariableExtensions("gl_SubGroupLeMaskARB", 1, &E_GL_ARB_shader_ballot);
+ symbolTable.setVariableExtensions("gl_SubGroupLtMaskARB", 1, &E_GL_ARB_shader_ballot);
+
+ symbolTable.setFunctionExtensions("ballotARB", 1, &E_GL_ARB_shader_ballot);
+ symbolTable.setFunctionExtensions("readInvocationARB", 1, &E_GL_ARB_shader_ballot);
+ symbolTable.setFunctionExtensions("readFirstInvocationARB", 1, &E_GL_ARB_shader_ballot);
+
+ BuiltInVariable("gl_SubGroupSizeARB", EbvSubGroupSize, symbolTable);
+ BuiltInVariable("gl_SubGroupInvocationARB", EbvSubGroupInvocation, symbolTable);
+ BuiltInVariable("gl_SubGroupEqMaskARB", EbvSubGroupEqMask, symbolTable);
+ BuiltInVariable("gl_SubGroupGeMaskARB", EbvSubGroupGeMask, symbolTable);
+ BuiltInVariable("gl_SubGroupGtMaskARB", EbvSubGroupGtMask, symbolTable);
+ BuiltInVariable("gl_SubGroupLeMaskARB", EbvSubGroupLeMask, symbolTable);
+ BuiltInVariable("gl_SubGroupLtMaskARB", EbvSubGroupLtMask, symbolTable);
+
+ symbolTable.setFunctionExtensions("anyInvocationARB", 1, &E_GL_ARB_shader_group_vote);
+ symbolTable.setFunctionExtensions("allInvocationsARB", 1, &E_GL_ARB_shader_group_vote);
+ symbolTable.setFunctionExtensions("allInvocationsEqualARB", 1, &E_GL_ARB_shader_group_vote);
+ }
+
+ // Compatibility variables, vertex only
+ if (spv == 0) {
+ BuiltInVariable("gl_Color", EbvColor, symbolTable);
+ BuiltInVariable("gl_SecondaryColor", EbvSecondaryColor, symbolTable);
+ BuiltInVariable("gl_Normal", EbvNormal, symbolTable);
+ BuiltInVariable("gl_Vertex", EbvVertex, symbolTable);
+ BuiltInVariable("gl_MultiTexCoord0", EbvMultiTexCoord0, symbolTable);
+ BuiltInVariable("gl_MultiTexCoord1", EbvMultiTexCoord1, symbolTable);
+ BuiltInVariable("gl_MultiTexCoord2", EbvMultiTexCoord2, symbolTable);
+ BuiltInVariable("gl_MultiTexCoord3", EbvMultiTexCoord3, symbolTable);
+ BuiltInVariable("gl_MultiTexCoord4", EbvMultiTexCoord4, symbolTable);
+ BuiltInVariable("gl_MultiTexCoord5", EbvMultiTexCoord5, symbolTable);
+ BuiltInVariable("gl_MultiTexCoord6", EbvMultiTexCoord6, symbolTable);
+ BuiltInVariable("gl_MultiTexCoord7", EbvMultiTexCoord7, symbolTable);
+ BuiltInVariable("gl_FogCoord", EbvFogFragCoord, symbolTable);
+ }
+
+ if (profile == EEsProfile) {
+ if (spv == 0) {
+ symbolTable.setFunctionExtensions("texture2DGradEXT", 1, &E_GL_EXT_shader_texture_lod);
+ symbolTable.setFunctionExtensions("texture2DProjGradEXT", 1, &E_GL_EXT_shader_texture_lod);
+ symbolTable.setFunctionExtensions("textureCubeGradEXT", 1, &E_GL_EXT_shader_texture_lod);
+ symbolTable.setFunctionExtensions("textureGatherOffsets", Num_AEP_gpu_shader5, AEP_gpu_shader5);
+ }
+ if (version >= 310)
+ symbolTable.setFunctionExtensions("fma", Num_AEP_gpu_shader5, AEP_gpu_shader5);
+ }
+
+ if (profile == EEsProfile) {
+ symbolTable.setFunctionExtensions("imageAtomicAdd", 1, &E_GL_OES_shader_image_atomic);
+ symbolTable.setFunctionExtensions("imageAtomicMin", 1, &E_GL_OES_shader_image_atomic);
+ symbolTable.setFunctionExtensions("imageAtomicMax", 1, &E_GL_OES_shader_image_atomic);
+ symbolTable.setFunctionExtensions("imageAtomicAnd", 1, &E_GL_OES_shader_image_atomic);
+ symbolTable.setFunctionExtensions("imageAtomicOr", 1, &E_GL_OES_shader_image_atomic);
+ symbolTable.setFunctionExtensions("imageAtomicXor", 1, &E_GL_OES_shader_image_atomic);
+ symbolTable.setFunctionExtensions("imageAtomicExchange", 1, &E_GL_OES_shader_image_atomic);
+ symbolTable.setFunctionExtensions("imageAtomicCompSwap", 1, &E_GL_OES_shader_image_atomic);
+ }
+
+ if (vulkan == 0) {
+ SpecialQualifier("gl_VertexID", EvqVertexId, EbvVertexId, symbolTable);
+ SpecialQualifier("gl_InstanceID", EvqInstanceId, EbvInstanceId, symbolTable);
+ }
+
+ BuiltInVariable("gl_VertexIndex", EbvVertexIndex, symbolTable);
+ BuiltInVariable("gl_InstanceIndex", EbvInstanceIndex, symbolTable);
+
+ // Fall through
+
+ case EShLangTessControl:
+ if (profile == EEsProfile && version >= 310) {
+ symbolTable.setVariableExtensions("gl_BoundingBoxOES", Num_AEP_primitive_bounding_box, AEP_primitive_bounding_box);
+ BuiltInVariable("gl_BoundingBoxOES", EbvBoundingBox, symbolTable);
+ }
+
+ // Fall through
+
+ case EShLangTessEvaluation:
+ case EShLangGeometry:
+ SpecialQualifier("gl_Position", EvqPosition, EbvPosition, symbolTable);
+ SpecialQualifier("gl_PointSize", EvqPointSize, EbvPointSize, symbolTable);
+ SpecialQualifier("gl_ClipVertex", EvqClipVertex, EbvClipVertex, symbolTable);
+
+ BuiltInVariable("gl_in", "gl_Position", EbvPosition, symbolTable);
+ BuiltInVariable("gl_in", "gl_PointSize", EbvPointSize, symbolTable);
+ BuiltInVariable("gl_in", "gl_ClipDistance", EbvClipDistance, symbolTable);
+ BuiltInVariable("gl_in", "gl_CullDistance", EbvCullDistance, symbolTable);
+
+ BuiltInVariable("gl_out", "gl_Position", EbvPosition, symbolTable);
+ BuiltInVariable("gl_out", "gl_PointSize", EbvPointSize, symbolTable);
+ BuiltInVariable("gl_out", "gl_ClipDistance", EbvClipDistance, symbolTable);
+ BuiltInVariable("gl_out", "gl_CullDistance", EbvCullDistance, symbolTable);
+
+ BuiltInVariable("gl_ClipDistance", EbvClipDistance, symbolTable);
+ BuiltInVariable("gl_CullDistance", EbvCullDistance, symbolTable);
+ BuiltInVariable("gl_PrimitiveIDIn", EbvPrimitiveId, symbolTable);
+ BuiltInVariable("gl_PrimitiveID", EbvPrimitiveId, symbolTable);
+ BuiltInVariable("gl_InvocationID", EbvInvocationId, symbolTable);
+ BuiltInVariable("gl_Layer", EbvLayer, symbolTable);
+ BuiltInVariable("gl_ViewportIndex", EbvViewportIndex, symbolTable);
+ BuiltInVariable("gl_PatchVerticesIn", EbvPatchVertices, symbolTable);
+ BuiltInVariable("gl_TessLevelOuter", EbvTessLevelOuter, symbolTable);
+ BuiltInVariable("gl_TessLevelInner", EbvTessLevelInner, symbolTable);
+ BuiltInVariable("gl_TessCoord", EbvTessCoord, symbolTable);
+
+ if (version < 410)
+ symbolTable.setVariableExtensions("gl_ViewportIndex", 1, &E_GL_ARB_viewport_array);
+
+ // Compatibility variables
+
+ BuiltInVariable("gl_in", "gl_ClipVertex", EbvClipVertex, symbolTable);
+ BuiltInVariable("gl_in", "gl_FrontColor", EbvFrontColor, symbolTable);
+ BuiltInVariable("gl_in", "gl_BackColor", EbvBackColor, symbolTable);
+ BuiltInVariable("gl_in", "gl_FrontSecondaryColor", EbvFrontSecondaryColor, symbolTable);
+ BuiltInVariable("gl_in", "gl_BackSecondaryColor", EbvBackSecondaryColor, symbolTable);
+ BuiltInVariable("gl_in", "gl_TexCoord", EbvTexCoord, symbolTable);
+ BuiltInVariable("gl_in", "gl_FogFragCoord", EbvFogFragCoord, symbolTable);
+
+ BuiltInVariable("gl_out", "gl_ClipVertex", EbvClipVertex, symbolTable);
+ BuiltInVariable("gl_out", "gl_FrontColor", EbvFrontColor, symbolTable);
+ BuiltInVariable("gl_out", "gl_BackColor", EbvBackColor, symbolTable);
+ BuiltInVariable("gl_out", "gl_FrontSecondaryColor", EbvFrontSecondaryColor, symbolTable);
+ BuiltInVariable("gl_out", "gl_BackSecondaryColor", EbvBackSecondaryColor, symbolTable);
+ BuiltInVariable("gl_out", "gl_TexCoord", EbvTexCoord, symbolTable);
+ BuiltInVariable("gl_out", "gl_FogFragCoord", EbvFogFragCoord, symbolTable);
+
+ BuiltInVariable("gl_ClipVertex", EbvClipVertex, symbolTable);
+ BuiltInVariable("gl_FrontColor", EbvFrontColor, symbolTable);
+ BuiltInVariable("gl_BackColor", EbvBackColor, symbolTable);
+ BuiltInVariable("gl_FrontSecondaryColor", EbvFrontSecondaryColor, symbolTable);
+ BuiltInVariable("gl_BackSecondaryColor", EbvBackSecondaryColor, symbolTable);
+ BuiltInVariable("gl_TexCoord", EbvTexCoord, symbolTable);
+ BuiltInVariable("gl_FogFragCoord", EbvFogFragCoord, symbolTable);
+
+ // gl_PointSize, when it needs to be tied to an extension, is always a member of a block.
+ // (Sometimes with an instance name, sometimes anonymous).
+ // However, the current automatic extension scheme does not work per block member,
+ // so for now check when parsing.
+ //
+ //if (profile == EEsProfile) {
+ // if (language == EShLangGeometry)
+ // symbolTable.setVariableExtensions("gl_PointSize", Num_AEP_geometry_point_size, AEP_geometry_point_size);
+ // else if (language == EShLangTessEvaluation || language == EShLangTessControl)
+ // symbolTable.setVariableExtensions("gl_PointSize", Num_AEP_tessellation_point_size, AEP_tessellation_point_size);
+ //}
+
+ break;
+
+ case EShLangFragment:
+ SpecialQualifier("gl_FrontFacing", EvqFace, EbvFace, symbolTable);
+ SpecialQualifier("gl_FragCoord", EvqFragCoord, EbvFragCoord, symbolTable);
+ SpecialQualifier("gl_PointCoord", EvqPointCoord, EbvPointCoord, symbolTable);
+ SpecialQualifier("gl_FragColor", EvqFragColor, EbvFragColor, symbolTable);
+ SpecialQualifier("gl_FragDepth", EvqFragDepth, EbvFragDepth, symbolTable);
+ SpecialQualifier("gl_FragDepthEXT", EvqFragDepth, EbvFragDepth, symbolTable);
+ SpecialQualifier("gl_HelperInvocation", EvqVaryingIn, EbvHelperInvocation, symbolTable);
+
+ BuiltInVariable("gl_ClipDistance", EbvClipDistance, symbolTable);
+ BuiltInVariable("gl_CullDistance", EbvCullDistance, symbolTable);
+ BuiltInVariable("gl_PrimitiveID", EbvPrimitiveId, symbolTable);
+
+ if ((profile != EEsProfile && version >= 400) ||
+ (profile == EEsProfile && version >= 310)) {
+ BuiltInVariable("gl_SampleID", EbvSampleId, symbolTable);
+ BuiltInVariable("gl_SamplePosition", EbvSamplePosition, symbolTable);
+ BuiltInVariable("gl_SampleMaskIn", EbvSampleMask, symbolTable);
+ BuiltInVariable("gl_SampleMask", EbvSampleMask, symbolTable);
+ if (profile == EEsProfile) {
+ symbolTable.setVariableExtensions("gl_SampleID", 1, &E_GL_OES_sample_variables);
+ symbolTable.setVariableExtensions("gl_SamplePosition", 1, &E_GL_OES_sample_variables);
+ symbolTable.setVariableExtensions("gl_SampleMaskIn", 1, &E_GL_OES_sample_variables);
+ symbolTable.setVariableExtensions("gl_SampleMask", 1, &E_GL_OES_sample_variables);
+ symbolTable.setVariableExtensions("gl_NumSamples", 1, &E_GL_OES_sample_variables);
+ }
+ }
+
+ BuiltInVariable("gl_Layer", EbvLayer, symbolTable);
+ BuiltInVariable("gl_ViewportIndex", EbvViewportIndex, symbolTable);
+
+ // Compatibility variables
+
+ BuiltInVariable("gl_in", "gl_FogFragCoord", EbvFogFragCoord, symbolTable);
+ BuiltInVariable("gl_in", "gl_TexCoord", EbvTexCoord, symbolTable);
+ BuiltInVariable("gl_in", "gl_Color", EbvColor, symbolTable);
+ BuiltInVariable("gl_in", "gl_SecondaryColor", EbvSecondaryColor, symbolTable);
+
+ BuiltInVariable("gl_FogFragCoord", EbvFogFragCoord, symbolTable);
+ BuiltInVariable("gl_TexCoord", EbvTexCoord, symbolTable);
+ BuiltInVariable("gl_Color", EbvColor, symbolTable);
+ BuiltInVariable("gl_SecondaryColor", EbvSecondaryColor, symbolTable);
+
+ // built-in functions
+
+ if (profile == EEsProfile) {
+ if (spv == 0) {
+ symbolTable.setFunctionExtensions("texture2DLodEXT", 1, &E_GL_EXT_shader_texture_lod);
+ symbolTable.setFunctionExtensions("texture2DProjLodEXT", 1, &E_GL_EXT_shader_texture_lod);
+ symbolTable.setFunctionExtensions("textureCubeLodEXT", 1, &E_GL_EXT_shader_texture_lod);
+ symbolTable.setFunctionExtensions("texture2DGradEXT", 1, &E_GL_EXT_shader_texture_lod);
+ symbolTable.setFunctionExtensions("texture2DProjGradEXT", 1, &E_GL_EXT_shader_texture_lod);
+ symbolTable.setFunctionExtensions("textureCubeGradEXT", 1, &E_GL_EXT_shader_texture_lod);
+ symbolTable.setFunctionExtensions("textureGatherOffsets", Num_AEP_gpu_shader5, AEP_gpu_shader5);
+ }
+ if (version == 100) {
+ symbolTable.setFunctionExtensions("dFdx", 1, &E_GL_OES_standard_derivatives);
+ symbolTable.setFunctionExtensions("dFdy", 1, &E_GL_OES_standard_derivatives);
+ symbolTable.setFunctionExtensions("fwidth", 1, &E_GL_OES_standard_derivatives);
+ }
+ if (version >= 310) {
+ symbolTable.setFunctionExtensions("fma", Num_AEP_gpu_shader5, AEP_gpu_shader5);
+ symbolTable.setFunctionExtensions("interpolateAtCentroid", 1, &E_GL_OES_shader_multisample_interpolation);
+ symbolTable.setFunctionExtensions("interpolateAtSample", 1, &E_GL_OES_shader_multisample_interpolation);
+ symbolTable.setFunctionExtensions("interpolateAtOffset", 1, &E_GL_OES_shader_multisample_interpolation);
+ }
+ } else if (version < 130) {
+ if (spv == 0) {
+ symbolTable.setFunctionExtensions("texture1DLod", 1, &E_GL_ARB_shader_texture_lod);
+ symbolTable.setFunctionExtensions("texture2DLod", 1, &E_GL_ARB_shader_texture_lod);
+ symbolTable.setFunctionExtensions("texture3DLod", 1, &E_GL_ARB_shader_texture_lod);
+ symbolTable.setFunctionExtensions("textureCubeLod", 1, &E_GL_ARB_shader_texture_lod);
+ symbolTable.setFunctionExtensions("texture1DProjLod", 1, &E_GL_ARB_shader_texture_lod);
+ symbolTable.setFunctionExtensions("texture2DProjLod", 1, &E_GL_ARB_shader_texture_lod);
+ symbolTable.setFunctionExtensions("texture3DProjLod", 1, &E_GL_ARB_shader_texture_lod);
+ symbolTable.setFunctionExtensions("shadow1DLod", 1, &E_GL_ARB_shader_texture_lod);
+ symbolTable.setFunctionExtensions("shadow2DLod", 1, &E_GL_ARB_shader_texture_lod);
+ symbolTable.setFunctionExtensions("shadow1DProjLod", 1, &E_GL_ARB_shader_texture_lod);
+ symbolTable.setFunctionExtensions("shadow2DProjLod", 1, &E_GL_ARB_shader_texture_lod);
+ }
+ }
+
+ // E_GL_ARB_shader_texture_lod functions usable only with the extension enabled
+ if (profile != EEsProfile && spv == 0) {
+ symbolTable.setFunctionExtensions("texture1DGradARB", 1, &E_GL_ARB_shader_texture_lod);
+ symbolTable.setFunctionExtensions("texture1DProjGradARB", 1, &E_GL_ARB_shader_texture_lod);
+ symbolTable.setFunctionExtensions("texture2DGradARB", 1, &E_GL_ARB_shader_texture_lod);
+ symbolTable.setFunctionExtensions("texture2DProjGradARB", 1, &E_GL_ARB_shader_texture_lod);
+ symbolTable.setFunctionExtensions("texture3DGradARB", 1, &E_GL_ARB_shader_texture_lod);
+ symbolTable.setFunctionExtensions("texture3DProjGradARB", 1, &E_GL_ARB_shader_texture_lod);
+ symbolTable.setFunctionExtensions("textureCubeGradARB", 1, &E_GL_ARB_shader_texture_lod);
+ symbolTable.setFunctionExtensions("shadow1DGradARB", 1, &E_GL_ARB_shader_texture_lod);
+ symbolTable.setFunctionExtensions("shadow1DProjGradARB", 1, &E_GL_ARB_shader_texture_lod);
+ symbolTable.setFunctionExtensions("shadow2DGradARB", 1, &E_GL_ARB_shader_texture_lod);
+ symbolTable.setFunctionExtensions("shadow2DProjGradARB", 1, &E_GL_ARB_shader_texture_lod);
+ symbolTable.setFunctionExtensions("texture2DRectGradARB", 1, &E_GL_ARB_shader_texture_lod);
+ symbolTable.setFunctionExtensions("texture2DRectProjGradARB", 1, &E_GL_ARB_shader_texture_lod);
+ symbolTable.setFunctionExtensions("shadow2DRectGradARB", 1, &E_GL_ARB_shader_texture_lod);
+ symbolTable.setFunctionExtensions("shadow2DRectProjGradARB", 1, &E_GL_ARB_shader_texture_lod);
+ }
+
+ // E_GL_ARB_shader_image_load_store
+ if (profile != EEsProfile && version < 420)
+ symbolTable.setFunctionExtensions("memoryBarrier", 1, &E_GL_ARB_shader_image_load_store);
+ // All the image access functions are protected by checks on the type of the first argument.
+
+ // E_GL_ARB_shader_atomic_counters
+ if (profile != EEsProfile && version < 420) {
+ symbolTable.setFunctionExtensions("atomicCounterIncrement", 1, &E_GL_ARB_shader_atomic_counters);
+ symbolTable.setFunctionExtensions("atomicCounterDecrement", 1, &E_GL_ARB_shader_atomic_counters);
+ symbolTable.setFunctionExtensions("atomicCounter" , 1, &E_GL_ARB_shader_atomic_counters);
+ }
+
+ // E_GL_ARB_derivative_control
+ if (profile != EEsProfile && version < 450) {
+ symbolTable.setFunctionExtensions("dFdxFine", 1, &E_GL_ARB_derivative_control);
+ symbolTable.setFunctionExtensions("dFdyFine", 1, &E_GL_ARB_derivative_control);
+ symbolTable.setFunctionExtensions("fwidthFine", 1, &E_GL_ARB_derivative_control);
+ symbolTable.setFunctionExtensions("dFdxCoarse", 1, &E_GL_ARB_derivative_control);
+ symbolTable.setFunctionExtensions("dFdyCoarse", 1, &E_GL_ARB_derivative_control);
+ symbolTable.setFunctionExtensions("fwidthCoarse", 1, &E_GL_ARB_derivative_control);
+ }
+
+ // E_GL_ARB_sparse_texture2
+ if (profile != EEsProfile)
+ {
+ symbolTable.setFunctionExtensions("sparseTextureARB", 1, &E_GL_ARB_sparse_texture2);
+ symbolTable.setFunctionExtensions("sparseTextureLodARB", 1, &E_GL_ARB_sparse_texture2);
+ symbolTable.setFunctionExtensions("sparseTextureOffsetARB", 1, &E_GL_ARB_sparse_texture2);
+ symbolTable.setFunctionExtensions("sparseTexelFetchARB", 1, &E_GL_ARB_sparse_texture2);
+ symbolTable.setFunctionExtensions("sparseTexelFetchOffsetARB", 1, &E_GL_ARB_sparse_texture2);
+ symbolTable.setFunctionExtensions("sparseTextureLodOffsetARB", 1, &E_GL_ARB_sparse_texture2);
+ symbolTable.setFunctionExtensions("sparseTextureGradARB", 1, &E_GL_ARB_sparse_texture2);
+ symbolTable.setFunctionExtensions("sparseTextureGradOffsetARB", 1, &E_GL_ARB_sparse_texture2);
+ symbolTable.setFunctionExtensions("sparseTextureGatherARB", 1, &E_GL_ARB_sparse_texture2);
+ symbolTable.setFunctionExtensions("sparseTextureGatherOffsetARB", 1, &E_GL_ARB_sparse_texture2);
+ symbolTable.setFunctionExtensions("sparseTextureGatherOffsetsARB", 1, &E_GL_ARB_sparse_texture2);
+ symbolTable.setFunctionExtensions("sparseImageLoadARB", 1, &E_GL_ARB_sparse_texture2);
+ symbolTable.setFunctionExtensions("sparseTexelsResident", 1, &E_GL_ARB_sparse_texture2);
+ }
+
+ // E_GL_ARB_sparse_texture_clamp
+ if (profile != EEsProfile)
+ {
+ symbolTable.setFunctionExtensions("sparseTextureClampARB", 1, &E_GL_ARB_sparse_texture_clamp);
+ symbolTable.setFunctionExtensions("sparseTextureOffsetClampARB", 1, &E_GL_ARB_sparse_texture_clamp);
+ symbolTable.setFunctionExtensions("sparseTextureGradClampARB", 1, &E_GL_ARB_sparse_texture_clamp);
+ symbolTable.setFunctionExtensions("sparseTextureGradOffsetClampARB", 1, &E_GL_ARB_sparse_texture_clamp);
+ symbolTable.setFunctionExtensions("textureClampARB", 1, &E_GL_ARB_sparse_texture_clamp);
+ symbolTable.setFunctionExtensions("textureOffsetClampARB", 1, &E_GL_ARB_sparse_texture_clamp);
+ symbolTable.setFunctionExtensions("textureGradClampARB", 1, &E_GL_ARB_sparse_texture_clamp);
+ symbolTable.setFunctionExtensions("textureGradOffsetClampARB", 1, &E_GL_ARB_sparse_texture_clamp);
+ }
+
+ symbolTable.setVariableExtensions("gl_FragDepthEXT", 1, &E_GL_EXT_frag_depth);
+
+ if (profile == EEsProfile) {
+ symbolTable.setVariableExtensions("gl_PrimitiveID", Num_AEP_geometry_shader, AEP_geometry_shader);
+ symbolTable.setVariableExtensions("gl_Layer", Num_AEP_geometry_shader, AEP_geometry_shader);
+ }
+
+ if (profile == EEsProfile) {
+ symbolTable.setFunctionExtensions("imageAtomicAdd", 1, &E_GL_OES_shader_image_atomic);
+ symbolTable.setFunctionExtensions("imageAtomicMin", 1, &E_GL_OES_shader_image_atomic);
+ symbolTable.setFunctionExtensions("imageAtomicMax", 1, &E_GL_OES_shader_image_atomic);
+ symbolTable.setFunctionExtensions("imageAtomicAnd", 1, &E_GL_OES_shader_image_atomic);
+ symbolTable.setFunctionExtensions("imageAtomicOr", 1, &E_GL_OES_shader_image_atomic);
+ symbolTable.setFunctionExtensions("imageAtomicXor", 1, &E_GL_OES_shader_image_atomic);
+ symbolTable.setFunctionExtensions("imageAtomicExchange", 1, &E_GL_OES_shader_image_atomic);
+ symbolTable.setFunctionExtensions("imageAtomicCompSwap", 1, &E_GL_OES_shader_image_atomic);
+ }
+ break;
+
+ case EShLangCompute:
+ BuiltInVariable("gl_NumWorkGroups", EbvNumWorkGroups, symbolTable);
+ BuiltInVariable("gl_WorkGroupSize", EbvWorkGroupSize, symbolTable);
+ BuiltInVariable("gl_WorkGroupID", EbvWorkGroupId, symbolTable);
+ BuiltInVariable("gl_LocalInvocationID", EbvLocalInvocationId, symbolTable);
+ BuiltInVariable("gl_GlobalInvocationID", EbvGlobalInvocationId, symbolTable);
+ BuiltInVariable("gl_LocalInvocationIndex", EbvLocalInvocationIndex, symbolTable);
+
+ if (profile != EEsProfile && version < 430) {
+ symbolTable.setVariableExtensions("gl_NumWorkGroups", 1, &E_GL_ARB_compute_shader);
+ symbolTable.setVariableExtensions("gl_WorkGroupSize", 1, &E_GL_ARB_compute_shader);
+ symbolTable.setVariableExtensions("gl_WorkGroupID", 1, &E_GL_ARB_compute_shader);
+ symbolTable.setVariableExtensions("gl_LocalInvocationID", 1, &E_GL_ARB_compute_shader);
+ symbolTable.setVariableExtensions("gl_GlobalInvocationID", 1, &E_GL_ARB_compute_shader);
+ symbolTable.setVariableExtensions("gl_LocalInvocationIndex", 1, &E_GL_ARB_compute_shader);
+
+ symbolTable.setVariableExtensions("gl_MaxComputeWorkGroupCount", 1, &E_GL_ARB_compute_shader);
+ symbolTable.setVariableExtensions("gl_MaxComputeWorkGroupSize", 1, &E_GL_ARB_compute_shader);
+ symbolTable.setVariableExtensions("gl_MaxComputeUniformComponents", 1, &E_GL_ARB_compute_shader);
+ symbolTable.setVariableExtensions("gl_MaxComputeTextureImageUnits", 1, &E_GL_ARB_compute_shader);
+ symbolTable.setVariableExtensions("gl_MaxComputeImageUniforms", 1, &E_GL_ARB_compute_shader);
+ symbolTable.setVariableExtensions("gl_MaxComputeAtomicCounters", 1, &E_GL_ARB_compute_shader);
+ symbolTable.setVariableExtensions("gl_MaxComputeAtomicCounterBuffers", 1, &E_GL_ARB_compute_shader);
+
+ symbolTable.setFunctionExtensions("barrier", 1, &E_GL_ARB_compute_shader);
+ symbolTable.setFunctionExtensions("memoryBarrierAtomicCounter", 1, &E_GL_ARB_compute_shader);
+ symbolTable.setFunctionExtensions("memoryBarrierBuffer", 1, &E_GL_ARB_compute_shader);
+ symbolTable.setFunctionExtensions("memoryBarrierImage", 1, &E_GL_ARB_compute_shader);
+ symbolTable.setFunctionExtensions("memoryBarrierShared", 1, &E_GL_ARB_compute_shader);
+ symbolTable.setFunctionExtensions("groupMemoryBarrier", 1, &E_GL_ARB_compute_shader);
+ }
+ break;
+
+ default:
+ assert(false && "Language not supported");
+ break;
+ }
+
+ //
+ // Next, identify which built-ins have a mapping to an operator.
+ // If PureOperatorBuiltins is false, those that are not identified as such are
+ // expected to be resolved through a library of functions, versus as
+ // operations.
+ //
+ symbolTable.relateToOperator("not", EOpVectorLogicalNot);
+
+ symbolTable.relateToOperator("matrixCompMult", EOpMul);
+ // 120 and 150 are correct for both ES and desktop
+ if (version >= 120) {
+ symbolTable.relateToOperator("outerProduct", EOpOuterProduct);
+ symbolTable.relateToOperator("transpose", EOpTranspose);
+ if (version >= 150) {
+ symbolTable.relateToOperator("determinant", EOpDeterminant);
+ symbolTable.relateToOperator("inverse", EOpMatrixInverse);
+ }
+ }
+
+ symbolTable.relateToOperator("mod", EOpMod);
+ symbolTable.relateToOperator("modf", EOpModf);
+
+ symbolTable.relateToOperator("equal", EOpVectorEqual);
+ symbolTable.relateToOperator("notEqual", EOpVectorNotEqual);
+ symbolTable.relateToOperator("lessThan", EOpLessThan);
+ symbolTable.relateToOperator("greaterThan", EOpGreaterThan);
+ symbolTable.relateToOperator("lessThanEqual", EOpLessThanEqual);
+ symbolTable.relateToOperator("greaterThanEqual", EOpGreaterThanEqual);
+
+ symbolTable.relateToOperator("radians", EOpRadians);
+ symbolTable.relateToOperator("degrees", EOpDegrees);
+ symbolTable.relateToOperator("sin", EOpSin);
+ symbolTable.relateToOperator("cos", EOpCos);
+ symbolTable.relateToOperator("tan", EOpTan);
+ symbolTable.relateToOperator("asin", EOpAsin);
+ symbolTable.relateToOperator("acos", EOpAcos);
+ symbolTable.relateToOperator("atan", EOpAtan);
+ symbolTable.relateToOperator("sinh", EOpSinh);
+ symbolTable.relateToOperator("cosh", EOpCosh);
+ symbolTable.relateToOperator("tanh", EOpTanh);
+ symbolTable.relateToOperator("asinh", EOpAsinh);
+ symbolTable.relateToOperator("acosh", EOpAcosh);
+ symbolTable.relateToOperator("atanh", EOpAtanh);
+
+ symbolTable.relateToOperator("pow", EOpPow);
+ symbolTable.relateToOperator("exp2", EOpExp2);
+ symbolTable.relateToOperator("log", EOpLog);
+ symbolTable.relateToOperator("exp", EOpExp);
+ symbolTable.relateToOperator("log2", EOpLog2);
+ symbolTable.relateToOperator("sqrt", EOpSqrt);
+ symbolTable.relateToOperator("inversesqrt", EOpInverseSqrt);
+
+ symbolTable.relateToOperator("abs", EOpAbs);
+ symbolTable.relateToOperator("sign", EOpSign);
+ symbolTable.relateToOperator("floor", EOpFloor);
+ symbolTable.relateToOperator("trunc", EOpTrunc);
+ symbolTable.relateToOperator("round", EOpRound);
+ symbolTable.relateToOperator("roundEven", EOpRoundEven);
+ symbolTable.relateToOperator("ceil", EOpCeil);
+ symbolTable.relateToOperator("fract", EOpFract);
+ symbolTable.relateToOperator("min", EOpMin);
+ symbolTable.relateToOperator("max", EOpMax);
+ symbolTable.relateToOperator("clamp", EOpClamp);
+ symbolTable.relateToOperator("mix", EOpMix);
+ symbolTable.relateToOperator("step", EOpStep);
+ symbolTable.relateToOperator("smoothstep", EOpSmoothStep);
+
+ symbolTable.relateToOperator("isnan", EOpIsNan);
+ symbolTable.relateToOperator("isinf", EOpIsInf);
+
+ symbolTable.relateToOperator("floatBitsToInt", EOpFloatBitsToInt);
+ symbolTable.relateToOperator("floatBitsToUint", EOpFloatBitsToUint);
+ symbolTable.relateToOperator("intBitsToFloat", EOpIntBitsToFloat);
+ symbolTable.relateToOperator("uintBitsToFloat", EOpUintBitsToFloat);
+ symbolTable.relateToOperator("doubleBitsToInt64", EOpDoubleBitsToInt64);
+ symbolTable.relateToOperator("doubleBitsToUint64", EOpDoubleBitsToUint64);
+ symbolTable.relateToOperator("int64BitsToDouble", EOpInt64BitsToDouble);
+ symbolTable.relateToOperator("uint64BitsToDouble", EOpUint64BitsToDouble);
+
+ symbolTable.relateToOperator("packSnorm2x16", EOpPackSnorm2x16);
+ symbolTable.relateToOperator("unpackSnorm2x16", EOpUnpackSnorm2x16);
+ symbolTable.relateToOperator("packUnorm2x16", EOpPackUnorm2x16);
+ symbolTable.relateToOperator("unpackUnorm2x16", EOpUnpackUnorm2x16);
+
+ symbolTable.relateToOperator("packSnorm4x8", EOpPackSnorm4x8);
+ symbolTable.relateToOperator("unpackSnorm4x8", EOpUnpackSnorm4x8);
+ symbolTable.relateToOperator("packUnorm4x8", EOpPackUnorm4x8);
+ symbolTable.relateToOperator("unpackUnorm4x8", EOpUnpackUnorm4x8);
+
+ symbolTable.relateToOperator("packDouble2x32", EOpPackDouble2x32);
+ symbolTable.relateToOperator("unpackDouble2x32", EOpUnpackDouble2x32);
+
+ symbolTable.relateToOperator("packHalf2x16", EOpPackHalf2x16);
+ symbolTable.relateToOperator("unpackHalf2x16", EOpUnpackHalf2x16);
+
+ symbolTable.relateToOperator("packInt2x32", EOpPackInt2x32);
+ symbolTable.relateToOperator("unpackInt2x32", EOpUnpackInt2x32);
+ symbolTable.relateToOperator("packUint2x32", EOpPackUint2x32);
+ symbolTable.relateToOperator("unpackUint2x32", EOpUnpackUint2x32);
+
+ symbolTable.relateToOperator("length", EOpLength);
+ symbolTable.relateToOperator("distance", EOpDistance);
+ symbolTable.relateToOperator("dot", EOpDot);
+ symbolTable.relateToOperator("cross", EOpCross);
+ symbolTable.relateToOperator("normalize", EOpNormalize);
+ symbolTable.relateToOperator("faceforward", EOpFaceForward);
+ symbolTable.relateToOperator("reflect", EOpReflect);
+ symbolTable.relateToOperator("refract", EOpRefract);
+
+ symbolTable.relateToOperator("any", EOpAny);
+ symbolTable.relateToOperator("all", EOpAll);
+
+ symbolTable.relateToOperator("barrier", EOpBarrier);
+ symbolTable.relateToOperator("memoryBarrier", EOpMemoryBarrier);
+ symbolTable.relateToOperator("memoryBarrierAtomicCounter", EOpMemoryBarrierAtomicCounter);
+ symbolTable.relateToOperator("memoryBarrierBuffer", EOpMemoryBarrierBuffer);
+ symbolTable.relateToOperator("memoryBarrierImage", EOpMemoryBarrierImage);
+
+ symbolTable.relateToOperator("atomicAdd", EOpAtomicAdd);
+ symbolTable.relateToOperator("atomicMin", EOpAtomicMin);
+ symbolTable.relateToOperator("atomicMax", EOpAtomicMax);
+ symbolTable.relateToOperator("atomicAnd", EOpAtomicAnd);
+ symbolTable.relateToOperator("atomicOr", EOpAtomicOr);
+ symbolTable.relateToOperator("atomicXor", EOpAtomicXor);
+ symbolTable.relateToOperator("atomicExchange", EOpAtomicExchange);
+ symbolTable.relateToOperator("atomicCompSwap", EOpAtomicCompSwap);
+
+ symbolTable.relateToOperator("atomicCounterIncrement", EOpAtomicCounterIncrement);
+ symbolTable.relateToOperator("atomicCounterDecrement", EOpAtomicCounterDecrement);
+ symbolTable.relateToOperator("atomicCounter", EOpAtomicCounter);
+
+ symbolTable.relateToOperator("fma", EOpFma);
+ symbolTable.relateToOperator("frexp", EOpFrexp);
+ symbolTable.relateToOperator("ldexp", EOpLdexp);
+ symbolTable.relateToOperator("uaddCarry", EOpAddCarry);
+ symbolTable.relateToOperator("usubBorrow", EOpSubBorrow);
+ symbolTable.relateToOperator("umulExtended", EOpUMulExtended);
+ symbolTable.relateToOperator("imulExtended", EOpIMulExtended);
+ symbolTable.relateToOperator("bitfieldExtract", EOpBitfieldExtract);
+ symbolTable.relateToOperator("bitfieldInsert", EOpBitfieldInsert);
+ symbolTable.relateToOperator("bitfieldReverse", EOpBitFieldReverse);
+ symbolTable.relateToOperator("bitCount", EOpBitCount);
+ symbolTable.relateToOperator("findLSB", EOpFindLSB);
+ symbolTable.relateToOperator("findMSB", EOpFindMSB);
+
+ if (PureOperatorBuiltins) {
+ symbolTable.relateToOperator("imageSize", EOpImageQuerySize);
+ symbolTable.relateToOperator("imageSamples", EOpImageQuerySamples);
+ symbolTable.relateToOperator("imageLoad", EOpImageLoad);
+ symbolTable.relateToOperator("imageStore", EOpImageStore);
+ symbolTable.relateToOperator("imageAtomicAdd", EOpImageAtomicAdd);
+ symbolTable.relateToOperator("imageAtomicMin", EOpImageAtomicMin);
+ symbolTable.relateToOperator("imageAtomicMax", EOpImageAtomicMax);
+ symbolTable.relateToOperator("imageAtomicAnd", EOpImageAtomicAnd);
+ symbolTable.relateToOperator("imageAtomicOr", EOpImageAtomicOr);
+ symbolTable.relateToOperator("imageAtomicXor", EOpImageAtomicXor);
+ symbolTable.relateToOperator("imageAtomicExchange", EOpImageAtomicExchange);
+ symbolTable.relateToOperator("imageAtomicCompSwap", EOpImageAtomicCompSwap);
+
+ symbolTable.relateToOperator("subpassLoad", EOpSubpassLoad);
+ symbolTable.relateToOperator("subpassLoadMS", EOpSubpassLoadMS);
+
+ symbolTable.relateToOperator("textureSize", EOpTextureQuerySize);
+ symbolTable.relateToOperator("textureQueryLod", EOpTextureQueryLod);
+ symbolTable.relateToOperator("textureQueryLevels", EOpTextureQueryLevels);
+ symbolTable.relateToOperator("textureSamples", EOpTextureQuerySamples);
+ symbolTable.relateToOperator("texture", EOpTexture);
+ symbolTable.relateToOperator("textureProj", EOpTextureProj);
+ symbolTable.relateToOperator("textureLod", EOpTextureLod);
+ symbolTable.relateToOperator("textureOffset", EOpTextureOffset);
+ symbolTable.relateToOperator("texelFetch", EOpTextureFetch);
+ symbolTable.relateToOperator("texelFetchOffset", EOpTextureFetchOffset);
+ symbolTable.relateToOperator("textureProjOffset", EOpTextureProjOffset);
+ symbolTable.relateToOperator("textureLodOffset", EOpTextureLodOffset);
+ symbolTable.relateToOperator("textureProjLod", EOpTextureProjLod);
+ symbolTable.relateToOperator("textureProjLodOffset", EOpTextureProjLodOffset);
+ symbolTable.relateToOperator("textureGrad", EOpTextureGrad);
+ symbolTable.relateToOperator("textureGradOffset", EOpTextureGradOffset);
+ symbolTable.relateToOperator("textureProjGrad", EOpTextureProjGrad);
+ symbolTable.relateToOperator("textureProjGradOffset", EOpTextureProjGradOffset);
+ symbolTable.relateToOperator("textureGather", EOpTextureGather);
+ symbolTable.relateToOperator("textureGatherOffset", EOpTextureGatherOffset);
+ symbolTable.relateToOperator("textureGatherOffsets", EOpTextureGatherOffsets);
+
+ symbolTable.relateToOperator("noise1", EOpNoise);
+ symbolTable.relateToOperator("noise2", EOpNoise);
+ symbolTable.relateToOperator("noise3", EOpNoise);
+ symbolTable.relateToOperator("noise4", EOpNoise);
+
+ if (spv == 0 && (IncludeLegacy(version, profile, spv) || (profile == EEsProfile && version == 100))) {
+ symbolTable.relateToOperator("ftransform", EOpFtransform);
+
+ symbolTable.relateToOperator("texture1D", EOpTexture);
+ symbolTable.relateToOperator("texture1DGradARB", EOpTextureGrad);
+ symbolTable.relateToOperator("texture1DProj", EOpTextureProj);
+ symbolTable.relateToOperator("texture1DProjGradARB", EOpTextureProjGrad);
+ symbolTable.relateToOperator("texture1DLod", EOpTextureLod);
+ symbolTable.relateToOperator("texture1DProjLod", EOpTextureProjLod);
+
+ symbolTable.relateToOperator("texture2DRect", EOpTexture);
+ symbolTable.relateToOperator("texture2DRectProj", EOpTextureProj);
+ symbolTable.relateToOperator("texture2DRectGradARB", EOpTextureGrad);
+ symbolTable.relateToOperator("texture2DRectProjGradARB", EOpTextureProjGrad);
+ symbolTable.relateToOperator("shadow2DRect", EOpTexture);
+ symbolTable.relateToOperator("shadow2DRectProj", EOpTextureProj);
+ symbolTable.relateToOperator("shadow2DRectGradARB", EOpTextureGrad);
+ symbolTable.relateToOperator("shadow2DRectProjGradARB", EOpTextureProjGrad);
+
+ symbolTable.relateToOperator("texture2D", EOpTexture);
+ symbolTable.relateToOperator("texture2DProj", EOpTextureProj);
+ symbolTable.relateToOperator("texture2DGradEXT", EOpTextureGrad);
+ symbolTable.relateToOperator("texture2DGradARB", EOpTextureGrad);
+ symbolTable.relateToOperator("texture2DProjGradEXT", EOpTextureProjGrad);
+ symbolTable.relateToOperator("texture2DProjGradARB", EOpTextureProjGrad);
+ symbolTable.relateToOperator("texture2DLod", EOpTextureLod);
+ symbolTable.relateToOperator("texture2DLodEXT", EOpTextureLod);
+ symbolTable.relateToOperator("texture2DProjLod", EOpTextureProjLod);
+ symbolTable.relateToOperator("texture2DProjLodEXT", EOpTextureProjLod);
+
+ symbolTable.relateToOperator("texture3D", EOpTexture);
+ symbolTable.relateToOperator("texture3DGradARB", EOpTextureGrad);
+ symbolTable.relateToOperator("texture3DProj", EOpTextureProj);
+ symbolTable.relateToOperator("texture3DProjGradARB", EOpTextureProjGrad);
+ symbolTable.relateToOperator("texture3DLod", EOpTextureLod);
+ symbolTable.relateToOperator("texture3DProjLod", EOpTextureProjLod);
+ symbolTable.relateToOperator("textureCube", EOpTexture);
+ symbolTable.relateToOperator("textureCubeGradEXT", EOpTextureGrad);
+ symbolTable.relateToOperator("textureCubeGradARB", EOpTextureGrad);
+ symbolTable.relateToOperator("textureCubeLod", EOpTextureLod);
+ symbolTable.relateToOperator("textureCubeLodEXT", EOpTextureLod);
+ symbolTable.relateToOperator("shadow1D", EOpTexture);
+ symbolTable.relateToOperator("shadow1DGradARB", EOpTextureGrad);
+ symbolTable.relateToOperator("shadow2D", EOpTexture);
+ symbolTable.relateToOperator("shadow2DGradARB", EOpTextureGrad);
+ symbolTable.relateToOperator("shadow1DProj", EOpTextureProj);
+ symbolTable.relateToOperator("shadow2DProj", EOpTextureProj);
+ symbolTable.relateToOperator("shadow1DProjGradARB", EOpTextureProjGrad);
+ symbolTable.relateToOperator("shadow2DProjGradARB", EOpTextureProjGrad);
+ symbolTable.relateToOperator("shadow1DLod", EOpTextureLod);
+ symbolTable.relateToOperator("shadow2DLod", EOpTextureLod);
+ symbolTable.relateToOperator("shadow1DProjLod", EOpTextureProjLod);
+ symbolTable.relateToOperator("shadow2DProjLod", EOpTextureProjLod);
+ }
+
+ if (profile != EEsProfile) {
+ symbolTable.relateToOperator("sparseTextureARB", EOpSparseTexture);
+ symbolTable.relateToOperator("sparseTextureLodARB", EOpSparseTextureLod);
+ symbolTable.relateToOperator("sparseTextureOffsetARB", EOpSparseTextureOffset);
+ symbolTable.relateToOperator("sparseTexelFetchARB", EOpSparseTextureFetch);
+ symbolTable.relateToOperator("sparseTexelFetchOffsetARB", EOpSparseTextureFetchOffset);
+ symbolTable.relateToOperator("sparseTextureLodOffsetARB", EOpSparseTextureLodOffset);
+ symbolTable.relateToOperator("sparseTextureGradARB", EOpSparseTextureGrad);
+ symbolTable.relateToOperator("sparseTextureGradOffsetARB", EOpSparseTextureGradOffset);
+ symbolTable.relateToOperator("sparseTextureGatherARB", EOpSparseTextureGather);
+ symbolTable.relateToOperator("sparseTextureGatherOffsetARB", EOpSparseTextureGatherOffset);
+ symbolTable.relateToOperator("sparseTextureGatherOffsetsARB", EOpSparseTextureGatherOffsets);
+ symbolTable.relateToOperator("sparseImageLoadARB", EOpSparseImageLoad);
+ symbolTable.relateToOperator("sparseTexelsResidentARB", EOpSparseTexelsResident);
+
+ symbolTable.relateToOperator("sparseTextureClampARB", EOpSparseTextureClamp);
+ symbolTable.relateToOperator("sparseTextureOffsetClampARB", EOpSparseTextureOffsetClamp);
+ symbolTable.relateToOperator("sparseTextureGradClampARB", EOpSparseTextureGradClamp);
+ symbolTable.relateToOperator("sparseTextureGradOffsetClampARB", EOpSparseTextureGradOffsetClamp);
+ symbolTable.relateToOperator("textureClampARB", EOpTextureClamp);
+ symbolTable.relateToOperator("textureOffsetClampARB", EOpTextureOffsetClamp);
+ symbolTable.relateToOperator("textureGradClampARB", EOpTextureGradClamp);
+ symbolTable.relateToOperator("textureGradOffsetClampARB", EOpTextureGradOffsetClamp);
+
+ symbolTable.relateToOperator("ballotARB", EOpBallot);
+ symbolTable.relateToOperator("readInvocationARB", EOpReadInvocation);
+ symbolTable.relateToOperator("readFirstInvocationARB", EOpReadFirstInvocation);
+
+ symbolTable.relateToOperator("anyInvocationARB", EOpAnyInvocation);
+ symbolTable.relateToOperator("allInvocationsARB", EOpAllInvocations);
+ symbolTable.relateToOperator("allInvocationsEqualARB", EOpAllInvocationsEqual);
+ }
+ }
+
+ switch(language) {
+ case EShLangVertex:
+ break;
+
+ case EShLangTessControl:
+ case EShLangTessEvaluation:
+ break;
+
+ case EShLangGeometry:
+ symbolTable.relateToOperator("EmitStreamVertex", EOpEmitStreamVertex);
+ symbolTable.relateToOperator("EndStreamPrimitive", EOpEndStreamPrimitive);
+ symbolTable.relateToOperator("EmitVertex", EOpEmitVertex);
+ symbolTable.relateToOperator("EndPrimitive", EOpEndPrimitive);
+ break;
+
+ case EShLangFragment:
+ symbolTable.relateToOperator("dFdx", EOpDPdx);
+ symbolTable.relateToOperator("dFdy", EOpDPdy);
+ symbolTable.relateToOperator("fwidth", EOpFwidth);
+ if (profile != EEsProfile && version >= 400) {
+ symbolTable.relateToOperator("dFdxFine", EOpDPdxFine);
+ symbolTable.relateToOperator("dFdyFine", EOpDPdyFine);
+ symbolTable.relateToOperator("fwidthFine", EOpFwidthFine);
+ symbolTable.relateToOperator("dFdxCoarse", EOpDPdxCoarse);
+ symbolTable.relateToOperator("dFdyCoarse", EOpDPdyCoarse);
+ symbolTable.relateToOperator("fwidthCoarse", EOpFwidthCoarse);
+ }
+ symbolTable.relateToOperator("interpolateAtCentroid", EOpInterpolateAtCentroid);
+ symbolTable.relateToOperator("interpolateAtSample", EOpInterpolateAtSample);
+ symbolTable.relateToOperator("interpolateAtOffset", EOpInterpolateAtOffset);
+ break;
+
+ case EShLangCompute:
+ symbolTable.relateToOperator("memoryBarrierShared", EOpMemoryBarrierShared);
+ symbolTable.relateToOperator("groupMemoryBarrier", EOpGroupMemoryBarrier);
+ break;
+
+ default:
+ assert(false && "Language not supported");
+ }
+}
+
+//
+// Add context-dependent (resource-specific) built-ins not handled by the above. These
+// would be ones that need to be programmatically added because they cannot
+// be added by simple text strings. For these, also
+// 1) Map built-in functions to operators, for those that will turn into an operation node
+// instead of remaining a function call.
+// 2) Tag extension-related symbols added to their base version with their extensions, so
+// that if an early version has the extension turned off, there is an error reported on use.
+//
+void TBuiltIns::identifyBuiltIns(int version, EProfile profile, int spv, int /*vulkan*/, EShLanguage language, TSymbolTable& symbolTable, const TBuiltInResource &resources)
+{
+ if (profile != EEsProfile && version >= 430 && version < 440) {
+ symbolTable.setVariableExtensions("gl_MaxTransformFeedbackBuffers", 1, &E_GL_ARB_enhanced_layouts);
+ symbolTable.setVariableExtensions("gl_MaxTransformFeedbackInterleavedComponents", 1, &E_GL_ARB_enhanced_layouts);
+ }
+ if (profile != EEsProfile && version >= 130 && version < 420) {
+ symbolTable.setVariableExtensions("gl_MinProgramTexelOffset", 1, &E_GL_ARB_shading_language_420pack);
+ symbolTable.setVariableExtensions("gl_MaxProgramTexelOffset", 1, &E_GL_ARB_shading_language_420pack);
+ }
+ if (profile != EEsProfile && version >= 150 && version < 410)
+ symbolTable.setVariableExtensions("gl_MaxViewports", 1, &E_GL_ARB_viewport_array);
+
+ switch(language) {
+ case EShLangFragment:
+ // Set up gl_FragData based on current array size.
+ if (version == 100 || IncludeLegacy(version, profile, spv) || (! ForwardCompatibility && profile != EEsProfile && version < 420)) {
+ TPrecisionQualifier pq = profile == EEsProfile ? EpqMedium : EpqNone;
+ TType fragData(EbtFloat, EvqFragColor, pq, 4);
+ TArraySizes& arraySizes = *new TArraySizes;
+ arraySizes.addInnerSize(resources.maxDrawBuffers);
+ fragData.newArraySizes(arraySizes);
+ symbolTable.insert(*new TVariable(NewPoolTString("gl_FragData"), fragData));
+ SpecialQualifier("gl_FragData", EvqFragColor, EbvFragData, symbolTable);
+ }
+ break;
+
+ case EShLangTessControl:
+ case EShLangTessEvaluation:
+ // Because of the context-dependent array size (gl_MaxPatchVertices),
+ // these variables were added later than the others and need to be mapped now.
+
+ // standard members
+ BuiltInVariable("gl_in", "gl_Position", EbvPosition, symbolTable);
+ BuiltInVariable("gl_in", "gl_PointSize", EbvPointSize, symbolTable);
+ BuiltInVariable("gl_in", "gl_ClipDistance", EbvClipDistance, symbolTable);
+ BuiltInVariable("gl_in", "gl_CullDistance", EbvCullDistance, symbolTable);
+
+ // compatibility members
+ BuiltInVariable("gl_in", "gl_ClipVertex", EbvClipVertex, symbolTable);
+ BuiltInVariable("gl_in", "gl_FrontColor", EbvFrontColor, symbolTable);
+ BuiltInVariable("gl_in", "gl_BackColor", EbvBackColor, symbolTable);
+ BuiltInVariable("gl_in", "gl_FrontSecondaryColor", EbvFrontSecondaryColor, symbolTable);
+ BuiltInVariable("gl_in", "gl_BackSecondaryColor", EbvBackSecondaryColor, symbolTable);
+ BuiltInVariable("gl_in", "gl_TexCoord", EbvTexCoord, symbolTable);
+ BuiltInVariable("gl_in", "gl_FogFragCoord", EbvFogFragCoord, symbolTable);
+ break;
+
+ default:
+ break;
+ }
+}
+
+} // end namespace glslang
diff --git a/chromium/third_party/glslang/src/glslang/MachineIndependent/Initialize.h b/chromium/third_party/glslang/src/glslang/MachineIndependent/Initialize.h
new file mode 100644
index 00000000000..40551cddcb9
--- /dev/null
+++ b/chromium/third_party/glslang/src/glslang/MachineIndependent/Initialize.h
@@ -0,0 +1,113 @@
+//
+//Copyright (C) 2002-2005 3Dlabs Inc. Ltd.
+//Copyright (C) 2013-2016 LunarG, 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:
+//
+// Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 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.
+//
+// Neither the name of 3Dlabs Inc. Ltd. nor the names of its
+// contributors may be used to endorse or promote products derived
+// from this software without specific prior written permission.
+//
+//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+//"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 THE
+//COPYRIGHT HOLDERS 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.
+//
+
+#ifndef _INITIALIZE_INCLUDED_
+#define _INITIALIZE_INCLUDED_
+
+#include "../Include/ResourceLimits.h"
+#include "../Include/Common.h"
+#include "../Include/ShHandle.h"
+#include "SymbolTable.h"
+#include "Versions.h"
+
+namespace glslang {
+
+//
+// This is made to hold parseable strings for almost all the built-in
+// functions and variables for one specific combination of version
+// and profile. (Some still need to be added programmatically.)
+// This is a base class for language-specific derivations, which
+// can be used for language independent builtins.
+//
+// The strings are organized by
+// commonBuiltins: intersection of all stages' built-ins, processed just once
+// stageBuiltins[]: anything a stage needs that's not in commonBuiltins
+//
+class TBuiltInParseables {
+public:
+ POOL_ALLOCATOR_NEW_DELETE(GetThreadPoolAllocator())
+ TBuiltInParseables();
+ virtual ~TBuiltInParseables();
+ virtual void initialize(int version, EProfile, int spv, int vulkan) = 0;
+ virtual void initialize(const TBuiltInResource& resources, int version, EProfile, int spv, int vulkan, EShLanguage) = 0;
+ virtual const TString& getCommonString() const { return commonBuiltins; }
+ virtual const TString& getStageString(EShLanguage language) const { return stageBuiltins[language]; }
+
+ virtual void identifyBuiltIns(int version, EProfile profile, int spv, int vulkan, EShLanguage language, TSymbolTable& symbolTable) = 0;
+
+ virtual void identifyBuiltIns(int version, EProfile profile, int spv, int /*vulkan*/, EShLanguage language, TSymbolTable& symbolTable, const TBuiltInResource &resources) = 0;
+
+protected:
+ TString commonBuiltins;
+ TString stageBuiltins[EShLangCount];
+};
+
+//
+// This is a GLSL specific derivation of TBuiltInParseables. To present a stable
+// interface and match other similar code, it is called TBuiltIns, rather
+// than TBuiltInParseablesGlsl.
+//
+class TBuiltIns : public TBuiltInParseables {
+public:
+ POOL_ALLOCATOR_NEW_DELETE(GetThreadPoolAllocator())
+ TBuiltIns();
+ virtual ~TBuiltIns();
+ void initialize(int version, EProfile, int spv, int vulkan);
+ void initialize(const TBuiltInResource& resources, int version, EProfile, int spv, int vulkan, EShLanguage);
+
+ void identifyBuiltIns(int version, EProfile profile, int spv, int vulkan, EShLanguage language, TSymbolTable& symbolTable);
+
+ void identifyBuiltIns(int version, EProfile profile, int spv, int /*vulkan*/, EShLanguage language, TSymbolTable& symbolTable, const TBuiltInResource &resources);
+
+protected:
+ void add2ndGenerationSamplingImaging(int version, EProfile profile, int spv, int vulkan);
+ void addSubpassSampling(TSampler, TString& typeName, int version, EProfile profile);
+ void addQueryFunctions(TSampler, TString& typeName, int version, EProfile profile);
+ void addImageFunctions(TSampler, TString& typeName, int version, EProfile profile);
+ void addSamplingFunctions(TSampler, TString& typeName, int version, EProfile profile);
+ void addGatherFunctions(TSampler, TString& typeName, int version, EProfile profile);
+
+ // Helpers for making textual representations of the permutations
+ // of texturing/imaging functions.
+ const char* postfixes[5];
+ const char* prefixes[EbtNumTypes];
+ int dimMap[EsdNumDims];
+};
+
+
+} // end namespace glslang
+
+#endif // _INITIALIZE_INCLUDED_
diff --git a/chromium/third_party/glslang/src/glslang/MachineIndependent/IntermTraverse.cpp b/chromium/third_party/glslang/src/glslang/MachineIndependent/IntermTraverse.cpp
new file mode 100644
index 00000000000..b910f473883
--- /dev/null
+++ b/chromium/third_party/glslang/src/glslang/MachineIndependent/IntermTraverse.cpp
@@ -0,0 +1,302 @@
+//
+//Copyright (C) 2002-2005 3Dlabs Inc. Ltd.
+//Copyright (C) 2013 LunarG, Inc.
+//Copyright (c) 2002-2010 The ANGLE Project Authors.
+//
+//All rights reserved.
+//
+//Redistribution and use in source and binary forms, with or without
+//modification, are permitted provided that the following conditions
+//are met:
+//
+// Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 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.
+//
+// Neither the name of 3Dlabs Inc. Ltd. nor the names of its
+// contributors may be used to endorse or promote products derived
+// from this software without specific prior written permission.
+//
+//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+//"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 THE
+//COPYRIGHT HOLDERS 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.
+//
+
+#include "../Include/intermediate.h"
+
+namespace glslang {
+
+//
+// Traverse the intermediate representation tree, and
+// call a node type specific function for each node.
+// Done recursively through the member function Traverse().
+// Node types can be skipped if their function to call is 0,
+// but their subtree will still be traversed.
+// Nodes with children can have their whole subtree skipped
+// if preVisit is turned on and the type specific function
+// returns false.
+//
+// preVisit, postVisit, and rightToLeft control what order
+// nodes are visited in.
+//
+
+//
+// Traversal functions for terminals are straightforward....
+//
+void TIntermMethod::traverse(TIntermTraverser*)
+{
+ // Tree should always resolve all methods as a non-method.
+}
+
+void TIntermSymbol::traverse(TIntermTraverser *it)
+{
+ it->visitSymbol(this);
+}
+
+void TIntermConstantUnion::traverse(TIntermTraverser *it)
+{
+ it->visitConstantUnion(this);
+}
+
+//
+// Traverse a binary node.
+//
+void TIntermBinary::traverse(TIntermTraverser *it)
+{
+ bool visit = true;
+
+ //
+ // visit the node before children if pre-visiting.
+ //
+ if (it->preVisit)
+ visit = it->visitBinary(EvPreVisit, this);
+
+ //
+ // Visit the children, in the right order.
+ //
+ if (visit) {
+ it->incrementDepth(this);
+
+ if (it->rightToLeft) {
+ if (right)
+ right->traverse(it);
+
+ if (it->inVisit)
+ visit = it->visitBinary(EvInVisit, this);
+
+ if (visit && left)
+ left->traverse(it);
+ } else {
+ if (left)
+ left->traverse(it);
+
+ if (it->inVisit)
+ visit = it->visitBinary(EvInVisit, this);
+
+ if (visit && right)
+ right->traverse(it);
+ }
+
+ it->decrementDepth();
+ }
+
+ //
+ // Visit the node after the children, if requested and the traversal
+ // hasn't been canceled yet.
+ //
+ if (visit && it->postVisit)
+ it->visitBinary(EvPostVisit, this);
+}
+
+//
+// Traverse a unary node. Same comments in binary node apply here.
+//
+void TIntermUnary::traverse(TIntermTraverser *it)
+{
+ bool visit = true;
+
+ if (it->preVisit)
+ visit = it->visitUnary(EvPreVisit, this);
+
+ if (visit) {
+ it->incrementDepth(this);
+ operand->traverse(it);
+ it->decrementDepth();
+ }
+
+ if (visit && it->postVisit)
+ it->visitUnary(EvPostVisit, this);
+}
+
+//
+// Traverse an aggregate node. Same comments in binary node apply here.
+//
+void TIntermAggregate::traverse(TIntermTraverser *it)
+{
+ bool visit = true;
+
+ if (it->preVisit)
+ visit = it->visitAggregate(EvPreVisit, this);
+
+ if (visit) {
+ it->incrementDepth(this);
+
+ if (it->rightToLeft) {
+ for (TIntermSequence::reverse_iterator sit = sequence.rbegin(); sit != sequence.rend(); sit++) {
+ (*sit)->traverse(it);
+
+ if (visit && it->inVisit) {
+ if (*sit != sequence.front())
+ visit = it->visitAggregate(EvInVisit, this);
+ }
+ }
+ } else {
+ for (TIntermSequence::iterator sit = sequence.begin(); sit != sequence.end(); sit++) {
+ (*sit)->traverse(it);
+
+ if (visit && it->inVisit) {
+ if (*sit != sequence.back())
+ visit = it->visitAggregate(EvInVisit, this);
+ }
+ }
+ }
+
+ it->decrementDepth();
+ }
+
+ if (visit && it->postVisit)
+ it->visitAggregate(EvPostVisit, this);
+}
+
+//
+// Traverse a selection node. Same comments in binary node apply here.
+//
+void TIntermSelection::traverse(TIntermTraverser *it)
+{
+ bool visit = true;
+
+ if (it->preVisit)
+ visit = it->visitSelection(EvPreVisit, this);
+
+ if (visit) {
+ it->incrementDepth(this);
+ if (it->rightToLeft) {
+ if (falseBlock)
+ falseBlock->traverse(it);
+ if (trueBlock)
+ trueBlock->traverse(it);
+ condition->traverse(it);
+ } else {
+ condition->traverse(it);
+ if (trueBlock)
+ trueBlock->traverse(it);
+ if (falseBlock)
+ falseBlock->traverse(it);
+ }
+ it->decrementDepth();
+ }
+
+ if (visit && it->postVisit)
+ it->visitSelection(EvPostVisit, this);
+}
+
+//
+// Traverse a loop node. Same comments in binary node apply here.
+//
+void TIntermLoop::traverse(TIntermTraverser *it)
+{
+ bool visit = true;
+
+ if (it->preVisit)
+ visit = it->visitLoop(EvPreVisit, this);
+
+ if (visit) {
+ it->incrementDepth(this);
+
+ if (it->rightToLeft) {
+ if (terminal)
+ terminal->traverse(it);
+
+ if (body)
+ body->traverse(it);
+
+ if (test)
+ test->traverse(it);
+ } else {
+ if (test)
+ test->traverse(it);
+
+ if (body)
+ body->traverse(it);
+
+ if (terminal)
+ terminal->traverse(it);
+ }
+
+ it->decrementDepth();
+ }
+
+ if (visit && it->postVisit)
+ it->visitLoop(EvPostVisit, this);
+}
+
+//
+// Traverse a branch node. Same comments in binary node apply here.
+//
+void TIntermBranch::traverse(TIntermTraverser *it)
+{
+ bool visit = true;
+
+ if (it->preVisit)
+ visit = it->visitBranch(EvPreVisit, this);
+
+ if (visit && expression) {
+ it->incrementDepth(this);
+ expression->traverse(it);
+ it->decrementDepth();
+ }
+
+ if (visit && it->postVisit)
+ it->visitBranch(EvPostVisit, this);
+}
+
+//
+// Traverse a switch node.
+//
+void TIntermSwitch::traverse(TIntermTraverser* it)
+{
+ bool visit = true;
+
+ if (it->preVisit)
+ visit = it->visitSwitch(EvPreVisit, this);
+
+ if (visit) {
+ it->incrementDepth(this);
+ if (it->rightToLeft) {
+ body->traverse(it);
+ condition->traverse(it);
+ } else {
+ condition->traverse(it);
+ body->traverse(it);
+ }
+ it->decrementDepth();
+ }
+
+ if (visit && it->postVisit)
+ it->visitSwitch(EvPostVisit, this);
+}
+
+} // end namespace glslang
diff --git a/chromium/third_party/glslang/src/glslang/MachineIndependent/Intermediate.cpp b/chromium/third_party/glslang/src/glslang/MachineIndependent/Intermediate.cpp
new file mode 100644
index 00000000000..02681ac556b
--- /dev/null
+++ b/chromium/third_party/glslang/src/glslang/MachineIndependent/Intermediate.cpp
@@ -0,0 +1,1980 @@
+//
+//Copyright (C) 2002-2005 3Dlabs Inc. Ltd.
+//Copyright (C) 2012-2015 LunarG, Inc.
+//Copyright (C) 2015-2016 Google, 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:
+//
+// Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 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.
+//
+// Neither the name of 3Dlabs Inc. Ltd. nor the names of its
+// contributors may be used to endorse or promote products derived
+// from this software without specific prior written permission.
+//
+//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+//"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 THE
+//COPYRIGHT HOLDERS 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.
+//
+
+//
+// Build the intermediate representation.
+//
+
+#include "localintermediate.h"
+#include "RemoveTree.h"
+#include "SymbolTable.h"
+#include "propagateNoContraction.h"
+
+#include <float.h>
+
+namespace glslang {
+
+////////////////////////////////////////////////////////////////////////////
+//
+// First set of functions are to help build the intermediate representation.
+// These functions are not member functions of the nodes.
+// They are called from parser productions.
+//
+/////////////////////////////////////////////////////////////////////////////
+
+//
+// Add a terminal node for an identifier in an expression.
+//
+// Returns the added node.
+//
+
+TIntermSymbol* TIntermediate::addSymbol(int id, const TString& name, const TType& type, const TConstUnionArray& constArray,
+ TIntermTyped* constSubtree, const TSourceLoc& loc)
+{
+ TIntermSymbol* node = new TIntermSymbol(id, name, type);
+ node->setLoc(loc);
+ node->setConstArray(constArray);
+ node->setConstSubtree(constSubtree);
+
+ return node;
+}
+
+TIntermSymbol* TIntermediate::addSymbol(const TVariable& variable)
+{
+ glslang::TSourceLoc loc; // just a null location
+ loc.init();
+
+ return addSymbol(variable, loc);
+}
+
+TIntermSymbol* TIntermediate::addSymbol(const TVariable& variable, const TSourceLoc& loc)
+{
+ return addSymbol(variable.getUniqueId(), variable.getName(), variable.getType(), variable.getConstArray(), variable.getConstSubtree(), loc);
+}
+
+TIntermSymbol* TIntermediate::addSymbol(const TType& type, const TSourceLoc& loc)
+{
+ TConstUnionArray unionArray; // just a null constant
+
+ return addSymbol(0, "", type, unionArray, nullptr, loc);
+}
+
+//
+// Connect two nodes with a new parent that does a binary operation on the nodes.
+//
+// Returns the added node.
+//
+TIntermTyped* TIntermediate::addBinaryMath(TOperator op, TIntermTyped* left, TIntermTyped* right, TSourceLoc loc)
+{
+ // No operations work on blocks
+ if (left->getType().getBasicType() == EbtBlock || right->getType().getBasicType() == EbtBlock)
+ return 0;
+
+ // Try converting the children's base types to compatible types.
+ TIntermTyped* child = addConversion(op, left->getType(), right);
+ if (child)
+ right = child;
+ else {
+ child = addConversion(op, right->getType(), left);
+ if (child)
+ left = child;
+ else
+ return 0;
+ }
+
+ //
+ // Need a new node holding things together. Make
+ // one and promote it to the right type.
+ //
+ TIntermBinary* node = new TIntermBinary(op);
+ if (loc.line == 0)
+ loc = right->getLoc();
+ node->setLoc(loc);
+
+ node->setLeft(left);
+ node->setRight(right);
+ if (! node->promote())
+ return 0;
+
+ node->updatePrecision();
+
+ //
+ // If they are both (non-specialization) constants, they must be folded.
+ // (Unless it's the sequence (comma) operator, but that's handled in addComma().)
+ //
+ TIntermConstantUnion *leftTempConstant = left->getAsConstantUnion();
+ TIntermConstantUnion *rightTempConstant = right->getAsConstantUnion();
+ if (leftTempConstant && rightTempConstant) {
+ TIntermTyped* folded = leftTempConstant->fold(node->getOp(), rightTempConstant);
+ if (folded)
+ return folded;
+ }
+
+ // If either is a specialization constant, while the other is
+ // a constant (or specialization constant), the result is still
+ // a specialization constant, if the operation is an allowed
+ // specialization-constant operation.
+ if (( left->getType().getQualifier().isSpecConstant() && right->getType().getQualifier().isConstant()) ||
+ (right->getType().getQualifier().isSpecConstant() && left->getType().getQualifier().isConstant()))
+ if (isSpecializationOperation(*node))
+ node->getWritableType().getQualifier().makeSpecConstant();
+
+ return node;
+}
+
+//
+// Connect two nodes through an assignment.
+//
+// Returns the added node.
+//
+TIntermTyped* TIntermediate::addAssign(TOperator op, TIntermTyped* left, TIntermTyped* right, TSourceLoc loc)
+{
+ // No block assignment
+ if (left->getType().getBasicType() == EbtBlock || right->getType().getBasicType() == EbtBlock)
+ return 0;
+
+ //
+ // Like adding binary math, except the conversion can only go
+ // from right to left.
+ //
+ TIntermBinary* node = new TIntermBinary(op);
+ if (loc.line == 0)
+ loc = left->getLoc();
+ node->setLoc(loc);
+
+ TIntermTyped* child = addConversion(op, left->getType(), right);
+ if (child == 0)
+ return 0;
+
+ node->setLeft(left);
+ node->setRight(child);
+ if (! node->promote())
+ return 0;
+
+ node->updatePrecision();
+
+ return node;
+}
+
+//
+// Connect two nodes through an index operator, where the left node is the base
+// of an array or struct, and the right node is a direct or indirect offset.
+//
+// Returns the added node.
+// The caller should set the type of the returned node.
+//
+TIntermTyped* TIntermediate::addIndex(TOperator op, TIntermTyped* base, TIntermTyped* index, TSourceLoc loc)
+{
+ TIntermBinary* node = new TIntermBinary(op);
+ if (loc.line == 0)
+ loc = index->getLoc();
+ node->setLoc(loc);
+ node->setLeft(base);
+ node->setRight(index);
+
+ // caller should set the type
+
+ return node;
+}
+
+//
+// Add one node as the parent of another that it operates on.
+//
+// Returns the added node.
+//
+TIntermTyped* TIntermediate::addUnaryMath(TOperator op, TIntermTyped* child, TSourceLoc loc)
+{
+ if (child == 0)
+ return 0;
+
+ if (child->getType().getBasicType() == EbtBlock)
+ return 0;
+
+ switch (op) {
+ case EOpLogicalNot:
+ if (child->getType().getBasicType() != EbtBool || child->getType().isMatrix() || child->getType().isArray() || child->getType().isVector()) {
+ return 0;
+ }
+ break;
+
+ case EOpPostIncrement:
+ case EOpPreIncrement:
+ case EOpPostDecrement:
+ case EOpPreDecrement:
+ case EOpNegative:
+ if (child->getType().getBasicType() == EbtStruct || child->getType().isArray())
+ return 0;
+ default: break; // some compilers want this
+ }
+
+ //
+ // Do we need to promote the operand?
+ //
+ TBasicType newType = EbtVoid;
+ switch (op) {
+ case EOpConstructInt: newType = EbtInt; break;
+ case EOpConstructUint: newType = EbtUint; break;
+ case EOpConstructInt64: newType = EbtInt64; break;
+ case EOpConstructUint64: newType = EbtUint64; break;
+ case EOpConstructBool: newType = EbtBool; break;
+ case EOpConstructFloat: newType = EbtFloat; break;
+ case EOpConstructDouble: newType = EbtDouble; break;
+ default: break; // some compilers want this
+ }
+
+ if (newType != EbtVoid) {
+ child = addConversion(op, TType(newType, EvqTemporary, child->getVectorSize(),
+ child->getMatrixCols(),
+ child->getMatrixRows()),
+ child);
+ if (child == 0)
+ return 0;
+ }
+
+ //
+ // For constructors, we are now done, it was all in the conversion.
+ // TODO: but, did this bypass constant folding?
+ //
+ switch (op) {
+ case EOpConstructInt:
+ case EOpConstructUint:
+ case EOpConstructInt64:
+ case EOpConstructUint64:
+ case EOpConstructBool:
+ case EOpConstructFloat:
+ case EOpConstructDouble:
+ return child;
+ default: break; // some compilers want this
+ }
+
+ //
+ // Make a new node for the operator.
+ //
+ TIntermUnary* node = new TIntermUnary(op);
+ if (loc.line == 0)
+ loc = child->getLoc();
+ node->setLoc(loc);
+ node->setOperand(child);
+
+ if (! node->promote())
+ return 0;
+
+ node->updatePrecision();
+
+ // If it's a (non-specialization) constant, it must be folded.
+ if (child->getAsConstantUnion())
+ return child->getAsConstantUnion()->fold(op, node->getType());
+
+ // If it's a specialization constant, the result is too,
+ // if the operation is allowed for specialization constants.
+ if (child->getType().getQualifier().isSpecConstant() && isSpecializationOperation(*node))
+ node->getWritableType().getQualifier().makeSpecConstant();
+
+ return node;
+}
+
+TIntermTyped* TIntermediate::addBuiltInFunctionCall(const TSourceLoc& loc, TOperator op, bool unary, TIntermNode* childNode, const TType& returnType)
+{
+ if (unary) {
+ //
+ // Treat it like a unary operator.
+ // addUnaryMath() should get the type correct on its own;
+ // including constness (which would differ from the prototype).
+ //
+ TIntermTyped* child = childNode->getAsTyped();
+ if (child == 0)
+ return 0;
+
+ if (child->getAsConstantUnion()) {
+ TIntermTyped* folded = child->getAsConstantUnion()->fold(op, returnType);
+ if (folded)
+ return folded;
+ }
+
+ TIntermUnary* node = new TIntermUnary(op);
+ node->setLoc(child->getLoc());
+ node->setOperand(child);
+ node->setType(returnType);
+
+ // propagate precision up from child
+ if (profile == EEsProfile && returnType.getQualifier().precision == EpqNone && returnType.getBasicType() != EbtBool)
+ node->getQualifier().precision = child->getQualifier().precision;
+
+ // propagate precision down to child
+ if (node->getQualifier().precision != EpqNone)
+ child->propagatePrecision(node->getQualifier().precision);
+
+ return node;
+ } else {
+ // setAggregateOperater() calls fold() for constant folding
+ TIntermTyped* node = setAggregateOperator(childNode, op, returnType, loc);
+
+ // if not folded, we'll still have an aggregate node to propagate precision with
+ if (node->getAsAggregate()) {
+ TPrecisionQualifier correctPrecision = returnType.getQualifier().precision;
+ if (correctPrecision == EpqNone && profile == EEsProfile) {
+ // find the maximum precision from the arguments, for the built-in's return precision
+ TIntermSequence& sequence = node->getAsAggregate()->getSequence();
+ for (unsigned int arg = 0; arg < sequence.size(); ++arg)
+ correctPrecision = std::max(correctPrecision, sequence[arg]->getAsTyped()->getQualifier().precision);
+ }
+
+ // Propagate precision through this node and its children. That algorithm stops
+ // when a precision is found, so start by clearing this subroot precision
+ node->getQualifier().precision = EpqNone;
+ node->propagatePrecision(correctPrecision);
+ }
+
+ return node;
+ }
+}
+
+//
+// This is the safe way to change the operator on an aggregate, as it
+// does lots of error checking and fixing. Especially for establishing
+// a function call's operation on it's set of parameters. Sequences
+// of instructions are also aggregates, but they just directly set
+// their operator to EOpSequence.
+//
+// Returns an aggregate node, which could be the one passed in if
+// it was already an aggregate.
+//
+TIntermTyped* TIntermediate::setAggregateOperator(TIntermNode* node, TOperator op, const TType& type, TSourceLoc loc)
+{
+ TIntermAggregate* aggNode;
+
+ //
+ // Make sure we have an aggregate. If not turn it into one.
+ //
+ if (node) {
+ aggNode = node->getAsAggregate();
+ if (aggNode == 0 || aggNode->getOp() != EOpNull) {
+ //
+ // Make an aggregate containing this node.
+ //
+ aggNode = new TIntermAggregate();
+ aggNode->getSequence().push_back(node);
+ if (loc.line == 0)
+ loc = node->getLoc();
+ }
+ } else
+ aggNode = new TIntermAggregate();
+
+ //
+ // Set the operator.
+ //
+ aggNode->setOperator(op);
+ if (loc.line != 0)
+ aggNode->setLoc(loc);
+
+ aggNode->setType(type);
+
+ return fold(aggNode);
+}
+
+//
+// Convert the node's type to the given type, as allowed by the operation involved: 'op'.
+// For implicit conversions, 'op' is not the requested conversion, it is the explicit
+// operation requiring the implicit conversion.
+//
+// Returns a node representing the conversion, which could be the same
+// node passed in if no conversion was needed.
+//
+// Return 0 if a conversion can't be done.
+//
+TIntermTyped* TIntermediate::addConversion(TOperator op, const TType& type, TIntermTyped* node) const
+{
+ //
+ // Does the base type even allow the operation?
+ //
+ switch (node->getBasicType()) {
+ case EbtVoid:
+ return 0;
+ case EbtAtomicUint:
+ case EbtSampler:
+ // opaque types can be passed to functions
+ if (op == EOpFunction)
+ break;
+ // samplers can get assigned via a sampler constructor
+ // (well, not yet, but code in the rest of this function is ready for it)
+ if (node->getBasicType() == EbtSampler && op == EOpAssign &&
+ node->getAsOperator() != nullptr && node->getAsOperator()->getOp() == EOpConstructTextureSampler)
+ break;
+
+ // otherwise, opaque types can't even be operated on, let alone converted
+ return 0;
+ default:
+ break;
+ }
+
+ // Otherwise, if types are identical, no problem
+ if (type == node->getType())
+ return node;
+
+ // If one's a structure, then no conversions.
+ if (type.isStruct() || node->isStruct())
+ return 0;
+
+ // If one's an array, then no conversions.
+ if (type.isArray() || node->getType().isArray())
+ return 0;
+
+ // Note: callers are responsible for other aspects of shape,
+ // like vector and matrix sizes.
+
+ TBasicType promoteTo;
+
+ switch (op) {
+ //
+ // Explicit conversions (unary operations)
+ //
+ case EOpConstructBool:
+ promoteTo = EbtBool;
+ break;
+ case EOpConstructFloat:
+ promoteTo = EbtFloat;
+ break;
+ case EOpConstructDouble:
+ promoteTo = EbtDouble;
+ break;
+ case EOpConstructInt:
+ promoteTo = EbtInt;
+ break;
+ case EOpConstructUint:
+ promoteTo = EbtUint;
+ break;
+ case EOpConstructInt64:
+ promoteTo = EbtInt64;
+ break;
+ case EOpConstructUint64:
+ promoteTo = EbtUint64;
+ break;
+
+ //
+ // List all the binary ops that can implicitly convert one operand to the other's type;
+ // This implements the 'policy' for implicit type conversion.
+ //
+ case EOpLessThan:
+ case EOpGreaterThan:
+ case EOpLessThanEqual:
+ case EOpGreaterThanEqual:
+ case EOpEqual:
+ case EOpNotEqual:
+
+ case EOpAdd:
+ case EOpSub:
+ case EOpMul:
+ case EOpDiv:
+ case EOpMod:
+
+ case EOpVectorTimesScalar:
+ case EOpVectorTimesMatrix:
+ case EOpMatrixTimesVector:
+ case EOpMatrixTimesScalar:
+
+ case EOpAnd:
+ case EOpInclusiveOr:
+ case EOpExclusiveOr:
+ case EOpAndAssign:
+ case EOpInclusiveOrAssign:
+ case EOpExclusiveOrAssign:
+
+ case EOpFunctionCall:
+ case EOpReturn:
+ case EOpAssign:
+ case EOpAddAssign:
+ case EOpSubAssign:
+ case EOpMulAssign:
+ case EOpVectorTimesScalarAssign:
+ case EOpMatrixTimesScalarAssign:
+ case EOpDivAssign:
+ case EOpModAssign:
+
+ case EOpSequence:
+ case EOpConstructStruct:
+
+ if (type.getBasicType() == node->getType().getBasicType())
+ return node;
+
+ if (canImplicitlyPromote(node->getType().getBasicType(), type.getBasicType()))
+ promoteTo = type.getBasicType();
+ else
+ return 0;
+
+ break;
+
+ // Shifts can have mixed types as long as they are integer, without converting.
+ // It's the left operand's type that determines the resulting type, so no issue
+ // with assign shift ops either.
+ case EOpLeftShift:
+ case EOpRightShift:
+ case EOpLeftShiftAssign:
+ case EOpRightShiftAssign:
+ if ((type.getBasicType() == EbtInt ||
+ type.getBasicType() == EbtUint ||
+ type.getBasicType() == EbtInt64 ||
+ type.getBasicType() == EbtUint64) &&
+ (node->getType().getBasicType() == EbtInt ||
+ node->getType().getBasicType() == EbtUint ||
+ node->getType().getBasicType() == EbtInt64 ||
+ node->getType().getBasicType() == EbtUint64))
+
+ return node;
+ else
+ return 0;
+
+ default:
+ // default is to require a match; all exceptions should have case statements above
+
+ if (type.getBasicType() == node->getType().getBasicType())
+ return node;
+ else
+ return 0;
+ }
+
+ if (node->getAsConstantUnion())
+ return promoteConstantUnion(promoteTo, node->getAsConstantUnion());
+
+ //
+ // Add a new newNode for the conversion.
+ //
+ TIntermUnary* newNode = 0;
+
+ TOperator newOp = EOpNull;
+
+ // This is 'mechanism' here, it does any conversion told. The policy comes
+ // from the shader or the above code.
+ switch (promoteTo) {
+ case EbtDouble:
+ switch (node->getBasicType()) {
+ case EbtInt: newOp = EOpConvIntToDouble; break;
+ case EbtUint: newOp = EOpConvUintToDouble; break;
+ case EbtBool: newOp = EOpConvBoolToDouble; break;
+ case EbtFloat: newOp = EOpConvFloatToDouble; break;
+ case EbtInt64: newOp = EOpConvInt64ToDouble; break;
+ case EbtUint64: newOp = EOpConvUint64ToDouble; break;
+ default:
+ return 0;
+ }
+ break;
+ case EbtFloat:
+ switch (node->getBasicType()) {
+ case EbtInt: newOp = EOpConvIntToFloat; break;
+ case EbtUint: newOp = EOpConvUintToFloat; break;
+ case EbtBool: newOp = EOpConvBoolToFloat; break;
+ case EbtDouble: newOp = EOpConvDoubleToFloat; break;
+ case EbtInt64: newOp = EOpConvInt64ToFloat; break;
+ case EbtUint64: newOp = EOpConvUint64ToFloat; break;
+ default:
+ return 0;
+ }
+ break;
+ case EbtBool:
+ switch (node->getBasicType()) {
+ case EbtInt: newOp = EOpConvIntToBool; break;
+ case EbtUint: newOp = EOpConvUintToBool; break;
+ case EbtFloat: newOp = EOpConvFloatToBool; break;
+ case EbtDouble: newOp = EOpConvDoubleToBool; break;
+ case EbtInt64: newOp = EOpConvInt64ToBool; break;
+ case EbtUint64: newOp = EOpConvUint64ToBool; break;
+ default:
+ return 0;
+ }
+ break;
+ case EbtInt:
+ switch (node->getBasicType()) {
+ case EbtUint: newOp = EOpConvUintToInt; break;
+ case EbtBool: newOp = EOpConvBoolToInt; break;
+ case EbtFloat: newOp = EOpConvFloatToInt; break;
+ case EbtDouble: newOp = EOpConvDoubleToInt; break;
+ case EbtInt64: newOp = EOpConvInt64ToInt; break;
+ case EbtUint64: newOp = EOpConvUint64ToInt; break;
+ default:
+ return 0;
+ }
+ break;
+ case EbtUint:
+ switch (node->getBasicType()) {
+ case EbtInt: newOp = EOpConvIntToUint; break;
+ case EbtBool: newOp = EOpConvBoolToUint; break;
+ case EbtFloat: newOp = EOpConvFloatToUint; break;
+ case EbtDouble: newOp = EOpConvDoubleToUint; break;
+ case EbtInt64: newOp = EOpConvInt64ToUint; break;
+ case EbtUint64: newOp = EOpConvUint64ToUint; break;
+ default:
+ return 0;
+ }
+ break;
+ case EbtInt64:
+ switch (node->getBasicType()) {
+ case EbtInt: newOp = EOpConvIntToInt64; break;
+ case EbtUint: newOp = EOpConvUintToInt64; break;
+ case EbtBool: newOp = EOpConvBoolToInt64; break;
+ case EbtFloat: newOp = EOpConvFloatToInt64; break;
+ case EbtDouble: newOp = EOpConvDoubleToInt64; break;
+ case EbtUint64: newOp = EOpConvUint64ToInt64; break;
+ default:
+ return 0;
+ }
+ break;
+ case EbtUint64:
+ switch (node->getBasicType()) {
+ case EbtInt: newOp = EOpConvIntToUint64; break;
+ case EbtUint: newOp = EOpConvUintToUint64; break;
+ case EbtBool: newOp = EOpConvBoolToUint64; break;
+ case EbtFloat: newOp = EOpConvFloatToUint64; break;
+ case EbtDouble: newOp = EOpConvDoubleToUint64; break;
+ case EbtInt64: newOp = EOpConvInt64ToUint64; break;
+ default:
+ return 0;
+ }
+ break;
+ default:
+ return 0;
+ }
+
+ TType newType(promoteTo, EvqTemporary, node->getVectorSize(), node->getMatrixCols(), node->getMatrixRows());
+ newNode = new TIntermUnary(newOp, newType);
+ newNode->setLoc(node->getLoc());
+ newNode->setOperand(node);
+
+ // TODO: it seems that some unary folding operations should occur here, but are not
+
+ // Propagate specialization-constant-ness, if allowed
+ if (node->getType().getQualifier().isSpecConstant() && isSpecializationOperation(*newNode))
+ newNode->getWritableType().getQualifier().makeSpecConstant();
+
+ return newNode;
+}
+
+//
+// See if the 'from' type is allowed to be implicitly converted to the
+// 'to' type. This is not about vector/array/struct, only about basic type.
+//
+bool TIntermediate::canImplicitlyPromote(TBasicType from, TBasicType to) const
+{
+ if (profile == EEsProfile || version == 110)
+ return false;
+
+ switch (to) {
+ case EbtDouble:
+ switch (from) {
+ case EbtInt:
+ case EbtUint:
+ case EbtInt64:
+ case EbtUint64:
+ case EbtFloat:
+ case EbtDouble:
+ return true;
+ default:
+ return false;
+ }
+ case EbtFloat:
+ switch (from) {
+ case EbtInt:
+ case EbtUint:
+ case EbtFloat:
+ return true;
+ default:
+ return false;
+ }
+ case EbtUint:
+ switch (from) {
+ case EbtInt:
+ return version >= 400;
+ case EbtUint:
+ return true;
+ default:
+ return false;
+ }
+ case EbtInt:
+ switch (from) {
+ case EbtInt:
+ return true;
+ default:
+ return false;
+ }
+ case EbtUint64:
+ switch (from) {
+ case EbtInt:
+ case EbtUint:
+ case EbtInt64:
+ case EbtUint64:
+ return true;
+ default:
+ return false;
+ }
+ case EbtInt64:
+ switch (from) {
+ case EbtInt:
+ case EbtInt64:
+ return true;
+ default:
+ return false;
+ }
+ default:
+ return false;
+ }
+}
+
+//
+// Safe way to combine two nodes into an aggregate. Works with null pointers,
+// a node that's not a aggregate yet, etc.
+//
+// Returns the resulting aggregate, unless 0 was passed in for
+// both existing nodes.
+//
+TIntermAggregate* TIntermediate::growAggregate(TIntermNode* left, TIntermNode* right)
+{
+ if (left == 0 && right == 0)
+ return 0;
+
+ TIntermAggregate* aggNode = 0;
+ if (left)
+ aggNode = left->getAsAggregate();
+ if (! aggNode || aggNode->getOp() != EOpNull) {
+ aggNode = new TIntermAggregate;
+ if (left)
+ aggNode->getSequence().push_back(left);
+ }
+
+ if (right)
+ aggNode->getSequence().push_back(right);
+
+ return aggNode;
+}
+
+TIntermAggregate* TIntermediate::growAggregate(TIntermNode* left, TIntermNode* right, const TSourceLoc& loc)
+{
+ TIntermAggregate* aggNode = growAggregate(left, right);
+ if (aggNode)
+ aggNode->setLoc(loc);
+
+ return aggNode;
+}
+
+//
+// Turn an existing node into an aggregate.
+//
+// Returns an aggregate, unless 0 was passed in for the existing node.
+//
+TIntermAggregate* TIntermediate::makeAggregate(TIntermNode* node)
+{
+ if (node == 0)
+ return 0;
+
+ TIntermAggregate* aggNode = new TIntermAggregate;
+ aggNode->getSequence().push_back(node);
+ aggNode->setLoc(node->getLoc());
+
+ return aggNode;
+}
+
+TIntermAggregate* TIntermediate::makeAggregate(TIntermNode* node, const TSourceLoc& loc)
+{
+ if (node == 0)
+ return 0;
+
+ TIntermAggregate* aggNode = new TIntermAggregate;
+ aggNode->getSequence().push_back(node);
+ aggNode->setLoc(loc);
+
+ return aggNode;
+}
+
+//
+// For "if" test nodes. There are three children; a condition,
+// a true path, and a false path. The two paths are in the
+// nodePair.
+//
+// Returns the selection node created.
+//
+TIntermNode* TIntermediate::addSelection(TIntermTyped* cond, TIntermNodePair nodePair, const TSourceLoc& loc)
+{
+ //
+ // Don't prune the false path for compile-time constants; it's needed
+ // for static access analysis.
+ //
+
+ TIntermSelection* node = new TIntermSelection(cond, nodePair.node1, nodePair.node2);
+ node->setLoc(loc);
+
+ return node;
+}
+
+
+TIntermTyped* TIntermediate::addComma(TIntermTyped* left, TIntermTyped* right, const TSourceLoc& loc)
+{
+ // However, the lowest precedence operators of the sequence operator ( , ) and the assignment operators
+ // ... are not included in the operators that can create a constant expression.
+ //
+ //if (left->getType().getQualifier().storage == EvqConst &&
+ // right->getType().getQualifier().storage == EvqConst) {
+
+ // return right;
+ //}
+
+ TIntermTyped *commaAggregate = growAggregate(left, right, loc);
+ commaAggregate->getAsAggregate()->setOperator(EOpComma);
+ commaAggregate->setType(right->getType());
+ commaAggregate->getWritableType().getQualifier().makeTemporary();
+
+ return commaAggregate;
+}
+
+TIntermTyped* TIntermediate::addMethod(TIntermTyped* object, const TType& type, const TString* name, const TSourceLoc& loc)
+{
+ TIntermMethod* method = new TIntermMethod(object, type, *name);
+ method->setLoc(loc);
+
+ return method;
+}
+
+//
+// For "?:" test nodes. There are three children; a condition,
+// a true path, and a false path. The two paths are specified
+// as separate parameters.
+//
+// Returns the selection node created, or 0 if one could not be.
+//
+TIntermTyped* TIntermediate::addSelection(TIntermTyped* cond, TIntermTyped* trueBlock, TIntermTyped* falseBlock, const TSourceLoc& loc)
+{
+ //
+ // Get compatible types.
+ //
+ TIntermTyped* child = addConversion(EOpSequence, trueBlock->getType(), falseBlock);
+ if (child)
+ falseBlock = child;
+ else {
+ child = addConversion(EOpSequence, falseBlock->getType(), trueBlock);
+ if (child)
+ trueBlock = child;
+ else
+ return 0;
+ }
+
+ // After conversion, types have to match.
+ if (falseBlock->getType() != trueBlock->getType())
+ return 0;
+
+ //
+ // See if all the operands are constant, then fold it otherwise not.
+ //
+
+ if (cond->getAsConstantUnion() && trueBlock->getAsConstantUnion() && falseBlock->getAsConstantUnion()) {
+ if (cond->getAsConstantUnion()->getConstArray()[0].getBConst())
+ return trueBlock;
+ else
+ return falseBlock;
+ }
+
+ //
+ // Make a selection node.
+ //
+ TIntermSelection* node = new TIntermSelection(cond, trueBlock, falseBlock, trueBlock->getType());
+ node->getQualifier().makeTemporary();
+ node->setLoc(loc);
+ node->getQualifier().precision = std::max(trueBlock->getQualifier().precision, falseBlock->getQualifier().precision);
+
+ return node;
+}
+
+//
+// Constant terminal nodes. Has a union that contains bool, float or int constants
+//
+// Returns the constant union node created.
+//
+
+TIntermConstantUnion* TIntermediate::addConstantUnion(const TConstUnionArray& unionArray, const TType& t, const TSourceLoc& loc, bool literal) const
+{
+ TIntermConstantUnion* node = new TIntermConstantUnion(unionArray, t);
+ node->getQualifier().storage = EvqConst;
+ node->setLoc(loc);
+ if (literal)
+ node->setLiteral();
+
+ return node;
+}
+
+TIntermConstantUnion* TIntermediate::addConstantUnion(int i, const TSourceLoc& loc, bool literal) const
+{
+ TConstUnionArray unionArray(1);
+ unionArray[0].setIConst(i);
+
+ return addConstantUnion(unionArray, TType(EbtInt, EvqConst), loc, literal);
+}
+
+TIntermConstantUnion* TIntermediate::addConstantUnion(unsigned int u, const TSourceLoc& loc, bool literal) const
+{
+ TConstUnionArray unionArray(1);
+ unionArray[0].setUConst(u);
+
+ return addConstantUnion(unionArray, TType(EbtUint, EvqConst), loc, literal);
+}
+
+TIntermConstantUnion* TIntermediate::addConstantUnion(long long i64, const TSourceLoc& loc, bool literal) const
+{
+ TConstUnionArray unionArray(1);
+ unionArray[0].setI64Const(i64);
+
+ return addConstantUnion(unionArray, TType(EbtInt64, EvqConst), loc, literal);
+}
+
+TIntermConstantUnion* TIntermediate::addConstantUnion(unsigned long long u64, const TSourceLoc& loc, bool literal) const
+{
+ TConstUnionArray unionArray(1);
+ unionArray[0].setU64Const(u64);
+
+ return addConstantUnion(unionArray, TType(EbtUint64, EvqConst), loc, literal);
+}
+
+TIntermConstantUnion* TIntermediate::addConstantUnion(bool b, const TSourceLoc& loc, bool literal) const
+{
+ TConstUnionArray unionArray(1);
+ unionArray[0].setBConst(b);
+
+ return addConstantUnion(unionArray, TType(EbtBool, EvqConst), loc, literal);
+}
+
+TIntermConstantUnion* TIntermediate::addConstantUnion(double d, TBasicType baseType, const TSourceLoc& loc, bool literal) const
+{
+ assert(baseType == EbtFloat || baseType == EbtDouble);
+
+ TConstUnionArray unionArray(1);
+ unionArray[0].setDConst(d);
+
+ return addConstantUnion(unionArray, TType(baseType, EvqConst), loc, literal);
+}
+
+TIntermTyped* TIntermediate::addSwizzle(TVectorFields& fields, const TSourceLoc& loc)
+{
+ TIntermAggregate* node = new TIntermAggregate(EOpSequence);
+
+ node->setLoc(loc);
+ TIntermConstantUnion* constIntNode;
+ TIntermSequence &sequenceVector = node->getSequence();
+
+ for (int i = 0; i < fields.num; i++) {
+ constIntNode = addConstantUnion(fields.offsets[i], loc);
+ sequenceVector.push_back(constIntNode);
+ }
+
+ return node;
+}
+
+//
+// Follow the left branches down to the root of an l-value
+// expression (just "." and []).
+//
+// Return the base of the l-value (where following indexing quits working).
+// Return nullptr if a chain following dereferences cannot be followed.
+//
+// 'swizzleOkay' says whether or not it is okay to consider a swizzle
+// a valid part of the dereference chain.
+//
+const TIntermTyped* TIntermediate::findLValueBase(const TIntermTyped* node, bool swizzleOkay)
+{
+ do {
+ const TIntermBinary* binary = node->getAsBinaryNode();
+ if (binary == nullptr)
+ return node;
+ TOperator op = binary->getOp();
+ if (op != EOpIndexDirect && op != EOpIndexIndirect && op != EOpIndexDirectStruct && op != EOpVectorSwizzle)
+ return nullptr;
+ if (! swizzleOkay) {
+ if (op == EOpVectorSwizzle)
+ return nullptr;
+ if ((op == EOpIndexDirect || op == EOpIndexIndirect) &&
+ (binary->getLeft()->getType().isVector() || binary->getLeft()->getType().isScalar()) &&
+ ! binary->getLeft()->getType().isArray())
+ return nullptr;
+ }
+ node = node->getAsBinaryNode()->getLeft();
+ } while (true);
+}
+
+//
+// Create while and do-while loop nodes.
+//
+TIntermLoop* TIntermediate::addLoop(TIntermNode* body, TIntermTyped* test, TIntermTyped* terminal, bool testFirst, const TSourceLoc& loc)
+{
+ TIntermLoop* node = new TIntermLoop(body, test, terminal, testFirst);
+ node->setLoc(loc);
+
+ return node;
+}
+
+//
+// Create a for-loop sequence.
+//
+TIntermAggregate* TIntermediate::addForLoop(TIntermNode* body, TIntermNode* initializer, TIntermTyped* test, TIntermTyped* terminal, bool testFirst, const TSourceLoc& loc)
+{
+ TIntermLoop* node = new TIntermLoop(body, test, terminal, testFirst);
+ node->setLoc(loc);
+
+ // make a sequence of the initializer and statement
+ TIntermAggregate* loopSequence = makeAggregate(initializer, loc);
+ loopSequence = growAggregate(loopSequence, node);
+ loopSequence->setOperator(EOpSequence);
+
+ return loopSequence;
+}
+
+//
+// Add branches.
+//
+TIntermBranch* TIntermediate::addBranch(TOperator branchOp, const TSourceLoc& loc)
+{
+ return addBranch(branchOp, 0, loc);
+}
+
+TIntermBranch* TIntermediate::addBranch(TOperator branchOp, TIntermTyped* expression, const TSourceLoc& loc)
+{
+ TIntermBranch* node = new TIntermBranch(branchOp, expression);
+ node->setLoc(loc);
+
+ return node;
+}
+
+//
+// This is to be executed after the final root is put on top by the parsing
+// process.
+//
+bool TIntermediate::postProcess(TIntermNode* root, EShLanguage /*language*/)
+{
+ if (root == 0)
+ return true;
+
+ // Finish off the top-level sequence
+ TIntermAggregate* aggRoot = root->getAsAggregate();
+ if (aggRoot && aggRoot->getOp() == EOpNull)
+ aggRoot->setOperator(EOpSequence);
+
+ // Propagate 'noContraction' label in backward from 'precise' variables.
+ glslang::PropagateNoContraction(*this);
+
+ return true;
+}
+
+void TIntermediate::addSymbolLinkageNodes(TIntermAggregate*& linkage, EShLanguage language, TSymbolTable& symbolTable)
+{
+ // Add top-level nodes for declarations that must be checked cross
+ // compilation unit by a linker, yet might not have been referenced
+ // by the AST.
+ //
+ // Almost entirely, translation of symbols is driven by what's present
+ // in the AST traversal, not by translating the symbol table.
+ //
+ // However, there are some special cases:
+ // - From the specification: "Special built-in inputs gl_VertexID and
+ // gl_InstanceID are also considered active vertex attributes."
+ // - Linker-based type mismatch error reporting needs to see all
+ // uniforms/ins/outs variables and blocks.
+ // - ftransform() can make gl_Vertex and gl_ModelViewProjectionMatrix active.
+ //
+
+ //if (ftransformUsed) {
+ // TODO: 1.1 lowering functionality: track ftransform() usage
+ // addSymbolLinkageNode(root, symbolTable, "gl_Vertex");
+ // addSymbolLinkageNode(root, symbolTable, "gl_ModelViewProjectionMatrix");
+ //}
+
+ if (language == EShLangVertex) {
+ // the names won't be found in the symbol table unless the versions are right,
+ // so version logic does not need to be repeated here
+ addSymbolLinkageNode(linkage, symbolTable, "gl_VertexID");
+ addSymbolLinkageNode(linkage, symbolTable, "gl_InstanceID");
+ }
+
+ // Add a child to the root node for the linker objects
+ linkage->setOperator(EOpLinkerObjects);
+ treeRoot = growAggregate(treeRoot, linkage);
+}
+
+//
+// Add the given name or symbol to the list of nodes at the end of the tree used
+// for link-time checking and external linkage.
+//
+
+void TIntermediate::addSymbolLinkageNode(TIntermAggregate*& linkage, TSymbolTable& symbolTable, const TString& name)
+{
+ TSymbol* symbol = symbolTable.find(name);
+ if (symbol)
+ addSymbolLinkageNode(linkage, *symbol->getAsVariable());
+}
+
+void TIntermediate::addSymbolLinkageNode(TIntermAggregate*& linkage, const TSymbol& symbol)
+{
+ const TVariable* variable = symbol.getAsVariable();
+ if (! variable) {
+ // This must be a member of an anonymous block, and we need to add the whole block
+ const TAnonMember* anon = symbol.getAsAnonMember();
+ variable = &anon->getAnonContainer();
+ }
+ TIntermSymbol* node = addSymbol(*variable);
+ linkage = growAggregate(linkage, node);
+}
+
+//
+// Add a caller->callee relationship to the call graph.
+// Assumes the strings are unique per signature.
+//
+void TIntermediate::addToCallGraph(TInfoSink& /*infoSink*/, const TString& caller, const TString& callee)
+{
+ // Duplicates are okay, but faster to not keep them, and they come grouped by caller,
+ // as long as new ones are push on the same end we check on for duplicates
+ for (TGraph::const_iterator call = callGraph.begin(); call != callGraph.end(); ++call) {
+ if (call->caller != caller)
+ break;
+ if (call->callee == callee)
+ return;
+ }
+
+ callGraph.push_front(TCall(caller, callee));
+}
+
+//
+// This deletes the tree.
+//
+void TIntermediate::removeTree()
+{
+ if (treeRoot)
+ RemoveAllTreeNodes(treeRoot);
+}
+
+//
+// Implement the part of KHR_vulkan_glsl that lists the set of operations
+// that can result in a specialization constant operation.
+//
+// "5.x Specialization Constant Operations"
+//
+// Only some operations discussed in this section may be applied to a
+// specialization constant and still yield a result that is as
+// specialization constant. The operations allowed are listed below.
+// When a specialization constant is operated on with one of these
+// operators and with another constant or specialization constant, the
+// result is implicitly a specialization constant.
+//
+// - int(), uint(), and bool() constructors for type conversions
+// from any of the following types to any of the following types:
+// * int
+// * uint
+// * bool
+// - vector versions of the above conversion constructors
+// - allowed implicit conversions of the above
+// - swizzles (e.g., foo.yx)
+// - The following when applied to integer or unsigned integer types:
+// * unary negative ( - )
+// * binary operations ( + , - , * , / , % )
+// * shift ( <<, >> )
+// * bitwise operations ( & , | , ^ )
+// - The following when applied to integer or unsigned integer scalar types:
+// * comparison ( == , != , > , >= , < , <= )
+// - The following when applied to the Boolean scalar type:
+// * not ( ! )
+// * logical operations ( && , || , ^^ )
+// * comparison ( == , != )"
+//
+// This function just handles binary and unary nodes. Construction
+// rules are handled in construction paths that are not covered by the unary
+// and binary paths, while required conversions will still show up here
+// as unary converters in the from a construction operator.
+//
+bool TIntermediate::isSpecializationOperation(const TIntermOperator& node) const
+{
+ // The operations resulting in floating point are quite limited
+ // (However, some floating-point operations result in bool, like ">",
+ // so are handled later.)
+ if (node.getType().isFloatingDomain()) {
+ switch (node.getOp()) {
+ case EOpIndexDirect:
+ case EOpIndexIndirect:
+ case EOpIndexDirectStruct:
+ case EOpVectorSwizzle:
+ return true;
+ default:
+ return false;
+ }
+ }
+
+ // Check for floating-point arguments
+ if (const TIntermBinary* bin = node.getAsBinaryNode())
+ if (bin->getLeft() ->getType().isFloatingDomain() ||
+ bin->getRight()->getType().isFloatingDomain())
+ return false;
+
+ // So, for now, we can assume everything left is non-floating-point...
+
+ // Now check for integer/bool-based operations
+ switch (node.getOp()) {
+
+ // dereference/swizzle
+ case EOpIndexDirect:
+ case EOpIndexIndirect:
+ case EOpIndexDirectStruct:
+ case EOpVectorSwizzle:
+
+ // conversion constructors
+ case EOpConvIntToBool:
+ case EOpConvUintToBool:
+ case EOpConvUintToInt:
+ case EOpConvBoolToInt:
+ case EOpConvIntToUint:
+ case EOpConvBoolToUint:
+
+ // unary operations
+ case EOpNegative:
+ case EOpLogicalNot:
+ case EOpBitwiseNot:
+
+ // binary operations
+ case EOpAdd:
+ case EOpSub:
+ case EOpMul:
+ case EOpVectorTimesScalar:
+ case EOpDiv:
+ case EOpMod:
+ case EOpRightShift:
+ case EOpLeftShift:
+ case EOpAnd:
+ case EOpInclusiveOr:
+ case EOpExclusiveOr:
+ case EOpLogicalOr:
+ case EOpLogicalXor:
+ case EOpLogicalAnd:
+ case EOpEqual:
+ case EOpNotEqual:
+ case EOpLessThan:
+ case EOpGreaterThan:
+ case EOpLessThanEqual:
+ case EOpGreaterThanEqual:
+ return true;
+ default:
+ return false;
+ }
+}
+
+////////////////////////////////////////////////////////////////
+//
+// Member functions of the nodes used for building the tree.
+//
+////////////////////////////////////////////////////////////////
+
+//
+// Say whether or not an operation node changes the value of a variable.
+//
+// Returns true if state is modified.
+//
+bool TIntermOperator::modifiesState() const
+{
+ switch (op) {
+ case EOpPostIncrement:
+ case EOpPostDecrement:
+ case EOpPreIncrement:
+ case EOpPreDecrement:
+ case EOpAssign:
+ case EOpAddAssign:
+ case EOpSubAssign:
+ case EOpMulAssign:
+ case EOpVectorTimesMatrixAssign:
+ case EOpVectorTimesScalarAssign:
+ case EOpMatrixTimesScalarAssign:
+ case EOpMatrixTimesMatrixAssign:
+ case EOpDivAssign:
+ case EOpModAssign:
+ case EOpAndAssign:
+ case EOpInclusiveOrAssign:
+ case EOpExclusiveOrAssign:
+ case EOpLeftShiftAssign:
+ case EOpRightShiftAssign:
+ return true;
+ default:
+ return false;
+ }
+}
+
+//
+// returns true if the operator is for one of the constructors
+//
+bool TIntermOperator::isConstructor() const
+{
+ return op > EOpConstructGuardStart && op < EOpConstructGuardEnd;
+}
+
+//
+// Make sure the type of a unary operator is appropriate for its
+// combination of operation and operand type.
+//
+// Returns false in nothing makes sense.
+//
+bool TIntermUnary::promote()
+{
+ switch (op) {
+ case EOpLogicalNot:
+ if (operand->getBasicType() != EbtBool)
+
+ return false;
+ break;
+ case EOpBitwiseNot:
+ if (operand->getBasicType() != EbtInt &&
+ operand->getBasicType() != EbtUint &&
+ operand->getBasicType() != EbtInt64 &&
+ operand->getBasicType() != EbtUint64)
+
+ return false;
+ break;
+ case EOpNegative:
+ case EOpPostIncrement:
+ case EOpPostDecrement:
+ case EOpPreIncrement:
+ case EOpPreDecrement:
+ if (operand->getBasicType() != EbtInt &&
+ operand->getBasicType() != EbtUint &&
+ operand->getBasicType() != EbtInt64 &&
+ operand->getBasicType() != EbtUint64 &&
+ operand->getBasicType() != EbtFloat &&
+ operand->getBasicType() != EbtDouble)
+
+ return false;
+ break;
+
+ default:
+ if (operand->getBasicType() != EbtFloat)
+
+ return false;
+ }
+
+ setType(operand->getType());
+ getWritableType().getQualifier().makeTemporary();
+
+ return true;
+}
+
+void TIntermUnary::updatePrecision()
+{
+ if (getBasicType() == EbtInt || getBasicType() == EbtUint || getBasicType() == EbtFloat) {
+ if (operand->getQualifier().precision > getQualifier().precision)
+ getQualifier().precision = operand->getQualifier().precision;
+ }
+}
+
+//
+// Establishes the type of the resultant operation, as well as
+// makes the operator the correct one for the operands.
+//
+// Returns false if operator can't work on operands.
+//
+bool TIntermBinary::promote()
+{
+ // Arrays and structures have to be exact matches.
+ if ((left->isArray() || right->isArray() || left->getBasicType() == EbtStruct || right->getBasicType() == EbtStruct)
+ && left->getType() != right->getType())
+ return false;
+
+ // Base assumption: just make the type the same as the left
+ // operand. Only deviations from this will be coded.
+ setType(left->getType());
+ type.getQualifier().clear();
+
+ // Composite and opaque types don't having pending operator changes, e.g.,
+ // array, structure, and samplers. Just establish final type and correctness.
+ if (left->isArray() || left->getBasicType() == EbtStruct || left->getBasicType() == EbtSampler) {
+ switch (op) {
+ case EOpEqual:
+ case EOpNotEqual:
+ if (left->getBasicType() == EbtSampler) {
+ // can't compare samplers
+ return false;
+ } else {
+ // Promote to conditional
+ setType(TType(EbtBool));
+ }
+
+ return true;
+
+ case EOpAssign:
+ // Keep type from above
+
+ return true;
+
+ default:
+ return false;
+ }
+ }
+
+ //
+ // We now have only scalars, vectors, and matrices to worry about.
+ //
+
+ // Do general type checks against individual operands (comparing left and right is coming up, checking mixed shapes after that)
+ switch (op) {
+ case EOpLessThan:
+ case EOpGreaterThan:
+ case EOpLessThanEqual:
+ case EOpGreaterThanEqual:
+ // Relational comparisons need matching numeric types and will promote to scalar Boolean.
+ if (left->getBasicType() == EbtBool || left->getType().isVector() || left->getType().isMatrix())
+ return false;
+
+ // Fall through
+
+ case EOpEqual:
+ case EOpNotEqual:
+ // All the above comparisons result in a bool (but not the vector compares)
+ setType(TType(EbtBool));
+ break;
+
+ case EOpLogicalAnd:
+ case EOpLogicalOr:
+ case EOpLogicalXor:
+ // logical ops operate only on scalar Booleans and will promote to scalar Boolean.
+ if (left->getBasicType() != EbtBool || left->isVector() || left->isMatrix())
+ return false;
+
+ setType(TType(EbtBool));
+ break;
+
+ case EOpRightShift:
+ case EOpLeftShift:
+ case EOpRightShiftAssign:
+ case EOpLeftShiftAssign:
+
+ case EOpMod:
+ case EOpModAssign:
+
+ case EOpAnd:
+ case EOpInclusiveOr:
+ case EOpExclusiveOr:
+ case EOpAndAssign:
+ case EOpInclusiveOrAssign:
+ case EOpExclusiveOrAssign:
+ // Check for integer-only operands.
+ if ((left->getBasicType() != EbtInt && left->getBasicType() != EbtUint &&
+ left->getBasicType() != EbtInt64 && left->getBasicType() != EbtUint64) ||
+ (right->getBasicType() != EbtInt && right->getBasicType() != EbtUint &&
+ right->getBasicType() != EbtInt64 && right->getBasicType() != EbtUint64))
+ return false;
+ if (left->isMatrix() || right->isMatrix())
+ return false;
+
+ break;
+
+ case EOpAdd:
+ case EOpSub:
+ case EOpDiv:
+ case EOpMul:
+ case EOpAddAssign:
+ case EOpSubAssign:
+ case EOpMulAssign:
+ case EOpDivAssign:
+ // check for non-Boolean operands
+ if (left->getBasicType() == EbtBool || right->getBasicType() == EbtBool)
+ return false;
+
+ default:
+ break;
+ }
+
+ // Compare left and right, and finish with the cases where the operand types must match
+ switch (op) {
+ case EOpLessThan:
+ case EOpGreaterThan:
+ case EOpLessThanEqual:
+ case EOpGreaterThanEqual:
+
+ case EOpEqual:
+ case EOpNotEqual:
+
+ case EOpLogicalAnd:
+ case EOpLogicalOr:
+ case EOpLogicalXor:
+ return left->getType() == right->getType();
+
+ // no shifts: they can mix types (scalar int can shift a vector uint, etc.)
+
+ case EOpMod:
+ case EOpModAssign:
+
+ case EOpAnd:
+ case EOpInclusiveOr:
+ case EOpExclusiveOr:
+ case EOpAndAssign:
+ case EOpInclusiveOrAssign:
+ case EOpExclusiveOrAssign:
+
+ case EOpAdd:
+ case EOpSub:
+ case EOpDiv:
+ case EOpAddAssign:
+ case EOpSubAssign:
+ case EOpDivAssign:
+ // Quick out in case the types do match
+ if (left->getType() == right->getType())
+ return true;
+
+ // Fall through
+
+ case EOpMul:
+ case EOpMulAssign:
+ // At least the basic type has to match
+ if (left->getBasicType() != right->getBasicType())
+ return false;
+
+ default:
+ break;
+ }
+
+ // Finish handling the case, for all ops, where both operands are scalars.
+ if (left->isScalar() && right->isScalar())
+ return true;
+
+ // Finish handling the case, for all ops, where there are two vectors of different sizes
+ if (left->isVector() && right->isVector() && left->getVectorSize() != right->getVectorSize())
+ return false;
+
+ //
+ // We now have a mix of scalars, vectors, or matrices, for non-relational operations.
+ //
+
+ // Can these two operands be combined, what is the resulting type?
+ TBasicType basicType = left->getBasicType();
+ switch (op) {
+ case EOpMul:
+ if (!left->isMatrix() && right->isMatrix()) {
+ if (left->isVector()) {
+ if (left->getVectorSize() != right->getMatrixRows())
+ return false;
+ op = EOpVectorTimesMatrix;
+ setType(TType(basicType, EvqTemporary, right->getMatrixCols()));
+ } else {
+ op = EOpMatrixTimesScalar;
+ setType(TType(basicType, EvqTemporary, 0, right->getMatrixCols(), right->getMatrixRows()));
+ }
+ } else if (left->isMatrix() && !right->isMatrix()) {
+ if (right->isVector()) {
+ if (left->getMatrixCols() != right->getVectorSize())
+ return false;
+ op = EOpMatrixTimesVector;
+ setType(TType(basicType, EvqTemporary, left->getMatrixRows()));
+ } else {
+ op = EOpMatrixTimesScalar;
+ }
+ } else if (left->isMatrix() && right->isMatrix()) {
+ if (left->getMatrixCols() != right->getMatrixRows())
+ return false;
+ op = EOpMatrixTimesMatrix;
+ setType(TType(basicType, EvqTemporary, 0, right->getMatrixCols(), left->getMatrixRows()));
+ } else if (! left->isMatrix() && ! right->isMatrix()) {
+ if (left->isVector() && right->isVector()) {
+ ; // leave as component product
+ } else if (left->isVector() || right->isVector()) {
+ op = EOpVectorTimesScalar;
+ if (right->isVector())
+ setType(TType(basicType, EvqTemporary, right->getVectorSize()));
+ }
+ } else {
+ return false;
+ }
+ break;
+ case EOpMulAssign:
+ if (! left->isMatrix() && right->isMatrix()) {
+ if (left->isVector()) {
+ if (left->getVectorSize() != right->getMatrixRows() || left->getVectorSize() != right->getMatrixCols())
+ return false;
+ op = EOpVectorTimesMatrixAssign;
+ } else {
+ return false;
+ }
+ } else if (left->isMatrix() && !right->isMatrix()) {
+ if (right->isVector()) {
+ return false;
+ } else {
+ op = EOpMatrixTimesScalarAssign;
+ }
+ } else if (left->isMatrix() && right->isMatrix()) {
+ if (left->getMatrixCols() != left->getMatrixRows() || left->getMatrixCols() != right->getMatrixCols() || left->getMatrixCols() != right->getMatrixRows())
+ return false;
+ op = EOpMatrixTimesMatrixAssign;
+ } else if (!left->isMatrix() && !right->isMatrix()) {
+ if (left->isVector() && right->isVector()) {
+ // leave as component product
+ } else if (left->isVector() || right->isVector()) {
+ if (! left->isVector())
+ return false;
+ op = EOpVectorTimesScalarAssign;
+ }
+ } else {
+ return false;
+ }
+ break;
+
+ case EOpRightShift:
+ case EOpLeftShift:
+ case EOpRightShiftAssign:
+ case EOpLeftShiftAssign:
+ if (right->isVector() && (! left->isVector() || right->getVectorSize() != left->getVectorSize()))
+ return false;
+ break;
+
+ case EOpAssign:
+ if (left->getVectorSize() != right->getVectorSize() || left->getMatrixCols() != right->getMatrixCols() || left->getMatrixRows() != right->getMatrixRows())
+ return false;
+ // fall through
+
+ case EOpAdd:
+ case EOpSub:
+ case EOpDiv:
+ case EOpMod:
+ case EOpAnd:
+ case EOpInclusiveOr:
+ case EOpExclusiveOr:
+ case EOpAddAssign:
+ case EOpSubAssign:
+ case EOpDivAssign:
+ case EOpModAssign:
+ case EOpAndAssign:
+ case EOpInclusiveOrAssign:
+ case EOpExclusiveOrAssign:
+ if ((left->isMatrix() && right->isVector()) ||
+ (left->isVector() && right->isMatrix()) ||
+ left->getBasicType() != right->getBasicType())
+ return false;
+ if (left->isMatrix() && right->isMatrix() && (left->getMatrixCols() != right->getMatrixCols() || left->getMatrixRows() != right->getMatrixRows()))
+ return false;
+ if (left->isVector() && right->isVector() && left->getVectorSize() != right->getVectorSize())
+ return false;
+ if (right->isVector() || right->isMatrix()) {
+ type.shallowCopy(right->getType());
+ type.getQualifier().makeTemporary();
+ }
+ break;
+
+ default:
+ return false;
+ }
+
+ //
+ // One more check for assignment.
+ //
+ switch (op) {
+ // The resulting type has to match the left operand.
+ case EOpAssign:
+ case EOpAddAssign:
+ case EOpSubAssign:
+ case EOpMulAssign:
+ case EOpDivAssign:
+ case EOpModAssign:
+ case EOpAndAssign:
+ case EOpInclusiveOrAssign:
+ case EOpExclusiveOrAssign:
+ case EOpLeftShiftAssign:
+ case EOpRightShiftAssign:
+ if (getType() != left->getType())
+ return false;
+ break;
+ default:
+ break;
+ }
+
+ return true;
+}
+
+void TIntermBinary::updatePrecision()
+{
+ if (getBasicType() == EbtInt || getBasicType() == EbtUint || getBasicType() == EbtFloat) {
+ getQualifier().precision = std::max(right->getQualifier().precision, left->getQualifier().precision);
+ if (getQualifier().precision != EpqNone) {
+ left->propagatePrecision(getQualifier().precision);
+ right->propagatePrecision(getQualifier().precision);
+ }
+ }
+}
+
+void TIntermTyped::propagatePrecision(TPrecisionQualifier newPrecision)
+{
+ if (getQualifier().precision != EpqNone || (getBasicType() != EbtInt && getBasicType() != EbtUint && getBasicType() != EbtFloat))
+ return;
+
+ getQualifier().precision = newPrecision;
+
+ TIntermBinary* binaryNode = getAsBinaryNode();
+ if (binaryNode) {
+ binaryNode->getLeft()->propagatePrecision(newPrecision);
+ binaryNode->getRight()->propagatePrecision(newPrecision);
+
+ return;
+ }
+
+ TIntermUnary* unaryNode = getAsUnaryNode();
+ if (unaryNode) {
+ unaryNode->getOperand()->propagatePrecision(newPrecision);
+
+ return;
+ }
+
+ TIntermAggregate* aggregateNode = getAsAggregate();
+ if (aggregateNode) {
+ TIntermSequence operands = aggregateNode->getSequence();
+ for (unsigned int i = 0; i < operands.size(); ++i) {
+ TIntermTyped* typedNode = operands[i]->getAsTyped();
+ if (! typedNode)
+ break;
+ typedNode->propagatePrecision(newPrecision);
+ }
+
+ return;
+ }
+
+ TIntermSelection* selectionNode = getAsSelectionNode();
+ if (selectionNode) {
+ TIntermTyped* typedNode = selectionNode->getTrueBlock()->getAsTyped();
+ if (typedNode) {
+ typedNode->propagatePrecision(newPrecision);
+ typedNode = selectionNode->getFalseBlock()->getAsTyped();
+ if (typedNode)
+ typedNode->propagatePrecision(newPrecision);
+ }
+
+ return;
+ }
+}
+
+TIntermTyped* TIntermediate::promoteConstantUnion(TBasicType promoteTo, TIntermConstantUnion* node) const
+{
+ const TConstUnionArray& rightUnionArray = node->getConstArray();
+ int size = node->getType().computeNumComponents();
+
+ TConstUnionArray leftUnionArray(size);
+
+ for (int i=0; i < size; i++) {
+ switch (promoteTo) {
+ case EbtFloat:
+ switch (node->getType().getBasicType()) {
+ case EbtInt:
+ leftUnionArray[i].setDConst(static_cast<double>(rightUnionArray[i].getIConst()));
+ break;
+ case EbtUint:
+ leftUnionArray[i].setDConst(static_cast<double>(rightUnionArray[i].getUConst()));
+ break;
+ case EbtInt64:
+ leftUnionArray[i].setDConst(static_cast<double>(rightUnionArray[i].getI64Const()));
+ break;
+ case EbtUint64:
+ leftUnionArray[i].setDConst(static_cast<double>(rightUnionArray[i].getU64Const()));
+ break;
+ case EbtBool:
+ leftUnionArray[i].setDConst(static_cast<double>(rightUnionArray[i].getBConst()));
+ break;
+ case EbtFloat:
+ leftUnionArray[i] = rightUnionArray[i];
+ break;
+ case EbtDouble:
+ leftUnionArray[i].setDConst(static_cast<double>(rightUnionArray[i].getDConst()));
+ break;
+ default:
+ return node;
+ }
+ break;
+ case EbtDouble:
+ switch (node->getType().getBasicType()) {
+ case EbtInt:
+ leftUnionArray[i].setDConst(static_cast<double>(rightUnionArray[i].getIConst()));
+ break;
+ case EbtUint:
+ leftUnionArray[i].setDConst(static_cast<double>(rightUnionArray[i].getUConst()));
+ break;
+ case EbtInt64:
+ leftUnionArray[i].setDConst(static_cast<double>(rightUnionArray[i].getI64Const()));
+ break;
+ case EbtUint64:
+ leftUnionArray[i].setDConst(static_cast<double>(rightUnionArray[i].getU64Const()));
+ break;
+ case EbtBool:
+ leftUnionArray[i].setDConst(static_cast<double>(rightUnionArray[i].getBConst()));
+ break;
+ case EbtFloat:
+ case EbtDouble:
+ leftUnionArray[i] = rightUnionArray[i];
+ break;
+ default:
+ return node;
+ }
+ break;
+ case EbtInt:
+ switch (node->getType().getBasicType()) {
+ case EbtInt:
+ leftUnionArray[i] = rightUnionArray[i];
+ break;
+ case EbtUint:
+ leftUnionArray[i].setIConst(static_cast<int>(rightUnionArray[i].getUConst()));
+ break;
+ case EbtInt64:
+ leftUnionArray[i].setIConst(static_cast<int>(rightUnionArray[i].getI64Const()));
+ break;
+ case EbtUint64:
+ leftUnionArray[i].setIConst(static_cast<int>(rightUnionArray[i].getU64Const()));
+ break;
+ case EbtBool:
+ leftUnionArray[i].setIConst(static_cast<int>(rightUnionArray[i].getBConst()));
+ break;
+ case EbtFloat:
+ case EbtDouble:
+ leftUnionArray[i].setIConst(static_cast<int>(rightUnionArray[i].getDConst()));
+ break;
+ default:
+ return node;
+ }
+ break;
+ case EbtUint:
+ switch (node->getType().getBasicType()) {
+ case EbtInt:
+ leftUnionArray[i].setUConst(static_cast<unsigned int>(rightUnionArray[i].getIConst()));
+ break;
+ case EbtUint:
+ leftUnionArray[i] = rightUnionArray[i];
+ break;
+ case EbtInt64:
+ leftUnionArray[i].setUConst(static_cast<unsigned int>(rightUnionArray[i].getI64Const()));
+ break;
+ case EbtUint64:
+ leftUnionArray[i].setUConst(static_cast<unsigned int>(rightUnionArray[i].getU64Const()));
+ break;
+ case EbtBool:
+ leftUnionArray[i].setUConst(static_cast<unsigned int>(rightUnionArray[i].getBConst()));
+ break;
+ case EbtFloat:
+ case EbtDouble:
+ leftUnionArray[i].setUConst(static_cast<unsigned int>(rightUnionArray[i].getDConst()));
+ break;
+ default:
+ return node;
+ }
+ break;
+ case EbtBool:
+ switch (node->getType().getBasicType()) {
+ case EbtInt:
+ leftUnionArray[i].setBConst(rightUnionArray[i].getIConst() != 0);
+ break;
+ case EbtUint:
+ leftUnionArray[i].setBConst(rightUnionArray[i].getUConst() != 0);
+ break;
+ case EbtInt64:
+ leftUnionArray[i].setBConst(rightUnionArray[i].getI64Const() != 0);
+ break;
+ case EbtUint64:
+ leftUnionArray[i].setBConst(rightUnionArray[i].getU64Const() != 0);
+ break;
+ case EbtBool:
+ leftUnionArray[i] = rightUnionArray[i];
+ break;
+ case EbtFloat:
+ case EbtDouble:
+ leftUnionArray[i].setBConst(rightUnionArray[i].getDConst() != 0.0);
+ break;
+ default:
+ return node;
+ }
+ break;
+ case EbtInt64:
+ switch (node->getType().getBasicType()) {
+ case EbtInt:
+ leftUnionArray[i].setI64Const(static_cast<long long>(rightUnionArray[i].getIConst()));
+ break;
+ case EbtUint:
+ leftUnionArray[i].setI64Const(static_cast<long long>(rightUnionArray[i].getUConst()));
+ break;
+ case EbtInt64:
+ leftUnionArray[i] = rightUnionArray[i];
+ break;
+ case EbtUint64:
+ leftUnionArray[i].setI64Const(static_cast<long long>(rightUnionArray[i].getU64Const()));
+ break;
+ case EbtBool:
+ leftUnionArray[i].setI64Const(static_cast<long long>(rightUnionArray[i].getBConst()));
+ break;
+ case EbtFloat:
+ case EbtDouble:
+ leftUnionArray[i].setI64Const(static_cast<long long>(rightUnionArray[i].getDConst()));
+ break;
+ default:
+ return node;
+ }
+ break;
+ case EbtUint64:
+ switch (node->getType().getBasicType()) {
+ case EbtInt:
+ leftUnionArray[i].setU64Const(static_cast<unsigned long long>(rightUnionArray[i].getIConst()));
+ break;
+ case EbtUint:
+ leftUnionArray[i].setU64Const(static_cast<unsigned long long>(rightUnionArray[i].getUConst()));
+ break;
+ case EbtInt64:
+ leftUnionArray[i].setU64Const(static_cast<unsigned long long>(rightUnionArray[i].getI64Const()));
+ break;
+ case EbtUint64:
+ leftUnionArray[i] = rightUnionArray[i];
+ break;
+ case EbtBool:
+ leftUnionArray[i].setU64Const(static_cast<unsigned long long>(rightUnionArray[i].getBConst()));
+ break;
+ case EbtFloat:
+ case EbtDouble:
+ leftUnionArray[i].setU64Const(static_cast<unsigned long long>(rightUnionArray[i].getDConst()));
+ break;
+ default:
+ return node;
+ }
+ break;
+ default:
+ return node;
+ }
+ }
+
+ const TType& t = node->getType();
+
+ return addConstantUnion(leftUnionArray, TType(promoteTo, t.getQualifier().storage, t.getVectorSize(), t.getMatrixCols(), t.getMatrixRows()),
+ node->getLoc());
+}
+
+void TIntermAggregate::addToPragmaTable(const TPragmaTable& pTable)
+{
+ assert(!pragmaTable);
+ pragmaTable = new TPragmaTable();
+ *pragmaTable = pTable;
+}
+
+} // end namespace glslang
diff --git a/chromium/third_party/glslang/src/glslang/MachineIndependent/ParseHelper.cpp b/chromium/third_party/glslang/src/glslang/MachineIndependent/ParseHelper.cpp
new file mode 100644
index 00000000000..eb9100bd05c
--- /dev/null
+++ b/chromium/third_party/glslang/src/glslang/MachineIndependent/ParseHelper.cpp
@@ -0,0 +1,6164 @@
+//
+//Copyright (C) 2002-2005 3Dlabs Inc. Ltd.
+//Copyright (C) 2012-2015 LunarG, Inc.
+//Copyright (C) 2015-2016 Google, 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:
+//
+// Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 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.
+//
+// Neither the name of 3Dlabs Inc. Ltd. nor the names of its
+// contributors may be used to endorse or promote products derived
+// from this software without specific prior written permission.
+//
+//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+//"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 THE
+//COPYRIGHT HOLDERS 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.
+//
+
+#include "ParseHelper.h"
+#include "Scan.h"
+
+#include "../OSDependent/osinclude.h"
+#include <stdarg.h>
+#include <algorithm>
+
+#include "preprocessor/PpContext.h"
+
+extern int yyparse(glslang::TParseContext*);
+
+namespace glslang {
+
+TParseContext::TParseContext(TSymbolTable& symbolTable, TIntermediate& interm, bool parsingBuiltins,
+ int version, EProfile profile, int spv, int vulkan, EShLanguage language,
+ TInfoSink& infoSink, bool forwardCompatible, EShMessages messages) :
+ TParseContextBase(symbolTable, interm, version, profile, spv, vulkan, language, infoSink, forwardCompatible, messages),
+ contextPragma(true, false), loopNestingLevel(0), structNestingLevel(0), controlFlowNestingLevel(0), statementNestingLevel(0),
+ inMain(false), postMainReturn(false), currentFunctionType(nullptr), blockName(nullptr),
+ limits(resources.limits), parsingBuiltins(parsingBuiltins),
+ afterEOF(false),
+ atomicUintOffsets(nullptr), anyIndexLimits(false)
+{
+ // ensure we always have a linkage node, even if empty, to simplify tree topology algorithms
+ linkage = new TIntermAggregate;
+
+ // set all precision defaults to EpqNone, which is correct for all desktop types
+ // and for ES types that don't have defaults (thus getting an error on use)
+ for (int type = 0; type < EbtNumTypes; ++type)
+ defaultPrecision[type] = EpqNone;
+
+ for (int type = 0; type < maxSamplerIndex; ++type)
+ defaultSamplerPrecision[type] = EpqNone;
+
+ // replace with real precision defaults for those that have them
+ if (profile == EEsProfile) {
+ TSampler sampler;
+ sampler.set(EbtFloat, Esd2D);
+ defaultSamplerPrecision[computeSamplerTypeIndex(sampler)] = EpqLow;
+ sampler.set(EbtFloat, EsdCube);
+ defaultSamplerPrecision[computeSamplerTypeIndex(sampler)] = EpqLow;
+ sampler.set(EbtFloat, Esd2D);
+ sampler.external = true;
+ defaultSamplerPrecision[computeSamplerTypeIndex(sampler)] = EpqLow;
+
+ // If we are parsing built-in computational variables/functions, it is meaningful to record
+ // whether the built-in has no precision qualifier, as that ambiguity
+ // is used to resolve the precision from the supplied arguments/operands instead.
+ // So, we don't actually want to replace EpqNone with a default precision for built-ins.
+ if (! parsingBuiltins) {
+ switch (language) {
+ case EShLangFragment:
+ defaultPrecision[EbtInt] = EpqMedium;
+ defaultPrecision[EbtUint] = EpqMedium;
+ break;
+ default:
+ defaultPrecision[EbtInt] = EpqHigh;
+ defaultPrecision[EbtUint] = EpqHigh;
+ defaultPrecision[EbtFloat] = EpqHigh;
+ break;
+ }
+ }
+
+ defaultPrecision[EbtSampler] = EpqLow;
+ defaultPrecision[EbtAtomicUint] = EpqHigh;
+ }
+
+ globalUniformDefaults.clear();
+ globalUniformDefaults.layoutMatrix = ElmColumnMajor;
+ globalUniformDefaults.layoutPacking = vulkan > 0 ? ElpStd140 : ElpShared;
+
+ globalBufferDefaults.clear();
+ globalBufferDefaults.layoutMatrix = ElmColumnMajor;
+ globalBufferDefaults.layoutPacking = vulkan > 0 ? ElpStd430 : ElpShared;
+
+ globalInputDefaults.clear();
+ globalOutputDefaults.clear();
+
+ // "Shaders in the transform
+ // feedback capturing mode have an initial global default of
+ // layout(xfb_buffer = 0) out;"
+ if (language == EShLangVertex ||
+ language == EShLangTessControl ||
+ language == EShLangTessEvaluation ||
+ language == EShLangGeometry)
+ globalOutputDefaults.layoutXfbBuffer = 0;
+
+ if (language == EShLangGeometry)
+ globalOutputDefaults.layoutStream = 0;
+}
+
+TParseContext::~TParseContext()
+{
+ delete [] atomicUintOffsets;
+}
+
+void TParseContext::setLimits(const TBuiltInResource& r)
+{
+ resources = r;
+
+ anyIndexLimits = ! limits.generalAttributeMatrixVectorIndexing ||
+ ! limits.generalConstantMatrixVectorIndexing ||
+ ! limits.generalSamplerIndexing ||
+ ! limits.generalUniformIndexing ||
+ ! limits.generalVariableIndexing ||
+ ! limits.generalVaryingIndexing;
+
+ intermediate.setLimits(resources);
+
+ // "Each binding point tracks its own current default offset for
+ // inheritance of subsequent variables using the same binding. The initial state of compilation is that all
+ // binding points have an offset of 0."
+ atomicUintOffsets = new int[resources.maxAtomicCounterBindings];
+ for (int b = 0; b < resources.maxAtomicCounterBindings; ++b)
+ atomicUintOffsets[b] = 0;
+}
+
+//
+// Parse an array of strings using yyparse, going through the
+// preprocessor to tokenize the shader strings, then through
+// the GLSL scanner.
+//
+// Returns true for successful acceptance of the shader, false if any errors.
+//
+bool TParseContext::parseShaderStrings(TPpContext& ppContext, TInputScanner& input, bool versionWillBeError)
+{
+ currentScanner = &input;
+ ppContext.setInput(input, versionWillBeError);
+ yyparse(this);
+ if (! parsingBuiltins)
+ finalErrorCheck();
+
+ return numErrors == 0;
+}
+
+// This is called from bison when it has a parse (syntax) error
+void TParseContext::parserError(const char* s)
+{
+ if (afterEOF) {
+ if (tokensBeforeEOF == 1)
+ error(getCurrentLoc(), "", "premature end of input", s, "");
+ } else
+ error(getCurrentLoc(), "", "", s, "");
+}
+
+void TParseContext::handlePragma(const TSourceLoc& loc, const TVector<TString>& tokens)
+{
+ if (pragmaCallback)
+ pragmaCallback(loc.line, tokens);
+
+ if (tokens.size() == 0)
+ return;
+
+ if (tokens[0].compare("optimize") == 0) {
+ if (tokens.size() != 4) {
+ error(loc, "optimize pragma syntax is incorrect", "#pragma", "");
+ return;
+ }
+
+ if (tokens[1].compare("(") != 0) {
+ error(loc, "\"(\" expected after 'optimize' keyword", "#pragma", "");
+ return;
+ }
+
+ if (tokens[2].compare("on") == 0)
+ contextPragma.optimize = true;
+ else if (tokens[2].compare("off") == 0)
+ contextPragma.optimize = false;
+ else {
+ error(loc, "\"on\" or \"off\" expected after '(' for 'optimize' pragma", "#pragma", "");
+ return;
+ }
+
+ if (tokens[3].compare(")") != 0) {
+ error(loc, "\")\" expected to end 'optimize' pragma", "#pragma", "");
+ return;
+ }
+ } else if (tokens[0].compare("debug") == 0) {
+ if (tokens.size() != 4) {
+ error(loc, "debug pragma syntax is incorrect", "#pragma", "");
+ return;
+ }
+
+ if (tokens[1].compare("(") != 0) {
+ error(loc, "\"(\" expected after 'debug' keyword", "#pragma", "");
+ return;
+ }
+
+ if (tokens[2].compare("on") == 0)
+ contextPragma.debug = true;
+ else if (tokens[2].compare("off") == 0)
+ contextPragma.debug = false;
+ else {
+ error(loc, "\"on\" or \"off\" expected after '(' for 'debug' pragma", "#pragma", "");
+ return;
+ }
+
+ if (tokens[3].compare(")") != 0) {
+ error(loc, "\")\" expected to end 'debug' pragma", "#pragma", "");
+ return;
+ }
+ }
+}
+
+///////////////////////////////////////////////////////////////////////
+//
+// Sub- vector and matrix fields
+//
+////////////////////////////////////////////////////////////////////////
+
+//
+// Look at a '.' field selector string and change it into offsets
+// for a vector or scalar
+//
+// Returns true if there is no error.
+//
+bool TParseContext::parseVectorFields(const TSourceLoc& loc, const TString& compString, int vecSize, TVectorFields& fields)
+{
+ fields.num = (int) compString.size();
+ if (fields.num > 4) {
+ error(loc, "illegal vector field selection", compString.c_str(), "");
+ return false;
+ }
+
+ enum {
+ exyzw,
+ ergba,
+ estpq,
+ } fieldSet[4];
+
+ for (int i = 0; i < fields.num; ++i) {
+ switch (compString[i]) {
+ case 'x':
+ fields.offsets[i] = 0;
+ fieldSet[i] = exyzw;
+ break;
+ case 'r':
+ fields.offsets[i] = 0;
+ fieldSet[i] = ergba;
+ break;
+ case 's':
+ fields.offsets[i] = 0;
+ fieldSet[i] = estpq;
+ break;
+ case 'y':
+ fields.offsets[i] = 1;
+ fieldSet[i] = exyzw;
+ break;
+ case 'g':
+ fields.offsets[i] = 1;
+ fieldSet[i] = ergba;
+ break;
+ case 't':
+ fields.offsets[i] = 1;
+ fieldSet[i] = estpq;
+ break;
+ case 'z':
+ fields.offsets[i] = 2;
+ fieldSet[i] = exyzw;
+ break;
+ case 'b':
+ fields.offsets[i] = 2;
+ fieldSet[i] = ergba;
+ break;
+ case 'p':
+ fields.offsets[i] = 2;
+ fieldSet[i] = estpq;
+ break;
+
+ case 'w':
+ fields.offsets[i] = 3;
+ fieldSet[i] = exyzw;
+ break;
+ case 'a':
+ fields.offsets[i] = 3;
+ fieldSet[i] = ergba;
+ break;
+ case 'q':
+ fields.offsets[i] = 3;
+ fieldSet[i] = estpq;
+ break;
+ default:
+ error(loc, "illegal vector field selection", compString.c_str(), "");
+ return false;
+ }
+ }
+
+ for (int i = 0; i < fields.num; ++i) {
+ if (fields.offsets[i] >= vecSize) {
+ error(loc, "vector field selection out of range", compString.c_str(), "");
+ return false;
+ }
+
+ if (i > 0) {
+ if (fieldSet[i] != fieldSet[i-1]) {
+ error(loc, "illegal - vector component fields not from the same set", compString.c_str(), "");
+ return false;
+ }
+ }
+ }
+
+ return true;
+}
+
+///////////////////////////////////////////////////////////////////////
+//
+// Errors
+//
+////////////////////////////////////////////////////////////////////////
+
+//
+// Used to output syntax, parsing, and semantic errors.
+//
+
+void TParseContext::outputMessage(const TSourceLoc& loc, const char* szReason,
+ const char* szToken,
+ const char* szExtraInfoFormat,
+ TPrefixType prefix, va_list args)
+{
+ const int maxSize = MaxTokenLength + 200;
+ char szExtraInfo[maxSize];
+
+ safe_vsprintf(szExtraInfo, maxSize, szExtraInfoFormat, args);
+
+ infoSink.info.prefix(prefix);
+ infoSink.info.location(loc);
+ infoSink.info << "'" << szToken << "' : " << szReason << " " << szExtraInfo << "\n";
+
+ if (prefix == EPrefixError) {
+ ++numErrors;
+ }
+}
+
+void C_DECL TParseContext::error(const TSourceLoc& loc, const char* szReason, const char* szToken,
+ const char* szExtraInfoFormat, ...)
+{
+ if (messages & EShMsgOnlyPreprocessor)
+ return;
+ va_list args;
+ va_start(args, szExtraInfoFormat);
+ outputMessage(loc, szReason, szToken, szExtraInfoFormat, EPrefixError, args);
+ va_end(args);
+}
+
+void C_DECL TParseContext::warn(const TSourceLoc& loc, const char* szReason, const char* szToken,
+ const char* szExtraInfoFormat, ...)
+{
+ if (suppressWarnings())
+ return;
+ va_list args;
+ va_start(args, szExtraInfoFormat);
+ outputMessage(loc, szReason, szToken, szExtraInfoFormat, EPrefixWarning, args);
+ va_end(args);
+}
+
+void C_DECL TParseContext::ppError(const TSourceLoc& loc, const char* szReason, const char* szToken,
+ const char* szExtraInfoFormat, ...)
+{
+ va_list args;
+ va_start(args, szExtraInfoFormat);
+ outputMessage(loc, szReason, szToken, szExtraInfoFormat, EPrefixError, args);
+ va_end(args);
+}
+
+void C_DECL TParseContext::ppWarn(const TSourceLoc& loc, const char* szReason, const char* szToken,
+ const char* szExtraInfoFormat, ...)
+{
+ va_list args;
+ va_start(args, szExtraInfoFormat);
+ outputMessage(loc, szReason, szToken, szExtraInfoFormat, EPrefixWarning, args);
+ va_end(args);
+}
+
+//
+// Handle seeing a variable identifier in the grammar.
+//
+TIntermTyped* TParseContext::handleVariable(const TSourceLoc& loc, TSymbol* symbol, const TString* string)
+{
+ TIntermTyped* node = nullptr;
+
+ // Error check for requiring specific extensions present.
+ if (symbol && symbol->getNumExtensions())
+ requireExtensions(loc, symbol->getNumExtensions(), symbol->getExtensions(), symbol->getName().c_str());
+
+ if (symbol && symbol->isReadOnly()) {
+ // All shared things containing an implicitly sized array must be copied up
+ // on first use, so that all future references will share its array structure,
+ // so that editing the implicit size will effect all nodes consuming it,
+ // and so that editing the implicit size won't change the shared one.
+ //
+ // If this is a variable or a block, check it and all it contains, but if this
+ // is a member of an anonymous block, check the whole block, as the whole block
+ // will need to be copied up if it contains an implicitly-sized array.
+ if (symbol->getType().containsImplicitlySizedArray() || (symbol->getAsAnonMember() && symbol->getAsAnonMember()->getAnonContainer().getType().containsImplicitlySizedArray()))
+ makeEditable(symbol);
+ }
+
+ const TVariable* variable;
+ const TAnonMember* anon = symbol ? symbol->getAsAnonMember() : nullptr;
+ if (anon) {
+ // It was a member of an anonymous container.
+
+ // The "getNumExtensions()" mechanism above doesn't yet work for block members
+ blockMemberExtensionCheck(loc, nullptr, *string);
+
+ // Create a subtree for its dereference.
+ variable = anon->getAnonContainer().getAsVariable();
+ TIntermTyped* container = intermediate.addSymbol(*variable, loc);
+ TIntermTyped* constNode = intermediate.addConstantUnion(anon->getMemberNumber(), loc);
+ node = intermediate.addIndex(EOpIndexDirectStruct, container, constNode, loc);
+
+ node->setType(*(*variable->getType().getStruct())[anon->getMemberNumber()].type);
+ if (node->getType().hiddenMember())
+ error(loc, "member of nameless block was not redeclared", string->c_str(), "");
+ } else {
+ // Not a member of an anonymous container.
+
+ // The symbol table search was done in the lexical phase.
+ // See if it was a variable.
+ variable = symbol ? symbol->getAsVariable() : nullptr;
+ if (variable) {
+ if ((variable->getType().getBasicType() == EbtBlock ||
+ variable->getType().getBasicType() == EbtStruct) && variable->getType().getStruct() == nullptr) {
+ error(loc, "cannot be used (maybe an instance name is needed)", string->c_str(), "");
+ variable = nullptr;
+ }
+ } else {
+ if (symbol)
+ error(loc, "variable name expected", string->c_str(), "");
+ }
+
+ // Recovery, if it wasn't found or was not a variable.
+ if (! variable)
+ variable = new TVariable(string, TType(EbtVoid));
+
+ if (variable->getType().getQualifier().isFrontEndConstant())
+ node = intermediate.addConstantUnion(variable->getConstArray(), variable->getType(), loc);
+ else
+ node = intermediate.addSymbol(*variable, loc);
+ }
+
+ if (variable->getType().getQualifier().isIo())
+ intermediate.addIoAccessed(*string);
+
+ return node;
+}
+
+//
+// Handle seeing a base[index] dereference in the grammar.
+//
+TIntermTyped* TParseContext::handleBracketDereference(const TSourceLoc& loc, TIntermTyped* base, TIntermTyped* index)
+{
+ TIntermTyped* result = nullptr;
+
+ int indexValue = 0;
+ if (index->getQualifier().isFrontEndConstant()) {
+ indexValue = index->getAsConstantUnion()->getConstArray()[0].getIConst();
+ checkIndex(loc, base->getType(), indexValue);
+ }
+
+ variableCheck(base);
+ if (! base->isArray() && ! base->isMatrix() && ! base->isVector()) {
+ if (base->getAsSymbolNode())
+ error(loc, " left of '[' is not of type array, matrix, or vector ", base->getAsSymbolNode()->getName().c_str(), "");
+ else
+ error(loc, " left of '[' is not of type array, matrix, or vector ", "expression", "");
+ } else if (base->getType().getQualifier().isFrontEndConstant() && index->getQualifier().isFrontEndConstant())
+ return intermediate.foldDereference(base, indexValue, loc);
+ else {
+ // at least one of base and index is variable...
+
+ if (base->getAsSymbolNode() && isIoResizeArray(base->getType()))
+ handleIoResizeArrayAccess(loc, base);
+
+ if (index->getQualifier().isFrontEndConstant()) {
+ if (base->getType().isImplicitlySizedArray())
+ updateImplicitArraySize(loc, base, indexValue);
+ result = intermediate.addIndex(EOpIndexDirect, base, index, loc);
+ } else {
+ if (base->getType().isImplicitlySizedArray()) {
+ if (base->getAsSymbolNode() && isIoResizeArray(base->getType()))
+ error(loc, "", "[", "array must be sized by a redeclaration or layout qualifier before being indexed with a variable");
+ else
+ error(loc, "", "[", "array must be redeclared with a size before being indexed with a variable");
+ }
+ if (base->getBasicType() == EbtBlock) {
+ if (base->getQualifier().storage == EvqBuffer)
+ requireProfile(base->getLoc(), ~EEsProfile, "variable indexing buffer block array");
+ else if (base->getQualifier().storage == EvqUniform)
+ profileRequires(base->getLoc(), EEsProfile, 0, Num_AEP_gpu_shader5, AEP_gpu_shader5, "variable indexing uniform block array");
+ else {
+ // input/output blocks either don't exist or can be variable indexed
+ }
+ } else if (language == EShLangFragment && base->getQualifier().isPipeOutput())
+ requireProfile(base->getLoc(), ~EEsProfile, "variable indexing fragment shader ouput array");
+ else if (base->getBasicType() == EbtSampler && version >= 130) {
+ const char* explanation = "variable indexing sampler array";
+ requireProfile(base->getLoc(), EEsProfile | ECoreProfile | ECompatibilityProfile, explanation);
+ profileRequires(base->getLoc(), EEsProfile, 0, Num_AEP_gpu_shader5, AEP_gpu_shader5, explanation);
+ profileRequires(base->getLoc(), ECoreProfile | ECompatibilityProfile, 400, nullptr, explanation);
+ }
+
+ result = intermediate.addIndex(EOpIndexIndirect, base, index, loc);
+ }
+ }
+
+ if (result == nullptr) {
+ // Insert dummy error-recovery result
+ result = intermediate.addConstantUnion(0.0, EbtFloat, loc);
+ } else {
+ // Insert valid dereferenced result
+ TType newType(base->getType(), 0); // dereferenced type
+ if (base->getType().getQualifier().isConstant() && index->getQualifier().isConstant()) {
+ newType.getQualifier().storage = EvqConst;
+ // If base or index is a specialization constant, the result should also be a specialization constant.
+ if (base->getType().getQualifier().isSpecConstant() || index->getQualifier().isSpecConstant()) {
+ newType.getQualifier().makeSpecConstant();
+ }
+ } else {
+ newType.getQualifier().makePartialTemporary();
+ }
+ result->setType(newType);
+
+ if (anyIndexLimits)
+ handleIndexLimits(loc, base, index);
+ }
+
+ return result;
+}
+
+void TParseContext::checkIndex(const TSourceLoc& loc, const TType& type, int& index)
+{
+ if (index < 0) {
+ error(loc, "", "[", "index out of range '%d'", index);
+ index = 0;
+ } else if (type.isArray()) {
+ if (type.isExplicitlySizedArray() && index >= type.getOuterArraySize()) {
+ error(loc, "", "[", "array index out of range '%d'", index);
+ index = type.getOuterArraySize() - 1;
+ }
+ } else if (type.isVector()) {
+ if (index >= type.getVectorSize()) {
+ error(loc, "", "[", "vector index out of range '%d'", index);
+ index = type.getVectorSize() - 1;
+ }
+ } else if (type.isMatrix()) {
+ if (index >= type.getMatrixCols()) {
+ error(loc, "", "[", "matrix index out of range '%d'", index);
+ index = type.getMatrixCols() - 1;
+ }
+ }
+}
+
+// for ES 2.0 (version 100) limitations for almost all index operations except vertex-shader uniforms
+void TParseContext::handleIndexLimits(const TSourceLoc& /*loc*/, TIntermTyped* base, TIntermTyped* index)
+{
+ if ((! limits.generalSamplerIndexing && base->getBasicType() == EbtSampler) ||
+ (! limits.generalUniformIndexing && base->getQualifier().isUniformOrBuffer() && language != EShLangVertex) ||
+ (! limits.generalAttributeMatrixVectorIndexing && base->getQualifier().isPipeInput() && language == EShLangVertex && (base->getType().isMatrix() || base->getType().isVector())) ||
+ (! limits.generalConstantMatrixVectorIndexing && base->getAsConstantUnion()) ||
+ (! limits.generalVariableIndexing && ! base->getType().getQualifier().isUniformOrBuffer() &&
+ ! base->getType().getQualifier().isPipeInput() &&
+ ! base->getType().getQualifier().isPipeOutput() &&
+ ! base->getType().getQualifier().isConstant()) ||
+ (! limits.generalVaryingIndexing && (base->getType().getQualifier().isPipeInput() ||
+ base->getType().getQualifier().isPipeOutput()))) {
+ // it's too early to know what the inductive variables are, save it for post processing
+ needsIndexLimitationChecking.push_back(index);
+ }
+}
+
+// Make a shared symbol have a non-shared version that can be edited by the current
+// compile, such that editing its type will not change the shared version and will
+// effect all nodes sharing it.
+void TParseContext::makeEditable(TSymbol*& symbol)
+{
+ // copyUp() does a deep copy of the type.
+ symbol = symbolTable.copyUp(symbol);
+
+ // Also, see if it's tied to IO resizing
+ if (isIoResizeArray(symbol->getType()))
+ ioArraySymbolResizeList.push_back(symbol);
+
+ // Also, save it in the AST for linker use.
+ intermediate.addSymbolLinkageNode(linkage, *symbol);
+}
+
+// Return a writable version of the variable 'name'.
+//
+// Return nullptr if 'name' is not found. This should mean
+// something is seriously wrong (e.g., compiler asking self for
+// built-in that doesn't exist).
+TVariable* TParseContext::getEditableVariable(const char* name)
+{
+ bool builtIn;
+ TSymbol* symbol = symbolTable.find(name, &builtIn);
+
+ assert(symbol != nullptr);
+ if (symbol == nullptr)
+ return nullptr;
+
+ if (builtIn)
+ makeEditable(symbol);
+
+ return symbol->getAsVariable();
+}
+
+// Return true if this is a geometry shader input array or tessellation control output array.
+bool TParseContext::isIoResizeArray(const TType& type) const
+{
+ return type.isArray() &&
+ ((language == EShLangGeometry && type.getQualifier().storage == EvqVaryingIn) ||
+ (language == EShLangTessControl && type.getQualifier().storage == EvqVaryingOut && ! type.getQualifier().patch));
+}
+
+// If an array is not isIoResizeArray() but is an io array, make sure it has the right size
+void TParseContext::fixIoArraySize(const TSourceLoc& loc, TType& type)
+{
+ if (! type.isArray() || type.getQualifier().patch || symbolTable.atBuiltInLevel())
+ return;
+
+ assert(! isIoResizeArray(type));
+
+ if (type.getQualifier().storage != EvqVaryingIn || type.getQualifier().patch)
+ return;
+
+ if (language == EShLangTessControl || language == EShLangTessEvaluation) {
+ if (type.getOuterArraySize() != resources.maxPatchVertices) {
+ if (type.isExplicitlySizedArray())
+ error(loc, "tessellation input array size must be gl_MaxPatchVertices or implicitly sized", "[]", "");
+ type.changeOuterArraySize(resources.maxPatchVertices);
+ }
+ }
+}
+
+// Issue any errors if the non-array object is missing arrayness WRT
+// shader I/O that has array requirements.
+// All arrayness checking is handled in array paths, this is for
+void TParseContext::ioArrayCheck(const TSourceLoc& loc, const TType& type, const TString& identifier)
+{
+ if (! type.isArray() && ! symbolTable.atBuiltInLevel()) {
+ if (type.getQualifier().isArrayedIo(language))
+ error(loc, "type must be an array:", type.getStorageQualifierString(), identifier.c_str());
+ }
+}
+
+// Handle a dereference of a geometry shader input array or tessellation control output array.
+// See ioArraySymbolResizeList comment in ParseHelper.h.
+//
+void TParseContext::handleIoResizeArrayAccess(const TSourceLoc& /*loc*/, TIntermTyped* base)
+{
+ TIntermSymbol* symbolNode = base->getAsSymbolNode();
+ assert(symbolNode);
+ if (! symbolNode)
+ return;
+
+ // fix array size, if it can be fixed and needs to be fixed (will allow variable indexing)
+ if (symbolNode->getType().isImplicitlySizedArray()) {
+ int newSize = getIoArrayImplicitSize();
+ if (newSize > 0)
+ symbolNode->getWritableType().changeOuterArraySize(newSize);
+ }
+}
+
+// If there has been an input primitive declaration (geometry shader) or an output
+// number of vertices declaration(tessellation shader), make sure all input array types
+// match it in size. Types come either from nodes in the AST or symbols in the
+// symbol table.
+//
+// Types without an array size will be given one.
+// Types already having a size that is wrong will get an error.
+//
+void TParseContext::checkIoArraysConsistency(const TSourceLoc& loc, bool tailOnly)
+{
+ int requiredSize = getIoArrayImplicitSize();
+ if (requiredSize == 0)
+ return;
+
+ const char* feature;
+ if (language == EShLangGeometry)
+ feature = TQualifier::getGeometryString(intermediate.getInputPrimitive());
+ else if (language == EShLangTessControl)
+ feature = "vertices";
+ else
+ feature = "unknown";
+
+ if (tailOnly) {
+ checkIoArrayConsistency(loc, requiredSize, feature, ioArraySymbolResizeList.back()->getWritableType(), ioArraySymbolResizeList.back()->getName());
+ return;
+ }
+
+ for (size_t i = 0; i < ioArraySymbolResizeList.size(); ++i)
+ checkIoArrayConsistency(loc, requiredSize, feature, ioArraySymbolResizeList[i]->getWritableType(), ioArraySymbolResizeList[i]->getName());
+}
+
+int TParseContext::getIoArrayImplicitSize() const
+{
+ if (language == EShLangGeometry)
+ return TQualifier::mapGeometryToSize(intermediate.getInputPrimitive());
+ else if (language == EShLangTessControl)
+ return intermediate.getVertices() != TQualifier::layoutNotSet ? intermediate.getVertices() : 0;
+ else
+ return 0;
+}
+
+void TParseContext::checkIoArrayConsistency(const TSourceLoc& loc, int requiredSize, const char* feature, TType& type, const TString& name)
+{
+ if (type.isImplicitlySizedArray())
+ type.changeOuterArraySize(requiredSize);
+ else if (type.getOuterArraySize() != requiredSize) {
+ if (language == EShLangGeometry)
+ error(loc, "inconsistent input primitive for array size of", feature, name.c_str());
+ else if (language == EShLangTessControl)
+ error(loc, "inconsistent output number of vertices for array size of", feature, name.c_str());
+ else
+ assert(0);
+ }
+}
+
+// Handle seeing a binary node with a math operation.
+TIntermTyped* TParseContext::handleBinaryMath(const TSourceLoc& loc, const char* str, TOperator op, TIntermTyped* left, TIntermTyped* right)
+{
+ rValueErrorCheck(loc, str, left->getAsTyped());
+ rValueErrorCheck(loc, str, right->getAsTyped());
+
+ TIntermTyped* result = intermediate.addBinaryMath(op, left, right, loc);
+ if (! result)
+ binaryOpError(loc, str, left->getCompleteString(), right->getCompleteString());
+
+ return result;
+}
+
+// Handle seeing a unary node with a math operation.
+TIntermTyped* TParseContext::handleUnaryMath(const TSourceLoc& loc, const char* str, TOperator op, TIntermTyped* childNode)
+{
+ rValueErrorCheck(loc, str, childNode);
+
+ TIntermTyped* result = intermediate.addUnaryMath(op, childNode, loc);
+
+ if (result)
+ return result;
+ else
+ unaryOpError(loc, str, childNode->getCompleteString());
+
+ return childNode;
+}
+
+//
+// Handle seeing a base.field dereference in the grammar.
+//
+TIntermTyped* TParseContext::handleDotDereference(const TSourceLoc& loc, TIntermTyped* base, const TString& field)
+{
+ variableCheck(base);
+
+ //
+ // .length() can't be resolved until we later see the function-calling syntax.
+ // Save away the name in the AST for now. Processing is completed in
+ // handleLengthMethod().
+ //
+ if (field == "length") {
+ if (base->isArray()) {
+ profileRequires(loc, ENoProfile, 120, E_GL_3DL_array_objects, ".length");
+ profileRequires(loc, EEsProfile, 300, nullptr, ".length");
+ } else if (base->isVector() || base->isMatrix()) {
+ const char* feature = ".length() on vectors and matrices";
+ requireProfile(loc, ~EEsProfile, feature);
+ profileRequires(loc, ~EEsProfile, 420, E_GL_ARB_shading_language_420pack, feature);
+ } else {
+ error(loc, "does not operate on this type:", field.c_str(), base->getType().getCompleteString().c_str());
+
+ return base;
+ }
+
+ return intermediate.addMethod(base, TType(EbtInt), &field, loc);
+ }
+
+ // It's not .length() if we get to here.
+
+ if (base->isArray()) {
+ error(loc, "cannot apply to an array:", ".", field.c_str());
+
+ return base;
+ }
+
+ // It's neither an array nor .length() if we get here,
+ // leaving swizzles and struct/block dereferences.
+
+ TIntermTyped* result = base;
+ if (base->isVector() || base->isScalar()) {
+ if (base->isScalar()) {
+ const char* dotFeature = "scalar swizzle";
+ requireProfile(loc, ~EEsProfile, dotFeature);
+ profileRequires(loc, ~EEsProfile, 420, E_GL_ARB_shading_language_420pack, dotFeature);
+ }
+
+ TVectorFields fields;
+ if (! parseVectorFields(loc, field, base->getVectorSize(), fields)) {
+ fields.num = 1;
+ fields.offsets[0] = 0;
+ }
+
+ if (base->isScalar()) {
+ if (fields.num == 1)
+ return result;
+ else {
+ TType type(base->getBasicType(), EvqTemporary, fields.num);
+ // Swizzle operations propagate specialization-constantness
+ if (base->getQualifier().isSpecConstant())
+ type.getQualifier().makeSpecConstant();
+ return addConstructor(loc, base, type, mapTypeToConstructorOp(type));
+ }
+ }
+
+ if (base->getType().getQualifier().isFrontEndConstant())
+ result = intermediate.foldSwizzle(base, fields, loc);
+ else {
+ if (fields.num == 1) {
+ TIntermTyped* index = intermediate.addConstantUnion(fields.offsets[0], loc);
+ result = intermediate.addIndex(EOpIndexDirect, base, index, loc);
+ result->setType(TType(base->getBasicType(), EvqTemporary, base->getType().getQualifier().precision));
+ } else {
+ TString vectorString = field;
+ TIntermTyped* index = intermediate.addSwizzle(fields, loc);
+ result = intermediate.addIndex(EOpVectorSwizzle, base, index, loc);
+ result->setType(TType(base->getBasicType(), EvqTemporary, base->getType().getQualifier().precision, (int) vectorString.size()));
+ }
+ // Swizzle operations propagate specialization-constantness
+ if (base->getType().getQualifier().isSpecConstant())
+ result->getWritableType().getQualifier().makeSpecConstant();
+ }
+ } else if (base->getBasicType() == EbtStruct || base->getBasicType() == EbtBlock) {
+ const TTypeList* fields = base->getType().getStruct();
+ bool fieldFound = false;
+ int member;
+ for (member = 0; member < (int)fields->size(); ++member) {
+ if ((*fields)[member].type->getFieldName() == field) {
+ fieldFound = true;
+ break;
+ }
+ }
+ if (fieldFound) {
+ if (base->getType().getQualifier().isFrontEndConstant())
+ result = intermediate.foldDereference(base, member, loc);
+ else {
+ blockMemberExtensionCheck(loc, base, field);
+ TIntermTyped* index = intermediate.addConstantUnion(member, loc);
+ result = intermediate.addIndex(EOpIndexDirectStruct, base, index, loc);
+ result->setType(*(*fields)[member].type);
+ }
+ } else
+ error(loc, "no such field in structure", field.c_str(), "");
+ } else
+ error(loc, "does not apply to this type:", field.c_str(), base->getType().getCompleteString().c_str());
+
+ // Propagate noContraction up the dereference chain
+ if (base->getQualifier().noContraction)
+ result->getWritableType().getQualifier().noContraction = true;
+
+ return result;
+}
+
+void TParseContext::blockMemberExtensionCheck(const TSourceLoc& loc, const TIntermTyped* /*base*/, const TString& field)
+{
+ if (profile == EEsProfile && field == "gl_PointSize") {
+ if (language == EShLangGeometry)
+ requireExtensions(loc, Num_AEP_geometry_point_size, AEP_geometry_point_size, "gl_PointSize");
+ else if (language == EShLangTessControl || language == EShLangTessEvaluation)
+ requireExtensions(loc, Num_AEP_tessellation_point_size, AEP_tessellation_point_size, "gl_PointSize");
+ }
+}
+
+//
+// Handle seeing a function declarator in the grammar. This is the precursor
+// to recognizing a function prototype or function definition.
+//
+TFunction* TParseContext::handleFunctionDeclarator(const TSourceLoc& loc, TFunction& function, bool prototype)
+{
+ // ES can't declare prototypes inside functions
+ if (! symbolTable.atGlobalLevel())
+ requireProfile(loc, ~EEsProfile, "local function declaration");
+
+ //
+ // Multiple declarations of the same function name are allowed.
+ //
+ // If this is a definition, the definition production code will check for redefinitions
+ // (we don't know at this point if it's a definition or not).
+ //
+ // Redeclarations (full signature match) are allowed. But, return types and parameter qualifiers must also match.
+ // - except ES 100, which only allows a single prototype
+ //
+ // ES 100 does not allow redefining, but does allow overloading of built-in functions.
+ // ES 300 does not allow redefining or overloading of built-in functions.
+ //
+ bool builtIn;
+ TSymbol* symbol = symbolTable.find(function.getMangledName(), &builtIn);
+ if (symbol && symbol->getAsFunction() && builtIn)
+ requireProfile(loc, ~EEsProfile, "redefinition of built-in function");
+ const TFunction* prevDec = symbol ? symbol->getAsFunction() : 0;
+ if (prevDec) {
+ if (prevDec->isPrototyped() && prototype)
+ profileRequires(loc, EEsProfile, 300, nullptr, "multiple prototypes for same function");
+ if (prevDec->getType() != function.getType())
+ error(loc, "overloaded functions must have the same return type", function.getType().getBasicTypeString().c_str(), "");
+ for (int i = 0; i < prevDec->getParamCount(); ++i) {
+ if ((*prevDec)[i].type->getQualifier().storage != function[i].type->getQualifier().storage)
+ error(loc, "overloaded functions must have the same parameter storage qualifiers for argument", function[i].type->getStorageQualifierString(), "%d", i+1);
+
+ if ((*prevDec)[i].type->getQualifier().precision != function[i].type->getQualifier().precision)
+ error(loc, "overloaded functions must have the same parameter precision qualifiers for argument", function[i].type->getPrecisionQualifierString(), "%d", i+1);
+ }
+ }
+
+ arrayObjectCheck(loc, function.getType(), "array in function return type");
+
+ if (prototype) {
+ // All built-in functions are defined, even though they don't have a body.
+ // Count their prototype as a definition instead.
+ if (symbolTable.atBuiltInLevel())
+ function.setDefined();
+ else {
+ if (prevDec && ! builtIn)
+ symbol->getAsFunction()->setPrototyped(); // need a writable one, but like having prevDec as a const
+ function.setPrototyped();
+ }
+ }
+
+ // This insert won't actually insert it if it's a duplicate signature, but it will still check for
+ // other forms of name collisions.
+ if (! symbolTable.insert(function))
+ error(loc, "function name is redeclaration of existing name", function.getName().c_str(), "");
+
+ //
+ // If this is a redeclaration, it could also be a definition,
+ // in which case, we need to use the parameter names from this one, and not the one that's
+ // being redeclared. So, pass back this declaration, not the one in the symbol table.
+ //
+ return &function;
+}
+
+//
+// Handle seeing the function prototype in front of a function definition in the grammar.
+// The body is handled after this function returns.
+//
+TIntermAggregate* TParseContext::handleFunctionDefinition(const TSourceLoc& loc, TFunction& function)
+{
+ currentCaller = function.getMangledName();
+ TSymbol* symbol = symbolTable.find(function.getMangledName());
+ TFunction* prevDec = symbol ? symbol->getAsFunction() : nullptr;
+
+ if (! prevDec)
+ error(loc, "can't find function", function.getName().c_str(), "");
+ // Note: 'prevDec' could be 'function' if this is the first time we've seen function
+ // as it would have just been put in the symbol table. Otherwise, we're looking up
+ // an earlier occurance.
+
+ if (prevDec && prevDec->isDefined()) {
+ // Then this function already has a body.
+ error(loc, "function already has a body", function.getName().c_str(), "");
+ }
+ if (prevDec && ! prevDec->isDefined()) {
+ prevDec->setDefined();
+
+ // Remember the return type for later checking for RETURN statements.
+ currentFunctionType = &(prevDec->getType());
+ } else
+ currentFunctionType = new TType(EbtVoid);
+ functionReturnsValue = false;
+
+ //
+ // Raise error message if main function takes any parameters or returns anything other than void
+ //
+ if (function.getName() == intermediate.getEntryPoint().c_str()) {
+ if (function.getParamCount() > 0)
+ error(loc, "function cannot take any parameter(s)", function.getName().c_str(), "");
+ if (function.getType().getBasicType() != EbtVoid)
+ error(loc, "", function.getType().getBasicTypeString().c_str(), "main function cannot return a value");
+ intermediate.addMainCount();
+ inMain = true;
+ } else
+ inMain = false;
+
+ //
+ // New symbol table scope for body of function plus its arguments
+ //
+ symbolTable.push();
+
+ //
+ // Insert parameters into the symbol table.
+ // If the parameter has no name, it's not an error, just don't insert it
+ // (could be used for unused args).
+ //
+ // Also, accumulate the list of parameters into the HIL, so lower level code
+ // knows where to find parameters.
+ //
+ TIntermAggregate* paramNodes = new TIntermAggregate;
+ for (int i = 0; i < function.getParamCount(); i++) {
+ TParameter& param = function[i];
+ if (param.name != nullptr) {
+ TVariable *variable = new TVariable(param.name, *param.type);
+
+ // Insert the parameters with name in the symbol table.
+ if (! symbolTable.insert(*variable))
+ error(loc, "redefinition", variable->getName().c_str(), "");
+ else {
+ // Transfer ownership of name pointer to symbol table.
+ param.name = nullptr;
+
+ // Add the parameter to the HIL
+ paramNodes = intermediate.growAggregate(paramNodes,
+ intermediate.addSymbol(*variable, loc),
+ loc);
+ }
+ } else
+ paramNodes = intermediate.growAggregate(paramNodes, intermediate.addSymbol(*param.type, loc), loc);
+ }
+ intermediate.setAggregateOperator(paramNodes, EOpParameters, TType(EbtVoid), loc);
+ loopNestingLevel = 0;
+ statementNestingLevel = 0;
+ controlFlowNestingLevel = 0;
+ postMainReturn = false;
+
+ return paramNodes;
+}
+
+//
+// Handle seeing function call syntax in the grammar, which could be any of
+// - .length() method
+// - constructor
+// - a call to a built-in function mapped to an operator
+// - a call to a built-in function that will remain a function call (e.g., texturing)
+// - user function
+// - subroutine call (not implemented yet)
+//
+TIntermTyped* TParseContext::handleFunctionCall(const TSourceLoc& loc, TFunction* function, TIntermNode* arguments)
+{
+ TIntermTyped* result = nullptr;
+
+ TOperator op = function->getBuiltInOp();
+ if (op == EOpArrayLength)
+ result = handleLengthMethod(loc, function, arguments);
+ else if (op != EOpNull) {
+ //
+ // Then this should be a constructor.
+ // Don't go through the symbol table for constructors.
+ // Their parameters will be verified algorithmically.
+ //
+ TType type(EbtVoid); // use this to get the type back
+ if (! constructorError(loc, arguments, *function, op, type)) {
+ //
+ // It's a constructor, of type 'type'.
+ //
+ result = addConstructor(loc, arguments, type, op);
+ if (result == nullptr)
+ error(loc, "cannot construct with these arguments", type.getCompleteString().c_str(), "");
+ }
+ } else {
+ //
+ // Find it in the symbol table.
+ //
+ const TFunction* fnCandidate;
+ bool builtIn;
+ fnCandidate = findFunction(loc, *function, builtIn);
+ if (fnCandidate) {
+ // This is a declared function that might map to
+ // - a built-in operator,
+ // - a built-in function not mapped to an operator, or
+ // - a user function.
+
+ // Error check for a function requiring specific extensions present.
+ if (builtIn && fnCandidate->getNumExtensions())
+ requireExtensions(loc, fnCandidate->getNumExtensions(), fnCandidate->getExtensions(), fnCandidate->getName().c_str());
+
+ if (arguments) {
+ // Make sure qualifications work for these arguments.
+ TIntermAggregate* aggregate = arguments->getAsAggregate();
+ for (int i = 0; i < fnCandidate->getParamCount(); ++i) {
+ // At this early point there is a slight ambiguity between whether an aggregate 'arguments'
+ // is the single argument itself or its children are the arguments. Only one argument
+ // means take 'arguments' itself as the one argument.
+ TIntermNode* arg = fnCandidate->getParamCount() == 1 ? arguments : (aggregate ? aggregate->getSequence()[i] : arguments);
+ TQualifier& formalQualifier = (*fnCandidate)[i].type->getQualifier();
+ if (formalQualifier.storage == EvqOut || formalQualifier.storage == EvqInOut) {
+ if (lValueErrorCheck(arguments->getLoc(), "assign", arg->getAsTyped()))
+ error(arguments->getLoc(), "Non-L-value cannot be passed for 'out' or 'inout' parameters.", "out", "");
+ }
+ TQualifier& argQualifier = arg->getAsTyped()->getQualifier();
+ if (argQualifier.isMemory()) {
+ const char* message = "argument cannot drop memory qualifier when passed to formal parameter";
+ if (argQualifier.volatil && ! formalQualifier.volatil)
+ error(arguments->getLoc(), message, "volatile", "");
+ if (argQualifier.coherent && ! formalQualifier.coherent)
+ error(arguments->getLoc(), message, "coherent", "");
+ if (argQualifier.readonly && ! formalQualifier.readonly)
+ error(arguments->getLoc(), message, "readonly", "");
+ if (argQualifier.writeonly && ! formalQualifier.writeonly)
+ error(arguments->getLoc(), message, "writeonly", "");
+ }
+ // TODO 4.5 functionality: A shader will fail to compile
+ // if the value passed to the memargument of an atomic memory function does not correspond to a buffer or
+ // shared variable. It is acceptable to pass an element of an array or a single component of a vector to the
+ // memargument of an atomic memory function, as long as the underlying array or vector is a buffer or
+ // shared variable.
+ }
+
+ // Convert 'in' arguments
+ addInputArgumentConversions(*fnCandidate, arguments); // arguments may be modified if it's just a single argument node
+ }
+
+ op = fnCandidate->getBuiltInOp();
+ if (builtIn && op != EOpNull) {
+ // A function call mapped to a built-in operation.
+ checkLocation(loc, op);
+ result = intermediate.addBuiltInFunctionCall(loc, op, fnCandidate->getParamCount() == 1, arguments, fnCandidate->getType());
+ if (result == nullptr) {
+ error(arguments->getLoc(), " wrong operand type", "Internal Error",
+ "built in unary operator function. Type: %s",
+ static_cast<TIntermTyped*>(arguments)->getCompleteString().c_str());
+ } else if (result->getAsOperator()) {
+ builtInOpCheck(loc, *fnCandidate, *result->getAsOperator());
+ }
+ } else {
+ // This is a function call not mapped to built-in operator.
+ // It could still be a built-in function, but only if PureOperatorBuiltins == false.
+ result = intermediate.setAggregateOperator(arguments, EOpFunctionCall, fnCandidate->getType(), loc);
+ TIntermAggregate* call = result->getAsAggregate();
+ call->setName(fnCandidate->getMangledName());
+
+ // this is how we know whether the given function is a built-in function or a user-defined function
+ // if builtIn == false, it's a userDefined -> could be an overloaded built-in function also
+ // if builtIn == true, it's definitely a built-in function with EOpNull
+ if (! builtIn) {
+ call->setUserDefined();
+ if (symbolTable.atGlobalLevel())
+ error(loc, "can't call user function from global scope", fnCandidate->getName().c_str(), "");
+ else
+ intermediate.addToCallGraph(infoSink, currentCaller, fnCandidate->getMangledName());
+ }
+
+ if (builtIn)
+ nonOpBuiltInCheck(loc, *fnCandidate, *call);
+ }
+
+ // Convert 'out' arguments. If it was a constant folded built-in, it won't be an aggregate anymore.
+ // Built-ins with a single argument aren't called with an aggregate, but they also don't have an output.
+ // Also, build the qualifier list for user function calls, which are always called with an aggregate.
+ if (result->getAsAggregate()) {
+ TQualifierList& qualifierList = result->getAsAggregate()->getQualifierList();
+ for (int i = 0; i < fnCandidate->getParamCount(); ++i) {
+ TStorageQualifier qual = (*fnCandidate)[i].type->getQualifier().storage;
+ qualifierList.push_back(qual);
+ }
+ result = addOutputArgumentConversions(*fnCandidate, *result->getAsAggregate());
+ }
+ }
+ }
+
+ // generic error recovery
+ // TODO: simplification: localize all the error recoveries that look like this, and taking type into account to reduce cascades
+ if (result == nullptr)
+ result = intermediate.addConstantUnion(0.0, EbtFloat, loc);
+
+ return result;
+}
+
+// See if the operation is being done in an illegal location.
+void TParseContext::checkLocation(const TSourceLoc& loc, TOperator op)
+{
+ switch (op) {
+ case EOpBarrier:
+ if (language == EShLangTessControl) {
+ if (controlFlowNestingLevel > 0)
+ error(loc, "tessellation control barrier() cannot be placed within flow control", "", "");
+ if (! inMain)
+ error(loc, "tessellation control barrier() must be in main()", "", "");
+ else if (postMainReturn)
+ error(loc, "tessellation control barrier() cannot be placed after a return from main()", "", "");
+ }
+ break;
+ default:
+ break;
+ }
+}
+
+// Finish processing object.length(). This started earlier in handleDotDereference(), where
+// the ".length" part was recognized and semantically checked, and finished here where the
+// function syntax "()" is recognized.
+//
+// Return resulting tree node.
+TIntermTyped* TParseContext::handleLengthMethod(const TSourceLoc& loc, TFunction* function, TIntermNode* intermNode)
+{
+ int length = 0;
+
+ if (function->getParamCount() > 0)
+ error(loc, "method does not accept any arguments", function->getName().c_str(), "");
+ else {
+ const TType& type = intermNode->getAsTyped()->getType();
+ if (type.isArray()) {
+ if (type.isRuntimeSizedArray()) {
+ // Create a unary op and let the back end handle it
+ return intermediate.addBuiltInFunctionCall(loc, EOpArrayLength, true, intermNode, TType(EbtInt));
+ } else if (type.isImplicitlySizedArray()) {
+ if (intermNode->getAsSymbolNode() && isIoResizeArray(type)) {
+ // We could be between a layout declaration that gives a built-in io array implicit size and
+ // a user redeclaration of that array, meaning we have to substitute its implicit size here
+ // without actually redeclaring the array. (It is an error to use a member before the
+ // redeclaration, but not an error to use the array name itself.)
+ const TString& name = intermNode->getAsSymbolNode()->getName();
+ if (name == "gl_in" || name == "gl_out")
+ length = getIoArrayImplicitSize();
+ }
+ if (length == 0) {
+ if (intermNode->getAsSymbolNode() && isIoResizeArray(type))
+ error(loc, "", function->getName().c_str(), "array must first be sized by a redeclaration or layout qualifier");
+ else
+ error(loc, "", function->getName().c_str(), "array must be declared with a size before using this method");
+ }
+ } else if (type.getOuterArrayNode()) {
+ // If the array's outer size is specified by an intermediate node, it means the array's length
+ // was specified by a specialization constant. In such a case, we should return the node of the
+ // specialization constants to represent the length.
+ return type.getOuterArrayNode();
+ } else
+ length = type.getOuterArraySize();
+ } else if (type.isMatrix())
+ length = type.getMatrixCols();
+ else if (type.isVector())
+ length = type.getVectorSize();
+ else {
+ // we should not get here, because earlier semantic checking should have prevented this path
+ error(loc, ".length()", "unexpected use of .length()", "");
+ }
+ }
+
+ if (length == 0)
+ length = 1;
+
+ return intermediate.addConstantUnion(length, loc);
+}
+
+//
+// Add any needed implicit conversions for function-call arguments to input parameters.
+//
+void TParseContext::addInputArgumentConversions(const TFunction& function, TIntermNode*& arguments) const
+{
+ TIntermAggregate* aggregate = arguments->getAsAggregate();
+
+ // Process each argument's conversion
+ for (int i = 0; i < function.getParamCount(); ++i) {
+ // At this early point there is a slight ambiguity between whether an aggregate 'arguments'
+ // is the single argument itself or its children are the arguments. Only one argument
+ // means take 'arguments' itself as the one argument.
+ TIntermTyped* arg = function.getParamCount() == 1 ? arguments->getAsTyped() : (aggregate ? aggregate->getSequence()[i]->getAsTyped() : arguments->getAsTyped());
+ if (*function[i].type != arg->getType()) {
+ if (function[i].type->getQualifier().isParamInput()) {
+ // In-qualified arguments just need an extra node added above the argument to
+ // convert to the correct type.
+ arg = intermediate.addConversion(EOpFunctionCall, *function[i].type, arg);
+ if (arg) {
+ if (function.getParamCount() == 1)
+ arguments = arg;
+ else {
+ if (aggregate)
+ aggregate->getSequence()[i] = arg;
+ else
+ arguments = arg;
+ }
+ }
+ }
+ }
+ }
+}
+
+//
+// Add any needed implicit output conversions for function-call arguments. This
+// can require a new tree topology, complicated further by whether the function
+// has a return value.
+//
+// Returns a node of a subtree that evaluates to the return value of the function.
+//
+TIntermTyped* TParseContext::addOutputArgumentConversions(const TFunction& function, TIntermAggregate& intermNode) const
+{
+ TIntermSequence& arguments = intermNode.getSequence();
+
+ // Will there be any output conversions?
+ bool outputConversions = false;
+ for (int i = 0; i < function.getParamCount(); ++i) {
+ if (*function[i].type != arguments[i]->getAsTyped()->getType() && function[i].type->getQualifier().storage == EvqOut) {
+ outputConversions = true;
+ break;
+ }
+ }
+
+ if (! outputConversions)
+ return &intermNode;
+
+ // Setup for the new tree, if needed:
+ //
+ // Output conversions need a different tree topology.
+ // Out-qualified arguments need a temporary of the correct type, with the call
+ // followed by an assignment of the temporary to the original argument:
+ // void: function(arg, ...) -> ( function(tempArg, ...), arg = tempArg, ...)
+ // ret = function(arg, ...) -> ret = (tempRet = function(tempArg, ...), arg = tempArg, ..., tempRet)
+ // Where the "tempArg" type needs no conversion as an argument, but will convert on assignment.
+ TIntermTyped* conversionTree = nullptr;
+ TVariable* tempRet = nullptr;
+ if (intermNode.getBasicType() != EbtVoid) {
+ // do the "tempRet = function(...), " bit from above
+ tempRet = makeInternalVariable("tempReturn", intermNode.getType());
+ TIntermSymbol* tempRetNode = intermediate.addSymbol(*tempRet, intermNode.getLoc());
+ conversionTree = intermediate.addAssign(EOpAssign, tempRetNode, &intermNode, intermNode.getLoc());
+ } else
+ conversionTree = &intermNode;
+
+ conversionTree = intermediate.makeAggregate(conversionTree);
+
+ // Process each argument's conversion
+ for (int i = 0; i < function.getParamCount(); ++i) {
+ if (*function[i].type != arguments[i]->getAsTyped()->getType()) {
+ if (function[i].type->getQualifier().isParamOutput()) {
+ // Out-qualified arguments need to use the topology set up above.
+ // do the " ...(tempArg, ...), arg = tempArg" bit from above
+ TVariable* tempArg = makeInternalVariable("tempArg", *function[i].type);
+ tempArg->getWritableType().getQualifier().makeTemporary();
+ TIntermSymbol* tempArgNode = intermediate.addSymbol(*tempArg, intermNode.getLoc());
+ TIntermTyped* tempAssign = intermediate.addAssign(EOpAssign, arguments[i]->getAsTyped(), tempArgNode, arguments[i]->getLoc());
+ conversionTree = intermediate.growAggregate(conversionTree, tempAssign, arguments[i]->getLoc());
+ // replace the argument with another node for the same tempArg variable
+ arguments[i] = intermediate.addSymbol(*tempArg, intermNode.getLoc());
+ }
+ }
+ }
+
+ // Finalize the tree topology (see bigger comment above).
+ if (tempRet) {
+ // do the "..., tempRet" bit from above
+ TIntermSymbol* tempRetNode = intermediate.addSymbol(*tempRet, intermNode.getLoc());
+ conversionTree = intermediate.growAggregate(conversionTree, tempRetNode, intermNode.getLoc());
+ }
+ conversionTree = intermediate.setAggregateOperator(conversionTree, EOpComma, intermNode.getType(), intermNode.getLoc());
+
+ return conversionTree;
+}
+
+//
+// Do additional checking of built-in function calls that is not caught
+// by normal semantic checks on argument type, extension tagging, etc.
+//
+// Assumes there has been a semantically correct match to a built-in function prototype.
+//
+void TParseContext::builtInOpCheck(const TSourceLoc& loc, const TFunction& fnCandidate, TIntermOperator& callNode)
+{
+ // Set up convenience accessors to the argument(s). There is almost always
+ // multiple arguments for the cases below, but when there might be one,
+ // check the unaryArg first.
+ const TIntermSequence* argp = nullptr; // confusing to use [] syntax on a pointer, so this is to help get a reference
+ const TIntermTyped* unaryArg = nullptr;
+ const TIntermTyped* arg0 = nullptr;
+ if (callNode.getAsAggregate()) {
+ argp = &callNode.getAsAggregate()->getSequence();
+ if (argp->size() > 0)
+ arg0 = (*argp)[0]->getAsTyped();
+ } else {
+ assert(callNode.getAsUnaryNode());
+ unaryArg = callNode.getAsUnaryNode()->getOperand();
+ arg0 = unaryArg;
+ }
+ const TIntermSequence& aggArgs = *argp; // only valid when unaryArg is nullptr
+
+ // built-in texturing functions get their return value precision from the precision of the sampler
+ if (fnCandidate.getType().getQualifier().precision == EpqNone &&
+ fnCandidate.getParamCount() > 0 && fnCandidate[0].type->getBasicType() == EbtSampler)
+ callNode.getQualifier().precision = arg0->getQualifier().precision;
+
+ switch (callNode.getOp()) {
+ case EOpTextureGather:
+ case EOpTextureGatherOffset:
+ case EOpTextureGatherOffsets:
+ {
+ // Figure out which variants are allowed by what extensions,
+ // and what arguments must be constant for which situations.
+
+ TString featureString = fnCandidate.getName() + "(...)";
+ const char* feature = featureString.c_str();
+ profileRequires(loc, EEsProfile, 310, nullptr, feature);
+ int compArg = -1; // track which argument, if any, is the constant component argument
+ switch (callNode.getOp()) {
+ case EOpTextureGather:
+ // More than two arguments needs gpu_shader5, and rectangular or shadow needs gpu_shader5,
+ // otherwise, need GL_ARB_texture_gather.
+ if (fnCandidate.getParamCount() > 2 || fnCandidate[0].type->getSampler().dim == EsdRect || fnCandidate[0].type->getSampler().shadow) {
+ profileRequires(loc, ~EEsProfile, 400, E_GL_ARB_gpu_shader5, feature);
+ if (! fnCandidate[0].type->getSampler().shadow)
+ compArg = 2;
+ } else
+ profileRequires(loc, ~EEsProfile, 400, E_GL_ARB_texture_gather, feature);
+ break;
+ case EOpTextureGatherOffset:
+ // GL_ARB_texture_gather is good enough for 2D non-shadow textures with no component argument
+ if (fnCandidate[0].type->getSampler().dim == Esd2D && ! fnCandidate[0].type->getSampler().shadow && fnCandidate.getParamCount() == 3)
+ profileRequires(loc, ~EEsProfile, 400, E_GL_ARB_texture_gather, feature);
+ else
+ profileRequires(loc, ~EEsProfile, 400, E_GL_ARB_gpu_shader5, feature);
+ if (! aggArgs[fnCandidate[0].type->getSampler().shadow ? 3 : 2]->getAsConstantUnion())
+ profileRequires(loc, EEsProfile, 0, Num_AEP_gpu_shader5, AEP_gpu_shader5, "non-constant offset argument");
+ if (! fnCandidate[0].type->getSampler().shadow)
+ compArg = 3;
+ break;
+ case EOpTextureGatherOffsets:
+ profileRequires(loc, ~EEsProfile, 400, E_GL_ARB_gpu_shader5, feature);
+ if (! fnCandidate[0].type->getSampler().shadow)
+ compArg = 3;
+ // check for constant offsets
+ if (! aggArgs[fnCandidate[0].type->getSampler().shadow ? 3 : 2]->getAsConstantUnion())
+ error(loc, "must be a compile-time constant:", feature, "offsets argument");
+ break;
+ default:
+ break;
+ }
+
+ if (compArg > 0 && compArg < fnCandidate.getParamCount()) {
+ if (aggArgs[compArg]->getAsConstantUnion()) {
+ int value = aggArgs[compArg]->getAsConstantUnion()->getConstArray()[0].getIConst();
+ if (value < 0 || value > 3)
+ error(loc, "must be 0, 1, 2, or 3:", feature, "component argument");
+ } else
+ error(loc, "must be a compile-time constant:", feature, "component argument");
+ }
+
+ break;
+ }
+
+ case EOpTextureOffset:
+ case EOpTextureFetchOffset:
+ case EOpTextureProjOffset:
+ case EOpTextureLodOffset:
+ case EOpTextureProjLodOffset:
+ case EOpTextureGradOffset:
+ case EOpTextureProjGradOffset:
+ {
+ // Handle texture-offset limits checking
+ // Pick which argument has to hold constant offsets
+ int arg = -1;
+ switch (callNode.getOp()) {
+ case EOpTextureOffset: arg = 2; break;
+ case EOpTextureFetchOffset: arg = (arg0->getType().getSampler().dim != EsdRect) ? 3 : 2; break;
+ case EOpTextureProjOffset: arg = 2; break;
+ case EOpTextureLodOffset: arg = 3; break;
+ case EOpTextureProjLodOffset: arg = 3; break;
+ case EOpTextureGradOffset: arg = 4; break;
+ case EOpTextureProjGradOffset: arg = 4; break;
+ default:
+ assert(0);
+ break;
+ }
+
+ if (arg > 0) {
+ if (! aggArgs[arg]->getAsConstantUnion())
+ error(loc, "argument must be compile-time constant", "texel offset", "");
+ else {
+ const TType& type = aggArgs[arg]->getAsTyped()->getType();
+ for (int c = 0; c < type.getVectorSize(); ++c) {
+ int offset = aggArgs[arg]->getAsConstantUnion()->getConstArray()[c].getIConst();
+ if (offset > resources.maxProgramTexelOffset || offset < resources.minProgramTexelOffset)
+ error(loc, "value is out of range:", "texel offset", "[gl_MinProgramTexelOffset, gl_MaxProgramTexelOffset]");
+ }
+ }
+ }
+
+ break;
+ }
+
+ case EOpTextureQuerySamples:
+ case EOpImageQuerySamples:
+ // GL_ARB_shader_texture_image_samples
+ profileRequires(loc, ~EEsProfile, 450, E_GL_ARB_shader_texture_image_samples, "textureSamples and imageSamples");
+ break;
+
+ case EOpImageAtomicAdd:
+ case EOpImageAtomicMin:
+ case EOpImageAtomicMax:
+ case EOpImageAtomicAnd:
+ case EOpImageAtomicOr:
+ case EOpImageAtomicXor:
+ case EOpImageAtomicExchange:
+ case EOpImageAtomicCompSwap:
+ {
+ // Make sure the image types have the correct layout() format and correct argument types
+ const TType& imageType = arg0->getType();
+ if (imageType.getSampler().type == EbtInt || imageType.getSampler().type == EbtUint) {
+ if (imageType.getQualifier().layoutFormat != ElfR32i && imageType.getQualifier().layoutFormat != ElfR32ui)
+ error(loc, "only supported on image with format r32i or r32ui", fnCandidate.getName().c_str(), "");
+ } else {
+ if (fnCandidate.getName().compare(0, 19, "imageAtomicExchange") != 0)
+ error(loc, "only supported on integer images", fnCandidate.getName().c_str(), "");
+ else if (imageType.getQualifier().layoutFormat != ElfR32f && profile == EEsProfile)
+ error(loc, "only supported on image with format r32f", fnCandidate.getName().c_str(), "");
+ }
+
+ break;
+ }
+
+ case EOpInterpolateAtCentroid:
+ case EOpInterpolateAtSample:
+ case EOpInterpolateAtOffset:
+ // "For the interpolateAt* functions, the call will return a precision
+ // qualification matching the precision of the 'interpolant' argument to
+ // the function call."
+ callNode.getQualifier().precision = arg0->getQualifier().precision;
+
+ // Make sure the first argument is an interpolant, or an array element of an interpolant
+ if (arg0->getType().getQualifier().storage != EvqVaryingIn) {
+ // It might still be an array element.
+ //
+ // We could check more, but the semantics of the first argument are already met; the
+ // only way to turn an array into a float/vec* is array dereference and swizzle.
+ //
+ // ES and desktop 4.3 and earlier: swizzles may not be used
+ // desktop 4.4 and later: swizzles may be used
+ bool swizzleOkay = (profile != EEsProfile) && (version >= 440);
+ const TIntermTyped* base = TIntermediate::findLValueBase(arg0, swizzleOkay);
+ if (base == nullptr || base->getType().getQualifier().storage != EvqVaryingIn)
+ error(loc, "first argument must be an interpolant, or interpolant-array element", fnCandidate.getName().c_str(), "");
+ }
+ break;
+
+ case EOpEmitStreamVertex:
+ case EOpEndStreamPrimitive:
+ intermediate.setMultiStream();
+ break;
+
+ default:
+ break;
+ }
+}
+
+extern bool PureOperatorBuiltins;
+
+// Deprecated! Use PureOperatorBuiltins == true instead, in which case this
+// functionality is handled in builtInOpCheck() instead of here.
+//
+// Do additional checking of built-in function calls that were not mapped
+// to built-in operations (e.g., texturing functions).
+//
+// Assumes there has been a semantically correct match to a built-in function.
+//
+void TParseContext::nonOpBuiltInCheck(const TSourceLoc& loc, const TFunction& fnCandidate, TIntermAggregate& callNode)
+{
+ // Further maintenance of this function is deprecated, because the "correct"
+ // future-oriented design is to not have to do string compares on function names.
+
+ // If PureOperatorBuiltins == true, then all built-ins should be mapped
+ // to a TOperator, and this function would then never get called.
+
+ assert(PureOperatorBuiltins == false);
+
+ // built-in texturing functions get their return value precision from the precision of the sampler
+ if (fnCandidate.getType().getQualifier().precision == EpqNone &&
+ fnCandidate.getParamCount() > 0 && fnCandidate[0].type->getBasicType() == EbtSampler)
+ callNode.getQualifier().precision = callNode.getSequence()[0]->getAsTyped()->getQualifier().precision;
+
+ if (fnCandidate.getName().compare(0, 7, "texture") == 0) {
+ if (fnCandidate.getName().compare(0, 13, "textureGather") == 0) {
+ TString featureString = fnCandidate.getName() + "(...)";
+ const char* feature = featureString.c_str();
+ profileRequires(loc, EEsProfile, 310, nullptr, feature);
+
+ int compArg = -1; // track which argument, if any, is the constant component argument
+ if (fnCandidate.getName().compare("textureGatherOffset") == 0) {
+ // GL_ARB_texture_gather is good enough for 2D non-shadow textures with no component argument
+ if (fnCandidate[0].type->getSampler().dim == Esd2D && ! fnCandidate[0].type->getSampler().shadow && fnCandidate.getParamCount() == 3)
+ profileRequires(loc, ~EEsProfile, 400, E_GL_ARB_texture_gather, feature);
+ else
+ profileRequires(loc, ~EEsProfile, 400, E_GL_ARB_gpu_shader5, feature);
+ int offsetArg = fnCandidate[0].type->getSampler().shadow ? 3 : 2;
+ if (! callNode.getSequence()[offsetArg]->getAsConstantUnion())
+ profileRequires(loc, EEsProfile, 0, Num_AEP_gpu_shader5, AEP_gpu_shader5, "non-constant offset argument");
+ if (! fnCandidate[0].type->getSampler().shadow)
+ compArg = 3;
+ } else if (fnCandidate.getName().compare("textureGatherOffsets") == 0) {
+ profileRequires(loc, ~EEsProfile, 400, E_GL_ARB_gpu_shader5, feature);
+ if (! fnCandidate[0].type->getSampler().shadow)
+ compArg = 3;
+ // check for constant offsets
+ int offsetArg = fnCandidate[0].type->getSampler().shadow ? 3 : 2;
+ if (! callNode.getSequence()[offsetArg]->getAsConstantUnion())
+ error(loc, "must be a compile-time constant:", feature, "offsets argument");
+ } else if (fnCandidate.getName().compare("textureGather") == 0) {
+ // More than two arguments needs gpu_shader5, and rectangular or shadow needs gpu_shader5,
+ // otherwise, need GL_ARB_texture_gather.
+ if (fnCandidate.getParamCount() > 2 || fnCandidate[0].type->getSampler().dim == EsdRect || fnCandidate[0].type->getSampler().shadow) {
+ profileRequires(loc, ~EEsProfile, 400, E_GL_ARB_gpu_shader5, feature);
+ if (! fnCandidate[0].type->getSampler().shadow)
+ compArg = 2;
+ } else
+ profileRequires(loc, ~EEsProfile, 400, E_GL_ARB_texture_gather, feature);
+ }
+
+ if (compArg > 0 && compArg < fnCandidate.getParamCount()) {
+ if (callNode.getSequence()[compArg]->getAsConstantUnion()) {
+ int value = callNode.getSequence()[compArg]->getAsConstantUnion()->getConstArray()[0].getIConst();
+ if (value < 0 || value > 3)
+ error(loc, "must be 0, 1, 2, or 3:", feature, "component argument");
+ } else
+ error(loc, "must be a compile-time constant:", feature, "component argument");
+ }
+ } else {
+ // this is only for functions not starting "textureGather"...
+ if (fnCandidate.getName().find("Offset") != TString::npos) {
+
+ // Handle texture-offset limits checking
+ int arg = -1;
+ if (fnCandidate.getName().compare("textureOffset") == 0)
+ arg = 2;
+ else if (fnCandidate.getName().compare("texelFetchOffset") == 0)
+ arg = 3;
+ else if (fnCandidate.getName().compare("textureProjOffset") == 0)
+ arg = 2;
+ else if (fnCandidate.getName().compare("textureLodOffset") == 0)
+ arg = 3;
+ else if (fnCandidate.getName().compare("textureProjLodOffset") == 0)
+ arg = 3;
+ else if (fnCandidate.getName().compare("textureGradOffset") == 0)
+ arg = 4;
+ else if (fnCandidate.getName().compare("textureProjGradOffset") == 0)
+ arg = 4;
+
+ if (arg > 0) {
+ if (! callNode.getSequence()[arg]->getAsConstantUnion())
+ error(loc, "argument must be compile-time constant", "texel offset", "");
+ else {
+ const TType& type = callNode.getSequence()[arg]->getAsTyped()->getType();
+ for (int c = 0; c < type.getVectorSize(); ++c) {
+ int offset = callNode.getSequence()[arg]->getAsConstantUnion()->getConstArray()[c].getIConst();
+ if (offset > resources.maxProgramTexelOffset || offset < resources.minProgramTexelOffset)
+ error(loc, "value is out of range:", "texel offset", "[gl_MinProgramTexelOffset, gl_MaxProgramTexelOffset]");
+ }
+ }
+ }
+ }
+ }
+ }
+
+ // GL_ARB_shader_texture_image_samples
+ if (fnCandidate.getName().compare(0, 14, "textureSamples") == 0 || fnCandidate.getName().compare(0, 12, "imageSamples") == 0)
+ profileRequires(loc, ~EEsProfile, 450, E_GL_ARB_shader_texture_image_samples, "textureSamples and imageSamples");
+
+ if (fnCandidate.getName().compare(0, 11, "imageAtomic") == 0) {
+ const TType& imageType = callNode.getSequence()[0]->getAsTyped()->getType();
+ if (imageType.getSampler().type == EbtInt || imageType.getSampler().type == EbtUint) {
+ if (imageType.getQualifier().layoutFormat != ElfR32i && imageType.getQualifier().layoutFormat != ElfR32ui)
+ error(loc, "only supported on image with format r32i or r32ui", fnCandidate.getName().c_str(), "");
+ } else {
+ if (fnCandidate.getName().compare(0, 19, "imageAtomicExchange") != 0)
+ error(loc, "only supported on integer images", fnCandidate.getName().c_str(), "");
+ else if (imageType.getQualifier().layoutFormat != ElfR32f && profile == EEsProfile)
+ error(loc, "only supported on image with format r32f", fnCandidate.getName().c_str(), "");
+ }
+ }
+}
+
+//
+// Handle seeing a built-in constructor in a grammar production.
+//
+TFunction* TParseContext::handleConstructorCall(const TSourceLoc& loc, const TPublicType& publicType)
+{
+ TType type(publicType);
+ type.getQualifier().precision = EpqNone;
+
+ if (type.isArray()) {
+ profileRequires(loc, ENoProfile, 120, E_GL_3DL_array_objects, "arrayed constructor");
+ profileRequires(loc, EEsProfile, 300, nullptr, "arrayed constructor");
+ }
+
+ TOperator op = mapTypeToConstructorOp(type);
+
+ if (op == EOpNull) {
+ error(loc, "cannot construct this type", type.getBasicString(), "");
+ op = EOpConstructFloat;
+ TType errorType(EbtFloat);
+ type.shallowCopy(errorType);
+ }
+
+ TString empty("");
+
+ return new TFunction(&empty, type, op);
+}
+
+//
+// Given a type, find what operation would fully construct it.
+//
+TOperator TParseContext::mapTypeToConstructorOp(const TType& type) const
+{
+ TOperator op = EOpNull;
+
+ switch (type.getBasicType()) {
+ case EbtStruct:
+ op = EOpConstructStruct;
+ break;
+ case EbtSampler:
+ if (type.getSampler().combined)
+ op = EOpConstructTextureSampler;
+ break;
+ case EbtFloat:
+ if (type.isMatrix()) {
+ switch (type.getMatrixCols()) {
+ case 2:
+ switch (type.getMatrixRows()) {
+ case 2: op = EOpConstructMat2x2; break;
+ case 3: op = EOpConstructMat2x3; break;
+ case 4: op = EOpConstructMat2x4; break;
+ default: break; // some compilers want this
+ }
+ break;
+ case 3:
+ switch (type.getMatrixRows()) {
+ case 2: op = EOpConstructMat3x2; break;
+ case 3: op = EOpConstructMat3x3; break;
+ case 4: op = EOpConstructMat3x4; break;
+ default: break; // some compilers want this
+ }
+ break;
+ case 4:
+ switch (type.getMatrixRows()) {
+ case 2: op = EOpConstructMat4x2; break;
+ case 3: op = EOpConstructMat4x3; break;
+ case 4: op = EOpConstructMat4x4; break;
+ default: break; // some compilers want this
+ }
+ break;
+ default: break; // some compilers want this
+ }
+ } else {
+ switch(type.getVectorSize()) {
+ case 1: op = EOpConstructFloat; break;
+ case 2: op = EOpConstructVec2; break;
+ case 3: op = EOpConstructVec3; break;
+ case 4: op = EOpConstructVec4; break;
+ default: break; // some compilers want this
+ }
+ }
+ break;
+ case EbtDouble:
+ if (type.getMatrixCols()) {
+ switch (type.getMatrixCols()) {
+ case 2:
+ switch (type.getMatrixRows()) {
+ case 2: op = EOpConstructDMat2x2; break;
+ case 3: op = EOpConstructDMat2x3; break;
+ case 4: op = EOpConstructDMat2x4; break;
+ default: break; // some compilers want this
+ }
+ break;
+ case 3:
+ switch (type.getMatrixRows()) {
+ case 2: op = EOpConstructDMat3x2; break;
+ case 3: op = EOpConstructDMat3x3; break;
+ case 4: op = EOpConstructDMat3x4; break;
+ default: break; // some compilers want this
+ }
+ break;
+ case 4:
+ switch (type.getMatrixRows()) {
+ case 2: op = EOpConstructDMat4x2; break;
+ case 3: op = EOpConstructDMat4x3; break;
+ case 4: op = EOpConstructDMat4x4; break;
+ default: break; // some compilers want this
+ }
+ break;
+ }
+ } else {
+ switch(type.getVectorSize()) {
+ case 1: op = EOpConstructDouble; break;
+ case 2: op = EOpConstructDVec2; break;
+ case 3: op = EOpConstructDVec3; break;
+ case 4: op = EOpConstructDVec4; break;
+ default: break; // some compilers want this
+ }
+ }
+ break;
+ case EbtInt:
+ switch(type.getVectorSize()) {
+ case 1: op = EOpConstructInt; break;
+ case 2: op = EOpConstructIVec2; break;
+ case 3: op = EOpConstructIVec3; break;
+ case 4: op = EOpConstructIVec4; break;
+ default: break; // some compilers want this
+ }
+ break;
+ case EbtUint:
+ switch(type.getVectorSize()) {
+ case 1: op = EOpConstructUint; break;
+ case 2: op = EOpConstructUVec2; break;
+ case 3: op = EOpConstructUVec3; break;
+ case 4: op = EOpConstructUVec4; break;
+ default: break; // some compilers want this
+ }
+ break;
+ case EbtInt64:
+ switch(type.getVectorSize()) {
+ case 1: op = EOpConstructInt64; break;
+ case 2: op = EOpConstructI64Vec2; break;
+ case 3: op = EOpConstructI64Vec3; break;
+ case 4: op = EOpConstructI64Vec4; break;
+ default: break; // some compilers want this
+ }
+ break;
+ case EbtUint64:
+ switch(type.getVectorSize()) {
+ case 1: op = EOpConstructUint64; break;
+ case 2: op = EOpConstructU64Vec2; break;
+ case 3: op = EOpConstructU64Vec3; break;
+ case 4: op = EOpConstructU64Vec4; break;
+ default: break; // some compilers want this
+ }
+ break;
+ case EbtBool:
+ switch(type.getVectorSize()) {
+ case 1: op = EOpConstructBool; break;
+ case 2: op = EOpConstructBVec2; break;
+ case 3: op = EOpConstructBVec3; break;
+ case 4: op = EOpConstructBVec4; break;
+ default: break; // some compilers want this
+ }
+ break;
+ default:
+ break;
+ }
+
+ return op;
+}
+
+//
+// Same error message for all places assignments don't work.
+//
+void TParseContext::assignError(const TSourceLoc& loc, const char* op, TString left, TString right)
+{
+ error(loc, "", op, "cannot convert from '%s' to '%s'",
+ right.c_str(), left.c_str());
+}
+
+//
+// Same error message for all places unary operations don't work.
+//
+void TParseContext::unaryOpError(const TSourceLoc& loc, const char* op, TString operand)
+{
+ error(loc, " wrong operand type", op,
+ "no operation '%s' exists that takes an operand of type %s (or there is no acceptable conversion)",
+ op, operand.c_str());
+}
+
+//
+// Same error message for all binary operations don't work.
+//
+void TParseContext::binaryOpError(const TSourceLoc& loc, const char* op, TString left, TString right)
+{
+ error(loc, " wrong operand types:", op,
+ "no operation '%s' exists that takes a left-hand operand of type '%s' and "
+ "a right operand of type '%s' (or there is no acceptable conversion)",
+ op, left.c_str(), right.c_str());
+}
+
+//
+// A basic type of EbtVoid is a key that the name string was seen in the source, but
+// it was not found as a variable in the symbol table. If so, give the error
+// message and insert a dummy variable in the symbol table to prevent future errors.
+//
+void TParseContext::variableCheck(TIntermTyped*& nodePtr)
+{
+ TIntermSymbol* symbol = nodePtr->getAsSymbolNode();
+ if (! symbol)
+ return;
+
+ if (symbol->getType().getBasicType() == EbtVoid) {
+ error(symbol->getLoc(), "undeclared identifier", symbol->getName().c_str(), "");
+
+ // Add to symbol table to prevent future error messages on the same name
+ if (symbol->getName().size() > 0) {
+ TVariable* fakeVariable = new TVariable(&symbol->getName(), TType(EbtFloat));
+ symbolTable.insert(*fakeVariable);
+
+ // substitute a symbol node for this new variable
+ nodePtr = intermediate.addSymbol(*fakeVariable, symbol->getLoc());
+ }
+ } else {
+ switch (symbol->getQualifier().storage) {
+ case EvqPointCoord:
+ profileRequires(symbol->getLoc(), ENoProfile, 120, nullptr, "gl_PointCoord");
+ break;
+ default: break; // some compilers want this
+ }
+ }
+}
+
+//
+// Both test and if necessary, spit out an error, to see if the node is really
+// an l-value that can be operated on this way.
+//
+// Returns true if the was an error.
+//
+bool TParseContext::lValueErrorCheck(const TSourceLoc& loc, const char* op, TIntermTyped* node)
+{
+ TIntermBinary* binaryNode = node->getAsBinaryNode();
+
+ if (binaryNode) {
+ bool errorReturn;
+
+ switch(binaryNode->getOp()) {
+ case EOpIndexDirect:
+ case EOpIndexIndirect:
+ // ... tessellation control shader ...
+ // If a per-vertex output variable is used as an l-value, it is a
+ // compile-time or link-time error if the expression indicating the
+ // vertex index is not the identifier gl_InvocationID.
+ if (language == EShLangTessControl) {
+ const TType& leftType = binaryNode->getLeft()->getType();
+ if (leftType.getQualifier().storage == EvqVaryingOut && ! leftType.getQualifier().patch && binaryNode->getLeft()->getAsSymbolNode()) {
+ // we have a per-vertex output
+ const TIntermSymbol* rightSymbol = binaryNode->getRight()->getAsSymbolNode();
+ if (! rightSymbol || rightSymbol->getQualifier().builtIn != EbvInvocationId)
+ error(loc, "tessellation-control per-vertex output l-value must be indexed with gl_InvocationID", "[]", "");
+ }
+ }
+
+ // fall through
+ case EOpIndexDirectStruct:
+ return lValueErrorCheck(loc, op, binaryNode->getLeft());
+ case EOpVectorSwizzle:
+ errorReturn = lValueErrorCheck(loc, op, binaryNode->getLeft());
+ if (!errorReturn) {
+ int offset[4] = {0,0,0,0};
+
+ TIntermTyped* rightNode = binaryNode->getRight();
+ TIntermAggregate *aggrNode = rightNode->getAsAggregate();
+
+ for (TIntermSequence::iterator p = aggrNode->getSequence().begin();
+ p != aggrNode->getSequence().end(); p++) {
+ int value = (*p)->getAsTyped()->getAsConstantUnion()->getConstArray()[0].getIConst();
+ offset[value]++;
+ if (offset[value] > 1) {
+ error(loc, " l-value of swizzle cannot have duplicate components", op, "", "");
+
+ return true;
+ }
+ }
+ }
+
+ return errorReturn;
+ default:
+ break;
+ }
+ error(loc, " l-value required", op, "", "");
+
+ return true;
+ }
+
+
+ const char* symbol = nullptr;
+ TIntermSymbol* symNode = node->getAsSymbolNode();
+ if (symNode != nullptr)
+ symbol = symNode->getName().c_str();
+
+ const char* message = nullptr;
+ switch (node->getQualifier().storage) {
+ case EvqConst: message = "can't modify a const"; break;
+ case EvqConstReadOnly: message = "can't modify a const"; break;
+ case EvqVaryingIn: message = "can't modify shader input"; break;
+ case EvqInstanceId: message = "can't modify gl_InstanceID"; break;
+ case EvqVertexId: message = "can't modify gl_VertexID"; break;
+ case EvqFace: message = "can't modify gl_FrontFace"; break;
+ case EvqFragCoord: message = "can't modify gl_FragCoord"; break;
+ case EvqPointCoord: message = "can't modify gl_PointCoord"; break;
+ case EvqUniform: message = "can't modify a uniform"; break;
+ case EvqBuffer:
+ if (node->getQualifier().readonly)
+ message = "can't modify a readonly buffer";
+ break;
+ case EvqFragDepth:
+ intermediate.setDepthReplacing();
+ // "In addition, it is an error to statically write to gl_FragDepth in the fragment shader."
+ if (profile == EEsProfile && intermediate.getEarlyFragmentTests())
+ message = "can't modify gl_FragDepth if using early_fragment_tests";
+ break;
+
+ default:
+ //
+ // Type that can't be written to?
+ //
+ switch (node->getBasicType()) {
+ case EbtSampler:
+ message = "can't modify a sampler";
+ break;
+ case EbtAtomicUint:
+ message = "can't modify an atomic_uint";
+ break;
+ case EbtVoid:
+ message = "can't modify void";
+ break;
+ default:
+ break;
+ }
+ }
+
+ if (message == nullptr && binaryNode == nullptr && symNode == nullptr) {
+ error(loc, " l-value required", op, "", "");
+
+ return true;
+ }
+
+
+ //
+ // Everything else is okay, no error.
+ //
+ if (message == nullptr)
+ return false;
+
+ //
+ // If we get here, we have an error and a message.
+ //
+ if (symNode)
+ error(loc, " l-value required", op, "\"%s\" (%s)", symbol, message);
+ else
+ error(loc, " l-value required", op, "(%s)", message);
+
+ return true;
+}
+
+// Test for and give an error if the node can't be read from.
+void TParseContext::rValueErrorCheck(const TSourceLoc& loc, const char* op, TIntermTyped* node)
+{
+ if (! node)
+ return;
+
+ TIntermBinary* binaryNode = node->getAsBinaryNode();
+ if (binaryNode) {
+ switch(binaryNode->getOp()) {
+ case EOpIndexDirect:
+ case EOpIndexIndirect:
+ case EOpIndexDirectStruct:
+ case EOpVectorSwizzle:
+ rValueErrorCheck(loc, op, binaryNode->getLeft());
+ default:
+ break;
+ }
+
+ return;
+ }
+
+ TIntermSymbol* symNode = node->getAsSymbolNode();
+ if (symNode && symNode->getQualifier().writeonly)
+ error(loc, "can't read from writeonly object: ", op, symNode->getName().c_str());
+}
+
+//
+// Both test, and if necessary spit out an error, to see if the node is really
+// a constant.
+//
+void TParseContext::constantValueCheck(TIntermTyped* node, const char* token)
+{
+ if (! node->getQualifier().isConstant())
+ error(node->getLoc(), "constant expression required", token, "");
+}
+
+//
+// Both test, and if necessary spit out an error, to see if the node is really
+// an integer.
+//
+void TParseContext::integerCheck(const TIntermTyped* node, const char* token)
+{
+ if ((node->getBasicType() == EbtInt || node->getBasicType() == EbtUint) && node->isScalar())
+ return;
+
+ error(node->getLoc(), "scalar integer expression required", token, "");
+}
+
+//
+// Both test, and if necessary spit out an error, to see if we are currently
+// globally scoped.
+//
+void TParseContext::globalCheck(const TSourceLoc& loc, const char* token)
+{
+ if (! symbolTable.atGlobalLevel())
+ error(loc, "not allowed in nested scope", token, "");
+}
+
+//
+// Reserved errors for GLSL.
+//
+void TParseContext::reservedErrorCheck(const TSourceLoc& loc, const TString& identifier)
+{
+ // "Identifiers starting with "gl_" are reserved for use by OpenGL, and may not be
+ // declared in a shader; this results in a compile-time error."
+ if (! symbolTable.atBuiltInLevel()) {
+ if (builtInName(identifier))
+ error(loc, "identifiers starting with \"gl_\" are reserved", identifier.c_str(), "");
+
+ // "__" are not supposed to be an error. ES 310 (and desktop) added the clarification:
+ // "In addition, all identifiers containing two consecutive underscores (__) are
+ // reserved; using such a name does not itself result in an error, but may result
+ // in undefined behavior."
+ // however, before that, ES tests required an error.
+ if (identifier.find("__") != TString::npos) {
+ if (profile == EEsProfile && version <= 300)
+ error(loc, "identifiers containing consecutive underscores (\"__\") are reserved, and an error if version <= 300", identifier.c_str(), "");
+ else
+ warn(loc, "identifiers containing consecutive underscores (\"__\") are reserved", identifier.c_str(), "");
+ }
+ }
+}
+
+//
+// Reserved errors for the preprocessor.
+//
+void TParseContext::reservedPpErrorCheck(const TSourceLoc& loc, const char* identifier, const char* op)
+{
+ // "__" are not supposed to be an error. ES 310 (and desktop) added the clarification:
+ // "All macro names containing two consecutive underscores ( __ ) are reserved;
+ // defining such a name does not itself result in an error, but may result in
+ // undefined behavior. All macro names prefixed with "GL_" ("GL" followed by a
+ // single underscore) are also reserved, and defining such a name results in a
+ // compile-time error."
+ // however, before that, ES tests required an error.
+ if (strncmp(identifier, "GL_", 3) == 0)
+ ppError(loc, "names beginning with \"GL_\" can't be (un)defined:", op, identifier);
+ else if (strncmp(identifier, "defined", 8) == 0)
+ ppError(loc, "\"defined\" can't be (un)defined:", op, identifier);
+ else if (strstr(identifier, "__") != 0) {
+ if (profile == EEsProfile && version >= 300 &&
+ (strcmp(identifier, "__LINE__") == 0 ||
+ strcmp(identifier, "__FILE__") == 0 ||
+ strcmp(identifier, "__VERSION__") == 0))
+ ppError(loc, "predefined names can't be (un)defined:", op, identifier);
+ else {
+ if (profile == EEsProfile && version <= 300)
+ ppError(loc, "names containing consecutive underscores are reserved, and an error if version <= 300:", op, identifier);
+ else
+ ppWarn(loc, "names containing consecutive underscores are reserved:", op, identifier);
+ }
+ }
+}
+
+//
+// See if this version/profile allows use of the line-continuation character '\'.
+//
+// Returns true if a line continuation should be done.
+//
+bool TParseContext::lineContinuationCheck(const TSourceLoc& loc, bool endOfComment)
+{
+ const char* message = "line continuation";
+
+ bool lineContinuationAllowed = (profile == EEsProfile && version >= 300) ||
+ (profile != EEsProfile && (version >= 420 || extensionTurnedOn(E_GL_ARB_shading_language_420pack)));
+
+ if (endOfComment) {
+ if (lineContinuationAllowed)
+ warn(loc, "used at end of comment; the following line is still part of the comment", message, "");
+ else
+ warn(loc, "used at end of comment, but this version does not provide line continuation", message, "");
+
+ return lineContinuationAllowed;
+ }
+
+ if (relaxedErrors()) {
+ if (! lineContinuationAllowed)
+ warn(loc, "not allowed in this version", message, "");
+ return true;
+ } else {
+ profileRequires(loc, EEsProfile, 300, nullptr, message);
+ profileRequires(loc, ~EEsProfile, 420, E_GL_ARB_shading_language_420pack, message);
+ }
+
+ return lineContinuationAllowed;
+}
+
+bool TParseContext::builtInName(const TString& identifier)
+{
+ return identifier.compare(0, 3, "gl_") == 0;
+}
+
+//
+// Make sure there is enough data and not too many arguments provided to the
+// constructor to build something of the type of the constructor. Also returns
+// the type of the constructor.
+//
+// Part of establishing type is establishing specialization-constness.
+// We don't yet know "top down" whether type is a specialization constant,
+// but a const constructor can becomes a specialization constant if any of
+// its children are, subject to KHR_vulkan_glsl rules:
+//
+// - int(), uint(), and bool() constructors for type conversions
+// from any of the following types to any of the following types:
+// * int
+// * uint
+// * bool
+// - vector versions of the above conversion constructors
+//
+// Returns true if there was an error in construction.
+//
+bool TParseContext::constructorError(const TSourceLoc& loc, TIntermNode* node, TFunction& function, TOperator op, TType& type)
+{
+ type.shallowCopy(function.getType());
+
+ bool constructingMatrix = false;
+ switch(op) {
+ case EOpConstructTextureSampler:
+ return constructorTextureSamplerError(loc, function);
+ case EOpConstructMat2x2:
+ case EOpConstructMat2x3:
+ case EOpConstructMat2x4:
+ case EOpConstructMat3x2:
+ case EOpConstructMat3x3:
+ case EOpConstructMat3x4:
+ case EOpConstructMat4x2:
+ case EOpConstructMat4x3:
+ case EOpConstructMat4x4:
+ case EOpConstructDMat2x2:
+ case EOpConstructDMat2x3:
+ case EOpConstructDMat2x4:
+ case EOpConstructDMat3x2:
+ case EOpConstructDMat3x3:
+ case EOpConstructDMat3x4:
+ case EOpConstructDMat4x2:
+ case EOpConstructDMat4x3:
+ case EOpConstructDMat4x4:
+ constructingMatrix = true;
+ break;
+ default:
+ break;
+ }
+
+ //
+ // Walk the arguments for first-pass checks and collection of information.
+ //
+
+ int size = 0;
+ bool constType = true;
+ bool specConstType = false; // value is only valid if constType is true
+ bool full = false;
+ bool overFull = false;
+ bool matrixInMatrix = false;
+ bool arrayArg = false;
+ bool floatArgument = false;
+ for (int arg = 0; arg < function.getParamCount(); ++arg) {
+ if (function[arg].type->isArray()) {
+ if (! function[arg].type->isExplicitlySizedArray()) {
+ // Can't construct from an unsized array.
+ error(loc, "array argument must be sized", "constructor", "");
+ return true;
+ }
+ arrayArg = true;
+ }
+ if (constructingMatrix && function[arg].type->isMatrix())
+ matrixInMatrix = true;
+
+ // 'full' will go to true when enough args have been seen. If we loop
+ // again, there is an extra argument.
+ if (full) {
+ // For vectors and matrices, it's okay to have too many components
+ // available, but not okay to have unused arguments.
+ overFull = true;
+ }
+
+ size += function[arg].type->computeNumComponents();
+ if (op != EOpConstructStruct && ! type.isArray() && size >= type.computeNumComponents())
+ full = true;
+
+ if (! function[arg].type->getQualifier().isConstant())
+ constType = false;
+ if (function[arg].type->getQualifier().isSpecConstant())
+ specConstType = true;
+ if (function[arg].type->isFloatingDomain())
+ floatArgument = true;
+ }
+
+ // inherit constness from children
+ if (constType) {
+ bool makeSpecConst;
+ // Finish pinning down spec-const semantics
+ if (specConstType) {
+ switch (op) {
+ case EOpConstructInt:
+ case EOpConstructUint:
+ case EOpConstructInt64:
+ case EOpConstructUint64:
+ case EOpConstructBool:
+ case EOpConstructBVec2:
+ case EOpConstructBVec3:
+ case EOpConstructBVec4:
+ case EOpConstructIVec2:
+ case EOpConstructIVec3:
+ case EOpConstructIVec4:
+ case EOpConstructUVec2:
+ case EOpConstructUVec3:
+ case EOpConstructUVec4:
+ case EOpConstructI64Vec2:
+ case EOpConstructI64Vec3:
+ case EOpConstructI64Vec4:
+ case EOpConstructU64Vec2:
+ case EOpConstructU64Vec3:
+ case EOpConstructU64Vec4:
+ // This was the list of valid ones, if they aren't converting from float
+ // and aren't making an array.
+ makeSpecConst = ! floatArgument && ! type.isArray();
+ break;
+ default:
+ // anything else wasn't white-listed in the spec as a conversion
+ makeSpecConst = false;
+ break;
+ }
+ } else
+ makeSpecConst = false;
+
+ if (makeSpecConst)
+ type.getQualifier().makeSpecConstant();
+ else if (specConstType)
+ type.getQualifier().makeTemporary();
+ else
+ type.getQualifier().storage = EvqConst;
+ }
+
+ if (type.isArray()) {
+ if (function.getParamCount() == 0) {
+ error(loc, "array constructor must have at least one argument", "constructor", "");
+ return true;
+ }
+
+ if (type.isImplicitlySizedArray()) {
+ // auto adapt the constructor type to the number of arguments
+ type.changeOuterArraySize(function.getParamCount());
+ } else if (type.getOuterArraySize() != function.getParamCount()) {
+ error(loc, "array constructor needs one argument per array element", "constructor", "");
+ return true;
+ }
+
+ if (type.isArrayOfArrays()) {
+ // Types have to match, but we're still making the type.
+ // Finish making the type, and the comparison is done later
+ // when checking for conversion.
+ TArraySizes& arraySizes = type.getArraySizes();
+
+ // At least the dimensionalities have to match.
+ if (! function[0].type->isArray() || arraySizes.getNumDims() != function[0].type->getArraySizes().getNumDims() + 1) {
+ error(loc, "array constructor argument not correct type to construct array element", "constructior", "");
+ return true;
+ }
+
+ if (arraySizes.isInnerImplicit()) {
+ // "Arrays of arrays ..., and the size for any dimension is optional"
+ // That means we need to adopt (from the first argument) the other array sizes into the type.
+ for (int d = 1; d < arraySizes.getNumDims(); ++d) {
+ if (arraySizes.getDimSize(d) == UnsizedArraySize) {
+ arraySizes.setDimSize(d, function[0].type->getArraySizes().getDimSize(d - 1));
+ }
+ }
+ }
+ }
+ }
+
+ if (arrayArg && op != EOpConstructStruct && ! type.isArrayOfArrays()) {
+ error(loc, "constructing non-array constituent from array argument", "constructor", "");
+ return true;
+ }
+
+ if (matrixInMatrix && ! type.isArray()) {
+ profileRequires(loc, ENoProfile, 120, nullptr, "constructing matrix from matrix");
+
+ // "If a matrix argument is given to a matrix constructor,
+ // it is a compile-time error to have any other arguments."
+ if (function.getParamCount() != 1)
+ error(loc, "matrix constructed from matrix can only have one argument", "constructor", "");
+ return false;
+ }
+
+ if (overFull) {
+ error(loc, "too many arguments", "constructor", "");
+ return true;
+ }
+
+ if (op == EOpConstructStruct && ! type.isArray() && (int)type.getStruct()->size() != function.getParamCount()) {
+ error(loc, "Number of constructor parameters does not match the number of structure fields", "constructor", "");
+ return true;
+ }
+
+ if ((op != EOpConstructStruct && size != 1 && size < type.computeNumComponents()) ||
+ (op == EOpConstructStruct && size < type.computeNumComponents())) {
+ error(loc, "not enough data provided for construction", "constructor", "");
+ return true;
+ }
+
+ TIntermTyped* typed = node->getAsTyped();
+ if (typed == nullptr) {
+ error(loc, "constructor argument does not have a type", "constructor", "");
+ return true;
+ }
+ if (op != EOpConstructStruct && typed->getBasicType() == EbtSampler) {
+ error(loc, "cannot convert a sampler", "constructor", "");
+ return true;
+ }
+ if (op != EOpConstructStruct && typed->getBasicType() == EbtAtomicUint) {
+ error(loc, "cannot convert an atomic_uint", "constructor", "");
+ return true;
+ }
+ if (typed->getBasicType() == EbtVoid) {
+ error(loc, "cannot convert a void", "constructor", "");
+ return true;
+ }
+
+ return false;
+}
+
+// Verify all the correct semantics for constructing a combined texture/sampler.
+// Return true if the semantics are incorrect.
+bool TParseContext::constructorTextureSamplerError(const TSourceLoc& loc, const TFunction& function)
+{
+ TString constructorName = function.getType().getBasicTypeString(); // TODO: performance: should not be making copy; interface needs to change
+ const char* token = constructorName.c_str();
+
+ // exactly two arguments needed
+ if (function.getParamCount() != 2) {
+ error(loc, "sampler-constructor requires two arguments", token, "");
+ return true;
+ }
+
+ // For now, not allowing arrayed constructors, the rest of this function
+ // is set up to allow them, if this test is removed:
+ if (function.getType().isArray()) {
+ error(loc, "sampler-constructor cannot make an array of samplers", token, "");
+ return true;
+ }
+
+ // first argument
+ // * the constructor's first argument must be a texture type
+ // * the dimensionality (1D, 2D, 3D, Cube, Rect, Buffer, MS, and Array)
+ // of the texture type must match that of the constructed sampler type
+ // (that is, the suffixes of the type of the first argument and the
+ // type of the constructor will be spelled the same way)
+ if (function[0].type->getBasicType() != EbtSampler ||
+ ! function[0].type->getSampler().isTexture() ||
+ function[0].type->isArray()) {
+ error(loc, "sampler-constructor first argument must be a scalar textureXXX type", token, "");
+ return true;
+ }
+ // simulate the first argument's impact on the result type, so it can be compared with the encapsulated operator!=()
+ TSampler texture = function.getType().getSampler();
+ texture.combined = false;
+ texture.shadow = false;
+ if (texture != function[0].type->getSampler()) {
+ error(loc, "sampler-constructor first argument must match type and dimensionality of constructor type", token, "");
+ return true;
+ }
+
+ // second argument
+ // * the constructor's second argument must be a scalar of type
+ // *sampler* or *samplerShadow*
+ // * the presence or absence of depth comparison (Shadow) must match
+ // between the constructed sampler type and the type of the second argument
+ if ( function[1].type->getBasicType() != EbtSampler ||
+ ! function[1].type->getSampler().isPureSampler() ||
+ function[1].type->isArray()) {
+ error(loc, "sampler-constructor second argument must be a scalar type 'sampler'", token, "");
+ return true;
+ }
+ if (function.getType().getSampler().shadow != function[1].type->getSampler().shadow) {
+ error(loc, "sampler-constructor second argument presence of shadow must match constructor presence of shadow", token, "");
+ return true;
+ }
+
+ return false;
+}
+
+// Checks to see if a void variable has been declared and raise an error message for such a case
+//
+// returns true in case of an error
+//
+bool TParseContext::voidErrorCheck(const TSourceLoc& loc, const TString& identifier, const TBasicType basicType)
+{
+ if (basicType == EbtVoid) {
+ error(loc, "illegal use of type 'void'", identifier.c_str(), "");
+ return true;
+ }
+
+ return false;
+}
+
+// Checks to see if the node (for the expression) contains a scalar boolean expression or not
+void TParseContext::boolCheck(const TSourceLoc& loc, const TIntermTyped* type)
+{
+ if (type->getBasicType() != EbtBool || type->isArray() || type->isMatrix() || type->isVector())
+ error(loc, "boolean expression expected", "", "");
+}
+
+// This function checks to see if the node (for the expression) contains a scalar boolean expression or not
+void TParseContext::boolCheck(const TSourceLoc& loc, const TPublicType& pType)
+{
+ if (pType.basicType != EbtBool || pType.arraySizes || pType.matrixCols > 1 || (pType.vectorSize > 1))
+ error(loc, "boolean expression expected", "", "");
+}
+
+void TParseContext::samplerCheck(const TSourceLoc& loc, const TType& type, const TString& identifier, TIntermTyped* /*initializer*/)
+{
+ if (type.getQualifier().storage == EvqUniform)
+ return;
+
+ if (type.getBasicType() == EbtStruct && containsFieldWithBasicType(type, EbtSampler))
+ error(loc, "non-uniform struct contains a sampler or image:", type.getBasicTypeString().c_str(), identifier.c_str());
+ else if (type.getBasicType() == EbtSampler && type.getQualifier().storage != EvqUniform) {
+ // non-uniform sampler
+ // not yet: okay if it has an initializer
+ // if (! initializer)
+ error(loc, "sampler/image types can only be used in uniform variables or function parameters:", type.getBasicTypeString().c_str(), identifier.c_str());
+ }
+}
+
+void TParseContext::atomicUintCheck(const TSourceLoc& loc, const TType& type, const TString& identifier)
+{
+ if (type.getQualifier().storage == EvqUniform)
+ return;
+
+ if (type.getBasicType() == EbtStruct && containsFieldWithBasicType(type, EbtAtomicUint))
+ error(loc, "non-uniform struct contains an atomic_uint:", type.getBasicTypeString().c_str(), identifier.c_str());
+ else if (type.getBasicType() == EbtAtomicUint && type.getQualifier().storage != EvqUniform)
+ error(loc, "atomic_uints can only be used in uniform variables or function parameters:", type.getBasicTypeString().c_str(), identifier.c_str());
+}
+
+void TParseContext::transparentCheck(const TSourceLoc& loc, const TType& type, const TString& /*identifier*/)
+{
+ // double standard due to gl_NumSamples
+ if (parsingBuiltins)
+ return;
+
+ // Vulkan doesn't allow transparent uniforms outside of blocks
+ if (vulkan == 0 || type.getQualifier().storage != EvqUniform)
+ return;
+ if (type.containsNonOpaque())
+ vulkanRemoved(loc, "non-opaque uniforms outside a block");
+}
+
+//
+// Check/fix just a full qualifier (no variables or types yet, but qualifier is complete) at global level.
+//
+void TParseContext::globalQualifierFixCheck(const TSourceLoc& loc, TQualifier& qualifier)
+{
+ // move from parameter/unknown qualifiers to pipeline in/out qualifiers
+ switch (qualifier.storage) {
+ case EvqIn:
+ profileRequires(loc, ENoProfile, 130, nullptr, "in for stage inputs");
+ profileRequires(loc, EEsProfile, 300, nullptr, "in for stage inputs");
+ qualifier.storage = EvqVaryingIn;
+ break;
+ case EvqOut:
+ profileRequires(loc, ENoProfile, 130, nullptr, "out for stage outputs");
+ profileRequires(loc, EEsProfile, 300, nullptr, "out for stage outputs");
+ qualifier.storage = EvqVaryingOut;
+ break;
+ case EvqInOut:
+ qualifier.storage = EvqVaryingIn;
+ error(loc, "cannot use 'inout' at global scope", "", "");
+ break;
+ default:
+ break;
+ }
+
+ invariantCheck(loc, qualifier);
+}
+
+//
+// Check a full qualifier and type (no variable yet) at global level.
+//
+void TParseContext::globalQualifierTypeCheck(const TSourceLoc& loc, const TQualifier& qualifier, const TPublicType& publicType)
+{
+ if (! symbolTable.atGlobalLevel())
+ return;
+
+ if (qualifier.isMemory() && ! publicType.isImage() && publicType.qualifier.storage != EvqBuffer)
+ error(loc, "memory qualifiers cannot be used on this type", "", "");
+
+ if (qualifier.storage == EvqBuffer && publicType.basicType != EbtBlock)
+ error(loc, "buffers can be declared only as blocks", "buffer", "");
+
+ if (qualifier.storage != EvqVaryingIn && qualifier.storage != EvqVaryingOut)
+ return;
+
+ if (publicType.shaderQualifiers.blendEquation)
+ error(loc, "can only be applied to a standalone 'out'", "blend equation", "");
+
+ // now, knowing it is a shader in/out, do all the in/out semantic checks
+
+ if (publicType.basicType == EbtBool) {
+ error(loc, "cannot be bool", GetStorageQualifierString(qualifier.storage), "");
+ return;
+ }
+
+ if (publicType.basicType == EbtInt || publicType.basicType == EbtUint ||
+ publicType.basicType == EbtInt64 || publicType.basicType == EbtUint64 ||
+ publicType.basicType == EbtDouble)
+ profileRequires(loc, EEsProfile, 300, nullptr, "shader input/output");
+
+ if (! qualifier.flat) {
+ if (publicType.basicType == EbtInt || publicType.basicType == EbtUint ||
+ publicType.basicType == EbtInt64 || publicType.basicType == EbtUint64 ||
+ publicType.basicType == EbtDouble ||
+ (publicType.userDef && (publicType.userDef->containsBasicType(EbtInt) ||
+ publicType.userDef->containsBasicType(EbtUint) ||
+ publicType.userDef->containsBasicType(EbtInt64) ||
+ publicType.userDef->containsBasicType(EbtUint64) ||
+ publicType.userDef->containsBasicType(EbtDouble)))) {
+ if (qualifier.storage == EvqVaryingIn && language == EShLangFragment)
+ error(loc, "must be qualified as flat", TType::getBasicString(publicType.basicType), GetStorageQualifierString(qualifier.storage));
+ else if (qualifier.storage == EvqVaryingOut && language == EShLangVertex && version == 300)
+ error(loc, "must be qualified as flat", TType::getBasicString(publicType.basicType), GetStorageQualifierString(qualifier.storage));
+ }
+ }
+
+ if (qualifier.patch && qualifier.isInterpolation())
+ error(loc, "cannot use interpolation qualifiers with patch", "patch", "");
+
+ if (qualifier.storage == EvqVaryingIn) {
+ switch (language) {
+ case EShLangVertex:
+ if (publicType.basicType == EbtStruct) {
+ error(loc, "cannot be a structure or array", GetStorageQualifierString(qualifier.storage), "");
+ return;
+ }
+ if (publicType.arraySizes) {
+ requireProfile(loc, ~EEsProfile, "vertex input arrays");
+ profileRequires(loc, ENoProfile, 150, nullptr, "vertex input arrays");
+ }
+ if (publicType.basicType == EbtDouble)
+ profileRequires(loc, ~EEsProfile, 410, nullptr, "vertex-shader `double` type input");
+ if (qualifier.isAuxiliary() || qualifier.isInterpolation() || qualifier.isMemory() || qualifier.invariant)
+ error(loc, "vertex input cannot be further qualified", "", "");
+ break;
+
+ case EShLangTessControl:
+ if (qualifier.patch)
+ error(loc, "can only use on output in tessellation-control shader", "patch", "");
+ break;
+
+ case EShLangTessEvaluation:
+ break;
+
+ case EShLangGeometry:
+ break;
+
+ case EShLangFragment:
+ if (publicType.userDef) {
+ profileRequires(loc, EEsProfile, 300, nullptr, "fragment-shader struct input");
+ profileRequires(loc, ~EEsProfile, 150, nullptr, "fragment-shader struct input");
+ if (publicType.userDef->containsStructure())
+ requireProfile(loc, ~EEsProfile, "fragment-shader struct input containing structure");
+ if (publicType.userDef->containsArray())
+ requireProfile(loc, ~EEsProfile, "fragment-shader struct input containing an array");
+ }
+ break;
+
+ case EShLangCompute:
+ if (! symbolTable.atBuiltInLevel())
+ error(loc, "global storage input qualifier cannot be used in a compute shader", "in", "");
+ break;
+
+ default:
+ break;
+ }
+ } else {
+ // qualifier.storage == EvqVaryingOut
+ switch (language) {
+ case EShLangVertex:
+ if (publicType.userDef) {
+ profileRequires(loc, EEsProfile, 300, nullptr, "vertex-shader struct output");
+ profileRequires(loc, ~EEsProfile, 150, nullptr, "vertex-shader struct output");
+ if (publicType.userDef->containsStructure())
+ requireProfile(loc, ~EEsProfile, "vertex-shader struct output containing structure");
+ if (publicType.userDef->containsArray())
+ requireProfile(loc, ~EEsProfile, "vertex-shader struct output containing an array");
+ }
+
+ break;
+
+ case EShLangTessControl:
+ break;
+
+ case EShLangTessEvaluation:
+ if (qualifier.patch)
+ error(loc, "can only use on input in tessellation-evaluation shader", "patch", "");
+ break;
+
+ case EShLangGeometry:
+ break;
+
+ case EShLangFragment:
+ profileRequires(loc, EEsProfile, 300, nullptr, "fragment shader output");
+ if (publicType.basicType == EbtStruct) {
+ error(loc, "cannot be a structure", GetStorageQualifierString(qualifier.storage), "");
+ return;
+ }
+ if (publicType.matrixRows > 0) {
+ error(loc, "cannot be a matrix", GetStorageQualifierString(qualifier.storage), "");
+ return;
+ }
+ if (qualifier.isAuxiliary())
+ error(loc, "can't use auxiliary qualifier on a fragment output", "centroid/sample/patch", "");
+ if (qualifier.isInterpolation())
+ error(loc, "can't use interpolation qualifier on a fragment output", "flat/smooth/noperspective", "");
+ if (publicType.basicType == EbtDouble)
+ error(loc, "cannot contain a double", GetStorageQualifierString(qualifier.storage), "");
+ break;
+
+ case EShLangCompute:
+ error(loc, "global storage output qualifier cannot be used in a compute shader", "out", "");
+ break;
+
+ default:
+ break;
+ }
+ }
+}
+
+//
+// Merge characteristics of the 'src' qualifier into the 'dst'.
+// If there is duplication, issue error messages, unless 'force'
+// is specified, which means to just override default settings.
+//
+// Also, when force is false, it will be assumed that 'src' follows
+// 'dst', for the purpose of error checking order for versions
+// that require specific orderings of qualifiers.
+//
+void TParseContext::mergeQualifiers(const TSourceLoc& loc, TQualifier& dst, const TQualifier& src, bool force)
+{
+ // Multiple auxiliary qualifiers (mostly done later by 'individual qualifiers')
+ if (src.isAuxiliary() && dst.isAuxiliary())
+ error(loc, "can only have one auxiliary qualifier (centroid, patch, and sample)", "", "");
+
+ // Multiple interpolation qualifiers (mostly done later by 'individual qualifiers')
+ if (src.isInterpolation() && dst.isInterpolation())
+ error(loc, "can only have one interpolation qualifier (flat, smooth, noperspective)", "", "");
+
+ // Ordering
+ if (! force && ((profile != EEsProfile && version < 420) ||
+ (profile == EEsProfile && version < 310))
+ && ! extensionTurnedOn(E_GL_ARB_shading_language_420pack)) {
+ // non-function parameters
+ if (src.noContraction && (dst.invariant || dst.isInterpolation() || dst.isAuxiliary() || dst.storage != EvqTemporary || dst.precision != EpqNone))
+ error(loc, "precise qualifier must appear first", "", "");
+ if (src.invariant && (dst.isInterpolation() || dst.isAuxiliary() || dst.storage != EvqTemporary || dst.precision != EpqNone))
+ error(loc, "invariant qualifier must appear before interpolation, storage, and precision qualifiers ", "", "");
+ else if (src.isInterpolation() && (dst.isAuxiliary() || dst.storage != EvqTemporary || dst.precision != EpqNone))
+ error(loc, "interpolation qualifiers must appear before storage and precision qualifiers", "", "");
+ else if (src.isAuxiliary() && (dst.storage != EvqTemporary || dst.precision != EpqNone))
+ error(loc, "Auxiliary qualifiers (centroid, patch, and sample) must appear before storage and precision qualifiers", "", "");
+ else if (src.storage != EvqTemporary && (dst.precision != EpqNone))
+ error(loc, "precision qualifier must appear as last qualifier", "", "");
+
+ // function parameters
+ if (src.noContraction && (dst.storage == EvqConst || dst.storage == EvqIn || dst.storage == EvqOut))
+ error(loc, "precise qualifier must appear first", "", "");
+ if (src.storage == EvqConst && (dst.storage == EvqIn || dst.storage == EvqOut))
+ error(loc, "in/out must appear before const", "", "");
+ }
+
+ // Storage qualification
+ if (dst.storage == EvqTemporary || dst.storage == EvqGlobal)
+ dst.storage = src.storage;
+ else if ((dst.storage == EvqIn && src.storage == EvqOut) ||
+ (dst.storage == EvqOut && src.storage == EvqIn))
+ dst.storage = EvqInOut;
+ else if ((dst.storage == EvqIn && src.storage == EvqConst) ||
+ (dst.storage == EvqConst && src.storage == EvqIn))
+ dst.storage = EvqConstReadOnly;
+ else if (src.storage != EvqTemporary &&
+ src.storage != EvqGlobal)
+ error(loc, "too many storage qualifiers", GetStorageQualifierString(src.storage), "");
+
+ // Precision qualifiers
+ if (! force && src.precision != EpqNone && dst.precision != EpqNone)
+ error(loc, "only one precision qualifier allowed", GetPrecisionQualifierString(src.precision), "");
+ if (dst.precision == EpqNone || (force && src.precision != EpqNone))
+ dst.precision = src.precision;
+
+ // Layout qualifiers
+ mergeObjectLayoutQualifiers(dst, src, false);
+
+ // individual qualifiers
+ bool repeated = false;
+ #define MERGE_SINGLETON(field) repeated |= dst.field && src.field; dst.field |= src.field;
+ MERGE_SINGLETON(invariant);
+ MERGE_SINGLETON(noContraction);
+ MERGE_SINGLETON(centroid);
+ MERGE_SINGLETON(smooth);
+ MERGE_SINGLETON(flat);
+ MERGE_SINGLETON(nopersp);
+ MERGE_SINGLETON(patch);
+ MERGE_SINGLETON(sample);
+ MERGE_SINGLETON(coherent);
+ MERGE_SINGLETON(volatil);
+ MERGE_SINGLETON(restrict);
+ MERGE_SINGLETON(readonly);
+ MERGE_SINGLETON(writeonly);
+ MERGE_SINGLETON(specConstant);
+
+ if (repeated)
+ error(loc, "replicated qualifiers", "", "");
+}
+
+void TParseContext::setDefaultPrecision(const TSourceLoc& loc, TPublicType& publicType, TPrecisionQualifier qualifier)
+{
+ TBasicType basicType = publicType.basicType;
+
+ if (basicType == EbtSampler) {
+ defaultSamplerPrecision[computeSamplerTypeIndex(publicType.sampler)] = qualifier;
+
+ return; // all is well
+ }
+
+ if (basicType == EbtInt || basicType == EbtFloat) {
+ if (publicType.isScalar()) {
+ defaultPrecision[basicType] = qualifier;
+ if (basicType == EbtInt)
+ defaultPrecision[EbtUint] = qualifier;
+
+ return; // all is well
+ }
+ }
+
+ if (basicType == EbtAtomicUint) {
+ if (qualifier != EpqHigh)
+ error(loc, "can only apply highp to atomic_uint", "precision", "");
+
+ return;
+ }
+
+ error(loc, "cannot apply precision statement to this type; use 'float', 'int' or a sampler type", TType::getBasicString(basicType), "");
+}
+
+// used to flatten the sampler type space into a single dimension
+// correlates with the declaration of defaultSamplerPrecision[]
+int TParseContext::computeSamplerTypeIndex(TSampler& sampler)
+{
+ int arrayIndex = sampler.arrayed ? 1 : 0;
+ int shadowIndex = sampler.shadow ? 1 : 0;
+ int externalIndex = sampler.external ? 1 : 0;
+
+ return EsdNumDims * (EbtNumTypes * (2 * (2 * arrayIndex + shadowIndex) + externalIndex) + sampler.type) + sampler.dim;
+}
+
+TPrecisionQualifier TParseContext::getDefaultPrecision(TPublicType& publicType)
+{
+ if (publicType.basicType == EbtSampler)
+ return defaultSamplerPrecision[computeSamplerTypeIndex(publicType.sampler)];
+ else
+ return defaultPrecision[publicType.basicType];
+}
+
+void TParseContext::precisionQualifierCheck(const TSourceLoc& loc, TBasicType baseType, TQualifier& qualifier)
+{
+ // Built-in symbols are allowed some ambiguous precisions, to be pinned down
+ // later by context.
+ if (profile != EEsProfile || parsingBuiltins)
+ return;
+
+ if (baseType == EbtAtomicUint && qualifier.precision != EpqNone && qualifier.precision != EpqHigh)
+ error(loc, "atomic counters can only be highp", "atomic_uint", "");
+
+ if (baseType == EbtFloat || baseType == EbtUint || baseType == EbtInt || baseType == EbtSampler || baseType == EbtAtomicUint) {
+ if (qualifier.precision == EpqNone) {
+ if (relaxedErrors())
+ warn(loc, "type requires declaration of default precision qualifier", TType::getBasicString(baseType), "substituting 'mediump'");
+ else
+ error(loc, "type requires declaration of default precision qualifier", TType::getBasicString(baseType), "");
+ qualifier.precision = EpqMedium;
+ defaultPrecision[baseType] = EpqMedium;
+ }
+ } else if (qualifier.precision != EpqNone)
+ error(loc, "type cannot have precision qualifier", TType::getBasicString(baseType), "");
+}
+
+void TParseContext::parameterTypeCheck(const TSourceLoc& loc, TStorageQualifier qualifier, const TType& type)
+{
+ if ((qualifier == EvqOut || qualifier == EvqInOut) && (type.getBasicType() == EbtSampler || type.getBasicType() == EbtAtomicUint))
+ error(loc, "samplers and atomic_uints cannot be output parameters", type.getBasicTypeString().c_str(), "");
+}
+
+bool TParseContext::containsFieldWithBasicType(const TType& type, TBasicType basicType)
+{
+ if (type.getBasicType() == basicType)
+ return true;
+
+ if (type.getBasicType() == EbtStruct) {
+ const TTypeList& structure = *type.getStruct();
+ for (unsigned int i = 0; i < structure.size(); ++i) {
+ if (containsFieldWithBasicType(*structure[i].type, basicType))
+ return true;
+ }
+ }
+
+ return false;
+}
+
+//
+// Do size checking for an array type's size.
+//
+void TParseContext::arraySizeCheck(const TSourceLoc& loc, TIntermTyped* expr, TArraySize& sizePair)
+{
+ bool isConst = false;
+ sizePair.node = nullptr;
+
+ int size = 1;
+
+ TIntermConstantUnion* constant = expr->getAsConstantUnion();
+ if (constant) {
+ // handle true (non-specialization) constant
+ size = constant->getConstArray()[0].getIConst();
+ isConst = true;
+ } else {
+ // see if it's a specialization constant instead
+ if (expr->getQualifier().isSpecConstant()) {
+ isConst = true;
+ sizePair.node = expr;
+ TIntermSymbol* symbol = expr->getAsSymbolNode();
+ if (symbol && symbol->getConstArray().size() > 0)
+ size = symbol->getConstArray()[0].getIConst();
+ }
+ }
+
+ sizePair.size = size;
+
+ if (! isConst || (expr->getBasicType() != EbtInt && expr->getBasicType() != EbtUint)) {
+ error(loc, "array size must be a constant integer expression", "", "");
+ return;
+ }
+
+ if (size <= 0) {
+ error(loc, "array size must be a positive integer", "", "");
+ return;
+ }
+}
+
+//
+// See if this qualifier can be an array.
+//
+// Returns true if there is an error.
+//
+bool TParseContext::arrayQualifierError(const TSourceLoc& loc, const TQualifier& qualifier)
+{
+ if (qualifier.storage == EvqConst) {
+ profileRequires(loc, ENoProfile, 120, E_GL_3DL_array_objects, "const array");
+ profileRequires(loc, EEsProfile, 300, nullptr, "const array");
+ }
+
+ if (qualifier.storage == EvqVaryingIn && language == EShLangVertex) {
+ requireProfile(loc, ~EEsProfile, "vertex input arrays");
+ profileRequires(loc, ENoProfile, 150, nullptr, "vertex input arrays");
+ }
+
+ return false;
+}
+
+//
+// See if this qualifier and type combination can be an array.
+// Assumes arrayQualifierError() was also called to catch the type-invariant tests.
+//
+// Returns true if there is an error.
+//
+bool TParseContext::arrayError(const TSourceLoc& loc, const TType& type)
+{
+ if (type.getQualifier().storage == EvqVaryingOut && language == EShLangVertex) {
+ if (type.isArrayOfArrays())
+ requireProfile(loc, ~EEsProfile, "vertex-shader array-of-array output");
+ else if (type.isStruct())
+ requireProfile(loc, ~EEsProfile, "vertex-shader array-of-struct output");
+ }
+ if (type.getQualifier().storage == EvqVaryingIn && language == EShLangFragment) {
+ if (type.isArrayOfArrays())
+ requireProfile(loc, ~EEsProfile, "fragment-shader array-of-array input");
+ else if (type.isStruct())
+ requireProfile(loc, ~EEsProfile, "fragment-shader array-of-struct input");
+ }
+ if (type.getQualifier().storage == EvqVaryingOut && language == EShLangFragment) {
+ if (type.isArrayOfArrays())
+ requireProfile(loc, ~EEsProfile, "fragment-shader array-of-array output");
+ }
+
+ return false;
+}
+
+//
+// Require array to be completely sized
+//
+void TParseContext::arraySizeRequiredCheck(const TSourceLoc& loc, const TArraySizes& arraySizes)
+{
+ if (arraySizes.isImplicit())
+ error(loc, "array size required", "", "");
+}
+
+void TParseContext::structArrayCheck(const TSourceLoc& /*loc*/, const TType& type)
+{
+ const TTypeList& structure = *type.getStruct();
+ for (int m = 0; m < (int)structure.size(); ++m) {
+ const TType& member = *structure[m].type;
+ if (member.isArray())
+ arraySizeRequiredCheck(structure[m].loc, *member.getArraySizes());
+ }
+}
+
+void TParseContext::arrayUnsizedCheck(const TSourceLoc& loc, const TQualifier& qualifier, const TArraySizes* arraySizes, bool initializer, bool lastMember)
+{
+ assert(arraySizes);
+
+ // always allow special built-in ins/outs sized to topologies
+ if (parsingBuiltins)
+ return;
+
+ // always allow an initializer to set any unknown array sizes
+ if (initializer)
+ return;
+
+ // No environment lets any non-outer-dimension that's to be implicitly sized
+ if (arraySizes->isInnerImplicit())
+ error(loc, "only outermost dimension of an array of arrays can be implicitly sized", "[]", "");
+
+ // desktop always allows outer-dimension-unsized variable arrays,
+ if (profile != EEsProfile)
+ return;
+
+ // for ES, if size isn't coming from an initializer, it has to be explicitly declared now,
+ // with very few exceptions
+
+ // last member of ssbo block exception:
+ if (qualifier.storage == EvqBuffer && lastMember)
+ return;
+
+ // implicitly-sized io exceptions:
+ switch (language) {
+ case EShLangGeometry:
+ if (qualifier.storage == EvqVaryingIn)
+ if (extensionsTurnedOn(Num_AEP_geometry_shader, AEP_geometry_shader))
+ return;
+ break;
+ case EShLangTessControl:
+ if ( qualifier.storage == EvqVaryingIn ||
+ (qualifier.storage == EvqVaryingOut && ! qualifier.patch))
+ if (extensionsTurnedOn(Num_AEP_tessellation_shader, AEP_tessellation_shader))
+ return;
+ break;
+ case EShLangTessEvaluation:
+ if ((qualifier.storage == EvqVaryingIn && ! qualifier.patch) ||
+ qualifier.storage == EvqVaryingOut)
+ if (extensionsTurnedOn(Num_AEP_tessellation_shader, AEP_tessellation_shader))
+ return;
+ break;
+ default:
+ break;
+ }
+
+ arraySizeRequiredCheck(loc, *arraySizes);
+}
+
+void TParseContext::arrayOfArrayVersionCheck(const TSourceLoc& loc)
+{
+ const char* feature = "arrays of arrays";
+
+ requireProfile(loc, EEsProfile | ECoreProfile | ECompatibilityProfile, feature);
+ profileRequires(loc, EEsProfile, 310, nullptr, feature);
+ profileRequires(loc, ECoreProfile | ECompatibilityProfile, 430, nullptr, feature);
+}
+
+void TParseContext::arrayDimCheck(const TSourceLoc& loc, const TArraySizes* sizes1, const TArraySizes* sizes2)
+{
+ if ((sizes1 && sizes2) ||
+ (sizes1 && sizes1->getNumDims() > 1) ||
+ (sizes2 && sizes2->getNumDims() > 1))
+ arrayOfArrayVersionCheck(loc);
+}
+
+void TParseContext::arrayDimCheck(const TSourceLoc& loc, const TType* type, const TArraySizes* sizes2)
+{
+ // skip checking for multiple dimensions on the type; it was caught earlier
+ if ((type && type->isArray() && sizes2) ||
+ (sizes2 && sizes2->getNumDims() > 1))
+ arrayOfArrayVersionCheck(loc);
+}
+
+// Merge array dimensions listed in 'sizes' onto the type's array dimensions.
+//
+// From the spec: "vec4[2] a[3]; // size-3 array of size-2 array of vec4"
+//
+// That means, the 'sizes' go in front of the 'type' as outermost sizes.
+// 'type' is the type part of the declaration (to the left)
+// 'sizes' is the arrayness tagged on the identifier (to the right)
+//
+void TParseContext::arrayDimMerge(TType& type, const TArraySizes* sizes)
+{
+ if (sizes)
+ type.addArrayOuterSizes(*sizes);
+}
+
+//
+// Do all the semantic checking for declaring or redeclaring an array, with and
+// without a size, and make the right changes to the symbol table.
+//
+void TParseContext::declareArray(const TSourceLoc& loc, TString& identifier, const TType& type, TSymbol*& symbol, bool& newDeclaration)
+{
+ if (! symbol) {
+ bool currentScope;
+ symbol = symbolTable.find(identifier, nullptr, &currentScope);
+
+ if (symbol && builtInName(identifier) && ! symbolTable.atBuiltInLevel()) {
+ // bad shader (errors already reported) trying to redeclare a built-in name as an array
+ return;
+ }
+ if (symbol == nullptr || ! currentScope) {
+ //
+ // Successfully process a new definition.
+ // (Redeclarations have to take place at the same scope; otherwise they are hiding declarations)
+ //
+ symbol = new TVariable(&identifier, type);
+ symbolTable.insert(*symbol);
+ newDeclaration = true;
+
+ if (! symbolTable.atBuiltInLevel()) {
+ if (isIoResizeArray(type)) {
+ ioArraySymbolResizeList.push_back(symbol);
+ checkIoArraysConsistency(loc, true);
+ } else
+ fixIoArraySize(loc, symbol->getWritableType());
+ }
+
+ return;
+ }
+ if (symbol->getAsAnonMember()) {
+ error(loc, "cannot redeclare a user-block member array", identifier.c_str(), "");
+ symbol = nullptr;
+ return;
+ }
+ }
+
+ //
+ // Process a redeclaration.
+ //
+
+ if (! symbol) {
+ error(loc, "array variable name expected", identifier.c_str(), "");
+ return;
+ }
+
+ // redeclareBuiltinVariable() should have already done the copyUp()
+ TType& existingType = symbol->getWritableType();
+
+ if (! existingType.isArray()) {
+ error(loc, "redeclaring non-array as array", identifier.c_str(), "");
+ return;
+ }
+
+ if (! existingType.sameElementType(type)) {
+ error(loc, "redeclaration of array with a different element type", identifier.c_str(), "");
+ return;
+ }
+
+ if (! existingType.sameInnerArrayness(type)) {
+ error(loc, "redeclaration of array with a different array dimensions or sizes", identifier.c_str(), "");
+ return;
+ }
+
+ if (existingType.isExplicitlySizedArray()) {
+ // be more leniant for input arrays to geometry shaders and tessellation control outputs, where the redeclaration is the same size
+ if (! (isIoResizeArray(type) && existingType.getOuterArraySize() == type.getOuterArraySize()))
+ error(loc, "redeclaration of array with size", identifier.c_str(), "");
+ return;
+ }
+
+ arrayLimitCheck(loc, identifier, type.getOuterArraySize());
+
+ existingType.updateArraySizes(type);
+
+ if (isIoResizeArray(type))
+ checkIoArraysConsistency(loc);
+}
+
+void TParseContext::updateImplicitArraySize(const TSourceLoc& loc, TIntermNode *node, int index)
+{
+ // maybe there is nothing to do...
+ TIntermTyped* typedNode = node->getAsTyped();
+ if (typedNode->getType().getImplicitArraySize() > index)
+ return;
+
+ // something to do...
+
+ // Figure out what symbol to lookup, as we will use its type to edit for the size change,
+ // as that type will be shared through shallow copies for future references.
+ TSymbol* symbol = nullptr;
+ int blockIndex = -1;
+ const TString* lookupName = nullptr;
+ if (node->getAsSymbolNode())
+ lookupName = &node->getAsSymbolNode()->getName();
+ else if (node->getAsBinaryNode()) {
+ const TIntermBinary* deref = node->getAsBinaryNode();
+ // This has to be the result of a block dereference, unless it's bad shader code
+ // If it's a uniform block, then an error will be issued elsewhere, but
+ // return early now to avoid crashing later in this function.
+ if (deref->getLeft()->getBasicType() != EbtBlock ||
+ deref->getLeft()->getType().getQualifier().storage == EvqUniform ||
+ deref->getRight()->getAsConstantUnion() == nullptr)
+ return;
+
+ const TIntermTyped* left = deref->getLeft();
+ const TIntermTyped* right = deref->getRight();
+
+ if (left->getAsBinaryNode()) {
+ left = left->getAsBinaryNode()->getLeft(); // Block array access
+ assert(left->isArray());
+ }
+
+ if (! left->getAsSymbolNode())
+ return;
+
+ blockIndex = right->getAsConstantUnion()->getConstArray()[0].getIConst();
+
+ lookupName = &left->getAsSymbolNode()->getName();
+ if (IsAnonymous(*lookupName))
+ lookupName = &(*left->getType().getStruct())[blockIndex].type->getFieldName();
+ }
+
+ // Lookup the symbol, should only fail if shader code is incorrect
+ symbol = symbolTable.find(*lookupName);
+ if (symbol == nullptr)
+ return;
+
+ if (symbol->getAsFunction()) {
+ error(loc, "array variable name expected", symbol->getName().c_str(), "");
+ return;
+ }
+
+ if (symbol->getType().isStruct() && blockIndex != -1)
+ (*symbol->getWritableType().getStruct())[blockIndex].type->setImplicitArraySize(index + 1);
+ else
+ symbol->getWritableType().setImplicitArraySize(index + 1);
+}
+
+// Returns true if the first argument to the #line directive is the line number for the next line.
+//
+// Desktop, pre-version 3.30: "After processing this directive
+// (including its new-line), the implementation will behave as if it is compiling at line number line+1 and
+// source string number source-string-number."
+//
+// Desktop, version 3.30 and later, and ES: "After processing this directive
+// (including its new-line), the implementation will behave as if it is compiling at line number line and
+// source string number source-string-number.
+bool TParseContext::lineDirectiveShouldSetNextLine() const
+{
+ return profile == EEsProfile || version >= 330;
+}
+
+//
+// Enforce non-initializer type/qualifier rules.
+//
+void TParseContext::nonInitConstCheck(const TSourceLoc& loc, TString& identifier, TType& type)
+{
+ //
+ // Make the qualifier make sense, given that there is an initializer.
+ //
+ if (type.getQualifier().storage == EvqConst ||
+ type.getQualifier().storage == EvqConstReadOnly) {
+ type.getQualifier().makeTemporary();
+ error(loc, "variables with qualifier 'const' must be initialized", identifier.c_str(), "");
+ }
+}
+
+//
+// See if the identifier is a built-in symbol that can be redeclared, and if so,
+// copy the symbol table's read-only built-in variable to the current
+// global level, where it can be modified based on the passed in type.
+//
+// Returns nullptr if no redeclaration took place; meaning a normal declaration still
+// needs to occur for it, not necessarily an error.
+//
+// Returns a redeclared and type-modified variable if a redeclarated occurred.
+//
+TSymbol* TParseContext::redeclareBuiltinVariable(const TSourceLoc& loc, const TString& identifier, const TQualifier& qualifier, const TShaderQualifiers& publicType, bool& newDeclaration)
+{
+ if (! builtInName(identifier) || symbolTable.atBuiltInLevel() || ! symbolTable.atGlobalLevel())
+ return nullptr;
+
+ bool nonEsRedecls = (profile != EEsProfile && (version >= 130 || identifier == "gl_TexCoord"));
+ bool esRedecls = (profile == EEsProfile && extensionsTurnedOn(Num_AEP_shader_io_blocks, AEP_shader_io_blocks));
+ if (! esRedecls && ! nonEsRedecls)
+ return nullptr;
+
+ // Special case when using GL_ARB_separate_shader_objects
+ bool ssoPre150 = false; // means the only reason this variable is redeclared is due to this combination
+ if (profile != EEsProfile && version <= 140 && extensionTurnedOn(E_GL_ARB_separate_shader_objects)) {
+ if (identifier == "gl_Position" ||
+ identifier == "gl_PointSize" ||
+ identifier == "gl_ClipVertex" ||
+ identifier == "gl_FogFragCoord")
+ ssoPre150 = true;
+ }
+
+ // Potentially redeclaring a built-in variable...
+
+ if (ssoPre150 ||
+ (identifier == "gl_FragDepth" && ((nonEsRedecls && version >= 420) || esRedecls)) ||
+ (identifier == "gl_FragCoord" && ((nonEsRedecls && version >= 150) || esRedecls)) ||
+ identifier == "gl_ClipDistance" ||
+ identifier == "gl_CullDistance" ||
+ identifier == "gl_FrontColor" ||
+ identifier == "gl_BackColor" ||
+ identifier == "gl_FrontSecondaryColor" ||
+ identifier == "gl_BackSecondaryColor" ||
+ identifier == "gl_SecondaryColor" ||
+ (identifier == "gl_Color" && language == EShLangFragment) ||
+ identifier == "gl_TexCoord") {
+
+ // Find the existing symbol, if any.
+ bool builtIn;
+ TSymbol* symbol = symbolTable.find(identifier, &builtIn);
+
+ // If the symbol was not found, this must be a version/profile/stage
+ // that doesn't have it.
+ if (! symbol)
+ return nullptr;
+
+ // If it wasn't at a built-in level, then it's already been redeclared;
+ // that is, this is a redeclaration of a redeclaration; reuse that initial
+ // redeclaration. Otherwise, make the new one.
+ if (builtIn) {
+ // Copy the symbol up to make a writable version
+ makeEditable(symbol);
+ newDeclaration = true;
+ }
+
+ // Now, modify the type of the copy, as per the type of the current redeclaration.
+
+ TQualifier& symbolQualifier = symbol->getWritableType().getQualifier();
+ if (ssoPre150) {
+ if (intermediate.inIoAccessed(identifier))
+ error(loc, "cannot redeclare after use", identifier.c_str(), "");
+ if (qualifier.hasLayout())
+ error(loc, "cannot apply layout qualifier to", "redeclaration", symbol->getName().c_str());
+ if (qualifier.isMemory() || qualifier.isAuxiliary() || (language == EShLangVertex && qualifier.storage != EvqVaryingOut) ||
+ (language == EShLangFragment && qualifier.storage != EvqVaryingIn))
+ error(loc, "cannot change storage, memory, or auxiliary qualification of", "redeclaration", symbol->getName().c_str());
+ if (! qualifier.smooth)
+ error(loc, "cannot change interpolation qualification of", "redeclaration", symbol->getName().c_str());
+ } else if (identifier == "gl_FrontColor" ||
+ identifier == "gl_BackColor" ||
+ identifier == "gl_FrontSecondaryColor" ||
+ identifier == "gl_BackSecondaryColor" ||
+ identifier == "gl_SecondaryColor" ||
+ identifier == "gl_Color") {
+ symbolQualifier.flat = qualifier.flat;
+ symbolQualifier.smooth = qualifier.smooth;
+ symbolQualifier.nopersp = qualifier.nopersp;
+ if (qualifier.hasLayout())
+ error(loc, "cannot apply layout qualifier to", "redeclaration", symbol->getName().c_str());
+ if (qualifier.isMemory() || qualifier.isAuxiliary() || symbol->getType().getQualifier().storage != qualifier.storage)
+ error(loc, "cannot change storage, memory, or auxiliary qualification of", "redeclaration", symbol->getName().c_str());
+ } else if (identifier == "gl_TexCoord" ||
+ identifier == "gl_ClipDistance" ||
+ identifier == "gl_CullDistance") {
+ if (qualifier.hasLayout() || qualifier.isMemory() || qualifier.isAuxiliary() ||
+ qualifier.nopersp != symbolQualifier.nopersp || qualifier.flat != symbolQualifier.flat ||
+ symbolQualifier.storage != qualifier.storage)
+ error(loc, "cannot change qualification of", "redeclaration", symbol->getName().c_str());
+ } else if (identifier == "gl_FragCoord") {
+ if (intermediate.inIoAccessed("gl_FragCoord"))
+ error(loc, "cannot redeclare after use", "gl_FragCoord", "");
+ if (qualifier.nopersp != symbolQualifier.nopersp || qualifier.flat != symbolQualifier.flat ||
+ qualifier.isMemory() || qualifier.isAuxiliary())
+ error(loc, "can only change layout qualification of", "redeclaration", symbol->getName().c_str());
+ if (qualifier.storage != EvqVaryingIn)
+ error(loc, "cannot change input storage qualification of", "redeclaration", symbol->getName().c_str());
+ if (! builtIn && (publicType.pixelCenterInteger != intermediate.getPixelCenterInteger() ||
+ publicType.originUpperLeft != intermediate.getOriginUpperLeft()))
+ error(loc, "cannot redeclare with different qualification:", "redeclaration", symbol->getName().c_str());
+ if (publicType.pixelCenterInteger)
+ intermediate.setPixelCenterInteger();
+ if (publicType.originUpperLeft)
+ intermediate.setOriginUpperLeft();
+ } else if (identifier == "gl_FragDepth") {
+ if (qualifier.nopersp != symbolQualifier.nopersp || qualifier.flat != symbolQualifier.flat ||
+ qualifier.isMemory() || qualifier.isAuxiliary())
+ error(loc, "can only change layout qualification of", "redeclaration", symbol->getName().c_str());
+ if (qualifier.storage != EvqVaryingOut)
+ error(loc, "cannot change output storage qualification of", "redeclaration", symbol->getName().c_str());
+ if (publicType.layoutDepth != EldNone) {
+ if (intermediate.inIoAccessed("gl_FragDepth"))
+ error(loc, "cannot redeclare after use", "gl_FragDepth", "");
+ if (! intermediate.setDepth(publicType.layoutDepth))
+ error(loc, "all redeclarations must use the same depth layout on", "redeclaration", symbol->getName().c_str());
+ }
+
+ }
+ // TODO: semantics quality: separate smooth from nothing declared, then use IsInterpolation for several tests above
+
+ return symbol;
+ }
+
+ return nullptr;
+}
+
+//
+// Either redeclare the requested block, or give an error message why it can't be done.
+//
+// TODO: functionality: explicitly sizing members of redeclared blocks is not giving them an explicit size
+void TParseContext::redeclareBuiltinBlock(const TSourceLoc& loc, TTypeList& newTypeList, const TString& blockName, const TString* instanceName, TArraySizes* arraySizes)
+{
+ const char* feature = "built-in block redeclaration";
+ profileRequires(loc, EEsProfile, 0, Num_AEP_shader_io_blocks, AEP_shader_io_blocks, feature);
+ profileRequires(loc, ~EEsProfile, 410, E_GL_ARB_separate_shader_objects, feature);
+
+ if (blockName != "gl_PerVertex" && blockName != "gl_PerFragment") {
+ error(loc, "cannot redeclare block: ", "block declaration", blockName.c_str());
+ return;
+ }
+
+ // Redeclaring a built-in block...
+
+ if (instanceName && ! builtInName(*instanceName)) {
+ error(loc, "cannot redeclare a built-in block with a user name", instanceName->c_str(), "");
+ return;
+ }
+
+ // Blocks with instance names are easy to find, lookup the instance name,
+ // Anonymous blocks need to be found via a member.
+ bool builtIn;
+ TSymbol* block;
+ if (instanceName)
+ block = symbolTable.find(*instanceName, &builtIn);
+ else
+ block = symbolTable.find(newTypeList.front().type->getFieldName(), &builtIn);
+
+ // If the block was not found, this must be a version/profile/stage
+ // that doesn't have it, or the instance name is wrong.
+ const char* errorName = instanceName ? instanceName->c_str() : newTypeList.front().type->getFieldName().c_str();
+ if (! block) {
+ error(loc, "no declaration found for redeclaration", errorName, "");
+ return;
+ }
+ // Built-in blocks cannot be redeclared more than once, which if happened,
+ // we'd be finding the already redeclared one here, rather than the built in.
+ if (! builtIn) {
+ error(loc, "can only redeclare a built-in block once, and before any use", blockName.c_str(), "");
+ return;
+ }
+
+ // Copy the block to make a writable version, to insert into the block table after editing.
+ block = symbolTable.copyUpDeferredInsert(block);
+
+ if (block->getType().getBasicType() != EbtBlock) {
+ error(loc, "cannot redeclare a non block as a block", errorName, "");
+ return;
+ }
+
+ // Edit and error check the container against the redeclaration
+ // - remove unused members
+ // - ensure remaining qualifiers/types match
+ TType& type = block->getWritableType();
+ TTypeList::iterator member = type.getWritableStruct()->begin();
+ size_t numOriginalMembersFound = 0;
+ while (member != type.getStruct()->end()) {
+ // look for match
+ bool found = false;
+ TTypeList::const_iterator newMember;
+ TSourceLoc memberLoc;
+ memberLoc.init();
+ for (newMember = newTypeList.begin(); newMember != newTypeList.end(); ++newMember) {
+ if (member->type->getFieldName() == newMember->type->getFieldName()) {
+ found = true;
+ memberLoc = newMember->loc;
+ break;
+ }
+ }
+
+ if (found) {
+ ++numOriginalMembersFound;
+ // - ensure match between redeclared members' types
+ // - check for things that can't be changed
+ // - update things that can be changed
+ TType& oldType = *member->type;
+ const TType& newType = *newMember->type;
+ if (! newType.sameElementType(oldType))
+ error(memberLoc, "cannot redeclare block member with a different type", member->type->getFieldName().c_str(), "");
+ if (oldType.isArray() != newType.isArray())
+ error(memberLoc, "cannot change arrayness of redeclared block member", member->type->getFieldName().c_str(), "");
+ else if (! oldType.sameArrayness(newType) && oldType.isExplicitlySizedArray())
+ error(memberLoc, "cannot change array size of redeclared block member", member->type->getFieldName().c_str(), "");
+ else if (newType.isArray())
+ arrayLimitCheck(loc, member->type->getFieldName(), newType.getOuterArraySize());
+ if (newType.getQualifier().isMemory())
+ error(memberLoc, "cannot add memory qualifier to redeclared block member", member->type->getFieldName().c_str(), "");
+ if (newType.getQualifier().hasLayout())
+ error(memberLoc, "cannot add layout to redeclared block member", member->type->getFieldName().c_str(), "");
+ if (newType.getQualifier().patch)
+ error(memberLoc, "cannot add patch to redeclared block member", member->type->getFieldName().c_str(), "");
+ oldType.getQualifier().centroid = newType.getQualifier().centroid;
+ oldType.getQualifier().sample = newType.getQualifier().sample;
+ oldType.getQualifier().invariant = newType.getQualifier().invariant;
+ oldType.getQualifier().noContraction = newType.getQualifier().noContraction;
+ oldType.getQualifier().smooth = newType.getQualifier().smooth;
+ oldType.getQualifier().flat = newType.getQualifier().flat;
+ oldType.getQualifier().nopersp = newType.getQualifier().nopersp;
+
+ if (oldType.isImplicitlySizedArray() && newType.isExplicitlySizedArray())
+ oldType.changeOuterArraySize(newType.getOuterArraySize());
+
+ // go to next member
+ ++member;
+ } else {
+ // For missing members of anonymous blocks that have been redeclared,
+ // hide the original (shared) declaration.
+ // Instance-named blocks can just have the member removed.
+ if (instanceName)
+ member = type.getWritableStruct()->erase(member);
+ else {
+ member->type->hideMember();
+ ++member;
+ }
+ }
+ }
+
+ if (numOriginalMembersFound < newTypeList.size())
+ error(loc, "block redeclaration has extra members", blockName.c_str(), "");
+ if (type.isArray() != (arraySizes != nullptr))
+ error(loc, "cannot change arrayness of redeclared block", blockName.c_str(), "");
+ else if (type.isArray()) {
+ if (type.isExplicitlySizedArray() && arraySizes->getOuterSize() == UnsizedArraySize)
+ error(loc, "block already declared with size, can't redeclare as implicitly-sized", blockName.c_str(), "");
+ else if (type.isExplicitlySizedArray() && type.getArraySizes() != *arraySizes)
+ error(loc, "cannot change array size of redeclared block", blockName.c_str(), "");
+ else if (type.isImplicitlySizedArray() && arraySizes->getOuterSize() != UnsizedArraySize)
+ type.changeOuterArraySize(arraySizes->getOuterSize());
+ }
+
+ symbolTable.insert(*block);
+
+ // Check for general layout qualifier errors
+ layoutObjectCheck(loc, *block);
+
+ // Tracking for implicit sizing of array
+ if (isIoResizeArray(block->getType())) {
+ ioArraySymbolResizeList.push_back(block);
+ checkIoArraysConsistency(loc, true);
+ } else if (block->getType().isArray())
+ fixIoArraySize(loc, block->getWritableType());
+
+ // Save it in the AST for linker use.
+ intermediate.addSymbolLinkageNode(linkage, *block);
+}
+
+void TParseContext::paramCheckFix(const TSourceLoc& loc, const TStorageQualifier& qualifier, TType& type)
+{
+ switch (qualifier) {
+ case EvqConst:
+ case EvqConstReadOnly:
+ type.getQualifier().storage = EvqConstReadOnly;
+ break;
+ case EvqIn:
+ case EvqOut:
+ case EvqInOut:
+ type.getQualifier().storage = qualifier;
+ break;
+ case EvqGlobal:
+ case EvqTemporary:
+ type.getQualifier().storage = EvqIn;
+ break;
+ default:
+ type.getQualifier().storage = EvqIn;
+ error(loc, "storage qualifier not allowed on function parameter", GetStorageQualifierString(qualifier), "");
+ break;
+ }
+}
+
+void TParseContext::paramCheckFix(const TSourceLoc& loc, const TQualifier& qualifier, TType& type)
+{
+ if (qualifier.isMemory()) {
+ type.getQualifier().volatil = qualifier.volatil;
+ type.getQualifier().coherent = qualifier.coherent;
+ type.getQualifier().readonly = qualifier.readonly;
+ type.getQualifier().writeonly = qualifier.writeonly;
+ type.getQualifier().restrict = qualifier.restrict;
+ }
+
+ if (qualifier.isAuxiliary() ||
+ qualifier.isInterpolation())
+ error(loc, "cannot use auxiliary or interpolation qualifiers on a function parameter", "", "");
+ if (qualifier.hasLayout())
+ error(loc, "cannot use layout qualifiers on a function parameter", "", "");
+ if (qualifier.invariant)
+ error(loc, "cannot use invariant qualifier on a function parameter", "", "");
+ if (qualifier.noContraction) {
+ if (qualifier.storage == EvqOut || qualifier.storage == EvqInOut)
+ type.getQualifier().noContraction = true;
+ else
+ warn(loc, "qualifier has no effect on non-output parameters", "precise", "");
+ }
+
+ paramCheckFix(loc, qualifier.storage, type);
+}
+
+void TParseContext::nestedBlockCheck(const TSourceLoc& loc)
+{
+ if (structNestingLevel > 0)
+ error(loc, "cannot nest a block definition inside a structure or block", "", "");
+ ++structNestingLevel;
+}
+
+void TParseContext::nestedStructCheck(const TSourceLoc& loc)
+{
+ if (structNestingLevel > 0)
+ error(loc, "cannot nest a structure definition inside a structure or block", "", "");
+ ++structNestingLevel;
+}
+
+void TParseContext::arrayObjectCheck(const TSourceLoc& loc, const TType& type, const char* op)
+{
+ // Some versions don't allow comparing arrays or structures containing arrays
+ if (type.containsArray()) {
+ profileRequires(loc, ENoProfile, 120, E_GL_3DL_array_objects, op);
+ profileRequires(loc, EEsProfile, 300, nullptr, op);
+ }
+}
+
+void TParseContext::opaqueCheck(const TSourceLoc& loc, const TType& type, const char* op)
+{
+ if (containsFieldWithBasicType(type, EbtSampler))
+ error(loc, "can't use with samplers or structs containing samplers", op, "");
+}
+
+void TParseContext::specializationCheck(const TSourceLoc& loc, const TType& type, const char* op)
+{
+ if (type.containsSpecializationSize())
+ error(loc, "can't use with types containing arrays sized with a specialization constant", op, "");
+}
+
+void TParseContext::structTypeCheck(const TSourceLoc& /*loc*/, TPublicType& publicType)
+{
+ const TTypeList& typeList = *publicType.userDef->getStruct();
+
+ // fix and check for member storage qualifiers and types that don't belong within a structure
+ for (unsigned int member = 0; member < typeList.size(); ++member) {
+ TQualifier& memberQualifier = typeList[member].type->getQualifier();
+ const TSourceLoc& memberLoc = typeList[member].loc;
+ if (memberQualifier.isAuxiliary() ||
+ memberQualifier.isInterpolation() ||
+ (memberQualifier.storage != EvqTemporary && memberQualifier.storage != EvqGlobal))
+ error(memberLoc, "cannot use storage or interpolation qualifiers on structure members", typeList[member].type->getFieldName().c_str(), "");
+ if (memberQualifier.isMemory())
+ error(memberLoc, "cannot use memory qualifiers on structure members", typeList[member].type->getFieldName().c_str(), "");
+ if (memberQualifier.hasLayout()) {
+ error(memberLoc, "cannot use layout qualifiers on structure members", typeList[member].type->getFieldName().c_str(), "");
+ memberQualifier.clearLayout();
+ }
+ if (memberQualifier.invariant)
+ error(memberLoc, "cannot use invariant qualifier on structure members", typeList[member].type->getFieldName().c_str(), "");
+ }
+}
+
+//
+// See if this loop satisfies the limitations for ES 2.0 (version 100) for loops in Appendex A:
+//
+// "The loop index has type int or float.
+//
+// "The for statement has the form:
+// for ( init-declaration ; condition ; expression )
+// init-declaration has the form: type-specifier identifier = constant-expression
+// condition has the form: loop-index relational_operator constant-expression
+// where relational_operator is one of: > >= < <= == or !=
+// expression [sic] has one of the following forms:
+// loop-index++
+// loop-index--
+// loop-index += constant-expression
+// loop-index -= constant-expression
+//
+// The body is handled in an AST traversal.
+//
+void TParseContext::inductiveLoopCheck(const TSourceLoc& loc, TIntermNode* init, TIntermLoop* loop)
+{
+ // loop index init must exist and be a declaration, which shows up in the AST as an aggregate of size 1 of the declaration
+ bool badInit = false;
+ if (! init || ! init->getAsAggregate() || init->getAsAggregate()->getSequence().size() != 1)
+ badInit = true;
+ TIntermBinary* binaryInit = 0;
+ if (! badInit) {
+ // get the declaration assignment
+ binaryInit = init->getAsAggregate()->getSequence()[0]->getAsBinaryNode();
+ if (! binaryInit)
+ badInit = true;
+ }
+ if (badInit) {
+ error(loc, "inductive-loop init-declaration requires the form \"type-specifier loop-index = constant-expression\"", "limitations", "");
+ return;
+ }
+
+ // loop index must be type int or float
+ if (! binaryInit->getType().isScalar() || (binaryInit->getBasicType() != EbtInt && binaryInit->getBasicType() != EbtFloat)) {
+ error(loc, "inductive loop requires a scalar 'int' or 'float' loop index", "limitations", "");
+ return;
+ }
+
+ // init is the form "loop-index = constant"
+ if (binaryInit->getOp() != EOpAssign || ! binaryInit->getLeft()->getAsSymbolNode() || ! binaryInit->getRight()->getAsConstantUnion()) {
+ error(loc, "inductive-loop init-declaration requires the form \"type-specifier loop-index = constant-expression\"", "limitations", "");
+ return;
+ }
+
+ // get the unique id of the loop index
+ int loopIndex = binaryInit->getLeft()->getAsSymbolNode()->getId();
+ inductiveLoopIds.insert(loopIndex);
+
+ // condition's form must be "loop-index relational-operator constant-expression"
+ bool badCond = ! loop->getTest();
+ if (! badCond) {
+ TIntermBinary* binaryCond = loop->getTest()->getAsBinaryNode();
+ badCond = ! binaryCond;
+ if (! badCond) {
+ switch (binaryCond->getOp()) {
+ case EOpGreaterThan:
+ case EOpGreaterThanEqual:
+ case EOpLessThan:
+ case EOpLessThanEqual:
+ case EOpEqual:
+ case EOpNotEqual:
+ break;
+ default:
+ badCond = true;
+ }
+ }
+ if (binaryCond && (! binaryCond->getLeft()->getAsSymbolNode() ||
+ binaryCond->getLeft()->getAsSymbolNode()->getId() != loopIndex ||
+ ! binaryCond->getRight()->getAsConstantUnion()))
+ badCond = true;
+ }
+ if (badCond) {
+ error(loc, "inductive-loop condition requires the form \"loop-index <comparison-op> constant-expression\"", "limitations", "");
+ return;
+ }
+
+ // loop-index++
+ // loop-index--
+ // loop-index += constant-expression
+ // loop-index -= constant-expression
+ bool badTerminal = ! loop->getTerminal();
+ if (! badTerminal) {
+ TIntermUnary* unaryTerminal = loop->getTerminal()->getAsUnaryNode();
+ TIntermBinary* binaryTerminal = loop->getTerminal()->getAsBinaryNode();
+ if (unaryTerminal || binaryTerminal) {
+ switch(loop->getTerminal()->getAsOperator()->getOp()) {
+ case EOpPostDecrement:
+ case EOpPostIncrement:
+ case EOpAddAssign:
+ case EOpSubAssign:
+ break;
+ default:
+ badTerminal = true;
+ }
+ } else
+ badTerminal = true;
+ if (binaryTerminal && (! binaryTerminal->getLeft()->getAsSymbolNode() ||
+ binaryTerminal->getLeft()->getAsSymbolNode()->getId() != loopIndex ||
+ ! binaryTerminal->getRight()->getAsConstantUnion()))
+ badTerminal = true;
+ if (unaryTerminal && (! unaryTerminal->getOperand()->getAsSymbolNode() ||
+ unaryTerminal->getOperand()->getAsSymbolNode()->getId() != loopIndex))
+ badTerminal = true;
+ }
+ if (badTerminal) {
+ error(loc, "inductive-loop termination requires the form \"loop-index++, loop-index--, loop-index += constant-expression, or loop-index -= constant-expression\"", "limitations", "");
+ return;
+ }
+
+ // the body
+ inductiveLoopBodyCheck(loop->getBody(), loopIndex, symbolTable);
+}
+
+// Do limit checks for built-in arrays.
+void TParseContext::arrayLimitCheck(const TSourceLoc& loc, const TString& identifier, int size)
+{
+ if (identifier.compare("gl_TexCoord") == 0)
+ limitCheck(loc, size, "gl_MaxTextureCoords", "gl_TexCoord array size");
+ else if (identifier.compare("gl_ClipDistance") == 0)
+ limitCheck(loc, size, "gl_MaxClipDistances", "gl_ClipDistance array size");
+ else if (identifier.compare("gl_CullDistance") == 0)
+ limitCheck(loc, size, "gl_MaxCullDistances", "gl_CullDistance array size");
+}
+
+// See if the provided value is less than the symbol indicated by limit,
+// which should be a constant in the symbol table.
+void TParseContext::limitCheck(const TSourceLoc& loc, int value, const char* limit, const char* feature)
+{
+ TSymbol* symbol = symbolTable.find(limit);
+ assert(symbol->getAsVariable());
+ const TConstUnionArray& constArray = symbol->getAsVariable()->getConstArray();
+ assert(! constArray.empty());
+ if (value >= constArray[0].getIConst())
+ error(loc, "must be less than", feature, "%s (%d)", limit, constArray[0].getIConst());
+}
+
+//
+// Do any additional error checking, etc., once we know the parsing is done.
+//
+void TParseContext::finalErrorCheck()
+{
+ // Check on array indexes for ES 2.0 (version 100) limitations.
+ for (size_t i = 0; i < needsIndexLimitationChecking.size(); ++i)
+ constantIndexExpressionCheck(needsIndexLimitationChecking[i]);
+
+ // Check for stages that are enabled by extension.
+ // Can't do this at the beginning, it is chicken and egg to add a stage by
+ // extension.
+ // Stage-specific features were correctly tested for already, this is just
+ // about the stage itself.
+ switch (language) {
+ case EShLangGeometry:
+ if (profile == EEsProfile && version == 310)
+ requireExtensions(getCurrentLoc(), Num_AEP_geometry_shader, AEP_geometry_shader, "geometry shaders");
+ break;
+ case EShLangTessControl:
+ case EShLangTessEvaluation:
+ if (profile == EEsProfile && version == 310)
+ requireExtensions(getCurrentLoc(), Num_AEP_tessellation_shader, AEP_tessellation_shader, "tessellation shaders");
+ else if (profile != EEsProfile && version < 400)
+ requireExtensions(getCurrentLoc(), 1, &E_GL_ARB_tessellation_shader, "tessellation shaders");
+ break;
+ case EShLangCompute:
+ if (profile != EEsProfile && version < 430)
+ requireExtensions(getCurrentLoc(), 1, &E_GL_ARB_compute_shader, "compute shaders");
+ break;
+ default:
+ break;
+ }
+}
+
+//
+// Layout qualifier stuff.
+//
+
+// Put the id's layout qualification into the public type, for qualifiers not having a number set.
+// This is before we know any type information for error checking.
+void TParseContext::setLayoutQualifier(const TSourceLoc& loc, TPublicType& publicType, TString& id)
+{
+ std::transform(id.begin(), id.end(), id.begin(), ::tolower);
+
+ if (id == TQualifier::getLayoutMatrixString(ElmColumnMajor)) {
+ publicType.qualifier.layoutMatrix = ElmColumnMajor;
+ return;
+ }
+ if (id == TQualifier::getLayoutMatrixString(ElmRowMajor)) {
+ publicType.qualifier.layoutMatrix = ElmRowMajor;
+ return;
+ }
+ if (id == TQualifier::getLayoutPackingString(ElpPacked)) {
+ if (vulkan > 0)
+ vulkanRemoved(loc, "packed");
+ publicType.qualifier.layoutPacking = ElpPacked;
+ return;
+ }
+ if (id == TQualifier::getLayoutPackingString(ElpShared)) {
+ if (vulkan > 0)
+ vulkanRemoved(loc, "shared");
+ publicType.qualifier.layoutPacking = ElpShared;
+ return;
+ }
+ if (id == TQualifier::getLayoutPackingString(ElpStd140)) {
+ publicType.qualifier.layoutPacking = ElpStd140;
+ return;
+ }
+ if (id == TQualifier::getLayoutPackingString(ElpStd430)) {
+ requireProfile(loc, EEsProfile | ECoreProfile | ECompatibilityProfile, "std430");
+ profileRequires(loc, ECoreProfile | ECompatibilityProfile, 430, nullptr, "std430");
+ profileRequires(loc, EEsProfile, 310, nullptr, "std430");
+ publicType.qualifier.layoutPacking = ElpStd430;
+ return;
+ }
+ // TODO: compile-time performance: may need to stop doing linear searches
+ for (TLayoutFormat format = (TLayoutFormat)(ElfNone + 1); format < ElfCount; format = (TLayoutFormat)(format + 1)) {
+ if (id == TQualifier::getLayoutFormatString(format)) {
+ if ((format > ElfEsFloatGuard && format < ElfFloatGuard) ||
+ (format > ElfEsIntGuard && format < ElfIntGuard) ||
+ (format > ElfEsUintGuard && format < ElfCount))
+ requireProfile(loc, ENoProfile | ECoreProfile | ECompatibilityProfile, "image load-store format");
+ profileRequires(loc, ENoProfile | ECoreProfile | ECompatibilityProfile, 420, E_GL_ARB_shader_image_load_store, "image load store");
+ profileRequires(loc, EEsProfile, 310, E_GL_ARB_shader_image_load_store, "image load store");
+ publicType.qualifier.layoutFormat = format;
+ return;
+ }
+ }
+ if (id == "push_constant") {
+ requireVulkan(loc, "push_constant");
+ publicType.qualifier.layoutPushConstant = true;
+ return;
+ }
+ if (language == EShLangGeometry || language == EShLangTessEvaluation) {
+ if (id == TQualifier::getGeometryString(ElgTriangles)) {
+ publicType.shaderQualifiers.geometry = ElgTriangles;
+ return;
+ }
+ if (language == EShLangGeometry) {
+ if (id == TQualifier::getGeometryString(ElgPoints)) {
+ publicType.shaderQualifiers.geometry = ElgPoints;
+ return;
+ }
+ if (id == TQualifier::getGeometryString(ElgLineStrip)) {
+ publicType.shaderQualifiers.geometry = ElgLineStrip;
+ return;
+ }
+ if (id == TQualifier::getGeometryString(ElgLines)) {
+ publicType.shaderQualifiers.geometry = ElgLines;
+ return;
+ }
+ if (id == TQualifier::getGeometryString(ElgLinesAdjacency)) {
+ publicType.shaderQualifiers.geometry = ElgLinesAdjacency;
+ return;
+ }
+ if (id == TQualifier::getGeometryString(ElgTrianglesAdjacency)) {
+ publicType.shaderQualifiers.geometry = ElgTrianglesAdjacency;
+ return;
+ }
+ if (id == TQualifier::getGeometryString(ElgTriangleStrip)) {
+ publicType.shaderQualifiers.geometry = ElgTriangleStrip;
+ return;
+ }
+ } else {
+ assert(language == EShLangTessEvaluation);
+
+ // input primitive
+ if (id == TQualifier::getGeometryString(ElgTriangles)) {
+ publicType.shaderQualifiers.geometry = ElgTriangles;
+ return;
+ }
+ if (id == TQualifier::getGeometryString(ElgQuads)) {
+ publicType.shaderQualifiers.geometry = ElgQuads;
+ return;
+ }
+ if (id == TQualifier::getGeometryString(ElgIsolines)) {
+ publicType.shaderQualifiers.geometry = ElgIsolines;
+ return;
+ }
+
+ // vertex spacing
+ if (id == TQualifier::getVertexSpacingString(EvsEqual)) {
+ publicType.shaderQualifiers.spacing = EvsEqual;
+ return;
+ }
+ if (id == TQualifier::getVertexSpacingString(EvsFractionalEven)) {
+ publicType.shaderQualifiers.spacing = EvsFractionalEven;
+ return;
+ }
+ if (id == TQualifier::getVertexSpacingString(EvsFractionalOdd)) {
+ publicType.shaderQualifiers.spacing = EvsFractionalOdd;
+ return;
+ }
+
+ // triangle order
+ if (id == TQualifier::getVertexOrderString(EvoCw)) {
+ publicType.shaderQualifiers.order = EvoCw;
+ return;
+ }
+ if (id == TQualifier::getVertexOrderString(EvoCcw)) {
+ publicType.shaderQualifiers.order = EvoCcw;
+ return;
+ }
+
+ // point mode
+ if (id == "point_mode") {
+ publicType.shaderQualifiers.pointMode = true;
+ return;
+ }
+ }
+ }
+ if (language == EShLangFragment) {
+ if (id == "origin_upper_left") {
+ requireProfile(loc, ECoreProfile | ECompatibilityProfile, "origin_upper_left");
+ publicType.shaderQualifiers.originUpperLeft = true;
+ return;
+ }
+ if (id == "pixel_center_integer") {
+ requireProfile(loc, ECoreProfile | ECompatibilityProfile, "pixel_center_integer");
+ publicType.shaderQualifiers.pixelCenterInteger = true;
+ return;
+ }
+ if (id == "early_fragment_tests") {
+ profileRequires(loc, ENoProfile | ECoreProfile | ECompatibilityProfile, 420, E_GL_ARB_shader_image_load_store, "early_fragment_tests");
+ profileRequires(loc, EEsProfile, 310, nullptr, "early_fragment_tests");
+ publicType.shaderQualifiers.earlyFragmentTests = true;
+ return;
+ }
+ for (TLayoutDepth depth = (TLayoutDepth)(EldNone + 1); depth < EldCount; depth = (TLayoutDepth)(depth+1)) {
+ if (id == TQualifier::getLayoutDepthString(depth)) {
+ requireProfile(loc, ECoreProfile | ECompatibilityProfile, "depth layout qualifier");
+ profileRequires(loc, ECoreProfile | ECompatibilityProfile, 420, nullptr, "depth layout qualifier");
+ publicType.shaderQualifiers.layoutDepth = depth;
+ return;
+ }
+ }
+ if (id.compare(0, 13, "blend_support") == 0) {
+ bool found = false;
+ for (TBlendEquationShift be = (TBlendEquationShift)0; be < EBlendCount; be = (TBlendEquationShift)(be + 1)) {
+ if (id == TQualifier::getBlendEquationString(be)) {
+ requireExtensions(loc, 1, &E_GL_KHR_blend_equation_advanced, "blend equation");
+ intermediate.addBlendEquation(be);
+ publicType.shaderQualifiers.blendEquation = true;
+ found = true;
+ break;
+ }
+ }
+ if (! found)
+ error(loc, "unknown blend equation", "blend_support", "");
+ return;
+ }
+ }
+ error(loc, "unrecognized layout identifier, or qualifier requires assignment (e.g., binding = 4)", id.c_str(), "");
+}
+
+// Put the id's layout qualifier value into the public type, for qualifiers having a number set.
+// This is before we know any type information for error checking.
+void TParseContext::setLayoutQualifier(const TSourceLoc& loc, TPublicType& publicType, TString& id, const TIntermTyped* node)
+{
+ const char* feature = "layout-id value";
+ const char* nonLiteralFeature = "non-literal layout-id value";
+
+ integerCheck(node, feature);
+ const TIntermConstantUnion* constUnion = node->getAsConstantUnion();
+ int value;
+ if (constUnion) {
+ value = constUnion->getConstArray()[0].getIConst();
+ if (! constUnion->isLiteral()) {
+ requireProfile(loc, ECoreProfile | ECompatibilityProfile, nonLiteralFeature);
+ profileRequires(loc, ECoreProfile | ECompatibilityProfile, 440, E_GL_ARB_enhanced_layouts, nonLiteralFeature);
+ }
+ } else {
+ // grammar should have give out the error message
+ value = 0;
+ }
+
+ if (value < 0) {
+ error(loc, "cannot be negative", feature, "");
+ return;
+ }
+
+ std::transform(id.begin(), id.end(), id.begin(), ::tolower);
+
+ if (id == "offset") {
+ const char* feature = "uniform offset";
+ requireProfile(loc, EEsProfile | ECoreProfile | ECompatibilityProfile, feature);
+ const char* exts[2] = { E_GL_ARB_enhanced_layouts, E_GL_ARB_shader_atomic_counters };
+ profileRequires(loc, ECoreProfile | ECompatibilityProfile, 420, 2, exts, feature);
+ profileRequires(loc, EEsProfile, 310, nullptr, feature);
+ publicType.qualifier.layoutOffset = value;
+ return;
+ } else if (id == "align") {
+ const char* feature = "uniform buffer-member align";
+ requireProfile(loc, ECoreProfile | ECompatibilityProfile, feature);
+ profileRequires(loc, ECoreProfile | ECompatibilityProfile, 440, E_GL_ARB_enhanced_layouts, feature);
+ // "The specified alignment must be a power of 2, or a compile-time error results."
+ if (! IsPow2(value))
+ error(loc, "must be a power of 2", "align", "");
+ else
+ publicType.qualifier.layoutAlign = value;
+ return;
+ } else if (id == "location") {
+ profileRequires(loc, EEsProfile, 300, nullptr, "location");
+ const char* exts[2] = { E_GL_ARB_separate_shader_objects, E_GL_ARB_explicit_attrib_location };
+ profileRequires(loc, ~EEsProfile, 330, 2, exts, "location");
+ if ((unsigned int)value >= TQualifier::layoutLocationEnd)
+ error(loc, "location is too large", id.c_str(), "");
+ else
+ publicType.qualifier.layoutLocation = value;
+ return;
+ } else if (id == "set") {
+ if ((unsigned int)value >= TQualifier::layoutSetEnd)
+ error(loc, "set is too large", id.c_str(), "");
+ else
+ publicType.qualifier.layoutSet = value;
+ return;
+ } else if (id == "binding") {
+ profileRequires(loc, ~EEsProfile, 420, E_GL_ARB_shading_language_420pack, "binding");
+ profileRequires(loc, EEsProfile, 310, nullptr, "binding");
+ if ((unsigned int)value >= TQualifier::layoutBindingEnd)
+ error(loc, "binding is too large", id.c_str(), "");
+ else
+ publicType.qualifier.layoutBinding = value;
+ return;
+ } else if (id == "component") {
+ requireProfile(loc, ECoreProfile | ECompatibilityProfile, "component");
+ profileRequires(loc, ECoreProfile | ECompatibilityProfile, 440, E_GL_ARB_enhanced_layouts, "component");
+ if ((unsigned)value >= TQualifier::layoutComponentEnd)
+ error(loc, "component is too large", id.c_str(), "");
+ else
+ publicType.qualifier.layoutComponent = value;
+ return;
+ } else if (id.compare(0, 4, "xfb_") == 0) {
+ // "Any shader making any static use (after preprocessing) of any of these
+ // *xfb_* qualifiers will cause the shader to be in a transform feedback
+ // capturing mode and hence responsible for describing the transform feedback
+ // setup."
+ intermediate.setXfbMode();
+ const char* feature = "transform feedback qualifier";
+ requireStage(loc, (EShLanguageMask)(EShLangVertexMask | EShLangGeometryMask | EShLangTessControlMask | EShLangTessEvaluationMask), feature);
+ requireProfile(loc, ECoreProfile | ECompatibilityProfile, feature);
+ profileRequires(loc, ECoreProfile | ECompatibilityProfile, 440, E_GL_ARB_enhanced_layouts, feature);
+ if (id == "xfb_buffer") {
+ // "It is a compile-time error to specify an *xfb_buffer* that is greater than
+ // the implementation-dependent constant gl_MaxTransformFeedbackBuffers."
+ if (value >= resources.maxTransformFeedbackBuffers)
+ error(loc, "buffer is too large:", id.c_str(), "gl_MaxTransformFeedbackBuffers is %d", resources.maxTransformFeedbackBuffers);
+ if (value >= (int)TQualifier::layoutXfbBufferEnd)
+ error(loc, "buffer is too large:", id.c_str(), "internal max is %d", TQualifier::layoutXfbBufferEnd-1);
+ else
+ publicType.qualifier.layoutXfbBuffer = value;
+ return;
+ } else if (id == "xfb_offset") {
+ if (value >= (int)TQualifier::layoutXfbOffsetEnd)
+ error(loc, "offset is too large:", id.c_str(), "internal max is %d", TQualifier::layoutXfbOffsetEnd-1);
+ else
+ publicType.qualifier.layoutXfbOffset = value;
+ return;
+ } else if (id == "xfb_stride") {
+ // "The resulting stride (implicit or explicit), when divided by 4, must be less than or equal to the
+ // implementation-dependent constant gl_MaxTransformFeedbackInterleavedComponents."
+ if (value > 4 * resources.maxTransformFeedbackInterleavedComponents)
+ error(loc, "1/4 stride is too large:", id.c_str(), "gl_MaxTransformFeedbackInterleavedComponents is %d", resources.maxTransformFeedbackInterleavedComponents);
+ else if (value >= (int)TQualifier::layoutXfbStrideEnd)
+ error(loc, "stride is too large:", id.c_str(), "internal max is %d", TQualifier::layoutXfbStrideEnd-1);
+ if (value < (int)TQualifier::layoutXfbStrideEnd)
+ publicType.qualifier.layoutXfbStride = value;
+ return;
+ }
+ }
+
+ if (id == "input_attachment_index") {
+ requireVulkan(loc, "input_attachment_index");
+ if (value >= (int)TQualifier::layoutAttachmentEnd)
+ error(loc, "attachment index is too large", id.c_str(), "");
+ else
+ publicType.qualifier.layoutAttachment = value;
+ return;
+ }
+ if (id == "constant_id") {
+ requireSpv(loc, "constant_id");
+ if (value >= (int)TQualifier::layoutSpecConstantIdEnd) {
+ error(loc, "specialization-constant id is too large", id.c_str(), "");
+ } else {
+ publicType.qualifier.layoutSpecConstantId = value;
+ publicType.qualifier.specConstant = true;
+ if (! intermediate.addUsedConstantId(value))
+ error(loc, "specialization-constant id already used", id.c_str(), "");
+ }
+ return;
+ }
+
+ switch (language) {
+ case EShLangVertex:
+ break;
+
+ case EShLangTessControl:
+ if (id == "vertices") {
+ if (value == 0)
+ error(loc, "must be greater than 0", "vertices", "");
+ else
+ publicType.shaderQualifiers.vertices = value;
+ return;
+ }
+ break;
+
+ case EShLangTessEvaluation:
+ break;
+
+ case EShLangGeometry:
+ if (id == "invocations") {
+ profileRequires(loc, ECompatibilityProfile | ECoreProfile, 400, nullptr, "invocations");
+ if (value == 0)
+ error(loc, "must be at least 1", "invocations", "");
+ else
+ publicType.shaderQualifiers.invocations = value;
+ return;
+ }
+ if (id == "max_vertices") {
+ publicType.shaderQualifiers.vertices = value;
+ if (value > resources.maxGeometryOutputVertices)
+ error(loc, "too large, must be less than gl_MaxGeometryOutputVertices", "max_vertices", "");
+ return;
+ }
+ if (id == "stream") {
+ requireProfile(loc, ~EEsProfile, "selecting output stream");
+ publicType.qualifier.layoutStream = value;
+ if (value > 0)
+ intermediate.setMultiStream();
+ return;
+ }
+ break;
+
+ case EShLangFragment:
+ if (id == "index") {
+ requireProfile(loc, ECompatibilityProfile | ECoreProfile, "index layout qualifier on fragment output");
+ const char* exts[2] = { E_GL_ARB_separate_shader_objects, E_GL_ARB_explicit_attrib_location };
+ profileRequires(loc, ECompatibilityProfile | ECoreProfile, 330, 2, exts, "index layout qualifier on fragment output");
+
+ // "It is also a compile-time error if a fragment shader sets a layout index to less than 0 or greater than 1."
+ if (value < 0 || value > 1) {
+ value = 0;
+ error(loc, "value must be 0 or 1", "index", "");
+ }
+
+ publicType.qualifier.layoutIndex = value;
+ return;
+ }
+ break;
+
+ case EShLangCompute:
+ if (id.compare(0, 11, "local_size_") == 0) {
+ profileRequires(loc, EEsProfile, 310, 0, "gl_WorkGroupSize");
+ profileRequires(loc, ~EEsProfile, 430, E_GL_ARB_compute_shader, "gl_WorkGroupSize");
+ if (id == "local_size_x") {
+ publicType.shaderQualifiers.localSize[0] = value;
+ return;
+ }
+ if (id == "local_size_y") {
+ publicType.shaderQualifiers.localSize[1] = value;
+ return;
+ }
+ if (id == "local_size_z") {
+ publicType.shaderQualifiers.localSize[2] = value;
+ return;
+ }
+ if (spv > 0) {
+ if (id == "local_size_x_id") {
+ publicType.shaderQualifiers.localSizeSpecId[0] = value;
+ return;
+ }
+ if (id == "local_size_y_id") {
+ publicType.shaderQualifiers.localSizeSpecId[1] = value;
+ return;
+ }
+ if (id == "local_size_z_id") {
+ publicType.shaderQualifiers.localSizeSpecId[2] = value;
+ return;
+ }
+ }
+ }
+ break;
+
+ default:
+ break;
+ }
+
+ error(loc, "there is no such layout identifier for this stage taking an assigned value", id.c_str(), "");
+}
+
+// Merge any layout qualifier information from src into dst, leaving everything else in dst alone
+//
+// "More than one layout qualifier may appear in a single declaration.
+// Additionally, the same layout-qualifier-name can occur multiple times
+// within a layout qualifier or across multiple layout qualifiers in the
+// same declaration. When the same layout-qualifier-name occurs
+// multiple times, in a single declaration, the last occurrence overrides
+// the former occurrence(s). Further, if such a layout-qualifier-name
+// will effect subsequent declarations or other observable behavior, it
+// is only the last occurrence that will have any effect, behaving as if
+// the earlier occurrence(s) within the declaration are not present.
+// This is also true for overriding layout-qualifier-names, where one
+// overrides the other (e.g., row_major vs. column_major); only the last
+// occurrence has any effect."
+//
+void TParseContext::mergeObjectLayoutQualifiers(TQualifier& dst, const TQualifier& src, bool inheritOnly)
+{
+ if (src.hasMatrix())
+ dst.layoutMatrix = src.layoutMatrix;
+ if (src.hasPacking())
+ dst.layoutPacking = src.layoutPacking;
+
+ if (src.hasStream())
+ dst.layoutStream = src.layoutStream;
+
+ if (src.hasFormat())
+ dst.layoutFormat = src.layoutFormat;
+
+ if (src.hasXfbBuffer())
+ dst.layoutXfbBuffer = src.layoutXfbBuffer;
+
+ if (src.hasAlign())
+ dst.layoutAlign = src.layoutAlign;
+
+ if (! inheritOnly) {
+ if (src.hasLocation())
+ dst.layoutLocation = src.layoutLocation;
+ if (src.hasComponent())
+ dst.layoutComponent = src.layoutComponent;
+ if (src.hasIndex())
+ dst.layoutIndex = src.layoutIndex;
+
+ if (src.hasOffset())
+ dst.layoutOffset = src.layoutOffset;
+
+ if (src.hasSet())
+ dst.layoutSet = src.layoutSet;
+ if (src.layoutBinding != TQualifier::layoutBindingEnd)
+ dst.layoutBinding = src.layoutBinding;
+
+ if (src.hasXfbStride())
+ dst.layoutXfbStride = src.layoutXfbStride;
+ if (src.hasXfbOffset())
+ dst.layoutXfbOffset = src.layoutXfbOffset;
+ if (src.hasAttachment())
+ dst.layoutAttachment = src.layoutAttachment;
+ if (src.hasSpecConstantId())
+ dst.layoutSpecConstantId = src.layoutSpecConstantId;
+
+ if (src.layoutPushConstant)
+ dst.layoutPushConstant = true;
+ }
+}
+
+// Do error layout error checking given a full variable/block declaration.
+void TParseContext::layoutObjectCheck(const TSourceLoc& loc, const TSymbol& symbol)
+{
+ const TType& type = symbol.getType();
+ const TQualifier& qualifier = type.getQualifier();
+
+ // first, cross check WRT to just the type
+ layoutTypeCheck(loc, type);
+
+ // now, any remaining error checking based on the object itself
+
+ if (qualifier.hasAnyLocation()) {
+ switch (qualifier.storage) {
+ case EvqUniform:
+ case EvqBuffer:
+ if (symbol.getAsVariable() == nullptr)
+ error(loc, "can only be used on variable declaration", "location", "");
+ break;
+ default:
+ break;
+ }
+ }
+
+ // Check packing and matrix
+ if (qualifier.hasUniformLayout()) {
+ switch (qualifier.storage) {
+ case EvqUniform:
+ case EvqBuffer:
+ if (type.getBasicType() != EbtBlock) {
+ if (qualifier.hasMatrix())
+ error(loc, "cannot specify matrix layout on a variable declaration", "layout", "");
+ if (qualifier.hasPacking())
+ error(loc, "cannot specify packing on a variable declaration", "layout", "");
+ // "The offset qualifier can only be used on block members of blocks..."
+ if (qualifier.hasOffset() && type.getBasicType() != EbtAtomicUint)
+ error(loc, "cannot specify on a variable declaration", "offset", "");
+ // "The align qualifier can only be used on blocks or block members..."
+ if (qualifier.hasAlign())
+ error(loc, "cannot specify on a variable declaration", "align", "");
+ if (qualifier.layoutPushConstant)
+ error(loc, "can only specify on a uniform block", "push_constant", "");
+ }
+ break;
+ default:
+ // these were already filtered by layoutTypeCheck() (or its callees)
+ break;
+ }
+ }
+}
+
+// Do layout error checking with respect to a type.
+void TParseContext::layoutTypeCheck(const TSourceLoc& loc, const TType& type)
+{
+ const TQualifier& qualifier = type.getQualifier();
+
+ // first, intra-layout qualifier-only error checking
+ layoutQualifierCheck(loc, qualifier);
+
+ // now, error checking combining type and qualifier
+
+ if (qualifier.hasAnyLocation()) {
+ if (qualifier.hasLocation()) {
+ if (qualifier.storage == EvqVaryingOut && language == EShLangFragment) {
+ if (qualifier.layoutLocation >= (unsigned int)resources.maxDrawBuffers)
+ error(loc, "too large for fragment output", "location", "");
+ }
+ }
+ if (qualifier.hasComponent()) {
+ // "It is a compile-time error if this sequence of components gets larger than 3."
+ if (qualifier.layoutComponent + type.getVectorSize() > 4)
+ error(loc, "type overflows the available 4 components", "component", "");
+
+ // "It is a compile-time error to apply the component qualifier to a matrix, a structure, a block, or an array containing any of these."
+ if (type.isMatrix() || type.getBasicType() == EbtBlock || type.getBasicType() == EbtStruct)
+ error(loc, "cannot apply to a matrix, structure, or block", "component", "");
+ }
+
+ switch (qualifier.storage) {
+ case EvqVaryingIn:
+ case EvqVaryingOut:
+ if (type.getBasicType() == EbtBlock)
+ profileRequires(loc, ECoreProfile | ECompatibilityProfile, 440, E_GL_ARB_enhanced_layouts, "location qualifier on in/out block");
+ break;
+ case EvqUniform:
+ case EvqBuffer:
+ break;
+ default:
+ error(loc, "can only apply to uniform, buffer, in, or out storage qualifiers", "location", "");
+ break;
+ }
+
+ bool typeCollision;
+ int repeated = intermediate.addUsedLocation(qualifier, type, typeCollision);
+ if (repeated >= 0 && ! typeCollision)
+ error(loc, "overlapping use of location", "location", "%d", repeated);
+ // "fragment-shader outputs ... if two variables are placed within the same
+ // location, they must have the same underlying type (floating-point or integer)"
+ if (typeCollision && language == EShLangFragment && qualifier.isPipeOutput())
+ error(loc, "fragment outputs sharing the same location must be the same basic type", "location", "%d", repeated);
+ }
+
+ if (qualifier.hasXfbOffset() && qualifier.hasXfbBuffer()) {
+ int repeated = intermediate.addXfbBufferOffset(type);
+ if (repeated >= 0)
+ error(loc, "overlapping offsets at", "xfb_offset", "offset %d in buffer %d", repeated, qualifier.layoutXfbBuffer);
+
+ // "The offset must be a multiple of the size of the first component of the first
+ // qualified variable or block member, or a compile-time error results. Further, if applied to an aggregate
+ // containing a double, the offset must also be a multiple of 8..."
+ if (type.containsBasicType(EbtDouble) && ! IsMultipleOfPow2(qualifier.layoutXfbOffset, 8))
+ error(loc, "type contains double; xfb_offset must be a multiple of 8", "xfb_offset", "");
+ else if (! IsMultipleOfPow2(qualifier.layoutXfbOffset, 4))
+ error(loc, "must be a multiple of size of first component", "xfb_offset", "");
+ }
+
+ if (qualifier.hasXfbStride() && qualifier.hasXfbBuffer()) {
+ if (! intermediate.setXfbBufferStride(qualifier.layoutXfbBuffer, qualifier.layoutXfbStride))
+ error(loc, "all stride settings must match for xfb buffer", "xfb_stride", "%d", qualifier.layoutXfbBuffer);
+ }
+
+ if (qualifier.hasBinding()) {
+ // Binding checking, from the spec:
+ //
+ // "If the binding point for any uniform or shader storage block instance is less than zero, or greater than or
+ // equal to the implementation-dependent maximum number of uniform buffer bindings, a compile-time
+ // error will occur. When the binding identifier is used with a uniform or shader storage block instanced as
+ // an array of size N, all elements of the array from binding through binding + N - 1 must be within this
+ // range."
+ //
+ if (type.getBasicType() != EbtSampler && type.getBasicType() != EbtBlock && type.getBasicType() != EbtAtomicUint)
+ error(loc, "requires block, or sampler/image, or atomic-counter type", "binding", "");
+ if (type.getBasicType() == EbtSampler) {
+ int lastBinding = qualifier.layoutBinding;
+ if (type.isArray())
+ lastBinding += type.getCumulativeArraySize();
+ if (lastBinding >= resources.maxCombinedTextureImageUnits)
+ error(loc, "sampler binding not less than gl_MaxCombinedTextureImageUnits", "binding", type.isArray() ? "(using array)" : "");
+ }
+ if (type.getBasicType() == EbtAtomicUint) {
+ if (qualifier.layoutBinding >= (unsigned int)resources.maxAtomicCounterBindings) {
+ error(loc, "atomic_uint binding is too large; see gl_MaxAtomicCounterBindings", "binding", "");
+ return;
+ }
+ }
+ }
+
+ // atomic_uint
+ if (type.getBasicType() == EbtAtomicUint) {
+ if (! type.getQualifier().hasBinding())
+ error(loc, "layout(binding=X) is required", "atomic_uint", "");
+ }
+
+ // "The offset qualifier can only be used on block members of blocks..."
+ if (qualifier.hasOffset()) {
+ if (type.getBasicType() == EbtBlock)
+ error(loc, "only applies to block members, not blocks", "offset", "");
+ }
+
+ // Image format
+ if (qualifier.hasFormat()) {
+ if (! type.isImage())
+ error(loc, "only apply to images", TQualifier::getLayoutFormatString(qualifier.layoutFormat), "");
+ else {
+ if (type.getSampler().type == EbtFloat && qualifier.layoutFormat > ElfFloatGuard)
+ error(loc, "does not apply to floating point images", TQualifier::getLayoutFormatString(qualifier.layoutFormat), "");
+ if (type.getSampler().type == EbtInt && (qualifier.layoutFormat < ElfFloatGuard || qualifier.layoutFormat > ElfIntGuard))
+ error(loc, "does not apply to signed integer images", TQualifier::getLayoutFormatString(qualifier.layoutFormat), "");
+ if (type.getSampler().type == EbtUint && qualifier.layoutFormat < ElfIntGuard)
+ error(loc, "does not apply to unsigned integer images", TQualifier::getLayoutFormatString(qualifier.layoutFormat), "");
+
+ if (profile == EEsProfile) {
+ // "Except for image variables qualified with the format qualifiers r32f, r32i, and r32ui, image variables must
+ // specify either memory qualifier readonly or the memory qualifier writeonly."
+ if (! (qualifier.layoutFormat == ElfR32f || qualifier.layoutFormat == ElfR32i || qualifier.layoutFormat == ElfR32ui)) {
+ if (! qualifier.readonly && ! qualifier.writeonly)
+ error(loc, "format requires readonly or writeonly memory qualifier", TQualifier::getLayoutFormatString(qualifier.layoutFormat), "");
+ }
+ }
+ }
+ } else if (type.isImage() && ! qualifier.writeonly)
+ error(loc, "image variables not declared 'writeonly' must have a format layout qualifier", "", "");
+
+ if (qualifier.layoutPushConstant && type.getBasicType() != EbtBlock)
+ error(loc, "can only be used with a block", "push_constant", "");
+
+ // input attachment
+ if (type.isSubpass()) {
+ if (! qualifier.hasAttachment())
+ error(loc, "requires an input_attachment_index layout qualifier", "subpass", "");
+ } else {
+ if (qualifier.hasAttachment())
+ error(loc, "can only be used with a subpass", "input_attachment_index", "");
+ }
+
+ // specialization-constant id
+ if (qualifier.hasSpecConstantId()) {
+ if (type.getQualifier().storage != EvqConst)
+ error(loc, "can only be applied to 'const'-qualified scalar", "constant_id", "");
+ if (! type.isScalar())
+ error(loc, "can only be applied to a scalar", "constant_id", "");
+ switch (type.getBasicType())
+ {
+ case EbtInt:
+ case EbtUint:
+ case EbtInt64:
+ case EbtUint64:
+ case EbtBool:
+ case EbtFloat:
+ case EbtDouble:
+ break;
+ default:
+ error(loc, "cannot be applied to this type", "constant_id", "");
+ break;
+ }
+ }
+}
+
+// Do layout error checking that can be done within a layout qualifier proper, not needing to know
+// if there are blocks, atomic counters, variables, etc.
+void TParseContext::layoutQualifierCheck(const TSourceLoc& loc, const TQualifier& qualifier)
+{
+ if (qualifier.storage == EvqShared && qualifier.hasLayout())
+ error(loc, "cannot apply layout qualifiers to a shared variable", "shared", "");
+
+ // "It is a compile-time error to use *component* without also specifying the location qualifier (order does not matter)."
+ if (qualifier.hasComponent() && ! qualifier.hasLocation())
+ error(loc, "must specify 'location' to use 'component'", "component", "");
+
+ if (qualifier.hasAnyLocation()) {
+
+ // "As with input layout qualifiers, all shaders except compute shaders
+ // allow *location* layout qualifiers on output variable declarations,
+ // output block declarations, and output block member declarations."
+
+ switch (qualifier.storage) {
+ case EvqVaryingIn:
+ {
+ const char* feature = "location qualifier on input";
+ if (profile == EEsProfile && version < 310)
+ requireStage(loc, EShLangVertex, feature);
+ else
+ requireStage(loc, (EShLanguageMask)~EShLangComputeMask, feature);
+ if (language == EShLangVertex) {
+ const char* exts[2] = { E_GL_ARB_separate_shader_objects, E_GL_ARB_explicit_attrib_location };
+ profileRequires(loc, ~EEsProfile, 330, 2, exts, feature);
+ profileRequires(loc, EEsProfile, 300, nullptr, feature);
+ } else {
+ profileRequires(loc, ~EEsProfile, 410, E_GL_ARB_separate_shader_objects, feature);
+ profileRequires(loc, EEsProfile, 310, nullptr, feature);
+ }
+ break;
+ }
+ case EvqVaryingOut:
+ {
+ const char* feature = "location qualifier on output";
+ if (profile == EEsProfile && version < 310)
+ requireStage(loc, EShLangFragment, feature);
+ else
+ requireStage(loc, (EShLanguageMask)~EShLangComputeMask, feature);
+ if (language == EShLangFragment) {
+ const char* exts[2] = { E_GL_ARB_separate_shader_objects, E_GL_ARB_explicit_attrib_location };
+ profileRequires(loc, ~EEsProfile, 330, 2, exts, feature);
+ profileRequires(loc, EEsProfile, 300, nullptr, feature);
+ } else {
+ profileRequires(loc, ~EEsProfile, 410, E_GL_ARB_separate_shader_objects, feature);
+ profileRequires(loc, EEsProfile, 310, nullptr, feature);
+ }
+ break;
+ }
+ case EvqUniform:
+ case EvqBuffer:
+ {
+ const char* feature = "location qualifier on uniform or buffer";
+ requireProfile(loc, EEsProfile | ECoreProfile | ECompatibilityProfile, feature);
+ profileRequires(loc, ECoreProfile | ECompatibilityProfile, 430, nullptr, feature);
+ profileRequires(loc, EEsProfile, 310, nullptr, feature);
+ break;
+ }
+ default:
+ break;
+ }
+ if (qualifier.hasIndex()) {
+ if (qualifier.storage != EvqVaryingOut)
+ error(loc, "can only be used on an output", "index", "");
+ if (! qualifier.hasLocation())
+ error(loc, "can only be used with an explicit location", "index", "");
+ }
+ }
+
+ if (qualifier.hasBinding()) {
+ if (! qualifier.isUniformOrBuffer())
+ error(loc, "requires uniform or buffer storage qualifier", "binding", "");
+ }
+ if (qualifier.hasStream()) {
+ if (qualifier.storage != EvqVaryingOut)
+ error(loc, "can only be used on an output", "stream", "");
+ }
+ if (qualifier.hasXfb()) {
+ if (qualifier.storage != EvqVaryingOut)
+ error(loc, "can only be used on an output", "xfb layout qualifier", "");
+ }
+ if (qualifier.hasUniformLayout()) {
+ if (! qualifier.isUniformOrBuffer()) {
+ if (qualifier.hasMatrix() || qualifier.hasPacking())
+ error(loc, "matrix or packing qualifiers can only be used on a uniform or buffer", "layout", "");
+ if (qualifier.hasOffset() || qualifier.hasAlign())
+ error(loc, "offset/align can only be used on a uniform or buffer", "layout", "");
+ }
+ }
+ if (qualifier.layoutPushConstant) {
+ if (qualifier.storage != EvqUniform)
+ error(loc, "can only be used with a uniform", "push_constant", "");
+ if (qualifier.hasSet())
+ error(loc, "cannot be used with push_constant", "set", "");
+ }
+}
+
+// For places that can't have shader-level layout qualifiers
+void TParseContext::checkNoShaderLayouts(const TSourceLoc& loc, const TShaderQualifiers& shaderQualifiers)
+{
+ const char* message = "can only apply to a standalone qualifier";
+
+ if (shaderQualifiers.geometry != ElgNone)
+ error(loc, message, TQualifier::getGeometryString(shaderQualifiers.geometry), "");
+ if (shaderQualifiers.invocations != TQualifier::layoutNotSet)
+ error(loc, message, "invocations", "");
+ if (shaderQualifiers.vertices != TQualifier::layoutNotSet) {
+ if (language == EShLangGeometry)
+ error(loc, message, "max_vertices", "");
+ else if (language == EShLangTessControl)
+ error(loc, message, "vertices", "");
+ else
+ assert(0);
+ }
+ for (int i = 0; i < 3; ++i) {
+ if (shaderQualifiers.localSize[i] > 1)
+ error(loc, message, "local_size", "");
+ if (shaderQualifiers.localSizeSpecId[i] != TQualifier::layoutNotSet)
+ error(loc, message, "local_size id", "");
+ }
+ if (shaderQualifiers.blendEquation)
+ error(loc, message, "blend equation", "");
+ // TBD: correctness: are any of these missing? pixelCenterInteger, originUpperLeft, spacing, order, pointmode, earlyfragment, depth
+}
+
+// Correct and/or advance an object's offset layout qualifier.
+void TParseContext::fixOffset(const TSourceLoc& loc, TSymbol& symbol)
+{
+ const TQualifier& qualifier = symbol.getType().getQualifier();
+ if (symbol.getType().getBasicType() == EbtAtomicUint) {
+ if (qualifier.hasBinding() && (int)qualifier.layoutBinding < resources.maxAtomicCounterBindings) {
+
+ // Set the offset
+ int offset;
+ if (qualifier.hasOffset())
+ offset = qualifier.layoutOffset;
+ else
+ offset = atomicUintOffsets[qualifier.layoutBinding];
+ symbol.getWritableType().getQualifier().layoutOffset = offset;
+
+ // Check for overlap
+ int numOffsets = 4;
+ if (symbol.getType().isArray())
+ numOffsets *= symbol.getType().getCumulativeArraySize();
+ int repeated = intermediate.addUsedOffsets(qualifier.layoutBinding, offset, numOffsets);
+ if (repeated >= 0)
+ error(loc, "atomic counters sharing the same offset:", "offset", "%d", repeated);
+
+ // Bump the default offset
+ atomicUintOffsets[qualifier.layoutBinding] = offset + numOffsets;
+ }
+ }
+}
+
+//
+// Look up a function name in the symbol table, and make sure it is a function.
+//
+// Return the function symbol if found, otherwise nullptr.
+//
+const TFunction* TParseContext::findFunction(const TSourceLoc& loc, const TFunction& call, bool& builtIn)
+{
+ const TFunction* function = nullptr;
+
+ if (symbolTable.isFunctionNameVariable(call.getName())) {
+ error(loc, "can't use function syntax on variable", call.getName().c_str(), "");
+ return nullptr;
+ }
+
+ if (profile == EEsProfile || version < 120)
+ function = findFunctionExact(loc, call, builtIn);
+ else if (version < 400)
+ function = findFunction120(loc, call, builtIn);
+ else
+ function = findFunction400(loc, call, builtIn);
+
+ return function;
+}
+
+// Function finding algorithm for ES and desktop 110.
+const TFunction* TParseContext::findFunctionExact(const TSourceLoc& loc, const TFunction& call, bool& builtIn)
+{
+ TSymbol* symbol = symbolTable.find(call.getMangledName(), &builtIn);
+ if (symbol == nullptr) {
+ error(loc, "no matching overloaded function found", call.getName().c_str(), "");
+
+ return nullptr;
+ }
+
+ return symbol->getAsFunction();
+}
+
+// Function finding algorithm for desktop versions 120 through 330.
+const TFunction* TParseContext::findFunction120(const TSourceLoc& loc, const TFunction& call, bool& builtIn)
+{
+ // first, look for an exact match
+ TSymbol* symbol = symbolTable.find(call.getMangledName(), &builtIn);
+ if (symbol)
+ return symbol->getAsFunction();
+
+ // exact match not found, look through a list of overloaded functions of the same name
+
+ // "If no exact match is found, then [implicit conversions] will be applied to find a match. Mismatched types
+ // on input parameters (in or inout or default) must have a conversion from the calling argument type to the
+ // formal parameter type. Mismatched types on output parameters (out or inout) must have a conversion
+ // from the formal parameter type to the calling argument type. When argument conversions are used to find
+ // a match, it is a semantic error if there are multiple ways to apply these conversions to make the call match
+ // more than one function."
+
+ const TFunction* candidate = nullptr;
+ TVector<TFunction*> candidateList;
+ symbolTable.findFunctionNameList(call.getMangledName(), candidateList, builtIn);
+
+ for (TVector<TFunction*>::const_iterator it = candidateList.begin(); it != candidateList.end(); ++it) {
+ const TFunction& function = *(*it);
+
+ // to even be a potential match, number of arguments has to match
+ if (call.getParamCount() != function.getParamCount())
+ continue;
+
+ bool possibleMatch = true;
+ for (int i = 0; i < function.getParamCount(); ++i) {
+ // same types is easy
+ if (*function[i].type == *call[i].type)
+ continue;
+
+ // We have a mismatch in type, see if it is implicitly convertible
+
+ if (function[i].type->isArray() || call[i].type->isArray() ||
+ ! function[i].type->sameElementShape(*call[i].type))
+ possibleMatch = false;
+ else {
+ // do direction-specific checks for conversion of basic type
+ if (function[i].type->getQualifier().isParamInput()) {
+ if (! intermediate.canImplicitlyPromote(call[i].type->getBasicType(), function[i].type->getBasicType()))
+ possibleMatch = false;
+ }
+ if (function[i].type->getQualifier().isParamOutput()) {
+ if (! intermediate.canImplicitlyPromote(function[i].type->getBasicType(), call[i].type->getBasicType()))
+ possibleMatch = false;
+ }
+ }
+ if (! possibleMatch)
+ break;
+ }
+ if (possibleMatch) {
+ if (candidate) {
+ // our second match, meaning ambiguity
+ error(loc, "ambiguous function signature match: multiple signatures match under implicit type conversion", call.getName().c_str(), "");
+ } else
+ candidate = &function;
+ }
+ }
+
+ if (candidate == nullptr)
+ error(loc, "no matching overloaded function found", call.getName().c_str(), "");
+
+ return candidate;
+}
+
+// Function finding algorithm for desktop version 400 and above.
+const TFunction* TParseContext::findFunction400(const TSourceLoc& loc, const TFunction& call, bool& builtIn)
+{
+ // TODO: 4.00 functionality: findFunction400()
+ return findFunction120(loc, call, builtIn);
+}
+
+// When a declaration includes a type, but not a variable name, it can be
+// to establish defaults.
+void TParseContext::declareTypeDefaults(const TSourceLoc& loc, const TPublicType& publicType)
+{
+ if (publicType.basicType == EbtAtomicUint && publicType.qualifier.hasBinding() && publicType.qualifier.hasOffset()) {
+ if (publicType.qualifier.layoutBinding >= (unsigned int)resources.maxAtomicCounterBindings) {
+ error(loc, "atomic_uint binding is too large", "binding", "");
+ return;
+ }
+ atomicUintOffsets[publicType.qualifier.layoutBinding] = publicType.qualifier.layoutOffset;
+ return;
+ }
+
+ if (publicType.qualifier.hasLayout())
+ warn(loc, "useless application of layout qualifier", "layout", "");
+}
+
+//
+// Do everything necessary to handle a variable (non-block) declaration.
+// Either redeclaring a variable, or making a new one, updating the symbol
+// table, and all error checking.
+//
+// Returns a subtree node that computes an initializer, if needed.
+// Returns nullptr if there is no code to execute for initialization.
+//
+// 'publicType' is the type part of the declaration (to the left)
+// 'arraySizes' is the arrayness tagged on the identifier (to the right)
+//
+TIntermNode* TParseContext::declareVariable(const TSourceLoc& loc, TString& identifier, const TPublicType& publicType, TArraySizes* arraySizes, TIntermTyped* initializer)
+{
+ TType type(publicType); // shallow copy; 'type' shares the arrayness and structure definition with 'publicType'
+ if (type.isImplicitlySizedArray()) {
+ // Because "int[] a = int[2](...), b = int[3](...)" makes two arrays a and b
+ // of different sizes, for this case sharing the shallow copy of arrayness
+ // with the publicType oversubscribes it, so get a deep copy of the arrayness.
+ type.newArraySizes(*publicType.arraySizes);
+ }
+
+ if (voidErrorCheck(loc, identifier, type.getBasicType()))
+ return nullptr;
+
+ if (initializer)
+ rValueErrorCheck(loc, "initializer", initializer);
+ else
+ nonInitConstCheck(loc, identifier, type);
+
+ samplerCheck(loc, type, identifier, initializer);
+ atomicUintCheck(loc, type, identifier);
+ transparentCheck(loc, type, identifier);
+
+ if (identifier != "gl_FragCoord" && (publicType.shaderQualifiers.originUpperLeft || publicType.shaderQualifiers.pixelCenterInteger))
+ error(loc, "can only apply origin_upper_left and pixel_center_origin to gl_FragCoord", "layout qualifier", "");
+ if (identifier != "gl_FragDepth" && publicType.shaderQualifiers.layoutDepth != EldNone)
+ error(loc, "can only apply depth layout to gl_FragDepth", "layout qualifier", "");
+
+ // Check for redeclaration of built-ins and/or attempting to declare a reserved name
+ bool newDeclaration = false; // true if a new entry gets added to the symbol table
+ TSymbol* symbol = redeclareBuiltinVariable(loc, identifier, type.getQualifier(), publicType.shaderQualifiers, newDeclaration);
+ if (! symbol)
+ reservedErrorCheck(loc, identifier);
+
+ inheritGlobalDefaults(type.getQualifier());
+
+ // Declare the variable
+ if (arraySizes || type.isArray()) {
+ // Arrayness is potentially coming both from the type and from the
+ // variable: "int[] a[];" or just one or the other.
+ // Merge it all to the type, so all arrayness is part of the type.
+ arrayDimCheck(loc, &type, arraySizes);
+ arrayDimMerge(type, arraySizes);
+
+ // Check that implicit sizing is only where allowed.
+ arrayUnsizedCheck(loc, type.getQualifier(), &type.getArraySizes(), initializer != nullptr, false);
+
+ if (! arrayQualifierError(loc, type.getQualifier()) && ! arrayError(loc, type))
+ declareArray(loc, identifier, type, symbol, newDeclaration);
+
+ if (initializer) {
+ profileRequires(loc, ENoProfile, 120, E_GL_3DL_array_objects, "initializer");
+ profileRequires(loc, EEsProfile, 300, nullptr, "initializer");
+ }
+ } else {
+ // non-array case
+ if (! symbol)
+ symbol = declareNonArray(loc, identifier, type, newDeclaration);
+ else if (type != symbol->getType())
+ error(loc, "cannot change the type of", "redeclaration", symbol->getName().c_str());
+ }
+
+ if (! symbol)
+ return nullptr;
+
+ // Deal with initializer
+ TIntermNode* initNode = nullptr;
+ if (symbol && initializer) {
+ TVariable* variable = symbol->getAsVariable();
+ if (! variable) {
+ error(loc, "initializer requires a variable, not a member", identifier.c_str(), "");
+ return nullptr;
+ }
+ initNode = executeInitializer(loc, initializer, variable);
+ }
+
+ // look for errors in layout qualifier use
+ layoutObjectCheck(loc, *symbol);
+ fixOffset(loc, *symbol);
+
+ // see if it's a linker-level object to track
+ if (newDeclaration && symbolTable.atGlobalLevel())
+ intermediate.addSymbolLinkageNode(linkage, *symbol);
+
+ return initNode;
+}
+
+// Pick up global defaults from the provide global defaults into dst.
+void TParseContext::inheritGlobalDefaults(TQualifier& dst) const
+{
+ if (dst.storage == EvqVaryingOut) {
+ if (! dst.hasStream() && language == EShLangGeometry)
+ dst.layoutStream = globalOutputDefaults.layoutStream;
+ if (! dst.hasXfbBuffer())
+ dst.layoutXfbBuffer = globalOutputDefaults.layoutXfbBuffer;
+ }
+}
+
+//
+// Make an internal-only variable whose name is for debug purposes only
+// and won't be searched for. Callers will only use the return value to use
+// the variable, not the name to look it up. It is okay if the name
+// is the same as other names; there won't be any conflict.
+//
+TVariable* TParseContext::makeInternalVariable(const char* name, const TType& type) const
+{
+ TString* nameString = new TString(name);
+ TVariable* variable = new TVariable(nameString, type);
+ symbolTable.makeInternalVariable(*variable);
+
+ return variable;
+}
+
+//
+// Declare a non-array variable, the main point being there is no redeclaration
+// for resizing allowed.
+//
+// Return the successfully declared variable.
+//
+TVariable* TParseContext::declareNonArray(const TSourceLoc& loc, TString& identifier, TType& type, bool& newDeclaration)
+{
+ // make a new variable
+ TVariable* variable = new TVariable(&identifier, type);
+
+ ioArrayCheck(loc, type, identifier);
+ // add variable to symbol table
+ if (! symbolTable.insert(*variable)) {
+ error(loc, "redefinition", variable->getName().c_str(), "");
+ return nullptr;
+ } else {
+ newDeclaration = true;
+ return variable;
+ }
+}
+
+//
+// Handle all types of initializers from the grammar.
+//
+// Returning nullptr just means there is no code to execute to handle the
+// initializer, which will, for example, be the case for constant initializers.
+//
+TIntermNode* TParseContext::executeInitializer(const TSourceLoc& loc, TIntermTyped* initializer, TVariable* variable)
+{
+ //
+ // Identifier must be of type constant, a global, or a temporary, and
+ // starting at version 120, desktop allows uniforms to have initializers.
+ //
+ TStorageQualifier qualifier = variable->getType().getQualifier().storage;
+ if (! (qualifier == EvqTemporary || qualifier == EvqGlobal || qualifier == EvqConst ||
+ (qualifier == EvqUniform && profile != EEsProfile && version >= 120))) {
+ error(loc, " cannot initialize this type of qualifier ", variable->getType().getStorageQualifierString(), "");
+ return nullptr;
+ }
+ arrayObjectCheck(loc, variable->getType(), "array initializer");
+
+ //
+ // If the initializer was from braces { ... }, we convert the whole subtree to a
+ // constructor-style subtree, allowing the rest of the code to operate
+ // identically for both kinds of initializers.
+ //
+ // Type can't be deduced from the initializer list, so a skeletal type to
+ // follow has to be passed in. Constness and specialization-constness
+ // should be deduced bottom up, not dictated by the skeletal type.
+ //
+ TType skeletalType;
+ skeletalType.shallowCopy(variable->getType());
+ skeletalType.getQualifier().makeTemporary();
+ initializer = convertInitializerList(loc, skeletalType, initializer);
+ if (! initializer) {
+ // error recovery; don't leave const without constant values
+ if (qualifier == EvqConst)
+ variable->getWritableType().getQualifier().makeTemporary();
+ return nullptr;
+ }
+
+ // Fix outer arrayness if variable is unsized, getting size from the initializer
+ if (initializer->getType().isExplicitlySizedArray() &&
+ variable->getType().isImplicitlySizedArray())
+ variable->getWritableType().changeOuterArraySize(initializer->getType().getOuterArraySize());
+
+ // Inner arrayness can also get set by an initializer
+ if (initializer->getType().isArrayOfArrays() && variable->getType().isArrayOfArrays() &&
+ initializer->getType().getArraySizes()->getNumDims() ==
+ variable->getType().getArraySizes()->getNumDims()) {
+ // adopt unsized sizes from the initializer's sizes
+ for (int d = 1; d < variable->getType().getArraySizes()->getNumDims(); ++d) {
+ if (variable->getType().getArraySizes()->getDimSize(d) == UnsizedArraySize)
+ variable->getWritableType().getArraySizes().setDimSize(d, initializer->getType().getArraySizes()->getDimSize(d));
+ }
+ }
+
+ // Uniforms require a compile-time constant initializer
+ if (qualifier == EvqUniform && ! initializer->getType().getQualifier().isFrontEndConstant()) {
+ error(loc, "uniform initializers must be constant", "=", "'%s'", variable->getType().getCompleteString().c_str());
+ variable->getWritableType().getQualifier().makeTemporary();
+ return nullptr;
+ }
+ // Global consts require a constant initializer (specialization constant is okay)
+ if (qualifier == EvqConst && symbolTable.atGlobalLevel() && ! initializer->getType().getQualifier().isConstant()) {
+ error(loc, "global const initializers must be constant", "=", "'%s'", variable->getType().getCompleteString().c_str());
+ variable->getWritableType().getQualifier().makeTemporary();
+ return nullptr;
+ }
+
+ // Const variables require a constant initializer, depending on version
+ if (qualifier == EvqConst) {
+ if (! initializer->getType().getQualifier().isConstant()) {
+ const char* initFeature = "non-constant initializer";
+ requireProfile(loc, ~EEsProfile, initFeature);
+ profileRequires(loc, ~EEsProfile, 420, E_GL_ARB_shading_language_420pack, initFeature);
+ variable->getWritableType().getQualifier().storage = EvqConstReadOnly;
+ qualifier = EvqConstReadOnly;
+ }
+ } else {
+ // Non-const global variables in ES need a const initializer.
+ //
+ // "In declarations of global variables with no storage qualifier or with a const
+ // qualifier any initializer must be a constant expression."
+ if (symbolTable.atGlobalLevel() && ! initializer->getType().getQualifier().isConstant()) {
+ const char* initFeature = "non-constant global initializer";
+ if (relaxedErrors())
+ warn(loc, "not allowed in this version", initFeature, "");
+ else
+ requireProfile(loc, ~EEsProfile, initFeature);
+ }
+ }
+
+ if (qualifier == EvqConst || qualifier == EvqUniform) {
+ // Compile-time tagging of the variable with its constant value...
+
+ initializer = intermediate.addConversion(EOpAssign, variable->getType(), initializer);
+ if (! initializer || ! initializer->getType().getQualifier().isConstant() || variable->getType() != initializer->getType()) {
+ error(loc, "non-matching or non-convertible constant type for const initializer",
+ variable->getType().getStorageQualifierString(), "");
+ variable->getWritableType().getQualifier().makeTemporary();
+ return nullptr;
+ }
+
+ // We either have a folded constant in getAsConstantUnion, or we have to use
+ // the initializer's subtree in the AST to represent the computation of a
+ // specialization constant.
+ assert(initializer->getAsConstantUnion() || initializer->getType().getQualifier().isSpecConstant());
+ if (initializer->getAsConstantUnion())
+ variable->setConstArray(initializer->getAsConstantUnion()->getConstArray());
+ else {
+ // It's a specialization constant.
+ variable->getWritableType().getQualifier().makeSpecConstant();
+
+ // Keep the subtree that computes the specialization constant with the variable.
+ // Later, a symbol node will adopt the subtree from the variable.
+ variable->setConstSubtree(initializer);
+ }
+ } else {
+ // normal assigning of a value to a variable...
+ specializationCheck(loc, initializer->getType(), "initializer");
+ TIntermSymbol* intermSymbol = intermediate.addSymbol(*variable, loc);
+ TIntermTyped* initNode = intermediate.addAssign(EOpAssign, intermSymbol, initializer, loc);
+ if (! initNode)
+ assignError(loc, "=", intermSymbol->getCompleteString(), initializer->getCompleteString());
+
+ return initNode;
+ }
+
+ return nullptr;
+}
+
+//
+// Reprocess any initializer-list (the "{ ... }" syntax) parts of the
+// initializer.
+//
+// Need to hierarchically assign correct types and implicit
+// conversions. Will do this mimicking the same process used for
+// creating a constructor-style initializer, ensuring we get the
+// same form. However, it has to in parallel walk the 'type'
+// passed in, as type cannot be deduced from an initializer list.
+//
+TIntermTyped* TParseContext::convertInitializerList(const TSourceLoc& loc, const TType& type, TIntermTyped* initializer)
+{
+ // Will operate recursively. Once a subtree is found that is constructor style,
+ // everything below it is already good: Only the "top part" of the initializer
+ // can be an initializer list, where "top part" can extend for several (or all) levels.
+
+ // see if we have bottomed out in the tree within the initializer-list part
+ TIntermAggregate* initList = initializer->getAsAggregate();
+ if (! initList || initList->getOp() != EOpNull)
+ return initializer;
+
+ // Of the initializer-list set of nodes, need to process bottom up,
+ // so recurse deep, then process on the way up.
+
+ // Go down the tree here...
+ if (type.isArray()) {
+ // The type's array might be unsized, which could be okay, so base sizes on the size of the aggregate.
+ // Later on, initializer execution code will deal with array size logic.
+ TType arrayType;
+ arrayType.shallowCopy(type); // sharing struct stuff is fine
+ arrayType.newArraySizes(*type.getArraySizes()); // but get a fresh copy of the array information, to edit below
+
+ // edit array sizes to fill in unsized dimensions
+ arrayType.changeOuterArraySize((int)initList->getSequence().size());
+ TIntermTyped* firstInit = initList->getSequence()[0]->getAsTyped();
+ if (arrayType.isArrayOfArrays() && firstInit->getType().isArray() &&
+ arrayType.getArraySizes().getNumDims() == firstInit->getType().getArraySizes()->getNumDims() + 1) {
+ for (int d = 1; d < arrayType.getArraySizes().getNumDims(); ++d) {
+ if (arrayType.getArraySizes().getDimSize(d) == UnsizedArraySize)
+ arrayType.getArraySizes().setDimSize(d, firstInit->getType().getArraySizes()->getDimSize(d - 1));
+ }
+ }
+
+ TType elementType(arrayType, 0); // dereferenced type
+ for (size_t i = 0; i < initList->getSequence().size(); ++i) {
+ initList->getSequence()[i] = convertInitializerList(loc, elementType, initList->getSequence()[i]->getAsTyped());
+ if (initList->getSequence()[i] == nullptr)
+ return nullptr;
+ }
+
+ return addConstructor(loc, initList, arrayType, mapTypeToConstructorOp(arrayType));
+ } else if (type.isStruct()) {
+ if (type.getStruct()->size() != initList->getSequence().size()) {
+ error(loc, "wrong number of structure members", "initializer list", "");
+ return nullptr;
+ }
+ for (size_t i = 0; i < type.getStruct()->size(); ++i) {
+ initList->getSequence()[i] = convertInitializerList(loc, *(*type.getStruct())[i].type, initList->getSequence()[i]->getAsTyped());
+ if (initList->getSequence()[i] == nullptr)
+ return nullptr;
+ }
+ } else if (type.isMatrix()) {
+ if (type.getMatrixCols() != (int)initList->getSequence().size()) {
+ error(loc, "wrong number of matrix columns:", "initializer list", type.getCompleteString().c_str());
+ return nullptr;
+ }
+ TType vectorType(type, 0); // dereferenced type
+ for (int i = 0; i < type.getMatrixCols(); ++i) {
+ initList->getSequence()[i] = convertInitializerList(loc, vectorType, initList->getSequence()[i]->getAsTyped());
+ if (initList->getSequence()[i] == nullptr)
+ return nullptr;
+ }
+ } else if (type.isVector()) {
+ if (type.getVectorSize() != (int)initList->getSequence().size()) {
+ error(loc, "wrong vector size (or rows in a matrix column):", "initializer list", type.getCompleteString().c_str());
+ return nullptr;
+ }
+ } else {
+ error(loc, "unexpected initializer-list type:", "initializer list", type.getCompleteString().c_str());
+ return nullptr;
+ }
+
+ // now that the subtree is processed, process this node
+ return addConstructor(loc, initList, type, mapTypeToConstructorOp(type));
+}
+
+//
+// Test for the correctness of the parameters passed to various constructor functions
+// and also convert them to the right data type, if allowed and required.
+//
+// Returns nullptr for an error or the constructed node (aggregate or typed) for no error.
+//
+TIntermTyped* TParseContext::addConstructor(const TSourceLoc& loc, TIntermNode* node, const TType& type, TOperator op)
+{
+ if (node == nullptr || node->getAsTyped() == nullptr)
+ return nullptr;
+ rValueErrorCheck(loc, "constructor", node->getAsTyped());
+
+ TIntermAggregate* aggrNode = node->getAsAggregate();
+
+ // Combined texture-sampler constructors are completely semantic checked
+ // in constructorTextureSamplerError()
+ if (op == EOpConstructTextureSampler)
+ return intermediate.setAggregateOperator(aggrNode, op, type, loc);
+
+ TTypeList::const_iterator memberTypes;
+ if (op == EOpConstructStruct)
+ memberTypes = type.getStruct()->begin();
+
+ TType elementType;
+ if (type.isArray()) {
+ TType dereferenced(type, 0);
+ elementType.shallowCopy(dereferenced);
+ } else
+ elementType.shallowCopy(type);
+
+ bool singleArg;
+ if (aggrNode) {
+ if (aggrNode->getOp() != EOpNull || aggrNode->getSequence().size() == 1)
+ singleArg = true;
+ else
+ singleArg = false;
+ } else
+ singleArg = true;
+
+ TIntermTyped *newNode;
+ if (singleArg) {
+ // If structure constructor or array constructor is being called
+ // for only one parameter inside the structure, we need to call constructAggregate function once.
+ if (type.isArray())
+ newNode = constructAggregate(node, elementType, 1, node->getLoc());
+ else if (op == EOpConstructStruct)
+ newNode = constructAggregate(node, *(*memberTypes).type, 1, node->getLoc());
+ else
+ newNode = constructBuiltIn(type, op, node->getAsTyped(), node->getLoc(), false);
+
+ if (newNode && (type.isArray() || op == EOpConstructStruct))
+ newNode = intermediate.setAggregateOperator(newNode, EOpConstructStruct, type, loc);
+
+ return newNode;
+ }
+
+ //
+ // Handle list of arguments.
+ //
+ TIntermSequence &sequenceVector = aggrNode->getSequence(); // Stores the information about the parameter to the constructor
+ // if the structure constructor contains more than one parameter, then construct
+ // each parameter
+
+ int paramCount = 0; // keeps track of the constructor parameter number being checked
+
+ // for each parameter to the constructor call, check to see if the right type is passed or convert them
+ // to the right type if possible (and allowed).
+ // for structure constructors, just check if the right type is passed, no conversion is allowed.
+ for (TIntermSequence::iterator p = sequenceVector.begin();
+ p != sequenceVector.end(); p++, paramCount++) {
+ if (type.isArray())
+ newNode = constructAggregate(*p, elementType, paramCount+1, node->getLoc());
+ else if (op == EOpConstructStruct)
+ newNode = constructAggregate(*p, *(memberTypes[paramCount]).type, paramCount+1, node->getLoc());
+ else
+ newNode = constructBuiltIn(type, op, (*p)->getAsTyped(), node->getLoc(), true);
+
+ if (newNode)
+ *p = newNode;
+ else
+ return nullptr;
+ }
+
+ return intermediate.setAggregateOperator(aggrNode, op, type, loc);
+}
+
+// Function for constructor implementation. Calls addUnaryMath with appropriate EOp value
+// for the parameter to the constructor (passed to this function). Essentially, it converts
+// the parameter types correctly. If a constructor expects an int (like ivec2) and is passed a
+// float, then float is converted to int.
+//
+// Returns nullptr for an error or the constructed node.
+//
+TIntermTyped* TParseContext::constructBuiltIn(const TType& type, TOperator op, TIntermTyped* node, const TSourceLoc& loc, bool subset)
+{
+ TIntermTyped* newNode;
+ TOperator basicOp;
+
+ //
+ // First, convert types as needed.
+ //
+ switch (op) {
+ case EOpConstructVec2:
+ case EOpConstructVec3:
+ case EOpConstructVec4:
+ case EOpConstructMat2x2:
+ case EOpConstructMat2x3:
+ case EOpConstructMat2x4:
+ case EOpConstructMat3x2:
+ case EOpConstructMat3x3:
+ case EOpConstructMat3x4:
+ case EOpConstructMat4x2:
+ case EOpConstructMat4x3:
+ case EOpConstructMat4x4:
+ case EOpConstructFloat:
+ basicOp = EOpConstructFloat;
+ break;
+
+ case EOpConstructDVec2:
+ case EOpConstructDVec3:
+ case EOpConstructDVec4:
+ case EOpConstructDMat2x2:
+ case EOpConstructDMat2x3:
+ case EOpConstructDMat2x4:
+ case EOpConstructDMat3x2:
+ case EOpConstructDMat3x3:
+ case EOpConstructDMat3x4:
+ case EOpConstructDMat4x2:
+ case EOpConstructDMat4x3:
+ case EOpConstructDMat4x4:
+ case EOpConstructDouble:
+ basicOp = EOpConstructDouble;
+ break;
+
+ case EOpConstructIVec2:
+ case EOpConstructIVec3:
+ case EOpConstructIVec4:
+ case EOpConstructInt:
+ basicOp = EOpConstructInt;
+ break;
+
+ case EOpConstructUVec2:
+ case EOpConstructUVec3:
+ case EOpConstructUVec4:
+ case EOpConstructUint:
+ basicOp = EOpConstructUint;
+ break;
+
+ case EOpConstructI64Vec2:
+ case EOpConstructI64Vec3:
+ case EOpConstructI64Vec4:
+ case EOpConstructInt64:
+ basicOp = EOpConstructInt64;
+ break;
+
+ case EOpConstructU64Vec2:
+ case EOpConstructU64Vec3:
+ case EOpConstructU64Vec4:
+ case EOpConstructUint64:
+ basicOp = EOpConstructUint64;
+ break;
+
+ case EOpConstructBVec2:
+ case EOpConstructBVec3:
+ case EOpConstructBVec4:
+ case EOpConstructBool:
+ basicOp = EOpConstructBool;
+ break;
+
+ default:
+ error(loc, "unsupported construction", "", "");
+
+ return nullptr;
+ }
+ newNode = intermediate.addUnaryMath(basicOp, node, node->getLoc());
+ if (newNode == nullptr) {
+ error(loc, "can't convert", "constructor", "");
+ return nullptr;
+ }
+
+ //
+ // Now, if there still isn't an operation to do the construction, and we need one, add one.
+ //
+
+ // Otherwise, skip out early.
+ if (subset || (newNode != node && newNode->getType() == type))
+ return newNode;
+
+ // setAggregateOperator will insert a new node for the constructor, as needed.
+ return intermediate.setAggregateOperator(newNode, op, type, loc);
+}
+
+// This function tests for the type of the parameters to the structure or array constructor. Raises
+// an error message if the expected type does not match the parameter passed to the constructor.
+//
+// Returns nullptr for an error or the input node itself if the expected and the given parameter types match.
+//
+TIntermTyped* TParseContext::constructAggregate(TIntermNode* node, const TType& type, int paramCount, const TSourceLoc& loc)
+{
+ TIntermTyped* converted = intermediate.addConversion(EOpConstructStruct, type, node->getAsTyped());
+ if (! converted || converted->getType() != type) {
+ error(loc, "", "constructor", "cannot convert parameter %d from '%s' to '%s'", paramCount,
+ node->getAsTyped()->getType().getCompleteString().c_str(), type.getCompleteString().c_str());
+
+ return nullptr;
+ }
+
+ return converted;
+}
+
+//
+// Do everything needed to add an interface block.
+//
+void TParseContext::declareBlock(const TSourceLoc& loc, TTypeList& typeList, const TString* instanceName, TArraySizes* arraySizes)
+{
+ blockStageIoCheck(loc, currentBlockQualifier);
+ blockQualifierCheck(loc, currentBlockQualifier, instanceName != nullptr);
+ if (arraySizes) {
+ arrayUnsizedCheck(loc, currentBlockQualifier, arraySizes, false, false);
+ arrayDimCheck(loc, arraySizes, 0);
+ if (arraySizes->getNumDims() > 1)
+ requireProfile(loc, ~EEsProfile, "array-of-array of block");
+ }
+
+ // fix and check for member storage qualifiers and types that don't belong within a block
+ for (unsigned int member = 0; member < typeList.size(); ++member) {
+ TType& memberType = *typeList[member].type;
+ TQualifier& memberQualifier = memberType.getQualifier();
+ const TSourceLoc& memberLoc = typeList[member].loc;
+ globalQualifierFixCheck(memberLoc, memberQualifier);
+ if (memberQualifier.storage != EvqTemporary && memberQualifier.storage != EvqGlobal && memberQualifier.storage != currentBlockQualifier.storage)
+ error(memberLoc, "member storage qualifier cannot contradict block storage qualifier", memberType.getFieldName().c_str(), "");
+ memberQualifier.storage = currentBlockQualifier.storage;
+ if ((currentBlockQualifier.storage == EvqUniform || currentBlockQualifier.storage == EvqBuffer) && (memberQualifier.isInterpolation() || memberQualifier.isAuxiliary()))
+ error(memberLoc, "member of uniform or buffer block cannot have an auxiliary or interpolation qualifier", memberType.getFieldName().c_str(), "");
+ if (memberType.isArray())
+ arrayUnsizedCheck(memberLoc, currentBlockQualifier, &memberType.getArraySizes(), false, member == typeList.size() - 1);
+ if (memberQualifier.hasOffset()) {
+ requireProfile(memberLoc, ~EEsProfile, "offset on block member");
+ profileRequires(memberLoc, ~EEsProfile, 440, E_GL_ARB_enhanced_layouts, "offset on block member");
+ }
+
+ if (memberType.containsOpaque())
+ error(memberLoc, "member of block cannot be or contain a sampler, image, or atomic_uint type", typeList[member].type->getFieldName().c_str(), "");
+ }
+
+ // This might be a redeclaration of a built-in block. If so, redeclareBuiltinBlock() will
+ // do all the rest.
+ if (! symbolTable.atBuiltInLevel() && builtInName(*blockName)) {
+ redeclareBuiltinBlock(loc, typeList, *blockName, instanceName, arraySizes);
+ return;
+ }
+
+ // Not a redeclaration of a built-in; check that all names are user names.
+ reservedErrorCheck(loc, *blockName);
+ if (instanceName)
+ reservedErrorCheck(loc, *instanceName);
+ for (unsigned int member = 0; member < typeList.size(); ++member)
+ reservedErrorCheck(typeList[member].loc, typeList[member].type->getFieldName());
+
+ // Make default block qualification, and adjust the member qualifications
+
+ TQualifier defaultQualification;
+ switch (currentBlockQualifier.storage) {
+ case EvqUniform: defaultQualification = globalUniformDefaults; break;
+ case EvqBuffer: defaultQualification = globalBufferDefaults; break;
+ case EvqVaryingIn: defaultQualification = globalInputDefaults; break;
+ case EvqVaryingOut: defaultQualification = globalOutputDefaults; break;
+ default: defaultQualification.clear(); break;
+ }
+
+ // Special case for "push_constant uniform", which has a default of std430,
+ // contrary to normal uniform defaults, and can't have a default tracked for it.
+ if (currentBlockQualifier.layoutPushConstant && !currentBlockQualifier.hasPacking())
+ currentBlockQualifier.layoutPacking = ElpStd430;
+
+ // fix and check for member layout qualifiers
+
+ mergeObjectLayoutQualifiers(defaultQualification, currentBlockQualifier, true);
+
+ // "The offset qualifier can only be used on block members of blocks declared with std140 or std430 layouts."
+ // "The align qualifier can only be used on blocks or block members, and only for blocks declared with std140 or std430 layouts."
+ if (currentBlockQualifier.hasAlign() || currentBlockQualifier.hasAlign()) {
+ if (defaultQualification.layoutPacking != ElpStd140 && defaultQualification.layoutPacking != ElpStd430) {
+ error(loc, "can only be used with std140 or std430 layout packing", "offset/align", "");
+ defaultQualification.layoutAlign = -1;
+ }
+ }
+
+ bool memberWithLocation = false;
+ bool memberWithoutLocation = false;
+ for (unsigned int member = 0; member < typeList.size(); ++member) {
+ TQualifier& memberQualifier = typeList[member].type->getQualifier();
+ const TSourceLoc& memberLoc = typeList[member].loc;
+ if (memberQualifier.hasStream()) {
+ if (defaultQualification.layoutStream != memberQualifier.layoutStream)
+ error(memberLoc, "member cannot contradict block", "stream", "");
+ }
+
+ // "This includes a block's inheritance of the
+ // current global default buffer, a block member's inheritance of the block's
+ // buffer, and the requirement that any *xfb_buffer* declared on a block
+ // member must match the buffer inherited from the block."
+ if (memberQualifier.hasXfbBuffer()) {
+ if (defaultQualification.layoutXfbBuffer != memberQualifier.layoutXfbBuffer)
+ error(memberLoc, "member cannot contradict block (or what block inherited from global)", "xfb_buffer", "");
+ }
+
+ if (memberQualifier.hasPacking())
+ error(memberLoc, "member of block cannot have a packing layout qualifier", typeList[member].type->getFieldName().c_str(), "");
+ if (memberQualifier.hasLocation()) {
+ const char* feature = "location on block member";
+ switch (currentBlockQualifier.storage) {
+ case EvqVaryingIn:
+ case EvqVaryingOut:
+ requireProfile(memberLoc, ECoreProfile | ECompatibilityProfile | EEsProfile, feature);
+ profileRequires(memberLoc, ECoreProfile | ECompatibilityProfile, 440, E_GL_ARB_enhanced_layouts, feature);
+ profileRequires(memberLoc, EEsProfile, 0, Num_AEP_shader_io_blocks, AEP_shader_io_blocks, feature);
+ memberWithLocation = true;
+ break;
+ default:
+ error(memberLoc, "can only use in an in/out block", feature, "");
+ break;
+ }
+ } else
+ memberWithoutLocation = true;
+ if (memberQualifier.hasAlign()) {
+ if (defaultQualification.layoutPacking != ElpStd140 && defaultQualification.layoutPacking != ElpStd430)
+ error(memberLoc, "can only be used with std140 or std430 layout packing", "align", "");
+ }
+
+ TQualifier newMemberQualification = defaultQualification;
+ mergeQualifiers(memberLoc, newMemberQualification, memberQualifier, false);
+ memberQualifier = newMemberQualification;
+ }
+
+ // Process the members
+ fixBlockLocations(loc, currentBlockQualifier, typeList, memberWithLocation, memberWithoutLocation);
+ fixBlockXfbOffsets(currentBlockQualifier, typeList);
+ fixBlockUniformOffsets(currentBlockQualifier, typeList);
+ for (unsigned int member = 0; member < typeList.size(); ++member)
+ layoutTypeCheck(typeList[member].loc, *typeList[member].type);
+
+ // reverse merge, so that currentBlockQualifier now has all layout information
+ // (can't use defaultQualification directly, it's missing other non-layout-default-class qualifiers)
+ mergeObjectLayoutQualifiers(currentBlockQualifier, defaultQualification, true);
+
+ //
+ // Build and add the interface block as a new type named 'blockName'
+ //
+
+ TType blockType(&typeList, *blockName, currentBlockQualifier);
+ if (arraySizes)
+ blockType.newArraySizes(*arraySizes);
+ else
+ ioArrayCheck(loc, blockType, instanceName ? *instanceName : *blockName);
+
+ //
+ // Don't make a user-defined type out of block name; that will cause an error
+ // if the same block name gets reused in a different interface.
+ //
+ // "Block names have no other use within a shader
+ // beyond interface matching; it is a compile-time error to use a block name at global scope for anything
+ // other than as a block name (e.g., use of a block name for a global variable name or function name is
+ // currently reserved)."
+ //
+ // Use the symbol table to prevent normal reuse of the block's name, as a variable entry,
+ // whose type is EbtBlock, but without all the structure; that will come from the type
+ // the instances point to.
+ //
+ TType blockNameType(EbtBlock, blockType.getQualifier().storage);
+ TVariable* blockNameVar = new TVariable(blockName, blockNameType);
+ if (! symbolTable.insert(*blockNameVar)) {
+ TSymbol* existingName = symbolTable.find(*blockName);
+ if (existingName->getType().getBasicType() == EbtBlock) {
+ if (existingName->getType().getQualifier().storage == blockType.getQualifier().storage) {
+ error(loc, "Cannot reuse block name within the same interface:", blockName->c_str(), blockType.getStorageQualifierString());
+ return;
+ }
+ } else {
+ error(loc, "block name cannot redefine a non-block name", blockName->c_str(), "");
+ return;
+ }
+ }
+
+ // Add the variable, as anonymous or named instanceName.
+ // Make an anonymous variable if no name was provided.
+ if (! instanceName)
+ instanceName = NewPoolTString("");
+
+ TVariable& variable = *new TVariable(instanceName, blockType);
+ if (! symbolTable.insert(variable)) {
+ if (*instanceName == "")
+ error(loc, "nameless block contains a member that already has a name at global scope", blockName->c_str(), "");
+ else
+ error(loc, "block instance name redefinition", variable.getName().c_str(), "");
+
+ return;
+ }
+
+ // Check for general layout qualifier errors
+ layoutObjectCheck(loc, variable);
+
+ if (isIoResizeArray(blockType)) {
+ ioArraySymbolResizeList.push_back(&variable);
+ checkIoArraysConsistency(loc, true);
+ } else
+ fixIoArraySize(loc, variable.getWritableType());
+
+ // Save it in the AST for linker use.
+ intermediate.addSymbolLinkageNode(linkage, variable);
+}
+
+// Do all block-declaration checking regarding the combination of in/out/uniform/buffer
+// with a particular stage.
+void TParseContext::blockStageIoCheck(const TSourceLoc& loc, const TQualifier& qualifier)
+{
+ switch (qualifier.storage) {
+ case EvqUniform:
+ profileRequires(loc, EEsProfile, 300, nullptr, "uniform block");
+ profileRequires(loc, ENoProfile, 140, nullptr, "uniform block");
+ if (currentBlockQualifier.layoutPacking == ElpStd430 && ! currentBlockQualifier.layoutPushConstant)
+ error(loc, "requires the 'buffer' storage qualifier", "std430", "");
+ break;
+ case EvqBuffer:
+ requireProfile(loc, EEsProfile | ECoreProfile | ECompatibilityProfile, "buffer block");
+ profileRequires(loc, ECoreProfile | ECompatibilityProfile, 430, nullptr, "buffer block");
+ profileRequires(loc, EEsProfile, 310, nullptr, "buffer block");
+ break;
+ case EvqVaryingIn:
+ profileRequires(loc, ~EEsProfile, 150, E_GL_ARB_separate_shader_objects, "input block");
+ // It is a compile-time error to have an input block in a vertex shader or an output block in a fragment shader
+ // "Compute shaders do not permit user-defined input variables..."
+ requireStage(loc, (EShLanguageMask)(EShLangTessControlMask|EShLangTessEvaluationMask|EShLangGeometryMask|EShLangFragmentMask), "input block");
+ if (language == EShLangFragment)
+ profileRequires(loc, EEsProfile, 0, Num_AEP_shader_io_blocks, AEP_shader_io_blocks, "fragment input block");
+ break;
+ case EvqVaryingOut:
+ profileRequires(loc, ~EEsProfile, 150, E_GL_ARB_separate_shader_objects, "output block");
+ requireStage(loc, (EShLanguageMask)(EShLangVertexMask|EShLangTessControlMask|EShLangTessEvaluationMask|EShLangGeometryMask), "output block");
+ // ES 310 can have a block before shader_io is turned on, so skip this test for built-ins
+ if (language == EShLangVertex && ! parsingBuiltins)
+ profileRequires(loc, EEsProfile, 0, Num_AEP_shader_io_blocks, AEP_shader_io_blocks, "vertex output block");
+ break;
+ default:
+ error(loc, "only uniform, buffer, in, or out blocks are supported", blockName->c_str(), "");
+ break;
+ }
+}
+
+// Do all block-declaration checking regarding its qualifiers.
+void TParseContext::blockQualifierCheck(const TSourceLoc& loc, const TQualifier& qualifier, bool instanceName)
+{
+ // The 4.5 specification says:
+ //
+ // interface-block :
+ // layout-qualifieropt interface-qualifier block-name { member-list } instance-nameopt ;
+ //
+ // interface-qualifier :
+ // in
+ // out
+ // patch in
+ // patch out
+ // uniform
+ // buffer
+ //
+ // Note however memory qualifiers aren't included, yet the specification also says
+ //
+ // "...memory qualifiers may also be used in the declaration of shader storage blocks..."
+
+ if (qualifier.isInterpolation())
+ error(loc, "cannot use interpolation qualifiers on an interface block", "flat/smooth/noperspective", "");
+ if (qualifier.centroid)
+ error(loc, "cannot use centroid qualifier on an interface block", "centroid", "");
+ if (qualifier.sample)
+ error(loc, "cannot use sample qualifier on an interface block", "sample", "");
+ if (qualifier.invariant)
+ error(loc, "cannot use invariant qualifier on an interface block", "invariant", "");
+ if (qualifier.layoutPushConstant) {
+ intermediate.addPushConstantCount();
+ if (! instanceName)
+ error(loc, "requires an instance name", "push_constant", "");
+ }
+}
+
+//
+// "For a block, this process applies to the entire block, or until the first member
+// is reached that has a location layout qualifier. When a block member is declared with a location
+// qualifier, its location comes from that qualifier: The member's location qualifier overrides the block-level
+// declaration. Subsequent members are again assigned consecutive locations, based on the newest location,
+// until the next member declared with a location qualifier. The values used for locations do not have to be
+// declared in increasing order."
+void TParseContext::fixBlockLocations(const TSourceLoc& loc, TQualifier& qualifier, TTypeList& typeList, bool memberWithLocation, bool memberWithoutLocation)
+{
+ // "If a block has no block-level location layout qualifier, it is required that either all or none of its members
+ // have a location layout qualifier, or a compile-time error results."
+ if (! qualifier.hasLocation() && memberWithLocation && memberWithoutLocation)
+ error(loc, "either the block needs a location, or all members need a location, or no members have a location", "location", "");
+ else {
+ if (memberWithLocation) {
+ // remove any block-level location and make it per *every* member
+ int nextLocation = 0; // by the rule above, initial value is not relevant
+ if (qualifier.hasAnyLocation()) {
+ nextLocation = qualifier.layoutLocation;
+ qualifier.layoutLocation = TQualifier::layoutLocationEnd;
+ if (qualifier.hasComponent()) {
+ // "It is a compile-time error to apply the *component* qualifier to a ... block"
+ error(loc, "cannot apply to a block", "component", "");
+ }
+ if (qualifier.hasIndex()) {
+ error(loc, "cannot apply to a block", "index", "");
+ }
+ }
+ for (unsigned int member = 0; member < typeList.size(); ++member) {
+ TQualifier& memberQualifier = typeList[member].type->getQualifier();
+ const TSourceLoc& memberLoc = typeList[member].loc;
+ if (! memberQualifier.hasLocation()) {
+ if (nextLocation >= (int)TQualifier::layoutLocationEnd)
+ error(memberLoc, "location is too large", "location", "");
+ memberQualifier.layoutLocation = nextLocation;
+ memberQualifier.layoutComponent = 0;
+ }
+ nextLocation = memberQualifier.layoutLocation + intermediate.computeTypeLocationSize(*typeList[member].type);
+ }
+ }
+ }
+}
+
+void TParseContext::fixBlockXfbOffsets(TQualifier& qualifier, TTypeList& typeList)
+{
+ // "If a block is qualified with xfb_offset, all its
+ // members are assigned transform feedback buffer offsets. If a block is not qualified with xfb_offset, any
+ // members of that block not qualified with an xfb_offset will not be assigned transform feedback buffer
+ // offsets."
+
+ if (! qualifier.hasXfbBuffer() || ! qualifier.hasXfbOffset())
+ return;
+
+ int nextOffset = qualifier.layoutXfbOffset;
+ for (unsigned int member = 0; member < typeList.size(); ++member) {
+ TQualifier& memberQualifier = typeList[member].type->getQualifier();
+ bool containsDouble = false;
+ int memberSize = intermediate.computeTypeXfbSize(*typeList[member].type, containsDouble);
+ // see if we need to auto-assign an offset to this member
+ if (! memberQualifier.hasXfbOffset()) {
+ // "if applied to an aggregate containing a double, the offset must also be a multiple of 8"
+ if (containsDouble)
+ RoundToPow2(nextOffset, 8);
+ memberQualifier.layoutXfbOffset = nextOffset;
+ } else
+ nextOffset = memberQualifier.layoutXfbOffset;
+ nextOffset += memberSize;
+ }
+
+ // The above gave all block members an offset, so we can take it off the block now,
+ // which will avoid double counting the offset usage.
+ qualifier.layoutXfbOffset = TQualifier::layoutXfbOffsetEnd;
+}
+
+// Calculate and save the offset of each block member, using the recursively
+// defined block offset rules and the user-provided offset and align.
+//
+// Also, compute and save the total size of the block. For the block's size, arrayness
+// is not taken into account, as each element is backed by a separate buffer.
+//
+void TParseContext::fixBlockUniformOffsets(TQualifier& qualifier, TTypeList& typeList)
+{
+ if (! qualifier.isUniformOrBuffer())
+ return;
+ if (qualifier.layoutPacking != ElpStd140 && qualifier.layoutPacking != ElpStd430)
+ return;
+
+ int offset = 0;
+ int memberSize;
+ for (unsigned int member = 0; member < typeList.size(); ++member) {
+ TQualifier& memberQualifier = typeList[member].type->getQualifier();
+ const TSourceLoc& memberLoc = typeList[member].loc;
+
+ // "When align is applied to an array, it effects only the start of the array, not the array's internal stride."
+
+ // modify just the children's view of matrix layout, if there is one for this member
+ TLayoutMatrix subMatrixLayout = typeList[member].type->getQualifier().layoutMatrix;
+ int dummyStride;
+ int memberAlignment = intermediate.getBaseAlignment(*typeList[member].type, memberSize, dummyStride, qualifier.layoutPacking == ElpStd140,
+ subMatrixLayout != ElmNone ? subMatrixLayout == ElmRowMajor : qualifier.layoutMatrix == ElmRowMajor);
+ if (memberQualifier.hasOffset()) {
+ // "The specified offset must be a multiple
+ // of the base alignment of the type of the block member it qualifies, or a compile-time error results."
+ if (! IsMultipleOfPow2(memberQualifier.layoutOffset, memberAlignment))
+ error(memberLoc, "must be a multiple of the member's alignment", "offset", "");
+
+ // "It is a compile-time error to specify an offset that is smaller than the offset of the previous
+ // member in the block or that lies within the previous member of the block"
+ if (memberQualifier.layoutOffset < offset)
+ error(memberLoc, "cannot lie in previous members", "offset", "");
+
+ // "The offset qualifier forces the qualified member to start at or after the specified
+ // integral-constant expression, which will be its byte offset from the beginning of the buffer.
+ // "The actual offset of a member is computed as
+ // follows: If offset was declared, start with that offset, otherwise start with the next available offset."
+ offset = std::max(offset, memberQualifier.layoutOffset);
+ }
+
+ // "The actual alignment of a member will be the greater of the specified align alignment and the standard
+ // (e.g., std140) base alignment for the member's type."
+ if (memberQualifier.hasAlign())
+ memberAlignment = std::max(memberAlignment, memberQualifier.layoutAlign);
+
+ // "If the resulting offset is not a multiple of the actual alignment,
+ // increase it to the first offset that is a multiple of
+ // the actual alignment."
+ RoundToPow2(offset, memberAlignment);
+ typeList[member].type->getQualifier().layoutOffset = offset;
+ offset += memberSize;
+ }
+}
+
+// For an identifier that is already declared, add more qualification to it.
+void TParseContext::addQualifierToExisting(const TSourceLoc& loc, TQualifier qualifier, const TString& identifier)
+{
+ TSymbol* symbol = symbolTable.find(identifier);
+ if (! symbol) {
+ error(loc, "identifier not previously declared", identifier.c_str(), "");
+ return;
+ }
+ if (symbol->getAsFunction()) {
+ error(loc, "cannot re-qualify a function name", identifier.c_str(), "");
+ return;
+ }
+
+ if (qualifier.isAuxiliary() ||
+ qualifier.isMemory() ||
+ qualifier.isInterpolation() ||
+ qualifier.hasLayout() ||
+ qualifier.storage != EvqTemporary ||
+ qualifier.precision != EpqNone) {
+ error(loc, "cannot add storage, auxiliary, memory, interpolation, layout, or precision qualifier to an existing variable", identifier.c_str(), "");
+ return;
+ }
+
+ // For read-only built-ins, add a new symbol for holding the modified qualifier.
+ // This will bring up an entire block, if a block type has to be modified (e.g., gl_Position inside a block)
+ if (symbol->isReadOnly())
+ symbol = symbolTable.copyUp(symbol);
+
+ if (qualifier.invariant) {
+ if (intermediate.inIoAccessed(identifier))
+ error(loc, "cannot change qualification after use", "invariant", "");
+ symbol->getWritableType().getQualifier().invariant = true;
+ invariantCheck(loc, symbol->getType().getQualifier());
+ } else if (qualifier.noContraction) {
+ if (intermediate.inIoAccessed(identifier))
+ error(loc, "cannot change qualification after use", "precise", "");
+ symbol->getWritableType().getQualifier().noContraction = true;
+ } else if (qualifier.specConstant) {
+ symbol->getWritableType().getQualifier().makeSpecConstant();
+ if (qualifier.hasSpecConstantId())
+ symbol->getWritableType().getQualifier().layoutSpecConstantId = qualifier.layoutSpecConstantId;
+ } else
+ warn(loc, "unknown requalification", "", "");
+}
+
+void TParseContext::addQualifierToExisting(const TSourceLoc& loc, TQualifier qualifier, TIdentifierList& identifiers)
+{
+ for (unsigned int i = 0; i < identifiers.size(); ++i)
+ addQualifierToExisting(loc, qualifier, *identifiers[i]);
+}
+
+// Make sure 'invariant' isn't being applied to a non-allowed object.
+void TParseContext::invariantCheck(const TSourceLoc& loc, const TQualifier& qualifier)
+{
+ if (! qualifier.invariant)
+ return;
+
+ bool pipeOut = qualifier.isPipeOutput();
+ bool pipeIn = qualifier.isPipeInput();
+ if (version >= 300 || (profile != EEsProfile && version >= 420)) {
+ if (! pipeOut)
+ error(loc, "can only apply to an output", "invariant", "");
+ } else {
+ if ((language == EShLangVertex && pipeIn) || (! pipeOut && ! pipeIn))
+ error(loc, "can only apply to an output, or to an input in a non-vertex stage\n", "invariant", "");
+ }
+}
+
+//
+// Updating default qualifier for the case of a declaration with just a qualifier,
+// no type, block, or identifier.
+//
+void TParseContext::updateStandaloneQualifierDefaults(const TSourceLoc& loc, const TPublicType& publicType)
+{
+ if (publicType.shaderQualifiers.vertices != TQualifier::layoutNotSet) {
+ assert(language == EShLangTessControl || language == EShLangGeometry);
+ const char* id = (language == EShLangTessControl) ? "vertices" : "max_vertices";
+
+ if (publicType.qualifier.storage != EvqVaryingOut)
+ error(loc, "can only apply to 'out'", id, "");
+ if (! intermediate.setVertices(publicType.shaderQualifiers.vertices))
+ error(loc, "cannot change previously set layout value", id, "");
+
+ if (language == EShLangTessControl)
+ checkIoArraysConsistency(loc);
+ }
+ if (publicType.shaderQualifiers.invocations != TQualifier::layoutNotSet) {
+ if (publicType.qualifier.storage != EvqVaryingIn)
+ error(loc, "can only apply to 'in'", "invocations", "");
+ if (! intermediate.setInvocations(publicType.shaderQualifiers.invocations))
+ error(loc, "cannot change previously set layout value", "invocations", "");
+ }
+ if (publicType.shaderQualifiers.geometry != ElgNone) {
+ if (publicType.qualifier.storage == EvqVaryingIn) {
+ switch (publicType.shaderQualifiers.geometry) {
+ case ElgPoints:
+ case ElgLines:
+ case ElgLinesAdjacency:
+ case ElgTriangles:
+ case ElgTrianglesAdjacency:
+ case ElgQuads:
+ case ElgIsolines:
+ if (intermediate.setInputPrimitive(publicType.shaderQualifiers.geometry)) {
+ if (language == EShLangGeometry)
+ checkIoArraysConsistency(loc);
+ } else
+ error(loc, "cannot change previously set input primitive", TQualifier::getGeometryString(publicType.shaderQualifiers.geometry), "");
+ break;
+ default:
+ error(loc, "cannot apply to input", TQualifier::getGeometryString(publicType.shaderQualifiers.geometry), "");
+ }
+ } else if (publicType.qualifier.storage == EvqVaryingOut) {
+ switch (publicType.shaderQualifiers.geometry) {
+ case ElgPoints:
+ case ElgLineStrip:
+ case ElgTriangleStrip:
+ if (! intermediate.setOutputPrimitive(publicType.shaderQualifiers.geometry))
+ error(loc, "cannot change previously set output primitive", TQualifier::getGeometryString(publicType.shaderQualifiers.geometry), "");
+ break;
+ default:
+ error(loc, "cannot apply to 'out'", TQualifier::getGeometryString(publicType.shaderQualifiers.geometry), "");
+ }
+ } else
+ error(loc, "cannot apply to:", TQualifier::getGeometryString(publicType.shaderQualifiers.geometry), GetStorageQualifierString(publicType.qualifier.storage));
+ }
+ if (publicType.shaderQualifiers.spacing != EvsNone) {
+ if (publicType.qualifier.storage == EvqVaryingIn) {
+ if (! intermediate.setVertexSpacing(publicType.shaderQualifiers.spacing))
+ error(loc, "cannot change previously set vertex spacing", TQualifier::getVertexSpacingString(publicType.shaderQualifiers.spacing), "");
+ } else
+ error(loc, "can only apply to 'in'", TQualifier::getVertexSpacingString(publicType.shaderQualifiers.spacing), "");
+ }
+ if (publicType.shaderQualifiers.order != EvoNone) {
+ if (publicType.qualifier.storage == EvqVaryingIn) {
+ if (! intermediate.setVertexOrder(publicType.shaderQualifiers.order))
+ error(loc, "cannot change previously set vertex order", TQualifier::getVertexOrderString(publicType.shaderQualifiers.order), "");
+ } else
+ error(loc, "can only apply to 'in'", TQualifier::getVertexOrderString(publicType.shaderQualifiers.order), "");
+ }
+ if (publicType.shaderQualifiers.pointMode) {
+ if (publicType.qualifier.storage == EvqVaryingIn)
+ intermediate.setPointMode();
+ else
+ error(loc, "can only apply to 'in'", "point_mode", "");
+ }
+ for (int i = 0; i < 3; ++i) {
+ if (publicType.shaderQualifiers.localSize[i] > 1) {
+ if (publicType.qualifier.storage == EvqVaryingIn) {
+ if (! intermediate.setLocalSize(i, publicType.shaderQualifiers.localSize[i]))
+ error(loc, "cannot change previously set size", "local_size", "");
+ else {
+ int max = 0;
+ switch (i) {
+ case 0: max = resources.maxComputeWorkGroupSizeX; break;
+ case 1: max = resources.maxComputeWorkGroupSizeY; break;
+ case 2: max = resources.maxComputeWorkGroupSizeZ; break;
+ default: break;
+ }
+ if (intermediate.getLocalSize(i) > (unsigned int)max)
+ error(loc, "too large; see gl_MaxComputeWorkGroupSize", "local_size", "");
+
+ // Fix the existing constant gl_WorkGroupSize with this new information.
+ TVariable* workGroupSize = getEditableVariable("gl_WorkGroupSize");
+ if (workGroupSize != nullptr)
+ workGroupSize->getWritableConstArray()[i].setUConst(intermediate.getLocalSize(i));
+ }
+ } else
+ error(loc, "can only apply to 'in'", "local_size", "");
+ }
+ if (publicType.shaderQualifiers.localSizeSpecId[i] != TQualifier::layoutNotSet) {
+ if (publicType.qualifier.storage == EvqVaryingIn) {
+ if (! intermediate.setLocalSizeSpecId(i, publicType.shaderQualifiers.localSizeSpecId[i]))
+ error(loc, "cannot change previously set size", "local_size", "");
+ } else
+ error(loc, "can only apply to 'in'", "local_size id", "");
+ // Set the workgroup built-in variable as a specialization constant
+ TVariable* workGroupSize = getEditableVariable("gl_WorkGroupSize");
+ if (workGroupSize != nullptr)
+ workGroupSize->getWritableType().getQualifier().specConstant = true;
+ }
+ }
+ if (publicType.shaderQualifiers.earlyFragmentTests) {
+ if (publicType.qualifier.storage == EvqVaryingIn)
+ intermediate.setEarlyFragmentTests();
+ else
+ error(loc, "can only apply to 'in'", "early_fragment_tests", "");
+ }
+ if (publicType.shaderQualifiers.blendEquation) {
+ if (publicType.qualifier.storage != EvqVaryingOut)
+ error(loc, "can only apply to 'out'", "blend equation", "");
+ }
+
+ const TQualifier& qualifier = publicType.qualifier;
+
+ if (qualifier.isAuxiliary() ||
+ qualifier.isMemory() ||
+ qualifier.isInterpolation() ||
+ qualifier.precision != EpqNone)
+ error(loc, "cannot use auxiliary, memory, interpolation, or precision qualifier in a default qualifier declaration (declaration with no type)", "qualifier", "");
+ // "The offset qualifier can only be used on block members of blocks..."
+ // "The align qualifier can only be used on blocks or block members..."
+ if (qualifier.hasOffset() ||
+ qualifier.hasAlign())
+ error(loc, "cannot use offset or align qualifiers in a default qualifier declaration (declaration with no type)", "layout qualifier", "");
+
+ layoutQualifierCheck(loc, qualifier);
+
+ switch (qualifier.storage) {
+ case EvqUniform:
+ if (qualifier.hasMatrix())
+ globalUniformDefaults.layoutMatrix = qualifier.layoutMatrix;
+ if (qualifier.hasPacking())
+ globalUniformDefaults.layoutPacking = qualifier.layoutPacking;
+ break;
+ case EvqBuffer:
+ if (qualifier.hasMatrix())
+ globalBufferDefaults.layoutMatrix = qualifier.layoutMatrix;
+ if (qualifier.hasPacking())
+ globalBufferDefaults.layoutPacking = qualifier.layoutPacking;
+ break;
+ case EvqVaryingIn:
+ break;
+ case EvqVaryingOut:
+ if (qualifier.hasStream())
+ globalOutputDefaults.layoutStream = qualifier.layoutStream;
+ if (qualifier.hasXfbBuffer())
+ globalOutputDefaults.layoutXfbBuffer = qualifier.layoutXfbBuffer;
+ if (globalOutputDefaults.hasXfbBuffer() && qualifier.hasXfbStride()) {
+ if (! intermediate.setXfbBufferStride(globalOutputDefaults.layoutXfbBuffer, qualifier.layoutXfbStride))
+ error(loc, "all stride settings must match for xfb buffer", "xfb_stride", "%d", qualifier.layoutXfbBuffer);
+ }
+ break;
+ default:
+ error(loc, "default qualifier requires 'uniform', 'buffer', 'in', or 'out' storage qualification", "", "");
+ return;
+ }
+
+ if (qualifier.hasBinding())
+ error(loc, "cannot declare a default, include a type or full declaration", "binding", "");
+ if (qualifier.hasAnyLocation())
+ error(loc, "cannot declare a default, use a full declaration", "location/component/index", "");
+ if (qualifier.hasXfbOffset())
+ error(loc, "cannot declare a default, use a full declaration", "xfb_offset", "");
+ if (qualifier.layoutPushConstant)
+ error(loc, "cannot declare a default, can only be used on a block", "push_constant", "");
+ if (qualifier.hasSpecConstantId())
+ error(loc, "cannot declare a default, can only be used on a scalar", "constant_id", "");
+}
+
+//
+// Take the sequence of statements that has been built up since the last case/default,
+// put it on the list of top-level nodes for the current (inner-most) switch statement,
+// and follow that by the case/default we are on now. (See switch topology comment on
+// TIntermSwitch.)
+//
+void TParseContext::wrapupSwitchSubsequence(TIntermAggregate* statements, TIntermNode* branchNode)
+{
+ TIntermSequence* switchSequence = switchSequenceStack.back();
+
+ if (statements) {
+ if (switchSequence->size() == 0)
+ error(statements->getLoc(), "cannot have statements before first case/default label", "switch", "");
+ statements->setOperator(EOpSequence);
+ switchSequence->push_back(statements);
+ }
+ if (branchNode) {
+ // check all previous cases for the same label (or both are 'default')
+ for (unsigned int s = 0; s < switchSequence->size(); ++s) {
+ TIntermBranch* prevBranch = (*switchSequence)[s]->getAsBranchNode();
+ if (prevBranch) {
+ TIntermTyped* prevExpression = prevBranch->getExpression();
+ TIntermTyped* newExpression = branchNode->getAsBranchNode()->getExpression();
+ if (prevExpression == nullptr && newExpression == nullptr)
+ error(branchNode->getLoc(), "duplicate label", "default", "");
+ else if (prevExpression != nullptr &&
+ newExpression != nullptr &&
+ prevExpression->getAsConstantUnion() &&
+ newExpression->getAsConstantUnion() &&
+ prevExpression->getAsConstantUnion()->getConstArray()[0].getIConst() ==
+ newExpression->getAsConstantUnion()->getConstArray()[0].getIConst())
+ error(branchNode->getLoc(), "duplicated value", "case", "");
+ }
+ }
+ switchSequence->push_back(branchNode);
+ }
+}
+
+//
+// Turn the top-level node sequence built up of wrapupSwitchSubsequence9)
+// into a switch node.
+//
+TIntermNode* TParseContext::addSwitch(const TSourceLoc& loc, TIntermTyped* expression, TIntermAggregate* lastStatements)
+{
+ profileRequires(loc, EEsProfile, 300, nullptr, "switch statements");
+ profileRequires(loc, ENoProfile, 130, nullptr, "switch statements");
+
+ wrapupSwitchSubsequence(lastStatements, nullptr);
+
+ if (expression == nullptr ||
+ (expression->getBasicType() != EbtInt && expression->getBasicType() != EbtUint) ||
+ expression->getType().isArray() || expression->getType().isMatrix() || expression->getType().isVector())
+ error(loc, "condition must be a scalar integer expression", "switch", "");
+
+ // If there is nothing to do, drop the switch but still execute the expression
+ TIntermSequence* switchSequence = switchSequenceStack.back();
+ if (switchSequence->size() == 0)
+ return expression;
+
+ if (lastStatements == nullptr) {
+ // This was originally an ERRROR, because early versions of the specification said
+ // "it is an error to have no statement between a label and the end of the switch statement."
+ // The specifications were updated to remove this (being ill-defined what a "statement" was),
+ // so, this became a warning. However, 3.0 tests still check for the error.
+ if (profile == EEsProfile && version <= 300 && ! relaxedErrors())
+ error(loc, "last case/default label not followed by statements", "switch", "");
+ else
+ warn(loc, "last case/default label not followed by statements", "switch", "");
+
+ // emulate a break for error recovery
+ lastStatements = intermediate.makeAggregate(intermediate.addBranch(EOpBreak, loc));
+ lastStatements->setOperator(EOpSequence);
+ switchSequence->push_back(lastStatements);
+ }
+
+ TIntermAggregate* body = new TIntermAggregate(EOpSequence);
+ body->getSequence() = *switchSequenceStack.back();
+ body->setLoc(loc);
+
+ TIntermSwitch* switchNode = new TIntermSwitch(expression, body);
+ switchNode->setLoc(loc);
+
+ return switchNode;
+}
+
+} // end namespace glslang
diff --git a/chromium/third_party/glslang/src/glslang/MachineIndependent/ParseHelper.h b/chromium/third_party/glslang/src/glslang/MachineIndependent/ParseHelper.h
new file mode 100644
index 00000000000..a4775e71875
--- /dev/null
+++ b/chromium/third_party/glslang/src/glslang/MachineIndependent/ParseHelper.h
@@ -0,0 +1,388 @@
+//
+//Copyright (C) 2002-2005 3Dlabs Inc. Ltd.
+//Copyright (C) 2012-2013 LunarG, 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:
+//
+// Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 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.
+//
+// Neither the name of 3Dlabs Inc. Ltd. nor the names of its
+// contributors may be used to endorse or promote products derived
+// from this software without specific prior written permission.
+//
+//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+//"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 THE
+//COPYRIGHT HOLDERS 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.
+//
+
+//
+// This header defines a two-level parse-helper hierarchy, derived from
+// TParseVersions:
+// - TParseContextBase: sharable across multiple parsers
+// - TParseContext: GLSL specific helper
+//
+
+#ifndef _PARSER_HELPER_INCLUDED_
+#define _PARSER_HELPER_INCLUDED_
+
+#include "parseVersions.h"
+#include "../Include/ShHandle.h"
+#include "SymbolTable.h"
+#include "localintermediate.h"
+#include "Scan.h"
+#include <functional>
+
+#include <functional>
+
+namespace glslang {
+
+struct TPragma {
+ TPragma(bool o, bool d) : optimize(o), debug(d) { }
+ bool optimize;
+ bool debug;
+ TPragmaTable pragmaTable;
+};
+
+class TScanContext;
+class TPpContext;
+
+typedef std::set<int> TIdSetType;
+
+//
+// Sharable code (as well as what's in TParseVersions) across
+// parse helpers.
+//
+class TParseContextBase : public TParseVersions {
+public:
+ TParseContextBase(TSymbolTable& symbolTable, TIntermediate& interm, int version,
+ EProfile profile, int spv, int vulkan, EShLanguage language,
+ TInfoSink& infoSink, bool forwardCompatible, EShMessages messages)
+ : TParseVersions(interm, version, profile, spv, vulkan, language, infoSink, forwardCompatible, messages),
+ symbolTable(symbolTable), tokensBeforeEOF(false),
+ linkage(nullptr), scanContext(nullptr), ppContext(nullptr) { }
+ virtual ~TParseContextBase() { }
+
+ virtual void setLimits(const TBuiltInResource&) = 0;
+
+ EShLanguage getLanguage() const { return language; }
+ TIntermAggregate*& getLinkage() { return linkage; }
+ void setScanContext(TScanContext* c) { scanContext = c; }
+ TScanContext* getScanContext() const { return scanContext; }
+ void setPpContext(TPpContext* c) { ppContext = c; }
+ TPpContext* getPpContext() const { return ppContext; }
+
+ virtual void setLineCallback(const std::function<void(int, int, bool, int, const char*)>& func) { lineCallback = func; }
+ virtual void setExtensionCallback(const std::function<void(int, const char*, const char*)>& func) { extensionCallback = func; }
+ virtual void setVersionCallback(const std::function<void(int, int, const char*)>& func) { versionCallback = func; }
+ virtual void setPragmaCallback(const std::function<void(int, const TVector<TString>&)>& func) { pragmaCallback = func; }
+ virtual void setErrorCallback(const std::function<void(int, const char*)>& func) { errorCallback = func; }
+
+ virtual void reservedPpErrorCheck(const TSourceLoc&, const char* name, const char* op) = 0;
+ virtual bool lineContinuationCheck(const TSourceLoc&, bool endOfComment) = 0;
+ virtual bool lineDirectiveShouldSetNextLine() const = 0;
+ virtual void handlePragma(const TSourceLoc&, const TVector<TString>&) = 0;
+
+ virtual bool parseShaderStrings(TPpContext&, TInputScanner& input, bool versionWillBeError = false) = 0;
+
+ virtual void notifyVersion(int line, int version, const char* type_string)
+ {
+ if (versionCallback)
+ versionCallback(line, version, type_string);
+ }
+ virtual void notifyErrorDirective(int line, const char* error_message)
+ {
+ if (errorCallback)
+ errorCallback(line, error_message);
+ }
+ virtual void notifyLineDirective(int curLineNo, int newLineNo, bool hasSource, int sourceNum, const char* sourceName)
+ {
+ if (lineCallback)
+ lineCallback(curLineNo, newLineNo, hasSource, sourceNum, sourceName);
+ }
+ virtual void notifyExtensionDirective(int line, const char* extension, const char* behavior)
+ {
+ if (extensionCallback)
+ extensionCallback(line, extension, behavior);
+ }
+
+ TSymbolTable& symbolTable; // symbol table that goes with the current language, version, and profile
+ bool tokensBeforeEOF;
+
+protected:
+ TParseContextBase(TParseContextBase&);
+ TParseContextBase& operator=(TParseContextBase&);
+
+ TIntermAggregate* linkage; // aggregate node of objects the linker may need, if not referenced by the rest of the AST
+ TScanContext* scanContext;
+ TPpContext* ppContext;
+
+ // These, if set, will be called when a line, pragma ... is preprocessed.
+ // They will be called with any parameters to the original directive.
+ std::function<void(int, int, bool, int, const char*)> lineCallback;
+ std::function<void(int, const TVector<TString>&)> pragmaCallback;
+ std::function<void(int, int, const char*)> versionCallback;
+ std::function<void(int, const char*, const char*)> extensionCallback;
+ std::function<void(int, const char*)> errorCallback;
+};
+
+//
+// GLSL-specific parse helper. Should have GLSL in the name, but that's
+// too big of a change for comparing branches at the moment, and perhaps
+// impacts downstream consumers as well.
+//
+class TParseContext : public TParseContextBase {
+public:
+ TParseContext(TSymbolTable&, TIntermediate&, bool parsingBuiltins, int version, EProfile, int spv, int vulkan, EShLanguage, TInfoSink&,
+ bool forwardCompatible = false, EShMessages messages = EShMsgDefault);
+ virtual ~TParseContext();
+
+ void setLimits(const TBuiltInResource&);
+ bool parseShaderStrings(TPpContext&, TInputScanner& input, bool versionWillBeError = false);
+ void parserError(const char* s); // for bison's yyerror
+
+ void C_DECL error(const TSourceLoc&, const char* szReason, const char* szToken,
+ const char* szExtraInfoFormat, ...);
+ void C_DECL warn(const TSourceLoc&, const char* szReason, const char* szToken,
+ const char* szExtraInfoFormat, ...);
+ void C_DECL ppError(const TSourceLoc&, const char* szReason, const char* szToken,
+ const char* szExtraInfoFormat, ...);
+ void C_DECL ppWarn(const TSourceLoc&, const char* szReason, const char* szToken,
+ const char* szExtraInfoFormat, ...);
+
+ void reservedErrorCheck(const TSourceLoc&, const TString&);
+ void reservedPpErrorCheck(const TSourceLoc&, const char* name, const char* op);
+ bool lineContinuationCheck(const TSourceLoc&, bool endOfComment);
+ bool lineDirectiveShouldSetNextLine() const;
+ bool builtInName(const TString&);
+
+ void handlePragma(const TSourceLoc&, const TVector<TString>&);
+ TIntermTyped* handleVariable(const TSourceLoc&, TSymbol* symbol, const TString* string);
+ TIntermTyped* handleBracketDereference(const TSourceLoc&, TIntermTyped* base, TIntermTyped* index);
+ void checkIndex(const TSourceLoc&, const TType&, int& index);
+ void handleIndexLimits(const TSourceLoc&, TIntermTyped* base, TIntermTyped* index);
+
+ void makeEditable(TSymbol*&);
+ TVariable* getEditableVariable(const char* name);
+ bool isIoResizeArray(const TType&) const;
+ void fixIoArraySize(const TSourceLoc&, TType&);
+ void ioArrayCheck(const TSourceLoc&, const TType&, const TString& identifier);
+ void handleIoResizeArrayAccess(const TSourceLoc&, TIntermTyped* base);
+ void checkIoArraysConsistency(const TSourceLoc&, bool tailOnly = false);
+ int getIoArrayImplicitSize() const;
+ void checkIoArrayConsistency(const TSourceLoc&, int requiredSize, const char* feature, TType&, const TString&);
+
+ TIntermTyped* handleBinaryMath(const TSourceLoc&, const char* str, TOperator op, TIntermTyped* left, TIntermTyped* right);
+ TIntermTyped* handleUnaryMath(const TSourceLoc&, const char* str, TOperator op, TIntermTyped* childNode);
+ TIntermTyped* handleDotDereference(const TSourceLoc&, TIntermTyped* base, const TString& field);
+ void blockMemberExtensionCheck(const TSourceLoc&, const TIntermTyped* base, const TString& field);
+ TFunction* handleFunctionDeclarator(const TSourceLoc&, TFunction& function, bool prototype);
+ TIntermAggregate* handleFunctionDefinition(const TSourceLoc&, TFunction&);
+ TIntermTyped* handleFunctionCall(const TSourceLoc&, TFunction*, TIntermNode*);
+ void checkLocation(const TSourceLoc&, TOperator);
+ TIntermTyped* handleLengthMethod(const TSourceLoc&, TFunction*, TIntermNode*);
+ void addInputArgumentConversions(const TFunction&, TIntermNode*&) const;
+ TIntermTyped* addOutputArgumentConversions(const TFunction&, TIntermAggregate&) const;
+ void builtInOpCheck(const TSourceLoc&, const TFunction&, TIntermOperator&);
+ void nonOpBuiltInCheck(const TSourceLoc&, const TFunction&, TIntermAggregate&);
+ TFunction* handleConstructorCall(const TSourceLoc&, const TPublicType&);
+
+ bool parseVectorFields(const TSourceLoc&, const TString&, int vecSize, TVectorFields&);
+ void assignError(const TSourceLoc&, const char* op, TString left, TString right);
+ void unaryOpError(const TSourceLoc&, const char* op, TString operand);
+ void binaryOpError(const TSourceLoc&, const char* op, TString left, TString right);
+ void variableCheck(TIntermTyped*& nodePtr);
+ bool lValueErrorCheck(const TSourceLoc&, const char* op, TIntermTyped*);
+ void rValueErrorCheck(const TSourceLoc&, const char* op, TIntermTyped*);
+ void constantValueCheck(TIntermTyped* node, const char* token);
+ void integerCheck(const TIntermTyped* node, const char* token);
+ void globalCheck(const TSourceLoc&, const char* token);
+ bool constructorError(const TSourceLoc&, TIntermNode*, TFunction&, TOperator, TType&);
+ bool constructorTextureSamplerError(const TSourceLoc&, const TFunction&);
+ void arraySizeCheck(const TSourceLoc&, TIntermTyped* expr, TArraySize&);
+ bool arrayQualifierError(const TSourceLoc&, const TQualifier&);
+ bool arrayError(const TSourceLoc&, const TType&);
+ void arraySizeRequiredCheck(const TSourceLoc&, const TArraySizes&);
+ void structArrayCheck(const TSourceLoc&, const TType& structure);
+ void arrayUnsizedCheck(const TSourceLoc&, const TQualifier&, const TArraySizes*, bool initializer, bool lastMember);
+ void arrayOfArrayVersionCheck(const TSourceLoc&);
+ void arrayDimCheck(const TSourceLoc&, const TArraySizes* sizes1, const TArraySizes* sizes2);
+ void arrayDimCheck(const TSourceLoc&, const TType*, const TArraySizes*);
+ void arrayDimMerge(TType& type, const TArraySizes* sizes);
+ bool voidErrorCheck(const TSourceLoc&, const TString&, TBasicType);
+ void boolCheck(const TSourceLoc&, const TIntermTyped*);
+ void boolCheck(const TSourceLoc&, const TPublicType&);
+ void samplerCheck(const TSourceLoc&, const TType&, const TString& identifier, TIntermTyped* initializer);
+ void atomicUintCheck(const TSourceLoc&, const TType&, const TString& identifier);
+ void transparentCheck(const TSourceLoc&, const TType&, const TString& identifier);
+ void globalQualifierFixCheck(const TSourceLoc&, TQualifier&);
+ void globalQualifierTypeCheck(const TSourceLoc&, const TQualifier&, const TPublicType&);
+ bool structQualifierErrorCheck(const TSourceLoc&, const TPublicType& pType);
+ void mergeQualifiers(const TSourceLoc&, TQualifier& dst, const TQualifier& src, bool force);
+ void setDefaultPrecision(const TSourceLoc&, TPublicType&, TPrecisionQualifier);
+ int computeSamplerTypeIndex(TSampler&);
+ TPrecisionQualifier getDefaultPrecision(TPublicType&);
+ void precisionQualifierCheck(const TSourceLoc&, TBasicType, TQualifier&);
+ void parameterTypeCheck(const TSourceLoc&, TStorageQualifier qualifier, const TType& type);
+ bool containsFieldWithBasicType(const TType& type ,TBasicType basicType);
+ TSymbol* redeclareBuiltinVariable(const TSourceLoc&, const TString&, const TQualifier&, const TShaderQualifiers&, bool& newDeclaration);
+ void redeclareBuiltinBlock(const TSourceLoc&, TTypeList& typeList, const TString& blockName, const TString* instanceName, TArraySizes* arraySizes);
+ void paramCheckFix(const TSourceLoc&, const TStorageQualifier&, TType& type);
+ void paramCheckFix(const TSourceLoc&, const TQualifier&, TType& type);
+ void nestedBlockCheck(const TSourceLoc&);
+ void nestedStructCheck(const TSourceLoc&);
+ void arrayObjectCheck(const TSourceLoc&, const TType&, const char* op);
+ void opaqueCheck(const TSourceLoc&, const TType&, const char* op);
+ void specializationCheck(const TSourceLoc&, const TType&, const char* op);
+ void structTypeCheck(const TSourceLoc&, TPublicType&);
+ void inductiveLoopCheck(const TSourceLoc&, TIntermNode* init, TIntermLoop* loop);
+ void arrayLimitCheck(const TSourceLoc&, const TString&, int size);
+ void limitCheck(const TSourceLoc&, int value, const char* limit, const char* feature);
+
+ void inductiveLoopBodyCheck(TIntermNode*, int loopIndexId, TSymbolTable&);
+ void constantIndexExpressionCheck(TIntermNode*);
+
+ void setLayoutQualifier(const TSourceLoc&, TPublicType&, TString&);
+ void setLayoutQualifier(const TSourceLoc&, TPublicType&, TString&, const TIntermTyped*);
+ void mergeObjectLayoutQualifiers(TQualifier& dest, const TQualifier& src, bool inheritOnly);
+ void layoutObjectCheck(const TSourceLoc&, const TSymbol&);
+ void layoutTypeCheck(const TSourceLoc&, const TType&);
+ void layoutQualifierCheck(const TSourceLoc&, const TQualifier&);
+ void checkNoShaderLayouts(const TSourceLoc&, const TShaderQualifiers&);
+ void fixOffset(const TSourceLoc&, TSymbol&);
+
+ const TFunction* findFunction(const TSourceLoc& loc, const TFunction& call, bool& builtIn);
+ const TFunction* findFunctionExact(const TSourceLoc& loc, const TFunction& call, bool& builtIn);
+ const TFunction* findFunction120(const TSourceLoc& loc, const TFunction& call, bool& builtIn);
+ const TFunction* findFunction400(const TSourceLoc& loc, const TFunction& call, bool& builtIn);
+ void declareTypeDefaults(const TSourceLoc&, const TPublicType&);
+ TIntermNode* declareVariable(const TSourceLoc&, TString& identifier, const TPublicType&, TArraySizes* typeArray = 0, TIntermTyped* initializer = 0);
+ TIntermTyped* addConstructor(const TSourceLoc&, TIntermNode*, const TType&, TOperator);
+ TIntermTyped* constructAggregate(TIntermNode*, const TType&, int, const TSourceLoc&);
+ TIntermTyped* constructBuiltIn(const TType&, TOperator, TIntermTyped*, const TSourceLoc&, bool subset);
+ void declareBlock(const TSourceLoc&, TTypeList& typeList, const TString* instanceName = 0, TArraySizes* arraySizes = 0);
+ void blockStageIoCheck(const TSourceLoc&, const TQualifier&);
+ void blockQualifierCheck(const TSourceLoc&, const TQualifier&, bool instanceName);
+ void fixBlockLocations(const TSourceLoc&, TQualifier&, TTypeList&, bool memberWithLocation, bool memberWithoutLocation);
+ void fixBlockXfbOffsets(TQualifier&, TTypeList&);
+ void fixBlockUniformOffsets(TQualifier&, TTypeList&);
+ void addQualifierToExisting(const TSourceLoc&, TQualifier, const TString& identifier);
+ void addQualifierToExisting(const TSourceLoc&, TQualifier, TIdentifierList&);
+ void invariantCheck(const TSourceLoc&, const TQualifier&);
+ void updateStandaloneQualifierDefaults(const TSourceLoc&, const TPublicType&);
+ void wrapupSwitchSubsequence(TIntermAggregate* statements, TIntermNode* branchNode);
+ TIntermNode* addSwitch(const TSourceLoc&, TIntermTyped* expression, TIntermAggregate* body);
+
+ void updateImplicitArraySize(const TSourceLoc&, TIntermNode*, int index);
+
+protected:
+ void nonInitConstCheck(const TSourceLoc&, TString& identifier, TType& type);
+ void inheritGlobalDefaults(TQualifier& dst) const;
+ TVariable* makeInternalVariable(const char* name, const TType&) const;
+ TVariable* declareNonArray(const TSourceLoc&, TString& identifier, TType&, bool& newDeclaration);
+ void declareArray(const TSourceLoc&, TString& identifier, const TType&, TSymbol*&, bool& newDeclaration);
+ TIntermNode* executeInitializer(const TSourceLoc&, TIntermTyped* initializer, TVariable* variable);
+ TIntermTyped* convertInitializerList(const TSourceLoc&, const TType&, TIntermTyped* initializer);
+ TOperator mapTypeToConstructorOp(const TType&) const;
+ void finalErrorCheck();
+ void outputMessage(const TSourceLoc&, const char* szReason, const char* szToken,
+ const char* szExtraInfoFormat, TPrefixType prefix,
+ va_list args);
+
+public:
+ //
+ // Generally, bison productions, the scanner, and the PP need read/write access to these; just give them direct access
+ //
+
+ // Current state of parsing
+ struct TPragma contextPragma;
+ int loopNestingLevel; // 0 if outside all loops
+ int structNestingLevel; // 0 if outside blocks and structures
+ int controlFlowNestingLevel; // 0 if outside all flow control
+ int statementNestingLevel; // 0 if outside all flow control or compound statements
+ TList<TIntermSequence*> switchSequenceStack; // case, node, case, case, node, ...; ensure only one node between cases; stack of them for nesting
+ TList<int> switchLevel; // the statementNestingLevel the current switch statement is at, which must match the level of its case statements
+ bool inMain; // if inside a function, true if the function is main
+ bool postMainReturn; // if inside a function, true if the function is main and this is after a return statement
+ 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
+ const TString* blockName;
+ TQualifier currentBlockQualifier;
+ TPrecisionQualifier defaultPrecision[EbtNumTypes];
+ TBuiltInResource resources;
+ TLimits& limits;
+
+protected:
+ TParseContext(TParseContext&);
+ TParseContext& operator=(TParseContext&);
+
+ const bool parsingBuiltins; // true if parsing built-in symbols/functions
+ static const int maxSamplerIndex = EsdNumDims * (EbtNumTypes * (2 * 2 * 2)); // see computeSamplerTypeIndex()
+ TPrecisionQualifier defaultSamplerPrecision[maxSamplerIndex];
+ bool afterEOF;
+ TQualifier globalBufferDefaults;
+ TQualifier globalUniformDefaults;
+ TQualifier globalInputDefaults;
+ TQualifier globalOutputDefaults;
+ int* atomicUintOffsets; // to become an array of the right size to hold an offset per binding point
+ TString currentCaller; // name of last function body entered (not valid when at global scope)
+ TIdSetType inductiveLoopIds;
+ bool anyIndexLimits;
+ TVector<TIntermTyped*> needsIndexLimitationChecking;
+
+ //
+ // Geometry shader input arrays:
+ // - array sizing is based on input primitive and/or explicit size
+ //
+ // Tessellation control output arrays:
+ // - array sizing is based on output layout(vertices=...) and/or explicit size
+ //
+ // Both:
+ // - array sizing is retroactive
+ // - built-in block redeclarations interact with this
+ //
+ // Design:
+ // - use a per-context "resize-list", a list of symbols whose array sizes
+ // can be fixed
+ //
+ // - the resize-list starts empty at beginning of user-shader compilation, it does
+ // not have built-ins in it
+ //
+ // - on built-in array use: copyUp() symbol and add it to the resize-list
+ //
+ // - on user array declaration: add it to the resize-list
+ //
+ // - on block redeclaration: copyUp() symbol and add it to the resize-list
+ // * note, that appropriately gives an error if redeclaring a block that
+ // was already used and hence already copied-up
+ //
+ // - on seeing a layout declaration that sizes the array, fix everything in the
+ // resize-list, giving errors for mismatch
+ //
+ // - on seeing an array size declaration, give errors on mismatch between it and previous
+ // array-sizing declarations
+ //
+ TVector<TSymbol*> ioArraySymbolResizeList;
+};
+
+} // end namespace glslang
+
+#endif // _PARSER_HELPER_INCLUDED_
diff --git a/chromium/third_party/glslang/src/glslang/MachineIndependent/PoolAlloc.cpp b/chromium/third_party/glslang/src/glslang/MachineIndependent/PoolAlloc.cpp
new file mode 100644
index 00000000000..d56979b492b
--- /dev/null
+++ b/chromium/third_party/glslang/src/glslang/MachineIndependent/PoolAlloc.cpp
@@ -0,0 +1,347 @@
+//
+//Copyright (C) 2002-2005 3Dlabs Inc. Ltd.
+//All rights reserved.
+//
+//Redistribution and use in source and binary forms, with or without
+//modification, are permitted provided that the following conditions
+//are met:
+//
+// Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 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.
+//
+// Neither the name of 3Dlabs Inc. Ltd. nor the names of its
+// contributors may be used to endorse or promote products derived
+// from this software without specific prior written permission.
+//
+//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+//"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 THE
+//COPYRIGHT HOLDERS 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.
+//
+
+#include "../Include/Common.h"
+#include "../Include/PoolAlloc.h"
+
+#include "../Include/InitializeGlobals.h"
+#include "../OSDependent/osinclude.h"
+
+namespace glslang {
+
+OS_TLSIndex PoolIndex;
+
+void InitializeMemoryPools()
+{
+ TThreadMemoryPools* pools = static_cast<TThreadMemoryPools*>(OS_GetTLSValue(PoolIndex));
+ if (pools)
+ return;
+
+ TPoolAllocator *threadPoolAllocator = new TPoolAllocator();
+
+ TThreadMemoryPools* threadData = new TThreadMemoryPools();
+
+ threadData->threadPoolAllocator = threadPoolAllocator;
+
+ OS_SetTLSValue(PoolIndex, threadData);
+}
+
+void FreeGlobalPools()
+{
+ // Release the allocated memory for this thread.
+ TThreadMemoryPools* globalPools = static_cast<TThreadMemoryPools*>(OS_GetTLSValue(PoolIndex));
+ if (! globalPools)
+ return;
+
+ GetThreadPoolAllocator().popAll();
+ delete &GetThreadPoolAllocator();
+ delete globalPools;
+}
+
+bool InitializePoolIndex()
+{
+ // Allocate a TLS index.
+ if ((PoolIndex = OS_AllocTLSIndex()) == OS_INVALID_TLS_INDEX)
+ return false;
+
+ return true;
+}
+
+void FreePoolIndex()
+{
+ // Release the TLS index.
+ OS_FreeTLSIndex(PoolIndex);
+}
+
+TPoolAllocator& GetThreadPoolAllocator()
+{
+ TThreadMemoryPools* threadData = static_cast<TThreadMemoryPools*>(OS_GetTLSValue(PoolIndex));
+
+ return *threadData->threadPoolAllocator;
+}
+
+void SetThreadPoolAllocator(TPoolAllocator& poolAllocator)
+{
+ TThreadMemoryPools* threadData = static_cast<TThreadMemoryPools*>(OS_GetTLSValue(PoolIndex));
+
+ threadData->threadPoolAllocator = &poolAllocator;
+}
+
+//
+// Implement the functionality of the TPoolAllocator class, which
+// is documented in PoolAlloc.h.
+//
+TPoolAllocator::TPoolAllocator(int growthIncrement, int allocationAlignment) :
+ pageSize(growthIncrement),
+ alignment(allocationAlignment),
+ freeList(0),
+ inUseList(0),
+ numCalls(0)
+{
+ //
+ // Don't allow page sizes we know are smaller than all common
+ // OS page sizes.
+ //
+ if (pageSize < 4*1024)
+ pageSize = 4*1024;
+
+ //
+ // A large currentPageOffset indicates a new page needs to
+ // be obtained to allocate memory.
+ //
+ currentPageOffset = pageSize;
+
+ //
+ // Adjust alignment to be at least pointer aligned and
+ // power of 2.
+ //
+ size_t minAlign = sizeof(void*);
+ alignment &= ~(minAlign - 1);
+ if (alignment < minAlign)
+ alignment = minAlign;
+ size_t a = 1;
+ while (a < alignment)
+ a <<= 1;
+ alignment = a;
+ alignmentMask = a - 1;
+
+ //
+ // Align header skip
+ //
+ headerSkip = minAlign;
+ if (headerSkip < sizeof(tHeader)) {
+ headerSkip = (sizeof(tHeader) + alignmentMask) & ~alignmentMask;
+ }
+
+ push();
+}
+
+TPoolAllocator::~TPoolAllocator()
+{
+ while (inUseList) {
+ tHeader* next = inUseList->nextPage;
+ inUseList->~tHeader();
+ delete [] reinterpret_cast<char*>(inUseList);
+ inUseList = next;
+ }
+
+ //
+ // Always delete the free list memory - it can't be being
+ // (correctly) referenced, whether the pool allocator was
+ // global or not. We should not check the guard blocks
+ // here, because we did it already when the block was
+ // placed into the free list.
+ //
+ while (freeList) {
+ tHeader* next = freeList->nextPage;
+ delete [] reinterpret_cast<char*>(freeList);
+ freeList = next;
+ }
+}
+
+const unsigned char TAllocation::guardBlockBeginVal = 0xfb;
+const unsigned char TAllocation::guardBlockEndVal = 0xfe;
+const unsigned char TAllocation::userDataFill = 0xcd;
+
+# ifdef GUARD_BLOCKS
+ const size_t TAllocation::guardBlockSize = 16;
+# else
+ const size_t TAllocation::guardBlockSize = 0;
+# endif
+
+//
+// Check a single guard block for damage
+//
+#ifdef GUARD_BLOCKS
+void TAllocation::checkGuardBlock(unsigned char* blockMem, unsigned char val, const char* locText) const
+#else
+void TAllocation::checkGuardBlock(unsigned char*, unsigned char, const char*) const
+#endif
+{
+#ifdef GUARD_BLOCKS
+ for (size_t x = 0; x < guardBlockSize; x++) {
+ if (blockMem[x] != val) {
+ const int maxSize = 80;
+ char assertMsg[maxSize];
+
+ // We don't print the assert message. It's here just to be helpful.
+ snprintf(assertMsg, maxSize, "PoolAlloc: Damage %s %zu byte allocation at 0x%p\n",
+ locText, size, data());
+ assert(0 && "PoolAlloc: Damage in guard block");
+ }
+ }
+#else
+ assert(guardBlockSize == 0);
+#endif
+}
+
+
+void TPoolAllocator::push()
+{
+ tAllocState state = { currentPageOffset, inUseList };
+
+ stack.push_back(state);
+
+ //
+ // Indicate there is no current page to allocate from.
+ //
+ currentPageOffset = pageSize;
+}
+
+//
+// Do a mass-deallocation of all the individual allocations
+// that have occurred since the last push(), or since the
+// last pop(), or since the object's creation.
+//
+// The deallocated pages are saved for future allocations.
+//
+void TPoolAllocator::pop()
+{
+ if (stack.size() < 1)
+ return;
+
+ tHeader* page = stack.back().page;
+ currentPageOffset = stack.back().offset;
+
+ while (inUseList != page) {
+ // invoke destructor to free allocation list
+ inUseList->~tHeader();
+
+ tHeader* nextInUse = inUseList->nextPage;
+ if (inUseList->pageCount > 1)
+ delete [] reinterpret_cast<char*>(inUseList);
+ else {
+ inUseList->nextPage = freeList;
+ freeList = inUseList;
+ }
+ inUseList = nextInUse;
+ }
+
+ stack.pop_back();
+}
+
+//
+// Do a mass-deallocation of all the individual allocations
+// that have occurred.
+//
+void TPoolAllocator::popAll()
+{
+ while (stack.size() > 0)
+ pop();
+}
+
+void* TPoolAllocator::allocate(size_t numBytes)
+{
+ // If we are using guard blocks, all allocations are bracketed by
+ // them: [guardblock][allocation][guardblock]. numBytes is how
+ // much memory the caller asked for. allocationSize is the total
+ // size including guard blocks. In release build,
+ // guardBlockSize=0 and this all gets optimized away.
+ size_t allocationSize = TAllocation::allocationSize(numBytes);
+
+ //
+ // Just keep some interesting statistics.
+ //
+ ++numCalls;
+ totalBytes += numBytes;
+
+ //
+ // Do the allocation, most likely case first, for efficiency.
+ // This step could be moved to be inline sometime.
+ //
+ if (currentPageOffset + allocationSize <= pageSize) {
+ //
+ // Safe to allocate from currentPageOffset.
+ //
+ unsigned char* memory = reinterpret_cast<unsigned char*>(inUseList) + currentPageOffset;
+ currentPageOffset += allocationSize;
+ currentPageOffset = (currentPageOffset + alignmentMask) & ~alignmentMask;
+
+ return initializeAllocation(inUseList, memory, numBytes);
+ }
+
+ if (allocationSize + headerSkip > pageSize) {
+ //
+ // Do a multi-page allocation. Don't mix these with the others.
+ // The OS is efficient and allocating and free-ing multiple pages.
+ //
+ size_t numBytesToAlloc = allocationSize + headerSkip;
+ tHeader* memory = reinterpret_cast<tHeader*>(::new char[numBytesToAlloc]);
+ if (memory == 0)
+ return 0;
+
+ // Use placement-new to initialize header
+ new(memory) tHeader(inUseList, (numBytesToAlloc + pageSize - 1) / pageSize);
+ inUseList = memory;
+
+ currentPageOffset = pageSize; // make next allocation come from a new page
+
+ // No guard blocks for multi-page allocations (yet)
+ return reinterpret_cast<void*>(reinterpret_cast<UINT_PTR>(memory) + headerSkip);
+ }
+
+ //
+ // Need a simple page to allocate from.
+ //
+ tHeader* memory;
+ if (freeList) {
+ memory = freeList;
+ freeList = freeList->nextPage;
+ } else {
+ memory = reinterpret_cast<tHeader*>(::new char[pageSize]);
+ if (memory == 0)
+ return 0;
+ }
+
+ // Use placement-new to initialize header
+ new(memory) tHeader(inUseList, 1);
+ inUseList = memory;
+
+ unsigned char* ret = reinterpret_cast<unsigned char*>(inUseList) + headerSkip;
+ currentPageOffset = (headerSkip + allocationSize + alignmentMask) & ~alignmentMask;
+
+ return initializeAllocation(inUseList, ret, numBytes);
+}
+
+
+//
+// Check all allocations in a list for damage by calling check on each.
+//
+void TAllocation::checkAllocList() const
+{
+ for (const TAllocation* alloc = this; alloc != 0; alloc = alloc->prevAlloc)
+ alloc->check();
+}
+
+} // end namespace glslang
diff --git a/chromium/third_party/glslang/src/glslang/MachineIndependent/RemoveTree.cpp b/chromium/third_party/glslang/src/glslang/MachineIndependent/RemoveTree.cpp
new file mode 100644
index 00000000000..a4fa551cadf
--- /dev/null
+++ b/chromium/third_party/glslang/src/glslang/MachineIndependent/RemoveTree.cpp
@@ -0,0 +1,118 @@
+//
+//Copyright (C) 2002-2005 3Dlabs Inc. Ltd.
+//Copyright (C) 2013 LunarG, 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:
+//
+// Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 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.
+//
+// Neither the name of 3Dlabs Inc. Ltd. nor the names of its
+// contributors may be used to endorse or promote products derived
+// from this software without specific prior written permission.
+//
+//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+//"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 THE
+//COPYRIGHT HOLDERS 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.
+//
+
+#include "../Include/intermediate.h"
+#include "RemoveTree.h"
+
+namespace glslang {
+
+//
+// Code to recursively delete the intermediate tree.
+//
+struct TRemoveTraverser : TIntermTraverser {
+ TRemoveTraverser() : TIntermTraverser(false, false, true, false) {}
+
+ virtual void visitSymbol(TIntermSymbol* node)
+ {
+ delete node;
+ }
+
+ virtual bool visitBinary(TVisit /* visit*/ , TIntermBinary* node)
+ {
+ delete node;
+
+ return true;
+ }
+
+ virtual bool visitUnary(TVisit /* visit */, TIntermUnary* node)
+ {
+ delete node;
+
+ return true;
+ }
+
+ virtual bool visitAggregate(TVisit /* visit*/ , TIntermAggregate* node)
+ {
+ delete node;
+
+ return true;
+ }
+
+ virtual bool visitSelection(TVisit /* visit*/ , TIntermSelection* node)
+ {
+ delete node;
+
+ return true;
+ }
+
+ virtual bool visitSwitch(TVisit /* visit*/ , TIntermSwitch* node)
+ {
+ delete node;
+
+ return true;
+ }
+
+ virtual void visitConstantUnion(TIntermConstantUnion* node)
+ {
+ delete node;
+ }
+
+ virtual bool visitLoop(TVisit /* visit*/ , TIntermLoop* node)
+ {
+ delete node;
+
+ return true;
+ }
+
+ virtual bool visitBranch(TVisit /* visit*/ , TIntermBranch* node)
+ {
+ delete node;
+
+ return true;
+ }
+};
+
+//
+// Entry point.
+//
+void RemoveAllTreeNodes(TIntermNode* root)
+{
+ TRemoveTraverser it;
+
+ root->traverse(&it);
+}
+
+} // end namespace glslang
diff --git a/chromium/third_party/glslang/src/glslang/MachineIndependent/RemoveTree.h b/chromium/third_party/glslang/src/glslang/MachineIndependent/RemoveTree.h
new file mode 100644
index 00000000000..483b25dcb51
--- /dev/null
+++ b/chromium/third_party/glslang/src/glslang/MachineIndependent/RemoveTree.h
@@ -0,0 +1,39 @@
+//
+//Copyright (C) 2002-2005 3Dlabs Inc. Ltd.
+//All rights reserved.
+//
+//Redistribution and use in source and binary forms, with or without
+//modification, are permitted provided that the following conditions
+//are met:
+//
+// Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 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.
+//
+// Neither the name of 3Dlabs Inc. Ltd. nor the names of its
+// contributors may be used to endorse or promote products derived
+// from this software without specific prior written permission.
+//
+//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+//"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 THE
+//COPYRIGHT HOLDERS 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.
+//
+
+namespace glslang {
+
+void RemoveAllTreeNodes(TIntermNode*);
+
+} // end namespace glslang
diff --git a/chromium/third_party/glslang/src/glslang/MachineIndependent/Scan.cpp b/chromium/third_party/glslang/src/glslang/MachineIndependent/Scan.cpp
new file mode 100644
index 00000000000..762fb86c4f8
--- /dev/null
+++ b/chromium/third_party/glslang/src/glslang/MachineIndependent/Scan.cpp
@@ -0,0 +1,1331 @@
+//
+//Copyright (C) 2002-2005 3Dlabs Inc. Ltd.
+//Copyright (C) 2013 LunarG, 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:
+//
+// Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 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.
+//
+// Neither the name of 3Dlabs Inc. Ltd. nor the names of its
+// contributors may be used to endorse or promote products derived
+// from this software without specific prior written permission.
+//
+//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+//"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 THE
+//COPYRIGHT HOLDERS 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.
+//
+
+//
+// GLSL scanning, leveraging the scanning done by the preprocessor.
+//
+
+#include <string.h>
+#include <unordered_map>
+#include <unordered_set>
+
+#include "../Include/Types.h"
+#include "SymbolTable.h"
+#include "ParseHelper.h"
+#include "glslang_tab.cpp.h"
+#include "ScanContext.h"
+#include "Scan.h"
+
+// preprocessor includes
+#include "preprocessor/PpContext.h"
+#include "preprocessor/PpTokens.h"
+
+// Required to avoid missing prototype warnings for some compilers
+int yylex(YYSTYPE*, glslang::TParseContext&);
+
+namespace glslang {
+
+// read past any white space
+void TInputScanner::consumeWhiteSpace(bool& foundNonSpaceTab)
+{
+ int c = peek(); // don't accidentally consume anything other than whitespace
+ while (c == ' ' || c == '\t' || c == '\r' || c == '\n') {
+ if (c == '\r' || c == '\n')
+ foundNonSpaceTab = true;
+ get();
+ c = peek();
+ }
+}
+
+// return true if a comment was actually consumed
+bool TInputScanner::consumeComment()
+{
+ if (peek() != '/')
+ return false;
+
+ get(); // consume the '/'
+ int c = peek();
+ if (c == '/') {
+
+ // a '//' style comment
+ get(); // consume the second '/'
+ c = get();
+ do {
+ while (c != EndOfInput && c != '\\' && c != '\r' && c != '\n')
+ c = get();
+
+ if (c == EndOfInput || c == '\r' || c == '\n') {
+ while (c == '\r' || c == '\n')
+ c = get();
+
+ // we reached the end of the comment
+ break;
+ } else {
+ // it's a '\', so we need to keep going, after skipping what's escaped
+
+ // read the skipped character
+ c = get();
+
+ // if it's a two-character newline, skip both characters
+ if (c == '\r' && peek() == '\n')
+ get();
+ c = get();
+ }
+ } while (true);
+
+ // put back the last non-comment character
+ if (c != EndOfInput)
+ unget();
+
+ return true;
+ } else if (c == '*') {
+
+ // a '/*' style comment
+ get(); // consume the '*'
+ c = get();
+ do {
+ while (c != EndOfInput && c != '*')
+ c = get();
+ if (c == '*') {
+ c = get();
+ if (c == '/')
+ break; // end of comment
+ // not end of comment
+ } else // end of input
+ break;
+ } while (true);
+
+ return true;
+ } else {
+ // it's not a comment, put the '/' back
+ unget();
+
+ return false;
+ }
+}
+
+// skip whitespace, then skip a comment, rinse, repeat
+void TInputScanner::consumeWhitespaceComment(bool& foundNonSpaceTab)
+{
+ do {
+ consumeWhiteSpace(foundNonSpaceTab);
+
+ // if not starting a comment now, then done
+ int c = peek();
+ if (c != '/' || c == EndOfInput)
+ return;
+
+ // skip potential comment
+ foundNonSpaceTab = true;
+ if (! consumeComment())
+ return;
+
+ } while (true);
+}
+
+// Returns true if there was non-white space (e.g., a comment, newline) before the #version
+// or no #version was found; otherwise, returns false. There is no error case, it always
+// succeeds, but will leave version == 0 if no #version was found.
+//
+// Sets notFirstToken based on whether tokens (beyond white space and comments)
+// appeared before the #version.
+//
+// N.B. does not attempt to leave input in any particular known state. The assumption
+// is that scanning will start anew, following the rules for the chosen version/profile,
+// and with a corresponding parsing context.
+//
+bool TInputScanner::scanVersion(int& version, EProfile& profile, bool& notFirstToken)
+{
+ // This function doesn't have to get all the semantics correct,
+ // just find the #version if there is a correct one present.
+ // The preprocessor will have the responsibility of getting all the semantics right.
+
+ bool versionNotFirst = false; // means not first WRT comments and white space, nothing more
+ notFirstToken = false; // means not first WRT to real tokens
+ version = 0; // means not found
+ profile = ENoProfile;
+
+ bool foundNonSpaceTab = false;
+ bool lookingInMiddle = false;
+ int c;
+ do {
+ if (lookingInMiddle) {
+ notFirstToken = true;
+ // make forward progress by finishing off the current line plus extra new lines
+ if (peek() == '\n' || peek() == '\r') {
+ while (peek() == '\n' || peek() == '\r')
+ get();
+ } else
+ do {
+ c = get();
+ } while (c != EndOfInput && c != '\n' && c != '\r');
+ while (peek() == '\n' || peek() == '\r')
+ get();
+ if (peek() == EndOfInput)
+ return true;
+ }
+ lookingInMiddle = true;
+
+ // Nominal start, skipping the desktop allowed comments and white space, but tracking if
+ // something else was found for ES:
+ consumeWhitespaceComment(foundNonSpaceTab);
+ if (foundNonSpaceTab)
+ versionNotFirst = true;
+
+ // "#"
+ if (get() != '#') {
+ versionNotFirst = true;
+ continue;
+ }
+
+ // whitespace
+ do {
+ c = get();
+ } while (c == ' ' || c == '\t');
+
+ // "version"
+ if ( c != 'v' ||
+ get() != 'e' ||
+ get() != 'r' ||
+ get() != 's' ||
+ get() != 'i' ||
+ get() != 'o' ||
+ get() != 'n') {
+ versionNotFirst = true;
+ continue;
+ }
+
+ // whitespace
+ do {
+ c = get();
+ } while (c == ' ' || c == '\t');
+
+ // version number
+ while (c >= '0' && c <= '9') {
+ version = 10 * version + (c - '0');
+ c = get();
+ }
+ if (version == 0) {
+ versionNotFirst = true;
+ continue;
+ }
+
+ // whitespace
+ while (c == ' ' || c == '\t')
+ c = get();
+
+ // profile
+ const int maxProfileLength = 13; // not including any 0
+ char profileString[maxProfileLength];
+ int profileLength;
+ for (profileLength = 0; profileLength < maxProfileLength; ++profileLength) {
+ if (c == EndOfInput || c == ' ' || c == '\t' || c == '\n' || c == '\r')
+ break;
+ profileString[profileLength] = (char)c;
+ c = get();
+ }
+ if (c != EndOfInput && c != ' ' && c != '\t' && c != '\n' && c != '\r') {
+ versionNotFirst = true;
+ continue;
+ }
+
+ if (profileLength == 2 && strncmp(profileString, "es", profileLength) == 0)
+ profile = EEsProfile;
+ else if (profileLength == 4 && strncmp(profileString, "core", profileLength) == 0)
+ profile = ECoreProfile;
+ else if (profileLength == 13 && strncmp(profileString, "compatibility", profileLength) == 0)
+ profile = ECompatibilityProfile;
+
+ return versionNotFirst;
+ } while (true);
+}
+
+// Fill this in when doing glslang-level scanning, to hand back to the parser.
+class TParserToken {
+public:
+ explicit TParserToken(YYSTYPE& b) : sType(b) { }
+
+ YYSTYPE& sType;
+protected:
+ TParserToken(TParserToken&);
+ TParserToken& operator=(TParserToken&);
+};
+
+} // end namespace glslang
+
+// This is the function the glslang parser (i.e., bison) calls to get its next token
+int yylex(YYSTYPE* glslangTokenDesc, glslang::TParseContext& parseContext)
+{
+ glslang::TParserToken token(*glslangTokenDesc);
+
+ return parseContext.getScanContext()->tokenize(parseContext.getPpContext(), token);
+}
+
+namespace {
+
+struct str_eq
+{
+ bool operator()(const char* lhs, const char* rhs) const
+ {
+ return strcmp(lhs, rhs) == 0;
+ }
+};
+
+struct str_hash
+{
+ size_t operator()(const char* str) const
+ {
+ // djb2
+ unsigned long hash = 5381;
+ int c;
+
+ while ((c = *str++) != 0)
+ hash = ((hash << 5) + hash) + c;
+
+ return hash;
+ }
+};
+
+// A single global usable by all threads, by all versions, by all languages.
+// After a single process-level initialization, this is read only and thread safe
+std::unordered_map<const char*, int, str_hash, str_eq>* KeywordMap = nullptr;
+std::unordered_set<const char*, str_hash, str_eq>* ReservedSet = nullptr;
+
+};
+
+namespace glslang {
+
+void TScanContext::fillInKeywordMap()
+{
+ if (KeywordMap != nullptr) {
+ // this is really an error, as this should called only once per process
+ // but, the only risk is if two threads called simultaneously
+ return;
+ }
+ KeywordMap = new std::unordered_map<const char*, int, str_hash, str_eq>;
+
+ (*KeywordMap)["const"] = CONST;
+ (*KeywordMap)["uniform"] = UNIFORM;
+ (*KeywordMap)["in"] = IN;
+ (*KeywordMap)["out"] = OUT;
+ (*KeywordMap)["inout"] = INOUT;
+ (*KeywordMap)["struct"] = STRUCT;
+ (*KeywordMap)["break"] = BREAK;
+ (*KeywordMap)["continue"] = CONTINUE;
+ (*KeywordMap)["do"] = DO;
+ (*KeywordMap)["for"] = FOR;
+ (*KeywordMap)["while"] = WHILE;
+ (*KeywordMap)["switch"] = SWITCH;
+ (*KeywordMap)["case"] = CASE;
+ (*KeywordMap)["default"] = DEFAULT;
+ (*KeywordMap)["if"] = IF;
+ (*KeywordMap)["else"] = ELSE;
+ (*KeywordMap)["discard"] = DISCARD;
+ (*KeywordMap)["return"] = RETURN;
+ (*KeywordMap)["void"] = VOID;
+ (*KeywordMap)["bool"] = BOOL;
+ (*KeywordMap)["float"] = FLOAT;
+ (*KeywordMap)["int"] = INT;
+ (*KeywordMap)["bvec2"] = BVEC2;
+ (*KeywordMap)["bvec3"] = BVEC3;
+ (*KeywordMap)["bvec4"] = BVEC4;
+ (*KeywordMap)["vec2"] = VEC2;
+ (*KeywordMap)["vec3"] = VEC3;
+ (*KeywordMap)["vec4"] = VEC4;
+ (*KeywordMap)["ivec2"] = IVEC2;
+ (*KeywordMap)["ivec3"] = IVEC3;
+ (*KeywordMap)["ivec4"] = IVEC4;
+ (*KeywordMap)["mat2"] = MAT2;
+ (*KeywordMap)["mat3"] = MAT3;
+ (*KeywordMap)["mat4"] = MAT4;
+ (*KeywordMap)["true"] = BOOLCONSTANT;
+ (*KeywordMap)["false"] = BOOLCONSTANT;
+ (*KeywordMap)["attribute"] = ATTRIBUTE;
+ (*KeywordMap)["varying"] = VARYING;
+ (*KeywordMap)["buffer"] = BUFFER;
+ (*KeywordMap)["coherent"] = COHERENT;
+ (*KeywordMap)["restrict"] = RESTRICT;
+ (*KeywordMap)["readonly"] = READONLY;
+ (*KeywordMap)["writeonly"] = WRITEONLY;
+ (*KeywordMap)["atomic_uint"] = ATOMIC_UINT;
+ (*KeywordMap)["volatile"] = VOLATILE;
+ (*KeywordMap)["layout"] = LAYOUT;
+ (*KeywordMap)["shared"] = SHARED;
+ (*KeywordMap)["patch"] = PATCH;
+ (*KeywordMap)["sample"] = SAMPLE;
+ (*KeywordMap)["subroutine"] = SUBROUTINE;
+ (*KeywordMap)["highp"] = HIGH_PRECISION;
+ (*KeywordMap)["mediump"] = MEDIUM_PRECISION;
+ (*KeywordMap)["lowp"] = LOW_PRECISION;
+ (*KeywordMap)["precision"] = PRECISION;
+ (*KeywordMap)["mat2x2"] = MAT2X2;
+ (*KeywordMap)["mat2x3"] = MAT2X3;
+ (*KeywordMap)["mat2x4"] = MAT2X4;
+ (*KeywordMap)["mat3x2"] = MAT3X2;
+ (*KeywordMap)["mat3x3"] = MAT3X3;
+ (*KeywordMap)["mat3x4"] = MAT3X4;
+ (*KeywordMap)["mat4x2"] = MAT4X2;
+ (*KeywordMap)["mat4x3"] = MAT4X3;
+ (*KeywordMap)["mat4x4"] = MAT4X4;
+ (*KeywordMap)["dmat2"] = DMAT2;
+ (*KeywordMap)["dmat3"] = DMAT3;
+ (*KeywordMap)["dmat4"] = DMAT4;
+ (*KeywordMap)["dmat2x2"] = DMAT2X2;
+ (*KeywordMap)["dmat2x3"] = DMAT2X3;
+ (*KeywordMap)["dmat2x4"] = DMAT2X4;
+ (*KeywordMap)["dmat3x2"] = DMAT3X2;
+ (*KeywordMap)["dmat3x3"] = DMAT3X3;
+ (*KeywordMap)["dmat3x4"] = DMAT3X4;
+ (*KeywordMap)["dmat4x2"] = DMAT4X2;
+ (*KeywordMap)["dmat4x3"] = DMAT4X3;
+ (*KeywordMap)["dmat4x4"] = DMAT4X4;
+ (*KeywordMap)["image1D"] = IMAGE1D;
+ (*KeywordMap)["iimage1D"] = IIMAGE1D;
+ (*KeywordMap)["uimage1D"] = UIMAGE1D;
+ (*KeywordMap)["image2D"] = IMAGE2D;
+ (*KeywordMap)["iimage2D"] = IIMAGE2D;
+ (*KeywordMap)["uimage2D"] = UIMAGE2D;
+ (*KeywordMap)["image3D"] = IMAGE3D;
+ (*KeywordMap)["iimage3D"] = IIMAGE3D;
+ (*KeywordMap)["uimage3D"] = UIMAGE3D;
+ (*KeywordMap)["image2DRect"] = IMAGE2DRECT;
+ (*KeywordMap)["iimage2DRect"] = IIMAGE2DRECT;
+ (*KeywordMap)["uimage2DRect"] = UIMAGE2DRECT;
+ (*KeywordMap)["imageCube"] = IMAGECUBE;
+ (*KeywordMap)["iimageCube"] = IIMAGECUBE;
+ (*KeywordMap)["uimageCube"] = UIMAGECUBE;
+ (*KeywordMap)["imageBuffer"] = IMAGEBUFFER;
+ (*KeywordMap)["iimageBuffer"] = IIMAGEBUFFER;
+ (*KeywordMap)["uimageBuffer"] = UIMAGEBUFFER;
+ (*KeywordMap)["image1DArray"] = IMAGE1DARRAY;
+ (*KeywordMap)["iimage1DArray"] = IIMAGE1DARRAY;
+ (*KeywordMap)["uimage1DArray"] = UIMAGE1DARRAY;
+ (*KeywordMap)["image2DArray"] = IMAGE2DARRAY;
+ (*KeywordMap)["iimage2DArray"] = IIMAGE2DARRAY;
+ (*KeywordMap)["uimage2DArray"] = UIMAGE2DARRAY;
+ (*KeywordMap)["imageCubeArray"] = IMAGECUBEARRAY;
+ (*KeywordMap)["iimageCubeArray"] = IIMAGECUBEARRAY;
+ (*KeywordMap)["uimageCubeArray"] = UIMAGECUBEARRAY;
+ (*KeywordMap)["image2DMS"] = IMAGE2DMS;
+ (*KeywordMap)["iimage2DMS"] = IIMAGE2DMS;
+ (*KeywordMap)["uimage2DMS"] = UIMAGE2DMS;
+ (*KeywordMap)["image2DMSArray"] = IMAGE2DMSARRAY;
+ (*KeywordMap)["iimage2DMSArray"] = IIMAGE2DMSARRAY;
+ (*KeywordMap)["uimage2DMSArray"] = UIMAGE2DMSARRAY;
+ (*KeywordMap)["double"] = DOUBLE;
+ (*KeywordMap)["dvec2"] = DVEC2;
+ (*KeywordMap)["dvec3"] = DVEC3;
+ (*KeywordMap)["dvec4"] = DVEC4;
+ (*KeywordMap)["uint"] = UINT;
+ (*KeywordMap)["uvec2"] = UVEC2;
+ (*KeywordMap)["uvec3"] = UVEC3;
+ (*KeywordMap)["uvec4"] = UVEC4;
+
+ (*KeywordMap)["int64_t"] = INT64_T;
+ (*KeywordMap)["uint64_t"] = UINT64_T;
+ (*KeywordMap)["i64vec2"] = I64VEC2;
+ (*KeywordMap)["i64vec3"] = I64VEC3;
+ (*KeywordMap)["i64vec4"] = I64VEC4;
+ (*KeywordMap)["u64vec2"] = U64VEC2;
+ (*KeywordMap)["u64vec3"] = U64VEC3;
+ (*KeywordMap)["u64vec4"] = U64VEC4;
+
+ (*KeywordMap)["sampler2D"] = SAMPLER2D;
+ (*KeywordMap)["samplerCube"] = SAMPLERCUBE;
+ (*KeywordMap)["samplerCubeArray"] = SAMPLERCUBEARRAY;
+ (*KeywordMap)["samplerCubeArrayShadow"] = SAMPLERCUBEARRAYSHADOW;
+ (*KeywordMap)["isamplerCubeArray"] = ISAMPLERCUBEARRAY;
+ (*KeywordMap)["usamplerCubeArray"] = USAMPLERCUBEARRAY;
+ (*KeywordMap)["sampler1DArrayShadow"] = SAMPLER1DARRAYSHADOW;
+ (*KeywordMap)["isampler1DArray"] = ISAMPLER1DARRAY;
+ (*KeywordMap)["usampler1D"] = USAMPLER1D;
+ (*KeywordMap)["isampler1D"] = ISAMPLER1D;
+ (*KeywordMap)["usampler1DArray"] = USAMPLER1DARRAY;
+ (*KeywordMap)["samplerBuffer"] = SAMPLERBUFFER;
+ (*KeywordMap)["samplerCubeShadow"] = SAMPLERCUBESHADOW;
+ (*KeywordMap)["sampler2DArray"] = SAMPLER2DARRAY;
+ (*KeywordMap)["sampler2DArrayShadow"] = SAMPLER2DARRAYSHADOW;
+ (*KeywordMap)["isampler2D"] = ISAMPLER2D;
+ (*KeywordMap)["isampler3D"] = ISAMPLER3D;
+ (*KeywordMap)["isamplerCube"] = ISAMPLERCUBE;
+ (*KeywordMap)["isampler2DArray"] = ISAMPLER2DARRAY;
+ (*KeywordMap)["usampler2D"] = USAMPLER2D;
+ (*KeywordMap)["usampler3D"] = USAMPLER3D;
+ (*KeywordMap)["usamplerCube"] = USAMPLERCUBE;
+ (*KeywordMap)["usampler2DArray"] = USAMPLER2DARRAY;
+ (*KeywordMap)["isampler2DRect"] = ISAMPLER2DRECT;
+ (*KeywordMap)["usampler2DRect"] = USAMPLER2DRECT;
+ (*KeywordMap)["isamplerBuffer"] = ISAMPLERBUFFER;
+ (*KeywordMap)["usamplerBuffer"] = USAMPLERBUFFER;
+ (*KeywordMap)["sampler2DMS"] = SAMPLER2DMS;
+ (*KeywordMap)["isampler2DMS"] = ISAMPLER2DMS;
+ (*KeywordMap)["usampler2DMS"] = USAMPLER2DMS;
+ (*KeywordMap)["sampler2DMSArray"] = SAMPLER2DMSARRAY;
+ (*KeywordMap)["isampler2DMSArray"] = ISAMPLER2DMSARRAY;
+ (*KeywordMap)["usampler2DMSArray"] = USAMPLER2DMSARRAY;
+ (*KeywordMap)["sampler1D"] = SAMPLER1D;
+ (*KeywordMap)["sampler1DShadow"] = SAMPLER1DSHADOW;
+ (*KeywordMap)["sampler3D"] = SAMPLER3D;
+ (*KeywordMap)["sampler2DShadow"] = SAMPLER2DSHADOW;
+ (*KeywordMap)["sampler2DRect"] = SAMPLER2DRECT;
+ (*KeywordMap)["sampler2DRectShadow"] = SAMPLER2DRECTSHADOW;
+ (*KeywordMap)["sampler1DArray"] = SAMPLER1DARRAY;
+
+ (*KeywordMap)["samplerExternalOES"] = SAMPLEREXTERNALOES; // GL_OES_EGL_image_external
+
+ (*KeywordMap)["sampler"] = SAMPLER;
+ (*KeywordMap)["samplerShadow"] = SAMPLERSHADOW;
+
+ (*KeywordMap)["texture2D"] = TEXTURE2D;
+ (*KeywordMap)["textureCube"] = TEXTURECUBE;
+ (*KeywordMap)["textureCubeArray"] = TEXTURECUBEARRAY;
+ (*KeywordMap)["itextureCubeArray"] = ITEXTURECUBEARRAY;
+ (*KeywordMap)["utextureCubeArray"] = UTEXTURECUBEARRAY;
+ (*KeywordMap)["itexture1DArray"] = ITEXTURE1DARRAY;
+ (*KeywordMap)["utexture1D"] = UTEXTURE1D;
+ (*KeywordMap)["itexture1D"] = ITEXTURE1D;
+ (*KeywordMap)["utexture1DArray"] = UTEXTURE1DARRAY;
+ (*KeywordMap)["textureBuffer"] = TEXTUREBUFFER;
+ (*KeywordMap)["texture2DArray"] = TEXTURE2DARRAY;
+ (*KeywordMap)["itexture2D"] = ITEXTURE2D;
+ (*KeywordMap)["itexture3D"] = ITEXTURE3D;
+ (*KeywordMap)["itextureCube"] = ITEXTURECUBE;
+ (*KeywordMap)["itexture2DArray"] = ITEXTURE2DARRAY;
+ (*KeywordMap)["utexture2D"] = UTEXTURE2D;
+ (*KeywordMap)["utexture3D"] = UTEXTURE3D;
+ (*KeywordMap)["utextureCube"] = UTEXTURECUBE;
+ (*KeywordMap)["utexture2DArray"] = UTEXTURE2DARRAY;
+ (*KeywordMap)["itexture2DRect"] = ITEXTURE2DRECT;
+ (*KeywordMap)["utexture2DRect"] = UTEXTURE2DRECT;
+ (*KeywordMap)["itextureBuffer"] = ITEXTUREBUFFER;
+ (*KeywordMap)["utextureBuffer"] = UTEXTUREBUFFER;
+ (*KeywordMap)["texture2DMS"] = TEXTURE2DMS;
+ (*KeywordMap)["itexture2DMS"] = ITEXTURE2DMS;
+ (*KeywordMap)["utexture2DMS"] = UTEXTURE2DMS;
+ (*KeywordMap)["texture2DMSArray"] = TEXTURE2DMSARRAY;
+ (*KeywordMap)["itexture2DMSArray"] = ITEXTURE2DMSARRAY;
+ (*KeywordMap)["utexture2DMSArray"] = UTEXTURE2DMSARRAY;
+ (*KeywordMap)["texture1D"] = TEXTURE1D;
+ (*KeywordMap)["texture3D"] = TEXTURE3D;
+ (*KeywordMap)["texture2DRect"] = TEXTURE2DRECT;
+ (*KeywordMap)["texture1DArray"] = TEXTURE1DARRAY;
+
+ (*KeywordMap)["subpassInput"] = SUBPASSINPUT;
+ (*KeywordMap)["subpassInputMS"] = SUBPASSINPUTMS;
+ (*KeywordMap)["isubpassInput"] = ISUBPASSINPUT;
+ (*KeywordMap)["isubpassInputMS"] = ISUBPASSINPUTMS;
+ (*KeywordMap)["usubpassInput"] = USUBPASSINPUT;
+ (*KeywordMap)["usubpassInputMS"] = USUBPASSINPUTMS;
+
+ (*KeywordMap)["noperspective"] = NOPERSPECTIVE;
+ (*KeywordMap)["smooth"] = SMOOTH;
+ (*KeywordMap)["flat"] = FLAT;
+ (*KeywordMap)["centroid"] = CENTROID;
+ (*KeywordMap)["precise"] = PRECISE;
+ (*KeywordMap)["invariant"] = INVARIANT;
+ (*KeywordMap)["packed"] = PACKED;
+ (*KeywordMap)["resource"] = RESOURCE;
+ (*KeywordMap)["superp"] = SUPERP;
+
+ ReservedSet = new std::unordered_set<const char*, str_hash, str_eq>;
+
+ ReservedSet->insert("common");
+ ReservedSet->insert("partition");
+ ReservedSet->insert("active");
+ ReservedSet->insert("asm");
+ ReservedSet->insert("class");
+ ReservedSet->insert("union");
+ ReservedSet->insert("enum");
+ ReservedSet->insert("typedef");
+ ReservedSet->insert("template");
+ ReservedSet->insert("this");
+ ReservedSet->insert("goto");
+ ReservedSet->insert("inline");
+ ReservedSet->insert("noinline");
+ ReservedSet->insert("public");
+ ReservedSet->insert("static");
+ ReservedSet->insert("extern");
+ ReservedSet->insert("external");
+ ReservedSet->insert("interface");
+ ReservedSet->insert("long");
+ ReservedSet->insert("short");
+ ReservedSet->insert("half");
+ ReservedSet->insert("fixed");
+ ReservedSet->insert("unsigned");
+ ReservedSet->insert("input");
+ ReservedSet->insert("output");
+ ReservedSet->insert("hvec2");
+ ReservedSet->insert("hvec3");
+ ReservedSet->insert("hvec4");
+ ReservedSet->insert("fvec2");
+ ReservedSet->insert("fvec3");
+ ReservedSet->insert("fvec4");
+ ReservedSet->insert("sampler3DRect");
+ ReservedSet->insert("filter");
+ ReservedSet->insert("sizeof");
+ ReservedSet->insert("cast");
+ ReservedSet->insert("namespace");
+ ReservedSet->insert("using");
+}
+
+void TScanContext::deleteKeywordMap()
+{
+ delete KeywordMap;
+ KeywordMap = nullptr;
+ delete ReservedSet;
+ ReservedSet = nullptr;
+}
+
+int TScanContext::tokenize(TPpContext* pp, TParserToken& token)
+{
+ do {
+ parserToken = &token;
+ TPpToken ppToken;
+ tokenText = pp->tokenize(&ppToken);
+ if (tokenText == nullptr)
+ return 0;
+
+ loc = ppToken.loc;
+ parserToken->sType.lex.loc = loc;
+ switch (ppToken.token) {
+ case ';': afterType = false; return SEMICOLON;
+ case ',': afterType = false; return COMMA;
+ case ':': return COLON;
+ case '=': afterType = false; return EQUAL;
+ case '(': afterType = false; return LEFT_PAREN;
+ case ')': afterType = false; return RIGHT_PAREN;
+ case '.': field = true; return DOT;
+ case '!': return BANG;
+ case '-': return DASH;
+ case '~': return TILDE;
+ case '+': return PLUS;
+ case '*': return STAR;
+ case '/': return SLASH;
+ case '%': return PERCENT;
+ case '<': return LEFT_ANGLE;
+ case '>': return RIGHT_ANGLE;
+ case '|': return VERTICAL_BAR;
+ case '^': return CARET;
+ case '&': return AMPERSAND;
+ case '?': return QUESTION;
+ case '[': return LEFT_BRACKET;
+ case ']': return RIGHT_BRACKET;
+ case '{': return LEFT_BRACE;
+ case '}': return RIGHT_BRACE;
+ case '\\':
+ parseContext.error(loc, "illegal use of escape character", "\\", "");
+ break;
+
+ case PpAtomAdd: return ADD_ASSIGN;
+ case PpAtomSub: return SUB_ASSIGN;
+ case PpAtomMul: return MUL_ASSIGN;
+ case PpAtomDiv: return DIV_ASSIGN;
+ case PpAtomMod: return MOD_ASSIGN;
+
+ case PpAtomRight: return RIGHT_OP;
+ case PpAtomLeft: return LEFT_OP;
+
+ case PpAtomRightAssign: return RIGHT_ASSIGN;
+ case PpAtomLeftAssign: return LEFT_ASSIGN;
+ case PpAtomAndAssign: return AND_ASSIGN;
+ case PpAtomOrAssign: return OR_ASSIGN;
+ case PpAtomXorAssign: return XOR_ASSIGN;
+
+ case PpAtomAnd: return AND_OP;
+ case PpAtomOr: return OR_OP;
+ case PpAtomXor: return XOR_OP;
+
+ case PpAtomEQ: return EQ_OP;
+ case PpAtomGE: return GE_OP;
+ case PpAtomNE: return NE_OP;
+ case PpAtomLE: return LE_OP;
+
+ case PpAtomDecrement: return DEC_OP;
+ case PpAtomIncrement: return INC_OP;
+
+ case PpAtomConstInt: parserToken->sType.lex.i = ppToken.ival; return INTCONSTANT;
+ case PpAtomConstUint: parserToken->sType.lex.i = ppToken.ival; return UINTCONSTANT;
+ case PpAtomConstInt64: parserToken->sType.lex.i64 = ppToken.i64val; return INT64CONSTANT;
+ case PpAtomConstUint64: parserToken->sType.lex.i64 = ppToken.i64val; return UINT64CONSTANT;
+ case PpAtomConstFloat: parserToken->sType.lex.d = ppToken.dval; return FLOATCONSTANT;
+ case PpAtomConstDouble: parserToken->sType.lex.d = ppToken.dval; return DOUBLECONSTANT;
+ case PpAtomIdentifier:
+ {
+ int token = tokenizeIdentifier();
+ field = false;
+ return token;
+ }
+
+ case EndOfInput: return 0;
+
+ default:
+ char buf[2];
+ buf[0] = (char)ppToken.token;
+ buf[1] = 0;
+ parseContext.error(loc, "unexpected token", buf, "");
+ break;
+ }
+ } while (true);
+}
+
+int TScanContext::tokenizeIdentifier()
+{
+ if (ReservedSet->find(tokenText) != ReservedSet->end())
+ return reservedWord();
+
+ auto it = KeywordMap->find(tokenText);
+ if (it == KeywordMap->end()) {
+ // Should have an identifier of some sort
+ return identifierOrType();
+ }
+ keyword = it->second;
+
+ switch (keyword) {
+ case CONST:
+ case UNIFORM:
+ case IN:
+ case OUT:
+ case INOUT:
+ case STRUCT:
+ case BREAK:
+ case CONTINUE:
+ case DO:
+ case FOR:
+ case WHILE:
+ case IF:
+ case ELSE:
+ case DISCARD:
+ case RETURN:
+ case CASE:
+ return keyword;
+
+ case SWITCH:
+ case DEFAULT:
+ if ((parseContext.profile == EEsProfile && parseContext.version < 300) ||
+ (parseContext.profile != EEsProfile && parseContext.version < 130))
+ reservedWord();
+ return keyword;
+
+ case VOID:
+ case BOOL:
+ case FLOAT:
+ case INT:
+ case BVEC2:
+ case BVEC3:
+ case BVEC4:
+ case VEC2:
+ case VEC3:
+ case VEC4:
+ case IVEC2:
+ case IVEC3:
+ case IVEC4:
+ case MAT2:
+ case MAT3:
+ case MAT4:
+ case SAMPLER2D:
+ case SAMPLERCUBE:
+ afterType = true;
+ return keyword;
+
+ case BOOLCONSTANT:
+ if (strcmp("true", tokenText) == 0)
+ parserToken->sType.lex.b = true;
+ else
+ parserToken->sType.lex.b = false;
+ return keyword;
+
+ case ATTRIBUTE:
+ case VARYING:
+ if (parseContext.profile == EEsProfile && parseContext.version >= 300)
+ reservedWord();
+ return keyword;
+
+ case BUFFER:
+ if ((parseContext.profile == EEsProfile && parseContext.version < 310) ||
+ (parseContext.profile != EEsProfile && parseContext.version < 430))
+ return identifierOrType();
+ return keyword;
+
+ case ATOMIC_UINT:
+ if ((parseContext.profile == EEsProfile && parseContext.version >= 310) ||
+ parseContext.extensionTurnedOn(E_GL_ARB_shader_atomic_counters))
+ return keyword;
+ return es30ReservedFromGLSL(420);
+
+ case COHERENT:
+ case RESTRICT:
+ case READONLY:
+ case WRITEONLY:
+ if (parseContext.profile == EEsProfile && parseContext.version >= 310)
+ return keyword;
+ return es30ReservedFromGLSL(parseContext.extensionTurnedOn(E_GL_ARB_shader_image_load_store) ? 130 : 420);
+
+ case VOLATILE:
+ if (parseContext.profile == EEsProfile && parseContext.version >= 310)
+ return keyword;
+ if (! parseContext.symbolTable.atBuiltInLevel() && (parseContext.profile == EEsProfile || (parseContext.version < 420 && ! parseContext.extensionTurnedOn(E_GL_ARB_shader_image_load_store))))
+ reservedWord();
+ return keyword;
+
+ case LAYOUT:
+ {
+ const int numLayoutExts = 2;
+ const char* layoutExts[numLayoutExts] = { E_GL_ARB_shading_language_420pack,
+ E_GL_ARB_explicit_attrib_location };
+ if ((parseContext.profile == EEsProfile && parseContext.version < 300) ||
+ (parseContext.profile != EEsProfile && parseContext.version < 140 &&
+ ! parseContext.extensionsTurnedOn(numLayoutExts, layoutExts)))
+ return identifierOrType();
+ return keyword;
+ }
+ case SHARED:
+ if ((parseContext.profile == EEsProfile && parseContext.version < 300) ||
+ (parseContext.profile != EEsProfile && parseContext.version < 140))
+ return identifierOrType();
+ return keyword;
+
+ case PATCH:
+ if (parseContext.symbolTable.atBuiltInLevel() ||
+ (parseContext.profile == EEsProfile && parseContext.extensionsTurnedOn(Num_AEP_tessellation_shader, AEP_tessellation_shader)) ||
+ (parseContext.profile != EEsProfile && parseContext.extensionTurnedOn(E_GL_ARB_tessellation_shader)))
+ return keyword;
+
+ return es30ReservedFromGLSL(400);
+
+ case SAMPLE:
+ if (parseContext.extensionsTurnedOn(1, &E_GL_OES_shader_multisample_interpolation))
+ return keyword;
+ return es30ReservedFromGLSL(400);
+
+ case SUBROUTINE:
+ return es30ReservedFromGLSL(400);
+
+ case HIGH_PRECISION:
+ case MEDIUM_PRECISION:
+ case LOW_PRECISION:
+ case PRECISION:
+ return precisionKeyword();
+
+ case MAT2X2:
+ case MAT2X3:
+ case MAT2X4:
+ case MAT3X2:
+ case MAT3X3:
+ case MAT3X4:
+ case MAT4X2:
+ case MAT4X3:
+ case MAT4X4:
+ return matNxM();
+
+ case DMAT2:
+ case DMAT3:
+ case DMAT4:
+ case DMAT2X2:
+ case DMAT2X3:
+ case DMAT2X4:
+ case DMAT3X2:
+ case DMAT3X3:
+ case DMAT3X4:
+ case DMAT4X2:
+ case DMAT4X3:
+ case DMAT4X4:
+ return dMat();
+
+ case IMAGE1D:
+ case IIMAGE1D:
+ case UIMAGE1D:
+ case IMAGE1DARRAY:
+ case IIMAGE1DARRAY:
+ case UIMAGE1DARRAY:
+ case IMAGE2DRECT:
+ case IIMAGE2DRECT:
+ case UIMAGE2DRECT:
+ afterType = true;
+ return firstGenerationImage(false);
+
+ case IMAGEBUFFER:
+ case IIMAGEBUFFER:
+ case UIMAGEBUFFER:
+ afterType = true;
+ if (parseContext.extensionsTurnedOn(Num_AEP_texture_buffer, AEP_texture_buffer))
+ return keyword;
+ return firstGenerationImage(false);
+
+ case IMAGE2D:
+ case IIMAGE2D:
+ case UIMAGE2D:
+ case IMAGE3D:
+ case IIMAGE3D:
+ case UIMAGE3D:
+ case IMAGECUBE:
+ case IIMAGECUBE:
+ case UIMAGECUBE:
+ case IMAGE2DARRAY:
+ case IIMAGE2DARRAY:
+ case UIMAGE2DARRAY:
+ afterType = true;
+ return firstGenerationImage(true);
+
+ case IMAGECUBEARRAY:
+ case IIMAGECUBEARRAY:
+ case UIMAGECUBEARRAY:
+ afterType = true;
+ if (parseContext.extensionsTurnedOn(Num_AEP_texture_cube_map_array, AEP_texture_cube_map_array))
+ return keyword;
+ return secondGenerationImage();
+
+ case IMAGE2DMS:
+ case IIMAGE2DMS:
+ case UIMAGE2DMS:
+ case IMAGE2DMSARRAY:
+ case IIMAGE2DMSARRAY:
+ case UIMAGE2DMSARRAY:
+ afterType = true;
+ return secondGenerationImage();
+
+ case DOUBLE:
+ case DVEC2:
+ case DVEC3:
+ case DVEC4:
+ afterType = true;
+ if (parseContext.profile == EEsProfile || parseContext.version < 400)
+ reservedWord();
+ return keyword;
+
+ case INT64_T:
+ case UINT64_T:
+ case I64VEC2:
+ case I64VEC3:
+ case I64VEC4:
+ case U64VEC2:
+ case U64VEC3:
+ case U64VEC4:
+ if (parseContext.profile != EEsProfile && parseContext.version >= 450)
+ return keyword;
+ return identifierOrType();
+
+ case SAMPLERCUBEARRAY:
+ case SAMPLERCUBEARRAYSHADOW:
+ case ISAMPLERCUBEARRAY:
+ case USAMPLERCUBEARRAY:
+ afterType = true;
+ if (parseContext.extensionsTurnedOn(Num_AEP_texture_cube_map_array, AEP_texture_cube_map_array))
+ return keyword;
+ if (parseContext.profile == EEsProfile || (parseContext.version < 400 && ! parseContext.extensionTurnedOn(E_GL_ARB_texture_cube_map_array)))
+ reservedWord();
+ return keyword;
+
+ case ISAMPLER1D:
+ case ISAMPLER1DARRAY:
+ case SAMPLER1DARRAYSHADOW:
+ case USAMPLER1D:
+ case USAMPLER1DARRAY:
+ afterType = true;
+ return es30ReservedFromGLSL(130);
+
+ case UINT:
+ case UVEC2:
+ case UVEC3:
+ case UVEC4:
+ case SAMPLERCUBESHADOW:
+ case SAMPLER2DARRAY:
+ case SAMPLER2DARRAYSHADOW:
+ case ISAMPLER2D:
+ case ISAMPLER3D:
+ case ISAMPLERCUBE:
+ case ISAMPLER2DARRAY:
+ case USAMPLER2D:
+ case USAMPLER3D:
+ case USAMPLERCUBE:
+ case USAMPLER2DARRAY:
+ afterType = true;
+ return nonreservedKeyword(300, 130);
+
+ case ISAMPLER2DRECT:
+ case USAMPLER2DRECT:
+ afterType = true;
+ return es30ReservedFromGLSL(140);
+
+ case SAMPLERBUFFER:
+ afterType = true;
+ if (parseContext.extensionsTurnedOn(Num_AEP_texture_buffer, AEP_texture_buffer))
+ return keyword;
+ return es30ReservedFromGLSL(130);
+
+ case ISAMPLERBUFFER:
+ case USAMPLERBUFFER:
+ afterType = true;
+ if (parseContext.extensionsTurnedOn(Num_AEP_texture_buffer, AEP_texture_buffer))
+ return keyword;
+ return es30ReservedFromGLSL(140);
+
+ case SAMPLER2DMS:
+ case ISAMPLER2DMS:
+ case USAMPLER2DMS:
+ afterType = true;
+ if (parseContext.profile == EEsProfile && parseContext.version >= 310)
+ return keyword;
+ return es30ReservedFromGLSL(150);
+
+ case SAMPLER2DMSARRAY:
+ case ISAMPLER2DMSARRAY:
+ case USAMPLER2DMSARRAY:
+ afterType = true;
+ if (parseContext.extensionsTurnedOn(1, &E_GL_OES_texture_storage_multisample_2d_array))
+ return keyword;
+ return es30ReservedFromGLSL(150);
+
+ case SAMPLER1D:
+ case SAMPLER1DSHADOW:
+ afterType = true;
+ if (parseContext.profile == EEsProfile)
+ reservedWord();
+ return keyword;
+
+ case SAMPLER3D:
+ afterType = true;
+ if (parseContext.profile == EEsProfile && parseContext.version < 300) {
+ if (! parseContext.extensionTurnedOn(E_GL_OES_texture_3D))
+ reservedWord();
+ }
+ return keyword;
+
+ case SAMPLER2DSHADOW:
+ afterType = true;
+ if (parseContext.profile == EEsProfile && parseContext.version < 300)
+ reservedWord();
+ return keyword;
+
+ case SAMPLER2DRECT:
+ case SAMPLER2DRECTSHADOW:
+ afterType = true;
+ if (parseContext.profile == EEsProfile)
+ reservedWord();
+ else if (parseContext.version < 140 && ! parseContext.symbolTable.atBuiltInLevel() && ! parseContext.extensionTurnedOn(E_GL_ARB_texture_rectangle)) {
+ if (parseContext.relaxedErrors())
+ parseContext.requireExtensions(loc, 1, &E_GL_ARB_texture_rectangle, "texture-rectangle sampler keyword");
+ else
+ reservedWord();
+ }
+ return keyword;
+
+ case SAMPLER1DARRAY:
+ afterType = true;
+ if (parseContext.profile == EEsProfile && parseContext.version == 300)
+ reservedWord();
+ else if ((parseContext.profile == EEsProfile && parseContext.version < 300) ||
+ (parseContext.profile != EEsProfile && parseContext.version < 130))
+ return identifierOrType();
+ return keyword;
+
+ case SAMPLEREXTERNALOES:
+ afterType = true;
+ if (parseContext.symbolTable.atBuiltInLevel() || parseContext.extensionTurnedOn(E_GL_OES_EGL_image_external))
+ return keyword;
+ return identifierOrType();
+
+ case TEXTURE2D:
+ case TEXTURECUBE:
+ case TEXTURECUBEARRAY:
+ case ITEXTURECUBEARRAY:
+ case UTEXTURECUBEARRAY:
+ case ITEXTURE1DARRAY:
+ case UTEXTURE1D:
+ case ITEXTURE1D:
+ case UTEXTURE1DARRAY:
+ case TEXTUREBUFFER:
+ case TEXTURE2DARRAY:
+ case ITEXTURE2D:
+ case ITEXTURE3D:
+ case ITEXTURECUBE:
+ case ITEXTURE2DARRAY:
+ case UTEXTURE2D:
+ case UTEXTURE3D:
+ case UTEXTURECUBE:
+ case UTEXTURE2DARRAY:
+ case ITEXTURE2DRECT:
+ case UTEXTURE2DRECT:
+ case ITEXTUREBUFFER:
+ case UTEXTUREBUFFER:
+ case TEXTURE2DMS:
+ case ITEXTURE2DMS:
+ case UTEXTURE2DMS:
+ case TEXTURE2DMSARRAY:
+ case ITEXTURE2DMSARRAY:
+ case UTEXTURE2DMSARRAY:
+ case TEXTURE1D:
+ case TEXTURE3D:
+ case TEXTURE2DRECT:
+ case TEXTURE1DARRAY:
+ case SAMPLER:
+ case SAMPLERSHADOW:
+ if (parseContext.spv > 0)
+ return keyword;
+ else
+ return identifierOrType();
+
+ case SUBPASSINPUT:
+ case SUBPASSINPUTMS:
+ case ISUBPASSINPUT:
+ case ISUBPASSINPUTMS:
+ case USUBPASSINPUT:
+ case USUBPASSINPUTMS:
+ if (parseContext.spv > 0)
+ return keyword;
+ else
+ return identifierOrType();
+
+ case NOPERSPECTIVE:
+ return es30ReservedFromGLSL(130);
+
+ case SMOOTH:
+ if ((parseContext.profile == EEsProfile && parseContext.version < 300) ||
+ (parseContext.profile != EEsProfile && parseContext.version < 130))
+ return identifierOrType();
+ return keyword;
+
+ case FLAT:
+ if (parseContext.profile == EEsProfile && parseContext.version < 300)
+ reservedWord();
+ else if (parseContext.profile != EEsProfile && parseContext.version < 130)
+ return identifierOrType();
+ return keyword;
+
+ case CENTROID:
+ if (parseContext.version < 120)
+ return identifierOrType();
+ return keyword;
+
+ case PRECISE:
+ if ((parseContext.profile == EEsProfile && parseContext.extensionsTurnedOn(Num_AEP_gpu_shader5, AEP_gpu_shader5)) ||
+ (parseContext.profile != EEsProfile && parseContext.version >= 400))
+ return keyword;
+ if (parseContext.profile == EEsProfile && parseContext.version == 310) {
+ reservedWord();
+ return keyword;
+ }
+ return identifierOrType();
+
+ case INVARIANT:
+ if (parseContext.profile != EEsProfile && parseContext.version < 120)
+ return identifierOrType();
+ return keyword;
+
+ case PACKED:
+ if ((parseContext.profile == EEsProfile && parseContext.version < 300) ||
+ (parseContext.profile != EEsProfile && parseContext.version < 330))
+ return reservedWord();
+ return identifierOrType();
+
+ case RESOURCE:
+ {
+ bool reserved = (parseContext.profile == EEsProfile && parseContext.version >= 300) ||
+ (parseContext.profile != EEsProfile && parseContext.version >= 420);
+ return identifierOrReserved(reserved);
+ }
+ case SUPERP:
+ {
+ bool reserved = parseContext.profile == EEsProfile || parseContext.version >= 130;
+ return identifierOrReserved(reserved);
+ }
+
+ default:
+ parseContext.infoSink.info.message(EPrefixInternalError, "Unknown glslang keyword", loc);
+ return 0;
+ }
+}
+
+int TScanContext::identifierOrType()
+{
+ parserToken->sType.lex.string = NewPoolTString(tokenText);
+ if (field)
+ return IDENTIFIER;
+
+ parserToken->sType.lex.symbol = parseContext.symbolTable.find(*parserToken->sType.lex.string);
+ if (afterType == false && parserToken->sType.lex.symbol) {
+ if (const TVariable* variable = parserToken->sType.lex.symbol->getAsVariable()) {
+ if (variable->isUserType()) {
+ afterType = true;
+
+ return TYPE_NAME;
+ }
+ }
+ }
+
+ return IDENTIFIER;
+}
+
+// Give an error for use of a reserved symbol.
+// However, allow built-in declarations to use reserved words, to allow
+// extension support before the extension is enabled.
+int TScanContext::reservedWord()
+{
+ if (! parseContext.symbolTable.atBuiltInLevel())
+ parseContext.error(loc, "Reserved word.", tokenText, "", "");
+
+ return 0;
+}
+
+int TScanContext::identifierOrReserved(bool reserved)
+{
+ if (reserved) {
+ reservedWord();
+
+ return 0;
+ }
+
+ if (parseContext.forwardCompatible)
+ parseContext.warn(loc, "using future reserved keyword", tokenText, "");
+
+ return identifierOrType();
+}
+
+// For keywords that suddenly showed up on non-ES (not previously reserved)
+// but then got reserved by ES 3.0.
+int TScanContext::es30ReservedFromGLSL(int version)
+{
+ if (parseContext.symbolTable.atBuiltInLevel())
+ return keyword;
+
+ if ((parseContext.profile == EEsProfile && parseContext.version < 300) ||
+ (parseContext.profile != EEsProfile && parseContext.version < version)) {
+ if (parseContext.forwardCompatible)
+ parseContext.warn(loc, "future reserved word in ES 300 and keyword in GLSL", tokenText, "");
+
+ return identifierOrType();
+ } else if (parseContext.profile == EEsProfile && parseContext.version >= 300)
+ reservedWord();
+
+ return keyword;
+}
+
+// For a keyword that was never reserved, until it suddenly
+// showed up, both in an es version and a non-ES version.
+int TScanContext::nonreservedKeyword(int esVersion, int nonEsVersion)
+{
+ if ((parseContext.profile == EEsProfile && parseContext.version < esVersion) ||
+ (parseContext.profile != EEsProfile && parseContext.version < nonEsVersion)) {
+ if (parseContext.forwardCompatible)
+ parseContext.warn(loc, "using future keyword", tokenText, "");
+
+ return identifierOrType();
+ }
+
+ return keyword;
+}
+
+int TScanContext::precisionKeyword()
+{
+ if (parseContext.profile == EEsProfile || parseContext.version >= 130)
+ return keyword;
+
+ if (parseContext.forwardCompatible)
+ parseContext.warn(loc, "using ES precision qualifier keyword", tokenText, "");
+
+ return identifierOrType();
+}
+
+int TScanContext::matNxM()
+{
+ afterType = true;
+
+ if (parseContext.version > 110)
+ return keyword;
+
+ if (parseContext.forwardCompatible)
+ parseContext.warn(loc, "using future non-square matrix type keyword", tokenText, "");
+
+ return identifierOrType();
+}
+
+int TScanContext::dMat()
+{
+ afterType = true;
+
+ if (parseContext.profile == EEsProfile && parseContext.version >= 300) {
+ reservedWord();
+
+ return keyword;
+ }
+
+ if (parseContext.profile != EEsProfile && parseContext.version >= 400)
+ return keyword;
+
+ if (parseContext.forwardCompatible)
+ parseContext.warn(loc, "using future type keyword", tokenText, "");
+
+ return identifierOrType();
+}
+
+int TScanContext::firstGenerationImage(bool inEs310)
+{
+ if (parseContext.symbolTable.atBuiltInLevel() ||
+ (parseContext.profile != EEsProfile && (parseContext.version >= 420 || parseContext.extensionTurnedOn(E_GL_ARB_shader_image_load_store))) ||
+ (inEs310 && parseContext.profile == EEsProfile && parseContext.version >= 310))
+ return keyword;
+
+ if ((parseContext.profile == EEsProfile && parseContext.version >= 300) ||
+ (parseContext.profile != EEsProfile && parseContext.version >= 130)) {
+ reservedWord();
+
+ return keyword;
+ }
+
+ if (parseContext.forwardCompatible)
+ parseContext.warn(loc, "using future type keyword", tokenText, "");
+
+ return identifierOrType();
+}
+
+int TScanContext::secondGenerationImage()
+{
+ if (parseContext.profile == EEsProfile && parseContext.version >= 310) {
+ reservedWord();
+ return keyword;
+ }
+
+ if (parseContext.symbolTable.atBuiltInLevel() ||
+ (parseContext.profile != EEsProfile &&
+ (parseContext.version >= 420 || parseContext.extensionTurnedOn(E_GL_ARB_shader_image_load_store))))
+ return keyword;
+
+ if (parseContext.forwardCompatible)
+ parseContext.warn(loc, "using future type keyword", tokenText, "");
+
+ return identifierOrType();
+}
+
+} // end namespace glslang
diff --git a/chromium/third_party/glslang/src/glslang/MachineIndependent/Scan.h b/chromium/third_party/glslang/src/glslang/MachineIndependent/Scan.h
new file mode 100644
index 00000000000..1cc437cb496
--- /dev/null
+++ b/chromium/third_party/glslang/src/glslang/MachineIndependent/Scan.h
@@ -0,0 +1,265 @@
+//
+//Copyright (C) 2002-2005 3Dlabs Inc. Ltd.
+//Copyright (C) 2013 LunarG, 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:
+//
+// Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 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.
+//
+// Neither the name of 3Dlabs Inc. Ltd. nor the names of its
+// contributors may be used to endorse or promote products derived
+// from this software without specific prior written permission.
+//
+//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+//"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 THE
+//COPYRIGHT HOLDERS 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.
+//
+#ifndef _GLSLANG_SCAN_INCLUDED_
+#define _GLSLANG_SCAN_INCLUDED_
+
+#include "Versions.h"
+
+namespace glslang {
+
+// Use a global end-of-input character, so no tranlation is needed across
+// layers of encapsulation. Characters are all 8 bit, and positive, so there is
+// no aliasing of character 255 onto -1, for example.
+const int EndOfInput = -1;
+
+//
+// A character scanner that seamlessly, on read-only strings, reads across an
+// array of strings without assuming null termination.
+//
+class TInputScanner {
+public:
+ TInputScanner(int n, const char* const s[], size_t L[], const char* const* names = nullptr, int b = 0, int f = 0, bool single = false) :
+ numSources(n),
+ sources(reinterpret_cast<const unsigned char* const *>(s)), // up to this point, common usage is "char*", but now we need positive 8-bit characters
+ lengths(L), currentSource(0), currentChar(0), stringBias(b), finale(f), singleLogical(single), endOfFileReached(false)
+ {
+ loc = new TSourceLoc[numSources];
+ for (int i = 0; i < numSources; ++i) {
+ loc[i].init();
+ }
+ if (names != nullptr) {
+ for (int i = 0; i < numSources; ++i)
+ loc[i].name = names[i];
+ }
+ loc[currentSource].string = -stringBias;
+ loc[currentSource].line = 1;
+ loc[currentSource].column = 0;
+ logicalSourceLoc.string = 0;
+ logicalSourceLoc.line = 1;
+ logicalSourceLoc.column = 0;
+ logicalSourceLoc.name = loc[0].name;
+ }
+
+ virtual ~TInputScanner()
+ {
+ delete [] loc;
+ }
+
+ // retrieve the next character and advance one character
+ int get()
+ {
+ int ret = peek();
+ if (ret == EndOfInput) return ret;
+ ++loc[currentSource].column;
+ ++logicalSourceLoc.column;
+ if (ret == '\n') {
+ ++loc[currentSource].line;
+ ++logicalSourceLoc.line;
+ logicalSourceLoc.column = 0;
+ loc[currentSource].column = 0;
+ }
+ advance();
+
+ return ret;
+ }
+
+ // retrieve the next character, no advance
+ int peek()
+ {
+ if (currentSource >= numSources) {
+ endOfFileReached = true;
+ return EndOfInput;
+ }
+ // Make sure we do not read off the end of a string.
+ // N.B. Sources can have a length of 0.
+ int sourceToRead = currentSource;
+ size_t charToRead = currentChar;
+ while(charToRead >= lengths[sourceToRead]) {
+ charToRead = 0;
+ sourceToRead += 1;
+ if (sourceToRead >= numSources) {
+ return EndOfInput;
+ }
+ }
+
+ // Here, we care about making negative valued characters positive
+ return sources[sourceToRead][charToRead];
+ }
+
+ // go back one character
+ void unget()
+ {
+ // Do not roll back once we've reached the end of the file.
+ if (endOfFileReached) return;
+
+ if (currentChar > 0) {
+ --currentChar;
+ --loc[currentSource].column;
+ --logicalSourceLoc.column;
+ if (loc[currentSource].column < 0) {
+ // We've moved back past a new line. Find the
+ // previous newline (or start of the file) to compute
+ // the column count on the now current line.
+ size_t chIndex = currentChar;
+ while (chIndex > 0) {
+ if (sources[currentSource][chIndex] == '\n') {
+ break;
+ }
+ --chIndex;
+ }
+ logicalSourceLoc.column = (int)(currentChar - chIndex);
+ loc[currentSource].column = (int)(currentChar - chIndex);
+ }
+ } else {
+ do {
+ --currentSource;
+ } while (currentSource > 0 && lengths[currentSource] == 0);
+ if (lengths[currentSource] == 0) {
+ // set to 0 if we've backed up to the start of an empty string
+ currentChar = 0;
+ } else
+ currentChar = lengths[currentSource] - 1;
+ }
+ if (peek() == '\n') {
+ --loc[currentSource].line;
+ --logicalSourceLoc.line;
+ }
+ }
+
+ // for #line override
+ void setLine(int newLine)
+ {
+ logicalSourceLoc.line = newLine;
+ loc[getLastValidSourceIndex()].line = newLine;
+ }
+
+ // for #line override in filename based parsing
+ void setFile(const char* filename)
+ {
+ logicalSourceLoc.name = filename;
+ loc[getLastValidSourceIndex()].name = filename;
+ }
+
+ void setFile(const char* filename, size_t i)
+ {
+ if (i == getLastValidSourceIndex()) {
+ logicalSourceLoc.name = filename;
+ }
+ loc[i].name = filename;
+ }
+
+ void setString(int newString)
+ {
+ logicalSourceLoc.string = newString;
+ loc[getLastValidSourceIndex()].string = newString;
+ logicalSourceLoc.name = nullptr;
+ loc[getLastValidSourceIndex()].name = nullptr;
+ }
+
+ // for #include content indentation
+ void setColumn(int col)
+ {
+ logicalSourceLoc.column = col;
+ loc[getLastValidSourceIndex()].column = col;
+ }
+
+ const TSourceLoc& getSourceLoc() const
+ {
+ if (singleLogical) {
+ return logicalSourceLoc;
+ } else {
+ return loc[std::max(0, std::min(currentSource, numSources - finale - 1))];
+ }
+ }
+ // Returns the index (starting from 0) of the most recent valid source string we are reading from.
+ int getLastValidSourceIndex() const { return std::min(currentSource, numSources - 1); }
+
+ void consumeWhiteSpace(bool& foundNonSpaceTab);
+ bool consumeComment();
+ void consumeWhitespaceComment(bool& foundNonSpaceTab);
+ bool scanVersion(int& version, EProfile& profile, bool& notFirstToken);
+
+protected:
+
+ // advance one character
+ void advance()
+ {
+ ++currentChar;
+ if (currentChar >= lengths[currentSource]) {
+ ++currentSource;
+ if (currentSource < numSources) {
+ loc[currentSource].string = loc[currentSource - 1].string + 1;
+ loc[currentSource].line = 1;
+ loc[currentSource].column = 0;
+ }
+ while (currentSource < numSources && lengths[currentSource] == 0) {
+ ++currentSource;
+ if (currentSource < numSources) {
+ loc[currentSource].string = loc[currentSource - 1].string + 1;
+ loc[currentSource].line = 1;
+ loc[currentSource].column = 0;
+ }
+ }
+ currentChar = 0;
+ }
+ }
+
+ int numSources; // number of strings in source
+ const unsigned char* const *sources; // array of strings; must be converted to positive values on use, to avoid aliasing with -1 as EndOfInput
+ const size_t *lengths; // length of each string
+ int currentSource;
+ size_t currentChar;
+
+ // This is for reporting what string/line an error occurred on, and can be overridden by #line.
+ // It remembers the last state of each source string as it is left for the next one, so unget()
+ // can restore that state.
+ TSourceLoc* loc; // an array
+
+ int stringBias; // the first string that is the user's string number 0
+ int finale; // number of internal strings after user's last string
+
+ TSourceLoc logicalSourceLoc;
+ bool singleLogical; // treats the strings as a single logical string.
+ // locations will be reported from the first string.
+
+ // set to true once peak() returns EndOfFile, so that we won't roll back
+ // once we've reached EndOfFile.
+ bool endOfFileReached;
+};
+
+} // end namespace glslang
+
+#endif // _GLSLANG_SCAN_INCLUDED_
diff --git a/chromium/third_party/glslang/src/glslang/MachineIndependent/ScanContext.h b/chromium/third_party/glslang/src/glslang/MachineIndependent/ScanContext.h
new file mode 100644
index 00000000000..f237bee9f29
--- /dev/null
+++ b/chromium/third_party/glslang/src/glslang/MachineIndependent/ScanContext.h
@@ -0,0 +1,86 @@
+//
+//Copyright (C) 2013 LunarG, 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:
+//
+// Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 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.
+//
+// Neither the name of 3Dlabs Inc. Ltd. nor the names of its
+// contributors may be used to endorse or promote products derived
+// from this software without specific prior written permission.
+//
+//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+//"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 THE
+//COPYRIGHT HOLDERS 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.
+//
+
+//
+// This holds context specific to the GLSL scanner, which
+// sits between the preprocessor scanner and parser.
+//
+
+#include "ParseHelper.h"
+
+namespace glslang {
+
+class TPpContext;
+class TPpToken;
+class TParserToken;
+
+class TScanContext {
+public:
+ explicit TScanContext(TParseContextBase& pc) : parseContext(pc), afterType(false), field(false) { }
+ virtual ~TScanContext() { }
+
+ static void fillInKeywordMap();
+ static void deleteKeywordMap();
+
+ int tokenize(TPpContext*, TParserToken&);
+
+protected:
+ TScanContext(TScanContext&);
+ TScanContext& operator=(TScanContext&);
+
+ int tokenizeIdentifier();
+ int identifierOrType();
+ int reservedWord();
+ int identifierOrReserved(bool reserved);
+ int es30ReservedFromGLSL(int version);
+ int nonreservedKeyword(int esVersion, int nonEsVersion);
+ int precisionKeyword();
+ int matNxM();
+ int dMat();
+ int firstGenerationImage(bool inEs310);
+ int secondGenerationImage();
+
+ TParseContextBase& parseContext;
+ bool afterType; // true if we've recognized a type, so can only be looking for an identifier
+ bool field; // true if we're on a field, right after a '.'
+ TSourceLoc loc;
+ TParserToken* parserToken;
+ TPpToken* ppToken;
+
+ const char* tokenText;
+ int keyword;
+};
+
+} // end namespace glslang
diff --git a/chromium/third_party/glslang/src/glslang/MachineIndependent/ShaderLang.cpp b/chromium/third_party/glslang/src/glslang/MachineIndependent/ShaderLang.cpp
new file mode 100644
index 00000000000..c2b56055f9f
--- /dev/null
+++ b/chromium/third_party/glslang/src/glslang/MachineIndependent/ShaderLang.cpp
@@ -0,0 +1,1623 @@
+//
+//Copyright (C) 2002-2005 3Dlabs Inc. Ltd.
+//Copyright (C) 2013-2016 LunarG, Inc.
+//Copyright (C) 2015-2016 Google, 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:
+//
+// Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 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.
+//
+// Neither the name of 3Dlabs Inc. Ltd. nor the names of its
+// contributors may be used to endorse or promote products derived
+// from this software without specific prior written permission.
+//
+//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+//"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 THE
+//COPYRIGHT HOLDERS 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.
+//
+
+//
+// Implement the top-level of interface to the compiler/linker,
+// as defined in ShaderLang.h
+// This is the platform independent interface between an OGL driver
+// and the shading language compiler/linker.
+//
+#include <string.h>
+#include <iostream>
+#include <sstream>
+#include <memory>
+#include "SymbolTable.h"
+#include "ParseHelper.h"
+#include "../../hlsl/hlslParseHelper.h"
+#include "../../hlsl/hlslParseables.h"
+#include "Scan.h"
+#include "ScanContext.h"
+
+#include "../Include/ShHandle.h"
+#include "../../OGLCompilersDLL/InitializeDll.h"
+
+#include "preprocessor/PpContext.h"
+
+#define SH_EXPORTING
+#include "../Public/ShaderLang.h"
+#include "reflection.h"
+#include "Initialize.h"
+
+namespace { // anonymous namespace for file-local functions and symbols
+
+using namespace glslang;
+
+// Create a language specific version of parseables.
+TBuiltInParseables* CreateBuiltInParseables(TInfoSink& infoSink, EShSource source)
+{
+ switch (source) {
+ case EShSourceGlsl: return new TBuiltIns(); // GLSL builtIns
+ case EShSourceHlsl: return new TBuiltInParseablesHlsl(); // HLSL intrinsics
+
+ default:
+ infoSink.info.message(EPrefixInternalError, "Unable to determine source language");
+ return nullptr;
+ }
+}
+
+// Local mapping functions for making arrays of symbol tables....
+
+int MapVersionToIndex(int version)
+{
+ switch (version) {
+ case 100: return 0;
+ case 110: return 1;
+ case 120: return 2;
+ case 130: return 3;
+ case 140: return 4;
+ case 150: return 5;
+ case 300: return 6;
+ case 330: return 7;
+ case 400: return 8;
+ case 410: return 9;
+ case 420: return 10;
+ case 430: return 11;
+ case 440: return 12;
+ case 310: return 13;
+ case 450: return 14;
+ default: // |
+ return 0; // |
+ } // |
+} // V
+const int VersionCount = 15; // number of case statements above
+
+int MapProfileToIndex(EProfile profile)
+{
+ switch (profile) {
+ case ENoProfile: return 0;
+ case ECoreProfile: return 1;
+ case ECompatibilityProfile: return 2;
+ case EEsProfile: return 3;
+ default: // |
+ return 0; // |
+ } // |
+} // V
+const int ProfileCount = 4; // number of case statements above
+
+// only one of these needed for non-ES; ES needs 2 for different precision defaults of built-ins
+enum EPrecisionClass {
+ EPcGeneral,
+ EPcFragment,
+ EPcCount
+};
+
+// A process-global symbol table per version per profile for built-ins common
+// to multiple stages (languages), and a process-global symbol table per version
+// per profile per stage for built-ins unique to each stage. They will be sparsely
+// populated, so they will only be generated as needed.
+//
+// Each has a different set of built-ins, and we want to preserve that from
+// compile to compile.
+//
+TSymbolTable* CommonSymbolTable[VersionCount][ProfileCount][EPcCount] = {};
+TSymbolTable* SharedSymbolTables[VersionCount][ProfileCount][EShLangCount] = {};
+
+TPoolAllocator* PerProcessGPA = 0;
+
+//
+// Parse and add to the given symbol table the content of the given shader string.
+//
+bool InitializeSymbolTable(const TString& builtIns, int version, EProfile profile, int spv, int vulkan, EShLanguage language, TInfoSink& infoSink,
+ TSymbolTable& symbolTable)
+{
+ TIntermediate intermediate(language, version, profile);
+
+ TParseContext parseContext(symbolTable, intermediate, true, version, profile, spv, vulkan, language, infoSink);
+ TShader::ForbidInclude includer;
+ TPpContext ppContext(parseContext, "", includer);
+ TScanContext scanContext(parseContext);
+ parseContext.setScanContext(&scanContext);
+ parseContext.setPpContext(&ppContext);
+
+ //
+ // Push the symbol table to give it an initial scope. This
+ // push should not have a corresponding pop, so that built-ins
+ // are preserved, and the test for an empty table fails.
+ //
+
+ symbolTable.push();
+
+ const char* builtInShaders[2];
+ size_t builtInLengths[2];
+ builtInShaders[0] = builtIns.c_str();
+ builtInLengths[0] = builtIns.size();
+
+ if (builtInLengths[0] == 0)
+ return true;
+
+ TInputScanner input(1, builtInShaders, builtInLengths);
+ if (! parseContext.parseShaderStrings(ppContext, input) != 0) {
+ infoSink.info.message(EPrefixInternalError, "Unable to parse built-ins");
+ printf("Unable to parse built-ins\n%s\n", infoSink.info.c_str());
+ printf("%s\n", builtInShaders[0]);
+
+ return false;
+ }
+
+ return true;
+}
+
+int CommonIndex(EProfile profile, EShLanguage language)
+{
+ return (profile == EEsProfile && language == EShLangFragment) ? EPcFragment : EPcGeneral;
+}
+
+//
+// To initialize per-stage shared tables, with the common table already complete.
+//
+void InitializeStageSymbolTable(TBuiltInParseables& builtInParseables, int version, EProfile profile, int spv, int vulkan,
+ EShLanguage language, TInfoSink& infoSink, TSymbolTable** commonTable, TSymbolTable** symbolTables)
+{
+ (*symbolTables[language]).adoptLevels(*commonTable[CommonIndex(profile, language)]);
+ InitializeSymbolTable(builtInParseables.getStageString(language), version, profile, spv, vulkan, language, infoSink, *symbolTables[language]);
+ builtInParseables.identifyBuiltIns(version, profile, spv, vulkan, language, *symbolTables[language]);
+ if (profile == EEsProfile && version >= 300)
+ (*symbolTables[language]).setNoBuiltInRedeclarations();
+ if (version == 110)
+ (*symbolTables[language]).setSeparateNameSpaces();
+}
+
+//
+// Initialize the full set of shareable symbol tables;
+// The common (cross-stage) and those shareable per-stage.
+//
+bool InitializeSymbolTables(TInfoSink& infoSink, TSymbolTable** commonTable, TSymbolTable** symbolTables, int version, EProfile profile, int spv, int vulkan, EShSource source)
+{
+ std::unique_ptr<TBuiltInParseables> builtInParseables(CreateBuiltInParseables(infoSink, source));
+
+ builtInParseables->initialize(version, profile, spv, vulkan);
+
+ // do the common tables
+ InitializeSymbolTable(builtInParseables->getCommonString(), version, profile, spv, vulkan, EShLangVertex, infoSink, *commonTable[EPcGeneral]);
+ if (profile == EEsProfile)
+ InitializeSymbolTable(builtInParseables->getCommonString(), version, profile, spv, vulkan, EShLangFragment, infoSink, *commonTable[EPcFragment]);
+
+ // do the per-stage tables
+
+ // always have vertex and fragment
+ InitializeStageSymbolTable(*builtInParseables, version, profile, spv, vulkan, EShLangVertex, infoSink, commonTable, symbolTables);
+ InitializeStageSymbolTable(*builtInParseables, version, profile, spv, vulkan, EShLangFragment, infoSink, commonTable, symbolTables);
+
+ // check for tessellation
+ if ((profile != EEsProfile && version >= 150) ||
+ (profile == EEsProfile && version >= 310)) {
+ InitializeStageSymbolTable(*builtInParseables, version, profile, spv, vulkan, EShLangTessControl, infoSink, commonTable, symbolTables);
+ InitializeStageSymbolTable(*builtInParseables, version, profile, spv, vulkan, EShLangTessEvaluation, infoSink, commonTable, symbolTables);
+ }
+
+ // check for geometry
+ if ((profile != EEsProfile && version >= 150) ||
+ (profile == EEsProfile && version >= 310))
+ InitializeStageSymbolTable(*builtInParseables, version, profile, spv, vulkan, EShLangGeometry, infoSink, commonTable, symbolTables);
+
+ // check for compute
+ if ((profile != EEsProfile && version >= 420) ||
+ (profile == EEsProfile && version >= 310))
+ InitializeStageSymbolTable(*builtInParseables, version, profile, spv, vulkan, EShLangCompute, infoSink, commonTable, symbolTables);
+
+ return true;
+}
+
+bool AddContextSpecificSymbols(const TBuiltInResource* resources, TInfoSink& infoSink, TSymbolTable& symbolTable, int version,
+ EProfile profile, int spv, int vulkan, EShLanguage language, EShSource source)
+{
+ std::unique_ptr<TBuiltInParseables> builtInParseables(CreateBuiltInParseables(infoSink, source));
+
+ builtInParseables->initialize(*resources, version, profile, spv, vulkan, language);
+ InitializeSymbolTable(builtInParseables->getCommonString(), version, profile, spv, vulkan, language, infoSink, symbolTable);
+ builtInParseables->identifyBuiltIns(version, profile, spv, vulkan, language, symbolTable, *resources);
+
+ return true;
+}
+
+//
+// To do this on the fly, we want to leave the current state of our thread's
+// pool allocator intact, so:
+// - Switch to a new pool for parsing the built-ins
+// - Do the parsing, which builds the symbol table, using the new pool
+// - Switch to the process-global pool to save a copy the resulting symbol table
+// - Free up the new pool used to parse the built-ins
+// - Switch back to the original thread's pool
+//
+// This only gets done the first time any thread needs a particular symbol table
+// (lazy evaluation).
+//
+void SetupBuiltinSymbolTable(int version, EProfile profile, int spv, int vulkan, EShSource source)
+{
+ TInfoSink infoSink;
+
+ // Make sure only one thread tries to do this at a time
+ glslang::GetGlobalLock();
+
+ // See if it's already been done for this version/profile combination
+ int versionIndex = MapVersionToIndex(version);
+ int profileIndex = MapProfileToIndex(profile);
+ if (CommonSymbolTable[versionIndex][profileIndex][EPcGeneral]) {
+ glslang::ReleaseGlobalLock();
+
+ return;
+ }
+
+ // Switch to a new pool
+ TPoolAllocator& previousAllocator = GetThreadPoolAllocator();
+ TPoolAllocator* builtInPoolAllocator = new TPoolAllocator();
+ SetThreadPoolAllocator(*builtInPoolAllocator);
+
+ // Dynamically allocate the local symbol tables so we can control when they are deallocated WRT when the pool is popped.
+ TSymbolTable* commonTable[EPcCount];
+ TSymbolTable* stageTables[EShLangCount];
+ for (int precClass = 0; precClass < EPcCount; ++precClass)
+ commonTable[precClass] = new TSymbolTable;
+ for (int stage = 0; stage < EShLangCount; ++stage)
+ stageTables[stage] = new TSymbolTable;
+
+ // Generate the local symbol tables using the new pool
+ InitializeSymbolTables(infoSink, commonTable, stageTables, version, profile, spv, vulkan, source);
+
+ // Switch to the process-global pool
+ SetThreadPoolAllocator(*PerProcessGPA);
+
+ // Copy the local symbol tables from the new pool to the global tables using the process-global pool
+ for (int precClass = 0; precClass < EPcCount; ++precClass) {
+ if (! commonTable[precClass]->isEmpty()) {
+ CommonSymbolTable[versionIndex][profileIndex][precClass] = new TSymbolTable;
+ CommonSymbolTable[versionIndex][profileIndex][precClass]->copyTable(*commonTable[precClass]);
+ CommonSymbolTable[versionIndex][profileIndex][precClass]->readOnly();
+ }
+ }
+ for (int stage = 0; stage < EShLangCount; ++stage) {
+ if (! stageTables[stage]->isEmpty()) {
+ SharedSymbolTables[versionIndex][profileIndex][stage] = new TSymbolTable;
+ SharedSymbolTables[versionIndex][profileIndex][stage]->adoptLevels(*CommonSymbolTable[versionIndex][profileIndex][CommonIndex(profile, (EShLanguage)stage)]);
+ SharedSymbolTables[versionIndex][profileIndex][stage]->copyTable(*stageTables[stage]);
+ SharedSymbolTables[versionIndex][profileIndex][stage]->readOnly();
+ }
+ }
+
+ // Clean up the local tables before deleting the pool they used.
+ for (int precClass = 0; precClass < EPcCount; ++precClass)
+ delete commonTable[precClass];
+ for (int stage = 0; stage < EShLangCount; ++stage)
+ delete stageTables[stage];
+
+ delete builtInPoolAllocator;
+ SetThreadPoolAllocator(previousAllocator);
+
+ glslang::ReleaseGlobalLock();
+}
+
+// Return true if the shader was correctly specified for version/profile/stage.
+bool DeduceVersionProfile(TInfoSink& infoSink, EShLanguage stage, bool versionNotFirst, int defaultVersion,
+ EShSource source, int& version, EProfile& profile, int spv)
+{
+ const int FirstProfileVersion = 150;
+ bool correct = true;
+
+ if (source == EShSourceHlsl) {
+ version = 450; // TODO: GLSL parser is still used for builtins.
+ profile = ENoProfile;
+ return correct;
+ }
+
+ // Get a good version...
+ if (version == 0) {
+ version = defaultVersion;
+ // infoSink.info.message(EPrefixWarning, "#version: statement missing; use #version on first line of shader");
+ }
+
+ // Get a good profile...
+ if (profile == ENoProfile) {
+ if (version == 300 || version == 310) {
+ correct = false;
+ infoSink.info.message(EPrefixError, "#version: versions 300 and 310 require specifying the 'es' profile");
+ profile = EEsProfile;
+ } else if (version == 100)
+ profile = EEsProfile;
+ else if (version >= FirstProfileVersion)
+ profile = ECoreProfile;
+ else
+ profile = ENoProfile;
+ } else {
+ // a profile was provided...
+ if (version < 150) {
+ correct = false;
+ infoSink.info.message(EPrefixError, "#version: versions before 150 do not allow a profile token");
+ if (version == 100)
+ profile = EEsProfile;
+ else
+ profile = ENoProfile;
+ } else if (version == 300 || version == 310) {
+ if (profile != EEsProfile) {
+ correct = false;
+ infoSink.info.message(EPrefixError, "#version: versions 300 and 310 support only the es profile");
+ }
+ profile = EEsProfile;
+ } else {
+ if (profile == EEsProfile) {
+ correct = false;
+ infoSink.info.message(EPrefixError, "#version: only version 300 and 310 support the es profile");
+ if (version >= FirstProfileVersion)
+ profile = ECoreProfile;
+ else
+ profile = ENoProfile;
+ }
+ // else: typical desktop case... e.g., "#version 410 core"
+ }
+ }
+
+ // Correct for stage type...
+ switch (stage) {
+ case EShLangGeometry:
+ if ((profile == EEsProfile && version < 310) ||
+ (profile != EEsProfile && version < 150)) {
+ correct = false;
+ infoSink.info.message(EPrefixError, "#version: geometry shaders require es profile with version 310 or non-es profile with version 150 or above");
+ version = (profile == EEsProfile) ? 310 : 150;
+ if (profile == EEsProfile || profile == ENoProfile)
+ profile = ECoreProfile;
+ }
+ break;
+ case EShLangTessControl:
+ case EShLangTessEvaluation:
+ if ((profile == EEsProfile && version < 310) ||
+ (profile != EEsProfile && version < 150)) {
+ correct = false;
+ infoSink.info.message(EPrefixError, "#version: tessellation shaders require es profile with version 310 or non-es profile with version 150 or above");
+ version = (profile == EEsProfile) ? 310 : 400; // 150 supports the extension, correction is to 400 which does not
+ if (profile == EEsProfile || profile == ENoProfile)
+ profile = ECoreProfile;
+ }
+ break;
+ case EShLangCompute:
+ if ((profile == EEsProfile && version < 310) ||
+ (profile != EEsProfile && version < 420)) {
+ correct = false;
+ infoSink.info.message(EPrefixError, "#version: compute shaders require es profile with version 310 or above, or non-es profile with version 420 or above");
+ version = profile == EEsProfile ? 310 : 420;
+ }
+ break;
+ default:
+ break;
+ }
+
+ if (profile == EEsProfile && version >= 300 && versionNotFirst) {
+ correct = false;
+ infoSink.info.message(EPrefixError, "#version: statement must appear first in es-profile shader; before comments or newlines");
+ }
+
+ // Check for SPIR-V compatibility
+ if (spv > 0) {
+ if (profile == EEsProfile) {
+ if (version < 310) {
+ correct = false;
+ infoSink.info.message(EPrefixError, "#version: ES shaders for SPIR-V require version 310 or higher");
+ version = 310;
+ }
+ } else {
+ if (version < 140) {
+ correct = false;
+ infoSink.info.message(EPrefixError, "#version: Desktop shaders for SPIR-V require version 140 or higher");
+ version = 140;
+ }
+ }
+ }
+
+ // A meta check on the condition of the compiler itself...
+ switch (version) {
+
+ // ES versions
+ case 100:
+ case 300:
+ // versions are complete
+ break;
+
+ // Desktop versions
+ case 110:
+ case 120:
+ case 130:
+ case 140:
+ case 150:
+ case 330:
+ // versions are complete
+ break;
+
+ case 310:
+ case 400:
+ case 410:
+ case 420:
+ case 430:
+ case 440:
+ case 450:
+ infoSink.info << "Warning, version " << version << " is not yet complete; most version-specific features are present, but some are missing.\n";
+ break;
+
+ default:
+ infoSink.info << "Warning, version " << version << " is unknown.\n";
+ break;
+
+ }
+
+ return correct;
+}
+
+// This is the common setup and cleanup code for PreprocessDeferred and
+// CompileDeferred.
+// It takes any callable with a signature of
+// bool (TParseContextBase& parseContext, TPpContext& ppContext,
+// TInputScanner& input, bool versionWillBeError,
+// TSymbolTable& , TIntermediate& ,
+// EShOptimizationLevel , EShMessages );
+// Which returns false if a failure was detected and true otherwise.
+//
+template<typename ProcessingContext>
+bool ProcessDeferred(
+ TCompiler* compiler,
+ const char* const shaderStrings[],
+ const int numStrings,
+ const int* inputLengths,
+ const char* const stringNames[],
+ const char* customPreamble,
+ const EShOptimizationLevel optLevel,
+ const TBuiltInResource* resources,
+ int defaultVersion, // use 100 for ES environment, 110 for desktop; this is the GLSL version, not SPIR-V or Vulkan
+ EProfile defaultProfile,
+ // set version/profile to defaultVersion/defaultProfile regardless of the #version
+ // directive in the source code
+ bool forceDefaultVersionAndProfile,
+ bool forwardCompatible, // give errors for use of deprecated features
+ EShMessages messages, // warnings/errors/AST; things to print out
+ TIntermediate& intermediate, // returned tree, etc.
+ ProcessingContext& processingContext,
+ bool requireNonempty,
+ TShader::Includer& includer
+ )
+{
+ if (! InitThread())
+ return false;
+
+ // This must be undone (.pop()) by the caller, after it finishes consuming the created tree.
+ GetThreadPoolAllocator().push();
+
+ if (numStrings == 0)
+ return true;
+
+ // Move to length-based strings, rather than null-terminated strings.
+ // Also, add strings to include the preamble and to ensure the shader is not null,
+ // which lets the grammar accept what was a null (post preprocessing) shader.
+ //
+ // Shader will look like
+ // string 0: system preamble
+ // string 1: custom preamble
+ // string 2...numStrings+1: user's shader
+ // string numStrings+2: "int;"
+ const int numPre = 2;
+ const int numPost = requireNonempty? 1 : 0;
+ const int numTotal = numPre + numStrings + numPost;
+ size_t* lengths = new size_t[numTotal];
+ const char** strings = new const char*[numTotal];
+ const char** names = new const char*[numTotal];
+ for (int s = 0; s < numStrings; ++s) {
+ strings[s + numPre] = shaderStrings[s];
+ if (inputLengths == 0 || inputLengths[s] < 0)
+ lengths[s + numPre] = strlen(shaderStrings[s]);
+ else
+ lengths[s + numPre] = inputLengths[s];
+ }
+ if (stringNames != nullptr) {
+ for (int s = 0; s < numStrings; ++s)
+ names[s + numPre] = stringNames[s];
+ } else {
+ for (int s = 0; s < numStrings; ++s)
+ names[s + numPre] = nullptr;
+ }
+
+ // First, without using the preprocessor or parser, find the #version, so we know what
+ // symbol tables, processing rules, etc. to set up. This does not need the extra strings
+ // outlined above, just the user shader.
+ int version;
+ EProfile profile;
+ glslang::TInputScanner userInput(numStrings, &strings[numPre], &lengths[numPre]); // no preamble
+ bool versionNotFirstToken;
+ bool versionNotFirst = userInput.scanVersion(version, profile, versionNotFirstToken);
+ bool versionNotFound = version == 0;
+ if (forceDefaultVersionAndProfile) {
+ if (! (messages & EShMsgSuppressWarnings) && ! versionNotFound &&
+ (version != defaultVersion || profile != defaultProfile)) {
+ compiler->infoSink.info << "Warning, (version, profile) forced to be ("
+ << defaultVersion << ", " << ProfileName(defaultProfile)
+ << "), while in source code it is ("
+ << version << ", " << ProfileName(profile) << ")\n";
+ }
+
+ if (versionNotFound) {
+ versionNotFirstToken = false;
+ versionNotFirst = false;
+ versionNotFound = false;
+ }
+ version = defaultVersion;
+ profile = defaultProfile;
+ }
+ int spv = (messages & EShMsgSpvRules) ? 100 : 0; // TODO find path to get real version number here, for now non-0 is what matters
+ EShSource source = (messages & EShMsgReadHlsl) ? EShSourceHlsl : EShSourceGlsl;
+ bool goodVersion = DeduceVersionProfile(compiler->infoSink, compiler->getLanguage(), versionNotFirst, defaultVersion, source, version, profile, spv);
+ bool versionWillBeError = (versionNotFound || (profile == EEsProfile && version >= 300 && versionNotFirst));
+ bool warnVersionNotFirst = false;
+ if (! versionWillBeError && versionNotFirstToken) {
+ if (messages & EShMsgRelaxedErrors)
+ warnVersionNotFirst = true;
+ else
+ versionWillBeError = true;
+ }
+
+ int vulkan = (messages & EShMsgVulkanRules) ? 100 : 0; // TODO find path to get real version number here, for now non-0 is what matters
+ intermediate.setSource(source);
+ intermediate.setVersion(version);
+ intermediate.setProfile(profile);
+ intermediate.setSpv(spv);
+ if (vulkan)
+ intermediate.setOriginUpperLeft();
+ SetupBuiltinSymbolTable(version, profile, spv, vulkan, source);
+
+ TSymbolTable* cachedTable = SharedSymbolTables[MapVersionToIndex(version)]
+ [MapProfileToIndex(profile)]
+ [compiler->getLanguage()];
+
+ // Dynamically allocate the symbol table so we can control when it is deallocated WRT the pool.
+ TSymbolTable* symbolTableMemory = new TSymbolTable;
+ TSymbolTable& symbolTable = *symbolTableMemory;
+ if (cachedTable)
+ symbolTable.adoptLevels(*cachedTable);
+
+ // Add built-in symbols that are potentially context dependent;
+ // they get popped again further down.
+ AddContextSpecificSymbols(resources, compiler->infoSink, symbolTable, version, profile, spv, vulkan,
+ compiler->getLanguage(), source);
+
+ //
+ // Now we can process the full shader under proper symbols and rules.
+ //
+
+ TParseContextBase* parseContext;
+ if (source == EShSourceHlsl) {
+ parseContext = new HlslParseContext(symbolTable, intermediate, false, version, profile, spv, vulkan,
+ compiler->getLanguage(), compiler->infoSink, forwardCompatible, messages);
+ }
+ else {
+ intermediate.setEntryPoint("main");
+ parseContext = new TParseContext(symbolTable, intermediate, false, version, profile, spv, vulkan,
+ compiler->getLanguage(), compiler->infoSink, forwardCompatible, messages);
+ }
+ TPpContext ppContext(*parseContext, names[numPre]? names[numPre]: "", includer);
+
+ // only GLSL (bison triggered, really) needs an externally set scan context
+ glslang::TScanContext scanContext(*parseContext);
+ if ((messages & EShMsgReadHlsl) == 0)
+ parseContext->setScanContext(&scanContext);
+
+ parseContext->setPpContext(&ppContext);
+ parseContext->setLimits(*resources);
+ if (! goodVersion)
+ parseContext->addError();
+ if (warnVersionNotFirst) {
+ TSourceLoc loc;
+ loc.init();
+ parseContext->warn(loc, "Illegal to have non-comment, non-whitespace tokens before #version", "#version", "");
+ }
+
+ parseContext->initializeExtensionBehavior();
+
+ // Fill in the strings as outlined above.
+ std::string preamble;
+ parseContext->getPreamble(preamble);
+ strings[0] = preamble.c_str();
+ lengths[0] = strlen(strings[0]);
+ names[0] = nullptr;
+ strings[1] = customPreamble;
+ lengths[1] = strlen(strings[1]);
+ names[1] = nullptr;
+ assert(2 == numPre);
+ if (requireNonempty) {
+ const int postIndex = numStrings + numPre;
+ strings[postIndex] = "\n int;";
+ lengths[postIndex] = strlen(strings[numStrings + numPre]);
+ names[postIndex] = nullptr;
+ }
+ TInputScanner fullInput(numStrings + numPre + numPost, strings, lengths, names, numPre, numPost);
+
+ // Push a new symbol allocation scope that will get used for the shader's globals.
+ symbolTable.push();
+
+ bool success = processingContext(*parseContext, ppContext, fullInput,
+ versionWillBeError, symbolTable,
+ intermediate, optLevel, messages);
+
+ // Clean up the symbol table. The AST is self-sufficient now.
+ delete symbolTableMemory;
+
+ delete parseContext;
+ delete [] lengths;
+ delete [] strings;
+ delete [] names;
+
+ return success;
+}
+
+// Responsible for keeping track of the most recent source string and line in
+// the preprocessor and outputting newlines appropriately if the source string
+// or line changes.
+class SourceLineSynchronizer {
+public:
+ SourceLineSynchronizer(const std::function<int()>& lastSourceIndex,
+ std::stringstream* output)
+ : getLastSourceIndex(lastSourceIndex), output(output), lastSource(-1), lastLine(0) {}
+// SourceLineSynchronizer(const SourceLineSynchronizer&) = delete;
+// SourceLineSynchronizer& operator=(const SourceLineSynchronizer&) = delete;
+
+ // Sets the internally tracked source string index to that of the most
+ // recently read token. If we switched to a new source string, returns
+ // true and inserts a newline. Otherwise, returns false and outputs nothing.
+ bool syncToMostRecentString() {
+ if (getLastSourceIndex() != lastSource) {
+ // After switching to a new source string, we need to reset lastLine
+ // because line number resets every time a new source string is
+ // used. We also need to output a newline to separate the output
+ // from the previous source string (if there is one).
+ if (lastSource != -1 || lastLine != 0)
+ *output << std::endl;
+ lastSource = getLastSourceIndex();
+ lastLine = -1;
+ return true;
+ }
+ return false;
+ }
+
+ // Calls syncToMostRecentString() and then sets the internally tracked line
+ // number to tokenLine. If we switched to a new line, returns true and inserts
+ // newlines appropriately. Otherwise, returns false and outputs nothing.
+ bool syncToLine(int tokenLine) {
+ syncToMostRecentString();
+ const bool newLineStarted = lastLine < tokenLine;
+ for (; lastLine < tokenLine; ++lastLine) {
+ if (lastLine > 0) *output << std::endl;
+ }
+ return newLineStarted;
+ }
+
+ // Sets the internally tracked line number to newLineNum.
+ void setLineNum(int newLineNum) { lastLine = newLineNum; }
+
+private:
+ // A function for getting the index of the last valid source string we've
+ // read tokens from.
+ const std::function<int()> getLastSourceIndex;
+ // output stream for newlines.
+ std::stringstream* output;
+ // lastSource is the source string index (starting from 0) of the last token
+ // processed. It is tracked in order for newlines to be inserted when a new
+ // source string starts. -1 means we haven't started processing any source
+ // string.
+ int lastSource;
+ // lastLine is the line number (starting from 1) of the last token processed.
+ // It is tracked in order for newlines to be inserted when a token appears
+ // on a new line. 0 means we haven't started processing any line in the
+ // current source string.
+ int lastLine;
+};
+
+// DoPreprocessing is a valid ProcessingContext template argument,
+// which only performs the preprocessing step of compilation.
+// It places the result in the "string" argument to its constructor.
+struct DoPreprocessing {
+ explicit DoPreprocessing(std::string* string): outputString(string) {}
+ bool operator()(TParseContextBase& parseContext, TPpContext& ppContext,
+ TInputScanner& input, bool versionWillBeError,
+ TSymbolTable& , TIntermediate& ,
+ EShOptimizationLevel , EShMessages )
+ {
+ // This is a list of tokens that do not require a space before or after.
+ static const std::string unNeededSpaceTokens = ";()[]";
+ static const std::string noSpaceBeforeTokens = ",";
+ glslang::TPpToken token;
+
+ parseContext.setScanner(&input);
+ ppContext.setInput(input, versionWillBeError);
+
+ std::stringstream outputStream;
+ SourceLineSynchronizer lineSync(
+ std::bind(&TInputScanner::getLastValidSourceIndex, &input), &outputStream);
+
+ parseContext.setExtensionCallback([&lineSync, &outputStream](
+ int line, const char* extension, const char* behavior) {
+ lineSync.syncToLine(line);
+ outputStream << "#extension " << extension << " : " << behavior;
+ });
+
+ parseContext.setLineCallback([&lineSync, &outputStream, &parseContext](
+ int curLineNum, int newLineNum, bool hasSource, int sourceNum, const char* sourceName) {
+ // SourceNum is the number of the source-string that is being parsed.
+ lineSync.syncToLine(curLineNum);
+ outputStream << "#line " << newLineNum;
+ if (hasSource) {
+ outputStream << " ";
+ if (sourceName != nullptr) {
+ outputStream << "\"" << sourceName << "\"";
+ } else {
+ outputStream << sourceNum;
+ }
+ }
+ if (parseContext.lineDirectiveShouldSetNextLine()) {
+ // newLineNum is the new line number for the line following the #line
+ // directive. So the new line number for the current line is
+ newLineNum -= 1;
+ }
+ outputStream << std::endl;
+ // And we are at the next line of the #line directive now.
+ lineSync.setLineNum(newLineNum + 1);
+ });
+
+ parseContext.setVersionCallback(
+ [&lineSync, &outputStream](int line, int version, const char* str) {
+ lineSync.syncToLine(line);
+ outputStream << "#version " << version;
+ if (str) {
+ outputStream << " " << str;
+ }
+ });
+
+ parseContext.setPragmaCallback([&lineSync, &outputStream](
+ int line, const glslang::TVector<glslang::TString>& ops) {
+ lineSync.syncToLine(line);
+ outputStream << "#pragma ";
+ for(size_t i = 0; i < ops.size(); ++i) {
+ outputStream << ops[i];
+ }
+ });
+
+ parseContext.setErrorCallback([&lineSync, &outputStream](
+ int line, const char* errorMessage) {
+ lineSync.syncToLine(line);
+ outputStream << "#error " << errorMessage;
+ });
+
+ int lastToken = EndOfInput; // lastToken records the last token processed.
+ while (const char* tok = ppContext.tokenize(&token)) {
+ bool isNewString = lineSync.syncToMostRecentString();
+ bool isNewLine = lineSync.syncToLine(token.loc.line);
+
+ if (isNewLine) {
+ // Don't emit whitespace onto empty lines.
+ // Copy any whitespace characters at the start of a line
+ // from the input to the output.
+ outputStream << std::string(token.loc.column - 1, ' ');
+ }
+
+ // Output a space in between tokens, but not at the start of a line,
+ // and also not around special tokens. This helps with readability
+ // and consistency.
+ if (!isNewString && !isNewLine && lastToken != EndOfInput &&
+ (unNeededSpaceTokens.find((char)token.token) == std::string::npos) &&
+ (unNeededSpaceTokens.find((char)lastToken) == std::string::npos) &&
+ (noSpaceBeforeTokens.find((char)token.token) == std::string::npos)) {
+ outputStream << " ";
+ }
+ lastToken = token.token;
+ outputStream << tok;
+ }
+ outputStream << std::endl;
+ *outputString = outputStream.str();
+
+ bool success = true;
+ if (parseContext.getNumErrors() > 0) {
+ success = false;
+ parseContext.infoSink.info.prefix(EPrefixError);
+ parseContext.infoSink.info << parseContext.getNumErrors() << " compilation errors. No code generated.\n\n";
+ }
+ return success;
+ }
+ std::string* outputString;
+};
+
+// DoFullParse is a valid ProcessingConext template argument for fully
+// parsing the shader. It populates the "intermediate" with the AST.
+struct DoFullParse{
+ bool operator()(TParseContextBase& parseContext, TPpContext& ppContext,
+ TInputScanner& fullInput, bool versionWillBeError,
+ TSymbolTable& symbolTable, TIntermediate& intermediate,
+ EShOptimizationLevel optLevel, EShMessages messages)
+ {
+ bool success = true;
+ // Parse the full shader.
+ if (! parseContext.parseShaderStrings(ppContext, fullInput, versionWillBeError))
+ success = false;
+ intermediate.addSymbolLinkageNodes(parseContext.getLinkage(), parseContext.getLanguage(), symbolTable);
+
+ if (success && intermediate.getTreeRoot()) {
+ if (optLevel == EShOptNoGeneration)
+ parseContext.infoSink.info.message(EPrefixNone, "No errors. No code generation or linking was requested.");
+ else
+ success = intermediate.postProcess(intermediate.getTreeRoot(), parseContext.getLanguage());
+ } else if (! success) {
+ parseContext.infoSink.info.prefix(EPrefixError);
+ parseContext.infoSink.info << parseContext.getNumErrors() << " compilation errors. No code generated.\n\n";
+ }
+
+ if (messages & EShMsgAST)
+ intermediate.output(parseContext.infoSink, true);
+
+ return success;
+ }
+};
+
+// Take a single compilation unit, and run the preprocessor on it.
+// Return: True if there were no issues found in preprocessing,
+// False if during preprocessing any unknown version, pragmas or
+// extensions were found.
+bool PreprocessDeferred(
+ TCompiler* compiler,
+ const char* const shaderStrings[],
+ const int numStrings,
+ const int* inputLengths,
+ const char* const stringNames[],
+ const char* preamble,
+ const EShOptimizationLevel optLevel,
+ const TBuiltInResource* resources,
+ int defaultVersion, // use 100 for ES environment, 110 for desktop
+ EProfile defaultProfile,
+ bool forceDefaultVersionAndProfile,
+ bool forwardCompatible, // give errors for use of deprecated features
+ EShMessages messages, // warnings/errors/AST; things to print out
+ TShader::Includer& includer,
+ TIntermediate& intermediate, // returned tree, etc.
+ std::string* outputString)
+{
+ DoPreprocessing parser(outputString);
+ return ProcessDeferred(compiler, shaderStrings, numStrings, inputLengths, stringNames,
+ preamble, optLevel, resources, defaultVersion,
+ defaultProfile, forceDefaultVersionAndProfile,
+ forwardCompatible, messages, intermediate, parser,
+ false, includer);
+}
+
+
+//
+// do a partial compile on the given strings for a single compilation unit
+// for a potential deferred link into a single stage (and deferred full compile of that
+// stage through machine-dependent compilation).
+//
+// all preprocessing, parsing, semantic checks, etc. for a single compilation unit
+// are done here.
+//
+// return: the tree and other information is filled into the intermediate argument,
+// and true is returned by the function for success.
+//
+bool CompileDeferred(
+ TCompiler* compiler,
+ const char* const shaderStrings[],
+ const int numStrings,
+ const int* inputLengths,
+ const char* const stringNames[],
+ const char* preamble,
+ const EShOptimizationLevel optLevel,
+ const TBuiltInResource* resources,
+ int defaultVersion, // use 100 for ES environment, 110 for desktop
+ EProfile defaultProfile,
+ bool forceDefaultVersionAndProfile,
+ bool forwardCompatible, // give errors for use of deprecated features
+ EShMessages messages, // warnings/errors/AST; things to print out
+ TIntermediate& intermediate,// returned tree, etc.
+ TShader::Includer& includer)
+{
+ DoFullParse parser;
+ return ProcessDeferred(compiler, shaderStrings, numStrings, inputLengths, stringNames,
+ preamble, optLevel, resources, defaultVersion,
+ defaultProfile, forceDefaultVersionAndProfile,
+ forwardCompatible, messages, intermediate, parser,
+ true, includer);
+}
+
+} // end anonymous namespace for local functions
+
+
+//
+// ShInitialize() should be called exactly once per process, not per thread.
+//
+int ShInitialize()
+{
+ glslang::InitGlobalLock();
+
+ if (! InitProcess())
+ return 0;
+
+ if (! PerProcessGPA)
+ PerProcessGPA = new TPoolAllocator();
+
+ glslang::TScanContext::fillInKeywordMap();
+
+ return 1;
+}
+
+//
+// Driver calls these to create and destroy compiler/linker
+// objects.
+//
+
+ShHandle ShConstructCompiler(const EShLanguage language, int debugOptions)
+{
+ if (!InitThread())
+ return 0;
+
+ TShHandleBase* base = static_cast<TShHandleBase*>(ConstructCompiler(language, debugOptions));
+
+ return reinterpret_cast<void*>(base);
+}
+
+ShHandle ShConstructLinker(const EShExecutable executable, int debugOptions)
+{
+ if (!InitThread())
+ return 0;
+
+ TShHandleBase* base = static_cast<TShHandleBase*>(ConstructLinker(executable, debugOptions));
+
+ return reinterpret_cast<void*>(base);
+}
+
+ShHandle ShConstructUniformMap()
+{
+ if (!InitThread())
+ return 0;
+
+ TShHandleBase* base = static_cast<TShHandleBase*>(ConstructUniformMap());
+
+ return reinterpret_cast<void*>(base);
+}
+
+void ShDestruct(ShHandle handle)
+{
+ if (handle == 0)
+ return;
+
+ TShHandleBase* base = static_cast<TShHandleBase*>(handle);
+
+ if (base->getAsCompiler())
+ DeleteCompiler(base->getAsCompiler());
+ else if (base->getAsLinker())
+ DeleteLinker(base->getAsLinker());
+ else if (base->getAsUniformMap())
+ DeleteUniformMap(base->getAsUniformMap());
+}
+
+//
+// Cleanup symbol tables
+//
+int __fastcall ShFinalize()
+{
+ for (int version = 0; version < VersionCount; ++version) {
+ for (int p = 0; p < ProfileCount; ++p) {
+ for (int lang = 0; lang < EShLangCount; ++lang) {
+ delete SharedSymbolTables[version][p][lang];
+ SharedSymbolTables[version][p][lang] = 0;
+ }
+ }
+ }
+
+ for (int version = 0; version < VersionCount; ++version) {
+ for (int p = 0; p < ProfileCount; ++p) {
+ for (int pc = 0; pc < EPcCount; ++pc) {
+ delete CommonSymbolTable[version][p][pc];
+ CommonSymbolTable[version][p][pc] = 0;
+ }
+ }
+ }
+
+ if (PerProcessGPA) {
+ PerProcessGPA->popAll();
+ delete PerProcessGPA;
+ PerProcessGPA = 0;
+ }
+
+ glslang::TScanContext::deleteKeywordMap();
+
+ return 1;
+}
+
+//
+// Do a full compile on the given strings for a single compilation unit
+// forming a complete stage. The result of the machine dependent compilation
+// is left in the provided compile object.
+//
+// Return: The return value is really boolean, indicating
+// success (1) or failure (0).
+//
+int ShCompile(
+ const ShHandle handle,
+ const char* const shaderStrings[],
+ const int numStrings,
+ const int* inputLengths,
+ const EShOptimizationLevel optLevel,
+ const TBuiltInResource* resources,
+ int /*debugOptions*/,
+ int defaultVersion, // use 100 for ES environment, 110 for desktop
+ bool forwardCompatible, // give errors for use of deprecated features
+ EShMessages messages // warnings/errors/AST; things to print out
+ )
+{
+ // Map the generic handle to the C++ object
+ if (handle == 0)
+ return 0;
+
+ TShHandleBase* base = reinterpret_cast<TShHandleBase*>(handle);
+ TCompiler* compiler = base->getAsCompiler();
+ if (compiler == 0)
+ return 0;
+
+ compiler->infoSink.info.erase();
+ compiler->infoSink.debug.erase();
+
+ TIntermediate intermediate(compiler->getLanguage());
+ TShader::ForbidInclude includer;
+ bool success = CompileDeferred(compiler, shaderStrings, numStrings, inputLengths, nullptr,
+ "", optLevel, resources, defaultVersion, ENoProfile, false,
+ forwardCompatible, messages, intermediate, includer);
+
+ //
+ // Call the machine dependent compiler
+ //
+ if (success && intermediate.getTreeRoot() && optLevel != EShOptNoGeneration)
+ success = compiler->compile(intermediate.getTreeRoot(), intermediate.getVersion(), intermediate.getProfile());
+
+ intermediate.removeTree();
+
+ // Throw away all the temporary memory used by the compilation process.
+ // The push was done in the CompileDeferred() call above.
+ GetThreadPoolAllocator().pop();
+
+ return success ? 1 : 0;
+}
+
+//
+// Link the given compile objects.
+//
+// Return: The return value of is really boolean, indicating
+// success or failure.
+//
+int ShLinkExt(
+ const ShHandle linkHandle,
+ const ShHandle compHandles[],
+ const int numHandles)
+{
+ if (linkHandle == 0 || numHandles == 0)
+ return 0;
+
+ THandleList cObjects;
+
+ for (int i = 0; i < numHandles; ++i) {
+ if (compHandles[i] == 0)
+ return 0;
+ TShHandleBase* base = reinterpret_cast<TShHandleBase*>(compHandles[i]);
+ if (base->getAsLinker()) {
+ cObjects.push_back(base->getAsLinker());
+ }
+ if (base->getAsCompiler())
+ cObjects.push_back(base->getAsCompiler());
+
+
+ if (cObjects[i] == 0)
+ return 0;
+ }
+
+ TShHandleBase* base = reinterpret_cast<TShHandleBase*>(linkHandle);
+ TLinker* linker = static_cast<TLinker*>(base->getAsLinker());
+
+ if (linker == 0)
+ return 0;
+
+ linker->infoSink.info.erase();
+
+ for (int i = 0; i < numHandles; ++i) {
+ if (cObjects[i]->getAsCompiler()) {
+ if (! cObjects[i]->getAsCompiler()->linkable()) {
+ linker->infoSink.info.message(EPrefixError, "Not all shaders have valid object code.");
+ return 0;
+ }
+ }
+ }
+
+ bool ret = linker->link(cObjects);
+
+ return ret ? 1 : 0;
+}
+
+//
+// ShSetEncrpytionMethod is a place-holder for specifying
+// how source code is encrypted.
+//
+void ShSetEncryptionMethod(ShHandle handle)
+{
+ if (handle == 0)
+ return;
+}
+
+//
+// Return any compiler/linker/uniformmap log of messages for the application.
+//
+const char* ShGetInfoLog(const ShHandle handle)
+{
+ if (!InitThread())
+ return 0;
+
+ if (handle == 0)
+ return 0;
+
+ TShHandleBase* base = static_cast<TShHandleBase*>(handle);
+ TInfoSink* infoSink;
+
+ if (base->getAsCompiler())
+ infoSink = &(base->getAsCompiler()->getInfoSink());
+ else if (base->getAsLinker())
+ infoSink = &(base->getAsLinker()->getInfoSink());
+ else
+ return 0;
+
+ infoSink->info << infoSink->debug.c_str();
+ return infoSink->info.c_str();
+}
+
+//
+// Return the resulting binary code from the link process. Structure
+// is machine dependent.
+//
+const void* ShGetExecutable(const ShHandle handle)
+{
+ if (!InitThread())
+ return 0;
+
+ if (handle == 0)
+ return 0;
+
+ TShHandleBase* base = reinterpret_cast<TShHandleBase*>(handle);
+
+ TLinker* linker = static_cast<TLinker*>(base->getAsLinker());
+ if (linker == 0)
+ return 0;
+
+ return linker->getObjectCode();
+}
+
+//
+// Let the linker know where the application said it's attributes are bound.
+// The linker does not use these values, they are remapped by the ICD or
+// hardware. It just needs them to know what's aliased.
+//
+// Return: The return value of is really boolean, indicating
+// success or failure.
+//
+int ShSetVirtualAttributeBindings(const ShHandle handle, const ShBindingTable* table)
+{
+ if (!InitThread())
+ return 0;
+
+ if (handle == 0)
+ return 0;
+
+ TShHandleBase* base = reinterpret_cast<TShHandleBase*>(handle);
+ TLinker* linker = static_cast<TLinker*>(base->getAsLinker());
+
+ if (linker == 0)
+ return 0;
+
+ linker->setAppAttributeBindings(table);
+
+ return 1;
+}
+
+//
+// Let the linker know where the predefined attributes have to live.
+//
+int ShSetFixedAttributeBindings(const ShHandle handle, const ShBindingTable* table)
+{
+ if (!InitThread())
+ return 0;
+
+ if (handle == 0)
+ return 0;
+
+ TShHandleBase* base = reinterpret_cast<TShHandleBase*>(handle);
+ TLinker* linker = static_cast<TLinker*>(base->getAsLinker());
+
+ if (linker == 0)
+ return 0;
+
+ linker->setFixedAttributeBindings(table);
+ return 1;
+}
+
+//
+// Some attribute locations are off-limits to the linker...
+//
+int ShExcludeAttributes(const ShHandle handle, int *attributes, int count)
+{
+ if (!InitThread())
+ return 0;
+
+ if (handle == 0)
+ return 0;
+
+ TShHandleBase* base = reinterpret_cast<TShHandleBase*>(handle);
+ TLinker* linker = static_cast<TLinker*>(base->getAsLinker());
+ if (linker == 0)
+ return 0;
+
+ linker->setExcludedAttributes(attributes, count);
+
+ return 1;
+}
+
+//
+// Return the index for OpenGL to use for knowing where a uniform lives.
+//
+// Return: The return value of is really boolean, indicating
+// success or failure.
+//
+int ShGetUniformLocation(const ShHandle handle, const char* name)
+{
+ if (!InitThread())
+ return 0;
+
+ if (handle == 0)
+ return -1;
+
+ TShHandleBase* base = reinterpret_cast<TShHandleBase*>(handle);
+ TUniformMap* uniformMap= base->getAsUniformMap();
+ if (uniformMap == 0)
+ return -1;
+
+ return uniformMap->getLocation(name);
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////
+//
+// Deferred-Lowering C++ Interface
+// -----------------------------------
+//
+// Below is a new alternate C++ interface that might potentially replace the above
+// opaque handle-based interface.
+//
+// See more detailed comment in ShaderLang.h
+//
+
+namespace glslang {
+
+#include "../Include/revision.h"
+
+const char* GetEsslVersionString()
+{
+ return "OpenGL ES GLSL 3.00 glslang LunarG Khronos." GLSLANG_REVISION " " GLSLANG_DATE;
+}
+
+const char* GetGlslVersionString()
+{
+ return "4.20 glslang LunarG Khronos." GLSLANG_REVISION " " GLSLANG_DATE;
+}
+
+int GetKhronosToolId()
+{
+ return 8;
+}
+
+bool InitializeProcess()
+{
+ return ShInitialize() != 0;
+}
+
+void FinalizeProcess()
+{
+ ShFinalize();
+}
+
+class TDeferredCompiler : public TCompiler {
+public:
+ TDeferredCompiler(EShLanguage s, TInfoSink& i) : TCompiler(s, i) { }
+ virtual bool compile(TIntermNode*, int = 0, EProfile = ENoProfile) { return true; }
+};
+
+TShader::TShader(EShLanguage s)
+ : pool(0), stage(s), lengths(nullptr), stringNames(nullptr), preamble("")
+{
+ infoSink = new TInfoSink;
+ compiler = new TDeferredCompiler(stage, *infoSink);
+ intermediate = new TIntermediate(s);
+}
+
+TShader::~TShader()
+{
+ delete infoSink;
+ delete compiler;
+ delete intermediate;
+ delete pool;
+}
+
+void TShader::setStrings(const char* const* s, int n)
+{
+ strings = s;
+ numStrings = n;
+ lengths = nullptr;
+}
+
+void TShader::setStringsWithLengths(const char* const* s, const int* l, int n)
+{
+ strings = s;
+ numStrings = n;
+ lengths = l;
+}
+
+void TShader::setStringsWithLengthsAndNames(
+ const char* const* s, const int* l, const char* const* names, int n)
+{
+ strings = s;
+ numStrings = n;
+ lengths = l;
+ stringNames = names;
+}
+
+void TShader::setEntryPoint(const char* entryPoint)
+{
+ intermediate->setEntryPoint(entryPoint);
+}
+
+//
+// Turn the shader strings into a parse tree in the TIntermediate.
+//
+// Returns true for success.
+//
+bool TShader::parse(const TBuiltInResource* builtInResources, int defaultVersion, EProfile defaultProfile, bool forceDefaultVersionAndProfile,
+ bool forwardCompatible, EShMessages messages, Includer& includer)
+{
+ if (! InitThread())
+ return false;
+
+ pool = new TPoolAllocator();
+ SetThreadPoolAllocator(*pool);
+ if (! preamble)
+ preamble = "";
+
+ return CompileDeferred(compiler, strings, numStrings, lengths, stringNames,
+ preamble, EShOptNone, builtInResources, defaultVersion,
+ defaultProfile, forceDefaultVersionAndProfile,
+ forwardCompatible, messages, *intermediate, includer);
+}
+
+bool TShader::parse(const TBuiltInResource* builtInResources, int defaultVersion, bool forwardCompatible, EShMessages messages)
+{
+ return parse(builtInResources, defaultVersion, ENoProfile, false, forwardCompatible, messages);
+}
+
+// Fill in a string with the result of preprocessing ShaderStrings
+// Returns true if all extensions, pragmas and version strings were valid.
+bool TShader::preprocess(const TBuiltInResource* builtInResources,
+ int defaultVersion, EProfile defaultProfile,
+ bool forceDefaultVersionAndProfile,
+ bool forwardCompatible, EShMessages message,
+ std::string* output_string,
+ Includer& includer)
+{
+ if (! InitThread())
+ return false;
+
+ pool = new TPoolAllocator();
+ SetThreadPoolAllocator(*pool);
+ if (! preamble)
+ preamble = "";
+
+ return PreprocessDeferred(compiler, strings, numStrings, lengths, stringNames, preamble,
+ EShOptNone, builtInResources, defaultVersion,
+ defaultProfile, forceDefaultVersionAndProfile,
+ forwardCompatible, message, includer, *intermediate, output_string);
+}
+
+const char* TShader::getInfoLog()
+{
+ return infoSink->info.c_str();
+}
+
+const char* TShader::getInfoDebugLog()
+{
+ return infoSink->debug.c_str();
+}
+
+TProgram::TProgram() : pool(0), reflection(0), linked(false)
+{
+ infoSink = new TInfoSink;
+ for (int s = 0; s < EShLangCount; ++s) {
+ intermediate[s] = 0;
+ newedIntermediate[s] = false;
+ }
+}
+
+TProgram::~TProgram()
+{
+ delete infoSink;
+ delete reflection;
+
+ for (int s = 0; s < EShLangCount; ++s)
+ if (newedIntermediate[s])
+ delete intermediate[s];
+
+ delete pool;
+}
+
+//
+// Merge the compilation units within each stage into a single TIntermediate.
+// All starting compilation units need to be the result of calling TShader::parse().
+//
+// Return true for success.
+//
+bool TProgram::link(EShMessages messages)
+{
+ if (linked)
+ return false;
+ linked = true;
+
+ bool error = false;
+
+ pool = new TPoolAllocator();
+ SetThreadPoolAllocator(*pool);
+
+ for (int s = 0; s < EShLangCount; ++s) {
+ if (! linkStage((EShLanguage)s, messages))
+ error = true;
+ }
+
+ // TODO: Link: cross-stage error checking
+
+ return ! error;
+}
+
+//
+// Merge the compilation units within the given stage into a single TIntermediate.
+//
+// Return true for success.
+//
+bool TProgram::linkStage(EShLanguage stage, EShMessages messages)
+{
+ if (stages[stage].size() == 0)
+ return true;
+
+ int numEsShaders = 0, numNonEsShaders = 0;
+ for (auto it = stages[stage].begin(); it != stages[stage].end(); ++it) {
+ if ((*it)->intermediate->getProfile() == EEsProfile) {
+ numEsShaders++;
+ } else {
+ numNonEsShaders++;
+ }
+ }
+
+ if (numEsShaders > 0 && numNonEsShaders > 0) {
+ infoSink->info.message(EPrefixError, "Cannot mix ES profile with non-ES profile shaders");
+ return false;
+ } else if (numEsShaders > 1) {
+ infoSink->info.message(EPrefixError, "Cannot attach multiple ES shaders of the same type to a single program");
+ return false;
+ }
+
+ //
+ // Be efficient for the common single compilation unit per stage case,
+ // reusing it's TIntermediate instead of merging into a new one.
+ //
+ TIntermediate *firstIntermediate = stages[stage].front()->intermediate;
+ if (stages[stage].size() == 1)
+ intermediate[stage] = firstIntermediate;
+ else {
+ intermediate[stage] = new TIntermediate(stage,
+ firstIntermediate->getVersion(),
+ firstIntermediate->getProfile());
+ newedIntermediate[stage] = true;
+ }
+
+ infoSink->info << "\nLinked " << StageName(stage) << " stage:\n\n";
+
+ if (stages[stage].size() > 1) {
+ std::list<TShader*>::const_iterator it;
+ for (it = stages[stage].begin(); it != stages[stage].end(); ++it)
+ intermediate[stage]->merge(*infoSink, *(*it)->intermediate);
+ }
+
+ intermediate[stage]->finalCheck(*infoSink);
+
+ if (messages & EShMsgAST)
+ intermediate[stage]->output(*infoSink, true);
+
+ return intermediate[stage]->getNumErrors() == 0;
+}
+
+const char* TProgram::getInfoLog()
+{
+ return infoSink->info.c_str();
+}
+
+const char* TProgram::getInfoDebugLog()
+{
+ return infoSink->debug.c_str();
+}
+
+//
+// Reflection implementation.
+//
+
+bool TProgram::buildReflection()
+{
+ if (! linked || reflection)
+ return false;
+
+ reflection = new TReflection;
+
+ for (int s = 0; s < EShLangCount; ++s) {
+ if (intermediate[s]) {
+ if (! reflection->addStage((EShLanguage)s, *intermediate[s]))
+ return false;
+ }
+ }
+
+ return true;
+}
+
+int TProgram::getNumLiveUniformVariables() { return reflection->getNumUniforms(); }
+int TProgram::getNumLiveUniformBlocks() { return reflection->getNumUniformBlocks(); }
+const char* TProgram::getUniformName(int index) { return reflection->getUniform(index).name.c_str(); }
+const char* TProgram::getUniformBlockName(int index) { return reflection->getUniformBlock(index).name.c_str(); }
+int TProgram::getUniformBlockSize(int index) { return reflection->getUniformBlock(index).size; }
+int TProgram::getUniformIndex(const char* name) { return reflection->getIndex(name); }
+int TProgram::getUniformBlockIndex(int index) { return reflection->getUniform(index).index; }
+int TProgram::getUniformType(int index) { return reflection->getUniform(index).glDefineType; }
+int TProgram::getUniformBufferOffset(int index) { return reflection->getUniform(index).offset; }
+int TProgram::getUniformArraySize(int index) { return reflection->getUniform(index).size; }
+int TProgram::getNumLiveAttributes() { return reflection->getNumAttributes(); }
+const char* TProgram::getAttributeName(int index) { return reflection->getAttribute(index).name.c_str(); }
+int TProgram::getAttributeType(int index) { return reflection->getAttribute(index).glDefineType; }
+
+void TProgram::dumpReflection() { reflection->dump(); }
+
+} // end namespace glslang
diff --git a/chromium/third_party/glslang/src/glslang/MachineIndependent/SymbolTable.cpp b/chromium/third_party/glslang/src/glslang/MachineIndependent/SymbolTable.cpp
new file mode 100644
index 00000000000..bf0f1f9fa74
--- /dev/null
+++ b/chromium/third_party/glslang/src/glslang/MachineIndependent/SymbolTable.cpp
@@ -0,0 +1,351 @@
+//
+//Copyright (C) 2002-2005 3Dlabs Inc. Ltd.
+//Copyright (C) 2012-2013 LunarG, 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:
+//
+// Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 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.
+//
+// Neither the name of 3Dlabs Inc. Ltd. nor the names of its
+// contributors may be used to endorse or promote products derived
+// from this software without specific prior written permission.
+//
+//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+//"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 THE
+//COPYRIGHT HOLDERS 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.
+//
+
+//
+// Symbol table for parsing. Most functionaliy and main ideas
+// are documented in the header file.
+//
+
+#include "SymbolTable.h"
+
+namespace glslang {
+
+//
+// TType helper function needs a place to live.
+//
+
+//
+// Recursively generate mangled names.
+//
+void TType::buildMangledName(TString& mangledName)
+{
+ if (isMatrix())
+ mangledName += 'm';
+ else if (isVector())
+ mangledName += 'v';
+
+ switch (basicType) {
+ case EbtFloat: mangledName += 'f'; break;
+ case EbtDouble: mangledName += 'd'; break;
+ case EbtInt: mangledName += 'i'; break;
+ case EbtUint: mangledName += 'u'; break;
+ case EbtInt64: mangledName += "i64"; break;
+ case EbtUint64: mangledName += "u64"; break;
+ case EbtBool: mangledName += 'b'; break;
+ case EbtAtomicUint: mangledName += "au"; break;
+ case EbtSampler:
+ switch (sampler.type) {
+ case EbtInt: mangledName += "i"; break;
+ case EbtUint: mangledName += "u"; break;
+ default: break; // some compilers want this
+ }
+ if (sampler.image)
+ mangledName += "I"; // a normal image
+ else if (sampler.sampler)
+ mangledName += "p"; // a "pure" sampler
+ else if (!sampler.combined)
+ mangledName += "t"; // a "pure" texture
+ else
+ mangledName += "s"; // traditional combined sampler
+ if (sampler.arrayed)
+ mangledName += "A";
+ if (sampler.shadow)
+ mangledName += "S";
+ if (sampler.external)
+ mangledName += "E";
+ switch (sampler.dim) {
+ case Esd1D: mangledName += "1"; break;
+ case Esd2D: mangledName += "2"; break;
+ case Esd3D: mangledName += "3"; break;
+ case EsdCube: mangledName += "C"; break;
+ case EsdRect: mangledName += "R2"; break;
+ case EsdBuffer: mangledName += "B"; break;
+ case EsdSubpass: mangledName += "P"; break;
+ default: break; // some compilers want this
+ }
+ if (sampler.ms)
+ mangledName += "M";
+ break;
+ case EbtStruct:
+ mangledName += "struct-";
+ if (typeName)
+ mangledName += *typeName;
+ for (unsigned int i = 0; i < structure->size(); ++i) {
+ mangledName += '-';
+ (*structure)[i].type->buildMangledName(mangledName);
+ }
+ default:
+ break;
+ }
+
+ if (getVectorSize() > 0)
+ mangledName += static_cast<char>('0' + getVectorSize());
+ else {
+ mangledName += static_cast<char>('0' + getMatrixCols());
+ mangledName += static_cast<char>('0' + getMatrixRows());
+ }
+
+ if (arraySizes) {
+ const int maxSize = 11;
+ char buf[maxSize];
+ for (int i = 0; i < arraySizes->getNumDims(); ++i) {
+ if (arraySizes->getDimNode(i)) {
+ if (arraySizes->getDimNode(i)->getAsSymbolNode())
+ snprintf(buf, maxSize, "s%d", arraySizes->getDimNode(i)->getAsSymbolNode()->getId());
+ else
+ snprintf(buf, maxSize, "s%p", arraySizes->getDimNode(i));
+ } else
+ snprintf(buf, maxSize, "%d", arraySizes->getDimSize(i));
+ mangledName += '[';
+ mangledName += buf;
+ mangledName += ']';
+ }
+ }
+}
+
+//
+// Dump functions.
+//
+
+void TVariable::dump(TInfoSink& infoSink) const
+{
+ infoSink.debug << getName().c_str() << ": " << type.getStorageQualifierString() << " " << type.getBasicTypeString();
+ if (type.isArray()) {
+ infoSink.debug << "[0]";
+ }
+ infoSink.debug << "\n";
+}
+
+void TFunction::dump(TInfoSink& infoSink) const
+{
+ infoSink.debug << getName().c_str() << ": " << returnType.getBasicTypeString() << " " << getMangledName().c_str() << "\n";
+}
+
+void TAnonMember::dump(TInfoSink& TInfoSink) const
+{
+ TInfoSink.debug << "anonymous member " << getMemberNumber() << " of " << getAnonContainer().getName().c_str() << "\n";
+}
+
+void TSymbolTableLevel::dump(TInfoSink &infoSink) const
+{
+ tLevel::const_iterator it;
+ for (it = level.begin(); it != level.end(); ++it)
+ (*it).second->dump(infoSink);
+}
+
+void TSymbolTable::dump(TInfoSink &infoSink) const
+{
+ for (int level = currentLevel(); level >= 0; --level) {
+ infoSink.debug << "LEVEL " << level << "\n";
+ table[level]->dump(infoSink);
+ }
+}
+
+//
+// Functions have buried pointers to delete.
+//
+TFunction::~TFunction()
+{
+ for (TParamList::iterator i = parameters.begin(); i != parameters.end(); ++i)
+ delete (*i).type;
+}
+
+//
+// Symbol table levels are a map of pointers to symbols that have to be deleted.
+//
+TSymbolTableLevel::~TSymbolTableLevel()
+{
+ for (tLevel::iterator it = level.begin(); it != level.end(); ++it)
+ delete (*it).second;
+
+ delete [] defaultPrecision;
+}
+
+//
+// Change all function entries in the table with the non-mangled name
+// to be related to the provided built-in operation.
+//
+void TSymbolTableLevel::relateToOperator(const char* name, TOperator op)
+{
+ tLevel::const_iterator candidate = level.lower_bound(name);
+ while (candidate != level.end()) {
+ const TString& candidateName = (*candidate).first;
+ TString::size_type parenAt = candidateName.find_first_of('(');
+ if (parenAt != candidateName.npos && candidateName.compare(0, parenAt, name) == 0) {
+ TFunction* function = (*candidate).second->getAsFunction();
+ function->relateToOperator(op);
+ } else
+ break;
+ ++candidate;
+ }
+}
+
+// Make all function overloads of the given name require an extension(s).
+// Should only be used for a version/profile that actually needs the extension(s).
+void TSymbolTableLevel::setFunctionExtensions(const char* name, int num, const char* const extensions[])
+{
+ tLevel::const_iterator candidate = level.lower_bound(name);
+ while (candidate != level.end()) {
+ const TString& candidateName = (*candidate).first;
+ TString::size_type parenAt = candidateName.find_first_of('(');
+ if (parenAt != candidateName.npos && candidateName.compare(0, parenAt, name) == 0) {
+ TSymbol* symbol = candidate->second;
+ symbol->setExtensions(num, extensions);
+ } else
+ break;
+ ++candidate;
+ }
+}
+
+//
+// Make all symbols in this table level read only.
+//
+void TSymbolTableLevel::readOnly()
+{
+ for (tLevel::iterator it = level.begin(); it != level.end(); ++it)
+ (*it).second->makeReadOnly();
+}
+
+//
+// Copy a symbol, but the copy is writable; call readOnly() afterward if that's not desired.
+//
+TSymbol::TSymbol(const TSymbol& copyOf)
+{
+ name = NewPoolTString(copyOf.name->c_str());
+ uniqueId = copyOf.uniqueId;
+ writable = true;
+}
+
+TVariable::TVariable(const TVariable& copyOf) : TSymbol(copyOf)
+{
+ type.deepCopy(copyOf.type);
+ userType = copyOf.userType;
+ numExtensions = 0;
+ extensions = 0;
+ if (copyOf.numExtensions != 0)
+ setExtensions(copyOf.numExtensions, copyOf.extensions);
+
+ if (! copyOf.constArray.empty()) {
+ assert(! copyOf.type.isStruct());
+ TConstUnionArray newArray(copyOf.constArray, 0, copyOf.constArray.size());
+ constArray = newArray;
+ }
+
+ // don't support specialization-constant subtrees in cloned tables
+ constSubtree = nullptr;
+}
+
+TVariable* TVariable::clone() const
+{
+ TVariable *variable = new TVariable(*this);
+
+ return variable;
+}
+
+TFunction::TFunction(const TFunction& copyOf) : TSymbol(copyOf)
+{
+ for (unsigned int i = 0; i < copyOf.parameters.size(); ++i) {
+ TParameter param;
+ parameters.push_back(param);
+ parameters.back().copyParam(copyOf.parameters[i]);
+ }
+
+ numExtensions = 0;
+ extensions = 0;
+ if (copyOf.extensions != 0)
+ setExtensions(copyOf.numExtensions, copyOf.extensions);
+ returnType.deepCopy(copyOf.returnType);
+ mangledName = copyOf.mangledName;
+ op = copyOf.op;
+ defined = copyOf.defined;
+ prototyped = copyOf.prototyped;
+}
+
+TFunction* TFunction::clone() const
+{
+ TFunction *function = new TFunction(*this);
+
+ return function;
+}
+
+TAnonMember* TAnonMember::clone() const
+{
+ // Anonymous members of a given block should be cloned at a higher level,
+ // where they can all be assured to still end up pointing to a single
+ // copy of the original container.
+ assert(0);
+
+ return 0;
+}
+
+TSymbolTableLevel* TSymbolTableLevel::clone() const
+{
+ TSymbolTableLevel *symTableLevel = new TSymbolTableLevel();
+ symTableLevel->anonId = anonId;
+ std::vector<bool> containerCopied(anonId, false);
+ tLevel::const_iterator iter;
+ for (iter = level.begin(); iter != level.end(); ++iter) {
+ const TAnonMember* anon = iter->second->getAsAnonMember();
+ if (anon) {
+ // Insert all the anonymous members of this same container at once,
+ // avoid inserting the other members in the future, once this has been done,
+ // allowing them to all be part of the same new container.
+ if (! containerCopied[anon->getAnonId()]) {
+ TVariable* container = anon->getAnonContainer().clone();
+ container->changeName(NewPoolTString(""));
+ // insert the whole container
+ symTableLevel->insert(*container, false);
+ containerCopied[anon->getAnonId()] = true;
+ }
+ } else
+ symTableLevel->insert(*iter->second->clone(), false);
+ }
+
+ return symTableLevel;
+}
+
+void TSymbolTable::copyTable(const TSymbolTable& copyOf)
+{
+ assert(adoptedLevels == copyOf.adoptedLevels);
+
+ uniqueId = copyOf.uniqueId;
+ noBuiltInRedeclarations = copyOf.noBuiltInRedeclarations;
+ separateNameSpaces = copyOf.separateNameSpaces;
+ for (unsigned int i = copyOf.adoptedLevels; i < copyOf.table.size(); ++i)
+ table.push_back(copyOf.table[i]->clone());
+}
+
+} // end namespace glslang
diff --git a/chromium/third_party/glslang/src/glslang/MachineIndependent/SymbolTable.h b/chromium/third_party/glslang/src/glslang/MachineIndependent/SymbolTable.h
new file mode 100644
index 00000000000..9877ab7fae5
--- /dev/null
+++ b/chromium/third_party/glslang/src/glslang/MachineIndependent/SymbolTable.h
@@ -0,0 +1,694 @@
+//
+//Copyright (C) 2002-2005 3Dlabs Inc. Ltd.
+//Copyright (C) 2013 LunarG, 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:
+//
+// Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 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.
+//
+// Neither the name of 3Dlabs Inc. Ltd. nor the names of its
+// contributors may be used to endorse or promote products derived
+// from this software without specific prior written permission.
+//
+//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+//"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 THE
+//COPYRIGHT HOLDERS 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.
+//
+
+#ifndef _SYMBOL_TABLE_INCLUDED_
+#define _SYMBOL_TABLE_INCLUDED_
+
+//
+// Symbol table for parsing. Has these design characteristics:
+//
+// * Same symbol table can be used to compile many shaders, to preserve
+// effort of creating and loading with the large numbers of built-in
+// symbols.
+//
+// --> This requires a copy mechanism, so initial pools used to create
+// the shared information can be popped. Done through "clone"
+// methods.
+//
+// * Name mangling will be used to give each function a unique name
+// so that symbol table lookups are never ambiguous. This allows
+// a simpler symbol table structure.
+//
+// * Pushing and popping of scope, so symbol table will really be a stack
+// of symbol tables. Searched from the top, with new inserts going into
+// the top.
+//
+// * Constants: Compile time constant symbols will keep their values
+// in the symbol table. The parser can substitute constants at parse
+// time, including doing constant folding and constant propagation.
+//
+// * No temporaries: Temporaries made from operations (+, --, .xy, etc.)
+// are tracked in the intermediate representation, not the symbol table.
+//
+
+#include "../Include/Common.h"
+#include "../Include/intermediate.h"
+#include "../Include/InfoSink.h"
+
+namespace glslang {
+
+//
+// Symbol base class. (Can build functions or variables out of these...)
+//
+
+class TVariable;
+class TFunction;
+class TAnonMember;
+
+class TSymbol {
+public:
+ POOL_ALLOCATOR_NEW_DELETE(GetThreadPoolAllocator())
+ explicit TSymbol(const TString *n) : name(n), numExtensions(0), extensions(0), writable(true) { }
+ virtual TSymbol* clone() const = 0;
+ virtual ~TSymbol() { } // rely on all symbol owned memory coming from the pool
+
+ virtual const TString& getName() const { return *name; }
+ virtual void changeName(const TString* newName) { name = newName; }
+ virtual const TString& getMangledName() const { return getName(); }
+ virtual TFunction* getAsFunction() { return 0; }
+ virtual const TFunction* getAsFunction() const { return 0; }
+ virtual TVariable* getAsVariable() { return 0; }
+ virtual const TVariable* getAsVariable() const { return 0; }
+ virtual const TAnonMember* getAsAnonMember() const { return 0; }
+ virtual const TType& getType() const = 0;
+ virtual TType& getWritableType() = 0;
+ virtual void setUniqueId(int id) { uniqueId = id; }
+ virtual int getUniqueId() const { return uniqueId; }
+ virtual void setExtensions(int num, const char* const exts[])
+ {
+ assert(extensions == 0);
+ assert(num > 0);
+ numExtensions = num;
+ extensions = NewPoolObject(exts[0], num);
+ for (int e = 0; e < num; ++e)
+ extensions[e] = exts[e];
+ }
+ virtual int getNumExtensions() const { return numExtensions; }
+ virtual const char** getExtensions() const { return extensions; }
+ virtual void dump(TInfoSink &infoSink) const = 0;
+
+ virtual bool isReadOnly() const { return ! writable; }
+ virtual void makeReadOnly() { writable = false; }
+
+protected:
+ explicit TSymbol(const TSymbol&);
+ TSymbol& operator=(const TSymbol&);
+
+ const TString *name;
+ unsigned int uniqueId; // For cross-scope comparing during code generation
+
+ // For tracking what extensions must be present
+ // (don't use if correct version/profile is present).
+ int numExtensions;
+ const char** extensions; // an array of pointers to existing constant char strings
+
+ //
+ // N.B.: Non-const functions that will be generally used should assert on this,
+ // to avoid overwriting shared symbol-table information.
+ //
+ bool writable;
+};
+
+//
+// Variable class, meaning a symbol that's not a function.
+//
+// There could be a separate class hierarchy for Constant variables;
+// Only one of int, bool, or float, (or none) is correct for
+// any particular use, but it's easy to do this way, and doesn't
+// seem worth having separate classes, and "getConst" can't simply return
+// different values for different types polymorphically, so this is
+// just simple and pragmatic.
+//
+class TVariable : public TSymbol {
+public:
+ TVariable(const TString *name, const TType& t, bool uT = false )
+ : TSymbol(name),
+ userType(uT),
+ constSubtree(nullptr) { type.shallowCopy(t); }
+ virtual TVariable* clone() const;
+ virtual ~TVariable() { }
+
+ virtual TVariable* getAsVariable() { return this; }
+ virtual const TVariable* getAsVariable() const { return this; }
+ virtual const TType& getType() const { return type; }
+ virtual TType& getWritableType() { assert(writable); return type; }
+ virtual bool isUserType() const { return userType; }
+ virtual const TConstUnionArray& getConstArray() const { return constArray; }
+ virtual TConstUnionArray& getWritableConstArray() { assert(writable); return constArray; }
+ virtual void setConstArray(const TConstUnionArray& array) { constArray = array; }
+ virtual void setConstSubtree(TIntermTyped* subtree) { constSubtree = subtree; }
+ virtual TIntermTyped* getConstSubtree() const { return constSubtree; }
+
+ virtual void dump(TInfoSink &infoSink) const;
+
+protected:
+ explicit TVariable(const TVariable&);
+ TVariable& operator=(const TVariable&);
+
+ TType type;
+ bool userType;
+ // we are assuming that Pool Allocator will free the memory allocated to unionArray
+ // when this object is destroyed
+
+ // TODO: these two should be a union
+ // A variable could be a compile-time constant, or a specialization
+ // constant, or neither, but never both.
+ TConstUnionArray constArray; // for compile-time constant value
+ TIntermTyped* constSubtree; // for specialization constant computation
+};
+
+//
+// The function sub-class of symbols and the parser will need to
+// share this definition of a function parameter.
+//
+struct TParameter {
+ TString *name;
+ TType* type;
+ void copyParam(const TParameter& param)
+ {
+ if (param.name)
+ name = NewPoolTString(param.name->c_str());
+ else
+ name = 0;
+ type = param.type->clone();
+ }
+};
+
+//
+// The function sub-class of a symbol.
+//
+class TFunction : public TSymbol {
+public:
+ explicit TFunction(TOperator o) :
+ TSymbol(0),
+ op(o),
+ defined(false), prototyped(false) { }
+ TFunction(const TString *name, const TType& retType, TOperator tOp = EOpNull) :
+ TSymbol(name),
+ mangledName(*name + '('),
+ op(tOp),
+ defined(false), prototyped(false) { returnType.shallowCopy(retType); }
+ virtual TFunction* clone() const;
+ virtual ~TFunction();
+
+ virtual TFunction* getAsFunction() { return this; }
+ virtual const TFunction* getAsFunction() const { return this; }
+
+ virtual void addParameter(TParameter& p)
+ {
+ assert(writable);
+ parameters.push_back(p);
+ p.type->appendMangledName(mangledName);
+ }
+
+ virtual const TString& getMangledName() const { return mangledName; }
+ virtual const TType& getType() const { return returnType; }
+ virtual TType& getWritableType() { return returnType; }
+ virtual void relateToOperator(TOperator o) { assert(writable); op = o; }
+ virtual TOperator getBuiltInOp() const { return op; }
+ virtual void setDefined() { assert(writable); defined = true; }
+ virtual bool isDefined() const { return defined; }
+ virtual void setPrototyped() { assert(writable); prototyped = true; }
+ virtual bool isPrototyped() const { return prototyped; }
+
+ virtual int getParamCount() const { return static_cast<int>(parameters.size()); }
+ virtual TParameter& operator[](int i) { assert(writable); return parameters[i]; }
+ virtual const TParameter& operator[](int i) const { return parameters[i]; }
+
+ virtual void dump(TInfoSink &infoSink) const;
+
+protected:
+ explicit TFunction(const TFunction&);
+ TFunction& operator=(const TFunction&);
+
+ typedef TVector<TParameter> TParamList;
+ TParamList parameters;
+ TType returnType;
+ TString mangledName;
+ TOperator op;
+ bool defined;
+ bool prototyped;
+};
+
+//
+// Members of anonymous blocks are a kind of TSymbol. They are not hidden in
+// the symbol table behind a container; rather they are visible and point to
+// their anonymous container. (The anonymous container is found through the
+// member, not the other way around.)
+//
+class TAnonMember : public TSymbol {
+public:
+ TAnonMember(const TString* n, unsigned int m, const TVariable& a, int an) : TSymbol(n), anonContainer(a), memberNumber(m), anonId(an) { }
+ virtual TAnonMember* clone() const;
+ virtual ~TAnonMember() { }
+
+ virtual const TAnonMember* getAsAnonMember() const { return this; }
+ virtual const TVariable& getAnonContainer() const { return anonContainer; }
+ virtual unsigned int getMemberNumber() const { return memberNumber; }
+
+ virtual const TType& getType() const
+ {
+ const TTypeList& types = *anonContainer.getType().getStruct();
+ return *types[memberNumber].type;
+ }
+
+ virtual TType& getWritableType()
+ {
+ assert(writable);
+ const TTypeList& types = *anonContainer.getType().getStruct();
+ return *types[memberNumber].type;
+ }
+
+ virtual int getAnonId() const { return anonId; }
+ virtual void dump(TInfoSink &infoSink) const;
+
+protected:
+ explicit TAnonMember(const TAnonMember&);
+ TAnonMember& operator=(const TAnonMember&);
+
+ const TVariable& anonContainer;
+ unsigned int memberNumber;
+ int anonId;
+};
+
+class TSymbolTableLevel {
+public:
+ POOL_ALLOCATOR_NEW_DELETE(GetThreadPoolAllocator())
+ TSymbolTableLevel() : defaultPrecision(0), anonId(0) { }
+ ~TSymbolTableLevel();
+
+ bool insert(TSymbol& symbol, bool separateNameSpaces)
+ {
+ //
+ // returning true means symbol was added to the table with no semantic errors
+ //
+ tInsertResult result;
+ const TString& name = symbol.getName();
+ if (name == "") {
+ // An empty name means an anonymous container, exposing its members to the external scope.
+ // Give it a name and insert its members in the symbol table, pointing to the container.
+ char buf[20];
+ snprintf(buf, 20, "%s%d", AnonymousPrefix, anonId);
+ symbol.changeName(NewPoolTString(buf));
+
+ bool isOkay = true;
+ const TTypeList& types = *symbol.getAsVariable()->getType().getStruct();
+ for (unsigned int m = 0; m < types.size(); ++m) {
+ TAnonMember* member = new TAnonMember(&types[m].type->getFieldName(), m, *symbol.getAsVariable(), anonId);
+ result = level.insert(tLevelPair(member->getMangledName(), member));
+ if (! result.second)
+ isOkay = false;
+ }
+
+ ++anonId;
+
+ return isOkay;
+ } else {
+ // Check for redefinition errors:
+ // - STL itself will tell us if there is a direct name collision, with name mangling, at this level
+ // - additionally, check for function-redefining-variable name collisions
+ const TString& insertName = symbol.getMangledName();
+ if (symbol.getAsFunction()) {
+ // make sure there isn't a variable of this name
+ if (! separateNameSpaces && level.find(name) != level.end())
+ return false;
+
+ // insert, and whatever happens is okay
+ level.insert(tLevelPair(insertName, &symbol));
+
+ return true;
+ } else {
+ result = level.insert(tLevelPair(insertName, &symbol));
+
+ return result.second;
+ }
+ }
+ }
+
+ TSymbol* find(const TString& name) const
+ {
+ tLevel::const_iterator it = level.find(name);
+ if (it == level.end())
+ return 0;
+ else
+ return (*it).second;
+ }
+
+ void findFunctionNameList(const TString& name, TVector<TFunction*>& list)
+ {
+ size_t parenAt = name.find_first_of('(');
+ TString base(name, 0, parenAt + 1);
+
+ tLevel::const_iterator begin = level.lower_bound(base);
+ base[parenAt] = ')'; // assume ')' is lexically after '('
+ tLevel::const_iterator end = level.upper_bound(base);
+ for (tLevel::const_iterator it = begin; it != end; ++it)
+ list.push_back(it->second->getAsFunction());
+ }
+
+ // See if there is already a function in the table having the given non-function-style name.
+ bool hasFunctionName(const TString& name) const
+ {
+ tLevel::const_iterator candidate = level.lower_bound(name);
+ if (candidate != level.end()) {
+ const TString& candidateName = (*candidate).first;
+ TString::size_type parenAt = candidateName.find_first_of('(');
+ if (parenAt != candidateName.npos && candidateName.compare(0, parenAt, name) == 0)
+
+ return true;
+ }
+
+ return false;
+ }
+
+ // See if there is a variable at this level having the given non-function-style name.
+ // Return true if name is found, and set variable to true if the name was a variable.
+ bool findFunctionVariableName(const TString& name, bool& variable) const
+ {
+ tLevel::const_iterator candidate = level.lower_bound(name);
+ if (candidate != level.end()) {
+ const TString& candidateName = (*candidate).first;
+ TString::size_type parenAt = candidateName.find_first_of('(');
+ if (parenAt == candidateName.npos) {
+ // not a mangled name
+ if (candidateName == name) {
+ // found a variable name match
+ variable = true;
+ return true;
+ }
+ } else {
+ // a mangled name
+ if (candidateName.compare(0, parenAt, name) == 0) {
+ // found a function name match
+ variable = false;
+ return true;
+ }
+ }
+ }
+
+ return false;
+ }
+
+ // Use this to do a lazy 'push' of precision defaults the first time
+ // a precision statement is seen in a new scope. Leave it at 0 for
+ // when no push was needed. Thus, it is not the current defaults,
+ // it is what to restore the defaults to when popping a level.
+ void setPreviousDefaultPrecisions(const TPrecisionQualifier *p)
+ {
+ // can call multiple times at one scope, will only latch on first call,
+ // as we're tracking the previous scope's values, not the current values
+ if (defaultPrecision != 0)
+ return;
+
+ defaultPrecision = new TPrecisionQualifier[EbtNumTypes];
+ for (int t = 0; t < EbtNumTypes; ++t)
+ defaultPrecision[t] = p[t];
+ }
+
+ void getPreviousDefaultPrecisions(TPrecisionQualifier *p)
+ {
+ // can be called for table level pops that didn't set the
+ // defaults
+ if (defaultPrecision == 0 || p == 0)
+ return;
+
+ for (int t = 0; t < EbtNumTypes; ++t)
+ p[t] = defaultPrecision[t];
+ }
+
+ void relateToOperator(const char* name, TOperator op);
+ void setFunctionExtensions(const char* name, int num, const char* const extensions[]);
+ void dump(TInfoSink &infoSink) const;
+ TSymbolTableLevel* clone() const;
+ void readOnly();
+
+protected:
+ explicit TSymbolTableLevel(TSymbolTableLevel&);
+ TSymbolTableLevel& operator=(TSymbolTableLevel&);
+
+ typedef std::map<TString, TSymbol*, std::less<TString>, pool_allocator<std::pair<const TString, TSymbol*> > > tLevel;
+ typedef const tLevel::value_type tLevelPair;
+ typedef std::pair<tLevel::iterator, bool> tInsertResult;
+
+ tLevel level; // named mappings
+ TPrecisionQualifier *defaultPrecision;
+ int anonId;
+};
+
+class TSymbolTable {
+public:
+ TSymbolTable() : uniqueId(0), noBuiltInRedeclarations(false), separateNameSpaces(false), adoptedLevels(0)
+ {
+ //
+ // This symbol table cannot be used until push() is called.
+ //
+ }
+ ~TSymbolTable()
+ {
+ // this can be called explicitly; safest to code it so it can be called multiple times
+
+ // don't deallocate levels passed in from elsewhere
+ while (table.size() > adoptedLevels)
+ pop(0);
+ }
+
+ void adoptLevels(TSymbolTable& symTable)
+ {
+ for (unsigned int level = 0; level < symTable.table.size(); ++level) {
+ table.push_back(symTable.table[level]);
+ ++adoptedLevels;
+ }
+ uniqueId = symTable.uniqueId;
+ noBuiltInRedeclarations = symTable.noBuiltInRedeclarations;
+ separateNameSpaces = symTable.separateNameSpaces;
+ }
+
+ //
+ // While level adopting is generic, the methods below enact a the following
+ // convention for levels:
+ // 0: common built-ins shared across all stages, all compiles, only one copy for all symbol tables
+ // 1: per-stage built-ins, shared across all compiles, but a different copy per stage
+ // 2: built-ins specific to a compile, like resources that are context-dependent, or redeclared built-ins
+ // 3: user-shader globals
+ //
+protected:
+ static const int globalLevel = 3;
+ bool isSharedLevel(int level) { return level <= 1; } // exclude all per-compile levels
+ bool isBuiltInLevel(int level) { return level <= 2; } // exclude user globals
+ bool isGlobalLevel(int level) { return level <= globalLevel; } // include user globals
+public:
+ bool isEmpty() { return table.size() == 0; }
+ bool atBuiltInLevel() { return isBuiltInLevel(currentLevel()); }
+ bool atGlobalLevel() { return isGlobalLevel(currentLevel()); }
+
+ void setNoBuiltInRedeclarations() { noBuiltInRedeclarations = true; }
+ void setSeparateNameSpaces() { separateNameSpaces = true; }
+
+ void push()
+ {
+ table.push_back(new TSymbolTableLevel);
+ }
+
+ void pop(TPrecisionQualifier *p)
+ {
+ table[currentLevel()]->getPreviousDefaultPrecisions(p);
+ delete table.back();
+ table.pop_back();
+ }
+
+ //
+ // Insert a visible symbol into the symbol table so it can
+ // be found later by name.
+ //
+ // Returns false if the was a name collision.
+ //
+ bool insert(TSymbol& symbol)
+ {
+ symbol.setUniqueId(++uniqueId);
+
+ // make sure there isn't a function of this variable name
+ if (! separateNameSpaces && ! symbol.getAsFunction() && table[currentLevel()]->hasFunctionName(symbol.getName()))
+ return false;
+
+ // check for not overloading or redefining a built-in function
+ if (noBuiltInRedeclarations) {
+ if (atGlobalLevel() && currentLevel() > 0) {
+ if (table[0]->hasFunctionName(symbol.getName()))
+ return false;
+ if (currentLevel() > 1 && table[1]->hasFunctionName(symbol.getName()))
+ return false;
+ }
+ }
+
+ return table[currentLevel()]->insert(symbol, separateNameSpaces);
+ }
+
+ //
+ // To allocate an internal temporary, which will need to be uniquely
+ // identified by the consumer of the AST, but never need to
+ // found by doing a symbol table search by name, hence allowed an
+ // arbitrary name in the symbol with no worry of collision.
+ //
+ void makeInternalVariable(TSymbol& symbol)
+ {
+ symbol.setUniqueId(++uniqueId);
+ }
+
+ //
+ // Copy a variable or anonymous member's structure from a shared level so that
+ // it can be added (soon after return) to the symbol table where it can be
+ // modified without impacting other users of the shared table.
+ //
+ TSymbol* copyUpDeferredInsert(TSymbol* shared)
+ {
+ if (shared->getAsVariable()) {
+ TSymbol* copy = shared->clone();
+ copy->setUniqueId(shared->getUniqueId());
+ return copy;
+ } else {
+ const TAnonMember* anon = shared->getAsAnonMember();
+ assert(anon);
+ TVariable* container = anon->getAnonContainer().clone();
+ container->changeName(NewPoolTString(""));
+ container->setUniqueId(anon->getAnonContainer().getUniqueId());
+ return container;
+ }
+ }
+
+ TSymbol* copyUp(TSymbol* shared)
+ {
+ TSymbol* copy = copyUpDeferredInsert(shared);
+ table[globalLevel]->insert(*copy, separateNameSpaces);
+ if (shared->getAsVariable())
+ return copy;
+ else {
+ // return the copy of the anonymous member
+ return table[globalLevel]->find(shared->getName());
+ }
+ }
+
+ TSymbol* find(const TString& name, bool* builtIn = 0, bool *currentScope = 0)
+ {
+ int level = currentLevel();
+ TSymbol* symbol;
+ do {
+ symbol = table[level]->find(name);
+ --level;
+ } while (symbol == 0 && level >= 0);
+ level++;
+ if (builtIn)
+ *builtIn = isBuiltInLevel(level);
+ if (currentScope)
+ *currentScope = isGlobalLevel(currentLevel()) || level == currentLevel(); // consider shared levels as "current scope" WRT user globals
+
+ return symbol;
+ }
+
+ bool isFunctionNameVariable(const TString& name) const
+ {
+ if (separateNameSpaces)
+ return false;
+
+ int level = currentLevel();
+ do {
+ bool variable;
+ bool found = table[level]->findFunctionVariableName(name, variable);
+ if (found)
+ return variable;
+ --level;
+ } while (level >= 0);
+
+ return false;
+ }
+
+ void findFunctionNameList(const TString& name, TVector<TFunction*>& list, bool& builtIn)
+ {
+ // For user levels, return the set found in the first scope with a match
+ builtIn = false;
+ int level = currentLevel();
+ do {
+ table[level]->findFunctionNameList(name, list);
+ --level;
+ } while (list.empty() && level >= globalLevel);
+
+ if (! list.empty())
+ return;
+
+ // Gather across all built-in levels; they don't hide each other
+ builtIn = true;
+ do {
+ table[level]->findFunctionNameList(name, list);
+ --level;
+ } while (level >= 0);
+ }
+
+ void relateToOperator(const char* name, TOperator op)
+ {
+ for (unsigned int level = 0; level < table.size(); ++level)
+ table[level]->relateToOperator(name, op);
+ }
+
+ void setFunctionExtensions(const char* name, int num, const char* const extensions[])
+ {
+ for (unsigned int level = 0; level < table.size(); ++level)
+ table[level]->setFunctionExtensions(name, num, extensions);
+ }
+
+ void setVariableExtensions(const char* name, int num, const char* const extensions[])
+ {
+ TSymbol* symbol = find(TString(name));
+ if (symbol)
+ symbol->setExtensions(num, extensions);
+ }
+
+ int getMaxSymbolId() { return uniqueId; }
+ void dump(TInfoSink &infoSink) const;
+ void copyTable(const TSymbolTable& copyOf);
+
+ void setPreviousDefaultPrecisions(TPrecisionQualifier *p) { table[currentLevel()]->setPreviousDefaultPrecisions(p); }
+
+ void readOnly()
+ {
+ for (unsigned int level = 0; level < table.size(); ++level)
+ table[level]->readOnly();
+ }
+
+protected:
+ TSymbolTable(TSymbolTable&);
+ TSymbolTable& operator=(TSymbolTableLevel&);
+
+ int currentLevel() const { return static_cast<int>(table.size()) - 1; }
+
+ std::vector<TSymbolTableLevel*> table;
+ int uniqueId; // for unique identification in code generation
+ bool noBuiltInRedeclarations;
+ bool separateNameSpaces;
+ unsigned int adoptedLevels;
+};
+
+} // end namespace glslang
+
+#endif // _SYMBOL_TABLE_INCLUDED_
diff --git a/chromium/third_party/glslang/src/glslang/MachineIndependent/Versions.cpp b/chromium/third_party/glslang/src/glslang/MachineIndependent/Versions.cpp
new file mode 100644
index 00000000000..c1192071b6c
--- /dev/null
+++ b/chromium/third_party/glslang/src/glslang/MachineIndependent/Versions.cpp
@@ -0,0 +1,677 @@
+//
+//Copyright (C) 2002-2005 3Dlabs Inc. Ltd.
+//Copyright (C) 2012-2013 LunarG, 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:
+//
+// Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 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.
+//
+// Neither the name of 3Dlabs Inc. Ltd. nor the names of its
+// contributors may be used to endorse or promote products derived
+// from this software without specific prior written permission.
+//
+//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+//"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 THE
+//COPYRIGHT HOLDERS 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.
+//
+
+//
+// Help manage multiple profiles, versions, extensions etc.
+//
+// These don't return error codes, as the presumption is parsing will
+// always continue as if the tested feature were enabled, and thus there
+// is no error recovery needed.
+//
+
+//
+// HOW TO add a feature enabled by an extension.
+//
+// To add a new hypothetical "Feature F" to the front end, where an extension
+// "XXX_extension_X" can be used to enable the feature, do the following.
+//
+// OVERVIEW: Specific features are what are error-checked for, not
+// extensions: A specific Feature F might be enabled by an extension, or a
+// particular version in a particular profile, or a stage, or combinations, etc.
+//
+// The basic mechanism is to use the following to "declare" all the things that
+// enable/disable Feature F, in a code path that implements Feature F:
+//
+// requireProfile()
+// profileRequires()
+// requireStage()
+// checkDeprecated()
+// requireNotRemoved()
+// requireExtensions()
+//
+// Typically, only the first two calls are needed. They go into a code path that
+// implements Feature F, and will log the proper error/warning messages. Parsing
+// will then always continue as if the tested feature was enabled.
+//
+// There is typically no if-testing or conditional parsing, just insertion of the calls above.
+// However, if symbols specific to the extension are added (step 5), they will
+// only be added under tests that the minimum version and profile are present.
+//
+// 1) Add a symbol name for the extension string at the bottom of Versions.h:
+//
+// const char* const XXX_extension_X = "XXX_extension_X";
+//
+// 2) Add extension initialization to TParseVersions::initializeExtensionBehavior(),
+// the first function below:
+//
+// extensionBehavior[XXX_extension_X] = EBhDisable;
+//
+// 3) Add any preprocessor directives etc. in the next function, TParseVersions::getPreamble():
+//
+// "#define XXX_extension_X 1\n"
+//
+// The new-line is important, as that ends preprocess tokens.
+//
+// 4) Insert a profile check in the feature's path (unless all profiles support the feature,
+// for some version level). That is, call requireProfile() to constrain the profiles, e.g.:
+//
+// // ... in a path specific to Feature F...
+// requireProfile(loc,
+// ECoreProfile | ECompatibilityProfile,
+// "Feature F");
+//
+// 5) For each profile that supports the feature, insert version/extension checks:
+//
+// The mostly likely scenario is that Feature F can only be used with a
+// particular profile if XXX_extension_X is present or the version is
+// high enough that the core specification already incorporated it.
+//
+// // following the requireProfile() call...
+// profileRequires(loc,
+// ECoreProfile | ECompatibilityProfile,
+// 420, // 0 if no version incorporated the feature into the core spec.
+// XXX_extension_X, // can be a list of extensions that all add the feature
+// "Feature F Description");
+//
+// This allows the feature if either A) one of the extensions is enabled or
+// B) the version is high enough. If no version yet incorporates the feature
+// into core, pass in 0.
+//
+// This can be called multiple times, if different profiles support the
+// feature starting at different version numbers or with different
+// extensions.
+//
+// This must be called for each profile allowed by the initial call to requireProfile().
+//
+// Profiles are all masks, which can be "or"-ed together.
+//
+// ENoProfile
+// ECoreProfile
+// ECompatibilityProfile
+// EEsProfile
+//
+// The ENoProfile profile is only for desktop, before profiles showed up in version 150;
+// All other #version with no profile default to either es or core, and so have profiles.
+//
+// You can select all but a particular profile using ~. The following basically means "desktop":
+//
+// ~EEsProfile
+//
+// 6) If built-in symbols are added by the extension, add them in Initialize.cpp: Their use
+// will be automatically error checked against the extensions enabled at that moment.
+// see the comment at the top of Initialize.cpp for where to put them. Establish them at
+// the earliest release that supports the extension. Then, tag them with the
+// set of extensions that both enable them and are necessary, given the version of the symbol
+// table. (There is a different symbol table for each version.)
+//
+
+#include "parseVersions.h"
+#include "localintermediate.h"
+
+namespace glslang {
+
+//
+// Initialize all extensions, almost always to 'disable', as once their features
+// are incorporated into a core version, their features are supported through allowing that
+// core version, not through a pseudo-enablement of the extension.
+//
+void TParseVersions::initializeExtensionBehavior()
+{
+ extensionBehavior[E_GL_OES_texture_3D] = EBhDisable;
+ extensionBehavior[E_GL_OES_standard_derivatives] = EBhDisable;
+ extensionBehavior[E_GL_EXT_frag_depth] = EBhDisable;
+ extensionBehavior[E_GL_OES_EGL_image_external] = EBhDisable;
+ extensionBehavior[E_GL_EXT_shader_texture_lod] = EBhDisable;
+
+ extensionBehavior[E_GL_ARB_texture_rectangle] = EBhDisable;
+ extensionBehavior[E_GL_3DL_array_objects] = EBhDisable;
+ extensionBehavior[E_GL_ARB_shading_language_420pack] = EBhDisable;
+ extensionBehavior[E_GL_ARB_texture_gather] = EBhDisable;
+ extensionBehavior[E_GL_ARB_gpu_shader5] = EBhDisablePartial;
+ extensionBehavior[E_GL_ARB_separate_shader_objects] = EBhDisable;
+ extensionBehavior[E_GL_ARB_compute_shader] = EBhDisable;
+ extensionBehavior[E_GL_ARB_tessellation_shader] = EBhDisable;
+ extensionBehavior[E_GL_ARB_enhanced_layouts] = EBhDisable;
+ extensionBehavior[E_GL_ARB_texture_cube_map_array] = EBhDisable;
+ extensionBehavior[E_GL_ARB_shader_texture_lod] = EBhDisable;
+ extensionBehavior[E_GL_ARB_explicit_attrib_location] = EBhDisable;
+ extensionBehavior[E_GL_ARB_shader_image_load_store] = EBhDisable;
+ extensionBehavior[E_GL_ARB_shader_atomic_counters] = EBhDisable;
+ extensionBehavior[E_GL_ARB_shader_draw_parameters] = EBhDisable;
+ extensionBehavior[E_GL_ARB_shader_group_vote] = EBhDisable;
+ extensionBehavior[E_GL_ARB_derivative_control] = EBhDisable;
+ extensionBehavior[E_GL_ARB_shader_texture_image_samples] = EBhDisable;
+ extensionBehavior[E_GL_ARB_viewport_array] = EBhDisable;
+ extensionBehavior[E_GL_ARB_gpu_shader_int64] = EBhDisable;
+ extensionBehavior[E_GL_ARB_gl_spirv] = EBhDisable;
+ extensionBehavior[E_GL_ARB_shader_ballot] = EBhDisable;
+ extensionBehavior[E_GL_ARB_sparse_texture2] = EBhDisable;
+ extensionBehavior[E_GL_ARB_sparse_texture_clamp] = EBhDisable;
+// extensionBehavior[E_GL_ARB_cull_distance] = EBhDisable; // present for 4.5, but need extension control over block members
+
+ // #line and #include
+ extensionBehavior[E_GL_GOOGLE_cpp_style_line_directive] = EBhDisable;
+ extensionBehavior[E_GL_GOOGLE_include_directive] = EBhDisable;
+
+ // AEP
+ extensionBehavior[E_GL_ANDROID_extension_pack_es31a] = EBhDisable;
+ extensionBehavior[E_GL_KHR_blend_equation_advanced] = EBhDisable;
+ extensionBehavior[E_GL_OES_sample_variables] = EBhDisable;
+ extensionBehavior[E_GL_OES_shader_image_atomic] = EBhDisable;
+ extensionBehavior[E_GL_OES_shader_multisample_interpolation] = EBhDisable;
+ extensionBehavior[E_GL_OES_texture_storage_multisample_2d_array] = EBhDisable;
+ extensionBehavior[E_GL_EXT_geometry_shader] = EBhDisable;
+ extensionBehavior[E_GL_EXT_geometry_point_size] = EBhDisable;
+ extensionBehavior[E_GL_EXT_gpu_shader5] = EBhDisable;
+ extensionBehavior[E_GL_EXT_primitive_bounding_box] = EBhDisable;
+ extensionBehavior[E_GL_EXT_shader_io_blocks] = EBhDisable;
+ extensionBehavior[E_GL_EXT_tessellation_shader] = EBhDisable;
+ extensionBehavior[E_GL_EXT_tessellation_point_size] = EBhDisable;
+ extensionBehavior[E_GL_EXT_texture_buffer] = EBhDisable;
+ extensionBehavior[E_GL_EXT_texture_cube_map_array] = EBhDisable;
+
+ // OES matching AEP
+ extensionBehavior[E_GL_OES_geometry_shader] = EBhDisable;
+ extensionBehavior[E_GL_OES_geometry_point_size] = EBhDisable;
+ extensionBehavior[E_GL_OES_gpu_shader5] = EBhDisable;
+ extensionBehavior[E_GL_OES_primitive_bounding_box] = EBhDisable;
+ extensionBehavior[E_GL_OES_shader_io_blocks] = EBhDisable;
+ extensionBehavior[E_GL_OES_tessellation_shader] = EBhDisable;
+ extensionBehavior[E_GL_OES_tessellation_point_size] = EBhDisable;
+ extensionBehavior[E_GL_OES_texture_buffer] = EBhDisable;
+ extensionBehavior[E_GL_OES_texture_cube_map_array] = EBhDisable;
+}
+
+// Get code that is not part of a shared symbol table, is specific to this shader,
+// or needed by the preprocessor (which does not use a shared symbol table).
+void TParseVersions::getPreamble(std::string& preamble)
+{
+ if (profile == EEsProfile) {
+ preamble =
+ "#define GL_ES 1\n"
+ "#define GL_FRAGMENT_PRECISION_HIGH 1\n"
+ "#define GL_OES_texture_3D 1\n"
+ "#define GL_OES_standard_derivatives 1\n"
+ "#define GL_EXT_frag_depth 1\n"
+ "#define GL_OES_EGL_image_external 1\n"
+ "#define GL_EXT_shader_texture_lod 1\n"
+
+ // AEP
+ "#define GL_ANDROID_extension_pack_es31a 1\n"
+ "#define GL_KHR_blend_equation_advanced 1\n"
+ "#define GL_OES_sample_variables 1\n"
+ "#define GL_OES_shader_image_atomic 1\n"
+ "#define GL_OES_shader_multisample_interpolation 1\n"
+ "#define GL_OES_texture_storage_multisample_2d_array 1\n"
+ "#define GL_EXT_geometry_shader 1\n"
+ "#define GL_EXT_geometry_point_size 1\n"
+ "#define GL_EXT_gpu_shader5 1\n"
+ "#define GL_EXT_primitive_bounding_box 1\n"
+ "#define GL_EXT_shader_io_blocks 1\n"
+ "#define GL_EXT_tessellation_shader 1\n"
+ "#define GL_EXT_tessellation_point_size 1\n"
+ "#define GL_EXT_texture_buffer 1\n"
+ "#define GL_EXT_texture_cube_map_array 1\n"
+
+ // OES matching AEP
+ "#define GL_OES_geometry_shader 1\n"
+ "#define GL_OES_geometry_point_size 1\n"
+ "#define GL_OES_gpu_shader5 1\n"
+ "#define GL_OES_primitive_bounding_box 1\n"
+ "#define GL_OES_shader_io_blocks 1\n"
+ "#define GL_OES_tessellation_shader 1\n"
+ "#define GL_OES_tessellation_point_size 1\n"
+ "#define GL_OES_texture_buffer 1\n"
+ "#define GL_OES_texture_cube_map_array 1\n"
+ ;
+ } else {
+ preamble =
+ "#define GL_FRAGMENT_PRECISION_HIGH 1\n"
+ "#define GL_ARB_texture_rectangle 1\n"
+ "#define GL_ARB_shading_language_420pack 1\n"
+ "#define GL_ARB_texture_gather 1\n"
+ "#define GL_ARB_gpu_shader5 1\n"
+ "#define GL_ARB_separate_shader_objects 1\n"
+ "#define GL_ARB_compute_shader 1\n"
+ "#define GL_ARB_tessellation_shader 1\n"
+ "#define GL_ARB_enhanced_layouts 1\n"
+ "#define GL_ARB_texture_cube_map_array 1\n"
+ "#define GL_ARB_shader_texture_lod 1\n"
+ "#define GL_ARB_explicit_attrib_location 1\n"
+ "#define GL_ARB_shader_image_load_store 1\n"
+ "#define GL_ARB_shader_atomic_counters 1\n"
+ "#define GL_ARB_shader_draw_parameters 1\n"
+ "#define GL_ARB_shader_group_vote 1\n"
+ "#define GL_ARB_derivative_control 1\n"
+ "#define GL_ARB_shader_texture_image_samples 1\n"
+ "#define GL_ARB_viewport_array 1\n"
+ "#define GL_ARB_gpu_shader_int64 1\n"
+ "#define GL_ARB_gl_spirv 1\n"
+ "#define GL_ARB_shader_ballot 1\n"
+ "#define GL_ARB_sparse_texture2 1\n"
+ "#define GL_ARB_sparse_texture_clamp 1\n"
+// "#define GL_ARB_cull_distance 1\n" // present for 4.5, but need extension control over block members
+ ;
+ }
+
+ // #line and #include
+ preamble +=
+ "#define GL_GOOGLE_cpp_style_line_directive 1\n"
+ "#define GL_GOOGLE_include_directive 1\n"
+ ;
+
+ if (vulkan > 0)
+ preamble += "#define VULKAN 100\n";
+}
+
+//
+// When to use requireProfile():
+//
+// Use if only some profiles support a feature. However, if within a profile the feature
+// is version or extension specific, follow this call with calls to profileRequires().
+//
+// Operation: If the current profile is not one of the profileMask,
+// give an error message.
+//
+void TParseVersions::requireProfile(const TSourceLoc& loc, int profileMask, const char* featureDesc)
+{
+ if (! (profile & profileMask))
+ error(loc, "not supported with this profile:", featureDesc, ProfileName(profile));
+}
+
+//
+// Map from stage enum to externally readable text name.
+//
+const char* StageName(EShLanguage stage)
+{
+ switch(stage) {
+ case EShLangVertex: return "vertex";
+ case EShLangTessControl: return "tessellation control";
+ case EShLangTessEvaluation: return "tessellation evaluation";
+ case EShLangGeometry: return "geometry";
+ case EShLangFragment: return "fragment";
+ case EShLangCompute: return "compute";
+ default: return "unknown stage";
+ }
+}
+
+//
+// When to use profileRequires():
+//
+// If a set of profiles have the same requirements for what version or extensions
+// are needed to support a feature.
+//
+// It must be called for each profile that needs protection. Use requireProfile() first
+// to reduce that set of profiles.
+//
+// Operation: Will issue warnings/errors based on the current profile, version, and extension
+// behaviors. It only checks extensions when the current profile is one of the profileMask.
+//
+// A minVersion of 0 means no version of the profileMask support this in core,
+// the extension must be present.
+//
+
+// entry point that takes multiple extensions
+void TParseVersions::profileRequires(const TSourceLoc& loc, int profileMask, int minVersion, int numExtensions, const char* const extensions[], const char* featureDesc)
+{
+ if (profile & profileMask) {
+ bool okay = false;
+ if (minVersion > 0 && version >= minVersion)
+ okay = true;
+ for (int i = 0; i < numExtensions; ++i) {
+ switch (getExtensionBehavior(extensions[i])) {
+ case EBhWarn:
+ infoSink.info.message(EPrefixWarning, ("extension " + TString(extensions[i]) + " is being used for " + featureDesc).c_str(), loc);
+ // fall through
+ case EBhRequire:
+ case EBhEnable:
+ okay = true;
+ break;
+ default: break; // some compilers want this
+ }
+ }
+
+ if (! okay)
+ error(loc, "not supported for this version or the enabled extensions", featureDesc, "");
+ }
+}
+
+// entry point for the above that takes a single extension
+void TParseVersions::profileRequires(const TSourceLoc& loc, int profileMask, int minVersion, const char* extension, const char* featureDesc)
+{
+ profileRequires(loc, profileMask, minVersion, extension ? 1 : 0, &extension, featureDesc);
+}
+
+//
+// When to use requireStage()
+//
+// If only some stages support a feature.
+//
+// Operation: If the current stage is not present, give an error message.
+//
+void TParseVersions::requireStage(const TSourceLoc& loc, EShLanguageMask languageMask, const char* featureDesc)
+{
+ if (((1 << language) & languageMask) == 0)
+ error(loc, "not supported in this stage:", featureDesc, StageName(language));
+}
+
+// If only one stage supports a feature, this can be called. But, all supporting stages
+// must be specified with one call.
+void TParseVersions::requireStage(const TSourceLoc& loc, EShLanguage stage, const char* featureDesc)
+{
+ requireStage(loc, static_cast<EShLanguageMask>(1 << stage), featureDesc);
+}
+
+//
+// Within a set of profiles, see if a feature is deprecated and give an error or warning based on whether
+// a future compatibility context is being use.
+//
+void TParseVersions::checkDeprecated(const TSourceLoc& loc, int profileMask, int depVersion, const char* featureDesc)
+{
+ if (profile & profileMask) {
+ if (version >= depVersion) {
+ if (forwardCompatible)
+ error(loc, "deprecated, may be removed in future release", featureDesc, "");
+ else if (! suppressWarnings())
+ infoSink.info.message(EPrefixWarning, (TString(featureDesc) + " deprecated in version " +
+ String(depVersion) + "; may be removed in future release").c_str(), loc);
+ }
+ }
+}
+
+//
+// Within a set of profiles, see if a feature has now been removed and if so, give an error.
+// The version argument is the first version no longer having the feature.
+//
+void TParseVersions::requireNotRemoved(const TSourceLoc& loc, int profileMask, int removedVersion, const char* featureDesc)
+{
+ if (profile & profileMask) {
+ if (version >= removedVersion) {
+ const int maxSize = 60;
+ char buf[maxSize];
+ snprintf(buf, maxSize, "%s profile; removed in version %d", ProfileName(profile), removedVersion);
+ error(loc, "no longer supported in", featureDesc, buf);
+ }
+ }
+}
+
+// Returns true if at least one of the extensions in the extensions parameter is requested. Otherwise, returns false.
+// Warns appropriately if the requested behavior of an extension is "warn".
+bool TParseVersions::checkExtensionsRequested(const TSourceLoc& loc, int numExtensions, const char* const extensions[], const char* featureDesc)
+{
+ // First, see if any of the extensions are enabled
+ for (int i = 0; i < numExtensions; ++i) {
+ TExtensionBehavior behavior = getExtensionBehavior(extensions[i]);
+ if (behavior == EBhEnable || behavior == EBhRequire)
+ return true;
+ }
+
+ // See if any extensions want to give a warning on use; give warnings for all such extensions
+ bool warned = false;
+ for (int i = 0; i < numExtensions; ++i) {
+ TExtensionBehavior behavior = getExtensionBehavior(extensions[i]);
+ if (behavior == EBhDisable && relaxedErrors()) {
+ infoSink.info.message(EPrefixWarning, "The following extension must be enabled to use this feature:", loc);
+ behavior = EBhWarn;
+ }
+ if (behavior == EBhWarn) {
+ infoSink.info.message(EPrefixWarning, ("extension " + TString(extensions[i]) + " is being used for " + featureDesc).c_str(), loc);
+ warned = true;
+ }
+ }
+ if (warned)
+ return true;
+ return false;
+}
+
+//
+// Use when there are no profile/version to check, it's just an error if one of the
+// extensions is not present.
+//
+void TParseVersions::requireExtensions(const TSourceLoc& loc, int numExtensions, const char* const extensions[], const char* featureDesc)
+{
+ if (checkExtensionsRequested(loc, numExtensions, extensions, featureDesc)) return;
+
+ // If we get this far, give errors explaining what extensions are needed
+ if (numExtensions == 1)
+ error(loc, "required extension not requested:", featureDesc, extensions[0]);
+ else {
+ error(loc, "required extension not requested:", featureDesc, "Possible extensions include:");
+ for (int i = 0; i < numExtensions; ++i)
+ infoSink.info.message(EPrefixNone, extensions[i]);
+ }
+}
+
+//
+// Use by preprocessor when there are no profile/version to check, it's just an error if one of the
+// extensions is not present.
+//
+void TParseVersions::ppRequireExtensions(const TSourceLoc& loc, int numExtensions, const char* const extensions[], const char* featureDesc)
+{
+ if (checkExtensionsRequested(loc, numExtensions, extensions, featureDesc)) return;
+
+ // If we get this far, give errors explaining what extensions are needed
+ if (numExtensions == 1)
+ ppError(loc, "required extension not requested:", featureDesc, extensions[0]);
+ else {
+ ppError(loc, "required extension not requested:", featureDesc, "Possible extensions include:");
+ for (int i = 0; i < numExtensions; ++i)
+ infoSink.info.message(EPrefixNone, extensions[i]);
+ }
+}
+
+TExtensionBehavior TParseVersions::getExtensionBehavior(const char* extension)
+{
+ auto iter = extensionBehavior.find(TString(extension));
+ if (iter == extensionBehavior.end())
+ return EBhMissing;
+ else
+ return iter->second;
+}
+
+// Returns true if the given extension is set to enable, require, or warn.
+bool TParseVersions::extensionTurnedOn(const char* const extension)
+{
+ switch (getExtensionBehavior(extension)) {
+ case EBhEnable:
+ case EBhRequire:
+ case EBhWarn:
+ return true;
+ default:
+ break;
+ }
+ return false;
+}
+// See if any of the extensions are set to enable, require, or warn.
+bool TParseVersions::extensionsTurnedOn(int numExtensions, const char* const extensions[])
+{
+ for (int i = 0; i < numExtensions; ++i) {
+ if (extensionTurnedOn(extensions[i])) return true;
+ }
+ return false;
+}
+
+//
+// Change the current state of an extension's behavior.
+//
+void TParseVersions::updateExtensionBehavior(int line, const char* extension, const char* behaviorString)
+{
+ // Translate from text string of extension's behavior to an enum.
+ TExtensionBehavior behavior = EBhDisable;
+ if (! strcmp("require", behaviorString))
+ behavior = EBhRequire;
+ else if (! strcmp("enable", behaviorString))
+ behavior = EBhEnable;
+ else if (! strcmp("disable", behaviorString))
+ behavior = EBhDisable;
+ else if (! strcmp("warn", behaviorString))
+ behavior = EBhWarn;
+ else {
+ error(getCurrentLoc(), "behavior not supported:", "#extension", behaviorString);
+ return;
+ }
+
+ // update the requested extension
+ updateExtensionBehavior(extension, behavior);
+
+ // see if need to propagate to implicitly modified things
+ if (strcmp(extension, "GL_ANDROID_extension_pack_es31a") == 0) {
+ // to everything in AEP
+ updateExtensionBehavior(line, "GL_KHR_blend_equation_advanced", behaviorString);
+ updateExtensionBehavior(line, "GL_OES_sample_variables", behaviorString);
+ updateExtensionBehavior(line, "GL_OES_shader_image_atomic", behaviorString);
+ updateExtensionBehavior(line, "GL_OES_shader_multisample_interpolation", behaviorString);
+ updateExtensionBehavior(line, "GL_OES_texture_storage_multisample_2d_array", behaviorString);
+ updateExtensionBehavior(line, "GL_EXT_geometry_shader", behaviorString);
+ updateExtensionBehavior(line, "GL_EXT_gpu_shader5", behaviorString);
+ updateExtensionBehavior(line, "GL_EXT_primitive_bounding_box", behaviorString);
+ updateExtensionBehavior(line, "GL_EXT_shader_io_blocks", behaviorString);
+ updateExtensionBehavior(line, "GL_EXT_tessellation_shader", behaviorString);
+ updateExtensionBehavior(line, "GL_EXT_texture_buffer", behaviorString);
+ updateExtensionBehavior(line, "GL_EXT_texture_cube_map_array", behaviorString);
+ }
+ // geometry to io_blocks
+ else if (strcmp(extension, "GL_EXT_geometry_shader") == 0)
+ updateExtensionBehavior(line, "GL_EXT_shader_io_blocks", behaviorString);
+ else if (strcmp(extension, "GL_OES_geometry_shader") == 0)
+ updateExtensionBehavior(line, "GL_OES_shader_io_blocks", behaviorString);
+ // tessellation to io_blocks
+ else if (strcmp(extension, "GL_EXT_tessellation_shader") == 0)
+ updateExtensionBehavior(line, "GL_EXT_shader_io_blocks", behaviorString);
+ else if (strcmp(extension, "GL_OES_tessellation_shader") == 0)
+ updateExtensionBehavior(line, "GL_OES_shader_io_blocks", behaviorString);
+ else if (strcmp(extension, "GL_GOOGLE_include_directive") == 0)
+ updateExtensionBehavior(line, "GL_GOOGLE_cpp_style_line_directive", behaviorString);
+ // SPIR-V
+ else if (strcmp(extension, "GL_ARB_gl_spirv") == 0)
+ spv = 100;
+}
+
+void TParseVersions::updateExtensionBehavior(const char* extension, TExtensionBehavior behavior)
+{
+ // Update the current behavior
+ if (strcmp(extension, "all") == 0) {
+ // special case for the 'all' extension; apply it to every extension present
+ if (behavior == EBhRequire || behavior == EBhEnable) {
+ error(getCurrentLoc(), "extension 'all' cannot have 'require' or 'enable' behavior", "#extension", "");
+ return;
+ } else {
+ for (auto iter = extensionBehavior.begin(); iter != extensionBehavior.end(); ++iter)
+ iter->second = behavior;
+ }
+ } else {
+ // Do the update for this single extension
+ auto iter = extensionBehavior.find(TString(extension));
+ if (iter == extensionBehavior.end()) {
+ switch (behavior) {
+ case EBhRequire:
+ error(getCurrentLoc(), "extension not supported:", "#extension", extension);
+ break;
+ case EBhEnable:
+ case EBhWarn:
+ case EBhDisable:
+ warn(getCurrentLoc(), "extension not supported:", "#extension", extension);
+ break;
+ default:
+ assert(0 && "unexpected behavior");
+ }
+
+ return;
+ } else {
+ if (iter->second == EBhDisablePartial)
+ warn(getCurrentLoc(), "extension is only partially supported:", "#extension", extension);
+ if (behavior == EBhEnable || behavior == EBhRequire)
+ intermediate.addRequestedExtension(extension);
+ iter->second = behavior;
+ }
+ }
+}
+
+// Call for any operation needing full GLSL integer data-type support.
+void TParseVersions::fullIntegerCheck(const TSourceLoc& loc, const char* op)
+{
+ profileRequires(loc, ENoProfile, 130, nullptr, op);
+ profileRequires(loc, EEsProfile, 300, nullptr, op);
+}
+
+// Call for any operation needing GLSL double data-type support.
+void TParseVersions::doubleCheck(const TSourceLoc& loc, const char* op)
+{
+ requireProfile(loc, ECoreProfile | ECompatibilityProfile, op);
+ profileRequires(loc, ECoreProfile, 400, nullptr, op);
+ profileRequires(loc, ECompatibilityProfile, 400, nullptr, op);
+}
+
+// Call for any operation needing GLSL 64-bit integer data-type support.
+void TParseVersions::int64Check(const TSourceLoc& loc, const char* op, bool builtIn)
+{
+ if (! builtIn) {
+ requireExtensions(loc, 1, &E_GL_ARB_gpu_shader_int64, "shader int64");
+ requireProfile(loc, ECoreProfile | ECompatibilityProfile, op);
+ profileRequires(loc, ECoreProfile, 450, nullptr, op);
+ profileRequires(loc, ECompatibilityProfile, 450, nullptr, op);
+ }
+}
+
+// Call for any operation removed because SPIR-V is in use.
+void TParseVersions::spvRemoved(const TSourceLoc& loc, const char* op)
+{
+ if (spv > 0)
+ error(loc, "not allowed when generating SPIR-V", op, "");
+}
+
+// Call for any operation removed because Vulkan SPIR-V is being generated.
+void TParseVersions::vulkanRemoved(const TSourceLoc& loc, const char* op)
+{
+ if (vulkan > 0)
+ error(loc, "not allowed when using GLSL for Vulkan", op, "");
+}
+
+// Call for any operation that requires Vulkan.
+void TParseVersions::requireVulkan(const TSourceLoc& loc, const char* op)
+{
+ if (vulkan == 0)
+ error(loc, "only allowed when using GLSL for Vulkan", op, "");
+}
+
+// Call for any operation that requires SPIR-V.
+void TParseVersions::requireSpv(const TSourceLoc& loc, const char* op)
+{
+ if (spv == 0)
+ error(loc, "only allowed when generating SPIR-V", op, "");
+}
+
+} // end namespace glslang
diff --git a/chromium/third_party/glslang/src/glslang/MachineIndependent/Versions.h b/chromium/third_party/glslang/src/glslang/MachineIndependent/Versions.h
new file mode 100644
index 00000000000..ba08ca3c00d
--- /dev/null
+++ b/chromium/third_party/glslang/src/glslang/MachineIndependent/Versions.h
@@ -0,0 +1,185 @@
+//
+//Copyright (C) 2002-2005 3Dlabs Inc. Ltd.
+//Copyright (C) 2012-2013 LunarG, 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:
+//
+// Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 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.
+//
+// Neither the name of 3Dlabs Inc. Ltd. nor the names of its
+// contributors may be used to endorse or promote products derived
+// from this software without specific prior written permission.
+//
+//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+//"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 THE
+//COPYRIGHT HOLDERS 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.
+//
+#ifndef _VERSIONS_INCLUDED_
+#define _VERSIONS_INCLUDED_
+
+//
+// Help manage multiple profiles, versions, extensions etc.
+//
+
+//
+// Profiles are set up for masking operations, so queries can be done on multiple
+// profiles at the same time.
+//
+// Don't maintain an ordinal set of enums (0,1,2,3...) to avoid all possible
+// defects from mixing the two different forms.
+//
+typedef enum {
+ EBadProfile = 0,
+ ENoProfile = (1 << 0), // only for desktop, before profiles showed up
+ ECoreProfile = (1 << 1),
+ ECompatibilityProfile = (1 << 2),
+ EEsProfile = (1 << 3)
+} EProfile;
+
+namespace glslang {
+
+//
+// Map from profile enum to externally readable text name.
+//
+inline const char* ProfileName(EProfile profile)
+{
+ switch (profile) {
+ case ENoProfile: return "none";
+ case ECoreProfile: return "core";
+ case ECompatibilityProfile: return "compatibility";
+ case EEsProfile: return "es";
+ default: return "unknown profile";
+ }
+}
+
+//
+// The behaviors from the GLSL "#extension extension_name : behavior"
+//
+typedef enum {
+ EBhMissing = 0,
+ EBhRequire,
+ EBhEnable,
+ EBhWarn,
+ EBhDisable,
+ EBhDisablePartial // use as initial state of an extension that is only partially implemented
+} TExtensionBehavior;
+
+//
+// Symbolic names for extensions. Strings may be directly used when calling the
+// functions, but better to have the compiler do spelling checks.
+//
+const char* const E_GL_OES_texture_3D = "GL_OES_texture_3D";
+const char* const E_GL_OES_standard_derivatives = "GL_OES_standard_derivatives";
+const char* const E_GL_EXT_frag_depth = "GL_EXT_frag_depth";
+const char* const E_GL_OES_EGL_image_external = "GL_OES_EGL_image_external";
+const char* const E_GL_EXT_shader_texture_lod = "GL_EXT_shader_texture_lod";
+
+const char* const E_GL_ARB_texture_rectangle = "GL_ARB_texture_rectangle";
+const char* const E_GL_3DL_array_objects = "GL_3DL_array_objects";
+const char* const E_GL_ARB_shading_language_420pack = "GL_ARB_shading_language_420pack";
+const char* const E_GL_ARB_texture_gather = "GL_ARB_texture_gather";
+const char* const E_GL_ARB_gpu_shader5 = "GL_ARB_gpu_shader5";
+const char* const E_GL_ARB_separate_shader_objects = "GL_ARB_separate_shader_objects";
+const char* const E_GL_ARB_compute_shader = "GL_ARB_compute_shader";
+const char* const E_GL_ARB_tessellation_shader = "GL_ARB_tessellation_shader";
+const char* const E_GL_ARB_enhanced_layouts = "GL_ARB_enhanced_layouts";
+const char* const E_GL_ARB_texture_cube_map_array = "GL_ARB_texture_cube_map_array";
+const char* const E_GL_ARB_shader_texture_lod = "GL_ARB_shader_texture_lod";
+const char* const E_GL_ARB_explicit_attrib_location = "GL_ARB_explicit_attrib_location";
+const char* const E_GL_ARB_shader_image_load_store = "GL_ARB_shader_image_load_store";
+const char* const E_GL_ARB_shader_atomic_counters = "GL_ARB_shader_atomic_counters";
+const char* const E_GL_ARB_shader_draw_parameters = "GL_ARB_shader_draw_parameters";
+const char* const E_GL_ARB_shader_group_vote = "GL_ARB_shader_group_vote";
+const char* const E_GL_ARB_derivative_control = "GL_ARB_derivative_control";
+const char* const E_GL_ARB_shader_texture_image_samples = "GL_ARB_shader_texture_image_samples";
+const char* const E_GL_ARB_viewport_array = "GL_ARB_viewport_array";
+const char* const E_GL_ARB_gpu_shader_int64 = "GL_ARB_gpu_shader_int64";
+const char* const E_GL_ARB_gl_spirv = "GL_ARB_gl_spirv";
+const char* const E_GL_ARB_shader_ballot = "GL_ARB_shader_ballot";
+const char* const E_GL_ARB_sparse_texture2 = "GL_ARB_sparse_texture2";
+const char* const E_GL_ARB_sparse_texture_clamp = "GL_ARB_sparse_texture_clamp";
+//const char* const E_GL_ARB_cull_distance = "GL_ARB_cull_distance"; // present for 4.5, but need extension control over block members
+
+// #line and #include
+const char* const E_GL_GOOGLE_cpp_style_line_directive = "GL_GOOGLE_cpp_style_line_directive";
+const char* const E_GL_GOOGLE_include_directive = "GL_GOOGLE_include_directive";
+
+// AEP
+const char* const E_GL_ANDROID_extension_pack_es31a = "GL_ANDROID_extension_pack_es31a";
+const char* const E_GL_KHR_blend_equation_advanced = "GL_KHR_blend_equation_advanced";
+const char* const E_GL_OES_sample_variables = "GL_OES_sample_variables";
+const char* const E_GL_OES_shader_image_atomic = "GL_OES_shader_image_atomic";
+const char* const E_GL_OES_shader_multisample_interpolation = "GL_OES_shader_multisample_interpolation";
+const char* const E_GL_OES_texture_storage_multisample_2d_array = "GL_OES_texture_storage_multisample_2d_array";
+const char* const E_GL_EXT_geometry_shader = "GL_EXT_geometry_shader";
+const char* const E_GL_EXT_geometry_point_size = "GL_EXT_geometry_point_size";
+const char* const E_GL_EXT_gpu_shader5 = "GL_EXT_gpu_shader5";
+const char* const E_GL_EXT_primitive_bounding_box = "GL_EXT_primitive_bounding_box";
+const char* const E_GL_EXT_shader_io_blocks = "GL_EXT_shader_io_blocks";
+const char* const E_GL_EXT_tessellation_shader = "GL_EXT_tessellation_shader";
+const char* const E_GL_EXT_tessellation_point_size = "GL_EXT_tessellation_point_size";
+const char* const E_GL_EXT_texture_buffer = "GL_EXT_texture_buffer";
+const char* const E_GL_EXT_texture_cube_map_array = "GL_EXT_texture_cube_map_array";
+
+// OES matching AEP
+const char* const E_GL_OES_geometry_shader = "GL_OES_geometry_shader";
+const char* const E_GL_OES_geometry_point_size = "GL_OES_geometry_point_size";
+const char* const E_GL_OES_gpu_shader5 = "GL_OES_gpu_shader5";
+const char* const E_GL_OES_primitive_bounding_box = "GL_OES_primitive_bounding_box";
+const char* const E_GL_OES_shader_io_blocks = "GL_OES_shader_io_blocks";
+const char* const E_GL_OES_tessellation_shader = "GL_OES_tessellation_shader";
+const char* const E_GL_OES_tessellation_point_size = "GL_OES_tessellation_point_size";
+const char* const E_GL_OES_texture_buffer = "GL_OES_texture_buffer";
+const char* const E_GL_OES_texture_cube_map_array = "GL_OES_texture_cube_map_array";
+
+// Arrays of extensions for the above AEP duplications
+
+const char* const AEP_geometry_shader[] = { E_GL_EXT_geometry_shader, E_GL_OES_geometry_shader };
+const int Num_AEP_geometry_shader = sizeof(AEP_geometry_shader)/sizeof(AEP_geometry_shader[0]);
+
+const char* const AEP_geometry_point_size[] = { E_GL_EXT_geometry_point_size, E_GL_OES_geometry_point_size };
+const int Num_AEP_geometry_point_size = sizeof(AEP_geometry_point_size)/sizeof(AEP_geometry_point_size[0]);
+
+const char* const AEP_gpu_shader5[] = { E_GL_EXT_gpu_shader5, E_GL_OES_gpu_shader5 };
+const int Num_AEP_gpu_shader5 = sizeof(AEP_gpu_shader5)/sizeof(AEP_gpu_shader5[0]);
+
+const char* const AEP_primitive_bounding_box[] = { E_GL_EXT_primitive_bounding_box, E_GL_OES_primitive_bounding_box };
+const int Num_AEP_primitive_bounding_box = sizeof(AEP_primitive_bounding_box)/sizeof(AEP_primitive_bounding_box[0]);
+
+const char* const AEP_shader_io_blocks[] = { E_GL_EXT_shader_io_blocks, E_GL_OES_shader_io_blocks };
+const int Num_AEP_shader_io_blocks = sizeof(AEP_shader_io_blocks)/sizeof(AEP_shader_io_blocks[0]);
+
+const char* const AEP_tessellation_shader[] = { E_GL_EXT_tessellation_shader, E_GL_OES_tessellation_shader };
+const int Num_AEP_tessellation_shader = sizeof(AEP_tessellation_shader)/sizeof(AEP_tessellation_shader[0]);
+
+const char* const AEP_tessellation_point_size[] = { E_GL_EXT_tessellation_point_size, E_GL_OES_tessellation_point_size };
+const int Num_AEP_tessellation_point_size = sizeof(AEP_tessellation_point_size)/sizeof(AEP_tessellation_point_size[0]);
+
+const char* const AEP_texture_buffer[] = { E_GL_EXT_texture_buffer, E_GL_OES_texture_buffer };
+const int Num_AEP_texture_buffer = sizeof(AEP_texture_buffer)/sizeof(AEP_texture_buffer[0]);
+
+const char* const AEP_texture_cube_map_array[] = { E_GL_EXT_texture_cube_map_array, E_GL_OES_texture_cube_map_array };
+const int Num_AEP_texture_cube_map_array = sizeof(AEP_texture_cube_map_array)/sizeof(AEP_texture_cube_map_array[0]);
+
+} // end namespace glslang
+
+#endif // _VERSIONS_INCLUDED_
diff --git a/chromium/third_party/glslang/src/glslang/MachineIndependent/gl_types.h b/chromium/third_party/glslang/src/glslang/MachineIndependent/gl_types.h
new file mode 100644
index 00000000000..9e877d37dc3
--- /dev/null
+++ b/chromium/third_party/glslang/src/glslang/MachineIndependent/gl_types.h
@@ -0,0 +1,160 @@
+/*
+** Copyright (c) 2013 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+#define GL_FLOAT 0x1406
+#define GL_FLOAT_VEC2 0x8B50
+#define GL_FLOAT_VEC3 0x8B51
+#define GL_FLOAT_VEC4 0x8B52
+
+#define GL_DOUBLE 0x140A
+#define GL_DOUBLE_VEC2 0x8FFC
+#define GL_DOUBLE_VEC3 0x8FFD
+#define GL_DOUBLE_VEC4 0x8FFE
+
+#define GL_INT 0x1404
+#define GL_INT_VEC2 0x8B53
+#define GL_INT_VEC3 0x8B54
+#define GL_INT_VEC4 0x8B55
+
+#define GL_UNSIGNED_INT 0x1405
+#define GL_UNSIGNED_INT_VEC2 0x8DC6
+#define GL_UNSIGNED_INT_VEC3 0x8DC7
+#define GL_UNSIGNED_INT_VEC4 0x8DC8
+
+#define GL_INT64_ARB 0x140E
+#define GL_INT64_VEC2_ARB 0x8FE9
+#define GL_INT64_VEC3_ARB 0x8FEA
+#define GL_INT64_VEC4_ARB 0x8FEB
+
+#define GL_UNSIGNED_INT64_ARB 0x140F
+#define GL_UNSIGNED_INT64_VEC2_ARB 0x8FE5
+#define GL_UNSIGNED_INT64_VEC3_ARB 0x8FE6
+#define GL_UNSIGNED_INT64_VEC4_ARB 0x8FE7
+
+#define GL_BOOL 0x8B56
+#define GL_BOOL_VEC2 0x8B57
+#define GL_BOOL_VEC3 0x8B58
+#define GL_BOOL_VEC4 0x8B59
+
+#define GL_FLOAT_MAT2 0x8B5A
+#define GL_FLOAT_MAT3 0x8B5B
+#define GL_FLOAT_MAT4 0x8B5C
+#define GL_FLOAT_MAT2x3 0x8B65
+#define GL_FLOAT_MAT2x4 0x8B66
+#define GL_FLOAT_MAT3x2 0x8B67
+#define GL_FLOAT_MAT3x4 0x8B68
+#define GL_FLOAT_MAT4x2 0x8B69
+#define GL_FLOAT_MAT4x3 0x8B6A
+
+#define GL_DOUBLE_MAT2 0x8F46
+#define GL_DOUBLE_MAT3 0x8F47
+#define GL_DOUBLE_MAT4 0x8F48
+#define GL_DOUBLE_MAT2x3 0x8F49
+#define GL_DOUBLE_MAT2x4 0x8F4A
+#define GL_DOUBLE_MAT3x2 0x8F4B
+#define GL_DOUBLE_MAT3x4 0x8F4C
+#define GL_DOUBLE_MAT4x2 0x8F4D
+#define GL_DOUBLE_MAT4x3 0x8F4E
+
+#define GL_SAMPLER_1D 0x8B5D
+#define GL_SAMPLER_2D 0x8B5E
+#define GL_SAMPLER_3D 0x8B5F
+#define GL_SAMPLER_CUBE 0x8B60
+#define GL_SAMPLER_BUFFER 0x8DC2
+#define GL_SAMPLER_1D_ARRAY 0x8DC0
+#define GL_SAMPLER_2D_ARRAY 0x8DC1
+#define GL_SAMPLER_1D_ARRAY_SHADOW 0x8DC3
+#define GL_SAMPLER_2D_ARRAY_SHADOW 0x8DC4
+#define GL_SAMPLER_CUBE_SHADOW 0x8DC5
+#define GL_SAMPLER_1D_SHADOW 0x8B61
+#define GL_SAMPLER_2D_SHADOW 0x8B62
+#define GL_SAMPLER_2D_RECT 0x8B63
+#define GL_SAMPLER_2D_RECT_SHADOW 0x8B64
+#define GL_SAMPLER_2D_MULTISAMPLE 0x9108
+#define GL_SAMPLER_2D_MULTISAMPLE_ARRAY 0x910B
+#define GL_SAMPLER_CUBE_MAP_ARRAY 0x900C
+#define GL_SAMPLER_CUBE_MAP_ARRAY_SHADOW 0x900D
+#define GL_SAMPLER_CUBE_MAP_ARRAY_ARB 0x900C
+#define GL_SAMPLER_CUBE_MAP_ARRAY_SHADOW_ARB 0x900D
+
+#define GL_INT_SAMPLER_1D 0x8DC9
+#define GL_INT_SAMPLER_2D 0x8DCA
+#define GL_INT_SAMPLER_3D 0x8DCB
+#define GL_INT_SAMPLER_CUBE 0x8DCC
+#define GL_INT_SAMPLER_1D_ARRAY 0x8DCE
+#define GL_INT_SAMPLER_2D_ARRAY 0x8DCF
+#define GL_INT_SAMPLER_2D_RECT 0x8DCD
+#define GL_INT_SAMPLER_BUFFER 0x8DD0
+#define GL_INT_SAMPLER_2D_MULTISAMPLE 0x9109
+#define GL_INT_SAMPLER_2D_MULTISAMPLE_ARRAY 0x910C
+#define GL_INT_SAMPLER_CUBE_MAP_ARRAY 0x900E
+#define GL_INT_SAMPLER_CUBE_MAP_ARRAY_ARB 0x900E
+
+#define GL_UNSIGNED_INT_SAMPLER_1D 0x8DD1
+#define GL_UNSIGNED_INT_SAMPLER_2D 0x8DD2
+#define GL_UNSIGNED_INT_SAMPLER_3D 0x8DD3
+#define GL_UNSIGNED_INT_SAMPLER_CUBE 0x8DD4
+#define GL_UNSIGNED_INT_SAMPLER_1D_ARRAY 0x8DD6
+#define GL_UNSIGNED_INT_SAMPLER_2D_ARRAY 0x8DD7
+#define GL_UNSIGNED_INT_SAMPLER_2D_RECT 0x8DD5
+#define GL_UNSIGNED_INT_SAMPLER_BUFFER 0x8DD8
+#define GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE_ARRAY 0x910D
+#define GL_UNSIGNED_INT_SAMPLER_CUBE_MAP_ARRAY 0x900F
+#define GL_UNSIGNED_INT_SAMPLER_CUBE_MAP_ARRAY_ARB 0x900F
+#define GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE 0x910A
+
+#define GL_IMAGE_1D 0x904C
+#define GL_IMAGE_2D 0x904D
+#define GL_IMAGE_3D 0x904E
+#define GL_IMAGE_2D_RECT 0x904F
+#define GL_IMAGE_CUBE 0x9050
+#define GL_IMAGE_BUFFER 0x9051
+#define GL_IMAGE_1D_ARRAY 0x9052
+#define GL_IMAGE_2D_ARRAY 0x9053
+#define GL_IMAGE_CUBE_MAP_ARRAY 0x9054
+#define GL_IMAGE_2D_MULTISAMPLE 0x9055
+#define GL_IMAGE_2D_MULTISAMPLE_ARRAY 0x9056
+#define GL_INT_IMAGE_1D 0x9057
+#define GL_INT_IMAGE_2D 0x9058
+#define GL_INT_IMAGE_3D 0x9059
+#define GL_INT_IMAGE_2D_RECT 0x905A
+#define GL_INT_IMAGE_CUBE 0x905B
+#define GL_INT_IMAGE_BUFFER 0x905C
+#define GL_INT_IMAGE_1D_ARRAY 0x905D
+#define GL_INT_IMAGE_2D_ARRAY 0x905E
+#define GL_INT_IMAGE_CUBE_MAP_ARRAY 0x905F
+#define GL_INT_IMAGE_2D_MULTISAMPLE 0x9060
+#define GL_INT_IMAGE_2D_MULTISAMPLE_ARRAY 0x9061
+#define GL_UNSIGNED_INT_IMAGE_1D 0x9062
+#define GL_UNSIGNED_INT_IMAGE_2D 0x9063
+#define GL_UNSIGNED_INT_IMAGE_3D 0x9064
+#define GL_UNSIGNED_INT_IMAGE_2D_RECT 0x9065
+#define GL_UNSIGNED_INT_IMAGE_CUBE 0x9066
+#define GL_UNSIGNED_INT_IMAGE_BUFFER 0x9067
+#define GL_UNSIGNED_INT_IMAGE_1D_ARRAY 0x9068
+#define GL_UNSIGNED_INT_IMAGE_2D_ARRAY 0x9069
+#define GL_UNSIGNED_INT_IMAGE_CUBE_MAP_ARRAY 0x906A
+#define GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE 0x906B
+#define GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE_ARRAY 0x906C
+
+#define GL_UNSIGNED_INT_ATOMIC_COUNTER 0x92DB
diff --git a/chromium/third_party/glslang/src/glslang/MachineIndependent/glslang.y b/chromium/third_party/glslang/src/glslang/MachineIndependent/glslang.y
new file mode 100644
index 00000000000..4f8e3fc108c
--- /dev/null
+++ b/chromium/third_party/glslang/src/glslang/MachineIndependent/glslang.y
@@ -0,0 +1,2703 @@
+//
+//Copyright (C) 2002-2005 3Dlabs Inc. Ltd.
+//Copyright (C) 2012-2013 LunarG, 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:
+//
+// Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 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.
+//
+// Neither the name of 3Dlabs Inc. Ltd. nor the names of its
+// contributors may be used to endorse or promote products derived
+// from this software without specific prior written permission.
+//
+//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+//"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 THE
+//COPYRIGHT HOLDERS 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.
+//
+
+/**
+ * This is bison grammar and productions for parsing all versions of the
+ * GLSL shading languages.
+ */
+%{
+
+/* Based on:
+ANSI C Yacc grammar
+
+In 1985, Jeff Lee published his Yacc grammar (which is accompanied by a
+matching Lex specification) for the April 30, 1985 draft version of the
+ANSI C standard. Tom Stockfisch reposted it to net.sources in 1987; that
+original, as mentioned in the answer to question 17.25 of the comp.lang.c
+FAQ, can be ftp'ed from ftp.uu.net, file usenet/net.sources/ansi.c.grammar.Z.
+
+I intend to keep this version as close to the current C Standard grammar as
+possible; please let me know if you discover discrepancies.
+
+Jutta Degener, 1995
+*/
+
+#include "SymbolTable.h"
+#include "ParseHelper.h"
+#include "../Public/ShaderLang.h"
+
+using namespace glslang;
+
+%}
+
+%union {
+ struct {
+ glslang::TSourceLoc loc;
+ union {
+ glslang::TString *string;
+ int i;
+ unsigned int u;
+ long long i64;
+ unsigned long long u64;
+ bool b;
+ double d;
+ };
+ glslang::TSymbol* symbol;
+ } lex;
+ struct {
+ glslang::TSourceLoc loc;
+ glslang::TOperator op;
+ union {
+ TIntermNode* intermNode;
+ glslang::TIntermNodePair nodePair;
+ glslang::TIntermTyped* intermTypedNode;
+ };
+ union {
+ glslang::TPublicType type;
+ glslang::TFunction* function;
+ glslang::TParameter param;
+ glslang::TTypeLoc typeLine;
+ glslang::TTypeList* typeList;
+ glslang::TArraySizes* arraySizes;
+ glslang::TIdentifierList* identifierList;
+ };
+ } interm;
+}
+
+%{
+
+/* windows only pragma */
+#ifdef _MSC_VER
+ #pragma warning(disable : 4065)
+ #pragma warning(disable : 4127)
+ #pragma warning(disable : 4244)
+#endif
+
+#define parseContext (*pParseContext)
+#define yyerror(context, msg) context->parserError(msg)
+
+extern int yylex(YYSTYPE*, TParseContext&);
+
+%}
+
+%parse-param {glslang::TParseContext* pParseContext}
+%lex-param {parseContext}
+%pure-parser // enable thread safety
+%expect 1 // One shift reduce conflict because of if | else
+
+%token <lex> ATTRIBUTE VARYING
+%token <lex> CONST BOOL FLOAT DOUBLE INT UINT INT64_T UINT64_T
+%token <lex> BREAK CONTINUE DO ELSE FOR IF DISCARD RETURN SWITCH CASE DEFAULT SUBROUTINE
+%token <lex> BVEC2 BVEC3 BVEC4 IVEC2 IVEC3 IVEC4 I64VEC2 I64VEC3 I64VEC4 UVEC2 UVEC3 UVEC4 U64VEC2 U64VEC3 U64VEC4 VEC2 VEC3 VEC4
+%token <lex> MAT2 MAT3 MAT4 CENTROID IN OUT INOUT
+%token <lex> UNIFORM PATCH SAMPLE BUFFER SHARED
+%token <lex> COHERENT VOLATILE RESTRICT READONLY WRITEONLY
+%token <lex> DVEC2 DVEC3 DVEC4 DMAT2 DMAT3 DMAT4
+%token <lex> NOPERSPECTIVE FLAT SMOOTH LAYOUT
+
+%token <lex> MAT2X2 MAT2X3 MAT2X4
+%token <lex> MAT3X2 MAT3X3 MAT3X4
+%token <lex> MAT4X2 MAT4X3 MAT4X4
+%token <lex> DMAT2X2 DMAT2X3 DMAT2X4
+%token <lex> DMAT3X2 DMAT3X3 DMAT3X4
+%token <lex> DMAT4X2 DMAT4X3 DMAT4X4
+%token <lex> ATOMIC_UINT
+
+// combined image/sampler
+%token <lex> SAMPLER1D SAMPLER2D SAMPLER3D SAMPLERCUBE SAMPLER1DSHADOW SAMPLER2DSHADOW
+%token <lex> SAMPLERCUBESHADOW SAMPLER1DARRAY SAMPLER2DARRAY SAMPLER1DARRAYSHADOW
+%token <lex> SAMPLER2DARRAYSHADOW ISAMPLER1D ISAMPLER2D ISAMPLER3D ISAMPLERCUBE
+%token <lex> ISAMPLER1DARRAY ISAMPLER2DARRAY USAMPLER1D USAMPLER2D USAMPLER3D
+%token <lex> USAMPLERCUBE USAMPLER1DARRAY USAMPLER2DARRAY
+%token <lex> SAMPLER2DRECT SAMPLER2DRECTSHADOW ISAMPLER2DRECT USAMPLER2DRECT
+%token <lex> SAMPLERBUFFER ISAMPLERBUFFER USAMPLERBUFFER
+%token <lex> SAMPLERCUBEARRAY SAMPLERCUBEARRAYSHADOW
+%token <lex> ISAMPLERCUBEARRAY USAMPLERCUBEARRAY
+%token <lex> SAMPLER2DMS ISAMPLER2DMS USAMPLER2DMS
+%token <lex> SAMPLER2DMSARRAY ISAMPLER2DMSARRAY USAMPLER2DMSARRAY
+%token <lex> SAMPLEREXTERNALOES
+
+// pure sampler
+%token <lex> SAMPLER SAMPLERSHADOW
+
+// texture without sampler
+%token <lex> TEXTURE1D TEXTURE2D TEXTURE3D TEXTURECUBE
+%token <lex> TEXTURE1DARRAY TEXTURE2DARRAY
+%token <lex> ITEXTURE1D ITEXTURE2D ITEXTURE3D ITEXTURECUBE
+%token <lex> ITEXTURE1DARRAY ITEXTURE2DARRAY UTEXTURE1D UTEXTURE2D UTEXTURE3D
+%token <lex> UTEXTURECUBE UTEXTURE1DARRAY UTEXTURE2DARRAY
+%token <lex> TEXTURE2DRECT ITEXTURE2DRECT UTEXTURE2DRECT
+%token <lex> TEXTUREBUFFER ITEXTUREBUFFER UTEXTUREBUFFER
+%token <lex> TEXTURECUBEARRAY ITEXTURECUBEARRAY UTEXTURECUBEARRAY
+%token <lex> TEXTURE2DMS ITEXTURE2DMS UTEXTURE2DMS
+%token <lex> TEXTURE2DMSARRAY ITEXTURE2DMSARRAY UTEXTURE2DMSARRAY
+
+// input attachments
+%token <lex> SUBPASSINPUT SUBPASSINPUTMS ISUBPASSINPUT ISUBPASSINPUTMS USUBPASSINPUT USUBPASSINPUTMS
+
+%token <lex> IMAGE1D IIMAGE1D UIMAGE1D IMAGE2D IIMAGE2D
+%token <lex> UIMAGE2D IMAGE3D IIMAGE3D UIMAGE3D
+%token <lex> IMAGE2DRECT IIMAGE2DRECT UIMAGE2DRECT
+%token <lex> IMAGECUBE IIMAGECUBE UIMAGECUBE
+%token <lex> IMAGEBUFFER IIMAGEBUFFER UIMAGEBUFFER
+%token <lex> IMAGE1DARRAY IIMAGE1DARRAY UIMAGE1DARRAY
+%token <lex> IMAGE2DARRAY IIMAGE2DARRAY UIMAGE2DARRAY
+%token <lex> IMAGECUBEARRAY IIMAGECUBEARRAY UIMAGECUBEARRAY
+%token <lex> IMAGE2DMS IIMAGE2DMS UIMAGE2DMS
+%token <lex> IMAGE2DMSARRAY IIMAGE2DMSARRAY UIMAGE2DMSARRAY
+
+%token <lex> STRUCT VOID WHILE
+
+%token <lex> IDENTIFIER TYPE_NAME
+%token <lex> FLOATCONSTANT DOUBLECONSTANT INTCONSTANT UINTCONSTANT INT64CONSTANT UINT64CONSTANT BOOLCONSTANT
+%token <lex> LEFT_OP RIGHT_OP
+%token <lex> INC_OP DEC_OP LE_OP GE_OP EQ_OP NE_OP
+%token <lex> AND_OP OR_OP XOR_OP MUL_ASSIGN DIV_ASSIGN ADD_ASSIGN
+%token <lex> MOD_ASSIGN LEFT_ASSIGN RIGHT_ASSIGN AND_ASSIGN XOR_ASSIGN OR_ASSIGN
+%token <lex> SUB_ASSIGN
+
+%token <lex> LEFT_PAREN RIGHT_PAREN LEFT_BRACKET RIGHT_BRACKET LEFT_BRACE RIGHT_BRACE DOT
+%token <lex> COMMA COLON EQUAL SEMICOLON BANG DASH TILDE PLUS STAR SLASH PERCENT
+%token <lex> LEFT_ANGLE RIGHT_ANGLE VERTICAL_BAR CARET AMPERSAND QUESTION
+
+%token <lex> INVARIANT PRECISE
+%token <lex> HIGH_PRECISION MEDIUM_PRECISION LOW_PRECISION PRECISION
+
+%token <lex> PACKED RESOURCE SUPERP
+
+%type <interm> assignment_operator unary_operator
+%type <interm.intermTypedNode> variable_identifier primary_expression postfix_expression
+%type <interm.intermTypedNode> expression integer_expression assignment_expression
+%type <interm.intermTypedNode> unary_expression multiplicative_expression additive_expression
+%type <interm.intermTypedNode> relational_expression equality_expression
+%type <interm.intermTypedNode> conditional_expression constant_expression
+%type <interm.intermTypedNode> logical_or_expression logical_xor_expression logical_and_expression
+%type <interm.intermTypedNode> shift_expression and_expression exclusive_or_expression inclusive_or_expression
+%type <interm.intermTypedNode> function_call initializer initializer_list condition conditionopt
+
+%type <interm.intermNode> translation_unit function_definition
+%type <interm.intermNode> statement simple_statement
+%type <interm.intermNode> statement_list switch_statement_list compound_statement
+%type <interm.intermNode> declaration_statement selection_statement expression_statement
+%type <interm.intermNode> switch_statement case_label
+%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 statement_scoped
+%type <interm> single_declaration init_declarator_list
+
+%type <interm> parameter_declaration parameter_declarator parameter_type_specifier
+
+%type <interm> array_specifier
+%type <interm.type> precise_qualifier invariant_qualifier interpolation_qualifier storage_qualifier precision_qualifier
+%type <interm.type> layout_qualifier layout_qualifier_id_list layout_qualifier_id
+
+%type <interm.type> type_qualifier fully_specified_type type_specifier
+%type <interm.type> single_type_qualifier
+%type <interm.type> type_specifier_nonarray
+%type <interm.type> struct_specifier
+%type <interm.typeLine> struct_declarator
+%type <interm.typeList> struct_declarator_list struct_declaration struct_declaration_list type_name_list
+%type <interm> block_structure
+%type <interm.function> function_header function_declarator
+%type <interm.function> function_header_with_parameters
+%type <interm> function_call_header_with_parameters function_call_header_no_parameters function_call_generic function_prototype
+%type <interm> function_call_or_method function_identifier function_call_header
+
+%type <interm.identifierList> identifier_list
+
+%start translation_unit
+%%
+
+variable_identifier
+ : IDENTIFIER {
+ $$ = parseContext.handleVariable($1.loc, $1.symbol, $1.string);
+ }
+ ;
+
+primary_expression
+ : variable_identifier {
+ $$ = $1;
+ }
+ | INTCONSTANT {
+ $$ = parseContext.intermediate.addConstantUnion($1.i, $1.loc, true);
+ }
+ | UINTCONSTANT {
+ parseContext.fullIntegerCheck($1.loc, "unsigned literal");
+ $$ = parseContext.intermediate.addConstantUnion($1.u, $1.loc, true);
+ }
+ | INT64CONSTANT {
+ parseContext.int64Check($1.loc, "64-bit integer literal");
+ $$ = parseContext.intermediate.addConstantUnion($1.i64, $1.loc, true);
+ }
+ | UINT64CONSTANT {
+ parseContext.int64Check($1.loc, "64-bit unsigned integer literal");
+ $$ = parseContext.intermediate.addConstantUnion($1.u64, $1.loc, true);
+ }
+ | FLOATCONSTANT {
+ $$ = parseContext.intermediate.addConstantUnion($1.d, EbtFloat, $1.loc, true);
+ }
+ | DOUBLECONSTANT {
+ parseContext.doubleCheck($1.loc, "double literal");
+ $$ = parseContext.intermediate.addConstantUnion($1.d, EbtDouble, $1.loc, true);
+ }
+ | BOOLCONSTANT {
+ $$ = parseContext.intermediate.addConstantUnion($1.b, $1.loc, true);
+ }
+ | LEFT_PAREN expression RIGHT_PAREN {
+ $$ = $2;
+ if ($$->getAsConstantUnion())
+ $$->getAsConstantUnion()->setExpression();
+ }
+ ;
+
+postfix_expression
+ : primary_expression {
+ $$ = $1;
+ }
+ | postfix_expression LEFT_BRACKET integer_expression RIGHT_BRACKET {
+ $$ = parseContext.handleBracketDereference($2.loc, $1, $3);
+ }
+ | function_call {
+ $$ = $1;
+ }
+ | postfix_expression DOT IDENTIFIER {
+ $$ = parseContext.handleDotDereference($3.loc, $1, *$3.string);
+ }
+ | postfix_expression INC_OP {
+ parseContext.variableCheck($1);
+ parseContext.lValueErrorCheck($2.loc, "++", $1);
+ $$ = parseContext.handleUnaryMath($2.loc, "++", EOpPostIncrement, $1);
+ }
+ | postfix_expression DEC_OP {
+ parseContext.variableCheck($1);
+ parseContext.lValueErrorCheck($2.loc, "--", $1);
+ $$ = parseContext.handleUnaryMath($2.loc, "--", EOpPostDecrement, $1);
+ }
+ ;
+
+integer_expression
+ : expression {
+ parseContext.integerCheck($1, "[]");
+ $$ = $1;
+ }
+ ;
+
+function_call
+ : function_call_or_method {
+ $$ = parseContext.handleFunctionCall($1.loc, $1.function, $1.intermNode);
+ delete $1.function;
+ }
+ ;
+
+function_call_or_method
+ : function_call_generic {
+ $$ = $1;
+ }
+ ;
+
+function_call_generic
+ : function_call_header_with_parameters RIGHT_PAREN {
+ $$ = $1;
+ $$.loc = $2.loc;
+ }
+ | function_call_header_no_parameters RIGHT_PAREN {
+ $$ = $1;
+ $$.loc = $2.loc;
+ }
+ ;
+
+function_call_header_no_parameters
+ : function_call_header VOID {
+ $$ = $1;
+ }
+ | function_call_header {
+ $$ = $1;
+ }
+ ;
+
+function_call_header_with_parameters
+ : function_call_header assignment_expression {
+ TParameter param = { 0, new TType };
+ param.type->shallowCopy($2->getType());
+ $1.function->addParameter(param);
+ $$.function = $1.function;
+ $$.intermNode = $2;
+ }
+ | function_call_header_with_parameters COMMA assignment_expression {
+ TParameter param = { 0, new TType };
+ param.type->shallowCopy($3->getType());
+ $1.function->addParameter(param);
+ $$.function = $1.function;
+ $$.intermNode = parseContext.intermediate.growAggregate($1.intermNode, $3, $2.loc);
+ }
+ ;
+
+function_call_header
+ : function_identifier LEFT_PAREN {
+ $$ = $1;
+ }
+ ;
+
+// Grammar Note: Constructors look like functions, but are recognized as types.
+
+function_identifier
+ : type_specifier {
+ // Constructor
+ $$.intermNode = 0;
+ $$.function = parseContext.handleConstructorCall($1.loc, $1);
+ }
+ | postfix_expression {
+ //
+ // Should be a method or subroutine call, but we haven't recognized the arguments yet.
+ //
+ $$.function = 0;
+ $$.intermNode = 0;
+
+ TIntermMethod* method = $1->getAsMethodNode();
+ if (method) {
+ $$.function = new TFunction(&method->getMethodName(), TType(EbtInt), EOpArrayLength);
+ $$.intermNode = method->getObject();
+ } else {
+ TIntermSymbol* symbol = $1->getAsSymbolNode();
+ if (symbol) {
+ parseContext.reservedErrorCheck(symbol->getLoc(), symbol->getName());
+ TFunction *function = new TFunction(&symbol->getName(), TType(EbtVoid));
+ $$.function = function;
+ } else
+ parseContext.error($1->getLoc(), "function call, method, or subroutine call expected", "", "");
+ }
+
+ if ($$.function == 0) {
+ // error recover
+ TString empty("");
+ $$.function = new TFunction(&empty, TType(EbtVoid), EOpNull);
+ }
+ }
+ ;
+
+unary_expression
+ : postfix_expression {
+ parseContext.variableCheck($1);
+ $$ = $1;
+ if (TIntermMethod* method = $1->getAsMethodNode())
+ parseContext.error($1->getLoc(), "incomplete method syntax", method->getMethodName().c_str(), "");
+ }
+ | INC_OP unary_expression {
+ parseContext.lValueErrorCheck($1.loc, "++", $2);
+ $$ = parseContext.handleUnaryMath($1.loc, "++", EOpPreIncrement, $2);
+ }
+ | DEC_OP unary_expression {
+ parseContext.lValueErrorCheck($1.loc, "--", $2);
+ $$ = parseContext.handleUnaryMath($1.loc, "--", EOpPreDecrement, $2);
+ }
+ | unary_operator unary_expression {
+ if ($1.op != EOpNull) {
+ char errorOp[2] = {0, 0};
+ switch($1.op) {
+ case EOpNegative: errorOp[0] = '-'; break;
+ case EOpLogicalNot: errorOp[0] = '!'; break;
+ case EOpBitwiseNot: errorOp[0] = '~'; break;
+ default: break; // some compilers want this
+ }
+ $$ = parseContext.handleUnaryMath($1.loc, errorOp, $1.op, $2);
+ } else {
+ $$ = $2;
+ if ($$->getAsConstantUnion())
+ $$->getAsConstantUnion()->setExpression();
+ }
+ }
+ ;
+// Grammar Note: No traditional style type casts.
+
+unary_operator
+ : PLUS { $$.loc = $1.loc; $$.op = EOpNull; }
+ | DASH { $$.loc = $1.loc; $$.op = EOpNegative; }
+ | BANG { $$.loc = $1.loc; $$.op = EOpLogicalNot; }
+ | TILDE { $$.loc = $1.loc; $$.op = EOpBitwiseNot;
+ parseContext.fullIntegerCheck($1.loc, "bitwise not"); }
+ ;
+// Grammar Note: No '*' or '&' unary ops. Pointers are not supported.
+
+multiplicative_expression
+ : unary_expression { $$ = $1; }
+ | multiplicative_expression STAR unary_expression {
+ $$ = parseContext.handleBinaryMath($2.loc, "*", EOpMul, $1, $3);
+ if ($$ == 0)
+ $$ = $1;
+ }
+ | multiplicative_expression SLASH unary_expression {
+ $$ = parseContext.handleBinaryMath($2.loc, "/", EOpDiv, $1, $3);
+ if ($$ == 0)
+ $$ = $1;
+ }
+ | multiplicative_expression PERCENT unary_expression {
+ parseContext.fullIntegerCheck($2.loc, "%");
+ $$ = parseContext.handleBinaryMath($2.loc, "%", EOpMod, $1, $3);
+ if ($$ == 0)
+ $$ = $1;
+ }
+ ;
+
+additive_expression
+ : multiplicative_expression { $$ = $1; }
+ | additive_expression PLUS multiplicative_expression {
+ $$ = parseContext.handleBinaryMath($2.loc, "+", EOpAdd, $1, $3);
+ if ($$ == 0)
+ $$ = $1;
+ }
+ | additive_expression DASH multiplicative_expression {
+ $$ = parseContext.handleBinaryMath($2.loc, "-", EOpSub, $1, $3);
+ if ($$ == 0)
+ $$ = $1;
+ }
+ ;
+
+shift_expression
+ : additive_expression { $$ = $1; }
+ | shift_expression LEFT_OP additive_expression {
+ parseContext.fullIntegerCheck($2.loc, "bit shift left");
+ $$ = parseContext.handleBinaryMath($2.loc, "<<", EOpLeftShift, $1, $3);
+ if ($$ == 0)
+ $$ = $1;
+ }
+ | shift_expression RIGHT_OP additive_expression {
+ parseContext.fullIntegerCheck($2.loc, "bit shift right");
+ $$ = parseContext.handleBinaryMath($2.loc, ">>", EOpRightShift, $1, $3);
+ if ($$ == 0)
+ $$ = $1;
+ }
+ ;
+
+relational_expression
+ : shift_expression { $$ = $1; }
+ | relational_expression LEFT_ANGLE shift_expression {
+ $$ = parseContext.handleBinaryMath($2.loc, "<", EOpLessThan, $1, $3);
+ if ($$ == 0)
+ $$ = parseContext.intermediate.addConstantUnion(false, $2.loc);
+ }
+ | relational_expression RIGHT_ANGLE shift_expression {
+ $$ = parseContext.handleBinaryMath($2.loc, ">", EOpGreaterThan, $1, $3);
+ if ($$ == 0)
+ $$ = parseContext.intermediate.addConstantUnion(false, $2.loc);
+ }
+ | relational_expression LE_OP shift_expression {
+ $$ = parseContext.handleBinaryMath($2.loc, "<=", EOpLessThanEqual, $1, $3);
+ if ($$ == 0)
+ $$ = parseContext.intermediate.addConstantUnion(false, $2.loc);
+ }
+ | relational_expression GE_OP shift_expression {
+ $$ = parseContext.handleBinaryMath($2.loc, ">=", EOpGreaterThanEqual, $1, $3);
+ if ($$ == 0)
+ $$ = parseContext.intermediate.addConstantUnion(false, $2.loc);
+ }
+ ;
+
+equality_expression
+ : relational_expression { $$ = $1; }
+ | equality_expression EQ_OP relational_expression {
+ parseContext.arrayObjectCheck($2.loc, $1->getType(), "array comparison");
+ parseContext.opaqueCheck($2.loc, $1->getType(), "==");
+ parseContext.specializationCheck($2.loc, $1->getType(), "==");
+ $$ = parseContext.handleBinaryMath($2.loc, "==", EOpEqual, $1, $3);
+ if ($$ == 0)
+ $$ = parseContext.intermediate.addConstantUnion(false, $2.loc);
+ }
+ | equality_expression NE_OP relational_expression {
+ parseContext.arrayObjectCheck($2.loc, $1->getType(), "array comparison");
+ parseContext.opaqueCheck($2.loc, $1->getType(), "!=");
+ parseContext.specializationCheck($2.loc, $1->getType(), "!=");
+ $$ = parseContext.handleBinaryMath($2.loc, "!=", EOpNotEqual, $1, $3);
+ if ($$ == 0)
+ $$ = parseContext.intermediate.addConstantUnion(false, $2.loc);
+ }
+ ;
+
+and_expression
+ : equality_expression { $$ = $1; }
+ | and_expression AMPERSAND equality_expression {
+ parseContext.fullIntegerCheck($2.loc, "bitwise and");
+ $$ = parseContext.handleBinaryMath($2.loc, "&", EOpAnd, $1, $3);
+ if ($$ == 0)
+ $$ = $1;
+ }
+ ;
+
+exclusive_or_expression
+ : and_expression { $$ = $1; }
+ | exclusive_or_expression CARET and_expression {
+ parseContext.fullIntegerCheck($2.loc, "bitwise exclusive or");
+ $$ = parseContext.handleBinaryMath($2.loc, "^", EOpExclusiveOr, $1, $3);
+ if ($$ == 0)
+ $$ = $1;
+ }
+ ;
+
+inclusive_or_expression
+ : exclusive_or_expression { $$ = $1; }
+ | inclusive_or_expression VERTICAL_BAR exclusive_or_expression {
+ parseContext.fullIntegerCheck($2.loc, "bitwise inclusive or");
+ $$ = parseContext.handleBinaryMath($2.loc, "|", EOpInclusiveOr, $1, $3);
+ if ($$ == 0)
+ $$ = $1;
+ }
+ ;
+
+logical_and_expression
+ : inclusive_or_expression { $$ = $1; }
+ | logical_and_expression AND_OP inclusive_or_expression {
+ $$ = parseContext.handleBinaryMath($2.loc, "&&", EOpLogicalAnd, $1, $3);
+ if ($$ == 0)
+ $$ = parseContext.intermediate.addConstantUnion(false, $2.loc);
+ }
+ ;
+
+logical_xor_expression
+ : logical_and_expression { $$ = $1; }
+ | logical_xor_expression XOR_OP logical_and_expression {
+ $$ = parseContext.handleBinaryMath($2.loc, "^^", EOpLogicalXor, $1, $3);
+ if ($$ == 0)
+ $$ = parseContext.intermediate.addConstantUnion(false, $2.loc);
+ }
+ ;
+
+logical_or_expression
+ : logical_xor_expression { $$ = $1; }
+ | logical_or_expression OR_OP logical_xor_expression {
+ $$ = parseContext.handleBinaryMath($2.loc, "||", EOpLogicalOr, $1, $3);
+ if ($$ == 0)
+ $$ = parseContext.intermediate.addConstantUnion(false, $2.loc);
+ }
+ ;
+
+conditional_expression
+ : logical_or_expression { $$ = $1; }
+ | logical_or_expression QUESTION {
+ ++parseContext.controlFlowNestingLevel;
+ }
+ expression COLON assignment_expression {
+ --parseContext.controlFlowNestingLevel;
+ parseContext.boolCheck($2.loc, $1);
+ parseContext.rValueErrorCheck($2.loc, "?", $1);
+ parseContext.rValueErrorCheck($5.loc, ":", $4);
+ parseContext.rValueErrorCheck($5.loc, ":", $6);
+ $$ = parseContext.intermediate.addSelection($1, $4, $6, $2.loc);
+ if ($$ == 0) {
+ parseContext.binaryOpError($2.loc, ":", $4->getCompleteString(), $6->getCompleteString());
+ $$ = $6;
+ }
+ }
+ ;
+
+assignment_expression
+ : conditional_expression { $$ = $1; }
+ | unary_expression assignment_operator assignment_expression {
+ parseContext.arrayObjectCheck($2.loc, $1->getType(), "array assignment");
+ parseContext.opaqueCheck($2.loc, $1->getType(), "=");
+ parseContext.specializationCheck($2.loc, $1->getType(), "=");
+ parseContext.lValueErrorCheck($2.loc, "assign", $1);
+ parseContext.rValueErrorCheck($2.loc, "assign", $3);
+ $$ = parseContext.intermediate.addAssign($2.op, $1, $3, $2.loc);
+ if ($$ == 0) {
+ parseContext.assignError($2.loc, "assign", $1->getCompleteString(), $3->getCompleteString());
+ $$ = $1;
+ }
+ }
+ ;
+
+assignment_operator
+ : EQUAL {
+ $$.loc = $1.loc;
+ $$.op = EOpAssign;
+ }
+ | MUL_ASSIGN {
+ $$.loc = $1.loc;
+ $$.op = EOpMulAssign;
+ }
+ | DIV_ASSIGN {
+ $$.loc = $1.loc;
+ $$.op = EOpDivAssign;
+ }
+ | MOD_ASSIGN {
+ parseContext.fullIntegerCheck($1.loc, "%=");
+ $$.loc = $1.loc;
+ $$.op = EOpModAssign;
+ }
+ | ADD_ASSIGN {
+ $$.loc = $1.loc;
+ $$.op = EOpAddAssign;
+ }
+ | SUB_ASSIGN {
+ $$.loc = $1.loc;
+ $$.op = EOpSubAssign;
+ }
+ | LEFT_ASSIGN {
+ parseContext.fullIntegerCheck($1.loc, "bit-shift left assign");
+ $$.loc = $1.loc; $$.op = EOpLeftShiftAssign;
+ }
+ | RIGHT_ASSIGN {
+ parseContext.fullIntegerCheck($1.loc, "bit-shift right assign");
+ $$.loc = $1.loc; $$.op = EOpRightShiftAssign;
+ }
+ | AND_ASSIGN {
+ parseContext.fullIntegerCheck($1.loc, "bitwise-and assign");
+ $$.loc = $1.loc; $$.op = EOpAndAssign;
+ }
+ | XOR_ASSIGN {
+ parseContext.fullIntegerCheck($1.loc, "bitwise-xor assign");
+ $$.loc = $1.loc; $$.op = EOpExclusiveOrAssign;
+ }
+ | OR_ASSIGN {
+ parseContext.fullIntegerCheck($1.loc, "bitwise-or assign");
+ $$.loc = $1.loc; $$.op = EOpInclusiveOrAssign;
+ }
+ ;
+
+expression
+ : assignment_expression {
+ $$ = $1;
+ }
+ | expression COMMA assignment_expression {
+ $$ = parseContext.intermediate.addComma($1, $3, $2.loc);
+ if ($$ == 0) {
+ parseContext.binaryOpError($2.loc, ",", $1->getCompleteString(), $3->getCompleteString());
+ $$ = $3;
+ }
+ }
+ ;
+
+constant_expression
+ : conditional_expression {
+ parseContext.constantValueCheck($1, "");
+ $$ = $1;
+ }
+ ;
+
+declaration
+ : function_prototype SEMICOLON {
+ parseContext.handleFunctionDeclarator($1.loc, *$1.function, true /* prototype */);
+ $$ = 0;
+ // TODO: 4.0 functionality: subroutines: make the identifier a user type for this signature
+ }
+ | init_declarator_list SEMICOLON {
+ if ($1.intermNode && $1.intermNode->getAsAggregate())
+ $1.intermNode->getAsAggregate()->setOperator(EOpSequence);
+ $$ = $1.intermNode;
+ }
+ | PRECISION precision_qualifier type_specifier SEMICOLON {
+ parseContext.profileRequires($1.loc, ENoProfile, 130, 0, "precision statement");
+
+ // lazy setting of the previous scope's defaults, has effect only the first time it is called in a particular scope
+ parseContext.symbolTable.setPreviousDefaultPrecisions(&parseContext.defaultPrecision[0]);
+ parseContext.setDefaultPrecision($1.loc, $3, $2.qualifier.precision);
+ $$ = 0;
+ }
+ | block_structure SEMICOLON {
+ parseContext.declareBlock($1.loc, *$1.typeList);
+ $$ = 0;
+ }
+ | block_structure IDENTIFIER SEMICOLON {
+ parseContext.declareBlock($1.loc, *$1.typeList, $2.string);
+ $$ = 0;
+ }
+ | block_structure IDENTIFIER array_specifier SEMICOLON {
+ parseContext.declareBlock($1.loc, *$1.typeList, $2.string, $3.arraySizes);
+ $$ = 0;
+ }
+ | type_qualifier SEMICOLON {
+ parseContext.globalQualifierFixCheck($1.loc, $1.qualifier);
+ parseContext.updateStandaloneQualifierDefaults($1.loc, $1);
+ $$ = 0;
+ }
+ | type_qualifier IDENTIFIER SEMICOLON {
+ parseContext.checkNoShaderLayouts($1.loc, $1.shaderQualifiers);
+ parseContext.addQualifierToExisting($1.loc, $1.qualifier, *$2.string);
+ $$ = 0;
+ }
+ | type_qualifier IDENTIFIER identifier_list SEMICOLON {
+ parseContext.checkNoShaderLayouts($1.loc, $1.shaderQualifiers);
+ $3->push_back($2.string);
+ parseContext.addQualifierToExisting($1.loc, $1.qualifier, *$3);
+ $$ = 0;
+ }
+ ;
+
+block_structure
+ : type_qualifier IDENTIFIER LEFT_BRACE { parseContext.nestedBlockCheck($1.loc); } struct_declaration_list RIGHT_BRACE {
+ --parseContext.structNestingLevel;
+ parseContext.blockName = $2.string;
+ parseContext.globalQualifierFixCheck($1.loc, $1.qualifier);
+ parseContext.checkNoShaderLayouts($1.loc, $1.shaderQualifiers);
+ parseContext.currentBlockQualifier = $1.qualifier;
+ $$.loc = $1.loc;
+ $$.typeList = $5;
+ }
+
+identifier_list
+ : COMMA IDENTIFIER {
+ $$ = new TIdentifierList;
+ $$->push_back($2.string);
+ }
+ | identifier_list COMMA IDENTIFIER {
+ $$ = $1;
+ $$->push_back($3.string);
+ }
+ ;
+
+function_prototype
+ : function_declarator RIGHT_PAREN {
+ $$.function = $1;
+ $$.loc = $2.loc;
+ }
+ ;
+
+function_declarator
+ : function_header {
+ $$ = $1;
+ }
+ | function_header_with_parameters {
+ $$ = $1;
+ }
+ ;
+
+
+function_header_with_parameters
+ : function_header parameter_declaration {
+ // Add the parameter
+ $$ = $1;
+ if ($2.param.type->getBasicType() != EbtVoid)
+ $1->addParameter($2.param);
+ else
+ delete $2.param.type;
+ }
+ | function_header_with_parameters COMMA parameter_declaration {
+ //
+ // Only first parameter of one-parameter functions can be void
+ // The check for named parameters not being void is done in parameter_declarator
+ //
+ if ($3.param.type->getBasicType() == EbtVoid) {
+ //
+ // This parameter > first is void
+ //
+ parseContext.error($2.loc, "cannot be an argument type except for '(void)'", "void", "");
+ delete $3.param.type;
+ } else {
+ // Add the parameter
+ $$ = $1;
+ $1->addParameter($3.param);
+ }
+ }
+ ;
+
+function_header
+ : fully_specified_type IDENTIFIER LEFT_PAREN {
+ if ($1.qualifier.storage != EvqGlobal && $1.qualifier.storage != EvqTemporary) {
+ parseContext.error($2.loc, "no qualifiers allowed for function return",
+ GetStorageQualifierString($1.qualifier.storage), "");
+ }
+ if ($1.arraySizes)
+ parseContext.arraySizeRequiredCheck($1.loc, *$1.arraySizes);
+
+ // Add the function as a prototype after parsing it (we do not support recursion)
+ TFunction *function;
+ TType type($1);
+ function = new TFunction($2.string, type);
+ $$ = function;
+ }
+ ;
+
+parameter_declarator
+ // Type + name
+ : type_specifier IDENTIFIER {
+ if ($1.arraySizes) {
+ parseContext.profileRequires($1.loc, ENoProfile, 120, E_GL_3DL_array_objects, "arrayed type");
+ parseContext.profileRequires($1.loc, EEsProfile, 300, 0, "arrayed type");
+ parseContext.arraySizeRequiredCheck($1.loc, *$1.arraySizes);
+ }
+ if ($1.basicType == EbtVoid) {
+ parseContext.error($2.loc, "illegal use of type 'void'", $2.string->c_str(), "");
+ }
+ parseContext.reservedErrorCheck($2.loc, *$2.string);
+
+ TParameter param = {$2.string, new TType($1)};
+ $$.loc = $2.loc;
+ $$.param = param;
+ }
+ | type_specifier IDENTIFIER array_specifier {
+ if ($1.arraySizes) {
+ parseContext.profileRequires($1.loc, ENoProfile, 120, E_GL_3DL_array_objects, "arrayed type");
+ parseContext.profileRequires($1.loc, EEsProfile, 300, 0, "arrayed type");
+ parseContext.arraySizeRequiredCheck($1.loc, *$1.arraySizes);
+ }
+ parseContext.arrayDimCheck($2.loc, $1.arraySizes, $3.arraySizes);
+
+ parseContext.arraySizeRequiredCheck($3.loc, *$3.arraySizes);
+ parseContext.reservedErrorCheck($2.loc, *$2.string);
+
+ $1.arraySizes = $3.arraySizes;
+
+ TParameter param = { $2.string, new TType($1)};
+ $$.loc = $2.loc;
+ $$.param = param;
+ }
+ ;
+
+parameter_declaration
+ //
+ // With name
+ //
+ : type_qualifier parameter_declarator {
+ $$ = $2;
+ if ($1.qualifier.precision != EpqNone)
+ $$.param.type->getQualifier().precision = $1.qualifier.precision;
+ parseContext.precisionQualifierCheck($$.loc, $$.param.type->getBasicType(), $$.param.type->getQualifier());
+
+ parseContext.checkNoShaderLayouts($1.loc, $1.shaderQualifiers);
+ parseContext.parameterTypeCheck($2.loc, $1.qualifier.storage, *$$.param.type);
+ parseContext.paramCheckFix($1.loc, $1.qualifier, *$$.param.type);
+
+ }
+ | parameter_declarator {
+ $$ = $1;
+
+ parseContext.parameterTypeCheck($1.loc, EvqIn, *$1.param.type);
+ parseContext.paramCheckFix($1.loc, EvqTemporary, *$$.param.type);
+ parseContext.precisionQualifierCheck($$.loc, $$.param.type->getBasicType(), $$.param.type->getQualifier());
+ }
+ //
+ // Without name
+ //
+ | type_qualifier parameter_type_specifier {
+ $$ = $2;
+ if ($1.qualifier.precision != EpqNone)
+ $$.param.type->getQualifier().precision = $1.qualifier.precision;
+ parseContext.precisionQualifierCheck($1.loc, $$.param.type->getBasicType(), $$.param.type->getQualifier());
+
+ parseContext.checkNoShaderLayouts($1.loc, $1.shaderQualifiers);
+ parseContext.parameterTypeCheck($2.loc, $1.qualifier.storage, *$$.param.type);
+ parseContext.paramCheckFix($1.loc, $1.qualifier, *$$.param.type);
+ }
+ | parameter_type_specifier {
+ $$ = $1;
+
+ parseContext.parameterTypeCheck($1.loc, EvqIn, *$1.param.type);
+ parseContext.paramCheckFix($1.loc, EvqTemporary, *$$.param.type);
+ parseContext.precisionQualifierCheck($$.loc, $$.param.type->getBasicType(), $$.param.type->getQualifier());
+ }
+ ;
+
+parameter_type_specifier
+ : type_specifier {
+ TParameter param = { 0, new TType($1) };
+ $$.param = param;
+ if ($1.arraySizes)
+ parseContext.arraySizeRequiredCheck($1.loc, *$1.arraySizes);
+ }
+ ;
+
+init_declarator_list
+ : single_declaration {
+ $$ = $1;
+ }
+ | init_declarator_list COMMA IDENTIFIER {
+ $$ = $1;
+ parseContext.declareVariable($3.loc, *$3.string, $1.type);
+ }
+ | init_declarator_list COMMA IDENTIFIER array_specifier {
+ $$ = $1;
+ parseContext.declareVariable($3.loc, *$3.string, $1.type, $4.arraySizes);
+ }
+ | init_declarator_list COMMA IDENTIFIER array_specifier EQUAL initializer {
+ $$.type = $1.type;
+ TIntermNode* initNode = parseContext.declareVariable($3.loc, *$3.string, $1.type, $4.arraySizes, $6);
+ $$.intermNode = parseContext.intermediate.growAggregate($1.intermNode, initNode, $5.loc);
+ }
+ | init_declarator_list COMMA IDENTIFIER EQUAL initializer {
+ $$.type = $1.type;
+ TIntermNode* initNode = parseContext.declareVariable($3.loc, *$3.string, $1.type, 0, $5);
+ $$.intermNode = parseContext.intermediate.growAggregate($1.intermNode, initNode, $4.loc);
+ }
+ ;
+
+single_declaration
+ : fully_specified_type {
+ $$.type = $1;
+ $$.intermNode = 0;
+ parseContext.declareTypeDefaults($$.loc, $$.type);
+ }
+ | fully_specified_type IDENTIFIER {
+ $$.type = $1;
+ $$.intermNode = 0;
+ parseContext.declareVariable($2.loc, *$2.string, $1);
+ }
+ | fully_specified_type IDENTIFIER array_specifier {
+ $$.type = $1;
+ $$.intermNode = 0;
+ parseContext.declareVariable($2.loc, *$2.string, $1, $3.arraySizes);
+ }
+ | fully_specified_type IDENTIFIER array_specifier EQUAL initializer {
+ $$.type = $1;
+ TIntermNode* initNode = parseContext.declareVariable($2.loc, *$2.string, $1, $3.arraySizes, $5);
+ $$.intermNode = parseContext.intermediate.growAggregate(0, initNode, $4.loc);
+ }
+ | fully_specified_type IDENTIFIER EQUAL initializer {
+ $$.type = $1;
+ TIntermNode* initNode = parseContext.declareVariable($2.loc, *$2.string, $1, 0, $4);
+ $$.intermNode = parseContext.intermediate.growAggregate(0, initNode, $3.loc);
+ }
+
+// Grammar Note: No 'enum', or 'typedef'.
+
+fully_specified_type
+ : type_specifier {
+ $$ = $1;
+
+ parseContext.globalQualifierTypeCheck($1.loc, $1.qualifier, $$);
+ if ($1.arraySizes) {
+ parseContext.profileRequires($1.loc, ENoProfile, 120, E_GL_3DL_array_objects, "arrayed type");
+ parseContext.profileRequires($1.loc, EEsProfile, 300, 0, "arrayed type");
+ }
+
+ parseContext.precisionQualifierCheck($$.loc, $$.basicType, $$.qualifier);
+ }
+ | type_qualifier type_specifier {
+ parseContext.globalQualifierFixCheck($1.loc, $1.qualifier);
+ parseContext.globalQualifierTypeCheck($1.loc, $1.qualifier, $2);
+
+ if ($2.arraySizes) {
+ parseContext.profileRequires($2.loc, ENoProfile, 120, E_GL_3DL_array_objects, "arrayed type");
+ parseContext.profileRequires($2.loc, EEsProfile, 300, 0, "arrayed type");
+ }
+
+ if ($2.arraySizes && parseContext.arrayQualifierError($2.loc, $1.qualifier))
+ $2.arraySizes = 0;
+
+ parseContext.checkNoShaderLayouts($2.loc, $1.shaderQualifiers);
+ $2.shaderQualifiers.merge($1.shaderQualifiers);
+ parseContext.mergeQualifiers($2.loc, $2.qualifier, $1.qualifier, true);
+ parseContext.precisionQualifierCheck($2.loc, $2.basicType, $2.qualifier);
+
+ $$ = $2;
+
+ if (! $$.qualifier.isInterpolation() &&
+ ((parseContext.language == EShLangVertex && $$.qualifier.storage == EvqVaryingOut) ||
+ (parseContext.language == EShLangFragment && $$.qualifier.storage == EvqVaryingIn)))
+ $$.qualifier.smooth = true;
+ }
+ ;
+
+invariant_qualifier
+ : INVARIANT {
+ parseContext.globalCheck($1.loc, "invariant");
+ parseContext.profileRequires($$.loc, ENoProfile, 120, 0, "invariant");
+ $$.init($1.loc);
+ $$.qualifier.invariant = true;
+ }
+ ;
+
+interpolation_qualifier
+ : SMOOTH {
+ parseContext.globalCheck($1.loc, "smooth");
+ parseContext.profileRequires($1.loc, ENoProfile, 130, 0, "smooth");
+ parseContext.profileRequires($1.loc, EEsProfile, 300, 0, "smooth");
+ $$.init($1.loc);
+ $$.qualifier.smooth = true;
+ }
+ | FLAT {
+ parseContext.globalCheck($1.loc, "flat");
+ parseContext.profileRequires($1.loc, ENoProfile, 130, 0, "flat");
+ parseContext.profileRequires($1.loc, EEsProfile, 300, 0, "flat");
+ $$.init($1.loc);
+ $$.qualifier.flat = true;
+ }
+ | NOPERSPECTIVE {
+ parseContext.globalCheck($1.loc, "noperspective");
+ parseContext.requireProfile($1.loc, ~EEsProfile, "noperspective");
+ parseContext.profileRequires($1.loc, ENoProfile, 130, 0, "noperspective");
+ $$.init($1.loc);
+ $$.qualifier.nopersp = true;
+ }
+ ;
+
+layout_qualifier
+ : LAYOUT LEFT_PAREN layout_qualifier_id_list RIGHT_PAREN {
+ $$ = $3;
+ }
+ ;
+
+layout_qualifier_id_list
+ : layout_qualifier_id {
+ $$ = $1;
+ }
+ | layout_qualifier_id_list COMMA layout_qualifier_id {
+ $$ = $1;
+ $$.shaderQualifiers.merge($3.shaderQualifiers);
+ parseContext.mergeObjectLayoutQualifiers($$.qualifier, $3.qualifier, false);
+ }
+
+layout_qualifier_id
+ : IDENTIFIER {
+ $$.init($1.loc);
+ parseContext.setLayoutQualifier($1.loc, $$, *$1.string);
+ }
+ | IDENTIFIER EQUAL constant_expression {
+ $$.init($1.loc);
+ parseContext.setLayoutQualifier($1.loc, $$, *$1.string, $3);
+ }
+ | SHARED { // because "shared" is both an identifier and a keyword
+ $$.init($1.loc);
+ TString strShared("shared");
+ parseContext.setLayoutQualifier($1.loc, $$, strShared);
+ }
+ ;
+
+precise_qualifier
+ : PRECISE {
+ parseContext.profileRequires($$.loc, ECoreProfile | ECompatibilityProfile, 400, E_GL_ARB_gpu_shader5, "precise");
+ parseContext.profileRequires($1.loc, EEsProfile, 320, Num_AEP_gpu_shader5, AEP_gpu_shader5, "precise");
+ $$.init($1.loc);
+ $$.qualifier.noContraction = true;
+ }
+ ;
+
+type_qualifier
+ : single_type_qualifier {
+ $$ = $1;
+ }
+ | type_qualifier single_type_qualifier {
+ $$ = $1;
+ if ($$.basicType == EbtVoid)
+ $$.basicType = $2.basicType;
+
+ $$.shaderQualifiers.merge($2.shaderQualifiers);
+ parseContext.mergeQualifiers($$.loc, $$.qualifier, $2.qualifier, false);
+ }
+ ;
+
+single_type_qualifier
+ : storage_qualifier {
+ $$ = $1;
+ }
+ | layout_qualifier {
+ $$ = $1;
+ }
+ | precision_qualifier {
+ $$ = $1;
+ }
+ | interpolation_qualifier {
+ // allow inheritance of storage qualifier from block declaration
+ $$ = $1;
+ }
+ | invariant_qualifier {
+ // allow inheritance of storage qualifier from block declaration
+ $$ = $1;
+ }
+ | precise_qualifier {
+ // allow inheritance of storage qualifier from block declaration
+ $$ = $1;
+ }
+ ;
+
+storage_qualifier
+ : CONST {
+ $$.init($1.loc);
+ $$.qualifier.storage = EvqConst; // will later turn into EvqConstReadOnly, if the initializer is not constant
+ }
+ | ATTRIBUTE {
+ parseContext.requireStage($1.loc, EShLangVertex, "attribute");
+ parseContext.checkDeprecated($1.loc, ECoreProfile, 130, "attribute");
+ parseContext.checkDeprecated($1.loc, ENoProfile, 130, "attribute");
+ parseContext.requireNotRemoved($1.loc, ECoreProfile, 420, "attribute");
+ parseContext.requireNotRemoved($1.loc, EEsProfile, 300, "attribute");
+
+ parseContext.globalCheck($1.loc, "attribute");
+
+ $$.init($1.loc);
+ $$.qualifier.storage = EvqVaryingIn;
+ }
+ | VARYING {
+ parseContext.checkDeprecated($1.loc, ENoProfile, 130, "varying");
+ parseContext.checkDeprecated($1.loc, ECoreProfile, 130, "varying");
+ parseContext.requireNotRemoved($1.loc, ECoreProfile, 420, "varying");
+ parseContext.requireNotRemoved($1.loc, EEsProfile, 300, "varying");
+
+ parseContext.globalCheck($1.loc, "varying");
+
+ $$.init($1.loc);
+ if (parseContext.language == EShLangVertex)
+ $$.qualifier.storage = EvqVaryingOut;
+ else
+ $$.qualifier.storage = EvqVaryingIn;
+ }
+ | INOUT {
+ parseContext.globalCheck($1.loc, "inout");
+ $$.init($1.loc);
+ $$.qualifier.storage = EvqInOut;
+ }
+ | IN {
+ parseContext.globalCheck($1.loc, "in");
+ $$.init($1.loc);
+ // whether this is a parameter "in" or a pipeline "in" will get sorted out a bit later
+ $$.qualifier.storage = EvqIn;
+ }
+ | OUT {
+ parseContext.globalCheck($1.loc, "out");
+ $$.init($1.loc);
+ // whether this is a parameter "out" or a pipeline "out" will get sorted out a bit later
+ $$.qualifier.storage = EvqOut;
+ }
+ | CENTROID {
+ parseContext.profileRequires($1.loc, ENoProfile, 120, 0, "centroid");
+ parseContext.profileRequires($1.loc, EEsProfile, 300, 0, "centroid");
+ parseContext.globalCheck($1.loc, "centroid");
+ $$.init($1.loc);
+ $$.qualifier.centroid = true;
+ }
+ | PATCH {
+ parseContext.globalCheck($1.loc, "patch");
+ parseContext.requireStage($1.loc, (EShLanguageMask)(EShLangTessControlMask | EShLangTessEvaluationMask), "patch");
+ $$.init($1.loc);
+ $$.qualifier.patch = true;
+ }
+ | SAMPLE {
+ parseContext.globalCheck($1.loc, "sample");
+ $$.init($1.loc);
+ $$.qualifier.sample = true;
+ }
+ | UNIFORM {
+ parseContext.globalCheck($1.loc, "uniform");
+ $$.init($1.loc);
+ $$.qualifier.storage = EvqUniform;
+ }
+ | BUFFER {
+ parseContext.globalCheck($1.loc, "buffer");
+ $$.init($1.loc);
+ $$.qualifier.storage = EvqBuffer;
+ }
+ | SHARED {
+ parseContext.profileRequires($1.loc, ECoreProfile | ECompatibilityProfile, 430, E_GL_ARB_compute_shader, "shared");
+ parseContext.profileRequires($1.loc, EEsProfile, 310, 0, "shared");
+ parseContext.requireStage($1.loc, EShLangCompute, "shared");
+ $$.init($1.loc);
+ $$.qualifier.storage = EvqShared;
+ }
+ | COHERENT {
+ $$.init($1.loc);
+ $$.qualifier.coherent = true;
+ }
+ | VOLATILE {
+ $$.init($1.loc);
+ $$.qualifier.volatil = true;
+ }
+ | RESTRICT {
+ $$.init($1.loc);
+ $$.qualifier.restrict = true;
+ }
+ | READONLY {
+ $$.init($1.loc);
+ $$.qualifier.readonly = true;
+ }
+ | WRITEONLY {
+ $$.init($1.loc);
+ $$.qualifier.writeonly = true;
+ }
+ | SUBROUTINE {
+ parseContext.spvRemoved($1.loc, "subroutine");
+ parseContext.globalCheck($1.loc, "subroutine");
+ $$.init($1.loc);
+ $$.qualifier.storage = EvqUniform;
+ }
+ | SUBROUTINE LEFT_PAREN type_name_list RIGHT_PAREN {
+ parseContext.spvRemoved($1.loc, "subroutine");
+ parseContext.globalCheck($1.loc, "subroutine");
+ $$.init($1.loc);
+ $$.qualifier.storage = EvqUniform;
+ // TODO: 4.0 semantics: subroutines
+ // 1) make sure each identifier is a type declared earlier with SUBROUTINE
+ // 2) save all of the identifiers for future comparison with the declared function
+ }
+ ;
+
+type_name_list
+ : TYPE_NAME {
+ // TODO: 4.0 functionality: subroutine type to list
+ }
+ | type_name_list COMMA TYPE_NAME {
+ }
+ ;
+
+type_specifier
+ : type_specifier_nonarray {
+ $$ = $1;
+ $$.qualifier.precision = parseContext.getDefaultPrecision($$);
+ }
+ | type_specifier_nonarray array_specifier {
+ parseContext.arrayDimCheck($2.loc, $2.arraySizes, 0);
+ $$ = $1;
+ $$.qualifier.precision = parseContext.getDefaultPrecision($$);
+ $$.arraySizes = $2.arraySizes;
+ }
+ ;
+
+array_specifier
+ : LEFT_BRACKET RIGHT_BRACKET {
+ $$.loc = $1.loc;
+ $$.arraySizes = new TArraySizes;
+ $$.arraySizes->addInnerSize();
+ }
+ | LEFT_BRACKET conditional_expression RIGHT_BRACKET {
+ $$.loc = $1.loc;
+ $$.arraySizes = new TArraySizes;
+
+ TArraySize size;
+ parseContext.arraySizeCheck($2->getLoc(), $2, size);
+ $$.arraySizes->addInnerSize(size);
+ }
+ | array_specifier LEFT_BRACKET RIGHT_BRACKET {
+ $$ = $1;
+ $$.arraySizes->addInnerSize();
+ }
+ | array_specifier LEFT_BRACKET conditional_expression RIGHT_BRACKET {
+ $$ = $1;
+
+ TArraySize size;
+ parseContext.arraySizeCheck($3->getLoc(), $3, size);
+ $$.arraySizes->addInnerSize(size);
+ }
+ ;
+
+type_specifier_nonarray
+ : VOID {
+ $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
+ $$.basicType = EbtVoid;
+ }
+ | FLOAT {
+ $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
+ $$.basicType = EbtFloat;
+ }
+ | DOUBLE {
+ parseContext.doubleCheck($1.loc, "double");
+ $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
+ $$.basicType = EbtDouble;
+ }
+ | INT {
+ $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
+ $$.basicType = EbtInt;
+ }
+ | UINT {
+ parseContext.fullIntegerCheck($1.loc, "unsigned integer");
+ $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
+ $$.basicType = EbtUint;
+ }
+ | INT64_T {
+ parseContext.int64Check($1.loc, "64-bit integer", parseContext.symbolTable.atBuiltInLevel());
+ $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
+ $$.basicType = EbtInt64;
+ }
+ | UINT64_T {
+ parseContext.int64Check($1.loc, "64-bit unsigned integer", parseContext.symbolTable.atBuiltInLevel());
+ $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
+ $$.basicType = EbtUint64;
+ }
+ | BOOL {
+ $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
+ $$.basicType = EbtBool;
+ }
+ | VEC2 {
+ $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
+ $$.basicType = EbtFloat;
+ $$.setVector(2);
+ }
+ | VEC3 {
+ $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
+ $$.basicType = EbtFloat;
+ $$.setVector(3);
+ }
+ | VEC4 {
+ $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
+ $$.basicType = EbtFloat;
+ $$.setVector(4);
+ }
+ | DVEC2 {
+ parseContext.doubleCheck($1.loc, "double vector");
+ $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
+ $$.basicType = EbtDouble;
+ $$.setVector(2);
+ }
+ | DVEC3 {
+ parseContext.doubleCheck($1.loc, "double vector");
+ $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
+ $$.basicType = EbtDouble;
+ $$.setVector(3);
+ }
+ | DVEC4 {
+ parseContext.doubleCheck($1.loc, "double vector");
+ $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
+ $$.basicType = EbtDouble;
+ $$.setVector(4);
+ }
+ | BVEC2 {
+ $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
+ $$.basicType = EbtBool;
+ $$.setVector(2);
+ }
+ | BVEC3 {
+ $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
+ $$.basicType = EbtBool;
+ $$.setVector(3);
+ }
+ | BVEC4 {
+ $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
+ $$.basicType = EbtBool;
+ $$.setVector(4);
+ }
+ | IVEC2 {
+ $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
+ $$.basicType = EbtInt;
+ $$.setVector(2);
+ }
+ | IVEC3 {
+ $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
+ $$.basicType = EbtInt;
+ $$.setVector(3);
+ }
+ | IVEC4 {
+ $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
+ $$.basicType = EbtInt;
+ $$.setVector(4);
+ }
+ | I64VEC2 {
+ parseContext.int64Check($1.loc, "64-bit integer vector", parseContext.symbolTable.atBuiltInLevel());
+ $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
+ $$.basicType = EbtInt64;
+ $$.setVector(2);
+ }
+ | I64VEC3 {
+ parseContext.int64Check($1.loc, "64-bit integer vector", parseContext.symbolTable.atBuiltInLevel());
+ $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
+ $$.basicType = EbtInt64;
+ $$.setVector(3);
+ }
+ | I64VEC4 {
+ parseContext.int64Check($1.loc, "64-bit integer vector", parseContext.symbolTable.atBuiltInLevel());
+ $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
+ $$.basicType = EbtInt64;
+ $$.setVector(4);
+ }
+ | UVEC2 {
+ parseContext.fullIntegerCheck($1.loc, "unsigned integer vector");
+ $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
+ $$.basicType = EbtUint;
+ $$.setVector(2);
+ }
+ | UVEC3 {
+ parseContext.fullIntegerCheck($1.loc, "unsigned integer vector");
+ $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
+ $$.basicType = EbtUint;
+ $$.setVector(3);
+ }
+ | UVEC4 {
+ parseContext.fullIntegerCheck($1.loc, "unsigned integer vector");
+ $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
+ $$.basicType = EbtUint;
+ $$.setVector(4);
+ }
+ | U64VEC2 {
+ parseContext.int64Check($1.loc, "64-bit unsigned integer vector", parseContext.symbolTable.atBuiltInLevel());
+ $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
+ $$.basicType = EbtUint64;
+ $$.setVector(2);
+ }
+ | U64VEC3 {
+ parseContext.int64Check($1.loc, "64-bit unsigned integer vector", parseContext.symbolTable.atBuiltInLevel());
+ $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
+ $$.basicType = EbtUint64;
+ $$.setVector(3);
+ }
+ | U64VEC4 {
+ parseContext.int64Check($1.loc, "64-bit unsigned integer vector", parseContext.symbolTable.atBuiltInLevel());
+ $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
+ $$.basicType = EbtUint64;
+ $$.setVector(4);
+ }
+ | MAT2 {
+ $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
+ $$.basicType = EbtFloat;
+ $$.setMatrix(2, 2);
+ }
+ | MAT3 {
+ $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
+ $$.basicType = EbtFloat;
+ $$.setMatrix(3, 3);
+ }
+ | MAT4 {
+ $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
+ $$.basicType = EbtFloat;
+ $$.setMatrix(4, 4);
+ }
+ | MAT2X2 {
+ $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
+ $$.basicType = EbtFloat;
+ $$.setMatrix(2, 2);
+ }
+ | MAT2X3 {
+ $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
+ $$.basicType = EbtFloat;
+ $$.setMatrix(2, 3);
+ }
+ | MAT2X4 {
+ $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
+ $$.basicType = EbtFloat;
+ $$.setMatrix(2, 4);
+ }
+ | MAT3X2 {
+ $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
+ $$.basicType = EbtFloat;
+ $$.setMatrix(3, 2);
+ }
+ | MAT3X3 {
+ $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
+ $$.basicType = EbtFloat;
+ $$.setMatrix(3, 3);
+ }
+ | MAT3X4 {
+ $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
+ $$.basicType = EbtFloat;
+ $$.setMatrix(3, 4);
+ }
+ | MAT4X2 {
+ $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
+ $$.basicType = EbtFloat;
+ $$.setMatrix(4, 2);
+ }
+ | MAT4X3 {
+ $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
+ $$.basicType = EbtFloat;
+ $$.setMatrix(4, 3);
+ }
+ | MAT4X4 {
+ $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
+ $$.basicType = EbtFloat;
+ $$.setMatrix(4, 4);
+ }
+ | DMAT2 {
+ parseContext.doubleCheck($1.loc, "double matrix");
+ $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
+ $$.basicType = EbtDouble;
+ $$.setMatrix(2, 2);
+ }
+ | DMAT3 {
+ parseContext.doubleCheck($1.loc, "double matrix");
+ $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
+ $$.basicType = EbtDouble;
+ $$.setMatrix(3, 3);
+ }
+ | DMAT4 {
+ parseContext.doubleCheck($1.loc, "double matrix");
+ $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
+ $$.basicType = EbtDouble;
+ $$.setMatrix(4, 4);
+ }
+ | DMAT2X2 {
+ parseContext.doubleCheck($1.loc, "double matrix");
+ $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
+ $$.basicType = EbtDouble;
+ $$.setMatrix(2, 2);
+ }
+ | DMAT2X3 {
+ parseContext.doubleCheck($1.loc, "double matrix");
+ $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
+ $$.basicType = EbtDouble;
+ $$.setMatrix(2, 3);
+ }
+ | DMAT2X4 {
+ parseContext.doubleCheck($1.loc, "double matrix");
+ $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
+ $$.basicType = EbtDouble;
+ $$.setMatrix(2, 4);
+ }
+ | DMAT3X2 {
+ parseContext.doubleCheck($1.loc, "double matrix");
+ $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
+ $$.basicType = EbtDouble;
+ $$.setMatrix(3, 2);
+ }
+ | DMAT3X3 {
+ parseContext.doubleCheck($1.loc, "double matrix");
+ $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
+ $$.basicType = EbtDouble;
+ $$.setMatrix(3, 3);
+ }
+ | DMAT3X4 {
+ parseContext.doubleCheck($1.loc, "double matrix");
+ $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
+ $$.basicType = EbtDouble;
+ $$.setMatrix(3, 4);
+ }
+ | DMAT4X2 {
+ parseContext.doubleCheck($1.loc, "double matrix");
+ $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
+ $$.basicType = EbtDouble;
+ $$.setMatrix(4, 2);
+ }
+ | DMAT4X3 {
+ parseContext.doubleCheck($1.loc, "double matrix");
+ $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
+ $$.basicType = EbtDouble;
+ $$.setMatrix(4, 3);
+ }
+ | DMAT4X4 {
+ parseContext.doubleCheck($1.loc, "double matrix");
+ $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
+ $$.basicType = EbtDouble;
+ $$.setMatrix(4, 4);
+ }
+ | ATOMIC_UINT {
+ parseContext.vulkanRemoved($1.loc, "atomic counter types");
+ $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
+ $$.basicType = EbtAtomicUint;
+ }
+ | SAMPLER1D {
+ $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
+ $$.basicType = EbtSampler;
+ $$.sampler.set(EbtFloat, Esd1D);
+ }
+ | SAMPLER2D {
+ $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
+ $$.basicType = EbtSampler;
+ $$.sampler.set(EbtFloat, Esd2D);
+ }
+ | SAMPLER3D {
+ $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
+ $$.basicType = EbtSampler;
+ $$.sampler.set(EbtFloat, Esd3D);
+ }
+ | SAMPLERCUBE {
+ $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
+ $$.basicType = EbtSampler;
+ $$.sampler.set(EbtFloat, EsdCube);
+ }
+ | SAMPLER1DSHADOW {
+ $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
+ $$.basicType = EbtSampler;
+ $$.sampler.set(EbtFloat, Esd1D, false, true);
+ }
+ | SAMPLER2DSHADOW {
+ $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
+ $$.basicType = EbtSampler;
+ $$.sampler.set(EbtFloat, Esd2D, false, true);
+ }
+ | SAMPLERCUBESHADOW {
+ $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
+ $$.basicType = EbtSampler;
+ $$.sampler.set(EbtFloat, EsdCube, false, true);
+ }
+ | SAMPLER1DARRAY {
+ $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
+ $$.basicType = EbtSampler;
+ $$.sampler.set(EbtFloat, Esd1D, true);
+ }
+ | SAMPLER2DARRAY {
+ $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
+ $$.basicType = EbtSampler;
+ $$.sampler.set(EbtFloat, Esd2D, true);
+ }
+ | SAMPLER1DARRAYSHADOW {
+ $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
+ $$.basicType = EbtSampler;
+ $$.sampler.set(EbtFloat, Esd1D, true, true);
+ }
+ | SAMPLER2DARRAYSHADOW {
+ $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
+ $$.basicType = EbtSampler;
+ $$.sampler.set(EbtFloat, Esd2D, true, true);
+ }
+ | SAMPLERCUBEARRAY {
+ $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
+ $$.basicType = EbtSampler;
+ $$.sampler.set(EbtFloat, EsdCube, true);
+ }
+ | SAMPLERCUBEARRAYSHADOW {
+ $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
+ $$.basicType = EbtSampler;
+ $$.sampler.set(EbtFloat, EsdCube, true, true);
+ }
+ | ISAMPLER1D {
+ $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
+ $$.basicType = EbtSampler;
+ $$.sampler.set(EbtInt, Esd1D);
+ }
+ | ISAMPLER2D {
+ $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
+ $$.basicType = EbtSampler;
+ $$.sampler.set(EbtInt, Esd2D);
+ }
+ | ISAMPLER3D {
+ $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
+ $$.basicType = EbtSampler;
+ $$.sampler.set(EbtInt, Esd3D);
+ }
+ | ISAMPLERCUBE {
+ $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
+ $$.basicType = EbtSampler;
+ $$.sampler.set(EbtInt, EsdCube);
+ }
+ | ISAMPLER1DARRAY {
+ $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
+ $$.basicType = EbtSampler;
+ $$.sampler.set(EbtInt, Esd1D, true);
+ }
+ | ISAMPLER2DARRAY {
+ $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
+ $$.basicType = EbtSampler;
+ $$.sampler.set(EbtInt, Esd2D, true);
+ }
+ | ISAMPLERCUBEARRAY {
+ $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
+ $$.basicType = EbtSampler;
+ $$.sampler.set(EbtInt, EsdCube, true);
+ }
+ | USAMPLER1D {
+ $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
+ $$.basicType = EbtSampler;
+ $$.sampler.set(EbtUint, Esd1D);
+ }
+ | USAMPLER2D {
+ $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
+ $$.basicType = EbtSampler;
+ $$.sampler.set(EbtUint, Esd2D);
+ }
+ | USAMPLER3D {
+ $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
+ $$.basicType = EbtSampler;
+ $$.sampler.set(EbtUint, Esd3D);
+ }
+ | USAMPLERCUBE {
+ $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
+ $$.basicType = EbtSampler;
+ $$.sampler.set(EbtUint, EsdCube);
+ }
+ | USAMPLER1DARRAY {
+ $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
+ $$.basicType = EbtSampler;
+ $$.sampler.set(EbtUint, Esd1D, true);
+ }
+ | USAMPLER2DARRAY {
+ $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
+ $$.basicType = EbtSampler;
+ $$.sampler.set(EbtUint, Esd2D, true);
+ }
+ | USAMPLERCUBEARRAY {
+ $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
+ $$.basicType = EbtSampler;
+ $$.sampler.set(EbtUint, EsdCube, true);
+ }
+ | SAMPLER2DRECT {
+ $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
+ $$.basicType = EbtSampler;
+ $$.sampler.set(EbtFloat, EsdRect);
+ }
+ | SAMPLER2DRECTSHADOW {
+ $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
+ $$.basicType = EbtSampler;
+ $$.sampler.set(EbtFloat, EsdRect, false, true);
+ }
+ | ISAMPLER2DRECT {
+ $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
+ $$.basicType = EbtSampler;
+ $$.sampler.set(EbtInt, EsdRect);
+ }
+ | USAMPLER2DRECT {
+ $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
+ $$.basicType = EbtSampler;
+ $$.sampler.set(EbtUint, EsdRect);
+ }
+ | SAMPLERBUFFER {
+ $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
+ $$.basicType = EbtSampler;
+ $$.sampler.set(EbtFloat, EsdBuffer);
+ }
+ | ISAMPLERBUFFER {
+ $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
+ $$.basicType = EbtSampler;
+ $$.sampler.set(EbtInt, EsdBuffer);
+ }
+ | USAMPLERBUFFER {
+ $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
+ $$.basicType = EbtSampler;
+ $$.sampler.set(EbtUint, EsdBuffer);
+ }
+ | SAMPLER2DMS {
+ $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
+ $$.basicType = EbtSampler;
+ $$.sampler.set(EbtFloat, Esd2D, false, false, true);
+ }
+ | ISAMPLER2DMS {
+ $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
+ $$.basicType = EbtSampler;
+ $$.sampler.set(EbtInt, Esd2D, false, false, true);
+ }
+ | USAMPLER2DMS {
+ $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
+ $$.basicType = EbtSampler;
+ $$.sampler.set(EbtUint, Esd2D, false, false, true);
+ }
+ | SAMPLER2DMSARRAY {
+ $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
+ $$.basicType = EbtSampler;
+ $$.sampler.set(EbtFloat, Esd2D, true, false, true);
+ }
+ | ISAMPLER2DMSARRAY {
+ $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
+ $$.basicType = EbtSampler;
+ $$.sampler.set(EbtInt, Esd2D, true, false, true);
+ }
+ | USAMPLER2DMSARRAY {
+ $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
+ $$.basicType = EbtSampler;
+ $$.sampler.set(EbtUint, Esd2D, true, false, true);
+ }
+ | SAMPLER {
+ $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
+ $$.basicType = EbtSampler;
+ $$.sampler.setPureSampler(false);
+ }
+ | SAMPLERSHADOW {
+ $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
+ $$.basicType = EbtSampler;
+ $$.sampler.setPureSampler(true);
+ }
+ | TEXTURE1D {
+ $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
+ $$.basicType = EbtSampler;
+ $$.sampler.setTexture(EbtFloat, Esd1D);
+ }
+ | TEXTURE2D {
+ $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
+ $$.basicType = EbtSampler;
+ $$.sampler.setTexture(EbtFloat, Esd2D);
+ }
+ | TEXTURE3D {
+ $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
+ $$.basicType = EbtSampler;
+ $$.sampler.setTexture(EbtFloat, Esd3D);
+ }
+ | TEXTURECUBE {
+ $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
+ $$.basicType = EbtSampler;
+ $$.sampler.setTexture(EbtFloat, EsdCube);
+ }
+ | TEXTURE1DARRAY {
+ $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
+ $$.basicType = EbtSampler;
+ $$.sampler.setTexture(EbtFloat, Esd1D, true);
+ }
+ | TEXTURE2DARRAY {
+ $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
+ $$.basicType = EbtSampler;
+ $$.sampler.setTexture(EbtFloat, Esd2D, true);
+ }
+ | TEXTURECUBEARRAY {
+ $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
+ $$.basicType = EbtSampler;
+ $$.sampler.setTexture(EbtFloat, EsdCube, true);
+ }
+ | ITEXTURE1D {
+ $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
+ $$.basicType = EbtSampler;
+ $$.sampler.setTexture(EbtInt, Esd1D);
+ }
+ | ITEXTURE2D {
+ $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
+ $$.basicType = EbtSampler;
+ $$.sampler.setTexture(EbtInt, Esd2D);
+ }
+ | ITEXTURE3D {
+ $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
+ $$.basicType = EbtSampler;
+ $$.sampler.setTexture(EbtInt, Esd3D);
+ }
+ | ITEXTURECUBE {
+ $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
+ $$.basicType = EbtSampler;
+ $$.sampler.setTexture(EbtInt, EsdCube);
+ }
+ | ITEXTURE1DARRAY {
+ $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
+ $$.basicType = EbtSampler;
+ $$.sampler.setTexture(EbtInt, Esd1D, true);
+ }
+ | ITEXTURE2DARRAY {
+ $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
+ $$.basicType = EbtSampler;
+ $$.sampler.setTexture(EbtInt, Esd2D, true);
+ }
+ | ITEXTURECUBEARRAY {
+ $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
+ $$.basicType = EbtSampler;
+ $$.sampler.setTexture(EbtInt, EsdCube, true);
+ }
+ | UTEXTURE1D {
+ $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
+ $$.basicType = EbtSampler;
+ $$.sampler.setTexture(EbtUint, Esd1D);
+ }
+ | UTEXTURE2D {
+ $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
+ $$.basicType = EbtSampler;
+ $$.sampler.setTexture(EbtUint, Esd2D);
+ }
+ | UTEXTURE3D {
+ $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
+ $$.basicType = EbtSampler;
+ $$.sampler.setTexture(EbtUint, Esd3D);
+ }
+ | UTEXTURECUBE {
+ $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
+ $$.basicType = EbtSampler;
+ $$.sampler.setTexture(EbtUint, EsdCube);
+ }
+ | UTEXTURE1DARRAY {
+ $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
+ $$.basicType = EbtSampler;
+ $$.sampler.setTexture(EbtUint, Esd1D, true);
+ }
+ | UTEXTURE2DARRAY {
+ $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
+ $$.basicType = EbtSampler;
+ $$.sampler.setTexture(EbtUint, Esd2D, true);
+ }
+ | UTEXTURECUBEARRAY {
+ $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
+ $$.basicType = EbtSampler;
+ $$.sampler.setTexture(EbtUint, EsdCube, true);
+ }
+ | TEXTURE2DRECT {
+ $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
+ $$.basicType = EbtSampler;
+ $$.sampler.setTexture(EbtFloat, EsdRect);
+ }
+ | ITEXTURE2DRECT {
+ $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
+ $$.basicType = EbtSampler;
+ $$.sampler.setTexture(EbtInt, EsdRect);
+ }
+ | UTEXTURE2DRECT {
+ $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
+ $$.basicType = EbtSampler;
+ $$.sampler.setTexture(EbtUint, EsdRect);
+ }
+ | TEXTUREBUFFER {
+ $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
+ $$.basicType = EbtSampler;
+ $$.sampler.setTexture(EbtFloat, EsdBuffer);
+ }
+ | ITEXTUREBUFFER {
+ $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
+ $$.basicType = EbtSampler;
+ $$.sampler.setTexture(EbtInt, EsdBuffer);
+ }
+ | UTEXTUREBUFFER {
+ $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
+ $$.basicType = EbtSampler;
+ $$.sampler.setTexture(EbtUint, EsdBuffer);
+ }
+ | TEXTURE2DMS {
+ $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
+ $$.basicType = EbtSampler;
+ $$.sampler.setTexture(EbtFloat, Esd2D, false, false, true);
+ }
+ | ITEXTURE2DMS {
+ $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
+ $$.basicType = EbtSampler;
+ $$.sampler.setTexture(EbtInt, Esd2D, false, false, true);
+ }
+ | UTEXTURE2DMS {
+ $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
+ $$.basicType = EbtSampler;
+ $$.sampler.setTexture(EbtUint, Esd2D, false, false, true);
+ }
+ | TEXTURE2DMSARRAY {
+ $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
+ $$.basicType = EbtSampler;
+ $$.sampler.setTexture(EbtFloat, Esd2D, true, false, true);
+ }
+ | ITEXTURE2DMSARRAY {
+ $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
+ $$.basicType = EbtSampler;
+ $$.sampler.setTexture(EbtInt, Esd2D, true, false, true);
+ }
+ | UTEXTURE2DMSARRAY {
+ $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
+ $$.basicType = EbtSampler;
+ $$.sampler.setTexture(EbtUint, Esd2D, true, false, true);
+ }
+ | IMAGE1D {
+ $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
+ $$.basicType = EbtSampler;
+ $$.sampler.setImage(EbtFloat, Esd1D);
+ }
+ | IIMAGE1D {
+ $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
+ $$.basicType = EbtSampler;
+ $$.sampler.setImage(EbtInt, Esd1D);
+ }
+ | UIMAGE1D {
+ $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
+ $$.basicType = EbtSampler;
+ $$.sampler.setImage(EbtUint, Esd1D);
+ }
+ | IMAGE2D {
+ $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
+ $$.basicType = EbtSampler;
+ $$.sampler.setImage(EbtFloat, Esd2D);
+ }
+ | IIMAGE2D {
+ $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
+ $$.basicType = EbtSampler;
+ $$.sampler.setImage(EbtInt, Esd2D);
+ }
+ | UIMAGE2D {
+ $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
+ $$.basicType = EbtSampler;
+ $$.sampler.setImage(EbtUint, Esd2D);
+ }
+ | IMAGE3D {
+ $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
+ $$.basicType = EbtSampler;
+ $$.sampler.setImage(EbtFloat, Esd3D);
+ }
+ | IIMAGE3D {
+ $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
+ $$.basicType = EbtSampler;
+ $$.sampler.setImage(EbtInt, Esd3D);
+ }
+ | UIMAGE3D {
+ $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
+ $$.basicType = EbtSampler;
+ $$.sampler.setImage(EbtUint, Esd3D);
+ }
+ | IMAGE2DRECT {
+ $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
+ $$.basicType = EbtSampler;
+ $$.sampler.setImage(EbtFloat, EsdRect);
+ }
+ | IIMAGE2DRECT {
+ $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
+ $$.basicType = EbtSampler;
+ $$.sampler.setImage(EbtInt, EsdRect);
+ }
+ | UIMAGE2DRECT {
+ $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
+ $$.basicType = EbtSampler;
+ $$.sampler.setImage(EbtUint, EsdRect);
+ }
+ | IMAGECUBE {
+ $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
+ $$.basicType = EbtSampler;
+ $$.sampler.setImage(EbtFloat, EsdCube);
+ }
+ | IIMAGECUBE {
+ $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
+ $$.basicType = EbtSampler;
+ $$.sampler.setImage(EbtInt, EsdCube);
+ }
+ | UIMAGECUBE {
+ $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
+ $$.basicType = EbtSampler;
+ $$.sampler.setImage(EbtUint, EsdCube);
+ }
+ | IMAGEBUFFER {
+ $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
+ $$.basicType = EbtSampler;
+ $$.sampler.setImage(EbtFloat, EsdBuffer);
+ }
+ | IIMAGEBUFFER {
+ $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
+ $$.basicType = EbtSampler;
+ $$.sampler.setImage(EbtInt, EsdBuffer);
+ }
+ | UIMAGEBUFFER {
+ $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
+ $$.basicType = EbtSampler;
+ $$.sampler.setImage(EbtUint, EsdBuffer);
+ }
+ | IMAGE1DARRAY {
+ $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
+ $$.basicType = EbtSampler;
+ $$.sampler.setImage(EbtFloat, Esd1D, true);
+ }
+ | IIMAGE1DARRAY {
+ $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
+ $$.basicType = EbtSampler;
+ $$.sampler.setImage(EbtInt, Esd1D, true);
+ }
+ | UIMAGE1DARRAY {
+ $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
+ $$.basicType = EbtSampler;
+ $$.sampler.setImage(EbtUint, Esd1D, true);
+ }
+ | IMAGE2DARRAY {
+ $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
+ $$.basicType = EbtSampler;
+ $$.sampler.setImage(EbtFloat, Esd2D, true);
+ }
+ | IIMAGE2DARRAY {
+ $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
+ $$.basicType = EbtSampler;
+ $$.sampler.setImage(EbtInt, Esd2D, true);
+ }
+ | UIMAGE2DARRAY {
+ $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
+ $$.basicType = EbtSampler;
+ $$.sampler.setImage(EbtUint, Esd2D, true);
+ }
+ | IMAGECUBEARRAY {
+ $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
+ $$.basicType = EbtSampler;
+ $$.sampler.setImage(EbtFloat, EsdCube, true);
+ }
+ | IIMAGECUBEARRAY {
+ $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
+ $$.basicType = EbtSampler;
+ $$.sampler.setImage(EbtInt, EsdCube, true);
+ }
+ | UIMAGECUBEARRAY {
+ $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
+ $$.basicType = EbtSampler;
+ $$.sampler.setImage(EbtUint, EsdCube, true);
+ }
+ | IMAGE2DMS {
+ $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
+ $$.basicType = EbtSampler;
+ $$.sampler.setImage(EbtFloat, Esd2D, false, false, true);
+ }
+ | IIMAGE2DMS {
+ $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
+ $$.basicType = EbtSampler;
+ $$.sampler.setImage(EbtInt, Esd2D, false, false, true);
+ }
+ | UIMAGE2DMS {
+ $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
+ $$.basicType = EbtSampler;
+ $$.sampler.setImage(EbtUint, Esd2D, false, false, true);
+ }
+ | IMAGE2DMSARRAY {
+ $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
+ $$.basicType = EbtSampler;
+ $$.sampler.setImage(EbtFloat, Esd2D, true, false, true);
+ }
+ | IIMAGE2DMSARRAY {
+ $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
+ $$.basicType = EbtSampler;
+ $$.sampler.setImage(EbtInt, Esd2D, true, false, true);
+ }
+ | UIMAGE2DMSARRAY {
+ $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
+ $$.basicType = EbtSampler;
+ $$.sampler.setImage(EbtUint, Esd2D, true, false, true);
+ }
+ | SAMPLEREXTERNALOES { // GL_OES_EGL_image_external
+ $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
+ $$.basicType = EbtSampler;
+ $$.sampler.set(EbtFloat, Esd2D);
+ $$.sampler.external = true;
+ }
+ | SUBPASSINPUT {
+ parseContext.requireStage($1.loc, EShLangFragment, "subpass input");
+ $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
+ $$.basicType = EbtSampler;
+ $$.sampler.setSubpass(EbtFloat);
+ }
+ | SUBPASSINPUTMS {
+ parseContext.requireStage($1.loc, EShLangFragment, "subpass input");
+ $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
+ $$.basicType = EbtSampler;
+ $$.sampler.setSubpass(EbtFloat, true);
+ }
+ | ISUBPASSINPUT {
+ parseContext.requireStage($1.loc, EShLangFragment, "subpass input");
+ $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
+ $$.basicType = EbtSampler;
+ $$.sampler.setSubpass(EbtInt);
+ }
+ | ISUBPASSINPUTMS {
+ parseContext.requireStage($1.loc, EShLangFragment, "subpass input");
+ $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
+ $$.basicType = EbtSampler;
+ $$.sampler.setSubpass(EbtInt, true);
+ }
+ | USUBPASSINPUT {
+ parseContext.requireStage($1.loc, EShLangFragment, "subpass input");
+ $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
+ $$.basicType = EbtSampler;
+ $$.sampler.setSubpass(EbtUint);
+ }
+ | USUBPASSINPUTMS {
+ parseContext.requireStage($1.loc, EShLangFragment, "subpass input");
+ $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
+ $$.basicType = EbtSampler;
+ $$.sampler.setSubpass(EbtUint, true);
+ }
+ | struct_specifier {
+ $$ = $1;
+ $$.qualifier.storage = parseContext.symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
+ parseContext.structTypeCheck($$.loc, $$);
+ }
+ | TYPE_NAME {
+ //
+ // This is for user defined type names. The lexical phase looked up the
+ // type.
+ //
+ if (const TVariable* variable = ($1.symbol)->getAsVariable()) {
+ const TType& structure = variable->getType();
+ $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
+ $$.basicType = EbtStruct;
+ $$.userDef = &structure;
+ } else
+ parseContext.error($1.loc, "expected type name", $1.string->c_str(), "");
+ }
+ ;
+
+precision_qualifier
+ : HIGH_PRECISION {
+ parseContext.profileRequires($1.loc, ENoProfile, 130, 0, "highp precision qualifier");
+ $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
+ if (parseContext.profile == EEsProfile)
+ $$.qualifier.precision = EpqHigh;
+ }
+ | MEDIUM_PRECISION {
+ parseContext.profileRequires($1.loc, ENoProfile, 130, 0, "mediump precision qualifier");
+ $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
+ if (parseContext.profile == EEsProfile)
+ $$.qualifier.precision = EpqMedium;
+ }
+ | LOW_PRECISION {
+ parseContext.profileRequires($1.loc, ENoProfile, 130, 0, "lowp precision qualifier");
+ $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
+ if (parseContext.profile == EEsProfile)
+ $$.qualifier.precision = EpqLow;
+ }
+ ;
+
+struct_specifier
+ : STRUCT IDENTIFIER LEFT_BRACE { parseContext.nestedStructCheck($1.loc); } struct_declaration_list RIGHT_BRACE {
+ TType* structure = new TType($5, *$2.string);
+ parseContext.structArrayCheck($2.loc, *structure);
+ TVariable* userTypeDef = new TVariable($2.string, *structure, true);
+ if (! parseContext.symbolTable.insert(*userTypeDef))
+ parseContext.error($2.loc, "redefinition", $2.string->c_str(), "struct");
+ $$.init($1.loc);
+ $$.basicType = EbtStruct;
+ $$.userDef = structure;
+ --parseContext.structNestingLevel;
+ }
+ | STRUCT LEFT_BRACE { parseContext.nestedStructCheck($1.loc); } struct_declaration_list RIGHT_BRACE {
+ TType* structure = new TType($4, TString(""));
+ $$.init($1.loc);
+ $$.basicType = EbtStruct;
+ $$.userDef = structure;
+ --parseContext.structNestingLevel;
+ }
+ ;
+
+struct_declaration_list
+ : struct_declaration {
+ $$ = $1;
+ }
+ | struct_declaration_list struct_declaration {
+ $$ = $1;
+ for (unsigned int i = 0; i < $2->size(); ++i) {
+ for (unsigned int j = 0; j < $$->size(); ++j) {
+ if ((*$$)[j].type->getFieldName() == (*$2)[i].type->getFieldName())
+ parseContext.error((*$2)[i].loc, "duplicate member name:", "", (*$2)[i].type->getFieldName().c_str());
+ }
+ $$->push_back((*$2)[i]);
+ }
+ }
+ ;
+
+struct_declaration
+ : type_specifier struct_declarator_list SEMICOLON {
+ if ($1.arraySizes) {
+ parseContext.profileRequires($1.loc, ENoProfile, 120, E_GL_3DL_array_objects, "arrayed type");
+ parseContext.profileRequires($1.loc, EEsProfile, 300, 0, "arrayed type");
+ if (parseContext.profile == EEsProfile)
+ parseContext.arraySizeRequiredCheck($1.loc, *$1.arraySizes);
+ }
+
+ $$ = $2;
+
+ parseContext.voidErrorCheck($1.loc, (*$2)[0].type->getFieldName(), $1.basicType);
+ parseContext.precisionQualifierCheck($1.loc, $1.basicType, $1.qualifier);
+
+ for (unsigned int i = 0; i < $$->size(); ++i) {
+ parseContext.arrayDimCheck($1.loc, (*$$)[i].type, $1.arraySizes);
+ (*$$)[i].type->mergeType($1);
+ }
+ }
+ | type_qualifier type_specifier struct_declarator_list SEMICOLON {
+ parseContext.globalQualifierFixCheck($1.loc, $1.qualifier);
+ if ($2.arraySizes) {
+ parseContext.profileRequires($2.loc, ENoProfile, 120, E_GL_3DL_array_objects, "arrayed type");
+ parseContext.profileRequires($2.loc, EEsProfile, 300, 0, "arrayed type");
+ if (parseContext.profile == EEsProfile)
+ parseContext.arraySizeRequiredCheck($2.loc, *$2.arraySizes);
+ }
+
+ $$ = $3;
+
+ parseContext.checkNoShaderLayouts($1.loc, $1.shaderQualifiers);
+ parseContext.voidErrorCheck($2.loc, (*$3)[0].type->getFieldName(), $2.basicType);
+ parseContext.mergeQualifiers($2.loc, $2.qualifier, $1.qualifier, true);
+ parseContext.precisionQualifierCheck($2.loc, $2.basicType, $2.qualifier);
+
+ for (unsigned int i = 0; i < $$->size(); ++i) {
+ parseContext.arrayDimCheck($1.loc, (*$$)[i].type, $2.arraySizes);
+ (*$$)[i].type->mergeType($2);
+ }
+ }
+ ;
+
+struct_declarator_list
+ : struct_declarator {
+ $$ = new TTypeList;
+ $$->push_back($1);
+ }
+ | struct_declarator_list COMMA struct_declarator {
+ $$->push_back($3);
+ }
+ ;
+
+struct_declarator
+ : IDENTIFIER {
+ $$.type = new TType(EbtVoid);
+ $$.loc = $1.loc;
+ $$.type->setFieldName(*$1.string);
+ }
+ | IDENTIFIER array_specifier {
+ parseContext.arrayDimCheck($1.loc, $2.arraySizes, 0);
+
+ $$.type = new TType(EbtVoid);
+ $$.loc = $1.loc;
+ $$.type->setFieldName(*$1.string);
+ $$.type->newArraySizes(*$2.arraySizes);
+ }
+ ;
+
+initializer
+ : assignment_expression {
+ $$ = $1;
+ }
+ | LEFT_BRACE initializer_list RIGHT_BRACE {
+ const char* initFeature = "{ } style initializers";
+ parseContext.requireProfile($1.loc, ~EEsProfile, initFeature);
+ parseContext.profileRequires($1.loc, ~EEsProfile, 420, E_GL_ARB_shading_language_420pack, initFeature);
+ $$ = $2;
+ }
+ | LEFT_BRACE initializer_list COMMA RIGHT_BRACE {
+ const char* initFeature = "{ } style initializers";
+ parseContext.requireProfile($1.loc, ~EEsProfile, initFeature);
+ parseContext.profileRequires($1.loc, ~EEsProfile, 420, E_GL_ARB_shading_language_420pack, initFeature);
+ $$ = $2;
+ }
+ ;
+
+initializer_list
+ : initializer {
+ $$ = parseContext.intermediate.growAggregate(0, $1, $1->getLoc());
+ }
+ | initializer_list COMMA initializer {
+ $$ = parseContext.intermediate.growAggregate($1, $3);
+ }
+ ;
+
+declaration_statement
+ : declaration { $$ = $1; }
+ ;
+
+statement
+ : compound_statement { $$ = $1; }
+ | simple_statement { $$ = $1; }
+ ;
+
+// Grammar Note: labeled statements for switch statements only; 'goto' is not supported.
+
+simple_statement
+ : declaration_statement { $$ = $1; }
+ | expression_statement { $$ = $1; }
+ | selection_statement { $$ = $1; }
+ | switch_statement { $$ = $1; }
+ | case_label { $$ = $1; }
+ | iteration_statement { $$ = $1; }
+ | jump_statement { $$ = $1; }
+ ;
+
+compound_statement
+ : LEFT_BRACE RIGHT_BRACE { $$ = 0; }
+ | LEFT_BRACE {
+ parseContext.symbolTable.push();
+ ++parseContext.statementNestingLevel;
+ }
+ statement_list {
+ parseContext.symbolTable.pop(&parseContext.defaultPrecision[0]);
+ --parseContext.statementNestingLevel;
+ }
+ RIGHT_BRACE {
+ if ($3 && $3->getAsAggregate())
+ $3->getAsAggregate()->setOperator(EOpSequence);
+ $$ = $3;
+ }
+ ;
+
+statement_no_new_scope
+ : compound_statement_no_new_scope { $$ = $1; }
+ | simple_statement { $$ = $1; }
+ ;
+
+statement_scoped
+ : {
+ ++parseContext.controlFlowNestingLevel;
+ }
+ compound_statement {
+ --parseContext.controlFlowNestingLevel;
+ $$ = $2;
+ }
+ | {
+ parseContext.symbolTable.push();
+ ++parseContext.statementNestingLevel;
+ ++parseContext.controlFlowNestingLevel;
+ }
+ simple_statement {
+ parseContext.symbolTable.pop(&parseContext.defaultPrecision[0]);
+ --parseContext.statementNestingLevel;
+ --parseContext.controlFlowNestingLevel;
+ $$ = $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 && $2->getAsAggregate())
+ $2->getAsAggregate()->setOperator(EOpSequence);
+ $$ = $2;
+ }
+ ;
+
+statement_list
+ : statement {
+ $$ = parseContext.intermediate.makeAggregate($1);
+ if ($1 && $1->getAsBranchNode() && ($1->getAsBranchNode()->getFlowOp() == EOpCase ||
+ $1->getAsBranchNode()->getFlowOp() == EOpDefault)) {
+ parseContext.wrapupSwitchSubsequence(0, $1);
+ $$ = 0; // start a fresh subsequence for what's after this case
+ }
+ }
+ | statement_list statement {
+ if ($2 && $2->getAsBranchNode() && ($2->getAsBranchNode()->getFlowOp() == EOpCase ||
+ $2->getAsBranchNode()->getFlowOp() == EOpDefault)) {
+ parseContext.wrapupSwitchSubsequence($1 ? $1->getAsAggregate() : 0, $2);
+ $$ = 0; // start a fresh subsequence for what's after this case
+ } else
+ $$ = parseContext.intermediate.growAggregate($1, $2);
+ }
+ ;
+
+expression_statement
+ : SEMICOLON { $$ = 0; }
+ | expression SEMICOLON { $$ = static_cast<TIntermNode*>($1); }
+ ;
+
+selection_statement
+ : IF LEFT_PAREN expression RIGHT_PAREN selection_rest_statement {
+ parseContext.boolCheck($1.loc, $3);
+ $$ = parseContext.intermediate.addSelection($3, $5, $1.loc);
+ }
+ ;
+
+selection_rest_statement
+ : statement_scoped ELSE statement_scoped {
+ $$.node1 = $1;
+ $$.node2 = $3;
+ }
+ | statement_scoped {
+ $$.node1 = $1;
+ $$.node2 = 0;
+ }
+ ;
+
+condition
+ // In 1996 c++ draft, conditions can include single declarations
+ : expression {
+ $$ = $1;
+ parseContext.boolCheck($1->getLoc(), $1);
+ }
+ | fully_specified_type IDENTIFIER EQUAL initializer {
+ parseContext.boolCheck($2.loc, $1);
+
+ TType type($1);
+ TIntermNode* initNode = parseContext.declareVariable($2.loc, *$2.string, $1, 0, $4);
+ if (initNode)
+ $$ = initNode->getAsTyped();
+ else
+ $$ = 0;
+ }
+ ;
+
+switch_statement
+ : SWITCH LEFT_PAREN expression RIGHT_PAREN {
+ // start new switch sequence on the switch stack
+ ++parseContext.controlFlowNestingLevel;
+ ++parseContext.statementNestingLevel;
+ parseContext.switchSequenceStack.push_back(new TIntermSequence);
+ parseContext.switchLevel.push_back(parseContext.statementNestingLevel);
+ parseContext.symbolTable.push();
+ }
+ LEFT_BRACE switch_statement_list RIGHT_BRACE {
+ $$ = parseContext.addSwitch($1.loc, $3, $7 ? $7->getAsAggregate() : 0);
+ delete parseContext.switchSequenceStack.back();
+ parseContext.switchSequenceStack.pop_back();
+ parseContext.switchLevel.pop_back();
+ parseContext.symbolTable.pop(&parseContext.defaultPrecision[0]);
+ --parseContext.statementNestingLevel;
+ --parseContext.controlFlowNestingLevel;
+ }
+ ;
+
+switch_statement_list
+ : /* nothing */ {
+ $$ = 0;
+ }
+ | statement_list {
+ $$ = $1;
+ }
+ ;
+
+case_label
+ : CASE expression COLON {
+ $$ = 0;
+ if (parseContext.switchLevel.size() == 0)
+ parseContext.error($1.loc, "cannot appear outside switch statement", "case", "");
+ else if (parseContext.switchLevel.back() != parseContext.statementNestingLevel)
+ parseContext.error($1.loc, "cannot be nested inside control flow", "case", "");
+ else {
+ parseContext.constantValueCheck($2, "case");
+ parseContext.integerCheck($2, "case");
+ $$ = parseContext.intermediate.addBranch(EOpCase, $2, $1.loc);
+ }
+ }
+ | DEFAULT COLON {
+ $$ = 0;
+ if (parseContext.switchLevel.size() == 0)
+ parseContext.error($1.loc, "cannot appear outside switch statement", "default", "");
+ else if (parseContext.switchLevel.back() != parseContext.statementNestingLevel)
+ parseContext.error($1.loc, "cannot be nested inside control flow", "default", "");
+ else
+ $$ = parseContext.intermediate.addBranch(EOpDefault, $1.loc);
+ }
+ ;
+
+iteration_statement
+ : WHILE LEFT_PAREN {
+ if (! parseContext.limits.whileLoops)
+ parseContext.error($1.loc, "while loops not available", "limitation", "");
+ parseContext.symbolTable.push();
+ ++parseContext.loopNestingLevel;
+ ++parseContext.statementNestingLevel;
+ ++parseContext.controlFlowNestingLevel;
+ }
+ condition RIGHT_PAREN statement_no_new_scope {
+ parseContext.symbolTable.pop(&parseContext.defaultPrecision[0]);
+ $$ = parseContext.intermediate.addLoop($6, $4, 0, true, $1.loc);
+ --parseContext.loopNestingLevel;
+ --parseContext.statementNestingLevel;
+ --parseContext.controlFlowNestingLevel;
+ }
+ | DO {
+ ++parseContext.loopNestingLevel;
+ ++parseContext.statementNestingLevel;
+ ++parseContext.controlFlowNestingLevel;
+ }
+ statement WHILE LEFT_PAREN expression RIGHT_PAREN SEMICOLON {
+ if (! parseContext.limits.whileLoops)
+ parseContext.error($1.loc, "do-while loops not available", "limitation", "");
+
+ parseContext.boolCheck($8.loc, $6);
+
+ $$ = parseContext.intermediate.addLoop($3, $6, 0, false, $4.loc);
+ --parseContext.loopNestingLevel;
+ --parseContext.statementNestingLevel;
+ --parseContext.controlFlowNestingLevel;
+ }
+ | FOR LEFT_PAREN {
+ parseContext.symbolTable.push();
+ ++parseContext.loopNestingLevel;
+ ++parseContext.statementNestingLevel;
+ ++parseContext.controlFlowNestingLevel;
+ }
+ for_init_statement for_rest_statement RIGHT_PAREN statement_no_new_scope {
+ parseContext.symbolTable.pop(&parseContext.defaultPrecision[0]);
+ $$ = parseContext.intermediate.makeAggregate($4, $2.loc);
+ TIntermLoop* forLoop = parseContext.intermediate.addLoop($7, reinterpret_cast<TIntermTyped*>($5.node1), reinterpret_cast<TIntermTyped*>($5.node2), true, $1.loc);
+ if (! parseContext.limits.nonInductiveForLoops)
+ parseContext.inductiveLoopCheck($1.loc, $4, forLoop);
+ $$ = parseContext.intermediate.growAggregate($$, forLoop, $1.loc);
+ $$->getAsAggregate()->setOperator(EOpSequence);
+ --parseContext.loopNestingLevel;
+ --parseContext.statementNestingLevel;
+ --parseContext.controlFlowNestingLevel;
+ }
+ ;
+
+for_init_statement
+ : expression_statement {
+ $$ = $1;
+ }
+ | declaration_statement {
+ $$ = $1;
+ }
+ ;
+
+conditionopt
+ : condition {
+ $$ = $1;
+ }
+ | /* May be null */ {
+ $$ = 0;
+ }
+ ;
+
+for_rest_statement
+ : conditionopt SEMICOLON {
+ $$.node1 = $1;
+ $$.node2 = 0;
+ }
+ | conditionopt SEMICOLON expression {
+ $$.node1 = $1;
+ $$.node2 = $3;
+ }
+ ;
+
+jump_statement
+ : CONTINUE SEMICOLON {
+ if (parseContext.loopNestingLevel <= 0)
+ parseContext.error($1.loc, "continue statement only allowed in loops", "", "");
+ $$ = parseContext.intermediate.addBranch(EOpContinue, $1.loc);
+ }
+ | BREAK SEMICOLON {
+ if (parseContext.loopNestingLevel + parseContext.switchSequenceStack.size() <= 0)
+ parseContext.error($1.loc, "break statement only allowed in switch and loops", "", "");
+ $$ = parseContext.intermediate.addBranch(EOpBreak, $1.loc);
+ }
+ | RETURN SEMICOLON {
+ $$ = parseContext.intermediate.addBranch(EOpReturn, $1.loc);
+ if (parseContext.currentFunctionType->getBasicType() != EbtVoid)
+ parseContext.error($1.loc, "non-void function must return a value", "return", "");
+ if (parseContext.inMain)
+ parseContext.postMainReturn = true;
+ }
+ | RETURN expression SEMICOLON {
+ parseContext.functionReturnsValue = true;
+ if (parseContext.currentFunctionType->getBasicType() == EbtVoid) {
+ parseContext.error($1.loc, "void function cannot return a value", "return", "");
+ $$ = parseContext.intermediate.addBranch(EOpReturn, $1.loc);
+ } else if (*(parseContext.currentFunctionType) != $2->getType()) {
+ TIntermTyped* converted = parseContext.intermediate.addConversion(EOpReturn, *parseContext.currentFunctionType, $2);
+ if (converted) {
+ if (parseContext.version < 420)
+ parseContext.warn($1.loc, "type conversion on return values was not explicitly allowed until version 420", "return", "");
+ $$ = parseContext.intermediate.addBranch(EOpReturn, converted, $1.loc);
+ } else {
+ parseContext.error($1.loc, "type does not match, or is not convertible to, the function's return type", "return", "");
+ $$ = parseContext.intermediate.addBranch(EOpReturn, $2, $1.loc);
+ }
+ } else
+ $$ = parseContext.intermediate.addBranch(EOpReturn, $2, $1.loc);
+ }
+ | DISCARD SEMICOLON {
+ parseContext.requireStage($1.loc, EShLangFragment, "discard");
+ $$ = parseContext.intermediate.addBranch(EOpKill, $1.loc);
+ }
+ ;
+
+// Grammar Note: No 'goto'. Gotos are not supported.
+
+translation_unit
+ : external_declaration {
+ $$ = $1;
+ parseContext.intermediate.setTreeRoot($$);
+ }
+ | translation_unit external_declaration {
+ $$ = parseContext.intermediate.growAggregate($1, $2);
+ parseContext.intermediate.setTreeRoot($$);
+ }
+ ;
+
+external_declaration
+ : function_definition {
+ $$ = $1;
+ }
+ | declaration {
+ $$ = $1;
+ }
+ ;
+
+function_definition
+ : function_prototype {
+ $1.function = parseContext.handleFunctionDeclarator($1.loc, *$1.function, false /* not prototype */);
+ $1.intermNode = parseContext.handleFunctionDefinition($1.loc, *$1.function);
+ }
+ compound_statement_no_new_scope {
+ // May be best done as post process phase on intermediate code
+ if (parseContext.currentFunctionType->getBasicType() != EbtVoid && ! parseContext.functionReturnsValue)
+ parseContext.error($1.loc, "function does not return a value:", "", $1.function->getName().c_str());
+ parseContext.symbolTable.pop(&parseContext.defaultPrecision[0]);
+ $$ = parseContext.intermediate.growAggregate($1.intermNode, $3);
+ parseContext.intermediate.setAggregateOperator($$, EOpFunction, $1.function->getType(), $1.loc);
+ $$->getAsAggregate()->setName($1.function->getMangledName().c_str());
+
+ // store the pragma information for debug and optimize and other vendor specific
+ // information. This information can be queried from the parse tree
+ $$->getAsAggregate()->setOptimize(parseContext.contextPragma.optimize);
+ $$->getAsAggregate()->setDebug(parseContext.contextPragma.debug);
+ $$->getAsAggregate()->addToPragmaTable(parseContext.contextPragma.pragmaTable);
+ }
+ ;
+
+%%
diff --git a/chromium/third_party/glslang/src/glslang/MachineIndependent/glslang_tab.cpp b/chromium/third_party/glslang/src/glslang/MachineIndependent/glslang_tab.cpp
new file mode 100644
index 00000000000..a284fda43f7
--- /dev/null
+++ b/chromium/third_party/glslang/src/glslang/MachineIndependent/glslang_tab.cpp
@@ -0,0 +1,7685 @@
+/* A Bison parser, made by GNU Bison 3.0.4. */
+
+/* Bison implementation for Yacc-like parsers in C
+
+ Copyright (C) 1984, 1989-1990, 2000-2015 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* As a special exception, you may create a larger work that contains
+ part or all of the Bison parser skeleton and distribute that work
+ under terms of your choice, so long as that work isn't itself a
+ parser generator using the skeleton or a modified version thereof
+ as a parser skeleton. Alternatively, if you modify or redistribute
+ the parser skeleton itself, you may (at your option) remove this
+ special exception, which will cause the skeleton and the resulting
+ Bison output files to be licensed under the GNU General Public
+ License without this special exception.
+
+ This special exception was added by the Free Software Foundation in
+ version 2.2 of Bison. */
+
+/* C LALR(1) parser skeleton written by Richard Stallman, by
+ simplifying the original so-called "semantic" parser. */
+
+/* All symbols defined below should begin with yy or YY, to avoid
+ infringing on user name space. This should be done even for local
+ variables, as they might otherwise be expanded by user macros.
+ There are some unavoidable exceptions within include files to
+ define necessary library symbols; they are noted "INFRINGES ON
+ USER NAME SPACE" below. */
+
+/* Identify Bison output. */
+#define YYBISON 1
+
+/* Bison version. */
+#define YYBISON_VERSION "3.0.4"
+
+/* Skeleton name. */
+#define YYSKELETON_NAME "yacc.c"
+
+/* Pure parsers. */
+#define YYPURE 1
+
+/* Push parsers. */
+#define YYPUSH 0
+
+/* Pull parsers. */
+#define YYPULL 1
+
+
+
+
+/* Copy the first part of user declarations. */
+#line 41 "MachineIndependent/glslang.y" /* yacc.c:339 */
+
+
+/* Based on:
+ANSI C Yacc grammar
+
+In 1985, Jeff Lee published his Yacc grammar (which is accompanied by a
+matching Lex specification) for the April 30, 1985 draft version of the
+ANSI C standard. Tom Stockfisch reposted it to net.sources in 1987; that
+original, as mentioned in the answer to question 17.25 of the comp.lang.c
+FAQ, can be ftp'ed from ftp.uu.net, file usenet/net.sources/ansi.c.grammar.Z.
+
+I intend to keep this version as close to the current C Standard grammar as
+possible; please let me know if you discover discrepancies.
+
+Jutta Degener, 1995
+*/
+
+#include "SymbolTable.h"
+#include "ParseHelper.h"
+#include "../Public/ShaderLang.h"
+
+using namespace glslang;
+
+
+#line 91 "MachineIndependent/glslang_tab.cpp" /* yacc.c:339 */
+
+# ifndef YY_NULLPTR
+# if defined __cplusplus && 201103L <= __cplusplus
+# define YY_NULLPTR nullptr
+# else
+# define YY_NULLPTR 0
+# endif
+# endif
+
+/* Enabling verbose error messages. */
+#ifdef YYERROR_VERBOSE
+# undef YYERROR_VERBOSE
+# define YYERROR_VERBOSE 1
+#else
+# define YYERROR_VERBOSE 0
+#endif
+
+/* In a future release of Bison, this section will be replaced
+ by #include "glslang_tab.cpp.h". */
+#ifndef YY_YY_MACHINEINDEPENDENT_GLSLANG_TAB_CPP_H_INCLUDED
+# define YY_YY_MACHINEINDEPENDENT_GLSLANG_TAB_CPP_H_INCLUDED
+/* Debug traces. */
+#ifndef YYDEBUG
+# define YYDEBUG 1
+#endif
+#if YYDEBUG
+extern int yydebug;
+#endif
+
+/* Token type. */
+#ifndef YYTOKENTYPE
+# define YYTOKENTYPE
+ enum yytokentype
+ {
+ ATTRIBUTE = 258,
+ VARYING = 259,
+ CONST = 260,
+ BOOL = 261,
+ FLOAT = 262,
+ DOUBLE = 263,
+ INT = 264,
+ UINT = 265,
+ INT64_T = 266,
+ UINT64_T = 267,
+ BREAK = 268,
+ CONTINUE = 269,
+ DO = 270,
+ ELSE = 271,
+ FOR = 272,
+ IF = 273,
+ DISCARD = 274,
+ RETURN = 275,
+ SWITCH = 276,
+ CASE = 277,
+ DEFAULT = 278,
+ SUBROUTINE = 279,
+ BVEC2 = 280,
+ BVEC3 = 281,
+ BVEC4 = 282,
+ IVEC2 = 283,
+ IVEC3 = 284,
+ IVEC4 = 285,
+ I64VEC2 = 286,
+ I64VEC3 = 287,
+ I64VEC4 = 288,
+ UVEC2 = 289,
+ UVEC3 = 290,
+ UVEC4 = 291,
+ U64VEC2 = 292,
+ U64VEC3 = 293,
+ U64VEC4 = 294,
+ VEC2 = 295,
+ VEC3 = 296,
+ VEC4 = 297,
+ MAT2 = 298,
+ MAT3 = 299,
+ MAT4 = 300,
+ CENTROID = 301,
+ IN = 302,
+ OUT = 303,
+ INOUT = 304,
+ UNIFORM = 305,
+ PATCH = 306,
+ SAMPLE = 307,
+ BUFFER = 308,
+ SHARED = 309,
+ COHERENT = 310,
+ VOLATILE = 311,
+ RESTRICT = 312,
+ READONLY = 313,
+ WRITEONLY = 314,
+ DVEC2 = 315,
+ DVEC3 = 316,
+ DVEC4 = 317,
+ DMAT2 = 318,
+ DMAT3 = 319,
+ DMAT4 = 320,
+ NOPERSPECTIVE = 321,
+ FLAT = 322,
+ SMOOTH = 323,
+ LAYOUT = 324,
+ MAT2X2 = 325,
+ MAT2X3 = 326,
+ MAT2X4 = 327,
+ MAT3X2 = 328,
+ MAT3X3 = 329,
+ MAT3X4 = 330,
+ MAT4X2 = 331,
+ MAT4X3 = 332,
+ MAT4X4 = 333,
+ DMAT2X2 = 334,
+ DMAT2X3 = 335,
+ DMAT2X4 = 336,
+ DMAT3X2 = 337,
+ DMAT3X3 = 338,
+ DMAT3X4 = 339,
+ DMAT4X2 = 340,
+ DMAT4X3 = 341,
+ DMAT4X4 = 342,
+ ATOMIC_UINT = 343,
+ SAMPLER1D = 344,
+ SAMPLER2D = 345,
+ SAMPLER3D = 346,
+ SAMPLERCUBE = 347,
+ SAMPLER1DSHADOW = 348,
+ SAMPLER2DSHADOW = 349,
+ SAMPLERCUBESHADOW = 350,
+ SAMPLER1DARRAY = 351,
+ SAMPLER2DARRAY = 352,
+ SAMPLER1DARRAYSHADOW = 353,
+ SAMPLER2DARRAYSHADOW = 354,
+ ISAMPLER1D = 355,
+ ISAMPLER2D = 356,
+ ISAMPLER3D = 357,
+ ISAMPLERCUBE = 358,
+ ISAMPLER1DARRAY = 359,
+ ISAMPLER2DARRAY = 360,
+ USAMPLER1D = 361,
+ USAMPLER2D = 362,
+ USAMPLER3D = 363,
+ USAMPLERCUBE = 364,
+ USAMPLER1DARRAY = 365,
+ USAMPLER2DARRAY = 366,
+ SAMPLER2DRECT = 367,
+ SAMPLER2DRECTSHADOW = 368,
+ ISAMPLER2DRECT = 369,
+ USAMPLER2DRECT = 370,
+ SAMPLERBUFFER = 371,
+ ISAMPLERBUFFER = 372,
+ USAMPLERBUFFER = 373,
+ SAMPLERCUBEARRAY = 374,
+ SAMPLERCUBEARRAYSHADOW = 375,
+ ISAMPLERCUBEARRAY = 376,
+ USAMPLERCUBEARRAY = 377,
+ SAMPLER2DMS = 378,
+ ISAMPLER2DMS = 379,
+ USAMPLER2DMS = 380,
+ SAMPLER2DMSARRAY = 381,
+ ISAMPLER2DMSARRAY = 382,
+ USAMPLER2DMSARRAY = 383,
+ SAMPLEREXTERNALOES = 384,
+ SAMPLER = 385,
+ SAMPLERSHADOW = 386,
+ TEXTURE1D = 387,
+ TEXTURE2D = 388,
+ TEXTURE3D = 389,
+ TEXTURECUBE = 390,
+ TEXTURE1DARRAY = 391,
+ TEXTURE2DARRAY = 392,
+ ITEXTURE1D = 393,
+ ITEXTURE2D = 394,
+ ITEXTURE3D = 395,
+ ITEXTURECUBE = 396,
+ ITEXTURE1DARRAY = 397,
+ ITEXTURE2DARRAY = 398,
+ UTEXTURE1D = 399,
+ UTEXTURE2D = 400,
+ UTEXTURE3D = 401,
+ UTEXTURECUBE = 402,
+ UTEXTURE1DARRAY = 403,
+ UTEXTURE2DARRAY = 404,
+ TEXTURE2DRECT = 405,
+ ITEXTURE2DRECT = 406,
+ UTEXTURE2DRECT = 407,
+ TEXTUREBUFFER = 408,
+ ITEXTUREBUFFER = 409,
+ UTEXTUREBUFFER = 410,
+ TEXTURECUBEARRAY = 411,
+ ITEXTURECUBEARRAY = 412,
+ UTEXTURECUBEARRAY = 413,
+ TEXTURE2DMS = 414,
+ ITEXTURE2DMS = 415,
+ UTEXTURE2DMS = 416,
+ TEXTURE2DMSARRAY = 417,
+ ITEXTURE2DMSARRAY = 418,
+ UTEXTURE2DMSARRAY = 419,
+ SUBPASSINPUT = 420,
+ SUBPASSINPUTMS = 421,
+ ISUBPASSINPUT = 422,
+ ISUBPASSINPUTMS = 423,
+ USUBPASSINPUT = 424,
+ USUBPASSINPUTMS = 425,
+ IMAGE1D = 426,
+ IIMAGE1D = 427,
+ UIMAGE1D = 428,
+ IMAGE2D = 429,
+ IIMAGE2D = 430,
+ UIMAGE2D = 431,
+ IMAGE3D = 432,
+ IIMAGE3D = 433,
+ UIMAGE3D = 434,
+ IMAGE2DRECT = 435,
+ IIMAGE2DRECT = 436,
+ UIMAGE2DRECT = 437,
+ IMAGECUBE = 438,
+ IIMAGECUBE = 439,
+ UIMAGECUBE = 440,
+ IMAGEBUFFER = 441,
+ IIMAGEBUFFER = 442,
+ UIMAGEBUFFER = 443,
+ IMAGE1DARRAY = 444,
+ IIMAGE1DARRAY = 445,
+ UIMAGE1DARRAY = 446,
+ IMAGE2DARRAY = 447,
+ IIMAGE2DARRAY = 448,
+ UIMAGE2DARRAY = 449,
+ IMAGECUBEARRAY = 450,
+ IIMAGECUBEARRAY = 451,
+ UIMAGECUBEARRAY = 452,
+ IMAGE2DMS = 453,
+ IIMAGE2DMS = 454,
+ UIMAGE2DMS = 455,
+ IMAGE2DMSARRAY = 456,
+ IIMAGE2DMSARRAY = 457,
+ UIMAGE2DMSARRAY = 458,
+ STRUCT = 459,
+ VOID = 460,
+ WHILE = 461,
+ IDENTIFIER = 462,
+ TYPE_NAME = 463,
+ FLOATCONSTANT = 464,
+ DOUBLECONSTANT = 465,
+ INTCONSTANT = 466,
+ UINTCONSTANT = 467,
+ INT64CONSTANT = 468,
+ UINT64CONSTANT = 469,
+ BOOLCONSTANT = 470,
+ LEFT_OP = 471,
+ RIGHT_OP = 472,
+ INC_OP = 473,
+ DEC_OP = 474,
+ LE_OP = 475,
+ GE_OP = 476,
+ EQ_OP = 477,
+ NE_OP = 478,
+ AND_OP = 479,
+ OR_OP = 480,
+ XOR_OP = 481,
+ MUL_ASSIGN = 482,
+ DIV_ASSIGN = 483,
+ ADD_ASSIGN = 484,
+ MOD_ASSIGN = 485,
+ LEFT_ASSIGN = 486,
+ RIGHT_ASSIGN = 487,
+ AND_ASSIGN = 488,
+ XOR_ASSIGN = 489,
+ OR_ASSIGN = 490,
+ SUB_ASSIGN = 491,
+ LEFT_PAREN = 492,
+ RIGHT_PAREN = 493,
+ LEFT_BRACKET = 494,
+ RIGHT_BRACKET = 495,
+ LEFT_BRACE = 496,
+ RIGHT_BRACE = 497,
+ DOT = 498,
+ COMMA = 499,
+ COLON = 500,
+ EQUAL = 501,
+ SEMICOLON = 502,
+ BANG = 503,
+ DASH = 504,
+ TILDE = 505,
+ PLUS = 506,
+ STAR = 507,
+ SLASH = 508,
+ PERCENT = 509,
+ LEFT_ANGLE = 510,
+ RIGHT_ANGLE = 511,
+ VERTICAL_BAR = 512,
+ CARET = 513,
+ AMPERSAND = 514,
+ QUESTION = 515,
+ INVARIANT = 516,
+ PRECISE = 517,
+ HIGH_PRECISION = 518,
+ MEDIUM_PRECISION = 519,
+ LOW_PRECISION = 520,
+ PRECISION = 521,
+ PACKED = 522,
+ RESOURCE = 523,
+ SUPERP = 524
+ };
+#endif
+
+/* Value type. */
+#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
+
+union YYSTYPE
+{
+#line 66 "MachineIndependent/glslang.y" /* yacc.c:355 */
+
+ struct {
+ glslang::TSourceLoc loc;
+ union {
+ glslang::TString *string;
+ int i;
+ unsigned int u;
+ long long i64;
+ unsigned long long u64;
+ bool b;
+ double d;
+ };
+ glslang::TSymbol* symbol;
+ } lex;
+ struct {
+ glslang::TSourceLoc loc;
+ glslang::TOperator op;
+ union {
+ TIntermNode* intermNode;
+ glslang::TIntermNodePair nodePair;
+ glslang::TIntermTyped* intermTypedNode;
+ };
+ union {
+ glslang::TPublicType type;
+ glslang::TFunction* function;
+ glslang::TParameter param;
+ glslang::TTypeLoc typeLine;
+ glslang::TTypeList* typeList;
+ glslang::TArraySizes* arraySizes;
+ glslang::TIdentifierList* identifierList;
+ };
+ } interm;
+
+#line 435 "MachineIndependent/glslang_tab.cpp" /* yacc.c:355 */
+};
+
+typedef union YYSTYPE YYSTYPE;
+# define YYSTYPE_IS_TRIVIAL 1
+# define YYSTYPE_IS_DECLARED 1
+#endif
+
+
+
+int yyparse (glslang::TParseContext* pParseContext);
+
+#endif /* !YY_YY_MACHINEINDEPENDENT_GLSLANG_TAB_CPP_H_INCLUDED */
+
+/* Copy the second part of user declarations. */
+#line 100 "MachineIndependent/glslang.y" /* yacc.c:358 */
+
+
+/* windows only pragma */
+#ifdef _MSC_VER
+ #pragma warning(disable : 4065)
+ #pragma warning(disable : 4127)
+ #pragma warning(disable : 4244)
+#endif
+
+#define parseContext (*pParseContext)
+#define yyerror(context, msg) context->parserError(msg)
+
+extern int yylex(YYSTYPE*, TParseContext&);
+
+
+#line 466 "MachineIndependent/glslang_tab.cpp" /* yacc.c:358 */
+
+#ifdef short
+# undef short
+#endif
+
+#ifdef YYTYPE_UINT8
+typedef YYTYPE_UINT8 yytype_uint8;
+#else
+typedef unsigned char yytype_uint8;
+#endif
+
+#ifdef YYTYPE_INT8
+typedef YYTYPE_INT8 yytype_int8;
+#else
+typedef signed char yytype_int8;
+#endif
+
+#ifdef YYTYPE_UINT16
+typedef YYTYPE_UINT16 yytype_uint16;
+#else
+typedef unsigned short int yytype_uint16;
+#endif
+
+#ifdef YYTYPE_INT16
+typedef YYTYPE_INT16 yytype_int16;
+#else
+typedef short int yytype_int16;
+#endif
+
+#ifndef YYSIZE_T
+# ifdef __SIZE_TYPE__
+# define YYSIZE_T __SIZE_TYPE__
+# elif defined size_t
+# define YYSIZE_T size_t
+# elif ! defined YYSIZE_T
+# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
+# define YYSIZE_T size_t
+# else
+# define YYSIZE_T unsigned int
+# endif
+#endif
+
+#define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
+
+#ifndef YY_
+# if defined YYENABLE_NLS && YYENABLE_NLS
+# if ENABLE_NLS
+# include <libintl.h> /* INFRINGES ON USER NAME SPACE */
+# define YY_(Msgid) dgettext ("bison-runtime", Msgid)
+# endif
+# endif
+# ifndef YY_
+# define YY_(Msgid) Msgid
+# endif
+#endif
+
+#ifndef YY_ATTRIBUTE
+# if (defined __GNUC__ \
+ && (2 < __GNUC__ || (__GNUC__ == 2 && 96 <= __GNUC_MINOR__))) \
+ || defined __SUNPRO_C && 0x5110 <= __SUNPRO_C
+# define YY_ATTRIBUTE(Spec) __attribute__(Spec)
+# else
+# define YY_ATTRIBUTE(Spec) /* empty */
+# endif
+#endif
+
+#ifndef YY_ATTRIBUTE_PURE
+# define YY_ATTRIBUTE_PURE YY_ATTRIBUTE ((__pure__))
+#endif
+
+#ifndef YY_ATTRIBUTE_UNUSED
+# define YY_ATTRIBUTE_UNUSED YY_ATTRIBUTE ((__unused__))
+#endif
+
+#if !defined _Noreturn \
+ && (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112)
+# if defined _MSC_VER && 1200 <= _MSC_VER
+# define _Noreturn __declspec (noreturn)
+# else
+# define _Noreturn YY_ATTRIBUTE ((__noreturn__))
+# endif
+#endif
+
+/* Suppress unused-variable warnings by "using" E. */
+#if ! defined lint || defined __GNUC__
+# define YYUSE(E) ((void) (E))
+#else
+# define YYUSE(E) /* empty */
+#endif
+
+#if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__
+/* Suppress an incorrect diagnostic about yylval being uninitialized. */
+# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
+ _Pragma ("GCC diagnostic push") \
+ _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\
+ _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
+# define YY_IGNORE_MAYBE_UNINITIALIZED_END \
+ _Pragma ("GCC diagnostic pop")
+#else
+# define YY_INITIAL_VALUE(Value) Value
+#endif
+#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
+# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
+# define YY_IGNORE_MAYBE_UNINITIALIZED_END
+#endif
+#ifndef YY_INITIAL_VALUE
+# define YY_INITIAL_VALUE(Value) /* Nothing. */
+#endif
+
+
+#if ! defined yyoverflow || YYERROR_VERBOSE
+
+/* The parser invokes alloca or malloc; define the necessary symbols. */
+
+# ifdef YYSTACK_USE_ALLOCA
+# if YYSTACK_USE_ALLOCA
+# ifdef __GNUC__
+# define YYSTACK_ALLOC __builtin_alloca
+# elif defined __BUILTIN_VA_ARG_INCR
+# include <alloca.h> /* INFRINGES ON USER NAME SPACE */
+# elif defined _AIX
+# define YYSTACK_ALLOC __alloca
+# elif defined _MSC_VER
+# include <malloc.h> /* INFRINGES ON USER NAME SPACE */
+# define alloca _alloca
+# else
+# define YYSTACK_ALLOC alloca
+# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS
+# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
+ /* Use EXIT_SUCCESS as a witness for stdlib.h. */
+# ifndef EXIT_SUCCESS
+# define EXIT_SUCCESS 0
+# endif
+# endif
+# endif
+# endif
+# endif
+
+# ifdef YYSTACK_ALLOC
+ /* Pacify GCC's 'empty if-body' warning. */
+# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
+# ifndef YYSTACK_ALLOC_MAXIMUM
+ /* The OS might guarantee only one guard page at the bottom of the stack,
+ and a page size can be as small as 4096 bytes. So we cannot safely
+ invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
+ to allow for a few compiler-allocated temporary stack slots. */
+# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
+# endif
+# else
+# define YYSTACK_ALLOC YYMALLOC
+# define YYSTACK_FREE YYFREE
+# ifndef YYSTACK_ALLOC_MAXIMUM
+# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
+# endif
+# if (defined __cplusplus && ! defined EXIT_SUCCESS \
+ && ! ((defined YYMALLOC || defined malloc) \
+ && (defined YYFREE || defined free)))
+# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
+# ifndef EXIT_SUCCESS
+# define EXIT_SUCCESS 0
+# endif
+# endif
+# ifndef YYMALLOC
+# define YYMALLOC malloc
+# if ! defined malloc && ! defined EXIT_SUCCESS
+void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
+# endif
+# endif
+# ifndef YYFREE
+# define YYFREE free
+# if ! defined free && ! defined EXIT_SUCCESS
+void free (void *); /* INFRINGES ON USER NAME SPACE */
+# endif
+# endif
+# endif
+#endif /* ! defined yyoverflow || YYERROR_VERBOSE */
+
+
+#if (! defined yyoverflow \
+ && (! defined __cplusplus \
+ || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
+
+/* A type that is properly aligned for any stack member. */
+union yyalloc
+{
+ yytype_int16 yyss_alloc;
+ YYSTYPE yyvs_alloc;
+};
+
+/* The size of the maximum gap between one aligned stack and the next. */
+# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
+
+/* The size of an array large to enough to hold all stacks, each with
+ N elements. */
+# define YYSTACK_BYTES(N) \
+ ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
+ + YYSTACK_GAP_MAXIMUM)
+
+# define YYCOPY_NEEDED 1
+
+/* Relocate STACK from its old location to the new one. The
+ local variables YYSIZE and YYSTACKSIZE give the old and new number of
+ elements in the stack, and YYPTR gives the new location of the
+ stack. Advance YYPTR to a properly aligned location for the next
+ stack. */
+# define YYSTACK_RELOCATE(Stack_alloc, Stack) \
+ do \
+ { \
+ YYSIZE_T yynewbytes; \
+ YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
+ Stack = &yyptr->Stack_alloc; \
+ yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
+ yyptr += yynewbytes / sizeof (*yyptr); \
+ } \
+ while (0)
+
+#endif
+
+#if defined YYCOPY_NEEDED && YYCOPY_NEEDED
+/* Copy COUNT objects from SRC to DST. The source and destination do
+ not overlap. */
+# ifndef YYCOPY
+# if defined __GNUC__ && 1 < __GNUC__
+# define YYCOPY(Dst, Src, Count) \
+ __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src)))
+# else
+# define YYCOPY(Dst, Src, Count) \
+ do \
+ { \
+ YYSIZE_T yyi; \
+ for (yyi = 0; yyi < (Count); yyi++) \
+ (Dst)[yyi] = (Src)[yyi]; \
+ } \
+ while (0)
+# endif
+# endif
+#endif /* !YYCOPY_NEEDED */
+
+/* YYFINAL -- State number of the termination state. */
+#define YYFINAL 248
+/* YYLAST -- Last index in YYTABLE. */
+#define YYLAST 5943
+
+/* YYNTOKENS -- Number of terminals. */
+#define YYNTOKENS 270
+/* YYNNTS -- Number of nonterminals. */
+#define YYNNTS 100
+/* YYNRULES -- Number of rules. */
+#define YYNRULES 421
+/* YYNSTATES -- Number of states. */
+#define YYNSTATES 553
+
+/* YYTRANSLATE[YYX] -- Symbol number corresponding to YYX as returned
+ by yylex, with out-of-bounds checking. */
+#define YYUNDEFTOK 2
+#define YYMAXUTOK 524
+
+#define YYTRANSLATE(YYX) \
+ ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
+
+/* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM
+ as returned by yylex, without out-of-bounds checking. */
+static const yytype_uint16 yytranslate[] =
+{
+ 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
+ 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
+ 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
+ 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
+ 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
+ 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
+ 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, 94,
+ 95, 96, 97, 98, 99, 100, 101, 102, 103, 104,
+ 105, 106, 107, 108, 109, 110, 111, 112, 113, 114,
+ 115, 116, 117, 118, 119, 120, 121, 122, 123, 124,
+ 125, 126, 127, 128, 129, 130, 131, 132, 133, 134,
+ 135, 136, 137, 138, 139, 140, 141, 142, 143, 144,
+ 145, 146, 147, 148, 149, 150, 151, 152, 153, 154,
+ 155, 156, 157, 158, 159, 160, 161, 162, 163, 164,
+ 165, 166, 167, 168, 169, 170, 171, 172, 173, 174,
+ 175, 176, 177, 178, 179, 180, 181, 182, 183, 184,
+ 185, 186, 187, 188, 189, 190, 191, 192, 193, 194,
+ 195, 196, 197, 198, 199, 200, 201, 202, 203, 204,
+ 205, 206, 207, 208, 209, 210, 211, 212, 213, 214,
+ 215, 216, 217, 218, 219, 220, 221, 222, 223, 224,
+ 225, 226, 227, 228, 229, 230, 231, 232, 233, 234,
+ 235, 236, 237, 238, 239, 240, 241, 242, 243, 244,
+ 245, 246, 247, 248, 249, 250, 251, 252, 253, 254,
+ 255, 256, 257, 258, 259, 260, 261, 262, 263, 264,
+ 265, 266, 267, 268, 269
+};
+
+#if YYDEBUG
+ /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */
+static const yytype_uint16 yyrline[] =
+{
+ 0, 246, 246, 252, 255, 258, 262, 266, 270, 273,
+ 277, 280, 288, 291, 294, 297, 300, 305, 313, 320,
+ 327, 333, 337, 344, 347, 353, 360, 370, 378, 383,
+ 413, 419, 423, 427, 447, 448, 449, 450, 456, 457,
+ 462, 467, 476, 477, 482, 490, 491, 497, 506, 507,
+ 512, 517, 522, 530, 531, 539, 550, 551, 560, 561,
+ 570, 571, 580, 581, 589, 590, 598, 599, 607, 608,
+ 608, 626, 627, 642, 646, 650, 654, 659, 663, 667,
+ 671, 675, 679, 683, 690, 693, 703, 710, 715, 720,
+ 728, 732, 736, 740, 745, 750, 759, 759, 770, 774,
+ 781, 788, 791, 798, 806, 826, 844, 859, 882, 893,
+ 903, 913, 923, 932, 935, 939, 943, 948, 956, 961,
+ 966, 971, 976, 985, 996, 1023, 1032, 1039, 1046, 1056,
+ 1062, 1065, 1072, 1076, 1080, 1088, 1097, 1100, 1111, 1114,
+ 1117, 1120, 1124, 1128, 1135, 1139, 1151, 1165, 1170, 1176,
+ 1182, 1189, 1195, 1200, 1205, 1210, 1217, 1221, 1225, 1229,
+ 1233, 1237, 1243, 1255, 1258, 1263, 1267, 1276, 1281, 1289,
+ 1293, 1303, 1307, 1311, 1316, 1320, 1325, 1330, 1335, 1339,
+ 1344, 1349, 1354, 1360, 1366, 1372, 1377, 1382, 1387, 1392,
+ 1397, 1402, 1408, 1414, 1420, 1426, 1432, 1438, 1444, 1450,
+ 1456, 1461, 1466, 1471, 1476, 1481, 1486, 1491, 1496, 1501,
+ 1506, 1511, 1516, 1522, 1528, 1534, 1540, 1546, 1552, 1558,
+ 1564, 1570, 1576, 1582, 1588, 1593, 1598, 1603, 1608, 1613,
+ 1618, 1623, 1628, 1633, 1638, 1643, 1648, 1653, 1658, 1663,
+ 1668, 1673, 1678, 1683, 1688, 1693, 1698, 1703, 1708, 1713,
+ 1718, 1723, 1728, 1733, 1738, 1743, 1748, 1753, 1758, 1763,
+ 1768, 1773, 1778, 1783, 1788, 1793, 1798, 1803, 1808, 1813,
+ 1818, 1823, 1828, 1833, 1838, 1843, 1848, 1853, 1858, 1863,
+ 1868, 1873, 1878, 1883, 1888, 1893, 1898, 1903, 1908, 1913,
+ 1918, 1923, 1928, 1933, 1938, 1943, 1948, 1953, 1958, 1963,
+ 1968, 1973, 1978, 1983, 1988, 1993, 1998, 2003, 2008, 2013,
+ 2018, 2023, 2028, 2033, 2038, 2043, 2048, 2053, 2058, 2063,
+ 2068, 2073, 2078, 2083, 2088, 2093, 2098, 2103, 2108, 2113,
+ 2118, 2123, 2128, 2133, 2139, 2145, 2151, 2157, 2163, 2169,
+ 2175, 2180, 2196, 2202, 2208, 2217, 2217, 2228, 2228, 2238,
+ 2241, 2254, 2272, 2296, 2300, 2306, 2311, 2322, 2325, 2331,
+ 2340, 2343, 2349, 2353, 2354, 2360, 2361, 2362, 2363, 2364,
+ 2365, 2366, 2370, 2371, 2375, 2371, 2387, 2388, 2392, 2392,
+ 2399, 2399, 2413, 2416, 2424, 2432, 2443, 2444, 2448, 2455,
+ 2459, 2467, 2471, 2484, 2484, 2504, 2507, 2513, 2525, 2537,
+ 2537, 2552, 2552, 2568, 2568, 2589, 2592, 2598, 2601, 2607,
+ 2611, 2618, 2623, 2628, 2635, 2653, 2662, 2666, 2673, 2676,
+ 2682, 2682
+};
+#endif
+
+#if YYDEBUG || YYERROR_VERBOSE || 0
+/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
+ First, the terminals, then, starting at YYNTOKENS, nonterminals. */
+static const char *const yytname[] =
+{
+ "$end", "error", "$undefined", "ATTRIBUTE", "VARYING", "CONST", "BOOL",
+ "FLOAT", "DOUBLE", "INT", "UINT", "INT64_T", "UINT64_T", "BREAK",
+ "CONTINUE", "DO", "ELSE", "FOR", "IF", "DISCARD", "RETURN", "SWITCH",
+ "CASE", "DEFAULT", "SUBROUTINE", "BVEC2", "BVEC3", "BVEC4", "IVEC2",
+ "IVEC3", "IVEC4", "I64VEC2", "I64VEC3", "I64VEC4", "UVEC2", "UVEC3",
+ "UVEC4", "U64VEC2", "U64VEC3", "U64VEC4", "VEC2", "VEC3", "VEC4", "MAT2",
+ "MAT3", "MAT4", "CENTROID", "IN", "OUT", "INOUT", "UNIFORM", "PATCH",
+ "SAMPLE", "BUFFER", "SHARED", "COHERENT", "VOLATILE", "RESTRICT",
+ "READONLY", "WRITEONLY", "DVEC2", "DVEC3", "DVEC4", "DMAT2", "DMAT3",
+ "DMAT4", "NOPERSPECTIVE", "FLAT", "SMOOTH", "LAYOUT", "MAT2X2", "MAT2X3",
+ "MAT2X4", "MAT3X2", "MAT3X3", "MAT3X4", "MAT4X2", "MAT4X3", "MAT4X4",
+ "DMAT2X2", "DMAT2X3", "DMAT2X4", "DMAT3X2", "DMAT3X3", "DMAT3X4",
+ "DMAT4X2", "DMAT4X3", "DMAT4X4", "ATOMIC_UINT", "SAMPLER1D", "SAMPLER2D",
+ "SAMPLER3D", "SAMPLERCUBE", "SAMPLER1DSHADOW", "SAMPLER2DSHADOW",
+ "SAMPLERCUBESHADOW", "SAMPLER1DARRAY", "SAMPLER2DARRAY",
+ "SAMPLER1DARRAYSHADOW", "SAMPLER2DARRAYSHADOW", "ISAMPLER1D",
+ "ISAMPLER2D", "ISAMPLER3D", "ISAMPLERCUBE", "ISAMPLER1DARRAY",
+ "ISAMPLER2DARRAY", "USAMPLER1D", "USAMPLER2D", "USAMPLER3D",
+ "USAMPLERCUBE", "USAMPLER1DARRAY", "USAMPLER2DARRAY", "SAMPLER2DRECT",
+ "SAMPLER2DRECTSHADOW", "ISAMPLER2DRECT", "USAMPLER2DRECT",
+ "SAMPLERBUFFER", "ISAMPLERBUFFER", "USAMPLERBUFFER", "SAMPLERCUBEARRAY",
+ "SAMPLERCUBEARRAYSHADOW", "ISAMPLERCUBEARRAY", "USAMPLERCUBEARRAY",
+ "SAMPLER2DMS", "ISAMPLER2DMS", "USAMPLER2DMS", "SAMPLER2DMSARRAY",
+ "ISAMPLER2DMSARRAY", "USAMPLER2DMSARRAY", "SAMPLEREXTERNALOES",
+ "SAMPLER", "SAMPLERSHADOW", "TEXTURE1D", "TEXTURE2D", "TEXTURE3D",
+ "TEXTURECUBE", "TEXTURE1DARRAY", "TEXTURE2DARRAY", "ITEXTURE1D",
+ "ITEXTURE2D", "ITEXTURE3D", "ITEXTURECUBE", "ITEXTURE1DARRAY",
+ "ITEXTURE2DARRAY", "UTEXTURE1D", "UTEXTURE2D", "UTEXTURE3D",
+ "UTEXTURECUBE", "UTEXTURE1DARRAY", "UTEXTURE2DARRAY", "TEXTURE2DRECT",
+ "ITEXTURE2DRECT", "UTEXTURE2DRECT", "TEXTUREBUFFER", "ITEXTUREBUFFER",
+ "UTEXTUREBUFFER", "TEXTURECUBEARRAY", "ITEXTURECUBEARRAY",
+ "UTEXTURECUBEARRAY", "TEXTURE2DMS", "ITEXTURE2DMS", "UTEXTURE2DMS",
+ "TEXTURE2DMSARRAY", "ITEXTURE2DMSARRAY", "UTEXTURE2DMSARRAY",
+ "SUBPASSINPUT", "SUBPASSINPUTMS", "ISUBPASSINPUT", "ISUBPASSINPUTMS",
+ "USUBPASSINPUT", "USUBPASSINPUTMS", "IMAGE1D", "IIMAGE1D", "UIMAGE1D",
+ "IMAGE2D", "IIMAGE2D", "UIMAGE2D", "IMAGE3D", "IIMAGE3D", "UIMAGE3D",
+ "IMAGE2DRECT", "IIMAGE2DRECT", "UIMAGE2DRECT", "IMAGECUBE", "IIMAGECUBE",
+ "UIMAGECUBE", "IMAGEBUFFER", "IIMAGEBUFFER", "UIMAGEBUFFER",
+ "IMAGE1DARRAY", "IIMAGE1DARRAY", "UIMAGE1DARRAY", "IMAGE2DARRAY",
+ "IIMAGE2DARRAY", "UIMAGE2DARRAY", "IMAGECUBEARRAY", "IIMAGECUBEARRAY",
+ "UIMAGECUBEARRAY", "IMAGE2DMS", "IIMAGE2DMS", "UIMAGE2DMS",
+ "IMAGE2DMSARRAY", "IIMAGE2DMSARRAY", "UIMAGE2DMSARRAY", "STRUCT", "VOID",
+ "WHILE", "IDENTIFIER", "TYPE_NAME", "FLOATCONSTANT", "DOUBLECONSTANT",
+ "INTCONSTANT", "UINTCONSTANT", "INT64CONSTANT", "UINT64CONSTANT",
+ "BOOLCONSTANT", "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",
+ "INVARIANT", "PRECISE", "HIGH_PRECISION", "MEDIUM_PRECISION",
+ "LOW_PRECISION", "PRECISION", "PACKED", "RESOURCE", "SUPERP", "$accept",
+ "variable_identifier", "primary_expression", "postfix_expression",
+ "integer_expression", "function_call", "function_call_or_method",
+ "function_call_generic", "function_call_header_no_parameters",
+ "function_call_header_with_parameters", "function_call_header",
+ "function_identifier", "unary_expression", "unary_operator",
+ "multiplicative_expression", "additive_expression", "shift_expression",
+ "relational_expression", "equality_expression", "and_expression",
+ "exclusive_or_expression", "inclusive_or_expression",
+ "logical_and_expression", "logical_xor_expression",
+ "logical_or_expression", "conditional_expression", "$@1",
+ "assignment_expression", "assignment_operator", "expression",
+ "constant_expression", "declaration", "block_structure", "$@2",
+ "identifier_list", "function_prototype", "function_declarator",
+ "function_header_with_parameters", "function_header",
+ "parameter_declarator", "parameter_declaration",
+ "parameter_type_specifier", "init_declarator_list", "single_declaration",
+ "fully_specified_type", "invariant_qualifier", "interpolation_qualifier",
+ "layout_qualifier", "layout_qualifier_id_list", "layout_qualifier_id",
+ "precise_qualifier", "type_qualifier", "single_type_qualifier",
+ "storage_qualifier", "type_name_list", "type_specifier",
+ "array_specifier", "type_specifier_nonarray", "precision_qualifier",
+ "struct_specifier", "$@3", "$@4", "struct_declaration_list",
+ "struct_declaration", "struct_declarator_list", "struct_declarator",
+ "initializer", "initializer_list", "declaration_statement", "statement",
+ "simple_statement", "compound_statement", "$@5", "$@6",
+ "statement_no_new_scope", "statement_scoped", "$@7", "$@8",
+ "compound_statement_no_new_scope", "statement_list",
+ "expression_statement", "selection_statement",
+ "selection_rest_statement", "condition", "switch_statement", "$@9",
+ "switch_statement_list", "case_label", "iteration_statement", "$@10",
+ "$@11", "$@12", "for_init_statement", "conditionopt",
+ "for_rest_statement", "jump_statement", "translation_unit",
+ "external_declaration", "function_definition", "$@13", YY_NULLPTR
+};
+#endif
+
+# ifdef YYPRINT
+/* YYTOKNUM[NUM] -- (External) token number corresponding to the
+ (internal) symbol number NUM (which must be that of a token). */
+static const yytype_uint16 yytoknum[] =
+{
+ 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
+ 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
+ 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
+ 285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
+ 295, 296, 297, 298, 299, 300, 301, 302, 303, 304,
+ 305, 306, 307, 308, 309, 310, 311, 312, 313, 314,
+ 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, 349, 350, 351, 352, 353, 354,
+ 355, 356, 357, 358, 359, 360, 361, 362, 363, 364,
+ 365, 366, 367, 368, 369, 370, 371, 372, 373, 374,
+ 375, 376, 377, 378, 379, 380, 381, 382, 383, 384,
+ 385, 386, 387, 388, 389, 390, 391, 392, 393, 394,
+ 395, 396, 397, 398, 399, 400, 401, 402, 403, 404,
+ 405, 406, 407, 408, 409, 410, 411, 412, 413, 414,
+ 415, 416, 417, 418, 419, 420, 421, 422, 423, 424,
+ 425, 426, 427, 428, 429, 430, 431, 432, 433, 434,
+ 435, 436, 437, 438, 439, 440, 441, 442, 443, 444,
+ 445, 446, 447, 448, 449, 450, 451, 452, 453, 454,
+ 455, 456, 457, 458, 459, 460, 461, 462, 463, 464,
+ 465, 466, 467, 468, 469, 470, 471, 472, 473, 474,
+ 475, 476, 477, 478, 479, 480, 481, 482, 483, 484,
+ 485, 486, 487, 488, 489, 490, 491, 492, 493, 494,
+ 495, 496, 497, 498, 499, 500, 501, 502, 503, 504,
+ 505, 506, 507, 508, 509, 510, 511, 512, 513, 514,
+ 515, 516, 517, 518, 519, 520, 521, 522, 523, 524
+};
+# endif
+
+#define YYPACT_NINF -496
+
+#define yypact_value_is_default(Yystate) \
+ (!!((Yystate) == (-496)))
+
+#define YYTABLE_NINF -379
+
+#define yytable_value_is_error(Yytable_value) \
+ 0
+
+ /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
+ STATE-NUM. */
+static const yytype_int16 yypact[] =
+{
+ 2394, -496, -496, -496, -496, -496, -496, -496, -496, -496,
+ -496, -199, -496, -496, -496, -496, -496, -496, -496, -496,
+ -496, -496, -496, -496, -496, -496, -496, -496, -496, -496,
+ -496, -496, -496, -496, -496, -496, -496, -496, -496, -496,
+ -496, -496, -496, -496, -496, -496, -496, -496, -496, -496,
+ -496, -496, -496, -496, -496, -496, -187, -496, -496, -496,
+ -496, -496, -496, -496, -496, -496, -496, -496, -496, -496,
+ -496, -496, -496, -496, -496, -496, -496, -496, -496, -496,
+ -496, -496, -496, -496, -496, -496, -496, -496, -496, -496,
+ -496, -496, -496, -496, -496, -496, -496, -496, -496, -496,
+ -496, -496, -496, -496, -496, -496, -496, -496, -496, -496,
+ -496, -496, -496, -496, -496, -496, -496, -496, -496, -496,
+ -496, -496, -496, -496, -496, -496, -496, -496, -496, -496,
+ -496, -496, -496, -496, -496, -496, -496, -496, -496, -496,
+ -496, -496, -496, -496, -496, -496, -496, -496, -496, -496,
+ -496, -496, -496, -496, -496, -496, -496, -496, -496, -496,
+ -496, -496, -496, -496, -496, -496, -496, -496, -496, -496,
+ -496, -496, -496, -496, -496, -496, -496, -496, -496, -496,
+ -496, -496, -496, -496, -496, -496, -496, -496, -496, -496,
+ -496, -180, -496, -496, -496, -496, -496, -496, -496, -134,
+ -496, -191, -181, -155, -131, 3871, -133, -496, -69, -496,
+ -496, -496, -496, 2900, -496, -496, -496, -92, -496, -496,
+ 546, -496, -496, -68, -45, -91, -496, 5735, -200, -496,
+ -496, -85, -496, 3871, -496, -496, -496, 3871, -50, -49,
+ -496, -209, -193, -496, -496, -496, 4323, -80, -496, -496,
+ -496, -202, -496, -86, -171, -496, -496, 3871, -84, -496,
+ -198, 810, -496, -496, -496, -496, -92, -214, -496, 4558,
+ -176, -496, -46, -496, -127, -496, -496, -496, -496, -496,
+ -496, -496, -496, 5271, 5271, 5271, -496, -496, -496, -496,
+ -496, -496, -496, -175, -496, -496, -496, -73, -169, 5503,
+ -71, -496, 5271, -118, -170, -195, -197, -90, -89, -87,
+ -88, -57, -58, -208, -67, -496, 4804, -496, -36, 5271,
+ -496, -45, 3871, 3871, -33, 3145, -496, -496, -496, -72,
+ -70, -496, -61, -59, -66, 5039, -55, 5271, -62, -51,
+ -54, -496, -496, -141, -496, -496, -125, -496, -181, -48,
+ -496, -496, -496, -496, 1074, -496, -496, -496, -496, -496,
+ -496, -80, 4558, -174, 4558, -496, -496, 4558, 3871, -496,
+ -23, -496, -496, -496, -167, -496, -496, 5271, -20, -496,
+ -496, 5271, -43, -496, -496, -496, 5271, 5271, 5271, 5271,
+ 5271, 5271, 5271, 5271, 5271, 5271, 5271, 5271, 5271, 5271,
+ 5271, 5271, 5271, 5271, 5271, -496, -496, -496, -44, -496,
+ -496, -496, -496, 3387, -33, -92, -121, -496, -496, -496,
+ -496, -496, 1338, -496, 5271, -496, -496, -120, 5271, -102,
+ -496, -496, -496, 1338, -496, -496, -496, -496, -496, -496,
+ -496, -496, -496, -496, -496, 5271, 5271, -496, -496, -496,
+ -496, 4558, -496, -105, -496, 3629, -496, -496, -42, -52,
+ -496, -496, -496, -496, -496, -118, -118, -170, -170, -195,
+ -195, -195, -195, -197, -197, -90, -89, -87, -88, -57,
+ -58, 5271, -496, -496, -119, -80, -33, -496, -16, 2130,
+ -164, -496, -160, -496, 2637, 1338, -496, -496, -496, -496,
+ 4077, -496, -496, -99, -496, -496, -40, -496, -496, 2637,
+ -41, -496, -52, -8, 3871, -35, -38, -496, -496, 5271,
+ 5271, -496, -39, -32, 191, -31, 1866, -496, -30, -34,
+ 1602, -496, -496, -138, 5271, 1602, -41, -496, -496, 1338,
+ 4558, -496, -496, -496, -29, -52, -496, -496, 1338, -27,
+ -496, -496, -496
+};
+
+ /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
+ Performed when YYTABLE does not specify something else to do. Zero
+ means the default is an error. */
+static const yytype_uint16 yydefact[] =
+{
+ 0, 145, 146, 144, 178, 172, 173, 174, 175, 176,
+ 177, 161, 185, 186, 187, 188, 189, 190, 191, 192,
+ 193, 194, 195, 196, 197, 198, 199, 179, 180, 181,
+ 200, 201, 202, 150, 148, 149, 147, 153, 151, 152,
+ 154, 155, 156, 157, 158, 159, 160, 182, 183, 184,
+ 212, 213, 214, 128, 127, 126, 0, 203, 204, 205,
+ 206, 207, 208, 209, 210, 211, 215, 216, 217, 218,
+ 219, 220, 221, 222, 223, 224, 225, 226, 227, 228,
+ 229, 230, 231, 232, 233, 234, 235, 238, 239, 240,
+ 241, 242, 243, 245, 246, 247, 248, 249, 250, 252,
+ 253, 254, 255, 256, 257, 258, 236, 237, 244, 251,
+ 259, 260, 261, 262, 263, 264, 333, 265, 266, 267,
+ 268, 269, 270, 271, 272, 274, 275, 276, 277, 278,
+ 279, 281, 282, 283, 284, 285, 286, 288, 289, 290,
+ 291, 292, 293, 273, 280, 287, 294, 295, 296, 297,
+ 298, 299, 334, 335, 336, 337, 338, 339, 300, 301,
+ 302, 303, 304, 305, 306, 307, 308, 309, 310, 311,
+ 312, 313, 314, 315, 316, 317, 318, 319, 320, 321,
+ 322, 323, 324, 325, 326, 327, 328, 329, 330, 331,
+ 332, 0, 171, 341, 125, 135, 342, 343, 344, 0,
+ 419, 0, 420, 0, 102, 101, 0, 113, 118, 142,
+ 141, 139, 143, 0, 136, 138, 123, 165, 140, 340,
+ 0, 416, 418, 0, 0, 0, 347, 0, 0, 90,
+ 87, 0, 100, 0, 109, 103, 111, 0, 112, 0,
+ 88, 119, 0, 93, 137, 124, 0, 166, 1, 417,
+ 163, 0, 134, 132, 0, 130, 345, 0, 0, 91,
+ 0, 0, 421, 104, 108, 110, 106, 114, 105, 0,
+ 120, 96, 0, 94, 0, 2, 8, 9, 4, 5,
+ 6, 7, 10, 0, 0, 0, 167, 36, 35, 37,
+ 34, 3, 12, 30, 14, 19, 20, 0, 0, 24,
+ 0, 38, 0, 42, 45, 48, 53, 56, 58, 60,
+ 62, 64, 66, 68, 0, 28, 0, 162, 0, 0,
+ 129, 0, 0, 0, 0, 0, 349, 89, 92, 0,
+ 0, 401, 0, 0, 0, 0, 0, 0, 0, 0,
+ 373, 382, 386, 38, 71, 84, 0, 362, 0, 123,
+ 365, 384, 364, 363, 0, 366, 367, 368, 369, 370,
+ 371, 107, 0, 115, 0, 357, 122, 0, 0, 98,
+ 0, 95, 31, 32, 0, 16, 17, 0, 0, 22,
+ 21, 0, 171, 25, 27, 33, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 69, 168, 169, 0, 164,
+ 86, 133, 131, 0, 0, 355, 0, 353, 348, 350,
+ 412, 411, 0, 403, 0, 415, 413, 0, 0, 0,
+ 398, 399, 372, 0, 74, 75, 77, 76, 79, 80,
+ 81, 82, 83, 78, 73, 0, 0, 387, 383, 385,
+ 117, 0, 360, 0, 121, 0, 99, 11, 0, 18,
+ 15, 26, 39, 40, 41, 44, 43, 46, 47, 51,
+ 52, 49, 50, 54, 55, 57, 59, 61, 63, 65,
+ 67, 0, 170, 346, 0, 356, 0, 351, 0, 0,
+ 0, 414, 0, 397, 0, 374, 72, 85, 116, 358,
+ 0, 97, 13, 0, 352, 354, 0, 406, 405, 408,
+ 380, 393, 391, 0, 0, 0, 0, 359, 361, 0,
+ 0, 407, 0, 0, 390, 0, 0, 388, 0, 0,
+ 0, 375, 70, 0, 409, 0, 380, 379, 381, 395,
+ 0, 377, 400, 376, 0, 410, 404, 389, 396, 0,
+ 392, 402, 394
+};
+
+ /* YYPGOTO[NTERM-NUM]. */
+static const yytype_int16 yypgoto[] =
+{
+ -496, -496, -496, -496, -496, -496, -496, -496, -496, -496,
+ -496, -496, -53, -496, -237, -288, -286, -243, -183, -179,
+ -184, -177, -168, -185, -496, -234, -496, -266, -496, -280,
+ -496, 4, -496, -496, -496, 6, -496, -496, -496, -15,
+ -10, -9, -496, -496, -475, -496, -496, -496, -496, -83,
+ -496, -204, -211, -496, -496, 0, -221, -496, 33, -496,
+ -496, -496, -308, -314, -178, -247, -349, -496, -248, -346,
+ -495, -283, -496, -496, -292, -291, -496, -496, 13, -423,
+ -242, -496, -496, -263, -496, -496, -496, -496, -496, -496,
+ -496, -496, -496, -496, -496, -496, -496, 28, -496, -496
+};
+
+ /* YYDEFGOTO[NTERM-NUM]. */
+static const yytype_int16 yydefgoto[] =
+{
+ -1, 291, 292, 293, 458, 294, 295, 296, 297, 298,
+ 299, 300, 343, 302, 303, 304, 305, 306, 307, 308,
+ 309, 310, 311, 312, 313, 344, 481, 345, 445, 346,
+ 411, 347, 201, 368, 274, 348, 203, 204, 205, 234,
+ 235, 236, 206, 207, 208, 209, 210, 211, 254, 255,
+ 212, 213, 214, 215, 251, 315, 247, 217, 218, 219,
+ 322, 257, 325, 326, 416, 417, 366, 453, 350, 351,
+ 352, 353, 433, 516, 542, 524, 525, 526, 543, 354,
+ 355, 356, 527, 515, 357, 528, 549, 358, 359, 494,
+ 422, 489, 509, 522, 523, 360, 220, 221, 222, 231
+};
+
+ /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If
+ positive, shift that token. If negative, reduce the rule whose
+ number is the opposite. If YYTABLE_NINF, syntax error. */
+static const yytype_int16 yytable[] =
+{
+ 216, 237, 244, 365, 200, 374, 202, 260, 449, 252,
+ 495, 419, 314, 450, 413, 452, 228, 404, 454, 513,
+ 270, 391, 392, 393, 394, 246, 244, 225, 268, 237,
+ 246, 538, 362, 383, 513, 541, 317, 269, 223, 246,
+ 541, 316, 318, 375, 376, 361, 363, 259, 271, 328,
+ 224, 272, 405, 323, 273, 427, 229, 429, 395, 396,
+ 455, 226, -29, 316, 377, 316, 230, 320, 378, 380,
+ 367, 457, 451, 321, 510, 381, 488, 446, 511, 389,
+ 446, 390, 408, 232, 446, 410, 434, 435, 436, 437,
+ 438, 439, 440, 441, 442, 443, 365, 459, 365, 419,
+ 544, 365, 498, 467, 468, 444, 446, 469, 470, 471,
+ 472, 239, 244, 233, 240, 461, 548, 370, 323, 446,
+ 371, 323, 447, 486, 446, 486, 487, 491, 504, 196,
+ 197, 198, 397, 398, 386, 387, 388, 499, 241, 500,
+ 250, 419, 446, 493, 490, 446, 519, 246, 492, 449,
+ 256, 518, 465, 466, 473, 474, 261, 266, 267, 316,
+ 319, 369, 253, 327, 323, 379, 384, 402, 403, 401,
+ 399, 400, 409, 406, 415, 420, 423, 421, 424, 496,
+ 497, 425, 428, 430, 456, 365, 431, 460, 432, -28,
+ 506, 550, 446, 301, 485, -23, 482, 520, 502, 529,
+ -378, 503, 449, 530, 531, 238, 535, 536, 534, 323,
+ 340, 539, 540, 245, 512, 552, 475, 477, 551, 480,
+ 216, 476, 264, 263, 200, 478, 202, 258, 265, 512,
+ 372, 373, 227, 238, 365, 479, 484, 238, 412, 505,
+ 533, 507, 537, 546, 262, 547, 521, 508, 249, 385,
+ 0, 323, 0, 532, 545, 0, 0, 324, 0, 0,
+ 0, 349, 0, 301, 0, 0, 301, 0, 0, 0,
+ 0, 0, 0, 0, 365, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 514, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 244, 0, 514, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 324, 414, 0, 324, 0, 0, 0, 0,
+ 0, 0, 0, 462, 463, 464, 301, 301, 301, 301,
+ 301, 301, 301, 301, 301, 301, 301, 301, 301, 301,
+ 301, 301, 0, 0, 349, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 324, 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, 324, 0, 0, 0, 0, 0, 0,
+ 0, 0, 349, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 349, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 324, 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, 349,
+ 0, 0, 0, 0, 349, 349, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 349,
+ 0, 0, 0, 0, 245, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 349, 0, 0, 0,
+ 349, 0, 0, 0, 0, 349, 0, 0, 0, 349,
+ 0, 0, 0, 0, 0, 0, 248, 0, 349, 1,
+ 2, 3, 4, 5, 6, 7, 8, 9, 10, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
+ 21, 22, 23, 24, 25, 26, 27, 28, 29, 30,
+ 31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
+ 41, 42, 43, 44, 45, 46, 47, 48, 49, 50,
+ 51, 52, 53, 54, 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, 94, 95, 96, 97, 98, 99, 100,
+ 101, 102, 103, 104, 105, 106, 107, 108, 109, 110,
+ 111, 112, 113, 114, 115, 116, 117, 118, 119, 120,
+ 121, 122, 123, 124, 125, 126, 127, 128, 129, 130,
+ 131, 132, 133, 134, 135, 136, 137, 138, 139, 140,
+ 141, 142, 143, 144, 145, 146, 147, 148, 149, 150,
+ 151, 152, 153, 154, 155, 156, 157, 158, 159, 160,
+ 161, 162, 163, 164, 165, 166, 167, 168, 169, 170,
+ 171, 172, 173, 174, 175, 176, 177, 178, 179, 180,
+ 181, 182, 183, 184, 185, 186, 187, 188, 189, 190,
+ 191, 192, 0, 0, 193, 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, 194, 195, 196,
+ 197, 198, 199, 1, 2, 3, 4, 5, 6, 7,
+ 8, 9, 10, 329, 330, 331, 0, 332, 333, 334,
+ 335, 336, 337, 338, 11, 12, 13, 14, 15, 16,
+ 17, 18, 19, 20, 21, 22, 23, 24, 25, 26,
+ 27, 28, 29, 30, 31, 32, 33, 34, 35, 36,
+ 37, 38, 39, 40, 41, 42, 43, 44, 45, 46,
+ 47, 48, 49, 50, 51, 52, 53, 54, 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, 94, 95, 96,
+ 97, 98, 99, 100, 101, 102, 103, 104, 105, 106,
+ 107, 108, 109, 110, 111, 112, 113, 114, 115, 116,
+ 117, 118, 119, 120, 121, 122, 123, 124, 125, 126,
+ 127, 128, 129, 130, 131, 132, 133, 134, 135, 136,
+ 137, 138, 139, 140, 141, 142, 143, 144, 145, 146,
+ 147, 148, 149, 150, 151, 152, 153, 154, 155, 156,
+ 157, 158, 159, 160, 161, 162, 163, 164, 165, 166,
+ 167, 168, 169, 170, 171, 172, 173, 174, 175, 176,
+ 177, 178, 179, 180, 181, 182, 183, 184, 185, 186,
+ 187, 188, 189, 190, 191, 192, 339, 275, 193, 276,
+ 277, 278, 279, 280, 281, 282, 0, 0, 283, 284,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 285, 0, 0,
+ 0, 340, 341, 0, 0, 0, 0, 342, 287, 288,
+ 289, 290, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 194, 195, 196, 197, 198, 199, 1, 2, 3,
+ 4, 5, 6, 7, 8, 9, 10, 329, 330, 331,
+ 0, 332, 333, 334, 335, 336, 337, 338, 11, 12,
+ 13, 14, 15, 16, 17, 18, 19, 20, 21, 22,
+ 23, 24, 25, 26, 27, 28, 29, 30, 31, 32,
+ 33, 34, 35, 36, 37, 38, 39, 40, 41, 42,
+ 43, 44, 45, 46, 47, 48, 49, 50, 51, 52,
+ 53, 54, 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, 94, 95, 96, 97, 98, 99, 100, 101, 102,
+ 103, 104, 105, 106, 107, 108, 109, 110, 111, 112,
+ 113, 114, 115, 116, 117, 118, 119, 120, 121, 122,
+ 123, 124, 125, 126, 127, 128, 129, 130, 131, 132,
+ 133, 134, 135, 136, 137, 138, 139, 140, 141, 142,
+ 143, 144, 145, 146, 147, 148, 149, 150, 151, 152,
+ 153, 154, 155, 156, 157, 158, 159, 160, 161, 162,
+ 163, 164, 165, 166, 167, 168, 169, 170, 171, 172,
+ 173, 174, 175, 176, 177, 178, 179, 180, 181, 182,
+ 183, 184, 185, 186, 187, 188, 189, 190, 191, 192,
+ 339, 275, 193, 276, 277, 278, 279, 280, 281, 282,
+ 0, 0, 283, 284, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 285, 0, 0, 0, 340, 448, 0, 0, 0,
+ 0, 342, 287, 288, 289, 290, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 194, 195, 196, 197, 198,
+ 199, 1, 2, 3, 4, 5, 6, 7, 8, 9,
+ 10, 329, 330, 331, 0, 332, 333, 334, 335, 336,
+ 337, 338, 11, 12, 13, 14, 15, 16, 17, 18,
+ 19, 20, 21, 22, 23, 24, 25, 26, 27, 28,
+ 29, 30, 31, 32, 33, 34, 35, 36, 37, 38,
+ 39, 40, 41, 42, 43, 44, 45, 46, 47, 48,
+ 49, 50, 51, 52, 53, 54, 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, 94, 95, 96, 97, 98,
+ 99, 100, 101, 102, 103, 104, 105, 106, 107, 108,
+ 109, 110, 111, 112, 113, 114, 115, 116, 117, 118,
+ 119, 120, 121, 122, 123, 124, 125, 126, 127, 128,
+ 129, 130, 131, 132, 133, 134, 135, 136, 137, 138,
+ 139, 140, 141, 142, 143, 144, 145, 146, 147, 148,
+ 149, 150, 151, 152, 153, 154, 155, 156, 157, 158,
+ 159, 160, 161, 162, 163, 164, 165, 166, 167, 168,
+ 169, 170, 171, 172, 173, 174, 175, 176, 177, 178,
+ 179, 180, 181, 182, 183, 184, 185, 186, 187, 188,
+ 189, 190, 191, 192, 339, 275, 193, 276, 277, 278,
+ 279, 280, 281, 282, 0, 0, 283, 284, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 285, 0, 0, 0, 340,
+ 0, 0, 0, 0, 0, 342, 287, 288, 289, 290,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 194,
+ 195, 196, 197, 198, 199, 1, 2, 3, 4, 5,
+ 6, 7, 8, 9, 10, 329, 330, 331, 0, 332,
+ 333, 334, 335, 336, 337, 338, 11, 12, 13, 14,
+ 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
+ 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
+ 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
+ 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
+ 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, 94,
+ 95, 96, 97, 98, 99, 100, 101, 102, 103, 104,
+ 105, 106, 107, 108, 109, 110, 111, 112, 113, 114,
+ 115, 116, 117, 118, 119, 120, 121, 122, 123, 124,
+ 125, 126, 127, 128, 129, 130, 131, 132, 133, 134,
+ 135, 136, 137, 138, 139, 140, 141, 142, 143, 144,
+ 145, 146, 147, 148, 149, 150, 151, 152, 153, 154,
+ 155, 156, 157, 158, 159, 160, 161, 162, 163, 164,
+ 165, 166, 167, 168, 169, 170, 171, 172, 173, 174,
+ 175, 176, 177, 178, 179, 180, 181, 182, 183, 184,
+ 185, 186, 187, 188, 189, 190, 191, 192, 339, 275,
+ 193, 276, 277, 278, 279, 280, 281, 282, 0, 0,
+ 283, 284, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 285,
+ 0, 0, 0, 261, 0, 0, 0, 0, 0, 342,
+ 287, 288, 289, 290, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 194, 195, 196, 197, 198, 199, 1,
+ 2, 3, 4, 5, 6, 7, 8, 9, 10, 329,
+ 330, 331, 0, 332, 333, 334, 335, 336, 337, 338,
+ 11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
+ 21, 22, 23, 24, 25, 26, 27, 28, 29, 30,
+ 31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
+ 41, 42, 43, 44, 45, 46, 47, 48, 49, 50,
+ 51, 52, 53, 54, 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, 94, 95, 96, 97, 98, 99, 100,
+ 101, 102, 103, 104, 105, 106, 107, 108, 109, 110,
+ 111, 112, 113, 114, 115, 116, 117, 118, 119, 120,
+ 121, 122, 123, 124, 125, 126, 127, 128, 129, 130,
+ 131, 132, 133, 134, 135, 136, 137, 138, 139, 140,
+ 141, 142, 143, 144, 145, 146, 147, 148, 149, 150,
+ 151, 152, 153, 154, 155, 156, 157, 158, 159, 160,
+ 161, 162, 163, 164, 165, 166, 167, 168, 169, 170,
+ 171, 172, 173, 174, 175, 176, 177, 178, 179, 180,
+ 181, 182, 183, 184, 185, 186, 187, 188, 189, 190,
+ 191, 192, 339, 275, 193, 276, 277, 278, 279, 280,
+ 281, 282, 0, 0, 283, 284, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 285, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 342, 287, 288, 289, 290, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 194, 195, 196,
+ 197, 198, 199, 1, 2, 3, 4, 5, 6, 7,
+ 8, 9, 10, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 11, 12, 13, 14, 15, 16,
+ 17, 18, 19, 20, 21, 22, 23, 24, 25, 26,
+ 27, 28, 29, 30, 31, 32, 33, 34, 35, 36,
+ 37, 38, 39, 40, 41, 42, 43, 44, 45, 46,
+ 47, 48, 49, 50, 51, 52, 53, 54, 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, 94, 95, 96,
+ 97, 98, 99, 100, 101, 102, 103, 104, 105, 106,
+ 107, 108, 109, 110, 111, 112, 113, 114, 115, 116,
+ 117, 118, 119, 120, 121, 122, 123, 124, 125, 126,
+ 127, 128, 129, 130, 131, 132, 133, 134, 135, 136,
+ 137, 138, 139, 140, 141, 142, 143, 144, 145, 146,
+ 147, 148, 149, 150, 151, 152, 153, 154, 155, 156,
+ 157, 158, 159, 160, 161, 162, 163, 164, 165, 166,
+ 167, 168, 169, 170, 171, 172, 173, 174, 175, 176,
+ 177, 178, 179, 180, 181, 182, 183, 184, 185, 186,
+ 187, 188, 189, 190, 191, 192, 0, 275, 193, 276,
+ 277, 278, 279, 280, 281, 282, 0, 0, 283, 284,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 285, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 342, 287, 288,
+ 289, 290, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 194, 195, 196, 197, 198, 199, 1, 2, 3,
+ 4, 5, 6, 7, 8, 9, 10, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 11, 12,
+ 13, 14, 15, 16, 17, 18, 19, 20, 21, 22,
+ 23, 24, 25, 26, 27, 28, 29, 30, 31, 32,
+ 33, 34, 35, 36, 37, 38, 39, 40, 41, 42,
+ 43, 44, 45, 46, 47, 48, 49, 50, 51, 52,
+ 53, 54, 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, 94, 95, 96, 97, 98, 99, 100, 101, 102,
+ 103, 104, 105, 106, 107, 108, 109, 110, 111, 112,
+ 113, 114, 115, 116, 117, 118, 119, 120, 121, 122,
+ 123, 124, 125, 126, 127, 128, 129, 130, 131, 132,
+ 133, 134, 135, 136, 137, 138, 139, 140, 141, 142,
+ 143, 144, 145, 146, 147, 148, 149, 150, 151, 152,
+ 153, 154, 155, 156, 157, 158, 159, 160, 161, 162,
+ 163, 164, 165, 166, 167, 168, 169, 170, 171, 172,
+ 173, 174, 175, 176, 177, 178, 179, 180, 181, 182,
+ 183, 184, 185, 186, 187, 188, 189, 190, 191, 192,
+ 0, 0, 193, 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, 2, 3, 4, 5, 6, 7, 8, 9, 10,
+ 0, 0, 0, 0, 0, 194, 195, 196, 197, 198,
+ 199, 11, 12, 13, 14, 15, 16, 17, 18, 19,
+ 20, 21, 22, 23, 24, 25, 26, 27, 28, 29,
+ 30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
+ 40, 41, 42, 43, 44, 45, 46, 47, 48, 49,
+ 50, 51, 52, 53, 54, 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, 94, 95, 96, 97, 98, 99,
+ 100, 101, 102, 103, 104, 105, 106, 107, 108, 109,
+ 110, 111, 112, 113, 114, 115, 116, 117, 118, 119,
+ 120, 121, 122, 123, 124, 125, 126, 127, 128, 129,
+ 130, 131, 132, 133, 134, 135, 136, 137, 138, 139,
+ 140, 141, 142, 143, 144, 145, 146, 147, 148, 149,
+ 150, 151, 152, 153, 154, 155, 156, 157, 158, 159,
+ 160, 161, 162, 163, 164, 165, 166, 167, 168, 169,
+ 170, 171, 172, 173, 174, 175, 176, 177, 178, 179,
+ 180, 181, 182, 183, 184, 185, 186, 187, 188, 189,
+ 190, 191, 192, 0, 275, 193, 276, 277, 278, 279,
+ 280, 281, 282, 0, 0, 283, 284, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 285, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 287, 288, 289, 290, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 194, 195,
+ 196, 197, 198, 1, 2, 3, 4, 5, 6, 7,
+ 8, 9, 10, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 11, 12, 13, 14, 15, 16,
+ 17, 18, 19, 20, 21, 22, 23, 24, 25, 26,
+ 27, 28, 29, 30, 31, 32, 33, 34, 35, 36,
+ 37, 38, 39, 40, 41, 42, 43, 44, 45, 46,
+ 47, 48, 49, 50, 51, 52, 53, 54, 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, 94, 95, 96,
+ 97, 98, 99, 100, 101, 102, 103, 104, 105, 106,
+ 107, 108, 109, 110, 111, 112, 113, 114, 115, 116,
+ 117, 118, 119, 120, 121, 122, 123, 124, 125, 126,
+ 127, 128, 129, 130, 131, 132, 133, 134, 135, 136,
+ 137, 138, 139, 140, 141, 142, 143, 144, 145, 146,
+ 147, 148, 149, 150, 151, 152, 153, 154, 155, 156,
+ 157, 158, 159, 160, 161, 162, 163, 164, 165, 166,
+ 167, 168, 169, 170, 171, 172, 173, 174, 175, 176,
+ 177, 178, 179, 180, 181, 182, 183, 184, 185, 186,
+ 187, 188, 189, 190, 191, 192, 0, 242, 193, 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, 243, 1, 2,
+ 3, 4, 5, 6, 7, 8, 9, 10, 0, 0,
+ 0, 194, 195, 196, 197, 198, 0, 0, 0, 11,
+ 12, 13, 14, 15, 16, 17, 18, 19, 20, 21,
+ 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
+ 32, 33, 34, 35, 36, 37, 38, 39, 40, 41,
+ 42, 43, 44, 45, 46, 47, 48, 49, 50, 51,
+ 52, 53, 54, 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, 94, 95, 96, 97, 98, 99, 100, 101,
+ 102, 103, 104, 105, 106, 107, 108, 109, 110, 111,
+ 112, 113, 114, 115, 116, 117, 118, 119, 120, 121,
+ 122, 123, 124, 125, 126, 127, 128, 129, 130, 131,
+ 132, 133, 134, 135, 136, 137, 138, 139, 140, 141,
+ 142, 143, 144, 145, 146, 147, 148, 149, 150, 151,
+ 152, 153, 154, 155, 156, 157, 158, 159, 160, 161,
+ 162, 163, 164, 165, 166, 167, 168, 169, 170, 171,
+ 172, 173, 174, 175, 176, 177, 178, 179, 180, 181,
+ 182, 183, 184, 185, 186, 187, 188, 189, 190, 191,
+ 192, 0, 0, 193, 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, 418, 0, 0,
+ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10,
+ 0, 0, 0, 0, 0, 0, 194, 195, 196, 197,
+ 198, 11, 12, 13, 14, 15, 16, 17, 18, 19,
+ 20, 21, 22, 23, 24, 25, 26, 27, 28, 29,
+ 30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
+ 40, 41, 42, 43, 44, 45, 46, 47, 48, 49,
+ 50, 51, 52, 53, 54, 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, 94, 95, 96, 97, 98, 99,
+ 100, 101, 102, 103, 104, 105, 106, 107, 108, 109,
+ 110, 111, 112, 113, 114, 115, 116, 117, 118, 119,
+ 120, 121, 122, 123, 124, 125, 126, 127, 128, 129,
+ 130, 131, 132, 133, 134, 135, 136, 137, 138, 139,
+ 140, 141, 142, 143, 144, 145, 146, 147, 148, 149,
+ 150, 151, 152, 153, 154, 155, 156, 157, 158, 159,
+ 160, 161, 162, 163, 164, 165, 166, 167, 168, 169,
+ 170, 171, 172, 173, 174, 175, 176, 177, 178, 179,
+ 180, 181, 182, 183, 184, 185, 186, 187, 188, 189,
+ 190, 191, 192, 0, 0, 193, 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, 483,
+ 0, 0, 1, 2, 3, 4, 5, 6, 7, 8,
+ 9, 10, 0, 0, 0, 0, 0, 0, 194, 195,
+ 196, 197, 198, 11, 12, 13, 14, 15, 16, 17,
+ 18, 19, 20, 21, 22, 23, 24, 25, 26, 27,
+ 28, 29, 30, 31, 32, 33, 34, 35, 36, 37,
+ 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
+ 48, 49, 50, 51, 52, 53, 54, 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, 94, 95, 96, 97,
+ 98, 99, 100, 101, 102, 103, 104, 105, 106, 107,
+ 108, 109, 110, 111, 112, 113, 114, 115, 116, 117,
+ 118, 119, 120, 121, 122, 123, 124, 125, 126, 127,
+ 128, 129, 130, 131, 132, 133, 134, 135, 136, 137,
+ 138, 139, 140, 141, 142, 143, 144, 145, 146, 147,
+ 148, 149, 150, 151, 152, 153, 154, 155, 156, 157,
+ 158, 159, 160, 161, 162, 163, 164, 165, 166, 167,
+ 168, 169, 170, 171, 172, 173, 174, 175, 176, 177,
+ 178, 179, 180, 181, 182, 183, 184, 185, 186, 187,
+ 188, 189, 190, 191, 192, 0, 0, 193, 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, 501, 0, 0, 1, 2, 3, 4, 5, 6,
+ 7, 8, 9, 10, 0, 0, 0, 0, 0, 0,
+ 194, 195, 196, 197, 198, 11, 12, 13, 14, 15,
+ 16, 17, 18, 19, 20, 21, 22, 23, 24, 25,
+ 26, 27, 28, 29, 30, 31, 32, 33, 34, 35,
+ 36, 37, 38, 39, 40, 41, 42, 43, 44, 45,
+ 46, 47, 48, 49, 50, 51, 52, 53, 54, 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, 94, 95,
+ 96, 97, 98, 99, 100, 101, 102, 103, 104, 105,
+ 106, 107, 108, 109, 110, 111, 112, 113, 114, 115,
+ 116, 117, 118, 119, 120, 121, 122, 123, 124, 125,
+ 126, 127, 128, 129, 130, 131, 132, 133, 134, 135,
+ 136, 137, 138, 139, 140, 141, 142, 143, 144, 145,
+ 146, 147, 148, 149, 150, 151, 152, 153, 154, 155,
+ 156, 157, 158, 159, 160, 161, 162, 163, 164, 165,
+ 166, 167, 168, 169, 170, 171, 172, 173, 174, 175,
+ 176, 177, 178, 179, 180, 181, 182, 183, 184, 185,
+ 186, 187, 188, 189, 190, 191, 192, 0, 0, 193,
+ 0, 0, 0, 4, 5, 6, 7, 8, 9, 10,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 12, 13, 14, 15, 16, 17, 18, 19,
+ 20, 21, 22, 23, 24, 25, 26, 27, 28, 29,
+ 30, 31, 32, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 194, 195, 196, 197, 198, 47, 48, 49,
+ 50, 51, 52, 0, 0, 0, 0, 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, 94, 95, 96, 97, 98, 99,
+ 100, 101, 102, 103, 104, 105, 106, 107, 108, 109,
+ 110, 111, 112, 113, 114, 115, 116, 117, 118, 119,
+ 120, 121, 122, 123, 124, 125, 126, 127, 128, 129,
+ 130, 131, 132, 133, 134, 135, 136, 137, 138, 139,
+ 140, 141, 142, 143, 144, 145, 146, 147, 148, 149,
+ 150, 151, 152, 153, 154, 155, 156, 157, 158, 159,
+ 160, 161, 162, 163, 164, 165, 166, 167, 168, 169,
+ 170, 171, 172, 173, 174, 175, 176, 177, 178, 179,
+ 180, 181, 182, 183, 184, 185, 186, 187, 188, 189,
+ 190, 191, 192, 0, 275, 193, 276, 277, 278, 279,
+ 280, 281, 282, 0, 0, 283, 284, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 285, 0, 0, 0, 364, 517,
+ 0, 0, 0, 0, 0, 287, 288, 289, 290, 4,
+ 5, 6, 7, 8, 9, 10, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 12, 13,
+ 14, 15, 16, 17, 18, 19, 20, 21, 22, 23,
+ 24, 25, 26, 27, 28, 29, 30, 31, 32, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 47, 48, 49, 50, 51, 52, 0,
+ 0, 0, 0, 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,
+ 94, 95, 96, 97, 98, 99, 100, 101, 102, 103,
+ 104, 105, 106, 107, 108, 109, 110, 111, 112, 113,
+ 114, 115, 116, 117, 118, 119, 120, 121, 122, 123,
+ 124, 125, 126, 127, 128, 129, 130, 131, 132, 133,
+ 134, 135, 136, 137, 138, 139, 140, 141, 142, 143,
+ 144, 145, 146, 147, 148, 149, 150, 151, 152, 153,
+ 154, 155, 156, 157, 158, 159, 160, 161, 162, 163,
+ 164, 165, 166, 167, 168, 169, 170, 171, 172, 173,
+ 174, 175, 176, 177, 178, 179, 180, 181, 182, 183,
+ 184, 185, 186, 187, 188, 189, 190, 191, 192, 0,
+ 275, 193, 276, 277, 278, 279, 280, 281, 282, 0,
+ 0, 283, 284, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 285, 0, 0, 286, 4, 5, 6, 7, 8, 9,
+ 10, 287, 288, 289, 290, 0, 0, 0, 0, 0,
+ 0, 0, 0, 12, 13, 14, 15, 16, 17, 18,
+ 19, 20, 21, 22, 23, 24, 25, 26, 27, 28,
+ 29, 30, 31, 32, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 47, 48,
+ 49, 50, 51, 52, 0, 0, 0, 0, 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, 94, 95, 96, 97, 98,
+ 99, 100, 101, 102, 103, 104, 105, 106, 107, 108,
+ 109, 110, 111, 112, 113, 114, 115, 116, 117, 118,
+ 119, 120, 121, 122, 123, 124, 125, 126, 127, 128,
+ 129, 130, 131, 132, 133, 134, 135, 136, 137, 138,
+ 139, 140, 141, 142, 143, 144, 145, 146, 147, 148,
+ 149, 150, 151, 152, 153, 154, 155, 156, 157, 158,
+ 159, 160, 161, 162, 163, 164, 165, 166, 167, 168,
+ 169, 170, 171, 172, 173, 174, 175, 176, 177, 178,
+ 179, 180, 181, 182, 183, 184, 185, 186, 187, 188,
+ 189, 190, 191, 192, 0, 275, 193, 276, 277, 278,
+ 279, 280, 281, 282, 0, 0, 283, 284, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 285, 0, 0, 0, 364,
+ 0, 0, 0, 0, 0, 0, 287, 288, 289, 290,
+ 4, 5, 6, 7, 8, 9, 10, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 12,
+ 13, 14, 15, 16, 17, 18, 19, 20, 21, 22,
+ 23, 24, 25, 26, 27, 28, 29, 30, 31, 32,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 47, 48, 49, 50, 51, 52,
+ 0, 0, 0, 0, 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, 94, 95, 96, 97, 98, 99, 100, 101, 102,
+ 103, 104, 105, 106, 107, 108, 109, 110, 111, 112,
+ 113, 114, 115, 116, 117, 118, 119, 120, 121, 122,
+ 123, 124, 125, 126, 127, 128, 129, 130, 131, 132,
+ 133, 134, 135, 136, 137, 138, 139, 140, 141, 142,
+ 143, 144, 145, 146, 147, 148, 149, 150, 151, 152,
+ 153, 154, 155, 156, 157, 158, 159, 160, 161, 162,
+ 163, 164, 165, 166, 167, 168, 169, 170, 171, 172,
+ 173, 174, 175, 176, 177, 178, 179, 180, 181, 182,
+ 183, 184, 185, 186, 187, 188, 189, 190, 191, 192,
+ 0, 275, 193, 276, 277, 278, 279, 280, 281, 282,
+ 0, 0, 283, 284, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 285, 0, 0, 407, 4, 5, 6, 7, 8,
+ 9, 10, 287, 288, 289, 290, 0, 0, 0, 0,
+ 0, 0, 0, 0, 12, 13, 14, 15, 16, 17,
+ 18, 19, 20, 21, 22, 23, 24, 25, 26, 27,
+ 28, 29, 30, 31, 32, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 47,
+ 48, 49, 50, 51, 52, 0, 0, 0, 0, 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, 94, 95, 96, 97,
+ 98, 99, 100, 101, 102, 103, 104, 105, 106, 107,
+ 108, 109, 110, 111, 112, 113, 114, 115, 116, 117,
+ 118, 119, 120, 121, 122, 123, 124, 125, 126, 127,
+ 128, 129, 130, 131, 132, 133, 134, 135, 136, 137,
+ 138, 139, 140, 141, 142, 143, 144, 145, 146, 147,
+ 148, 149, 150, 151, 152, 153, 154, 155, 156, 157,
+ 158, 159, 160, 161, 162, 163, 164, 165, 166, 167,
+ 168, 169, 170, 171, 172, 173, 174, 175, 176, 177,
+ 178, 179, 180, 181, 182, 183, 184, 185, 186, 187,
+ 188, 189, 190, 191, 192, 0, 275, 193, 276, 277,
+ 278, 279, 280, 281, 282, 0, 0, 283, 284, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 285, 4, 5, 6,
+ 7, 8, 9, 10, 0, 0, 426, 287, 288, 289,
+ 290, 0, 0, 0, 0, 0, 12, 13, 14, 15,
+ 16, 17, 18, 19, 20, 21, 22, 23, 24, 25,
+ 26, 27, 28, 29, 30, 31, 32, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 47, 48, 49, 50, 51, 52, 0, 0, 0,
+ 0, 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, 94, 95,
+ 96, 97, 98, 99, 100, 101, 102, 103, 104, 105,
+ 106, 107, 108, 109, 110, 111, 112, 113, 114, 115,
+ 116, 117, 118, 119, 120, 121, 122, 123, 124, 125,
+ 126, 127, 128, 129, 130, 131, 132, 133, 134, 135,
+ 136, 137, 138, 139, 140, 141, 142, 143, 144, 145,
+ 146, 147, 148, 149, 150, 151, 152, 153, 154, 155,
+ 156, 157, 158, 159, 160, 161, 162, 163, 164, 165,
+ 166, 167, 168, 169, 170, 171, 172, 173, 174, 175,
+ 176, 177, 178, 179, 180, 181, 182, 183, 184, 185,
+ 186, 187, 188, 189, 190, 191, 192, 0, 275, 193,
+ 276, 277, 278, 279, 280, 281, 282, 0, 0, 283,
+ 284, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 285, 4,
+ 5, 6, 7, 8, 9, 10, 0, 0, 0, 287,
+ 288, 289, 290, 0, 0, 0, 0, 0, 12, 13,
+ 14, 15, 16, 17, 18, 19, 20, 21, 22, 23,
+ 24, 25, 26, 27, 28, 29, 30, 31, 32, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 47, 48, 49, 50, 51, 52, 0,
+ 0, 0, 0, 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,
+ 94, 95, 96, 97, 98, 99, 100, 101, 102, 103,
+ 104, 105, 106, 107, 108, 109, 110, 111, 112, 113,
+ 114, 115, 116, 117, 118, 119, 120, 121, 122, 123,
+ 124, 125, 126, 127, 128, 129, 130, 131, 132, 133,
+ 134, 135, 136, 137, 138, 139, 140, 141, 142, 143,
+ 144, 145, 146, 147, 148, 149, 150, 151, 152, 153,
+ 154, 155, 156, 157, 158, 159, 160, 161, 162, 163,
+ 164, 165, 166, 167, 168, 169, 170, 171, 172, 173,
+ 174, 175, 176, 177, 178, 179, 180, 181, 182, 183,
+ 184, 185, 186, 187, 188, 189, 190, 191, 382, 0,
+ 275, 193, 276, 277, 278, 279, 280, 281, 282, 0,
+ 0, 283, 284, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 285, 4, 5, 6, 7, 8, 9, 10, 0, 0,
+ 0, 287, 288, 289, 290, 0, 0, 0, 0, 0,
+ 12, 13, 14, 15, 16, 17, 18, 19, 20, 21,
+ 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
+ 32, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 47, 48, 49, 50, 51,
+ 52, 0, 0, 0, 0, 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, 94, 95, 96, 97, 98, 99, 100, 101,
+ 102, 103, 104, 105, 106, 107, 108, 109, 110, 111,
+ 112, 113, 114, 115, 116, 117, 118, 119, 120, 121,
+ 122, 123, 124, 125, 126, 127, 128, 129, 130, 131,
+ 132, 133, 134, 135, 136, 137, 138, 139, 140, 141,
+ 142, 143, 144, 145, 146, 147, 148, 149, 150, 151,
+ 152, 153, 154, 155, 156, 157, 158, 159, 160, 161,
+ 162, 163, 164, 165, 166, 167, 168, 169, 170, 171,
+ 172, 173, 174, 175, 176, 177, 178, 179, 180, 181,
+ 182, 183, 184, 185, 186, 187, 188, 189, 190, 191,
+ 192, 0, 0, 193
+};
+
+static const yytype_int16 yycheck[] =
+{
+ 0, 205, 213, 269, 0, 285, 0, 228, 354, 54,
+ 433, 325, 246, 362, 322, 364, 207, 225, 367, 494,
+ 241, 216, 217, 220, 221, 239, 237, 207, 237, 233,
+ 239, 526, 246, 299, 509, 530, 238, 246, 237, 239,
+ 535, 239, 244, 218, 219, 266, 267, 247, 241, 247,
+ 237, 244, 260, 257, 247, 335, 247, 337, 255, 256,
+ 368, 241, 237, 239, 239, 239, 247, 238, 243, 238,
+ 246, 238, 246, 244, 238, 244, 422, 244, 238, 249,
+ 244, 251, 316, 238, 244, 319, 227, 228, 229, 230,
+ 231, 232, 233, 234, 235, 236, 362, 377, 364, 413,
+ 238, 367, 451, 391, 392, 246, 244, 393, 394, 395,
+ 396, 244, 323, 244, 247, 381, 539, 244, 322, 244,
+ 247, 325, 247, 244, 244, 244, 247, 247, 247, 263,
+ 264, 265, 222, 223, 252, 253, 254, 242, 207, 244,
+ 208, 455, 244, 245, 424, 244, 245, 239, 428, 495,
+ 241, 500, 389, 390, 397, 398, 241, 207, 207, 239,
+ 246, 207, 207, 247, 368, 238, 237, 224, 226, 257,
+ 259, 258, 208, 240, 207, 247, 237, 247, 237, 445,
+ 446, 247, 237, 245, 207, 451, 237, 207, 242, 237,
+ 206, 540, 244, 246, 415, 238, 240, 237, 240, 207,
+ 241, 481, 548, 238, 242, 205, 238, 16, 247, 413,
+ 241, 241, 246, 213, 494, 242, 399, 401, 247, 404,
+ 220, 400, 237, 233, 220, 402, 220, 227, 237, 509,
+ 283, 284, 199, 233, 500, 403, 414, 237, 321, 486,
+ 520, 489, 525, 535, 231, 536, 509, 489, 220, 302,
+ -1, 455, -1, 519, 534, -1, -1, 257, -1, -1,
+ -1, 261, -1, 316, -1, -1, 319, -1, -1, -1,
+ -1, -1, -1, -1, 540, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 494, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 514, -1, 509, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 322, 323, -1, 325, -1, -1, -1, -1,
+ -1, -1, -1, 386, 387, 388, 389, 390, 391, 392,
+ 393, 394, 395, 396, 397, 398, 399, 400, 401, 402,
+ 403, 404, -1, -1, 354, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 368, -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, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 413, -1, -1, -1, -1, -1, -1,
+ -1, -1, 422, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 433, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 455, -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, 489,
+ -1, -1, -1, -1, 494, 495, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 509,
+ -1, -1, -1, -1, 514, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 526, -1, -1, -1,
+ 530, -1, -1, -1, -1, 535, -1, -1, -1, 539,
+ -1, -1, -1, -1, -1, -1, 0, -1, 548, 3,
+ 4, 5, 6, 7, 8, 9, 10, 11, 12, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 24, 25, 26, 27, 28, 29, 30, 31, 32, 33,
+ 34, 35, 36, 37, 38, 39, 40, 41, 42, 43,
+ 44, 45, 46, 47, 48, 49, 50, 51, 52, 53,
+ 54, 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,
+ 94, 95, 96, 97, 98, 99, 100, 101, 102, 103,
+ 104, 105, 106, 107, 108, 109, 110, 111, 112, 113,
+ 114, 115, 116, 117, 118, 119, 120, 121, 122, 123,
+ 124, 125, 126, 127, 128, 129, 130, 131, 132, 133,
+ 134, 135, 136, 137, 138, 139, 140, 141, 142, 143,
+ 144, 145, 146, 147, 148, 149, 150, 151, 152, 153,
+ 154, 155, 156, 157, 158, 159, 160, 161, 162, 163,
+ 164, 165, 166, 167, 168, 169, 170, 171, 172, 173,
+ 174, 175, 176, 177, 178, 179, 180, 181, 182, 183,
+ 184, 185, 186, 187, 188, 189, 190, 191, 192, 193,
+ 194, 195, 196, 197, 198, 199, 200, 201, 202, 203,
+ 204, 205, -1, -1, 208, -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, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 261, 262, 263,
+ 264, 265, 266, 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, 33, 34, 35, 36, 37, 38, 39,
+ 40, 41, 42, 43, 44, 45, 46, 47, 48, 49,
+ 50, 51, 52, 53, 54, 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, 94, 95, 96, 97, 98, 99,
+ 100, 101, 102, 103, 104, 105, 106, 107, 108, 109,
+ 110, 111, 112, 113, 114, 115, 116, 117, 118, 119,
+ 120, 121, 122, 123, 124, 125, 126, 127, 128, 129,
+ 130, 131, 132, 133, 134, 135, 136, 137, 138, 139,
+ 140, 141, 142, 143, 144, 145, 146, 147, 148, 149,
+ 150, 151, 152, 153, 154, 155, 156, 157, 158, 159,
+ 160, 161, 162, 163, 164, 165, 166, 167, 168, 169,
+ 170, 171, 172, 173, 174, 175, 176, 177, 178, 179,
+ 180, 181, 182, 183, 184, 185, 186, 187, 188, 189,
+ 190, 191, 192, 193, 194, 195, 196, 197, 198, 199,
+ 200, 201, 202, 203, 204, 205, 206, 207, 208, 209,
+ 210, 211, 212, 213, 214, 215, -1, -1, 218, 219,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 237, -1, -1,
+ -1, 241, 242, -1, -1, -1, -1, 247, 248, 249,
+ 250, 251, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 261, 262, 263, 264, 265, 266, 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, 33, 34, 35,
+ 36, 37, 38, 39, 40, 41, 42, 43, 44, 45,
+ 46, 47, 48, 49, 50, 51, 52, 53, 54, 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, 94, 95,
+ 96, 97, 98, 99, 100, 101, 102, 103, 104, 105,
+ 106, 107, 108, 109, 110, 111, 112, 113, 114, 115,
+ 116, 117, 118, 119, 120, 121, 122, 123, 124, 125,
+ 126, 127, 128, 129, 130, 131, 132, 133, 134, 135,
+ 136, 137, 138, 139, 140, 141, 142, 143, 144, 145,
+ 146, 147, 148, 149, 150, 151, 152, 153, 154, 155,
+ 156, 157, 158, 159, 160, 161, 162, 163, 164, 165,
+ 166, 167, 168, 169, 170, 171, 172, 173, 174, 175,
+ 176, 177, 178, 179, 180, 181, 182, 183, 184, 185,
+ 186, 187, 188, 189, 190, 191, 192, 193, 194, 195,
+ 196, 197, 198, 199, 200, 201, 202, 203, 204, 205,
+ 206, 207, 208, 209, 210, 211, 212, 213, 214, 215,
+ -1, -1, 218, 219, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 237, -1, -1, -1, 241, 242, -1, -1, -1,
+ -1, 247, 248, 249, 250, 251, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 261, 262, 263, 264, 265,
+ 266, 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, 33, 34, 35, 36, 37, 38, 39, 40, 41,
+ 42, 43, 44, 45, 46, 47, 48, 49, 50, 51,
+ 52, 53, 54, 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, 94, 95, 96, 97, 98, 99, 100, 101,
+ 102, 103, 104, 105, 106, 107, 108, 109, 110, 111,
+ 112, 113, 114, 115, 116, 117, 118, 119, 120, 121,
+ 122, 123, 124, 125, 126, 127, 128, 129, 130, 131,
+ 132, 133, 134, 135, 136, 137, 138, 139, 140, 141,
+ 142, 143, 144, 145, 146, 147, 148, 149, 150, 151,
+ 152, 153, 154, 155, 156, 157, 158, 159, 160, 161,
+ 162, 163, 164, 165, 166, 167, 168, 169, 170, 171,
+ 172, 173, 174, 175, 176, 177, 178, 179, 180, 181,
+ 182, 183, 184, 185, 186, 187, 188, 189, 190, 191,
+ 192, 193, 194, 195, 196, 197, 198, 199, 200, 201,
+ 202, 203, 204, 205, 206, 207, 208, 209, 210, 211,
+ 212, 213, 214, 215, -1, -1, 218, 219, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 237, -1, -1, -1, 241,
+ -1, -1, -1, -1, -1, 247, 248, 249, 250, 251,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 261,
+ 262, 263, 264, 265, 266, 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, 33, 34, 35, 36, 37,
+ 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
+ 48, 49, 50, 51, 52, 53, 54, 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, 94, 95, 96, 97,
+ 98, 99, 100, 101, 102, 103, 104, 105, 106, 107,
+ 108, 109, 110, 111, 112, 113, 114, 115, 116, 117,
+ 118, 119, 120, 121, 122, 123, 124, 125, 126, 127,
+ 128, 129, 130, 131, 132, 133, 134, 135, 136, 137,
+ 138, 139, 140, 141, 142, 143, 144, 145, 146, 147,
+ 148, 149, 150, 151, 152, 153, 154, 155, 156, 157,
+ 158, 159, 160, 161, 162, 163, 164, 165, 166, 167,
+ 168, 169, 170, 171, 172, 173, 174, 175, 176, 177,
+ 178, 179, 180, 181, 182, 183, 184, 185, 186, 187,
+ 188, 189, 190, 191, 192, 193, 194, 195, 196, 197,
+ 198, 199, 200, 201, 202, 203, 204, 205, 206, 207,
+ 208, 209, 210, 211, 212, 213, 214, 215, -1, -1,
+ 218, 219, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 237,
+ -1, -1, -1, 241, -1, -1, -1, -1, -1, 247,
+ 248, 249, 250, 251, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 261, 262, 263, 264, 265, 266, 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, 33,
+ 34, 35, 36, 37, 38, 39, 40, 41, 42, 43,
+ 44, 45, 46, 47, 48, 49, 50, 51, 52, 53,
+ 54, 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,
+ 94, 95, 96, 97, 98, 99, 100, 101, 102, 103,
+ 104, 105, 106, 107, 108, 109, 110, 111, 112, 113,
+ 114, 115, 116, 117, 118, 119, 120, 121, 122, 123,
+ 124, 125, 126, 127, 128, 129, 130, 131, 132, 133,
+ 134, 135, 136, 137, 138, 139, 140, 141, 142, 143,
+ 144, 145, 146, 147, 148, 149, 150, 151, 152, 153,
+ 154, 155, 156, 157, 158, 159, 160, 161, 162, 163,
+ 164, 165, 166, 167, 168, 169, 170, 171, 172, 173,
+ 174, 175, 176, 177, 178, 179, 180, 181, 182, 183,
+ 184, 185, 186, 187, 188, 189, 190, 191, 192, 193,
+ 194, 195, 196, 197, 198, 199, 200, 201, 202, 203,
+ 204, 205, 206, 207, 208, 209, 210, 211, 212, 213,
+ 214, 215, -1, -1, 218, 219, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 237, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 247, 248, 249, 250, 251, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 261, 262, 263,
+ 264, 265, 266, 3, 4, 5, 6, 7, 8, 9,
+ 10, 11, 12, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 24, 25, 26, 27, 28, 29,
+ 30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
+ 40, 41, 42, 43, 44, 45, 46, 47, 48, 49,
+ 50, 51, 52, 53, 54, 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, 94, 95, 96, 97, 98, 99,
+ 100, 101, 102, 103, 104, 105, 106, 107, 108, 109,
+ 110, 111, 112, 113, 114, 115, 116, 117, 118, 119,
+ 120, 121, 122, 123, 124, 125, 126, 127, 128, 129,
+ 130, 131, 132, 133, 134, 135, 136, 137, 138, 139,
+ 140, 141, 142, 143, 144, 145, 146, 147, 148, 149,
+ 150, 151, 152, 153, 154, 155, 156, 157, 158, 159,
+ 160, 161, 162, 163, 164, 165, 166, 167, 168, 169,
+ 170, 171, 172, 173, 174, 175, 176, 177, 178, 179,
+ 180, 181, 182, 183, 184, 185, 186, 187, 188, 189,
+ 190, 191, 192, 193, 194, 195, 196, 197, 198, 199,
+ 200, 201, 202, 203, 204, 205, -1, 207, 208, 209,
+ 210, 211, 212, 213, 214, 215, -1, -1, 218, 219,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 237, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 247, 248, 249,
+ 250, 251, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 261, 262, 263, 264, 265, 266, 3, 4, 5,
+ 6, 7, 8, 9, 10, 11, 12, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 24, 25,
+ 26, 27, 28, 29, 30, 31, 32, 33, 34, 35,
+ 36, 37, 38, 39, 40, 41, 42, 43, 44, 45,
+ 46, 47, 48, 49, 50, 51, 52, 53, 54, 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, 94, 95,
+ 96, 97, 98, 99, 100, 101, 102, 103, 104, 105,
+ 106, 107, 108, 109, 110, 111, 112, 113, 114, 115,
+ 116, 117, 118, 119, 120, 121, 122, 123, 124, 125,
+ 126, 127, 128, 129, 130, 131, 132, 133, 134, 135,
+ 136, 137, 138, 139, 140, 141, 142, 143, 144, 145,
+ 146, 147, 148, 149, 150, 151, 152, 153, 154, 155,
+ 156, 157, 158, 159, 160, 161, 162, 163, 164, 165,
+ 166, 167, 168, 169, 170, 171, 172, 173, 174, 175,
+ 176, 177, 178, 179, 180, 181, 182, 183, 184, 185,
+ 186, 187, 188, 189, 190, 191, 192, 193, 194, 195,
+ 196, 197, 198, 199, 200, 201, 202, 203, 204, 205,
+ -1, -1, 208, -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, -1, -1, -1,
+ 3, 4, 5, 6, 7, 8, 9, 10, 11, 12,
+ -1, -1, -1, -1, -1, 261, 262, 263, 264, 265,
+ 266, 24, 25, 26, 27, 28, 29, 30, 31, 32,
+ 33, 34, 35, 36, 37, 38, 39, 40, 41, 42,
+ 43, 44, 45, 46, 47, 48, 49, 50, 51, 52,
+ 53, 54, 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, 94, 95, 96, 97, 98, 99, 100, 101, 102,
+ 103, 104, 105, 106, 107, 108, 109, 110, 111, 112,
+ 113, 114, 115, 116, 117, 118, 119, 120, 121, 122,
+ 123, 124, 125, 126, 127, 128, 129, 130, 131, 132,
+ 133, 134, 135, 136, 137, 138, 139, 140, 141, 142,
+ 143, 144, 145, 146, 147, 148, 149, 150, 151, 152,
+ 153, 154, 155, 156, 157, 158, 159, 160, 161, 162,
+ 163, 164, 165, 166, 167, 168, 169, 170, 171, 172,
+ 173, 174, 175, 176, 177, 178, 179, 180, 181, 182,
+ 183, 184, 185, 186, 187, 188, 189, 190, 191, 192,
+ 193, 194, 195, 196, 197, 198, 199, 200, 201, 202,
+ 203, 204, 205, -1, 207, 208, 209, 210, 211, 212,
+ 213, 214, 215, -1, -1, 218, 219, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 237, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 248, 249, 250, 251, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 261, 262,
+ 263, 264, 265, 3, 4, 5, 6, 7, 8, 9,
+ 10, 11, 12, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 24, 25, 26, 27, 28, 29,
+ 30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
+ 40, 41, 42, 43, 44, 45, 46, 47, 48, 49,
+ 50, 51, 52, 53, 54, 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, 94, 95, 96, 97, 98, 99,
+ 100, 101, 102, 103, 104, 105, 106, 107, 108, 109,
+ 110, 111, 112, 113, 114, 115, 116, 117, 118, 119,
+ 120, 121, 122, 123, 124, 125, 126, 127, 128, 129,
+ 130, 131, 132, 133, 134, 135, 136, 137, 138, 139,
+ 140, 141, 142, 143, 144, 145, 146, 147, 148, 149,
+ 150, 151, 152, 153, 154, 155, 156, 157, 158, 159,
+ 160, 161, 162, 163, 164, 165, 166, 167, 168, 169,
+ 170, 171, 172, 173, 174, 175, 176, 177, 178, 179,
+ 180, 181, 182, 183, 184, 185, 186, 187, 188, 189,
+ 190, 191, 192, 193, 194, 195, 196, 197, 198, 199,
+ 200, 201, 202, 203, 204, 205, -1, 207, 208, -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, -1, -1, -1, -1, 247, 3, 4,
+ 5, 6, 7, 8, 9, 10, 11, 12, -1, -1,
+ -1, 261, 262, 263, 264, 265, -1, -1, -1, 24,
+ 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
+ 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
+ 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
+ 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, 94,
+ 95, 96, 97, 98, 99, 100, 101, 102, 103, 104,
+ 105, 106, 107, 108, 109, 110, 111, 112, 113, 114,
+ 115, 116, 117, 118, 119, 120, 121, 122, 123, 124,
+ 125, 126, 127, 128, 129, 130, 131, 132, 133, 134,
+ 135, 136, 137, 138, 139, 140, 141, 142, 143, 144,
+ 145, 146, 147, 148, 149, 150, 151, 152, 153, 154,
+ 155, 156, 157, 158, 159, 160, 161, 162, 163, 164,
+ 165, 166, 167, 168, 169, 170, 171, 172, 173, 174,
+ 175, 176, 177, 178, 179, 180, 181, 182, 183, 184,
+ 185, 186, 187, 188, 189, 190, 191, 192, 193, 194,
+ 195, 196, 197, 198, 199, 200, 201, 202, 203, 204,
+ 205, -1, -1, 208, -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, 242, -1, -1,
+ 3, 4, 5, 6, 7, 8, 9, 10, 11, 12,
+ -1, -1, -1, -1, -1, -1, 261, 262, 263, 264,
+ 265, 24, 25, 26, 27, 28, 29, 30, 31, 32,
+ 33, 34, 35, 36, 37, 38, 39, 40, 41, 42,
+ 43, 44, 45, 46, 47, 48, 49, 50, 51, 52,
+ 53, 54, 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, 94, 95, 96, 97, 98, 99, 100, 101, 102,
+ 103, 104, 105, 106, 107, 108, 109, 110, 111, 112,
+ 113, 114, 115, 116, 117, 118, 119, 120, 121, 122,
+ 123, 124, 125, 126, 127, 128, 129, 130, 131, 132,
+ 133, 134, 135, 136, 137, 138, 139, 140, 141, 142,
+ 143, 144, 145, 146, 147, 148, 149, 150, 151, 152,
+ 153, 154, 155, 156, 157, 158, 159, 160, 161, 162,
+ 163, 164, 165, 166, 167, 168, 169, 170, 171, 172,
+ 173, 174, 175, 176, 177, 178, 179, 180, 181, 182,
+ 183, 184, 185, 186, 187, 188, 189, 190, 191, 192,
+ 193, 194, 195, 196, 197, 198, 199, 200, 201, 202,
+ 203, 204, 205, -1, -1, 208, -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, 242,
+ -1, -1, 3, 4, 5, 6, 7, 8, 9, 10,
+ 11, 12, -1, -1, -1, -1, -1, -1, 261, 262,
+ 263, 264, 265, 24, 25, 26, 27, 28, 29, 30,
+ 31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
+ 41, 42, 43, 44, 45, 46, 47, 48, 49, 50,
+ 51, 52, 53, 54, 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, 94, 95, 96, 97, 98, 99, 100,
+ 101, 102, 103, 104, 105, 106, 107, 108, 109, 110,
+ 111, 112, 113, 114, 115, 116, 117, 118, 119, 120,
+ 121, 122, 123, 124, 125, 126, 127, 128, 129, 130,
+ 131, 132, 133, 134, 135, 136, 137, 138, 139, 140,
+ 141, 142, 143, 144, 145, 146, 147, 148, 149, 150,
+ 151, 152, 153, 154, 155, 156, 157, 158, 159, 160,
+ 161, 162, 163, 164, 165, 166, 167, 168, 169, 170,
+ 171, 172, 173, 174, 175, 176, 177, 178, 179, 180,
+ 181, 182, 183, 184, 185, 186, 187, 188, 189, 190,
+ 191, 192, 193, 194, 195, 196, 197, 198, 199, 200,
+ 201, 202, 203, 204, 205, -1, -1, 208, -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, 242, -1, -1, 3, 4, 5, 6, 7, 8,
+ 9, 10, 11, 12, -1, -1, -1, -1, -1, -1,
+ 261, 262, 263, 264, 265, 24, 25, 26, 27, 28,
+ 29, 30, 31, 32, 33, 34, 35, 36, 37, 38,
+ 39, 40, 41, 42, 43, 44, 45, 46, 47, 48,
+ 49, 50, 51, 52, 53, 54, 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, 94, 95, 96, 97, 98,
+ 99, 100, 101, 102, 103, 104, 105, 106, 107, 108,
+ 109, 110, 111, 112, 113, 114, 115, 116, 117, 118,
+ 119, 120, 121, 122, 123, 124, 125, 126, 127, 128,
+ 129, 130, 131, 132, 133, 134, 135, 136, 137, 138,
+ 139, 140, 141, 142, 143, 144, 145, 146, 147, 148,
+ 149, 150, 151, 152, 153, 154, 155, 156, 157, 158,
+ 159, 160, 161, 162, 163, 164, 165, 166, 167, 168,
+ 169, 170, 171, 172, 173, 174, 175, 176, 177, 178,
+ 179, 180, 181, 182, 183, 184, 185, 186, 187, 188,
+ 189, 190, 191, 192, 193, 194, 195, 196, 197, 198,
+ 199, 200, 201, 202, 203, 204, 205, -1, -1, 208,
+ -1, -1, -1, 6, 7, 8, 9, 10, 11, 12,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 25, 26, 27, 28, 29, 30, 31, 32,
+ 33, 34, 35, 36, 37, 38, 39, 40, 41, 42,
+ 43, 44, 45, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 261, 262, 263, 264, 265, 60, 61, 62,
+ 63, 64, 65, -1, -1, -1, -1, 70, 71, 72,
+ 73, 74, 75, 76, 77, 78, 79, 80, 81, 82,
+ 83, 84, 85, 86, 87, 88, 89, 90, 91, 92,
+ 93, 94, 95, 96, 97, 98, 99, 100, 101, 102,
+ 103, 104, 105, 106, 107, 108, 109, 110, 111, 112,
+ 113, 114, 115, 116, 117, 118, 119, 120, 121, 122,
+ 123, 124, 125, 126, 127, 128, 129, 130, 131, 132,
+ 133, 134, 135, 136, 137, 138, 139, 140, 141, 142,
+ 143, 144, 145, 146, 147, 148, 149, 150, 151, 152,
+ 153, 154, 155, 156, 157, 158, 159, 160, 161, 162,
+ 163, 164, 165, 166, 167, 168, 169, 170, 171, 172,
+ 173, 174, 175, 176, 177, 178, 179, 180, 181, 182,
+ 183, 184, 185, 186, 187, 188, 189, 190, 191, 192,
+ 193, 194, 195, 196, 197, 198, 199, 200, 201, 202,
+ 203, 204, 205, -1, 207, 208, 209, 210, 211, 212,
+ 213, 214, 215, -1, -1, 218, 219, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 237, -1, -1, -1, 241, 242,
+ -1, -1, -1, -1, -1, 248, 249, 250, 251, 6,
+ 7, 8, 9, 10, 11, 12, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 25, 26,
+ 27, 28, 29, 30, 31, 32, 33, 34, 35, 36,
+ 37, 38, 39, 40, 41, 42, 43, 44, 45, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 60, 61, 62, 63, 64, 65, -1,
+ -1, -1, -1, 70, 71, 72, 73, 74, 75, 76,
+ 77, 78, 79, 80, 81, 82, 83, 84, 85, 86,
+ 87, 88, 89, 90, 91, 92, 93, 94, 95, 96,
+ 97, 98, 99, 100, 101, 102, 103, 104, 105, 106,
+ 107, 108, 109, 110, 111, 112, 113, 114, 115, 116,
+ 117, 118, 119, 120, 121, 122, 123, 124, 125, 126,
+ 127, 128, 129, 130, 131, 132, 133, 134, 135, 136,
+ 137, 138, 139, 140, 141, 142, 143, 144, 145, 146,
+ 147, 148, 149, 150, 151, 152, 153, 154, 155, 156,
+ 157, 158, 159, 160, 161, 162, 163, 164, 165, 166,
+ 167, 168, 169, 170, 171, 172, 173, 174, 175, 176,
+ 177, 178, 179, 180, 181, 182, 183, 184, 185, 186,
+ 187, 188, 189, 190, 191, 192, 193, 194, 195, 196,
+ 197, 198, 199, 200, 201, 202, 203, 204, 205, -1,
+ 207, 208, 209, 210, 211, 212, 213, 214, 215, -1,
+ -1, 218, 219, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 237, -1, -1, 240, 6, 7, 8, 9, 10, 11,
+ 12, 248, 249, 250, 251, -1, -1, -1, -1, -1,
+ -1, -1, -1, 25, 26, 27, 28, 29, 30, 31,
+ 32, 33, 34, 35, 36, 37, 38, 39, 40, 41,
+ 42, 43, 44, 45, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 60, 61,
+ 62, 63, 64, 65, -1, -1, -1, -1, 70, 71,
+ 72, 73, 74, 75, 76, 77, 78, 79, 80, 81,
+ 82, 83, 84, 85, 86, 87, 88, 89, 90, 91,
+ 92, 93, 94, 95, 96, 97, 98, 99, 100, 101,
+ 102, 103, 104, 105, 106, 107, 108, 109, 110, 111,
+ 112, 113, 114, 115, 116, 117, 118, 119, 120, 121,
+ 122, 123, 124, 125, 126, 127, 128, 129, 130, 131,
+ 132, 133, 134, 135, 136, 137, 138, 139, 140, 141,
+ 142, 143, 144, 145, 146, 147, 148, 149, 150, 151,
+ 152, 153, 154, 155, 156, 157, 158, 159, 160, 161,
+ 162, 163, 164, 165, 166, 167, 168, 169, 170, 171,
+ 172, 173, 174, 175, 176, 177, 178, 179, 180, 181,
+ 182, 183, 184, 185, 186, 187, 188, 189, 190, 191,
+ 192, 193, 194, 195, 196, 197, 198, 199, 200, 201,
+ 202, 203, 204, 205, -1, 207, 208, 209, 210, 211,
+ 212, 213, 214, 215, -1, -1, 218, 219, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 237, -1, -1, -1, 241,
+ -1, -1, -1, -1, -1, -1, 248, 249, 250, 251,
+ 6, 7, 8, 9, 10, 11, 12, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 25,
+ 26, 27, 28, 29, 30, 31, 32, 33, 34, 35,
+ 36, 37, 38, 39, 40, 41, 42, 43, 44, 45,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 60, 61, 62, 63, 64, 65,
+ -1, -1, -1, -1, 70, 71, 72, 73, 74, 75,
+ 76, 77, 78, 79, 80, 81, 82, 83, 84, 85,
+ 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
+ 96, 97, 98, 99, 100, 101, 102, 103, 104, 105,
+ 106, 107, 108, 109, 110, 111, 112, 113, 114, 115,
+ 116, 117, 118, 119, 120, 121, 122, 123, 124, 125,
+ 126, 127, 128, 129, 130, 131, 132, 133, 134, 135,
+ 136, 137, 138, 139, 140, 141, 142, 143, 144, 145,
+ 146, 147, 148, 149, 150, 151, 152, 153, 154, 155,
+ 156, 157, 158, 159, 160, 161, 162, 163, 164, 165,
+ 166, 167, 168, 169, 170, 171, 172, 173, 174, 175,
+ 176, 177, 178, 179, 180, 181, 182, 183, 184, 185,
+ 186, 187, 188, 189, 190, 191, 192, 193, 194, 195,
+ 196, 197, 198, 199, 200, 201, 202, 203, 204, 205,
+ -1, 207, 208, 209, 210, 211, 212, 213, 214, 215,
+ -1, -1, 218, 219, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 237, -1, -1, 240, 6, 7, 8, 9, 10,
+ 11, 12, 248, 249, 250, 251, -1, -1, -1, -1,
+ -1, -1, -1, -1, 25, 26, 27, 28, 29, 30,
+ 31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
+ 41, 42, 43, 44, 45, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 60,
+ 61, 62, 63, 64, 65, -1, -1, -1, -1, 70,
+ 71, 72, 73, 74, 75, 76, 77, 78, 79, 80,
+ 81, 82, 83, 84, 85, 86, 87, 88, 89, 90,
+ 91, 92, 93, 94, 95, 96, 97, 98, 99, 100,
+ 101, 102, 103, 104, 105, 106, 107, 108, 109, 110,
+ 111, 112, 113, 114, 115, 116, 117, 118, 119, 120,
+ 121, 122, 123, 124, 125, 126, 127, 128, 129, 130,
+ 131, 132, 133, 134, 135, 136, 137, 138, 139, 140,
+ 141, 142, 143, 144, 145, 146, 147, 148, 149, 150,
+ 151, 152, 153, 154, 155, 156, 157, 158, 159, 160,
+ 161, 162, 163, 164, 165, 166, 167, 168, 169, 170,
+ 171, 172, 173, 174, 175, 176, 177, 178, 179, 180,
+ 181, 182, 183, 184, 185, 186, 187, 188, 189, 190,
+ 191, 192, 193, 194, 195, 196, 197, 198, 199, 200,
+ 201, 202, 203, 204, 205, -1, 207, 208, 209, 210,
+ 211, 212, 213, 214, 215, -1, -1, 218, 219, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 237, 6, 7, 8,
+ 9, 10, 11, 12, -1, -1, 247, 248, 249, 250,
+ 251, -1, -1, -1, -1, -1, 25, 26, 27, 28,
+ 29, 30, 31, 32, 33, 34, 35, 36, 37, 38,
+ 39, 40, 41, 42, 43, 44, 45, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 60, 61, 62, 63, 64, 65, -1, -1, -1,
+ -1, 70, 71, 72, 73, 74, 75, 76, 77, 78,
+ 79, 80, 81, 82, 83, 84, 85, 86, 87, 88,
+ 89, 90, 91, 92, 93, 94, 95, 96, 97, 98,
+ 99, 100, 101, 102, 103, 104, 105, 106, 107, 108,
+ 109, 110, 111, 112, 113, 114, 115, 116, 117, 118,
+ 119, 120, 121, 122, 123, 124, 125, 126, 127, 128,
+ 129, 130, 131, 132, 133, 134, 135, 136, 137, 138,
+ 139, 140, 141, 142, 143, 144, 145, 146, 147, 148,
+ 149, 150, 151, 152, 153, 154, 155, 156, 157, 158,
+ 159, 160, 161, 162, 163, 164, 165, 166, 167, 168,
+ 169, 170, 171, 172, 173, 174, 175, 176, 177, 178,
+ 179, 180, 181, 182, 183, 184, 185, 186, 187, 188,
+ 189, 190, 191, 192, 193, 194, 195, 196, 197, 198,
+ 199, 200, 201, 202, 203, 204, 205, -1, 207, 208,
+ 209, 210, 211, 212, 213, 214, 215, -1, -1, 218,
+ 219, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 237, 6,
+ 7, 8, 9, 10, 11, 12, -1, -1, -1, 248,
+ 249, 250, 251, -1, -1, -1, -1, -1, 25, 26,
+ 27, 28, 29, 30, 31, 32, 33, 34, 35, 36,
+ 37, 38, 39, 40, 41, 42, 43, 44, 45, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 60, 61, 62, 63, 64, 65, -1,
+ -1, -1, -1, 70, 71, 72, 73, 74, 75, 76,
+ 77, 78, 79, 80, 81, 82, 83, 84, 85, 86,
+ 87, 88, 89, 90, 91, 92, 93, 94, 95, 96,
+ 97, 98, 99, 100, 101, 102, 103, 104, 105, 106,
+ 107, 108, 109, 110, 111, 112, 113, 114, 115, 116,
+ 117, 118, 119, 120, 121, 122, 123, 124, 125, 126,
+ 127, 128, 129, 130, 131, 132, 133, 134, 135, 136,
+ 137, 138, 139, 140, 141, 142, 143, 144, 145, 146,
+ 147, 148, 149, 150, 151, 152, 153, 154, 155, 156,
+ 157, 158, 159, 160, 161, 162, 163, 164, 165, 166,
+ 167, 168, 169, 170, 171, 172, 173, 174, 175, 176,
+ 177, 178, 179, 180, 181, 182, 183, 184, 185, 186,
+ 187, 188, 189, 190, 191, 192, 193, 194, 195, 196,
+ 197, 198, 199, 200, 201, 202, 203, 204, 205, -1,
+ 207, 208, 209, 210, 211, 212, 213, 214, 215, -1,
+ -1, 218, 219, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 237, 6, 7, 8, 9, 10, 11, 12, -1, -1,
+ -1, 248, 249, 250, 251, -1, -1, -1, -1, -1,
+ 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
+ 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
+ 45, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 60, 61, 62, 63, 64,
+ 65, -1, -1, -1, -1, 70, 71, 72, 73, 74,
+ 75, 76, 77, 78, 79, 80, 81, 82, 83, 84,
+ 85, 86, 87, 88, 89, 90, 91, 92, 93, 94,
+ 95, 96, 97, 98, 99, 100, 101, 102, 103, 104,
+ 105, 106, 107, 108, 109, 110, 111, 112, 113, 114,
+ 115, 116, 117, 118, 119, 120, 121, 122, 123, 124,
+ 125, 126, 127, 128, 129, 130, 131, 132, 133, 134,
+ 135, 136, 137, 138, 139, 140, 141, 142, 143, 144,
+ 145, 146, 147, 148, 149, 150, 151, 152, 153, 154,
+ 155, 156, 157, 158, 159, 160, 161, 162, 163, 164,
+ 165, 166, 167, 168, 169, 170, 171, 172, 173, 174,
+ 175, 176, 177, 178, 179, 180, 181, 182, 183, 184,
+ 185, 186, 187, 188, 189, 190, 191, 192, 193, 194,
+ 195, 196, 197, 198, 199, 200, 201, 202, 203, 204,
+ 205, -1, -1, 208
+};
+
+ /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
+ symbol of state STATE-NUM. */
+static const yytype_uint16 yystos[] =
+{
+ 0, 3, 4, 5, 6, 7, 8, 9, 10, 11,
+ 12, 24, 25, 26, 27, 28, 29, 30, 31, 32,
+ 33, 34, 35, 36, 37, 38, 39, 40, 41, 42,
+ 43, 44, 45, 46, 47, 48, 49, 50, 51, 52,
+ 53, 54, 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, 94, 95, 96, 97, 98, 99, 100, 101, 102,
+ 103, 104, 105, 106, 107, 108, 109, 110, 111, 112,
+ 113, 114, 115, 116, 117, 118, 119, 120, 121, 122,
+ 123, 124, 125, 126, 127, 128, 129, 130, 131, 132,
+ 133, 134, 135, 136, 137, 138, 139, 140, 141, 142,
+ 143, 144, 145, 146, 147, 148, 149, 150, 151, 152,
+ 153, 154, 155, 156, 157, 158, 159, 160, 161, 162,
+ 163, 164, 165, 166, 167, 168, 169, 170, 171, 172,
+ 173, 174, 175, 176, 177, 178, 179, 180, 181, 182,
+ 183, 184, 185, 186, 187, 188, 189, 190, 191, 192,
+ 193, 194, 195, 196, 197, 198, 199, 200, 201, 202,
+ 203, 204, 205, 208, 261, 262, 263, 264, 265, 266,
+ 301, 302, 305, 306, 307, 308, 312, 313, 314, 315,
+ 316, 317, 320, 321, 322, 323, 325, 327, 328, 329,
+ 366, 367, 368, 237, 237, 207, 241, 328, 207, 247,
+ 247, 369, 238, 244, 309, 310, 311, 321, 325, 244,
+ 247, 207, 207, 247, 322, 325, 239, 326, 0, 367,
+ 208, 324, 54, 207, 318, 319, 241, 331, 325, 247,
+ 326, 241, 348, 310, 309, 311, 207, 207, 237, 246,
+ 326, 241, 244, 247, 304, 207, 209, 210, 211, 212,
+ 213, 214, 215, 218, 219, 237, 240, 248, 249, 250,
+ 251, 271, 272, 273, 275, 276, 277, 278, 279, 280,
+ 281, 282, 283, 284, 285, 286, 287, 288, 289, 290,
+ 291, 292, 293, 294, 295, 325, 239, 238, 244, 246,
+ 238, 244, 330, 321, 325, 332, 333, 247, 247, 13,
+ 14, 15, 17, 18, 19, 20, 21, 22, 23, 206,
+ 241, 242, 247, 282, 295, 297, 299, 301, 305, 325,
+ 338, 339, 340, 341, 349, 350, 351, 354, 357, 358,
+ 365, 326, 246, 326, 241, 297, 336, 246, 303, 207,
+ 244, 247, 282, 282, 299, 218, 219, 239, 243, 238,
+ 238, 244, 205, 297, 237, 282, 252, 253, 254, 249,
+ 251, 216, 217, 220, 221, 255, 256, 222, 223, 259,
+ 258, 257, 224, 226, 225, 260, 240, 240, 295, 208,
+ 295, 300, 319, 332, 325, 207, 334, 335, 242, 333,
+ 247, 247, 360, 237, 237, 247, 247, 299, 237, 299,
+ 245, 237, 242, 342, 227, 228, 229, 230, 231, 232,
+ 233, 234, 235, 236, 246, 298, 244, 247, 242, 339,
+ 336, 246, 336, 337, 336, 332, 207, 238, 274, 299,
+ 207, 297, 282, 282, 282, 284, 284, 285, 285, 286,
+ 286, 286, 286, 287, 287, 288, 289, 290, 291, 292,
+ 293, 296, 240, 242, 334, 326, 244, 247, 339, 361,
+ 299, 247, 299, 245, 359, 349, 297, 297, 336, 242,
+ 244, 242, 240, 299, 247, 335, 206, 338, 350, 362,
+ 238, 238, 299, 314, 321, 353, 343, 242, 336, 245,
+ 237, 353, 363, 364, 345, 346, 347, 352, 355, 207,
+ 238, 242, 297, 299, 247, 238, 16, 341, 340, 241,
+ 246, 340, 344, 348, 238, 299, 344, 345, 349, 356,
+ 336, 247, 242
+};
+
+ /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
+static const yytype_uint16 yyr1[] =
+{
+ 0, 270, 271, 272, 272, 272, 272, 272, 272, 272,
+ 272, 272, 273, 273, 273, 273, 273, 273, 274, 275,
+ 276, 277, 277, 278, 278, 279, 279, 280, 281, 281,
+ 282, 282, 282, 282, 283, 283, 283, 283, 284, 284,
+ 284, 284, 285, 285, 285, 286, 286, 286, 287, 287,
+ 287, 287, 287, 288, 288, 288, 289, 289, 290, 290,
+ 291, 291, 292, 292, 293, 293, 294, 294, 295, 296,
+ 295, 297, 297, 298, 298, 298, 298, 298, 298, 298,
+ 298, 298, 298, 298, 299, 299, 300, 301, 301, 301,
+ 301, 301, 301, 301, 301, 301, 303, 302, 304, 304,
+ 305, 306, 306, 307, 307, 308, 309, 309, 310, 310,
+ 310, 310, 311, 312, 312, 312, 312, 312, 313, 313,
+ 313, 313, 313, 314, 314, 315, 316, 316, 316, 317,
+ 318, 318, 319, 319, 319, 320, 321, 321, 322, 322,
+ 322, 322, 322, 322, 323, 323, 323, 323, 323, 323,
+ 323, 323, 323, 323, 323, 323, 323, 323, 323, 323,
+ 323, 323, 323, 324, 324, 325, 325, 326, 326, 326,
+ 326, 327, 327, 327, 327, 327, 327, 327, 327, 327,
+ 327, 327, 327, 327, 327, 327, 327, 327, 327, 327,
+ 327, 327, 327, 327, 327, 327, 327, 327, 327, 327,
+ 327, 327, 327, 327, 327, 327, 327, 327, 327, 327,
+ 327, 327, 327, 327, 327, 327, 327, 327, 327, 327,
+ 327, 327, 327, 327, 327, 327, 327, 327, 327, 327,
+ 327, 327, 327, 327, 327, 327, 327, 327, 327, 327,
+ 327, 327, 327, 327, 327, 327, 327, 327, 327, 327,
+ 327, 327, 327, 327, 327, 327, 327, 327, 327, 327,
+ 327, 327, 327, 327, 327, 327, 327, 327, 327, 327,
+ 327, 327, 327, 327, 327, 327, 327, 327, 327, 327,
+ 327, 327, 327, 327, 327, 327, 327, 327, 327, 327,
+ 327, 327, 327, 327, 327, 327, 327, 327, 327, 327,
+ 327, 327, 327, 327, 327, 327, 327, 327, 327, 327,
+ 327, 327, 327, 327, 327, 327, 327, 327, 327, 327,
+ 327, 327, 327, 327, 327, 327, 327, 327, 327, 327,
+ 327, 327, 327, 327, 327, 327, 327, 327, 327, 327,
+ 327, 327, 328, 328, 328, 330, 329, 331, 329, 332,
+ 332, 333, 333, 334, 334, 335, 335, 336, 336, 336,
+ 337, 337, 338, 339, 339, 340, 340, 340, 340, 340,
+ 340, 340, 341, 342, 343, 341, 344, 344, 346, 345,
+ 347, 345, 348, 348, 349, 349, 350, 350, 351, 352,
+ 352, 353, 353, 355, 354, 356, 356, 357, 357, 359,
+ 358, 360, 358, 361, 358, 362, 362, 363, 363, 364,
+ 364, 365, 365, 365, 365, 365, 366, 366, 367, 367,
+ 369, 368
+};
+
+ /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */
+static const yytype_uint8 yyr2[] =
+{
+ 0, 2, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 3, 1, 4, 1, 3, 2, 2, 1, 1,
+ 1, 2, 2, 2, 1, 2, 3, 2, 1, 1,
+ 1, 2, 2, 2, 1, 1, 1, 1, 1, 3,
+ 3, 3, 1, 3, 3, 1, 3, 3, 1, 3,
+ 3, 3, 3, 1, 3, 3, 1, 3, 1, 3,
+ 1, 3, 1, 3, 1, 3, 1, 3, 1, 0,
+ 6, 1, 3, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 3, 1, 2, 2, 4,
+ 2, 3, 4, 2, 3, 4, 0, 6, 2, 3,
+ 2, 1, 1, 2, 3, 3, 2, 3, 2, 1,
+ 2, 1, 1, 1, 3, 4, 6, 5, 1, 2,
+ 3, 5, 4, 1, 2, 1, 1, 1, 1, 4,
+ 1, 3, 1, 3, 1, 1, 1, 2, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 4, 1, 3, 1, 2, 2, 3, 3,
+ 4, 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, 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, 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, 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, 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, 1, 1, 1, 1, 0, 6, 0, 5, 1,
+ 2, 3, 4, 1, 3, 1, 2, 1, 3, 4,
+ 1, 3, 1, 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, 8, 0, 1, 3, 2, 0,
+ 6, 0, 8, 0, 7, 1, 1, 1, 0, 2,
+ 3, 2, 2, 2, 3, 2, 1, 2, 1, 1,
+ 0, 3
+};
+
+
+#define yyerrok (yyerrstatus = 0)
+#define yyclearin (yychar = YYEMPTY)
+#define YYEMPTY (-2)
+#define YYEOF 0
+
+#define YYACCEPT goto yyacceptlab
+#define YYABORT goto yyabortlab
+#define YYERROR goto yyerrorlab
+
+
+#define YYRECOVERING() (!!yyerrstatus)
+
+#define YYBACKUP(Token, Value) \
+do \
+ if (yychar == YYEMPTY) \
+ { \
+ yychar = (Token); \
+ yylval = (Value); \
+ YYPOPSTACK (yylen); \
+ yystate = *yyssp; \
+ goto yybackup; \
+ } \
+ else \
+ { \
+ yyerror (pParseContext, YY_("syntax error: cannot back up")); \
+ YYERROR; \
+ } \
+while (0)
+
+/* Error token number */
+#define YYTERROR 1
+#define YYERRCODE 256
+
+
+
+/* Enable debugging if requested. */
+#if YYDEBUG
+
+# ifndef YYFPRINTF
+# include <stdio.h> /* INFRINGES ON USER NAME SPACE */
+# define YYFPRINTF fprintf
+# endif
+
+# define YYDPRINTF(Args) \
+do { \
+ if (yydebug) \
+ YYFPRINTF Args; \
+} while (0)
+
+/* This macro is provided for backward compatibility. */
+#ifndef YY_LOCATION_PRINT
+# define YY_LOCATION_PRINT(File, Loc) ((void) 0)
+#endif
+
+
+# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
+do { \
+ if (yydebug) \
+ { \
+ YYFPRINTF (stderr, "%s ", Title); \
+ yy_symbol_print (stderr, \
+ Type, Value, pParseContext); \
+ YYFPRINTF (stderr, "\n"); \
+ } \
+} while (0)
+
+
+/*----------------------------------------.
+| Print this symbol's value on YYOUTPUT. |
+`----------------------------------------*/
+
+static void
+yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, glslang::TParseContext* pParseContext)
+{
+ FILE *yyo = yyoutput;
+ YYUSE (yyo);
+ YYUSE (pParseContext);
+ if (!yyvaluep)
+ return;
+# ifdef YYPRINT
+ if (yytype < YYNTOKENS)
+ YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
+# endif
+ YYUSE (yytype);
+}
+
+
+/*--------------------------------.
+| Print this symbol on YYOUTPUT. |
+`--------------------------------*/
+
+static void
+yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, glslang::TParseContext* pParseContext)
+{
+ YYFPRINTF (yyoutput, "%s %s (",
+ yytype < YYNTOKENS ? "token" : "nterm", yytname[yytype]);
+
+ yy_symbol_value_print (yyoutput, yytype, yyvaluep, pParseContext);
+ YYFPRINTF (yyoutput, ")");
+}
+
+/*------------------------------------------------------------------.
+| yy_stack_print -- Print the state stack from its BOTTOM up to its |
+| TOP (included). |
+`------------------------------------------------------------------*/
+
+static void
+yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
+{
+ YYFPRINTF (stderr, "Stack now");
+ for (; yybottom <= yytop; yybottom++)
+ {
+ int yybot = *yybottom;
+ YYFPRINTF (stderr, " %d", yybot);
+ }
+ YYFPRINTF (stderr, "\n");
+}
+
+# define YY_STACK_PRINT(Bottom, Top) \
+do { \
+ if (yydebug) \
+ yy_stack_print ((Bottom), (Top)); \
+} while (0)
+
+
+/*------------------------------------------------.
+| Report that the YYRULE is going to be reduced. |
+`------------------------------------------------*/
+
+static void
+yy_reduce_print (yytype_int16 *yyssp, YYSTYPE *yyvsp, int yyrule, glslang::TParseContext* pParseContext)
+{
+ unsigned long int yylno = yyrline[yyrule];
+ int yynrhs = yyr2[yyrule];
+ int yyi;
+ YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
+ yyrule - 1, yylno);
+ /* The symbols being reduced. */
+ for (yyi = 0; yyi < yynrhs; yyi++)
+ {
+ YYFPRINTF (stderr, " $%d = ", yyi + 1);
+ yy_symbol_print (stderr,
+ yystos[yyssp[yyi + 1 - yynrhs]],
+ &(yyvsp[(yyi + 1) - (yynrhs)])
+ , pParseContext);
+ YYFPRINTF (stderr, "\n");
+ }
+}
+
+# define YY_REDUCE_PRINT(Rule) \
+do { \
+ if (yydebug) \
+ yy_reduce_print (yyssp, yyvsp, Rule, pParseContext); \
+} while (0)
+
+/* Nonzero means print parse trace. It is left uninitialized so that
+ multiple parsers can coexist. */
+int yydebug;
+#else /* !YYDEBUG */
+# define YYDPRINTF(Args)
+# define YY_SYMBOL_PRINT(Title, Type, Value, Location)
+# define YY_STACK_PRINT(Bottom, Top)
+# define YY_REDUCE_PRINT(Rule)
+#endif /* !YYDEBUG */
+
+
+/* YYINITDEPTH -- initial size of the parser's stacks. */
+#ifndef YYINITDEPTH
+# define YYINITDEPTH 200
+#endif
+
+/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
+ if the built-in stack extension method is used).
+
+ Do not make this value too large; the results are undefined if
+ YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
+ evaluated with infinite-precision integer arithmetic. */
+
+#ifndef YYMAXDEPTH
+# define YYMAXDEPTH 10000
+#endif
+
+
+#if YYERROR_VERBOSE
+
+# ifndef yystrlen
+# if defined __GLIBC__ && defined _STRING_H
+# define yystrlen strlen
+# else
+/* Return the length of YYSTR. */
+static YYSIZE_T
+yystrlen (const char *yystr)
+{
+ YYSIZE_T yylen;
+ for (yylen = 0; yystr[yylen]; yylen++)
+ continue;
+ return yylen;
+}
+# endif
+# endif
+
+# ifndef yystpcpy
+# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
+# define yystpcpy stpcpy
+# else
+/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
+ YYDEST. */
+static char *
+yystpcpy (char *yydest, const char *yysrc)
+{
+ char *yyd = yydest;
+ const char *yys = yysrc;
+
+ while ((*yyd++ = *yys++) != '\0')
+ continue;
+
+ return yyd - 1;
+}
+# endif
+# endif
+
+# ifndef yytnamerr
+/* Copy to YYRES the contents of YYSTR after stripping away unnecessary
+ quotes and backslashes, so that it's suitable for yyerror. The
+ heuristic is that double-quoting is unnecessary unless the string
+ contains an apostrophe, a comma, or backslash (other than
+ backslash-backslash). YYSTR is taken from yytname. If YYRES is
+ null, do not copy; instead, return the length of what the result
+ would have been. */
+static YYSIZE_T
+yytnamerr (char *yyres, const char *yystr)
+{
+ if (*yystr == '"')
+ {
+ YYSIZE_T yyn = 0;
+ char const *yyp = yystr;
+
+ for (;;)
+ switch (*++yyp)
+ {
+ case '\'':
+ case ',':
+ goto do_not_strip_quotes;
+
+ case '\\':
+ if (*++yyp != '\\')
+ goto do_not_strip_quotes;
+ /* Fall through. */
+ default:
+ if (yyres)
+ yyres[yyn] = *yyp;
+ yyn++;
+ break;
+
+ case '"':
+ if (yyres)
+ yyres[yyn] = '\0';
+ return yyn;
+ }
+ do_not_strip_quotes: ;
+ }
+
+ if (! yyres)
+ return yystrlen (yystr);
+
+ return yystpcpy (yyres, yystr) - yyres;
+}
+# endif
+
+/* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message
+ about the unexpected token YYTOKEN for the state stack whose top is
+ YYSSP.
+
+ Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is
+ not large enough to hold the message. In that case, also set
+ *YYMSG_ALLOC to the required number of bytes. Return 2 if the
+ required number of bytes is too large to store. */
+static int
+yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
+ yytype_int16 *yyssp, int yytoken)
+{
+ YYSIZE_T yysize0 = yytnamerr (YY_NULLPTR, yytname[yytoken]);
+ YYSIZE_T yysize = yysize0;
+ enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
+ /* Internationalized format string. */
+ const char *yyformat = YY_NULLPTR;
+ /* Arguments of yyformat. */
+ char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
+ /* Number of reported tokens (one for the "unexpected", one per
+ "expected"). */
+ int yycount = 0;
+
+ /* There are many possibilities here to consider:
+ - If this state is a consistent state with a default action, then
+ the only way this function was invoked is if the default action
+ is an error action. In that case, don't check for expected
+ tokens because there are none.
+ - The only way there can be no lookahead present (in yychar) is if
+ this state is a consistent state with a default action. Thus,
+ detecting the absence of a lookahead is sufficient to determine
+ that there is no unexpected or expected token to report. In that
+ case, just report a simple "syntax error".
+ - Don't assume there isn't a lookahead just because this state is a
+ consistent state with a default action. There might have been a
+ previous inconsistent state, consistent state with a non-default
+ action, or user semantic action that manipulated yychar.
+ - Of course, the expected token list depends on states to have
+ correct lookahead information, and it depends on the parser not
+ to perform extra reductions after fetching a lookahead from the
+ scanner and before detecting a syntax error. Thus, state merging
+ (from LALR or IELR) and default reductions corrupt the expected
+ token list. However, the list is correct for canonical LR with
+ one exception: it will still contain any token that will not be
+ accepted due to an error action in a later state.
+ */
+ if (yytoken != YYEMPTY)
+ {
+ int yyn = yypact[*yyssp];
+ yyarg[yycount++] = yytname[yytoken];
+ if (!yypact_value_is_default (yyn))
+ {
+ /* Start YYX at -YYN if negative to avoid negative indexes in
+ YYCHECK. In other words, skip the first -YYN actions for
+ this state because they are default actions. */
+ int yyxbegin = yyn < 0 ? -yyn : 0;
+ /* Stay within bounds of both yycheck and yytname. */
+ int yychecklim = YYLAST - yyn + 1;
+ int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
+ int yyx;
+
+ for (yyx = yyxbegin; yyx < yyxend; ++yyx)
+ if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR
+ && !yytable_value_is_error (yytable[yyx + yyn]))
+ {
+ if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
+ {
+ yycount = 1;
+ yysize = yysize0;
+ break;
+ }
+ yyarg[yycount++] = yytname[yyx];
+ {
+ YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULLPTR, yytname[yyx]);
+ if (! (yysize <= yysize1
+ && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
+ return 2;
+ yysize = yysize1;
+ }
+ }
+ }
+ }
+
+ switch (yycount)
+ {
+# define YYCASE_(N, S) \
+ case N: \
+ yyformat = S; \
+ break
+ YYCASE_(0, YY_("syntax error"));
+ YYCASE_(1, YY_("syntax error, unexpected %s"));
+ YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
+ YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s"));
+ YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s"));
+ YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"));
+# undef YYCASE_
+ }
+
+ {
+ YYSIZE_T yysize1 = yysize + yystrlen (yyformat);
+ if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
+ return 2;
+ yysize = yysize1;
+ }
+
+ if (*yymsg_alloc < yysize)
+ {
+ *yymsg_alloc = 2 * yysize;
+ if (! (yysize <= *yymsg_alloc
+ && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM))
+ *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM;
+ return 1;
+ }
+
+ /* Avoid sprintf, as that infringes on the user's name space.
+ Don't have undefined behavior even if the translation
+ produced a string with the wrong number of "%s"s. */
+ {
+ char *yyp = *yymsg;
+ int yyi = 0;
+ while ((*yyp = *yyformat) != '\0')
+ if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount)
+ {
+ yyp += yytnamerr (yyp, yyarg[yyi++]);
+ yyformat += 2;
+ }
+ else
+ {
+ yyp++;
+ yyformat++;
+ }
+ }
+ return 0;
+}
+#endif /* YYERROR_VERBOSE */
+
+/*-----------------------------------------------.
+| Release the memory associated to this symbol. |
+`-----------------------------------------------*/
+
+static void
+yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, glslang::TParseContext* pParseContext)
+{
+ YYUSE (yyvaluep);
+ YYUSE (pParseContext);
+ if (!yymsg)
+ yymsg = "Deleting";
+ YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
+
+ YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
+ YYUSE (yytype);
+ YY_IGNORE_MAYBE_UNINITIALIZED_END
+}
+
+
+
+
+/*----------.
+| yyparse. |
+`----------*/
+
+int
+yyparse (glslang::TParseContext* pParseContext)
+{
+/* The lookahead symbol. */
+int yychar;
+
+
+/* The semantic value of the lookahead symbol. */
+/* Default value used for initialization, for pacifying older GCCs
+ or non-GCC compilers. */
+YY_INITIAL_VALUE (static YYSTYPE yyval_default;)
+YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
+
+ /* Number of syntax errors so far. */
+ int yynerrs;
+
+ int yystate;
+ /* Number of tokens to shift before error messages enabled. */
+ int yyerrstatus;
+
+ /* The stacks and their tools:
+ 'yyss': related to states.
+ 'yyvs': related to semantic values.
+
+ Refer to the stacks through separate pointers, to allow yyoverflow
+ to reallocate them elsewhere. */
+
+ /* The state stack. */
+ yytype_int16 yyssa[YYINITDEPTH];
+ yytype_int16 *yyss;
+ yytype_int16 *yyssp;
+
+ /* The semantic value stack. */
+ YYSTYPE yyvsa[YYINITDEPTH];
+ YYSTYPE *yyvs;
+ YYSTYPE *yyvsp;
+
+ YYSIZE_T yystacksize;
+
+ int yyn;
+ int yyresult;
+ /* Lookahead token as an internal (translated) token number. */
+ int yytoken = 0;
+ /* The variables used to return semantic value and location from the
+ action routines. */
+ YYSTYPE yyval;
+
+#if YYERROR_VERBOSE
+ /* Buffer for error messages, and its allocated size. */
+ char yymsgbuf[128];
+ char *yymsg = yymsgbuf;
+ YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
+#endif
+
+#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
+
+ /* The number of symbols on the RHS of the reduced rule.
+ Keep to zero when no symbol should be popped. */
+ int yylen = 0;
+
+ yyssp = yyss = yyssa;
+ yyvsp = yyvs = yyvsa;
+ yystacksize = YYINITDEPTH;
+
+ YYDPRINTF ((stderr, "Starting parse\n"));
+
+ yystate = 0;
+ yyerrstatus = 0;
+ yynerrs = 0;
+ yychar = YYEMPTY; /* Cause a token to be read. */
+ goto yysetstate;
+
+/*------------------------------------------------------------.
+| yynewstate -- Push a new state, which is found in yystate. |
+`------------------------------------------------------------*/
+ yynewstate:
+ /* In all cases, when you get here, the value and location stacks
+ have just been pushed. So pushing a state here evens the stacks. */
+ yyssp++;
+
+ yysetstate:
+ *yyssp = yystate;
+
+ if (yyss + yystacksize - 1 <= yyssp)
+ {
+ /* Get the current used size of the three stacks, in elements. */
+ YYSIZE_T yysize = yyssp - yyss + 1;
+
+#ifdef yyoverflow
+ {
+ /* Give user a chance to reallocate the stack. Use copies of
+ these so that the &'s don't force the real ones into
+ memory. */
+ YYSTYPE *yyvs1 = yyvs;
+ yytype_int16 *yyss1 = yyss;
+
+ /* Each stack pointer address is followed by the size of the
+ data in use in that stack, in bytes. This used to be a
+ conditional around just the two extra args, but that might
+ be undefined if yyoverflow is a macro. */
+ yyoverflow (YY_("memory exhausted"),
+ &yyss1, yysize * sizeof (*yyssp),
+ &yyvs1, yysize * sizeof (*yyvsp),
+ &yystacksize);
+
+ yyss = yyss1;
+ yyvs = yyvs1;
+ }
+#else /* no yyoverflow */
+# ifndef YYSTACK_RELOCATE
+ goto yyexhaustedlab;
+# else
+ /* Extend the stack our own way. */
+ if (YYMAXDEPTH <= yystacksize)
+ goto yyexhaustedlab;
+ yystacksize *= 2;
+ if (YYMAXDEPTH < yystacksize)
+ yystacksize = YYMAXDEPTH;
+
+ {
+ yytype_int16 *yyss1 = yyss;
+ union yyalloc *yyptr =
+ (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
+ if (! yyptr)
+ goto yyexhaustedlab;
+ YYSTACK_RELOCATE (yyss_alloc, yyss);
+ YYSTACK_RELOCATE (yyvs_alloc, yyvs);
+# undef YYSTACK_RELOCATE
+ if (yyss1 != yyssa)
+ YYSTACK_FREE (yyss1);
+ }
+# endif
+#endif /* no yyoverflow */
+
+ yyssp = yyss + yysize - 1;
+ yyvsp = yyvs + yysize - 1;
+
+ YYDPRINTF ((stderr, "Stack size increased to %lu\n",
+ (unsigned long int) yystacksize));
+
+ if (yyss + yystacksize - 1 <= yyssp)
+ YYABORT;
+ }
+
+ YYDPRINTF ((stderr, "Entering state %d\n", yystate));
+
+ if (yystate == YYFINAL)
+ YYACCEPT;
+
+ goto yybackup;
+
+/*-----------.
+| yybackup. |
+`-----------*/
+yybackup:
+
+ /* Do appropriate processing given the current state. Read a
+ lookahead token if we need one and don't already have one. */
+
+ /* First try to decide what to do without reference to lookahead token. */
+ yyn = yypact[yystate];
+ if (yypact_value_is_default (yyn))
+ goto yydefault;
+
+ /* Not known => get a lookahead token if don't already have one. */
+
+ /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
+ if (yychar == YYEMPTY)
+ {
+ YYDPRINTF ((stderr, "Reading a token: "));
+ yychar = yylex (&yylval, parseContext);
+ }
+
+ if (yychar <= YYEOF)
+ {
+ yychar = yytoken = YYEOF;
+ YYDPRINTF ((stderr, "Now at end of input.\n"));
+ }
+ else
+ {
+ yytoken = YYTRANSLATE (yychar);
+ YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
+ }
+
+ /* If the proper action on seeing token YYTOKEN is to reduce or to
+ detect an error, take that action. */
+ yyn += yytoken;
+ if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
+ goto yydefault;
+ yyn = yytable[yyn];
+ if (yyn <= 0)
+ {
+ if (yytable_value_is_error (yyn))
+ goto yyerrlab;
+ yyn = -yyn;
+ goto yyreduce;
+ }
+
+ /* Count tokens shifted since error; after three, turn off error
+ status. */
+ if (yyerrstatus)
+ yyerrstatus--;
+
+ /* Shift the lookahead token. */
+ YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
+
+ /* Discard the shifted token. */
+ yychar = YYEMPTY;
+
+ yystate = yyn;
+ YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
+ *++yyvsp = yylval;
+ YY_IGNORE_MAYBE_UNINITIALIZED_END
+
+ goto yynewstate;
+
+
+/*-----------------------------------------------------------.
+| yydefault -- do the default action for the current state. |
+`-----------------------------------------------------------*/
+yydefault:
+ yyn = yydefact[yystate];
+ if (yyn == 0)
+ goto yyerrlab;
+ goto yyreduce;
+
+
+/*-----------------------------.
+| yyreduce -- Do a reduction. |
+`-----------------------------*/
+yyreduce:
+ /* yyn is the number of a rule to reduce with. */
+ yylen = yyr2[yyn];
+
+ /* If YYLEN is nonzero, implement the default value of the action:
+ '$$ = $1'.
+
+ Otherwise, the following line sets YYVAL to garbage.
+ This behavior is undocumented and Bison
+ users should not rely upon it. Assigning to YYVAL
+ unconditionally makes the parser a bit smaller, and it avoids a
+ GCC warning that YYVAL may be used uninitialized. */
+ yyval = yyvsp[1-yylen];
+
+
+ YY_REDUCE_PRINT (yyn);
+ switch (yyn)
+ {
+ case 2:
+#line 246 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm.intermTypedNode) = parseContext.handleVariable((yyvsp[0].lex).loc, (yyvsp[0].lex).symbol, (yyvsp[0].lex).string);
+ }
+#line 3174 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 3:
+#line 252 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode);
+ }
+#line 3182 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 4:
+#line 255 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion((yyvsp[0].lex).i, (yyvsp[0].lex).loc, true);
+ }
+#line 3190 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 5:
+#line 258 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ parseContext.fullIntegerCheck((yyvsp[0].lex).loc, "unsigned literal");
+ (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion((yyvsp[0].lex).u, (yyvsp[0].lex).loc, true);
+ }
+#line 3199 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 6:
+#line 262 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ parseContext.int64Check((yyvsp[0].lex).loc, "64-bit integer literal");
+ (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion((yyvsp[0].lex).i64, (yyvsp[0].lex).loc, true);
+ }
+#line 3208 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 7:
+#line 266 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ parseContext.int64Check((yyvsp[0].lex).loc, "64-bit unsigned integer literal");
+ (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion((yyvsp[0].lex).u64, (yyvsp[0].lex).loc, true);
+ }
+#line 3217 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 8:
+#line 270 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion((yyvsp[0].lex).d, EbtFloat, (yyvsp[0].lex).loc, true);
+ }
+#line 3225 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 9:
+#line 273 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ parseContext.doubleCheck((yyvsp[0].lex).loc, "double literal");
+ (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion((yyvsp[0].lex).d, EbtDouble, (yyvsp[0].lex).loc, true);
+ }
+#line 3234 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 10:
+#line 277 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion((yyvsp[0].lex).b, (yyvsp[0].lex).loc, true);
+ }
+#line 3242 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 11:
+#line 280 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm.intermTypedNode) = (yyvsp[-1].interm.intermTypedNode);
+ if ((yyval.interm.intermTypedNode)->getAsConstantUnion())
+ (yyval.interm.intermTypedNode)->getAsConstantUnion()->setExpression();
+ }
+#line 3252 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 12:
+#line 288 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode);
+ }
+#line 3260 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 13:
+#line 291 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm.intermTypedNode) = parseContext.handleBracketDereference((yyvsp[-2].lex).loc, (yyvsp[-3].interm.intermTypedNode), (yyvsp[-1].interm.intermTypedNode));
+ }
+#line 3268 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 14:
+#line 294 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode);
+ }
+#line 3276 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 15:
+#line 297 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm.intermTypedNode) = parseContext.handleDotDereference((yyvsp[0].lex).loc, (yyvsp[-2].interm.intermTypedNode), *(yyvsp[0].lex).string);
+ }
+#line 3284 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 16:
+#line 300 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ parseContext.variableCheck((yyvsp[-1].interm.intermTypedNode));
+ parseContext.lValueErrorCheck((yyvsp[0].lex).loc, "++", (yyvsp[-1].interm.intermTypedNode));
+ (yyval.interm.intermTypedNode) = parseContext.handleUnaryMath((yyvsp[0].lex).loc, "++", EOpPostIncrement, (yyvsp[-1].interm.intermTypedNode));
+ }
+#line 3294 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 17:
+#line 305 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ parseContext.variableCheck((yyvsp[-1].interm.intermTypedNode));
+ parseContext.lValueErrorCheck((yyvsp[0].lex).loc, "--", (yyvsp[-1].interm.intermTypedNode));
+ (yyval.interm.intermTypedNode) = parseContext.handleUnaryMath((yyvsp[0].lex).loc, "--", EOpPostDecrement, (yyvsp[-1].interm.intermTypedNode));
+ }
+#line 3304 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 18:
+#line 313 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ parseContext.integerCheck((yyvsp[0].interm.intermTypedNode), "[]");
+ (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode);
+ }
+#line 3313 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 19:
+#line 320 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm.intermTypedNode) = parseContext.handleFunctionCall((yyvsp[0].interm).loc, (yyvsp[0].interm).function, (yyvsp[0].interm).intermNode);
+ delete (yyvsp[0].interm).function;
+ }
+#line 3322 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 20:
+#line 327 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm) = (yyvsp[0].interm);
+ }
+#line 3330 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 21:
+#line 333 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm) = (yyvsp[-1].interm);
+ (yyval.interm).loc = (yyvsp[0].lex).loc;
+ }
+#line 3339 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 22:
+#line 337 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm) = (yyvsp[-1].interm);
+ (yyval.interm).loc = (yyvsp[0].lex).loc;
+ }
+#line 3348 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 23:
+#line 344 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm) = (yyvsp[-1].interm);
+ }
+#line 3356 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 24:
+#line 347 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm) = (yyvsp[0].interm);
+ }
+#line 3364 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 25:
+#line 353 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ TParameter param = { 0, new TType };
+ param.type->shallowCopy((yyvsp[0].interm.intermTypedNode)->getType());
+ (yyvsp[-1].interm).function->addParameter(param);
+ (yyval.interm).function = (yyvsp[-1].interm).function;
+ (yyval.interm).intermNode = (yyvsp[0].interm.intermTypedNode);
+ }
+#line 3376 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 26:
+#line 360 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ TParameter param = { 0, new TType };
+ param.type->shallowCopy((yyvsp[0].interm.intermTypedNode)->getType());
+ (yyvsp[-2].interm).function->addParameter(param);
+ (yyval.interm).function = (yyvsp[-2].interm).function;
+ (yyval.interm).intermNode = parseContext.intermediate.growAggregate((yyvsp[-2].interm).intermNode, (yyvsp[0].interm.intermTypedNode), (yyvsp[-1].lex).loc);
+ }
+#line 3388 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 27:
+#line 370 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm) = (yyvsp[-1].interm);
+ }
+#line 3396 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 28:
+#line 378 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ // Constructor
+ (yyval.interm).intermNode = 0;
+ (yyval.interm).function = parseContext.handleConstructorCall((yyvsp[0].interm.type).loc, (yyvsp[0].interm.type));
+ }
+#line 3406 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 29:
+#line 383 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ //
+ // Should be a method or subroutine call, but we haven't recognized the arguments yet.
+ //
+ (yyval.interm).function = 0;
+ (yyval.interm).intermNode = 0;
+
+ TIntermMethod* method = (yyvsp[0].interm.intermTypedNode)->getAsMethodNode();
+ if (method) {
+ (yyval.interm).function = new TFunction(&method->getMethodName(), TType(EbtInt), EOpArrayLength);
+ (yyval.interm).intermNode = method->getObject();
+ } else {
+ TIntermSymbol* symbol = (yyvsp[0].interm.intermTypedNode)->getAsSymbolNode();
+ if (symbol) {
+ parseContext.reservedErrorCheck(symbol->getLoc(), symbol->getName());
+ TFunction *function = new TFunction(&symbol->getName(), TType(EbtVoid));
+ (yyval.interm).function = function;
+ } else
+ parseContext.error((yyvsp[0].interm.intermTypedNode)->getLoc(), "function call, method, or subroutine call expected", "", "");
+ }
+
+ if ((yyval.interm).function == 0) {
+ // error recover
+ TString empty("");
+ (yyval.interm).function = new TFunction(&empty, TType(EbtVoid), EOpNull);
+ }
+ }
+#line 3438 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 30:
+#line 413 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ parseContext.variableCheck((yyvsp[0].interm.intermTypedNode));
+ (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode);
+ if (TIntermMethod* method = (yyvsp[0].interm.intermTypedNode)->getAsMethodNode())
+ parseContext.error((yyvsp[0].interm.intermTypedNode)->getLoc(), "incomplete method syntax", method->getMethodName().c_str(), "");
+ }
+#line 3449 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 31:
+#line 419 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ parseContext.lValueErrorCheck((yyvsp[-1].lex).loc, "++", (yyvsp[0].interm.intermTypedNode));
+ (yyval.interm.intermTypedNode) = parseContext.handleUnaryMath((yyvsp[-1].lex).loc, "++", EOpPreIncrement, (yyvsp[0].interm.intermTypedNode));
+ }
+#line 3458 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 32:
+#line 423 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ parseContext.lValueErrorCheck((yyvsp[-1].lex).loc, "--", (yyvsp[0].interm.intermTypedNode));
+ (yyval.interm.intermTypedNode) = parseContext.handleUnaryMath((yyvsp[-1].lex).loc, "--", EOpPreDecrement, (yyvsp[0].interm.intermTypedNode));
+ }
+#line 3467 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 33:
+#line 427 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ if ((yyvsp[-1].interm).op != EOpNull) {
+ char errorOp[2] = {0, 0};
+ switch((yyvsp[-1].interm).op) {
+ case EOpNegative: errorOp[0] = '-'; break;
+ case EOpLogicalNot: errorOp[0] = '!'; break;
+ case EOpBitwiseNot: errorOp[0] = '~'; break;
+ default: break; // some compilers want this
+ }
+ (yyval.interm.intermTypedNode) = parseContext.handleUnaryMath((yyvsp[-1].interm).loc, errorOp, (yyvsp[-1].interm).op, (yyvsp[0].interm.intermTypedNode));
+ } else {
+ (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode);
+ if ((yyval.interm.intermTypedNode)->getAsConstantUnion())
+ (yyval.interm.intermTypedNode)->getAsConstantUnion()->setExpression();
+ }
+ }
+#line 3488 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 34:
+#line 447 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ { (yyval.interm).loc = (yyvsp[0].lex).loc; (yyval.interm).op = EOpNull; }
+#line 3494 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 35:
+#line 448 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ { (yyval.interm).loc = (yyvsp[0].lex).loc; (yyval.interm).op = EOpNegative; }
+#line 3500 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 36:
+#line 449 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ { (yyval.interm).loc = (yyvsp[0].lex).loc; (yyval.interm).op = EOpLogicalNot; }
+#line 3506 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 37:
+#line 450 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ { (yyval.interm).loc = (yyvsp[0].lex).loc; (yyval.interm).op = EOpBitwiseNot;
+ parseContext.fullIntegerCheck((yyvsp[0].lex).loc, "bitwise not"); }
+#line 3513 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 38:
+#line 456 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); }
+#line 3519 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 39:
+#line 457 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[-1].lex).loc, "*", EOpMul, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode));
+ if ((yyval.interm.intermTypedNode) == 0)
+ (yyval.interm.intermTypedNode) = (yyvsp[-2].interm.intermTypedNode);
+ }
+#line 3529 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 40:
+#line 462 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[-1].lex).loc, "/", EOpDiv, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode));
+ if ((yyval.interm.intermTypedNode) == 0)
+ (yyval.interm.intermTypedNode) = (yyvsp[-2].interm.intermTypedNode);
+ }
+#line 3539 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 41:
+#line 467 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ parseContext.fullIntegerCheck((yyvsp[-1].lex).loc, "%");
+ (yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[-1].lex).loc, "%", EOpMod, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode));
+ if ((yyval.interm.intermTypedNode) == 0)
+ (yyval.interm.intermTypedNode) = (yyvsp[-2].interm.intermTypedNode);
+ }
+#line 3550 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 42:
+#line 476 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); }
+#line 3556 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 43:
+#line 477 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[-1].lex).loc, "+", EOpAdd, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode));
+ if ((yyval.interm.intermTypedNode) == 0)
+ (yyval.interm.intermTypedNode) = (yyvsp[-2].interm.intermTypedNode);
+ }
+#line 3566 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 44:
+#line 482 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[-1].lex).loc, "-", EOpSub, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode));
+ if ((yyval.interm.intermTypedNode) == 0)
+ (yyval.interm.intermTypedNode) = (yyvsp[-2].interm.intermTypedNode);
+ }
+#line 3576 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 45:
+#line 490 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); }
+#line 3582 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 46:
+#line 491 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ parseContext.fullIntegerCheck((yyvsp[-1].lex).loc, "bit shift left");
+ (yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[-1].lex).loc, "<<", EOpLeftShift, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode));
+ if ((yyval.interm.intermTypedNode) == 0)
+ (yyval.interm.intermTypedNode) = (yyvsp[-2].interm.intermTypedNode);
+ }
+#line 3593 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 47:
+#line 497 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ parseContext.fullIntegerCheck((yyvsp[-1].lex).loc, "bit shift right");
+ (yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[-1].lex).loc, ">>", EOpRightShift, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode));
+ if ((yyval.interm.intermTypedNode) == 0)
+ (yyval.interm.intermTypedNode) = (yyvsp[-2].interm.intermTypedNode);
+ }
+#line 3604 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 48:
+#line 506 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); }
+#line 3610 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 49:
+#line 507 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[-1].lex).loc, "<", EOpLessThan, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode));
+ if ((yyval.interm.intermTypedNode) == 0)
+ (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion(false, (yyvsp[-1].lex).loc);
+ }
+#line 3620 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 50:
+#line 512 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[-1].lex).loc, ">", EOpGreaterThan, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode));
+ if ((yyval.interm.intermTypedNode) == 0)
+ (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion(false, (yyvsp[-1].lex).loc);
+ }
+#line 3630 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 51:
+#line 517 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[-1].lex).loc, "<=", EOpLessThanEqual, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode));
+ if ((yyval.interm.intermTypedNode) == 0)
+ (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion(false, (yyvsp[-1].lex).loc);
+ }
+#line 3640 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 52:
+#line 522 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[-1].lex).loc, ">=", EOpGreaterThanEqual, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode));
+ if ((yyval.interm.intermTypedNode) == 0)
+ (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion(false, (yyvsp[-1].lex).loc);
+ }
+#line 3650 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 53:
+#line 530 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); }
+#line 3656 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 54:
+#line 531 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ parseContext.arrayObjectCheck((yyvsp[-1].lex).loc, (yyvsp[-2].interm.intermTypedNode)->getType(), "array comparison");
+ parseContext.opaqueCheck((yyvsp[-1].lex).loc, (yyvsp[-2].interm.intermTypedNode)->getType(), "==");
+ parseContext.specializationCheck((yyvsp[-1].lex).loc, (yyvsp[-2].interm.intermTypedNode)->getType(), "==");
+ (yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[-1].lex).loc, "==", EOpEqual, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode));
+ if ((yyval.interm.intermTypedNode) == 0)
+ (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion(false, (yyvsp[-1].lex).loc);
+ }
+#line 3669 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 55:
+#line 539 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ parseContext.arrayObjectCheck((yyvsp[-1].lex).loc, (yyvsp[-2].interm.intermTypedNode)->getType(), "array comparison");
+ parseContext.opaqueCheck((yyvsp[-1].lex).loc, (yyvsp[-2].interm.intermTypedNode)->getType(), "!=");
+ parseContext.specializationCheck((yyvsp[-1].lex).loc, (yyvsp[-2].interm.intermTypedNode)->getType(), "!=");
+ (yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[-1].lex).loc, "!=", EOpNotEqual, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode));
+ if ((yyval.interm.intermTypedNode) == 0)
+ (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion(false, (yyvsp[-1].lex).loc);
+ }
+#line 3682 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 56:
+#line 550 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); }
+#line 3688 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 57:
+#line 551 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ parseContext.fullIntegerCheck((yyvsp[-1].lex).loc, "bitwise and");
+ (yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[-1].lex).loc, "&", EOpAnd, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode));
+ if ((yyval.interm.intermTypedNode) == 0)
+ (yyval.interm.intermTypedNode) = (yyvsp[-2].interm.intermTypedNode);
+ }
+#line 3699 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 58:
+#line 560 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); }
+#line 3705 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 59:
+#line 561 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ parseContext.fullIntegerCheck((yyvsp[-1].lex).loc, "bitwise exclusive or");
+ (yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[-1].lex).loc, "^", EOpExclusiveOr, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode));
+ if ((yyval.interm.intermTypedNode) == 0)
+ (yyval.interm.intermTypedNode) = (yyvsp[-2].interm.intermTypedNode);
+ }
+#line 3716 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 60:
+#line 570 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); }
+#line 3722 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 61:
+#line 571 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ parseContext.fullIntegerCheck((yyvsp[-1].lex).loc, "bitwise inclusive or");
+ (yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[-1].lex).loc, "|", EOpInclusiveOr, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode));
+ if ((yyval.interm.intermTypedNode) == 0)
+ (yyval.interm.intermTypedNode) = (yyvsp[-2].interm.intermTypedNode);
+ }
+#line 3733 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 62:
+#line 580 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); }
+#line 3739 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 63:
+#line 581 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[-1].lex).loc, "&&", EOpLogicalAnd, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode));
+ if ((yyval.interm.intermTypedNode) == 0)
+ (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion(false, (yyvsp[-1].lex).loc);
+ }
+#line 3749 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 64:
+#line 589 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); }
+#line 3755 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 65:
+#line 590 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[-1].lex).loc, "^^", EOpLogicalXor, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode));
+ if ((yyval.interm.intermTypedNode) == 0)
+ (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion(false, (yyvsp[-1].lex).loc);
+ }
+#line 3765 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 66:
+#line 598 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); }
+#line 3771 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 67:
+#line 599 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[-1].lex).loc, "||", EOpLogicalOr, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode));
+ if ((yyval.interm.intermTypedNode) == 0)
+ (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion(false, (yyvsp[-1].lex).loc);
+ }
+#line 3781 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 68:
+#line 607 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); }
+#line 3787 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 69:
+#line 608 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ ++parseContext.controlFlowNestingLevel;
+ }
+#line 3795 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 70:
+#line 611 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ --parseContext.controlFlowNestingLevel;
+ parseContext.boolCheck((yyvsp[-4].lex).loc, (yyvsp[-5].interm.intermTypedNode));
+ parseContext.rValueErrorCheck((yyvsp[-4].lex).loc, "?", (yyvsp[-5].interm.intermTypedNode));
+ parseContext.rValueErrorCheck((yyvsp[-1].lex).loc, ":", (yyvsp[-2].interm.intermTypedNode));
+ parseContext.rValueErrorCheck((yyvsp[-1].lex).loc, ":", (yyvsp[0].interm.intermTypedNode));
+ (yyval.interm.intermTypedNode) = parseContext.intermediate.addSelection((yyvsp[-5].interm.intermTypedNode), (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode), (yyvsp[-4].lex).loc);
+ if ((yyval.interm.intermTypedNode) == 0) {
+ parseContext.binaryOpError((yyvsp[-4].lex).loc, ":", (yyvsp[-2].interm.intermTypedNode)->getCompleteString(), (yyvsp[0].interm.intermTypedNode)->getCompleteString());
+ (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode);
+ }
+ }
+#line 3812 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 71:
+#line 626 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); }
+#line 3818 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 72:
+#line 627 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ parseContext.arrayObjectCheck((yyvsp[-1].interm).loc, (yyvsp[-2].interm.intermTypedNode)->getType(), "array assignment");
+ parseContext.opaqueCheck((yyvsp[-1].interm).loc, (yyvsp[-2].interm.intermTypedNode)->getType(), "=");
+ parseContext.specializationCheck((yyvsp[-1].interm).loc, (yyvsp[-2].interm.intermTypedNode)->getType(), "=");
+ parseContext.lValueErrorCheck((yyvsp[-1].interm).loc, "assign", (yyvsp[-2].interm.intermTypedNode));
+ parseContext.rValueErrorCheck((yyvsp[-1].interm).loc, "assign", (yyvsp[0].interm.intermTypedNode));
+ (yyval.interm.intermTypedNode) = parseContext.intermediate.addAssign((yyvsp[-1].interm).op, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode), (yyvsp[-1].interm).loc);
+ if ((yyval.interm.intermTypedNode) == 0) {
+ parseContext.assignError((yyvsp[-1].interm).loc, "assign", (yyvsp[-2].interm.intermTypedNode)->getCompleteString(), (yyvsp[0].interm.intermTypedNode)->getCompleteString());
+ (yyval.interm.intermTypedNode) = (yyvsp[-2].interm.intermTypedNode);
+ }
+ }
+#line 3835 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 73:
+#line 642 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm).loc = (yyvsp[0].lex).loc;
+ (yyval.interm).op = EOpAssign;
+ }
+#line 3844 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 74:
+#line 646 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm).loc = (yyvsp[0].lex).loc;
+ (yyval.interm).op = EOpMulAssign;
+ }
+#line 3853 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 75:
+#line 650 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm).loc = (yyvsp[0].lex).loc;
+ (yyval.interm).op = EOpDivAssign;
+ }
+#line 3862 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 76:
+#line 654 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ parseContext.fullIntegerCheck((yyvsp[0].lex).loc, "%=");
+ (yyval.interm).loc = (yyvsp[0].lex).loc;
+ (yyval.interm).op = EOpModAssign;
+ }
+#line 3872 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 77:
+#line 659 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm).loc = (yyvsp[0].lex).loc;
+ (yyval.interm).op = EOpAddAssign;
+ }
+#line 3881 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 78:
+#line 663 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm).loc = (yyvsp[0].lex).loc;
+ (yyval.interm).op = EOpSubAssign;
+ }
+#line 3890 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 79:
+#line 667 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ parseContext.fullIntegerCheck((yyvsp[0].lex).loc, "bit-shift left assign");
+ (yyval.interm).loc = (yyvsp[0].lex).loc; (yyval.interm).op = EOpLeftShiftAssign;
+ }
+#line 3899 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 80:
+#line 671 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ parseContext.fullIntegerCheck((yyvsp[0].lex).loc, "bit-shift right assign");
+ (yyval.interm).loc = (yyvsp[0].lex).loc; (yyval.interm).op = EOpRightShiftAssign;
+ }
+#line 3908 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 81:
+#line 675 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ parseContext.fullIntegerCheck((yyvsp[0].lex).loc, "bitwise-and assign");
+ (yyval.interm).loc = (yyvsp[0].lex).loc; (yyval.interm).op = EOpAndAssign;
+ }
+#line 3917 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 82:
+#line 679 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ parseContext.fullIntegerCheck((yyvsp[0].lex).loc, "bitwise-xor assign");
+ (yyval.interm).loc = (yyvsp[0].lex).loc; (yyval.interm).op = EOpExclusiveOrAssign;
+ }
+#line 3926 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 83:
+#line 683 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ parseContext.fullIntegerCheck((yyvsp[0].lex).loc, "bitwise-or assign");
+ (yyval.interm).loc = (yyvsp[0].lex).loc; (yyval.interm).op = EOpInclusiveOrAssign;
+ }
+#line 3935 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 84:
+#line 690 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode);
+ }
+#line 3943 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 85:
+#line 693 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm.intermTypedNode) = parseContext.intermediate.addComma((yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode), (yyvsp[-1].lex).loc);
+ if ((yyval.interm.intermTypedNode) == 0) {
+ parseContext.binaryOpError((yyvsp[-1].lex).loc, ",", (yyvsp[-2].interm.intermTypedNode)->getCompleteString(), (yyvsp[0].interm.intermTypedNode)->getCompleteString());
+ (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode);
+ }
+ }
+#line 3955 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 86:
+#line 703 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ parseContext.constantValueCheck((yyvsp[0].interm.intermTypedNode), "");
+ (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode);
+ }
+#line 3964 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 87:
+#line 710 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ parseContext.handleFunctionDeclarator((yyvsp[-1].interm).loc, *(yyvsp[-1].interm).function, true /* prototype */);
+ (yyval.interm.intermNode) = 0;
+ // TODO: 4.0 functionality: subroutines: make the identifier a user type for this signature
+ }
+#line 3974 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 88:
+#line 715 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ if ((yyvsp[-1].interm).intermNode && (yyvsp[-1].interm).intermNode->getAsAggregate())
+ (yyvsp[-1].interm).intermNode->getAsAggregate()->setOperator(EOpSequence);
+ (yyval.interm.intermNode) = (yyvsp[-1].interm).intermNode;
+ }
+#line 3984 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 89:
+#line 720 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ parseContext.profileRequires((yyvsp[-3].lex).loc, ENoProfile, 130, 0, "precision statement");
+
+ // lazy setting of the previous scope's defaults, has effect only the first time it is called in a particular scope
+ parseContext.symbolTable.setPreviousDefaultPrecisions(&parseContext.defaultPrecision[0]);
+ parseContext.setDefaultPrecision((yyvsp[-3].lex).loc, (yyvsp[-1].interm.type), (yyvsp[-2].interm.type).qualifier.precision);
+ (yyval.interm.intermNode) = 0;
+ }
+#line 3997 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 90:
+#line 728 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ parseContext.declareBlock((yyvsp[-1].interm).loc, *(yyvsp[-1].interm).typeList);
+ (yyval.interm.intermNode) = 0;
+ }
+#line 4006 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 91:
+#line 732 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ parseContext.declareBlock((yyvsp[-2].interm).loc, *(yyvsp[-2].interm).typeList, (yyvsp[-1].lex).string);
+ (yyval.interm.intermNode) = 0;
+ }
+#line 4015 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 92:
+#line 736 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ parseContext.declareBlock((yyvsp[-3].interm).loc, *(yyvsp[-3].interm).typeList, (yyvsp[-2].lex).string, (yyvsp[-1].interm).arraySizes);
+ (yyval.interm.intermNode) = 0;
+ }
+#line 4024 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 93:
+#line 740 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ parseContext.globalQualifierFixCheck((yyvsp[-1].interm.type).loc, (yyvsp[-1].interm.type).qualifier);
+ parseContext.updateStandaloneQualifierDefaults((yyvsp[-1].interm.type).loc, (yyvsp[-1].interm.type));
+ (yyval.interm.intermNode) = 0;
+ }
+#line 4034 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 94:
+#line 745 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ parseContext.checkNoShaderLayouts((yyvsp[-2].interm.type).loc, (yyvsp[-2].interm.type).shaderQualifiers);
+ parseContext.addQualifierToExisting((yyvsp[-2].interm.type).loc, (yyvsp[-2].interm.type).qualifier, *(yyvsp[-1].lex).string);
+ (yyval.interm.intermNode) = 0;
+ }
+#line 4044 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 95:
+#line 750 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ parseContext.checkNoShaderLayouts((yyvsp[-3].interm.type).loc, (yyvsp[-3].interm.type).shaderQualifiers);
+ (yyvsp[-1].interm.identifierList)->push_back((yyvsp[-2].lex).string);
+ parseContext.addQualifierToExisting((yyvsp[-3].interm.type).loc, (yyvsp[-3].interm.type).qualifier, *(yyvsp[-1].interm.identifierList));
+ (yyval.interm.intermNode) = 0;
+ }
+#line 4055 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 96:
+#line 759 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ { parseContext.nestedBlockCheck((yyvsp[-2].interm.type).loc); }
+#line 4061 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 97:
+#line 759 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ --parseContext.structNestingLevel;
+ parseContext.blockName = (yyvsp[-4].lex).string;
+ parseContext.globalQualifierFixCheck((yyvsp[-5].interm.type).loc, (yyvsp[-5].interm.type).qualifier);
+ parseContext.checkNoShaderLayouts((yyvsp[-5].interm.type).loc, (yyvsp[-5].interm.type).shaderQualifiers);
+ parseContext.currentBlockQualifier = (yyvsp[-5].interm.type).qualifier;
+ (yyval.interm).loc = (yyvsp[-5].interm.type).loc;
+ (yyval.interm).typeList = (yyvsp[-1].interm.typeList);
+ }
+#line 4075 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 98:
+#line 770 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm.identifierList) = new TIdentifierList;
+ (yyval.interm.identifierList)->push_back((yyvsp[0].lex).string);
+ }
+#line 4084 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 99:
+#line 774 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm.identifierList) = (yyvsp[-2].interm.identifierList);
+ (yyval.interm.identifierList)->push_back((yyvsp[0].lex).string);
+ }
+#line 4093 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 100:
+#line 781 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm).function = (yyvsp[-1].interm.function);
+ (yyval.interm).loc = (yyvsp[0].lex).loc;
+ }
+#line 4102 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 101:
+#line 788 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm.function) = (yyvsp[0].interm.function);
+ }
+#line 4110 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 102:
+#line 791 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm.function) = (yyvsp[0].interm.function);
+ }
+#line 4118 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 103:
+#line 798 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ // Add the parameter
+ (yyval.interm.function) = (yyvsp[-1].interm.function);
+ if ((yyvsp[0].interm).param.type->getBasicType() != EbtVoid)
+ (yyvsp[-1].interm.function)->addParameter((yyvsp[0].interm).param);
+ else
+ delete (yyvsp[0].interm).param.type;
+ }
+#line 4131 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 104:
+#line 806 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ //
+ // Only first parameter of one-parameter functions can be void
+ // The check for named parameters not being void is done in parameter_declarator
+ //
+ if ((yyvsp[0].interm).param.type->getBasicType() == EbtVoid) {
+ //
+ // This parameter > first is void
+ //
+ parseContext.error((yyvsp[-1].lex).loc, "cannot be an argument type except for '(void)'", "void", "");
+ delete (yyvsp[0].interm).param.type;
+ } else {
+ // Add the parameter
+ (yyval.interm.function) = (yyvsp[-2].interm.function);
+ (yyvsp[-2].interm.function)->addParameter((yyvsp[0].interm).param);
+ }
+ }
+#line 4153 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 105:
+#line 826 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ if ((yyvsp[-2].interm.type).qualifier.storage != EvqGlobal && (yyvsp[-2].interm.type).qualifier.storage != EvqTemporary) {
+ parseContext.error((yyvsp[-1].lex).loc, "no qualifiers allowed for function return",
+ GetStorageQualifierString((yyvsp[-2].interm.type).qualifier.storage), "");
+ }
+ if ((yyvsp[-2].interm.type).arraySizes)
+ parseContext.arraySizeRequiredCheck((yyvsp[-2].interm.type).loc, *(yyvsp[-2].interm.type).arraySizes);
+
+ // Add the function as a prototype after parsing it (we do not support recursion)
+ TFunction *function;
+ TType type((yyvsp[-2].interm.type));
+ function = new TFunction((yyvsp[-1].lex).string, type);
+ (yyval.interm.function) = function;
+ }
+#line 4172 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 106:
+#line 844 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ if ((yyvsp[-1].interm.type).arraySizes) {
+ parseContext.profileRequires((yyvsp[-1].interm.type).loc, ENoProfile, 120, E_GL_3DL_array_objects, "arrayed type");
+ parseContext.profileRequires((yyvsp[-1].interm.type).loc, EEsProfile, 300, 0, "arrayed type");
+ parseContext.arraySizeRequiredCheck((yyvsp[-1].interm.type).loc, *(yyvsp[-1].interm.type).arraySizes);
+ }
+ if ((yyvsp[-1].interm.type).basicType == EbtVoid) {
+ parseContext.error((yyvsp[0].lex).loc, "illegal use of type 'void'", (yyvsp[0].lex).string->c_str(), "");
+ }
+ parseContext.reservedErrorCheck((yyvsp[0].lex).loc, *(yyvsp[0].lex).string);
+
+ TParameter param = {(yyvsp[0].lex).string, new TType((yyvsp[-1].interm.type))};
+ (yyval.interm).loc = (yyvsp[0].lex).loc;
+ (yyval.interm).param = param;
+ }
+#line 4192 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 107:
+#line 859 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ if ((yyvsp[-2].interm.type).arraySizes) {
+ parseContext.profileRequires((yyvsp[-2].interm.type).loc, ENoProfile, 120, E_GL_3DL_array_objects, "arrayed type");
+ parseContext.profileRequires((yyvsp[-2].interm.type).loc, EEsProfile, 300, 0, "arrayed type");
+ parseContext.arraySizeRequiredCheck((yyvsp[-2].interm.type).loc, *(yyvsp[-2].interm.type).arraySizes);
+ }
+ parseContext.arrayDimCheck((yyvsp[-1].lex).loc, (yyvsp[-2].interm.type).arraySizes, (yyvsp[0].interm).arraySizes);
+
+ parseContext.arraySizeRequiredCheck((yyvsp[0].interm).loc, *(yyvsp[0].interm).arraySizes);
+ parseContext.reservedErrorCheck((yyvsp[-1].lex).loc, *(yyvsp[-1].lex).string);
+
+ (yyvsp[-2].interm.type).arraySizes = (yyvsp[0].interm).arraySizes;
+
+ TParameter param = { (yyvsp[-1].lex).string, new TType((yyvsp[-2].interm.type))};
+ (yyval.interm).loc = (yyvsp[-1].lex).loc;
+ (yyval.interm).param = param;
+ }
+#line 4214 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 108:
+#line 882 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm) = (yyvsp[0].interm);
+ if ((yyvsp[-1].interm.type).qualifier.precision != EpqNone)
+ (yyval.interm).param.type->getQualifier().precision = (yyvsp[-1].interm.type).qualifier.precision;
+ parseContext.precisionQualifierCheck((yyval.interm).loc, (yyval.interm).param.type->getBasicType(), (yyval.interm).param.type->getQualifier());
+
+ parseContext.checkNoShaderLayouts((yyvsp[-1].interm.type).loc, (yyvsp[-1].interm.type).shaderQualifiers);
+ parseContext.parameterTypeCheck((yyvsp[0].interm).loc, (yyvsp[-1].interm.type).qualifier.storage, *(yyval.interm).param.type);
+ parseContext.paramCheckFix((yyvsp[-1].interm.type).loc, (yyvsp[-1].interm.type).qualifier, *(yyval.interm).param.type);
+
+ }
+#line 4230 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 109:
+#line 893 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm) = (yyvsp[0].interm);
+
+ parseContext.parameterTypeCheck((yyvsp[0].interm).loc, EvqIn, *(yyvsp[0].interm).param.type);
+ parseContext.paramCheckFix((yyvsp[0].interm).loc, EvqTemporary, *(yyval.interm).param.type);
+ parseContext.precisionQualifierCheck((yyval.interm).loc, (yyval.interm).param.type->getBasicType(), (yyval.interm).param.type->getQualifier());
+ }
+#line 4242 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 110:
+#line 903 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm) = (yyvsp[0].interm);
+ if ((yyvsp[-1].interm.type).qualifier.precision != EpqNone)
+ (yyval.interm).param.type->getQualifier().precision = (yyvsp[-1].interm.type).qualifier.precision;
+ parseContext.precisionQualifierCheck((yyvsp[-1].interm.type).loc, (yyval.interm).param.type->getBasicType(), (yyval.interm).param.type->getQualifier());
+
+ parseContext.checkNoShaderLayouts((yyvsp[-1].interm.type).loc, (yyvsp[-1].interm.type).shaderQualifiers);
+ parseContext.parameterTypeCheck((yyvsp[0].interm).loc, (yyvsp[-1].interm.type).qualifier.storage, *(yyval.interm).param.type);
+ parseContext.paramCheckFix((yyvsp[-1].interm.type).loc, (yyvsp[-1].interm.type).qualifier, *(yyval.interm).param.type);
+ }
+#line 4257 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 111:
+#line 913 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm) = (yyvsp[0].interm);
+
+ parseContext.parameterTypeCheck((yyvsp[0].interm).loc, EvqIn, *(yyvsp[0].interm).param.type);
+ parseContext.paramCheckFix((yyvsp[0].interm).loc, EvqTemporary, *(yyval.interm).param.type);
+ parseContext.precisionQualifierCheck((yyval.interm).loc, (yyval.interm).param.type->getBasicType(), (yyval.interm).param.type->getQualifier());
+ }
+#line 4269 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 112:
+#line 923 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ TParameter param = { 0, new TType((yyvsp[0].interm.type)) };
+ (yyval.interm).param = param;
+ if ((yyvsp[0].interm.type).arraySizes)
+ parseContext.arraySizeRequiredCheck((yyvsp[0].interm.type).loc, *(yyvsp[0].interm.type).arraySizes);
+ }
+#line 4280 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 113:
+#line 932 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm) = (yyvsp[0].interm);
+ }
+#line 4288 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 114:
+#line 935 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm) = (yyvsp[-2].interm);
+ parseContext.declareVariable((yyvsp[0].lex).loc, *(yyvsp[0].lex).string, (yyvsp[-2].interm).type);
+ }
+#line 4297 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 115:
+#line 939 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm) = (yyvsp[-3].interm);
+ parseContext.declareVariable((yyvsp[-1].lex).loc, *(yyvsp[-1].lex).string, (yyvsp[-3].interm).type, (yyvsp[0].interm).arraySizes);
+ }
+#line 4306 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 116:
+#line 943 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm).type = (yyvsp[-5].interm).type;
+ TIntermNode* initNode = parseContext.declareVariable((yyvsp[-3].lex).loc, *(yyvsp[-3].lex).string, (yyvsp[-5].interm).type, (yyvsp[-2].interm).arraySizes, (yyvsp[0].interm.intermTypedNode));
+ (yyval.interm).intermNode = parseContext.intermediate.growAggregate((yyvsp[-5].interm).intermNode, initNode, (yyvsp[-1].lex).loc);
+ }
+#line 4316 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 117:
+#line 948 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm).type = (yyvsp[-4].interm).type;
+ TIntermNode* initNode = parseContext.declareVariable((yyvsp[-2].lex).loc, *(yyvsp[-2].lex).string, (yyvsp[-4].interm).type, 0, (yyvsp[0].interm.intermTypedNode));
+ (yyval.interm).intermNode = parseContext.intermediate.growAggregate((yyvsp[-4].interm).intermNode, initNode, (yyvsp[-1].lex).loc);
+ }
+#line 4326 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 118:
+#line 956 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm).type = (yyvsp[0].interm.type);
+ (yyval.interm).intermNode = 0;
+ parseContext.declareTypeDefaults((yyval.interm).loc, (yyval.interm).type);
+ }
+#line 4336 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 119:
+#line 961 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm).type = (yyvsp[-1].interm.type);
+ (yyval.interm).intermNode = 0;
+ parseContext.declareVariable((yyvsp[0].lex).loc, *(yyvsp[0].lex).string, (yyvsp[-1].interm.type));
+ }
+#line 4346 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 120:
+#line 966 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm).type = (yyvsp[-2].interm.type);
+ (yyval.interm).intermNode = 0;
+ parseContext.declareVariable((yyvsp[-1].lex).loc, *(yyvsp[-1].lex).string, (yyvsp[-2].interm.type), (yyvsp[0].interm).arraySizes);
+ }
+#line 4356 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 121:
+#line 971 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm).type = (yyvsp[-4].interm.type);
+ TIntermNode* initNode = parseContext.declareVariable((yyvsp[-3].lex).loc, *(yyvsp[-3].lex).string, (yyvsp[-4].interm.type), (yyvsp[-2].interm).arraySizes, (yyvsp[0].interm.intermTypedNode));
+ (yyval.interm).intermNode = parseContext.intermediate.growAggregate(0, initNode, (yyvsp[-1].lex).loc);
+ }
+#line 4366 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 122:
+#line 976 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm).type = (yyvsp[-3].interm.type);
+ TIntermNode* initNode = parseContext.declareVariable((yyvsp[-2].lex).loc, *(yyvsp[-2].lex).string, (yyvsp[-3].interm.type), 0, (yyvsp[0].interm.intermTypedNode));
+ (yyval.interm).intermNode = parseContext.intermediate.growAggregate(0, initNode, (yyvsp[-1].lex).loc);
+ }
+#line 4376 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 123:
+#line 985 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm.type) = (yyvsp[0].interm.type);
+
+ parseContext.globalQualifierTypeCheck((yyvsp[0].interm.type).loc, (yyvsp[0].interm.type).qualifier, (yyval.interm.type));
+ if ((yyvsp[0].interm.type).arraySizes) {
+ parseContext.profileRequires((yyvsp[0].interm.type).loc, ENoProfile, 120, E_GL_3DL_array_objects, "arrayed type");
+ parseContext.profileRequires((yyvsp[0].interm.type).loc, EEsProfile, 300, 0, "arrayed type");
+ }
+
+ parseContext.precisionQualifierCheck((yyval.interm.type).loc, (yyval.interm.type).basicType, (yyval.interm.type).qualifier);
+ }
+#line 4392 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 124:
+#line 996 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ parseContext.globalQualifierFixCheck((yyvsp[-1].interm.type).loc, (yyvsp[-1].interm.type).qualifier);
+ parseContext.globalQualifierTypeCheck((yyvsp[-1].interm.type).loc, (yyvsp[-1].interm.type).qualifier, (yyvsp[0].interm.type));
+
+ if ((yyvsp[0].interm.type).arraySizes) {
+ parseContext.profileRequires((yyvsp[0].interm.type).loc, ENoProfile, 120, E_GL_3DL_array_objects, "arrayed type");
+ parseContext.profileRequires((yyvsp[0].interm.type).loc, EEsProfile, 300, 0, "arrayed type");
+ }
+
+ if ((yyvsp[0].interm.type).arraySizes && parseContext.arrayQualifierError((yyvsp[0].interm.type).loc, (yyvsp[-1].interm.type).qualifier))
+ (yyvsp[0].interm.type).arraySizes = 0;
+
+ parseContext.checkNoShaderLayouts((yyvsp[0].interm.type).loc, (yyvsp[-1].interm.type).shaderQualifiers);
+ (yyvsp[0].interm.type).shaderQualifiers.merge((yyvsp[-1].interm.type).shaderQualifiers);
+ parseContext.mergeQualifiers((yyvsp[0].interm.type).loc, (yyvsp[0].interm.type).qualifier, (yyvsp[-1].interm.type).qualifier, true);
+ parseContext.precisionQualifierCheck((yyvsp[0].interm.type).loc, (yyvsp[0].interm.type).basicType, (yyvsp[0].interm.type).qualifier);
+
+ (yyval.interm.type) = (yyvsp[0].interm.type);
+
+ if (! (yyval.interm.type).qualifier.isInterpolation() &&
+ ((parseContext.language == EShLangVertex && (yyval.interm.type).qualifier.storage == EvqVaryingOut) ||
+ (parseContext.language == EShLangFragment && (yyval.interm.type).qualifier.storage == EvqVaryingIn)))
+ (yyval.interm.type).qualifier.smooth = true;
+ }
+#line 4421 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 125:
+#line 1023 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ parseContext.globalCheck((yyvsp[0].lex).loc, "invariant");
+ parseContext.profileRequires((yyval.interm.type).loc, ENoProfile, 120, 0, "invariant");
+ (yyval.interm.type).init((yyvsp[0].lex).loc);
+ (yyval.interm.type).qualifier.invariant = true;
+ }
+#line 4432 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 126:
+#line 1032 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ parseContext.globalCheck((yyvsp[0].lex).loc, "smooth");
+ parseContext.profileRequires((yyvsp[0].lex).loc, ENoProfile, 130, 0, "smooth");
+ parseContext.profileRequires((yyvsp[0].lex).loc, EEsProfile, 300, 0, "smooth");
+ (yyval.interm.type).init((yyvsp[0].lex).loc);
+ (yyval.interm.type).qualifier.smooth = true;
+ }
+#line 4444 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 127:
+#line 1039 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ parseContext.globalCheck((yyvsp[0].lex).loc, "flat");
+ parseContext.profileRequires((yyvsp[0].lex).loc, ENoProfile, 130, 0, "flat");
+ parseContext.profileRequires((yyvsp[0].lex).loc, EEsProfile, 300, 0, "flat");
+ (yyval.interm.type).init((yyvsp[0].lex).loc);
+ (yyval.interm.type).qualifier.flat = true;
+ }
+#line 4456 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 128:
+#line 1046 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ parseContext.globalCheck((yyvsp[0].lex).loc, "noperspective");
+ parseContext.requireProfile((yyvsp[0].lex).loc, ~EEsProfile, "noperspective");
+ parseContext.profileRequires((yyvsp[0].lex).loc, ENoProfile, 130, 0, "noperspective");
+ (yyval.interm.type).init((yyvsp[0].lex).loc);
+ (yyval.interm.type).qualifier.nopersp = true;
+ }
+#line 4468 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 129:
+#line 1056 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm.type) = (yyvsp[-1].interm.type);
+ }
+#line 4476 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 130:
+#line 1062 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm.type) = (yyvsp[0].interm.type);
+ }
+#line 4484 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 131:
+#line 1065 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm.type) = (yyvsp[-2].interm.type);
+ (yyval.interm.type).shaderQualifiers.merge((yyvsp[0].interm.type).shaderQualifiers);
+ parseContext.mergeObjectLayoutQualifiers((yyval.interm.type).qualifier, (yyvsp[0].interm.type).qualifier, false);
+ }
+#line 4494 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 132:
+#line 1072 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm.type).init((yyvsp[0].lex).loc);
+ parseContext.setLayoutQualifier((yyvsp[0].lex).loc, (yyval.interm.type), *(yyvsp[0].lex).string);
+ }
+#line 4503 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 133:
+#line 1076 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm.type).init((yyvsp[-2].lex).loc);
+ parseContext.setLayoutQualifier((yyvsp[-2].lex).loc, (yyval.interm.type), *(yyvsp[-2].lex).string, (yyvsp[0].interm.intermTypedNode));
+ }
+#line 4512 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 134:
+#line 1080 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ { // because "shared" is both an identifier and a keyword
+ (yyval.interm.type).init((yyvsp[0].lex).loc);
+ TString strShared("shared");
+ parseContext.setLayoutQualifier((yyvsp[0].lex).loc, (yyval.interm.type), strShared);
+ }
+#line 4522 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 135:
+#line 1088 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ parseContext.profileRequires((yyval.interm.type).loc, ECoreProfile | ECompatibilityProfile, 400, E_GL_ARB_gpu_shader5, "precise");
+ parseContext.profileRequires((yyvsp[0].lex).loc, EEsProfile, 320, Num_AEP_gpu_shader5, AEP_gpu_shader5, "precise");
+ (yyval.interm.type).init((yyvsp[0].lex).loc);
+ (yyval.interm.type).qualifier.noContraction = true;
+ }
+#line 4533 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 136:
+#line 1097 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm.type) = (yyvsp[0].interm.type);
+ }
+#line 4541 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 137:
+#line 1100 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm.type) = (yyvsp[-1].interm.type);
+ if ((yyval.interm.type).basicType == EbtVoid)
+ (yyval.interm.type).basicType = (yyvsp[0].interm.type).basicType;
+
+ (yyval.interm.type).shaderQualifiers.merge((yyvsp[0].interm.type).shaderQualifiers);
+ parseContext.mergeQualifiers((yyval.interm.type).loc, (yyval.interm.type).qualifier, (yyvsp[0].interm.type).qualifier, false);
+ }
+#line 4554 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 138:
+#line 1111 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm.type) = (yyvsp[0].interm.type);
+ }
+#line 4562 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 139:
+#line 1114 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm.type) = (yyvsp[0].interm.type);
+ }
+#line 4570 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 140:
+#line 1117 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm.type) = (yyvsp[0].interm.type);
+ }
+#line 4578 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 141:
+#line 1120 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ // allow inheritance of storage qualifier from block declaration
+ (yyval.interm.type) = (yyvsp[0].interm.type);
+ }
+#line 4587 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 142:
+#line 1124 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ // allow inheritance of storage qualifier from block declaration
+ (yyval.interm.type) = (yyvsp[0].interm.type);
+ }
+#line 4596 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 143:
+#line 1128 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ // allow inheritance of storage qualifier from block declaration
+ (yyval.interm.type) = (yyvsp[0].interm.type);
+ }
+#line 4605 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 144:
+#line 1135 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm.type).init((yyvsp[0].lex).loc);
+ (yyval.interm.type).qualifier.storage = EvqConst; // will later turn into EvqConstReadOnly, if the initializer is not constant
+ }
+#line 4614 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 145:
+#line 1139 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ parseContext.requireStage((yyvsp[0].lex).loc, EShLangVertex, "attribute");
+ parseContext.checkDeprecated((yyvsp[0].lex).loc, ECoreProfile, 130, "attribute");
+ parseContext.checkDeprecated((yyvsp[0].lex).loc, ENoProfile, 130, "attribute");
+ parseContext.requireNotRemoved((yyvsp[0].lex).loc, ECoreProfile, 420, "attribute");
+ parseContext.requireNotRemoved((yyvsp[0].lex).loc, EEsProfile, 300, "attribute");
+
+ parseContext.globalCheck((yyvsp[0].lex).loc, "attribute");
+
+ (yyval.interm.type).init((yyvsp[0].lex).loc);
+ (yyval.interm.type).qualifier.storage = EvqVaryingIn;
+ }
+#line 4631 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 146:
+#line 1151 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ parseContext.checkDeprecated((yyvsp[0].lex).loc, ENoProfile, 130, "varying");
+ parseContext.checkDeprecated((yyvsp[0].lex).loc, ECoreProfile, 130, "varying");
+ parseContext.requireNotRemoved((yyvsp[0].lex).loc, ECoreProfile, 420, "varying");
+ parseContext.requireNotRemoved((yyvsp[0].lex).loc, EEsProfile, 300, "varying");
+
+ parseContext.globalCheck((yyvsp[0].lex).loc, "varying");
+
+ (yyval.interm.type).init((yyvsp[0].lex).loc);
+ if (parseContext.language == EShLangVertex)
+ (yyval.interm.type).qualifier.storage = EvqVaryingOut;
+ else
+ (yyval.interm.type).qualifier.storage = EvqVaryingIn;
+ }
+#line 4650 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 147:
+#line 1165 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ parseContext.globalCheck((yyvsp[0].lex).loc, "inout");
+ (yyval.interm.type).init((yyvsp[0].lex).loc);
+ (yyval.interm.type).qualifier.storage = EvqInOut;
+ }
+#line 4660 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 148:
+#line 1170 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ parseContext.globalCheck((yyvsp[0].lex).loc, "in");
+ (yyval.interm.type).init((yyvsp[0].lex).loc);
+ // whether this is a parameter "in" or a pipeline "in" will get sorted out a bit later
+ (yyval.interm.type).qualifier.storage = EvqIn;
+ }
+#line 4671 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 149:
+#line 1176 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ parseContext.globalCheck((yyvsp[0].lex).loc, "out");
+ (yyval.interm.type).init((yyvsp[0].lex).loc);
+ // whether this is a parameter "out" or a pipeline "out" will get sorted out a bit later
+ (yyval.interm.type).qualifier.storage = EvqOut;
+ }
+#line 4682 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 150:
+#line 1182 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ parseContext.profileRequires((yyvsp[0].lex).loc, ENoProfile, 120, 0, "centroid");
+ parseContext.profileRequires((yyvsp[0].lex).loc, EEsProfile, 300, 0, "centroid");
+ parseContext.globalCheck((yyvsp[0].lex).loc, "centroid");
+ (yyval.interm.type).init((yyvsp[0].lex).loc);
+ (yyval.interm.type).qualifier.centroid = true;
+ }
+#line 4694 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 151:
+#line 1189 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ parseContext.globalCheck((yyvsp[0].lex).loc, "patch");
+ parseContext.requireStage((yyvsp[0].lex).loc, (EShLanguageMask)(EShLangTessControlMask | EShLangTessEvaluationMask), "patch");
+ (yyval.interm.type).init((yyvsp[0].lex).loc);
+ (yyval.interm.type).qualifier.patch = true;
+ }
+#line 4705 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 152:
+#line 1195 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ parseContext.globalCheck((yyvsp[0].lex).loc, "sample");
+ (yyval.interm.type).init((yyvsp[0].lex).loc);
+ (yyval.interm.type).qualifier.sample = true;
+ }
+#line 4715 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 153:
+#line 1200 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ parseContext.globalCheck((yyvsp[0].lex).loc, "uniform");
+ (yyval.interm.type).init((yyvsp[0].lex).loc);
+ (yyval.interm.type).qualifier.storage = EvqUniform;
+ }
+#line 4725 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 154:
+#line 1205 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ parseContext.globalCheck((yyvsp[0].lex).loc, "buffer");
+ (yyval.interm.type).init((yyvsp[0].lex).loc);
+ (yyval.interm.type).qualifier.storage = EvqBuffer;
+ }
+#line 4735 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 155:
+#line 1210 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ parseContext.profileRequires((yyvsp[0].lex).loc, ECoreProfile | ECompatibilityProfile, 430, E_GL_ARB_compute_shader, "shared");
+ parseContext.profileRequires((yyvsp[0].lex).loc, EEsProfile, 310, 0, "shared");
+ parseContext.requireStage((yyvsp[0].lex).loc, EShLangCompute, "shared");
+ (yyval.interm.type).init((yyvsp[0].lex).loc);
+ (yyval.interm.type).qualifier.storage = EvqShared;
+ }
+#line 4747 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 156:
+#line 1217 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm.type).init((yyvsp[0].lex).loc);
+ (yyval.interm.type).qualifier.coherent = true;
+ }
+#line 4756 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 157:
+#line 1221 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm.type).init((yyvsp[0].lex).loc);
+ (yyval.interm.type).qualifier.volatil = true;
+ }
+#line 4765 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 158:
+#line 1225 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm.type).init((yyvsp[0].lex).loc);
+ (yyval.interm.type).qualifier.restrict = true;
+ }
+#line 4774 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 159:
+#line 1229 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm.type).init((yyvsp[0].lex).loc);
+ (yyval.interm.type).qualifier.readonly = true;
+ }
+#line 4783 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 160:
+#line 1233 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm.type).init((yyvsp[0].lex).loc);
+ (yyval.interm.type).qualifier.writeonly = true;
+ }
+#line 4792 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 161:
+#line 1237 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ parseContext.spvRemoved((yyvsp[0].lex).loc, "subroutine");
+ parseContext.globalCheck((yyvsp[0].lex).loc, "subroutine");
+ (yyval.interm.type).init((yyvsp[0].lex).loc);
+ (yyval.interm.type).qualifier.storage = EvqUniform;
+ }
+#line 4803 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 162:
+#line 1243 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ parseContext.spvRemoved((yyvsp[-3].lex).loc, "subroutine");
+ parseContext.globalCheck((yyvsp[-3].lex).loc, "subroutine");
+ (yyval.interm.type).init((yyvsp[-3].lex).loc);
+ (yyval.interm.type).qualifier.storage = EvqUniform;
+ // TODO: 4.0 semantics: subroutines
+ // 1) make sure each identifier is a type declared earlier with SUBROUTINE
+ // 2) save all of the identifiers for future comparison with the declared function
+ }
+#line 4817 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 163:
+#line 1255 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ // TODO: 4.0 functionality: subroutine type to list
+ }
+#line 4825 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 164:
+#line 1258 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ }
+#line 4832 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 165:
+#line 1263 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm.type) = (yyvsp[0].interm.type);
+ (yyval.interm.type).qualifier.precision = parseContext.getDefaultPrecision((yyval.interm.type));
+ }
+#line 4841 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 166:
+#line 1267 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ parseContext.arrayDimCheck((yyvsp[0].interm).loc, (yyvsp[0].interm).arraySizes, 0);
+ (yyval.interm.type) = (yyvsp[-1].interm.type);
+ (yyval.interm.type).qualifier.precision = parseContext.getDefaultPrecision((yyval.interm.type));
+ (yyval.interm.type).arraySizes = (yyvsp[0].interm).arraySizes;
+ }
+#line 4852 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 167:
+#line 1276 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm).loc = (yyvsp[-1].lex).loc;
+ (yyval.interm).arraySizes = new TArraySizes;
+ (yyval.interm).arraySizes->addInnerSize();
+ }
+#line 4862 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 168:
+#line 1281 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm).loc = (yyvsp[-2].lex).loc;
+ (yyval.interm).arraySizes = new TArraySizes;
+
+ TArraySize size;
+ parseContext.arraySizeCheck((yyvsp[-1].interm.intermTypedNode)->getLoc(), (yyvsp[-1].interm.intermTypedNode), size);
+ (yyval.interm).arraySizes->addInnerSize(size);
+ }
+#line 4875 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 169:
+#line 1289 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm) = (yyvsp[-2].interm);
+ (yyval.interm).arraySizes->addInnerSize();
+ }
+#line 4884 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 170:
+#line 1293 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm) = (yyvsp[-3].interm);
+
+ TArraySize size;
+ parseContext.arraySizeCheck((yyvsp[-1].interm.intermTypedNode)->getLoc(), (yyvsp[-1].interm.intermTypedNode), size);
+ (yyval.interm).arraySizes->addInnerSize(size);
+ }
+#line 4896 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 171:
+#line 1303 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
+ (yyval.interm.type).basicType = EbtVoid;
+ }
+#line 4905 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 172:
+#line 1307 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
+ (yyval.interm.type).basicType = EbtFloat;
+ }
+#line 4914 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 173:
+#line 1311 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ parseContext.doubleCheck((yyvsp[0].lex).loc, "double");
+ (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
+ (yyval.interm.type).basicType = EbtDouble;
+ }
+#line 4924 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 174:
+#line 1316 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
+ (yyval.interm.type).basicType = EbtInt;
+ }
+#line 4933 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 175:
+#line 1320 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ parseContext.fullIntegerCheck((yyvsp[0].lex).loc, "unsigned integer");
+ (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
+ (yyval.interm.type).basicType = EbtUint;
+ }
+#line 4943 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 176:
+#line 1325 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ parseContext.int64Check((yyvsp[0].lex).loc, "64-bit integer", parseContext.symbolTable.atBuiltInLevel());
+ (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
+ (yyval.interm.type).basicType = EbtInt64;
+ }
+#line 4953 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 177:
+#line 1330 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ parseContext.int64Check((yyvsp[0].lex).loc, "64-bit unsigned integer", parseContext.symbolTable.atBuiltInLevel());
+ (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
+ (yyval.interm.type).basicType = EbtUint64;
+ }
+#line 4963 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 178:
+#line 1335 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
+ (yyval.interm.type).basicType = EbtBool;
+ }
+#line 4972 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 179:
+#line 1339 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
+ (yyval.interm.type).basicType = EbtFloat;
+ (yyval.interm.type).setVector(2);
+ }
+#line 4982 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 180:
+#line 1344 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
+ (yyval.interm.type).basicType = EbtFloat;
+ (yyval.interm.type).setVector(3);
+ }
+#line 4992 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 181:
+#line 1349 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
+ (yyval.interm.type).basicType = EbtFloat;
+ (yyval.interm.type).setVector(4);
+ }
+#line 5002 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 182:
+#line 1354 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ parseContext.doubleCheck((yyvsp[0].lex).loc, "double vector");
+ (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
+ (yyval.interm.type).basicType = EbtDouble;
+ (yyval.interm.type).setVector(2);
+ }
+#line 5013 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 183:
+#line 1360 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ parseContext.doubleCheck((yyvsp[0].lex).loc, "double vector");
+ (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
+ (yyval.interm.type).basicType = EbtDouble;
+ (yyval.interm.type).setVector(3);
+ }
+#line 5024 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 184:
+#line 1366 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ parseContext.doubleCheck((yyvsp[0].lex).loc, "double vector");
+ (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
+ (yyval.interm.type).basicType = EbtDouble;
+ (yyval.interm.type).setVector(4);
+ }
+#line 5035 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 185:
+#line 1372 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
+ (yyval.interm.type).basicType = EbtBool;
+ (yyval.interm.type).setVector(2);
+ }
+#line 5045 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 186:
+#line 1377 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
+ (yyval.interm.type).basicType = EbtBool;
+ (yyval.interm.type).setVector(3);
+ }
+#line 5055 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 187:
+#line 1382 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
+ (yyval.interm.type).basicType = EbtBool;
+ (yyval.interm.type).setVector(4);
+ }
+#line 5065 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 188:
+#line 1387 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
+ (yyval.interm.type).basicType = EbtInt;
+ (yyval.interm.type).setVector(2);
+ }
+#line 5075 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 189:
+#line 1392 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
+ (yyval.interm.type).basicType = EbtInt;
+ (yyval.interm.type).setVector(3);
+ }
+#line 5085 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 190:
+#line 1397 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
+ (yyval.interm.type).basicType = EbtInt;
+ (yyval.interm.type).setVector(4);
+ }
+#line 5095 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 191:
+#line 1402 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ parseContext.int64Check((yyvsp[0].lex).loc, "64-bit integer vector", parseContext.symbolTable.atBuiltInLevel());
+ (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
+ (yyval.interm.type).basicType = EbtInt64;
+ (yyval.interm.type).setVector(2);
+ }
+#line 5106 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 192:
+#line 1408 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ parseContext.int64Check((yyvsp[0].lex).loc, "64-bit integer vector", parseContext.symbolTable.atBuiltInLevel());
+ (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
+ (yyval.interm.type).basicType = EbtInt64;
+ (yyval.interm.type).setVector(3);
+ }
+#line 5117 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 193:
+#line 1414 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ parseContext.int64Check((yyvsp[0].lex).loc, "64-bit integer vector", parseContext.symbolTable.atBuiltInLevel());
+ (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
+ (yyval.interm.type).basicType = EbtInt64;
+ (yyval.interm.type).setVector(4);
+ }
+#line 5128 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 194:
+#line 1420 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ parseContext.fullIntegerCheck((yyvsp[0].lex).loc, "unsigned integer vector");
+ (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
+ (yyval.interm.type).basicType = EbtUint;
+ (yyval.interm.type).setVector(2);
+ }
+#line 5139 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 195:
+#line 1426 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ parseContext.fullIntegerCheck((yyvsp[0].lex).loc, "unsigned integer vector");
+ (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
+ (yyval.interm.type).basicType = EbtUint;
+ (yyval.interm.type).setVector(3);
+ }
+#line 5150 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 196:
+#line 1432 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ parseContext.fullIntegerCheck((yyvsp[0].lex).loc, "unsigned integer vector");
+ (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
+ (yyval.interm.type).basicType = EbtUint;
+ (yyval.interm.type).setVector(4);
+ }
+#line 5161 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 197:
+#line 1438 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ parseContext.int64Check((yyvsp[0].lex).loc, "64-bit unsigned integer vector", parseContext.symbolTable.atBuiltInLevel());
+ (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
+ (yyval.interm.type).basicType = EbtUint64;
+ (yyval.interm.type).setVector(2);
+ }
+#line 5172 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 198:
+#line 1444 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ parseContext.int64Check((yyvsp[0].lex).loc, "64-bit unsigned integer vector", parseContext.symbolTable.atBuiltInLevel());
+ (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
+ (yyval.interm.type).basicType = EbtUint64;
+ (yyval.interm.type).setVector(3);
+ }
+#line 5183 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 199:
+#line 1450 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ parseContext.int64Check((yyvsp[0].lex).loc, "64-bit unsigned integer vector", parseContext.symbolTable.atBuiltInLevel());
+ (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
+ (yyval.interm.type).basicType = EbtUint64;
+ (yyval.interm.type).setVector(4);
+ }
+#line 5194 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 200:
+#line 1456 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
+ (yyval.interm.type).basicType = EbtFloat;
+ (yyval.interm.type).setMatrix(2, 2);
+ }
+#line 5204 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 201:
+#line 1461 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
+ (yyval.interm.type).basicType = EbtFloat;
+ (yyval.interm.type).setMatrix(3, 3);
+ }
+#line 5214 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 202:
+#line 1466 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
+ (yyval.interm.type).basicType = EbtFloat;
+ (yyval.interm.type).setMatrix(4, 4);
+ }
+#line 5224 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 203:
+#line 1471 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
+ (yyval.interm.type).basicType = EbtFloat;
+ (yyval.interm.type).setMatrix(2, 2);
+ }
+#line 5234 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 204:
+#line 1476 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
+ (yyval.interm.type).basicType = EbtFloat;
+ (yyval.interm.type).setMatrix(2, 3);
+ }
+#line 5244 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 205:
+#line 1481 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
+ (yyval.interm.type).basicType = EbtFloat;
+ (yyval.interm.type).setMatrix(2, 4);
+ }
+#line 5254 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 206:
+#line 1486 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
+ (yyval.interm.type).basicType = EbtFloat;
+ (yyval.interm.type).setMatrix(3, 2);
+ }
+#line 5264 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 207:
+#line 1491 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
+ (yyval.interm.type).basicType = EbtFloat;
+ (yyval.interm.type).setMatrix(3, 3);
+ }
+#line 5274 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 208:
+#line 1496 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
+ (yyval.interm.type).basicType = EbtFloat;
+ (yyval.interm.type).setMatrix(3, 4);
+ }
+#line 5284 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 209:
+#line 1501 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
+ (yyval.interm.type).basicType = EbtFloat;
+ (yyval.interm.type).setMatrix(4, 2);
+ }
+#line 5294 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 210:
+#line 1506 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
+ (yyval.interm.type).basicType = EbtFloat;
+ (yyval.interm.type).setMatrix(4, 3);
+ }
+#line 5304 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 211:
+#line 1511 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
+ (yyval.interm.type).basicType = EbtFloat;
+ (yyval.interm.type).setMatrix(4, 4);
+ }
+#line 5314 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 212:
+#line 1516 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ parseContext.doubleCheck((yyvsp[0].lex).loc, "double matrix");
+ (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
+ (yyval.interm.type).basicType = EbtDouble;
+ (yyval.interm.type).setMatrix(2, 2);
+ }
+#line 5325 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 213:
+#line 1522 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ parseContext.doubleCheck((yyvsp[0].lex).loc, "double matrix");
+ (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
+ (yyval.interm.type).basicType = EbtDouble;
+ (yyval.interm.type).setMatrix(3, 3);
+ }
+#line 5336 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 214:
+#line 1528 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ parseContext.doubleCheck((yyvsp[0].lex).loc, "double matrix");
+ (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
+ (yyval.interm.type).basicType = EbtDouble;
+ (yyval.interm.type).setMatrix(4, 4);
+ }
+#line 5347 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 215:
+#line 1534 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ parseContext.doubleCheck((yyvsp[0].lex).loc, "double matrix");
+ (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
+ (yyval.interm.type).basicType = EbtDouble;
+ (yyval.interm.type).setMatrix(2, 2);
+ }
+#line 5358 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 216:
+#line 1540 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ parseContext.doubleCheck((yyvsp[0].lex).loc, "double matrix");
+ (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
+ (yyval.interm.type).basicType = EbtDouble;
+ (yyval.interm.type).setMatrix(2, 3);
+ }
+#line 5369 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 217:
+#line 1546 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ parseContext.doubleCheck((yyvsp[0].lex).loc, "double matrix");
+ (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
+ (yyval.interm.type).basicType = EbtDouble;
+ (yyval.interm.type).setMatrix(2, 4);
+ }
+#line 5380 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 218:
+#line 1552 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ parseContext.doubleCheck((yyvsp[0].lex).loc, "double matrix");
+ (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
+ (yyval.interm.type).basicType = EbtDouble;
+ (yyval.interm.type).setMatrix(3, 2);
+ }
+#line 5391 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 219:
+#line 1558 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ parseContext.doubleCheck((yyvsp[0].lex).loc, "double matrix");
+ (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
+ (yyval.interm.type).basicType = EbtDouble;
+ (yyval.interm.type).setMatrix(3, 3);
+ }
+#line 5402 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 220:
+#line 1564 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ parseContext.doubleCheck((yyvsp[0].lex).loc, "double matrix");
+ (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
+ (yyval.interm.type).basicType = EbtDouble;
+ (yyval.interm.type).setMatrix(3, 4);
+ }
+#line 5413 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 221:
+#line 1570 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ parseContext.doubleCheck((yyvsp[0].lex).loc, "double matrix");
+ (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
+ (yyval.interm.type).basicType = EbtDouble;
+ (yyval.interm.type).setMatrix(4, 2);
+ }
+#line 5424 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 222:
+#line 1576 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ parseContext.doubleCheck((yyvsp[0].lex).loc, "double matrix");
+ (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
+ (yyval.interm.type).basicType = EbtDouble;
+ (yyval.interm.type).setMatrix(4, 3);
+ }
+#line 5435 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 223:
+#line 1582 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ parseContext.doubleCheck((yyvsp[0].lex).loc, "double matrix");
+ (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
+ (yyval.interm.type).basicType = EbtDouble;
+ (yyval.interm.type).setMatrix(4, 4);
+ }
+#line 5446 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 224:
+#line 1588 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ parseContext.vulkanRemoved((yyvsp[0].lex).loc, "atomic counter types");
+ (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
+ (yyval.interm.type).basicType = EbtAtomicUint;
+ }
+#line 5456 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 225:
+#line 1593 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
+ (yyval.interm.type).basicType = EbtSampler;
+ (yyval.interm.type).sampler.set(EbtFloat, Esd1D);
+ }
+#line 5466 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 226:
+#line 1598 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
+ (yyval.interm.type).basicType = EbtSampler;
+ (yyval.interm.type).sampler.set(EbtFloat, Esd2D);
+ }
+#line 5476 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 227:
+#line 1603 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
+ (yyval.interm.type).basicType = EbtSampler;
+ (yyval.interm.type).sampler.set(EbtFloat, Esd3D);
+ }
+#line 5486 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 228:
+#line 1608 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
+ (yyval.interm.type).basicType = EbtSampler;
+ (yyval.interm.type).sampler.set(EbtFloat, EsdCube);
+ }
+#line 5496 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 229:
+#line 1613 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
+ (yyval.interm.type).basicType = EbtSampler;
+ (yyval.interm.type).sampler.set(EbtFloat, Esd1D, false, true);
+ }
+#line 5506 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 230:
+#line 1618 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
+ (yyval.interm.type).basicType = EbtSampler;
+ (yyval.interm.type).sampler.set(EbtFloat, Esd2D, false, true);
+ }
+#line 5516 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 231:
+#line 1623 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
+ (yyval.interm.type).basicType = EbtSampler;
+ (yyval.interm.type).sampler.set(EbtFloat, EsdCube, false, true);
+ }
+#line 5526 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 232:
+#line 1628 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
+ (yyval.interm.type).basicType = EbtSampler;
+ (yyval.interm.type).sampler.set(EbtFloat, Esd1D, true);
+ }
+#line 5536 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 233:
+#line 1633 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
+ (yyval.interm.type).basicType = EbtSampler;
+ (yyval.interm.type).sampler.set(EbtFloat, Esd2D, true);
+ }
+#line 5546 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 234:
+#line 1638 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
+ (yyval.interm.type).basicType = EbtSampler;
+ (yyval.interm.type).sampler.set(EbtFloat, Esd1D, true, true);
+ }
+#line 5556 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 235:
+#line 1643 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
+ (yyval.interm.type).basicType = EbtSampler;
+ (yyval.interm.type).sampler.set(EbtFloat, Esd2D, true, true);
+ }
+#line 5566 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 236:
+#line 1648 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
+ (yyval.interm.type).basicType = EbtSampler;
+ (yyval.interm.type).sampler.set(EbtFloat, EsdCube, true);
+ }
+#line 5576 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 237:
+#line 1653 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
+ (yyval.interm.type).basicType = EbtSampler;
+ (yyval.interm.type).sampler.set(EbtFloat, EsdCube, true, true);
+ }
+#line 5586 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 238:
+#line 1658 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
+ (yyval.interm.type).basicType = EbtSampler;
+ (yyval.interm.type).sampler.set(EbtInt, Esd1D);
+ }
+#line 5596 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 239:
+#line 1663 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
+ (yyval.interm.type).basicType = EbtSampler;
+ (yyval.interm.type).sampler.set(EbtInt, Esd2D);
+ }
+#line 5606 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 240:
+#line 1668 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
+ (yyval.interm.type).basicType = EbtSampler;
+ (yyval.interm.type).sampler.set(EbtInt, Esd3D);
+ }
+#line 5616 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 241:
+#line 1673 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
+ (yyval.interm.type).basicType = EbtSampler;
+ (yyval.interm.type).sampler.set(EbtInt, EsdCube);
+ }
+#line 5626 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 242:
+#line 1678 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
+ (yyval.interm.type).basicType = EbtSampler;
+ (yyval.interm.type).sampler.set(EbtInt, Esd1D, true);
+ }
+#line 5636 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 243:
+#line 1683 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
+ (yyval.interm.type).basicType = EbtSampler;
+ (yyval.interm.type).sampler.set(EbtInt, Esd2D, true);
+ }
+#line 5646 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 244:
+#line 1688 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
+ (yyval.interm.type).basicType = EbtSampler;
+ (yyval.interm.type).sampler.set(EbtInt, EsdCube, true);
+ }
+#line 5656 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 245:
+#line 1693 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
+ (yyval.interm.type).basicType = EbtSampler;
+ (yyval.interm.type).sampler.set(EbtUint, Esd1D);
+ }
+#line 5666 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 246:
+#line 1698 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
+ (yyval.interm.type).basicType = EbtSampler;
+ (yyval.interm.type).sampler.set(EbtUint, Esd2D);
+ }
+#line 5676 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 247:
+#line 1703 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
+ (yyval.interm.type).basicType = EbtSampler;
+ (yyval.interm.type).sampler.set(EbtUint, Esd3D);
+ }
+#line 5686 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 248:
+#line 1708 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
+ (yyval.interm.type).basicType = EbtSampler;
+ (yyval.interm.type).sampler.set(EbtUint, EsdCube);
+ }
+#line 5696 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 249:
+#line 1713 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
+ (yyval.interm.type).basicType = EbtSampler;
+ (yyval.interm.type).sampler.set(EbtUint, Esd1D, true);
+ }
+#line 5706 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 250:
+#line 1718 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
+ (yyval.interm.type).basicType = EbtSampler;
+ (yyval.interm.type).sampler.set(EbtUint, Esd2D, true);
+ }
+#line 5716 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 251:
+#line 1723 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
+ (yyval.interm.type).basicType = EbtSampler;
+ (yyval.interm.type).sampler.set(EbtUint, EsdCube, true);
+ }
+#line 5726 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 252:
+#line 1728 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
+ (yyval.interm.type).basicType = EbtSampler;
+ (yyval.interm.type).sampler.set(EbtFloat, EsdRect);
+ }
+#line 5736 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 253:
+#line 1733 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
+ (yyval.interm.type).basicType = EbtSampler;
+ (yyval.interm.type).sampler.set(EbtFloat, EsdRect, false, true);
+ }
+#line 5746 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 254:
+#line 1738 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
+ (yyval.interm.type).basicType = EbtSampler;
+ (yyval.interm.type).sampler.set(EbtInt, EsdRect);
+ }
+#line 5756 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 255:
+#line 1743 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
+ (yyval.interm.type).basicType = EbtSampler;
+ (yyval.interm.type).sampler.set(EbtUint, EsdRect);
+ }
+#line 5766 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 256:
+#line 1748 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
+ (yyval.interm.type).basicType = EbtSampler;
+ (yyval.interm.type).sampler.set(EbtFloat, EsdBuffer);
+ }
+#line 5776 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 257:
+#line 1753 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
+ (yyval.interm.type).basicType = EbtSampler;
+ (yyval.interm.type).sampler.set(EbtInt, EsdBuffer);
+ }
+#line 5786 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 258:
+#line 1758 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
+ (yyval.interm.type).basicType = EbtSampler;
+ (yyval.interm.type).sampler.set(EbtUint, EsdBuffer);
+ }
+#line 5796 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 259:
+#line 1763 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
+ (yyval.interm.type).basicType = EbtSampler;
+ (yyval.interm.type).sampler.set(EbtFloat, Esd2D, false, false, true);
+ }
+#line 5806 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 260:
+#line 1768 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
+ (yyval.interm.type).basicType = EbtSampler;
+ (yyval.interm.type).sampler.set(EbtInt, Esd2D, false, false, true);
+ }
+#line 5816 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 261:
+#line 1773 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
+ (yyval.interm.type).basicType = EbtSampler;
+ (yyval.interm.type).sampler.set(EbtUint, Esd2D, false, false, true);
+ }
+#line 5826 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 262:
+#line 1778 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
+ (yyval.interm.type).basicType = EbtSampler;
+ (yyval.interm.type).sampler.set(EbtFloat, Esd2D, true, false, true);
+ }
+#line 5836 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 263:
+#line 1783 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
+ (yyval.interm.type).basicType = EbtSampler;
+ (yyval.interm.type).sampler.set(EbtInt, Esd2D, true, false, true);
+ }
+#line 5846 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 264:
+#line 1788 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
+ (yyval.interm.type).basicType = EbtSampler;
+ (yyval.interm.type).sampler.set(EbtUint, Esd2D, true, false, true);
+ }
+#line 5856 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 265:
+#line 1793 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
+ (yyval.interm.type).basicType = EbtSampler;
+ (yyval.interm.type).sampler.setPureSampler(false);
+ }
+#line 5866 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 266:
+#line 1798 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
+ (yyval.interm.type).basicType = EbtSampler;
+ (yyval.interm.type).sampler.setPureSampler(true);
+ }
+#line 5876 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 267:
+#line 1803 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
+ (yyval.interm.type).basicType = EbtSampler;
+ (yyval.interm.type).sampler.setTexture(EbtFloat, Esd1D);
+ }
+#line 5886 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 268:
+#line 1808 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
+ (yyval.interm.type).basicType = EbtSampler;
+ (yyval.interm.type).sampler.setTexture(EbtFloat, Esd2D);
+ }
+#line 5896 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 269:
+#line 1813 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
+ (yyval.interm.type).basicType = EbtSampler;
+ (yyval.interm.type).sampler.setTexture(EbtFloat, Esd3D);
+ }
+#line 5906 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 270:
+#line 1818 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
+ (yyval.interm.type).basicType = EbtSampler;
+ (yyval.interm.type).sampler.setTexture(EbtFloat, EsdCube);
+ }
+#line 5916 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 271:
+#line 1823 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
+ (yyval.interm.type).basicType = EbtSampler;
+ (yyval.interm.type).sampler.setTexture(EbtFloat, Esd1D, true);
+ }
+#line 5926 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 272:
+#line 1828 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
+ (yyval.interm.type).basicType = EbtSampler;
+ (yyval.interm.type).sampler.setTexture(EbtFloat, Esd2D, true);
+ }
+#line 5936 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 273:
+#line 1833 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
+ (yyval.interm.type).basicType = EbtSampler;
+ (yyval.interm.type).sampler.setTexture(EbtFloat, EsdCube, true);
+ }
+#line 5946 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 274:
+#line 1838 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
+ (yyval.interm.type).basicType = EbtSampler;
+ (yyval.interm.type).sampler.setTexture(EbtInt, Esd1D);
+ }
+#line 5956 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 275:
+#line 1843 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
+ (yyval.interm.type).basicType = EbtSampler;
+ (yyval.interm.type).sampler.setTexture(EbtInt, Esd2D);
+ }
+#line 5966 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 276:
+#line 1848 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
+ (yyval.interm.type).basicType = EbtSampler;
+ (yyval.interm.type).sampler.setTexture(EbtInt, Esd3D);
+ }
+#line 5976 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 277:
+#line 1853 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
+ (yyval.interm.type).basicType = EbtSampler;
+ (yyval.interm.type).sampler.setTexture(EbtInt, EsdCube);
+ }
+#line 5986 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 278:
+#line 1858 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
+ (yyval.interm.type).basicType = EbtSampler;
+ (yyval.interm.type).sampler.setTexture(EbtInt, Esd1D, true);
+ }
+#line 5996 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 279:
+#line 1863 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
+ (yyval.interm.type).basicType = EbtSampler;
+ (yyval.interm.type).sampler.setTexture(EbtInt, Esd2D, true);
+ }
+#line 6006 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 280:
+#line 1868 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
+ (yyval.interm.type).basicType = EbtSampler;
+ (yyval.interm.type).sampler.setTexture(EbtInt, EsdCube, true);
+ }
+#line 6016 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 281:
+#line 1873 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
+ (yyval.interm.type).basicType = EbtSampler;
+ (yyval.interm.type).sampler.setTexture(EbtUint, Esd1D);
+ }
+#line 6026 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 282:
+#line 1878 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
+ (yyval.interm.type).basicType = EbtSampler;
+ (yyval.interm.type).sampler.setTexture(EbtUint, Esd2D);
+ }
+#line 6036 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 283:
+#line 1883 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
+ (yyval.interm.type).basicType = EbtSampler;
+ (yyval.interm.type).sampler.setTexture(EbtUint, Esd3D);
+ }
+#line 6046 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 284:
+#line 1888 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
+ (yyval.interm.type).basicType = EbtSampler;
+ (yyval.interm.type).sampler.setTexture(EbtUint, EsdCube);
+ }
+#line 6056 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 285:
+#line 1893 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
+ (yyval.interm.type).basicType = EbtSampler;
+ (yyval.interm.type).sampler.setTexture(EbtUint, Esd1D, true);
+ }
+#line 6066 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 286:
+#line 1898 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
+ (yyval.interm.type).basicType = EbtSampler;
+ (yyval.interm.type).sampler.setTexture(EbtUint, Esd2D, true);
+ }
+#line 6076 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 287:
+#line 1903 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
+ (yyval.interm.type).basicType = EbtSampler;
+ (yyval.interm.type).sampler.setTexture(EbtUint, EsdCube, true);
+ }
+#line 6086 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 288:
+#line 1908 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
+ (yyval.interm.type).basicType = EbtSampler;
+ (yyval.interm.type).sampler.setTexture(EbtFloat, EsdRect);
+ }
+#line 6096 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 289:
+#line 1913 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
+ (yyval.interm.type).basicType = EbtSampler;
+ (yyval.interm.type).sampler.setTexture(EbtInt, EsdRect);
+ }
+#line 6106 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 290:
+#line 1918 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
+ (yyval.interm.type).basicType = EbtSampler;
+ (yyval.interm.type).sampler.setTexture(EbtUint, EsdRect);
+ }
+#line 6116 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 291:
+#line 1923 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
+ (yyval.interm.type).basicType = EbtSampler;
+ (yyval.interm.type).sampler.setTexture(EbtFloat, EsdBuffer);
+ }
+#line 6126 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 292:
+#line 1928 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
+ (yyval.interm.type).basicType = EbtSampler;
+ (yyval.interm.type).sampler.setTexture(EbtInt, EsdBuffer);
+ }
+#line 6136 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 293:
+#line 1933 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
+ (yyval.interm.type).basicType = EbtSampler;
+ (yyval.interm.type).sampler.setTexture(EbtUint, EsdBuffer);
+ }
+#line 6146 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 294:
+#line 1938 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
+ (yyval.interm.type).basicType = EbtSampler;
+ (yyval.interm.type).sampler.setTexture(EbtFloat, Esd2D, false, false, true);
+ }
+#line 6156 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 295:
+#line 1943 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
+ (yyval.interm.type).basicType = EbtSampler;
+ (yyval.interm.type).sampler.setTexture(EbtInt, Esd2D, false, false, true);
+ }
+#line 6166 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 296:
+#line 1948 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
+ (yyval.interm.type).basicType = EbtSampler;
+ (yyval.interm.type).sampler.setTexture(EbtUint, Esd2D, false, false, true);
+ }
+#line 6176 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 297:
+#line 1953 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
+ (yyval.interm.type).basicType = EbtSampler;
+ (yyval.interm.type).sampler.setTexture(EbtFloat, Esd2D, true, false, true);
+ }
+#line 6186 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 298:
+#line 1958 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
+ (yyval.interm.type).basicType = EbtSampler;
+ (yyval.interm.type).sampler.setTexture(EbtInt, Esd2D, true, false, true);
+ }
+#line 6196 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 299:
+#line 1963 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
+ (yyval.interm.type).basicType = EbtSampler;
+ (yyval.interm.type).sampler.setTexture(EbtUint, Esd2D, true, false, true);
+ }
+#line 6206 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 300:
+#line 1968 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
+ (yyval.interm.type).basicType = EbtSampler;
+ (yyval.interm.type).sampler.setImage(EbtFloat, Esd1D);
+ }
+#line 6216 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 301:
+#line 1973 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
+ (yyval.interm.type).basicType = EbtSampler;
+ (yyval.interm.type).sampler.setImage(EbtInt, Esd1D);
+ }
+#line 6226 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 302:
+#line 1978 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
+ (yyval.interm.type).basicType = EbtSampler;
+ (yyval.interm.type).sampler.setImage(EbtUint, Esd1D);
+ }
+#line 6236 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 303:
+#line 1983 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
+ (yyval.interm.type).basicType = EbtSampler;
+ (yyval.interm.type).sampler.setImage(EbtFloat, Esd2D);
+ }
+#line 6246 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 304:
+#line 1988 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
+ (yyval.interm.type).basicType = EbtSampler;
+ (yyval.interm.type).sampler.setImage(EbtInt, Esd2D);
+ }
+#line 6256 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 305:
+#line 1993 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
+ (yyval.interm.type).basicType = EbtSampler;
+ (yyval.interm.type).sampler.setImage(EbtUint, Esd2D);
+ }
+#line 6266 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 306:
+#line 1998 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
+ (yyval.interm.type).basicType = EbtSampler;
+ (yyval.interm.type).sampler.setImage(EbtFloat, Esd3D);
+ }
+#line 6276 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 307:
+#line 2003 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
+ (yyval.interm.type).basicType = EbtSampler;
+ (yyval.interm.type).sampler.setImage(EbtInt, Esd3D);
+ }
+#line 6286 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 308:
+#line 2008 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
+ (yyval.interm.type).basicType = EbtSampler;
+ (yyval.interm.type).sampler.setImage(EbtUint, Esd3D);
+ }
+#line 6296 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 309:
+#line 2013 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
+ (yyval.interm.type).basicType = EbtSampler;
+ (yyval.interm.type).sampler.setImage(EbtFloat, EsdRect);
+ }
+#line 6306 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 310:
+#line 2018 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
+ (yyval.interm.type).basicType = EbtSampler;
+ (yyval.interm.type).sampler.setImage(EbtInt, EsdRect);
+ }
+#line 6316 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 311:
+#line 2023 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
+ (yyval.interm.type).basicType = EbtSampler;
+ (yyval.interm.type).sampler.setImage(EbtUint, EsdRect);
+ }
+#line 6326 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 312:
+#line 2028 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
+ (yyval.interm.type).basicType = EbtSampler;
+ (yyval.interm.type).sampler.setImage(EbtFloat, EsdCube);
+ }
+#line 6336 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 313:
+#line 2033 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
+ (yyval.interm.type).basicType = EbtSampler;
+ (yyval.interm.type).sampler.setImage(EbtInt, EsdCube);
+ }
+#line 6346 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 314:
+#line 2038 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
+ (yyval.interm.type).basicType = EbtSampler;
+ (yyval.interm.type).sampler.setImage(EbtUint, EsdCube);
+ }
+#line 6356 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 315:
+#line 2043 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
+ (yyval.interm.type).basicType = EbtSampler;
+ (yyval.interm.type).sampler.setImage(EbtFloat, EsdBuffer);
+ }
+#line 6366 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 316:
+#line 2048 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
+ (yyval.interm.type).basicType = EbtSampler;
+ (yyval.interm.type).sampler.setImage(EbtInt, EsdBuffer);
+ }
+#line 6376 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 317:
+#line 2053 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
+ (yyval.interm.type).basicType = EbtSampler;
+ (yyval.interm.type).sampler.setImage(EbtUint, EsdBuffer);
+ }
+#line 6386 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 318:
+#line 2058 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
+ (yyval.interm.type).basicType = EbtSampler;
+ (yyval.interm.type).sampler.setImage(EbtFloat, Esd1D, true);
+ }
+#line 6396 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 319:
+#line 2063 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
+ (yyval.interm.type).basicType = EbtSampler;
+ (yyval.interm.type).sampler.setImage(EbtInt, Esd1D, true);
+ }
+#line 6406 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 320:
+#line 2068 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
+ (yyval.interm.type).basicType = EbtSampler;
+ (yyval.interm.type).sampler.setImage(EbtUint, Esd1D, true);
+ }
+#line 6416 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 321:
+#line 2073 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
+ (yyval.interm.type).basicType = EbtSampler;
+ (yyval.interm.type).sampler.setImage(EbtFloat, Esd2D, true);
+ }
+#line 6426 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 322:
+#line 2078 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
+ (yyval.interm.type).basicType = EbtSampler;
+ (yyval.interm.type).sampler.setImage(EbtInt, Esd2D, true);
+ }
+#line 6436 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 323:
+#line 2083 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
+ (yyval.interm.type).basicType = EbtSampler;
+ (yyval.interm.type).sampler.setImage(EbtUint, Esd2D, true);
+ }
+#line 6446 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 324:
+#line 2088 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
+ (yyval.interm.type).basicType = EbtSampler;
+ (yyval.interm.type).sampler.setImage(EbtFloat, EsdCube, true);
+ }
+#line 6456 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 325:
+#line 2093 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
+ (yyval.interm.type).basicType = EbtSampler;
+ (yyval.interm.type).sampler.setImage(EbtInt, EsdCube, true);
+ }
+#line 6466 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 326:
+#line 2098 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
+ (yyval.interm.type).basicType = EbtSampler;
+ (yyval.interm.type).sampler.setImage(EbtUint, EsdCube, true);
+ }
+#line 6476 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 327:
+#line 2103 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
+ (yyval.interm.type).basicType = EbtSampler;
+ (yyval.interm.type).sampler.setImage(EbtFloat, Esd2D, false, false, true);
+ }
+#line 6486 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 328:
+#line 2108 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
+ (yyval.interm.type).basicType = EbtSampler;
+ (yyval.interm.type).sampler.setImage(EbtInt, Esd2D, false, false, true);
+ }
+#line 6496 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 329:
+#line 2113 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
+ (yyval.interm.type).basicType = EbtSampler;
+ (yyval.interm.type).sampler.setImage(EbtUint, Esd2D, false, false, true);
+ }
+#line 6506 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 330:
+#line 2118 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
+ (yyval.interm.type).basicType = EbtSampler;
+ (yyval.interm.type).sampler.setImage(EbtFloat, Esd2D, true, false, true);
+ }
+#line 6516 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 331:
+#line 2123 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
+ (yyval.interm.type).basicType = EbtSampler;
+ (yyval.interm.type).sampler.setImage(EbtInt, Esd2D, true, false, true);
+ }
+#line 6526 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 332:
+#line 2128 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
+ (yyval.interm.type).basicType = EbtSampler;
+ (yyval.interm.type).sampler.setImage(EbtUint, Esd2D, true, false, true);
+ }
+#line 6536 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 333:
+#line 2133 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ { // GL_OES_EGL_image_external
+ (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
+ (yyval.interm.type).basicType = EbtSampler;
+ (yyval.interm.type).sampler.set(EbtFloat, Esd2D);
+ (yyval.interm.type).sampler.external = true;
+ }
+#line 6547 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 334:
+#line 2139 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ parseContext.requireStage((yyvsp[0].lex).loc, EShLangFragment, "subpass input");
+ (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
+ (yyval.interm.type).basicType = EbtSampler;
+ (yyval.interm.type).sampler.setSubpass(EbtFloat);
+ }
+#line 6558 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 335:
+#line 2145 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ parseContext.requireStage((yyvsp[0].lex).loc, EShLangFragment, "subpass input");
+ (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
+ (yyval.interm.type).basicType = EbtSampler;
+ (yyval.interm.type).sampler.setSubpass(EbtFloat, true);
+ }
+#line 6569 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 336:
+#line 2151 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ parseContext.requireStage((yyvsp[0].lex).loc, EShLangFragment, "subpass input");
+ (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
+ (yyval.interm.type).basicType = EbtSampler;
+ (yyval.interm.type).sampler.setSubpass(EbtInt);
+ }
+#line 6580 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 337:
+#line 2157 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ parseContext.requireStage((yyvsp[0].lex).loc, EShLangFragment, "subpass input");
+ (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
+ (yyval.interm.type).basicType = EbtSampler;
+ (yyval.interm.type).sampler.setSubpass(EbtInt, true);
+ }
+#line 6591 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 338:
+#line 2163 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ parseContext.requireStage((yyvsp[0].lex).loc, EShLangFragment, "subpass input");
+ (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
+ (yyval.interm.type).basicType = EbtSampler;
+ (yyval.interm.type).sampler.setSubpass(EbtUint);
+ }
+#line 6602 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 339:
+#line 2169 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ parseContext.requireStage((yyvsp[0].lex).loc, EShLangFragment, "subpass input");
+ (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
+ (yyval.interm.type).basicType = EbtSampler;
+ (yyval.interm.type).sampler.setSubpass(EbtUint, true);
+ }
+#line 6613 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 340:
+#line 2175 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm.type) = (yyvsp[0].interm.type);
+ (yyval.interm.type).qualifier.storage = parseContext.symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
+ parseContext.structTypeCheck((yyval.interm.type).loc, (yyval.interm.type));
+ }
+#line 6623 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 341:
+#line 2180 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ //
+ // This is for user defined type names. The lexical phase looked up the
+ // type.
+ //
+ if (const TVariable* variable = ((yyvsp[0].lex).symbol)->getAsVariable()) {
+ const TType& structure = variable->getType();
+ (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
+ (yyval.interm.type).basicType = EbtStruct;
+ (yyval.interm.type).userDef = &structure;
+ } else
+ parseContext.error((yyvsp[0].lex).loc, "expected type name", (yyvsp[0].lex).string->c_str(), "");
+ }
+#line 6641 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 342:
+#line 2196 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ parseContext.profileRequires((yyvsp[0].lex).loc, ENoProfile, 130, 0, "highp precision qualifier");
+ (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
+ if (parseContext.profile == EEsProfile)
+ (yyval.interm.type).qualifier.precision = EpqHigh;
+ }
+#line 6652 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 343:
+#line 2202 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ parseContext.profileRequires((yyvsp[0].lex).loc, ENoProfile, 130, 0, "mediump precision qualifier");
+ (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
+ if (parseContext.profile == EEsProfile)
+ (yyval.interm.type).qualifier.precision = EpqMedium;
+ }
+#line 6663 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 344:
+#line 2208 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ parseContext.profileRequires((yyvsp[0].lex).loc, ENoProfile, 130, 0, "lowp precision qualifier");
+ (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
+ if (parseContext.profile == EEsProfile)
+ (yyval.interm.type).qualifier.precision = EpqLow;
+ }
+#line 6674 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 345:
+#line 2217 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ { parseContext.nestedStructCheck((yyvsp[-2].lex).loc); }
+#line 6680 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 346:
+#line 2217 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ TType* structure = new TType((yyvsp[-1].interm.typeList), *(yyvsp[-4].lex).string);
+ parseContext.structArrayCheck((yyvsp[-4].lex).loc, *structure);
+ TVariable* userTypeDef = new TVariable((yyvsp[-4].lex).string, *structure, true);
+ if (! parseContext.symbolTable.insert(*userTypeDef))
+ parseContext.error((yyvsp[-4].lex).loc, "redefinition", (yyvsp[-4].lex).string->c_str(), "struct");
+ (yyval.interm.type).init((yyvsp[-5].lex).loc);
+ (yyval.interm.type).basicType = EbtStruct;
+ (yyval.interm.type).userDef = structure;
+ --parseContext.structNestingLevel;
+ }
+#line 6696 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 347:
+#line 2228 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ { parseContext.nestedStructCheck((yyvsp[-1].lex).loc); }
+#line 6702 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 348:
+#line 2228 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ TType* structure = new TType((yyvsp[-1].interm.typeList), TString(""));
+ (yyval.interm.type).init((yyvsp[-4].lex).loc);
+ (yyval.interm.type).basicType = EbtStruct;
+ (yyval.interm.type).userDef = structure;
+ --parseContext.structNestingLevel;
+ }
+#line 6714 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 349:
+#line 2238 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm.typeList) = (yyvsp[0].interm.typeList);
+ }
+#line 6722 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 350:
+#line 2241 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm.typeList) = (yyvsp[-1].interm.typeList);
+ for (unsigned int i = 0; i < (yyvsp[0].interm.typeList)->size(); ++i) {
+ for (unsigned int j = 0; j < (yyval.interm.typeList)->size(); ++j) {
+ if ((*(yyval.interm.typeList))[j].type->getFieldName() == (*(yyvsp[0].interm.typeList))[i].type->getFieldName())
+ parseContext.error((*(yyvsp[0].interm.typeList))[i].loc, "duplicate member name:", "", (*(yyvsp[0].interm.typeList))[i].type->getFieldName().c_str());
+ }
+ (yyval.interm.typeList)->push_back((*(yyvsp[0].interm.typeList))[i]);
+ }
+ }
+#line 6737 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 351:
+#line 2254 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ if ((yyvsp[-2].interm.type).arraySizes) {
+ parseContext.profileRequires((yyvsp[-2].interm.type).loc, ENoProfile, 120, E_GL_3DL_array_objects, "arrayed type");
+ parseContext.profileRequires((yyvsp[-2].interm.type).loc, EEsProfile, 300, 0, "arrayed type");
+ if (parseContext.profile == EEsProfile)
+ parseContext.arraySizeRequiredCheck((yyvsp[-2].interm.type).loc, *(yyvsp[-2].interm.type).arraySizes);
+ }
+
+ (yyval.interm.typeList) = (yyvsp[-1].interm.typeList);
+
+ parseContext.voidErrorCheck((yyvsp[-2].interm.type).loc, (*(yyvsp[-1].interm.typeList))[0].type->getFieldName(), (yyvsp[-2].interm.type).basicType);
+ parseContext.precisionQualifierCheck((yyvsp[-2].interm.type).loc, (yyvsp[-2].interm.type).basicType, (yyvsp[-2].interm.type).qualifier);
+
+ for (unsigned int i = 0; i < (yyval.interm.typeList)->size(); ++i) {
+ parseContext.arrayDimCheck((yyvsp[-2].interm.type).loc, (*(yyval.interm.typeList))[i].type, (yyvsp[-2].interm.type).arraySizes);
+ (*(yyval.interm.typeList))[i].type->mergeType((yyvsp[-2].interm.type));
+ }
+ }
+#line 6760 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 352:
+#line 2272 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ parseContext.globalQualifierFixCheck((yyvsp[-3].interm.type).loc, (yyvsp[-3].interm.type).qualifier);
+ if ((yyvsp[-2].interm.type).arraySizes) {
+ parseContext.profileRequires((yyvsp[-2].interm.type).loc, ENoProfile, 120, E_GL_3DL_array_objects, "arrayed type");
+ parseContext.profileRequires((yyvsp[-2].interm.type).loc, EEsProfile, 300, 0, "arrayed type");
+ if (parseContext.profile == EEsProfile)
+ parseContext.arraySizeRequiredCheck((yyvsp[-2].interm.type).loc, *(yyvsp[-2].interm.type).arraySizes);
+ }
+
+ (yyval.interm.typeList) = (yyvsp[-1].interm.typeList);
+
+ parseContext.checkNoShaderLayouts((yyvsp[-3].interm.type).loc, (yyvsp[-3].interm.type).shaderQualifiers);
+ parseContext.voidErrorCheck((yyvsp[-2].interm.type).loc, (*(yyvsp[-1].interm.typeList))[0].type->getFieldName(), (yyvsp[-2].interm.type).basicType);
+ parseContext.mergeQualifiers((yyvsp[-2].interm.type).loc, (yyvsp[-2].interm.type).qualifier, (yyvsp[-3].interm.type).qualifier, true);
+ parseContext.precisionQualifierCheck((yyvsp[-2].interm.type).loc, (yyvsp[-2].interm.type).basicType, (yyvsp[-2].interm.type).qualifier);
+
+ for (unsigned int i = 0; i < (yyval.interm.typeList)->size(); ++i) {
+ parseContext.arrayDimCheck((yyvsp[-3].interm.type).loc, (*(yyval.interm.typeList))[i].type, (yyvsp[-2].interm.type).arraySizes);
+ (*(yyval.interm.typeList))[i].type->mergeType((yyvsp[-2].interm.type));
+ }
+ }
+#line 6786 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 353:
+#line 2296 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm.typeList) = new TTypeList;
+ (yyval.interm.typeList)->push_back((yyvsp[0].interm.typeLine));
+ }
+#line 6795 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 354:
+#line 2300 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm.typeList)->push_back((yyvsp[0].interm.typeLine));
+ }
+#line 6803 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 355:
+#line 2306 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm.typeLine).type = new TType(EbtVoid);
+ (yyval.interm.typeLine).loc = (yyvsp[0].lex).loc;
+ (yyval.interm.typeLine).type->setFieldName(*(yyvsp[0].lex).string);
+ }
+#line 6813 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 356:
+#line 2311 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ parseContext.arrayDimCheck((yyvsp[-1].lex).loc, (yyvsp[0].interm).arraySizes, 0);
+
+ (yyval.interm.typeLine).type = new TType(EbtVoid);
+ (yyval.interm.typeLine).loc = (yyvsp[-1].lex).loc;
+ (yyval.interm.typeLine).type->setFieldName(*(yyvsp[-1].lex).string);
+ (yyval.interm.typeLine).type->newArraySizes(*(yyvsp[0].interm).arraySizes);
+ }
+#line 6826 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 357:
+#line 2322 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode);
+ }
+#line 6834 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 358:
+#line 2325 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ const char* initFeature = "{ } style initializers";
+ parseContext.requireProfile((yyvsp[-2].lex).loc, ~EEsProfile, initFeature);
+ parseContext.profileRequires((yyvsp[-2].lex).loc, ~EEsProfile, 420, E_GL_ARB_shading_language_420pack, initFeature);
+ (yyval.interm.intermTypedNode) = (yyvsp[-1].interm.intermTypedNode);
+ }
+#line 6845 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 359:
+#line 2331 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ const char* initFeature = "{ } style initializers";
+ parseContext.requireProfile((yyvsp[-3].lex).loc, ~EEsProfile, initFeature);
+ parseContext.profileRequires((yyvsp[-3].lex).loc, ~EEsProfile, 420, E_GL_ARB_shading_language_420pack, initFeature);
+ (yyval.interm.intermTypedNode) = (yyvsp[-2].interm.intermTypedNode);
+ }
+#line 6856 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 360:
+#line 2340 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm.intermTypedNode) = parseContext.intermediate.growAggregate(0, (yyvsp[0].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode)->getLoc());
+ }
+#line 6864 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 361:
+#line 2343 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm.intermTypedNode) = parseContext.intermediate.growAggregate((yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode));
+ }
+#line 6872 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 362:
+#line 2349 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); }
+#line 6878 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 363:
+#line 2353 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); }
+#line 6884 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 364:
+#line 2354 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); }
+#line 6890 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 365:
+#line 2360 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); }
+#line 6896 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 366:
+#line 2361 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); }
+#line 6902 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 367:
+#line 2362 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); }
+#line 6908 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 368:
+#line 2363 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); }
+#line 6914 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 369:
+#line 2364 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); }
+#line 6920 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 370:
+#line 2365 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); }
+#line 6926 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 371:
+#line 2366 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); }
+#line 6932 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 372:
+#line 2370 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ { (yyval.interm.intermNode) = 0; }
+#line 6938 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 373:
+#line 2371 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ parseContext.symbolTable.push();
+ ++parseContext.statementNestingLevel;
+ }
+#line 6947 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 374:
+#line 2375 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ parseContext.symbolTable.pop(&parseContext.defaultPrecision[0]);
+ --parseContext.statementNestingLevel;
+ }
+#line 6956 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 375:
+#line 2379 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ if ((yyvsp[-2].interm.intermNode) && (yyvsp[-2].interm.intermNode)->getAsAggregate())
+ (yyvsp[-2].interm.intermNode)->getAsAggregate()->setOperator(EOpSequence);
+ (yyval.interm.intermNode) = (yyvsp[-2].interm.intermNode);
+ }
+#line 6966 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 376:
+#line 2387 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); }
+#line 6972 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 377:
+#line 2388 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); }
+#line 6978 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 378:
+#line 2392 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ ++parseContext.controlFlowNestingLevel;
+ }
+#line 6986 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 379:
+#line 2395 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ --parseContext.controlFlowNestingLevel;
+ (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode);
+ }
+#line 6995 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 380:
+#line 2399 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ parseContext.symbolTable.push();
+ ++parseContext.statementNestingLevel;
+ ++parseContext.controlFlowNestingLevel;
+ }
+#line 7005 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 381:
+#line 2404 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ parseContext.symbolTable.pop(&parseContext.defaultPrecision[0]);
+ --parseContext.statementNestingLevel;
+ --parseContext.controlFlowNestingLevel;
+ (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode);
+ }
+#line 7016 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 382:
+#line 2413 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm.intermNode) = 0;
+ }
+#line 7024 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 383:
+#line 2416 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ if ((yyvsp[-1].interm.intermNode) && (yyvsp[-1].interm.intermNode)->getAsAggregate())
+ (yyvsp[-1].interm.intermNode)->getAsAggregate()->setOperator(EOpSequence);
+ (yyval.interm.intermNode) = (yyvsp[-1].interm.intermNode);
+ }
+#line 7034 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 384:
+#line 2424 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm.intermNode) = parseContext.intermediate.makeAggregate((yyvsp[0].interm.intermNode));
+ if ((yyvsp[0].interm.intermNode) && (yyvsp[0].interm.intermNode)->getAsBranchNode() && ((yyvsp[0].interm.intermNode)->getAsBranchNode()->getFlowOp() == EOpCase ||
+ (yyvsp[0].interm.intermNode)->getAsBranchNode()->getFlowOp() == EOpDefault)) {
+ parseContext.wrapupSwitchSubsequence(0, (yyvsp[0].interm.intermNode));
+ (yyval.interm.intermNode) = 0; // start a fresh subsequence for what's after this case
+ }
+ }
+#line 7047 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 385:
+#line 2432 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ if ((yyvsp[0].interm.intermNode) && (yyvsp[0].interm.intermNode)->getAsBranchNode() && ((yyvsp[0].interm.intermNode)->getAsBranchNode()->getFlowOp() == EOpCase ||
+ (yyvsp[0].interm.intermNode)->getAsBranchNode()->getFlowOp() == EOpDefault)) {
+ parseContext.wrapupSwitchSubsequence((yyvsp[-1].interm.intermNode) ? (yyvsp[-1].interm.intermNode)->getAsAggregate() : 0, (yyvsp[0].interm.intermNode));
+ (yyval.interm.intermNode) = 0; // start a fresh subsequence for what's after this case
+ } else
+ (yyval.interm.intermNode) = parseContext.intermediate.growAggregate((yyvsp[-1].interm.intermNode), (yyvsp[0].interm.intermNode));
+ }
+#line 7060 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 386:
+#line 2443 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ { (yyval.interm.intermNode) = 0; }
+#line 7066 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 387:
+#line 2444 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ { (yyval.interm.intermNode) = static_cast<TIntermNode*>((yyvsp[-1].interm.intermTypedNode)); }
+#line 7072 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 388:
+#line 2448 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ parseContext.boolCheck((yyvsp[-4].lex).loc, (yyvsp[-2].interm.intermTypedNode));
+ (yyval.interm.intermNode) = parseContext.intermediate.addSelection((yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.nodePair), (yyvsp[-4].lex).loc);
+ }
+#line 7081 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 389:
+#line 2455 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm.nodePair).node1 = (yyvsp[-2].interm.intermNode);
+ (yyval.interm.nodePair).node2 = (yyvsp[0].interm.intermNode);
+ }
+#line 7090 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 390:
+#line 2459 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm.nodePair).node1 = (yyvsp[0].interm.intermNode);
+ (yyval.interm.nodePair).node2 = 0;
+ }
+#line 7099 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 391:
+#line 2467 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode);
+ parseContext.boolCheck((yyvsp[0].interm.intermTypedNode)->getLoc(), (yyvsp[0].interm.intermTypedNode));
+ }
+#line 7108 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 392:
+#line 2471 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ parseContext.boolCheck((yyvsp[-2].lex).loc, (yyvsp[-3].interm.type));
+
+ TType type((yyvsp[-3].interm.type));
+ TIntermNode* initNode = parseContext.declareVariable((yyvsp[-2].lex).loc, *(yyvsp[-2].lex).string, (yyvsp[-3].interm.type), 0, (yyvsp[0].interm.intermTypedNode));
+ if (initNode)
+ (yyval.interm.intermTypedNode) = initNode->getAsTyped();
+ else
+ (yyval.interm.intermTypedNode) = 0;
+ }
+#line 7123 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 393:
+#line 2484 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ // start new switch sequence on the switch stack
+ ++parseContext.controlFlowNestingLevel;
+ ++parseContext.statementNestingLevel;
+ parseContext.switchSequenceStack.push_back(new TIntermSequence);
+ parseContext.switchLevel.push_back(parseContext.statementNestingLevel);
+ parseContext.symbolTable.push();
+ }
+#line 7136 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 394:
+#line 2492 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm.intermNode) = parseContext.addSwitch((yyvsp[-7].lex).loc, (yyvsp[-5].interm.intermTypedNode), (yyvsp[-1].interm.intermNode) ? (yyvsp[-1].interm.intermNode)->getAsAggregate() : 0);
+ delete parseContext.switchSequenceStack.back();
+ parseContext.switchSequenceStack.pop_back();
+ parseContext.switchLevel.pop_back();
+ parseContext.symbolTable.pop(&parseContext.defaultPrecision[0]);
+ --parseContext.statementNestingLevel;
+ --parseContext.controlFlowNestingLevel;
+ }
+#line 7150 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 395:
+#line 2504 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm.intermNode) = 0;
+ }
+#line 7158 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 396:
+#line 2507 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode);
+ }
+#line 7166 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 397:
+#line 2513 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm.intermNode) = 0;
+ if (parseContext.switchLevel.size() == 0)
+ parseContext.error((yyvsp[-2].lex).loc, "cannot appear outside switch statement", "case", "");
+ else if (parseContext.switchLevel.back() != parseContext.statementNestingLevel)
+ parseContext.error((yyvsp[-2].lex).loc, "cannot be nested inside control flow", "case", "");
+ else {
+ parseContext.constantValueCheck((yyvsp[-1].interm.intermTypedNode), "case");
+ parseContext.integerCheck((yyvsp[-1].interm.intermTypedNode), "case");
+ (yyval.interm.intermNode) = parseContext.intermediate.addBranch(EOpCase, (yyvsp[-1].interm.intermTypedNode), (yyvsp[-2].lex).loc);
+ }
+ }
+#line 7183 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 398:
+#line 2525 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm.intermNode) = 0;
+ if (parseContext.switchLevel.size() == 0)
+ parseContext.error((yyvsp[-1].lex).loc, "cannot appear outside switch statement", "default", "");
+ else if (parseContext.switchLevel.back() != parseContext.statementNestingLevel)
+ parseContext.error((yyvsp[-1].lex).loc, "cannot be nested inside control flow", "default", "");
+ else
+ (yyval.interm.intermNode) = parseContext.intermediate.addBranch(EOpDefault, (yyvsp[-1].lex).loc);
+ }
+#line 7197 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 399:
+#line 2537 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ if (! parseContext.limits.whileLoops)
+ parseContext.error((yyvsp[-1].lex).loc, "while loops not available", "limitation", "");
+ parseContext.symbolTable.push();
+ ++parseContext.loopNestingLevel;
+ ++parseContext.statementNestingLevel;
+ ++parseContext.controlFlowNestingLevel;
+ }
+#line 7210 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 400:
+#line 2545 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ parseContext.symbolTable.pop(&parseContext.defaultPrecision[0]);
+ (yyval.interm.intermNode) = parseContext.intermediate.addLoop((yyvsp[0].interm.intermNode), (yyvsp[-2].interm.intermTypedNode), 0, true, (yyvsp[-5].lex).loc);
+ --parseContext.loopNestingLevel;
+ --parseContext.statementNestingLevel;
+ --parseContext.controlFlowNestingLevel;
+ }
+#line 7222 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 401:
+#line 2552 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ ++parseContext.loopNestingLevel;
+ ++parseContext.statementNestingLevel;
+ ++parseContext.controlFlowNestingLevel;
+ }
+#line 7232 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 402:
+#line 2557 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ if (! parseContext.limits.whileLoops)
+ parseContext.error((yyvsp[-7].lex).loc, "do-while loops not available", "limitation", "");
+
+ parseContext.boolCheck((yyvsp[0].lex).loc, (yyvsp[-2].interm.intermTypedNode));
+
+ (yyval.interm.intermNode) = parseContext.intermediate.addLoop((yyvsp[-5].interm.intermNode), (yyvsp[-2].interm.intermTypedNode), 0, false, (yyvsp[-4].lex).loc);
+ --parseContext.loopNestingLevel;
+ --parseContext.statementNestingLevel;
+ --parseContext.controlFlowNestingLevel;
+ }
+#line 7248 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 403:
+#line 2568 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ parseContext.symbolTable.push();
+ ++parseContext.loopNestingLevel;
+ ++parseContext.statementNestingLevel;
+ ++parseContext.controlFlowNestingLevel;
+ }
+#line 7259 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 404:
+#line 2574 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ parseContext.symbolTable.pop(&parseContext.defaultPrecision[0]);
+ (yyval.interm.intermNode) = parseContext.intermediate.makeAggregate((yyvsp[-3].interm.intermNode), (yyvsp[-5].lex).loc);
+ TIntermLoop* forLoop = parseContext.intermediate.addLoop((yyvsp[0].interm.intermNode), reinterpret_cast<TIntermTyped*>((yyvsp[-2].interm.nodePair).node1), reinterpret_cast<TIntermTyped*>((yyvsp[-2].interm.nodePair).node2), true, (yyvsp[-6].lex).loc);
+ if (! parseContext.limits.nonInductiveForLoops)
+ parseContext.inductiveLoopCheck((yyvsp[-6].lex).loc, (yyvsp[-3].interm.intermNode), forLoop);
+ (yyval.interm.intermNode) = parseContext.intermediate.growAggregate((yyval.interm.intermNode), forLoop, (yyvsp[-6].lex).loc);
+ (yyval.interm.intermNode)->getAsAggregate()->setOperator(EOpSequence);
+ --parseContext.loopNestingLevel;
+ --parseContext.statementNestingLevel;
+ --parseContext.controlFlowNestingLevel;
+ }
+#line 7276 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 405:
+#line 2589 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode);
+ }
+#line 7284 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 406:
+#line 2592 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode);
+ }
+#line 7292 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 407:
+#line 2598 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode);
+ }
+#line 7300 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 408:
+#line 2601 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm.intermTypedNode) = 0;
+ }
+#line 7308 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 409:
+#line 2607 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm.nodePair).node1 = (yyvsp[-1].interm.intermTypedNode);
+ (yyval.interm.nodePair).node2 = 0;
+ }
+#line 7317 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 410:
+#line 2611 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm.nodePair).node1 = (yyvsp[-2].interm.intermTypedNode);
+ (yyval.interm.nodePair).node2 = (yyvsp[0].interm.intermTypedNode);
+ }
+#line 7326 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 411:
+#line 2618 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ if (parseContext.loopNestingLevel <= 0)
+ parseContext.error((yyvsp[-1].lex).loc, "continue statement only allowed in loops", "", "");
+ (yyval.interm.intermNode) = parseContext.intermediate.addBranch(EOpContinue, (yyvsp[-1].lex).loc);
+ }
+#line 7336 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 412:
+#line 2623 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ if (parseContext.loopNestingLevel + parseContext.switchSequenceStack.size() <= 0)
+ parseContext.error((yyvsp[-1].lex).loc, "break statement only allowed in switch and loops", "", "");
+ (yyval.interm.intermNode) = parseContext.intermediate.addBranch(EOpBreak, (yyvsp[-1].lex).loc);
+ }
+#line 7346 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 413:
+#line 2628 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm.intermNode) = parseContext.intermediate.addBranch(EOpReturn, (yyvsp[-1].lex).loc);
+ if (parseContext.currentFunctionType->getBasicType() != EbtVoid)
+ parseContext.error((yyvsp[-1].lex).loc, "non-void function must return a value", "return", "");
+ if (parseContext.inMain)
+ parseContext.postMainReturn = true;
+ }
+#line 7358 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 414:
+#line 2635 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ parseContext.functionReturnsValue = true;
+ if (parseContext.currentFunctionType->getBasicType() == EbtVoid) {
+ parseContext.error((yyvsp[-2].lex).loc, "void function cannot return a value", "return", "");
+ (yyval.interm.intermNode) = parseContext.intermediate.addBranch(EOpReturn, (yyvsp[-2].lex).loc);
+ } else if (*(parseContext.currentFunctionType) != (yyvsp[-1].interm.intermTypedNode)->getType()) {
+ TIntermTyped* converted = parseContext.intermediate.addConversion(EOpReturn, *parseContext.currentFunctionType, (yyvsp[-1].interm.intermTypedNode));
+ if (converted) {
+ if (parseContext.version < 420)
+ parseContext.warn((yyvsp[-2].lex).loc, "type conversion on return values was not explicitly allowed until version 420", "return", "");
+ (yyval.interm.intermNode) = parseContext.intermediate.addBranch(EOpReturn, converted, (yyvsp[-2].lex).loc);
+ } else {
+ parseContext.error((yyvsp[-2].lex).loc, "type does not match, or is not convertible to, the function's return type", "return", "");
+ (yyval.interm.intermNode) = parseContext.intermediate.addBranch(EOpReturn, (yyvsp[-1].interm.intermTypedNode), (yyvsp[-2].lex).loc);
+ }
+ } else
+ (yyval.interm.intermNode) = parseContext.intermediate.addBranch(EOpReturn, (yyvsp[-1].interm.intermTypedNode), (yyvsp[-2].lex).loc);
+ }
+#line 7381 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 415:
+#line 2653 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ parseContext.requireStage((yyvsp[-1].lex).loc, EShLangFragment, "discard");
+ (yyval.interm.intermNode) = parseContext.intermediate.addBranch(EOpKill, (yyvsp[-1].lex).loc);
+ }
+#line 7390 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 416:
+#line 2662 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode);
+ parseContext.intermediate.setTreeRoot((yyval.interm.intermNode));
+ }
+#line 7399 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 417:
+#line 2666 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm.intermNode) = parseContext.intermediate.growAggregate((yyvsp[-1].interm.intermNode), (yyvsp[0].interm.intermNode));
+ parseContext.intermediate.setTreeRoot((yyval.interm.intermNode));
+ }
+#line 7408 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 418:
+#line 2673 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode);
+ }
+#line 7416 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 419:
+#line 2676 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode);
+ }
+#line 7424 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 420:
+#line 2682 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ (yyvsp[0].interm).function = parseContext.handleFunctionDeclarator((yyvsp[0].interm).loc, *(yyvsp[0].interm).function, false /* not prototype */);
+ (yyvsp[0].interm).intermNode = parseContext.handleFunctionDefinition((yyvsp[0].interm).loc, *(yyvsp[0].interm).function);
+ }
+#line 7433 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+ case 421:
+#line 2686 "MachineIndependent/glslang.y" /* yacc.c:1646 */
+ {
+ // May be best done as post process phase on intermediate code
+ if (parseContext.currentFunctionType->getBasicType() != EbtVoid && ! parseContext.functionReturnsValue)
+ parseContext.error((yyvsp[-2].interm).loc, "function does not return a value:", "", (yyvsp[-2].interm).function->getName().c_str());
+ parseContext.symbolTable.pop(&parseContext.defaultPrecision[0]);
+ (yyval.interm.intermNode) = parseContext.intermediate.growAggregate((yyvsp[-2].interm).intermNode, (yyvsp[0].interm.intermNode));
+ parseContext.intermediate.setAggregateOperator((yyval.interm.intermNode), EOpFunction, (yyvsp[-2].interm).function->getType(), (yyvsp[-2].interm).loc);
+ (yyval.interm.intermNode)->getAsAggregate()->setName((yyvsp[-2].interm).function->getMangledName().c_str());
+
+ // store the pragma information for debug and optimize and other vendor specific
+ // information. This information can be queried from the parse tree
+ (yyval.interm.intermNode)->getAsAggregate()->setOptimize(parseContext.contextPragma.optimize);
+ (yyval.interm.intermNode)->getAsAggregate()->setDebug(parseContext.contextPragma.debug);
+ (yyval.interm.intermNode)->getAsAggregate()->addToPragmaTable(parseContext.contextPragma.pragmaTable);
+ }
+#line 7453 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ break;
+
+
+#line 7457 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
+ default: break;
+ }
+ /* User semantic actions sometimes alter yychar, and that requires
+ that yytoken be updated with the new translation. We take the
+ approach of translating immediately before every use of yytoken.
+ One alternative is translating here after every semantic action,
+ but that translation would be missed if the semantic action invokes
+ YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
+ if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an
+ incorrect destructor might then be invoked immediately. In the
+ case of YYERROR or YYBACKUP, subsequent parser actions might lead
+ to an incorrect destructor call or verbose syntax error message
+ before the lookahead is translated. */
+ YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
+
+ YYPOPSTACK (yylen);
+ yylen = 0;
+ YY_STACK_PRINT (yyss, yyssp);
+
+ *++yyvsp = yyval;
+
+ /* Now 'shift' the result of the reduction. Determine what state
+ that goes to, based on the state we popped back to and the rule
+ number reduced by. */
+
+ yyn = yyr1[yyn];
+
+ yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
+ if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
+ yystate = yytable[yystate];
+ else
+ yystate = yydefgoto[yyn - YYNTOKENS];
+
+ goto yynewstate;
+
+
+/*--------------------------------------.
+| yyerrlab -- here on detecting error. |
+`--------------------------------------*/
+yyerrlab:
+ /* Make sure we have latest lookahead translation. See comments at
+ user semantic actions for why this is necessary. */
+ yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar);
+
+ /* If not already recovering from an error, report this error. */
+ if (!yyerrstatus)
+ {
+ ++yynerrs;
+#if ! YYERROR_VERBOSE
+ yyerror (pParseContext, YY_("syntax error"));
+#else
+# define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \
+ yyssp, yytoken)
+ {
+ char const *yymsgp = YY_("syntax error");
+ int yysyntax_error_status;
+ yysyntax_error_status = YYSYNTAX_ERROR;
+ if (yysyntax_error_status == 0)
+ yymsgp = yymsg;
+ else if (yysyntax_error_status == 1)
+ {
+ if (yymsg != yymsgbuf)
+ YYSTACK_FREE (yymsg);
+ yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc);
+ if (!yymsg)
+ {
+ yymsg = yymsgbuf;
+ yymsg_alloc = sizeof yymsgbuf;
+ yysyntax_error_status = 2;
+ }
+ else
+ {
+ yysyntax_error_status = YYSYNTAX_ERROR;
+ yymsgp = yymsg;
+ }
+ }
+ yyerror (pParseContext, yymsgp);
+ if (yysyntax_error_status == 2)
+ goto yyexhaustedlab;
+ }
+# undef YYSYNTAX_ERROR
+#endif
+ }
+
+
+
+ if (yyerrstatus == 3)
+ {
+ /* If just tried and failed to reuse lookahead token after an
+ error, discard it. */
+
+ if (yychar <= YYEOF)
+ {
+ /* Return failure if at end of input. */
+ if (yychar == YYEOF)
+ YYABORT;
+ }
+ else
+ {
+ yydestruct ("Error: discarding",
+ yytoken, &yylval, pParseContext);
+ yychar = YYEMPTY;
+ }
+ }
+
+ /* Else will try to reuse lookahead token after shifting the error
+ token. */
+ goto yyerrlab1;
+
+
+/*---------------------------------------------------.
+| yyerrorlab -- error raised explicitly by YYERROR. |
+`---------------------------------------------------*/
+yyerrorlab:
+
+ /* Pacify compilers like GCC when the user code never invokes
+ YYERROR and the label yyerrorlab therefore never appears in user
+ code. */
+ if (/*CONSTCOND*/ 0)
+ goto yyerrorlab;
+
+ /* Do not reclaim the symbols of the rule whose action triggered
+ this YYERROR. */
+ YYPOPSTACK (yylen);
+ yylen = 0;
+ YY_STACK_PRINT (yyss, yyssp);
+ yystate = *yyssp;
+ goto yyerrlab1;
+
+
+/*-------------------------------------------------------------.
+| yyerrlab1 -- common code for both syntax error and YYERROR. |
+`-------------------------------------------------------------*/
+yyerrlab1:
+ yyerrstatus = 3; /* Each real token shifted decrements this. */
+
+ for (;;)
+ {
+ yyn = yypact[yystate];
+ if (!yypact_value_is_default (yyn))
+ {
+ yyn += YYTERROR;
+ if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
+ {
+ yyn = yytable[yyn];
+ if (0 < yyn)
+ break;
+ }
+ }
+
+ /* Pop the current state because it cannot handle the error token. */
+ if (yyssp == yyss)
+ YYABORT;
+
+
+ yydestruct ("Error: popping",
+ yystos[yystate], yyvsp, pParseContext);
+ YYPOPSTACK (1);
+ yystate = *yyssp;
+ YY_STACK_PRINT (yyss, yyssp);
+ }
+
+ YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
+ *++yyvsp = yylval;
+ YY_IGNORE_MAYBE_UNINITIALIZED_END
+
+
+ /* Shift the error token. */
+ YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
+
+ yystate = yyn;
+ goto yynewstate;
+
+
+/*-------------------------------------.
+| yyacceptlab -- YYACCEPT comes here. |
+`-------------------------------------*/
+yyacceptlab:
+ yyresult = 0;
+ goto yyreturn;
+
+/*-----------------------------------.
+| yyabortlab -- YYABORT comes here. |
+`-----------------------------------*/
+yyabortlab:
+ yyresult = 1;
+ goto yyreturn;
+
+#if !defined yyoverflow || YYERROR_VERBOSE
+/*-------------------------------------------------.
+| yyexhaustedlab -- memory exhaustion comes here. |
+`-------------------------------------------------*/
+yyexhaustedlab:
+ yyerror (pParseContext, YY_("memory exhausted"));
+ yyresult = 2;
+ /* Fall through. */
+#endif
+
+yyreturn:
+ if (yychar != YYEMPTY)
+ {
+ /* Make sure we have latest lookahead translation. See comments at
+ user semantic actions for why this is necessary. */
+ yytoken = YYTRANSLATE (yychar);
+ yydestruct ("Cleanup: discarding lookahead",
+ yytoken, &yylval, pParseContext);
+ }
+ /* Do not reclaim the symbols of the rule whose action triggered
+ this YYABORT or YYACCEPT. */
+ YYPOPSTACK (yylen);
+ YY_STACK_PRINT (yyss, yyssp);
+ while (yyssp != yyss)
+ {
+ yydestruct ("Cleanup: popping",
+ yystos[*yyssp], yyvsp, pParseContext);
+ YYPOPSTACK (1);
+ }
+#ifndef yyoverflow
+ if (yyss != yyssa)
+ YYSTACK_FREE (yyss);
+#endif
+#if YYERROR_VERBOSE
+ if (yymsg != yymsgbuf)
+ YYSTACK_FREE (yymsg);
+#endif
+ return yyresult;
+}
+#line 2703 "MachineIndependent/glslang.y" /* yacc.c:1906 */
+
diff --git a/chromium/third_party/glslang/src/glslang/MachineIndependent/glslang_tab.cpp.h b/chromium/third_party/glslang/src/glslang/MachineIndependent/glslang_tab.cpp.h
new file mode 100644
index 00000000000..e7d8fae862e
--- /dev/null
+++ b/chromium/third_party/glslang/src/glslang/MachineIndependent/glslang_tab.cpp.h
@@ -0,0 +1,369 @@
+/* A Bison parser, made by GNU Bison 3.0.4. */
+
+/* Bison interface for Yacc-like parsers in C
+
+ Copyright (C) 1984, 1989-1990, 2000-2015 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* As a special exception, you may create a larger work that contains
+ part or all of the Bison parser skeleton and distribute that work
+ under terms of your choice, so long as that work isn't itself a
+ parser generator using the skeleton or a modified version thereof
+ as a parser skeleton. Alternatively, if you modify or redistribute
+ the parser skeleton itself, you may (at your option) remove this
+ special exception, which will cause the skeleton and the resulting
+ Bison output files to be licensed under the GNU General Public
+ License without this special exception.
+
+ This special exception was added by the Free Software Foundation in
+ version 2.2 of Bison. */
+
+#ifndef YY_YY_MACHINEINDEPENDENT_GLSLANG_TAB_CPP_H_INCLUDED
+# define YY_YY_MACHINEINDEPENDENT_GLSLANG_TAB_CPP_H_INCLUDED
+/* Debug traces. */
+#ifndef YYDEBUG
+# define YYDEBUG 1
+#endif
+#if YYDEBUG
+extern int yydebug;
+#endif
+
+/* Token type. */
+#ifndef YYTOKENTYPE
+# define YYTOKENTYPE
+ enum yytokentype
+ {
+ ATTRIBUTE = 258,
+ VARYING = 259,
+ CONST = 260,
+ BOOL = 261,
+ FLOAT = 262,
+ DOUBLE = 263,
+ INT = 264,
+ UINT = 265,
+ INT64_T = 266,
+ UINT64_T = 267,
+ BREAK = 268,
+ CONTINUE = 269,
+ DO = 270,
+ ELSE = 271,
+ FOR = 272,
+ IF = 273,
+ DISCARD = 274,
+ RETURN = 275,
+ SWITCH = 276,
+ CASE = 277,
+ DEFAULT = 278,
+ SUBROUTINE = 279,
+ BVEC2 = 280,
+ BVEC3 = 281,
+ BVEC4 = 282,
+ IVEC2 = 283,
+ IVEC3 = 284,
+ IVEC4 = 285,
+ I64VEC2 = 286,
+ I64VEC3 = 287,
+ I64VEC4 = 288,
+ UVEC2 = 289,
+ UVEC3 = 290,
+ UVEC4 = 291,
+ U64VEC2 = 292,
+ U64VEC3 = 293,
+ U64VEC4 = 294,
+ VEC2 = 295,
+ VEC3 = 296,
+ VEC4 = 297,
+ MAT2 = 298,
+ MAT3 = 299,
+ MAT4 = 300,
+ CENTROID = 301,
+ IN = 302,
+ OUT = 303,
+ INOUT = 304,
+ UNIFORM = 305,
+ PATCH = 306,
+ SAMPLE = 307,
+ BUFFER = 308,
+ SHARED = 309,
+ COHERENT = 310,
+ VOLATILE = 311,
+ RESTRICT = 312,
+ READONLY = 313,
+ WRITEONLY = 314,
+ DVEC2 = 315,
+ DVEC3 = 316,
+ DVEC4 = 317,
+ DMAT2 = 318,
+ DMAT3 = 319,
+ DMAT4 = 320,
+ NOPERSPECTIVE = 321,
+ FLAT = 322,
+ SMOOTH = 323,
+ LAYOUT = 324,
+ MAT2X2 = 325,
+ MAT2X3 = 326,
+ MAT2X4 = 327,
+ MAT3X2 = 328,
+ MAT3X3 = 329,
+ MAT3X4 = 330,
+ MAT4X2 = 331,
+ MAT4X3 = 332,
+ MAT4X4 = 333,
+ DMAT2X2 = 334,
+ DMAT2X3 = 335,
+ DMAT2X4 = 336,
+ DMAT3X2 = 337,
+ DMAT3X3 = 338,
+ DMAT3X4 = 339,
+ DMAT4X2 = 340,
+ DMAT4X3 = 341,
+ DMAT4X4 = 342,
+ ATOMIC_UINT = 343,
+ SAMPLER1D = 344,
+ SAMPLER2D = 345,
+ SAMPLER3D = 346,
+ SAMPLERCUBE = 347,
+ SAMPLER1DSHADOW = 348,
+ SAMPLER2DSHADOW = 349,
+ SAMPLERCUBESHADOW = 350,
+ SAMPLER1DARRAY = 351,
+ SAMPLER2DARRAY = 352,
+ SAMPLER1DARRAYSHADOW = 353,
+ SAMPLER2DARRAYSHADOW = 354,
+ ISAMPLER1D = 355,
+ ISAMPLER2D = 356,
+ ISAMPLER3D = 357,
+ ISAMPLERCUBE = 358,
+ ISAMPLER1DARRAY = 359,
+ ISAMPLER2DARRAY = 360,
+ USAMPLER1D = 361,
+ USAMPLER2D = 362,
+ USAMPLER3D = 363,
+ USAMPLERCUBE = 364,
+ USAMPLER1DARRAY = 365,
+ USAMPLER2DARRAY = 366,
+ SAMPLER2DRECT = 367,
+ SAMPLER2DRECTSHADOW = 368,
+ ISAMPLER2DRECT = 369,
+ USAMPLER2DRECT = 370,
+ SAMPLERBUFFER = 371,
+ ISAMPLERBUFFER = 372,
+ USAMPLERBUFFER = 373,
+ SAMPLERCUBEARRAY = 374,
+ SAMPLERCUBEARRAYSHADOW = 375,
+ ISAMPLERCUBEARRAY = 376,
+ USAMPLERCUBEARRAY = 377,
+ SAMPLER2DMS = 378,
+ ISAMPLER2DMS = 379,
+ USAMPLER2DMS = 380,
+ SAMPLER2DMSARRAY = 381,
+ ISAMPLER2DMSARRAY = 382,
+ USAMPLER2DMSARRAY = 383,
+ SAMPLEREXTERNALOES = 384,
+ SAMPLER = 385,
+ SAMPLERSHADOW = 386,
+ TEXTURE1D = 387,
+ TEXTURE2D = 388,
+ TEXTURE3D = 389,
+ TEXTURECUBE = 390,
+ TEXTURE1DARRAY = 391,
+ TEXTURE2DARRAY = 392,
+ ITEXTURE1D = 393,
+ ITEXTURE2D = 394,
+ ITEXTURE3D = 395,
+ ITEXTURECUBE = 396,
+ ITEXTURE1DARRAY = 397,
+ ITEXTURE2DARRAY = 398,
+ UTEXTURE1D = 399,
+ UTEXTURE2D = 400,
+ UTEXTURE3D = 401,
+ UTEXTURECUBE = 402,
+ UTEXTURE1DARRAY = 403,
+ UTEXTURE2DARRAY = 404,
+ TEXTURE2DRECT = 405,
+ ITEXTURE2DRECT = 406,
+ UTEXTURE2DRECT = 407,
+ TEXTUREBUFFER = 408,
+ ITEXTUREBUFFER = 409,
+ UTEXTUREBUFFER = 410,
+ TEXTURECUBEARRAY = 411,
+ ITEXTURECUBEARRAY = 412,
+ UTEXTURECUBEARRAY = 413,
+ TEXTURE2DMS = 414,
+ ITEXTURE2DMS = 415,
+ UTEXTURE2DMS = 416,
+ TEXTURE2DMSARRAY = 417,
+ ITEXTURE2DMSARRAY = 418,
+ UTEXTURE2DMSARRAY = 419,
+ SUBPASSINPUT = 420,
+ SUBPASSINPUTMS = 421,
+ ISUBPASSINPUT = 422,
+ ISUBPASSINPUTMS = 423,
+ USUBPASSINPUT = 424,
+ USUBPASSINPUTMS = 425,
+ IMAGE1D = 426,
+ IIMAGE1D = 427,
+ UIMAGE1D = 428,
+ IMAGE2D = 429,
+ IIMAGE2D = 430,
+ UIMAGE2D = 431,
+ IMAGE3D = 432,
+ IIMAGE3D = 433,
+ UIMAGE3D = 434,
+ IMAGE2DRECT = 435,
+ IIMAGE2DRECT = 436,
+ UIMAGE2DRECT = 437,
+ IMAGECUBE = 438,
+ IIMAGECUBE = 439,
+ UIMAGECUBE = 440,
+ IMAGEBUFFER = 441,
+ IIMAGEBUFFER = 442,
+ UIMAGEBUFFER = 443,
+ IMAGE1DARRAY = 444,
+ IIMAGE1DARRAY = 445,
+ UIMAGE1DARRAY = 446,
+ IMAGE2DARRAY = 447,
+ IIMAGE2DARRAY = 448,
+ UIMAGE2DARRAY = 449,
+ IMAGECUBEARRAY = 450,
+ IIMAGECUBEARRAY = 451,
+ UIMAGECUBEARRAY = 452,
+ IMAGE2DMS = 453,
+ IIMAGE2DMS = 454,
+ UIMAGE2DMS = 455,
+ IMAGE2DMSARRAY = 456,
+ IIMAGE2DMSARRAY = 457,
+ UIMAGE2DMSARRAY = 458,
+ STRUCT = 459,
+ VOID = 460,
+ WHILE = 461,
+ IDENTIFIER = 462,
+ TYPE_NAME = 463,
+ FLOATCONSTANT = 464,
+ DOUBLECONSTANT = 465,
+ INTCONSTANT = 466,
+ UINTCONSTANT = 467,
+ INT64CONSTANT = 468,
+ UINT64CONSTANT = 469,
+ BOOLCONSTANT = 470,
+ LEFT_OP = 471,
+ RIGHT_OP = 472,
+ INC_OP = 473,
+ DEC_OP = 474,
+ LE_OP = 475,
+ GE_OP = 476,
+ EQ_OP = 477,
+ NE_OP = 478,
+ AND_OP = 479,
+ OR_OP = 480,
+ XOR_OP = 481,
+ MUL_ASSIGN = 482,
+ DIV_ASSIGN = 483,
+ ADD_ASSIGN = 484,
+ MOD_ASSIGN = 485,
+ LEFT_ASSIGN = 486,
+ RIGHT_ASSIGN = 487,
+ AND_ASSIGN = 488,
+ XOR_ASSIGN = 489,
+ OR_ASSIGN = 490,
+ SUB_ASSIGN = 491,
+ LEFT_PAREN = 492,
+ RIGHT_PAREN = 493,
+ LEFT_BRACKET = 494,
+ RIGHT_BRACKET = 495,
+ LEFT_BRACE = 496,
+ RIGHT_BRACE = 497,
+ DOT = 498,
+ COMMA = 499,
+ COLON = 500,
+ EQUAL = 501,
+ SEMICOLON = 502,
+ BANG = 503,
+ DASH = 504,
+ TILDE = 505,
+ PLUS = 506,
+ STAR = 507,
+ SLASH = 508,
+ PERCENT = 509,
+ LEFT_ANGLE = 510,
+ RIGHT_ANGLE = 511,
+ VERTICAL_BAR = 512,
+ CARET = 513,
+ AMPERSAND = 514,
+ QUESTION = 515,
+ INVARIANT = 516,
+ PRECISE = 517,
+ HIGH_PRECISION = 518,
+ MEDIUM_PRECISION = 519,
+ LOW_PRECISION = 520,
+ PRECISION = 521,
+ PACKED = 522,
+ RESOURCE = 523,
+ SUPERP = 524
+ };
+#endif
+
+/* Value type. */
+#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
+
+union YYSTYPE
+{
+#line 66 "MachineIndependent/glslang.y" /* yacc.c:1909 */
+
+ struct {
+ glslang::TSourceLoc loc;
+ union {
+ glslang::TString *string;
+ int i;
+ unsigned int u;
+ long long i64;
+ unsigned long long u64;
+ bool b;
+ double d;
+ };
+ glslang::TSymbol* symbol;
+ } lex;
+ struct {
+ glslang::TSourceLoc loc;
+ glslang::TOperator op;
+ union {
+ TIntermNode* intermNode;
+ glslang::TIntermNodePair nodePair;
+ glslang::TIntermTyped* intermTypedNode;
+ };
+ union {
+ glslang::TPublicType type;
+ glslang::TFunction* function;
+ glslang::TParameter param;
+ glslang::TTypeLoc typeLine;
+ glslang::TTypeList* typeList;
+ glslang::TArraySizes* arraySizes;
+ glslang::TIdentifierList* identifierList;
+ };
+ } interm;
+
+#line 358 "MachineIndependent/glslang_tab.cpp.h" /* yacc.c:1909 */
+};
+
+typedef union YYSTYPE YYSTYPE;
+# define YYSTYPE_IS_TRIVIAL 1
+# define YYSTYPE_IS_DECLARED 1
+#endif
+
+
+
+int yyparse (glslang::TParseContext* pParseContext);
+
+#endif /* !YY_YY_MACHINEINDEPENDENT_GLSLANG_TAB_CPP_H_INCLUDED */
diff --git a/chromium/third_party/glslang/src/glslang/MachineIndependent/intermOut.cpp b/chromium/third_party/glslang/src/glslang/MachineIndependent/intermOut.cpp
new file mode 100644
index 00000000000..a5a6f2ce0e0
--- /dev/null
+++ b/chromium/third_party/glslang/src/glslang/MachineIndependent/intermOut.cpp
@@ -0,0 +1,864 @@
+//
+//Copyright (C) 2002-2005 3Dlabs Inc. Ltd.
+//Copyright (C) 2012-2016 LunarG, 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:
+//
+// Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 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.
+//
+// Neither the name of 3Dlabs Inc. Ltd. nor the names of its
+// contributors may be used to endorse or promote products derived
+// from this software without specific prior written permission.
+//
+//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+//"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 THE
+//COPYRIGHT HOLDERS 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.
+//
+
+#include "localintermediate.h"
+#include "../Include/InfoSink.h"
+
+#ifdef _MSC_VER
+#include <float.h>
+#elif defined __ANDROID__ || defined __linux__ || __MINGW32__ || __MINGW64__
+#include <cmath>
+#else
+#include <math.h>
+#endif
+
+namespace {
+
+bool is_positive_infinity(double x) {
+#ifdef _MSC_VER
+ return _fpclass(x) == _FPCLASS_PINF;
+#elif defined __ANDROID__ || defined __linux__ || __MINGW32__ || __MINGW64__
+ return std::isinf(x) && (x >= 0);
+#else
+ return isinf(x) && (x >= 0);
+#endif
+}
+
+}
+
+namespace glslang {
+
+//
+// Two purposes:
+// 1. Show an example of how to iterate tree. Functions can
+// also directly call Traverse() on children themselves to
+// have finer grained control over the process than shown here.
+// See the last function for how to get started.
+// 2. Print out a text based description of the tree.
+//
+
+//
+// Use this class to carry along data from node to node in
+// the traversal
+//
+class TOutputTraverser : public TIntermTraverser {
+public:
+ TOutputTraverser(TInfoSink& i) : infoSink(i) { }
+
+ virtual bool visitBinary(TVisit, TIntermBinary* node);
+ virtual bool visitUnary(TVisit, TIntermUnary* node);
+ virtual bool visitAggregate(TVisit, TIntermAggregate* node);
+ virtual bool visitSelection(TVisit, TIntermSelection* node);
+ virtual void visitConstantUnion(TIntermConstantUnion* node);
+ virtual void visitSymbol(TIntermSymbol* node);
+ virtual bool visitLoop(TVisit, TIntermLoop* node);
+ virtual bool visitBranch(TVisit, TIntermBranch* node);
+ virtual bool visitSwitch(TVisit, TIntermSwitch* node);
+
+ TInfoSink& infoSink;
+protected:
+ TOutputTraverser(TOutputTraverser&);
+ TOutputTraverser& operator=(TOutputTraverser&);
+};
+
+//
+// Helper functions for printing, not part of traversing.
+//
+
+static void OutputTreeText(TInfoSink& infoSink, const TIntermNode* node, const int depth)
+{
+ int i;
+
+ infoSink.debug << node->getLoc().string << ":";
+ if (node->getLoc().line)
+ infoSink.debug << node->getLoc().line;
+ else
+ infoSink.debug << "? ";
+
+ for (i = 0; i < depth; ++i)
+ infoSink.debug << " ";
+}
+
+//
+// The rest of the file are the traversal functions. The last one
+// is the one that starts the traversal.
+//
+// Return true from interior nodes to have the external traversal
+// continue on to children. If you process children yourself,
+// return false.
+//
+
+bool TOutputTraverser::visitBinary(TVisit /* visit */, TIntermBinary* node)
+{
+ TInfoSink& out = infoSink;
+
+ OutputTreeText(out, node, depth);
+
+ switch (node->getOp()) {
+ case EOpAssign: out.debug << "move second child to first child"; break;
+ case EOpAddAssign: out.debug << "add second child into first child"; break;
+ case EOpSubAssign: out.debug << "subtract second child into first child"; break;
+ case EOpMulAssign: out.debug << "multiply second child into first child"; break;
+ case EOpVectorTimesMatrixAssign: out.debug << "matrix mult second child into first child"; break;
+ case EOpVectorTimesScalarAssign: out.debug << "vector scale second child into first child"; break;
+ case EOpMatrixTimesScalarAssign: out.debug << "matrix scale second child into first child"; break;
+ case EOpMatrixTimesMatrixAssign: out.debug << "matrix mult second child into first child"; break;
+ case EOpDivAssign: out.debug << "divide second child into first child"; break;
+ case EOpModAssign: out.debug << "mod second child into first child"; break;
+ case EOpAndAssign: out.debug << "and second child into first child"; break;
+ case EOpInclusiveOrAssign: out.debug << "or second child into first child"; break;
+ case EOpExclusiveOrAssign: out.debug << "exclusive or second child into first child"; break;
+ case EOpLeftShiftAssign: out.debug << "left shift second child into first child"; break;
+ case EOpRightShiftAssign: out.debug << "right shift second child into first child"; break;
+
+ case EOpIndexDirect: out.debug << "direct index"; break;
+ case EOpIndexIndirect: out.debug << "indirect index"; break;
+ case EOpIndexDirectStruct:
+ out.debug << (*node->getLeft()->getType().getStruct())[node->getRight()->getAsConstantUnion()->getConstArray()[0].getIConst()].type->getFieldName();
+ out.debug << ": direct index for structure"; break;
+ case EOpVectorSwizzle: out.debug << "vector swizzle"; break;
+
+ case EOpAdd: out.debug << "add"; break;
+ case EOpSub: out.debug << "subtract"; break;
+ case EOpMul: out.debug << "component-wise multiply"; break;
+ case EOpDiv: out.debug << "divide"; break;
+ case EOpMod: out.debug << "mod"; break;
+ case EOpRightShift: out.debug << "right-shift"; break;
+ case EOpLeftShift: out.debug << "left-shift"; break;
+ case EOpAnd: out.debug << "bitwise and"; break;
+ case EOpInclusiveOr: out.debug << "inclusive-or"; break;
+ case EOpExclusiveOr: out.debug << "exclusive-or"; break;
+ case EOpEqual: out.debug << "Compare Equal"; break;
+ case EOpNotEqual: out.debug << "Compare Not Equal"; break;
+ case EOpLessThan: out.debug << "Compare Less Than"; break;
+ case EOpGreaterThan: out.debug << "Compare Greater Than"; break;
+ case EOpLessThanEqual: out.debug << "Compare Less Than or Equal"; break;
+ case EOpGreaterThanEqual: out.debug << "Compare Greater Than or Equal"; break;
+
+ case EOpVectorTimesScalar: out.debug << "vector-scale"; break;
+ case EOpVectorTimesMatrix: out.debug << "vector-times-matrix"; break;
+ case EOpMatrixTimesVector: out.debug << "matrix-times-vector"; break;
+ case EOpMatrixTimesScalar: out.debug << "matrix-scale"; break;
+ case EOpMatrixTimesMatrix: out.debug << "matrix-multiply"; break;
+
+ case EOpLogicalOr: out.debug << "logical-or"; break;
+ case EOpLogicalXor: out.debug << "logical-xor"; break;
+ case EOpLogicalAnd: out.debug << "logical-and"; break;
+ default: out.debug << "<unknown op>";
+ }
+
+ out.debug << " (" << node->getCompleteString() << ")";
+
+ out.debug << "\n";
+
+ return true;
+}
+
+bool TOutputTraverser::visitUnary(TVisit /* visit */, TIntermUnary* node)
+{
+ TInfoSink& out = infoSink;
+
+ OutputTreeText(out, node, depth);
+
+ switch (node->getOp()) {
+ case EOpNegative: out.debug << "Negate value"; break;
+ case EOpVectorLogicalNot:
+ case EOpLogicalNot: out.debug << "Negate conditional"; break;
+ case EOpBitwiseNot: out.debug << "Bitwise not"; break;
+
+ case EOpPostIncrement: out.debug << "Post-Increment"; break;
+ case EOpPostDecrement: out.debug << "Post-Decrement"; break;
+ case EOpPreIncrement: out.debug << "Pre-Increment"; break;
+ case EOpPreDecrement: out.debug << "Pre-Decrement"; break;
+
+ case EOpConvIntToBool: out.debug << "Convert int to bool"; break;
+ case EOpConvUintToBool: out.debug << "Convert uint to bool"; break;
+ case EOpConvFloatToBool: out.debug << "Convert float to bool"; break;
+ case EOpConvDoubleToBool: out.debug << "Convert double to bool"; break;
+ case EOpConvInt64ToBool: out.debug << "Convert int64 to bool"; break;
+ case EOpConvUint64ToBool: out.debug << "Convert uint64 to bool"; break;
+ case EOpConvIntToFloat: out.debug << "Convert int to float"; break;
+ case EOpConvUintToFloat: out.debug << "Convert uint to float"; break;
+ case EOpConvDoubleToFloat: out.debug << "Convert double to float"; break;
+ case EOpConvInt64ToFloat: out.debug << "Convert int64 to float"; break;
+ case EOpConvUint64ToFloat: out.debug << "Convert uint64 to float"; break;
+ case EOpConvBoolToFloat: out.debug << "Convert bool to float"; break;
+ case EOpConvUintToInt: out.debug << "Convert uint to int"; break;
+ case EOpConvFloatToInt: out.debug << "Convert float to int"; break;
+ case EOpConvDoubleToInt: out.debug << "Convert double to int"; break;
+ case EOpConvBoolToInt: out.debug << "Convert bool to int"; break;
+ case EOpConvInt64ToInt: out.debug << "Convert int64 to int"; break;
+ case EOpConvUint64ToInt: out.debug << "Convert uint64 to int"; break;
+ case EOpConvIntToUint: out.debug << "Convert int to uint"; break;
+ case EOpConvFloatToUint: out.debug << "Convert float to uint"; break;
+ case EOpConvDoubleToUint: out.debug << "Convert double to uint"; break;
+ case EOpConvBoolToUint: out.debug << "Convert bool to uint"; break;
+ case EOpConvInt64ToUint: out.debug << "Convert int64 to uint"; break;
+ case EOpConvUint64ToUint: out.debug << "Convert uint64 to uint"; break;
+ case EOpConvIntToDouble: out.debug << "Convert int to double"; break;
+ case EOpConvUintToDouble: out.debug << "Convert uint to double"; break;
+ case EOpConvFloatToDouble: out.debug << "Convert float to double"; break;
+ case EOpConvBoolToDouble: out.debug << "Convert bool to double"; break;
+ case EOpConvInt64ToDouble: out.debug << "Convert int64 to double"; break;
+ case EOpConvUint64ToDouble: out.debug << "Convert uint64 to double"; break;
+ case EOpConvBoolToInt64: out.debug << "Convert bool to int64"; break;
+ case EOpConvIntToInt64: out.debug << "Convert int to int64"; break;
+ case EOpConvUintToInt64: out.debug << "Convert uint to int64"; break;
+ case EOpConvFloatToInt64: out.debug << "Convert float to int64"; break;
+ case EOpConvDoubleToInt64: out.debug << "Convert double to int64"; break;
+ case EOpConvUint64ToInt64: out.debug << "Convert uint64 to int64"; break;
+ case EOpConvBoolToUint64: out.debug << "Convert bool to uint64"; break;
+ case EOpConvIntToUint64: out.debug << "Convert int to uint64"; break;
+ case EOpConvUintToUint64: out.debug << "Convert uint to uint64"; break;
+ case EOpConvFloatToUint64: out.debug << "Convert float to uint64"; break;
+ case EOpConvDoubleToUint64: out.debug << "Convert double to uint64"; break;
+ case EOpConvInt64ToUint64: out.debug << "Convert uint64 to uint64"; break;
+
+ case EOpRadians: out.debug << "radians"; break;
+ case EOpDegrees: out.debug << "degrees"; break;
+ case EOpSin: out.debug << "sine"; break;
+ case EOpCos: out.debug << "cosine"; break;
+ case EOpTan: out.debug << "tangent"; break;
+ case EOpAsin: out.debug << "arc sine"; break;
+ case EOpAcos: out.debug << "arc cosine"; break;
+ case EOpAtan: out.debug << "arc tangent"; break;
+ case EOpSinh: out.debug << "hyp. sine"; break;
+ case EOpCosh: out.debug << "hyp. cosine"; break;
+ case EOpTanh: out.debug << "hyp. tangent"; break;
+ case EOpAsinh: out.debug << "arc hyp. sine"; break;
+ case EOpAcosh: out.debug << "arc hyp. cosine"; break;
+ case EOpAtanh: out.debug << "arc hyp. tangent"; break;
+
+ case EOpExp: out.debug << "exp"; break;
+ case EOpLog: out.debug << "log"; break;
+ case EOpExp2: out.debug << "exp2"; break;
+ case EOpLog2: out.debug << "log2"; break;
+ case EOpSqrt: out.debug << "sqrt"; break;
+ case EOpInverseSqrt: out.debug << "inverse sqrt"; break;
+
+ case EOpAbs: out.debug << "Absolute value"; break;
+ case EOpSign: out.debug << "Sign"; break;
+ case EOpFloor: out.debug << "Floor"; break;
+ case EOpTrunc: out.debug << "trunc"; break;
+ case EOpRound: out.debug << "round"; break;
+ case EOpRoundEven: out.debug << "roundEven"; break;
+ case EOpCeil: out.debug << "Ceiling"; break;
+ case EOpFract: out.debug << "Fraction"; break;
+
+ case EOpIsNan: out.debug << "isnan"; break;
+ case EOpIsInf: out.debug << "isinf"; break;
+
+ case EOpFloatBitsToInt: out.debug << "floatBitsToInt"; break;
+ case EOpFloatBitsToUint:out.debug << "floatBitsToUint"; break;
+ case EOpIntBitsToFloat: out.debug << "intBitsToFloat"; break;
+ case EOpUintBitsToFloat:out.debug << "uintBitsToFloat"; break;
+ case EOpDoubleBitsToInt64: out.debug << "doubleBitsToInt64"; break;
+ case EOpDoubleBitsToUint64: out.debug << "doubleBitsToUint64"; break;
+ case EOpInt64BitsToDouble: out.debug << "int64BitsToDouble"; break;
+ case EOpUint64BitsToDouble: out.debug << "uint64BitsToDouble"; break;
+ case EOpPackSnorm2x16: out.debug << "packSnorm2x16"; break;
+ case EOpUnpackSnorm2x16:out.debug << "unpackSnorm2x16"; break;
+ case EOpPackUnorm2x16: out.debug << "packUnorm2x16"; break;
+ case EOpUnpackUnorm2x16:out.debug << "unpackUnorm2x16"; break;
+ case EOpPackHalf2x16: out.debug << "packHalf2x16"; break;
+ case EOpUnpackHalf2x16: out.debug << "unpackHalf2x16"; break;
+
+ case EOpPackSnorm4x8: out.debug << "PackSnorm4x8"; break;
+ case EOpUnpackSnorm4x8: out.debug << "UnpackSnorm4x8"; break;
+ case EOpPackUnorm4x8: out.debug << "PackUnorm4x8"; break;
+ case EOpUnpackUnorm4x8: out.debug << "UnpackUnorm4x8"; break;
+ case EOpPackDouble2x32: out.debug << "PackDouble2x32"; break;
+ case EOpUnpackDouble2x32: out.debug << "UnpackDouble2x32"; break;
+
+ case EOpPackInt2x32: out.debug << "packInt2x32"; break;
+ case EOpUnpackInt2x32: out.debug << "unpackInt2x32"; break;
+ case EOpPackUint2x32: out.debug << "packUint2x32"; break;
+ case EOpUnpackUint2x32: out.debug << "unpackUint2x32"; break;
+
+ case EOpLength: out.debug << "length"; break;
+ case EOpNormalize: out.debug << "normalize"; break;
+ case EOpDPdx: out.debug << "dPdx"; break;
+ case EOpDPdy: out.debug << "dPdy"; break;
+ case EOpFwidth: out.debug << "fwidth"; break;
+ case EOpDPdxFine: out.debug << "dPdxFine"; break;
+ case EOpDPdyFine: out.debug << "dPdyFine"; break;
+ case EOpFwidthFine: out.debug << "fwidthFine"; break;
+ case EOpDPdxCoarse: out.debug << "dPdxCoarse"; break;
+ case EOpDPdyCoarse: out.debug << "dPdyCoarse"; break;
+ case EOpFwidthCoarse: out.debug << "fwidthCoarse"; break;
+
+ case EOpInterpolateAtCentroid: out.debug << "interpolateAtCentroid"; break;
+
+ case EOpDeterminant: out.debug << "determinant"; break;
+ case EOpMatrixInverse: out.debug << "inverse"; break;
+ case EOpTranspose: out.debug << "transpose"; break;
+
+ case EOpAny: out.debug << "any"; break;
+ case EOpAll: out.debug << "all"; break;
+
+ case EOpArrayLength: out.debug << "array length"; break;
+
+ case EOpEmitStreamVertex: out.debug << "EmitStreamVertex"; break;
+ case EOpEndStreamPrimitive: out.debug << "EndStreamPrimitive"; break;
+
+ case EOpAtomicCounterIncrement: out.debug << "AtomicCounterIncrement";break;
+ case EOpAtomicCounterDecrement: out.debug << "AtomicCounterDecrement";break;
+ case EOpAtomicCounter: out.debug << "AtomicCounter"; break;
+
+ case EOpTextureQuerySize: out.debug << "textureSize"; break;
+ case EOpTextureQueryLod: out.debug << "textureQueryLod"; break;
+ case EOpTextureQueryLevels: out.debug << "textureQueryLevels"; break;
+ case EOpTextureQuerySamples: out.debug << "textureSamples"; break;
+ case EOpImageQuerySize: out.debug << "imageQuerySize"; break;
+ case EOpImageQuerySamples: out.debug << "imageQuerySamples"; break;
+ case EOpImageLoad: out.debug << "imageLoad"; break;
+
+ case EOpBitFieldReverse: out.debug << "bitFieldReverse"; break;
+ case EOpBitCount: out.debug << "bitCount"; break;
+ case EOpFindLSB: out.debug << "findLSB"; break;
+ case EOpFindMSB: out.debug << "findMSB"; break;
+
+ case EOpNoise: out.debug << "noise"; break;
+
+ case EOpBallot: out.debug << "ballot"; break;
+ case EOpReadFirstInvocation: out.debug << "readFirstInvocation"; break;
+ case EOpAnyInvocation: out.debug << "anyInvocation"; break;
+ case EOpAllInvocations: out.debug << "allInvocations"; break;
+ case EOpAllInvocationsEqual: out.debug << "allInvocationsEqual"; break;
+
+ case EOpClip: out.debug << "clip"; break;
+ case EOpIsFinite: out.debug << "isfinite"; break;
+ case EOpLog10: out.debug << "log10"; break;
+ case EOpRcp: out.debug << "rcp"; break;
+ case EOpSaturate: out.debug << "saturate"; break;
+
+ default: out.debug.message(EPrefixError, "Bad unary op");
+ }
+
+ out.debug << " (" << node->getCompleteString() << ")";
+
+ out.debug << "\n";
+
+ return true;
+}
+
+bool TOutputTraverser::visitAggregate(TVisit /* visit */, TIntermAggregate* node)
+{
+ TInfoSink& out = infoSink;
+
+ if (node->getOp() == EOpNull) {
+ out.debug.message(EPrefixError, "node is still EOpNull!");
+ return true;
+ }
+
+ OutputTreeText(out, node, depth);
+
+ switch (node->getOp()) {
+ case EOpSequence: out.debug << "Sequence\n"; return true;
+ case EOpLinkerObjects: out.debug << "Linker Objects\n"; return true;
+ case EOpComma: out.debug << "Comma"; break;
+ case EOpFunction: out.debug << "Function Definition: " << node->getName(); break;
+ case EOpFunctionCall: out.debug << "Function Call: " << node->getName(); break;
+ case EOpParameters: out.debug << "Function Parameters: "; break;
+
+ case EOpConstructFloat: out.debug << "Construct float"; break;
+ case EOpConstructDouble:out.debug << "Construct double"; break;
+ case EOpConstructVec2: out.debug << "Construct vec2"; break;
+ case EOpConstructVec3: out.debug << "Construct vec3"; break;
+ case EOpConstructVec4: out.debug << "Construct vec4"; break;
+ case EOpConstructBool: out.debug << "Construct bool"; break;
+ case EOpConstructBVec2: out.debug << "Construct bvec2"; break;
+ case EOpConstructBVec3: out.debug << "Construct bvec3"; break;
+ case EOpConstructBVec4: out.debug << "Construct bvec4"; break;
+ case EOpConstructInt: out.debug << "Construct int"; break;
+ case EOpConstructIVec2: out.debug << "Construct ivec2"; break;
+ case EOpConstructIVec3: out.debug << "Construct ivec3"; break;
+ case EOpConstructIVec4: out.debug << "Construct ivec4"; break;
+ case EOpConstructUint: out.debug << "Construct uint"; break;
+ case EOpConstructUVec2: out.debug << "Construct uvec2"; break;
+ case EOpConstructUVec3: out.debug << "Construct uvec3"; break;
+ case EOpConstructUVec4: out.debug << "Construct uvec4"; break;
+ case EOpConstructInt64: out.debug << "Construct int64_t"; break;
+ case EOpConstructI64Vec2: out.debug << "Construct i64vec2"; break;
+ case EOpConstructI64Vec3: out.debug << "Construct i64vec3"; break;
+ case EOpConstructI64Vec4: out.debug << "Construct i64vec4"; break;
+ case EOpConstructUint64: out.debug << "Construct uint64_t"; break;
+ case EOpConstructU64Vec2: out.debug << "Construct u64vec2"; break;
+ case EOpConstructU64Vec3: out.debug << "Construct u64vec3"; break;
+ case EOpConstructU64Vec4: out.debug << "Construct u64vec4"; break;
+ case EOpConstructMat2x2: out.debug << "Construct mat2"; break;
+ case EOpConstructMat2x3: out.debug << "Construct mat2x3"; break;
+ case EOpConstructMat2x4: out.debug << "Construct mat2x4"; break;
+ case EOpConstructMat3x2: out.debug << "Construct mat3x2"; break;
+ case EOpConstructMat3x3: out.debug << "Construct mat3"; break;
+ case EOpConstructMat3x4: out.debug << "Construct mat3x4"; break;
+ case EOpConstructMat4x2: out.debug << "Construct mat4x2"; break;
+ case EOpConstructMat4x3: out.debug << "Construct mat4x3"; break;
+ case EOpConstructMat4x4: out.debug << "Construct mat4"; break;
+ case EOpConstructDMat2x2: out.debug << "Construct dmat2"; break;
+ case EOpConstructDMat2x3: out.debug << "Construct dmat2x3"; break;
+ case EOpConstructDMat2x4: out.debug << "Construct dmat2x4"; break;
+ case EOpConstructDMat3x2: out.debug << "Construct dmat3x2"; break;
+ case EOpConstructDMat3x3: out.debug << "Construct dmat3"; break;
+ case EOpConstructDMat3x4: out.debug << "Construct dmat3x4"; break;
+ case EOpConstructDMat4x2: out.debug << "Construct dmat4x2"; break;
+ case EOpConstructDMat4x3: out.debug << "Construct dmat4x3"; break;
+ case EOpConstructDMat4x4: out.debug << "Construct dmat4"; break;
+ case EOpConstructStruct: out.debug << "Construct structure"; break;
+ case EOpConstructTextureSampler: out.debug << "Construct combined texture-sampler"; break;
+
+ case EOpLessThan: out.debug << "Compare Less Than"; break;
+ case EOpGreaterThan: out.debug << "Compare Greater Than"; break;
+ case EOpLessThanEqual: out.debug << "Compare Less Than or Equal"; break;
+ case EOpGreaterThanEqual: out.debug << "Compare Greater Than or Equal"; break;
+ case EOpVectorEqual: out.debug << "Equal"; break;
+ case EOpVectorNotEqual: out.debug << "NotEqual"; break;
+
+ case EOpMod: out.debug << "mod"; break;
+ case EOpModf: out.debug << "modf"; break;
+ case EOpPow: out.debug << "pow"; break;
+
+ case EOpAtan: out.debug << "arc tangent"; break;
+
+ case EOpMin: out.debug << "min"; break;
+ case EOpMax: out.debug << "max"; break;
+ case EOpClamp: out.debug << "clamp"; break;
+ case EOpMix: out.debug << "mix"; break;
+ case EOpStep: out.debug << "step"; break;
+ case EOpSmoothStep: out.debug << "smoothstep"; break;
+
+ case EOpDistance: out.debug << "distance"; break;
+ case EOpDot: out.debug << "dot-product"; break;
+ case EOpCross: out.debug << "cross-product"; break;
+ case EOpFaceForward: out.debug << "face-forward"; break;
+ case EOpReflect: out.debug << "reflect"; break;
+ case EOpRefract: out.debug << "refract"; break;
+ case EOpMul: out.debug << "component-wise multiply"; break;
+ case EOpOuterProduct: out.debug << "outer product"; break;
+
+ case EOpEmitVertex: out.debug << "EmitVertex"; break;
+ case EOpEndPrimitive: out.debug << "EndPrimitive"; break;
+
+ case EOpBarrier: out.debug << "Barrier"; break;
+ case EOpMemoryBarrier: out.debug << "MemoryBarrier"; break;
+ case EOpMemoryBarrierAtomicCounter: out.debug << "MemoryBarrierAtomicCounter"; break;
+ case EOpMemoryBarrierBuffer: out.debug << "MemoryBarrierBuffer"; break;
+ case EOpMemoryBarrierImage: out.debug << "MemoryBarrierImage"; break;
+ case EOpMemoryBarrierShared: out.debug << "MemoryBarrierShared"; break;
+ case EOpGroupMemoryBarrier: out.debug << "GroupMemoryBarrier"; break;
+
+ case EOpReadInvocation: out.debug << "readInvocation"; break;
+
+ case EOpAtomicAdd: out.debug << "AtomicAdd"; break;
+ case EOpAtomicMin: out.debug << "AtomicMin"; break;
+ case EOpAtomicMax: out.debug << "AtomicMax"; break;
+ case EOpAtomicAnd: out.debug << "AtomicAnd"; break;
+ case EOpAtomicOr: out.debug << "AtomicOr"; break;
+ case EOpAtomicXor: out.debug << "AtomicXor"; break;
+ case EOpAtomicExchange: out.debug << "AtomicExchange"; break;
+ case EOpAtomicCompSwap: out.debug << "AtomicCompSwap"; break;
+
+ case EOpImageQuerySize: out.debug << "imageQuerySize"; break;
+ case EOpImageQuerySamples: out.debug << "imageQuerySamples"; break;
+ case EOpImageLoad: out.debug << "imageLoad"; break;
+ case EOpImageStore: out.debug << "imageStore"; break;
+ case EOpImageAtomicAdd: out.debug << "imageAtomicAdd"; break;
+ case EOpImageAtomicMin: out.debug << "imageAtomicMin"; break;
+ case EOpImageAtomicMax: out.debug << "imageAtomicMax"; break;
+ case EOpImageAtomicAnd: out.debug << "imageAtomicAnd"; break;
+ case EOpImageAtomicOr: out.debug << "imageAtomicOr"; break;
+ case EOpImageAtomicXor: out.debug << "imageAtomicXor"; break;
+ case EOpImageAtomicExchange: out.debug << "imageAtomicExchange"; break;
+ case EOpImageAtomicCompSwap: out.debug << "imageAtomicCompSwap"; break;
+
+ case EOpTextureQuerySize: out.debug << "textureSize"; break;
+ case EOpTextureQueryLod: out.debug << "textureQueryLod"; break;
+ case EOpTextureQueryLevels: out.debug << "textureQueryLevels"; break;
+ case EOpTextureQuerySamples: out.debug << "textureSamples"; break;
+ case EOpTexture: out.debug << "texture"; break;
+ case EOpTextureProj: out.debug << "textureProj"; break;
+ case EOpTextureLod: out.debug << "textureLod"; break;
+ case EOpTextureOffset: out.debug << "textureOffset"; break;
+ case EOpTextureFetch: out.debug << "textureFetch"; break;
+ case EOpTextureFetchOffset: out.debug << "textureFetchOffset"; break;
+ case EOpTextureProjOffset: out.debug << "textureProjOffset"; break;
+ case EOpTextureLodOffset: out.debug << "textureLodOffset"; break;
+ case EOpTextureProjLod: out.debug << "textureProjLod"; break;
+ case EOpTextureProjLodOffset: out.debug << "textureProjLodOffset"; break;
+ case EOpTextureGrad: out.debug << "textureGrad"; break;
+ case EOpTextureGradOffset: out.debug << "textureGradOffset"; break;
+ case EOpTextureProjGrad: out.debug << "textureProjGrad"; break;
+ case EOpTextureProjGradOffset: out.debug << "textureProjGradOffset"; break;
+ case EOpTextureGather: out.debug << "textureGather"; break;
+ case EOpTextureGatherOffset: out.debug << "textureGatherOffset"; break;
+ case EOpTextureGatherOffsets: out.debug << "textureGatherOffsets"; break;
+
+ case EOpAddCarry: out.debug << "addCarry"; break;
+ case EOpSubBorrow: out.debug << "subBorrow"; break;
+ case EOpUMulExtended: out.debug << "uMulExtended"; break;
+ case EOpIMulExtended: out.debug << "iMulExtended"; break;
+ case EOpBitfieldExtract: out.debug << "bitfieldExtract"; break;
+ case EOpBitfieldInsert: out.debug << "bitfieldInsert"; break;
+
+ case EOpFma: out.debug << "fma"; break;
+ case EOpFrexp: out.debug << "frexp"; break;
+ case EOpLdexp: out.debug << "ldexp"; break;
+
+ case EOpInterpolateAtSample: out.debug << "interpolateAtSample"; break;
+ case EOpInterpolateAtOffset: out.debug << "interpolateAtOffset"; break;
+
+ case EOpSinCos: out.debug << "sincos"; break;
+ case EOpGenMul: out.debug << "mul"; break;
+
+ default: out.debug.message(EPrefixError, "Bad aggregation op");
+ }
+
+ if (node->getOp() != EOpSequence && node->getOp() != EOpParameters)
+ out.debug << " (" << node->getCompleteString() << ")";
+
+ out.debug << "\n";
+
+ return true;
+}
+
+bool TOutputTraverser::visitSelection(TVisit /* visit */, TIntermSelection* node)
+{
+ TInfoSink& out = infoSink;
+
+ OutputTreeText(out, node, depth);
+
+ out.debug << "Test condition and select";
+ out.debug << " (" << node->getCompleteString() << ")\n";
+
+ ++depth;
+
+ OutputTreeText(out, node, depth);
+ out.debug << "Condition\n";
+ node->getCondition()->traverse(this);
+
+ OutputTreeText(out, node, depth);
+ if (node->getTrueBlock()) {
+ out.debug << "true case\n";
+ node->getTrueBlock()->traverse(this);
+ } else
+ out.debug << "true case is null\n";
+
+ if (node->getFalseBlock()) {
+ OutputTreeText(out, node, depth);
+ out.debug << "false case\n";
+ node->getFalseBlock()->traverse(this);
+ }
+
+ --depth;
+
+ return false;
+}
+
+static void OutputConstantUnion(TInfoSink& out, const TIntermTyped* node, const TConstUnionArray& constUnion, int depth)
+{
+ int size = node->getType().computeNumComponents();
+
+ for (int i = 0; i < size; i++) {
+ OutputTreeText(out, node, depth);
+ switch (constUnion[i].getType()) {
+ case EbtBool:
+ if (constUnion[i].getBConst())
+ out.debug << "true";
+ else
+ out.debug << "false";
+
+ out.debug << " (" << "const bool" << ")";
+
+ out.debug << "\n";
+ break;
+ case EbtFloat:
+ case EbtDouble:
+ {
+ const double value = constUnion[i].getDConst();
+ // Print infinity in a portable way, for test stability.
+ // Other cases may be needed in the future: negative infinity,
+ // and NaNs.
+ if (is_positive_infinity(value))
+ out.debug << "inf\n";
+ else {
+ const int maxSize = 300;
+ char buf[maxSize];
+ snprintf(buf, maxSize, "%f", value);
+
+ out.debug << buf << "\n";
+ }
+ }
+ break;
+ case EbtInt:
+ {
+ const int maxSize = 300;
+ char buf[maxSize];
+ snprintf(buf, maxSize, "%d (%s)", constUnion[i].getIConst(), "const int");
+
+ out.debug << buf << "\n";
+ }
+ break;
+ case EbtUint:
+ {
+ const int maxSize = 300;
+ char buf[maxSize];
+ snprintf(buf, maxSize, "%u (%s)", constUnion[i].getUConst(), "const uint");
+
+ out.debug << buf << "\n";
+ }
+ break;
+ case EbtInt64:
+ {
+ const int maxSize = 300;
+ char buf[maxSize];
+ snprintf(buf, maxSize, "%lld (%s)", constUnion[i].getI64Const(), "const int64_t");
+
+ out.debug << buf << "\n";
+ }
+ break;
+ case EbtUint64:
+ {
+ const int maxSize = 300;
+ char buf[maxSize];
+ snprintf(buf, maxSize, "%llu (%s)", constUnion[i].getU64Const(), "const uint64_t");
+
+ out.debug << buf << "\n";
+ }
+ break;
+ default:
+ out.info.message(EPrefixInternalError, "Unknown constant", node->getLoc());
+ break;
+ }
+ }
+}
+
+void TOutputTraverser::visitConstantUnion(TIntermConstantUnion* node)
+{
+ OutputTreeText(infoSink, node, depth);
+ infoSink.debug << "Constant:\n";
+
+ OutputConstantUnion(infoSink, node, node->getConstArray(), depth + 1);
+}
+
+void TOutputTraverser::visitSymbol(TIntermSymbol* node)
+{
+ OutputTreeText(infoSink, node, depth);
+
+ infoSink.debug << "'" << node->getName() << "' (" << node->getCompleteString() << ")\n";
+
+ if (! node->getConstArray().empty())
+ OutputConstantUnion(infoSink, node, node->getConstArray(), depth + 1);
+ else if (node->getConstSubtree()) {
+ incrementDepth(node);
+ node->getConstSubtree()->traverse(this);
+ decrementDepth();
+ }
+}
+
+bool TOutputTraverser::visitLoop(TVisit /* visit */, TIntermLoop* node)
+{
+ TInfoSink& out = infoSink;
+
+ OutputTreeText(out, node, depth);
+
+ out.debug << "Loop with condition ";
+ if (! node->testFirst())
+ out.debug << "not ";
+ out.debug << "tested first\n";
+
+ ++depth;
+
+ OutputTreeText(infoSink, node, depth);
+ if (node->getTest()) {
+ out.debug << "Loop Condition\n";
+ node->getTest()->traverse(this);
+ } else
+ out.debug << "No loop condition\n";
+
+ OutputTreeText(infoSink, node, depth);
+ if (node->getBody()) {
+ out.debug << "Loop Body\n";
+ node->getBody()->traverse(this);
+ } else
+ out.debug << "No loop body\n";
+
+ if (node->getTerminal()) {
+ OutputTreeText(infoSink, node, depth);
+ out.debug << "Loop Terminal Expression\n";
+ node->getTerminal()->traverse(this);
+ }
+
+ --depth;
+
+ return false;
+}
+
+bool TOutputTraverser::visitBranch(TVisit /* visit*/, TIntermBranch* node)
+{
+ TInfoSink& out = infoSink;
+
+ OutputTreeText(out, node, depth);
+
+ switch (node->getFlowOp()) {
+ case EOpKill: out.debug << "Branch: Kill"; break;
+ case EOpBreak: out.debug << "Branch: Break"; break;
+ case EOpContinue: out.debug << "Branch: Continue"; break;
+ case EOpReturn: out.debug << "Branch: Return"; break;
+ case EOpCase: out.debug << "case: "; break;
+ case EOpDefault: out.debug << "default: "; break;
+ default: out.debug << "Branch: Unknown Branch"; break;
+ }
+
+ if (node->getExpression()) {
+ out.debug << " with expression\n";
+ ++depth;
+ node->getExpression()->traverse(this);
+ --depth;
+ } else
+ out.debug << "\n";
+
+ return false;
+}
+
+bool TOutputTraverser::visitSwitch(TVisit /* visit */, TIntermSwitch* node)
+{
+ TInfoSink& out = infoSink;
+
+ OutputTreeText(out, node, depth);
+ out.debug << "switch\n";
+
+ OutputTreeText(out, node, depth);
+ out.debug << "condition\n";
+ ++depth;
+ node->getCondition()->traverse(this);
+
+ --depth;
+ OutputTreeText(out, node, depth);
+ out.debug << "body\n";
+ ++depth;
+ node->getBody()->traverse(this);
+
+ --depth;
+
+ return false;
+}
+
+//
+// This function is the one to call externally to start the traversal.
+// Individual functions can be initialized to 0 to skip processing of that
+// type of node. It's children will still be processed.
+//
+void TIntermediate::output(TInfoSink& infoSink, bool tree)
+{
+ infoSink.debug << "Shader version: " << version << "\n";
+ if (requestedExtensions.size() > 0) {
+ for (auto extIt = requestedExtensions.begin(); extIt != requestedExtensions.end(); ++extIt)
+ infoSink.debug << "Requested " << *extIt << "\n";
+ }
+
+ if (xfbMode)
+ infoSink.debug << "in xfb mode\n";
+
+ switch (language) {
+ case EShLangVertex:
+ break;
+
+ case EShLangTessControl:
+ infoSink.debug << "vertices = " << vertices << "\n";
+ break;
+
+ case EShLangTessEvaluation:
+ infoSink.debug << "input primitive = " << TQualifier::getGeometryString(inputPrimitive) << "\n";
+ infoSink.debug << "vertex spacing = " << TQualifier::getVertexSpacingString(vertexSpacing) << "\n";
+ infoSink.debug << "triangle order = " << TQualifier::getVertexOrderString(vertexOrder) << "\n";
+ if (pointMode)
+ infoSink.debug << "using point mode\n";
+ break;
+
+ case EShLangGeometry:
+ infoSink.debug << "invocations = " << invocations << "\n";
+ infoSink.debug << "max_vertices = " << vertices << "\n";
+ infoSink.debug << "input primitive = " << TQualifier::getGeometryString(inputPrimitive) << "\n";
+ infoSink.debug << "output primitive = " << TQualifier::getGeometryString(outputPrimitive) << "\n";
+ break;
+
+ case EShLangFragment:
+ if (pixelCenterInteger)
+ infoSink.debug << "gl_FragCoord pixel center is integer\n";
+ if (originUpperLeft)
+ infoSink.debug << "gl_FragCoord origin is upper left\n";
+ if (earlyFragmentTests)
+ infoSink.debug << "using early_fragment_tests\n";
+ if (depthLayout != EldNone)
+ infoSink.debug << "using " << TQualifier::getLayoutDepthString(depthLayout) << "\n";
+ if (blendEquations != 0) {
+ infoSink.debug << "using";
+ // blendEquations is a mask, decode it
+ for (TBlendEquationShift be = (TBlendEquationShift)0; be < EBlendCount; be = (TBlendEquationShift)(be + 1)) {
+ if (blendEquations & (1 << be))
+ infoSink.debug << " " << TQualifier::getBlendEquationString(be);
+ }
+ infoSink.debug << "\n";
+ }
+ break;
+
+ case EShLangCompute:
+ infoSink.debug << "local_size = (" << localSize[0] << ", " << localSize[1] << ", " << localSize[2] << ")\n";
+ {
+ if (localSizeSpecId[0] != TQualifier::layoutNotSet ||
+ localSizeSpecId[1] != TQualifier::layoutNotSet ||
+ localSizeSpecId[2] != TQualifier::layoutNotSet) {
+ infoSink.debug << "local_size ids = (" <<
+ localSizeSpecId[0] << ", " <<
+ localSizeSpecId[1] << ", " <<
+ localSizeSpecId[2] << ")\n";
+ }
+ }
+ break;
+
+ default:
+ break;
+ }
+
+ if (treeRoot == 0 || ! tree)
+ return;
+
+ TOutputTraverser it(infoSink);
+
+ treeRoot->traverse(&it);
+}
+
+} // end namespace glslang
diff --git a/chromium/third_party/glslang/src/glslang/MachineIndependent/limits.cpp b/chromium/third_party/glslang/src/glslang/MachineIndependent/limits.cpp
new file mode 100644
index 00000000000..49da930110d
--- /dev/null
+++ b/chromium/third_party/glslang/src/glslang/MachineIndependent/limits.cpp
@@ -0,0 +1,198 @@
+//
+//Copyright (C) 2013 LunarG, 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:
+//
+// Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 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.
+//
+// Neither the name of 3Dlabs Inc. Ltd. nor the names of its
+// contributors may be used to endorse or promote products derived
+// from this software without specific prior written permission.
+//
+//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+//"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 THE
+//COPYRIGHT HOLDERS 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.
+//
+
+//
+// Do sub tree walks for
+// 1) inductive loop bodies to see if the inductive variable is modified
+// 2) array-index expressions to see if they are "constant-index-expression"
+//
+// These are per Appendix A of ES 2.0:
+//
+// "Within the body of the loop, the loop index is not statically assigned to nor is it used as the
+// argument to a function out or inout parameter."
+//
+// "The following are constant-index-expressions:
+// - Constant expressions
+// - Loop indices as defined in section 4
+// - Expressions composed of both of the above"
+//
+// N.B.: assuming the last rule excludes function calls
+//
+
+#include "ParseHelper.h"
+
+namespace glslang {
+
+//
+// The inductive loop-body traverser.
+//
+// Just look at things that might modify the loop index.
+//
+
+class TInductiveTraverser : public TIntermTraverser {
+public:
+ TInductiveTraverser(int id, TSymbolTable& st)
+ : loopId(id), symbolTable(st), bad(false) { }
+
+ virtual bool visitBinary(TVisit, TIntermBinary* node);
+ virtual bool visitUnary(TVisit, TIntermUnary* node);
+ virtual bool visitAggregate(TVisit, TIntermAggregate* node);
+
+ int loopId; // unique ID of the symbol that's the loop inductive variable
+ TSymbolTable& symbolTable;
+ bool bad;
+ TSourceLoc badLoc;
+
+protected:
+ TInductiveTraverser(TInductiveTraverser&);
+ TInductiveTraverser& operator=(TInductiveTraverser&);
+};
+
+// check binary operations for those modifying the loop index
+bool TInductiveTraverser::visitBinary(TVisit /* visit */, TIntermBinary* node)
+{
+ if (node->modifiesState() && node->getLeft()->getAsSymbolNode() &&
+ node->getLeft()->getAsSymbolNode()->getId() == loopId) {
+ bad = true;
+ badLoc = node->getLoc();
+ }
+
+ return true;
+}
+
+// check unary operations for those modifying the loop index
+bool TInductiveTraverser::visitUnary(TVisit /* visit */, TIntermUnary* node)
+{
+ if (node->modifiesState() && node->getOperand()->getAsSymbolNode() &&
+ node->getOperand()->getAsSymbolNode()->getId() == loopId) {
+ bad = true;
+ badLoc = node->getLoc();
+ }
+
+ return true;
+}
+
+// check function calls for arguments modifying the loop index
+bool TInductiveTraverser::visitAggregate(TVisit /* visit */, TIntermAggregate* node)
+{
+ if (node->getOp() == EOpFunctionCall) {
+ // see if an out or inout argument is the loop index
+ const TIntermSequence& args = node->getSequence();
+ for (int i = 0; i < (int)args.size(); ++i) {
+ if (args[i]->getAsSymbolNode() && args[i]->getAsSymbolNode()->getId() == loopId) {
+ TSymbol* function = symbolTable.find(node->getName());
+ const TType* type = (*function->getAsFunction())[i].type;
+ if (type->getQualifier().storage == EvqOut ||
+ type->getQualifier().storage == EvqInOut) {
+ bad = true;
+ badLoc = node->getLoc();
+ }
+ }
+ }
+ }
+
+ return true;
+}
+
+//
+// External function to call for loop check.
+//
+void TParseContext::inductiveLoopBodyCheck(TIntermNode* body, int loopId, TSymbolTable& symbolTable)
+{
+ TInductiveTraverser it(loopId, symbolTable);
+
+ if (body == nullptr)
+ return;
+
+ body->traverse(&it);
+
+ if (it.bad)
+ error(it.badLoc, "inductive loop index modified", "limitations", "");
+}
+
+//
+// The "constant-index-expression" tranverser.
+//
+// Just look at things that can form an index.
+//
+
+class TIndexTraverser : public TIntermTraverser {
+public:
+ TIndexTraverser(const TIdSetType& ids) : inductiveLoopIds(ids), bad(false) { }
+ virtual void visitSymbol(TIntermSymbol* symbol);
+ virtual bool visitAggregate(TVisit, TIntermAggregate* node);
+ const TIdSetType& inductiveLoopIds;
+ bool bad;
+ TSourceLoc badLoc;
+
+protected:
+ TIndexTraverser(TIndexTraverser&);
+ TIndexTraverser& operator=(TIndexTraverser&);
+};
+
+// make sure symbols are inductive-loop indexes
+void TIndexTraverser::visitSymbol(TIntermSymbol* symbol)
+{
+ if (inductiveLoopIds.find(symbol->getId()) == inductiveLoopIds.end()) {
+ bad = true;
+ badLoc = symbol->getLoc();
+ }
+}
+
+// check for function calls, assuming they are bad; spec. doesn't really say
+bool TIndexTraverser::visitAggregate(TVisit /* visit */, TIntermAggregate* node)
+{
+ if (node->getOp() == EOpFunctionCall) {
+ bad = true;
+ badLoc = node->getLoc();
+ }
+
+ return true;
+}
+
+//
+// External function to call for loop check.
+//
+void TParseContext::constantIndexExpressionCheck(TIntermNode* index)
+{
+ TIndexTraverser it(inductiveLoopIds);
+
+ index->traverse(&it);
+
+ if (it.bad)
+ error(it.badLoc, "Non-constant-index-expression", "limitations", "");
+}
+
+} // end namespace glslang
diff --git a/chromium/third_party/glslang/src/glslang/MachineIndependent/linkValidate.cpp b/chromium/third_party/glslang/src/glslang/MachineIndependent/linkValidate.cpp
new file mode 100644
index 00000000000..1cda57d36e9
--- /dev/null
+++ b/chromium/third_party/glslang/src/glslang/MachineIndependent/linkValidate.cpp
@@ -0,0 +1,1050 @@
+//
+//Copyright (C) 2013 LunarG, 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:
+//
+// Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 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.
+//
+// Neither the name of 3Dlabs Inc. Ltd. nor the names of its
+// contributors may be used to endorse or promote products derived
+// from this software without specific prior written permission.
+//
+//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+//"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 THE
+//COPYRIGHT HOLDERS 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.
+//
+
+//
+// Do link-time merging and validation of intermediate representations.
+//
+// Basic model is that during compilation, each compilation unit (shader) is
+// compiled into one TIntermediate instance. Then, at link time, multiple
+// units for the same stage can be merged together, which can generate errors.
+// Then, after all merging, a single instance of TIntermediate represents
+// the whole stage. A final error check can be done on the resulting stage,
+// even if no merging was done (i.e., the stage was only one compilation unit).
+//
+
+#include "localintermediate.h"
+#include "../Include/InfoSink.h"
+
+namespace glslang {
+
+//
+// Link-time error emitter.
+//
+void TIntermediate::error(TInfoSink& infoSink, const char* message)
+{
+ infoSink.info.prefix(EPrefixError);
+ infoSink.info << "Linking " << StageName(language) << " stage: " << message << "\n";
+
+ ++numErrors;
+}
+
+// TODO: 4.4 offset/align: "Two blocks linked together in the same program with the same block
+// name must have the exact same set of members qualified with offset and their integral-constant
+// expression values must be the same, or a link-time error results."
+
+//
+// Merge the information from 'unit' into 'this'
+//
+void TIntermediate::merge(TInfoSink& infoSink, TIntermediate& unit)
+{
+ if (source == EShSourceNone)
+ source = unit.source;
+
+ if (source != unit.source)
+ error(infoSink, "can't link compilation units from different source languages");
+
+ if (source == EShSourceHlsl && unit.entryPoint.size() > 0) {
+ if (entryPoint.size() > 0)
+ error(infoSink, "can't handle multiple entry points per stage");
+ else
+ entryPoint = unit.entryPoint;
+ }
+ numMains += unit.numMains;
+ numErrors += unit.numErrors;
+ numPushConstants += unit.numPushConstants;
+ callGraph.insert(callGraph.end(), unit.callGraph.begin(), unit.callGraph.end());
+
+ if (originUpperLeft != unit.originUpperLeft || pixelCenterInteger != unit.pixelCenterInteger)
+ error(infoSink, "gl_FragCoord redeclarations must match across shaders\n");
+
+ if (! earlyFragmentTests)
+ earlyFragmentTests = unit.earlyFragmentTests;
+
+ if (depthLayout == EldNone)
+ depthLayout = unit.depthLayout;
+ else if (depthLayout != unit.depthLayout)
+ error(infoSink, "Contradictory depth layouts");
+
+ blendEquations |= unit.blendEquations;
+
+ if (inputPrimitive == ElgNone)
+ inputPrimitive = unit.inputPrimitive;
+ else if (inputPrimitive != unit.inputPrimitive)
+ error(infoSink, "Contradictory input layout primitives");
+
+ if (outputPrimitive == ElgNone)
+ outputPrimitive = unit.outputPrimitive;
+ else if (outputPrimitive != unit.outputPrimitive)
+ error(infoSink, "Contradictory output layout primitives");
+
+ if (vertices == TQualifier::layoutNotSet)
+ vertices = unit.vertices;
+ else if (vertices != unit.vertices) {
+ if (language == EShLangGeometry)
+ error(infoSink, "Contradictory layout max_vertices values");
+ else if (language == EShLangTessControl)
+ error(infoSink, "Contradictory layout vertices values");
+ else
+ assert(0);
+ }
+
+ if (vertexSpacing == EvsNone)
+ vertexSpacing = unit.vertexSpacing;
+ else if (vertexSpacing != unit.vertexSpacing)
+ error(infoSink, "Contradictory input vertex spacing");
+
+ if (vertexOrder == EvoNone)
+ vertexOrder = unit.vertexOrder;
+ else if (vertexOrder != unit.vertexOrder)
+ error(infoSink, "Contradictory triangle ordering");
+
+ if (unit.pointMode)
+ pointMode = true;
+
+ for (int i = 0; i < 3; ++i) {
+ if (localSize[i] > 1)
+ localSize[i] = unit.localSize[i];
+ else if (localSize[i] != unit.localSize[i])
+ error(infoSink, "Contradictory local size");
+
+ if (localSizeSpecId[i] != TQualifier::layoutNotSet)
+ localSizeSpecId[i] = unit.localSizeSpecId[i];
+ else if (localSizeSpecId[i] != unit.localSizeSpecId[i])
+ error(infoSink, "Contradictory local size specialization ids");
+ }
+
+ if (unit.xfbMode)
+ xfbMode = true;
+ for (size_t b = 0; b < xfbBuffers.size(); ++b) {
+ if (xfbBuffers[b].stride == TQualifier::layoutXfbStrideEnd)
+ xfbBuffers[b].stride = unit.xfbBuffers[b].stride;
+ else if (xfbBuffers[b].stride != unit.xfbBuffers[b].stride)
+ error(infoSink, "Contradictory xfb_stride");
+ xfbBuffers[b].implicitStride = std::max(xfbBuffers[b].implicitStride, unit.xfbBuffers[b].implicitStride);
+ if (unit.xfbBuffers[b].containsDouble)
+ xfbBuffers[b].containsDouble = true;
+ // TODO: 4.4 link: enhanced layouts: compare ranges
+ }
+
+ if (unit.treeRoot == 0)
+ return;
+
+ if (treeRoot == 0) {
+ treeRoot = unit.treeRoot;
+ version = unit.version;
+ requestedExtensions = unit.requestedExtensions;
+ return;
+ }
+
+ // Getting this far means we have two existing trees to merge...
+
+ version = std::max(version, unit.version);
+ requestedExtensions.insert(unit.requestedExtensions.begin(), unit.requestedExtensions.end());
+
+ // Get the top-level globals of each unit
+ TIntermSequence& globals = treeRoot->getAsAggregate()->getSequence();
+ TIntermSequence& unitGlobals = unit.treeRoot->getAsAggregate()->getSequence();
+
+ // Get the linker-object lists
+ TIntermSequence& linkerObjects = findLinkerObjects();
+ TIntermSequence& unitLinkerObjects = unit.findLinkerObjects();
+
+ mergeBodies(infoSink, globals, unitGlobals);
+ mergeLinkerObjects(infoSink, linkerObjects, unitLinkerObjects);
+
+ ioAccessed.insert(unit.ioAccessed.begin(), unit.ioAccessed.end());
+}
+
+//
+// Merge the function bodies and global-level initializers from unitGlobals into globals.
+// Will error check duplication of function bodies for the same signature.
+//
+void TIntermediate::mergeBodies(TInfoSink& infoSink, TIntermSequence& globals, const TIntermSequence& unitGlobals)
+{
+ // TODO: link-time performance: Processing in alphabetical order will be faster
+
+ // Error check the global objects, not including the linker objects
+ for (unsigned int child = 0; child < globals.size() - 1; ++child) {
+ for (unsigned int unitChild = 0; unitChild < unitGlobals.size() - 1; ++unitChild) {
+ TIntermAggregate* body = globals[child]->getAsAggregate();
+ TIntermAggregate* unitBody = unitGlobals[unitChild]->getAsAggregate();
+ if (body && unitBody && body->getOp() == EOpFunction && unitBody->getOp() == EOpFunction && body->getName() == unitBody->getName()) {
+ error(infoSink, "Multiple function bodies in multiple compilation units for the same signature in the same stage:");
+ infoSink.info << " " << globals[child]->getAsAggregate()->getName() << "\n";
+ }
+ }
+ }
+
+ // Merge the global objects, just in front of the linker objects
+ globals.insert(globals.end() - 1, unitGlobals.begin(), unitGlobals.end() - 1);
+}
+
+//
+// Merge the linker objects from unitLinkerObjects into linkerObjects.
+// Duplication is expected and filtered out, but contradictions are an error.
+//
+void TIntermediate::mergeLinkerObjects(TInfoSink& infoSink, TIntermSequence& linkerObjects, const TIntermSequence& unitLinkerObjects)
+{
+ // Error check and merge the linker objects (duplicates should not be created)
+ std::size_t initialNumLinkerObjects = linkerObjects.size();
+ for (unsigned int unitLinkObj = 0; unitLinkObj < unitLinkerObjects.size(); ++unitLinkObj) {
+ bool merge = true;
+ for (std::size_t linkObj = 0; linkObj < initialNumLinkerObjects; ++linkObj) {
+ TIntermSymbol* symbol = linkerObjects[linkObj]->getAsSymbolNode();
+ TIntermSymbol* unitSymbol = unitLinkerObjects[unitLinkObj]->getAsSymbolNode();
+ assert(symbol && unitSymbol);
+ if (symbol->getName() == unitSymbol->getName()) {
+ // filter out copy
+ merge = false;
+
+ // but if one has an initializer and the other does not, update
+ // the initializer
+ if (symbol->getConstArray().empty() && ! unitSymbol->getConstArray().empty())
+ symbol->setConstArray(unitSymbol->getConstArray());
+
+ // Similarly for binding
+ if (! symbol->getQualifier().hasBinding() && unitSymbol->getQualifier().hasBinding())
+ symbol->getQualifier().layoutBinding = unitSymbol->getQualifier().layoutBinding;
+
+ // Update implicit array sizes
+ mergeImplicitArraySizes(symbol->getWritableType(), unitSymbol->getType());
+
+ // Check for consistent types/qualification/initializers etc.
+ mergeErrorCheck(infoSink, *symbol, *unitSymbol, false);
+ }
+ }
+ if (merge)
+ linkerObjects.push_back(unitLinkerObjects[unitLinkObj]);
+ }
+}
+
+// TODO 4.5 link functionality: cull distance array size checking
+
+// Recursively merge the implicit array sizes through the objects' respective type trees.
+void TIntermediate::mergeImplicitArraySizes(TType& type, const TType& unitType)
+{
+ if (type.isImplicitlySizedArray() && unitType.isArray()) {
+ int newImplicitArraySize = unitType.isImplicitlySizedArray() ? unitType.getImplicitArraySize() : unitType.getOuterArraySize();
+ if (newImplicitArraySize > type.getImplicitArraySize ())
+ type.setImplicitArraySize(newImplicitArraySize);
+ }
+
+ // Type mismatches are caught and reported after this, just be careful for now.
+ if (! type.isStruct() || ! unitType.isStruct() || type.getStruct()->size() != unitType.getStruct()->size())
+ return;
+
+ for (int i = 0; i < (int)type.getStruct()->size(); ++i)
+ mergeImplicitArraySizes(*(*type.getStruct())[i].type, *(*unitType.getStruct())[i].type);
+}
+
+//
+// Compare two global objects from two compilation units and see if they match
+// well enough. Rules can be different for intra- vs. cross-stage matching.
+//
+// This function only does one of intra- or cross-stage matching per call.
+//
+void TIntermediate::mergeErrorCheck(TInfoSink& infoSink, const TIntermSymbol& symbol, const TIntermSymbol& unitSymbol, bool crossStage)
+{
+ bool writeTypeComparison = false;
+
+ // Types have to match
+ if (symbol.getType() != unitSymbol.getType()) {
+ error(infoSink, "Types must match:");
+ writeTypeComparison = true;
+ }
+
+ // Qualifiers have to (almost) match
+
+ // Storage...
+ if (symbol.getQualifier().storage != unitSymbol.getQualifier().storage) {
+ error(infoSink, "Storage qualifiers must match:");
+ writeTypeComparison = true;
+ }
+
+ // Precision...
+ if (symbol.getQualifier().precision != unitSymbol.getQualifier().precision) {
+ error(infoSink, "Precision qualifiers must match:");
+ writeTypeComparison = true;
+ }
+
+ // Invariance...
+ if (! crossStage && symbol.getQualifier().invariant != unitSymbol.getQualifier().invariant) {
+ error(infoSink, "Presence of invariant qualifier must match:");
+ writeTypeComparison = true;
+ }
+
+ // Precise...
+ if (! crossStage && symbol.getQualifier().noContraction != unitSymbol.getQualifier().noContraction) {
+ error(infoSink, "Presence of precise qualifier must match:");
+ writeTypeComparison = true;
+ }
+
+ // Auxiliary and interpolation...
+ if (symbol.getQualifier().centroid != unitSymbol.getQualifier().centroid ||
+ symbol.getQualifier().smooth != unitSymbol.getQualifier().smooth ||
+ symbol.getQualifier().flat != unitSymbol.getQualifier().flat ||
+ symbol.getQualifier().sample != unitSymbol.getQualifier().sample ||
+ symbol.getQualifier().patch != unitSymbol.getQualifier().patch ||
+ symbol.getQualifier().nopersp != unitSymbol.getQualifier().nopersp) {
+ error(infoSink, "Interpolation and auxiliary storage qualifiers must match:");
+ writeTypeComparison = true;
+ }
+
+ // Memory...
+ if (symbol.getQualifier().coherent != unitSymbol.getQualifier().coherent ||
+ symbol.getQualifier().volatil != unitSymbol.getQualifier().volatil ||
+ symbol.getQualifier().restrict != unitSymbol.getQualifier().restrict ||
+ symbol.getQualifier().readonly != unitSymbol.getQualifier().readonly ||
+ symbol.getQualifier().writeonly != unitSymbol.getQualifier().writeonly) {
+ error(infoSink, "Memory qualifiers must match:");
+ writeTypeComparison = true;
+ }
+
+ // Layouts...
+ // TODO: 4.4 enhanced layouts: Generalize to include offset/align: current spec
+ // requires separate user-supplied offset from actual computed offset, but
+ // current implementation only has one offset.
+ if (symbol.getQualifier().layoutMatrix != unitSymbol.getQualifier().layoutMatrix ||
+ symbol.getQualifier().layoutPacking != unitSymbol.getQualifier().layoutPacking ||
+ symbol.getQualifier().layoutLocation != unitSymbol.getQualifier().layoutLocation ||
+ symbol.getQualifier().layoutComponent != unitSymbol.getQualifier().layoutComponent ||
+ symbol.getQualifier().layoutIndex != unitSymbol.getQualifier().layoutIndex ||
+ symbol.getQualifier().layoutBinding != unitSymbol.getQualifier().layoutBinding ||
+ (symbol.getQualifier().hasBinding() && (symbol.getQualifier().layoutOffset != unitSymbol.getQualifier().layoutOffset))) {
+ error(infoSink, "Layout qualification must match:");
+ writeTypeComparison = true;
+ }
+
+ // Initializers have to match, if both are present, and if we don't already know the types don't match
+ if (! writeTypeComparison) {
+ if (! symbol.getConstArray().empty() && ! unitSymbol.getConstArray().empty()) {
+ if (symbol.getConstArray() != unitSymbol.getConstArray()) {
+ error(infoSink, "Initializers must match:");
+ infoSink.info << " " << symbol.getName() << "\n";
+ }
+ }
+ }
+
+ if (writeTypeComparison)
+ infoSink.info << " " << symbol.getName() << ": \"" << symbol.getType().getCompleteString() << "\" versus \"" <<
+ unitSymbol.getType().getCompleteString() << "\"\n";
+}
+
+//
+// Do final link-time error checking of a complete (merged) intermediate representation.
+// (Much error checking was done during merging).
+//
+// Also, lock in defaults of things not set, including array sizes.
+//
+void TIntermediate::finalCheck(TInfoSink& infoSink)
+{
+ if (source == EShSourceGlsl && numMains < 1)
+ error(infoSink, "Missing entry point: Each stage requires one \"void main()\" entry point");
+
+ if (numPushConstants > 1)
+ error(infoSink, "Only one push_constant block is allowed per stage");
+
+ // recursion checking
+ checkCallGraphCycles(infoSink);
+
+ // overlap/alias/missing I/O, etc.
+ inOutLocationCheck(infoSink);
+
+ // invocations
+ if (invocations == TQualifier::layoutNotSet)
+ invocations = 1;
+
+ if (inIoAccessed("gl_ClipDistance") && inIoAccessed("gl_ClipVertex"))
+ error(infoSink, "Can only use one of gl_ClipDistance or gl_ClipVertex (gl_ClipDistance is preferred)");
+ if (inIoAccessed("gl_CullDistance") && inIoAccessed("gl_ClipVertex"))
+ error(infoSink, "Can only use one of gl_CullDistance or gl_ClipVertex (gl_ClipDistance is preferred)");
+
+ if (userOutputUsed() && (inIoAccessed("gl_FragColor") || inIoAccessed("gl_FragData")))
+ error(infoSink, "Cannot use gl_FragColor or gl_FragData when using user-defined outputs");
+ if (inIoAccessed("gl_FragColor") && inIoAccessed("gl_FragData"))
+ error(infoSink, "Cannot use both gl_FragColor and gl_FragData");
+
+ for (size_t b = 0; b < xfbBuffers.size(); ++b) {
+ if (xfbBuffers[b].containsDouble)
+ RoundToPow2(xfbBuffers[b].implicitStride, 8);
+
+ // "It is a compile-time or link-time error to have
+ // any xfb_offset that overflows xfb_stride, whether stated on declarations before or after the xfb_stride, or
+ // in different compilation units. While xfb_stride can be declared multiple times for the same buffer, it is a
+ // compile-time or link-time error to have different values specified for the stride for the same buffer."
+ if (xfbBuffers[b].stride != TQualifier::layoutXfbStrideEnd && xfbBuffers[b].implicitStride > xfbBuffers[b].stride) {
+ error(infoSink, "xfb_stride is too small to hold all buffer entries:");
+ infoSink.info.prefix(EPrefixError);
+ infoSink.info << " xfb_buffer " << (unsigned int)b << ", xfb_stride " << xfbBuffers[b].stride << ", minimum stride needed: " << xfbBuffers[b].implicitStride << "\n";
+ }
+ if (xfbBuffers[b].stride == TQualifier::layoutXfbStrideEnd)
+ xfbBuffers[b].stride = xfbBuffers[b].implicitStride;
+
+ // "If the buffer is capturing any
+ // outputs with double-precision components, the stride must be a multiple of 8, otherwise it must be a
+ // multiple of 4, or a compile-time or link-time error results."
+ if (xfbBuffers[b].containsDouble && ! IsMultipleOfPow2(xfbBuffers[b].stride, 8)) {
+ error(infoSink, "xfb_stride must be multiple of 8 for buffer holding a double:");
+ infoSink.info.prefix(EPrefixError);
+ infoSink.info << " xfb_buffer " << (unsigned int)b << ", xfb_stride " << xfbBuffers[b].stride << "\n";
+ } else if (! IsMultipleOfPow2(xfbBuffers[b].stride, 4)) {
+ error(infoSink, "xfb_stride must be multiple of 4:");
+ infoSink.info.prefix(EPrefixError);
+ infoSink.info << " xfb_buffer " << (unsigned int)b << ", xfb_stride " << xfbBuffers[b].stride << "\n";
+ }
+
+ // "The resulting stride (implicit or explicit), when divided by 4, must be less than or equal to the
+ // implementation-dependent constant gl_MaxTransformFeedbackInterleavedComponents."
+ if (xfbBuffers[b].stride > (unsigned int)(4 * resources.maxTransformFeedbackInterleavedComponents)) {
+ error(infoSink, "xfb_stride is too large:");
+ infoSink.info.prefix(EPrefixError);
+ infoSink.info << " xfb_buffer " << (unsigned int)b << ", components (1/4 stride) needed are " << xfbBuffers[b].stride/4 << ", gl_MaxTransformFeedbackInterleavedComponents is " << resources.maxTransformFeedbackInterleavedComponents << "\n";
+ }
+ }
+
+ switch (language) {
+ case EShLangVertex:
+ break;
+ case EShLangTessControl:
+ if (vertices == TQualifier::layoutNotSet)
+ error(infoSink, "At least one shader must specify an output layout(vertices=...)");
+ break;
+ case EShLangTessEvaluation:
+ if (inputPrimitive == ElgNone)
+ error(infoSink, "At least one shader must specify an input layout primitive");
+ if (vertexSpacing == EvsNone)
+ vertexSpacing = EvsEqual;
+ if (vertexOrder == EvoNone)
+ vertexOrder = EvoCcw;
+ break;
+ case EShLangGeometry:
+ if (inputPrimitive == ElgNone)
+ error(infoSink, "At least one shader must specify an input layout primitive");
+ if (outputPrimitive == ElgNone)
+ error(infoSink, "At least one shader must specify an output layout primitive");
+ if (vertices == TQualifier::layoutNotSet)
+ error(infoSink, "At least one shader must specify a layout(max_vertices = value)");
+ break;
+ case EShLangFragment:
+ break;
+ case EShLangCompute:
+ break;
+ default:
+ error(infoSink, "Unknown Stage.");
+ break;
+ }
+
+ // Process the tree for any node-specific work.
+ class TFinalLinkTraverser : public TIntermTraverser {
+ public:
+ TFinalLinkTraverser() { }
+ virtual ~TFinalLinkTraverser() { }
+
+ virtual void visitSymbol(TIntermSymbol* symbol)
+ {
+ // Implicitly size arrays.
+ symbol->getWritableType().adoptImplicitArraySizes();
+ }
+ } finalLinkTraverser;
+
+ treeRoot->traverse(&finalLinkTraverser);
+}
+
+//
+// See if the call graph contains any static recursion, which is disallowed
+// by the specification.
+//
+void TIntermediate::checkCallGraphCycles(TInfoSink& infoSink)
+{
+ // Reset everything, once.
+ for (TGraph::iterator call = callGraph.begin(); call != callGraph.end(); ++call) {
+ call->visited = false;
+ call->currentPath = false;
+ call->errorGiven = false;
+ }
+
+ //
+ // Loop, looking for a new connected subgraph. One subgraph is handled per loop iteration.
+ //
+
+ TCall* newRoot;
+ do {
+ // See if we have unvisited parts of the graph.
+ newRoot = 0;
+ for (TGraph::iterator call = callGraph.begin(); call != callGraph.end(); ++call) {
+ if (! call->visited) {
+ newRoot = &(*call);
+ break;
+ }
+ }
+
+ // If not, we are done.
+ if (! newRoot)
+ break;
+
+ // Otherwise, we found a new subgraph, process it:
+ // See what all can be reached by this new root, and if any of
+ // that is recursive. This is done by depth-first traversals, seeing
+ // if a new call is found that was already in the currentPath (a back edge),
+ // thereby detecting recursion.
+ std::list<TCall*> stack;
+ newRoot->currentPath = true; // currentPath will be true iff it is on the stack
+ stack.push_back(newRoot);
+ while (! stack.empty()) {
+ // get a caller
+ TCall* call = stack.back();
+
+ // Add to the stack just one callee.
+ // This algorithm always terminates, because only !visited and !currentPath causes a push
+ // and all pushes change currentPath to true, and all pops change visited to true.
+ TGraph::iterator child = callGraph.begin();
+ for (; child != callGraph.end(); ++child) {
+
+ // If we already visited this node, its whole subgraph has already been processed, so skip it.
+ if (child->visited)
+ continue;
+
+ if (call->callee == child->caller) {
+ if (child->currentPath) {
+ // Then, we found a back edge
+ if (! child->errorGiven) {
+ error(infoSink, "Recursion detected:");
+ infoSink.info << " " << call->callee << " calling " << child->callee << "\n";
+ child->errorGiven = true;
+ recursive = true;
+ }
+ } else {
+ child->currentPath = true;
+ stack.push_back(&(*child));
+ break;
+ }
+ }
+ }
+ if (child == callGraph.end()) {
+ // no more callees, we bottomed out, never look at this node again
+ stack.back()->currentPath = false;
+ stack.back()->visited = true;
+ stack.pop_back();
+ }
+ } // end while, meaning nothing left to process in this subtree
+
+ } while (newRoot); // redundant loop check; should always exit via the 'break' above
+}
+
+//
+// Satisfy rules for location qualifiers on inputs and outputs
+//
+void TIntermediate::inOutLocationCheck(TInfoSink& infoSink)
+{
+ // ES 3.0 requires all outputs to have location qualifiers if there is more than one output
+ bool fragOutWithNoLocation = false;
+ int numFragOut = 0;
+
+ // TODO: linker functionality: location collision checking
+
+ TIntermSequence& linkObjects = findLinkerObjects();
+ for (size_t i = 0; i < linkObjects.size(); ++i) {
+ const TType& type = linkObjects[i]->getAsTyped()->getType();
+ const TQualifier& qualifier = type.getQualifier();
+ if (language == EShLangFragment) {
+ if (qualifier.storage == EvqVaryingOut && qualifier.builtIn == EbvNone) {
+ ++numFragOut;
+ if (!qualifier.hasAnyLocation())
+ fragOutWithNoLocation = true;
+ }
+ }
+ }
+
+ if (profile == EEsProfile) {
+ if (numFragOut > 1 && fragOutWithNoLocation)
+ error(infoSink, "when more than one fragment shader output, all must have location qualifiers");
+ }
+}
+
+TIntermSequence& TIntermediate::findLinkerObjects() const
+{
+ // Get the top-level globals
+ TIntermSequence& globals = treeRoot->getAsAggregate()->getSequence();
+
+ // Get the last member of the sequences, expected to be the linker-object lists
+ assert(globals.back()->getAsAggregate()->getOp() == EOpLinkerObjects);
+
+ return globals.back()->getAsAggregate()->getSequence();
+}
+
+// See if a variable was both a user-declared output and used.
+// Note: the spec discusses writing to one, but this looks at read or write, which
+// is more useful, and perhaps the spec should be changed to reflect that.
+bool TIntermediate::userOutputUsed() const
+{
+ const TIntermSequence& linkerObjects = findLinkerObjects();
+
+ bool found = false;
+ for (size_t i = 0; i < linkerObjects.size(); ++i) {
+ const TIntermSymbol& symbolNode = *linkerObjects[i]->getAsSymbolNode();
+ if (symbolNode.getQualifier().storage == EvqVaryingOut &&
+ symbolNode.getName().compare(0, 3, "gl_") != 0 &&
+ inIoAccessed(symbolNode.getName())) {
+ found = true;
+ break;
+ }
+ }
+
+ return found;
+}
+
+// Accumulate locations used for inputs, outputs, and uniforms, and check for collisions
+// as the accumulation is done.
+//
+// Returns < 0 if no collision, >= 0 if collision and the value returned is a colliding value.
+//
+// typeCollision is set to true if there is no direct collision, but the types in the same location
+// are different.
+//
+int TIntermediate::addUsedLocation(const TQualifier& qualifier, const TType& type, bool& typeCollision)
+{
+ typeCollision = false;
+
+ int set;
+ if (qualifier.isPipeInput())
+ set = 0;
+ else if (qualifier.isPipeOutput())
+ set = 1;
+ else if (qualifier.storage == EvqUniform)
+ set = 2;
+ else if (qualifier.storage == EvqBuffer)
+ set = 3;
+ else
+ return -1;
+
+ int size;
+ if (qualifier.isUniformOrBuffer()) {
+ if (type.isArray())
+ size = type.getCumulativeArraySize();
+ else
+ size = 1;
+ } else {
+ // Strip off the outer array dimension for those having an extra one.
+ if (type.isArray() && qualifier.isArrayedIo(language)) {
+ TType elementType(type, 0);
+ size = computeTypeLocationSize(elementType);
+ } else
+ size = computeTypeLocationSize(type);
+ }
+
+ TRange locationRange(qualifier.layoutLocation, qualifier.layoutLocation + size - 1);
+ TRange componentRange(0, 3);
+ if (qualifier.hasComponent()) {
+ componentRange.start = qualifier.layoutComponent;
+ componentRange.last = componentRange.start + type.getVectorSize() - 1;
+ }
+ TIoRange range(locationRange, componentRange, type.getBasicType(), qualifier.hasIndex() ? qualifier.layoutIndex : 0);
+
+ // check for collisions, except for vertex inputs on desktop
+ if (! (profile != EEsProfile && language == EShLangVertex && qualifier.isPipeInput())) {
+ for (size_t r = 0; r < usedIo[set].size(); ++r) {
+ if (range.overlap(usedIo[set][r])) {
+ // there is a collision; pick one
+ return std::max(locationRange.start, usedIo[set][r].location.start);
+ } else if (locationRange.overlap(usedIo[set][r].location) && type.getBasicType() != usedIo[set][r].basicType) {
+ // aliased-type mismatch
+ typeCollision = true;
+ return std::max(locationRange.start, usedIo[set][r].location.start);
+ }
+ }
+ }
+
+ usedIo[set].push_back(range);
+
+ return -1; // no collision
+}
+
+// Accumulate locations used for inputs, outputs, and uniforms, and check for collisions
+// as the accumulation is done.
+//
+// Returns < 0 if no collision, >= 0 if collision and the value returned is a colliding value.
+//
+int TIntermediate::addUsedOffsets(int binding, int offset, int numOffsets)
+{
+ TRange bindingRange(binding, binding);
+ TRange offsetRange(offset, offset + numOffsets - 1);
+ TOffsetRange range(bindingRange, offsetRange);
+
+ // check for collisions, except for vertex inputs on desktop
+ for (size_t r = 0; r < usedAtomics.size(); ++r) {
+ if (range.overlap(usedAtomics[r])) {
+ // there is a collision; pick one
+ return std::max(offset, usedAtomics[r].offset.start);
+ }
+ }
+
+ usedAtomics.push_back(range);
+
+ return -1; // no collision
+}
+
+// Accumulate used constant_id values.
+//
+// Return false is one was already used.
+bool TIntermediate::addUsedConstantId(int id)
+{
+ if (usedConstantId.find(id) != usedConstantId.end())
+ return false;
+
+ usedConstantId.insert(id);
+
+ return true;
+}
+
+// Recursively figure out how many locations are used up by an input or output type.
+// Return the size of type, as measured by "locations".
+int TIntermediate::computeTypeLocationSize(const TType& type) const
+{
+ // "If the declared input is an array of size n and each element takes m locations, it will be assigned m * n
+ // consecutive locations..."
+ if (type.isArray()) {
+ // TODO: perf: this can be flattened by using getCumulativeArraySize(), and a deref that discards all arrayness
+ TType elementType(type, 0);
+ if (type.isImplicitlySizedArray()) {
+ // TODO: are there valid cases of having an implicitly-sized array with a location? If so, running this code too early.
+ return computeTypeLocationSize(elementType);
+ } else
+ return type.getOuterArraySize() * computeTypeLocationSize(elementType);
+ }
+
+ // "The locations consumed by block and structure members are determined by applying the rules above
+ // recursively..."
+ if (type.isStruct()) {
+ int size = 0;
+ for (int member = 0; member < (int)type.getStruct()->size(); ++member) {
+ TType memberType(type, member);
+ size += computeTypeLocationSize(memberType);
+ }
+ return size;
+ }
+
+ // ES: "If a shader input is any scalar or vector type, it will consume a single location."
+
+ // Desktop: "If a vertex shader input is any scalar or vector type, it will consume a single location. If a non-vertex
+ // shader input is a scalar or vector type other than dvec3 or dvec4, it will consume a single location, while
+ // types dvec3 or dvec4 will consume two consecutive locations. Inputs of type double and dvec2 will
+ // consume only a single location, in all stages."
+ if (type.isScalar())
+ return 1;
+ if (type.isVector()) {
+ if (language == EShLangVertex && type.getQualifier().isPipeInput())
+ return 1;
+ if (type.getBasicType() == EbtDouble && type.getVectorSize() > 2)
+ return 2;
+ else
+ return 1;
+ }
+
+ // "If the declared input is an n x m single- or double-precision matrix, ...
+ // The number of locations assigned for each matrix will be the same as
+ // for an n-element array of m-component vectors..."
+ if (type.isMatrix()) {
+ TType columnType(type, 0);
+ return type.getMatrixCols() * computeTypeLocationSize(columnType);
+ }
+
+ assert(0);
+ return 1;
+}
+
+// Accumulate xfb buffer ranges and check for collisions as the accumulation is done.
+//
+// Returns < 0 if no collision, >= 0 if collision and the value returned is a colliding value.
+//
+int TIntermediate::addXfbBufferOffset(const TType& type)
+{
+ const TQualifier& qualifier = type.getQualifier();
+
+ assert(qualifier.hasXfbOffset() && qualifier.hasXfbBuffer());
+ TXfbBuffer& buffer = xfbBuffers[qualifier.layoutXfbBuffer];
+
+ // compute the range
+ unsigned int size = computeTypeXfbSize(type, buffer.containsDouble);
+ buffer.implicitStride = std::max(buffer.implicitStride, qualifier.layoutXfbOffset + size);
+ TRange range(qualifier.layoutXfbOffset, qualifier.layoutXfbOffset + size - 1);
+
+ // check for collisions
+ for (size_t r = 0; r < buffer.ranges.size(); ++r) {
+ if (range.overlap(buffer.ranges[r])) {
+ // there is a collision; pick an example to return
+ return std::max(range.start, buffer.ranges[r].start);
+ }
+ }
+
+ buffer.ranges.push_back(range);
+
+ return -1; // no collision
+}
+
+// Recursively figure out how many bytes of xfb buffer are used by the given type.
+// Return the size of type, in bytes.
+// Sets containsDouble to true if the type contains a double.
+// N.B. Caller must set containsDouble to false before calling.
+unsigned int TIntermediate::computeTypeXfbSize(const TType& type, bool& containsDouble) const
+{
+ // "...if applied to an aggregate containing a double, the offset must also be a multiple of 8,
+ // and the space taken in the buffer will be a multiple of 8.
+ // ...within the qualified entity, subsequent components are each
+ // assigned, in order, to the next available offset aligned to a multiple of
+ // that component's size. Aggregate types are flattened down to the component
+ // level to get this sequence of components."
+
+ if (type.isArray()) {
+ // TODO: perf: this can be flattened by using getCumulativeArraySize(), and a deref that discards all arrayness
+ assert(type.isExplicitlySizedArray());
+ TType elementType(type, 0);
+ return type.getOuterArraySize() * computeTypeXfbSize(elementType, containsDouble);
+ }
+
+ if (type.isStruct()) {
+ unsigned int size = 0;
+ bool structContainsDouble = false;
+ for (int member = 0; member < (int)type.getStruct()->size(); ++member) {
+ TType memberType(type, member);
+ // "... if applied to
+ // an aggregate containing a double, the offset must also be a multiple of 8,
+ // and the space taken in the buffer will be a multiple of 8."
+ bool memberContainsDouble = false;
+ int memberSize = computeTypeXfbSize(memberType, memberContainsDouble);
+ if (memberContainsDouble) {
+ structContainsDouble = true;
+ RoundToPow2(size, 8);
+ }
+ size += memberSize;
+ }
+
+ if (structContainsDouble) {
+ containsDouble = true;
+ RoundToPow2(size, 8);
+ }
+ return size;
+ }
+
+ int numComponents;
+ if (type.isScalar())
+ numComponents = 1;
+ else if (type.isVector())
+ numComponents = type.getVectorSize();
+ else if (type.isMatrix())
+ numComponents = type.getMatrixCols() * type.getMatrixRows();
+ else {
+ assert(0);
+ numComponents = 1;
+ }
+
+ if (type.getBasicType() == EbtDouble) {
+ containsDouble = true;
+ return 8 * numComponents;
+ } else
+ return 4 * numComponents;
+}
+
+const int baseAlignmentVec4Std140 = 16;
+
+// Return the size and alignment of a scalar.
+// The size is returned in the 'size' parameter
+// Return value is the alignment of the type.
+int TIntermediate::getBaseAlignmentScalar(const TType& type, int& size)
+{
+ switch (type.getBasicType()) {
+ case EbtInt64:
+ case EbtUint64:
+ case EbtDouble: size = 8; return 8;
+ default: size = 4; return 4;
+ }
+}
+
+// Implement base-alignment and size rules from section 7.6.2.2 Standard Uniform Block Layout
+// Operates recursively.
+//
+// If std140 is true, it does the rounding up to vec4 size required by std140,
+// otherwise it does not, yielding std430 rules.
+//
+// The size is returned in the 'size' parameter
+//
+// The stride is only non-0 for arrays or matrices, and is the stride of the
+// top-level object nested within the type. E.g., for an array of matrices,
+// it is the distances needed between matrices, despite the rules saying the
+// stride comes from the flattening down to vectors.
+//
+// Return value is the alignment of the type.
+int TIntermediate::getBaseAlignment(const TType& type, int& size, int& stride, bool std140, bool rowMajor)
+{
+ int alignment;
+
+ // When using the std140 storage layout, structures will be laid out in buffer
+ // storage with its members stored in monotonically increasing order based on their
+ // location in the declaration. A structure and each structure member have a base
+ // offset and a base alignment, from which an aligned offset is computed by rounding
+ // the base offset up to a multiple of the base alignment. The base offset of the first
+ // member of a structure is taken from the aligned offset of the structure itself. The
+ // base offset of all other structure members is derived by taking the offset of the
+ // last basic machine unit consumed by the previous member and adding one. Each
+ // structure member is stored in memory at its aligned offset. The members of a top-
+ // level uniform block are laid out in buffer storage by treating the uniform block as
+ // a structure with a base offset of zero.
+ //
+ // 1. If the member is a scalar consuming N basic machine units, the base alignment is N.
+ //
+ // 2. If the member is a two- or four-component vector with components consuming N basic
+ // machine units, the base alignment is 2N or 4N, respectively.
+ //
+ // 3. If the member is a three-component vector with components consuming N
+ // basic machine units, the base alignment is 4N.
+ //
+ // 4. If the member is an array of scalars or vectors, the base alignment and array
+ // stride are set to match the base alignment of a single array element, according
+ // to rules (1), (2), and (3), and rounded up to the base alignment of a vec4. The
+ // array may have padding at the end; the base offset of the member following
+ // the array is rounded up to the next multiple of the base alignment.
+ //
+ // 5. If the member is a column-major matrix with C columns and R rows, the
+ // matrix is stored identically to an array of C column vectors with R
+ // components each, according to rule (4).
+ //
+ // 6. If the member is an array of S column-major matrices with C columns and
+ // R rows, the matrix is stored identically to a row of S  C column vectors
+ // with R components each, according to rule (4).
+ //
+ // 7. If the member is a row-major matrix with C columns and R rows, the matrix
+ // is stored identically to an array of R row vectors with C components each,
+ // according to rule (4).
+ //
+ // 8. If the member is an array of S row-major matrices with C columns and R
+ // rows, the matrix is stored identically to a row of S  R row vectors with C
+ // components each, according to rule (4).
+ //
+ // 9. If the member is a structure, the base alignment of the structure is N , where
+ // N is the largest base alignment value of any of its members, and rounded
+ // up to the base alignment of a vec4. The individual members of this substructure
+ // are then assigned offsets by applying this set of rules recursively,
+ // where the base offset of the first member of the sub-structure is equal to the
+ // aligned offset of the structure. The structure may have padding at the end;
+ // the base offset of the member following the sub-structure is rounded up to
+ // the next multiple of the base alignment of the structure.
+ //
+ // 10. If the member is an array of S structures, the S elements of the array are laid
+ // out in order, according to rule (9).
+ //
+ // Assuming, for rule 10: The stride is the same as the size of an element.
+
+ stride = 0;
+ int dummyStride;
+
+ // rules 4, 6, 8, and 10
+ if (type.isArray()) {
+ // TODO: perf: this might be flattened by using getCumulativeArraySize(), and a deref that discards all arrayness
+ TType derefType(type, 0);
+ alignment = getBaseAlignment(derefType, size, dummyStride, std140, rowMajor);
+ if (std140)
+ alignment = std::max(baseAlignmentVec4Std140, alignment);
+ RoundToPow2(size, alignment);
+ stride = size; // uses full matrix size for stride of an array of matrices (not quite what rule 6/8, but what's expected)
+ // uses the assumption for rule 10 in the comment above
+ size = stride * type.getOuterArraySize();
+ return alignment;
+ }
+
+ // rule 9
+ if (type.getBasicType() == EbtStruct) {
+ const TTypeList& memberList = *type.getStruct();
+
+ size = 0;
+ int maxAlignment = std140 ? baseAlignmentVec4Std140 : 0;
+ for (size_t m = 0; m < memberList.size(); ++m) {
+ int memberSize;
+ // modify just the children's view of matrix layout, if there is one for this member
+ TLayoutMatrix subMatrixLayout = memberList[m].type->getQualifier().layoutMatrix;
+ int memberAlignment = getBaseAlignment(*memberList[m].type, memberSize, dummyStride, std140,
+ (subMatrixLayout != ElmNone) ? (subMatrixLayout == ElmRowMajor) : rowMajor);
+ maxAlignment = std::max(maxAlignment, memberAlignment);
+ RoundToPow2(size, memberAlignment);
+ size += memberSize;
+ }
+
+ // The structure may have padding at the end; the base offset of
+ // the member following the sub-structure is rounded up to the next
+ // multiple of the base alignment of the structure.
+ RoundToPow2(size, maxAlignment);
+
+ return maxAlignment;
+ }
+
+ // rule 1
+ if (type.isScalar())
+ return getBaseAlignmentScalar(type, size);
+
+ // rules 2 and 3
+ if (type.isVector()) {
+ int scalarAlign = getBaseAlignmentScalar(type, size);
+ switch (type.getVectorSize()) {
+ case 2:
+ size *= 2;
+ return 2 * scalarAlign;
+ default:
+ size *= type.getVectorSize();
+ return 4 * scalarAlign;
+ }
+ }
+
+ // rules 5 and 7
+ if (type.isMatrix()) {
+ // rule 5: deref to row, not to column, meaning the size of vector is num columns instead of num rows
+ TType derefType(type, 0, rowMajor);
+
+ alignment = getBaseAlignment(derefType, size, dummyStride, std140, rowMajor);
+ if (std140)
+ alignment = std::max(baseAlignmentVec4Std140, alignment);
+ RoundToPow2(size, alignment);
+ stride = size; // use intra-matrix stride for stride of a just a matrix
+ if (rowMajor)
+ size = stride * type.getMatrixRows();
+ else
+ size = stride * type.getMatrixCols();
+
+ return alignment;
+ }
+
+ assert(0); // all cases should be covered above
+ size = baseAlignmentVec4Std140;
+ return baseAlignmentVec4Std140;
+}
+
+} // end namespace glslang
diff --git a/chromium/third_party/glslang/src/glslang/MachineIndependent/localintermediate.h b/chromium/third_party/glslang/src/glslang/MachineIndependent/localintermediate.h
new file mode 100644
index 00000000000..7445dee04e0
--- /dev/null
+++ b/chromium/third_party/glslang/src/glslang/MachineIndependent/localintermediate.h
@@ -0,0 +1,396 @@
+//
+//Copyright (C) 2002-2005 3Dlabs Inc. Ltd.
+//All rights reserved.
+//
+//Redistribution and use in source and binary forms, with or without
+//modification, are permitted provided that the following conditions
+//are met:
+//
+// Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 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.
+//
+// Neither the name of 3Dlabs Inc. Ltd. nor the names of its
+// contributors may be used to endorse or promote products derived
+// from this software without specific prior written permission.
+//
+//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+//"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 THE
+//COPYRIGHT HOLDERS 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.
+//
+
+#ifndef _LOCAL_INTERMEDIATE_INCLUDED_
+#define _LOCAL_INTERMEDIATE_INCLUDED_
+
+#include "../Include/intermediate.h"
+#include "../Public/ShaderLang.h"
+#include "Versions.h"
+
+#include <algorithm>
+#include <set>
+
+class TInfoSink;
+
+namespace glslang {
+
+struct TVectorFields {
+ int offsets[4];
+ int num;
+};
+
+//
+// Some helper structures for TIntermediate. Their contents are encapsulated
+// by TIntermediate.
+//
+
+// Used for detecting recursion: A "call" is a pair: <caller, callee>.
+struct TCall {
+ TCall(const TString& pCaller, const TString& pCallee) : caller(pCaller), callee(pCallee) { }
+ TString caller;
+ TString callee;
+ bool visited;
+ bool currentPath;
+ bool errorGiven;
+};
+
+// A generic 1-D range.
+struct TRange {
+ TRange(int start, int last) : start(start), last(last) { }
+ bool overlap(const TRange& rhs) const
+ {
+ return last >= rhs.start && start <= rhs.last;
+ }
+ int start;
+ int last;
+};
+
+// An IO range is a 3-D rectangle; the set of (location, component, index) triples all lying
+// within the same location range, component range, and index value. Locations don't alias unless
+// all other dimensions of their range overlap.
+struct TIoRange {
+ TIoRange(TRange location, TRange component, TBasicType basicType, int index)
+ : location(location), component(component), basicType(basicType), index(index) { }
+ bool overlap(const TIoRange& rhs) const
+ {
+ return location.overlap(rhs.location) && component.overlap(rhs.component) && index == rhs.index;
+ }
+ TRange location;
+ TRange component;
+ TBasicType basicType;
+ int index;
+};
+
+// An offset range is a 2-D rectangle; the set of (binding, offset) pairs all lying
+// within the same binding and offset range.
+struct TOffsetRange {
+ TOffsetRange(TRange binding, TRange offset)
+ : binding(binding), offset(offset) { }
+ bool overlap(const TOffsetRange& rhs) const
+ {
+ return binding.overlap(rhs.binding) && offset.overlap(rhs.offset);
+ }
+ TRange binding;
+ TRange offset;
+};
+
+// Things that need to be tracked per xfb buffer.
+struct TXfbBuffer {
+ TXfbBuffer() : stride(TQualifier::layoutXfbStrideEnd), implicitStride(0), containsDouble(false) { }
+ std::vector<TRange> ranges; // byte offsets that have already been assigned
+ unsigned int stride;
+ unsigned int implicitStride;
+ bool containsDouble;
+};
+
+class TSymbolTable;
+class TSymbol;
+class TVariable;
+
+//
+// Set of helper functions to help parse and build the tree.
+//
+class TIntermediate {
+public:
+ explicit TIntermediate(EShLanguage l, int v = 0, EProfile p = ENoProfile) :
+ source(EShSourceNone), language(l), profile(p), version(v), spv(0), treeRoot(0),
+ numMains(0), numErrors(0), numPushConstants(0), recursive(false),
+ invocations(TQualifier::layoutNotSet), vertices(TQualifier::layoutNotSet), inputPrimitive(ElgNone), outputPrimitive(ElgNone),
+ pixelCenterInteger(false), originUpperLeft(false),
+ vertexSpacing(EvsNone), vertexOrder(EvoNone), pointMode(false), earlyFragmentTests(false), depthLayout(EldNone), depthReplacing(false), blendEquations(0),
+ multiStream(false), xfbMode(false)
+ {
+ localSize[0] = 1;
+ localSize[1] = 1;
+ localSize[2] = 1;
+ localSizeSpecId[0] = TQualifier::layoutNotSet;
+ localSizeSpecId[1] = TQualifier::layoutNotSet;
+ localSizeSpecId[2] = TQualifier::layoutNotSet;
+ xfbBuffers.resize(TQualifier::layoutXfbBufferEnd);
+ }
+ void setLimits(const TBuiltInResource& r) { resources = r; }
+
+ bool postProcess(TIntermNode*, EShLanguage);
+ void output(TInfoSink&, bool tree);
+ void removeTree();
+
+ void setSource(EShSource s) { source = s; }
+ EShSource getSource() const { return source; }
+ void setEntryPoint(const char* ep) { entryPoint = ep; }
+ const std::string& getEntryPoint() const { return entryPoint; }
+ void setVersion(int v) { version = v; }
+ int getVersion() const { return version; }
+ void setProfile(EProfile p) { profile = p; }
+ EProfile getProfile() const { return profile; }
+ void setSpv(int s) { spv = s; }
+ int getSpv() const { return spv; }
+ EShLanguage getStage() const { return language; }
+ void addRequestedExtension(const char* extension) { requestedExtensions.insert(extension); }
+ const std::set<std::string>& getRequestedExtensions() const { return requestedExtensions; }
+
+ void setTreeRoot(TIntermNode* r) { treeRoot = r; }
+ TIntermNode* getTreeRoot() const { return treeRoot; }
+ void addMainCount() { ++numMains; }
+ int getNumMains() const { return numMains; }
+ int getNumErrors() const { return numErrors; }
+ void addPushConstantCount() { ++numPushConstants; }
+ bool isRecursive() const { return recursive; }
+
+ TIntermSymbol* addSymbol(const TVariable&);
+ TIntermSymbol* addSymbol(const TVariable&, const TSourceLoc&);
+ TIntermSymbol* addSymbol(const TType&, const TSourceLoc&);
+ TIntermTyped* addConversion(TOperator, const TType&, TIntermTyped*) const;
+ TIntermTyped* addBinaryMath(TOperator, TIntermTyped* left, TIntermTyped* right, TSourceLoc);
+ TIntermTyped* addAssign(TOperator op, TIntermTyped* left, TIntermTyped* right, TSourceLoc);
+ TIntermTyped* addIndex(TOperator op, TIntermTyped* base, TIntermTyped* index, TSourceLoc);
+ TIntermTyped* addUnaryMath(TOperator, TIntermTyped* child, TSourceLoc);
+ TIntermTyped* addBuiltInFunctionCall(const TSourceLoc& line, TOperator, bool unary, TIntermNode*, const TType& returnType);
+ bool canImplicitlyPromote(TBasicType from, TBasicType to) const;
+ TIntermAggregate* growAggregate(TIntermNode* left, TIntermNode* right);
+ TIntermAggregate* growAggregate(TIntermNode* left, TIntermNode* right, const TSourceLoc&);
+ TIntermAggregate* makeAggregate(TIntermNode* node);
+ TIntermAggregate* makeAggregate(TIntermNode* node, const TSourceLoc&);
+ TIntermTyped* setAggregateOperator(TIntermNode*, TOperator, const TType& type, TSourceLoc);
+ bool areAllChildConst(TIntermAggregate* aggrNode);
+ TIntermNode* addSelection(TIntermTyped* cond, TIntermNodePair code, const TSourceLoc&);
+ TIntermTyped* addSelection(TIntermTyped* cond, TIntermTyped* trueBlock, TIntermTyped* falseBlock, const TSourceLoc&);
+ TIntermTyped* addComma(TIntermTyped* left, TIntermTyped* right, const TSourceLoc&);
+ TIntermTyped* addMethod(TIntermTyped*, const TType&, const TString*, const TSourceLoc&);
+ TIntermConstantUnion* addConstantUnion(const TConstUnionArray&, const TType&, const TSourceLoc&, bool literal = false) const;
+ TIntermConstantUnion* addConstantUnion(int, const TSourceLoc&, bool literal = false) const;
+ TIntermConstantUnion* addConstantUnion(unsigned int, const TSourceLoc&, bool literal = false) const;
+ TIntermConstantUnion* addConstantUnion(long long, const TSourceLoc&, bool literal = false) const;
+ TIntermConstantUnion* addConstantUnion(unsigned long long, const TSourceLoc&, bool literal = false) const;
+ TIntermConstantUnion* addConstantUnion(bool, const TSourceLoc&, bool literal = false) const;
+ TIntermConstantUnion* addConstantUnion(double, TBasicType, const TSourceLoc&, bool literal = false) const;
+ TIntermTyped* promoteConstantUnion(TBasicType, TIntermConstantUnion*) const;
+ bool parseConstTree(TIntermNode*, TConstUnionArray, TOperator, const TType&, bool singleConstantParam = false);
+ TIntermLoop* addLoop(TIntermNode*, TIntermTyped*, TIntermTyped*, bool testFirst, const TSourceLoc&);
+ TIntermAggregate* addForLoop(TIntermNode*, TIntermNode*, TIntermTyped*, TIntermTyped*, bool testFirst, const TSourceLoc&);
+ TIntermBranch* addBranch(TOperator, const TSourceLoc&);
+ TIntermBranch* addBranch(TOperator, TIntermTyped*, const TSourceLoc&);
+ TIntermTyped* addSwizzle(TVectorFields&, const TSourceLoc&);
+
+ // Constant folding (in Constant.cpp)
+ TIntermTyped* fold(TIntermAggregate* aggrNode);
+ TIntermTyped* foldConstructor(TIntermAggregate* aggrNode);
+ TIntermTyped* foldDereference(TIntermTyped* node, int index, const TSourceLoc&);
+ TIntermTyped* foldSwizzle(TIntermTyped* node, TVectorFields& fields, const TSourceLoc&);
+
+ // Tree ops
+ static const TIntermTyped* findLValueBase(const TIntermTyped*, bool swizzleOkay);
+
+ // Linkage related
+ void addSymbolLinkageNodes(TIntermAggregate*& linkage, EShLanguage, TSymbolTable&);
+ void addSymbolLinkageNode(TIntermAggregate*& linkage, TSymbolTable&, const TString&);
+ void addSymbolLinkageNode(TIntermAggregate*& linkage, const TSymbol&);
+
+ bool setInvocations(int i)
+ {
+ if (invocations != TQualifier::layoutNotSet)
+ return invocations == i;
+ invocations = i;
+ return true;
+ }
+ int getInvocations() const { return invocations; }
+ bool setVertices(int m)
+ {
+ if (vertices != TQualifier::layoutNotSet)
+ return vertices == m;
+ vertices = m;
+ return true;
+ }
+ int getVertices() const { return vertices; }
+ bool setInputPrimitive(TLayoutGeometry p)
+ {
+ if (inputPrimitive != ElgNone)
+ return inputPrimitive == p;
+ inputPrimitive = p;
+ return true;
+ }
+ TLayoutGeometry getInputPrimitive() const { return inputPrimitive; }
+ bool setVertexSpacing(TVertexSpacing s)
+ {
+ if (vertexSpacing != EvsNone)
+ return vertexSpacing == s;
+ vertexSpacing = s;
+ return true;
+ }
+ TVertexSpacing getVertexSpacing() const { return vertexSpacing; }
+ bool setVertexOrder(TVertexOrder o)
+ {
+ if (vertexOrder != EvoNone)
+ return vertexOrder == o;
+ vertexOrder = o;
+ return true;
+ }
+ TVertexOrder getVertexOrder() const { return vertexOrder; }
+ void setPointMode() { pointMode = true; }
+ bool getPointMode() const { return pointMode; }
+
+ bool setLocalSize(int dim, int size)
+ {
+ if (localSize[dim] > 1)
+ return size == localSize[dim];
+ localSize[dim] = size;
+ return true;
+ }
+ unsigned int getLocalSize(int dim) const { return localSize[dim]; }
+
+ bool setLocalSizeSpecId(int dim, int id)
+ {
+ if (localSizeSpecId[dim] != TQualifier::layoutNotSet)
+ return id == localSizeSpecId[dim];
+ localSizeSpecId[dim] = id;
+ return true;
+ }
+ int getLocalSizeSpecId(int dim) const { return localSizeSpecId[dim]; }
+
+ void setXfbMode() { xfbMode = true; }
+ bool getXfbMode() const { return xfbMode; }
+ void setMultiStream() { multiStream = true; }
+ bool isMultiStream() const { return multiStream; }
+ bool setOutputPrimitive(TLayoutGeometry p)
+ {
+ if (outputPrimitive != ElgNone)
+ return outputPrimitive == p;
+ outputPrimitive = p;
+ return true;
+ }
+ TLayoutGeometry getOutputPrimitive() const { return outputPrimitive; }
+ void setOriginUpperLeft() { originUpperLeft = true; }
+ bool getOriginUpperLeft() const { return originUpperLeft; }
+ void setPixelCenterInteger() { pixelCenterInteger = true; }
+ bool getPixelCenterInteger() const { return pixelCenterInteger; }
+ void setEarlyFragmentTests() { earlyFragmentTests = true; }
+ bool getEarlyFragmentTests() const { return earlyFragmentTests; }
+ bool setDepth(TLayoutDepth d)
+ {
+ if (depthLayout != EldNone)
+ return depthLayout == d;
+ depthLayout = d;
+ return true;
+ }
+ TLayoutDepth getDepth() const { return depthLayout; }
+ void setDepthReplacing() { depthReplacing = true; }
+ bool isDepthReplacing() const { return depthReplacing; }
+
+ void addBlendEquation(TBlendEquationShift b) { blendEquations |= (1 << b); }
+ unsigned int getBlendEquations() const { return blendEquations; }
+
+ void addToCallGraph(TInfoSink&, const TString& caller, const TString& callee);
+ void merge(TInfoSink&, TIntermediate&);
+ void finalCheck(TInfoSink&);
+
+ void addIoAccessed(const TString& name) { ioAccessed.insert(name); }
+ bool inIoAccessed(const TString& name) const { return ioAccessed.find(name) != ioAccessed.end(); }
+
+ int addUsedLocation(const TQualifier&, const TType&, bool& typeCollision);
+ int addUsedOffsets(int binding, int offset, int numOffsets);
+ bool addUsedConstantId(int id);
+ int computeTypeLocationSize(const TType&) const;
+
+ bool setXfbBufferStride(int buffer, unsigned stride)
+ {
+ if (xfbBuffers[buffer].stride != TQualifier::layoutXfbStrideEnd)
+ return xfbBuffers[buffer].stride == stride;
+ xfbBuffers[buffer].stride = stride;
+ return true;
+ }
+ int addXfbBufferOffset(const TType&);
+ unsigned int computeTypeXfbSize(const TType&, bool& containsDouble) const;
+ static int getBaseAlignment(const TType&, int& size, int& stride, bool std140, bool rowMajor);
+
+protected:
+ TIntermSymbol* addSymbol(int Id, const TString&, const TType&, const TConstUnionArray&, TIntermTyped* subtree, const TSourceLoc&);
+ void error(TInfoSink& infoSink, const char*);
+ void mergeBodies(TInfoSink&, TIntermSequence& globals, const TIntermSequence& unitGlobals);
+ void mergeLinkerObjects(TInfoSink&, TIntermSequence& linkerObjects, const TIntermSequence& unitLinkerObjects);
+ void mergeImplicitArraySizes(TType&, const TType&);
+ void mergeErrorCheck(TInfoSink&, const TIntermSymbol&, const TIntermSymbol&, bool crossStage);
+ void checkCallGraphCycles(TInfoSink&);
+ void inOutLocationCheck(TInfoSink&);
+ TIntermSequence& findLinkerObjects() const;
+ bool userOutputUsed() const;
+ static int getBaseAlignmentScalar(const TType&, int& size);
+ bool isSpecializationOperation(const TIntermOperator&) const;
+
+ const EShLanguage language; // stage, known at construction time
+ EShSource source; // source language, known a bit later
+ std::string entryPoint;
+ EProfile profile;
+ int version;
+ int spv;
+ TIntermNode* treeRoot;
+ std::set<std::string> requestedExtensions; // cumulation of all enabled or required extensions; not connected to what subset of the shader used them
+ TBuiltInResource resources;
+ int numMains;
+ int numErrors;
+ int numPushConstants;
+ bool recursive;
+ int invocations;
+ int vertices;
+ TLayoutGeometry inputPrimitive;
+ TLayoutGeometry outputPrimitive;
+ bool pixelCenterInteger;
+ bool originUpperLeft;
+ TVertexSpacing vertexSpacing;
+ TVertexOrder vertexOrder;
+ bool pointMode;
+ int localSize[3];
+ int localSizeSpecId[3];
+ bool earlyFragmentTests;
+ TLayoutDepth depthLayout;
+ bool depthReplacing;
+ int blendEquations; // an 'or'ing of masks of shifts of TBlendEquationShift
+ bool xfbMode;
+ bool multiStream;
+
+ typedef std::list<TCall> TGraph;
+ TGraph callGraph;
+
+ std::set<TString> ioAccessed; // set of names of statically read/written I/O that might need extra checking
+ std::vector<TIoRange> usedIo[4]; // sets of used locations, one for each of in, out, uniform, and buffers
+ std::vector<TOffsetRange> usedAtomics; // sets of bindings used by atomic counters
+ std::vector<TXfbBuffer> xfbBuffers; // all the data we need to track per xfb buffer
+ std::unordered_set<int> usedConstantId; // specialization constant ids used
+
+private:
+ void operator=(TIntermediate&); // prevent assignments
+};
+
+} // end namespace glslang
+
+#endif // _LOCAL_INTERMEDIATE_INCLUDED_
diff --git a/chromium/third_party/glslang/src/glslang/MachineIndependent/parseConst.cpp b/chromium/third_party/glslang/src/glslang/MachineIndependent/parseConst.cpp
new file mode 100644
index 00000000000..90621d39f47
--- /dev/null
+++ b/chromium/third_party/glslang/src/glslang/MachineIndependent/parseConst.cpp
@@ -0,0 +1,210 @@
+//
+//Copyright (C) 2002-2005 3Dlabs Inc. Ltd.
+//All rights reserved.
+//
+//Redistribution and use in source and binary forms, with or without
+//modification, are permitted provided that the following conditions
+//are met:
+//
+// Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 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.
+//
+// Neither the name of 3Dlabs Inc. Ltd. nor the names of its
+// contributors may be used to endorse or promote products derived
+// from this software without specific prior written permission.
+//
+//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+//"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 THE
+//COPYRIGHT HOLDERS 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.
+//
+
+//
+// Travarse a tree of constants to create a single folded constant.
+// It should only be used when the whole tree is known to be constant.
+//
+
+#include "ParseHelper.h"
+
+namespace glslang {
+
+class TConstTraverser : public TIntermTraverser {
+public:
+ TConstTraverser(const TConstUnionArray& cUnion, bool singleConstParam, TOperator constructType, const TType& t)
+ : unionArray(cUnion), type(t),
+ constructorType(constructType), singleConstantParam(singleConstParam), error(false), isMatrix(false),
+ matrixCols(0), matrixRows(0) { index = 0; tOp = EOpNull; }
+
+ virtual void visitConstantUnion(TIntermConstantUnion* node);
+ virtual bool visitAggregate(TVisit, TIntermAggregate* node);
+
+ int index;
+ TConstUnionArray unionArray;
+ TOperator tOp;
+ const TType& type;
+ TOperator constructorType;
+ bool singleConstantParam;
+ bool error;
+ int size; // size of the constructor ( 4 for vec4)
+ bool isMatrix;
+ int matrixCols;
+ int matrixRows;
+
+protected:
+ TConstTraverser(TConstTraverser&);
+ TConstTraverser& operator=(TConstTraverser&);
+};
+
+bool TConstTraverser::visitAggregate(TVisit /* visit */, TIntermAggregate* node)
+{
+ if (! node->isConstructor() && node->getOp() != EOpComma) {
+ error = true;
+
+ return false;
+ }
+
+ if (node->getSequence().size() == 0) {
+ error = true;
+
+ return false;
+ }
+
+ bool flag = node->getSequence().size() == 1 && node->getSequence()[0]->getAsTyped()->getAsConstantUnion();
+ if (flag) {
+ singleConstantParam = true;
+ constructorType = node->getOp();
+ size = node->getType().computeNumComponents();
+
+ if (node->getType().isMatrix()) {
+ isMatrix = true;
+ matrixCols = node->getType().getMatrixCols();
+ matrixRows = node->getType().getMatrixRows();
+ }
+ }
+
+ for (TIntermSequence::iterator p = node->getSequence().begin();
+ p != node->getSequence().end(); p++) {
+
+ if (node->getOp() == EOpComma)
+ index = 0;
+
+ (*p)->traverse(this);
+ }
+ if (flag)
+ {
+ singleConstantParam = false;
+ constructorType = EOpNull;
+ size = 0;
+ isMatrix = false;
+ matrixCols = 0;
+ matrixRows = 0;
+ }
+
+ return false;
+}
+
+void TConstTraverser::visitConstantUnion(TIntermConstantUnion* node)
+{
+ TConstUnionArray leftUnionArray(unionArray);
+ int instanceSize = type.computeNumComponents();
+
+ if (index >= instanceSize)
+ return;
+
+ if (! singleConstantParam) {
+ int rightUnionSize = node->getType().computeNumComponents();
+
+ const TConstUnionArray& rightUnionArray = node->getConstArray();
+ for (int i = 0; i < rightUnionSize; i++) {
+ if (index >= instanceSize)
+ return;
+ leftUnionArray[index] = rightUnionArray[i];
+
+ index++;
+ }
+ } else {
+ int endIndex = index + size;
+ const TConstUnionArray& rightUnionArray = node->getConstArray();
+ if (! isMatrix) {
+ int count = 0;
+ int nodeComps = node->getType().computeNumComponents();
+ for (int i = index; i < endIndex; i++) {
+ if (i >= instanceSize)
+ return;
+
+ leftUnionArray[i] = rightUnionArray[count];
+
+ (index)++;
+
+ if (nodeComps > 1)
+ count++;
+ }
+ } else {
+ // constructing a matrix, but from what?
+ if (node->isMatrix()) {
+ // Matrix from a matrix; this has the outer matrix, node is the argument matrix.
+ // Traverse the outer, potentially bigger matrix, fill in missing pieces with the
+ // identity matrix.
+ for (int c = 0; c < matrixCols; ++c) {
+ for (int r = 0; r < matrixRows; ++r) {
+ int targetOffset = index + c * matrixRows + r;
+ if (r < node->getType().getMatrixRows() && c < node->getType().getMatrixCols()) {
+ int srcOffset = c * node->getType().getMatrixRows() + r;
+ leftUnionArray[targetOffset] = rightUnionArray[srcOffset];
+ } else if (r == c)
+ leftUnionArray[targetOffset].setDConst(1.0);
+ else
+ leftUnionArray[targetOffset].setDConst(0.0);
+ }
+ }
+ } else {
+ // matrix from vector
+ int count = 0;
+ const int startIndex = index;
+ int nodeComps = node->getType().computeNumComponents();
+ for (int i = startIndex; i < endIndex; i++) {
+ if (i >= instanceSize)
+ return;
+ if (i == startIndex || (i - startIndex) % (matrixRows + 1) == 0 )
+ leftUnionArray[i] = rightUnionArray[count];
+ else
+ leftUnionArray[i].setDConst(0.0);
+
+ index++;
+
+ if (nodeComps > 1)
+ count++;
+ }
+ }
+ }
+ }
+}
+
+bool TIntermediate::parseConstTree(TIntermNode* root, TConstUnionArray unionArray, TOperator constructorType, const TType& t, bool singleConstantParam)
+{
+ if (root == 0)
+ return false;
+
+ TConstTraverser it(unionArray, singleConstantParam, constructorType, t);
+
+ root->traverse(&it);
+ if (it.error)
+ return true;
+ else
+ return false;
+}
+
+} // end namespace glslang
diff --git a/chromium/third_party/glslang/src/glslang/MachineIndependent/parseVersions.h b/chromium/third_party/glslang/src/glslang/MachineIndependent/parseVersions.h
new file mode 100755
index 00000000000..0eebb10aec2
--- /dev/null
+++ b/chromium/third_party/glslang/src/glslang/MachineIndependent/parseVersions.h
@@ -0,0 +1,135 @@
+//
+//Copyright (C) 2016 Google, 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:
+//
+// Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 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.
+//
+// Neither the name of 3Dlabs Inc. Ltd. nor the names of its
+// contributors may be used to endorse or promote products derived
+// from this software without specific prior written permission.
+//
+//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+//"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 THE
+//COPYRIGHT HOLDERS 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.
+//
+
+// This is implemented in Versions.cpp
+
+#ifndef _PARSE_VERSIONS_INCLUDED_
+#define _PARSE_VERSIONS_INCLUDED_
+
+#include "../Public/ShaderLang.h"
+#include "../Include/InfoSink.h"
+#include "Scan.h"
+
+#include <map>
+
+namespace glslang {
+
+//
+// Base class for parse helpers.
+// This just has version-related information and checking.
+// This class should be sufficient for preprocessing.
+//
+class TParseVersions {
+public:
+ TParseVersions(TIntermediate& interm, int version, EProfile profile,
+ int spv, int vulkan, EShLanguage language, TInfoSink& infoSink,
+ bool forwardCompatible, EShMessages messages)
+ : infoSink(infoSink), version(version), profile(profile), language(language),
+ spv(spv), vulkan(vulkan), forwardCompatible(forwardCompatible),
+ intermediate(interm), messages(messages), numErrors(0), currentScanner(0) { }
+ virtual ~TParseVersions() { }
+ virtual void initializeExtensionBehavior();
+ virtual void requireProfile(const TSourceLoc&, int queryProfiles, const char* featureDesc);
+ virtual void profileRequires(const TSourceLoc&, int queryProfiles, int minVersion, int numExtensions, const char* const extensions[], const char* featureDesc);
+ virtual void profileRequires(const TSourceLoc&, int queryProfiles, int minVersion, const char* const extension, const char* featureDesc);
+ virtual void requireStage(const TSourceLoc&, EShLanguageMask, const char* featureDesc);
+ virtual void requireStage(const TSourceLoc&, EShLanguage, const char* featureDesc);
+ virtual void checkDeprecated(const TSourceLoc&, int queryProfiles, int depVersion, const char* featureDesc);
+ virtual void requireNotRemoved(const TSourceLoc&, int queryProfiles, int removedVersion, const char* featureDesc);
+ virtual void requireExtensions(const TSourceLoc&, int numExtensions, const char* const extensions[], const char* featureDesc);
+ virtual void ppRequireExtensions(const TSourceLoc&, int numExtensions, const char* const extensions[], const char* featureDesc);
+ virtual TExtensionBehavior getExtensionBehavior(const char*);
+ virtual bool extensionTurnedOn(const char* const extension);
+ virtual bool extensionsTurnedOn(int numExtensions, const char* const extensions[]);
+ virtual void updateExtensionBehavior(int line, const char* const extension, const char* behavior);
+ virtual void fullIntegerCheck(const TSourceLoc&, const char* op);
+ virtual void doubleCheck(const TSourceLoc&, const char* op);
+ virtual void int64Check(const TSourceLoc&, const char* op, bool builtIn = false);
+ virtual void spvRemoved(const TSourceLoc&, const char* op);
+ virtual void vulkanRemoved(const TSourceLoc&, const char* op);
+ virtual void requireVulkan(const TSourceLoc&, const char* op);
+ virtual void requireSpv(const TSourceLoc&, const char* op);
+ virtual bool checkExtensionsRequested(const TSourceLoc&, int numExtensions, const char* const extensions[], const char* featureDesc);
+ virtual void updateExtensionBehavior(const char* const extension, TExtensionBehavior);
+
+ virtual void C_DECL error(const TSourceLoc&, const char* szReason, const char* szToken,
+ const char* szExtraInfoFormat, ...) = 0;
+ virtual void C_DECL warn(const TSourceLoc&, const char* szReason, const char* szToken,
+ const char* szExtraInfoFormat, ...) = 0;
+ virtual void C_DECL ppError(const TSourceLoc&, const char* szReason, const char* szToken,
+ const char* szExtraInfoFormat, ...) = 0;
+ virtual void C_DECL ppWarn(const TSourceLoc&, const char* szReason, const char* szToken,
+ const char* szExtraInfoFormat, ...) = 0;
+
+ void addError() { ++numErrors; }
+ int getNumErrors() const { return numErrors; }
+
+ void setScanner(TInputScanner* scanner) { currentScanner = scanner; }
+ TInputScanner* getScanner() const { return currentScanner; }
+ const TSourceLoc& getCurrentLoc() const { return currentScanner->getSourceLoc(); }
+ void setCurrentLine(int line) { currentScanner->setLine(line); }
+ void setCurrentColumn(int col) { currentScanner->setColumn(col); }
+ void setCurrentSourceName(const char* name) { currentScanner->setFile(name); }
+ void setCurrentString(int string) { currentScanner->setString(string); }
+
+ void getPreamble(std::string&);
+ bool relaxedErrors() const { return (messages & EShMsgRelaxedErrors) != 0; }
+ bool suppressWarnings() const { return (messages & EShMsgSuppressWarnings) != 0; }
+
+ TInfoSink& infoSink;
+
+ // compilation mode
+ int version; // version, updated by #version in the shader
+ EProfile profile; // the declared profile in the shader (core by default)
+ EShLanguage language; // really the stage
+ int spv; // SPIR-V version; 0 means not SPIR-V
+ int vulkan; // Vulkan version; 0 means not vulkan
+ bool forwardCompatible; // true if errors are to be given for use of deprecated features
+ TIntermediate& intermediate; // helper for making and hooking up pieces of the parse tree
+
+protected:
+ EShMessages messages; // errors/warnings/rule-sets
+ int numErrors; // number of compile-time errors encountered
+ TInputScanner* currentScanner;
+
+private:
+ TMap<TString, TExtensionBehavior> extensionBehavior; // for each extension string, what its current behavior is set to
+ explicit TParseVersions(const TParseVersions&);
+ TParseVersions& operator=(const TParseVersions&);
+};
+
+} // end namespace glslang
+
+#endif // _PARSE_VERSIONS_INCLUDED_
diff --git a/chromium/third_party/glslang/src/glslang/MachineIndependent/preprocessor/Pp.cpp b/chromium/third_party/glslang/src/glslang/MachineIndependent/preprocessor/Pp.cpp
new file mode 100644
index 00000000000..35097588c43
--- /dev/null
+++ b/chromium/third_party/glslang/src/glslang/MachineIndependent/preprocessor/Pp.cpp
@@ -0,0 +1,1151 @@
+//
+//Copyright (C) 2002-2005 3Dlabs Inc. Ltd.
+//Copyright (C) 2013 LunarG, 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:
+//
+// Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 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.
+//
+// Neither the name of 3Dlabs Inc. Ltd. nor the names of its
+// contributors may be used to endorse or promote products derived
+// from this software without specific prior written permission.
+//
+//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+//"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 THE
+//COPYRIGHT HOLDERS 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.
+//
+/****************************************************************************\
+Copyright (c) 2002, NVIDIA Corporation.
+
+NVIDIA Corporation("NVIDIA") supplies this software to you in
+consideration of your agreement to the following terms, and your use,
+installation, modification or redistribution of this NVIDIA software
+constitutes acceptance of these terms. If you do not agree with these
+terms, please do not use, install, modify or redistribute this NVIDIA
+software.
+
+In consideration of your agreement to abide by the following terms, and
+subject to these terms, NVIDIA grants you a personal, non-exclusive
+license, under NVIDIA's copyrights in this original NVIDIA software (the
+"NVIDIA Software"), to use, reproduce, modify and redistribute the
+NVIDIA Software, with or without modifications, in source and/or binary
+forms; provided that if you redistribute the NVIDIA Software, you must
+retain the copyright notice of NVIDIA, this notice and the following
+text and disclaimers in all such redistributions of the NVIDIA Software.
+Neither the name, trademarks, service marks nor logos of NVIDIA
+Corporation may be used to endorse or promote products derived from the
+NVIDIA Software without specific prior written permission from NVIDIA.
+Except as expressly stated in this notice, no other rights or licenses
+express or implied, are granted by NVIDIA herein, including but not
+limited to any patent rights that may be infringed by your derivative
+works or by other works in which the NVIDIA Software may be
+incorporated. No hardware is licensed hereunder.
+
+THE NVIDIA SOFTWARE IS BEING PROVIDED ON AN "AS IS" BASIS, WITHOUT
+WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED,
+INCLUDING WITHOUT LIMITATION, WARRANTIES OR CONDITIONS OF TITLE,
+NON-INFRINGEMENT, MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR
+ITS USE AND OPERATION EITHER ALONE OR IN COMBINATION WITH OTHER
+PRODUCTS.
+
+IN NO EVENT SHALL NVIDIA BE LIABLE FOR ANY SPECIAL, INDIRECT,
+INCIDENTAL, EXEMPLARY, CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
+TO, LOST PROFITS; PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) OR ARISING IN ANY WAY
+OUT OF THE USE, REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION OF THE
+NVIDIA SOFTWARE, HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT,
+TORT (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF
+NVIDIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+\****************************************************************************/
+//
+// cpp.c
+//
+
+#define _CRT_SECURE_NO_WARNINGS
+
+#include <stdarg.h>
+#include <stdio.h>
+#include <sstream>
+#include <stdlib.h>
+#include <string.h>
+#include <ctype.h>
+
+#include "PpContext.h"
+#include "PpTokens.h"
+
+namespace glslang {
+
+int TPpContext::InitCPP()
+{
+ pool = mem_CreatePool(0, 0);
+
+ return 1;
+}
+
+// Handle #define
+int TPpContext::CPPdefine(TPpToken* ppToken)
+{
+ MacroSymbol mac;
+ Symbol *symb;
+
+ // get macro name
+ int token = scanToken(ppToken);
+ if (token != PpAtomIdentifier) {
+ parseContext.ppError(ppToken->loc, "must be followed by macro name", "#define", "");
+ return token;
+ }
+ if (ppToken->loc.string >= 0) {
+ // We are in user code; check for reserved name use:
+ parseContext.reservedPpErrorCheck(ppToken->loc, ppToken->name, "#define");
+ }
+
+ // save the original atom
+ const int defAtom = ppToken->atom;
+
+ // gather parameters to the macro, between (...)
+ token = scanToken(ppToken);
+ if (token == '(' && ! ppToken->space) {
+ int argc = 0;
+ int args[maxMacroArgs];
+ do {
+ token = scanToken(ppToken);
+ if (argc == 0 && token == ')')
+ break;
+ if (token != PpAtomIdentifier) {
+ parseContext.ppError(ppToken->loc, "bad argument", "#define", "");
+
+ return token;
+ }
+ // check for duplication of parameter name
+ bool duplicate = false;
+ for (int a = 0; a < argc; ++a) {
+ if (args[a] == ppToken->atom) {
+ parseContext.ppError(ppToken->loc, "duplicate macro parameter", "#define", "");
+ duplicate = true;
+ break;
+ }
+ }
+ if (! duplicate) {
+ if (argc < maxMacroArgs)
+ args[argc++] = ppToken->atom;
+ else
+ parseContext.ppError(ppToken->loc, "too many macro parameters", "#define", "");
+ }
+ token = scanToken(ppToken);
+ } while (token == ',');
+ if (token != ')') {
+ parseContext.ppError(ppToken->loc, "missing parenthesis", "#define", "");
+
+ return token;
+ }
+ mac.argc = argc;
+ mac.args = (int*)mem_Alloc(pool, argc * sizeof(int));
+ memcpy(mac.args, args, argc * sizeof(int));
+ token = scanToken(ppToken);
+ }
+
+ // record the definition of the macro
+ TSourceLoc defineLoc = ppToken->loc; // because ppToken is going to go to the next line before we report errors
+ mac.body = new TokenStream;
+ while (token != '\n' && token != EndOfInput) {
+ RecordToken(mac.body, token, ppToken);
+ token = scanToken(ppToken);
+ if (token != '\n' && ppToken->space)
+ RecordToken(mac.body, ' ', ppToken);
+ }
+
+ // check for duplicate definition
+ symb = LookUpSymbol(defAtom);
+ if (symb) {
+ if (! symb->mac.undef) {
+ // Already defined -- need to make sure they are identical:
+ // "Two replacement lists are identical if and only if the preprocessing tokens in both have the same number,
+ // ordering, spelling, and white-space separation, where all white-space separations are considered identical."
+ if (symb->mac.argc != mac.argc)
+ parseContext.ppError(defineLoc, "Macro redefined; different number of arguments:", "#define", GetAtomString(defAtom));
+ else {
+ for (int argc = 0; argc < mac.argc; argc++) {
+ if (symb->mac.args[argc] != mac.args[argc])
+ parseContext.ppError(defineLoc, "Macro redefined; different argument names:", "#define", GetAtomString(defAtom));
+ }
+ RewindTokenStream(symb->mac.body);
+ RewindTokenStream(mac.body);
+ int newToken;
+ do {
+ int oldToken;
+ TPpToken oldPpToken;
+ TPpToken newPpToken;
+ oldToken = ReadToken(symb->mac.body, &oldPpToken);
+ newToken = ReadToken(mac.body, &newPpToken);
+ if (oldToken != newToken || oldPpToken != newPpToken) {
+ parseContext.ppError(defineLoc, "Macro redefined; different substitutions:", "#define", GetAtomString(defAtom));
+ break;
+ }
+ } while (newToken > 0);
+ }
+ }
+ } else
+ symb = AddSymbol(defAtom);
+
+ delete symb->mac.body;
+ symb->mac = mac;
+
+ return '\n';
+}
+
+// Handle #undef
+int TPpContext::CPPundef(TPpToken* ppToken)
+{
+ int token = scanToken(ppToken);
+ Symbol *symb;
+ if (token != PpAtomIdentifier) {
+ parseContext.ppError(ppToken->loc, "must be followed by macro name", "#undef", "");
+
+ return token;
+ }
+
+ parseContext.reservedPpErrorCheck(ppToken->loc, ppToken->name, "#undef");
+
+ symb = LookUpSymbol(ppToken->atom);
+ if (symb) {
+ symb->mac.undef = 1;
+ }
+ token = scanToken(ppToken);
+ if (token != '\n')
+ parseContext.ppError(ppToken->loc, "can only be followed by a single macro name", "#undef", "");
+
+ return token;
+}
+
+// Handle #else
+/* Skip forward to appropriate spot. This is used both
+** to skip to a #endif after seeing an #else, AND to skip to a #else,
+** #elif, or #endif after a #if/#ifdef/#ifndef/#elif test was false.
+*/
+int TPpContext::CPPelse(int matchelse, TPpToken* ppToken)
+{
+ int atom;
+ int depth = 0;
+ int token = scanToken(ppToken);
+
+ while (token != EndOfInput) {
+ if (token != '#') {
+ while (token != '\n' && token != EndOfInput)
+ token = scanToken(ppToken);
+
+ if (token == EndOfInput)
+ return token;
+
+ token = scanToken(ppToken);
+ continue;
+ }
+
+ if ((token = scanToken(ppToken)) != PpAtomIdentifier)
+ continue;
+
+ atom = ppToken->atom;
+ if (atom == PpAtomIf || atom == PpAtomIfdef || atom == PpAtomIfndef) {
+ depth++;
+ ifdepth++;
+ elsetracker++;
+ } else if (atom == PpAtomEndif) {
+ token = extraTokenCheck(atom, ppToken, scanToken(ppToken));
+ elseSeen[elsetracker] = false;
+ --elsetracker;
+ if (depth == 0) {
+ // found the #endif we are looking for
+ if (ifdepth)
+ --ifdepth;
+ break;
+ }
+ --depth;
+ --ifdepth;
+ } else if (matchelse && depth == 0) {
+ if (atom == PpAtomElse) {
+ elseSeen[elsetracker] = true;
+ token = extraTokenCheck(atom, ppToken, scanToken(ppToken));
+ // found the #else we are looking for
+ break;
+ } else if (atom == PpAtomElif) {
+ if (elseSeen[elsetracker])
+ parseContext.ppError(ppToken->loc, "#elif after #else", "#elif", "");
+ /* we decrement ifdepth here, because CPPif will increment
+ * it and we really want to leave it alone */
+ if (ifdepth) {
+ --ifdepth;
+ elseSeen[elsetracker] = false;
+ --elsetracker;
+ }
+
+ return CPPif(ppToken);
+ }
+ } else if (atom == PpAtomElse) {
+ if (elseSeen[elsetracker])
+ parseContext.ppError(ppToken->loc, "#else after #else", "#else", "");
+ else
+ elseSeen[elsetracker] = true;
+ token = extraTokenCheck(atom, ppToken, scanToken(ppToken));
+ } else if (atom == PpAtomElif) {
+ if (elseSeen[elsetracker])
+ parseContext.ppError(ppToken->loc, "#elif after #else", "#elif", "");
+ }
+ }
+
+ return token;
+}
+
+// Call when there should be no more tokens left on a line.
+int TPpContext::extraTokenCheck(int atom, TPpToken* ppToken, int token)
+{
+ if (token != '\n' && token != EndOfInput) {
+ static const char* message = "unexpected tokens following directive";
+
+ const char* label;
+ if (atom == PpAtomElse)
+ label = "#else";
+ else if (atom == PpAtomElif)
+ label = "#elif";
+ else if (atom == PpAtomEndif)
+ label = "#endif";
+ else if (atom == PpAtomIf)
+ label = "#if";
+ else if (atom == PpAtomLine)
+ label = "#line";
+ else
+ label = "";
+
+ if (parseContext.relaxedErrors())
+ parseContext.ppWarn(ppToken->loc, message, label, "");
+ else
+ parseContext.ppError(ppToken->loc, message, label, "");
+
+ while (token != '\n' && token != EndOfInput)
+ token = scanToken(ppToken);
+ }
+
+ return token;
+}
+
+enum eval_prec {
+ MIN_PRECEDENCE,
+ COND, LOGOR, LOGAND, OR, XOR, AND, EQUAL, RELATION, SHIFT, ADD, MUL, UNARY,
+ MAX_PRECEDENCE
+};
+
+namespace {
+
+ int op_logor(int a, int b) { return a || b; }
+ int op_logand(int a, int b) { return a && b; }
+ int op_or(int a, int b) { return a | b; }
+ int op_xor(int a, int b) { return a ^ b; }
+ int op_and(int a, int b) { return a & b; }
+ int op_eq(int a, int b) { return a == b; }
+ int op_ne(int a, int b) { return a != b; }
+ int op_ge(int a, int b) { return a >= b; }
+ int op_le(int a, int b) { return a <= b; }
+ int op_gt(int a, int b) { return a > b; }
+ int op_lt(int a, int b) { return a < b; }
+ int op_shl(int a, int b) { return a << b; }
+ int op_shr(int a, int b) { return a >> b; }
+ int op_add(int a, int b) { return a + b; }
+ int op_sub(int a, int b) { return a - b; }
+ int op_mul(int a, int b) { return a * b; }
+ int op_div(int a, int b) { return a / b; }
+ int op_mod(int a, int b) { return a % b; }
+ int op_pos(int a) { return a; }
+ int op_neg(int a) { return -a; }
+ int op_cmpl(int a) { return ~a; }
+ int op_not(int a) { return !a; }
+
+};
+
+struct TBinop {
+ int token, precedence, (*op)(int, int);
+} binop[] = {
+ { PpAtomOr, LOGOR, op_logor },
+ { PpAtomAnd, LOGAND, op_logand },
+ { '|', OR, op_or },
+ { '^', XOR, op_xor },
+ { '&', AND, op_and },
+ { PpAtomEQ, EQUAL, op_eq },
+ { PpAtomNE, EQUAL, op_ne },
+ { '>', RELATION, op_gt },
+ { PpAtomGE, RELATION, op_ge },
+ { '<', RELATION, op_lt },
+ { PpAtomLE, RELATION, op_le },
+ { PpAtomLeft, SHIFT, op_shl },
+ { PpAtomRight, SHIFT, op_shr },
+ { '+', ADD, op_add },
+ { '-', ADD, op_sub },
+ { '*', MUL, op_mul },
+ { '/', MUL, op_div },
+ { '%', MUL, op_mod },
+};
+
+struct TUnop {
+ int token, (*op)(int);
+} unop[] = {
+ { '+', op_pos },
+ { '-', op_neg },
+ { '~', op_cmpl },
+ { '!', op_not },
+};
+
+#define NUM_ELEMENTS(A) (sizeof(A) / sizeof(A[0]))
+
+int TPpContext::eval(int token, int precedence, bool shortCircuit, int& res, bool& err, TPpToken* ppToken)
+{
+ TSourceLoc loc = ppToken->loc; // because we sometimes read the newline before reporting the error
+ if (token == PpAtomIdentifier) {
+ if (ppToken->atom == PpAtomDefined) {
+ bool needclose = 0;
+ token = scanToken(ppToken);
+ if (token == '(') {
+ needclose = true;
+ token = scanToken(ppToken);
+ }
+ if (token != PpAtomIdentifier) {
+ parseContext.ppError(loc, "incorrect directive, expected identifier", "preprocessor evaluation", "");
+ err = true;
+ res = 0;
+
+ return token;
+ }
+ Symbol* s = LookUpSymbol(ppToken->atom);
+ res = s ? ! s->mac.undef : 0;
+ token = scanToken(ppToken);
+ if (needclose) {
+ if (token != ')') {
+ parseContext.ppError(loc, "expected ')'", "preprocessor evaluation", "");
+ err = true;
+ res = 0;
+
+ return token;
+ }
+ token = scanToken(ppToken);
+ }
+ } else {
+ token = evalToToken(token, shortCircuit, res, err, ppToken);
+ return eval(token, precedence, shortCircuit, res, err, ppToken);
+ }
+ } else if (token == PpAtomConstInt) {
+ res = ppToken->ival;
+ token = scanToken(ppToken);
+ } else if (token == '(') {
+ token = scanToken(ppToken);
+ token = eval(token, MIN_PRECEDENCE, shortCircuit, res, err, ppToken);
+ if (! err) {
+ if (token != ')') {
+ parseContext.ppError(loc, "expected ')'", "preprocessor evaluation", "");
+ err = true;
+ res = 0;
+
+ return token;
+ }
+ token = scanToken(ppToken);
+ }
+ } else {
+ int op = NUM_ELEMENTS(unop) - 1;
+ for (; op >= 0; op--) {
+ if (unop[op].token == token)
+ break;
+ }
+ if (op >= 0) {
+ token = scanToken(ppToken);
+ token = eval(token, UNARY, shortCircuit, res, err, ppToken);
+ res = unop[op].op(res);
+ } else {
+ parseContext.ppError(loc, "bad expression", "preprocessor evaluation", "");
+ err = true;
+ res = 0;
+
+ return token;
+ }
+ }
+
+ token = evalToToken(token, shortCircuit, res, err, ppToken);
+
+ // Perform evaluation of binary operation, if there is one, otherwise we are done.
+ while (! err) {
+ if (token == ')' || token == '\n')
+ break;
+ int op;
+ for (op = NUM_ELEMENTS(binop) - 1; op >= 0; op--) {
+ if (binop[op].token == token)
+ break;
+ }
+ if (op < 0 || binop[op].precedence <= precedence)
+ break;
+ int leftSide = res;
+
+ // Setup short-circuiting, needed for ES, unless already in a short circuit.
+ // (Once in a short-circuit, can't turn off again, until that whole subexpression is done.
+ if (! shortCircuit) {
+ if ((token == PpAtomOr && leftSide == 1) ||
+ (token == PpAtomAnd && leftSide == 0))
+ shortCircuit = true;
+ }
+
+ token = scanToken(ppToken);
+ token = eval(token, binop[op].precedence, shortCircuit, res, err, ppToken);
+
+ if (binop[op].op == op_div || binop[op].op == op_mod) {
+ if (res == 0) {
+ parseContext.ppError(loc, "division by 0", "preprocessor evaluation", "");
+ res = 1;
+ }
+ }
+ res = binop[op].op(leftSide, res);
+ }
+
+ return token;
+}
+
+// Expand macros, skipping empty expansions, to get to the first real token in those expansions.
+int TPpContext::evalToToken(int token, bool shortCircuit, int& res, bool& err, TPpToken* ppToken)
+{
+ while (token == PpAtomIdentifier && ppToken->atom != PpAtomDefined) {
+ int macroReturn = MacroExpand(ppToken->atom, ppToken, true, false);
+ if (macroReturn == 0) {
+ parseContext.ppError(ppToken->loc, "can't evaluate expression", "preprocessor evaluation", "");
+ err = true;
+ res = 0;
+ token = scanToken(ppToken);
+ break;
+ }
+ if (macroReturn == -1) {
+ if (! shortCircuit && parseContext.profile == EEsProfile) {
+ const char* message = "undefined macro in expression not allowed in es profile";
+ if (parseContext.relaxedErrors())
+ parseContext.ppWarn(ppToken->loc, message, "preprocessor evaluation", ppToken->name);
+ else
+ parseContext.ppError(ppToken->loc, message, "preprocessor evaluation", ppToken->name);
+ }
+ }
+ token = scanToken(ppToken);
+ }
+
+ return token;
+}
+
+// Handle #if
+int TPpContext::CPPif(TPpToken* ppToken)
+{
+ int token = scanToken(ppToken);
+ elsetracker++;
+ ifdepth++;
+ if (ifdepth > maxIfNesting) {
+ parseContext.ppError(ppToken->loc, "maximum nesting depth exceeded", "#if", "");
+ return 0;
+ }
+ int res = 0;
+ bool err = false;
+ token = eval(token, MIN_PRECEDENCE, false, res, err, ppToken);
+ token = extraTokenCheck(PpAtomIf, ppToken, token);
+ if (!res && !err)
+ token = CPPelse(1, ppToken);
+
+ return token;
+}
+
+// Handle #ifdef
+int TPpContext::CPPifdef(int defined, TPpToken* ppToken)
+{
+ int token = scanToken(ppToken);
+ int name = ppToken->atom;
+ if (++ifdepth > maxIfNesting) {
+ parseContext.ppError(ppToken->loc, "maximum nesting depth exceeded", "#ifdef", "");
+ return 0;
+ }
+ elsetracker++;
+ if (token != PpAtomIdentifier) {
+ if (defined)
+ parseContext.ppError(ppToken->loc, "must be followed by macro name", "#ifdef", "");
+ else
+ parseContext.ppError(ppToken->loc, "must be followed by macro name", "#ifndef", "");
+ } else {
+ Symbol *s = LookUpSymbol(name);
+ token = scanToken(ppToken);
+ if (token != '\n') {
+ parseContext.ppError(ppToken->loc, "unexpected tokens following #ifdef directive - expected a newline", "#ifdef", "");
+ while (token != '\n' && token != EndOfInput)
+ token = scanToken(ppToken);
+ }
+ if (((s && !s->mac.undef) ? 1 : 0) != defined)
+ token = CPPelse(1, ppToken);
+ }
+
+ return token;
+}
+
+// Handle #include
+int TPpContext::CPPinclude(TPpToken* ppToken)
+{
+ const TSourceLoc directiveLoc = ppToken->loc;
+ int token = scanToken(ppToken);
+ if (token != PpAtomConstString) {
+ // TODO: handle angle brackets.
+ parseContext.ppError(directiveLoc, "must be followed by a file designation", "#include", "");
+ } else {
+ // Make a copy of the name because it will be overwritten by the next token scan.
+ const std::string filename = ppToken->name;
+ token = scanToken(ppToken);
+ if (token != '\n' && token != EndOfInput) {
+ parseContext.ppError(ppToken->loc, "extra content after file designation", "#include", "");
+ } else {
+ TShader::Includer::IncludeResult* res = includer.include(filename.c_str(), TShader::Includer::EIncludeRelative, currentSourceFile.c_str(), includeStack.size() + 1);
+ if (res && !res->file_name.empty()) {
+ if (res->file_data && res->file_length) {
+ const bool forNextLine = parseContext.lineDirectiveShouldSetNextLine();
+ std::ostringstream prologue;
+ std::ostringstream epilogue;
+ prologue << "#line " << forNextLine << " " << "\"" << res->file_name << "\"\n";
+ epilogue << (res->file_data[res->file_length - 1] == '\n'? "" : "\n") << "#line " << directiveLoc.line + forNextLine << " " << directiveLoc.getStringNameOrNum() << "\n";
+ pushInput(new TokenizableIncludeFile(directiveLoc, prologue.str(), res, epilogue.str(), this));
+ }
+ // At EOF, there's no "current" location anymore.
+ if (token != EndOfInput) parseContext.setCurrentColumn(0);
+ // Don't accidentally return EndOfInput, which will end all preprocessing.
+ return '\n';
+ } else {
+ std::string message =
+ res ? std::string(res->file_data, res->file_length)
+ : std::string("Could not process include directive");
+ parseContext.ppError(directiveLoc, message.c_str(), "#include", "");
+ if (res) {
+ includer.releaseInclude(res);
+ }
+ }
+ }
+ }
+ return token;
+}
+
+// Handle #line
+int TPpContext::CPPline(TPpToken* ppToken)
+{
+ // "#line must have, after macro substitution, one of the following forms:
+ // "#line line
+ // "#line line source-string-number"
+
+ int token = scanToken(ppToken);
+ const TSourceLoc directiveLoc = ppToken->loc;
+ if (token == '\n') {
+ parseContext.ppError(ppToken->loc, "must by followed by an integral literal", "#line", "");
+ return token;
+ }
+
+ int lineRes = 0; // Line number after macro expansion.
+ int lineToken = 0;
+ bool hasFile = false;
+ int fileRes = 0; // Source file number after macro expansion.
+ const char* sourceName = nullptr; // Optional source file name.
+ bool lineErr = false;
+ bool fileErr = false;
+ token = eval(token, MIN_PRECEDENCE, false, lineRes, lineErr, ppToken);
+ if (! lineErr) {
+ lineToken = lineRes;
+ if (token == '\n')
+ ++lineRes;
+
+ if (parseContext.lineDirectiveShouldSetNextLine())
+ --lineRes;
+ parseContext.setCurrentLine(lineRes);
+
+ if (token != '\n') {
+ if (token == PpAtomConstString) {
+ parseContext.ppRequireExtensions(directiveLoc, 1, &E_GL_GOOGLE_cpp_style_line_directive, "filename-based #line");
+ // We need to save a copy of the string instead of pointing
+ // to the name field of the token since the name field
+ // will likely be overwritten by the next token scan.
+ sourceName = GetAtomString(LookUpAddString(ppToken->name));
+ parseContext.setCurrentSourceName(sourceName);
+ hasFile = true;
+ token = scanToken(ppToken);
+ } else {
+ token = eval(token, MIN_PRECEDENCE, false, fileRes, fileErr, ppToken);
+ if (! fileErr) {
+ parseContext.setCurrentString(fileRes);
+ hasFile = true;
+ }
+ }
+ }
+ }
+ if (!fileErr && !lineErr) {
+ parseContext.notifyLineDirective(directiveLoc.line, lineToken, hasFile, fileRes, sourceName);
+ }
+ token = extraTokenCheck(PpAtomLine, ppToken, token);
+
+ return token;
+}
+
+// Handle #error
+int TPpContext::CPPerror(TPpToken* ppToken)
+{
+ int token = scanToken(ppToken);
+ std::string message;
+ TSourceLoc loc = ppToken->loc;
+
+ while (token != '\n' && token != EndOfInput) {
+ if (token == PpAtomConstInt || token == PpAtomConstUint ||
+ token == PpAtomConstInt64 || token == PpAtomConstUint64 ||
+ token == PpAtomConstFloat || token == PpAtomConstDouble) {
+ message.append(ppToken->name);
+ } else if (token == PpAtomIdentifier || token == PpAtomConstString) {
+ message.append(ppToken->name);
+ } else {
+ message.append(GetAtomString(token));
+ }
+ message.append(" ");
+ token = scanToken(ppToken);
+ }
+ parseContext.notifyErrorDirective(loc.line, message.c_str());
+ //store this msg into the shader's information log..set the Compile Error flag!!!!
+ parseContext.ppError(loc, message.c_str(), "#error", "");
+
+ return '\n';
+}
+
+// Handle #pragma
+int TPpContext::CPPpragma(TPpToken* ppToken)
+{
+ char SrcStrName[2];
+ TVector<TString> tokens;
+
+ TSourceLoc loc = ppToken->loc; // because we go to the next line before processing
+ int token = scanToken(ppToken);
+ while (token != '\n' && token != EndOfInput) {
+ switch (token) {
+ case PpAtomIdentifier:
+ case PpAtomConstInt:
+ case PpAtomConstUint:
+ case PpAtomConstInt64:
+ case PpAtomConstUint64:
+ case PpAtomConstFloat:
+ case PpAtomConstDouble:
+ tokens.push_back(ppToken->name);
+ break;
+ default:
+ SrcStrName[0] = (char)token;
+ SrcStrName[1] = '\0';
+ tokens.push_back(SrcStrName);
+ }
+ token = scanToken(ppToken);
+ }
+
+ if (token == EndOfInput)
+ parseContext.ppError(loc, "directive must end with a newline", "#pragma", "");
+ else
+ parseContext.handlePragma(loc, tokens);
+
+ return token;
+}
+
+// #version: This is just for error checking: the version and profile are decided before preprocessing starts
+int TPpContext::CPPversion(TPpToken* ppToken)
+{
+ int token = scanToken(ppToken);
+
+ if (errorOnVersion || versionSeen)
+ parseContext.ppError(ppToken->loc, "must occur first in shader", "#version", "");
+ versionSeen = true;
+
+ if (token == '\n') {
+ parseContext.ppError(ppToken->loc, "must be followed by version number", "#version", "");
+
+ return token;
+ }
+
+ if (token != PpAtomConstInt)
+ parseContext.ppError(ppToken->loc, "must be followed by version number", "#version", "");
+
+ ppToken->ival = atoi(ppToken->name);
+ int versionNumber = ppToken->ival;
+ int line = ppToken->loc.line;
+ token = scanToken(ppToken);
+
+ if (token == '\n') {
+ parseContext.notifyVersion(line, versionNumber, nullptr);
+ return token;
+ } else {
+ if (ppToken->atom != PpAtomCore &&
+ ppToken->atom != PpAtomCompatibility &&
+ ppToken->atom != PpAtomEs)
+ parseContext.ppError(ppToken->loc, "bad profile name; use es, core, or compatibility", "#version", "");
+ parseContext.notifyVersion(line, versionNumber, ppToken->name);
+ token = scanToken(ppToken);
+
+ if (token == '\n')
+ return token;
+ else
+ parseContext.ppError(ppToken->loc, "bad tokens following profile -- expected newline", "#version", "");
+ }
+
+ return token;
+}
+
+// Handle #extension
+int TPpContext::CPPextension(TPpToken* ppToken)
+{
+ int line = ppToken->loc.line;
+ int token = scanToken(ppToken);
+ char extensionName[MaxTokenLength + 1];
+
+ if (token=='\n') {
+ parseContext.ppError(ppToken->loc, "extension name not specified", "#extension", "");
+ return token;
+ }
+
+ if (token != PpAtomIdentifier)
+ parseContext.ppError(ppToken->loc, "extension name expected", "#extension", "");
+
+ assert(strlen(ppToken->name) <= MaxTokenLength);
+ strcpy(extensionName, ppToken->name);
+
+ token = scanToken(ppToken);
+ if (token != ':') {
+ parseContext.ppError(ppToken->loc, "':' missing after extension name", "#extension", "");
+ return token;
+ }
+
+ token = scanToken(ppToken);
+ if (token != PpAtomIdentifier) {
+ parseContext.ppError(ppToken->loc, "behavior for extension not specified", "#extension", "");
+ return token;
+ }
+
+ parseContext.updateExtensionBehavior(line, extensionName, ppToken->name);
+ parseContext.notifyExtensionDirective(line, extensionName, ppToken->name);
+
+ token = scanToken(ppToken);
+ if (token == '\n')
+ return token;
+ else
+ parseContext.ppError(ppToken->loc, "extra tokens -- expected newline", "#extension","");
+
+ return token;
+}
+
+int TPpContext::readCPPline(TPpToken* ppToken)
+{
+ int token = scanToken(ppToken);
+
+ if (token == PpAtomIdentifier) {
+ switch (ppToken->atom) {
+ case PpAtomDefine:
+ token = CPPdefine(ppToken);
+ break;
+ case PpAtomElse:
+ if (elsetracker[elseSeen])
+ parseContext.ppError(ppToken->loc, "#else after #else", "#else", "");
+ elsetracker[elseSeen] = true;
+ if (! ifdepth)
+ parseContext.ppError(ppToken->loc, "mismatched statements", "#else", "");
+ token = extraTokenCheck(PpAtomElse, ppToken, scanToken(ppToken));
+ token = CPPelse(0, ppToken);
+ break;
+ case PpAtomElif:
+ if (! ifdepth)
+ parseContext.ppError(ppToken->loc, "mismatched statements", "#elif", "");
+ if (elseSeen[elsetracker])
+ parseContext.ppError(ppToken->loc, "#elif after #else", "#elif", "");
+ // this token is really a dont care, but we still need to eat the tokens
+ token = scanToken(ppToken);
+ while (token != '\n' && token != EndOfInput)
+ token = scanToken(ppToken);
+ token = CPPelse(0, ppToken);
+ break;
+ case PpAtomEndif:
+ if (! ifdepth)
+ parseContext.ppError(ppToken->loc, "mismatched statements", "#endif", "");
+ else {
+ elseSeen[elsetracker] = false;
+ --elsetracker;
+ --ifdepth;
+ }
+ token = extraTokenCheck(PpAtomEndif, ppToken, scanToken(ppToken));
+ break;
+ case PpAtomIf:
+ token = CPPif(ppToken);
+ break;
+ case PpAtomIfdef:
+ token = CPPifdef(1, ppToken);
+ break;
+ case PpAtomIfndef:
+ token = CPPifdef(0, ppToken);
+ break;
+ case PpAtomInclude:
+ parseContext.ppRequireExtensions(ppToken->loc, 1, &E_GL_GOOGLE_include_directive, "#include");
+ token = CPPinclude(ppToken);
+ break;
+ case PpAtomLine:
+ token = CPPline(ppToken);
+ break;
+ case PpAtomPragma:
+ token = CPPpragma(ppToken);
+ break;
+ case PpAtomUndef:
+ token = CPPundef(ppToken);
+ break;
+ case PpAtomError:
+ token = CPPerror(ppToken);
+ break;
+ case PpAtomVersion:
+ token = CPPversion(ppToken);
+ break;
+ case PpAtomExtension:
+ token = CPPextension(ppToken);
+ break;
+ default:
+ parseContext.ppError(ppToken->loc, "invalid directive:", "#", ppToken->name);
+ break;
+ }
+ } else if (token != '\n' && token != EndOfInput)
+ parseContext.ppError(ppToken->loc, "invalid directive", "#", "");
+
+ while (token != '\n' && token != EndOfInput)
+ token = scanToken(ppToken);
+
+ return token;
+}
+
+TPpContext::TokenStream* TPpContext::PrescanMacroArg(TokenStream* a, TPpToken* ppToken, bool newLineOkay)
+{
+ int token;
+ TokenStream *n;
+ RewindTokenStream(a);
+ do {
+ token = ReadToken(a, ppToken);
+ if (token == PpAtomIdentifier && LookUpSymbol(ppToken->atom))
+ break;
+ } while (token != EndOfInput);
+
+ if (token == EndOfInput)
+ return a;
+
+ n = new TokenStream;
+ pushInput(new tMarkerInput(this));
+ pushTokenStreamInput(a);
+ while ((token = scanToken(ppToken)) != tMarkerInput::marker) {
+ if (token == PpAtomIdentifier && MacroExpand(ppToken->atom, ppToken, false, newLineOkay) != 0)
+ continue;
+ RecordToken(n, token, ppToken);
+ }
+ popInput();
+ delete a;
+
+ return n;
+}
+
+//
+// Return the next token for a macro expansion, handling macro args.
+//
+int TPpContext::tMacroInput::scan(TPpToken* ppToken)
+{
+ int token;
+ do {
+ token = pp->ReadToken(mac->body, ppToken);
+ } while (token == ' '); // handle white space in macro
+
+ // TODO: preprocessor: properly handle whitespace (or lack of it) between tokens when expanding
+ if (token == PpAtomIdentifier) {
+ int i;
+ for (i = mac->argc - 1; i >= 0; i--)
+ if (mac->args[i] == ppToken->atom)
+ break;
+ if (i >= 0) {
+ pp->pushTokenStreamInput(args[i]);
+
+ return pp->scanToken(ppToken);
+ }
+ }
+
+ if (token == EndOfInput)
+ mac->busy = 0;
+
+ return token;
+}
+
+// return a textual zero, for scanning a macro that was never defined
+int TPpContext::tZeroInput::scan(TPpToken* ppToken)
+{
+ if (done)
+ return EndOfInput;
+
+ strcpy(ppToken->name, "0");
+ ppToken->ival = 0;
+ ppToken->space = false;
+ done = true;
+
+ return PpAtomConstInt;
+}
+
+//
+// Check an identifier (atom) to see if it is a macro that should be expanded.
+// If it is, and defined, push a tInput that will produce the appropriate expansion
+// and return 1.
+// If it is, but undefined, and expandUndef is requested, push a tInput that will
+// expand to 0 and return -1.
+// Otherwise, return 0 to indicate no expansion, which is not necessarily an error.
+//
+int TPpContext::MacroExpand(int atom, TPpToken* ppToken, bool expandUndef, bool newLineOkay)
+{
+ ppToken->space = false;
+ switch (atom) {
+ case PpAtomLineMacro:
+ ppToken->ival = parseContext.getCurrentLoc().line;
+ snprintf(ppToken->name, sizeof(ppToken->name), "%d", ppToken->ival);
+ UngetToken(PpAtomConstInt, ppToken);
+ return 1;
+
+ case PpAtomFileMacro: {
+ if (parseContext.getCurrentLoc().name)
+ parseContext.ppRequireExtensions(ppToken->loc, 1, &E_GL_GOOGLE_cpp_style_line_directive, "filename-based __FILE__");
+ ppToken->ival = parseContext.getCurrentLoc().string;
+ snprintf(ppToken->name, sizeof(ppToken->name), "%s", ppToken->loc.getStringNameOrNum().c_str());
+ UngetToken(PpAtomConstInt, ppToken);
+ return 1;
+ }
+
+ case PpAtomVersionMacro:
+ ppToken->ival = parseContext.version;
+ snprintf(ppToken->name, sizeof(ppToken->name), "%d", ppToken->ival);
+ UngetToken(PpAtomConstInt, ppToken);
+ return 1;
+
+ default:
+ break;
+ }
+
+ Symbol *sym = LookUpSymbol(atom);
+ int token;
+ int depth = 0;
+
+ // no recursive expansions
+ if (sym && sym->mac.busy)
+ return 0;
+
+ // not expanding undefined macros
+ if ((! sym || sym->mac.undef) && ! expandUndef)
+ return 0;
+
+ // 0 is the value of an undefined macro
+ if ((! sym || sym->mac.undef) && expandUndef) {
+ pushInput(new tZeroInput(this));
+ return -1;
+ }
+
+ tMacroInput *in = new tMacroInput(this);
+
+ TSourceLoc loc = ppToken->loc; // in case we go to the next line before discovering the error
+ in->mac = &sym->mac;
+ if (sym->mac.args) {
+ token = scanToken(ppToken);
+ if (newLineOkay) {
+ while (token == '\n')
+ token = scanToken(ppToken);
+ }
+ if (token != '(') {
+ parseContext.ppError(loc, "expected '(' following", "macro expansion", GetAtomString(atom));
+ UngetToken(token, ppToken);
+ ppToken->atom = atom;
+
+ delete in;
+ return 0;
+ }
+ in->args.resize(in->mac->argc);
+ for (int i = 0; i < in->mac->argc; i++)
+ in->args[i] = new TokenStream;
+ int arg = 0;
+ bool tokenRecorded = false;
+ do {
+ depth = 0;
+ while (1) {
+ token = scanToken(ppToken);
+ if (token == EndOfInput) {
+ parseContext.ppError(loc, "End of input in macro", "macro expansion", GetAtomString(atom));
+ delete in;
+ return 0;
+ }
+ if (token == '\n') {
+ if (! newLineOkay) {
+ parseContext.ppError(loc, "End of line in macro substitution:", "macro expansion", GetAtomString(atom));
+ delete in;
+ return 0;
+ }
+ continue;
+ }
+ if (token == '#') {
+ parseContext.ppError(ppToken->loc, "unexpected '#'", "macro expansion", GetAtomString(atom));
+ delete in;
+ return 0;
+ }
+ if (in->mac->argc == 0 && token != ')')
+ break;
+ if (depth == 0 && (token == ',' || token == ')'))
+ break;
+ if (token == '(')
+ depth++;
+ if (token == ')')
+ depth--;
+ RecordToken(in->args[arg], token, ppToken);
+ tokenRecorded = true;
+ }
+ if (token == ')') {
+ if (in->mac->argc == 1 && tokenRecorded == 0)
+ break;
+ arg++;
+ break;
+ }
+ arg++;
+ } while (arg < in->mac->argc);
+
+ if (arg < in->mac->argc)
+ parseContext.ppError(loc, "Too few args in Macro", "macro expansion", GetAtomString(atom));
+ else if (token != ')') {
+ depth=0;
+ while (token != EndOfInput && (depth > 0 || token != ')')) {
+ if (token == ')')
+ depth--;
+ token = scanToken(ppToken);
+ if (token == '(')
+ depth++;
+ }
+
+ if (token == EndOfInput) {
+ parseContext.ppError(loc, "End of input in macro", "macro expansion", GetAtomString(atom));
+ delete in;
+ return 0;
+ }
+ parseContext.ppError(loc, "Too many args in macro", "macro expansion", GetAtomString(atom));
+ }
+ for (int i = 0; i < in->mac->argc; i++)
+ in->args[i] = PrescanMacroArg(in->args[i], ppToken, newLineOkay);
+ }
+
+ pushInput(in);
+ sym->mac.busy = 1;
+ RewindTokenStream(sym->mac.body);
+
+ return 1;
+}
+
+} // end namespace glslang
diff --git a/chromium/third_party/glslang/src/glslang/MachineIndependent/preprocessor/PpAtom.cpp b/chromium/third_party/glslang/src/glslang/MachineIndependent/preprocessor/PpAtom.cpp
new file mode 100644
index 00000000000..763b6b4e67b
--- /dev/null
+++ b/chromium/third_party/glslang/src/glslang/MachineIndependent/preprocessor/PpAtom.cpp
@@ -0,0 +1,192 @@
+//
+//Copyright (C) 2002-2005 3Dlabs Inc. Ltd.
+//Copyright (C) 2013 LunarG, 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:
+//
+// Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 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.
+//
+// Neither the name of 3Dlabs Inc. Ltd. nor the names of its
+// contributors may be used to endorse or promote products derived
+// from this software without specific prior written permission.
+//
+//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+//"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 THE
+//COPYRIGHT HOLDERS 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.
+//
+/****************************************************************************\
+Copyright (c) 2002, NVIDIA Corporation.
+
+NVIDIA Corporation("NVIDIA") supplies this software to you in
+consideration of your agreement to the following terms, and your use,
+installation, modification or redistribution of this NVIDIA software
+constitutes acceptance of these terms. If you do not agree with these
+terms, please do not use, install, modify or redistribute this NVIDIA
+software.
+
+In consideration of your agreement to abide by the following terms, and
+subject to these terms, NVIDIA grants you a personal, non-exclusive
+license, under NVIDIA's copyrights in this original NVIDIA software (the
+"NVIDIA Software"), to use, reproduce, modify and redistribute the
+NVIDIA Software, with or without modifications, in source and/or binary
+forms; provided that if you redistribute the NVIDIA Software, you must
+retain the copyright notice of NVIDIA, this notice and the following
+text and disclaimers in all such redistributions of the NVIDIA Software.
+Neither the name, trademarks, service marks nor logos of NVIDIA
+Corporation may be used to endorse or promote products derived from the
+NVIDIA Software without specific prior written permission from NVIDIA.
+Except as expressly stated in this notice, no other rights or licenses
+express or implied, are granted by NVIDIA herein, including but not
+limited to any patent rights that may be infringed by your derivative
+works or by other works in which the NVIDIA Software may be
+incorporated. No hardware is licensed hereunder.
+
+THE NVIDIA SOFTWARE IS BEING PROVIDED ON AN "AS IS" BASIS, WITHOUT
+WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED,
+INCLUDING WITHOUT LIMITATION, WARRANTIES OR CONDITIONS OF TITLE,
+NON-INFRINGEMENT, MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR
+ITS USE AND OPERATION EITHER ALONE OR IN COMBINATION WITH OTHER
+PRODUCTS.
+
+IN NO EVENT SHALL NVIDIA BE LIABLE FOR ANY SPECIAL, INDIRECT,
+INCIDENTAL, EXEMPLARY, CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
+TO, LOST PROFITS; PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) OR ARISING IN ANY WAY
+OUT OF THE USE, REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION OF THE
+NVIDIA SOFTWARE, HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT,
+TORT (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF
+NVIDIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+\****************************************************************************/
+
+//
+// atom.c
+//
+
+#define _CRT_SECURE_NO_WARNINGS
+
+#include <assert.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+
+#include "PpContext.h"
+#include "PpTokens.h"
+
+namespace {
+
+using namespace glslang;
+
+const struct {
+ int val;
+ const char* str;
+} tokens[] = {
+ { PpAtomDefine, "define" },
+ { PpAtomDefined, "defined" },
+ { PpAtomUndef, "undef" },
+ { PpAtomIf, "if" },
+ { PpAtomElif, "elif" },
+ { PpAtomElse, "else" },
+ { PpAtomEndif, "endif" },
+ { PpAtomIfdef, "ifdef" },
+ { PpAtomIfndef, "ifndef" },
+ { PpAtomLine, "line" },
+ { PpAtomPragma, "pragma" },
+ { PpAtomError, "error" },
+
+ { PpAtomVersion, "version" },
+ { PpAtomCore, "core" },
+ { PpAtomCompatibility, "compatibility" },
+ { PpAtomEs, "es" },
+ { PpAtomExtension, "extension" },
+
+ { PpAtomLineMacro, "__LINE__" },
+ { PpAtomFileMacro, "__FILE__" },
+ { PpAtomVersionMacro, "__VERSION__" },
+
+ { PpAtomInclude, "include" },
+
+};
+
+} // end anonymous namespace
+
+namespace glslang {
+
+//
+// Map a new or existing string to an atom, inventing a new atom if necessary.
+//
+int TPpContext::LookUpAddString(const char* s)
+{
+ auto it = atomMap.find(s);
+ if (it == atomMap.end()) {
+ AddAtomFixed(s, nextAtom);
+ return nextAtom++;
+ } else
+ return it->second;
+}
+
+//
+// Map an already created atom to its string.
+//
+const char* TPpContext::GetAtomString(int atom)
+{
+ if ((size_t)atom >= stringMap.size())
+ return "<bad token>";
+
+ const TString* atomString = stringMap[atom];
+
+ return atomString ? atomString->c_str() : "<bad token>";
+}
+
+//
+// Add forced mapping of string to atom.
+//
+void TPpContext::AddAtomFixed(const char* s, int atom)
+{
+ auto it = atomMap.insert(std::pair<TString, int>(s, atom)).first;
+ if (stringMap.size() < (size_t)atom + 1)
+ stringMap.resize(atom + 100, 0);
+ stringMap[atom] = &it->first;
+}
+
+//
+// Initialize the atom table.
+//
+void TPpContext::InitAtomTable()
+{
+ // Add single character tokens to the atom table:
+ const char* s = "~!%^&*()-+=|,.<>/?;:[]{}#\\";
+ char t[2];
+
+ t[1] = '\0';
+ while (*s) {
+ t[0] = *s;
+ AddAtomFixed(t, s[0]);
+ s++;
+ }
+
+ // Add multiple character scanner tokens :
+ for (size_t ii = 0; ii < sizeof(tokens)/sizeof(tokens[0]); ii++)
+ AddAtomFixed(tokens[ii].str, tokens[ii].val);
+
+ nextAtom = PpAtomLast;
+}
+
+} // end namespace glslang
diff --git a/chromium/third_party/glslang/src/glslang/MachineIndependent/preprocessor/PpContext.cpp b/chromium/third_party/glslang/src/glslang/MachineIndependent/preprocessor/PpContext.cpp
new file mode 100644
index 00000000000..6f0b8a9a11a
--- /dev/null
+++ b/chromium/third_party/glslang/src/glslang/MachineIndependent/preprocessor/PpContext.cpp
@@ -0,0 +1,122 @@
+//
+//Copyright (C) 2002-2005 3Dlabs Inc. Ltd.
+//Copyright (C) 2013 LunarG, 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:
+//
+// Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 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.
+//
+// Neither the name of 3Dlabs Inc. Ltd. nor the names of its
+// contributors may be used to endorse or promote products derived
+// from this software without specific prior written permission.
+//
+//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+//"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 THE
+//COPYRIGHT HOLDERS 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.
+//
+/****************************************************************************\
+Copyright (c) 2002, NVIDIA Corporation.
+
+NVIDIA Corporation("NVIDIA") supplies this software to you in
+consideration of your agreement to the following terms, and your use,
+installation, modification or redistribution of this NVIDIA software
+constitutes acceptance of these terms. If you do not agree with these
+terms, please do not use, install, modify or redistribute this NVIDIA
+software.
+
+In consideration of your agreement to abide by the following terms, and
+subject to these terms, NVIDIA grants you a personal, non-exclusive
+license, under NVIDIA's copyrights in this original NVIDIA software (the
+"NVIDIA Software"), to use, reproduce, modify and redistribute the
+NVIDIA Software, with or without modifications, in source and/or binary
+forms; provided that if you redistribute the NVIDIA Software, you must
+retain the copyright notice of NVIDIA, this notice and the following
+text and disclaimers in all such redistributions of the NVIDIA Software.
+Neither the name, trademarks, service marks nor logos of NVIDIA
+Corporation may be used to endorse or promote products derived from the
+NVIDIA Software without specific prior written permission from NVIDIA.
+Except as expressly stated in this notice, no other rights or licenses
+express or implied, are granted by NVIDIA herein, including but not
+limited to any patent rights that may be infringed by your derivative
+works or by other works in which the NVIDIA Software may be
+incorporated. No hardware is licensed hereunder.
+
+THE NVIDIA SOFTWARE IS BEING PROVIDED ON AN "AS IS" BASIS, WITHOUT
+WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED,
+INCLUDING WITHOUT LIMITATION, WARRANTIES OR CONDITIONS OF TITLE,
+NON-INFRINGEMENT, MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR
+ITS USE AND OPERATION EITHER ALONE OR IN COMBINATION WITH OTHER
+PRODUCTS.
+
+IN NO EVENT SHALL NVIDIA BE LIABLE FOR ANY SPECIAL, INDIRECT,
+INCIDENTAL, EXEMPLARY, CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
+TO, LOST PROFITS; PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) OR ARISING IN ANY WAY
+OUT OF THE USE, REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION OF THE
+NVIDIA SOFTWARE, HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT,
+TORT (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF
+NVIDIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+\****************************************************************************/
+
+#include <stdio.h>
+#include <stdlib.h>
+
+#include "PpContext.h"
+
+namespace glslang {
+
+TPpContext::TPpContext(TParseContextBase& pc, const std::string& rootFileName, TShader::Includer& inclr) :
+ preamble(0), strings(0), parseContext(pc), includer(inclr), inComment(false),
+ rootFileName(rootFileName),
+ currentSourceFile(rootFileName)
+{
+ InitAtomTable();
+ InitScanner();
+
+ ifdepth = 0;
+ for (elsetracker = 0; elsetracker < maxIfNesting; elsetracker++)
+ elseSeen[elsetracker] = false;
+ elsetracker = 0;
+}
+
+TPpContext::~TPpContext()
+{
+ for (TSymbolMap::iterator it = symbols.begin(); it != symbols.end(); ++it)
+ delete it->second->mac.body;
+ mem_FreePool(pool);
+ delete [] preamble;
+
+ // free up the inputStack
+ while (! inputStack.empty())
+ popInput();
+}
+
+void TPpContext::setInput(TInputScanner& input, bool versionWillBeError)
+{
+ assert(inputStack.size() == 0);
+
+ pushInput(new tStringInput(this, input));
+
+ errorOnVersion = versionWillBeError;
+ versionSeen = false;
+}
+
+} // end namespace glslang
diff --git a/chromium/third_party/glslang/src/glslang/MachineIndependent/preprocessor/PpContext.h b/chromium/third_party/glslang/src/glslang/MachineIndependent/preprocessor/PpContext.h
new file mode 100644
index 00000000000..4e47fa055ec
--- /dev/null
+++ b/chromium/third_party/glslang/src/glslang/MachineIndependent/preprocessor/PpContext.h
@@ -0,0 +1,570 @@
+//
+//Copyright (C) 2013 LunarG, 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:
+//
+// Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 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.
+//
+// Neither the name of 3Dlabs Inc. Ltd. nor the names of its
+// contributors may be used to endorse or promote products derived
+// from this software without specific prior written permission.
+//
+//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+//"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 THE
+//COPYRIGHT HOLDERS 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.
+//
+/****************************************************************************\
+Copyright (c) 2002, NVIDIA Corporation.
+
+NVIDIA Corporation("NVIDIA") supplies this software to you in
+consideration of your agreement to the following terms, and your use,
+installation, modification or redistribution of this NVIDIA software
+constitutes acceptance of these terms. If you do not agree with these
+terms, please do not use, install, modify or redistribute this NVIDIA
+software.
+
+In consideration of your agreement to abide by the following terms, and
+subject to these terms, NVIDIA grants you a personal, non-exclusive
+license, under NVIDIA's copyrights in this original NVIDIA software (the
+"NVIDIA Software"), to use, reproduce, modify and redistribute the
+NVIDIA Software, with or without modifications, in source and/or binary
+forms; provided that if you redistribute the NVIDIA Software, you must
+retain the copyright notice of NVIDIA, this notice and the following
+text and disclaimers in all such redistributions of the NVIDIA Software.
+Neither the name, trademarks, service marks nor logos of NVIDIA
+Corporation may be used to endorse or promote products derived from the
+NVIDIA Software without specific prior written permission from NVIDIA.
+Except as expressly stated in this notice, no other rights or licenses
+express or implied, are granted by NVIDIA herein, including but not
+limited to any patent rights that may be infringed by your derivative
+works or by other works in which the NVIDIA Software may be
+incorporated. No hardware is licensed hereunder.
+
+THE NVIDIA SOFTWARE IS BEING PROVIDED ON AN "AS IS" BASIS, WITHOUT
+WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED,
+INCLUDING WITHOUT LIMITATION, WARRANTIES OR CONDITIONS OF TITLE,
+NON-INFRINGEMENT, MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR
+ITS USE AND OPERATION EITHER ALONE OR IN COMBINATION WITH OTHER
+PRODUCTS.
+
+IN NO EVENT SHALL NVIDIA BE LIABLE FOR ANY SPECIAL, INDIRECT,
+INCIDENTAL, EXEMPLARY, CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
+TO, LOST PROFITS; PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) OR ARISING IN ANY WAY
+OUT OF THE USE, REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION OF THE
+NVIDIA SOFTWARE, HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT,
+TORT (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF
+NVIDIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+\****************************************************************************/
+
+#ifndef PPCONTEXT_H
+#define PPCONTEXT_H
+
+#include <stack>
+#include <unordered_map>
+
+#include "../ParseHelper.h"
+
+/* windows only pragma */
+#ifdef _MSC_VER
+ #pragma warning(disable : 4127)
+#endif
+
+namespace glslang {
+
+class TPpToken {
+public:
+ TPpToken() : token(0), space(false), ival(0), dval(0.0), atom(0)
+ {
+ loc.init();
+ name[0] = 0;
+ }
+
+ bool operator==(const TPpToken& right)
+ {
+ return token == right.token && atom == right.atom &&
+ ival == right.ival && dval == right.dval &&
+ strcmp(name, right.name) == 0;
+ }
+ bool operator!=(const TPpToken& right) { return ! operator==(right); }
+
+ TSourceLoc loc;
+ int token;
+ bool space; // true if a space (for white space or a removed comment) should also be recognized, in front of the token returned
+ int ival;
+ double dval;
+ long long i64val;
+ int atom;
+ char name[MaxTokenLength + 1];
+};
+
+class TInputScanner;
+
+// This class is the result of turning a huge pile of C code communicating through globals
+// into a class. This was done to allowing instancing to attain thread safety.
+// Don't expect too much in terms of OO design.
+class TPpContext {
+public:
+ TPpContext(TParseContextBase&, const std::string& rootFileName, TShader::Includer&);
+ virtual ~TPpContext();
+
+ void setPreamble(const char* preamble, size_t length);
+
+ const char* tokenize(TPpToken* ppToken);
+
+ class tInput {
+ public:
+ tInput(TPpContext* p) : done(false), pp(p) { }
+ virtual ~tInput() { }
+
+ virtual int scan(TPpToken*) = 0;
+ virtual int getch() = 0;
+ virtual void ungetch() = 0;
+
+ // Will be called when we start reading tokens from this instance
+ virtual void notifyActivated() {}
+ // Will be called when we do not read tokens from this instance anymore
+ virtual void notifyDeleted() {}
+ protected:
+ bool done;
+ TPpContext* pp;
+ };
+
+ void setInput(TInputScanner& input, bool versionWillBeError);
+
+ void pushInput(tInput* in)
+ {
+ inputStack.push_back(in);
+ in->notifyActivated();
+ }
+ void popInput()
+ {
+ inputStack.back()->notifyDeleted();
+ delete inputStack.back();
+ inputStack.pop_back();
+ }
+
+ struct TokenStream {
+ TokenStream() : current(0) { }
+ TVector<unsigned char> data;
+ size_t current;
+ };
+
+ struct MemoryPool {
+ struct chunk *next;
+ uintptr_t free, end;
+ size_t chunksize;
+ uintptr_t alignmask;
+ };
+
+ //
+ // From Pp.cpp
+ //
+
+ struct MacroSymbol {
+ MacroSymbol() : argc(0), args(0), body(0), busy(0), undef(0) { }
+ int argc;
+ int *args;
+ TokenStream *body;
+ unsigned busy:1;
+ unsigned undef:1;
+ };
+
+ struct Symbol {
+ int atom;
+ MacroSymbol mac;
+ };
+
+ struct SymbolList {
+ struct SymbolList_Rec *next;
+ Symbol *symb;
+ };
+
+ MemoryPool *pool;
+ typedef TMap<int, Symbol*> TSymbolMap;
+ TSymbolMap symbols; // this has light use... just defined macros
+
+protected:
+ TPpContext(TPpContext&);
+ TPpContext& operator=(TPpContext&);
+
+ char* preamble; // string to parse, all before line 1 of string 0, it is 0 if no preamble
+ int preambleLength;
+ char** strings; // official strings of shader, starting a string 0 line 1
+ size_t* lengths;
+ int numStrings; // how many official strings there are
+ int currentString; // which string we're currently parsing (-1 for preamble)
+
+ // Scanner data:
+ int previous_token;
+ TParseContextBase& parseContext;
+
+ // Get the next token from *stack* of input sources, popping input sources
+ // that are out of tokens, down until an input sources is found that has a token.
+ // Return EndOfInput when there are no more tokens to be found by doing this.
+ int scanToken(TPpToken* ppToken)
+ {
+ int token = EndOfInput;
+
+ while (! inputStack.empty()) {
+ token = inputStack.back()->scan(ppToken);
+ if (token != EndOfInput)
+ break;
+ popInput();
+ }
+
+ return token;
+ }
+ int getChar() { return inputStack.back()->getch(); }
+ void ungetChar() { inputStack.back()->ungetch(); }
+
+ static const int maxMacroArgs = 64;
+ static const int maxIfNesting = 64;
+
+ int ifdepth; // current #if-#else-#endif nesting in the cpp.c file (pre-processor)
+ bool elseSeen[maxIfNesting]; // Keep a track of whether an else has been seen at a particular depth
+ int elsetracker; // #if-#else and #endif constructs...Counter.
+
+ class tMacroInput : public tInput {
+ public:
+ tMacroInput(TPpContext* pp) : tInput(pp) { }
+ virtual ~tMacroInput()
+ {
+ for (size_t i = 0; i < args.size(); ++i)
+ delete args[i];
+ }
+
+ virtual int scan(TPpToken*);
+ virtual int getch() { assert(0); return EndOfInput; }
+ virtual void ungetch() { assert(0); }
+ MacroSymbol *mac;
+ TVector<TokenStream*> args;
+ };
+
+ class tMarkerInput : public tInput {
+ public:
+ tMarkerInput(TPpContext* pp) : tInput(pp) { }
+ virtual int scan(TPpToken*)
+ {
+ if (done)
+ return EndOfInput;
+ done = true;
+
+ return marker;
+ }
+ virtual int getch() { assert(0); return EndOfInput; }
+ virtual void ungetch() { assert(0); }
+ static const int marker = -3;
+ };
+
+ class tZeroInput : public tInput {
+ public:
+ tZeroInput(TPpContext* pp) : tInput(pp) { }
+ virtual int scan(TPpToken*);
+ virtual int getch() { assert(0); return EndOfInput; }
+ virtual void ungetch() { assert(0); }
+ };
+
+ std::vector<tInput*> inputStack;
+ bool errorOnVersion;
+ bool versionSeen;
+
+ //
+ // from Pp.cpp
+ //
+
+ // Used to obtain #include content.
+ TShader::Includer& includer;
+
+ int InitCPP();
+ int CPPdefine(TPpToken * ppToken);
+ int CPPundef(TPpToken * ppToken);
+ int CPPelse(int matchelse, TPpToken * ppToken);
+ int extraTokenCheck(int atom, TPpToken* ppToken, int token);
+ int eval(int token, int precedence, bool shortCircuit, int& res, bool& err, TPpToken * ppToken);
+ int evalToToken(int token, bool shortCircuit, int& res, bool& err, TPpToken * ppToken);
+ int CPPif (TPpToken * ppToken);
+ int CPPifdef(int defined, TPpToken * ppToken);
+ int CPPinclude(TPpToken * ppToken);
+ int CPPline(TPpToken * ppToken);
+ int CPPerror(TPpToken * ppToken);
+ int CPPpragma(TPpToken * ppToken);
+ int CPPversion(TPpToken * ppToken);
+ int CPPextension(TPpToken * ppToken);
+ int readCPPline(TPpToken * ppToken);
+ TokenStream* PrescanMacroArg(TokenStream *a, TPpToken * ppToken, bool newLineOkay);
+ int MacroExpand(int atom, TPpToken* ppToken, bool expandUndef, bool newLineOkay);
+
+ //
+ // from PpSymbols.cpp
+ //
+ Symbol *NewSymbol(int name);
+ Symbol *AddSymbol(int atom);
+ Symbol *LookUpSymbol(int atom);
+
+ //
+ // From PpTokens.cpp
+ //
+ void lAddByte(TokenStream *fTok, unsigned char fVal);
+ int lReadByte(TokenStream *pTok);
+ void lUnreadByte(TokenStream *pTok);
+ void RecordToken(TokenStream* pTok, int token, TPpToken* ppToken);
+ void RewindTokenStream(TokenStream *pTok);
+ int ReadToken(TokenStream* pTok, TPpToken* ppToken);
+ void pushTokenStreamInput(TokenStream *ts);
+ void UngetToken(int token, TPpToken* ppToken);
+
+ class tTokenInput : public tInput {
+ public:
+ tTokenInput(TPpContext* pp, TokenStream* t) : tInput(pp), tokens(t) { }
+ virtual int scan(TPpToken *);
+ virtual int getch() { assert(0); return EndOfInput; }
+ virtual void ungetch() { assert(0); }
+ protected:
+ TokenStream *tokens;
+ };
+
+ class tUngotTokenInput : public tInput {
+ public:
+ tUngotTokenInput(TPpContext* pp, int t, TPpToken* p) : tInput(pp), token(t), lval(*p) { }
+ virtual int scan(TPpToken *);
+ virtual int getch() { assert(0); return EndOfInput; }
+ virtual void ungetch() { assert(0); }
+ protected:
+ int token;
+ TPpToken lval;
+ };
+
+ //
+ // From PpScanner.cpp
+ //
+ class tStringInput : public tInput {
+ public:
+ tStringInput(TPpContext* pp, TInputScanner& i) : tInput(pp), input(&i) { }
+ virtual int scan(TPpToken*);
+
+ // Scanner used to get source stream characters.
+ // - Escaped newlines are handled here, invisibly to the caller.
+ // - All forms of newline are handled, and turned into just a '\n'.
+ int getch()
+ {
+ int ch = input->get();
+
+ if (ch == '\\') {
+ // Move past escaped newlines, as many as sequentially exist
+ do {
+ if (input->peek() == '\r' || input->peek() == '\n') {
+ bool allowed = pp->parseContext.lineContinuationCheck(input->getSourceLoc(), pp->inComment);
+ if (! allowed && pp->inComment)
+ return '\\';
+
+ // escape one newline now
+ ch = input->get();
+ int nextch = input->get();
+ if (ch == '\r' && nextch == '\n')
+ ch = input->get();
+ else
+ ch = nextch;
+ } else
+ return '\\';
+ } while (ch == '\\');
+ }
+
+ // handle any non-escaped newline
+ if (ch == '\r' || ch == '\n') {
+ if (ch == '\r' && input->peek() == '\n')
+ input->get();
+ return '\n';
+ }
+
+ return ch;
+ }
+
+ // Scanner used to backup the source stream characters. Newlines are
+ // handled here, invisibly to the caller, meaning have to undo exactly
+ // what getch() above does (e.g., don't leave things in the middle of a
+ // sequence of escaped newlines).
+ void ungetch()
+ {
+ input->unget();
+
+ do {
+ int ch = input->peek();
+ if (ch == '\r' || ch == '\n') {
+ if (ch == '\n') {
+ // correct for two-character newline
+ input->unget();
+ if (input->peek() != '\r')
+ input->get();
+ }
+ // now in front of a complete newline, move past an escape character
+ input->unget();
+ if (input->peek() == '\\')
+ input->unget();
+ else {
+ input->get();
+ break;
+ }
+ } else
+ break;
+ } while (true);
+ }
+
+ protected:
+ TInputScanner* input;
+ };
+
+ // Holds a reference to included file data, as well as a
+ // prologue and an epilogue string. This can be scanned using the tInput
+ // interface and acts as a single source string.
+ class TokenizableIncludeFile : public tInput {
+ public:
+ // Copies prologue and epilogue. The includedFile must remain valid
+ // until this TokenizableIncludeFile is no longer used.
+ TokenizableIncludeFile(const TSourceLoc& startLoc,
+ const std::string& prologue,
+ TShader::Includer::IncludeResult* includedFile,
+ const std::string& epilogue,
+ TPpContext* pp)
+ : tInput(pp),
+ prologue_(prologue),
+ includedFile_(includedFile),
+ epilogue_(epilogue),
+ scanner(3, strings, lengths, names, 0, 0, true),
+ prevScanner(nullptr),
+ stringInput(pp, scanner)
+ {
+ strings[0] = prologue_.data();
+ strings[1] = includedFile_->file_data;
+ strings[2] = epilogue_.data();
+
+ lengths[0] = prologue_.size();
+ lengths[1] = includedFile_->file_length;
+ lengths[2] = epilogue_.size();
+
+ scanner.setLine(startLoc.line);
+ scanner.setString(startLoc.string);
+
+ scanner.setFile(startLoc.name, 0);
+ scanner.setFile(startLoc.name, 1);
+ scanner.setFile(startLoc.name, 2);
+ }
+
+ // tInput methods:
+ int scan(TPpToken* t) override { return stringInput.scan(t); }
+ int getch() override { return stringInput.getch(); }
+ void ungetch() override { stringInput.ungetch(); }
+
+ void notifyActivated() override
+ {
+ prevScanner = pp->parseContext.getScanner();
+ pp->parseContext.setScanner(&scanner);
+ pp->push_include(includedFile_);
+ }
+
+ void notifyDeleted() override
+ {
+ pp->parseContext.setScanner(prevScanner);
+ pp->pop_include();
+ }
+
+ private:
+ // Stores the prologue for this string.
+ const std::string prologue_;
+
+ // Stores the epilogue for this string.
+ const std::string epilogue_;
+
+ // Points to the IncludeResult that this TokenizableIncludeFile represents.
+ TShader::Includer::IncludeResult* includedFile_;
+
+ // Will point to prologue_, includedFile_->file_data and epilogue_
+ // This is passed to scanner constructor.
+ // These do not own the storage and it must remain valid until this
+ // object has been destroyed.
+ const char* strings[3];
+ // Length of str_, passed to scanner constructor.
+ size_t lengths[3];
+ // String names
+ const char* names[3];
+ // Scans over str_.
+ TInputScanner scanner;
+ // The previous effective scanner before the scanner in this instance
+ // has been activated.
+ TInputScanner* prevScanner;
+ // Delegate object implementing the tInput interface.
+ tStringInput stringInput;
+ };
+
+ int InitScanner();
+ int ScanFromString(char* s);
+ void missingEndifCheck();
+ int lFloatConst(int len, int ch, TPpToken* ppToken);
+
+ void push_include(TShader::Includer::IncludeResult* result)
+ {
+ currentSourceFile = result->file_name;
+ includeStack.push(result);
+ }
+
+ void pop_include()
+ {
+ TShader::Includer::IncludeResult* include = includeStack.top();
+ includeStack.pop();
+ includer.releaseInclude(include);
+ if (includeStack.empty()) {
+ currentSourceFile = rootFileName;
+ } else {
+ currentSourceFile = includeStack.top()->file_name;
+ }
+ }
+
+ bool inComment;
+
+ //
+ // From PpAtom.cpp
+ //
+ typedef TUnorderedMap<TString, int> TAtomMap;
+ typedef TVector<const TString*> TStringMap;
+
+ TAtomMap atomMap;
+ TStringMap stringMap;
+ std::stack<TShader::Includer::IncludeResult*> includeStack;
+ std::string currentSourceFile;
+ std::string rootFileName;
+ int nextAtom;
+ void InitAtomTable();
+ void AddAtomFixed(const char* s, int atom);
+ int LookUpAddString(const char* s);
+ const char* GetAtomString(int atom);
+
+ //
+ // From PpMemory.cpp
+ //
+ MemoryPool *mem_CreatePool(size_t chunksize, unsigned align);
+ void mem_FreePool(MemoryPool*);
+ void *mem_Alloc(MemoryPool* p, size_t size);
+ int mem_AddCleanup(MemoryPool* p, void (*fn)(void *, void*), void* arg1, void* arg2);
+};
+
+} // end namespace glslang
+
+#endif // PPCONTEXT_H
diff --git a/chromium/third_party/glslang/src/glslang/MachineIndependent/preprocessor/PpMemory.cpp b/chromium/third_party/glslang/src/glslang/MachineIndependent/preprocessor/PpMemory.cpp
new file mode 100644
index 00000000000..57a49fb893a
--- /dev/null
+++ b/chromium/third_party/glslang/src/glslang/MachineIndependent/preprocessor/PpMemory.cpp
@@ -0,0 +1,162 @@
+//
+//Copyright (C) 2002-2005 3Dlabs Inc. Ltd.
+//Copyright (C) 2013 LunarG, 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:
+//
+// Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 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.
+//
+// Neither the name of 3Dlabs Inc. Ltd. nor the names of its
+// contributors may be used to endorse or promote products derived
+// from this software without specific prior written permission.
+//
+//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+//"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 THE
+//COPYRIGHT HOLDERS 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.
+//
+/****************************************************************************\
+Copyright (c) 2002, NVIDIA Corporation.
+
+NVIDIA Corporation("NVIDIA") supplies this software to you in
+consideration of your agreement to the following terms, and your use,
+installation, modification or redistribution of this NVIDIA software
+constitutes acceptance of these terms. If you do not agree with these
+terms, please do not use, install, modify or redistribute this NVIDIA
+software.
+
+In consideration of your agreement to abide by the following terms, and
+subject to these terms, NVIDIA grants you a personal, non-exclusive
+license, under NVIDIA's copyrights in this original NVIDIA software (the
+"NVIDIA Software"), to use, reproduce, modify and redistribute the
+NVIDIA Software, with or without modifications, in source and/or binary
+forms; provided that if you redistribute the NVIDIA Software, you must
+retain the copyright notice of NVIDIA, this notice and the following
+text and disclaimers in all such redistributions of the NVIDIA Software.
+Neither the name, trademarks, service marks nor logos of NVIDIA
+Corporation may be used to endorse or promote products derived from the
+NVIDIA Software without specific prior written permission from NVIDIA.
+Except as expressly stated in this notice, no other rights or licenses
+express or implied, are granted by NVIDIA herein, including but not
+limited to any patent rights that may be infringed by your derivative
+works or by other works in which the NVIDIA Software may be
+incorporated. No hardware is licensed hereunder.
+
+THE NVIDIA SOFTWARE IS BEING PROVIDED ON AN "AS IS" BASIS, WITHOUT
+WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED,
+INCLUDING WITHOUT LIMITATION, WARRANTIES OR CONDITIONS OF TITLE,
+NON-INFRINGEMENT, MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR
+ITS USE AND OPERATION EITHER ALONE OR IN COMBINATION WITH OTHER
+PRODUCTS.
+
+IN NO EVENT SHALL NVIDIA BE LIABLE FOR ANY SPECIAL, INDIRECT,
+INCIDENTAL, EXEMPLARY, CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
+TO, LOST PROFITS; PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) OR ARISING IN ANY WAY
+OUT OF THE USE, REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION OF THE
+NVIDIA SOFTWARE, HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT,
+TORT (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF
+NVIDIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+\****************************************************************************/
+
+#include <stddef.h>
+#include <stdlib.h>
+#include <string.h>
+#include <stdint.h>
+
+#include "PpContext.h"
+
+// default alignment and chunksize, if called with 0 arguments
+#define CHUNKSIZE (64*1024)
+#define ALIGN 8
+
+namespace glslang {
+
+struct chunk {
+ struct chunk *next;
+};
+
+TPpContext::MemoryPool* TPpContext::mem_CreatePool(size_t chunksize, unsigned int align)
+{
+ if (align == 0)
+ align = ALIGN;
+ if (chunksize == 0)
+ chunksize = CHUNKSIZE;
+ if (align & (align - 1))
+ return nullptr;
+ if (chunksize < sizeof(MemoryPool))
+ return nullptr;
+ if (chunksize & (align - 1))
+ return nullptr;
+
+ MemoryPool *pool = (MemoryPool*)malloc(chunksize);
+ if (! pool)
+ return nullptr;
+
+ pool->next = 0;
+ pool->chunksize = chunksize;
+ pool->alignmask = (uintptr_t)(align) - 1;
+ pool->free = ((uintptr_t)(pool + 1) + pool->alignmask) & ~pool->alignmask;
+ pool->end = (uintptr_t)pool + chunksize;
+
+ return pool;
+}
+
+void TPpContext::mem_FreePool(MemoryPool *pool)
+{
+ struct chunk *p, *next;
+
+ for (p = (struct chunk *)pool; p; p = next) {
+ next = p->next;
+ free(p);
+ }
+}
+
+void* TPpContext::mem_Alloc(MemoryPool *pool, size_t size)
+{
+ struct chunk *ch;
+ void *rv = (void *)pool->free;
+ size = (size + pool->alignmask) & ~pool->alignmask;
+ if (size <= 0) size = pool->alignmask;
+ pool->free += size;
+ if (pool->free > pool->end || pool->free < (uintptr_t)rv) {
+ size_t minreq = (size + sizeof(struct chunk) + pool->alignmask) & ~pool->alignmask;
+ pool->free = (uintptr_t)rv;
+ if (minreq >= pool->chunksize) {
+ // request size is too big for the chunksize, so allocate it as
+ // a single chunk of the right size
+ ch = (struct chunk*)malloc(minreq);
+ if (! ch)
+ return nullptr;
+ } else {
+ ch = (struct chunk*)malloc(pool->chunksize);
+ if (! ch)
+ return nullptr;
+ pool->free = (uintptr_t)ch + minreq;
+ pool->end = (uintptr_t)ch + pool->chunksize;
+ }
+ ch->next = pool->next;
+ pool->next = ch;
+ rv = (void *)(((uintptr_t)(ch+1) + pool->alignmask) & ~pool->alignmask);
+ }
+ return rv;
+}
+
+} // end namespace glslang
diff --git a/chromium/third_party/glslang/src/glslang/MachineIndependent/preprocessor/PpScanner.cpp b/chromium/third_party/glslang/src/glslang/MachineIndependent/preprocessor/PpScanner.cpp
new file mode 100644
index 00000000000..b3d1af6dad2
--- /dev/null
+++ b/chromium/third_party/glslang/src/glslang/MachineIndependent/preprocessor/PpScanner.cpp
@@ -0,0 +1,778 @@
+//
+//Copyright (C) 2002-2005 3Dlabs Inc. Ltd.
+//Copyright (C) 2013 LunarG, 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:
+//
+// Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 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.
+//
+// Neither the name of 3Dlabs Inc. Ltd. nor the names of its
+// contributors may be used to endorse or promote products derived
+// from this software without specific prior written permission.
+//
+//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+//"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 THE
+//COPYRIGHT HOLDERS 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.
+//
+/****************************************************************************\
+Copyright (c) 2002, NVIDIA Corporation.
+
+NVIDIA Corporation("NVIDIA") supplies this software to you in
+consideration of your agreement to the following terms, and your use,
+installation, modification or redistribution of this NVIDIA software
+constitutes acceptance of these terms. If you do not agree with these
+terms, please do not use, install, modify or redistribute this NVIDIA
+software.
+
+In consideration of your agreement to abide by the following terms, and
+subject to these terms, NVIDIA grants you a personal, non-exclusive
+license, under NVIDIA's copyrights in this original NVIDIA software (the
+"NVIDIA Software"), to use, reproduce, modify and redistribute the
+NVIDIA Software, with or without modifications, in source and/or binary
+forms; provided that if you redistribute the NVIDIA Software, you must
+retain the copyright notice of NVIDIA, this notice and the following
+text and disclaimers in all such redistributions of the NVIDIA Software.
+Neither the name, trademarks, service marks nor logos of NVIDIA
+Corporation may be used to endorse or promote products derived from the
+NVIDIA Software without specific prior written permission from NVIDIA.
+Except as expressly stated in this notice, no other rights or licenses
+express or implied, are granted by NVIDIA herein, including but not
+limited to any patent rights that may be infringed by your derivative
+works or by other works in which the NVIDIA Software may be
+incorporated. No hardware is licensed hereunder.
+
+THE NVIDIA SOFTWARE IS BEING PROVIDED ON AN "AS IS" BASIS, WITHOUT
+WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED,
+INCLUDING WITHOUT LIMITATION, WARRANTIES OR CONDITIONS OF TITLE,
+NON-INFRINGEMENT, MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR
+ITS USE AND OPERATION EITHER ALONE OR IN COMBINATION WITH OTHER
+PRODUCTS.
+
+IN NO EVENT SHALL NVIDIA BE LIABLE FOR ANY SPECIAL, INDIRECT,
+INCIDENTAL, EXEMPLARY, CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
+TO, LOST PROFITS; PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) OR ARISING IN ANY WAY
+OUT OF THE USE, REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION OF THE
+NVIDIA SOFTWARE, HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT,
+TORT (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF
+NVIDIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+\****************************************************************************/
+//
+// scanner.c
+//
+
+#define _CRT_SECURE_NO_WARNINGS
+
+#include <stdarg.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "PpContext.h"
+#include "PpTokens.h"
+#include "../Scan.h"
+
+namespace glslang {
+
+int TPpContext::InitScanner()
+{
+ // Add various atoms needed by the CPP line scanner:
+ if (!InitCPP())
+ return 0;
+
+ previous_token = '\n';
+
+ return 1;
+}
+
+///////////////////////////////////////////////////////////////////////////////////////////////
+/////////////////////////////////// Floating point constants: /////////////////////////////////
+///////////////////////////////////////////////////////////////////////////////////////////////
+
+/*
+* lFloatConst() - Scan a single- or double-precision floating point constant. Assumes that the scanner
+* has seen at least one digit, followed by either a decimal '.' or the
+* letter 'e', or a precision ending (e.g., F or LF).
+*/
+
+int TPpContext::lFloatConst(int len, int ch, TPpToken* ppToken)
+{
+ bool HasDecimalOrExponent = false;
+ int declen;
+ int str_len;
+ int isDouble = 0;
+
+ declen = 0;
+
+ str_len=len;
+ char* str = ppToken->name;
+ if (ch == '.') {
+ HasDecimalOrExponent = true;
+ str[len++] = (char)ch;
+ ch = getChar();
+ while (ch >= '0' && ch <= '9') {
+ if (len < MaxTokenLength) {
+ declen++;
+ if (len > 0 || ch != '0') {
+ str[len] = (char)ch;
+ len++;
+ str_len++;
+ }
+ ch = getChar();
+ } else {
+ parseContext.ppError(ppToken->loc, "float literal too long", "", "");
+ len = 1;
+ str_len = 1;
+ }
+ }
+ }
+
+ // Exponent:
+
+ if (ch == 'e' || ch == 'E') {
+ HasDecimalOrExponent = true;
+ if (len >= MaxTokenLength) {
+ parseContext.ppError(ppToken->loc, "float literal too long", "", "");
+ len = 1;
+ str_len = 1;
+ } else {
+ str[len++] = (char)ch;
+ ch = getChar();
+ if (ch == '+') {
+ str[len++] = (char)ch;
+ ch = getChar();
+ } else if (ch == '-') {
+ str[len++] = (char)ch;
+ ch = getChar();
+ }
+ if (ch >= '0' && ch <= '9') {
+ while (ch >= '0' && ch <= '9') {
+ if (len < MaxTokenLength) {
+ str[len++] = (char)ch;
+ ch = getChar();
+ } else {
+ parseContext.ppError(ppToken->loc, "float literal too long", "", "");
+ len = 1;
+ str_len = 1;
+ }
+ }
+ } else {
+ parseContext.ppError(ppToken->loc, "bad character in float exponent", "", "");
+ }
+ }
+ }
+
+ if (len == 0) {
+ ppToken->dval = 0.0;
+ strcpy(str, "0.0");
+ } else {
+ if (ch == 'l' || ch == 'L') {
+ parseContext.doubleCheck(ppToken->loc, "double floating-point suffix");
+ if (! HasDecimalOrExponent)
+ parseContext.ppError(ppToken->loc, "float literal needs a decimal point or exponent", "", "");
+ int ch2 = getChar();
+ if (ch2 != 'f' && ch2 != 'F') {
+ ungetChar();
+ ungetChar();
+ } else {
+ if (len < MaxTokenLength) {
+ str[len++] = (char)ch;
+ str[len++] = (char)ch2;
+ isDouble = 1;
+ } else {
+ parseContext.ppError(ppToken->loc, "float literal too long", "", "");
+ len = 1,str_len=1;
+ }
+ }
+ } else if (ch == 'f' || ch == 'F') {
+ parseContext.profileRequires(ppToken->loc, EEsProfile, 300, nullptr, "floating-point suffix");
+ if (! parseContext.relaxedErrors())
+ parseContext.profileRequires(ppToken->loc, ~EEsProfile, 120, nullptr, "floating-point suffix");
+ if (! HasDecimalOrExponent)
+ parseContext.ppError(ppToken->loc, "float literal needs a decimal point or exponent", "", "");
+ if (len < MaxTokenLength)
+ str[len++] = (char)ch;
+ else {
+ parseContext.ppError(ppToken->loc, "float literal too long", "", "");
+ len = 1,str_len=1;
+ }
+ } else
+ ungetChar();
+
+ str[len]='\0';
+
+ ppToken->dval = strtod(str, nullptr);
+ }
+
+ if (isDouble)
+ return PpAtomConstDouble;
+ else
+ return PpAtomConstFloat;
+}
+
+//
+// Scanner used to tokenize source stream.
+//
+int TPpContext::tStringInput::scan(TPpToken* ppToken)
+{
+ char* tokenText = ppToken->name;
+ int AlreadyComplained = 0;
+ int len = 0;
+ int ch = 0;
+ int ii = 0;
+ unsigned long long ival = 0;
+ bool enableInt64 = pp->parseContext.version >= 450 && pp->parseContext.extensionTurnedOn(E_GL_ARB_gpu_shader_int64);
+
+ ppToken->ival = 0;
+ ppToken->i64val = 0;
+ ppToken->space = false;
+ ch = getch();
+ for (;;) {
+ while (ch == ' ' || ch == '\t') {
+ ppToken->space = true;
+ ch = getch();
+ }
+
+ ppToken->loc = pp->parseContext.getCurrentLoc();
+ len = 0;
+ switch (ch) {
+ default:
+ // Single character token, including EndOfInput, '#' and '\' (escaped newlines are handled at a lower level, so this is just a '\' token)
+ return ch;
+
+ case 'A': case 'B': case 'C': case 'D': case 'E':
+ case 'F': case 'G': case 'H': case 'I': case 'J':
+ case 'K': case 'L': case 'M': case 'N': case 'O':
+ case 'P': case 'Q': case 'R': case 'S': case 'T':
+ case 'U': case 'V': case 'W': case 'X': case 'Y':
+ case 'Z': case '_':
+ case 'a': case 'b': case 'c': case 'd': case 'e':
+ case 'f': case 'g': case 'h': case 'i': case 'j':
+ case 'k': case 'l': case 'm': case 'n': case 'o':
+ case 'p': case 'q': case 'r': case 's': case 't':
+ case 'u': case 'v': case 'w': case 'x': case 'y':
+ case 'z':
+ do {
+ if (len < MaxTokenLength) {
+ tokenText[len++] = (char)ch;
+ ch = getch();
+ } else {
+ if (! AlreadyComplained) {
+ pp->parseContext.ppError(ppToken->loc, "name too long", "", "");
+ AlreadyComplained = 1;
+ }
+ ch = getch();
+ }
+ } while ((ch >= 'a' && ch <= 'z') ||
+ (ch >= 'A' && ch <= 'Z') ||
+ (ch >= '0' && ch <= '9') ||
+ ch == '_');
+
+ // line continuation with no token before or after makes len == 0, and need to start over skipping white space, etc.
+ if (len == 0)
+ continue;
+
+ tokenText[len] = '\0';
+ ungetch();
+ ppToken->atom = pp->LookUpAddString(tokenText);
+ return PpAtomIdentifier;
+ case '0':
+ ppToken->name[len++] = (char)ch;
+ ch = getch();
+ if (ch == 'x' || ch == 'X') {
+ // must be hexidecimal
+
+ bool isUnsigned = false;
+ bool isInt64 = false;
+ ppToken->name[len++] = (char)ch;
+ ch = getch();
+ if ((ch >= '0' && ch <= '9') ||
+ (ch >= 'A' && ch <= 'F') ||
+ (ch >= 'a' && ch <= 'f')) {
+
+ ival = 0;
+ do {
+ if (ival <= 0x0fffffff || (enableInt64 && ival <= 0x0fffffffffffffffull)) {
+ ppToken->name[len++] = (char)ch;
+ if (ch >= '0' && ch <= '9') {
+ ii = ch - '0';
+ } else if (ch >= 'A' && ch <= 'F') {
+ ii = ch - 'A' + 10;
+ } else if (ch >= 'a' && ch <= 'f') {
+ ii = ch - 'a' + 10;
+ } else
+ pp->parseContext.ppError(ppToken->loc, "bad digit in hexidecimal literal", "", "");
+ ival = (ival << 4) | ii;
+ } else {
+ if (! AlreadyComplained) {
+ pp->parseContext.ppError(ppToken->loc, "hexidecimal literal too big", "", "");
+ AlreadyComplained = 1;
+ }
+ ival = 0xffffffffffffffffull;
+ }
+ ch = getch();
+ } while ((ch >= '0' && ch <= '9') ||
+ (ch >= 'A' && ch <= 'F') ||
+ (ch >= 'a' && ch <= 'f'));
+ } else {
+ pp->parseContext.ppError(ppToken->loc, "bad digit in hexidecimal literal", "", "");
+ }
+ if (ch == 'u' || ch == 'U') {
+ if (len < MaxTokenLength)
+ ppToken->name[len++] = (char)ch;
+ isUnsigned = true;
+
+ if (enableInt64) {
+ int nextCh = getch();
+ if ((ch == 'u' && nextCh == 'l') || (ch == 'U' && nextCh == 'L')) {
+ if (len < MaxTokenLength)
+ ppToken->name[len++] = (char)nextCh;
+ isInt64 = true;
+ } else
+ ungetch();
+ }
+ }
+ else if (enableInt64 && (ch == 'l' || ch == 'L')) {
+ if (len < MaxTokenLength)
+ ppToken->name[len++] = (char)ch;
+ isInt64 = true;
+ } else
+ ungetch();
+ ppToken->name[len] = '\0';
+
+ if (isInt64) {
+ ppToken->i64val = ival;
+ return isUnsigned ? PpAtomConstUint64 : PpAtomConstInt64;
+ } else {
+ ppToken->ival = (int)ival;
+ return isUnsigned ? PpAtomConstUint : PpAtomConstInt;
+ }
+ } else {
+ // could be octal integer or floating point, speculative pursue octal until it must be floating point
+
+ bool isUnsigned = false;
+ bool isInt64 = false;
+ bool octalOverflow = false;
+ bool nonOctal = false;
+ ival = 0;
+
+ // see how much octal-like stuff we can read
+ while (ch >= '0' && ch <= '7') {
+ if (len < MaxTokenLength)
+ ppToken->name[len++] = (char)ch;
+ else if (! AlreadyComplained) {
+ pp->parseContext.ppError(ppToken->loc, "numeric literal too long", "", "");
+ AlreadyComplained = 1;
+ }
+ if (ival <= 0x1fffffff || (enableInt64 && ival <= 0x1fffffffffffffffull)) {
+ ii = ch - '0';
+ ival = (ival << 3) | ii;
+ } else
+ octalOverflow = true;
+ ch = getch();
+ }
+
+ // could be part of a float...
+ if (ch == '8' || ch == '9') {
+ nonOctal = true;
+ do {
+ if (len < MaxTokenLength)
+ ppToken->name[len++] = (char)ch;
+ else if (! AlreadyComplained) {
+ pp->parseContext.ppError(ppToken->loc, "numeric literal too long", "", "");
+ AlreadyComplained = 1;
+ }
+ ch = getch();
+ } while (ch >= '0' && ch <= '9');
+ }
+ if (ch == '.' || ch == 'e' || ch == 'f' || ch == 'E' || ch == 'F')
+ return pp->lFloatConst(len, ch, ppToken);
+
+ // wasn't a float, so must be octal...
+ if (nonOctal)
+ pp->parseContext.ppError(ppToken->loc, "octal literal digit too large", "", "");
+
+ if (ch == 'u' || ch == 'U') {
+ if (len < MaxTokenLength)
+ ppToken->name[len++] = (char)ch;
+ isUnsigned = true;
+
+ if (enableInt64) {
+ int nextCh = getch();
+ if ((ch == 'u' && nextCh == 'l') || (ch == 'U' && nextCh == 'L')) {
+ if (len < MaxTokenLength)
+ ppToken->name[len++] = (char)nextCh;
+ isInt64 = true;
+ } else
+ ungetch();
+ }
+ }
+ else if (enableInt64 && (ch == 'l' || ch == 'L')) {
+ if (len < MaxTokenLength)
+ ppToken->name[len++] = (char)ch;
+ isInt64 = true;
+ } else
+ ungetch();
+ ppToken->name[len] = '\0';
+
+ if (octalOverflow)
+ pp->parseContext.ppError(ppToken->loc, "octal literal too big", "", "");
+
+ if (isInt64) {
+ ppToken->i64val = ival;
+ return isUnsigned ? PpAtomConstUint64 : PpAtomConstInt64;
+ } else {
+ ppToken->ival = (int)ival;
+ return isUnsigned ? PpAtomConstUint : PpAtomConstInt;
+ }
+ }
+ break;
+ case '1': case '2': case '3': case '4':
+ case '5': case '6': case '7': case '8': case '9':
+ // can't be hexidecimal or octal, is either decimal or floating point
+
+ do {
+ if (len < MaxTokenLength)
+ ppToken->name[len++] = (char)ch;
+ else if (! AlreadyComplained) {
+ pp->parseContext.ppError(ppToken->loc, "numeric literal too long", "", "");
+ AlreadyComplained = 1;
+ }
+ ch = getch();
+ } while (ch >= '0' && ch <= '9');
+ if (ch == '.' || ch == 'e' || ch == 'f' || ch == 'E' || ch == 'F') {
+ return pp->lFloatConst(len, ch, ppToken);
+ } else {
+ // Finish handling signed and unsigned integers
+ int numericLen = len;
+ bool isUnsigned = false;
+ bool isInt64 = false;
+ if (ch == 'u' || ch == 'U') {
+ if (len < MaxTokenLength)
+ ppToken->name[len++] = (char)ch;
+ isUnsigned = true;
+
+ if (enableInt64) {
+ int nextCh = getch();
+ if ((ch == 'u' && nextCh == 'l') || (ch == 'U' && nextCh == 'L')) {
+ if (len < MaxTokenLength)
+ ppToken->name[len++] = (char)nextCh;
+ isInt64 = true;
+ } else
+ ungetch();
+ }
+ } else if (enableInt64 && (ch == 'l' || ch == 'L')) {
+ if (len < MaxTokenLength)
+ ppToken->name[len++] = (char)ch;
+ isInt64 = true;
+ } else
+ ungetch();
+
+ ppToken->name[len] = '\0';
+ ival = 0;
+ const unsigned oneTenthMaxInt = 0xFFFFFFFFu / 10;
+ const unsigned remainderMaxInt = 0xFFFFFFFFu - 10 * oneTenthMaxInt;
+ const unsigned long long oneTenthMaxInt64 = 0xFFFFFFFFFFFFFFFFull / 10;
+ const unsigned long long remainderMaxInt64 = 0xFFFFFFFFFFFFFFFFull - 10 * oneTenthMaxInt64;
+ for (int i = 0; i < numericLen; i++) {
+ ch = ppToken->name[i] - '0';
+ if ((enableInt64 == false && ((ival > oneTenthMaxInt) || (ival == oneTenthMaxInt && (unsigned)ch > remainderMaxInt))) ||
+ (enableInt64 && ((ival > oneTenthMaxInt64) || (ival == oneTenthMaxInt64 && (unsigned long long)ch > remainderMaxInt64)))) {
+ pp->parseContext.ppError(ppToken->loc, "numeric literal too big", "", "");
+ ival = 0xFFFFFFFFFFFFFFFFull;
+ break;
+ } else
+ ival = ival * 10 + ch;
+ }
+
+ if (isInt64) {
+ ppToken->i64val = ival;
+ return isUnsigned ? PpAtomConstUint64 : PpAtomConstInt64;
+ } else {
+ ppToken->ival = (int)ival;
+ return isUnsigned ? PpAtomConstUint : PpAtomConstInt;
+ }
+ }
+ break;
+ case '-':
+ ch = getch();
+ if (ch == '-') {
+ return PpAtomDecrement;
+ } else if (ch == '=') {
+ return PpAtomSub;
+ } else {
+ ungetch();
+ return '-';
+ }
+ case '+':
+ ch = getch();
+ if (ch == '+') {
+ return PpAtomIncrement;
+ } else if (ch == '=') {
+ return PpAtomAdd;
+ } else {
+ ungetch();
+ return '+';
+ }
+ case '*':
+ ch = getch();
+ if (ch == '=') {
+ return PpAtomMul;
+ } else {
+ ungetch();
+ return '*';
+ }
+ case '%':
+ ch = getch();
+ if (ch == '=') {
+ return PpAtomMod;
+ } else {
+ ungetch();
+ return '%';
+ }
+ case '^':
+ ch = getch();
+ if (ch == '^') {
+ return PpAtomXor;
+ } else {
+ if (ch == '=')
+ return PpAtomXorAssign;
+ else{
+ ungetch();
+ return '^';
+ }
+ }
+
+ case '=':
+ ch = getch();
+ if (ch == '=') {
+ return PpAtomEQ;
+ } else {
+ ungetch();
+ return '=';
+ }
+ case '!':
+ ch = getch();
+ if (ch == '=') {
+ return PpAtomNE;
+ } else {
+ ungetch();
+ return '!';
+ }
+ case '|':
+ ch = getch();
+ if (ch == '|') {
+ return PpAtomOr;
+ } else if (ch == '=') {
+ return PpAtomOrAssign;
+ } else {
+ ungetch();
+ return '|';
+ }
+ case '&':
+ ch = getch();
+ if (ch == '&') {
+ return PpAtomAnd;
+ } else if (ch == '=') {
+ return PpAtomAndAssign;
+ } else {
+ ungetch();
+ return '&';
+ }
+ case '<':
+ ch = getch();
+ if (ch == '<') {
+ ch = getch();
+ if (ch == '=')
+ return PpAtomLeftAssign;
+ else {
+ ungetch();
+ return PpAtomLeft;
+ }
+ } else if (ch == '=') {
+ return PpAtomLE;
+ } else {
+ ungetch();
+ return '<';
+ }
+ case '>':
+ ch = getch();
+ if (ch == '>') {
+ ch = getch();
+ if (ch == '=')
+ return PpAtomRightAssign;
+ else {
+ ungetch();
+ return PpAtomRight;
+ }
+ } else if (ch == '=') {
+ return PpAtomGE;
+ } else {
+ ungetch();
+ return '>';
+ }
+ case '.':
+ ch = getch();
+ if (ch >= '0' && ch <= '9') {
+ ungetch();
+ return pp->lFloatConst(0, '.', ppToken);
+ } else {
+ ungetch();
+ return '.';
+ }
+ case '/':
+ ch = getch();
+ if (ch == '/') {
+ pp->inComment = true;
+ do {
+ ch = getch();
+ } while (ch != '\n' && ch != EndOfInput);
+ ppToken->space = true;
+ pp->inComment = false;
+
+ return ch;
+ } else if (ch == '*') {
+ ch = getch();
+ do {
+ while (ch != '*') {
+ if (ch == EndOfInput) {
+ pp->parseContext.ppError(ppToken->loc, "End of input in comment", "comment", "");
+ return ch;
+ }
+ ch = getch();
+ }
+ ch = getch();
+ if (ch == EndOfInput) {
+ pp->parseContext.ppError(ppToken->loc, "End of input in comment", "comment", "");
+ return ch;
+ }
+ } while (ch != '/');
+ ppToken->space = true;
+ // loop again to get the next token...
+ break;
+ } else if (ch == '=') {
+ return PpAtomDiv;
+ } else {
+ ungetch();
+ return '/';
+ }
+ break;
+ case '"':
+ ch = getch();
+ while (ch != '"' && ch != '\n' && ch != EndOfInput) {
+ if (len < MaxTokenLength) {
+ tokenText[len] = (char)ch;
+ len++;
+ ch = getch();
+ } else
+ break;
+ };
+ tokenText[len] = '\0';
+ if (ch != '"') {
+ ungetch();
+ pp->parseContext.ppError(ppToken->loc, "End of line in string", "string", "");
+ }
+ return PpAtomConstString;
+ }
+
+ ch = getch();
+ }
+}
+
+//
+// The main functional entry-point into the preprocessor, which will
+// scan the source strings to figure out and return the next processing token.
+//
+// Return string pointer to next token.
+// Return 0 when no more tokens.
+//
+const char* TPpContext::tokenize(TPpToken* ppToken)
+{
+ int token = '\n';
+
+ for(;;) {
+ token = scanToken(ppToken);
+ ppToken->token = token;
+ if (token == EndOfInput) {
+ missingEndifCheck();
+ return nullptr;
+ }
+ if (token == '#') {
+ if (previous_token == '\n') {
+ token = readCPPline(ppToken);
+ if (token == EndOfInput) {
+ missingEndifCheck();
+ return nullptr;
+ }
+ continue;
+ } else {
+ parseContext.ppError(ppToken->loc, "preprocessor directive cannot be preceded by another token", "#", "");
+ return nullptr;
+ }
+ }
+ previous_token = token;
+
+ if (token == '\n')
+ continue;
+
+ // expand macros
+ if (token == PpAtomIdentifier && MacroExpand(ppToken->atom, ppToken, false, true) != 0)
+ continue;
+
+ const char* tokenString = nullptr;
+ switch (token) {
+ case PpAtomIdentifier:
+ case PpAtomConstInt:
+ case PpAtomConstUint:
+ case PpAtomConstFloat:
+ case PpAtomConstInt64:
+ case PpAtomConstUint64:
+ case PpAtomConstDouble:
+ tokenString = ppToken->name;
+ break;
+ case PpAtomConstString:
+ parseContext.ppError(ppToken->loc, "string literals not supported", "\"\"", "");
+ break;
+ case '\'':
+ parseContext.ppError(ppToken->loc, "character literals not supported", "\'", "");
+ break;
+ default:
+ tokenString = GetAtomString(token);
+ break;
+ }
+
+ if (tokenString) {
+ if (tokenString[0] != 0)
+ parseContext.tokensBeforeEOF = 1;
+
+ return tokenString;
+ }
+ }
+}
+
+// Checks if we've seen balanced #if...#endif
+void TPpContext::missingEndifCheck()
+{
+ if (ifdepth > 0)
+ parseContext.ppError(parseContext.getCurrentLoc(), "missing #endif", "", "");
+}
+
+} // end namespace glslang
diff --git a/chromium/third_party/glslang/src/glslang/MachineIndependent/preprocessor/PpSymbols.cpp b/chromium/third_party/glslang/src/glslang/MachineIndependent/preprocessor/PpSymbols.cpp
new file mode 100644
index 00000000000..c2ab7c0a11e
--- /dev/null
+++ b/chromium/third_party/glslang/src/glslang/MachineIndependent/preprocessor/PpSymbols.cpp
@@ -0,0 +1,135 @@
+//
+//Copyright (C) 2002-2005 3Dlabs Inc. Ltd.
+//Copyright (C) 2013 LunarG, 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:
+//
+// Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 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.
+//
+// Neither the name of 3Dlabs Inc. Ltd. nor the names of its
+// contributors may be used to endorse or promote products derived
+// from this software without specific prior written permission.
+//
+//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+//"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 THE
+//COPYRIGHT HOLDERS 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.
+//
+/****************************************************************************\
+Copyright (c) 2002, NVIDIA Corporation.
+
+NVIDIA Corporation("NVIDIA") supplies this software to you in
+consideration of your agreement to the following terms, and your use,
+installation, modification or redistribution of this NVIDIA software
+constitutes acceptance of these terms. If you do not agree with these
+terms, please do not use, install, modify or redistribute this NVIDIA
+software.
+
+In consideration of your agreement to abide by the following terms, and
+subject to these terms, NVIDIA grants you a personal, non-exclusive
+license, under NVIDIA's copyrights in this original NVIDIA software (the
+"NVIDIA Software"), to use, reproduce, modify and redistribute the
+NVIDIA Software, with or without modifications, in source and/or binary
+forms; provided that if you redistribute the NVIDIA Software, you must
+retain the copyright notice of NVIDIA, this notice and the following
+text and disclaimers in all such redistributions of the NVIDIA Software.
+Neither the name, trademarks, service marks nor logos of NVIDIA
+Corporation may be used to endorse or promote products derived from the
+NVIDIA Software without specific prior written permission from NVIDIA.
+Except as expressly stated in this notice, no other rights or licenses
+express or implied, are granted by NVIDIA herein, including but not
+limited to any patent rights that may be infringed by your derivative
+works or by other works in which the NVIDIA Software may be
+incorporated. No hardware is licensed hereunder.
+
+THE NVIDIA SOFTWARE IS BEING PROVIDED ON AN "AS IS" BASIS, WITHOUT
+WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED,
+INCLUDING WITHOUT LIMITATION, WARRANTIES OR CONDITIONS OF TITLE,
+NON-INFRINGEMENT, MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR
+ITS USE AND OPERATION EITHER ALONE OR IN COMBINATION WITH OTHER
+PRODUCTS.
+
+IN NO EVENT SHALL NVIDIA BE LIABLE FOR ANY SPECIAL, INDIRECT,
+INCIDENTAL, EXEMPLARY, CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
+TO, LOST PROFITS; PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) OR ARISING IN ANY WAY
+OUT OF THE USE, REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION OF THE
+NVIDIA SOFTWARE, HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT,
+TORT (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF
+NVIDIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+\****************************************************************************/
+//
+// symbols.c
+//
+
+#include <assert.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+
+#include "PpContext.h"
+
+///////////////////////////////////////////////////////////////////////////////////////////////
+/////////////////////////////////// Symbol Table Variables: ///////////////////////////////////
+///////////////////////////////////////////////////////////////////////////////////////////////
+
+namespace glslang {
+
+/*
+* Allocate a new symbol node;
+*
+*/
+TPpContext::Symbol* TPpContext::NewSymbol(int atom)
+{
+ Symbol* lSymb;
+ char* pch;
+ size_t ii;
+
+ lSymb = (Symbol *) mem_Alloc(pool, sizeof(Symbol));
+ lSymb->atom = atom;
+
+ // Clear macro
+ pch = (char*) &lSymb->mac;
+ for (ii = 0; ii < sizeof(lSymb->mac); ii++)
+ *pch++ = 0;
+
+ return lSymb;
+}
+
+TPpContext::Symbol* TPpContext::AddSymbol(int atom)
+{
+ Symbol *lSymb;
+
+ lSymb = NewSymbol(atom);
+ symbols[lSymb->atom] = lSymb;
+
+ return lSymb;
+}
+
+TPpContext::Symbol* TPpContext::LookUpSymbol(int atom)
+{
+ TSymbolMap::iterator it = symbols.find(atom);
+ if (it == symbols.end())
+ return nullptr;
+ else
+ return it->second;
+}
+
+} // end namespace glslang
diff --git a/chromium/third_party/glslang/src/glslang/MachineIndependent/preprocessor/PpTokens.cpp b/chromium/third_party/glslang/src/glslang/MachineIndependent/preprocessor/PpTokens.cpp
new file mode 100644
index 00000000000..54d495e11f2
--- /dev/null
+++ b/chromium/third_party/glslang/src/glslang/MachineIndependent/preprocessor/PpTokens.cpp
@@ -0,0 +1,278 @@
+//
+//Copyright (C) 2002-2005 3Dlabs Inc. Ltd.
+//Copyright (C) 2013 LunarG, 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:
+//
+// Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 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.
+//
+// Neither the name of 3Dlabs Inc. Ltd. nor the names of its
+// contributors may be used to endorse or promote products derived
+// from this software without specific prior written permission.
+//
+//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+//"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 THE
+//COPYRIGHT HOLDERS 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.
+//
+/****************************************************************************\
+Copyright (c) 2002, NVIDIA Corporation.
+
+NVIDIA Corporation("NVIDIA") supplies this software to you in
+consideration of your agreement to the following terms, and your use,
+installation, modification or redistribution of this NVIDIA software
+constitutes acceptance of these terms. If you do not agree with these
+terms, please do not use, install, modify or redistribute this NVIDIA
+software.
+
+In consideration of your agreement to abide by the following terms, and
+subject to these terms, NVIDIA grants you a personal, non-exclusive
+license, under NVIDIA's copyrights in this original NVIDIA software (the
+"NVIDIA Software"), to use, reproduce, modify and redistribute the
+NVIDIA Software, with or without modifications, in source and/or binary
+forms; provided that if you redistribute the NVIDIA Software, you must
+retain the copyright notice of NVIDIA, this notice and the following
+text and disclaimers in all such redistributions of the NVIDIA Software.
+Neither the name, trademarks, service marks nor logos of NVIDIA
+Corporation may be used to endorse or promote products derived from the
+NVIDIA Software without specific prior written permission from NVIDIA.
+Except as expressly stated in this notice, no other rights or licenses
+express or implied, are granted by NVIDIA herein, including but not
+limited to any patent rights that may be infringed by your derivative
+works or by other works in which the NVIDIA Software may be
+incorporated. No hardware is licensed hereunder.
+
+THE NVIDIA SOFTWARE IS BEING PROVIDED ON AN "AS IS" BASIS, WITHOUT
+WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED,
+INCLUDING WITHOUT LIMITATION, WARRANTIES OR CONDITIONS OF TITLE,
+NON-INFRINGEMENT, MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR
+ITS USE AND OPERATION EITHER ALONE OR IN COMBINATION WITH OTHER
+PRODUCTS.
+
+IN NO EVENT SHALL NVIDIA BE LIABLE FOR ANY SPECIAL, INDIRECT,
+INCIDENTAL, EXEMPLARY, CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
+TO, LOST PROFITS; PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) OR ARISING IN ANY WAY
+OUT OF THE USE, REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION OF THE
+NVIDIA SOFTWARE, HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT,
+TORT (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF
+NVIDIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+\****************************************************************************/
+
+//
+// For recording and playing back the stream of tokens in a macro definition.
+//
+
+#if (defined(_MSC_VER) && _MSC_VER < 1900 /*vs2015*/)
+#define _CRT_SECURE_NO_WARNINGS
+#define snprintf sprintf_s
+#endif
+
+#include <assert.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <ctype.h>
+
+#include "PpContext.h"
+#include "PpTokens.h"
+
+namespace glslang {
+
+void TPpContext::lAddByte(TokenStream *fTok, unsigned char fVal)
+{
+ fTok->data.push_back(fVal);
+}
+
+/*
+* Get the next byte from a stream.
+*/
+int TPpContext::lReadByte(TokenStream *pTok)
+{
+ if (pTok->current < pTok->data.size())
+ return pTok->data[pTok->current++];
+ else
+ return EndOfInput;
+}
+
+void TPpContext::lUnreadByte(TokenStream *pTok)
+{
+ if (pTok->current > 0)
+ --pTok->current;
+}
+
+/*
+* Add a token to the end of a list for later playback.
+*/
+void TPpContext::RecordToken(TokenStream *pTok, int token, TPpToken* ppToken)
+{
+ const char* s;
+ char* str = NULL;
+
+ if (token > PpAtomMaxSingle)
+ lAddByte(pTok, (unsigned char)((token & 0x7f) + 0x80));
+ else
+ lAddByte(pTok, (unsigned char)(token & 0x7f));
+
+ switch (token) {
+ case PpAtomIdentifier:
+ case PpAtomConstString:
+ s = ppToken->name;
+ while (*s)
+ lAddByte(pTok, (unsigned char) *s++);
+ lAddByte(pTok, 0);
+ break;
+ case PpAtomConstInt:
+ case PpAtomConstUint:
+ case PpAtomConstInt64:
+ case PpAtomConstUint64:
+ case PpAtomConstFloat:
+ case PpAtomConstDouble:
+ str = ppToken->name;
+ while (*str) {
+ lAddByte(pTok, (unsigned char) *str);
+ str++;
+ }
+ lAddByte(pTok, 0);
+ break;
+ default:
+ break;
+ }
+}
+
+/*
+* Reset a token stream in preperation for reading.
+*/
+void TPpContext::RewindTokenStream(TokenStream *pTok)
+{
+ pTok->current = 0;
+}
+
+/*
+* Read the next token from a token stream (not the source stream, but stream used to hold a tokenized macro).
+*/
+int TPpContext::ReadToken(TokenStream *pTok, TPpToken *ppToken)
+{
+ char* tokenText = ppToken->name;
+ int ltoken, len;
+ int ch;
+
+ ltoken = lReadByte(pTok);
+ ppToken->loc = parseContext.getCurrentLoc();
+ if (ltoken > 127)
+ ltoken += 128;
+ switch (ltoken) {
+ case '#':
+ if (lReadByte(pTok) == '#') {
+ parseContext.requireProfile(ppToken->loc, ~EEsProfile, "token pasting (##)");
+ parseContext.profileRequires(ppToken->loc, ~EEsProfile, 130, 0, "token pasting (##)");
+ parseContext.error(ppToken->loc, "token pasting not implemented (internal error)", "##", "");
+ //return PpAtomPaste;
+ return ReadToken(pTok, ppToken);
+ } else
+ lUnreadByte(pTok);
+ break;
+ case PpAtomConstString:
+ case PpAtomIdentifier:
+ case PpAtomConstFloat:
+ case PpAtomConstDouble:
+ case PpAtomConstInt:
+ case PpAtomConstUint:
+ case PpAtomConstInt64:
+ case PpAtomConstUint64:
+ len = 0;
+ ch = lReadByte(pTok);
+ while (ch != 0 && ch != EndOfInput) {
+ if (len < MaxTokenLength) {
+ tokenText[len] = (char)ch;
+ len++;
+ ch = lReadByte(pTok);
+ } else {
+ parseContext.error(ppToken->loc, "token too long", "", "");
+ break;
+ }
+ }
+ tokenText[len] = 0;
+
+ switch (ltoken) {
+ case PpAtomIdentifier:
+ ppToken->atom = LookUpAddString(tokenText);
+ break;
+ case PpAtomConstString:
+ break;
+ case PpAtomConstFloat:
+ case PpAtomConstDouble:
+ ppToken->dval = atof(ppToken->name);
+ break;
+ case PpAtomConstInt:
+ case PpAtomConstUint:
+ if (len > 0 && tokenText[0] == '0') {
+ if (len > 1 && (tokenText[1] == 'x' || tokenText[1] == 'X'))
+ ppToken->ival = strtol(ppToken->name, 0, 16);
+ else
+ ppToken->ival = strtol(ppToken->name, 0, 8);
+ } else
+ ppToken->ival = atoi(ppToken->name);
+ break;
+ case PpAtomConstInt64:
+ case PpAtomConstUint64:
+ if (len > 0 && tokenText[0] == '0') {
+ if (len > 1 && (tokenText[1] == 'x' || tokenText[1] == 'X'))
+ ppToken->i64val = strtoll(ppToken->name, nullptr, 16);
+ else
+ ppToken->i64val = strtoll(ppToken->name, nullptr, 8);
+ } else
+ ppToken->i64val = atoll(ppToken->name);
+ break;
+ }
+ }
+
+ return ltoken;
+}
+
+int TPpContext::tTokenInput::scan(TPpToken* ppToken)
+{
+ return pp->ReadToken(tokens, ppToken);
+}
+
+void TPpContext::pushTokenStreamInput(TokenStream* ts)
+{
+ pushInput(new tTokenInput(this, ts));
+ RewindTokenStream(ts);
+}
+
+int TPpContext::tUngotTokenInput::scan(TPpToken* ppToken)
+{
+ if (done)
+ return EndOfInput;
+
+ int ret = token;
+ *ppToken = lval;
+ done = true;
+
+ return ret;
+}
+
+void TPpContext::UngetToken(int token, TPpToken* ppToken)
+{
+ pushInput(new tUngotTokenInput(this, token, ppToken));
+}
+
+} // end namespace glslang
diff --git a/chromium/third_party/glslang/src/glslang/MachineIndependent/preprocessor/PpTokens.h b/chromium/third_party/glslang/src/glslang/MachineIndependent/preprocessor/PpTokens.h
new file mode 100644
index 00000000000..87f0eb1a60a
--- /dev/null
+++ b/chromium/third_party/glslang/src/glslang/MachineIndependent/preprocessor/PpTokens.h
@@ -0,0 +1,171 @@
+//
+//Copyright (C) 2002-2005 3Dlabs Inc. Ltd.
+//All rights reserved.
+//
+//Redistribution and use in source and binary forms, with or without
+//modification, are permitted provided that the following conditions
+//are met:
+//
+// Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 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.
+//
+// Neither the name of 3Dlabs Inc. Ltd. nor the names of its
+// contributors may be used to endorse or promote products derived
+// from this software without specific prior written permission.
+//
+//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+//"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 THE
+//COPYRIGHT HOLDERS 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.
+//
+/****************************************************************************\
+Copyright (c) 2002, NVIDIA Corporation.
+
+NVIDIA Corporation("NVIDIA") supplies this software to you in
+consideration of your agreement to the following terms, and your use,
+installation, modification or redistribution of this NVIDIA software
+constitutes acceptance of these terms. If you do not agree with these
+terms, please do not use, install, modify or redistribute this NVIDIA
+software.
+
+In consideration of your agreement to abide by the following terms, and
+subject to these terms, NVIDIA grants you a personal, non-exclusive
+license, under NVIDIA's copyrights in this original NVIDIA software (the
+"NVIDIA Software"), to use, reproduce, modify and redistribute the
+NVIDIA Software, with or without modifications, in source and/or binary
+forms; provided that if you redistribute the NVIDIA Software, you must
+retain the copyright notice of NVIDIA, this notice and the following
+text and disclaimers in all such redistributions of the NVIDIA Software.
+Neither the name, trademarks, service marks nor logos of NVIDIA
+Corporation may be used to endorse or promote products derived from the
+NVIDIA Software without specific prior written permission from NVIDIA.
+Except as expressly stated in this notice, no other rights or licenses
+express or implied, are granted by NVIDIA herein, including but not
+limited to any patent rights that may be infringed by your derivative
+works or by other works in which the NVIDIA Software may be
+incorporated. No hardware is licensed hereunder.
+
+THE NVIDIA SOFTWARE IS BEING PROVIDED ON AN "AS IS" BASIS, WITHOUT
+WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED,
+INCLUDING WITHOUT LIMITATION, WARRANTIES OR CONDITIONS OF TITLE,
+NON-INFRINGEMENT, MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR
+ITS USE AND OPERATION EITHER ALONE OR IN COMBINATION WITH OTHER
+PRODUCTS.
+
+IN NO EVENT SHALL NVIDIA BE LIABLE FOR ANY SPECIAL, INDIRECT,
+INCIDENTAL, EXEMPLARY, CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
+TO, LOST PROFITS; PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) OR ARISING IN ANY WAY
+OUT OF THE USE, REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION OF THE
+NVIDIA SOFTWARE, HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT,
+TORT (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF
+NVIDIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+\****************************************************************************/
+
+#ifndef PARSER_H
+#define PARSER_H
+
+namespace glslang {
+
+// Multi-character tokens
+enum EFixedAtoms {
+ PpAtomMaxSingle = 256, // single character tokens get their own char value as their token, skip them
+
+ // Operators
+
+ PpAtomAdd,
+ PpAtomSub,
+ PpAtomMul,
+ PpAtomDiv,
+ PpAtomMod,
+
+ PpAtomRight,
+ PpAtomLeft,
+
+ PpAtomRightAssign,
+ PpAtomLeftAssign,
+ PpAtomAndAssign,
+ PpAtomOrAssign,
+ PpAtomXorAssign,
+
+ PpAtomAnd,
+ PpAtomOr,
+ PpAtomXor,
+
+ PpAtomEQ,
+ PpAtomNE,
+ PpAtomGE,
+ PpAtomLE,
+
+ PpAtomDecrement,
+ PpAtomIncrement,
+
+ PpAtomPaste,
+
+ // Constants
+
+ PpAtomConstInt,
+ PpAtomConstUint,
+ PpAtomConstInt64,
+ PpAtomConstUint64,
+ PpAtomConstFloat,
+ PpAtomConstDouble,
+ PpAtomConstString,
+
+ // Indentifiers
+ PpAtomIdentifier,
+
+ // preprocessor "keywords"
+
+ PpAtomDefine,
+ PpAtomDefined,
+ PpAtomUndef,
+
+ PpAtomIf,
+ PpAtomIfdef,
+ PpAtomIfndef,
+ PpAtomElse,
+ PpAtomElif,
+ PpAtomEndif,
+
+ PpAtomLine,
+ PpAtomPragma,
+ PpAtomError,
+
+ // #version ...
+ PpAtomVersion,
+ PpAtomCore,
+ PpAtomCompatibility,
+ PpAtomEs,
+
+ // #extension
+ PpAtomExtension,
+
+ // __LINE__, __FILE__, __VERSION__
+
+ PpAtomLineMacro,
+ PpAtomFileMacro,
+ PpAtomVersionMacro,
+
+ // #include
+ PpAtomInclude,
+
+ PpAtomLast,
+};
+
+} // end namespace glslang
+
+#endif /* not PARSER_H */
diff --git a/chromium/third_party/glslang/src/glslang/MachineIndependent/propagateNoContraction.cpp b/chromium/third_party/glslang/src/glslang/MachineIndependent/propagateNoContraction.cpp
new file mode 100644
index 00000000000..835f57f69d6
--- /dev/null
+++ b/chromium/third_party/glslang/src/glslang/MachineIndependent/propagateNoContraction.cpp
@@ -0,0 +1,859 @@
+//
+// Copyright (C) 2015-2016 Google, 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:
+//
+// Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 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.
+//
+// Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived
+// from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "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 THE
+// COPYRIGHT HOLDERS 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.
+
+//
+// Visit the nodes in the glslang intermediate tree representation to
+// propagate the 'noContraction' qualifier.
+//
+
+#include "propagateNoContraction.h"
+
+#include <cstdlib>
+#include <string>
+#include <tuple>
+#include <unordered_map>
+#include <unordered_set>
+
+#include "localintermediate.h"
+namespace {
+
+// Use a string to hold the access chain information, as in most cases the
+// access chain is short and may contain only one element, which is the symbol
+// ID.
+// Example: struct {float a; float b;} s;
+// Object s.a will be represented with: <symbol ID of s>/0
+// Object s.b will be represented with: <symbol ID of s>/1
+// Object s will be represented with: <symbol ID of s>
+// For members of vector, matrix and arrays, they will be represented with the
+// same symbol ID of their container symbol objects. This is because their
+// preciseness is always the same as their container symbol objects.
+typedef std::string ObjectAccessChain;
+
+// The delimiter used in the ObjectAccessChain string to separate symbol ID and
+// different level of struct indices.
+const char ObjectAccesschainDelimiter = '/';
+
+// Mapping from Symbol IDs of symbol nodes, to their defining operation
+// nodes.
+typedef std::unordered_multimap<ObjectAccessChain, glslang::TIntermOperator*> NodeMapping;
+// Mapping from object nodes to their access chain info string.
+typedef std::unordered_map<glslang::TIntermTyped*, ObjectAccessChain> AccessChainMapping;
+
+// Set of object IDs.
+typedef std::unordered_set<ObjectAccessChain> ObjectAccesschainSet;
+// Set of return branch nodes.
+typedef std::unordered_set<glslang::TIntermBranch*> ReturnBranchNodeSet;
+
+// A helper function to tell whether a node is 'noContraction'. Returns true if
+// the node has 'noContraction' qualifier, otherwise false.
+bool isPreciseObjectNode(glslang::TIntermTyped* node)
+{
+ return node->getType().getQualifier().noContraction;
+}
+
+// Returns true if the opcode is a dereferencing one.
+bool isDereferenceOperation(glslang::TOperator op)
+{
+ switch (op) {
+ case glslang::EOpIndexDirect:
+ case glslang::EOpIndexDirectStruct:
+ case glslang::EOpIndexIndirect:
+ case glslang::EOpVectorSwizzle:
+ return true;
+ default:
+ return false;
+ }
+}
+
+// Returns true if the opcode leads to an assignment operation.
+bool isAssignOperation(glslang::TOperator op)
+{
+ switch (op) {
+ case glslang::EOpAssign:
+ case glslang::EOpAddAssign:
+ case glslang::EOpSubAssign:
+ case glslang::EOpMulAssign:
+ case glslang::EOpVectorTimesMatrixAssign:
+ case glslang::EOpVectorTimesScalarAssign:
+ case glslang::EOpMatrixTimesScalarAssign:
+ case glslang::EOpMatrixTimesMatrixAssign:
+ case glslang::EOpDivAssign:
+ case glslang::EOpModAssign:
+ case glslang::EOpAndAssign:
+ case glslang::EOpLeftShiftAssign:
+ case glslang::EOpRightShiftAssign:
+ case glslang::EOpInclusiveOrAssign:
+ case glslang::EOpExclusiveOrAssign:
+
+ case glslang::EOpPostIncrement:
+ case glslang::EOpPostDecrement:
+ case glslang::EOpPreIncrement:
+ case glslang::EOpPreDecrement:
+ return true;
+ default:
+ return false;
+ }
+}
+
+// A helper function to get the unsigned int from a given constant union node.
+// Note the node should only hold a uint scalar.
+unsigned getStructIndexFromConstantUnion(glslang::TIntermTyped* node)
+{
+ assert(node->getAsConstantUnion() && node->getAsConstantUnion()->isScalar());
+ unsigned struct_dereference_index = node->getAsConstantUnion()->getConstArray()[0].getUConst();
+ return struct_dereference_index;
+}
+
+// A helper function to generate symbol_label.
+ObjectAccessChain generateSymbolLabel(glslang::TIntermSymbol* node)
+{
+ ObjectAccessChain symbol_id =
+ std::to_string(node->getId()) + "(" + node->getName().c_str() + ")";
+ return symbol_id;
+}
+
+// Returns true if the operation is an arithmetic operation and valid for
+// the 'NoContraction' decoration.
+bool isArithmeticOperation(glslang::TOperator op)
+{
+ switch (op) {
+ case glslang::EOpAddAssign:
+ case glslang::EOpSubAssign:
+ case glslang::EOpMulAssign:
+ case glslang::EOpVectorTimesMatrixAssign:
+ case glslang::EOpVectorTimesScalarAssign:
+ case glslang::EOpMatrixTimesScalarAssign:
+ case glslang::EOpMatrixTimesMatrixAssign:
+ case glslang::EOpDivAssign:
+ case glslang::EOpModAssign:
+
+ case glslang::EOpNegative:
+
+ case glslang::EOpAdd:
+ case glslang::EOpSub:
+ case glslang::EOpMul:
+ case glslang::EOpDiv:
+ case glslang::EOpMod:
+
+ case glslang::EOpVectorTimesScalar:
+ case glslang::EOpVectorTimesMatrix:
+ case glslang::EOpMatrixTimesVector:
+ case glslang::EOpMatrixTimesScalar:
+ case glslang::EOpMatrixTimesMatrix:
+
+ case glslang::EOpDot:
+
+ case glslang::EOpPostIncrement:
+ case glslang::EOpPostDecrement:
+ case glslang::EOpPreIncrement:
+ case glslang::EOpPreDecrement:
+ return true;
+ default:
+ return false;
+ }
+}
+
+// A helper class to help manage the populating_initial_no_contraction_ flag.
+template <typename T> class StateSettingGuard {
+public:
+ StateSettingGuard(T* state_ptr, T new_state_value)
+ : state_ptr_(state_ptr), previous_state_(*state_ptr)
+ {
+ *state_ptr = new_state_value;
+ }
+ StateSettingGuard(T* state_ptr) : state_ptr_(state_ptr), previous_state_(*state_ptr) {}
+ void setState(T new_state_value) { *state_ptr_ = new_state_value; }
+ ~StateSettingGuard() { *state_ptr_ = previous_state_; }
+
+private:
+ T* state_ptr_;
+ T previous_state_;
+};
+
+// A helper function to get the front element from a given ObjectAccessChain
+ObjectAccessChain getFrontElement(const ObjectAccessChain& chain)
+{
+ size_t pos_delimiter = chain.find(ObjectAccesschainDelimiter);
+ return pos_delimiter == std::string::npos ? chain : chain.substr(0, pos_delimiter);
+}
+
+// A helper function to get the access chain starting from the second element.
+ObjectAccessChain subAccessChainFromSecondElement(const ObjectAccessChain& chain)
+{
+ size_t pos_delimiter = chain.find(ObjectAccesschainDelimiter);
+ return pos_delimiter == std::string::npos ? "" : chain.substr(pos_delimiter + 1);
+}
+
+// A helper function to get the access chain after removing a given prefix.
+ObjectAccessChain getSubAccessChainAfterPrefix(const ObjectAccessChain& chain,
+ const ObjectAccessChain& prefix)
+{
+ size_t pos = chain.find(prefix);
+ if (pos != 0)
+ return chain;
+ return chain.substr(prefix.length() + sizeof(ObjectAccesschainDelimiter));
+}
+
+//
+// A traverser which traverses the whole AST and populates:
+// 1) A mapping from symbol nodes' IDs to their defining operation nodes.
+// 2) A set of access chains of the initial precise object nodes.
+//
+class TSymbolDefinitionCollectingTraverser : public glslang::TIntermTraverser {
+public:
+ TSymbolDefinitionCollectingTraverser(NodeMapping* symbol_definition_mapping,
+ AccessChainMapping* accesschain_mapping,
+ ObjectAccesschainSet* precise_objects,
+ ReturnBranchNodeSet* precise_return_nodes);
+
+ bool visitUnary(glslang::TVisit, glslang::TIntermUnary*) override;
+ bool visitBinary(glslang::TVisit, glslang::TIntermBinary*) override;
+ void visitSymbol(glslang::TIntermSymbol*) override;
+ bool visitAggregate(glslang::TVisit, glslang::TIntermAggregate*) override;
+ bool visitBranch(glslang::TVisit, glslang::TIntermBranch*) override;
+
+protected:
+ // The mapping from symbol node IDs to their defining nodes. This should be
+ // populated along traversing the AST.
+ NodeMapping& symbol_definition_mapping_;
+ // The set of symbol node IDs for precise symbol nodes, the ones marked as
+ // 'noContraction'.
+ ObjectAccesschainSet& precise_objects_;
+ // The set of precise return nodes.
+ ReturnBranchNodeSet& precise_return_nodes_;
+ // A temporary cache of the symbol node whose defining node is to be found
+ // currently along traversing the AST.
+ ObjectAccessChain current_object_;
+ // A map from object node to its access chain. This traverser stores
+ // the built access chains into this map for each object node it has
+ // visited.
+ AccessChainMapping& accesschain_mapping_;
+ // The pointer to the Function Definition node, so we can get the
+ // preciseness of the return expression from it when we traverse the
+ // return branch node.
+ glslang::TIntermAggregate* current_function_definition_node_;
+};
+
+TSymbolDefinitionCollectingTraverser::TSymbolDefinitionCollectingTraverser(
+ NodeMapping* symbol_definition_mapping, AccessChainMapping* accesschain_mapping,
+ ObjectAccesschainSet* precise_objects,
+ std::unordered_set<glslang::TIntermBranch*>* precise_return_nodes)
+ : TIntermTraverser(true, false, false), symbol_definition_mapping_(*symbol_definition_mapping),
+ precise_objects_(*precise_objects), current_object_(),
+ accesschain_mapping_(*accesschain_mapping), current_function_definition_node_(nullptr),
+ precise_return_nodes_(*precise_return_nodes) {}
+
+// Visits a symbol node, set the current_object_ to the
+// current node symbol ID, and record a mapping from this node to the current
+// current_object_, which is the just obtained symbol
+// ID.
+void TSymbolDefinitionCollectingTraverser::visitSymbol(glslang::TIntermSymbol* node)
+{
+ current_object_ = generateSymbolLabel(node);
+ accesschain_mapping_[node] = current_object_;
+}
+
+// Visits an aggregate node, traverses all of its children.
+bool TSymbolDefinitionCollectingTraverser::visitAggregate(glslang::TVisit,
+ glslang::TIntermAggregate* node)
+{
+ // This aggregate node might be a function definition node, in which case we need to
+ // cache this node, so we can get the preciseness information of the return value
+ // of this function later.
+ StateSettingGuard<glslang::TIntermAggregate*> current_function_definition_node_setting_guard(
+ &current_function_definition_node_);
+ if (node->getOp() == glslang::EOpFunction) {
+ // This is function definition node, we need to cache this node so that we can
+ // get the preciseness of the return value later.
+ current_function_definition_node_setting_guard.setState(node);
+ }
+ // Traverse the items in the sequence.
+ glslang::TIntermSequence& seq = node->getSequence();
+ for (int i = 0; i < (int)seq.size(); ++i) {
+ current_object_.clear();
+ seq[i]->traverse(this);
+ }
+ return false;
+}
+
+bool TSymbolDefinitionCollectingTraverser::visitBranch(glslang::TVisit,
+ glslang::TIntermBranch* node)
+{
+ if (node->getFlowOp() == glslang::EOpReturn && node->getExpression() &&
+ current_function_definition_node_ &&
+ current_function_definition_node_->getType().getQualifier().noContraction) {
+ // This node is a return node with an expression, and its function has a
+ // precise return value. We need to find the involved objects in its
+ // expression and add them to the set of initial precise objects.
+ precise_return_nodes_.insert(node);
+ node->getExpression()->traverse(this);
+ }
+ return false;
+}
+
+// Visits a unary node. This might be an implicit assignment like i++, i--. etc.
+bool TSymbolDefinitionCollectingTraverser::visitUnary(glslang::TVisit /* visit */,
+ glslang::TIntermUnary* node)
+{
+ current_object_.clear();
+ node->getOperand()->traverse(this);
+ if (isAssignOperation(node->getOp())) {
+ // We should always be able to get an access chain of the operand node.
+ assert(!current_object_.empty());
+
+ // If the operand node object is 'precise', we collect its access chain
+ // for the initial set of 'precise' objects.
+ if (isPreciseObjectNode(node->getOperand())) {
+ // The operand node is an 'precise' object node, add its
+ // access chain to the set of 'precise' objects. This is to collect
+ // the initial set of 'precise' objects.
+ precise_objects_.insert(current_object_);
+ }
+ // Gets the symbol ID from the object's access chain.
+ ObjectAccessChain id_symbol = getFrontElement(current_object_);
+ // Add a mapping from the symbol ID to this assignment operation node.
+ symbol_definition_mapping_.insert(std::make_pair(id_symbol, node));
+ }
+ // A unary node is not a dereference node, so we clear the access chain which
+ // is under construction.
+ current_object_.clear();
+ return false;
+}
+
+// Visits a binary node and updates the mapping from symbol IDs to the definition
+// nodes. Also collects the access chains for the initial precise objects.
+bool TSymbolDefinitionCollectingTraverser::visitBinary(glslang::TVisit /* visit */,
+ glslang::TIntermBinary* node)
+{
+ // Traverses the left node to build the access chain info for the object.
+ current_object_.clear();
+ node->getLeft()->traverse(this);
+
+ if (isAssignOperation(node->getOp())) {
+ // We should always be able to get an access chain for the left node.
+ assert(!current_object_.empty());
+
+ // If the left node object is 'precise', it is an initial precise object
+ // specified in the shader source. Adds it to the initial work list to
+ // process later.
+ if (isPreciseObjectNode(node->getLeft())) {
+ // The left node is an 'precise' object node, add its access chain to
+ // the set of 'precise' objects. This is to collect the initial set
+ // of 'precise' objects.
+ precise_objects_.insert(current_object_);
+ }
+ // Gets the symbol ID from the object access chain, which should be the
+ // first element recorded in the access chain.
+ ObjectAccessChain id_symbol = getFrontElement(current_object_);
+ // Adds a mapping from the symbol ID to this assignment operation node.
+ symbol_definition_mapping_.insert(std::make_pair(id_symbol, node));
+
+ // Traverses the right node, there may be other 'assignment'
+ // operations in the right.
+ current_object_.clear();
+ node->getRight()->traverse(this);
+
+ } else if (isDereferenceOperation(node->getOp())) {
+ // The left node (parent node) is a struct type object. We need to
+ // record the access chain information of the current node into its
+ // object id.
+ if (node->getOp() == glslang::EOpIndexDirectStruct) {
+ unsigned struct_dereference_index = getStructIndexFromConstantUnion(node->getRight());
+ current_object_.push_back(ObjectAccesschainDelimiter);
+ current_object_.append(std::to_string(struct_dereference_index));
+ }
+ accesschain_mapping_[node] = current_object_;
+
+ // For a dereference node, there is no need to traverse the right child
+ // node as the right node should always be an integer type object.
+
+ } else {
+ // For other binary nodes, still traverse the right node.
+ current_object_.clear();
+ node->getRight()->traverse(this);
+ }
+ return false;
+}
+
+// Traverses the AST and returns a tuple of four members:
+// 1) a mapping from symbol IDs to the definition nodes (aka. assignment nodes) of these symbols.
+// 2) a mapping from object nodes in the AST to the access chains of these objects.
+// 3) a set of access chains of precise objects.
+// 4) a set of return nodes with precise expressions.
+std::tuple<NodeMapping, AccessChainMapping, ObjectAccesschainSet, ReturnBranchNodeSet>
+getSymbolToDefinitionMappingAndPreciseSymbolIDs(const glslang::TIntermediate& intermediate)
+{
+ auto result_tuple = std::make_tuple(NodeMapping(), AccessChainMapping(), ObjectAccesschainSet(),
+ ReturnBranchNodeSet());
+
+ TIntermNode* root = intermediate.getTreeRoot();
+ if (root == 0)
+ return result_tuple;
+
+ NodeMapping& symbol_definition_mapping = std::get<0>(result_tuple);
+ AccessChainMapping& accesschain_mapping = std::get<1>(result_tuple);
+ ObjectAccesschainSet& precise_objects = std::get<2>(result_tuple);
+ ReturnBranchNodeSet& precise_return_nodes = std::get<3>(result_tuple);
+
+ // Traverses the AST and populate the results.
+ TSymbolDefinitionCollectingTraverser collector(&symbol_definition_mapping, &accesschain_mapping,
+ &precise_objects, &precise_return_nodes);
+ root->traverse(&collector);
+
+ return result_tuple;
+}
+
+//
+// A traverser that determine whether the left node (or operand node for unary
+// node) of an assignment node is 'precise', containing 'precise' or not,
+// according to the access chain a given precise object which share the same
+// symbol as the left node.
+//
+// Post-orderly traverses the left node subtree of an binary assignment node and:
+//
+// 1) Propagates the 'precise' from the left object nodes to this object node.
+//
+// 2) Builds object access chain along the traversal, and also compares with
+// the access chain of the given 'precise' object along with the traversal to
+// tell if the node to be defined is 'precise' or not.
+//
+class TNoContractionAssigneeCheckingTraverser : public glslang::TIntermTraverser {
+
+ enum DecisionStatus {
+ // The object node to be assigned to may contain 'precise' objects and also not 'precise' objects.
+ Mixed = 0,
+ // The object node to be assigned to is either a 'precise' object or a struct objects whose members are all 'precise'.
+ Precise = 1,
+ // The object node to be assigned to is not a 'precise' object.
+ NotPreicse = 2,
+ };
+
+public:
+ TNoContractionAssigneeCheckingTraverser(const AccessChainMapping& accesschain_mapping)
+ : TIntermTraverser(true, false, false), accesschain_mapping_(accesschain_mapping),
+ precise_object_(nullptr) {}
+
+ // Checks the preciseness of a given assignment node with a precise object
+ // represented as access chain. The precise object shares the same symbol
+ // with the assignee of the given assignment node. Return a tuple of two:
+ //
+ // 1) The preciseness of the assignee node of this assignment node. True
+ // if the assignee contains 'precise' objects or is 'precise', false if
+ // the assignee is not 'precise' according to the access chain of the given
+ // precise object.
+ //
+ // 2) The incremental access chain from the assignee node to its nested
+ // 'precise' object, according to the access chain of the given precise
+ // object. This incremental access chain can be empty, which means the
+ // assignee is 'precise'. Otherwise it shows the path to the nested
+ // precise object.
+ std::tuple<bool, ObjectAccessChain>
+ getPrecisenessAndRemainedAccessChain(glslang::TIntermOperator* node,
+ const ObjectAccessChain& precise_object)
+ {
+ assert(isAssignOperation(node->getOp()));
+ precise_object_ = &precise_object;
+ ObjectAccessChain assignee_object;
+ if (glslang::TIntermBinary* BN = node->getAsBinaryNode()) {
+ // This is a binary assignment node, we need to check the
+ // preciseness of the left node.
+ assert(accesschain_mapping_.count(BN->getLeft()));
+ // The left node (assignee node) is an object node, traverse the
+ // node to let the 'precise' of nesting objects being transfered to
+ // nested objects.
+ BN->getLeft()->traverse(this);
+ // After traversing the left node, if the left node is 'precise',
+ // we can conclude this assignment should propagate 'precise'.
+ if (isPreciseObjectNode(BN->getLeft())) {
+ return make_tuple(true, ObjectAccessChain());
+ }
+ // If the preciseness of the left node (assignee node) can not
+ // be determined by now, we need to compare the access chain string
+ // of the assignee object with the given precise object.
+ assignee_object = accesschain_mapping_.at(BN->getLeft());
+
+ } else if (glslang::TIntermUnary* UN = node->getAsUnaryNode()) {
+ // This is a unary assignment node, we need to check the
+ // preciseness of the operand node. For unary assignment node, the
+ // operand node should always be an object node.
+ assert(accesschain_mapping_.count(UN->getOperand()));
+ // Traverse the operand node to let the 'precise' being propagated
+ // from lower nodes to upper nodes.
+ UN->getOperand()->traverse(this);
+ // After traversing the operand node, if the operand node is
+ // 'precise', this assignment should propagate 'precise'.
+ if (isPreciseObjectNode(UN->getOperand())) {
+ return make_tuple(true, ObjectAccessChain());
+ }
+ // If the preciseness of the operand node (assignee node) can not
+ // be determined by now, we need to compare the access chain string
+ // of the assignee object with the given precise object.
+ assignee_object = accesschain_mapping_.at(UN->getOperand());
+ } else {
+ // Not a binary or unary node, should not happen.
+ assert(false);
+ }
+
+ // Compare the access chain string of the assignee node with the given
+ // precise object to determine if this assignment should propagate
+ // 'precise'.
+ if (assignee_object.find(precise_object) == 0) {
+ // The access chain string of the given precise object is a prefix
+ // of assignee's access chain string. The assignee should be
+ // 'precise'.
+ return make_tuple(true, ObjectAccessChain());
+ } else if (precise_object.find(assignee_object) == 0) {
+ // The assignee's access chain string is a prefix of the given
+ // precise object, the assignee object contains 'precise' object,
+ // and we need to pass the remained access chain to the object nodes
+ // in the right.
+ return make_tuple(true, getSubAccessChainAfterPrefix(precise_object, assignee_object));
+ } else {
+ // The access chain strings do not match, the assignee object can
+ // not be labeled as 'precise' according to the given precise
+ // object.
+ return make_tuple(false, ObjectAccessChain());
+ }
+ }
+
+protected:
+ bool visitBinary(glslang::TVisit, glslang::TIntermBinary* node) override;
+ void visitSymbol(glslang::TIntermSymbol* node) override;
+
+ // A map from object nodes to their access chain string (used as object ID).
+ const AccessChainMapping& accesschain_mapping_;
+ // A given precise object, represented in it access chain string. This
+ // precise object is used to be compared with the assignee node to tell if
+ // the assignee node is 'precise', contains 'precise' object or not
+ // 'precise'.
+ const ObjectAccessChain* precise_object_;
+};
+
+// Visits a binary node. If the node is an object node, it must be a dereference
+// node. In such cases, if the left node is 'precise', this node should also be
+// 'precise'.
+bool TNoContractionAssigneeCheckingTraverser::visitBinary(glslang::TVisit,
+ glslang::TIntermBinary* node)
+{
+ // Traverses the left so that we transfer the 'precise' from nesting object
+ // to its nested object.
+ node->getLeft()->traverse(this);
+ // If this binary node is an object node, we should have it in the
+ // accesschain_mapping_.
+ if (accesschain_mapping_.count(node)) {
+ // A binary object node must be a dereference node.
+ assert(isDereferenceOperation(node->getOp()));
+ // If the left node is 'precise', this node should also be precise,
+ // otherwise, compare with the given precise_object_. If the
+ // access chain of this node matches with the given precise_object_,
+ // this node should be marked as 'precise'.
+ if (isPreciseObjectNode(node->getLeft())) {
+ node->getWritableType().getQualifier().noContraction = true;
+ } else if (accesschain_mapping_.at(node) == *precise_object_) {
+ node->getWritableType().getQualifier().noContraction = true;
+ }
+ }
+ return false;
+}
+
+// Visits a symbol node, if the symbol node ID (its access chain string) matches
+// with the given precise object, this node should be 'precise'.
+void TNoContractionAssigneeCheckingTraverser::visitSymbol(glslang::TIntermSymbol* node)
+{
+ // A symbol node should always be an object node, and should have been added
+ // to the map from object nodes to their access chain strings.
+ assert(accesschain_mapping_.count(node));
+ if (accesschain_mapping_.at(node) == *precise_object_) {
+ node->getWritableType().getQualifier().noContraction = true;
+ }
+}
+
+//
+// A traverser that only traverses the right side of binary assignment nodes
+// and the operand node of unary assignment nodes.
+//
+// 1) Marks arithmetic operations as 'NoContraction'.
+//
+// 2) Find the object which should be marked as 'precise' in the right and
+// update the 'precise' object work list.
+//
+class TNoContractionPropagator : public glslang::TIntermTraverser {
+public:
+ TNoContractionPropagator(ObjectAccesschainSet* precise_objects,
+ const AccessChainMapping& accesschain_mapping)
+ : TIntermTraverser(true, false, false), remained_accesschain_(),
+ precise_objects_(*precise_objects), accesschain_mapping_(accesschain_mapping),
+ added_precise_object_ids_() {}
+
+ // Propagates 'precise' in the right nodes of a given assignment node with
+ // access chain record from the assignee node to a 'precise' object it
+ // contains.
+ void
+ propagateNoContractionInOneExpression(glslang::TIntermTyped* defining_node,
+ const ObjectAccessChain& assignee_remained_accesschain)
+ {
+ remained_accesschain_ = assignee_remained_accesschain;
+ if (glslang::TIntermBinary* BN = defining_node->getAsBinaryNode()) {
+ assert(isAssignOperation(BN->getOp()));
+ BN->getRight()->traverse(this);
+ if (isArithmeticOperation(BN->getOp())) {
+ BN->getWritableType().getQualifier().noContraction = true;
+ }
+ } else if (glslang::TIntermUnary* UN = defining_node->getAsUnaryNode()) {
+ assert(isAssignOperation(UN->getOp()));
+ UN->getOperand()->traverse(this);
+ if (isArithmeticOperation(UN->getOp())) {
+ UN->getWritableType().getQualifier().noContraction = true;
+ }
+ }
+ }
+
+ // Propagates 'precise' in a given precise return node.
+ void propagateNoContractionInReturnNode(glslang::TIntermBranch* return_node)
+ {
+ remained_accesschain_ = "";
+ assert(return_node->getFlowOp() == glslang::EOpReturn && return_node->getExpression());
+ return_node->getExpression()->traverse(this);
+ }
+
+protected:
+ // Visits an aggregate node. The node can be a initializer list, in which
+ // case we need to find the 'precise' or 'precise' containing object node
+ // with the access chain record. In other cases, just need to traverse all
+ // the children nodes.
+ bool visitAggregate(glslang::TVisit, glslang::TIntermAggregate* node) override
+ {
+ if (!remained_accesschain_.empty() && node->getOp() == glslang::EOpConstructStruct) {
+ // This is a struct initializer node, and the remained
+ // access chain is not empty, we need to refer to the
+ // assignee_remained_access_chain_ to find the nested
+ // 'precise' object. And we don't need to visit other nodes in this
+ // aggregate node.
+
+ // Gets the struct dereference index that leads to 'precise' object.
+ ObjectAccessChain precise_accesschain_index_str =
+ getFrontElement(remained_accesschain_);
+ unsigned precise_accesschain_index = strtoul(precise_accesschain_index_str.c_str(), nullptr, 10);
+ // Gets the node pointed by the access chain index extracted before.
+ glslang::TIntermTyped* potential_precise_node =
+ node->getSequence()[precise_accesschain_index]->getAsTyped();
+ assert(potential_precise_node);
+ // Pop the front access chain index from the path, and visit the nested node.
+ {
+ ObjectAccessChain next_level_accesschain =
+ subAccessChainFromSecondElement(remained_accesschain_);
+ StateSettingGuard<ObjectAccessChain> setup_remained_accesschain_for_next_level(
+ &remained_accesschain_, next_level_accesschain);
+ potential_precise_node->traverse(this);
+ }
+ return false;
+ }
+ return true;
+ }
+
+ // Visits a binary node. A binary node can be an object node, e.g. a dereference node.
+ // As only the top object nodes in the right side of an assignment needs to be visited
+ // and added to 'precise' work list, this traverser won't visit the children nodes of
+ // an object node. If the binary node does not represent an object node, it should
+ // go on to traverse its children nodes and if it is an arithmetic operation node, this
+ // operation should be marked as 'noContraction'.
+ bool visitBinary(glslang::TVisit, glslang::TIntermBinary* node) override
+ {
+ if (isDereferenceOperation(node->getOp())) {
+ // This binary node is an object node. Need to update the precise
+ // object set with the access chain of this node + remained
+ // access chain .
+ ObjectAccessChain new_precise_accesschain = accesschain_mapping_.at(node);
+ if (remained_accesschain_.empty()) {
+ node->getWritableType().getQualifier().noContraction = true;
+ } else {
+ new_precise_accesschain += ObjectAccesschainDelimiter + remained_accesschain_;
+ }
+ // Cache the access chain as added precise object, so we won't add the
+ // same object to the work list again.
+ if (!added_precise_object_ids_.count(new_precise_accesschain)) {
+ precise_objects_.insert(new_precise_accesschain);
+ added_precise_object_ids_.insert(new_precise_accesschain);
+ }
+ // Only the upper-most object nodes should be visited, so do not
+ // visit children of this object node.
+ return false;
+ }
+ // If this is an arithmetic operation, marks this node as 'noContraction'.
+ if (isArithmeticOperation(node->getOp()) && node->getBasicType() != glslang::EbtInt) {
+ node->getWritableType().getQualifier().noContraction = true;
+ }
+ // As this node is not an object node, need to traverse the children nodes.
+ return true;
+ }
+
+ // Visits a unary node. A unary node can not be an object node. If the operation
+ // is an arithmetic operation, need to mark this node as 'noContraction'.
+ bool visitUnary(glslang::TVisit /* visit */, glslang::TIntermUnary* node) override
+ {
+ // If this is an arithmetic operation, marks this with 'noContraction'
+ if (isArithmeticOperation(node->getOp())) {
+ node->getWritableType().getQualifier().noContraction = true;
+ }
+ return true;
+ }
+
+ // Visits a symbol node. A symbol node is always an object node. So we
+ // should always be able to find its in our collected mapping from object
+ // nodes to access chains. As an object node, a symbol node can be either
+ // 'precise' or containing 'precise' objects according to unused
+ // access chain information we have when we visit this node.
+ void visitSymbol(glslang::TIntermSymbol* node) override
+ {
+ // Symbol nodes are object nodes and should always have an
+ // access chain collected before matches with it.
+ assert(accesschain_mapping_.count(node));
+ ObjectAccessChain new_precise_accesschain = accesschain_mapping_.at(node);
+ // If the unused access chain is empty, this symbol node should be
+ // marked as 'precise'. Otherwise, the unused access chain should be
+ // appended to the symbol ID to build a new access chain which points to
+ // the nested 'precise' object in this symbol object.
+ if (remained_accesschain_.empty()) {
+ node->getWritableType().getQualifier().noContraction = true;
+ } else {
+ new_precise_accesschain += ObjectAccesschainDelimiter + remained_accesschain_;
+ }
+ // Add the new 'precise' access chain to the work list and make sure we
+ // don't visit it again.
+ if (!added_precise_object_ids_.count(new_precise_accesschain)) {
+ precise_objects_.insert(new_precise_accesschain);
+ added_precise_object_ids_.insert(new_precise_accesschain);
+ }
+ }
+
+ // A set of precise objects, represented as access chains.
+ ObjectAccesschainSet& precise_objects_;
+ // Visited symbol nodes, should not revisit these nodes.
+ ObjectAccesschainSet added_precise_object_ids_;
+ // The left node of an assignment operation might be an parent of 'precise' objects.
+ // This means the left node might not be an 'precise' object node, but it may contains
+ // 'precise' qualifier which should be propagated to the corresponding child node in
+ // the right. So we need the path from the left node to its nested 'precise' node to
+ // tell us how to find the corresponding 'precise' node in the right.
+ ObjectAccessChain remained_accesschain_;
+ // A map from node pointers to their access chains.
+ const AccessChainMapping& accesschain_mapping_;
+};
+}
+
+namespace glslang {
+
+void PropagateNoContraction(const glslang::TIntermediate& intermediate)
+{
+ // First, traverses the AST, records symbols with their defining operations
+ // and collects the initial set of precise symbols (symbol nodes that marked
+ // as 'noContraction') and precise return nodes.
+ auto mappings_and_precise_objects =
+ getSymbolToDefinitionMappingAndPreciseSymbolIDs(intermediate);
+
+ // The mapping of symbol node IDs to their defining nodes. This enables us
+ // to get the defining node directly from a given symbol ID without
+ // traversing the tree again.
+ NodeMapping& symbol_definition_mapping = std::get<0>(mappings_and_precise_objects);
+
+ // The mapping of object nodes to their access chains recorded.
+ AccessChainMapping& accesschain_mapping = std::get<1>(mappings_and_precise_objects);
+
+ // The initial set of 'precise' objects which are represented as the
+ // access chain toward them.
+ ObjectAccesschainSet& precise_object_accesschains = std::get<2>(mappings_and_precise_objects);
+
+ // The set of 'precise' return nodes.
+ ReturnBranchNodeSet& precise_return_nodes = std::get<3>(mappings_and_precise_objects);
+
+ // Second, uses the initial set of precise objects as a work list, pops an
+ // access chain, extract the symbol ID from it. Then:
+ // 1) Check the assignee object, see if it is 'precise' object node or
+ // contains 'precise' object. Obtain the incremental access chain from the
+ // assignee node to its nested 'precise' node (if any).
+ // 2) If the assignee object node is 'precise' or it contains 'precise'
+ // objects, traverses the right side of the assignment operation
+ // expression to mark arithmetic operations as 'noContration' and update
+ // 'precise' access chain work list with new found object nodes.
+ // Repeat above steps until the work list is empty.
+ TNoContractionAssigneeCheckingTraverser checker(accesschain_mapping);
+ TNoContractionPropagator propagator(&precise_object_accesschains, accesschain_mapping);
+
+ // We have two initial precise work lists to handle:
+ // 1) precise return nodes
+ // 2) precise object access chains
+ // We should process the precise return nodes first and the involved
+ // objects in the return expression should be added to the precise object
+ // access chain set.
+ while (!precise_return_nodes.empty()) {
+ glslang::TIntermBranch* precise_return_node = *precise_return_nodes.begin();
+ propagator.propagateNoContractionInReturnNode(precise_return_node);
+ precise_return_nodes.erase(precise_return_node);
+ }
+
+ while (!precise_object_accesschains.empty()) {
+ // Get the access chain of a precise object from the work list.
+ ObjectAccessChain precise_object_accesschain = *precise_object_accesschains.begin();
+ // Get the symbol id from the access chain.
+ ObjectAccessChain symbol_id = getFrontElement(precise_object_accesschain);
+ // Get all the defining nodes of that symbol ID.
+ std::pair<NodeMapping::iterator, NodeMapping::iterator> range =
+ symbol_definition_mapping.equal_range(symbol_id);
+ // Visits all the assignment nodes of that symbol ID and
+ // 1) Check if the assignee node is 'precise' or contains 'precise'
+ // objects.
+ // 2) Propagate the 'precise' to the top layer object nodes
+ // in the right side of the assignment operation, update the 'precise'
+ // work list with new access chains representing the new 'precise'
+ // objects, and mark arithmetic operations as 'noContraction'.
+ for (NodeMapping::iterator defining_node_iter = range.first;
+ defining_node_iter != range.second; defining_node_iter++) {
+ TIntermOperator* defining_node = defining_node_iter->second;
+ // Check the assignee node.
+ auto checker_result = checker.getPrecisenessAndRemainedAccessChain(
+ defining_node, precise_object_accesschain);
+ bool& contain_precise = std::get<0>(checker_result);
+ ObjectAccessChain& remained_accesschain = std::get<1>(checker_result);
+ // If the assignee node is 'precise' or contains 'precise', propagate the
+ // 'precise' to the right. Otherwise just skip this assignment node.
+ if (contain_precise) {
+ propagator.propagateNoContractionInOneExpression(defining_node,
+ remained_accesschain);
+ }
+ }
+ // Remove the last processed 'precise' object from the work list.
+ precise_object_accesschains.erase(precise_object_accesschain);
+ }
+}
+};
diff --git a/chromium/third_party/glslang/src/glslang/MachineIndependent/propagateNoContraction.h b/chromium/third_party/glslang/src/glslang/MachineIndependent/propagateNoContraction.h
new file mode 100644
index 00000000000..3412c85dc6c
--- /dev/null
+++ b/chromium/third_party/glslang/src/glslang/MachineIndependent/propagateNoContraction.h
@@ -0,0 +1,53 @@
+//
+// Copyright (C) 2015-2016 Google, 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:
+//
+// Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 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.
+//
+// Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived
+// from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "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 THE
+// COPYRIGHT HOLDERS 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.
+
+//
+// Visit the nodes in the glslang intermediate tree representation to
+// propagate 'noContraction' qualifier.
+//
+
+#include "../Include/intermediate.h"
+
+namespace glslang {
+
+// Propagates the 'precise' qualifier for objects (objects marked with
+// 'noContraction' qualifier) from the shader source specified 'precise'
+// variables to all the involved objects, and add 'noContraction' qualifier for
+// the involved arithmetic operations.
+// Note that the same qualifier: 'noContraction' is used in both object nodes
+// and arithmetic operation nodes, but has different meaning. For object nodes,
+// 'noContraction' means the object is 'precise'; and for arithmetic operation
+// nodes, it means the operation should not be contracted.
+void PropagateNoContraction(const glslang::TIntermediate& intermediate);
+};
diff --git a/chromium/third_party/glslang/src/glslang/MachineIndependent/reflection.cpp b/chromium/third_party/glslang/src/glslang/MachineIndependent/reflection.cpp
new file mode 100644
index 00000000000..d3e04af7f97
--- /dev/null
+++ b/chromium/third_party/glslang/src/glslang/MachineIndependent/reflection.cpp
@@ -0,0 +1,761 @@
+//
+//Copyright (C) 2013 LunarG, 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:
+//
+// Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 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.
+//
+// Neither the name of 3Dlabs Inc. Ltd. nor the names of its
+// contributors may be used to endorse or promote products derived
+// from this software without specific prior written permission.
+//
+//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+//"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 THE
+//COPYRIGHT HOLDERS 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.
+//
+
+#include "../Include/Common.h"
+#include "reflection.h"
+#include "localintermediate.h"
+
+#include "gl_types.h"
+
+//
+// Grow the reflection database through a friend traverser class of TReflection and a
+// collection of functions to do a liveness traversal that note what uniforms are used
+// in semantically non-dead code.
+//
+// Can be used multiple times, once per stage, to grow a program reflection.
+//
+// High-level algorithm for one stage:
+//
+// 1. Put main() on list of live functions.
+//
+// 2. Traverse any live function, while skipping if-tests with a compile-time constant
+// condition of false, and while adding any encountered function calls to the live
+// function list.
+//
+// Repeat until the live function list is empty.
+//
+// 3. Add any encountered uniform variables and blocks to the reflection database.
+//
+// Can be attempted with a failed link, but will return false if recursion had been detected, or
+// there wasn't exactly one main.
+//
+
+namespace glslang {
+
+//
+// The traverser: mostly pass through, except
+// - processing function-call nodes to push live functions onto the stack of functions to process
+// - processing binary nodes to see if they are dereferences of an aggregates to track
+// - processing symbol nodes to see if they are non-aggregate objects to track
+// - processing selection nodes to trim semantically dead code
+//
+// This is in the glslang namespace directly so it can be a friend of TReflection.
+//
+
+class TLiveTraverser : public TIntermTraverser {
+public:
+ TLiveTraverser(const TIntermediate& i, TReflection& r) : intermediate(i), reflection(r) { }
+
+ virtual bool visitAggregate(TVisit, TIntermAggregate* node);
+ virtual bool visitBinary(TVisit, TIntermBinary* node);
+ virtual void visitSymbol(TIntermSymbol* base);
+ virtual bool visitSelection(TVisit, TIntermSelection* node);
+
+ // Track live funtions as well as uniforms, so that we don't visit dead functions
+ // and only visit each function once.
+ void addFunctionCall(TIntermAggregate* call)
+ {
+ // just use the map to ensure we process each function at most once
+ if (reflection.nameToIndex.find(call->getName()) == reflection.nameToIndex.end()) {
+ reflection.nameToIndex[call->getName()] = -1;
+ pushFunction(call->getName());
+ }
+ }
+
+ // Add a simple reference to a uniform variable to the uniform database, no dereference involved.
+ // However, no dereference doesn't mean simple... it could be a complex aggregate.
+ void addUniform(const TIntermSymbol& base)
+ {
+ if (processedDerefs.find(&base) == processedDerefs.end()) {
+ processedDerefs.insert(&base);
+
+ // Use a degenerate (empty) set of dereferences to immediately put as at the end of
+ // the dereference change expected by blowUpActiveAggregate.
+ TList<TIntermBinary*> derefs;
+ blowUpActiveAggregate(base.getType(), base.getName(), derefs, derefs.end(), -1, -1, 0);
+ }
+ }
+
+ void addAttribute(const TIntermSymbol& base)
+ {
+ if (processedDerefs.find(&base) == processedDerefs.end()) {
+ processedDerefs.insert(&base);
+
+ const TString &name = base.getName();
+ const TType &type = base.getType();
+
+ TReflection::TNameToIndex::const_iterator it = reflection.nameToIndex.find(name);
+ if (it == reflection.nameToIndex.end()) {
+ reflection.nameToIndex[name] = (int)reflection.indexToAttribute.size();
+ reflection.indexToAttribute.push_back(TObjectReflection(name, 0, mapToGlType(type), 0, 0));
+ }
+ }
+ }
+
+ // Lookup or calculate the offset of a block member, using the recursively
+ // defined block offset rules.
+ int getOffset(const TType& type, int index)
+ {
+ const TTypeList& memberList = *type.getStruct();
+
+ // Don't calculate offset if one is present, it could be user supplied
+ // and different than what would be calculated. That is, this is faster,
+ // but not just an optimization.
+ if (memberList[index].type->getQualifier().hasOffset())
+ return memberList[index].type->getQualifier().layoutOffset;
+
+ int memberSize;
+ int dummyStride;
+ int offset = 0;
+ for (int m = 0; m <= index; ++m) {
+ // modify just the children's view of matrix layout, if there is one for this member
+ TLayoutMatrix subMatrixLayout = memberList[m].type->getQualifier().layoutMatrix;
+ int memberAlignment = intermediate.getBaseAlignment(*memberList[m].type, memberSize, dummyStride, type.getQualifier().layoutPacking == ElpStd140,
+ subMatrixLayout != ElmNone ? subMatrixLayout == ElmRowMajor : type.getQualifier().layoutMatrix == ElmRowMajor);
+ RoundToPow2(offset, memberAlignment);
+ if (m < index)
+ offset += memberSize;
+ }
+
+ return offset;
+ }
+
+ // Calculate the block data size.
+ // Block arrayness is not taken into account, each element is backed by a separate buffer.
+ int getBlockSize(const TType& blockType)
+ {
+ const TTypeList& memberList = *blockType.getStruct();
+ int lastIndex = (int)memberList.size() - 1;
+ int lastOffset = getOffset(blockType, lastIndex);
+
+ int lastMemberSize;
+ int dummyStride;
+ intermediate.getBaseAlignment(*memberList[lastIndex].type, lastMemberSize, dummyStride, blockType.getQualifier().layoutPacking == ElpStd140,
+ blockType.getQualifier().layoutMatrix == ElmRowMajor);
+
+ return lastOffset + lastMemberSize;
+ }
+
+ // Traverse the provided deref chain, including the base, and
+ // - build a full reflection-granularity name, array size, etc. entry out of it, if it goes down to that granularity
+ // - recursively expand any variable array index in the middle of that traversal
+ // - recursively expand what's left at the end if the deref chain did not reach down to reflection granularity
+ //
+ // arraySize tracks, just for the final dereference in the chain, if there was a specific known size.
+ // A value of 0 for arraySize will mean to use the full array's size.
+ void blowUpActiveAggregate(const TType& baseType, const TString& baseName, const TList<TIntermBinary*>& derefs,
+ TList<TIntermBinary*>::const_iterator deref, int offset, int blockIndex, int arraySize)
+ {
+ // process the part of the derefence chain that was explicit in the shader
+ TString name = baseName;
+ const TType* terminalType = &baseType;
+ for (; deref != derefs.end(); ++deref) {
+ TIntermBinary* visitNode = *deref;
+ terminalType = &visitNode->getType();
+ int index;
+ switch (visitNode->getOp()) {
+ case EOpIndexIndirect:
+ // Visit all the indices of this array, and for each one add on the remaining dereferencing
+ for (int i = 0; i < visitNode->getLeft()->getType().getOuterArraySize(); ++i) {
+ TString newBaseName = name;
+ if (baseType.getBasicType() != EbtBlock)
+ newBaseName.append(TString("[") + String(i) + "]");
+ TList<TIntermBinary*>::const_iterator nextDeref = deref;
+ ++nextDeref;
+ TType derefType(*terminalType, 0);
+ blowUpActiveAggregate(derefType, newBaseName, derefs, nextDeref, offset, blockIndex, arraySize);
+ }
+
+ // it was all completed in the recursive calls above
+ return;
+ case EOpIndexDirect:
+ index = visitNode->getRight()->getAsConstantUnion()->getConstArray()[0].getIConst();
+ if (baseType.getBasicType() != EbtBlock)
+ name.append(TString("[") + String(index) + "]");
+ break;
+ case EOpIndexDirectStruct:
+ index = visitNode->getRight()->getAsConstantUnion()->getConstArray()[0].getIConst();
+ if (offset >= 0)
+ offset += getOffset(visitNode->getLeft()->getType(), index);
+ if (name.size() > 0)
+ name.append(".");
+ name.append((*visitNode->getLeft()->getType().getStruct())[index].type->getFieldName());
+ break;
+ default:
+ break;
+ }
+ }
+
+ // if the terminalType is still too coarse a granularity, this is still an aggregate to expand, expand it...
+ if (! isReflectionGranularity(*terminalType)) {
+ if (terminalType->isArray()) {
+ // Visit all the indices of this array, and for each one,
+ // fully explode the remaining aggregate to dereference
+ for (int i = 0; i < terminalType->getOuterArraySize(); ++i) {
+ TString newBaseName = name;
+ newBaseName.append(TString("[") + String(i) + "]");
+ TType derefType(*terminalType, 0);
+ blowUpActiveAggregate(derefType, newBaseName, derefs, derefs.end(), offset, blockIndex, 0);
+ }
+ } else {
+ // Visit all members of this aggregate, and for each one,
+ // fully explode the remaining aggregate to dereference
+ const TTypeList& typeList = *terminalType->getStruct();
+ for (int i = 0; i < (int)typeList.size(); ++i) {
+ TString newBaseName = name;
+ newBaseName.append(TString(".") + typeList[i].type->getFieldName());
+ TType derefType(*terminalType, i);
+ blowUpActiveAggregate(derefType, newBaseName, derefs, derefs.end(), offset, blockIndex, 0);
+ }
+ }
+
+ // it was all completed in the recursive calls above
+ return;
+ }
+
+ // Finally, add a full string to the reflection database, and update the array size if necessary.
+ // If the derefenced entity to record is an array, compute the size and update the maximum size.
+
+ // there might not be a final array dereference, it could have been copied as an array object
+ if (arraySize == 0)
+ arraySize = mapToGlArraySize(*terminalType);
+
+ TReflection::TNameToIndex::const_iterator it = reflection.nameToIndex.find(name);
+ if (it == reflection.nameToIndex.end()) {
+ reflection.nameToIndex[name] = (int)reflection.indexToUniform.size();
+ reflection.indexToUniform.push_back(TObjectReflection(name, offset, mapToGlType(*terminalType), arraySize, blockIndex));
+ } else if (arraySize > 1) {
+ int& reflectedArraySize = reflection.indexToUniform[it->second].size;
+ reflectedArraySize = std::max(arraySize, reflectedArraySize);
+ }
+ }
+
+ // Add a uniform dereference where blocks/struct/arrays are involved in the access.
+ // Handles the situation where the left node is at the correct or too coarse a
+ // granularity for reflection. (That is, further dereferences up the tree will be
+ // skipped.) Earlier dereferences, down the tree, will be handled
+ // at the same time, and logged to prevent reprocessing as the tree is traversed.
+ //
+ // Note: Other things like the following must be caught elsewhere:
+ // - a simple non-array, non-struct variable (no dereference even conceivable)
+ // - an aggregrate consumed en masse, without a dereference
+ //
+ // So, this code is for cases like
+ // - a struct/block dereferencing a member (whether the member is array or not)
+ // - an array of struct
+ // - structs/arrays containing the above
+ //
+ void addDereferencedUniform(TIntermBinary* topNode)
+ {
+ // See if too fine-grained to process (wait to get further down the tree)
+ const TType& leftType = topNode->getLeft()->getType();
+ if ((leftType.isVector() || leftType.isMatrix()) && ! leftType.isArray())
+ return;
+
+ // We have an array or structure or block dereference, see if it's a uniform
+ // based dereference (if not, skip it).
+ TIntermSymbol* base = findBase(topNode);
+ if (! base || ! base->getQualifier().isUniformOrBuffer())
+ return;
+
+ // See if we've already processed this (e.g., in the middle of something
+ // we did earlier), and if so skip it
+ if (processedDerefs.find(topNode) != processedDerefs.end())
+ return;
+
+ // Process this uniform dereference
+
+ int offset = -1;
+ int blockIndex = -1;
+ bool anonymous = false;
+
+ // See if we need to record the block itself
+ bool block = base->getBasicType() == EbtBlock;
+ if (block) {
+ offset = 0;
+ anonymous = IsAnonymous(base->getName());
+ if (base->getType().isArray()) {
+ assert(! anonymous);
+ for (int e = 0; e < base->getType().getCumulativeArraySize(); ++e)
+ blockIndex = addBlockName(base->getType().getTypeName() + "[" + String(e) + "]", getBlockSize(base->getType()));
+ } else
+ blockIndex = addBlockName(base->getType().getTypeName(), getBlockSize(base->getType()));
+ }
+
+ // Process the dereference chain, backward, accumulating the pieces for later forward traversal.
+ // If the topNode is a reflection-granularity-array dereference, don't include that last dereference.
+ TList<TIntermBinary*> derefs;
+ for (TIntermBinary* visitNode = topNode; visitNode; visitNode = visitNode->getLeft()->getAsBinaryNode()) {
+ if (isReflectionGranularity(visitNode->getLeft()->getType()))
+ continue;
+
+ derefs.push_front(visitNode);
+ processedDerefs.insert(visitNode);
+ }
+ processedDerefs.insert(base);
+
+ // See if we have a specific array size to stick to while enumerating the explosion of the aggregate
+ int arraySize = 0;
+ if (isReflectionGranularity(topNode->getLeft()->getType()) && topNode->getLeft()->isArray()) {
+ if (topNode->getOp() == EOpIndexDirect)
+ arraySize = topNode->getRight()->getAsConstantUnion()->getConstArray()[0].getIConst() + 1;
+ }
+
+ // Put the dereference chain together, forward
+ TString baseName;
+ if (! anonymous) {
+ if (block)
+ baseName = base->getType().getTypeName();
+ else
+ baseName = base->getName();
+ }
+ blowUpActiveAggregate(base->getType(), baseName, derefs, derefs.begin(), offset, blockIndex, arraySize);
+ }
+
+ int addBlockName(const TString& name, int size)
+ {
+ int blockIndex;
+ TReflection::TNameToIndex::const_iterator it = reflection.nameToIndex.find(name);
+ if (reflection.nameToIndex.find(name) == reflection.nameToIndex.end()) {
+ blockIndex = (int)reflection.indexToUniformBlock.size();
+ reflection.nameToIndex[name] = blockIndex;
+ reflection.indexToUniformBlock.push_back(TObjectReflection(name, -1, -1, size, -1));
+ } else
+ blockIndex = it->second;
+
+ return blockIndex;
+ }
+
+ //
+ // Given a function name, find its subroot in the tree, and push it onto the stack of
+ // functions left to process.
+ //
+ void pushFunction(const TString& name)
+ {
+ TIntermSequence& globals = intermediate.getTreeRoot()->getAsAggregate()->getSequence();
+ for (unsigned int f = 0; f < globals.size(); ++f) {
+ TIntermAggregate* candidate = globals[f]->getAsAggregate();
+ if (candidate && candidate->getOp() == EOpFunction && candidate->getName() == name) {
+ functions.push_back(candidate);
+ break;
+ }
+ }
+ }
+
+ // Are we at a level in a dereference chain at which individual active uniform queries are made?
+ bool isReflectionGranularity(const TType& type)
+ {
+ return type.getBasicType() != EbtBlock && type.getBasicType() != EbtStruct;
+ }
+
+ // For a binary operation indexing into an aggregate, chase down the base of the aggregate.
+ // Return 0 if the topology does not fit this situation.
+ TIntermSymbol* findBase(const TIntermBinary* node)
+ {
+ TIntermSymbol *base = node->getLeft()->getAsSymbolNode();
+ if (base)
+ return base;
+ TIntermBinary* left = node->getLeft()->getAsBinaryNode();
+ if (! left)
+ return nullptr;
+
+ return findBase(left);
+ }
+
+ //
+ // Translate a glslang sampler type into the GL API #define number.
+ //
+ int mapSamplerToGlType(TSampler sampler)
+ {
+ if (! sampler.image) {
+ // a sampler...
+ switch (sampler.type) {
+ case EbtFloat:
+ switch ((int)sampler.dim) {
+ case Esd1D:
+ switch ((int)sampler.shadow) {
+ case false: return sampler.arrayed ? GL_SAMPLER_1D_ARRAY : GL_SAMPLER_1D;
+ case true: return sampler.arrayed ? GL_SAMPLER_1D_ARRAY_SHADOW : GL_SAMPLER_1D_SHADOW;
+ }
+ case Esd2D:
+ switch ((int)sampler.ms) {
+ case false:
+ switch ((int)sampler.shadow) {
+ case false: return sampler.arrayed ? GL_SAMPLER_2D_ARRAY : GL_SAMPLER_2D;
+ case true: return sampler.arrayed ? GL_SAMPLER_2D_ARRAY_SHADOW : GL_SAMPLER_2D_SHADOW;
+ }
+ case true: return sampler.arrayed ? GL_SAMPLER_2D_MULTISAMPLE_ARRAY : GL_SAMPLER_2D_MULTISAMPLE;
+ }
+ case Esd3D:
+ return GL_SAMPLER_3D;
+ case EsdCube:
+ switch ((int)sampler.shadow) {
+ case false: return sampler.arrayed ? GL_SAMPLER_CUBE_MAP_ARRAY : GL_SAMPLER_CUBE;
+ case true: return sampler.arrayed ? GL_SAMPLER_CUBE_MAP_ARRAY_SHADOW : GL_SAMPLER_CUBE_SHADOW;
+ }
+ case EsdRect:
+ return sampler.shadow ? GL_SAMPLER_2D_RECT_SHADOW : GL_SAMPLER_2D_RECT;
+ case EsdBuffer:
+ return GL_SAMPLER_BUFFER;
+ }
+ case EbtInt:
+ switch ((int)sampler.dim) {
+ case Esd1D:
+ return sampler.arrayed ? GL_INT_SAMPLER_1D_ARRAY : GL_INT_SAMPLER_1D;
+ case Esd2D:
+ switch ((int)sampler.ms) {
+ case false: return sampler.arrayed ? GL_INT_SAMPLER_2D_ARRAY : GL_INT_SAMPLER_2D;
+ case true: return sampler.arrayed ? GL_INT_SAMPLER_2D_MULTISAMPLE_ARRAY : GL_INT_SAMPLER_2D_MULTISAMPLE;
+ }
+ case Esd3D:
+ return GL_INT_SAMPLER_3D;
+ case EsdCube:
+ return sampler.arrayed ? GL_INT_SAMPLER_CUBE_MAP_ARRAY : GL_INT_SAMPLER_CUBE;
+ case EsdRect:
+ return GL_INT_SAMPLER_2D_RECT;
+ case EsdBuffer:
+ return GL_INT_SAMPLER_BUFFER;
+ }
+ case EbtUint:
+ switch ((int)sampler.dim) {
+ case Esd1D:
+ return sampler.arrayed ? GL_UNSIGNED_INT_SAMPLER_1D_ARRAY : GL_UNSIGNED_INT_SAMPLER_1D;
+ case Esd2D:
+ switch ((int)sampler.ms) {
+ case false: return sampler.arrayed ? GL_UNSIGNED_INT_SAMPLER_2D_ARRAY : GL_UNSIGNED_INT_SAMPLER_2D;
+ case true: return sampler.arrayed ? GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE_ARRAY : GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE;
+ }
+ case Esd3D:
+ return GL_UNSIGNED_INT_SAMPLER_3D;
+ case EsdCube:
+ return sampler.arrayed ? GL_UNSIGNED_INT_SAMPLER_CUBE_MAP_ARRAY : GL_UNSIGNED_INT_SAMPLER_CUBE;
+ case EsdRect:
+ return GL_UNSIGNED_INT_SAMPLER_2D_RECT;
+ case EsdBuffer:
+ return GL_UNSIGNED_INT_SAMPLER_BUFFER;
+ }
+ default:
+ return 0;
+ }
+ } else {
+ // an image...
+ switch (sampler.type) {
+ case EbtFloat:
+ switch ((int)sampler.dim) {
+ case Esd1D:
+ return sampler.arrayed ? GL_IMAGE_1D_ARRAY : GL_IMAGE_1D;
+ case Esd2D:
+ switch ((int)sampler.ms) {
+ case false: return sampler.arrayed ? GL_IMAGE_2D_ARRAY : GL_IMAGE_2D;
+ case true: return sampler.arrayed ? GL_IMAGE_2D_MULTISAMPLE_ARRAY : GL_IMAGE_2D_MULTISAMPLE;
+ }
+ case Esd3D:
+ return GL_IMAGE_3D;
+ case EsdCube:
+ return sampler.arrayed ? GL_IMAGE_CUBE_MAP_ARRAY : GL_IMAGE_CUBE;
+ case EsdRect:
+ return GL_IMAGE_2D_RECT;
+ case EsdBuffer:
+ return GL_IMAGE_BUFFER;
+ }
+ case EbtInt:
+ switch ((int)sampler.dim) {
+ case Esd1D:
+ return sampler.arrayed ? GL_INT_IMAGE_1D_ARRAY : GL_INT_IMAGE_1D;
+ case Esd2D:
+ switch ((int)sampler.ms) {
+ case false: return sampler.arrayed ? GL_INT_IMAGE_2D_ARRAY : GL_INT_IMAGE_2D;
+ case true: return sampler.arrayed ? GL_INT_IMAGE_2D_MULTISAMPLE_ARRAY : GL_INT_IMAGE_2D_MULTISAMPLE;
+ }
+ case Esd3D:
+ return GL_INT_IMAGE_3D;
+ case EsdCube:
+ return sampler.arrayed ? GL_INT_IMAGE_CUBE_MAP_ARRAY : GL_INT_IMAGE_CUBE;
+ case EsdRect:
+ return GL_INT_IMAGE_2D_RECT;
+ case EsdBuffer:
+ return GL_INT_IMAGE_BUFFER;
+ }
+ case EbtUint:
+ switch ((int)sampler.dim) {
+ case Esd1D:
+ return sampler.arrayed ? GL_UNSIGNED_INT_IMAGE_1D_ARRAY : GL_UNSIGNED_INT_IMAGE_1D;
+ case Esd2D:
+ switch ((int)sampler.ms) {
+ case false: return sampler.arrayed ? GL_UNSIGNED_INT_IMAGE_2D_ARRAY : GL_UNSIGNED_INT_IMAGE_2D;
+ case true: return sampler.arrayed ? GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE_ARRAY : GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE;
+ }
+ case Esd3D:
+ return GL_UNSIGNED_INT_IMAGE_3D;
+ case EsdCube:
+ return sampler.arrayed ? GL_UNSIGNED_INT_IMAGE_CUBE_MAP_ARRAY : GL_UNSIGNED_INT_IMAGE_CUBE;
+ case EsdRect:
+ return GL_UNSIGNED_INT_IMAGE_2D_RECT;
+ case EsdBuffer:
+ return GL_UNSIGNED_INT_IMAGE_BUFFER;
+ }
+ default:
+ return 0;
+ }
+ }
+ }
+
+ //
+ // Translate a glslang type into the GL API #define number.
+ // Ignores arrayness.
+ //
+ int mapToGlType(const TType& type)
+ {
+ switch (type.getBasicType()) {
+ case EbtSampler:
+ return mapSamplerToGlType(type.getSampler());
+ case EbtStruct:
+ case EbtBlock:
+ case EbtVoid:
+ return 0;
+ default:
+ break;
+ }
+
+ if (type.isVector()) {
+ int offset = type.getVectorSize() - 2;
+ switch (type.getBasicType()) {
+ case EbtFloat: return GL_FLOAT_VEC2 + offset;
+ case EbtDouble: return GL_DOUBLE_VEC2 + offset;
+ case EbtInt: return GL_INT_VEC2 + offset;
+ case EbtUint: return GL_UNSIGNED_INT_VEC2 + offset;
+ case EbtInt64: return GL_INT64_ARB + offset;
+ case EbtUint64: return GL_UNSIGNED_INT64_ARB + offset;
+ case EbtBool: return GL_BOOL_VEC2 + offset;
+ case EbtAtomicUint: return GL_UNSIGNED_INT_ATOMIC_COUNTER + offset;
+ default: return 0;
+ }
+ }
+ if (type.isMatrix()) {
+ switch (type.getBasicType()) {
+ case EbtFloat:
+ switch (type.getMatrixCols()) {
+ case 2:
+ switch (type.getMatrixRows()) {
+ case 2: return GL_FLOAT_MAT2;
+ case 3: return GL_FLOAT_MAT2x3;
+ case 4: return GL_FLOAT_MAT2x4;
+ default: return 0;
+ }
+ case 3:
+ switch (type.getMatrixRows()) {
+ case 2: return GL_FLOAT_MAT3x2;
+ case 3: return GL_FLOAT_MAT3;
+ case 4: return GL_FLOAT_MAT3x4;
+ default: return 0;
+ }
+ case 4:
+ switch (type.getMatrixRows()) {
+ case 2: return GL_FLOAT_MAT4x2;
+ case 3: return GL_FLOAT_MAT4x3;
+ case 4: return GL_FLOAT_MAT4;
+ default: return 0;
+ }
+ }
+ case EbtDouble:
+ switch (type.getMatrixCols()) {
+ case 2:
+ switch (type.getMatrixRows()) {
+ case 2: return GL_DOUBLE_MAT2;
+ case 3: return GL_DOUBLE_MAT2x3;
+ case 4: return GL_DOUBLE_MAT2x4;
+ default: return 0;
+ }
+ case 3:
+ switch (type.getMatrixRows()) {
+ case 2: return GL_DOUBLE_MAT3x2;
+ case 3: return GL_DOUBLE_MAT3;
+ case 4: return GL_DOUBLE_MAT3x4;
+ default: return 0;
+ }
+ case 4:
+ switch (type.getMatrixRows()) {
+ case 2: return GL_DOUBLE_MAT4x2;
+ case 3: return GL_DOUBLE_MAT4x3;
+ case 4: return GL_DOUBLE_MAT4;
+ default: return 0;
+ }
+ }
+ default:
+ return 0;
+ }
+ }
+ if (type.getVectorSize() == 1) {
+ switch (type.getBasicType()) {
+ case EbtFloat: return GL_FLOAT;
+ case EbtDouble: return GL_DOUBLE;
+ case EbtInt: return GL_INT;
+ case EbtUint: return GL_UNSIGNED_INT;
+ case EbtInt64: return GL_INT64_ARB;
+ case EbtUint64: return GL_UNSIGNED_INT64_ARB;
+ case EbtBool: return GL_BOOL;
+ case EbtAtomicUint: return GL_UNSIGNED_INT_ATOMIC_COUNTER;
+ default: return 0;
+ }
+ }
+
+ return 0;
+ }
+
+ int mapToGlArraySize(const TType& type)
+ {
+ return type.isArray() ? type.getOuterArraySize() : 1;
+ }
+
+ typedef std::list<TIntermAggregate*> TFunctionStack;
+ TFunctionStack functions;
+ const TIntermediate& intermediate;
+ TReflection& reflection;
+ std::set<const TIntermNode*> processedDerefs;
+
+protected:
+ TLiveTraverser(TLiveTraverser&);
+ TLiveTraverser& operator=(TLiveTraverser&);
+};
+
+//
+// Implement the traversal functions of interest.
+//
+
+// To catch which function calls are not dead, and hence which functions must be visited.
+bool TLiveTraverser::visitAggregate(TVisit /* visit */, TIntermAggregate* node)
+{
+ if (node->getOp() == EOpFunctionCall)
+ addFunctionCall(node);
+
+ return true; // traverse this subtree
+}
+
+// To catch dereferenced aggregates that must be reflected.
+// This catches them at the highest level possible in the tree.
+bool TLiveTraverser::visitBinary(TVisit /* visit */, TIntermBinary* node)
+{
+ switch (node->getOp()) {
+ case EOpIndexDirect:
+ case EOpIndexIndirect:
+ case EOpIndexDirectStruct:
+ addDereferencedUniform(node);
+ break;
+ default:
+ break;
+ }
+
+ // still need to visit everything below, which could contain sub-expressions
+ // containing different uniforms
+ return true;
+}
+
+// To reflect non-dereferenced objects.
+void TLiveTraverser::visitSymbol(TIntermSymbol* base)
+{
+ if (base->getQualifier().storage == EvqUniform)
+ addUniform(*base);
+
+ if (intermediate.getStage() == EShLangVertex && base->getQualifier().isPipeInput())
+ addAttribute(*base);
+}
+
+// To prune semantically dead paths.
+bool TLiveTraverser::visitSelection(TVisit /* visit */, TIntermSelection* node)
+{
+ TIntermConstantUnion* constant = node->getCondition()->getAsConstantUnion();
+ if (constant) {
+ // cull the path that is dead
+ if (constant->getConstArray()[0].getBConst() == true && node->getTrueBlock())
+ node->getTrueBlock()->traverse(this);
+ if (constant->getConstArray()[0].getBConst() == false && node->getFalseBlock())
+ node->getFalseBlock()->traverse(this);
+
+ return false; // don't traverse any more, we did it all above
+ } else
+ return true; // traverse the whole subtree
+}
+
+//
+// Implement TReflection methods.
+//
+
+// Merge live symbols from 'intermediate' into the existing reflection database.
+//
+// Returns false if the input is too malformed to do this.
+bool TReflection::addStage(EShLanguage, const TIntermediate& intermediate)
+{
+ if (intermediate.getNumMains() != 1 || intermediate.isRecursive())
+ return false;
+
+ TLiveTraverser it(intermediate, *this);
+
+ // put main() on functions to process
+ it.pushFunction("main(");
+
+ // process all the functions
+ while (! it.functions.empty()) {
+ TIntermNode* function = it.functions.back();
+ it.functions.pop_back();
+ function->traverse(&it);
+ }
+
+ return true;
+}
+
+void TReflection::dump()
+{
+ printf("Uniform reflection:\n");
+ for (size_t i = 0; i < indexToUniform.size(); ++i)
+ indexToUniform[i].dump();
+ printf("\n");
+
+ printf("Uniform block reflection:\n");
+ for (size_t i = 0; i < indexToUniformBlock.size(); ++i)
+ indexToUniformBlock[i].dump();
+ printf("\n");
+
+ printf("Vertex attribute reflection:\n");
+ for (size_t i = 0; i < indexToAttribute.size(); ++i)
+ indexToAttribute[i].dump();
+ printf("\n");
+
+ //printf("Live names\n");
+ //for (TNameToIndex::const_iterator it = nameToIndex.begin(); it != nameToIndex.end(); ++it)
+ // printf("%s: %d\n", it->first.c_str(), it->second);
+ //printf("\n");
+}
+
+} // end namespace glslang
diff --git a/chromium/third_party/glslang/src/glslang/MachineIndependent/reflection.h b/chromium/third_party/glslang/src/glslang/MachineIndependent/reflection.h
new file mode 100644
index 00000000000..5d930c7a2a1
--- /dev/null
+++ b/chromium/third_party/glslang/src/glslang/MachineIndependent/reflection.h
@@ -0,0 +1,134 @@
+//
+//Copyright (C) 2013 LunarG, 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:
+//
+// Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 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.
+//
+// Neither the name of 3Dlabs Inc. Ltd. nor the names of its
+// contributors may be used to endorse or promote products derived
+// from this software without specific prior written permission.
+//
+//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+//"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 THE
+//COPYRIGHT HOLDERS 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.
+//
+
+#ifndef _REFLECTION_INCLUDED
+#define _REFLECTION_INCLUDED
+
+#include "../Public/ShaderLang.h"
+
+#include <list>
+#include <set>
+
+//
+// A reflection database and its interface, consistent with the OpenGL API reflection queries.
+//
+
+namespace glslang {
+
+class TIntermediate;
+class TIntermAggregate;
+class TLiveTraverser;
+
+// Data needed for just a single object at the granularity exchanged by the reflection API
+class TObjectReflection {
+public:
+ TObjectReflection(const TString& pName, int pOffset, int pGLDefineType, int pSize, int pIndex) :
+ name(pName), offset(pOffset), glDefineType(pGLDefineType), size(pSize), index(pIndex) { }
+ void dump() const { printf("%s: offset %d, type %x, size %d, index %d\n", name.c_str(), offset, glDefineType, size, index); }
+ TString name;
+ int offset;
+ int glDefineType;
+ int size; // data size in bytes for a block, array size for a (non-block) object that's an array
+ int index;
+};
+
+// The full reflection database
+class TReflection {
+public:
+ TReflection() : badReflection("__bad__", -1, -1, -1, -1) {}
+ virtual ~TReflection() {}
+
+ // grow the reflection stage by stage
+ bool addStage(EShLanguage, const TIntermediate&);
+
+ // for mapping a uniform index to a uniform object's description
+ int getNumUniforms() { return (int)indexToUniform.size(); }
+ const TObjectReflection& getUniform(int i) const
+ {
+ if (i >= 0 && i < (int)indexToUniform.size())
+ return indexToUniform[i];
+ else
+ return badReflection;
+ }
+
+ // for mapping a block index to the block's description
+ int getNumUniformBlocks() const { return (int)indexToUniformBlock.size(); }
+ const TObjectReflection& getUniformBlock(int i) const
+ {
+ if (i >= 0 && i < (int)indexToUniformBlock.size())
+ return indexToUniformBlock[i];
+ else
+ return badReflection;
+ }
+
+ // for mapping an attribute index to the attribute's description
+ int getNumAttributes() { return (int)indexToAttribute.size(); }
+ const TObjectReflection& getAttribute(int i) const
+ {
+ if (i >= 0 && i < (int)indexToAttribute.size())
+ return indexToAttribute[i];
+ else
+ return badReflection;
+ }
+
+ // for mapping any name to its index (block names, uniform names and attribute names)
+ int getIndex(const char* name) const
+ {
+ TNameToIndex::const_iterator it = nameToIndex.find(name);
+ if (it == nameToIndex.end())
+ return -1;
+ else
+ return it->second;
+ }
+
+ void dump();
+
+protected:
+ friend class glslang::TLiveTraverser;
+
+ // Need a TString hash: typedef std::unordered_map<TString, int> TNameToIndex;
+ typedef std::map<TString, int> TNameToIndex;
+ typedef std::vector<TObjectReflection> TMapIndexToReflection;
+
+ TObjectReflection badReflection; // return for queries of -1 or generally out of range; has expected descriptions with in it for this
+ TNameToIndex nameToIndex; // maps names to indexes; can hold all types of data: uniform/buffer and which function names have been processed
+ TMapIndexToReflection indexToUniform;
+ TMapIndexToReflection indexToUniformBlock;
+ TMapIndexToReflection indexToAttribute;
+};
+
+} // end namespace glslang
+
+#endif // _REFLECTION_INCLUDED
diff --git a/chromium/third_party/glslang/src/glslang/OSDependent/Unix/CMakeLists.txt b/chromium/third_party/glslang/src/glslang/OSDependent/Unix/CMakeLists.txt
new file mode 100644
index 00000000000..174cc9167e0
--- /dev/null
+++ b/chromium/third_party/glslang/src/glslang/OSDependent/Unix/CMakeLists.txt
@@ -0,0 +1,5 @@
+add_library(OSDependent STATIC ossource.cpp ../osinclude.h)
+set_property(TARGET OSDependent PROPERTY FOLDER glslang)
+
+install(TARGETS OSDependent
+ ARCHIVE DESTINATION lib)
diff --git a/chromium/third_party/glslang/src/glslang/OSDependent/Unix/ossource.cpp b/chromium/third_party/glslang/src/glslang/OSDependent/Unix/ossource.cpp
new file mode 100644
index 00000000000..123e08697e2
--- /dev/null
+++ b/chromium/third_party/glslang/src/glslang/OSDependent/Unix/ossource.cpp
@@ -0,0 +1,190 @@
+//
+//Copyright (C) 2002-2005 3Dlabs Inc. Ltd.
+//All rights reserved.
+//
+//Redistribution and use in source and binary forms, with or without
+//modification, are permitted provided that the following conditions
+//are met:
+//
+// Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 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.
+//
+// Neither the name of 3Dlabs Inc. Ltd. nor the names of its
+// contributors may be used to endorse or promote products derived
+// from this software without specific prior written permission.
+//
+//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+//"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 THE
+//COPYRIGHT HOLDERS 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.
+//
+
+//
+// This file contains the Linux-specific functions
+//
+#include "../osinclude.h"
+#include "../../../OGLCompilersDLL/InitializeDll.h"
+
+#include <pthread.h>
+#include <semaphore.h>
+#include <assert.h>
+#include <errno.h>
+#include <stdint.h>
+
+namespace glslang {
+
+//
+// Thread cleanup
+//
+
+//
+// Wrapper for Linux call to DetachThread. This is required as pthread_cleanup_push() expects
+// the cleanup routine to return void.
+//
+static void DetachThreadLinux(void *)
+{
+ DetachThread();
+}
+
+
+//
+// Registers cleanup handler, sets cancel type and state, and executes the thread specific
+// cleanup handler. This function will be called in the Standalone.cpp for regression
+// testing. When OpenGL applications are run with the driver code, Linux OS does the
+// thread cleanup.
+//
+void OS_CleanupThreadData(void)
+{
+#ifdef __ANDROID__
+ DetachThreadLinux(NULL);
+#else
+ int old_cancel_state, old_cancel_type;
+ void *cleanupArg = NULL;
+
+ //
+ // Set thread cancel state and push cleanup handler.
+ //
+ pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, &old_cancel_state);
+ pthread_cleanup_push(DetachThreadLinux, (void *) cleanupArg);
+
+ //
+ // Put the thread in deferred cancellation mode.
+ //
+ pthread_setcanceltype(PTHREAD_CANCEL_DEFERRED, &old_cancel_type);
+
+ //
+ // Pop cleanup handler and execute it prior to unregistering the cleanup handler.
+ //
+ pthread_cleanup_pop(1);
+
+ //
+ // Restore the thread's previous cancellation mode.
+ //
+ pthread_setcanceltype(old_cancel_state, NULL);
+#endif
+}
+
+
+//
+// Thread Local Storage Operations
+//
+inline OS_TLSIndex PthreadKeyToTLSIndex(pthread_key_t key)
+{
+ return (OS_TLSIndex)((uintptr_t)key + 1);
+}
+
+inline pthread_key_t TLSIndexToPthreadKey(OS_TLSIndex nIndex)
+{
+ return (pthread_key_t)((uintptr_t)nIndex - 1);
+}
+
+OS_TLSIndex OS_AllocTLSIndex()
+{
+ pthread_key_t pPoolIndex;
+
+ //
+ // Create global pool key.
+ //
+ if ((pthread_key_create(&pPoolIndex, NULL)) != 0) {
+ assert(0 && "OS_AllocTLSIndex(): Unable to allocate Thread Local Storage");
+ return OS_INVALID_TLS_INDEX;
+ }
+ else
+ return PthreadKeyToTLSIndex(pPoolIndex);
+}
+
+
+bool OS_SetTLSValue(OS_TLSIndex nIndex, void *lpvValue)
+{
+ if (nIndex == OS_INVALID_TLS_INDEX) {
+ assert(0 && "OS_SetTLSValue(): Invalid TLS Index");
+ return false;
+ }
+
+ if (pthread_setspecific(TLSIndexToPthreadKey(nIndex), lpvValue) == 0)
+ return true;
+ else
+ return false;
+}
+
+void* OS_GetTLSValue(OS_TLSIndex nIndex)
+{
+ //
+ // This function should return 0 if nIndex is invalid.
+ //
+ assert(nIndex != OS_INVALID_TLS_INDEX);
+ return pthread_getspecific(TLSIndexToPthreadKey(nIndex));
+}
+
+bool OS_FreeTLSIndex(OS_TLSIndex nIndex)
+{
+ if (nIndex == OS_INVALID_TLS_INDEX) {
+ assert(0 && "OS_SetTLSValue(): Invalid TLS Index");
+ return false;
+ }
+
+ //
+ // Delete the global pool key.
+ //
+ if (pthread_key_delete(TLSIndexToPthreadKey(nIndex)) == 0)
+ return true;
+ else
+ return false;
+}
+
+// TODO: non-windows: if we need these on linux, flesh them out
+void InitGlobalLock() { }
+void GetGlobalLock() { }
+void ReleaseGlobalLock() { }
+
+void* OS_CreateThread(TThreadEntrypoint entry)
+{
+ return 0;
+}
+
+void OS_WaitForAllThreads(void* threads, int numThreads)
+{
+}
+
+void OS_Sleep(int milliseconds)
+{
+}
+
+void OS_DumpMemoryCounters()
+{
+}
+
+} // end namespace glslang
diff --git a/chromium/third_party/glslang/src/glslang/OSDependent/Windows/CMakeLists.txt b/chromium/third_party/glslang/src/glslang/OSDependent/Windows/CMakeLists.txt
new file mode 100644
index 00000000000..399760c30a7
--- /dev/null
+++ b/chromium/third_party/glslang/src/glslang/OSDependent/Windows/CMakeLists.txt
@@ -0,0 +1,17 @@
+set(SOURCES ossource.cpp ../osinclude.h)
+
+add_library(OSDependent STATIC ${SOURCES})
+set_property(TARGET OSDependent PROPERTY FOLDER glslang)
+
+# MinGW GCC complains about function pointer casts to void*.
+# Turn that off with -fpermissive.
+if(${CMAKE_CXX_COMPILER_ID} MATCHES "GNU")
+ target_compile_options(OSDependent PRIVATE -fpermissive)
+endif()
+
+if(WIN32)
+ source_group("Source" FILES ${SOURCES})
+endif(WIN32)
+
+install(TARGETS OSDependent
+ ARCHIVE DESTINATION lib)
diff --git a/chromium/third_party/glslang/src/glslang/OSDependent/Windows/main.cpp b/chromium/third_party/glslang/src/glslang/OSDependent/Windows/main.cpp
new file mode 100644
index 00000000000..6d6b0fddcb8
--- /dev/null
+++ b/chromium/third_party/glslang/src/glslang/OSDependent/Windows/main.cpp
@@ -0,0 +1,74 @@
+//
+//Copyright (C) 2002-2005 3Dlabs Inc. Ltd.
+//All rights reserved.
+//
+//Redistribution and use in source and binary forms, with or without
+//modification, are permitted provided that the following conditions
+//are met:
+//
+// Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 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.
+//
+// Neither the name of 3Dlabs Inc. Ltd. nor the names of its
+// contributors may be used to endorse or promote products derived
+// from this software without specific prior written permission.
+//
+//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+//"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 THE
+//COPYRIGHT HOLDERS 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.
+//
+
+#include "InitializeDll.h"
+
+#define STRICT
+#define VC_EXTRALEAN 1
+#include <windows.h>
+#include <assert.h>
+
+BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
+{
+ switch (fdwReason)
+ {
+ case DLL_PROCESS_ATTACH:
+
+ if (! glslang::InitProcess())
+ return FALSE;
+ break;
+ case DLL_THREAD_ATTACH:
+
+ if (! glslang::InitThread())
+ return FALSE;
+ break;
+
+ case DLL_THREAD_DETACH:
+
+ if (! glslang::DetachThread())
+ return FALSE;
+ break;
+
+ case DLL_PROCESS_DETACH:
+
+ glslang::DetachProcess();
+ break;
+
+ default:
+ assert(0 && "DllMain(): Reason for calling DLL Main is unknown");
+ return FALSE;
+ }
+
+ return TRUE;
+}
diff --git a/chromium/third_party/glslang/src/glslang/OSDependent/Windows/ossource.cpp b/chromium/third_party/glslang/src/glslang/OSDependent/Windows/ossource.cpp
new file mode 100644
index 00000000000..1d09fd38a3d
--- /dev/null
+++ b/chromium/third_party/glslang/src/glslang/OSDependent/Windows/ossource.cpp
@@ -0,0 +1,163 @@
+//
+//Copyright (C) 2002-2005 3Dlabs Inc. Ltd.
+//All rights reserved.
+//
+//Redistribution and use in source and binary forms, with or without
+//modification, are permitted provided that the following conditions
+//are met:
+//
+// Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 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.
+//
+// Neither the name of 3Dlabs Inc. Ltd. nor the names of its
+// contributors may be used to endorse or promote products derived
+// from this software without specific prior written permission.
+//
+//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+//"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 THE
+//COPYRIGHT HOLDERS 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.
+//
+
+#include "../osinclude.h"
+
+#define STRICT
+#define VC_EXTRALEAN 1
+#include <windows.h>
+#include <assert.h>
+#include <process.h>
+#include <psapi.h>
+#include <stdio.h>
+#include <stdint.h>
+
+//
+// This file contains contains the Window-OS-specific functions
+//
+
+#if !(defined(_WIN32) || defined(_WIN64))
+#error Trying to build a windows specific file in a non windows build.
+#endif
+
+namespace glslang {
+
+inline OS_TLSIndex ToGenericTLSIndex (DWORD handle)
+{
+ return (OS_TLSIndex)((uintptr_t)handle + 1);
+}
+
+inline DWORD ToNativeTLSIndex (OS_TLSIndex nIndex)
+{
+ return (DWORD)((uintptr_t)nIndex - 1);
+}
+
+//
+// Thread Local Storage Operations
+//
+OS_TLSIndex OS_AllocTLSIndex()
+{
+ DWORD dwIndex = TlsAlloc();
+ if (dwIndex == TLS_OUT_OF_INDEXES) {
+ assert(0 && "OS_AllocTLSIndex(): Unable to allocate Thread Local Storage");
+ return OS_INVALID_TLS_INDEX;
+ }
+
+ return ToGenericTLSIndex(dwIndex);
+}
+
+
+bool OS_SetTLSValue(OS_TLSIndex nIndex, void *lpvValue)
+{
+ if (nIndex == OS_INVALID_TLS_INDEX) {
+ assert(0 && "OS_SetTLSValue(): Invalid TLS Index");
+ return false;
+ }
+
+ if (TlsSetValue(ToNativeTLSIndex(nIndex), lpvValue))
+ return true;
+ else
+ return false;
+}
+
+void* OS_GetTLSValue(OS_TLSIndex nIndex)
+{
+ assert(nIndex != OS_INVALID_TLS_INDEX);
+ return TlsGetValue(ToNativeTLSIndex(nIndex));
+}
+
+bool OS_FreeTLSIndex(OS_TLSIndex nIndex)
+{
+ if (nIndex == OS_INVALID_TLS_INDEX) {
+ assert(0 && "OS_SetTLSValue(): Invalid TLS Index");
+ return false;
+ }
+
+ if (TlsFree(ToNativeTLSIndex(nIndex)))
+ return true;
+ else
+ return false;
+}
+
+HANDLE GlobalLock;
+
+void InitGlobalLock()
+{
+ GlobalLock = CreateMutex(0, false, 0);
+}
+
+void GetGlobalLock()
+{
+ WaitForSingleObject(GlobalLock, INFINITE);
+}
+
+void ReleaseGlobalLock()
+{
+ ReleaseMutex(GlobalLock);
+}
+
+unsigned int __stdcall EnterGenericThread (void* entry)
+{
+ return ((TThreadEntrypoint)entry)(0);
+}
+
+void* OS_CreateThread(TThreadEntrypoint entry)
+{
+ return (void*)_beginthreadex(0, 0, EnterGenericThread, (void*)entry, 0, 0);
+}
+
+void OS_WaitForAllThreads(void* threads, int numThreads)
+{
+ WaitForMultipleObjects(numThreads, (HANDLE*)threads, true, INFINITE);
+}
+
+void OS_Sleep(int milliseconds)
+{
+ Sleep(milliseconds);
+}
+
+//#define DUMP_COUNTERS
+
+void OS_DumpMemoryCounters()
+{
+#ifdef DUMP_COUNTERS
+ PROCESS_MEMORY_COUNTERS counters;
+ GetProcessMemoryInfo(GetCurrentProcess(), &counters, sizeof(counters));
+ printf("Working set size: %d\n", counters.WorkingSetSize);
+#else
+ printf("Recompile with DUMP_COUNTERS defined to see counters.\n");
+#endif
+}
+
+} // namespace glslang
diff --git a/chromium/third_party/glslang/src/glslang/OSDependent/osinclude.h b/chromium/third_party/glslang/src/glslang/OSDependent/osinclude.h
new file mode 100644
index 00000000000..33f880380f2
--- /dev/null
+++ b/chromium/third_party/glslang/src/glslang/OSDependent/osinclude.h
@@ -0,0 +1,66 @@
+//
+//Copyright (C) 2002-2005 3Dlabs Inc. Ltd.
+//All rights reserved.
+//
+//Redistribution and use in source and binary forms, with or without
+//modification, are permitted provided that the following conditions
+//are met:
+//
+// Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 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.
+//
+// Neither the name of 3Dlabs Inc. Ltd. nor the names of its
+// contributors may be used to endorse or promote products derived
+// from this software without specific prior written permission.
+//
+//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+//"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 THE
+//COPYRIGHT HOLDERS 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.
+//
+
+#ifndef __OSINCLUDE_H
+#define __OSINCLUDE_H
+
+namespace glslang {
+
+//
+// Thread Local Storage Operations
+//
+typedef void* OS_TLSIndex;
+#define OS_INVALID_TLS_INDEX ((void*)0)
+
+OS_TLSIndex OS_AllocTLSIndex();
+bool OS_SetTLSValue(OS_TLSIndex nIndex, void *lpvValue);
+bool OS_FreeTLSIndex(OS_TLSIndex nIndex);
+void* OS_GetTLSValue(OS_TLSIndex nIndex);
+
+void InitGlobalLock();
+void GetGlobalLock();
+void ReleaseGlobalLock();
+
+typedef unsigned int (*TThreadEntrypoint)(void*);
+void* OS_CreateThread(TThreadEntrypoint);
+void OS_WaitForAllThreads(void* threads, int numThreads);
+
+void OS_CleanupThreadData(void);
+void OS_Sleep(int milliseconds);
+
+void OS_DumpMemoryCounters();
+
+} // end namespace glslang
+
+#endif // __OSINCLUDE_H
diff --git a/chromium/third_party/glslang/src/glslang/Public/ShaderLang.h b/chromium/third_party/glslang/src/glslang/Public/ShaderLang.h
new file mode 100644
index 00000000000..64d6ab9f2e8
--- /dev/null
+++ b/chromium/third_party/glslang/src/glslang/Public/ShaderLang.h
@@ -0,0 +1,485 @@
+//
+//Copyright (C) 2002-2005 3Dlabs Inc. Ltd.
+//All rights reserved.
+//
+//Redistribution and use in source and binary forms, with or without
+//modification, are permitted provided that the following conditions
+//are met:
+//
+// Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 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.
+//
+// Neither the name of 3Dlabs Inc. Ltd. nor the names of its
+// contributors may be used to endorse or promote products derived
+// from this software without specific prior written permission.
+//
+//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+//"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 THE
+//COPYRIGHT HOLDERS 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.
+//
+#ifndef _COMPILER_INTERFACE_INCLUDED_
+#define _COMPILER_INTERFACE_INCLUDED_
+
+#include "../Include/ResourceLimits.h"
+#include "../MachineIndependent/Versions.h"
+
+#ifdef _WIN32
+#define C_DECL __cdecl
+//#ifdef SH_EXPORTING
+// #define SH_IMPORT_EXPORT __declspec(dllexport)
+//#else
+// #define SH_IMPORT_EXPORT __declspec(dllimport)
+//#endif
+#define SH_IMPORT_EXPORT
+#else
+#define SH_IMPORT_EXPORT
+#ifndef __fastcall
+#define __fastcall
+#endif
+#define C_DECL
+#endif
+
+//
+// This is the platform independent interface between an OGL driver
+// and the shading language compiler/linker.
+//
+
+#ifdef __cplusplus
+ extern "C" {
+#endif
+
+//
+// Driver must call this first, once, before doing any other
+// compiler/linker operations.
+//
+// (Call once per process, not once per thread.)
+//
+SH_IMPORT_EXPORT int ShInitialize();
+
+//
+// Driver should call this at process shutdown.
+//
+SH_IMPORT_EXPORT int __fastcall ShFinalize();
+
+//
+// Types of languages the compiler can consume.
+//
+typedef enum {
+ EShLangVertex,
+ EShLangTessControl,
+ EShLangTessEvaluation,
+ EShLangGeometry,
+ EShLangFragment,
+ EShLangCompute,
+ EShLangCount,
+} EShLanguage; // would be better as stage, but this is ancient now
+
+typedef enum {
+ EShLangVertexMask = (1 << EShLangVertex),
+ EShLangTessControlMask = (1 << EShLangTessControl),
+ EShLangTessEvaluationMask = (1 << EShLangTessEvaluation),
+ EShLangGeometryMask = (1 << EShLangGeometry),
+ EShLangFragmentMask = (1 << EShLangFragment),
+ EShLangComputeMask = (1 << EShLangCompute),
+} EShLanguageMask;
+
+namespace glslang {
+
+typedef enum {
+ EShSourceNone,
+ EShSourceGlsl,
+ EShSourceHlsl,
+} EShSource; // if EShLanguage were EShStage, this could be EShLanguage instead
+
+const char* StageName(EShLanguage);
+
+} // end namespace glslang
+
+//
+// Types of output the linker will create.
+//
+typedef enum {
+ EShExVertexFragment,
+ EShExFragment
+} EShExecutable;
+
+//
+// Optimization level for the compiler.
+//
+typedef enum {
+ EShOptNoGeneration,
+ EShOptNone,
+ EShOptSimple, // Optimizations that can be done quickly
+ EShOptFull, // Optimizations that will take more time
+} EShOptimizationLevel;
+
+//
+// Message choices for what errors and warnings are given.
+//
+enum EShMessages {
+ EShMsgDefault = 0, // default is to give all required errors and extra warnings
+ EShMsgRelaxedErrors = (1 << 0), // be liberal in accepting input
+ EShMsgSuppressWarnings = (1 << 1), // suppress all warnings, except those required by the specification
+ EShMsgAST = (1 << 2), // print the AST intermediate representation
+ EShMsgSpvRules = (1 << 3), // issue messages for SPIR-V generation
+ EShMsgVulkanRules = (1 << 4), // issue messages for Vulkan-requirements of GLSL for SPIR-V
+ EShMsgOnlyPreprocessor = (1 << 5), // only print out errors produced by the preprocessor
+ EShMsgReadHlsl = (1 << 6), // use HLSL parsing rules and semantics
+};
+
+//
+// Build a table for bindings. This can be used for locating
+// attributes, uniforms, globals, etc., as needed.
+//
+typedef struct {
+ const char* name;
+ int binding;
+} ShBinding;
+
+typedef struct {
+ int numBindings;
+ ShBinding* bindings; // array of bindings
+} ShBindingTable;
+
+//
+// ShHandle held by but opaque to the driver. It is allocated,
+// managed, and de-allocated by the compiler/linker. It's contents
+// are defined by and used by the compiler and linker. For example,
+// symbol table information and object code passed from the compiler
+// to the linker can be stored where ShHandle points.
+//
+// If handle creation fails, 0 will be returned.
+//
+typedef void* ShHandle;
+
+//
+// Driver calls these to create and destroy compiler/linker
+// objects.
+//
+SH_IMPORT_EXPORT ShHandle ShConstructCompiler(const EShLanguage, int debugOptions); // one per shader
+SH_IMPORT_EXPORT ShHandle ShConstructLinker(const EShExecutable, int debugOptions); // one per shader pair
+SH_IMPORT_EXPORT ShHandle ShConstructUniformMap(); // one per uniform namespace (currently entire program object)
+SH_IMPORT_EXPORT void ShDestruct(ShHandle);
+
+//
+// The return value of ShCompile is boolean, non-zero indicating
+// success.
+//
+// The info-log should be written by ShCompile into
+// ShHandle, so it can answer future queries.
+//
+SH_IMPORT_EXPORT int ShCompile(
+ const ShHandle,
+ const char* const shaderStrings[],
+ const int numStrings,
+ const int* lengths,
+ const EShOptimizationLevel,
+ const TBuiltInResource *resources,
+ int debugOptions,
+ int defaultVersion = 110, // use 100 for ES environment, overridden by #version in shader
+ bool forwardCompatible = false, // give errors for use of deprecated features
+ EShMessages messages = EShMsgDefault // warnings and errors
+ );
+
+SH_IMPORT_EXPORT int ShLink(
+ const ShHandle, // linker object
+ const ShHandle h[], // compiler objects to link together
+ const int numHandles,
+ ShHandle uniformMap, // updated with new uniforms
+ short int** uniformsAccessed, // returned with indexes of uniforms accessed
+ int* numUniformsAccessed);
+
+SH_IMPORT_EXPORT int ShLinkExt(
+ const ShHandle, // linker object
+ const ShHandle h[], // compiler objects to link together
+ const int numHandles);
+
+//
+// ShSetEncrpytionMethod is a place-holder for specifying
+// how source code is encrypted.
+//
+SH_IMPORT_EXPORT void ShSetEncryptionMethod(ShHandle);
+
+//
+// All the following return 0 if the information is not
+// available in the object passed down, or the object is bad.
+//
+SH_IMPORT_EXPORT const char* ShGetInfoLog(const ShHandle);
+SH_IMPORT_EXPORT const void* ShGetExecutable(const ShHandle);
+SH_IMPORT_EXPORT int ShSetVirtualAttributeBindings(const ShHandle, const ShBindingTable*); // to detect user aliasing
+SH_IMPORT_EXPORT int ShSetFixedAttributeBindings(const ShHandle, const ShBindingTable*); // to force any physical mappings
+//
+// Tell the linker to never assign a vertex attribute to this list of physical attributes
+//
+SH_IMPORT_EXPORT int ShExcludeAttributes(const ShHandle, int *attributes, int count);
+
+//
+// Returns the location ID of the named uniform.
+// Returns -1 if error.
+//
+SH_IMPORT_EXPORT int ShGetUniformLocation(const ShHandle uniformMap, const char* name);
+
+#ifdef __cplusplus
+ } // end extern "C"
+#endif
+
+////////////////////////////////////////////////////////////////////////////////////////////
+//
+// Deferred-Lowering C++ Interface
+// -----------------------------------
+//
+// Below is a new alternate C++ interface that might potentially replace the above
+// opaque handle-based interface.
+//
+// The below is further designed to handle multiple compilation units per stage, where
+// the intermediate results, including the parse tree, are preserved until link time,
+// rather than the above interface which is designed to have each compilation unit
+// lowered at compile time. In the above model, linking occurs on the lowered results,
+// whereas in this model intra-stage linking can occur at the parse tree
+// (treeRoot in TIntermediate) level, and then a full stage can be lowered.
+//
+
+#include <list>
+#include <string>
+#include <utility>
+
+class TCompiler;
+class TInfoSink;
+
+namespace glslang {
+
+const char* GetEsslVersionString();
+const char* GetGlslVersionString();
+int GetKhronosToolId();
+
+class TIntermediate;
+class TProgram;
+class TPoolAllocator;
+
+// Call this exactly once per process before using anything else
+bool InitializeProcess();
+
+// Call once per process to tear down everything
+void FinalizeProcess();
+
+// Make one TShader per shader that you will link into a program. Then provide
+// the shader through setStrings() or setStringsWithLengths(), then call parse(),
+// then query the info logs.
+// Optionally use setPreamble() to set a special shader string that will be
+// processed before all others but won't affect the validity of #version.
+//
+// N.B.: Does not yet support having the same TShader instance being linked into
+// multiple programs.
+//
+// N.B.: Destruct a linked program *before* destructing the shaders linked into it.
+//
+class TShader {
+public:
+ explicit TShader(EShLanguage);
+ virtual ~TShader();
+ void setStrings(const char* const* s, int n);
+ void setStringsWithLengths(const char* const* s, const int* l, int n);
+ void setStringsWithLengthsAndNames(
+ const char* const* s, const int* l, const char* const* names, int n);
+ void setPreamble(const char* s) { preamble = s; }
+ void setEntryPoint(const char* entryPoint);
+
+ // Interface to #include handlers.
+ //
+ // To support #include, a client of Glslang does the following:
+ // 1. Call setStringsWithNames to set the source strings and associated
+ // names. For example, the names could be the names of the files
+ // containing the shader sources.
+ // 2. Call parse with an Includer.
+ //
+ // When the Glslang parser encounters an #include directive, it calls
+ // the Includer's include method with the the requested include name
+ // together with the current string name. The returned IncludeResult
+ // contains the fully resolved name of the included source, together
+ // with the source text that should replace the #include directive
+ // in the source stream. After parsing that source, Glslang will
+ // release the IncludeResult object.
+ class Includer {
+ public:
+ typedef enum {
+ EIncludeRelative, // For #include "something"
+ EIncludeStandard // Reserved. For #include <something>
+ } IncludeType;
+
+ // An IncludeResult contains the resolved name and content of a source
+ // inclusion.
+ struct IncludeResult {
+ // For a successful inclusion, the fully resolved name of the requested
+ // include. For example, in a filesystem-based includer, full resolution
+ // should convert a relative path name into an absolute path name.
+ // For a failed inclusion, this is an empty string.
+ const std::string file_name;
+ // The content and byte length of the requested inclusion. The
+ // Includer producing this IncludeResult retains ownership of the
+ // storage.
+ // For a failed inclusion, the file_data
+ // field points to a string containing error details.
+ const char* const file_data;
+ const size_t file_length;
+ // Include resolver's context.
+ void* user_data;
+ };
+
+ // Resolves an inclusion request by name, type, current source name,
+ // and include depth.
+ // On success, returns an IncludeResult containing the resolved name
+ // and content of the include. On failure, returns an IncludeResult
+ // with an empty string for the file_name and error details in the
+ // file_data field. The Includer retains ownership of the contents
+ // of the returned IncludeResult value, and those contents must
+ // remain valid until the releaseInclude method is called on that
+ // IncludeResult object.
+ virtual IncludeResult* include(const char* requested_source,
+ IncludeType type,
+ const char* requesting_source,
+ size_t inclusion_depth) = 0;
+ // Signals that the parser will no longer use the contents of the
+ // specified IncludeResult.
+ virtual void releaseInclude(IncludeResult* result) = 0;
+#ifdef __ANDROID__
+ virtual ~Includer() {} // Pacify -Werror=non-virtual-dtor
+#endif
+ };
+
+ // Returns an error message for any #include directive.
+ class ForbidInclude : public Includer {
+ public:
+ IncludeResult* include(const char*, IncludeType, const char*, size_t) override
+ {
+ static const char unexpected_include[] =
+ "unexpected include directive";
+ static const IncludeResult unexpectedIncludeResult =
+ {"", unexpected_include, sizeof(unexpected_include) - 1, nullptr};
+ return new IncludeResult(unexpectedIncludeResult);
+ }
+ virtual void releaseInclude(IncludeResult* result) override
+ {
+ delete result;
+ }
+ };
+
+ bool parse(const TBuiltInResource* res, int defaultVersion, EProfile defaultProfile, bool forceDefaultVersionAndProfile,
+ bool forwardCompatible, EShMessages messages)
+ {
+ TShader::ForbidInclude includer;
+ return parse(res, defaultVersion, defaultProfile, forceDefaultVersionAndProfile, forwardCompatible, messages, includer);
+ }
+
+ bool parse(const TBuiltInResource*, int defaultVersion, EProfile defaultProfile, bool forceDefaultVersionAndProfile,
+ bool forwardCompatible, EShMessages, Includer&);
+
+ // Equivalent to parse() without a default profile and without forcing defaults.
+ // Provided for backwards compatibility.
+ bool parse(const TBuiltInResource*, int defaultVersion, bool forwardCompatible, EShMessages);
+ bool preprocess(const TBuiltInResource* builtInResources,
+ int defaultVersion, EProfile defaultProfile, bool forceDefaultVersionAndProfile,
+ bool forwardCompatible, EShMessages message, std::string* outputString,
+ Includer& includer);
+
+ const char* getInfoLog();
+ const char* getInfoDebugLog();
+
+ EShLanguage getStage() const { return stage; }
+
+protected:
+ TPoolAllocator* pool;
+ EShLanguage stage;
+ TCompiler* compiler;
+ TIntermediate* intermediate;
+ TInfoSink* infoSink;
+ // strings and lengths follow the standard for glShaderSource:
+ // strings is an array of numStrings pointers to string data.
+ // lengths can be null, but if not it is an array of numStrings
+ // integers containing the length of the associated strings.
+ // if lengths is null or lengths[n] < 0 the associated strings[n] is
+ // assumed to be null-terminated.
+ // stringNames is the optional names for all the strings. If stringNames
+ // is null, then none of the strings has name. If a certain element in
+ // stringNames is null, then the corresponding string does not have name.
+ const char* const* strings;
+ const int* lengths;
+ const char* const* stringNames;
+ const char* preamble;
+ int numStrings;
+
+ friend class TProgram;
+
+private:
+ TShader& operator=(TShader&);
+};
+
+class TReflection;
+
+// Make one TProgram per set of shaders that will get linked together. Add all
+// the shaders that are to be linked together. After calling shader.parse()
+// for all shaders, call link().
+//
+// N.B.: Destruct a linked program *before* destructing the shaders linked into it.
+//
+class TProgram {
+public:
+ TProgram();
+ virtual ~TProgram();
+ void addShader(TShader* shader) { stages[shader->stage].push_back(shader); }
+
+ // Link Validation interface
+ bool link(EShMessages);
+ const char* getInfoLog();
+ const char* getInfoDebugLog();
+
+ TIntermediate* getIntermediate(EShLanguage stage) const { return intermediate[stage]; }
+
+ // Reflection Interface
+ bool buildReflection(); // call first, to do liveness analysis, index mapping, etc.; returns false on failure
+ int getNumLiveUniformVariables(); // can be used for glGetProgramiv(GL_ACTIVE_UNIFORMS)
+ int getNumLiveUniformBlocks(); // can be used for glGetProgramiv(GL_ACTIVE_UNIFORM_BLOCKS)
+ const char* getUniformName(int index); // can be used for "name" part of glGetActiveUniform()
+ const char* getUniformBlockName(int blockIndex); // can be used for glGetActiveUniformBlockName()
+ int getUniformBlockSize(int blockIndex); // can be used for glGetActiveUniformBlockiv(UNIFORM_BLOCK_DATA_SIZE)
+ int getUniformIndex(const char* name); // can be used for glGetUniformIndices()
+ int getUniformBlockIndex(int index); // can be used for glGetActiveUniformsiv(GL_UNIFORM_BLOCK_INDEX)
+ int getUniformType(int index); // can be used for glGetActiveUniformsiv(GL_UNIFORM_TYPE)
+ int getUniformBufferOffset(int index); // can be used for glGetActiveUniformsiv(GL_UNIFORM_OFFSET)
+ int getUniformArraySize(int index); // can be used for glGetActiveUniformsiv(GL_UNIFORM_SIZE)
+ int getNumLiveAttributes(); // can be used for glGetProgramiv(GL_ACTIVE_ATTRIBUTES)
+ const char *getAttributeName(int index); // can be used for glGetActiveAttrib()
+ int getAttributeType(int index); // can be used for glGetActiveAttrib()
+ void dumpReflection();
+
+protected:
+ bool linkStage(EShLanguage, EShMessages);
+
+ TPoolAllocator* pool;
+ std::list<TShader*> stages[EShLangCount];
+ TIntermediate* intermediate[EShLangCount];
+ bool newedIntermediate[EShLangCount]; // track which intermediate were "new" versus reusing a singleton unit in a stage
+ TInfoSink* infoSink;
+ TReflection* reflection;
+ bool linked;
+
+private:
+ TProgram& operator=(TProgram&);
+};
+
+} // end namespace glslang
+
+#endif // _COMPILER_INTERFACE_INCLUDED_
diff --git a/chromium/third_party/glslang/src/glslang/updateGrammar b/chromium/third_party/glslang/src/glslang/updateGrammar
new file mode 100755
index 00000000000..a546dd2c356
--- /dev/null
+++ b/chromium/third_party/glslang/src/glslang/updateGrammar
@@ -0,0 +1,3 @@
+#!/usr/bin/env bash
+
+bison --defines=MachineIndependent/glslang_tab.cpp.h -t MachineIndependent/glslang.y -o MachineIndependent/glslang_tab.cpp
diff --git a/chromium/third_party/glslang/src/gtests/AST.FromFile.cpp b/chromium/third_party/glslang/src/gtests/AST.FromFile.cpp
new file mode 100644
index 00000000000..38d6d0ae570
--- /dev/null
+++ b/chromium/third_party/glslang/src/gtests/AST.FromFile.cpp
@@ -0,0 +1,195 @@
+//
+// Copyright (C) 2016 Google, 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:
+//
+// Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 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.
+//
+// Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived
+// from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "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 THE
+// COPYRIGHT HOLDERS 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.
+
+#include <gtest/gtest.h>
+
+#include "TestFixture.h"
+
+namespace glslangtest {
+namespace {
+
+using CompileToAstTest = GlslangTest<::testing::TestWithParam<std::string>>;
+
+TEST_P(CompileToAstTest, FromFile)
+{
+ loadFileCompileAndCheck(GLSLANG_TEST_DIRECTORY, GetParam(),
+ Source::GLSL, Semantics::OpenGL,
+ Target::AST);
+}
+
+// clang-format off
+INSTANTIATE_TEST_CASE_P(
+ Glsl, CompileToAstTest,
+ ::testing::ValuesIn(std::vector<std::string>({
+ "sample.frag",
+ "sample.vert",
+ "decls.frag",
+ "specExamples.frag",
+ "specExamples.vert",
+ "versionsClean.frag",
+ "versionsClean.vert",
+ "versionsErrors.frag",
+ "versionsErrors.vert",
+ "100.frag",
+ "120.vert",
+ "120.frag",
+ "130.vert",
+ "130.frag",
+ "140.vert",
+ "140.frag",
+ "150.vert",
+ "150.geom",
+ "150.frag",
+ "precision.frag",
+ "precision.vert",
+ "nonSquare.vert",
+ "matrixError.vert",
+ "cppSimple.vert",
+ "cppIndent.vert",
+ "cppNest.vert",
+ "cppComplexExpr.vert",
+ "badChars.frag",
+ "pointCoord.frag",
+ "array.frag",
+ "array100.frag",
+ "comment.frag",
+ "300.vert",
+ "300.frag",
+ "300BuiltIns.frag",
+ "300layout.vert",
+ "300layout.frag",
+ "300operations.frag",
+ "300block.frag",
+ "310.comp",
+ "310.vert",
+ "310.geom",
+ "310.frag",
+ "310.tesc",
+ "310.tese",
+ "310implicitSizeArrayError.vert",
+ "310AofA.vert",
+ "330.frag",
+ "330comp.frag",
+ "constErrors.frag",
+ "constFold.frag",
+ "errors.frag",
+ "forwardRef.frag",
+ "uint.frag",
+ "switch.frag",
+ "tokenLength.vert",
+ "100Limits.vert",
+ "100scope.vert",
+ "110scope.vert",
+ "300scope.vert",
+ "400.frag",
+ "400.vert",
+ "410.vert",
+ "420.comp",
+ "420.frag",
+ "420.vert",
+ "420.geom",
+ "420_size_gl_in.geom",
+ "430scope.vert",
+ "lineContinuation100.vert",
+ "lineContinuation.vert",
+ "numeral.frag",
+ "400.geom",
+ "400.tesc",
+ "400.tese",
+ "410.tesc",
+ "420.tesc",
+ "420.tese",
+ "410.geom",
+ "430.vert",
+ "430.comp",
+ "430AofA.frag",
+ "440.vert",
+ "440.frag",
+ "450.vert",
+ "450.geom",
+ "450.tesc",
+ "450.tese",
+ "450.frag",
+ "450.comp",
+ "dce.frag",
+ "atomic_uint.frag",
+ "aggOps.frag",
+ "always-discard.frag",
+ "always-discard2.frag",
+ "conditionalDiscard.frag",
+ "conversion.frag",
+ "dataOut.frag",
+ "dataOutIndirect.frag",
+ "deepRvalue.frag",
+ "depthOut.frag",
+ "discard-dce.frag",
+ "doWhileLoop.frag",
+ "earlyReturnDiscard.frag",
+ "flowControl.frag",
+ "forLoop.frag",
+ "functionCall.frag",
+ "functionSemantics.frag",
+ "length.frag",
+ "localAggregates.frag",
+ "loops.frag",
+ "loopsArtificial.frag",
+ "matrix.frag",
+ "matrix2.frag",
+ "newTexture.frag",
+ "Operations.frag",
+ "prepost.frag",
+ "simpleFunctionCall.frag",
+ "structAssignment.frag",
+ "structDeref.frag",
+ "structure.frag",
+ "swizzle.frag",
+ "syntaxError.frag",
+ "test.frag",
+ "texture.frag",
+ "types.frag",
+ "uniformArray.frag",
+ "variableArrayIndex.frag",
+ "varyingArray.frag",
+ "varyingArrayIndirect.frag",
+ "voidFunction.frag",
+ "whileLoop.frag",
+ "nonVulkan.frag",
+ "spv.atomic.comp",
+ })),
+ FileNameAsCustomTestSuffix
+);
+// clang-format on
+
+} // anonymous namespace
+} // namespace glslangtest
diff --git a/chromium/third_party/glslang/src/gtests/BuiltInResource.FromFile.cpp b/chromium/third_party/glslang/src/gtests/BuiltInResource.FromFile.cpp
new file mode 100644
index 00000000000..4d68d873bbf
--- /dev/null
+++ b/chromium/third_party/glslang/src/gtests/BuiltInResource.FromFile.cpp
@@ -0,0 +1,57 @@
+//
+// Copyright (C) 2016 Google, 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:
+//
+// Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 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.
+//
+// Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived
+// from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "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 THE
+// COPYRIGHT HOLDERS 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.
+
+#include <algorithm>
+
+#include <gtest/gtest.h>
+
+#include "StandAlone/ResourceLimits.h"
+#include "TestFixture.h"
+
+namespace glslangtest {
+namespace {
+
+using DefaultResourceTest = GlslangTest<::testing::Test>;
+
+TEST_F(DefaultResourceTest, FromFile)
+{
+ const std::string path = GLSLANG_TEST_DIRECTORY "/baseResults/test.conf";
+ std::string expectedConfig;
+ tryLoadFile(path, "expected resource limit", &expectedConfig);
+ const std::string realConfig = glslang::GetDefaultTBuiltInResourceString();
+ ASSERT_EQ(expectedConfig, realConfig);
+}
+
+} // anonymous namespace
+} // namespace glslangtest
diff --git a/chromium/third_party/glslang/src/gtests/CMakeLists.txt b/chromium/third_party/glslang/src/gtests/CMakeLists.txt
new file mode 100644
index 00000000000..4aafd11f312
--- /dev/null
+++ b/chromium/third_party/glslang/src/gtests/CMakeLists.txt
@@ -0,0 +1,40 @@
+if (TARGET gmock)
+ message(STATUS "Google Mock found - building tests")
+
+ set(TEST_SOURCES
+ # Framework related source files
+ ${CMAKE_CURRENT_SOURCE_DIR}/Initializer.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/main.cpp
+ ${CMAKE_CURRENT_SOURCE_DIR}/Settings.cpp
+ ${CMAKE_CURRENT_SOURCE_DIR}/Settings.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/TestFixture.cpp
+ ${CMAKE_CURRENT_SOURCE_DIR}/TestFixture.h
+
+ # Test related source files
+ ${CMAKE_CURRENT_SOURCE_DIR}/AST.FromFile.cpp
+ ${CMAKE_CURRENT_SOURCE_DIR}/BuiltInResource.FromFile.cpp
+ ${CMAKE_CURRENT_SOURCE_DIR}/Config.FromFile.cpp
+ ${CMAKE_CURRENT_SOURCE_DIR}/Hlsl.FromFile.cpp
+ ${CMAKE_CURRENT_SOURCE_DIR}/Link.FromFile.cpp
+ ${CMAKE_CURRENT_SOURCE_DIR}/Pp.FromFile.cpp
+ ${CMAKE_CURRENT_SOURCE_DIR}/Spv.FromFile.cpp
+ )
+
+ add_executable(glslangtests ${TEST_SOURCES})
+ set_property(TARGET glslangtests PROPERTY FOLDER tests)
+ glslang_set_link_args(glslangtests)
+ install(TARGETS glslangtests
+ RUNTIME DESTINATION bin)
+
+ target_compile_definitions(glslangtests
+ PRIVATE GLSLANG_TEST_DIRECTORY="${CMAKE_CURRENT_SOURCE_DIR}/../Test")
+ target_include_directories(glslangtests PRIVATE
+ ${CMAKE_CURRENT_SOURCE_DIR}
+ ${PROJECT_SOURCE_DIR}
+ ${gmock_SOURCE_DIR}/include
+ ${gtest_SOURCE_DIR}/include)
+ target_link_libraries(glslangtests PRIVATE
+ glslang OSDependent OGLCompiler HLSL glslang
+ SPIRV glslang-default-resource-limits gmock)
+ add_test(NAME glslang-gtests COMMAND glslangtests)
+endif()
diff --git a/chromium/third_party/glslang/src/gtests/Config.FromFile.cpp b/chromium/third_party/glslang/src/gtests/Config.FromFile.cpp
new file mode 100644
index 00000000000..20c98be5584
--- /dev/null
+++ b/chromium/third_party/glslang/src/gtests/Config.FromFile.cpp
@@ -0,0 +1,107 @@
+//
+// Copyright (C) 2016 Google, 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:
+//
+// Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 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.
+//
+// Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived
+// from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "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 THE
+// COPYRIGHT HOLDERS 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.
+
+#include "StandAlone/ResourceLimits.h"
+#include "TestFixture.h"
+
+namespace glslangtest {
+namespace {
+
+struct TestCaseSpec {
+ std::string input;
+ std::string config;
+ std::string output;
+ EShMessages controls;
+};
+
+using ConfigTest = GlslangTest<::testing::TestWithParam<TestCaseSpec>>;
+
+TEST_P(ConfigTest, FromFile)
+{
+ TestCaseSpec testCase = GetParam();
+ GlslangResult result;
+
+ // Get the contents for input shader and limit configurations.
+ std::string shaderContents, configContents;
+ tryLoadFile(GLSLANG_TEST_DIRECTORY "/" + testCase.input, "input", &shaderContents);
+ tryLoadFile(GLSLANG_TEST_DIRECTORY "/" + testCase.config, "limits config", &configContents);
+
+ // Decode limit configurations.
+ TBuiltInResource resources = {};
+ {
+ const size_t len = configContents.size();
+ char* configChars = new char[len + 1];
+ memcpy(configChars, configContents.data(), len);
+ configChars[len] = 0;
+ glslang::DecodeResourceLimits(&resources, configChars);
+ delete[] configChars;
+ }
+
+ // Compile the shader.
+ glslang::TShader shader(GetShaderStage(GetSuffix(testCase.input)));
+ compile(&shader, shaderContents, "", testCase.controls, &resources);
+ result.shaderResults.push_back(
+ {testCase.input, shader.getInfoLog(), shader.getInfoDebugLog()});
+
+ // Link the shader.
+ glslang::TProgram program;
+ program.addShader(&shader);
+ program.link(testCase.controls);
+ result.linkingOutput = program.getInfoLog();
+ result.linkingError = program.getInfoDebugLog();
+
+ std::ostringstream stream;
+ outputResultToStream(&stream, result, testCase.controls);
+
+ // Check with expected results.
+ const std::string expectedOutputFname =
+ GLSLANG_TEST_DIRECTORY "/baseResults/" + testCase.output;
+ std::string expectedOutput;
+ tryLoadFile(expectedOutputFname, "expected output", &expectedOutput);
+
+ checkEqAndUpdateIfRequested(expectedOutput, stream.str(), expectedOutputFname);
+}
+
+// clang-format off
+INSTANTIATE_TEST_CASE_P(
+ Glsl, ConfigTest,
+ ::testing::ValuesIn(std::vector<TestCaseSpec>({
+ {"specExamples.vert", "baseResults/test.conf", "specExamples.vert.out", EShMsgAST},
+ {"100Limits.vert", "100.conf", "100LimitsConf.vert.out", EShMsgDefault},
+ })),
+);
+// clang-format on
+
+} // anonymous namespace
+} // namespace glslangtest
diff --git a/chromium/third_party/glslang/src/gtests/Hlsl.FromFile.cpp b/chromium/third_party/glslang/src/gtests/Hlsl.FromFile.cpp
new file mode 100644
index 00000000000..224250145f0
--- /dev/null
+++ b/chromium/third_party/glslang/src/gtests/Hlsl.FromFile.cpp
@@ -0,0 +1,102 @@
+//
+// Copyright (C) 2016 Google, Inc.
+// Copyright (C) 2016 LunarG, 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:
+//
+// Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 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.
+//
+// Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived
+// from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "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 THE
+// COPYRIGHT HOLDERS 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.
+
+#include <gtest/gtest.h>
+
+#include "TestFixture.h"
+
+namespace glslangtest {
+namespace {
+
+struct FileNameEntryPointPair {
+ const char* fileName;
+ const char* entryPoint;
+};
+
+// We are using FileNameEntryPointPair objects as parameters for instantiating
+// the template, so the global FileNameAsCustomTestSuffix() won't work since
+// it assumes std::string as parameters. Thus, an overriding one here.
+std::string FileNameAsCustomTestSuffix(
+ const ::testing::TestParamInfo<FileNameEntryPointPair>& info) {
+ std::string name = info.param.fileName;
+ // A valid test case suffix cannot have '.' and '-' inside.
+ std::replace(name.begin(), name.end(), '.', '_');
+ std::replace(name.begin(), name.end(), '-', '_');
+ return name;
+}
+
+using HlslCompileTest = GlslangTest<::testing::TestWithParam<FileNameEntryPointPair>>;
+
+// Compiling HLSL to SPIR-V under Vulkan semantics. Expected to successfully
+// generate both AST and SPIR-V.
+TEST_P(HlslCompileTest, FromFile)
+{
+ loadFileCompileAndCheck(GLSLANG_TEST_DIRECTORY, GetParam().fileName,
+ Source::HLSL, Semantics::Vulkan,
+ Target::BothASTAndSpv, GetParam().entryPoint);
+}
+
+// clang-format off
+INSTANTIATE_TEST_CASE_P(
+ ToSpirv, HlslCompileTest,
+ ::testing::ValuesIn(std::vector<FileNameEntryPointPair>{
+ {"hlsl.assoc.frag", "PixelShaderFunction"},
+ {"hlsl.attribute.frag", "PixelShaderFunction"},
+ {"hlsl.cast.frag", "PixelShaderFunction"},
+ {"hlsl.doLoop.frag", "PixelShaderFunction"},
+ {"hlsl.float1.frag", "PixelShaderFunction"},
+ {"hlsl.float4.frag", "PixelShaderFunction"},
+ {"hlsl.forLoop.frag", "PixelShaderFunction"},
+ {"hlsl.if.frag", "PixelShaderFunction"},
+ {"hlsl.intrinsics.frag", "PixelShaderFunction"},
+ {"hlsl.intrinsics.negative.frag", "PixelShaderFunction"},
+ {"hlsl.intrinsics.negative.vert", "VertexShaderFunction"},
+ {"hlsl.intrinsics.vert", "VertexShaderFunction"},
+ {"hlsl.matType.frag", "PixelShaderFunction"},
+ {"hlsl.max.frag", "PixelShaderFunction"},
+ {"hlsl.precedence.frag", "PixelShaderFunction"},
+ {"hlsl.precedence2.frag", "PixelShaderFunction"},
+ {"hlsl.scope.frag", "PixelShaderFunction"},
+ {"hlsl.sin.frag", "PixelShaderFunction"},
+ {"hlsl.struct.frag", "PixelShaderFunction"},
+ {"hlsl.whileLoop.frag", "PixelShaderFunction"},
+ {"hlsl.void.frag", "PixelShaderFunction"},
+ }),
+ FileNameAsCustomTestSuffix
+);
+// clang-format on
+
+} // anonymous namespace
+} // namespace glslangtest
diff --git a/chromium/third_party/glslang/src/gtests/Initializer.h b/chromium/third_party/glslang/src/gtests/Initializer.h
new file mode 100644
index 00000000000..3cafb52a067
--- /dev/null
+++ b/chromium/third_party/glslang/src/gtests/Initializer.h
@@ -0,0 +1,87 @@
+//
+// Copyright (C) 2016 Google, 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:
+//
+// Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 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.
+//
+// Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived
+// from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "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 THE
+// COPYRIGHT HOLDERS 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.
+
+#ifndef GLSLANG_GTESTS_INITIALIZER_H
+#define GLSLANG_GTESTS_INITIALIZER_H
+
+#include "glslang/Public/ShaderLang.h"
+
+namespace glslangtest {
+
+// Initializes glslang on creation, and destroys it on completion.
+// And provides .Acquire() as a way to reinitialize glslang if semantics change.
+// This object is expected to be a singleton, so that internal glslang state
+// can be correctly handled.
+//
+// TODO(antiagainst): It's a known bug that some of the internal states need to
+// be reset if semantics change:
+// https://github.com/KhronosGroup/glslang/issues/166
+// Therefore, the following mechanism is needed. Remove this once the above bug
+// gets fixed.
+class GlslangInitializer {
+public:
+ GlslangInitializer() : lastMessages(EShMsgDefault)
+ {
+ glslang::InitializeProcess();
+ }
+
+ ~GlslangInitializer() { glslang::FinalizeProcess(); }
+
+ // A token indicates that the glslang is reinitialized (if necessary) to the
+ // required semantics. And that won't change until the token is destroyed.
+ class InitializationToken {
+ };
+
+ // Re-initializes glsl state iff the previous messages and the current
+ // messages are incompatible. We assume external synchronization, i.e.
+ // there is at most one acquired token at any one time.
+ InitializationToken acquire(EShMessages new_messages)
+ {
+ if ((lastMessages ^ new_messages) &
+ (EShMsgVulkanRules | EShMsgSpvRules | EShMsgReadHlsl)) {
+ glslang::FinalizeProcess();
+ glslang::InitializeProcess();
+ }
+ lastMessages = new_messages;
+ return InitializationToken();
+ }
+
+private:
+
+ EShMessages lastMessages;
+};
+
+} // namespace glslangtest
+
+#endif // GLSLANG_GTESTS_INITIALIZER_H
diff --git a/chromium/third_party/glslang/src/gtests/Link.FromFile.cpp b/chromium/third_party/glslang/src/gtests/Link.FromFile.cpp
new file mode 100644
index 00000000000..331c5b2710c
--- /dev/null
+++ b/chromium/third_party/glslang/src/gtests/Link.FromFile.cpp
@@ -0,0 +1,108 @@
+//
+// Copyright (C) 2016 Google, 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:
+//
+// Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 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.
+//
+// Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived
+// from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "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 THE
+// COPYRIGHT HOLDERS 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.
+
+#include <memory>
+
+#include <gtest/gtest.h>
+
+#include "TestFixture.h"
+
+namespace glslangtest {
+namespace {
+
+using LinkTest = GlslangTest<
+ ::testing::TestWithParam<std::vector<std::string>>>;
+
+TEST_P(LinkTest, FromFile)
+{
+ const auto& fileNames = GetParam();
+ const size_t fileCount = fileNames.size();
+ const EShMessages controls = DeriveOptions(
+ Source::GLSL, Semantics::OpenGL, Target::AST);
+ GlslangResult result;
+
+ // Compile each input shader file.
+ std::vector<std::unique_ptr<glslang::TShader>> shaders;
+ for (size_t i = 0; i < fileCount; ++i) {
+ std::string contents;
+ tryLoadFile(GLSLANG_TEST_DIRECTORY "/" + fileNames[i],
+ "input", &contents);
+ shaders.emplace_back(
+ new glslang::TShader(GetShaderStage(GetSuffix(fileNames[i]))));
+ auto* shader = shaders.back().get();
+ compile(shader, contents, "", controls);
+ result.shaderResults.push_back(
+ {fileNames[i], shader->getInfoLog(), shader->getInfoDebugLog()});
+ }
+
+ // Link all of them.
+ glslang::TProgram program;
+ for (const auto& shader : shaders) program.addShader(shader.get());
+ program.link(controls);
+ result.linkingOutput = program.getInfoLog();
+ result.linkingError = program.getInfoDebugLog();
+
+ std::ostringstream stream;
+ outputResultToStream(&stream, result, controls);
+
+ // Check with expected results.
+ const std::string expectedOutputFname =
+ GLSLANG_TEST_DIRECTORY "/baseResults/" + fileNames.front() + ".out";
+ std::string expectedOutput;
+ tryLoadFile(expectedOutputFname, "expected output", &expectedOutput);
+
+ checkEqAndUpdateIfRequested(expectedOutput, stream.str(), expectedOutputFname);
+}
+
+// clang-format off
+INSTANTIATE_TEST_CASE_P(
+ Glsl, LinkTest,
+ ::testing::ValuesIn(std::vector<std::vector<std::string>>({
+ {"mains1.frag", "mains2.frag", "noMain1.geom", "noMain2.geom"},
+ {"noMain.vert", "mains.frag"},
+ {"link1.frag", "link2.frag", "link3.frag"},
+ {"recurse1.vert", "recurse1.frag", "recurse2.frag"},
+ {"300link.frag"},
+ {"300link2.frag"},
+ {"300link3.frag"},
+ {"empty.frag", "empty2.frag", "empty3.frag"},
+ {"150.tesc", "150.tese", "400.tesc", "400.tese", "410.tesc", "420.tesc", "420.tese"},
+ {"max_vertices_0.geom"},
+ {"es-link1.frag", "es-link2.frag"},
+ })),
+);
+// clang-format on
+
+} // anonymous namespace
+} // namespace glslangtest
diff --git a/chromium/third_party/glslang/src/gtests/Pp.FromFile.cpp b/chromium/third_party/glslang/src/gtests/Pp.FromFile.cpp
new file mode 100644
index 00000000000..01bdfc32711
--- /dev/null
+++ b/chromium/third_party/glslang/src/gtests/Pp.FromFile.cpp
@@ -0,0 +1,74 @@
+//
+// Copyright (C) 2016 Google, 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:
+//
+// Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 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.
+//
+// Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived
+// from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "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 THE
+// COPYRIGHT HOLDERS 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.
+
+#include <gtest/gtest.h>
+
+#include "TestFixture.h"
+
+namespace glslangtest {
+namespace {
+
+using PreprocessingTest = GlslangTest<::testing::TestWithParam<std::string>>;
+
+TEST_P(PreprocessingTest, FromFile)
+{
+ loadFilePreprocessAndCheck(GLSLANG_TEST_DIRECTORY, GetParam());
+}
+
+// clang-format off
+INSTANTIATE_TEST_CASE_P(
+ Glsl, PreprocessingTest,
+ ::testing::ValuesIn(std::vector<std::string>({
+ "preprocessor.cpp_style_line_directive.vert",
+ "preprocessor.cpp_style___FILE__.vert",
+ "preprocessor.edge_cases.vert",
+ "preprocessor.errors.vert",
+ "preprocessor.extensions.vert",
+ "preprocessor.function_macro.vert",
+ "preprocessor.include.enabled.vert",
+ "preprocessor.include.disabled.vert",
+ "preprocessor.line.vert",
+ "preprocessor.line.frag",
+ "preprocessor.pragma.vert",
+ "preprocessor.simple.vert",
+ "preprocessor.success_if_parse_would_fail.vert",
+ "preprocessor.defined.vert",
+ "preprocessor.many.endif.vert",
+ })),
+ FileNameAsCustomTestSuffix
+);
+// clang-format on
+
+} // anonymous namespace
+} // namespace glslangtest
diff --git a/chromium/third_party/glslang/src/gtests/README.md b/chromium/third_party/glslang/src/gtests/README.md
new file mode 100644
index 00000000000..c8261cc46ae
--- /dev/null
+++ b/chromium/third_party/glslang/src/gtests/README.md
@@ -0,0 +1,26 @@
+Glslang Tests based on the Google Test Framework
+================================================
+
+This directory contains [Google Test][gtest] based test fixture and test
+cases for glslang.
+
+Apart from typical unit tests, necessary utility methods are added into
+the [`GlslangTests`](TestFixture.h) fixture to provide the ability to do
+file-based integration tests. Various `*.FromFile.cpp` files lists names
+of files containing input shader code in the `Test/` directory. Utility
+methods will load the input shader source, compile them, and compare with
+the corresponding expected output in the `Test/baseResults/` directory.
+
+How to run the tests
+--------------------
+
+Please make sure you have a copy of [Google Test][gtest] checked out under
+the `External` directory before building. After building, just run the
+`ctest` command or the `gtests/glslangtests` binary in your build directory.
+
+The `gtests/glslangtests` binary also provides an `--update-mode` command
+line option, which, if supplied, will overwrite the golden files under
+the `Test/baseResults/` directory with real output from that invocation.
+This serves as an easy way to update golden files.
+
+[gtest]: https://github.com/google/googletest
diff --git a/chromium/third_party/glslang/src/gtests/Settings.cpp b/chromium/third_party/glslang/src/gtests/Settings.cpp
new file mode 100644
index 00000000000..4ba7989b4a3
--- /dev/null
+++ b/chromium/third_party/glslang/src/gtests/Settings.cpp
@@ -0,0 +1,41 @@
+//
+// Copyright (C) 2016 Google, 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:
+//
+// Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 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.
+//
+// Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived
+// from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "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 THE
+// COPYRIGHT HOLDERS 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.
+
+#include "Settings.h"
+
+namespace glslangtest {
+
+GTestSettings GlobalTestSettings = {nullptr, false};
+
+} // namespace glslangtest
diff --git a/chromium/third_party/glslang/src/gtests/Settings.h b/chromium/third_party/glslang/src/gtests/Settings.h
new file mode 100644
index 00000000000..30056a7bacb
--- /dev/null
+++ b/chromium/third_party/glslang/src/gtests/Settings.h
@@ -0,0 +1,54 @@
+//
+// Copyright (C) 2016 Google, 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:
+//
+// Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 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.
+//
+// Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived
+// from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "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 THE
+// COPYRIGHT HOLDERS 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.
+
+#ifndef GLSLANG_GTESTS_SETTINGS_H
+#define GLSLANG_GTESTS_SETTINGS_H
+
+namespace glslangtest {
+
+class GlslangInitializer;
+
+struct GTestSettings {
+ // A handle to GlslangInitializer instance.
+ GlslangInitializer* initializer;
+ // An indicator of whether GTest should write real output to the file for
+ // the expected output.
+ bool updateMode;
+};
+
+extern GTestSettings GlobalTestSettings;
+
+} // namespace glslangtest
+
+#endif // GLSLANG_GTESTS_SETTINGS_H
diff --git a/chromium/third_party/glslang/src/gtests/Spv.FromFile.cpp b/chromium/third_party/glslang/src/gtests/Spv.FromFile.cpp
new file mode 100644
index 00000000000..054e293a6d4
--- /dev/null
+++ b/chromium/third_party/glslang/src/gtests/Spv.FromFile.cpp
@@ -0,0 +1,210 @@
+//
+// Copyright (C) 2016 Google, 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:
+//
+// Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 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.
+//
+// Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived
+// from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "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 THE
+// COPYRIGHT HOLDERS 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.
+
+#include <algorithm>
+
+#include <gtest/gtest.h>
+
+#include "TestFixture.h"
+
+namespace glslangtest {
+namespace {
+
+using CompileToSpirvTest = GlslangTest<::testing::TestWithParam<std::string>>;
+using VulkanSemantics = GlslangTest<::testing::TestWithParam<std::string>>;
+using VulkanAstSemantics = GlslangTest<::testing::TestWithParam<std::string>>;
+
+// Compiling GLSL to SPIR-V under Vulkan semantics. Expected to successfully
+// generate SPIR-V.
+TEST_P(CompileToSpirvTest, FromFile)
+{
+ loadFileCompileAndCheck(GLSLANG_TEST_DIRECTORY, GetParam(),
+ Source::GLSL, Semantics::Vulkan,
+ Target::Spv);
+}
+
+// GLSL-level Vulkan semantics test. Expected to error out before generating
+// SPIR-V.
+TEST_P(VulkanSemantics, FromFile)
+{
+ loadFileCompileAndCheck(GLSLANG_TEST_DIRECTORY, GetParam(),
+ Source::GLSL, Semantics::Vulkan,
+ Target::Spv);
+}
+
+// GLSL-level Vulkan semantics test that need to see the AST for validation.
+TEST_P(VulkanAstSemantics, FromFile)
+{
+ loadFileCompileAndCheck(GLSLANG_TEST_DIRECTORY, GetParam(),
+ Source::GLSL, Semantics::Vulkan,
+ Target::AST);
+}
+
+// clang-format off
+INSTANTIATE_TEST_CASE_P(
+ Glsl, CompileToSpirvTest,
+ ::testing::ValuesIn(std::vector<std::string>({
+ // Test looping constructs.
+ // No tests yet for making sure break and continue from a nested loop
+ // goes to the innermost target.
+ "spv.do-simple.vert",
+ "spv.do-while-continue-break.vert",
+ "spv.for-complex-condition.vert",
+ "spv.for-continue-break.vert",
+ "spv.for-simple.vert",
+ "spv.for-notest.vert",
+ "spv.for-nobody.vert",
+ "spv.while-continue-break.vert",
+ "spv.while-simple.vert",
+ // vulkan-specific tests
+ "spv.set.vert",
+ "spv.double.comp",
+ "spv.100ops.frag",
+ "spv.130.frag",
+ "spv.140.frag",
+ "spv.150.geom",
+ "spv.150.vert",
+ "spv.300BuiltIns.vert",
+ "spv.300layout.frag",
+ "spv.300layout.vert",
+ "spv.300layoutp.vert",
+ "spv.310.comp",
+ "spv.330.geom",
+ "spv.400.frag",
+ "spv.400.tesc",
+ "spv.400.tese",
+ "spv.420.geom",
+ "spv.430.vert",
+ "spv.accessChain.frag",
+ "spv.aggOps.frag",
+ "spv.always-discard.frag",
+ "spv.always-discard2.frag",
+ "spv.bitCast.frag",
+ "spv.bool.vert",
+ "spv.boolInBlock.frag",
+ "spv.branch-return.vert",
+ "spv.conditionalDiscard.frag",
+ "spv.conversion.frag",
+ "spv.dataOut.frag",
+ "spv.dataOutIndirect.frag",
+ "spv.dataOutIndirect.vert",
+ "spv.deepRvalue.frag",
+ "spv.depthOut.frag",
+ "spv.discard-dce.frag",
+ "spv.doWhileLoop.frag",
+ "spv.earlyReturnDiscard.frag",
+ "spv.flowControl.frag",
+ "spv.forLoop.frag",
+ "spv.forwardFun.frag",
+ "spv.functionCall.frag",
+ "spv.functionSemantics.frag",
+ "spv.interpOps.frag",
+ "spv.int64.frag",
+ "spv.layoutNested.vert",
+ "spv.length.frag",
+ "spv.localAggregates.frag",
+ "spv.loops.frag",
+ "spv.loopsArtificial.frag",
+ "spv.matFun.vert",
+ "spv.matrix.frag",
+ "spv.matrix2.frag",
+ "spv.memoryQualifier.frag",
+ "spv.merge-unreachable.frag",
+ "spv.newTexture.frag",
+ "spv.noDeadDecorations.vert",
+ "spv.nonSquare.vert",
+ "spv.Operations.frag",
+ "spv.intOps.vert",
+ "spv.precision.frag",
+ "spv.prepost.frag",
+ "spv.qualifiers.vert",
+ "spv.shaderBallot.comp",
+ "spv.shaderGroupVote.comp",
+ "spv.shiftOps.frag",
+ "spv.simpleFunctionCall.frag",
+ "spv.simpleMat.vert",
+ "spv.sparseTexture.frag",
+ "spv.sparseTextureClamp.frag",
+ "spv.structAssignment.frag",
+ "spv.structDeref.frag",
+ "spv.structure.frag",
+ "spv.switch.frag",
+ "spv.swizzle.frag",
+ "spv.test.frag",
+ "spv.test.vert",
+ "spv.texture.frag",
+ "spv.texture.vert",
+ "spv.image.frag",
+ "spv.types.frag",
+ "spv.uint.frag",
+ "spv.uniformArray.frag",
+ "spv.variableArrayIndex.frag",
+ "spv.varyingArray.frag",
+ "spv.varyingArrayIndirect.frag",
+ "spv.voidFunction.frag",
+ "spv.whileLoop.frag",
+ "spv.AofA.frag",
+ "spv.queryL.frag",
+ "spv.separate.frag",
+ "spv.shortCircuit.frag",
+ "spv.pushConstant.vert",
+ "spv.subpass.frag",
+ "spv.specConstant.vert",
+ "spv.specConstant.comp",
+ "spv.specConstantComposite.vert",
+ })),
+ FileNameAsCustomTestSuffix
+);
+
+INSTANTIATE_TEST_CASE_P(
+ Glsl, VulkanSemantics,
+ ::testing::ValuesIn(std::vector<std::string>({
+ "vulkan.frag",
+ "vulkan.vert",
+ "vulkan.comp",
+ })),
+ FileNameAsCustomTestSuffix
+);
+
+INSTANTIATE_TEST_CASE_P(
+ Glsl, VulkanAstSemantics,
+ ::testing::ValuesIn(std::vector<std::string>({
+ "vulkan.ast.vert",
+ })),
+ FileNameAsCustomTestSuffix
+);
+// clang-format on
+
+} // anonymous namespace
+} // namespace glslangtest
diff --git a/chromium/third_party/glslang/src/gtests/TestFixture.cpp b/chromium/third_party/glslang/src/gtests/TestFixture.cpp
new file mode 100644
index 00000000000..2cf70707cbd
--- /dev/null
+++ b/chromium/third_party/glslang/src/gtests/TestFixture.cpp
@@ -0,0 +1,134 @@
+//
+// Copyright (C) 2016 Google, 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:
+//
+// Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 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.
+//
+// Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived
+// from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "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 THE
+// COPYRIGHT HOLDERS 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.
+
+#include "TestFixture.h"
+
+namespace glslangtest {
+
+std::string FileNameAsCustomTestSuffix(
+ const ::testing::TestParamInfo<std::string>& info)
+{
+ std::string name = info.param;
+ // A valid test case suffix cannot have '.' and '-' inside.
+ std::replace(name.begin(), name.end(), '.', '_');
+ std::replace(name.begin(), name.end(), '-', '_');
+ return name;
+}
+
+EShLanguage GetShaderStage(const std::string& stage)
+{
+ if (stage == "vert") {
+ return EShLangVertex;
+ } else if (stage == "tesc") {
+ return EShLangTessControl;
+ } else if (stage == "tese") {
+ return EShLangTessEvaluation;
+ } else if (stage == "geom") {
+ return EShLangGeometry;
+ } else if (stage == "frag") {
+ return EShLangFragment;
+ } else if (stage == "comp") {
+ return EShLangCompute;
+ } else {
+ assert(0 && "Unknown shader stage");
+ return EShLangCount;
+ }
+}
+
+EShMessages DeriveOptions(Source source, Semantics semantics, Target target)
+{
+ EShMessages result = EShMsgDefault;
+
+ switch (source) {
+ case Source::GLSL:
+ break;
+ case Source::HLSL:
+ result = EShMsgReadHlsl;
+ break;
+ }
+
+ switch (target) {
+ case Target::AST:
+ result = static_cast<EShMessages>(result | EShMsgAST);
+ break;
+ case Target::Spv:
+ result = static_cast<EShMessages>(result | EShMsgSpvRules);
+ break;
+ case Target::BothASTAndSpv:
+ result = static_cast<EShMessages>(result | EShMsgSpvRules | EShMsgAST);
+ break;
+ };
+
+ switch (semantics) {
+ case Semantics::OpenGL:
+ break;
+ case Semantics::Vulkan:
+ result = static_cast<EShMessages>(result | EShMsgVulkanRules | EShMsgSpvRules);
+ break;
+ }
+
+ return result;
+}
+
+std::pair<bool, std::string> ReadFile(const std::string& path)
+{
+ std::ifstream fstream(path, std::ios::in);
+ if (fstream) {
+ std::string contents;
+ fstream.seekg(0, std::ios::end);
+ contents.reserve(fstream.tellg());
+ fstream.seekg(0, std::ios::beg);
+ contents.assign((std::istreambuf_iterator<char>(fstream)),
+ std::istreambuf_iterator<char>());
+ return std::make_pair(true, contents);
+ }
+ return std::make_pair(false, "");
+}
+
+bool WriteFile(const std::string& path, const std::string& contents)
+{
+ std::ofstream fstream(path, std::ios::out);
+ if (!fstream) return false;
+ fstream << contents;
+ fstream.flush();
+ return true;
+}
+
+std::string GetSuffix(const std::string& name)
+{
+ const size_t pos = name.rfind('.');
+ return (pos == std::string::npos) ? "" : name.substr(name.rfind('.') + 1);
+}
+
+} // namespace glslangtest
diff --git a/chromium/third_party/glslang/src/gtests/TestFixture.h b/chromium/third_party/glslang/src/gtests/TestFixture.h
new file mode 100644
index 00000000000..e71bab1c4c2
--- /dev/null
+++ b/chromium/third_party/glslang/src/gtests/TestFixture.h
@@ -0,0 +1,341 @@
+//
+// Copyright (C) 2016 Google, 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:
+//
+// Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 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.
+//
+// Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived
+// from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "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 THE
+// COPYRIGHT HOLDERS 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.
+
+#ifndef GLSLANG_GTESTS_TEST_FIXTURE_H
+#define GLSLANG_GTESTS_TEST_FIXTURE_H
+
+#include <stdint.h>
+#include <fstream>
+#include <sstream>
+#include <streambuf>
+#include <tuple>
+
+#include <gtest/gtest.h>
+
+#include "SPIRV/GlslangToSpv.h"
+#include "SPIRV/disassemble.h"
+#include "SPIRV/doc.h"
+#include "StandAlone/ResourceLimits.h"
+#include "glslang/Public/ShaderLang.h"
+
+#include "Initializer.h"
+#include "Settings.h"
+
+// We need CMake to provide us the absolute path to the directory containing
+// test files, so we are certain to find those files no matter where the test
+// harness binary is generated. This provides out-of-source build capability.
+#ifndef GLSLANG_TEST_DIRECTORY
+#error \
+ "GLSLANG_TEST_DIRECTORY needs to be defined for gtest to locate test files."
+#endif
+
+namespace glslangtest {
+
+// This function is used to provide custom test name suffixes based on the
+// shader source file names. Otherwise, the test name suffixes will just be
+// numbers, which are not quite obvious.
+std::string FileNameAsCustomTestSuffix(
+ const ::testing::TestParamInfo<std::string>& info);
+
+enum class Source {
+ GLSL,
+ HLSL,
+};
+
+// Enum for shader compilation semantics.
+enum class Semantics {
+ OpenGL,
+ Vulkan,
+};
+
+// Enum for compilation target.
+enum class Target {
+ AST,
+ Spv,
+ BothASTAndSpv,
+};
+
+EShLanguage GetShaderStage(const std::string& stage);
+
+EShMessages DeriveOptions(Source, Semantics, Target);
+
+// Reads the content of the file at the given |path|. On success, returns true
+// and the contents; otherwise, returns false and an empty string.
+std::pair<bool, std::string> ReadFile(const std::string& path);
+
+// Writes the given |contents| into the file at the given |path|. Returns true
+// on successful output.
+bool WriteFile(const std::string& path, const std::string& contents);
+
+// Returns the suffix of the given |name|.
+std::string GetSuffix(const std::string& name);
+
+// Base class for glslang integration tests. It contains many handy utility-like
+// methods such as reading shader source files, compiling into AST/SPIR-V, and
+// comparing with expected outputs.
+//
+// To write value-Parameterized tests:
+// using ValueParamTest = GlslangTest<::testing::TestWithParam<std::string>>;
+// To use as normal fixture:
+// using FixtureTest = GlslangTest<::testing::Test>;
+template <typename GT>
+class GlslangTest : public GT {
+public:
+ GlslangTest()
+ : defaultVersion(100),
+ defaultProfile(ENoProfile),
+ forceVersionProfile(false),
+ isForwardCompatible(false) {}
+
+ // Tries to load the contents from the file at the given |path|. On success,
+ // writes the contents into |contents|. On failure, errors out.
+ void tryLoadFile(const std::string& path, const std::string& tag,
+ std::string* contents)
+ {
+ bool fileReadOk;
+ std::tie(fileReadOk, *contents) = ReadFile(path);
+ ASSERT_TRUE(fileReadOk) << "Cannot open " << tag << " file: " << path;
+ }
+
+ // Checks the equality of |expected| and |real|. If they are not equal,
+ // write |real| to the given file named as |fname| if update mode is on.
+ void checkEqAndUpdateIfRequested(const std::string& expected,
+ const std::string& real,
+ const std::string& fname)
+ {
+ // In order to output the message we want under proper circumstances,
+ // we need the following operator<< stuff.
+ EXPECT_EQ(expected, real)
+ << (GlobalTestSettings.updateMode
+ ? ("Mismatch found and update mode turned on - "
+ "flushing expected result output.")
+ : "");
+
+ // Update the expected output file if requested.
+ // It looks weird to duplicate the comparison between expected_output
+ // and stream.str(). However, if creating a variable for the comparison
+ // result, we cannot have pretty print of the string diff in the above.
+ if (GlobalTestSettings.updateMode && expected != real) {
+ EXPECT_TRUE(WriteFile(fname, real)) << "Flushing failed";
+ }
+ }
+
+ struct ShaderResult {
+ std::string shaderName;
+ std::string output;
+ std::string error;
+ };
+
+ // A struct for holding all the information returned by glslang compilation
+ // and linking.
+ struct GlslangResult {
+ std::vector<ShaderResult> shaderResults;
+ std::string linkingOutput;
+ std::string linkingError;
+ std::string spirvWarningsErrors;
+ std::string spirv; // Optional SPIR-V disassembly text.
+ };
+
+ // Compiles and the given source |code| of the given shader |stage| into
+ // the target under the semantics conveyed via |controls|. Returns true
+ // and modifies |shader| on success.
+ bool compile(glslang::TShader* shader, const std::string& code,
+ const std::string& entryPointName, EShMessages controls,
+ const TBuiltInResource* resources=nullptr)
+ {
+ const char* shaderStrings = code.data();
+ const int shaderLengths = static_cast<int>(code.size());
+
+ shader->setStringsWithLengths(&shaderStrings, &shaderLengths, 1);
+ if (!entryPointName.empty()) shader->setEntryPoint(entryPointName.c_str());
+ // Reinitialize glslang if the semantics change.
+ GlslangInitializer::InitializationToken token =
+ GlobalTestSettings.initializer->acquire(controls);
+ return shader->parse(
+ (resources ? resources : &glslang::DefaultTBuiltInResource),
+ defaultVersion, isForwardCompatible, controls);
+ }
+
+ // Compiles and links the given source |code| of the given shader
+ // |stage| into the target under the semantics specified via |controls|.
+ // Returns a GlslangResult instance containing all the information generated
+ // during the process. If the target includes SPIR-V, also disassembles
+ // the result and returns disassembly text.
+ GlslangResult compileAndLink(
+ const std::string shaderName, const std::string& code,
+ const std::string& entryPointName, EShMessages controls)
+ {
+ const EShLanguage kind = GetShaderStage(GetSuffix(shaderName));
+
+ glslang::TShader shader(kind);
+ bool success = compile(&shader, code, entryPointName, controls);
+
+ glslang::TProgram program;
+ program.addShader(&shader);
+ success &= program.link(controls);
+
+ spv::SpvBuildLogger logger;
+
+ if (success && (controls & EShMsgSpvRules)) {
+ std::vector<uint32_t> spirv_binary;
+ glslang::GlslangToSpv(*program.getIntermediate(kind),
+ spirv_binary, &logger);
+
+ std::ostringstream disassembly_stream;
+ spv::Parameterize();
+ spv::Disassemble(disassembly_stream, spirv_binary);
+ return {{{shaderName, shader.getInfoLog(), shader.getInfoDebugLog()},},
+ program.getInfoLog(), program.getInfoDebugLog(),
+ logger.getAllMessages(), disassembly_stream.str()};
+ } else {
+ return {{{shaderName, shader.getInfoLog(), shader.getInfoDebugLog()},},
+ program.getInfoLog(), program.getInfoDebugLog(), "", ""};
+ }
+ }
+
+ void outputResultToStream(std::ostringstream* stream,
+ const GlslangResult& result,
+ EShMessages controls)
+ {
+ const auto outputIfNotEmpty = [&stream](const std::string& str) {
+ if (!str.empty()) *stream << str << "\n";
+ };
+
+ for (const auto& shaderResult : result.shaderResults) {
+ *stream << shaderResult.shaderName << "\n";
+ outputIfNotEmpty(shaderResult.output);
+ outputIfNotEmpty(shaderResult.error);
+ }
+ outputIfNotEmpty(result.linkingOutput);
+ outputIfNotEmpty(result.linkingError);
+ *stream << result.spirvWarningsErrors;
+
+ if (controls & EShMsgSpvRules) {
+ *stream
+ << (result.spirv.empty()
+ ? "SPIR-V is not generated for failed compile or link\n"
+ : result.spirv);
+ }
+ }
+
+ void loadFileCompileAndCheck(const std::string& testDir,
+ const std::string& testName,
+ Source source,
+ Semantics semantics,
+ Target target,
+ const std::string& entryPointName="")
+ {
+ const std::string inputFname = testDir + "/" + testName;
+ const std::string expectedOutputFname =
+ testDir + "/baseResults/" + testName + ".out";
+ std::string input, expectedOutput;
+
+ tryLoadFile(inputFname, "input", &input);
+ tryLoadFile(expectedOutputFname, "expected output", &expectedOutput);
+
+ const EShMessages controls = DeriveOptions(source, semantics, target);
+ GlslangResult result =
+ compileAndLink(testName, input, entryPointName, controls);
+
+ // Generate the hybrid output in the way of glslangValidator.
+ std::ostringstream stream;
+ outputResultToStream(&stream, result, controls);
+
+ checkEqAndUpdateIfRequested(expectedOutput, stream.str(),
+ expectedOutputFname);
+ }
+
+ // Preprocesses the given |source| code. On success, returns true, the
+ // preprocessed shader, and warning messages. Otherwise, returns false, an
+ // empty string, and error messages.
+ std::tuple<bool, std::string, std::string> preprocess(
+ const std::string& source)
+ {
+ const char* shaderStrings = source.data();
+ const int shaderLengths = static_cast<int>(source.size());
+
+ glslang::TShader shader(EShLangVertex);
+ shader.setStringsWithLengths(&shaderStrings, &shaderLengths, 1);
+ std::string ppShader;
+ glslang::TShader::ForbidInclude includer;
+ const bool success = shader.preprocess(
+ &glslang::DefaultTBuiltInResource, defaultVersion, defaultProfile,
+ forceVersionProfile, isForwardCompatible, EShMsgOnlyPreprocessor,
+ &ppShader, includer);
+
+ std::string log = shader.getInfoLog();
+ log += shader.getInfoDebugLog();
+ if (success) {
+ return std::make_tuple(true, ppShader, log);
+ } else {
+ return std::make_tuple(false, "", log);
+ }
+ }
+
+ void loadFilePreprocessAndCheck(const std::string& testDir,
+ const std::string& testName)
+ {
+ const std::string inputFname = testDir + "/" + testName;
+ const std::string expectedOutputFname =
+ testDir + "/baseResults/" + testName + ".out";
+ const std::string expectedErrorFname =
+ testDir + "/baseResults/" + testName + ".err";
+ std::string input, expectedOutput, expectedError;
+
+ tryLoadFile(inputFname, "input", &input);
+ tryLoadFile(expectedOutputFname, "expected output", &expectedOutput);
+ tryLoadFile(expectedErrorFname, "expected error", &expectedError);
+
+ bool ppOk;
+ std::string output, error;
+ std::tie(ppOk, output, error) = preprocess(input);
+ if (!output.empty()) output += '\n';
+ if (!error.empty()) error += '\n';
+
+ checkEqAndUpdateIfRequested(expectedOutput, output,
+ expectedOutputFname);
+ checkEqAndUpdateIfRequested(expectedError, error,
+ expectedErrorFname);
+ }
+
+private:
+ const int defaultVersion;
+ const EProfile defaultProfile;
+ const bool forceVersionProfile;
+ const bool isForwardCompatible;
+};
+
+} // namespace glslangtest
+
+#endif // GLSLANG_GTESTS_TEST_FIXTURE_H
diff --git a/chromium/third_party/glslang/src/gtests/main.cpp b/chromium/third_party/glslang/src/gtests/main.cpp
new file mode 100644
index 00000000000..b9806aa255f
--- /dev/null
+++ b/chromium/third_party/glslang/src/gtests/main.cpp
@@ -0,0 +1,63 @@
+//
+// Copyright (C) 2016 Google, 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:
+//
+// Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 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.
+//
+// Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived
+// from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "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 THE
+// COPYRIGHT HOLDERS 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.
+
+#include <memory>
+
+#include <gtest/gtest.h>
+
+#include "Initializer.h"
+#include "Settings.h"
+
+int main(int argc, char** argv)
+{
+ ::testing::InitGoogleTest(&argc, argv);
+
+ std::unique_ptr<glslangtest::GlslangInitializer> initializer(
+ new glslangtest::GlslangInitializer);
+
+ glslangtest::GlobalTestSettings.initializer = initializer.get();
+
+ for (int i = 1; i < argc; ++i) {
+ if (!strncmp("--update-mode", argv[i], 13)) {
+ glslangtest::GlobalTestSettings.updateMode = true;
+ break;
+ }
+ }
+
+ const int result = RUN_ALL_TESTS();
+
+ glslangtest::GlobalTestSettings.initializer = nullptr;
+
+ return result;
+}
diff --git a/chromium/third_party/glslang/src/hlsl/CMakeLists.txt b/chromium/third_party/glslang/src/hlsl/CMakeLists.txt
new file mode 100755
index 00000000000..c7537e27126
--- /dev/null
+++ b/chromium/third_party/glslang/src/hlsl/CMakeLists.txt
@@ -0,0 +1,26 @@
+set(SOURCES
+ hlslParseHelper.cpp
+ hlslScanContext.cpp
+ hlslOpMap.cpp
+ hlslTokenStream.cpp
+ hlslGrammar.cpp
+ hlslParseables.cpp)
+
+set(HEADERS
+ hlslParseHelper.h
+ hlslTokens.h
+ hlslScanContext.h
+ hlslOpMap.h
+ hlslTokenStream.h
+ hlslGrammar.h
+ hlslParseables.h)
+
+add_library(HLSL STATIC ${SOURCES} ${HEADERS})
+set_property(TARGET HLSL PROPERTY FOLDER hlsl)
+
+if(WIN32)
+ source_group("Source" FILES ${SOURCES} ${HEADERS})
+endif(WIN32)
+
+install(TARGETS HLSL
+ ARCHIVE DESTINATION lib)
diff --git a/chromium/third_party/glslang/src/hlsl/hlslGrammar.cpp b/chromium/third_party/glslang/src/hlsl/hlslGrammar.cpp
new file mode 100755
index 00000000000..c0d4f285734
--- /dev/null
+++ b/chromium/third_party/glslang/src/hlsl/hlslGrammar.cpp
@@ -0,0 +1,1684 @@
+//
+//Copyright (C) 2016 Google, 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:
+//
+// Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 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.
+//
+// Neither the name of Google, Inc., nor the names of its
+// contributors may be used to endorse or promote products derived
+// from this software without specific prior written permission.
+//
+//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+//"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 THE
+//COPYRIGHT HOLDERS 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.
+//
+
+//
+// This is a set of mutually recursive methods implementing the HLSL grammar.
+// Generally, each returns
+// - through an argument: a type specifically appropriate to which rule it
+// recognized
+// - through the return value: true/false to indicate whether or not it
+// recognized its rule
+//
+// As much as possible, only grammar recognition should happen in this file,
+// with all other work being farmed out to hlslParseHelper.cpp, which in turn
+// will build the AST.
+//
+// The next token, yet to be "accepted" is always sitting in 'token'.
+// When a method says it accepts a rule, that means all tokens involved
+// in the rule will have been consumed, and none left in 'token'.
+//
+
+#include "hlslTokens.h"
+#include "hlslGrammar.h"
+
+namespace glslang {
+
+// Root entry point to this recursive decent parser.
+// Return true if compilation unit was successfully accepted.
+bool HlslGrammar::parse()
+{
+ advanceToken();
+ return acceptCompilationUnit();
+}
+
+void HlslGrammar::expected(const char* syntax)
+{
+ parseContext.error(token.loc, "Expected", syntax, "");
+}
+
+// Only process the next token if it is an identifier.
+// Return true if it was an identifier.
+bool HlslGrammar::acceptIdentifier(HlslToken& idToken)
+{
+ if (peekTokenClass(EHTokIdentifier)) {
+ idToken = token;
+ advanceToken();
+ return true;
+ }
+
+ return false;
+}
+
+// compilationUnit
+// : list of externalDeclaration
+//
+bool HlslGrammar::acceptCompilationUnit()
+{
+ TIntermNode* unitNode = nullptr;
+
+ while (! peekTokenClass(EHTokNone)) {
+ // externalDeclaration
+ TIntermNode* declarationNode;
+ if (! acceptDeclaration(declarationNode))
+ return false;
+
+ // hook it up
+ unitNode = intermediate.growAggregate(unitNode, declarationNode);
+ }
+
+ // set root of AST
+ intermediate.setTreeRoot(unitNode);
+
+ return true;
+}
+
+// declaration
+// : SEMICOLON
+// : fully_specified_type SEMICOLON
+// | fully_specified_type identifier post_decls SEMICOLON
+// | fully_specified_type identifier post_decls = expression SEMICOLON
+// | fully_specified_type identifier function_parameters post_decls SEMICOLON // function prototype
+// | fully_specified_type identifier function_parameters post_decls compound_statement // function definition
+//
+// 'node' could get created if the declaration creates code, like an initializer
+// or a function body.
+//
+bool HlslGrammar::acceptDeclaration(TIntermNode*& node)
+{
+ node = nullptr;
+
+ // fully_specified_type
+ TType type;
+ if (! acceptFullySpecifiedType(type))
+ return false;
+
+ // identifier
+ HlslToken idToken;
+ if (acceptIdentifier(idToken)) {
+ acceptPostDecls(type);
+ // = expression
+ TIntermTyped* expressionNode = nullptr;
+ if (acceptTokenClass(EHTokAssign)) {
+ if (! acceptExpression(expressionNode)) {
+ expected("initializer");
+ return false;
+ }
+ }
+
+ // SEMICOLON
+ if (acceptTokenClass(EHTokSemicolon)) {
+ node = parseContext.declareVariable(idToken.loc, *idToken.string, type, 0, expressionNode);
+ return true;
+ }
+
+ // function_parameters
+ TFunction* function = new TFunction(idToken.string, type);
+ if (acceptFunctionParameters(*function)) {
+ // post_decls
+ acceptPostDecls(type);
+
+ // compound_statement
+ if (peekTokenClass(EHTokLeftBrace))
+ return acceptFunctionDefinition(*function, node);
+
+ // SEMICOLON
+ if (acceptTokenClass(EHTokSemicolon))
+ return true;
+
+ return false;
+ }
+ }
+
+ // SEMICOLON
+ if (acceptTokenClass(EHTokSemicolon))
+ return true;
+
+ return true;
+}
+
+// fully_specified_type
+// : type_specifier
+// | type_qualifier type_specifier
+//
+bool HlslGrammar::acceptFullySpecifiedType(TType& type)
+{
+ // type_qualifier
+ TQualifier qualifier;
+ qualifier.clear();
+ acceptQualifier(qualifier);
+
+ // type_specifier
+ if (! acceptType(type))
+ return false;
+ type.getQualifier() = qualifier;
+
+ return true;
+}
+
+// type_qualifier
+// : qualifier qualifier ...
+//
+// Zero or more of these, so this can't return false.
+//
+void HlslGrammar::acceptQualifier(TQualifier& qualifier)
+{
+ do {
+ switch (peek()) {
+ case EHTokStatic:
+ // normal glslang default
+ break;
+ case EHTokExtern:
+ // TODO: no meaning in glslang?
+ break;
+ case EHTokShared:
+ // TODO: hint
+ break;
+ case EHTokGroupShared:
+ qualifier.storage = EvqShared;
+ break;
+ case EHTokUniform:
+ qualifier.storage = EvqUniform;
+ break;
+ case EHTokConst:
+ qualifier.storage = EvqConst;
+ break;
+ case EHTokVolatile:
+ qualifier.volatil = true;
+ break;
+ case EHTokLinear:
+ qualifier.storage = EvqVaryingIn;
+ qualifier.smooth = true;
+ break;
+ case EHTokCentroid:
+ qualifier.centroid = true;
+ break;
+ case EHTokNointerpolation:
+ qualifier.flat = true;
+ break;
+ case EHTokNoperspective:
+ qualifier.nopersp = true;
+ break;
+ case EHTokSample:
+ qualifier.sample = true;
+ break;
+ case EHTokRowMajor:
+ qualifier.layoutMatrix = ElmRowMajor;
+ break;
+ case EHTokColumnMajor:
+ qualifier.layoutMatrix = ElmColumnMajor;
+ break;
+ case EHTokPrecise:
+ qualifier.noContraction = true;
+ break;
+ default:
+ return;
+ }
+ advanceToken();
+ } while (true);
+}
+
+// If token is for a type, update 'type' with the type information,
+// and return true and advance.
+// Otherwise, return false, and don't advance
+bool HlslGrammar::acceptType(TType& type)
+{
+ switch (peek()) {
+ case EHTokStruct:
+ return acceptStruct(type);
+ break;
+
+ case EHTokIdentifier:
+ // An identifier could be for a user-defined type.
+ // Note we cache the symbol table lookup, to save for a later rule
+ // when this is not a type.
+ token.symbol = parseContext.symbolTable.find(*token.string);
+ if (token.symbol && token.symbol->getAsVariable() && token.symbol->getAsVariable()->isUserType()) {
+ type.shallowCopy(token.symbol->getType());
+ advanceToken();
+ return true;
+ } else
+ return false;
+
+ case EHTokVoid:
+ new(&type) TType(EbtVoid);
+ break;
+
+ case EHTokFloat:
+ new(&type) TType(EbtFloat);
+ break;
+ case EHTokFloat1:
+ new(&type) TType(EbtFloat);
+ type.makeVector();
+ break;
+ case EHTokFloat2:
+ new(&type) TType(EbtFloat, EvqTemporary, 2);
+ break;
+ case EHTokFloat3:
+ new(&type) TType(EbtFloat, EvqTemporary, 3);
+ break;
+ case EHTokFloat4:
+ new(&type) TType(EbtFloat, EvqTemporary, 4);
+ break;
+
+ case EHTokDouble:
+ new(&type) TType(EbtDouble);
+ break;
+ case EHTokDouble1:
+ new(&type) TType(EbtDouble);
+ type.makeVector();
+ break;
+ case EHTokDouble2:
+ new(&type) TType(EbtDouble, EvqTemporary, 2);
+ break;
+ case EHTokDouble3:
+ new(&type) TType(EbtDouble, EvqTemporary, 3);
+ break;
+ case EHTokDouble4:
+ new(&type) TType(EbtDouble, EvqTemporary, 4);
+ break;
+
+ case EHTokInt:
+ case EHTokDword:
+ new(&type) TType(EbtInt);
+ break;
+ case EHTokInt1:
+ new(&type) TType(EbtInt);
+ type.makeVector();
+ break;
+ case EHTokInt2:
+ new(&type) TType(EbtInt, EvqTemporary, 2);
+ break;
+ case EHTokInt3:
+ new(&type) TType(EbtInt, EvqTemporary, 3);
+ break;
+ case EHTokInt4:
+ new(&type) TType(EbtInt, EvqTemporary, 4);
+ break;
+
+ case EHTokUint:
+ new(&type) TType(EbtUint);
+ break;
+ case EHTokUint1:
+ new(&type) TType(EbtUint);
+ type.makeVector();
+ break;
+ case EHTokUint2:
+ new(&type) TType(EbtUint, EvqTemporary, 2);
+ break;
+ case EHTokUint3:
+ new(&type) TType(EbtUint, EvqTemporary, 3);
+ break;
+ case EHTokUint4:
+ new(&type) TType(EbtUint, EvqTemporary, 4);
+ break;
+
+ case EHTokBool:
+ new(&type) TType(EbtBool);
+ break;
+ case EHTokBool1:
+ new(&type) TType(EbtBool);
+ type.makeVector();
+ break;
+ case EHTokBool2:
+ new(&type) TType(EbtBool, EvqTemporary, 2);
+ break;
+ case EHTokBool3:
+ new(&type) TType(EbtBool, EvqTemporary, 3);
+ break;
+ case EHTokBool4:
+ new(&type) TType(EbtBool, EvqTemporary, 4);
+ break;
+
+ case EHTokInt1x1:
+ new(&type) TType(EbtInt, EvqTemporary, 0, 1, 1);
+ break;
+ case EHTokInt1x2:
+ new(&type) TType(EbtInt, EvqTemporary, 0, 2, 1);
+ break;
+ case EHTokInt1x3:
+ new(&type) TType(EbtInt, EvqTemporary, 0, 3, 1);
+ break;
+ case EHTokInt1x4:
+ new(&type) TType(EbtInt, EvqTemporary, 0, 4, 1);
+ break;
+ case EHTokInt2x1:
+ new(&type) TType(EbtInt, EvqTemporary, 0, 1, 2);
+ break;
+ case EHTokInt2x2:
+ new(&type) TType(EbtInt, EvqTemporary, 0, 2, 2);
+ break;
+ case EHTokInt2x3:
+ new(&type) TType(EbtInt, EvqTemporary, 0, 3, 2);
+ break;
+ case EHTokInt2x4:
+ new(&type) TType(EbtInt, EvqTemporary, 0, 4, 2);
+ break;
+ case EHTokInt3x1:
+ new(&type) TType(EbtInt, EvqTemporary, 0, 1, 3);
+ break;
+ case EHTokInt3x2:
+ new(&type) TType(EbtInt, EvqTemporary, 0, 2, 3);
+ break;
+ case EHTokInt3x3:
+ new(&type) TType(EbtInt, EvqTemporary, 0, 3, 3);
+ break;
+ case EHTokInt3x4:
+ new(&type) TType(EbtInt, EvqTemporary, 0, 4, 3);
+ break;
+ case EHTokInt4x1:
+ new(&type) TType(EbtInt, EvqTemporary, 0, 1, 4);
+ break;
+ case EHTokInt4x2:
+ new(&type) TType(EbtInt, EvqTemporary, 0, 2, 4);
+ break;
+ case EHTokInt4x3:
+ new(&type) TType(EbtInt, EvqTemporary, 0, 3, 4);
+ break;
+ case EHTokInt4x4:
+ new(&type) TType(EbtInt, EvqTemporary, 0, 4, 4);
+ break;
+
+ case EHTokUint1x1:
+ new(&type) TType(EbtUint, EvqTemporary, 0, 1, 1);
+ break;
+ case EHTokUint1x2:
+ new(&type) TType(EbtUint, EvqTemporary, 0, 2, 1);
+ break;
+ case EHTokUint1x3:
+ new(&type) TType(EbtUint, EvqTemporary, 0, 3, 1);
+ break;
+ case EHTokUint1x4:
+ new(&type) TType(EbtUint, EvqTemporary, 0, 4, 1);
+ break;
+ case EHTokUint2x1:
+ new(&type) TType(EbtUint, EvqTemporary, 0, 1, 2);
+ break;
+ case EHTokUint2x2:
+ new(&type) TType(EbtUint, EvqTemporary, 0, 2, 2);
+ break;
+ case EHTokUint2x3:
+ new(&type) TType(EbtUint, EvqTemporary, 0, 3, 2);
+ break;
+ case EHTokUint2x4:
+ new(&type) TType(EbtUint, EvqTemporary, 0, 4, 2);
+ break;
+ case EHTokUint3x1:
+ new(&type) TType(EbtUint, EvqTemporary, 0, 1, 3);
+ break;
+ case EHTokUint3x2:
+ new(&type) TType(EbtUint, EvqTemporary, 0, 2, 3);
+ break;
+ case EHTokUint3x3:
+ new(&type) TType(EbtUint, EvqTemporary, 0, 3, 3);
+ break;
+ case EHTokUint3x4:
+ new(&type) TType(EbtUint, EvqTemporary, 0, 4, 3);
+ break;
+ case EHTokUint4x1:
+ new(&type) TType(EbtUint, EvqTemporary, 0, 1, 4);
+ break;
+ case EHTokUint4x2:
+ new(&type) TType(EbtUint, EvqTemporary, 0, 2, 4);
+ break;
+ case EHTokUint4x3:
+ new(&type) TType(EbtUint, EvqTemporary, 0, 3, 4);
+ break;
+ case EHTokUint4x4:
+ new(&type) TType(EbtUint, EvqTemporary, 0, 4, 4);
+ break;
+
+ case EHTokBool1x1:
+ new(&type) TType(EbtBool, EvqTemporary, 0, 1, 1);
+ break;
+ case EHTokBool1x2:
+ new(&type) TType(EbtBool, EvqTemporary, 0, 2, 1);
+ break;
+ case EHTokBool1x3:
+ new(&type) TType(EbtBool, EvqTemporary, 0, 3, 1);
+ break;
+ case EHTokBool1x4:
+ new(&type) TType(EbtBool, EvqTemporary, 0, 4, 1);
+ break;
+ case EHTokBool2x1:
+ new(&type) TType(EbtBool, EvqTemporary, 0, 1, 2);
+ break;
+ case EHTokBool2x2:
+ new(&type) TType(EbtBool, EvqTemporary, 0, 2, 2);
+ break;
+ case EHTokBool2x3:
+ new(&type) TType(EbtBool, EvqTemporary, 0, 3, 2);
+ break;
+ case EHTokBool2x4:
+ new(&type) TType(EbtBool, EvqTemporary, 0, 4, 2);
+ break;
+ case EHTokBool3x1:
+ new(&type) TType(EbtBool, EvqTemporary, 0, 1, 3);
+ break;
+ case EHTokBool3x2:
+ new(&type) TType(EbtBool, EvqTemporary, 0, 2, 3);
+ break;
+ case EHTokBool3x3:
+ new(&type) TType(EbtBool, EvqTemporary, 0, 3, 3);
+ break;
+ case EHTokBool3x4:
+ new(&type) TType(EbtBool, EvqTemporary, 0, 4, 3);
+ break;
+ case EHTokBool4x1:
+ new(&type) TType(EbtBool, EvqTemporary, 0, 1, 4);
+ break;
+ case EHTokBool4x2:
+ new(&type) TType(EbtBool, EvqTemporary, 0, 2, 4);
+ break;
+ case EHTokBool4x3:
+ new(&type) TType(EbtBool, EvqTemporary, 0, 3, 4);
+ break;
+ case EHTokBool4x4:
+ new(&type) TType(EbtBool, EvqTemporary, 0, 4, 4);
+ break;
+
+ case EHTokFloat1x1:
+ new(&type) TType(EbtFloat, EvqTemporary, 0, 1, 1);
+ break;
+ case EHTokFloat1x2:
+ new(&type) TType(EbtFloat, EvqTemporary, 0, 2, 1);
+ break;
+ case EHTokFloat1x3:
+ new(&type) TType(EbtFloat, EvqTemporary, 0, 3, 1);
+ break;
+ case EHTokFloat1x4:
+ new(&type) TType(EbtFloat, EvqTemporary, 0, 4, 1);
+ break;
+ case EHTokFloat2x1:
+ new(&type) TType(EbtFloat, EvqTemporary, 0, 1, 2);
+ break;
+ case EHTokFloat2x2:
+ new(&type) TType(EbtFloat, EvqTemporary, 0, 2, 2);
+ break;
+ case EHTokFloat2x3:
+ new(&type) TType(EbtFloat, EvqTemporary, 0, 3, 2);
+ break;
+ case EHTokFloat2x4:
+ new(&type) TType(EbtFloat, EvqTemporary, 0, 4, 2);
+ break;
+ case EHTokFloat3x1:
+ new(&type) TType(EbtFloat, EvqTemporary, 0, 1, 3);
+ break;
+ case EHTokFloat3x2:
+ new(&type) TType(EbtFloat, EvqTemporary, 0, 2, 3);
+ break;
+ case EHTokFloat3x3:
+ new(&type) TType(EbtFloat, EvqTemporary, 0, 3, 3);
+ break;
+ case EHTokFloat3x4:
+ new(&type) TType(EbtFloat, EvqTemporary, 0, 4, 3);
+ break;
+ case EHTokFloat4x1:
+ new(&type) TType(EbtFloat, EvqTemporary, 0, 1, 4);
+ break;
+ case EHTokFloat4x2:
+ new(&type) TType(EbtFloat, EvqTemporary, 0, 2, 4);
+ break;
+ case EHTokFloat4x3:
+ new(&type) TType(EbtFloat, EvqTemporary, 0, 3, 4);
+ break;
+ case EHTokFloat4x4:
+ new(&type) TType(EbtFloat, EvqTemporary, 0, 4, 4);
+ break;
+
+ case EHTokDouble1x1:
+ new(&type) TType(EbtDouble, EvqTemporary, 0, 1, 1);
+ break;
+ case EHTokDouble1x2:
+ new(&type) TType(EbtDouble, EvqTemporary, 0, 2, 1);
+ break;
+ case EHTokDouble1x3:
+ new(&type) TType(EbtDouble, EvqTemporary, 0, 3, 1);
+ break;
+ case EHTokDouble1x4:
+ new(&type) TType(EbtDouble, EvqTemporary, 0, 4, 1);
+ break;
+ case EHTokDouble2x1:
+ new(&type) TType(EbtDouble, EvqTemporary, 0, 1, 2);
+ break;
+ case EHTokDouble2x2:
+ new(&type) TType(EbtDouble, EvqTemporary, 0, 2, 2);
+ break;
+ case EHTokDouble2x3:
+ new(&type) TType(EbtDouble, EvqTemporary, 0, 3, 2);
+ break;
+ case EHTokDouble2x4:
+ new(&type) TType(EbtDouble, EvqTemporary, 0, 4, 2);
+ break;
+ case EHTokDouble3x1:
+ new(&type) TType(EbtDouble, EvqTemporary, 0, 1, 3);
+ break;
+ case EHTokDouble3x2:
+ new(&type) TType(EbtDouble, EvqTemporary, 0, 2, 3);
+ break;
+ case EHTokDouble3x3:
+ new(&type) TType(EbtDouble, EvqTemporary, 0, 3, 3);
+ break;
+ case EHTokDouble3x4:
+ new(&type) TType(EbtDouble, EvqTemporary, 0, 4, 3);
+ break;
+ case EHTokDouble4x1:
+ new(&type) TType(EbtDouble, EvqTemporary, 0, 1, 4);
+ break;
+ case EHTokDouble4x2:
+ new(&type) TType(EbtDouble, EvqTemporary, 0, 2, 4);
+ break;
+ case EHTokDouble4x3:
+ new(&type) TType(EbtDouble, EvqTemporary, 0, 3, 4);
+ break;
+ case EHTokDouble4x4:
+ new(&type) TType(EbtDouble, EvqTemporary, 0, 4, 4);
+ break;
+
+ default:
+ return false;
+ }
+
+ advanceToken();
+
+ return true;
+}
+
+// struct
+// : STRUCT IDENTIFIER LEFT_BRACE struct_declaration_list RIGHT_BRACE
+// | STRUCT LEFT_BRACE struct_declaration_list RIGHT_BRACE
+//
+bool HlslGrammar::acceptStruct(TType& type)
+{
+ // STRUCT
+ if (! acceptTokenClass(EHTokStruct))
+ return false;
+
+ // IDENTIFIER
+ TString structName = "";
+ if (peekTokenClass(EHTokIdentifier)) {
+ structName = *token.string;
+ advanceToken();
+ }
+
+ // LEFT_BRACE
+ if (! acceptTokenClass(EHTokLeftBrace)) {
+ expected("{");
+ return false;
+ }
+
+ // struct_declaration_list
+ TTypeList* typeList;
+ if (! acceptStructDeclarationList(typeList)) {
+ expected("struct member declarations");
+ return false;
+ }
+
+ // RIGHT_BRACE
+ if (! acceptTokenClass(EHTokRightBrace)) {
+ expected("}");
+ return false;
+ }
+
+ // create the user-defined type
+ new(&type) TType(typeList, structName);
+
+ // If it was named, which means it can be reused later, add
+ // it to the symbol table.
+ if (structName.size() > 0) {
+ TVariable* userTypeDef = new TVariable(&structName, type, true);
+ if (! parseContext.symbolTable.insert(*userTypeDef))
+ parseContext.error(token.loc, "redefinition", structName.c_str(), "struct");
+ }
+
+ return true;
+}
+
+// struct_declaration_list
+// : struct_declaration SEMI_COLON struct_declaration SEMI_COLON ...
+//
+// struct_declaration
+// : fully_specified_type struct_declarator COMMA struct_declarator ...
+//
+// struct_declarator
+// : IDENTIFIER post_decls
+// | IDENTIFIER array_specifier post_decls
+//
+bool HlslGrammar::acceptStructDeclarationList(TTypeList*& typeList)
+{
+ typeList = new TTypeList();
+
+ do {
+ // success on seeing the RIGHT_BRACE coming up
+ if (peekTokenClass(EHTokRightBrace))
+ return true;
+
+ // struct_declaration
+
+ // fully_specified_type
+ TType memberType;
+ if (! acceptFullySpecifiedType(memberType)) {
+ expected("member type");
+ return false;
+ }
+
+ // struct_declarator COMMA struct_declarator ...
+ do {
+ // peek IDENTIFIER
+ if (! peekTokenClass(EHTokIdentifier)) {
+ expected("member name");
+ return false;
+ }
+
+ // add it to the list of members
+ TTypeLoc member = { new TType(EbtVoid), token.loc };
+ member.type->shallowCopy(memberType);
+ member.type->setFieldName(*token.string);
+ typeList->push_back(member);
+
+ // accept IDENTIFIER
+ advanceToken();
+
+ // array_specifier
+ // TODO
+
+ acceptPostDecls(*member.type);
+
+ // success on seeing the SEMICOLON coming up
+ if (peekTokenClass(EHTokSemicolon))
+ break;
+
+ // COMMA
+ if (! acceptTokenClass(EHTokComma)) {
+ expected(",");
+ return false;
+ }
+
+ } while (true);
+
+ // SEMI_COLON
+ if (! acceptTokenClass(EHTokSemicolon)) {
+ expected(";");
+ return false;
+ }
+
+ } while (true);
+}
+
+// function_parameters
+// : LEFT_PAREN parameter_declaration COMMA parameter_declaration ... RIGHT_PAREN
+// | LEFT_PAREN VOID RIGHT_PAREN
+//
+bool HlslGrammar::acceptFunctionParameters(TFunction& function)
+{
+ // LEFT_PAREN
+ if (! acceptTokenClass(EHTokLeftParen))
+ return false;
+
+ // VOID RIGHT_PAREN
+ if (! acceptTokenClass(EHTokVoid)) {
+ do {
+ // parameter_declaration
+ if (! acceptParameterDeclaration(function))
+ break;
+
+ // COMMA
+ if (! acceptTokenClass(EHTokComma))
+ break;
+ } while (true);
+ }
+
+ // RIGHT_PAREN
+ if (! acceptTokenClass(EHTokRightParen)) {
+ expected(")");
+ return false;
+ }
+
+ return true;
+}
+
+// parameter_declaration
+// : fully_specified_type
+// | fully_specified_type identifier
+//
+bool HlslGrammar::acceptParameterDeclaration(TFunction& function)
+{
+ // fully_specified_type
+ TType* type = new TType;
+ if (! acceptFullySpecifiedType(*type))
+ return false;
+
+ // identifier
+ HlslToken idToken;
+ acceptIdentifier(idToken);
+
+ TParameter param = { idToken.string, type };
+ function.addParameter(param);
+
+ return true;
+}
+
+// Do the work to create the function definition in addition to
+// parsing the body (compound_statement).
+bool HlslGrammar::acceptFunctionDefinition(TFunction& function, TIntermNode*& node)
+{
+ TFunction* functionDeclarator = parseContext.handleFunctionDeclarator(token.loc, function, false /* not prototype */);
+
+ // This does a pushScope()
+ node = parseContext.handleFunctionDefinition(token.loc, *functionDeclarator);
+
+ // compound_statement
+ TIntermNode* functionBody = nullptr;
+ if (acceptCompoundStatement(functionBody)) {
+ node = intermediate.growAggregate(node, functionBody);
+ intermediate.setAggregateOperator(node, EOpFunction, functionDeclarator->getType(), token.loc);
+ node->getAsAggregate()->setName(functionDeclarator->getMangledName().c_str());
+ parseContext.popScope();
+
+ return true;
+ }
+
+ return false;
+}
+
+// Accept an expression with parenthesis around it, where
+// the parenthesis ARE NOT expression parenthesis, but the
+// syntactically required ones like in "if ( expression )"
+//
+// Note this one is not set up to be speculative; as it gives
+// errors if not found.
+//
+bool HlslGrammar::acceptParenExpression(TIntermTyped*& expression)
+{
+ // LEFT_PAREN
+ if (! acceptTokenClass(EHTokLeftParen))
+ expected("(");
+
+ if (! acceptExpression(expression)) {
+ expected("expression");
+ return false;
+ }
+
+ // RIGHT_PAREN
+ if (! acceptTokenClass(EHTokRightParen))
+ expected(")");
+
+ return true;
+}
+
+// The top-level full expression recognizer.
+//
+// expression
+// : assignment_expression COMMA assignment_expression COMMA assignment_expression ...
+//
+bool HlslGrammar::acceptExpression(TIntermTyped*& node)
+{
+ node = nullptr;
+
+ // assignment_expression
+ if (! acceptAssignmentExpression(node))
+ return false;
+
+ if (! peekTokenClass(EHTokComma))
+ return true;
+
+ do {
+ // ... COMMA
+ TSourceLoc loc = token.loc;
+ advanceToken();
+
+ // ... assignment_expression
+ TIntermTyped* rightNode = nullptr;
+ if (! acceptAssignmentExpression(rightNode)) {
+ expected("assignment expression");
+ return false;
+ }
+
+ node = intermediate.addComma(node, rightNode, loc);
+
+ if (! peekTokenClass(EHTokComma))
+ return true;
+ } while (true);
+}
+
+// Accept an assignment expression, where assignment operations
+// associate right-to-left. This is, it is implicit, for example
+//
+// a op (b op (c op d))
+//
+// assigment_expression
+// : binary_expression op binary_expression op binary_expression ...
+//
+bool HlslGrammar::acceptAssignmentExpression(TIntermTyped*& node)
+{
+ if (! acceptBinaryExpression(node, PlLogicalOr))
+ return false;
+
+ TOperator assignOp = HlslOpMap::assignment(peek());
+ if (assignOp == EOpNull)
+ return true;
+
+ // ... op
+ TSourceLoc loc = token.loc;
+ advanceToken();
+
+ // ... binary_expression
+ // But, done by recursing this function, which automatically
+ // gets the right-to-left associativity.
+ TIntermTyped* rightNode = nullptr;
+ if (! acceptAssignmentExpression(rightNode)) {
+ expected("assignment expression");
+ return false;
+ }
+
+ node = intermediate.addAssign(assignOp, node, rightNode, loc);
+
+ if (! peekTokenClass(EHTokComma))
+ return true;
+
+ return true;
+}
+
+// Accept a binary expression, for binary operations that
+// associate left-to-right. This is, it is implicit, for example
+//
+// ((a op b) op c) op d
+//
+// binary_expression
+// : expression op expression op expression ...
+//
+// where 'expression' is the next higher level in precedence.
+//
+bool HlslGrammar::acceptBinaryExpression(TIntermTyped*& node, PrecedenceLevel precedenceLevel)
+{
+ if (precedenceLevel > PlMul)
+ return acceptUnaryExpression(node);
+
+ // assignment_expression
+ if (! acceptBinaryExpression(node, (PrecedenceLevel)(precedenceLevel + 1)))
+ return false;
+
+ TOperator op = HlslOpMap::binary(peek());
+ PrecedenceLevel tokenLevel = HlslOpMap::precedenceLevel(op);
+ if (tokenLevel < precedenceLevel)
+ return true;
+
+ do {
+ // ... op
+ TSourceLoc loc = token.loc;
+ advanceToken();
+
+ // ... expression
+ TIntermTyped* rightNode = nullptr;
+ if (! acceptBinaryExpression(rightNode, (PrecedenceLevel)(precedenceLevel + 1))) {
+ expected("expression");
+ return false;
+ }
+
+ node = intermediate.addBinaryMath(op, node, rightNode, loc);
+
+ if (! peekTokenClass(EHTokComma))
+ return true;
+ } while (true);
+}
+
+// unary_expression
+// : (type) unary_expression
+// | + unary_expression
+// | - unary_expression
+// | ! unary_expression
+// | ~ unary_expression
+// | ++ unary_expression
+// | -- unary_expression
+// | postfix_expression
+//
+bool HlslGrammar::acceptUnaryExpression(TIntermTyped*& node)
+{
+ // (type) unary_expression
+ // Have to look two steps ahead, because this could be, e.g., a
+ // postfix_expression instead, since that also starts with at "(".
+ if (acceptTokenClass(EHTokLeftParen)) {
+ TType castType;
+ if (acceptType(castType)) {
+ if (! acceptTokenClass(EHTokRightParen)) {
+ expected(")");
+ return false;
+ }
+
+ // We've matched "(type)" now, get the expression to cast
+ TSourceLoc loc = token.loc;
+ if (! acceptUnaryExpression(node))
+ return false;
+
+ // Hook it up like a constructor
+ TFunction* constructorFunction = parseContext.handleConstructorCall(loc, castType);
+ if (constructorFunction == nullptr) {
+ expected("type that can be constructed");
+ return false;
+ }
+ TIntermTyped* arguments = nullptr;
+ parseContext.handleFunctionArgument(constructorFunction, arguments, node);
+ node = parseContext.handleFunctionCall(loc, constructorFunction, arguments);
+
+ return true;
+ } else {
+ // This isn't a type cast, but it still started "(", so if it is a
+ // unary expression, it can only be a postfix_expression, so try that.
+ // Back it up first.
+ recedeToken();
+ return acceptPostfixExpression(node);
+ }
+ }
+
+ // peek for "op unary_expression"
+ TOperator unaryOp = HlslOpMap::preUnary(peek());
+
+ // postfix_expression (if no unary operator)
+ if (unaryOp == EOpNull)
+ return acceptPostfixExpression(node);
+
+ // op unary_expression
+ TSourceLoc loc = token.loc;
+ advanceToken();
+ if (! acceptUnaryExpression(node))
+ return false;
+
+ // + is a no-op
+ if (unaryOp == EOpAdd)
+ return true;
+
+ node = intermediate.addUnaryMath(unaryOp, node, loc);
+
+ return node != nullptr;
+}
+
+// postfix_expression
+// : LEFT_PAREN expression RIGHT_PAREN
+// | literal
+// | constructor
+// | identifier
+// | function_call
+// | postfix_expression LEFT_BRACKET integer_expression RIGHT_BRACKET
+// | postfix_expression DOT IDENTIFIER
+// | postfix_expression INC_OP
+// | postfix_expression DEC_OP
+//
+bool HlslGrammar::acceptPostfixExpression(TIntermTyped*& node)
+{
+ // Not implemented as self-recursive:
+ // The logical "right recursion" is done with an loop at the end
+
+ // idToken will pick up either a variable or a function name in a function call
+ HlslToken idToken;
+
+ // Find something before the postfix operations, as they can't operate
+ // on nothing. So, no "return true", they fall through, only "return false".
+ if (acceptTokenClass(EHTokLeftParen)) {
+ // LEFT_PAREN expression RIGHT_PAREN
+ if (! acceptExpression(node)) {
+ expected("expression");
+ return false;
+ }
+ if (! acceptTokenClass(EHTokRightParen)) {
+ expected(")");
+ return false;
+ }
+ } else if (acceptLiteral(node)) {
+ // literal (nothing else to do yet), go on to the
+ } else if (acceptConstructor(node)) {
+ // constructor (nothing else to do yet)
+ } else if (acceptIdentifier(idToken)) {
+ // identifier or function_call name
+ if (! peekTokenClass(EHTokLeftParen)) {
+ node = parseContext.handleVariable(idToken.loc, idToken.symbol, token.string);
+ } else if (acceptFunctionCall(idToken, node)) {
+ // function_call (nothing else to do yet)
+ } else {
+ expected("function call arguments");
+ return false;
+ }
+ } else {
+ // nothing found, can't post operate
+ return false;
+ }
+
+ // Something was found, chain as many postfix operations as exist.
+ do {
+ TSourceLoc loc = token.loc;
+ TOperator postOp = HlslOpMap::postUnary(peek());
+
+ // Consume only a valid post-unary operator, otherwise we are done.
+ switch (postOp) {
+ case EOpIndexDirectStruct:
+ case EOpIndexIndirect:
+ case EOpPostIncrement:
+ case EOpPostDecrement:
+ advanceToken();
+ break;
+ default:
+ return true;
+ }
+
+ // We have a valid post-unary operator, process it.
+ switch (postOp) {
+ case EOpIndexDirectStruct:
+ // todo
+ break;
+ case EOpIndexIndirect:
+ {
+ TIntermTyped* indexNode = nullptr;
+ if (! acceptExpression(indexNode) ||
+ ! peekTokenClass(EHTokRightBracket)) {
+ expected("expression followed by ']'");
+ return false;
+ }
+ // todo: node = intermediate.addBinaryMath(
+ }
+ case EOpPostIncrement:
+ case EOpPostDecrement:
+ node = intermediate.addUnaryMath(postOp, node, loc);
+ break;
+ default:
+ assert(0);
+ break;
+ }
+ } while (true);
+}
+
+// constructor
+// : type argument_list
+//
+bool HlslGrammar::acceptConstructor(TIntermTyped*& node)
+{
+ // type
+ TType type;
+ if (acceptType(type)) {
+ TFunction* constructorFunction = parseContext.handleConstructorCall(token.loc, type);
+ if (constructorFunction == nullptr)
+ return false;
+
+ // arguments
+ TIntermTyped* arguments = nullptr;
+ if (! acceptArguments(constructorFunction, arguments)) {
+ expected("constructor arguments");
+ return false;
+ }
+
+ // hook it up
+ node = parseContext.handleFunctionCall(arguments->getLoc(), constructorFunction, arguments);
+
+ return true;
+ }
+
+ return false;
+}
+
+// The function_call identifier was already recognized, and passed in as idToken.
+//
+// function_call
+// : [idToken] arguments
+//
+bool HlslGrammar::acceptFunctionCall(HlslToken idToken, TIntermTyped*& node)
+{
+ // arguments
+ TFunction* function = new TFunction(idToken.string, TType(EbtVoid));
+ TIntermTyped* arguments = nullptr;
+ if (! acceptArguments(function, arguments))
+ return false;
+
+ node = parseContext.handleFunctionCall(idToken.loc, function, arguments);
+
+ return true;
+}
+
+// arguments
+// : LEFT_PAREN expression COMMA expression COMMA ... RIGHT_PAREN
+//
+// The arguments are pushed onto the 'function' argument list and
+// onto the 'arguments' aggregate.
+//
+bool HlslGrammar::acceptArguments(TFunction* function, TIntermTyped*& arguments)
+{
+ // LEFT_PAREN
+ if (! acceptTokenClass(EHTokLeftParen))
+ return false;
+
+ do {
+ // expression
+ TIntermTyped* arg;
+ if (! acceptAssignmentExpression(arg))
+ break;
+
+ // hook it up
+ parseContext.handleFunctionArgument(function, arguments, arg);
+
+ // COMMA
+ if (! acceptTokenClass(EHTokComma))
+ break;
+ } while (true);
+
+ // RIGHT_PAREN
+ if (! acceptTokenClass(EHTokRightParen)) {
+ expected(")");
+ return false;
+ }
+
+ return true;
+}
+
+bool HlslGrammar::acceptLiteral(TIntermTyped*& node)
+{
+ switch (token.tokenClass) {
+ case EHTokIntConstant:
+ node = intermediate.addConstantUnion(token.i, token.loc, true);
+ break;
+ case EHTokFloatConstant:
+ node = intermediate.addConstantUnion(token.d, EbtFloat, token.loc, true);
+ break;
+ case EHTokDoubleConstant:
+ node = intermediate.addConstantUnion(token.d, EbtDouble, token.loc, true);
+ break;
+ case EHTokBoolConstant:
+ node = intermediate.addConstantUnion(token.b, token.loc, true);
+ break;
+
+ default:
+ return false;
+ }
+
+ advanceToken();
+
+ return true;
+}
+
+// compound_statement
+// : LEFT_CURLY statement statement ... RIGHT_CURLY
+//
+bool HlslGrammar::acceptCompoundStatement(TIntermNode*& retStatement)
+{
+ TIntermAggregate* compoundStatement = nullptr;
+
+ // LEFT_CURLY
+ if (! acceptTokenClass(EHTokLeftBrace))
+ return false;
+
+ // statement statement ...
+ TIntermNode* statement = nullptr;
+ while (acceptStatement(statement)) {
+ // hook it up
+ compoundStatement = intermediate.growAggregate(compoundStatement, statement);
+ }
+ if (compoundStatement)
+ compoundStatement->setOperator(EOpSequence);
+
+ retStatement = compoundStatement;
+
+ // RIGHT_CURLY
+ return acceptTokenClass(EHTokRightBrace);
+}
+
+bool HlslGrammar::acceptScopedStatement(TIntermNode*& statement)
+{
+ parseContext.pushScope();
+ bool result = acceptStatement(statement);
+ parseContext.popScope();
+
+ return result;
+}
+
+bool HlslGrammar::acceptScopedCompoundStatement(TIntermNode*& statement)
+{
+ parseContext.pushScope();
+ bool result = acceptCompoundStatement(statement);
+ parseContext.popScope();
+
+ return result;
+}
+
+// statement
+// : attributes attributed_statement
+//
+// attributed_statement
+// : compound_statement
+// | SEMICOLON
+// | expression SEMICOLON
+// | declaration_statement
+// | selection_statement
+// | switch_statement
+// | case_label
+// | iteration_statement
+// | jump_statement
+//
+bool HlslGrammar::acceptStatement(TIntermNode*& statement)
+{
+ statement = nullptr;
+
+ // attributes
+ acceptAttributes();
+
+ // attributed_statement
+ switch (peek()) {
+ case EHTokLeftBrace:
+ return acceptScopedCompoundStatement(statement);
+
+ case EHTokIf:
+ return acceptSelectionStatement(statement);
+
+ case EHTokSwitch:
+ return acceptSwitchStatement(statement);
+
+ case EHTokFor:
+ case EHTokDo:
+ case EHTokWhile:
+ return acceptIterationStatement(statement);
+
+ case EHTokContinue:
+ case EHTokBreak:
+ case EHTokDiscard:
+ case EHTokReturn:
+ return acceptJumpStatement(statement);
+
+ case EHTokCase:
+ return acceptCaseLabel(statement);
+
+ case EHTokSemicolon:
+ return acceptTokenClass(EHTokSemicolon);
+
+ case EHTokRightBrace:
+ // Performance: not strictly necessary, but stops a bunch of hunting early,
+ // and is how sequences of statements end.
+ return false;
+
+ default:
+ {
+ // declaration
+ if (acceptDeclaration(statement))
+ return true;
+
+ // expression
+ TIntermTyped* node;
+ if (acceptExpression(node))
+ statement = node;
+ else
+ return false;
+
+ // SEMICOLON (following an expression)
+ if (! acceptTokenClass(EHTokSemicolon)) {
+ expected(";");
+ return false;
+ }
+ }
+ }
+
+ return true;
+}
+
+// attributes
+// : list of zero or more of: LEFT_BRACKET attribute RIGHT_BRACKET
+//
+// attribute:
+// : UNROLL
+// | UNROLL LEFT_PAREN literal RIGHT_PAREN
+// | FASTOPT
+// | ALLOW_UAV_CONDITION
+// | BRANCH
+// | FLATTEN
+// | FORCECASE
+// | CALL
+//
+void HlslGrammar::acceptAttributes()
+{
+ // For now, accept the [ XXX(X) ] syntax, but drop.
+ // TODO: subset to correct set? Pass on?
+ do {
+ // LEFT_BRACKET?
+ if (! acceptTokenClass(EHTokLeftBracket))
+ return;
+
+ // attribute
+ if (peekTokenClass(EHTokIdentifier)) {
+ // 'token.string' is the attribute
+ advanceToken();
+ } else if (! peekTokenClass(EHTokRightBracket)) {
+ expected("identifier");
+ advanceToken();
+ }
+
+ // (x)
+ if (acceptTokenClass(EHTokLeftParen)) {
+ TIntermTyped* node;
+ if (! acceptLiteral(node))
+ expected("literal");
+ // 'node' has the literal in it
+ if (! acceptTokenClass(EHTokRightParen))
+ expected(")");
+ }
+
+ // RIGHT_BRACKET
+ if (acceptTokenClass(EHTokRightBracket))
+ continue;
+
+ expected("]");
+ return;
+
+ } while (true);
+}
+
+// selection_statement
+// : IF LEFT_PAREN expression RIGHT_PAREN statement
+// : IF LEFT_PAREN expression RIGHT_PAREN statement ELSE statement
+//
+bool HlslGrammar::acceptSelectionStatement(TIntermNode*& statement)
+{
+ TSourceLoc loc = token.loc;
+
+ // IF
+ if (! acceptTokenClass(EHTokIf))
+ return false;
+
+ // so that something declared in the condition is scoped to the lifetimes
+ // of the then-else statements
+ parseContext.pushScope();
+
+ // LEFT_PAREN expression RIGHT_PAREN
+ TIntermTyped* condition;
+ if (! acceptParenExpression(condition))
+ return false;
+
+ // create the child statements
+ TIntermNodePair thenElse = { nullptr, nullptr };
+
+ // then statement
+ if (! acceptScopedStatement(thenElse.node1)) {
+ expected("then statement");
+ return false;
+ }
+
+ // ELSE
+ if (acceptTokenClass(EHTokElse)) {
+ // else statement
+ if (! acceptScopedStatement(thenElse.node2)) {
+ expected("else statement");
+ return false;
+ }
+ }
+
+ // Put the pieces together
+ statement = intermediate.addSelection(condition, thenElse, loc);
+ parseContext.popScope();
+
+ return true;
+}
+
+bool HlslGrammar::acceptSwitchStatement(TIntermNode*& statement)
+{
+ return false;
+}
+
+// iteration_statement
+// : WHILE LEFT_PAREN condition RIGHT_PAREN statement
+// | DO LEFT_BRACE statement RIGHT_BRACE WHILE LEFT_PAREN expression RIGHT_PAREN SEMICOLON
+// | FOR LEFT_PAREN for_init_statement for_rest_statement RIGHT_PAREN statement
+//
+// Non-speculative, only call if it needs to be found; WHILE or DO or FOR already seen.
+bool HlslGrammar::acceptIterationStatement(TIntermNode*& statement)
+{
+ TSourceLoc loc = token.loc;
+ TIntermTyped* condition = nullptr;
+
+ EHlslTokenClass loop = peek();
+ assert(loop == EHTokDo || loop == EHTokFor || loop == EHTokWhile);
+
+ // WHILE or DO or FOR
+ advanceToken();
+
+ switch (loop) {
+ case EHTokWhile:
+ // so that something declared in the condition is scoped to the lifetime
+ // of the while sub-statement
+ parseContext.pushScope();
+ parseContext.nestLooping();
+
+ // LEFT_PAREN condition RIGHT_PAREN
+ if (! acceptParenExpression(condition))
+ return false;
+
+ // statement
+ if (! acceptScopedStatement(statement)) {
+ expected("while sub-statement");
+ return false;
+ }
+
+ parseContext.unnestLooping();
+ parseContext.popScope();
+
+ statement = intermediate.addLoop(statement, condition, nullptr, true, loc);
+
+ return true;
+
+ case EHTokDo:
+ parseContext.nestLooping();
+
+ if (! acceptTokenClass(EHTokLeftBrace))
+ expected("{");
+
+ // statement
+ if (! peekTokenClass(EHTokRightBrace) && ! acceptScopedStatement(statement)) {
+ expected("do sub-statement");
+ return false;
+ }
+
+ if (! acceptTokenClass(EHTokRightBrace))
+ expected("}");
+
+ // WHILE
+ if (! acceptTokenClass(EHTokWhile)) {
+ expected("while");
+ return false;
+ }
+
+ // LEFT_PAREN condition RIGHT_PAREN
+ TIntermTyped* condition;
+ if (! acceptParenExpression(condition))
+ return false;
+
+ if (! acceptTokenClass(EHTokSemicolon))
+ expected(";");
+
+ parseContext.unnestLooping();
+
+ statement = intermediate.addLoop(statement, condition, 0, false, loc);
+
+ return true;
+
+ case EHTokFor:
+ {
+ // LEFT_PAREN
+ if (! acceptTokenClass(EHTokLeftParen))
+ expected("(");
+
+ // so that something declared in the condition is scoped to the lifetime
+ // of the for sub-statement
+ parseContext.pushScope();
+
+ // initializer SEMI_COLON
+ TIntermTyped* initializer = nullptr; // TODO, "for (initializer" needs to support decl. statement
+ acceptExpression(initializer);
+ if (! acceptTokenClass(EHTokSemicolon))
+ expected(";");
+
+ parseContext.nestLooping();
+
+ // condition SEMI_COLON
+ acceptExpression(condition);
+ if (! acceptTokenClass(EHTokSemicolon))
+ expected(";");
+
+ // iterator SEMI_COLON
+ TIntermTyped* iterator = nullptr;
+ acceptExpression(iterator);
+ if (! acceptTokenClass(EHTokRightParen))
+ expected(")");
+
+ // statement
+ if (! acceptScopedStatement(statement)) {
+ expected("for sub-statement");
+ return false;
+ }
+
+ statement = intermediate.addForLoop(statement, initializer, condition, iterator, true, loc);
+
+ parseContext.popScope();
+ parseContext.unnestLooping();
+
+ return true;
+ }
+
+ default:
+ return false;
+ }
+}
+
+// jump_statement
+// : CONTINUE SEMICOLON
+// | BREAK SEMICOLON
+// | DISCARD SEMICOLON
+// | RETURN SEMICOLON
+// | RETURN expression SEMICOLON
+//
+bool HlslGrammar::acceptJumpStatement(TIntermNode*& statement)
+{
+ switch (peek()) {
+ case EHTokContinue:
+ case EHTokBreak:
+ case EHTokDiscard:
+ // TODO
+ return false;
+
+ case EHTokReturn:
+ // return
+ if (acceptTokenClass(EHTokReturn)) {
+ // expression
+ TIntermTyped* node;
+ if (acceptExpression(node)) {
+ // hook it up
+ statement = intermediate.addBranch(EOpReturn, node, token.loc);
+ } else
+ statement = intermediate.addBranch(EOpReturn, token.loc);
+
+ // SEMICOLON
+ if (! acceptTokenClass(EHTokSemicolon)) {
+ expected(";");
+ return false;
+ }
+
+ return true;
+ }
+
+ default:
+ return false;
+ }
+}
+
+
+bool HlslGrammar::acceptCaseLabel(TIntermNode*& statement)
+{
+ return false;
+}
+
+// post_decls
+// : COLON semantic // optional
+// COLON PACKOFFSET LEFT_PAREN ... RIGHT_PAREN // optional
+// COLON REGISTER // optional
+// annotations // optional
+//
+void HlslGrammar::acceptPostDecls(TType& type)
+{
+ do {
+ // COLON
+ if (acceptTokenClass(EHTokColon)) {
+ HlslToken idToken;
+ if (acceptTokenClass(EHTokPackOffset)) {
+ if (! acceptTokenClass(EHTokLeftParen)) {
+ expected("(");
+ return;
+ }
+ acceptTokenClass(EHTokIdentifier);
+ acceptTokenClass(EHTokDot);
+ acceptTokenClass(EHTokIdentifier);
+ if (! acceptTokenClass(EHTokRightParen)) {
+ expected(")");
+ break;
+ }
+ // TODO: process the packoffset information
+ } else if (! acceptIdentifier(idToken)) {
+ expected("semantic or packoffset or register");
+ return;
+ } else if (*idToken.string == "register") {
+ if (! acceptTokenClass(EHTokLeftParen)) {
+ expected("(");
+ return;
+ }
+ acceptTokenClass(EHTokIdentifier);
+ acceptTokenClass(EHTokComma);
+ acceptTokenClass(EHTokIdentifier);
+ acceptTokenClass(EHTokLeftBracket);
+ if (peekTokenClass(EHTokIntConstant))
+ advanceToken();
+ acceptTokenClass(EHTokRightBracket);
+ if (! acceptTokenClass(EHTokRightParen)) {
+ expected(")");
+ break;
+ }
+ // TODO: process the register information
+ } else {
+ // semantic, in idToken.string
+ parseContext.handleSemantic(type, *idToken.string);
+ }
+ } else if (acceptTokenClass(EHTokLeftAngle)) {
+ // TODO: process annotations, just accepting them for now
+ do {
+ if (peekTokenClass(EHTokNone))
+ return;
+ if (acceptTokenClass(EHTokRightAngle))
+ break;
+ advanceToken();
+ } while (true);
+ } else
+ break;
+
+ } while (true);
+}
+
+} // end namespace glslang
diff --git a/chromium/third_party/glslang/src/hlsl/hlslGrammar.h b/chromium/third_party/glslang/src/hlsl/hlslGrammar.h
new file mode 100755
index 00000000000..97cea84ac36
--- /dev/null
+++ b/chromium/third_party/glslang/src/hlsl/hlslGrammar.h
@@ -0,0 +1,98 @@
+//
+//Copyright (C) 2016 Google, 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:
+//
+// Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 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.
+//
+// Neither the name of Google, Inc., nor the names of its
+// contributors may be used to endorse or promote products derived
+// from this software without specific prior written permission.
+//
+//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+//"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 THE
+//COPYRIGHT HOLDERS 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.
+//
+
+#ifndef HLSLGRAMMAR_H_
+#define HLSLGRAMMAR_H_
+
+#include "hlslParseHelper.h"
+#include "hlslOpMap.h"
+#include "hlslTokenStream.h"
+
+namespace glslang {
+
+ // Should just be the grammar aspect of HLSL.
+ // Described in more detail in hlslGrammar.cpp.
+
+ class HlslGrammar : public HlslTokenStream {
+ public:
+ HlslGrammar(HlslScanContext& scanner, HlslParseContext& parseContext)
+ : HlslTokenStream(scanner), parseContext(parseContext), intermediate(parseContext.intermediate) { }
+ virtual ~HlslGrammar() { }
+
+ bool parse();
+
+ protected:
+ void expected(const char*);
+ bool acceptIdentifier(HlslToken&);
+ bool acceptCompilationUnit();
+ bool acceptDeclaration(TIntermNode*& node);
+ bool acceptFullySpecifiedType(TType&);
+ void acceptQualifier(TQualifier&);
+ bool acceptType(TType&);
+ bool acceptStruct(TType&);
+ bool acceptStructDeclarationList(TTypeList*&);
+ bool acceptFunctionParameters(TFunction&);
+ bool acceptParameterDeclaration(TFunction&);
+ bool acceptFunctionDefinition(TFunction&, TIntermNode*&);
+ bool acceptParenExpression(TIntermTyped*&);
+ bool acceptExpression(TIntermTyped*&);
+ bool acceptAssignmentExpression(TIntermTyped*&);
+ bool acceptBinaryExpression(TIntermTyped*&, PrecedenceLevel);
+ bool acceptUnaryExpression(TIntermTyped*&);
+ bool acceptPostfixExpression(TIntermTyped*&);
+ bool acceptConstructor(TIntermTyped*&);
+ bool acceptFunctionCall(HlslToken, TIntermTyped*&);
+ bool acceptArguments(TFunction*, TIntermTyped*&);
+ bool acceptLiteral(TIntermTyped*&);
+ bool acceptCompoundStatement(TIntermNode*&);
+ bool acceptStatement(TIntermNode*&);
+ bool acceptScopedStatement(TIntermNode*&);
+ bool acceptScopedCompoundStatement(TIntermNode*&);
+ bool acceptNestedStatement(TIntermNode*&);
+ void acceptAttributes();
+ bool acceptSelectionStatement(TIntermNode*&);
+ bool acceptSwitchStatement(TIntermNode*&);
+ bool acceptIterationStatement(TIntermNode*&);
+ bool acceptJumpStatement(TIntermNode*&);
+ bool acceptCaseLabel(TIntermNode*&);
+ void acceptPostDecls(TType&);
+
+ HlslParseContext& parseContext; // state of parsing and helper functions for building the intermediate
+ TIntermediate& intermediate; // the final product, the intermediate representation, includes the AST
+ };
+
+} // end namespace glslang
+
+#endif // HLSLGRAMMAR_H_
diff --git a/chromium/third_party/glslang/src/hlsl/hlslOpMap.cpp b/chromium/third_party/glslang/src/hlsl/hlslOpMap.cpp
new file mode 100755
index 00000000000..c31dd7cf73f
--- /dev/null
+++ b/chromium/third_party/glslang/src/hlsl/hlslOpMap.cpp
@@ -0,0 +1,171 @@
+//
+//Copyright (C) 2016 Google, 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:
+//
+// Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 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.
+//
+// Neither the name of Google, Inc., nor the names of its
+// contributors may be used to endorse or promote products derived
+// from this software without specific prior written permission.
+//
+//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+//"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 THE
+//COPYRIGHT HOLDERS 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.
+//
+
+// Map from physical token form (e.g. '-') to logical operator
+// form (e.g., binary subtract or unary negate).
+
+#include "hlslOpMap.h"
+
+namespace glslang {
+
+// Map parsing tokens that could be assignments into assignment operators.
+TOperator HlslOpMap::assignment(EHlslTokenClass op)
+{
+ switch (op) {
+ case EHTokAssign: return EOpAssign;
+ case EHTokMulAssign: return EOpMulAssign;
+ case EHTokDivAssign: return EOpDivAssign;
+ case EHTokAddAssign: return EOpAddAssign;
+ case EHTokModAssign: return EOpModAssign;
+ case EHTokLeftAssign: return EOpLeftShiftAssign;
+ case EHTokRightAssign: return EOpRightShiftAssign;
+ case EHTokAndAssign: return EOpAndAssign;
+ case EHTokXorAssign: return EOpExclusiveOrAssign;
+ case EHTokOrAssign: return EOpInclusiveOrAssign;
+ case EHTokSubAssign: return EOpSubAssign;
+
+ default:
+ return EOpNull;
+ }
+}
+
+// Map parsing tokens that could be binary operations into binary operators.
+TOperator HlslOpMap::binary(EHlslTokenClass op)
+{
+ switch (op) {
+ case EHTokPlus: return EOpAdd;
+ case EHTokDash: return EOpSub;
+ case EHTokStar: return EOpMul;
+ case EHTokSlash: return EOpDiv;
+ case EHTokPercent: return EOpMod;
+ case EHTokRightOp: return EOpRightShift;
+ case EHTokLeftOp: return EOpLeftShift;
+ case EHTokAmpersand: return EOpAnd;
+ case EHTokVerticalBar: return EOpInclusiveOr;
+ case EHTokCaret: return EOpExclusiveOr;
+ case EHTokEqOp: return EOpEqual;
+ case EHTokNeOp: return EOpNotEqual;
+ case EHTokLeftAngle: return EOpLessThan;
+ case EHTokRightAngle: return EOpGreaterThan;
+ case EHTokLeOp: return EOpLessThanEqual;
+ case EHTokGeOp: return EOpGreaterThanEqual;
+ case EHTokOrOp: return EOpLogicalOr;
+ case EHTokXorOp: return EOpLogicalXor;
+ case EHTokAndOp: return EOpLogicalAnd;
+
+ default:
+ return EOpNull;
+ }
+}
+
+// Map parsing tokens that could be unary operations into unary operators.
+// These are just the ones that can appear in front of its operand.
+TOperator HlslOpMap::preUnary(EHlslTokenClass op)
+{
+ switch (op) {
+ case EHTokPlus: return EOpAdd; // means no-op, but still a unary op was present
+ case EHTokDash: return EOpNegative;
+ case EHTokBang: return EOpLogicalNot;
+ case EHTokTilde: return EOpBitwiseNot;
+
+ case EHTokIncOp: return EOpPreIncrement;
+ case EHTokDecOp: return EOpPreDecrement;
+
+ default: return EOpNull; // means not a pre-unary op
+ }
+}
+
+// Map parsing tokens that could be unary operations into unary operators.
+// These are just the ones that can appear behind its operand.
+TOperator HlslOpMap::postUnary(EHlslTokenClass op)
+{
+ switch (op) {
+ case EHTokDot: return EOpIndexDirectStruct;
+ case EHTokLeftBracket: return EOpIndexIndirect; // may need to change later to EOpIndexDirect
+
+ case EHTokIncOp: return EOpPostIncrement;
+ case EHTokDecOp: return EOpPostDecrement;
+
+ default: return EOpNull; // means not a post-unary op
+ }
+}
+
+// Map operators into their level of precedence.
+PrecedenceLevel HlslOpMap::precedenceLevel(TOperator op)
+{
+ switch (op) {
+ case EOpLogicalOr:
+ return PlLogicalOr;
+ case EOpLogicalXor:
+ return PlLogicalXor;
+ case EOpLogicalAnd:
+ return PlLogicalAnd;
+
+ case EOpInclusiveOr:
+ return PlBitwiseOr;
+ case EOpExclusiveOr:
+ return PlBitwiseXor;
+ case EOpAnd:
+ return PlBitwiseAnd;
+
+ case EOpEqual:
+ case EOpNotEqual:
+ return PlEquality;
+
+ case EOpLessThan:
+ case EOpGreaterThan:
+ case EOpLessThanEqual:
+ case EOpGreaterThanEqual:
+ return PlRelational;
+
+ case EOpRightShift:
+ case EOpLeftShift:
+ return PlShift;
+
+ case EOpAdd:
+ case EOpSub:
+ return PlAdd;
+
+ case EOpMul:
+ case EOpDiv:
+ case EOpMod:
+ return PlMul;
+
+ default:
+ return PlBad;
+ }
+}
+
+} // end namespace glslang
diff --git a/chromium/third_party/glslang/src/hlsl/hlslOpMap.h b/chromium/third_party/glslang/src/hlsl/hlslOpMap.h
new file mode 100755
index 00000000000..924637878c8
--- /dev/null
+++ b/chromium/third_party/glslang/src/hlsl/hlslOpMap.h
@@ -0,0 +1,69 @@
+//
+//Copyright (C) 2016 Google, 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:
+//
+// Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 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.
+//
+// Neither the name of Google, Inc., nor the names of its
+// contributors may be used to endorse or promote products derived
+// from this software without specific prior written permission.
+//
+//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+//"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 THE
+//COPYRIGHT HOLDERS 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.
+//
+
+#ifndef HLSLOPMAP_H_
+#define HLSLOPMAP_H_
+
+#include "hlslScanContext.h"
+
+namespace glslang {
+
+ enum PrecedenceLevel {
+ PlBad,
+ PlLogicalOr,
+ PlLogicalXor,
+ PlLogicalAnd,
+ PlBitwiseOr,
+ PlBitwiseXor,
+ PlBitwiseAnd,
+ PlEquality,
+ PlRelational,
+ PlShift,
+ PlAdd,
+ PlMul
+ };
+
+ class HlslOpMap {
+ public:
+ static TOperator assignment(EHlslTokenClass op);
+ static TOperator binary(EHlslTokenClass op);
+ static TOperator preUnary(EHlslTokenClass op);
+ static TOperator postUnary(EHlslTokenClass op);
+ static PrecedenceLevel precedenceLevel(TOperator);
+ };
+
+} // end namespace glslang
+
+#endif // HLSLOPMAP_H_
diff --git a/chromium/third_party/glslang/src/hlsl/hlslParseHelper.cpp b/chromium/third_party/glslang/src/hlsl/hlslParseHelper.cpp
new file mode 100755
index 00000000000..2a2fe1a16b9
--- /dev/null
+++ b/chromium/third_party/glslang/src/hlsl/hlslParseHelper.cpp
@@ -0,0 +1,3805 @@
+//
+//Copyright (C) 2016 Google, Inc.
+//Copyright (C) 2016 LunarG, 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:
+//
+// Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 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.
+//
+// Neither the name of 3Dlabs Inc. Ltd. nor the names of its
+// contributors may be used to endorse or promote products derived
+// from this software without specific prior written permission.
+//
+//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+//"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 THE
+//COPYRIGHT HOLDERS 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.
+//
+
+#include "hlslParseHelper.h"
+#include "hlslScanContext.h"
+#include "hlslGrammar.h"
+
+#include "../glslang/MachineIndependent/Scan.h"
+#include "../glslang/MachineIndependent/preprocessor/PpContext.h"
+
+#include "../glslang/OSDependent/osinclude.h"
+
+#include <stdarg.h>
+#include <algorithm>
+
+namespace glslang {
+
+HlslParseContext::HlslParseContext(TSymbolTable& symbolTable, TIntermediate& interm, bool /*parsingBuiltins*/,
+ int version, EProfile profile, int spv, int vulkan, EShLanguage language, TInfoSink& infoSink,
+ bool forwardCompatible, EShMessages messages) :
+ TParseContextBase(symbolTable, interm, version, profile, spv, vulkan, language, infoSink, forwardCompatible, messages),
+ contextPragma(true, false), loopNestingLevel(0), structNestingLevel(0), controlFlowNestingLevel(0),
+ postMainReturn(false),
+ limits(resources.limits),
+ afterEOF(false)
+{
+ // ensure we always have a linkage node, even if empty, to simplify tree topology algorithms
+ linkage = new TIntermAggregate;
+
+ globalUniformDefaults.clear();
+ globalUniformDefaults.layoutMatrix = ElmColumnMajor;
+ globalUniformDefaults.layoutPacking = vulkan > 0 ? ElpStd140 : ElpShared;
+
+ globalBufferDefaults.clear();
+ globalBufferDefaults.layoutMatrix = ElmColumnMajor;
+ globalBufferDefaults.layoutPacking = vulkan > 0 ? ElpStd430 : ElpShared;
+
+ globalInputDefaults.clear();
+ globalOutputDefaults.clear();
+
+ // "Shaders in the transform
+ // feedback capturing mode have an initial global default of
+ // layout(xfb_buffer = 0) out;"
+ if (language == EShLangVertex ||
+ language == EShLangTessControl ||
+ language == EShLangTessEvaluation ||
+ language == EShLangGeometry)
+ globalOutputDefaults.layoutXfbBuffer = 0;
+
+ if (language == EShLangGeometry)
+ globalOutputDefaults.layoutStream = 0;
+}
+
+HlslParseContext::~HlslParseContext()
+{
+}
+
+void HlslParseContext::setLimits(const TBuiltInResource& r)
+{
+ resources = r;
+ intermediate.setLimits(resources);
+}
+
+//
+// Parse an array of strings using the parser in HlslRules.
+//
+// Returns true for successful acceptance of the shader, false if any errors.
+//
+bool HlslParseContext::parseShaderStrings(TPpContext& ppContext, TInputScanner& input, bool versionWillBeError)
+{
+ currentScanner = &input;
+ ppContext.setInput(input, versionWillBeError);
+
+ HlslScanContext::fillInKeywordMap(); // TODO: right place, and include the delete too
+
+ HlslScanContext scanContext(*this, ppContext);
+ HlslGrammar grammar(scanContext, *this);
+ if (! grammar.parse())
+ printf("HLSL translation failed.\n");
+
+ return numErrors == 0;
+}
+
+void HlslParseContext::handlePragma(const TSourceLoc& loc, const TVector<TString>& tokens)
+{
+ if (pragmaCallback)
+ pragmaCallback(loc.line, tokens);
+
+ if (tokens.size() == 0)
+ return;
+}
+
+//
+// Look at a '.' field selector string and change it into offsets
+// for a vector or scalar
+//
+// Returns true if there is no error.
+//
+bool HlslParseContext::parseVectorFields(const TSourceLoc& loc, const TString& compString, int vecSize, TVectorFields& fields)
+{
+ fields.num = (int)compString.size();
+ if (fields.num > 4) {
+ error(loc, "illegal vector field selection", compString.c_str(), "");
+ return false;
+ }
+
+ enum {
+ exyzw,
+ ergba,
+ estpq,
+ } fieldSet[4];
+
+ for (int i = 0; i < fields.num; ++i) {
+ switch (compString[i]) {
+ case 'x':
+ fields.offsets[i] = 0;
+ fieldSet[i] = exyzw;
+ break;
+ case 'r':
+ fields.offsets[i] = 0;
+ fieldSet[i] = ergba;
+ break;
+ case 's':
+ fields.offsets[i] = 0;
+ fieldSet[i] = estpq;
+ break;
+ case 'y':
+ fields.offsets[i] = 1;
+ fieldSet[i] = exyzw;
+ break;
+ case 'g':
+ fields.offsets[i] = 1;
+ fieldSet[i] = ergba;
+ break;
+ case 't':
+ fields.offsets[i] = 1;
+ fieldSet[i] = estpq;
+ break;
+ case 'z':
+ fields.offsets[i] = 2;
+ fieldSet[i] = exyzw;
+ break;
+ case 'b':
+ fields.offsets[i] = 2;
+ fieldSet[i] = ergba;
+ break;
+ case 'p':
+ fields.offsets[i] = 2;
+ fieldSet[i] = estpq;
+ break;
+
+ case 'w':
+ fields.offsets[i] = 3;
+ fieldSet[i] = exyzw;
+ break;
+ case 'a':
+ fields.offsets[i] = 3;
+ fieldSet[i] = ergba;
+ break;
+ case 'q':
+ fields.offsets[i] = 3;
+ fieldSet[i] = estpq;
+ break;
+ default:
+ error(loc, "illegal vector field selection", compString.c_str(), "");
+ return false;
+ }
+ }
+
+ for (int i = 0; i < fields.num; ++i) {
+ if (fields.offsets[i] >= vecSize) {
+ error(loc, "vector field selection out of range", compString.c_str(), "");
+ return false;
+ }
+
+ if (i > 0) {
+ if (fieldSet[i] != fieldSet[i - 1]) {
+ error(loc, "illegal - vector component fields not from the same set", compString.c_str(), "");
+ return false;
+ }
+ }
+ }
+
+ return true;
+}
+
+//
+// Used to output syntax, parsing, and semantic errors.
+//
+
+void HlslParseContext::outputMessage(const TSourceLoc& loc, const char* szReason,
+ const char* szToken,
+ const char* szExtraInfoFormat,
+ TPrefixType prefix, va_list args)
+{
+ const int maxSize = MaxTokenLength + 200;
+ char szExtraInfo[maxSize];
+
+ safe_vsprintf(szExtraInfo, maxSize, szExtraInfoFormat, args);
+
+ infoSink.info.prefix(prefix);
+ infoSink.info.location(loc);
+ infoSink.info << "'" << szToken << "' : " << szReason << " " << szExtraInfo << "\n";
+
+ if (prefix == EPrefixError) {
+ ++numErrors;
+ }
+}
+
+void C_DECL HlslParseContext::error(const TSourceLoc& loc, const char* szReason, const char* szToken,
+ const char* szExtraInfoFormat, ...)
+{
+ if (messages & EShMsgOnlyPreprocessor)
+ return;
+ va_list args;
+ va_start(args, szExtraInfoFormat);
+ outputMessage(loc, szReason, szToken, szExtraInfoFormat, EPrefixError, args);
+ va_end(args);
+}
+
+void C_DECL HlslParseContext::warn(const TSourceLoc& loc, const char* szReason, const char* szToken,
+ const char* szExtraInfoFormat, ...)
+{
+ if (suppressWarnings())
+ return;
+ va_list args;
+ va_start(args, szExtraInfoFormat);
+ outputMessage(loc, szReason, szToken, szExtraInfoFormat, EPrefixWarning, args);
+ va_end(args);
+}
+
+void C_DECL HlslParseContext::ppError(const TSourceLoc& loc, const char* szReason, const char* szToken,
+ const char* szExtraInfoFormat, ...)
+{
+ va_list args;
+ va_start(args, szExtraInfoFormat);
+ outputMessage(loc, szReason, szToken, szExtraInfoFormat, EPrefixError, args);
+ va_end(args);
+}
+
+void C_DECL HlslParseContext::ppWarn(const TSourceLoc& loc, const char* szReason, const char* szToken,
+ const char* szExtraInfoFormat, ...)
+{
+ va_list args;
+ va_start(args, szExtraInfoFormat);
+ outputMessage(loc, szReason, szToken, szExtraInfoFormat, EPrefixWarning, args);
+ va_end(args);
+}
+
+//
+// Handle seeing a variable identifier in the grammar.
+//
+TIntermTyped* HlslParseContext::handleVariable(const TSourceLoc& loc, TSymbol* symbol, const TString* string)
+{
+ if (symbol == nullptr)
+ symbol = symbolTable.find(*string);
+ if (symbol && symbol->getAsVariable() && symbol->getAsVariable()->isUserType()) {
+ error(loc, "expected symbol, not user-defined type", string->c_str(), "");
+ return nullptr;
+ }
+
+ // Error check for requiring specific extensions present.
+ if (symbol && symbol->getNumExtensions())
+ requireExtensions(loc, symbol->getNumExtensions(), symbol->getExtensions(), symbol->getName().c_str());
+
+ if (symbol && symbol->isReadOnly()) {
+ // All shared things containing an implicitly sized array must be copied up
+ // on first use, so that all future references will share its array structure,
+ // so that editing the implicit size will effect all nodes consuming it,
+ // and so that editing the implicit size won't change the shared one.
+ //
+ // If this is a variable or a block, check it and all it contains, but if this
+ // is a member of an anonymous block, check the whole block, as the whole block
+ // will need to be copied up if it contains an implicitly-sized array.
+ if (symbol->getType().containsImplicitlySizedArray() || (symbol->getAsAnonMember() && symbol->getAsAnonMember()->getAnonContainer().getType().containsImplicitlySizedArray()))
+ makeEditable(symbol);
+ }
+
+ const TVariable* variable;
+ const TAnonMember* anon = symbol ? symbol->getAsAnonMember() : nullptr;
+ TIntermTyped* node = nullptr;
+ if (anon) {
+ // It was a member of an anonymous container.
+
+ // Create a subtree for its dereference.
+ variable = anon->getAnonContainer().getAsVariable();
+ TIntermTyped* container = intermediate.addSymbol(*variable, loc);
+ TIntermTyped* constNode = intermediate.addConstantUnion(anon->getMemberNumber(), loc);
+ node = intermediate.addIndex(EOpIndexDirectStruct, container, constNode, loc);
+
+ node->setType(*(*variable->getType().getStruct())[anon->getMemberNumber()].type);
+ if (node->getType().hiddenMember())
+ error(loc, "member of nameless block was not redeclared", string->c_str(), "");
+ } else {
+ // Not a member of an anonymous container.
+
+ // The symbol table search was done in the lexical phase.
+ // See if it was a variable.
+ variable = symbol ? symbol->getAsVariable() : nullptr;
+ if (variable) {
+ if ((variable->getType().getBasicType() == EbtBlock ||
+ variable->getType().getBasicType() == EbtStruct) && variable->getType().getStruct() == nullptr) {
+ error(loc, "cannot be used (maybe an instance name is needed)", string->c_str(), "");
+ variable = nullptr;
+ }
+ } else {
+ if (symbol)
+ error(loc, "variable name expected", string->c_str(), "");
+ }
+
+ // Recovery, if it wasn't found or was not a variable.
+ if (! variable)
+ variable = new TVariable(string, TType(EbtVoid));
+
+ if (variable->getType().getQualifier().isFrontEndConstant())
+ node = intermediate.addConstantUnion(variable->getConstArray(), variable->getType(), loc);
+ else
+ node = intermediate.addSymbol(*variable, loc);
+ }
+
+ if (variable->getType().getQualifier().isIo())
+ intermediate.addIoAccessed(*string);
+
+ return node;
+}
+
+//
+// Handle seeing a base[index] dereference in the grammar.
+//
+TIntermTyped* HlslParseContext::handleBracketDereference(const TSourceLoc& loc, TIntermTyped* base, TIntermTyped* index)
+{
+ TIntermTyped* result = nullptr;
+
+ int indexValue = 0;
+ if (index->getQualifier().storage == EvqConst) {
+ indexValue = index->getAsConstantUnion()->getConstArray()[0].getIConst();
+ checkIndex(loc, base->getType(), indexValue);
+ }
+
+ variableCheck(base);
+ if (! base->isArray() && ! base->isMatrix() && ! base->isVector()) {
+ if (base->getAsSymbolNode())
+ error(loc, " left of '[' is not of type array, matrix, or vector ", base->getAsSymbolNode()->getName().c_str(), "");
+ else
+ error(loc, " left of '[' is not of type array, matrix, or vector ", "expression", "");
+ } else if (base->getType().getQualifier().storage == EvqConst && index->getQualifier().storage == EvqConst)
+ return intermediate.foldDereference(base, indexValue, loc);
+ else {
+ // at least one of base and index is variable...
+
+ if (base->getAsSymbolNode() && isIoResizeArray(base->getType()))
+ handleIoResizeArrayAccess(loc, base);
+
+ if (index->getQualifier().storage == EvqConst) {
+ if (base->getType().isImplicitlySizedArray())
+ updateImplicitArraySize(loc, base, indexValue);
+ result = intermediate.addIndex(EOpIndexDirect, base, index, loc);
+ } else {
+ result = intermediate.addIndex(EOpIndexIndirect, base, index, loc);
+ }
+ }
+
+ if (result == nullptr) {
+ // Insert dummy error-recovery result
+ result = intermediate.addConstantUnion(0.0, EbtFloat, loc);
+ } else {
+ // Insert valid dereferenced result
+ TType newType(base->getType(), 0); // dereferenced type
+ if (base->getType().getQualifier().storage == EvqConst && index->getQualifier().storage == EvqConst)
+ newType.getQualifier().storage = EvqConst;
+ else
+ newType.getQualifier().storage = EvqTemporary;
+ result->setType(newType);
+ }
+
+ return result;
+}
+
+void HlslParseContext::checkIndex(const TSourceLoc& loc, const TType& type, int& index)
+{
+ // HLSL todo: any rules for index fixups?
+}
+
+// Make a shared symbol have a non-shared version that can be edited by the current
+// compile, such that editing its type will not change the shared version and will
+// effect all nodes sharing it.
+void HlslParseContext::makeEditable(TSymbol*& symbol)
+{
+ // copyUp() does a deep copy of the type.
+ symbol = symbolTable.copyUp(symbol);
+
+ // Also, see if it's tied to IO resizing
+ if (isIoResizeArray(symbol->getType()))
+ ioArraySymbolResizeList.push_back(symbol);
+
+ // Also, save it in the AST for linker use.
+ intermediate.addSymbolLinkageNode(linkage, *symbol);
+}
+
+TVariable* HlslParseContext::getEditableVariable(const char* name)
+{
+ bool builtIn;
+ TSymbol* symbol = symbolTable.find(name, &builtIn);
+ if (builtIn)
+ makeEditable(symbol);
+
+ return symbol->getAsVariable();
+}
+
+// Return true if this is a geometry shader input array or tessellation control output array.
+bool HlslParseContext::isIoResizeArray(const TType& type) const
+{
+ return type.isArray() &&
+ ((language == EShLangGeometry && type.getQualifier().storage == EvqVaryingIn) ||
+ (language == EShLangTessControl && type.getQualifier().storage == EvqVaryingOut && ! type.getQualifier().patch));
+}
+
+// If an array is not isIoResizeArray() but is an io array, make sure it has the right size
+void HlslParseContext::fixIoArraySize(const TSourceLoc& loc, TType& type)
+{
+ if (! type.isArray() || type.getQualifier().patch || symbolTable.atBuiltInLevel())
+ return;
+
+ assert(! isIoResizeArray(type));
+
+ if (type.getQualifier().storage != EvqVaryingIn || type.getQualifier().patch)
+ return;
+
+ if (language == EShLangTessControl || language == EShLangTessEvaluation) {
+ if (type.getOuterArraySize() != resources.maxPatchVertices) {
+ if (type.isExplicitlySizedArray())
+ error(loc, "tessellation input array size must be gl_MaxPatchVertices or implicitly sized", "[]", "");
+ type.changeOuterArraySize(resources.maxPatchVertices);
+ }
+ }
+}
+
+// Handle a dereference of a geometry shader input array or tessellation control output array.
+// See ioArraySymbolResizeList comment in ParseHelper.h.
+//
+void HlslParseContext::handleIoResizeArrayAccess(const TSourceLoc& /*loc*/, TIntermTyped* base)
+{
+ TIntermSymbol* symbolNode = base->getAsSymbolNode();
+ assert(symbolNode);
+ if (! symbolNode)
+ return;
+
+ // fix array size, if it can be fixed and needs to be fixed (will allow variable indexing)
+ if (symbolNode->getType().isImplicitlySizedArray()) {
+ int newSize = getIoArrayImplicitSize();
+ if (newSize > 0)
+ symbolNode->getWritableType().changeOuterArraySize(newSize);
+ }
+}
+
+// If there has been an input primitive declaration (geometry shader) or an output
+// number of vertices declaration(tessellation shader), make sure all input array types
+// match it in size. Types come either from nodes in the AST or symbols in the
+// symbol table.
+//
+// Types without an array size will be given one.
+// Types already having a size that is wrong will get an error.
+//
+void HlslParseContext::checkIoArraysConsistency(const TSourceLoc& loc, bool tailOnly)
+{
+ int requiredSize = getIoArrayImplicitSize();
+ if (requiredSize == 0)
+ return;
+
+ const char* feature;
+ if (language == EShLangGeometry)
+ feature = TQualifier::getGeometryString(intermediate.getInputPrimitive());
+ else if (language == EShLangTessControl)
+ feature = "vertices";
+ else
+ feature = "unknown";
+
+ if (tailOnly) {
+ checkIoArrayConsistency(loc, requiredSize, feature, ioArraySymbolResizeList.back()->getWritableType(), ioArraySymbolResizeList.back()->getName());
+ return;
+ }
+
+ for (size_t i = 0; i < ioArraySymbolResizeList.size(); ++i)
+ checkIoArrayConsistency(loc, requiredSize, feature, ioArraySymbolResizeList[i]->getWritableType(), ioArraySymbolResizeList[i]->getName());
+}
+
+int HlslParseContext::getIoArrayImplicitSize() const
+{
+ if (language == EShLangGeometry)
+ return TQualifier::mapGeometryToSize(intermediate.getInputPrimitive());
+ else if (language == EShLangTessControl)
+ return intermediate.getVertices() != TQualifier::layoutNotSet ? intermediate.getVertices() : 0;
+ else
+ return 0;
+}
+
+void HlslParseContext::checkIoArrayConsistency(const TSourceLoc& loc, int requiredSize, const char* feature, TType& type, const TString& name)
+{
+ if (type.isImplicitlySizedArray())
+ type.changeOuterArraySize(requiredSize);
+}
+
+// Handle seeing a binary node with a math operation.
+TIntermTyped* HlslParseContext::handleBinaryMath(const TSourceLoc& loc, const char* str, TOperator op, TIntermTyped* left, TIntermTyped* right)
+{
+ TIntermTyped* result = intermediate.addBinaryMath(op, left, right, loc);
+ if (! result)
+ binaryOpError(loc, str, left->getCompleteString(), right->getCompleteString());
+
+ return result;
+}
+
+// Handle seeing a unary node with a math operation.
+TIntermTyped* HlslParseContext::handleUnaryMath(const TSourceLoc& loc, const char* str, TOperator op, TIntermTyped* childNode)
+{
+ TIntermTyped* result = intermediate.addUnaryMath(op, childNode, loc);
+
+ if (result)
+ return result;
+ else
+ unaryOpError(loc, str, childNode->getCompleteString());
+
+ return childNode;
+}
+
+//
+// Handle seeing a base.field dereference in the grammar.
+//
+TIntermTyped* HlslParseContext::handleDotDereference(const TSourceLoc& loc, TIntermTyped* base, const TString& field)
+{
+ variableCheck(base);
+
+ //
+ // .length() can't be resolved until we later see the function-calling syntax.
+ // Save away the name in the AST for now. Processing is completed in
+ // handleLengthMethod().
+ //
+ if (field == "length") {
+ return intermediate.addMethod(base, TType(EbtInt), &field, loc);
+ }
+
+ // It's not .length() if we get to here.
+
+ if (base->isArray()) {
+ error(loc, "cannot apply to an array:", ".", field.c_str());
+
+ return base;
+ }
+
+ // It's neither an array nor .length() if we get here,
+ // leaving swizzles and struct/block dereferences.
+
+ TIntermTyped* result = base;
+ if (base->isVector() || base->isScalar()) {
+ TVectorFields fields;
+ if (! parseVectorFields(loc, field, base->getVectorSize(), fields)) {
+ fields.num = 1;
+ fields.offsets[0] = 0;
+ }
+
+ if (base->isScalar()) {
+ if (fields.num == 1)
+ return result;
+ else {
+ TType type(base->getBasicType(), EvqTemporary, fields.num);
+ return addConstructor(loc, base, type, mapTypeToConstructorOp(type));
+ }
+ }
+
+ if (base->getType().getQualifier().isFrontEndConstant())
+ result = intermediate.foldSwizzle(base, fields, loc);
+ else {
+ if (fields.num == 1) {
+ TIntermTyped* index = intermediate.addConstantUnion(fields.offsets[0], loc);
+ result = intermediate.addIndex(EOpIndexDirect, base, index, loc);
+ result->setType(TType(base->getBasicType(), EvqTemporary, base->getType().getQualifier().precision));
+ } else {
+ TString vectorString = field;
+ TIntermTyped* index = intermediate.addSwizzle(fields, loc);
+ result = intermediate.addIndex(EOpVectorSwizzle, base, index, loc);
+ result->setType(TType(base->getBasicType(), EvqTemporary, base->getType().getQualifier().precision, (int)vectorString.size()));
+ }
+ }
+ } else if (base->getBasicType() == EbtStruct || base->getBasicType() == EbtBlock) {
+ const TTypeList* fields = base->getType().getStruct();
+ bool fieldFound = false;
+ int member;
+ for (member = 0; member < (int)fields->size(); ++member) {
+ if ((*fields)[member].type->getFieldName() == field) {
+ fieldFound = true;
+ break;
+ }
+ }
+ if (fieldFound) {
+ if (base->getType().getQualifier().storage == EvqConst)
+ result = intermediate.foldDereference(base, member, loc);
+ else {
+ TIntermTyped* index = intermediate.addConstantUnion(member, loc);
+ result = intermediate.addIndex(EOpIndexDirectStruct, base, index, loc);
+ result->setType(*(*fields)[member].type);
+ }
+ } else
+ error(loc, "no such field in structure", field.c_str(), "");
+ } else
+ error(loc, "does not apply to this type:", field.c_str(), base->getType().getCompleteString().c_str());
+
+ return result;
+}
+
+//
+// Handle seeing a function declarator in the grammar. This is the precursor
+// to recognizing a function prototype or function definition.
+//
+TFunction* HlslParseContext::handleFunctionDeclarator(const TSourceLoc& loc, TFunction& function, bool prototype)
+{
+ //
+ // Multiple declarations of the same function name are allowed.
+ //
+ // If this is a definition, the definition production code will check for redefinitions
+ // (we don't know at this point if it's a definition or not).
+ //
+ // Redeclarations (full signature match) are allowed. But, return types and parameter qualifiers must also match.
+ // - except ES 100, which only allows a single prototype
+ //
+ // ES 100 does not allow redefining, but does allow overloading of built-in functions.
+ // ES 300 does not allow redefining or overloading of built-in functions.
+ //
+ bool builtIn;
+ TSymbol* symbol = symbolTable.find(function.getMangledName(), &builtIn);
+ const TFunction* prevDec = symbol ? symbol->getAsFunction() : 0;
+
+ if (prototype) {
+ // All built-in functions are defined, even though they don't have a body.
+ // Count their prototype as a definition instead.
+ if (symbolTable.atBuiltInLevel())
+ function.setDefined();
+ else {
+ if (prevDec && ! builtIn)
+ symbol->getAsFunction()->setPrototyped(); // need a writable one, but like having prevDec as a const
+ function.setPrototyped();
+ }
+ }
+
+ // This insert won't actually insert it if it's a duplicate signature, but it will still check for
+ // other forms of name collisions.
+ if (! symbolTable.insert(function))
+ error(loc, "function name is redeclaration of existing name", function.getName().c_str(), "");
+
+ //
+ // If this is a redeclaration, it could also be a definition,
+ // in which case, we need to use the parameter names from this one, and not the one that's
+ // being redeclared. So, pass back this declaration, not the one in the symbol table.
+ //
+ return &function;
+}
+
+//
+// Handle seeing the function prototype in front of a function definition in the grammar.
+// The body is handled after this function returns.
+//
+TIntermAggregate* HlslParseContext::handleFunctionDefinition(const TSourceLoc& loc, TFunction& function)
+{
+ currentCaller = function.getMangledName();
+ TSymbol* symbol = symbolTable.find(function.getMangledName());
+ TFunction* prevDec = symbol ? symbol->getAsFunction() : nullptr;
+
+ if (! prevDec)
+ error(loc, "can't find function", function.getName().c_str(), "");
+ // Note: 'prevDec' could be 'function' if this is the first time we've seen function
+ // as it would have just been put in the symbol table. Otherwise, we're looking up
+ // an earlier occurrence.
+
+ if (prevDec && prevDec->isDefined()) {
+ // Then this function already has a body.
+ error(loc, "function already has a body", function.getName().c_str(), "");
+ }
+ if (prevDec && ! prevDec->isDefined()) {
+ prevDec->setDefined();
+
+ // Remember the return type for later checking for RETURN statements.
+ currentFunctionType = &(prevDec->getType());
+ } else
+ currentFunctionType = new TType(EbtVoid);
+ functionReturnsValue = false;
+
+ inEntrypoint = (function.getName() == intermediate.getEntryPoint().c_str());
+
+ //
+ // New symbol table scope for body of function plus its arguments
+ //
+ pushScope();
+
+ //
+ // Insert parameters into the symbol table.
+ // If the parameter has no name, it's not an error, just don't insert it
+ // (could be used for unused args).
+ //
+ // Also, accumulate the list of parameters into the HIL, so lower level code
+ // knows where to find parameters.
+ //
+ TIntermAggregate* paramNodes = new TIntermAggregate;
+ for (int i = 0; i < function.getParamCount(); i++) {
+ TParameter& param = function[i];
+ if (param.name != nullptr) {
+ TVariable *variable = new TVariable(param.name, *param.type);
+
+ // Insert the parameters with name in the symbol table.
+ if (! symbolTable.insert(*variable))
+ error(loc, "redefinition", variable->getName().c_str(), "");
+ else {
+ // Transfer ownership of name pointer to symbol table.
+ param.name = nullptr;
+
+ // Add the parameter to the HIL
+ paramNodes = intermediate.growAggregate(paramNodes,
+ intermediate.addSymbol(*variable, loc),
+ loc);
+ }
+ } else
+ paramNodes = intermediate.growAggregate(paramNodes, intermediate.addSymbol(*param.type, loc), loc);
+ }
+ intermediate.setAggregateOperator(paramNodes, EOpParameters, TType(EbtVoid), loc);
+ loopNestingLevel = 0;
+ controlFlowNestingLevel = 0;
+ postMainReturn = false;
+
+ return paramNodes;
+}
+
+void HlslParseContext::handleFunctionArgument(TFunction* function, TIntermTyped*& arguments, TIntermTyped* newArg)
+{
+ TParameter param = { 0, new TType };
+ param.type->shallowCopy(newArg->getType());
+ function->addParameter(param);
+ if (arguments)
+ arguments = intermediate.growAggregate(arguments, newArg);
+ else
+ arguments = newArg;
+}
+
+// Optionally decompose intrinsics to AST opcodes.
+//
+void HlslParseContext::decomposeIntrinsic(const TSourceLoc& loc, TIntermTyped*& node, TIntermNode* arguments)
+{
+ // HLSL intrinsics can be pass through to native AST opcodes, or decomposed here to existing AST
+ // opcodes for compatibility with existing software stacks.
+ static const bool decomposeHlslIntrinsics = true;
+
+ if (!decomposeHlslIntrinsics || !node || !node->getAsOperator())
+ return;
+
+ const TIntermAggregate* argAggregate = arguments ? arguments->getAsAggregate() : nullptr;
+ TIntermUnary* fnUnary = node->getAsUnaryNode();
+ const TOperator op = node->getAsOperator()->getOp();
+
+ switch (op) {
+ case EOpGenMul:
+ {
+ // mul(a,b) -> MatrixTimesMatrix, MatrixTimesVector, MatrixTimesScalar, VectorTimesScalar, Dot, Mul
+ TIntermTyped* arg0 = argAggregate->getSequence()[0]->getAsTyped();
+ TIntermTyped* arg1 = argAggregate->getSequence()[1]->getAsTyped();
+
+ if (arg0->isVector() && arg1->isVector()) { // vec * vec
+ node->getAsAggregate()->setOperator(EOpDot);
+ } else {
+ node = handleBinaryMath(loc, "mul", EOpMul, arg0, arg1);
+ }
+
+ break;
+ }
+
+ case EOpRcp:
+ {
+ // rcp(a) -> 1 / a
+ TIntermTyped* arg0 = fnUnary->getOperand();
+ TBasicType type0 = arg0->getBasicType();
+ TIntermTyped* one = intermediate.addConstantUnion(1, type0, loc, true);
+ node = handleBinaryMath(loc, "rcp", EOpDiv, one, arg0);
+
+ break;
+ }
+
+ case EOpSaturate:
+ {
+ // saturate(a) -> clamp(a,0,1)
+ TIntermTyped* arg0 = fnUnary->getOperand();
+ TBasicType type0 = arg0->getBasicType();
+ TIntermAggregate* clamp = new TIntermAggregate(EOpClamp);
+
+ clamp->getSequence().push_back(arg0);
+ clamp->getSequence().push_back(intermediate.addConstantUnion(0, type0, loc, true));
+ clamp->getSequence().push_back(intermediate.addConstantUnion(1, type0, loc, true));
+ clamp->setLoc(loc);
+ clamp->setType(node->getType());
+ node = clamp;
+
+ break;
+ }
+
+ case EOpSinCos:
+ {
+ // sincos(a,b,c) -> b = sin(a), c = cos(a)
+ TIntermTyped* arg0 = argAggregate->getSequence()[0]->getAsTyped();
+ TIntermTyped* arg1 = argAggregate->getSequence()[1]->getAsTyped();
+ TIntermTyped* arg2 = argAggregate->getSequence()[2]->getAsTyped();
+
+ TIntermTyped* sinStatement = handleUnaryMath(loc, "sin", EOpSin, arg0);
+ TIntermTyped* cosStatement = handleUnaryMath(loc, "cos", EOpCos, arg0);
+ TIntermTyped* sinAssign = intermediate.addAssign(EOpAssign, arg1, sinStatement, loc);
+ TIntermTyped* cosAssign = intermediate.addAssign(EOpAssign, arg2, cosStatement, loc);
+
+ TIntermAggregate* compoundStatement = intermediate.makeAggregate(sinAssign, loc);
+ compoundStatement = intermediate.growAggregate(compoundStatement, cosAssign);
+ compoundStatement->setOperator(EOpSequence);
+ compoundStatement->setLoc(loc);
+
+ node = compoundStatement;
+
+ break;
+ }
+
+ case EOpClip:
+ {
+ // clip(a) -> if (any(a<0)) discard;
+ TIntermTyped* arg0 = fnUnary->getOperand();
+ TBasicType type0 = arg0->getBasicType();
+ TIntermTyped* compareNode = nullptr;
+
+ // For non-scalars: per experiment with FXC compiler, discard if any component < 0.
+ if (!arg0->isScalar()) {
+ // component-wise compare: a < 0
+ TIntermAggregate* less = new TIntermAggregate(EOpLessThan);
+ less->getSequence().push_back(arg0);
+ less->setLoc(loc);
+
+ // make vec or mat of bool matching dimensions of input
+ less->setType(TType(EbtBool, EvqTemporary,
+ arg0->getType().getVectorSize(),
+ arg0->getType().getMatrixCols(),
+ arg0->getType().getMatrixRows(),
+ arg0->getType().isVector()));
+
+ // calculate # of components for comparison const
+ const int constComponentCount =
+ std::max(arg0->getType().getVectorSize(), 1) *
+ std::max(arg0->getType().getMatrixCols(), 1) *
+ std::max(arg0->getType().getMatrixRows(), 1);
+
+ TConstUnion zero;
+ zero.setDConst(0.0);
+ TConstUnionArray zeros(constComponentCount, zero);
+
+ less->getSequence().push_back(intermediate.addConstantUnion(zeros, arg0->getType(), loc, true));
+
+ compareNode = intermediate.addBuiltInFunctionCall(loc, EOpAny, true, less, TType(EbtBool));
+ } else {
+ TIntermTyped* zero = intermediate.addConstantUnion(0, type0, loc, true);
+ compareNode = handleBinaryMath(loc, "clip", EOpLessThan, arg0, zero);
+ }
+
+ TIntermBranch* killNode = intermediate.addBranch(EOpKill, loc);
+
+ node = new TIntermSelection(compareNode, killNode, nullptr);
+ node->setLoc(loc);
+
+ break;
+ }
+
+ case EOpLog10:
+ {
+ // log10(a) -> log2(a) * 0.301029995663981 (== 1/log2(10))
+ TIntermTyped* arg0 = fnUnary->getOperand();
+ TIntermTyped* log2 = handleUnaryMath(loc, "log2", EOpLog2, arg0);
+ TIntermTyped* base = intermediate.addConstantUnion(0.301029995663981f, EbtFloat, loc, true);
+
+ node = handleBinaryMath(loc, "mul", EOpMul, log2, base);
+
+ break;
+ }
+
+ case EOpDst:
+ {
+ // dest.x = 1;
+ // dest.y = src0.y * src1.y;
+ // dest.z = src0.z;
+ // dest.w = src1.w;
+
+ TIntermTyped* arg0 = argAggregate->getSequence()[0]->getAsTyped();
+ TIntermTyped* arg1 = argAggregate->getSequence()[1]->getAsTyped();
+ TBasicType type0 = arg0->getBasicType();
+
+ TIntermTyped* x = intermediate.addConstantUnion(0, loc, true);
+ TIntermTyped* y = intermediate.addConstantUnion(1, loc, true);
+ TIntermTyped* z = intermediate.addConstantUnion(2, loc, true);
+ TIntermTyped* w = intermediate.addConstantUnion(3, loc, true);
+
+ TIntermTyped* src0y = intermediate.addIndex(EOpIndexDirect, arg0, y, loc);
+ TIntermTyped* src1y = intermediate.addIndex(EOpIndexDirect, arg1, y, loc);
+ TIntermTyped* src0z = intermediate.addIndex(EOpIndexDirect, arg0, z, loc);
+ TIntermTyped* src1w = intermediate.addIndex(EOpIndexDirect, arg1, w, loc);
+
+ TIntermAggregate* dst = new TIntermAggregate(EOpConstructVec4);
+
+ dst->getSequence().push_back(intermediate.addConstantUnion(1.0, EbtFloat, loc, true));
+ dst->getSequence().push_back(handleBinaryMath(loc, "mul", EOpMul, src0y, src1y));
+ dst->getSequence().push_back(src0z);
+ dst->getSequence().push_back(src1w);
+ dst->setLoc(loc);
+ node = dst;
+
+ break;
+ }
+
+ default:
+ break; // most pass through unchanged
+ }
+}
+
+//
+// Handle seeing function call syntax in the grammar, which could be any of
+// - .length() method
+// - constructor
+// - a call to a built-in function mapped to an operator
+// - a call to a built-in function that will remain a function call (e.g., texturing)
+// - user function
+// - subroutine call (not implemented yet)
+//
+TIntermTyped* HlslParseContext::handleFunctionCall(const TSourceLoc& loc, TFunction* function, TIntermNode* arguments)
+{
+ TIntermTyped* result = nullptr;
+
+ TOperator op = function->getBuiltInOp();
+ if (op == EOpArrayLength)
+ result = handleLengthMethod(loc, function, arguments);
+ else if (op != EOpNull) {
+ //
+ // Then this should be a constructor.
+ // Don't go through the symbol table for constructors.
+ // Their parameters will be verified algorithmically.
+ //
+ TType type(EbtVoid); // use this to get the type back
+ if (! constructorError(loc, arguments, *function, op, type)) {
+ //
+ // It's a constructor, of type 'type'.
+ //
+ result = addConstructor(loc, arguments, type, op);
+ if (result == nullptr)
+ error(loc, "cannot construct with these arguments", type.getCompleteString().c_str(), "");
+ }
+ } else {
+ //
+ // Find it in the symbol table.
+ //
+ const TFunction* fnCandidate;
+ bool builtIn;
+ fnCandidate = findFunction(loc, *function, builtIn);
+ if (fnCandidate) {
+ // This is a declared function that might map to
+ // - a built-in operator,
+ // - a built-in function not mapped to an operator, or
+ // - a user function.
+
+ // Error check for a function requiring specific extensions present.
+ if (builtIn && fnCandidate->getNumExtensions())
+ requireExtensions(loc, fnCandidate->getNumExtensions(), fnCandidate->getExtensions(), fnCandidate->getName().c_str());
+
+ if (arguments) {
+ // Make sure qualifications work for these arguments.
+ TIntermAggregate* aggregate = arguments->getAsAggregate();
+ for (int i = 0; i < fnCandidate->getParamCount(); ++i) {
+ // At this early point there is a slight ambiguity between whether an aggregate 'arguments'
+ // is the single argument itself or its children are the arguments. Only one argument
+ // means take 'arguments' itself as the one argument.
+ TIntermNode* arg = fnCandidate->getParamCount() == 1 ? arguments : (aggregate ? aggregate->getSequence()[i] : arguments);
+ TQualifier& formalQualifier = (*fnCandidate)[i].type->getQualifier();
+ TQualifier& argQualifier = arg->getAsTyped()->getQualifier();
+ }
+
+ // Convert 'in' arguments
+ addInputArgumentConversions(*fnCandidate, arguments); // arguments may be modified if it's just a single argument node
+ }
+
+ op = fnCandidate->getBuiltInOp();
+ if (builtIn && op != EOpNull) {
+ // A function call mapped to a built-in operation.
+ result = intermediate.addBuiltInFunctionCall(loc, op, fnCandidate->getParamCount() == 1, arguments, fnCandidate->getType());
+ if (result == nullptr) {
+ error(arguments->getLoc(), " wrong operand type", "Internal Error",
+ "built in unary operator function. Type: %s",
+ static_cast<TIntermTyped*>(arguments)->getCompleteString().c_str());
+ } else if (result->getAsOperator()) {
+ builtInOpCheck(loc, *fnCandidate, *result->getAsOperator());
+ }
+ } else {
+ // This is a function call not mapped to built-in operator.
+ // It could still be a built-in function, but only if PureOperatorBuiltins == false.
+ result = intermediate.setAggregateOperator(arguments, EOpFunctionCall, fnCandidate->getType(), loc);
+ TIntermAggregate* call = result->getAsAggregate();
+ call->setName(fnCandidate->getMangledName());
+
+ // this is how we know whether the given function is a built-in function or a user-defined function
+ // if builtIn == false, it's a userDefined -> could be an overloaded built-in function also
+ // if builtIn == true, it's definitely a built-in function with EOpNull
+ if (! builtIn) {
+ call->setUserDefined();
+ intermediate.addToCallGraph(infoSink, currentCaller, fnCandidate->getMangledName());
+ }
+ }
+
+ // Convert 'out' arguments. If it was a constant folded built-in, it won't be an aggregate anymore.
+ // Built-ins with a single argument aren't called with an aggregate, but they also don't have an output.
+ // Also, build the qualifier list for user function calls, which are always called with an aggregate.
+ if (result->getAsAggregate()) {
+ TQualifierList& qualifierList = result->getAsAggregate()->getQualifierList();
+ for (int i = 0; i < fnCandidate->getParamCount(); ++i) {
+ TStorageQualifier qual = (*fnCandidate)[i].type->getQualifier().storage;
+ qualifierList.push_back(qual);
+ }
+ result = addOutputArgumentConversions(*fnCandidate, *result->getAsAggregate());
+ }
+
+ decomposeIntrinsic(loc, result, arguments);
+ }
+ }
+
+ // generic error recovery
+ // TODO: simplification: localize all the error recoveries that look like this, and taking type into account to reduce cascades
+ if (result == nullptr)
+ result = intermediate.addConstantUnion(0.0, EbtFloat, loc);
+
+ return result;
+}
+
+// Finish processing object.length(). This started earlier in handleDotDereference(), where
+// the ".length" part was recognized and semantically checked, and finished here where the
+// function syntax "()" is recognized.
+//
+// Return resulting tree node.
+TIntermTyped* HlslParseContext::handleLengthMethod(const TSourceLoc& loc, TFunction* function, TIntermNode* intermNode)
+{
+ int length = 0;
+
+ if (function->getParamCount() > 0)
+ error(loc, "method does not accept any arguments", function->getName().c_str(), "");
+ else {
+ const TType& type = intermNode->getAsTyped()->getType();
+ if (type.isArray()) {
+ if (type.isRuntimeSizedArray()) {
+ // Create a unary op and let the back end handle it
+ return intermediate.addBuiltInFunctionCall(loc, EOpArrayLength, true, intermNode, TType(EbtInt));
+ } else if (type.isImplicitlySizedArray()) {
+ if (intermNode->getAsSymbolNode() && isIoResizeArray(type)) {
+ // We could be between a layout declaration that gives a built-in io array implicit size and
+ // a user redeclaration of that array, meaning we have to substitute its implicit size here
+ // without actually redeclaring the array. (It is an error to use a member before the
+ // redeclaration, but not an error to use the array name itself.)
+ const TString& name = intermNode->getAsSymbolNode()->getName();
+ if (name == "gl_in" || name == "gl_out")
+ length = getIoArrayImplicitSize();
+ }
+ if (length == 0) {
+ if (intermNode->getAsSymbolNode() && isIoResizeArray(type))
+ error(loc, "", function->getName().c_str(), "array must first be sized by a redeclaration or layout qualifier");
+ else
+ error(loc, "", function->getName().c_str(), "array must be declared with a size before using this method");
+ }
+ } else
+ length = type.getOuterArraySize();
+ } else if (type.isMatrix())
+ length = type.getMatrixCols();
+ else if (type.isVector())
+ length = type.getVectorSize();
+ else {
+ // we should not get here, because earlier semantic checking should have prevented this path
+ error(loc, ".length()", "unexpected use of .length()", "");
+ }
+ }
+
+ if (length == 0)
+ length = 1;
+
+ return intermediate.addConstantUnion(length, loc);
+}
+
+//
+// Add any needed implicit conversions for function-call arguments to input parameters.
+//
+void HlslParseContext::addInputArgumentConversions(const TFunction& function, TIntermNode*& arguments) const
+{
+ TIntermAggregate* aggregate = arguments->getAsAggregate();
+
+ // Process each argument's conversion
+ for (int i = 0; i < function.getParamCount(); ++i) {
+ // At this early point there is a slight ambiguity between whether an aggregate 'arguments'
+ // is the single argument itself or its children are the arguments. Only one argument
+ // means take 'arguments' itself as the one argument.
+ TIntermTyped* arg = function.getParamCount() == 1 ? arguments->getAsTyped() : (aggregate ? aggregate->getSequence()[i]->getAsTyped() : arguments->getAsTyped());
+ if (*function[i].type != arg->getType()) {
+ if (function[i].type->getQualifier().isParamInput()) {
+ // In-qualified arguments just need an extra node added above the argument to
+ // convert to the correct type.
+ arg = intermediate.addConversion(EOpFunctionCall, *function[i].type, arg);
+ if (arg) {
+ if (function.getParamCount() == 1)
+ arguments = arg;
+ else {
+ if (aggregate)
+ aggregate->getSequence()[i] = arg;
+ else
+ arguments = arg;
+ }
+ }
+ }
+ }
+ }
+}
+
+//
+// Add any needed implicit output conversions for function-call arguments. This
+// can require a new tree topology, complicated further by whether the function
+// has a return value.
+//
+// Returns a node of a subtree that evaluates to the return value of the function.
+//
+TIntermTyped* HlslParseContext::addOutputArgumentConversions(const TFunction& function, TIntermAggregate& intermNode) const
+{
+ TIntermSequence& arguments = intermNode.getSequence();
+
+ // Will there be any output conversions?
+ bool outputConversions = false;
+ for (int i = 0; i < function.getParamCount(); ++i) {
+ if (*function[i].type != arguments[i]->getAsTyped()->getType() && function[i].type->getQualifier().storage == EvqOut) {
+ outputConversions = true;
+ break;
+ }
+ }
+
+ if (! outputConversions)
+ return &intermNode;
+
+ // Setup for the new tree, if needed:
+ //
+ // Output conversions need a different tree topology.
+ // Out-qualified arguments need a temporary of the correct type, with the call
+ // followed by an assignment of the temporary to the original argument:
+ // void: function(arg, ...) -> ( function(tempArg, ...), arg = tempArg, ...)
+ // ret = function(arg, ...) -> ret = (tempRet = function(tempArg, ...), arg = tempArg, ..., tempRet)
+ // Where the "tempArg" type needs no conversion as an argument, but will convert on assignment.
+ TIntermTyped* conversionTree = nullptr;
+ TVariable* tempRet = nullptr;
+ if (intermNode.getBasicType() != EbtVoid) {
+ // do the "tempRet = function(...), " bit from above
+ tempRet = makeInternalVariable("tempReturn", intermNode.getType());
+ TIntermSymbol* tempRetNode = intermediate.addSymbol(*tempRet, intermNode.getLoc());
+ conversionTree = intermediate.addAssign(EOpAssign, tempRetNode, &intermNode, intermNode.getLoc());
+ } else
+ conversionTree = &intermNode;
+
+ conversionTree = intermediate.makeAggregate(conversionTree);
+
+ // Process each argument's conversion
+ for (int i = 0; i < function.getParamCount(); ++i) {
+ if (*function[i].type != arguments[i]->getAsTyped()->getType()) {
+ if (function[i].type->getQualifier().isParamOutput()) {
+ // Out-qualified arguments need to use the topology set up above.
+ // do the " ...(tempArg, ...), arg = tempArg" bit from above
+ TVariable* tempArg = makeInternalVariable("tempArg", *function[i].type);
+ tempArg->getWritableType().getQualifier().makeTemporary();
+ TIntermSymbol* tempArgNode = intermediate.addSymbol(*tempArg, intermNode.getLoc());
+ TIntermTyped* tempAssign = intermediate.addAssign(EOpAssign, arguments[i]->getAsTyped(), tempArgNode, arguments[i]->getLoc());
+ conversionTree = intermediate.growAggregate(conversionTree, tempAssign, arguments[i]->getLoc());
+ // replace the argument with another node for the same tempArg variable
+ arguments[i] = intermediate.addSymbol(*tempArg, intermNode.getLoc());
+ }
+ }
+ }
+
+ // Finalize the tree topology (see bigger comment above).
+ if (tempRet) {
+ // do the "..., tempRet" bit from above
+ TIntermSymbol* tempRetNode = intermediate.addSymbol(*tempRet, intermNode.getLoc());
+ conversionTree = intermediate.growAggregate(conversionTree, tempRetNode, intermNode.getLoc());
+ }
+ conversionTree = intermediate.setAggregateOperator(conversionTree, EOpComma, intermNode.getType(), intermNode.getLoc());
+
+ return conversionTree;
+}
+
+//
+// Do additional checking of built-in function calls that is not caught
+// by normal semantic checks on argument type, extension tagging, etc.
+//
+// Assumes there has been a semantically correct match to a built-in function prototype.
+//
+void HlslParseContext::builtInOpCheck(const TSourceLoc& loc, const TFunction& fnCandidate, TIntermOperator& callNode)
+{
+ // Set up convenience accessors to the argument(s). There is almost always
+ // multiple arguments for the cases below, but when there might be one,
+ // check the unaryArg first.
+ const TIntermSequence* argp = nullptr; // confusing to use [] syntax on a pointer, so this is to help get a reference
+ const TIntermTyped* unaryArg = nullptr;
+ const TIntermTyped* arg0 = nullptr;
+ if (callNode.getAsAggregate()) {
+ argp = &callNode.getAsAggregate()->getSequence();
+ if (argp->size() > 0)
+ arg0 = (*argp)[0]->getAsTyped();
+ } else {
+ assert(callNode.getAsUnaryNode());
+ unaryArg = callNode.getAsUnaryNode()->getOperand();
+ arg0 = unaryArg;
+ }
+ const TIntermSequence& aggArgs = *argp; // only valid when unaryArg is nullptr
+
+ // built-in texturing functions get their return value precision from the precision of the sampler
+ if (fnCandidate.getType().getQualifier().precision == EpqNone &&
+ fnCandidate.getParamCount() > 0 && fnCandidate[0].type->getBasicType() == EbtSampler)
+ callNode.getQualifier().precision = arg0->getQualifier().precision;
+
+ switch (callNode.getOp()) {
+ case EOpTextureGather:
+ case EOpTextureGatherOffset:
+ case EOpTextureGatherOffsets:
+ {
+ // Figure out which variants are allowed by what extensions,
+ // and what arguments must be constant for which situations.
+
+ TString featureString = fnCandidate.getName() + "(...)";
+ const char* feature = featureString.c_str();
+ int compArg = -1; // track which argument, if any, is the constant component argument
+ switch (callNode.getOp()) {
+ case EOpTextureGather:
+ // More than two arguments needs gpu_shader5, and rectangular or shadow needs gpu_shader5,
+ // otherwise, need GL_ARB_texture_gather.
+ if (fnCandidate.getParamCount() > 2 || fnCandidate[0].type->getSampler().dim == EsdRect || fnCandidate[0].type->getSampler().shadow) {
+ if (! fnCandidate[0].type->getSampler().shadow)
+ compArg = 2;
+ }
+ break;
+ case EOpTextureGatherOffset:
+ // GL_ARB_texture_gather is good enough for 2D non-shadow textures with no component argument
+ if (! fnCandidate[0].type->getSampler().shadow)
+ compArg = 3;
+ break;
+ case EOpTextureGatherOffsets:
+ if (! fnCandidate[0].type->getSampler().shadow)
+ compArg = 3;
+ break;
+ default:
+ break;
+ }
+
+ if (compArg > 0 && compArg < fnCandidate.getParamCount()) {
+ if (aggArgs[compArg]->getAsConstantUnion()) {
+ int value = aggArgs[compArg]->getAsConstantUnion()->getConstArray()[0].getIConst();
+ if (value < 0 || value > 3)
+ error(loc, "must be 0, 1, 2, or 3:", feature, "component argument");
+ } else
+ error(loc, "must be a compile-time constant:", feature, "component argument");
+ }
+
+ break;
+ }
+
+ case EOpTextureOffset:
+ case EOpTextureFetchOffset:
+ case EOpTextureProjOffset:
+ case EOpTextureLodOffset:
+ case EOpTextureProjLodOffset:
+ case EOpTextureGradOffset:
+ case EOpTextureProjGradOffset:
+ {
+ // Handle texture-offset limits checking
+ // Pick which argument has to hold constant offsets
+ int arg = -1;
+ switch (callNode.getOp()) {
+ case EOpTextureOffset: arg = 2; break;
+ case EOpTextureFetchOffset: arg = (arg0->getType().getSampler().dim != EsdRect) ? 3 : 2; break;
+ case EOpTextureProjOffset: arg = 2; break;
+ case EOpTextureLodOffset: arg = 3; break;
+ case EOpTextureProjLodOffset: arg = 3; break;
+ case EOpTextureGradOffset: arg = 4; break;
+ case EOpTextureProjGradOffset: arg = 4; break;
+ default:
+ assert(0);
+ break;
+ }
+
+ if (arg > 0) {
+ if (! aggArgs[arg]->getAsConstantUnion())
+ error(loc, "argument must be compile-time constant", "texel offset", "");
+ else {
+ const TType& type = aggArgs[arg]->getAsTyped()->getType();
+ for (int c = 0; c < type.getVectorSize(); ++c) {
+ int offset = aggArgs[arg]->getAsConstantUnion()->getConstArray()[c].getIConst();
+ if (offset > resources.maxProgramTexelOffset || offset < resources.minProgramTexelOffset)
+ error(loc, "value is out of range:", "texel offset", "[gl_MinProgramTexelOffset, gl_MaxProgramTexelOffset]");
+ }
+ }
+ }
+
+ break;
+ }
+
+ case EOpTextureQuerySamples:
+ case EOpImageQuerySamples:
+ break;
+
+ case EOpImageAtomicAdd:
+ case EOpImageAtomicMin:
+ case EOpImageAtomicMax:
+ case EOpImageAtomicAnd:
+ case EOpImageAtomicOr:
+ case EOpImageAtomicXor:
+ case EOpImageAtomicExchange:
+ case EOpImageAtomicCompSwap:
+ break;
+
+ case EOpInterpolateAtCentroid:
+ case EOpInterpolateAtSample:
+ case EOpInterpolateAtOffset:
+ // "For the interpolateAt* functions, the call will return a precision
+ // qualification matching the precision of the 'interpolant' argument to
+ // the function call."
+ callNode.getQualifier().precision = arg0->getQualifier().precision;
+
+ // Make sure the first argument is an interpolant, or an array element of an interpolant
+ if (arg0->getType().getQualifier().storage != EvqVaryingIn) {
+ // It might still be an array element.
+ //
+ // We could check more, but the semantics of the first argument are already met; the
+ // only way to turn an array into a float/vec* is array dereference and swizzle.
+ //
+ // ES and desktop 4.3 and earlier: swizzles may not be used
+ // desktop 4.4 and later: swizzles may be used
+ const TIntermTyped* base = TIntermediate::findLValueBase(arg0, true);
+ if (base == nullptr || base->getType().getQualifier().storage != EvqVaryingIn)
+ error(loc, "first argument must be an interpolant, or interpolant-array element", fnCandidate.getName().c_str(), "");
+ }
+ break;
+
+ default:
+ break;
+ }
+}
+
+//
+// Handle seeing a built-in constructor in a grammar production.
+//
+TFunction* HlslParseContext::handleConstructorCall(const TSourceLoc& loc, const TType& type)
+{
+ TOperator op = mapTypeToConstructorOp(type);
+
+ if (op == EOpNull) {
+ error(loc, "cannot construct this type", type.getBasicString(), "");
+ return nullptr;
+ }
+
+ TString empty("");
+
+ return new TFunction(&empty, type, op);
+}
+
+//
+// Handle seeing a "COLON semantic" at the end of a type declaration,
+// by updating the type according to the semantic.
+//
+void HlslParseContext::handleSemantic(TType& type, const TString& semantic)
+{
+ // TODO: need to know if it's an input or an output
+ // The following sketches what needs to be done, but can't be right
+ // without taking into account stage and input/output.
+
+ if (semantic == "PSIZE")
+ type.getQualifier().builtIn = EbvPointSize;
+ else if (semantic == "POSITION")
+ type.getQualifier().builtIn = EbvPosition;
+ else if (semantic == "FOG")
+ type.getQualifier().builtIn = EbvFogFragCoord;
+ else if (semantic == "DEPTH" || semantic == "SV_Depth")
+ type.getQualifier().builtIn = EbvFragDepth;
+ else if (semantic == "VFACE" || semantic == "SV_IsFrontFace")
+ type.getQualifier().builtIn = EbvFace;
+ else if (semantic == "VPOS" || semantic == "SV_Position")
+ type.getQualifier().builtIn = EbvFragCoord;
+ else if (semantic == "SV_ClipDistance")
+ type.getQualifier().builtIn = EbvClipDistance;
+ else if (semantic == "SV_CullDistance")
+ type.getQualifier().builtIn = EbvCullDistance;
+ else if (semantic == "SV_VertexID")
+ type.getQualifier().builtIn = EbvVertexId;
+ else if (semantic == "SV_ViewportArrayIndex")
+ type.getQualifier().builtIn = EbvViewportIndex;
+}
+
+//
+// Given a type, find what operation would fully construct it.
+//
+TOperator HlslParseContext::mapTypeToConstructorOp(const TType& type) const
+{
+ TOperator op = EOpNull;
+
+ switch (type.getBasicType()) {
+ case EbtStruct:
+ op = EOpConstructStruct;
+ break;
+ case EbtSampler:
+ if (type.getSampler().combined)
+ op = EOpConstructTextureSampler;
+ break;
+ case EbtFloat:
+ if (type.isMatrix()) {
+ switch (type.getMatrixCols()) {
+ case 2:
+ switch (type.getMatrixRows()) {
+ case 2: op = EOpConstructMat2x2; break;
+ case 3: op = EOpConstructMat2x3; break;
+ case 4: op = EOpConstructMat2x4; break;
+ default: break; // some compilers want this
+ }
+ break;
+ case 3:
+ switch (type.getMatrixRows()) {
+ case 2: op = EOpConstructMat3x2; break;
+ case 3: op = EOpConstructMat3x3; break;
+ case 4: op = EOpConstructMat3x4; break;
+ default: break; // some compilers want this
+ }
+ break;
+ case 4:
+ switch (type.getMatrixRows()) {
+ case 2: op = EOpConstructMat4x2; break;
+ case 3: op = EOpConstructMat4x3; break;
+ case 4: op = EOpConstructMat4x4; break;
+ default: break; // some compilers want this
+ }
+ break;
+ default: break; // some compilers want this
+ }
+ } else {
+ switch (type.getVectorSize()) {
+ case 1: op = EOpConstructFloat; break;
+ case 2: op = EOpConstructVec2; break;
+ case 3: op = EOpConstructVec3; break;
+ case 4: op = EOpConstructVec4; break;
+ default: break; // some compilers want this
+ }
+ }
+ break;
+ case EbtDouble:
+ if (type.getMatrixCols()) {
+ switch (type.getMatrixCols()) {
+ case 2:
+ switch (type.getMatrixRows()) {
+ case 2: op = EOpConstructDMat2x2; break;
+ case 3: op = EOpConstructDMat2x3; break;
+ case 4: op = EOpConstructDMat2x4; break;
+ default: break; // some compilers want this
+ }
+ break;
+ case 3:
+ switch (type.getMatrixRows()) {
+ case 2: op = EOpConstructDMat3x2; break;
+ case 3: op = EOpConstructDMat3x3; break;
+ case 4: op = EOpConstructDMat3x4; break;
+ default: break; // some compilers want this
+ }
+ break;
+ case 4:
+ switch (type.getMatrixRows()) {
+ case 2: op = EOpConstructDMat4x2; break;
+ case 3: op = EOpConstructDMat4x3; break;
+ case 4: op = EOpConstructDMat4x4; break;
+ default: break; // some compilers want this
+ }
+ break;
+ }
+ } else {
+ switch (type.getVectorSize()) {
+ case 1: op = EOpConstructDouble; break;
+ case 2: op = EOpConstructDVec2; break;
+ case 3: op = EOpConstructDVec3; break;
+ case 4: op = EOpConstructDVec4; break;
+ default: break; // some compilers want this
+ }
+ }
+ break;
+ case EbtInt:
+ switch (type.getVectorSize()) {
+ case 1: op = EOpConstructInt; break;
+ case 2: op = EOpConstructIVec2; break;
+ case 3: op = EOpConstructIVec3; break;
+ case 4: op = EOpConstructIVec4; break;
+ default: break; // some compilers want this
+ }
+ break;
+ case EbtUint:
+ switch (type.getVectorSize()) {
+ case 1: op = EOpConstructUint; break;
+ case 2: op = EOpConstructUVec2; break;
+ case 3: op = EOpConstructUVec3; break;
+ case 4: op = EOpConstructUVec4; break;
+ default: break; // some compilers want this
+ }
+ break;
+ case EbtBool:
+ switch (type.getVectorSize()) {
+ case 1: op = EOpConstructBool; break;
+ case 2: op = EOpConstructBVec2; break;
+ case 3: op = EOpConstructBVec3; break;
+ case 4: op = EOpConstructBVec4; break;
+ default: break; // some compilers want this
+ }
+ break;
+ default:
+ break;
+ }
+
+ return op;
+}
+
+//
+// Same error message for all places assignments don't work.
+//
+void HlslParseContext::assignError(const TSourceLoc& loc, const char* op, TString left, TString right)
+{
+ error(loc, "", op, "cannot convert from '%s' to '%s'",
+ right.c_str(), left.c_str());
+}
+
+//
+// Same error message for all places unary operations don't work.
+//
+void HlslParseContext::unaryOpError(const TSourceLoc& loc, const char* op, TString operand)
+{
+ error(loc, " wrong operand type", op,
+ "no operation '%s' exists that takes an operand of type %s (or there is no acceptable conversion)",
+ op, operand.c_str());
+}
+
+//
+// Same error message for all binary operations don't work.
+//
+void HlslParseContext::binaryOpError(const TSourceLoc& loc, const char* op, TString left, TString right)
+{
+ error(loc, " wrong operand types:", op,
+ "no operation '%s' exists that takes a left-hand operand of type '%s' and "
+ "a right operand of type '%s' (or there is no acceptable conversion)",
+ op, left.c_str(), right.c_str());
+}
+
+//
+// A basic type of EbtVoid is a key that the name string was seen in the source, but
+// it was not found as a variable in the symbol table. If so, give the error
+// message and insert a dummy variable in the symbol table to prevent future errors.
+//
+void HlslParseContext::variableCheck(TIntermTyped*& nodePtr)
+{
+ TIntermSymbol* symbol = nodePtr->getAsSymbolNode();
+ if (! symbol)
+ return;
+
+ if (symbol->getType().getBasicType() == EbtVoid) {
+ error(symbol->getLoc(), "undeclared identifier", symbol->getName().c_str(), "");
+
+ // Add to symbol table to prevent future error messages on the same name
+ if (symbol->getName().size() > 0) {
+ TVariable* fakeVariable = new TVariable(&symbol->getName(), TType(EbtFloat));
+ symbolTable.insert(*fakeVariable);
+
+ // substitute a symbol node for this new variable
+ nodePtr = intermediate.addSymbol(*fakeVariable, symbol->getLoc());
+ }
+ }
+}
+
+//
+// Both test, and if necessary spit out an error, to see if the node is really
+// a constant.
+//
+void HlslParseContext::constantValueCheck(TIntermTyped* node, const char* token)
+{
+ if (node->getQualifier().storage != EvqConst)
+ error(node->getLoc(), "constant expression required", token, "");
+}
+
+//
+// Both test, and if necessary spit out an error, to see if the node is really
+// an integer.
+//
+void HlslParseContext::integerCheck(const TIntermTyped* node, const char* token)
+{
+ if ((node->getBasicType() == EbtInt || node->getBasicType() == EbtUint) && node->isScalar())
+ return;
+
+ error(node->getLoc(), "scalar integer expression required", token, "");
+}
+
+//
+// Both test, and if necessary spit out an error, to see if we are currently
+// globally scoped.
+//
+void HlslParseContext::globalCheck(const TSourceLoc& loc, const char* token)
+{
+ if (! symbolTable.atGlobalLevel())
+ error(loc, "not allowed in nested scope", token, "");
+}
+
+
+bool HlslParseContext::builtInName(const TString& identifier)
+{
+ return false;
+}
+
+//
+// Make sure there is enough data and not too many arguments provided to the
+// constructor to build something of the type of the constructor. Also returns
+// the type of the constructor.
+//
+// Returns true if there was an error in construction.
+//
+bool HlslParseContext::constructorError(const TSourceLoc& loc, TIntermNode* node, TFunction& function, TOperator op, TType& type)
+{
+ type.shallowCopy(function.getType());
+
+ bool constructingMatrix = false;
+ switch (op) {
+ case EOpConstructTextureSampler:
+ return constructorTextureSamplerError(loc, function);
+ case EOpConstructMat2x2:
+ case EOpConstructMat2x3:
+ case EOpConstructMat2x4:
+ case EOpConstructMat3x2:
+ case EOpConstructMat3x3:
+ case EOpConstructMat3x4:
+ case EOpConstructMat4x2:
+ case EOpConstructMat4x3:
+ case EOpConstructMat4x4:
+ case EOpConstructDMat2x2:
+ case EOpConstructDMat2x3:
+ case EOpConstructDMat2x4:
+ case EOpConstructDMat3x2:
+ case EOpConstructDMat3x3:
+ case EOpConstructDMat3x4:
+ case EOpConstructDMat4x2:
+ case EOpConstructDMat4x3:
+ case EOpConstructDMat4x4:
+ constructingMatrix = true;
+ break;
+ default:
+ break;
+ }
+
+ //
+ // Walk the arguments for first-pass checks and collection of information.
+ //
+
+ int size = 0;
+ bool constType = true;
+ bool full = false;
+ bool overFull = false;
+ bool matrixInMatrix = false;
+ bool arrayArg = false;
+ for (int arg = 0; arg < function.getParamCount(); ++arg) {
+ if (function[arg].type->isArray()) {
+ if (! function[arg].type->isExplicitlySizedArray()) {
+ // Can't construct from an unsized array.
+ error(loc, "array argument must be sized", "constructor", "");
+ return true;
+ }
+ arrayArg = true;
+ }
+ if (constructingMatrix && function[arg].type->isMatrix())
+ matrixInMatrix = true;
+
+ // 'full' will go to true when enough args have been seen. If we loop
+ // again, there is an extra argument.
+ if (full) {
+ // For vectors and matrices, it's okay to have too many components
+ // available, but not okay to have unused arguments.
+ overFull = true;
+ }
+
+ size += function[arg].type->computeNumComponents();
+ if (op != EOpConstructStruct && ! type.isArray() && size >= type.computeNumComponents())
+ full = true;
+
+ if (function[arg].type->getQualifier().storage != EvqConst)
+ constType = false;
+ }
+
+ if (constType)
+ type.getQualifier().storage = EvqConst;
+
+ if (type.isArray()) {
+ if (function.getParamCount() == 0) {
+ error(loc, "array constructor must have at least one argument", "constructor", "");
+ return true;
+ }
+
+ if (type.isImplicitlySizedArray()) {
+ // auto adapt the constructor type to the number of arguments
+ type.changeOuterArraySize(function.getParamCount());
+ } else if (type.getOuterArraySize() != function.getParamCount()) {
+ error(loc, "array constructor needs one argument per array element", "constructor", "");
+ return true;
+ }
+
+ if (type.isArrayOfArrays()) {
+ // Types have to match, but we're still making the type.
+ // Finish making the type, and the comparison is done later
+ // when checking for conversion.
+ TArraySizes& arraySizes = type.getArraySizes();
+
+ // At least the dimensionalities have to match.
+ if (! function[0].type->isArray() || arraySizes.getNumDims() != function[0].type->getArraySizes().getNumDims() + 1) {
+ error(loc, "array constructor argument not correct type to construct array element", "constructior", "");
+ return true;
+ }
+
+ if (arraySizes.isInnerImplicit()) {
+ // "Arrays of arrays ..., and the size for any dimension is optional"
+ // That means we need to adopt (from the first argument) the other array sizes into the type.
+ for (int d = 1; d < arraySizes.getNumDims(); ++d) {
+ if (arraySizes.getDimSize(d) == UnsizedArraySize) {
+ arraySizes.setDimSize(d, function[0].type->getArraySizes().getDimSize(d - 1));
+ }
+ }
+ }
+ }
+ }
+
+ if (arrayArg && op != EOpConstructStruct && ! type.isArrayOfArrays()) {
+ error(loc, "constructing non-array constituent from array argument", "constructor", "");
+ return true;
+ }
+
+ if (matrixInMatrix && ! type.isArray()) {
+ return false;
+ }
+
+ if (overFull) {
+ error(loc, "too many arguments", "constructor", "");
+ return true;
+ }
+
+ if (op == EOpConstructStruct && ! type.isArray() && (int)type.getStruct()->size() != function.getParamCount()) {
+ error(loc, "Number of constructor parameters does not match the number of structure fields", "constructor", "");
+ return true;
+ }
+
+ if ((op != EOpConstructStruct && size != 1 && size < type.computeNumComponents()) ||
+ (op == EOpConstructStruct && size < type.computeNumComponents())) {
+ error(loc, "not enough data provided for construction", "constructor", "");
+ return true;
+ }
+
+ TIntermTyped* typed = node->getAsTyped();
+
+ return false;
+}
+
+// Verify all the correct semantics for constructing a combined texture/sampler.
+// Return true if the semantics are incorrect.
+bool HlslParseContext::constructorTextureSamplerError(const TSourceLoc& loc, const TFunction& function)
+{
+ TString constructorName = function.getType().getBasicTypeString(); // TODO: performance: should not be making copy; interface needs to change
+ const char* token = constructorName.c_str();
+
+ // exactly two arguments needed
+ if (function.getParamCount() != 2) {
+ error(loc, "sampler-constructor requires two arguments", token, "");
+ return true;
+ }
+
+ // For now, not allowing arrayed constructors, the rest of this function
+ // is set up to allow them, if this test is removed:
+ if (function.getType().isArray()) {
+ error(loc, "sampler-constructor cannot make an array of samplers", token, "");
+ return true;
+ }
+
+ // first argument
+ // * the constructor's first argument must be a texture type
+ // * the dimensionality (1D, 2D, 3D, Cube, Rect, Buffer, MS, and Array)
+ // of the texture type must match that of the constructed sampler type
+ // (that is, the suffixes of the type of the first argument and the
+ // type of the constructor will be spelled the same way)
+ if (function[0].type->getBasicType() != EbtSampler ||
+ ! function[0].type->getSampler().isTexture() ||
+ function[0].type->isArray()) {
+ error(loc, "sampler-constructor first argument must be a scalar textureXXX type", token, "");
+ return true;
+ }
+ // simulate the first argument's impact on the result type, so it can be compared with the encapsulated operator!=()
+ TSampler texture = function.getType().getSampler();
+ texture.combined = false;
+ texture.shadow = false;
+ if (texture != function[0].type->getSampler()) {
+ error(loc, "sampler-constructor first argument must match type and dimensionality of constructor type", token, "");
+ return true;
+ }
+
+ // second argument
+ // * the constructor's second argument must be a scalar of type
+ // *sampler* or *samplerShadow*
+ // * the presence or absence of depth comparison (Shadow) must match
+ // between the constructed sampler type and the type of the second argument
+ if (function[1].type->getBasicType() != EbtSampler ||
+ ! function[1].type->getSampler().isPureSampler() ||
+ function[1].type->isArray()) {
+ error(loc, "sampler-constructor second argument must be a scalar type 'sampler'", token, "");
+ return true;
+ }
+ if (function.getType().getSampler().shadow != function[1].type->getSampler().shadow) {
+ error(loc, "sampler-constructor second argument presence of shadow must match constructor presence of shadow", token, "");
+ return true;
+ }
+
+ return false;
+}
+
+// Checks to see if a void variable has been declared and raise an error message for such a case
+//
+// returns true in case of an error
+//
+bool HlslParseContext::voidErrorCheck(const TSourceLoc& loc, const TString& identifier, const TBasicType basicType)
+{
+ if (basicType == EbtVoid) {
+ error(loc, "illegal use of type 'void'", identifier.c_str(), "");
+ return true;
+ }
+
+ return false;
+}
+
+// Checks to see if the node (for the expression) contains a scalar boolean expression or not
+void HlslParseContext::boolCheck(const TSourceLoc& loc, const TIntermTyped* type)
+{
+ if (type->getBasicType() != EbtBool || type->isArray() || type->isMatrix() || type->isVector())
+ error(loc, "boolean expression expected", "", "");
+}
+
+//
+// Fix just a full qualifier (no variables or types yet, but qualifier is complete) at global level.
+//
+void HlslParseContext::globalQualifierFix(const TSourceLoc& loc, TQualifier& qualifier)
+{
+ // move from parameter/unknown qualifiers to pipeline in/out qualifiers
+ switch (qualifier.storage) {
+ case EvqIn:
+ qualifier.storage = EvqVaryingIn;
+ break;
+ case EvqOut:
+ qualifier.storage = EvqVaryingOut;
+ break;
+ default:
+ break;
+ }
+}
+
+//
+// Merge characteristics of the 'src' qualifier into the 'dst'.
+// If there is duplication, issue error messages, unless 'force'
+// is specified, which means to just override default settings.
+//
+// Also, when force is false, it will be assumed that 'src' follows
+// 'dst', for the purpose of error checking order for versions
+// that require specific orderings of qualifiers.
+//
+void HlslParseContext::mergeQualifiers(const TSourceLoc& loc, TQualifier& dst, const TQualifier& src, bool force)
+{
+ // Storage qualification
+ if (dst.storage == EvqTemporary || dst.storage == EvqGlobal)
+ dst.storage = src.storage;
+ else if ((dst.storage == EvqIn && src.storage == EvqOut) ||
+ (dst.storage == EvqOut && src.storage == EvqIn))
+ dst.storage = EvqInOut;
+ else if ((dst.storage == EvqIn && src.storage == EvqConst) ||
+ (dst.storage == EvqConst && src.storage == EvqIn))
+ dst.storage = EvqConstReadOnly;
+ else if (src.storage != EvqTemporary && src.storage != EvqGlobal)
+ error(loc, "too many storage qualifiers", GetStorageQualifierString(src.storage), "");
+
+ // Precision qualifiers
+ if (dst.precision == EpqNone || (force && src.precision != EpqNone))
+ dst.precision = src.precision;
+
+ // Layout qualifiers
+ mergeObjectLayoutQualifiers(dst, src, false);
+
+ // individual qualifiers
+ bool repeated = false;
+#define MERGE_SINGLETON(field) repeated |= dst.field && src.field; dst.field |= src.field;
+ MERGE_SINGLETON(invariant);
+ MERGE_SINGLETON(noContraction);
+ MERGE_SINGLETON(centroid);
+ MERGE_SINGLETON(smooth);
+ MERGE_SINGLETON(flat);
+ MERGE_SINGLETON(nopersp);
+ MERGE_SINGLETON(patch);
+ MERGE_SINGLETON(sample);
+ MERGE_SINGLETON(coherent);
+ MERGE_SINGLETON(volatil);
+ MERGE_SINGLETON(restrict);
+ MERGE_SINGLETON(readonly);
+ MERGE_SINGLETON(writeonly);
+ MERGE_SINGLETON(specConstant);
+}
+
+// used to flatten the sampler type space into a single dimension
+// correlates with the declaration of defaultSamplerPrecision[]
+int HlslParseContext::computeSamplerTypeIndex(TSampler& sampler)
+{
+ int arrayIndex = sampler.arrayed ? 1 : 0;
+ int shadowIndex = sampler.shadow ? 1 : 0;
+ int externalIndex = sampler.external ? 1 : 0;
+
+ return EsdNumDims * (EbtNumTypes * (2 * (2 * arrayIndex + shadowIndex) + externalIndex) + sampler.type) + sampler.dim;
+}
+
+//
+// Do size checking for an array type's size.
+//
+void HlslParseContext::arraySizeCheck(const TSourceLoc& loc, TIntermTyped* expr, TArraySize& sizePair)
+{
+ bool isConst = false;
+ sizePair.size = 1;
+ sizePair.node = nullptr;
+
+ TIntermConstantUnion* constant = expr->getAsConstantUnion();
+ if (constant) {
+ // handle true (non-specialization) constant
+ sizePair.size = constant->getConstArray()[0].getIConst();
+ isConst = true;
+ } else {
+ // see if it's a specialization constant instead
+ if (expr->getQualifier().isSpecConstant()) {
+ isConst = true;
+ sizePair.node = expr;
+ TIntermSymbol* symbol = expr->getAsSymbolNode();
+ if (symbol && symbol->getConstArray().size() > 0)
+ sizePair.size = symbol->getConstArray()[0].getIConst();
+ }
+ }
+
+ if (! isConst || (expr->getBasicType() != EbtInt && expr->getBasicType() != EbtUint)) {
+ error(loc, "array size must be a constant integer expression", "", "");
+ return;
+ }
+
+ if (sizePair.size <= 0) {
+ error(loc, "array size must be a positive integer", "", "");
+ return;
+ }
+}
+
+//
+// Require array to be completely sized
+//
+void HlslParseContext::arraySizeRequiredCheck(const TSourceLoc& loc, const TArraySizes& arraySizes)
+{
+ if (arraySizes.isImplicit())
+ error(loc, "array size required", "", "");
+}
+
+void HlslParseContext::structArrayCheck(const TSourceLoc& /*loc*/, const TType& type)
+{
+ const TTypeList& structure = *type.getStruct();
+ for (int m = 0; m < (int)structure.size(); ++m) {
+ const TType& member = *structure[m].type;
+ if (member.isArray())
+ arraySizeRequiredCheck(structure[m].loc, *member.getArraySizes());
+ }
+}
+
+// Merge array dimensions listed in 'sizes' onto the type's array dimensions.
+//
+// From the spec: "vec4[2] a[3]; // size-3 array of size-2 array of vec4"
+//
+// That means, the 'sizes' go in front of the 'type' as outermost sizes.
+// 'type' is the type part of the declaration (to the left)
+// 'sizes' is the arrayness tagged on the identifier (to the right)
+//
+void HlslParseContext::arrayDimMerge(TType& type, const TArraySizes* sizes)
+{
+ if (sizes)
+ type.addArrayOuterSizes(*sizes);
+}
+
+//
+// Do all the semantic checking for declaring or redeclaring an array, with and
+// without a size, and make the right changes to the symbol table.
+//
+void HlslParseContext::declareArray(const TSourceLoc& loc, TString& identifier, const TType& type, TSymbol*& symbol, bool& newDeclaration)
+{
+ if (! symbol) {
+ bool currentScope;
+ symbol = symbolTable.find(identifier, nullptr, &currentScope);
+
+ if (symbol && builtInName(identifier) && ! symbolTable.atBuiltInLevel()) {
+ // bad shader (errors already reported) trying to redeclare a built-in name as an array
+ return;
+ }
+ if (symbol == nullptr || ! currentScope) {
+ //
+ // Successfully process a new definition.
+ // (Redeclarations have to take place at the same scope; otherwise they are hiding declarations)
+ //
+ symbol = new TVariable(&identifier, type);
+ symbolTable.insert(*symbol);
+ newDeclaration = true;
+
+ if (! symbolTable.atBuiltInLevel()) {
+ if (isIoResizeArray(type)) {
+ ioArraySymbolResizeList.push_back(symbol);
+ checkIoArraysConsistency(loc, true);
+ } else
+ fixIoArraySize(loc, symbol->getWritableType());
+ }
+
+ return;
+ }
+ if (symbol->getAsAnonMember()) {
+ error(loc, "cannot redeclare a user-block member array", identifier.c_str(), "");
+ symbol = nullptr;
+ return;
+ }
+ }
+
+ //
+ // Process a redeclaration.
+ //
+
+ if (! symbol) {
+ error(loc, "array variable name expected", identifier.c_str(), "");
+ return;
+ }
+
+ // redeclareBuiltinVariable() should have already done the copyUp()
+ TType& existingType = symbol->getWritableType();
+
+
+ if (existingType.isExplicitlySizedArray()) {
+ // be more lenient for input arrays to geometry shaders and tessellation control outputs, where the redeclaration is the same size
+ if (! (isIoResizeArray(type) && existingType.getOuterArraySize() == type.getOuterArraySize()))
+ error(loc, "redeclaration of array with size", identifier.c_str(), "");
+ return;
+ }
+
+ existingType.updateArraySizes(type);
+
+ if (isIoResizeArray(type))
+ checkIoArraysConsistency(loc);
+}
+
+void HlslParseContext::updateImplicitArraySize(const TSourceLoc& loc, TIntermNode *node, int index)
+{
+ // maybe there is nothing to do...
+ TIntermTyped* typedNode = node->getAsTyped();
+ if (typedNode->getType().getImplicitArraySize() > index)
+ return;
+
+ // something to do...
+
+ // Figure out what symbol to lookup, as we will use its type to edit for the size change,
+ // as that type will be shared through shallow copies for future references.
+ TSymbol* symbol = nullptr;
+ int blockIndex = -1;
+ const TString* lookupName = nullptr;
+ if (node->getAsSymbolNode())
+ lookupName = &node->getAsSymbolNode()->getName();
+ else if (node->getAsBinaryNode()) {
+ const TIntermBinary* deref = node->getAsBinaryNode();
+ // This has to be the result of a block dereference, unless it's bad shader code
+ // If it's a uniform block, then an error will be issued elsewhere, but
+ // return early now to avoid crashing later in this function.
+ if (! deref->getLeft()->getAsSymbolNode() || deref->getLeft()->getBasicType() != EbtBlock ||
+ deref->getLeft()->getType().getQualifier().storage == EvqUniform ||
+ deref->getRight()->getAsConstantUnion() == nullptr)
+ return;
+
+ blockIndex = deref->getRight()->getAsConstantUnion()->getConstArray()[0].getIConst();
+
+ lookupName = &deref->getLeft()->getAsSymbolNode()->getName();
+ if (IsAnonymous(*lookupName))
+ lookupName = &(*deref->getLeft()->getType().getStruct())[blockIndex].type->getFieldName();
+ }
+
+ // Lookup the symbol, should only fail if shader code is incorrect
+ symbol = symbolTable.find(*lookupName);
+ if (symbol == nullptr)
+ return;
+
+ if (symbol->getAsFunction()) {
+ error(loc, "array variable name expected", symbol->getName().c_str(), "");
+ return;
+ }
+
+ symbol->getWritableType().setImplicitArraySize(index + 1);
+}
+
+//
+// See if the identifier is a built-in symbol that can be redeclared, and if so,
+// copy the symbol table's read-only built-in variable to the current
+// global level, where it can be modified based on the passed in type.
+//
+// Returns nullptr if no redeclaration took place; meaning a normal declaration still
+// needs to occur for it, not necessarily an error.
+//
+// Returns a redeclared and type-modified variable if a redeclared occurred.
+//
+TSymbol* HlslParseContext::redeclareBuiltinVariable(const TSourceLoc& loc, const TString& identifier, const TQualifier& qualifier, const TShaderQualifiers& publicType, bool& newDeclaration)
+{
+ if (! builtInName(identifier) || symbolTable.atBuiltInLevel() || ! symbolTable.atGlobalLevel())
+ return nullptr;
+
+ return nullptr;
+}
+
+//
+// Either redeclare the requested block, or give an error message why it can't be done.
+//
+// TODO: functionality: explicitly sizing members of redeclared blocks is not giving them an explicit size
+void HlslParseContext::redeclareBuiltinBlock(const TSourceLoc& loc, TTypeList& newTypeList, const TString& blockName, const TString* instanceName, TArraySizes* arraySizes)
+{
+ // Redeclaring a built-in block...
+
+ // Blocks with instance names are easy to find, lookup the instance name,
+ // Anonymous blocks need to be found via a member.
+ bool builtIn;
+ TSymbol* block;
+ if (instanceName)
+ block = symbolTable.find(*instanceName, &builtIn);
+ else
+ block = symbolTable.find(newTypeList.front().type->getFieldName(), &builtIn);
+
+ // If the block was not found, this must be a version/profile/stage
+ // that doesn't have it, or the instance name is wrong.
+ const char* errorName = instanceName ? instanceName->c_str() : newTypeList.front().type->getFieldName().c_str();
+ if (! block) {
+ error(loc, "no declaration found for redeclaration", errorName, "");
+ return;
+ }
+ // Built-in blocks cannot be redeclared more than once, which if happened,
+ // we'd be finding the already redeclared one here, rather than the built in.
+ if (! builtIn) {
+ error(loc, "can only redeclare a built-in block once, and before any use", blockName.c_str(), "");
+ return;
+ }
+
+ // Copy the block to make a writable version, to insert into the block table after editing.
+ block = symbolTable.copyUpDeferredInsert(block);
+
+ if (block->getType().getBasicType() != EbtBlock) {
+ error(loc, "cannot redeclare a non block as a block", errorName, "");
+ return;
+ }
+
+ // Edit and error check the container against the redeclaration
+ // - remove unused members
+ // - ensure remaining qualifiers/types match
+ TType& type = block->getWritableType();
+ TTypeList::iterator member = type.getWritableStruct()->begin();
+ size_t numOriginalMembersFound = 0;
+ while (member != type.getStruct()->end()) {
+ // look for match
+ bool found = false;
+ TTypeList::const_iterator newMember;
+ TSourceLoc memberLoc;
+ memberLoc.init();
+ for (newMember = newTypeList.begin(); newMember != newTypeList.end(); ++newMember) {
+ if (member->type->getFieldName() == newMember->type->getFieldName()) {
+ found = true;
+ memberLoc = newMember->loc;
+ break;
+ }
+ }
+
+ if (found) {
+ ++numOriginalMembersFound;
+ // - ensure match between redeclared members' types
+ // - check for things that can't be changed
+ // - update things that can be changed
+ TType& oldType = *member->type;
+ const TType& newType = *newMember->type;
+ if (! newType.sameElementType(oldType))
+ error(memberLoc, "cannot redeclare block member with a different type", member->type->getFieldName().c_str(), "");
+ if (oldType.isArray() != newType.isArray())
+ error(memberLoc, "cannot change arrayness of redeclared block member", member->type->getFieldName().c_str(), "");
+ else if (! oldType.sameArrayness(newType) && oldType.isExplicitlySizedArray())
+ error(memberLoc, "cannot change array size of redeclared block member", member->type->getFieldName().c_str(), "");
+ if (newType.getQualifier().isMemory())
+ error(memberLoc, "cannot add memory qualifier to redeclared block member", member->type->getFieldName().c_str(), "");
+ if (newType.getQualifier().hasLayout())
+ error(memberLoc, "cannot add layout to redeclared block member", member->type->getFieldName().c_str(), "");
+ if (newType.getQualifier().patch)
+ error(memberLoc, "cannot add patch to redeclared block member", member->type->getFieldName().c_str(), "");
+ oldType.getQualifier().centroid = newType.getQualifier().centroid;
+ oldType.getQualifier().sample = newType.getQualifier().sample;
+ oldType.getQualifier().invariant = newType.getQualifier().invariant;
+ oldType.getQualifier().noContraction = newType.getQualifier().noContraction;
+ oldType.getQualifier().smooth = newType.getQualifier().smooth;
+ oldType.getQualifier().flat = newType.getQualifier().flat;
+ oldType.getQualifier().nopersp = newType.getQualifier().nopersp;
+
+ // go to next member
+ ++member;
+ } else {
+ // For missing members of anonymous blocks that have been redeclared,
+ // hide the original (shared) declaration.
+ // Instance-named blocks can just have the member removed.
+ if (instanceName)
+ member = type.getWritableStruct()->erase(member);
+ else {
+ member->type->hideMember();
+ ++member;
+ }
+ }
+ }
+
+ if (numOriginalMembersFound < newTypeList.size())
+ error(loc, "block redeclaration has extra members", blockName.c_str(), "");
+ if (type.isArray() != (arraySizes != nullptr))
+ error(loc, "cannot change arrayness of redeclared block", blockName.c_str(), "");
+ else if (type.isArray()) {
+ if (type.isExplicitlySizedArray() && arraySizes->getOuterSize() == UnsizedArraySize)
+ error(loc, "block already declared with size, can't redeclare as implicitly-sized", blockName.c_str(), "");
+ else if (type.isExplicitlySizedArray() && type.getArraySizes() != *arraySizes)
+ error(loc, "cannot change array size of redeclared block", blockName.c_str(), "");
+ else if (type.isImplicitlySizedArray() && arraySizes->getOuterSize() != UnsizedArraySize)
+ type.changeOuterArraySize(arraySizes->getOuterSize());
+ }
+
+ symbolTable.insert(*block);
+
+ // Tracking for implicit sizing of array
+ if (isIoResizeArray(block->getType())) {
+ ioArraySymbolResizeList.push_back(block);
+ checkIoArraysConsistency(loc, true);
+ } else if (block->getType().isArray())
+ fixIoArraySize(loc, block->getWritableType());
+
+ // Save it in the AST for linker use.
+ intermediate.addSymbolLinkageNode(linkage, *block);
+}
+
+void HlslParseContext::paramCheckFix(const TSourceLoc& loc, const TStorageQualifier& qualifier, TType& type)
+{
+ switch (qualifier) {
+ case EvqConst:
+ case EvqConstReadOnly:
+ type.getQualifier().storage = EvqConstReadOnly;
+ break;
+ case EvqIn:
+ case EvqOut:
+ case EvqInOut:
+ type.getQualifier().storage = qualifier;
+ break;
+ case EvqGlobal:
+ case EvqTemporary:
+ type.getQualifier().storage = EvqIn;
+ break;
+ default:
+ type.getQualifier().storage = EvqIn;
+ error(loc, "storage qualifier not allowed on function parameter", GetStorageQualifierString(qualifier), "");
+ break;
+ }
+}
+
+void HlslParseContext::paramCheckFix(const TSourceLoc& loc, const TQualifier& qualifier, TType& type)
+{
+ if (qualifier.isMemory()) {
+ type.getQualifier().volatil = qualifier.volatil;
+ type.getQualifier().coherent = qualifier.coherent;
+ type.getQualifier().readonly = qualifier.readonly;
+ type.getQualifier().writeonly = qualifier.writeonly;
+ type.getQualifier().restrict = qualifier.restrict;
+ }
+
+ paramCheckFix(loc, qualifier.storage, type);
+}
+
+void HlslParseContext::specializationCheck(const TSourceLoc& loc, const TType& type, const char* op)
+{
+ if (type.containsSpecializationSize())
+ error(loc, "can't use with types containing arrays sized with a specialization constant", op, "");
+}
+
+//
+// Layout qualifier stuff.
+//
+
+// Put the id's layout qualification into the public type, for qualifiers not having a number set.
+// This is before we know any type information for error checking.
+void HlslParseContext::setLayoutQualifier(const TSourceLoc& loc, TPublicType& publicType, TString& id)
+{
+ std::transform(id.begin(), id.end(), id.begin(), ::tolower);
+
+ if (id == TQualifier::getLayoutMatrixString(ElmColumnMajor)) {
+ publicType.qualifier.layoutMatrix = ElmColumnMajor;
+ return;
+ }
+ if (id == TQualifier::getLayoutMatrixString(ElmRowMajor)) {
+ publicType.qualifier.layoutMatrix = ElmRowMajor;
+ return;
+ }
+ if (id == TQualifier::getLayoutPackingString(ElpPacked)) {
+ if (vulkan > 0)
+ vulkanRemoved(loc, "packed");
+ publicType.qualifier.layoutPacking = ElpPacked;
+ return;
+ }
+ if (id == TQualifier::getLayoutPackingString(ElpShared)) {
+ if (vulkan > 0)
+ vulkanRemoved(loc, "shared");
+ publicType.qualifier.layoutPacking = ElpShared;
+ return;
+ }
+ if (id == "push_constant") {
+ requireVulkan(loc, "push_constant");
+ publicType.qualifier.layoutPushConstant = true;
+ return;
+ }
+ if (language == EShLangGeometry || language == EShLangTessEvaluation) {
+ if (id == TQualifier::getGeometryString(ElgTriangles)) {
+ publicType.shaderQualifiers.geometry = ElgTriangles;
+ return;
+ }
+ if (language == EShLangGeometry) {
+ if (id == TQualifier::getGeometryString(ElgPoints)) {
+ publicType.shaderQualifiers.geometry = ElgPoints;
+ return;
+ }
+ if (id == TQualifier::getGeometryString(ElgLineStrip)) {
+ publicType.shaderQualifiers.geometry = ElgLineStrip;
+ return;
+ }
+ if (id == TQualifier::getGeometryString(ElgLines)) {
+ publicType.shaderQualifiers.geometry = ElgLines;
+ return;
+ }
+ if (id == TQualifier::getGeometryString(ElgLinesAdjacency)) {
+ publicType.shaderQualifiers.geometry = ElgLinesAdjacency;
+ return;
+ }
+ if (id == TQualifier::getGeometryString(ElgTrianglesAdjacency)) {
+ publicType.shaderQualifiers.geometry = ElgTrianglesAdjacency;
+ return;
+ }
+ if (id == TQualifier::getGeometryString(ElgTriangleStrip)) {
+ publicType.shaderQualifiers.geometry = ElgTriangleStrip;
+ return;
+ }
+ } else {
+ assert(language == EShLangTessEvaluation);
+
+ // input primitive
+ if (id == TQualifier::getGeometryString(ElgTriangles)) {
+ publicType.shaderQualifiers.geometry = ElgTriangles;
+ return;
+ }
+ if (id == TQualifier::getGeometryString(ElgQuads)) {
+ publicType.shaderQualifiers.geometry = ElgQuads;
+ return;
+ }
+ if (id == TQualifier::getGeometryString(ElgIsolines)) {
+ publicType.shaderQualifiers.geometry = ElgIsolines;
+ return;
+ }
+
+ // vertex spacing
+ if (id == TQualifier::getVertexSpacingString(EvsEqual)) {
+ publicType.shaderQualifiers.spacing = EvsEqual;
+ return;
+ }
+ if (id == TQualifier::getVertexSpacingString(EvsFractionalEven)) {
+ publicType.shaderQualifiers.spacing = EvsFractionalEven;
+ return;
+ }
+ if (id == TQualifier::getVertexSpacingString(EvsFractionalOdd)) {
+ publicType.shaderQualifiers.spacing = EvsFractionalOdd;
+ return;
+ }
+
+ // triangle order
+ if (id == TQualifier::getVertexOrderString(EvoCw)) {
+ publicType.shaderQualifiers.order = EvoCw;
+ return;
+ }
+ if (id == TQualifier::getVertexOrderString(EvoCcw)) {
+ publicType.shaderQualifiers.order = EvoCcw;
+ return;
+ }
+
+ // point mode
+ if (id == "point_mode") {
+ publicType.shaderQualifiers.pointMode = true;
+ return;
+ }
+ }
+ }
+ if (language == EShLangFragment) {
+ if (id == "origin_upper_left") {
+ publicType.shaderQualifiers.originUpperLeft = true;
+ return;
+ }
+ if (id == "pixel_center_integer") {
+ publicType.shaderQualifiers.pixelCenterInteger = true;
+ return;
+ }
+ if (id == "early_fragment_tests") {
+ publicType.shaderQualifiers.earlyFragmentTests = true;
+ return;
+ }
+ for (TLayoutDepth depth = (TLayoutDepth)(EldNone + 1); depth < EldCount; depth = (TLayoutDepth)(depth + 1)) {
+ if (id == TQualifier::getLayoutDepthString(depth)) {
+ publicType.shaderQualifiers.layoutDepth = depth;
+ return;
+ }
+ }
+ if (id.compare(0, 13, "blend_support") == 0) {
+ bool found = false;
+ for (TBlendEquationShift be = (TBlendEquationShift)0; be < EBlendCount; be = (TBlendEquationShift)(be + 1)) {
+ if (id == TQualifier::getBlendEquationString(be)) {
+ requireExtensions(loc, 1, &E_GL_KHR_blend_equation_advanced, "blend equation");
+ intermediate.addBlendEquation(be);
+ publicType.shaderQualifiers.blendEquation = true;
+ found = true;
+ break;
+ }
+ }
+ if (! found)
+ error(loc, "unknown blend equation", "blend_support", "");
+ return;
+ }
+ }
+ error(loc, "unrecognized layout identifier, or qualifier requires assignment (e.g., binding = 4)", id.c_str(), "");
+}
+
+// Put the id's layout qualifier value into the public type, for qualifiers having a number set.
+// This is before we know any type information for error checking.
+void HlslParseContext::setLayoutQualifier(const TSourceLoc& loc, TPublicType& publicType, TString& id, const TIntermTyped* node)
+{
+ const char* feature = "layout-id value";
+ const char* nonLiteralFeature = "non-literal layout-id value";
+
+ integerCheck(node, feature);
+ const TIntermConstantUnion* constUnion = node->getAsConstantUnion();
+ int value = 0;
+ if (constUnion) {
+ value = constUnion->getConstArray()[0].getIConst();
+ }
+
+ std::transform(id.begin(), id.end(), id.begin(), ::tolower);
+
+ if (id == "offset") {
+ publicType.qualifier.layoutOffset = value;
+ return;
+ } else if (id == "align") {
+ // "The specified alignment must be a power of 2, or a compile-time error results."
+ if (! IsPow2(value))
+ error(loc, "must be a power of 2", "align", "");
+ else
+ publicType.qualifier.layoutAlign = value;
+ return;
+ } else if (id == "location") {
+ if ((unsigned int)value >= TQualifier::layoutLocationEnd)
+ error(loc, "location is too large", id.c_str(), "");
+ else
+ publicType.qualifier.layoutLocation = value;
+ return;
+ } else if (id == "set") {
+ if ((unsigned int)value >= TQualifier::layoutSetEnd)
+ error(loc, "set is too large", id.c_str(), "");
+ else
+ publicType.qualifier.layoutSet = value;
+ return;
+ } else if (id == "binding") {
+ if ((unsigned int)value >= TQualifier::layoutBindingEnd)
+ error(loc, "binding is too large", id.c_str(), "");
+ else
+ publicType.qualifier.layoutBinding = value;
+ return;
+ } else if (id == "component") {
+ if ((unsigned)value >= TQualifier::layoutComponentEnd)
+ error(loc, "component is too large", id.c_str(), "");
+ else
+ publicType.qualifier.layoutComponent = value;
+ return;
+ } else if (id.compare(0, 4, "xfb_") == 0) {
+ // "Any shader making any static use (after preprocessing) of any of these
+ // *xfb_* qualifiers will cause the shader to be in a transform feedback
+ // capturing mode and hence responsible for describing the transform feedback
+ // setup."
+ intermediate.setXfbMode();
+ if (id == "xfb_buffer") {
+ // "It is a compile-time error to specify an *xfb_buffer* that is greater than
+ // the implementation-dependent constant gl_MaxTransformFeedbackBuffers."
+ if (value >= resources.maxTransformFeedbackBuffers)
+ error(loc, "buffer is too large:", id.c_str(), "gl_MaxTransformFeedbackBuffers is %d", resources.maxTransformFeedbackBuffers);
+ if (value >= (int)TQualifier::layoutXfbBufferEnd)
+ error(loc, "buffer is too large:", id.c_str(), "internal max is %d", TQualifier::layoutXfbBufferEnd - 1);
+ else
+ publicType.qualifier.layoutXfbBuffer = value;
+ return;
+ } else if (id == "xfb_offset") {
+ if (value >= (int)TQualifier::layoutXfbOffsetEnd)
+ error(loc, "offset is too large:", id.c_str(), "internal max is %d", TQualifier::layoutXfbOffsetEnd - 1);
+ else
+ publicType.qualifier.layoutXfbOffset = value;
+ return;
+ } else if (id == "xfb_stride") {
+ // "The resulting stride (implicit or explicit), when divided by 4, must be less than or equal to the
+ // implementation-dependent constant gl_MaxTransformFeedbackInterleavedComponents."
+ if (value > 4 * resources.maxTransformFeedbackInterleavedComponents)
+ error(loc, "1/4 stride is too large:", id.c_str(), "gl_MaxTransformFeedbackInterleavedComponents is %d", resources.maxTransformFeedbackInterleavedComponents);
+ else if (value >= (int)TQualifier::layoutXfbStrideEnd)
+ error(loc, "stride is too large:", id.c_str(), "internal max is %d", TQualifier::layoutXfbStrideEnd - 1);
+ if (value < (int)TQualifier::layoutXfbStrideEnd)
+ publicType.qualifier.layoutXfbStride = value;
+ return;
+ }
+ }
+
+ if (id == "input_attachment_index") {
+ requireVulkan(loc, "input_attachment_index");
+ if (value >= (int)TQualifier::layoutAttachmentEnd)
+ error(loc, "attachment index is too large", id.c_str(), "");
+ else
+ publicType.qualifier.layoutAttachment = value;
+ return;
+ }
+ if (id == "constant_id") {
+ requireSpv(loc, "constant_id");
+ if (value >= (int)TQualifier::layoutSpecConstantIdEnd) {
+ error(loc, "specialization-constant id is too large", id.c_str(), "");
+ } else {
+ publicType.qualifier.layoutSpecConstantId = value;
+ publicType.qualifier.specConstant = true;
+ if (! intermediate.addUsedConstantId(value))
+ error(loc, "specialization-constant id already used", id.c_str(), "");
+ }
+ return;
+ }
+
+ switch (language) {
+ case EShLangVertex:
+ break;
+
+ case EShLangTessControl:
+ if (id == "vertices") {
+ if (value == 0)
+ error(loc, "must be greater than 0", "vertices", "");
+ else
+ publicType.shaderQualifiers.vertices = value;
+ return;
+ }
+ break;
+
+ case EShLangTessEvaluation:
+ break;
+
+ case EShLangGeometry:
+ if (id == "invocations") {
+ if (value == 0)
+ error(loc, "must be at least 1", "invocations", "");
+ else
+ publicType.shaderQualifiers.invocations = value;
+ return;
+ }
+ if (id == "max_vertices") {
+ publicType.shaderQualifiers.vertices = value;
+ if (value > resources.maxGeometryOutputVertices)
+ error(loc, "too large, must be less than gl_MaxGeometryOutputVertices", "max_vertices", "");
+ return;
+ }
+ if (id == "stream") {
+ publicType.qualifier.layoutStream = value;
+ return;
+ }
+ break;
+
+ case EShLangFragment:
+ if (id == "index") {
+ const char* exts[2] = { E_GL_ARB_separate_shader_objects, E_GL_ARB_explicit_attrib_location };
+ publicType.qualifier.layoutIndex = value;
+ return;
+ }
+ break;
+
+ case EShLangCompute:
+ if (id.compare(0, 11, "local_size_") == 0) {
+ if (id == "local_size_x") {
+ publicType.shaderQualifiers.localSize[0] = value;
+ return;
+ }
+ if (id == "local_size_y") {
+ publicType.shaderQualifiers.localSize[1] = value;
+ return;
+ }
+ if (id == "local_size_z") {
+ publicType.shaderQualifiers.localSize[2] = value;
+ return;
+ }
+ if (spv > 0) {
+ if (id == "local_size_x_id") {
+ publicType.shaderQualifiers.localSizeSpecId[0] = value;
+ return;
+ }
+ if (id == "local_size_y_id") {
+ publicType.shaderQualifiers.localSizeSpecId[1] = value;
+ return;
+ }
+ if (id == "local_size_z_id") {
+ publicType.shaderQualifiers.localSizeSpecId[2] = value;
+ return;
+ }
+ }
+ }
+ break;
+
+ default:
+ break;
+ }
+
+ error(loc, "there is no such layout identifier for this stage taking an assigned value", id.c_str(), "");
+}
+
+// Merge any layout qualifier information from src into dst, leaving everything else in dst alone
+//
+// "More than one layout qualifier may appear in a single declaration.
+// Additionally, the same layout-qualifier-name can occur multiple times
+// within a layout qualifier or across multiple layout qualifiers in the
+// same declaration. When the same layout-qualifier-name occurs
+// multiple times, in a single declaration, the last occurrence overrides
+// the former occurrence(s). Further, if such a layout-qualifier-name
+// will effect subsequent declarations or other observable behavior, it
+// is only the last occurrence that will have any effect, behaving as if
+// the earlier occurrence(s) within the declaration are not present.
+// This is also true for overriding layout-qualifier-names, where one
+// overrides the other (e.g., row_major vs. column_major); only the last
+// occurrence has any effect."
+//
+void HlslParseContext::mergeObjectLayoutQualifiers(TQualifier& dst, const TQualifier& src, bool inheritOnly)
+{
+ if (src.hasMatrix())
+ dst.layoutMatrix = src.layoutMatrix;
+ if (src.hasPacking())
+ dst.layoutPacking = src.layoutPacking;
+
+ if (src.hasStream())
+ dst.layoutStream = src.layoutStream;
+
+ if (src.hasFormat())
+ dst.layoutFormat = src.layoutFormat;
+
+ if (src.hasXfbBuffer())
+ dst.layoutXfbBuffer = src.layoutXfbBuffer;
+
+ if (src.hasAlign())
+ dst.layoutAlign = src.layoutAlign;
+
+ if (! inheritOnly) {
+ if (src.hasLocation())
+ dst.layoutLocation = src.layoutLocation;
+ if (src.hasComponent())
+ dst.layoutComponent = src.layoutComponent;
+ if (src.hasIndex())
+ dst.layoutIndex = src.layoutIndex;
+
+ if (src.hasOffset())
+ dst.layoutOffset = src.layoutOffset;
+
+ if (src.hasSet())
+ dst.layoutSet = src.layoutSet;
+ if (src.layoutBinding != TQualifier::layoutBindingEnd)
+ dst.layoutBinding = src.layoutBinding;
+
+ if (src.hasXfbStride())
+ dst.layoutXfbStride = src.layoutXfbStride;
+ if (src.hasXfbOffset())
+ dst.layoutXfbOffset = src.layoutXfbOffset;
+ if (src.hasAttachment())
+ dst.layoutAttachment = src.layoutAttachment;
+ if (src.hasSpecConstantId())
+ dst.layoutSpecConstantId = src.layoutSpecConstantId;
+
+ if (src.layoutPushConstant)
+ dst.layoutPushConstant = true;
+ }
+}
+
+//
+// Look up a function name in the symbol table, and make sure it is a function.
+//
+// Return the function symbol if found, otherwise nullptr.
+//
+const TFunction* HlslParseContext::findFunction(const TSourceLoc& loc, const TFunction& call, bool& builtIn)
+{
+ const TFunction* function = nullptr;
+
+ if (symbolTable.isFunctionNameVariable(call.getName())) {
+ error(loc, "can't use function syntax on variable", call.getName().c_str(), "");
+ return nullptr;
+ }
+
+ // first, look for an exact match
+ TSymbol* symbol = symbolTable.find(call.getMangledName(), &builtIn);
+ if (symbol)
+ return symbol->getAsFunction();
+
+ // exact match not found, look through a list of overloaded functions of the same name
+
+ const TFunction* candidate = nullptr;
+ TVector<TFunction*> candidateList;
+ symbolTable.findFunctionNameList(call.getMangledName(), candidateList, builtIn);
+
+ for (TVector<TFunction*>::const_iterator it = candidateList.begin(); it != candidateList.end(); ++it) {
+ const TFunction& function = *(*it);
+
+ // to even be a potential match, number of arguments has to match
+ if (call.getParamCount() != function.getParamCount())
+ continue;
+
+ bool possibleMatch = true;
+ for (int i = 0; i < function.getParamCount(); ++i) {
+ // same types is easy
+ if (*function[i].type == *call[i].type)
+ continue;
+
+ // We have a mismatch in type, see if it is implicitly convertible
+
+ if (function[i].type->isArray() || call[i].type->isArray() ||
+ ! function[i].type->sameElementShape(*call[i].type))
+ possibleMatch = false;
+ else {
+ // do direction-specific checks for conversion of basic type
+ if (function[i].type->getQualifier().isParamInput()) {
+ if (! intermediate.canImplicitlyPromote(call[i].type->getBasicType(), function[i].type->getBasicType()))
+ possibleMatch = false;
+ }
+ if (function[i].type->getQualifier().isParamOutput()) {
+ if (! intermediate.canImplicitlyPromote(function[i].type->getBasicType(), call[i].type->getBasicType()))
+ possibleMatch = false;
+ }
+ }
+ if (! possibleMatch)
+ break;
+ }
+ if (possibleMatch) {
+ if (candidate) {
+ // our second match, meaning ambiguity
+ error(loc, "ambiguous function signature match: multiple signatures match under implicit type conversion", call.getName().c_str(), "");
+ } else
+ candidate = &function;
+ }
+ }
+
+ if (candidate == nullptr)
+ error(loc, "no matching overloaded function found", call.getName().c_str(), "");
+
+ return candidate;
+}
+
+//
+// Do everything necessary to handle a variable (non-block) declaration.
+// Either redeclaring a variable, or making a new one, updating the symbol
+// table, and all error checking.
+//
+// Returns a subtree node that computes an initializer, if needed.
+// Returns nullptr if there is no code to execute for initialization.
+//
+// 'publicType' is the type part of the declaration (to the left)
+// 'arraySizes' is the arrayness tagged on the identifier (to the right)
+//
+TIntermNode* HlslParseContext::declareVariable(const TSourceLoc& loc, TString& identifier, const TType& parseType, TArraySizes* arraySizes, TIntermTyped* initializer)
+{
+ TType type;
+ type.shallowCopy(parseType);
+ if (type.isImplicitlySizedArray()) {
+ // Because "int[] a = int[2](...), b = int[3](...)" makes two arrays a and b
+ // of different sizes, for this case sharing the shallow copy of arrayness
+ // with the publicType oversubscribes it, so get a deep copy of the arrayness.
+ type.newArraySizes(*parseType.getArraySizes());
+ }
+
+ if (voidErrorCheck(loc, identifier, type.getBasicType()))
+ return nullptr;
+
+ // Check for redeclaration of built-ins and/or attempting to declare a reserved name
+ bool newDeclaration = false; // true if a new entry gets added to the symbol table
+ TSymbol* symbol = nullptr; // = redeclareBuiltinVariable(loc, identifier, type.getQualifier(), publicType.shaderQualifiers, newDeclaration);
+
+ inheritGlobalDefaults(type.getQualifier());
+
+ // Declare the variable
+ if (arraySizes || type.isArray()) {
+ // Arrayness is potentially coming both from the type and from the
+ // variable: "int[] a[];" or just one or the other.
+ // Merge it all to the type, so all arrayness is part of the type.
+ arrayDimMerge(type, arraySizes);
+ declareArray(loc, identifier, type, symbol, newDeclaration);
+ } else {
+ // non-array case
+ if (! symbol)
+ symbol = declareNonArray(loc, identifier, type, newDeclaration);
+ else if (type != symbol->getType())
+ error(loc, "cannot change the type of", "redeclaration", symbol->getName().c_str());
+ }
+
+ if (! symbol)
+ return nullptr;
+
+ // Deal with initializer
+ TIntermNode* initNode = nullptr;
+ if (symbol && initializer) {
+ TVariable* variable = symbol->getAsVariable();
+ if (! variable) {
+ error(loc, "initializer requires a variable, not a member", identifier.c_str(), "");
+ return nullptr;
+ }
+ initNode = executeInitializer(loc, initializer, variable);
+ }
+
+ // see if it's a linker-level object to track
+ if (newDeclaration && symbolTable.atGlobalLevel())
+ intermediate.addSymbolLinkageNode(linkage, *symbol);
+
+ return initNode;
+}
+
+// Pick up global defaults from the provide global defaults into dst.
+void HlslParseContext::inheritGlobalDefaults(TQualifier& dst) const
+{
+ if (dst.storage == EvqVaryingOut) {
+ if (! dst.hasStream() && language == EShLangGeometry)
+ dst.layoutStream = globalOutputDefaults.layoutStream;
+ if (! dst.hasXfbBuffer())
+ dst.layoutXfbBuffer = globalOutputDefaults.layoutXfbBuffer;
+ }
+}
+
+//
+// Make an internal-only variable whose name is for debug purposes only
+// and won't be searched for. Callers will only use the return value to use
+// the variable, not the name to look it up. It is okay if the name
+// is the same as other names; there won't be any conflict.
+//
+TVariable* HlslParseContext::makeInternalVariable(const char* name, const TType& type) const
+{
+ TString* nameString = new TString(name);
+ TVariable* variable = new TVariable(nameString, type);
+ symbolTable.makeInternalVariable(*variable);
+
+ return variable;
+}
+
+//
+// Declare a non-array variable, the main point being there is no redeclaration
+// for resizing allowed.
+//
+// Return the successfully declared variable.
+//
+TVariable* HlslParseContext::declareNonArray(const TSourceLoc& loc, TString& identifier, TType& type, bool& newDeclaration)
+{
+ // make a new variable
+ TVariable* variable = new TVariable(&identifier, type);
+
+ // add variable to symbol table
+ if (! symbolTable.insert(*variable)) {
+ error(loc, "redefinition", variable->getName().c_str(), "");
+ return nullptr;
+ } else {
+ newDeclaration = true;
+ return variable;
+ }
+}
+
+//
+// Handle all types of initializers from the grammar.
+//
+// Returning nullptr just means there is no code to execute to handle the
+// initializer, which will, for example, be the case for constant initializers.
+//
+TIntermNode* HlslParseContext::executeInitializer(const TSourceLoc& loc, TIntermTyped* initializer, TVariable* variable)
+{
+ //
+ // Identifier must be of type constant, a global, or a temporary, and
+ // starting at version 120, desktop allows uniforms to have initializers.
+ //
+ TStorageQualifier qualifier = variable->getType().getQualifier().storage;
+
+ //
+ // If the initializer was from braces { ... }, we convert the whole subtree to a
+ // constructor-style subtree, allowing the rest of the code to operate
+ // identically for both kinds of initializers.
+ //
+ initializer = convertInitializerList(loc, variable->getType(), initializer);
+ if (! initializer) {
+ // error recovery; don't leave const without constant values
+ if (qualifier == EvqConst)
+ variable->getWritableType().getQualifier().storage = EvqTemporary;
+ return nullptr;
+ }
+
+ // Fix outer arrayness if variable is unsized, getting size from the initializer
+ if (initializer->getType().isExplicitlySizedArray() &&
+ variable->getType().isImplicitlySizedArray())
+ variable->getWritableType().changeOuterArraySize(initializer->getType().getOuterArraySize());
+
+ // Inner arrayness can also get set by an initializer
+ if (initializer->getType().isArrayOfArrays() && variable->getType().isArrayOfArrays() &&
+ initializer->getType().getArraySizes()->getNumDims() ==
+ variable->getType().getArraySizes()->getNumDims()) {
+ // adopt unsized sizes from the initializer's sizes
+ for (int d = 1; d < variable->getType().getArraySizes()->getNumDims(); ++d) {
+ if (variable->getType().getArraySizes()->getDimSize(d) == UnsizedArraySize)
+ variable->getWritableType().getArraySizes().setDimSize(d, initializer->getType().getArraySizes()->getDimSize(d));
+ }
+ }
+
+ // Uniform and global consts require a constant initializer
+ if (qualifier == EvqUniform && initializer->getType().getQualifier().storage != EvqConst) {
+ error(loc, "uniform initializers must be constant", "=", "'%s'", variable->getType().getCompleteString().c_str());
+ variable->getWritableType().getQualifier().storage = EvqTemporary;
+ return nullptr;
+ }
+ if (qualifier == EvqConst && symbolTable.atGlobalLevel() && initializer->getType().getQualifier().storage != EvqConst) {
+ error(loc, "global const initializers must be constant", "=", "'%s'", variable->getType().getCompleteString().c_str());
+ variable->getWritableType().getQualifier().storage = EvqTemporary;
+ return nullptr;
+ }
+
+ // Const variables require a constant initializer, depending on version
+ if (qualifier == EvqConst) {
+ if (initializer->getType().getQualifier().storage != EvqConst) {
+ variable->getWritableType().getQualifier().storage = EvqConstReadOnly;
+ qualifier = EvqConstReadOnly;
+ }
+ }
+
+ if (qualifier == EvqConst || qualifier == EvqUniform) {
+ // Compile-time tagging of the variable with its constant value...
+
+ initializer = intermediate.addConversion(EOpAssign, variable->getType(), initializer);
+ if (! initializer || ! initializer->getAsConstantUnion() || variable->getType() != initializer->getType()) {
+ error(loc, "non-matching or non-convertible constant type for const initializer",
+ variable->getType().getStorageQualifierString(), "");
+ variable->getWritableType().getQualifier().storage = EvqTemporary;
+ return nullptr;
+ }
+
+ variable->setConstArray(initializer->getAsConstantUnion()->getConstArray());
+ } else {
+ // normal assigning of a value to a variable...
+ specializationCheck(loc, initializer->getType(), "initializer");
+ TIntermSymbol* intermSymbol = intermediate.addSymbol(*variable, loc);
+ TIntermNode* initNode = intermediate.addAssign(EOpAssign, intermSymbol, initializer, loc);
+ if (! initNode)
+ assignError(loc, "=", intermSymbol->getCompleteString(), initializer->getCompleteString());
+
+ return initNode;
+ }
+
+ return nullptr;
+}
+
+//
+// Reprocess any initializer-list { ... } parts of the initializer.
+// Need to hierarchically assign correct types and implicit
+// conversions. Will do this mimicking the same process used for
+// creating a constructor-style initializer, ensuring we get the
+// same form.
+//
+TIntermTyped* HlslParseContext::convertInitializerList(const TSourceLoc& loc, const TType& type, TIntermTyped* initializer)
+{
+ // Will operate recursively. Once a subtree is found that is constructor style,
+ // everything below it is already good: Only the "top part" of the initializer
+ // can be an initializer list, where "top part" can extend for several (or all) levels.
+
+ // see if we have bottomed out in the tree within the initializer-list part
+ TIntermAggregate* initList = initializer->getAsAggregate();
+ if (! initList || initList->getOp() != EOpNull)
+ return initializer;
+
+ // Of the initializer-list set of nodes, need to process bottom up,
+ // so recurse deep, then process on the way up.
+
+ // Go down the tree here...
+ if (type.isArray()) {
+ // The type's array might be unsized, which could be okay, so base sizes on the size of the aggregate.
+ // Later on, initializer execution code will deal with array size logic.
+ TType arrayType;
+ arrayType.shallowCopy(type); // sharing struct stuff is fine
+ arrayType.newArraySizes(*type.getArraySizes()); // but get a fresh copy of the array information, to edit below
+
+ // edit array sizes to fill in unsized dimensions
+ arrayType.changeOuterArraySize((int)initList->getSequence().size());
+ TIntermTyped* firstInit = initList->getSequence()[0]->getAsTyped();
+ if (arrayType.isArrayOfArrays() && firstInit->getType().isArray() &&
+ arrayType.getArraySizes().getNumDims() == firstInit->getType().getArraySizes()->getNumDims() + 1) {
+ for (int d = 1; d < arrayType.getArraySizes().getNumDims(); ++d) {
+ if (arrayType.getArraySizes().getDimSize(d) == UnsizedArraySize)
+ arrayType.getArraySizes().setDimSize(d, firstInit->getType().getArraySizes()->getDimSize(d - 1));
+ }
+ }
+
+ TType elementType(arrayType, 0); // dereferenced type
+ for (size_t i = 0; i < initList->getSequence().size(); ++i) {
+ initList->getSequence()[i] = convertInitializerList(loc, elementType, initList->getSequence()[i]->getAsTyped());
+ if (initList->getSequence()[i] == nullptr)
+ return nullptr;
+ }
+
+ return addConstructor(loc, initList, arrayType, mapTypeToConstructorOp(arrayType));
+ } else if (type.isStruct()) {
+ if (type.getStruct()->size() != initList->getSequence().size()) {
+ error(loc, "wrong number of structure members", "initializer list", "");
+ return nullptr;
+ }
+ for (size_t i = 0; i < type.getStruct()->size(); ++i) {
+ initList->getSequence()[i] = convertInitializerList(loc, *(*type.getStruct())[i].type, initList->getSequence()[i]->getAsTyped());
+ if (initList->getSequence()[i] == nullptr)
+ return nullptr;
+ }
+ } else if (type.isMatrix()) {
+ if (type.getMatrixCols() != (int)initList->getSequence().size()) {
+ error(loc, "wrong number of matrix columns:", "initializer list", type.getCompleteString().c_str());
+ return nullptr;
+ }
+ TType vectorType(type, 0); // dereferenced type
+ for (int i = 0; i < type.getMatrixCols(); ++i) {
+ initList->getSequence()[i] = convertInitializerList(loc, vectorType, initList->getSequence()[i]->getAsTyped());
+ if (initList->getSequence()[i] == nullptr)
+ return nullptr;
+ }
+ } else if (type.isVector()) {
+ if (type.getVectorSize() != (int)initList->getSequence().size()) {
+ error(loc, "wrong vector size (or rows in a matrix column):", "initializer list", type.getCompleteString().c_str());
+ return nullptr;
+ }
+ } else {
+ error(loc, "unexpected initializer-list type:", "initializer list", type.getCompleteString().c_str());
+ return nullptr;
+ }
+
+ // now that the subtree is processed, process this node
+ return addConstructor(loc, initList, type, mapTypeToConstructorOp(type));
+}
+
+//
+// Test for the correctness of the parameters passed to various constructor functions
+// and also convert them to the right data type, if allowed and required.
+//
+// Returns nullptr for an error or the constructed node (aggregate or typed) for no error.
+//
+TIntermTyped* HlslParseContext::addConstructor(const TSourceLoc& loc, TIntermNode* node, const TType& type, TOperator op)
+{
+ if (node == nullptr || node->getAsTyped() == nullptr)
+ return nullptr;
+
+ TIntermAggregate* aggrNode = node->getAsAggregate();
+
+ // Combined texture-sampler constructors are completely semantic checked
+ // in constructorTextureSamplerError()
+ if (op == EOpConstructTextureSampler)
+ return intermediate.setAggregateOperator(aggrNode, op, type, loc);
+
+ TTypeList::const_iterator memberTypes;
+ if (op == EOpConstructStruct)
+ memberTypes = type.getStruct()->begin();
+
+ TType elementType;
+ if (type.isArray()) {
+ TType dereferenced(type, 0);
+ elementType.shallowCopy(dereferenced);
+ } else
+ elementType.shallowCopy(type);
+
+ bool singleArg;
+ if (aggrNode) {
+ if (aggrNode->getOp() != EOpNull || aggrNode->getSequence().size() == 1)
+ singleArg = true;
+ else
+ singleArg = false;
+ } else
+ singleArg = true;
+
+ TIntermTyped *newNode;
+ if (singleArg) {
+ // If structure constructor or array constructor is being called
+ // for only one parameter inside the structure, we need to call constructAggregate function once.
+ if (type.isArray())
+ newNode = constructAggregate(node, elementType, 1, node->getLoc());
+ else if (op == EOpConstructStruct)
+ newNode = constructAggregate(node, *(*memberTypes).type, 1, node->getLoc());
+ else
+ newNode = constructBuiltIn(type, op, node->getAsTyped(), node->getLoc(), false);
+
+ if (newNode && (type.isArray() || op == EOpConstructStruct))
+ newNode = intermediate.setAggregateOperator(newNode, EOpConstructStruct, type, loc);
+
+ return newNode;
+ }
+
+ //
+ // Handle list of arguments.
+ //
+ TIntermSequence &sequenceVector = aggrNode->getSequence(); // Stores the information about the parameter to the constructor
+ // if the structure constructor contains more than one parameter, then construct
+ // each parameter
+
+ int paramCount = 0; // keeps a track of the constructor parameter number being checked
+
+ // for each parameter to the constructor call, check to see if the right type is passed or convert them
+ // to the right type if possible (and allowed).
+ // for structure constructors, just check if the right type is passed, no conversion is allowed.
+
+ for (TIntermSequence::iterator p = sequenceVector.begin();
+ p != sequenceVector.end(); p++, paramCount++) {
+ if (type.isArray())
+ newNode = constructAggregate(*p, elementType, paramCount + 1, node->getLoc());
+ else if (op == EOpConstructStruct)
+ newNode = constructAggregate(*p, *(memberTypes[paramCount]).type, paramCount + 1, node->getLoc());
+ else
+ newNode = constructBuiltIn(type, op, (*p)->getAsTyped(), node->getLoc(), true);
+
+ if (newNode)
+ *p = newNode;
+ else
+ return nullptr;
+ }
+
+ TIntermTyped* constructor = intermediate.setAggregateOperator(aggrNode, op, type, loc);
+
+ return constructor;
+}
+
+// Function for constructor implementation. Calls addUnaryMath with appropriate EOp value
+// for the parameter to the constructor (passed to this function). Essentially, it converts
+// the parameter types correctly. If a constructor expects an int (like ivec2) and is passed a
+// float, then float is converted to int.
+//
+// Returns nullptr for an error or the constructed node.
+//
+TIntermTyped* HlslParseContext::constructBuiltIn(const TType& type, TOperator op, TIntermTyped* node, const TSourceLoc& loc, bool subset)
+{
+ TIntermTyped* newNode;
+ TOperator basicOp;
+
+ //
+ // First, convert types as needed.
+ //
+ switch (op) {
+ case EOpConstructVec2:
+ case EOpConstructVec3:
+ case EOpConstructVec4:
+ case EOpConstructMat2x2:
+ case EOpConstructMat2x3:
+ case EOpConstructMat2x4:
+ case EOpConstructMat3x2:
+ case EOpConstructMat3x3:
+ case EOpConstructMat3x4:
+ case EOpConstructMat4x2:
+ case EOpConstructMat4x3:
+ case EOpConstructMat4x4:
+ case EOpConstructFloat:
+ basicOp = EOpConstructFloat;
+ break;
+
+ case EOpConstructDVec2:
+ case EOpConstructDVec3:
+ case EOpConstructDVec4:
+ case EOpConstructDMat2x2:
+ case EOpConstructDMat2x3:
+ case EOpConstructDMat2x4:
+ case EOpConstructDMat3x2:
+ case EOpConstructDMat3x3:
+ case EOpConstructDMat3x4:
+ case EOpConstructDMat4x2:
+ case EOpConstructDMat4x3:
+ case EOpConstructDMat4x4:
+ case EOpConstructDouble:
+ basicOp = EOpConstructDouble;
+ break;
+
+ case EOpConstructIVec2:
+ case EOpConstructIVec3:
+ case EOpConstructIVec4:
+ case EOpConstructInt:
+ basicOp = EOpConstructInt;
+ break;
+
+ case EOpConstructUVec2:
+ case EOpConstructUVec3:
+ case EOpConstructUVec4:
+ case EOpConstructUint:
+ basicOp = EOpConstructUint;
+ break;
+
+ case EOpConstructBVec2:
+ case EOpConstructBVec3:
+ case EOpConstructBVec4:
+ case EOpConstructBool:
+ basicOp = EOpConstructBool;
+ break;
+
+ default:
+ error(loc, "unsupported construction", "", "");
+
+ return nullptr;
+ }
+ newNode = intermediate.addUnaryMath(basicOp, node, node->getLoc());
+ if (newNode == nullptr) {
+ error(loc, "can't convert", "constructor", "");
+ return nullptr;
+ }
+
+ //
+ // Now, if there still isn't an operation to do the construction, and we need one, add one.
+ //
+
+ // Otherwise, skip out early.
+ if (subset || (newNode != node && newNode->getType() == type))
+ return newNode;
+
+ // setAggregateOperator will insert a new node for the constructor, as needed.
+ return intermediate.setAggregateOperator(newNode, op, type, loc);
+}
+
+// This function tests for the type of the parameters to the structure or array constructor. Raises
+// an error message if the expected type does not match the parameter passed to the constructor.
+//
+// Returns nullptr for an error or the input node itself if the expected and the given parameter types match.
+//
+TIntermTyped* HlslParseContext::constructAggregate(TIntermNode* node, const TType& type, int paramCount, const TSourceLoc& loc)
+{
+ TIntermTyped* converted = intermediate.addConversion(EOpConstructStruct, type, node->getAsTyped());
+ if (! converted || converted->getType() != type) {
+ error(loc, "", "constructor", "cannot convert parameter %d from '%s' to '%s'", paramCount,
+ node->getAsTyped()->getType().getCompleteString().c_str(), type.getCompleteString().c_str());
+
+ return nullptr;
+ }
+
+ return converted;
+}
+
+//
+// Do everything needed to add an interface block.
+//
+void HlslParseContext::declareBlock(const TSourceLoc& loc, TTypeList& typeList, const TString* instanceName, TArraySizes* arraySizes)
+{
+ // fix and check for member storage qualifiers and types that don't belong within a block
+ for (unsigned int member = 0; member < typeList.size(); ++member) {
+ TType& memberType = *typeList[member].type;
+ TQualifier& memberQualifier = memberType.getQualifier();
+ const TSourceLoc& memberLoc = typeList[member].loc;
+ globalQualifierFix(memberLoc, memberQualifier);
+ memberQualifier.storage = currentBlockQualifier.storage;
+ }
+
+ // This might be a redeclaration of a built-in block. If so, redeclareBuiltinBlock() will
+ // do all the rest.
+ if (! symbolTable.atBuiltInLevel() && builtInName(*blockName)) {
+ redeclareBuiltinBlock(loc, typeList, *blockName, instanceName, arraySizes);
+ return;
+ }
+
+ // Make default block qualification, and adjust the member qualifications
+
+ TQualifier defaultQualification;
+ switch (currentBlockQualifier.storage) {
+ case EvqUniform: defaultQualification = globalUniformDefaults; break;
+ case EvqBuffer: defaultQualification = globalBufferDefaults; break;
+ case EvqVaryingIn: defaultQualification = globalInputDefaults; break;
+ case EvqVaryingOut: defaultQualification = globalOutputDefaults; break;
+ default: defaultQualification.clear(); break;
+ }
+
+ // Special case for "push_constant uniform", which has a default of std430,
+ // contrary to normal uniform defaults, and can't have a default tracked for it.
+ if (currentBlockQualifier.layoutPushConstant && ! currentBlockQualifier.hasPacking())
+ currentBlockQualifier.layoutPacking = ElpStd430;
+
+ // fix and check for member layout qualifiers
+
+ mergeObjectLayoutQualifiers(defaultQualification, currentBlockQualifier, true);
+
+ bool memberWithLocation = false;
+ bool memberWithoutLocation = false;
+ for (unsigned int member = 0; member < typeList.size(); ++member) {
+ TQualifier& memberQualifier = typeList[member].type->getQualifier();
+ const TSourceLoc& memberLoc = typeList[member].loc;
+ if (memberQualifier.hasStream()) {
+ if (defaultQualification.layoutStream != memberQualifier.layoutStream)
+ error(memberLoc, "member cannot contradict block", "stream", "");
+ }
+
+ // "This includes a block's inheritance of the
+ // current global default buffer, a block member's inheritance of the block's
+ // buffer, and the requirement that any *xfb_buffer* declared on a block
+ // member must match the buffer inherited from the block."
+ if (memberQualifier.hasXfbBuffer()) {
+ if (defaultQualification.layoutXfbBuffer != memberQualifier.layoutXfbBuffer)
+ error(memberLoc, "member cannot contradict block (or what block inherited from global)", "xfb_buffer", "");
+ }
+
+ if (memberQualifier.hasPacking())
+ error(memberLoc, "member of block cannot have a packing layout qualifier", typeList[member].type->getFieldName().c_str(), "");
+ if (memberQualifier.hasLocation()) {
+ switch (currentBlockQualifier.storage) {
+ case EvqVaryingIn:
+ case EvqVaryingOut:
+ memberWithLocation = true;
+ break;
+ default:
+ break;
+ }
+ } else
+ memberWithoutLocation = true;
+ if (memberQualifier.hasAlign()) {
+ if (defaultQualification.layoutPacking != ElpStd140 && defaultQualification.layoutPacking != ElpStd430)
+ error(memberLoc, "can only be used with std140 or std430 layout packing", "align", "");
+ }
+
+ TQualifier newMemberQualification = defaultQualification;
+ mergeQualifiers(memberLoc, newMemberQualification, memberQualifier, false);
+ memberQualifier = newMemberQualification;
+ }
+
+ // Process the members
+ fixBlockLocations(loc, currentBlockQualifier, typeList, memberWithLocation, memberWithoutLocation);
+ fixBlockXfbOffsets(currentBlockQualifier, typeList);
+ fixBlockUniformOffsets(currentBlockQualifier, typeList);
+
+ // reverse merge, so that currentBlockQualifier now has all layout information
+ // (can't use defaultQualification directly, it's missing other non-layout-default-class qualifiers)
+ mergeObjectLayoutQualifiers(currentBlockQualifier, defaultQualification, true);
+
+ //
+ // Build and add the interface block as a new type named 'blockName'
+ //
+
+ TType blockType(&typeList, *blockName, currentBlockQualifier);
+ if (arraySizes)
+ blockType.newArraySizes(*arraySizes);
+
+ //
+ // Don't make a user-defined type out of block name; that will cause an error
+ // if the same block name gets reused in a different interface.
+ //
+ // "Block names have no other use within a shader
+ // beyond interface matching; it is a compile-time error to use a block name at global scope for anything
+ // other than as a block name (e.g., use of a block name for a global variable name or function name is
+ // currently reserved)."
+ //
+ // Use the symbol table to prevent normal reuse of the block's name, as a variable entry,
+ // whose type is EbtBlock, but without all the structure; that will come from the type
+ // the instances point to.
+ //
+ TType blockNameType(EbtBlock, blockType.getQualifier().storage);
+ TVariable* blockNameVar = new TVariable(blockName, blockNameType);
+ if (! symbolTable.insert(*blockNameVar)) {
+ TSymbol* existingName = symbolTable.find(*blockName);
+ if (existingName->getType().getBasicType() == EbtBlock) {
+ if (existingName->getType().getQualifier().storage == blockType.getQualifier().storage) {
+ error(loc, "Cannot reuse block name within the same interface:", blockName->c_str(), blockType.getStorageQualifierString());
+ return;
+ }
+ } else {
+ error(loc, "block name cannot redefine a non-block name", blockName->c_str(), "");
+ return;
+ }
+ }
+
+ // Add the variable, as anonymous or named instanceName.
+ // Make an anonymous variable if no name was provided.
+ if (! instanceName)
+ instanceName = NewPoolTString("");
+
+ TVariable& variable = *new TVariable(instanceName, blockType);
+ if (! symbolTable.insert(variable)) {
+ if (*instanceName == "")
+ error(loc, "nameless block contains a member that already has a name at global scope", blockName->c_str(), "");
+ else
+ error(loc, "block instance name redefinition", variable.getName().c_str(), "");
+
+ return;
+ }
+
+ if (isIoResizeArray(blockType)) {
+ ioArraySymbolResizeList.push_back(&variable);
+ checkIoArraysConsistency(loc, true);
+ } else
+ fixIoArraySize(loc, variable.getWritableType());
+
+ // Save it in the AST for linker use.
+ intermediate.addSymbolLinkageNode(linkage, variable);
+}
+
+//
+// "For a block, this process applies to the entire block, or until the first member
+// is reached that has a location layout qualifier. When a block member is declared with a location
+// qualifier, its location comes from that qualifier: The member's location qualifier overrides the block-level
+// declaration. Subsequent members are again assigned consecutive locations, based on the newest location,
+// until the next member declared with a location qualifier. The values used for locations do not have to be
+// declared in increasing order."
+void HlslParseContext::fixBlockLocations(const TSourceLoc& loc, TQualifier& qualifier, TTypeList& typeList, bool memberWithLocation, bool memberWithoutLocation)
+{
+ // "If a block has no block-level location layout qualifier, it is required that either all or none of its members
+ // have a location layout qualifier, or a compile-time error results."
+ if (! qualifier.hasLocation() && memberWithLocation && memberWithoutLocation)
+ error(loc, "either the block needs a location, or all members need a location, or no members have a location", "location", "");
+ else {
+ if (memberWithLocation) {
+ // remove any block-level location and make it per *every* member
+ int nextLocation = 0; // by the rule above, initial value is not relevant
+ if (qualifier.hasAnyLocation()) {
+ nextLocation = qualifier.layoutLocation;
+ qualifier.layoutLocation = TQualifier::layoutLocationEnd;
+ if (qualifier.hasComponent()) {
+ // "It is a compile-time error to apply the *component* qualifier to a ... block"
+ error(loc, "cannot apply to a block", "component", "");
+ }
+ if (qualifier.hasIndex()) {
+ error(loc, "cannot apply to a block", "index", "");
+ }
+ }
+ for (unsigned int member = 0; member < typeList.size(); ++member) {
+ TQualifier& memberQualifier = typeList[member].type->getQualifier();
+ const TSourceLoc& memberLoc = typeList[member].loc;
+ if (! memberQualifier.hasLocation()) {
+ if (nextLocation >= (int)TQualifier::layoutLocationEnd)
+ error(memberLoc, "location is too large", "location", "");
+ memberQualifier.layoutLocation = nextLocation;
+ memberQualifier.layoutComponent = 0;
+ }
+ nextLocation = memberQualifier.layoutLocation + intermediate.computeTypeLocationSize(*typeList[member].type);
+ }
+ }
+ }
+}
+
+void HlslParseContext::fixBlockXfbOffsets(TQualifier& qualifier, TTypeList& typeList)
+{
+ // "If a block is qualified with xfb_offset, all its
+ // members are assigned transform feedback buffer offsets. If a block is not qualified with xfb_offset, any
+ // members of that block not qualified with an xfb_offset will not be assigned transform feedback buffer
+ // offsets."
+
+ if (! qualifier.hasXfbBuffer() || ! qualifier.hasXfbOffset())
+ return;
+
+ int nextOffset = qualifier.layoutXfbOffset;
+ for (unsigned int member = 0; member < typeList.size(); ++member) {
+ TQualifier& memberQualifier = typeList[member].type->getQualifier();
+ bool containsDouble = false;
+ int memberSize = intermediate.computeTypeXfbSize(*typeList[member].type, containsDouble);
+ // see if we need to auto-assign an offset to this member
+ if (! memberQualifier.hasXfbOffset()) {
+ // "if applied to an aggregate containing a double, the offset must also be a multiple of 8"
+ if (containsDouble)
+ RoundToPow2(nextOffset, 8);
+ memberQualifier.layoutXfbOffset = nextOffset;
+ } else
+ nextOffset = memberQualifier.layoutXfbOffset;
+ nextOffset += memberSize;
+ }
+
+ // The above gave all block members an offset, so we can take it off the block now,
+ // which will avoid double counting the offset usage.
+ qualifier.layoutXfbOffset = TQualifier::layoutXfbOffsetEnd;
+}
+
+// Calculate and save the offset of each block member, using the recursively
+// defined block offset rules and the user-provided offset and align.
+//
+// Also, compute and save the total size of the block. For the block's size, arrayness
+// is not taken into account, as each element is backed by a separate buffer.
+//
+void HlslParseContext::fixBlockUniformOffsets(TQualifier& qualifier, TTypeList& typeList)
+{
+ if (! qualifier.isUniformOrBuffer())
+ return;
+ if (qualifier.layoutPacking != ElpStd140 && qualifier.layoutPacking != ElpStd430)
+ return;
+
+ int offset = 0;
+ int memberSize;
+ for (unsigned int member = 0; member < typeList.size(); ++member) {
+ TQualifier& memberQualifier = typeList[member].type->getQualifier();
+ const TSourceLoc& memberLoc = typeList[member].loc;
+
+ // "When align is applied to an array, it effects only the start of the array, not the array's internal stride."
+
+ // modify just the children's view of matrix layout, if there is one for this member
+ TLayoutMatrix subMatrixLayout = typeList[member].type->getQualifier().layoutMatrix;
+ int dummyStride;
+ int memberAlignment = intermediate.getBaseAlignment(*typeList[member].type, memberSize, dummyStride, qualifier.layoutPacking == ElpStd140,
+ subMatrixLayout != ElmNone ? subMatrixLayout == ElmRowMajor : qualifier.layoutMatrix == ElmRowMajor);
+ if (memberQualifier.hasOffset()) {
+ // "The specified offset must be a multiple
+ // of the base alignment of the type of the block member it qualifies, or a compile-time error results."
+ if (! IsMultipleOfPow2(memberQualifier.layoutOffset, memberAlignment))
+ error(memberLoc, "must be a multiple of the member's alignment", "offset", "");
+
+ // "It is a compile-time error to specify an offset that is smaller than the offset of the previous
+ // member in the block or that lies within the previous member of the block"
+ if (memberQualifier.layoutOffset < offset)
+ error(memberLoc, "cannot lie in previous members", "offset", "");
+
+ // "The offset qualifier forces the qualified member to start at or after the specified
+ // integral-constant expression, which will be its byte offset from the beginning of the buffer.
+ // "The actual offset of a member is computed as
+ // follows: If offset was declared, start with that offset, otherwise start with the next available offset."
+ offset = std::max(offset, memberQualifier.layoutOffset);
+ }
+
+ // "The actual alignment of a member will be the greater of the specified align alignment and the standard
+ // (e.g., std140) base alignment for the member's type."
+ if (memberQualifier.hasAlign())
+ memberAlignment = std::max(memberAlignment, memberQualifier.layoutAlign);
+
+ // "If the resulting offset is not a multiple of the actual alignment,
+ // increase it to the first offset that is a multiple of
+ // the actual alignment."
+ RoundToPow2(offset, memberAlignment);
+ typeList[member].type->getQualifier().layoutOffset = offset;
+ offset += memberSize;
+ }
+}
+
+// For an identifier that is already declared, add more qualification to it.
+void HlslParseContext::addQualifierToExisting(const TSourceLoc& loc, TQualifier qualifier, const TString& identifier)
+{
+ TSymbol* symbol = symbolTable.find(identifier);
+ if (! symbol) {
+ error(loc, "identifier not previously declared", identifier.c_str(), "");
+ return;
+ }
+ if (symbol->getAsFunction()) {
+ error(loc, "cannot re-qualify a function name", identifier.c_str(), "");
+ return;
+ }
+
+ if (qualifier.isAuxiliary() ||
+ qualifier.isMemory() ||
+ qualifier.isInterpolation() ||
+ qualifier.hasLayout() ||
+ qualifier.storage != EvqTemporary ||
+ qualifier.precision != EpqNone) {
+ error(loc, "cannot add storage, auxiliary, memory, interpolation, layout, or precision qualifier to an existing variable", identifier.c_str(), "");
+ return;
+ }
+
+ // For read-only built-ins, add a new symbol for holding the modified qualifier.
+ // This will bring up an entire block, if a block type has to be modified (e.g., gl_Position inside a block)
+ if (symbol->isReadOnly())
+ symbol = symbolTable.copyUp(symbol);
+
+ if (qualifier.invariant) {
+ if (intermediate.inIoAccessed(identifier))
+ error(loc, "cannot change qualification after use", "invariant", "");
+ symbol->getWritableType().getQualifier().invariant = true;
+ } else if (qualifier.noContraction) {
+ if (intermediate.inIoAccessed(identifier))
+ error(loc, "cannot change qualification after use", "precise", "");
+ symbol->getWritableType().getQualifier().noContraction = true;
+ } else if (qualifier.specConstant) {
+ symbol->getWritableType().getQualifier().makeSpecConstant();
+ if (qualifier.hasSpecConstantId())
+ symbol->getWritableType().getQualifier().layoutSpecConstantId = qualifier.layoutSpecConstantId;
+ } else
+ warn(loc, "unknown requalification", "", "");
+}
+
+void HlslParseContext::addQualifierToExisting(const TSourceLoc& loc, TQualifier qualifier, TIdentifierList& identifiers)
+{
+ for (unsigned int i = 0; i < identifiers.size(); ++i)
+ addQualifierToExisting(loc, qualifier, *identifiers[i]);
+}
+
+//
+// Updating default qualifier for the case of a declaration with just a qualifier,
+// no type, block, or identifier.
+//
+void HlslParseContext::updateStandaloneQualifierDefaults(const TSourceLoc& loc, const TPublicType& publicType)
+{
+ if (publicType.shaderQualifiers.vertices != TQualifier::layoutNotSet) {
+ assert(language == EShLangTessControl || language == EShLangGeometry);
+ const char* id = (language == EShLangTessControl) ? "vertices" : "max_vertices";
+
+ if (language == EShLangTessControl)
+ checkIoArraysConsistency(loc);
+ }
+ if (publicType.shaderQualifiers.invocations != TQualifier::layoutNotSet) {
+ if (! intermediate.setInvocations(publicType.shaderQualifiers.invocations))
+ error(loc, "cannot change previously set layout value", "invocations", "");
+ }
+ if (publicType.shaderQualifiers.geometry != ElgNone) {
+ if (publicType.qualifier.storage == EvqVaryingIn) {
+ switch (publicType.shaderQualifiers.geometry) {
+ case ElgPoints:
+ case ElgLines:
+ case ElgLinesAdjacency:
+ case ElgTriangles:
+ case ElgTrianglesAdjacency:
+ case ElgQuads:
+ case ElgIsolines:
+ if (intermediate.setInputPrimitive(publicType.shaderQualifiers.geometry)) {
+ if (language == EShLangGeometry)
+ checkIoArraysConsistency(loc);
+ } else
+ error(loc, "cannot change previously set input primitive", TQualifier::getGeometryString(publicType.shaderQualifiers.geometry), "");
+ break;
+ default:
+ error(loc, "cannot apply to input", TQualifier::getGeometryString(publicType.shaderQualifiers.geometry), "");
+ }
+ } else if (publicType.qualifier.storage == EvqVaryingOut) {
+ switch (publicType.shaderQualifiers.geometry) {
+ case ElgPoints:
+ case ElgLineStrip:
+ case ElgTriangleStrip:
+ if (! intermediate.setOutputPrimitive(publicType.shaderQualifiers.geometry))
+ error(loc, "cannot change previously set output primitive", TQualifier::getGeometryString(publicType.shaderQualifiers.geometry), "");
+ break;
+ default:
+ error(loc, "cannot apply to 'out'", TQualifier::getGeometryString(publicType.shaderQualifiers.geometry), "");
+ }
+ } else
+ error(loc, "cannot apply to:", TQualifier::getGeometryString(publicType.shaderQualifiers.geometry), GetStorageQualifierString(publicType.qualifier.storage));
+ }
+ if (publicType.shaderQualifiers.spacing != EvsNone)
+ intermediate.setVertexSpacing(publicType.shaderQualifiers.spacing);
+ if (publicType.shaderQualifiers.order != EvoNone)
+ intermediate.setVertexOrder(publicType.shaderQualifiers.order);
+ if (publicType.shaderQualifiers.pointMode)
+ intermediate.setPointMode();
+ for (int i = 0; i < 3; ++i) {
+ if (publicType.shaderQualifiers.localSize[i] > 1) {
+ int max = 0;
+ switch (i) {
+ case 0: max = resources.maxComputeWorkGroupSizeX; break;
+ case 1: max = resources.maxComputeWorkGroupSizeY; break;
+ case 2: max = resources.maxComputeWorkGroupSizeZ; break;
+ default: break;
+ }
+ if (intermediate.getLocalSize(i) > (unsigned int)max)
+ error(loc, "too large; see gl_MaxComputeWorkGroupSize", "local_size", "");
+
+ // Fix the existing constant gl_WorkGroupSize with this new information.
+ TVariable* workGroupSize = getEditableVariable("gl_WorkGroupSize");
+ workGroupSize->getWritableConstArray()[i].setUConst(intermediate.getLocalSize(i));
+ }
+ if (publicType.shaderQualifiers.localSizeSpecId[i] != TQualifier::layoutNotSet) {
+ intermediate.setLocalSizeSpecId(i, publicType.shaderQualifiers.localSizeSpecId[i]);
+ // Set the workgroup built-in variable as a specialization constant
+ TVariable* workGroupSize = getEditableVariable("gl_WorkGroupSize");
+ workGroupSize->getWritableType().getQualifier().specConstant = true;
+ }
+ }
+ if (publicType.shaderQualifiers.earlyFragmentTests)
+ intermediate.setEarlyFragmentTests();
+
+ const TQualifier& qualifier = publicType.qualifier;
+
+ switch (qualifier.storage) {
+ case EvqUniform:
+ if (qualifier.hasMatrix())
+ globalUniformDefaults.layoutMatrix = qualifier.layoutMatrix;
+ if (qualifier.hasPacking())
+ globalUniformDefaults.layoutPacking = qualifier.layoutPacking;
+ break;
+ case EvqBuffer:
+ if (qualifier.hasMatrix())
+ globalBufferDefaults.layoutMatrix = qualifier.layoutMatrix;
+ if (qualifier.hasPacking())
+ globalBufferDefaults.layoutPacking = qualifier.layoutPacking;
+ break;
+ case EvqVaryingIn:
+ break;
+ case EvqVaryingOut:
+ if (qualifier.hasStream())
+ globalOutputDefaults.layoutStream = qualifier.layoutStream;
+ if (qualifier.hasXfbBuffer())
+ globalOutputDefaults.layoutXfbBuffer = qualifier.layoutXfbBuffer;
+ if (globalOutputDefaults.hasXfbBuffer() && qualifier.hasXfbStride()) {
+ if (! intermediate.setXfbBufferStride(globalOutputDefaults.layoutXfbBuffer, qualifier.layoutXfbStride))
+ error(loc, "all stride settings must match for xfb buffer", "xfb_stride", "%d", qualifier.layoutXfbBuffer);
+ }
+ break;
+ default:
+ error(loc, "default qualifier requires 'uniform', 'buffer', 'in', or 'out' storage qualification", "", "");
+ return;
+ }
+}
+
+//
+// Take the sequence of statements that has been built up since the last case/default,
+// put it on the list of top-level nodes for the current (inner-most) switch statement,
+// and follow that by the case/default we are on now. (See switch topology comment on
+// TIntermSwitch.)
+//
+void HlslParseContext::wrapupSwitchSubsequence(TIntermAggregate* statements, TIntermNode* branchNode)
+{
+ TIntermSequence* switchSequence = switchSequenceStack.back();
+
+ if (statements) {
+ if (switchSequence->size() == 0)
+ error(statements->getLoc(), "cannot have statements before first case/default label", "switch", "");
+ statements->setOperator(EOpSequence);
+ switchSequence->push_back(statements);
+ }
+ if (branchNode) {
+ // check all previous cases for the same label (or both are 'default')
+ for (unsigned int s = 0; s < switchSequence->size(); ++s) {
+ TIntermBranch* prevBranch = (*switchSequence)[s]->getAsBranchNode();
+ if (prevBranch) {
+ TIntermTyped* prevExpression = prevBranch->getExpression();
+ TIntermTyped* newExpression = branchNode->getAsBranchNode()->getExpression();
+ if (prevExpression == nullptr && newExpression == nullptr)
+ error(branchNode->getLoc(), "duplicate label", "default", "");
+ else if (prevExpression != nullptr &&
+ newExpression != nullptr &&
+ prevExpression->getAsConstantUnion() &&
+ newExpression->getAsConstantUnion() &&
+ prevExpression->getAsConstantUnion()->getConstArray()[0].getIConst() ==
+ newExpression->getAsConstantUnion()->getConstArray()[0].getIConst())
+ error(branchNode->getLoc(), "duplicated value", "case", "");
+ }
+ }
+ switchSequence->push_back(branchNode);
+ }
+}
+
+//
+// Turn the top-level node sequence built up of wrapupSwitchSubsequence
+// into a switch node.
+//
+TIntermNode* HlslParseContext::addSwitch(const TSourceLoc& loc, TIntermTyped* expression, TIntermAggregate* lastStatements)
+{
+ wrapupSwitchSubsequence(lastStatements, nullptr);
+
+ if (expression == nullptr ||
+ (expression->getBasicType() != EbtInt && expression->getBasicType() != EbtUint) ||
+ expression->getType().isArray() || expression->getType().isMatrix() || expression->getType().isVector())
+ error(loc, "condition must be a scalar integer expression", "switch", "");
+
+ // If there is nothing to do, drop the switch but still execute the expression
+ TIntermSequence* switchSequence = switchSequenceStack.back();
+ if (switchSequence->size() == 0)
+ return expression;
+
+ if (lastStatements == nullptr) {
+ // emulate a break for error recovery
+ lastStatements = intermediate.makeAggregate(intermediate.addBranch(EOpBreak, loc));
+ lastStatements->setOperator(EOpSequence);
+ switchSequence->push_back(lastStatements);
+ }
+
+ TIntermAggregate* body = new TIntermAggregate(EOpSequence);
+ body->getSequence() = *switchSequenceStack.back();
+ body->setLoc(loc);
+
+ TIntermSwitch* switchNode = new TIntermSwitch(expression, body);
+ switchNode->setLoc(loc);
+
+ return switchNode;
+}
+
+} // end namespace glslang
diff --git a/chromium/third_party/glslang/src/hlsl/hlslParseHelper.h b/chromium/third_party/glslang/src/hlsl/hlslParseHelper.h
new file mode 100755
index 00000000000..a50bb957775
--- /dev/null
+++ b/chromium/third_party/glslang/src/hlsl/hlslParseHelper.h
@@ -0,0 +1,229 @@
+//
+//Copyright (C) 2016 Google, Inc.
+//Copyright (C) 2016 LunarG, 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:
+//
+// Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 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.
+//
+// Neither the name of 3Dlabs Inc. Ltd. nor the names of its
+// contributors may be used to endorse or promote products derived
+// from this software without specific prior written permission.
+//
+//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+//"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 THE
+//COPYRIGHT HOLDERS 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.
+//
+#ifndef HLSL_PARSE_INCLUDED_
+#define HLSL_PARSE_INCLUDED_
+
+#include "../glslang/MachineIndependent/parseVersions.h"
+#include "../glslang/MachineIndependent/ParseHelper.h"
+
+namespace glslang {
+
+class HlslParseContext : public TParseContextBase {
+public:
+ HlslParseContext(TSymbolTable&, TIntermediate&, bool parsingBuiltins,
+ int version, EProfile, int spv, int vulkan, EShLanguage, TInfoSink&,
+ bool forwardCompatible = false, EShMessages messages = EShMsgDefault);
+ virtual ~HlslParseContext();
+ void setLimits(const TBuiltInResource&);
+ bool parseShaderStrings(TPpContext&, TInputScanner& input, bool versionWillBeError = false);
+ void getPreamble(std::string&);
+
+ void C_DECL error(const TSourceLoc&, const char* szReason, const char* szToken,
+ const char* szExtraInfoFormat, ...);
+ void C_DECL warn(const TSourceLoc&, const char* szReason, const char* szToken,
+ const char* szExtraInfoFormat, ...);
+ void C_DECL ppError(const TSourceLoc&, const char* szReason, const char* szToken,
+ const char* szExtraInfoFormat, ...);
+ void C_DECL ppWarn(const TSourceLoc&, const char* szReason, const char* szToken,
+ const char* szExtraInfoFormat, ...);
+
+ void reservedPpErrorCheck(const TSourceLoc&, const char* name, const char* op) { }
+ bool lineContinuationCheck(const TSourceLoc&, bool endOfComment) { return true; }
+ bool lineDirectiveShouldSetNextLine() const { return true; }
+ bool builtInName(const TString&);
+
+ void handlePragma(const TSourceLoc&, const TVector<TString>&);
+ TIntermTyped* handleVariable(const TSourceLoc&, TSymbol* symbol, const TString* string);
+ TIntermTyped* handleBracketDereference(const TSourceLoc&, TIntermTyped* base, TIntermTyped* index);
+ void checkIndex(const TSourceLoc&, const TType&, int& index);
+
+ void makeEditable(TSymbol*&);
+ TVariable* getEditableVariable(const char* name);
+ bool isIoResizeArray(const TType&) const;
+ void fixIoArraySize(const TSourceLoc&, TType&);
+ void handleIoResizeArrayAccess(const TSourceLoc&, TIntermTyped* base);
+ void checkIoArraysConsistency(const TSourceLoc&, bool tailOnly = false);
+ int getIoArrayImplicitSize() const;
+ void checkIoArrayConsistency(const TSourceLoc&, int requiredSize, const char* feature, TType&, const TString&);
+
+ TIntermTyped* handleBinaryMath(const TSourceLoc&, const char* str, TOperator op, TIntermTyped* left, TIntermTyped* right);
+ TIntermTyped* handleUnaryMath(const TSourceLoc&, const char* str, TOperator op, TIntermTyped* childNode);
+ TIntermTyped* handleDotDereference(const TSourceLoc&, TIntermTyped* base, const TString& field);
+ TFunction* handleFunctionDeclarator(const TSourceLoc&, TFunction& function, bool prototype);
+ TIntermAggregate* handleFunctionDefinition(const TSourceLoc&, TFunction&);
+ void handleFunctionArgument(TFunction*, TIntermTyped*& arguments, TIntermTyped* newArg);
+ TIntermTyped* handleFunctionCall(const TSourceLoc&, TFunction*, TIntermNode*);
+ void decomposeIntrinsic(const TSourceLoc&, TIntermTyped*& node, TIntermNode* arguments);
+ TIntermTyped* handleLengthMethod(const TSourceLoc&, TFunction*, TIntermNode*);
+ void addInputArgumentConversions(const TFunction&, TIntermNode*&) const;
+ TIntermTyped* addOutputArgumentConversions(const TFunction&, TIntermAggregate&) const;
+ void builtInOpCheck(const TSourceLoc&, const TFunction&, TIntermOperator&);
+ TFunction* handleConstructorCall(const TSourceLoc&, const TType&);
+ void handleSemantic(TType& type, const TString& semantic);
+
+ bool parseVectorFields(const TSourceLoc&, const TString&, int vecSize, TVectorFields&);
+ void assignError(const TSourceLoc&, const char* op, TString left, TString right);
+ void unaryOpError(const TSourceLoc&, const char* op, TString operand);
+ void binaryOpError(const TSourceLoc&, const char* op, TString left, TString right);
+ void variableCheck(TIntermTyped*& nodePtr);
+ void constantValueCheck(TIntermTyped* node, const char* token);
+ void integerCheck(const TIntermTyped* node, const char* token);
+ void globalCheck(const TSourceLoc&, const char* token);
+ bool constructorError(const TSourceLoc&, TIntermNode*, TFunction&, TOperator, TType&);
+ bool constructorTextureSamplerError(const TSourceLoc&, const TFunction&);
+ void arraySizeCheck(const TSourceLoc&, TIntermTyped* expr, TArraySize&);
+ void arraySizeRequiredCheck(const TSourceLoc&, const TArraySizes&);
+ void structArrayCheck(const TSourceLoc&, const TType& structure);
+ void arrayDimMerge(TType& type, const TArraySizes* sizes);
+ bool voidErrorCheck(const TSourceLoc&, const TString&, TBasicType);
+ void boolCheck(const TSourceLoc&, const TIntermTyped*);
+ void globalQualifierFix(const TSourceLoc&, TQualifier&);
+ bool structQualifierErrorCheck(const TSourceLoc&, const TPublicType& pType);
+ void mergeQualifiers(const TSourceLoc&, TQualifier& dst, const TQualifier& src, bool force);
+ int computeSamplerTypeIndex(TSampler&);
+ TSymbol* redeclareBuiltinVariable(const TSourceLoc&, const TString&, const TQualifier&, const TShaderQualifiers&, bool& newDeclaration);
+ void redeclareBuiltinBlock(const TSourceLoc&, TTypeList& typeList, const TString& blockName, const TString* instanceName, TArraySizes* arraySizes);
+ void paramCheckFix(const TSourceLoc&, const TStorageQualifier&, TType& type);
+ void paramCheckFix(const TSourceLoc&, const TQualifier&, TType& type);
+ void specializationCheck(const TSourceLoc&, const TType&, const char* op);
+
+ void setLayoutQualifier(const TSourceLoc&, TPublicType&, TString&);
+ void setLayoutQualifier(const TSourceLoc&, TPublicType&, TString&, const TIntermTyped*);
+ void mergeObjectLayoutQualifiers(TQualifier& dest, const TQualifier& src, bool inheritOnly);
+ void checkNoShaderLayouts(const TSourceLoc&, const TShaderQualifiers&);
+
+ const TFunction* findFunction(const TSourceLoc& loc, const TFunction& call, bool& builtIn);
+ TIntermNode* declareVariable(const TSourceLoc&, TString& identifier, const TType&, TArraySizes* typeArray = 0, TIntermTyped* initializer = 0);
+ TIntermTyped* addConstructor(const TSourceLoc&, TIntermNode*, const TType&, TOperator);
+ TIntermTyped* constructAggregate(TIntermNode*, const TType&, int, const TSourceLoc&);
+ TIntermTyped* constructBuiltIn(const TType&, TOperator, TIntermTyped*, const TSourceLoc&, bool subset);
+ void declareBlock(const TSourceLoc&, TTypeList& typeList, const TString* instanceName = 0, TArraySizes* arraySizes = 0);
+ void fixBlockLocations(const TSourceLoc&, TQualifier&, TTypeList&, bool memberWithLocation, bool memberWithoutLocation);
+ void fixBlockXfbOffsets(TQualifier&, TTypeList&);
+ void fixBlockUniformOffsets(TQualifier&, TTypeList&);
+ void addQualifierToExisting(const TSourceLoc&, TQualifier, const TString& identifier);
+ void addQualifierToExisting(const TSourceLoc&, TQualifier, TIdentifierList&);
+ void updateStandaloneQualifierDefaults(const TSourceLoc&, const TPublicType&);
+ void wrapupSwitchSubsequence(TIntermAggregate* statements, TIntermNode* branchNode);
+ TIntermNode* addSwitch(const TSourceLoc&, TIntermTyped* expression, TIntermAggregate* body);
+
+ void updateImplicitArraySize(const TSourceLoc&, TIntermNode*, int index);
+
+ void nestLooping() { ++loopNestingLevel; }
+ void unnestLooping() { --loopNestingLevel; }
+ void pushScope() { symbolTable.push(); }
+ void popScope() { symbolTable.pop(0); }
+
+protected:
+ void inheritGlobalDefaults(TQualifier& dst) const;
+ TVariable* makeInternalVariable(const char* name, const TType&) const;
+ TVariable* declareNonArray(const TSourceLoc&, TString& identifier, TType&, bool& newDeclaration);
+ void declareArray(const TSourceLoc&, TString& identifier, const TType&, TSymbol*&, bool& newDeclaration);
+ TIntermNode* executeInitializer(const TSourceLoc&, TIntermTyped* initializer, TVariable* variable);
+ TIntermTyped* convertInitializerList(const TSourceLoc&, const TType&, TIntermTyped* initializer);
+ TOperator mapTypeToConstructorOp(const TType&) const;
+ void outputMessage(const TSourceLoc&, const char* szReason, const char* szToken,
+ const char* szExtraInfoFormat, TPrefixType prefix,
+ va_list args);
+
+ // Current state of parsing
+ struct TPragma contextPragma;
+ int loopNestingLevel; // 0 if outside all loops
+ int structNestingLevel; // 0 if outside blocks and structures
+ int controlFlowNestingLevel; // 0 if outside all flow control
+ TList<TIntermSequence*> switchSequenceStack; // case, node, case, case, node, ...; ensure only one node between cases; stack of them for nesting
+ TList<int> switchLevel; // the statementNestingLevel the current switch statement is at, which must match the level of its case statements
+ bool inEntrypoint; // if inside a function, true if the function is the entry point
+ bool postMainReturn; // if inside a function, true if the function is the entry point and this is after a return statement
+ 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
+ const TString* blockName;
+ TQualifier currentBlockQualifier;
+ TBuiltInResource resources;
+ TLimits& limits;
+
+ HlslParseContext(HlslParseContext&);
+ HlslParseContext& operator=(HlslParseContext&);
+
+ TMap<TString, TExtensionBehavior> extensionBehavior; // for each extension string, what its current behavior is set to
+ static const int maxSamplerIndex = EsdNumDims * (EbtNumTypes * (2 * 2 * 2)); // see computeSamplerTypeIndex()
+ bool afterEOF;
+ TQualifier globalBufferDefaults;
+ TQualifier globalUniformDefaults;
+ TQualifier globalInputDefaults;
+ TQualifier globalOutputDefaults;
+ TString currentCaller; // name of last function body entered (not valid when at global scope)
+ TIdSetType inductiveLoopIds;
+ TVector<TIntermTyped*> needsIndexLimitationChecking;
+
+ //
+ // Geometry shader input arrays:
+ // - array sizing is based on input primitive and/or explicit size
+ //
+ // Tessellation control output arrays:
+ // - array sizing is based on output layout(vertices=...) and/or explicit size
+ //
+ // Both:
+ // - array sizing is retroactive
+ // - built-in block redeclarations interact with this
+ //
+ // Design:
+ // - use a per-context "resize-list", a list of symbols whose array sizes
+ // can be fixed
+ //
+ // - the resize-list starts empty at beginning of user-shader compilation, it does
+ // not have built-ins in it
+ //
+ // - on built-in array use: copyUp() symbol and add it to the resize-list
+ //
+ // - on user array declaration: add it to the resize-list
+ //
+ // - on block redeclaration: copyUp() symbol and add it to the resize-list
+ // * note, that appropriately gives an error if redeclaring a block that
+ // was already used and hence already copied-up
+ //
+ // - on seeing a layout declaration that sizes the array, fix everything in the
+ // resize-list, giving errors for mismatch
+ //
+ // - on seeing an array size declaration, give errors on mismatch between it and previous
+ // array-sizing declarations
+ //
+ TVector<TSymbol*> ioArraySymbolResizeList;
+};
+
+} // end namespace glslang
+
+#endif // HLSL_PARSE_INCLUDED_
diff --git a/chromium/third_party/glslang/src/hlsl/hlslParseables.cpp b/chromium/third_party/glslang/src/hlsl/hlslParseables.cpp
new file mode 100755
index 00000000000..b676a8efd2c
--- /dev/null
+++ b/chromium/third_party/glslang/src/hlsl/hlslParseables.cpp
@@ -0,0 +1,663 @@
+//
+//Copyright (C) 2016 LunarG, 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:
+//
+// Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 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.
+//
+// Neither the name of 3Dlabs Inc. Ltd. nor the names of its
+// contributors may be used to endorse or promote products derived
+// from this software without specific prior written permission.
+//
+//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+//"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 THE
+//COPYRIGHT HOLDERS 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.
+//
+
+//
+// Create strings that declare built-in definitions, add built-ins programmatically
+// that cannot be expressed in the strings, and establish mappings between
+// built-in functions and operators.
+//
+// Where to put a built-in:
+// TBuiltInParseablesHlsl::initialize(version,profile) context-independent textual built-ins; add them to the right string
+// TBuiltInParseablesHlsl::initialize(resources,...) context-dependent textual built-ins; add them to the right string
+// TBuiltInParseablesHlsl::identifyBuiltIns(...,symbolTable) context-independent programmatic additions/mappings to the symbol table,
+// including identifying what extensions are needed if a version does not allow a symbol
+// TBuiltInParseablesHlsl::identifyBuiltIns(...,symbolTable, resources) context-dependent programmatic additions/mappings to the
+// symbol table, including identifying what extensions are needed if a version does
+// not allow a symbol
+//
+
+#include "hlslParseables.h"
+#include <cctype>
+#include <utility>
+
+namespace { // anonymous namespace functions
+
+const char* BaseTypeName(const char* argOrder, const char* scalarName, const char* vecName, const char* matName)
+{
+ switch (*argOrder) {
+ case 'S': return scalarName;
+ case 'V': return vecName;
+ case 'M': return matName;
+ default: return "UNKNOWN_TYPE";
+ }
+}
+
+// Create and return a type name. This is done in GLSL, not HLSL conventions, until such
+// time as builtins are parsed using the HLSL parser.
+//
+// order: S = scalar, V = vector, M = matrix
+// argType: F = float, D = double, I = int, U = uint, B = bool, S = sampler
+// dim0 = vector dimension, or matrix 1st dimension
+// dim1 = matrix 2nd dimension
+glslang::TString& AppendTypeName(glslang::TString& s, const char* argOrder, const char* argType, int dim0, int dim1)
+{
+ const bool transpose = (argOrder[0] == '^');
+
+ // Take transpose of matrix dimensions
+ if (transpose) {
+ std::swap(dim0, dim1);
+ ++argOrder;
+ }
+
+ switch (*argType) {
+ case '-': s += "void"; break;
+ case 'F': s += BaseTypeName(argOrder, "float", "vec", "mat"); break;
+ case 'D': s += BaseTypeName(argOrder, "double", "dvec", "dmat"); break;
+ case 'I': s += BaseTypeName(argOrder, "int", "ivec", "imat"); break;
+ case 'U': s += BaseTypeName(argOrder, "uint", "uvec", "umat"); break;
+ case 'B': s += BaseTypeName(argOrder, "bool", "bvec", "bmat"); break;
+ case 'S': s += BaseTypeName(argOrder, "sampler", "sampler", "sampler"); break; // TODO:
+ default: s += "UNKNOWN_TYPE"; break;
+ }
+
+ // handle fixed vector sizes, such as float3, and only ever 3.
+ const int fixedVecSize = isdigit(argOrder[1]) ? (argOrder[1] - '0') : 0;
+ if (fixedVecSize != 0)
+ dim0 = dim1 = fixedVecSize;
+
+ // Add sampler dimensions
+ if (*argType == 'S') {
+ switch (dim0) {
+ case 1: s += "1D"; break;
+ case 2: s += "2D"; break;
+ case 3: s += "3D"; break;
+ case 4: s += "Cube"; break;
+ default: s += "UNKNOWN_SAMPLER"; break;
+ }
+ }
+
+ // verify dimensions
+ if ((*argOrder == 'V' || *argOrder == 'M') && (dim0 < 1 || dim0 > 4) ||
+ (*argOrder == 'M' && (dim1 < 1 || dim1 > 4))) {
+ s += "UNKNOWN_DIMENSION";
+ return s;
+ }
+
+ switch (*argOrder) {
+ case '-': break; // no dimensions for voids
+ case 'S': break; // no dimensions on scalars
+ case 'V': s += ('0' + dim0); break;
+ case 'M': s += ('0' + dim0); s += 'x'; s += ('0' + dim1); break;
+ }
+
+ return s;
+}
+
+// TODO: the GLSL parser is currently used to parse HLSL prototypes. However, many valid HLSL prototypes
+// are not valid GLSL prototypes. This rejects the invalid ones. Thus, there is a single switch below
+// to enable creation of the entire HLSL space.
+inline bool IsValidGlsl(const char* cname, char retOrder, char retType, char argOrder, char argType,
+ int dim0, int dim1, int dim0Max, int dim1Max)
+{
+ const bool isVec = dim0Max > 1 || argType == 'V';
+ const bool isMat = dim1Max > 1 || argType == 'M';
+
+ if (argType == 'D' || // avoid double args
+ retType == 'D' || // avoid double return
+ (isVec && dim0 == 1) || // avoid vec1
+ (isMat && dim0 == 1 && dim1 == 1)) // avoid mat1x1
+ return false;
+
+ const std::string name(cname); // for ease of comparison. slow, but temporary, until HLSL parser is online.
+
+ if (isMat && dim0 != dim1) // TODO: avoid mats until we find the right GLSL profile
+ return false;
+
+ if (isMat && (argType == 'I' || argType == 'U' || argType == 'B') ||
+ retOrder == 'M' && (retType == 'I' || retType == 'U' || retType == 'B'))
+ return false;
+
+ if (name == "GetRenderTargetSamplePosition" ||
+ name == "tex1D" ||
+ name == "tex1Dgrad")
+ return false;
+
+ return true;
+}
+
+
+// Return true for the end of a single argument key, which can be the end of the string, or
+// the comma separator.
+inline bool IsEndOfArg(const char* arg)
+{
+ return arg == nullptr || *arg == '\0' || *arg == ',';
+}
+
+
+// return position of end of argument specifier
+inline const char* FindEndOfArg(const char* arg)
+{
+ while (!IsEndOfArg(arg))
+ ++arg;
+
+ return *arg == '\0' ? nullptr : arg;
+}
+
+
+// Return pointer to beginning of Nth argument specifier in the string.
+inline const char* NthArg(const char* arg, int n)
+{
+ for (int x=0; x<n && arg; ++x)
+ if ((arg = FindEndOfArg(arg)) != nullptr)
+ ++arg; // skip arg separator
+
+ return arg;
+}
+
+inline void FindVectorMatrixBounds(const char* argOrder, int fixedVecSize, int& dim0Min, int& dim0Max, int& dim1Min, int& dim1Max)
+{
+ for (int arg = 0; ; ++arg) {
+ const char* nthArgOrder(NthArg(argOrder, arg));
+ if (nthArgOrder == nullptr)
+ break;
+ else if (*nthArgOrder == 'V')
+ dim0Max = 4;
+ else if (*nthArgOrder == 'M')
+ dim0Max = dim1Max = 4;
+ }
+
+ if (fixedVecSize > 0) // handle fixed sized vectors
+ dim0Min = dim0Max = fixedVecSize;
+}
+
+} // end anonymous namespace
+
+namespace glslang {
+
+TBuiltInParseablesHlsl::TBuiltInParseablesHlsl()
+{
+}
+
+//
+// Add all context-independent built-in functions and variables that are present
+// for the given version and profile. Share common ones across stages, otherwise
+// make stage-specific entries.
+//
+// Most built-ins variables can be added as simple text strings. Some need to
+// be added programmatically, which is done later in IdentifyBuiltIns() below.
+//
+void TBuiltInParseablesHlsl::initialize(int version, EProfile profile, int spv, int vulkan)
+{
+ static const EShLanguageMask EShLangAll = EShLanguageMask(EShLangCount - 1);
+
+ // This structure encodes the prototype information for each HLSL intrinsic.
+ // Because explicit enumeration would be cumbersome, it's procedurally generated.
+ // orderKey can be:
+ // S = scalar, V = vector, M = matrix, - = void
+ // typekey can be:
+ // D = double, F = float, U = uint, I = int, B = bool, S = sampler, - = void
+ // An empty order or type key repeats the first one. E.g: SVM,, means 3 args each of SVM.
+ // '>' as first letter of order creates an output paremeter
+ // '<' as first letter of order creates an input paremeter
+ // '^' as first letter of order takes transpose dimensions
+
+ static const struct {
+ const char* name; // intrinsic name
+ const char* retOrder; // return type key: empty matches order of 1st argument
+ const char* retType; // return type key: empty matches type of 1st argument
+ const char* argOrder; // argument order key
+ const char* argType; // argument type key
+ unsigned int stage; // stage mask
+ } hlslIntrinsics[] = {
+ // name retOrd retType argOrder argType stage mask
+ // -----------------------------------------------------------------------------------------------
+ { "abort", nullptr, nullptr, "-", "-", EShLangAll },
+ { "abs", nullptr, nullptr, "SVM", "DFUI", EShLangAll },
+ { "acos", nullptr, nullptr, "SVM", "F", EShLangAll },
+ { "all", "S", "B", "SVM", "BFI", EShLangAll },
+ { "AllMemoryBarrier", nullptr, nullptr, "-", "-", EShLangComputeMask },
+ { "AllMemoryBarrierWithGroupSync", nullptr, nullptr, "-", "-", EShLangComputeMask },
+ { "any", "S", "B", "SVM", "BFI", EShLangAll },
+ { "asdouble", "S", "D", "S,", "U,", EShLangAll },
+ { "asdouble", "V2", "D", "V2,", "U,", EShLangAll },
+ { "asfloat", nullptr, "F", "SVM", "BFIU", EShLangAll },
+ { "asin", nullptr, nullptr, "SVM", "F", EShLangAll },
+ { "asint", nullptr, "I", "SVM", "FU", EShLangAll },
+ { "asuint", nullptr, "U", "SVM", "FU", EShLangAll },
+ { "atan", nullptr, nullptr, "SVM", "F", EShLangAll },
+ { "atan2", nullptr, nullptr, "SVM,", "F,", EShLangAll },
+ { "ceil", nullptr, nullptr, "SVM", "F", EShLangAll },
+ { "CheckAccessFullyMapped", "S", "B" , "S", "U", EShLangFragmentMask | EShLangComputeMask },
+ { "clamp", nullptr, nullptr, "SVM,,", "FUI,,", EShLangAll },
+ { "clip", "-", "-", "SVM", "F", EShLangFragmentMask },
+ { "cos", nullptr, nullptr, "SVM", "F", EShLangAll },
+ { "cosh", nullptr, nullptr, "SVM", "F", EShLangAll },
+ { "countbits", nullptr, nullptr, "SV", "U", EShLangAll },
+ { "cross", nullptr, nullptr, "V3,", "F,", EShLangAll },
+ { "D3DCOLORtoUBYTE4", "V4", "I", "V4", "F", EShLangAll },
+ { "ddx", nullptr, nullptr, "SVM", "F", EShLangFragmentMask },
+ { "ddx_coarse", nullptr, nullptr, "SVM", "F", EShLangFragmentMask },
+ { "ddx_fine", nullptr, nullptr, "SVM", "F", EShLangFragmentMask },
+ { "ddy", nullptr, nullptr, "SVM", "F", EShLangFragmentMask },
+ { "ddy_coarse", nullptr, nullptr, "SVM", "F", EShLangFragmentMask },
+ { "ddy_fine", nullptr, nullptr, "SVM", "F", EShLangFragmentMask },
+ { "degrees", nullptr, nullptr, "SVM", "F", EShLangAll },
+ { "determinant", "S", "F", "M", "F", EShLangAll },
+ { "DeviceMemoryBarrier", nullptr, nullptr, "-", "-", EShLangFragmentMask | EShLangComputeMask },
+ { "DeviceMemoryBarrierWithGroupSync", nullptr, nullptr, "-", "-", EShLangComputeMask },
+ { "distance", "S", "F", "V,", "F,", EShLangAll },
+ { "dot", "S", nullptr, "V,", "FI,", EShLangAll },
+ { "dst", nullptr, nullptr, "V4,V4", "F,", EShLangAll },
+ // { "errorf", "-", "-", "", "", EShLangAll }, TODO: varargs
+ { "EvaluateAttributeAtCentroid", nullptr, nullptr, "SVM", "F", EShLangFragmentMask },
+ { "EvaluateAttributeAtSample", nullptr, nullptr, "SVM,S", "F,U", EShLangFragmentMask },
+ { "EvaluateAttributeSnapped", nullptr, nullptr, "SVM,V2", "F,F", EShLangFragmentMask },
+ { "exp", nullptr, nullptr, "SVM", "F", EShLangAll },
+ { "exp2", nullptr, nullptr, "SVM", "F", EShLangAll },
+ { "f16tof32", nullptr, "F", "SV", "U", EShLangAll },
+ { "f32tof16", nullptr, "U", "SV", "F", EShLangAll },
+ { "faceforward", nullptr, nullptr, "V,,", "F,,", EShLangAll },
+ { "firstbithigh", nullptr, nullptr, "SV", "UI", EShLangAll },
+ { "firstbitlow", nullptr, nullptr, "SV", "UI", EShLangAll },
+ { "floor", nullptr, nullptr, "SVM", "F", EShLangAll },
+ { "fma", nullptr, nullptr, "SVM,,", "D,,", EShLangAll },
+ { "fmod", nullptr, nullptr, "SVM,", "F,", EShLangAll },
+ { "frac", nullptr, nullptr, "SVM", "F", EShLangAll },
+ { "frexp", nullptr, nullptr, "SVM,", "F,", EShLangAll },
+ { "fwidth", nullptr, nullptr, "SVM", "F", EShLangAll },
+ { "GetRenderTargetSampleCount", "S", "U", "-", "-", EShLangAll },
+ { "GetRenderTargetSamplePosition", "V2", "F", "V1", "I", EShLangAll },
+ { "GroupMemoryBarrier", nullptr, nullptr, "-", "-", EShLangComputeMask },
+ { "GroupMemoryBarrierWithGroupSync", nullptr, nullptr, "-", "-", EShLangComputeMask },
+ { "InterlockedAdd", "-", "-", "SVM,,>", "UI,,", EShLangFragmentMask | EShLangComputeMask },
+ { "InterlockedAnd", "-", "-", "SVM,,>", "UI,,", EShLangFragmentMask | EShLangComputeMask },
+ { "InterlockedCompareExchange", "-", "-", "SVM,,,>", "UI,,,", EShLangFragmentMask | EShLangComputeMask },
+ { "InterlockedCompareStore", "-", "-", "SVM,,", "UI,,", EShLangFragmentMask | EShLangComputeMask },
+ { "InterlockedExchange", "-", "-", "SVM,,>", "UI,,", EShLangFragmentMask | EShLangComputeMask },
+ { "InterlockedMax", "-", "-", "SVM,,>", "UI,,", EShLangFragmentMask | EShLangComputeMask },
+ { "InterlockedMin", "-", "-", "SVM,,>", "UI,,", EShLangFragmentMask | EShLangComputeMask },
+ { "InterlockedOr", "-", "-", "SVM,,>", "UI,,", EShLangFragmentMask | EShLangComputeMask },
+ { "InterlockedXor", "-", "-", "SVM,,>", "UI,,", EShLangFragmentMask | EShLangComputeMask },
+ { "isfinite", nullptr, "B" , "SVM", "F", EShLangAll },
+ { "isinf", nullptr, "B" , "SVM", "F", EShLangAll },
+ { "isnan", nullptr, "B" , "SVM", "F", EShLangAll },
+ { "ldexp", nullptr, nullptr, "SVM,", "F,", EShLangAll },
+ { "length", "S", "F", "V", "F", EShLangAll },
+ { "lit", "V4", "F", "S,,", "F,,", EShLangAll },
+ { "log", nullptr, nullptr, "SVM", "F", EShLangAll },
+ { "log10", nullptr, nullptr, "SVM", "F", EShLangAll },
+ { "log2", nullptr, nullptr, "SVM", "F", EShLangAll },
+ { "mad", nullptr, nullptr, "SVM,,", "DFUI,,", EShLangAll },
+ { "max", nullptr, nullptr, "SVM,", "FI,", EShLangAll },
+ { "min", nullptr, nullptr, "SVM,", "FI,", EShLangAll },
+ { "modf", nullptr, nullptr, "SVM,>", "FI,", EShLangAll },
+ { "msad4", "V4", "U", "S,V2,V4", "U,,", EShLangAll },
+ // TODO: fix matrix return size for non-square mats used with mul opcode
+ { "mul", "S", nullptr, "S,S", "FI,", EShLangAll },
+ { "mul", "V", nullptr, "S,V", "FI,", EShLangAll },
+ { "mul", "M", nullptr, "S,M", "FI,", EShLangAll },
+ { "mul", "V", nullptr, "V,S", "FI,", EShLangAll },
+ { "mul", "S", nullptr, "V,V", "FI,", EShLangAll },
+ { "mul", "V", nullptr, "V,M", "FI,", EShLangAll },
+ { "mul", "M", nullptr, "M,S", "FI,", EShLangAll },
+ { "mul", "V", nullptr, "M,V", "FI,", EShLangAll },
+ { "mul", "M", nullptr, "M,M", "FI,", EShLangAll },
+ { "noise", "S", "F", "V", "F", EShLangFragmentMask },
+ { "normalize", nullptr, nullptr, "V", "F", EShLangAll },
+ { "pow", nullptr, nullptr, "SVM,", "F,", EShLangAll },
+ // { "printf", "-", "-", "", "", EShLangAll }, TODO: varargs
+ { "Process2DQuadTessFactorsAvg", "-", "-", "V4,V2,>V4,>V2,>V2", "F,,,,", EShLangTessControlMask },
+ { "Process2DQuadTessFactorsMax", "-", "-", "V4,V2,>V4,>V2,>V2", "F,,,,", EShLangTessControlMask },
+ { "Process2DQuadTessFactorsMin", "-", "-", "V4,V2,>V4,>V2,>V2", "F,,,,", EShLangTessControlMask },
+ { "ProcessIsolineTessFactors", "-", "-", "S,,>,>", "F,,,", EShLangTessControlMask },
+ { "ProcessQuadTessFactorsAvg", "-", "-", "V4,S,>V4,>V2,>V2", "F,,,,", EShLangTessControlMask },
+ { "ProcessQuadTessFactorsMax", "-", "-", "V4,S,>V4,>V2,>V2", "F,,,,", EShLangTessControlMask },
+ { "ProcessQuadTessFactorsMin", "-", "-", "V4,S,>V4,>V2,>V2", "F,,,,", EShLangTessControlMask },
+ { "ProcessTriTessFactorsAvg", "-", "-", "V3,S,>V3,>S,>S", "F,,,,", EShLangTessControlMask },
+ { "ProcessTriTessFactorsMax", "-", "-", "V3,S,>V3,>S,>S", "F,,,,", EShLangTessControlMask },
+ { "ProcessTriTessFactorsMin", "-", "-", "V3,S,>V3,>S,>S", "F,,,,", EShLangTessControlMask },
+ { "radians", nullptr, nullptr, "SVM", "F", EShLangAll },
+ { "rcp", nullptr, nullptr, "SVM", "FD", EShLangAll },
+ { "reflect", nullptr, nullptr, "V,", "F,", EShLangAll },
+ { "refract", nullptr, nullptr, "V,V,S", "F,,", EShLangAll },
+ { "reversebits", nullptr, nullptr, "SV", "U", EShLangAll },
+ { "round", nullptr, nullptr, "SVM", "F", EShLangAll },
+ { "rsqrt", nullptr, nullptr, "SVM", "F", EShLangAll },
+ { "saturate", nullptr, nullptr , "SVM", "F", EShLangAll },
+ { "sign", nullptr, nullptr, "SVM", "FI", EShLangAll },
+ { "sin", nullptr, nullptr, "SVM", "F", EShLangAll },
+ { "sincos", "-", "-", "SVM,>,>", "F,,", EShLangAll },
+ { "sinh", nullptr, nullptr, "SVM", "F", EShLangAll },
+ { "smoothstep", nullptr, nullptr, "SVM,,", "F,,", EShLangAll },
+ { "sqrt", nullptr, nullptr, "SVM", "F", EShLangAll },
+ { "step", nullptr, nullptr, "SVM,", "F,", EShLangAll },
+ { "tan", nullptr, nullptr, "SVM", "F", EShLangAll },
+ { "tanh", nullptr, nullptr, "SVM", "F", EShLangAll },
+ { "tex1D", "V4", "F", "S1,S", "S,F", EShLangFragmentMask },
+ { "tex1D", "V4", "F", "S1,S,V1,V1", "S,F,F,F",EShLangFragmentMask },
+ { "tex1Dbias", "V4", "F", "S1,V4", "S,F", EShLangFragmentMask },
+ { "tex1Dgrad", "V4", "F", "S1,V1,V1,V1","S,F,F,F",EShLangFragmentMask },
+ { "tex1Dlod", "V4", "F", "S1,V4", "S,F", EShLangFragmentMask },
+ { "tex1Dproj", "V4", "F", "S1,V4", "S,F", EShLangFragmentMask },
+ { "tex2D", "V4", "F", "S2,V2", "S,F", EShLangFragmentMask },
+ { "tex2D", "V4", "F", "S2,V2,V2,V2","S,F,F,F",EShLangFragmentMask },
+ { "tex2Dbias", "V4", "F", "S2,V4", "S,F", EShLangFragmentMask },
+ { "tex2Dgrad", "V4", "F", "S2,V2,V2,V2","S,F,F,F",EShLangFragmentMask },
+ { "tex2Dlod", "V4", "F", "S2,V4", "S,F", EShLangFragmentMask },
+ { "tex2Dproj", "V4", "F", "S2,V4", "S,F", EShLangFragmentMask },
+ { "tex3D", "V4", "F", "S3,V3", "S,F", EShLangFragmentMask },
+ { "tex3D", "V4", "F", "S3,V3,V3,V3","S,F,F,F",EShLangFragmentMask },
+ { "tex3Dbias", "V4", "F", "S3,V4", "S,F", EShLangFragmentMask },
+ { "tex3Dgrad", "V4", "F", "S3,V3,V3,V3","S,F,F,F",EShLangFragmentMask },
+ { "tex3Dlod", "V4", "F", "S3,V4", "S,F", EShLangFragmentMask },
+ { "tex3Dproj", "V4", "F", "S3,V4", "S,F", EShLangFragmentMask },
+ { "texCUBE", "V4", "F", "S4,V3", "S,F", EShLangFragmentMask },
+ { "texCUBE", "V4", "F", "S4,V3,V3,V3","S,F,F,F",EShLangFragmentMask },
+ { "texCUBEbias", "V4", "F", "S4,V4", "S,F", EShLangFragmentMask },
+ { "texCUBEgrad", "V4", "F", "S4,V3,V3,V3","S,F,F,F",EShLangFragmentMask },
+ { "texCUBElod", "V4", "F", "S4,V4", "S,F", EShLangFragmentMask },
+ { "texCUBEproj", "V4", "F", "S4,V4", "S,F", EShLangFragmentMask },
+ { "transpose", "^M", nullptr, "M", "F", EShLangAll },
+ { "trunc", nullptr, nullptr, "SVM", "F", EShLangAll },
+
+ // Mark end of list, since we want to avoid a range-based for, as some compilers don't handle it yet.
+ { nullptr, nullptr, nullptr, nullptr, nullptr, 0 },
+ };
+
+ // Set this to true to avoid generating prototypes that will be invalid for the GLSL parser.
+ // TODO: turn it off (and remove the code) when the HLSL parser can be used to parse builtins.
+ static const bool skipInvalidGlsl = true;
+
+ // Create prototypes for the intrinsics. TODO: Avoid ranged based for until all compilers can handle it.
+ for (int icount = 0; hlslIntrinsics[icount].name; ++icount) {
+ const auto& intrinsic = hlslIntrinsics[icount];
+
+ for (int stage = 0; stage < EShLangCount; ++stage) { // for each stage...
+ if ((intrinsic.stage & (1<<stage)) == 0) // skip inapplicable stages
+ continue;
+
+ // reference to either the common builtins, or stage specific builtins.
+ TString& s = (intrinsic.stage == EShLangAll) ? commonBuiltins : stageBuiltins[stage];
+
+ for (const char* argOrder = intrinsic.argOrder; !IsEndOfArg(argOrder); ++argOrder) { // for each order...
+ const int fixedVecSize = isdigit(argOrder[1]) ? (argOrder[1] - '0') : 0;
+
+ // calculate min and max vector and matrix dimensions
+ int dim0Min = 1;
+ int dim0Max = 1;
+ int dim1Min = 1;
+ int dim1Max = 1;
+
+ FindVectorMatrixBounds(argOrder, fixedVecSize, dim0Min, dim0Max, dim1Min, dim1Max);
+
+ for (const char* argType = intrinsic.argType; !IsEndOfArg(argType); ++argType) { // for each type...
+ for (int dim0 = dim0Min; dim0 <= dim0Max; ++dim0) { // for each dim 0...
+ for (int dim1 = dim1Min; dim1 <= dim1Max; ++dim1) { // for each dim 1...
+ const char* retOrder = intrinsic.retOrder ? intrinsic.retOrder : argOrder;
+ const char* retType = intrinsic.retType ? intrinsic.retType : argType;
+
+ if (skipInvalidGlsl && !IsValidGlsl(intrinsic.name, *retOrder, *retType, *argOrder, *argType,
+ dim0, dim1, dim0Max, dim1Max))
+ continue;
+
+ AppendTypeName(s, retOrder, retType, dim0, dim1); // add return type
+ s.append(" "); // space between type and name
+ s.append(intrinsic.name); // intrinsic name
+ s.append("("); // open paren
+
+ // Append argument types, if any.
+ for (int arg = 0; ; ++arg) {
+ const char* nthArgOrder(NthArg(argOrder, arg));
+ const char* nthArgType(NthArg(argType, arg));
+
+ if (nthArgOrder == nullptr || nthArgType == nullptr)
+ break;
+
+ s.append(arg > 0 ? ", ": ""); // comma separator if needed
+
+ if (*nthArgOrder == '>') { // output params
+ ++nthArgOrder;
+ s.append("out ");
+ } else if (*nthArgOrder == '<') { // input params
+ ++nthArgOrder;
+ s.append("in ");
+ }
+
+ // Comma means use the 1st argument order and type.
+ if (*nthArgOrder == ',' || *nthArgOrder == '\0') nthArgOrder = argOrder;
+ if (*nthArgType == ',' || *nthArgType == '\0') nthArgType = argType;
+
+ AppendTypeName(s, nthArgOrder, nthArgType, dim0, dim1); // Add first argument
+ }
+
+ s.append(");\n"); // close paren and trailing semicolon
+ }
+ }
+ }
+
+ if (fixedVecSize > 0) // skip over number for fixed size vectors
+ ++argOrder;
+ }
+
+ if (intrinsic.stage == EShLangAll) // common builtins are only added once.
+ break;
+ }
+ }
+
+ // printf("Common:\n%s\n", getCommonString().c_str());
+ // printf("Frag:\n%s\n", getStageString(EShLangFragment).c_str());
+ // printf("Vertex:\n%s\n", getStageString(EShLangVertex).c_str());
+ // printf("Geo:\n%s\n", getStageString(EShLangGeometry).c_str());
+ // printf("TessCtrl:\n%s\n", getStageString(EShLangTessControl).c_str());
+ // printf("TessEval:\n%s\n", getStageString(EShLangTessEvaluation).c_str());
+ // printf("Compute:\n%s\n", getStageString(EShLangCompute).c_str());
+}
+
+//
+// Add context-dependent built-in functions and variables that are present
+// for the given version and profile. All the results are put into just the
+// commonBuiltins, because it is called for just a specific stage. So,
+// add stage-specific entries to the commonBuiltins, and only if that stage
+// was requested.
+//
+void TBuiltInParseablesHlsl::initialize(const TBuiltInResource &resources, int version, EProfile profile, int spv,
+ int vulkan, EShLanguage language)
+{
+}
+
+
+//
+// Finish adding/processing context-independent built-in symbols.
+// 1) Programmatically add symbols that could not be added by simple text strings above.
+// 2) Map built-in functions to operators, for those that will turn into an operation node
+// instead of remaining a function call.
+// 3) Tag extension-related symbols added to their base version with their extensions, so
+// that if an early version has the extension turned off, there is an error reported on use.
+//
+void TBuiltInParseablesHlsl::identifyBuiltIns(int version, EProfile profile, int spv, int vulkan, EShLanguage language,
+ TSymbolTable& symbolTable)
+{
+ // symbolTable.relateToOperator("abort", EOpAbort);
+ symbolTable.relateToOperator("abs", EOpAbs);
+ symbolTable.relateToOperator("acos", EOpAcos);
+ symbolTable.relateToOperator("all", EOpAll);
+ // symbolTable.relateToOperator("AllMemoryBarrier");
+ // symbolTable.relateToOperator("AllMemoryBarrierWithGroupSync");
+ symbolTable.relateToOperator("any", EOpAny);
+ // symbolTable.relateToOperator("asdouble");
+ // symbolTable.relateToOperator("asfloat");
+ symbolTable.relateToOperator("asin", EOpAsin);
+ // symbolTable.relateToOperator("asint");
+ // symbolTable.relateToOperator("asuint");
+ symbolTable.relateToOperator("atan", EOpAtan);
+ symbolTable.relateToOperator("atan2", EOpAtan);
+ symbolTable.relateToOperator("ceil", EOpCeil);
+ // symbolTable.relateToOperator("CheckAccessFullyMapped");
+ symbolTable.relateToOperator("clamp", EOpClamp);
+ symbolTable.relateToOperator("clip", EOpClip);
+ symbolTable.relateToOperator("cos", EOpCos);
+ symbolTable.relateToOperator("cosh", EOpCosh);
+ symbolTable.relateToOperator("countbits", EOpBitCount);
+ symbolTable.relateToOperator("cross", EOpCross);
+ // symbolTable.relateToOperator("D3DCOLORtoUBYTE4", EOpD3DCOLORtoUBYTE4);
+ symbolTable.relateToOperator("ddx", EOpDPdx);
+ symbolTable.relateToOperator("ddx_coarse", EOpDPdxCoarse);
+ symbolTable.relateToOperator("ddx_fine", EOpDPdxFine);
+ symbolTable.relateToOperator("ddy", EOpDPdy);
+ symbolTable.relateToOperator("ddy_coarse", EOpDPdyCoarse);
+ symbolTable.relateToOperator("ddy_fine", EOpDPdyFine);
+ symbolTable.relateToOperator("degrees", EOpDegrees);
+ symbolTable.relateToOperator("determinant", EOpDeterminant);
+ // symbolTable.relateToOperator("DeviceMemoryBarrier");
+ // symbolTable.relateToOperator("DeviceMemoryBarrierWithGroupSync");
+ symbolTable.relateToOperator("distance", EOpDistance);
+ symbolTable.relateToOperator("dot", EOpDot);
+ symbolTable.relateToOperator("dst", EOpDst);
+ // symbolTable.relateToOperator("errorf");
+ symbolTable.relateToOperator("EvaluateAttributeAtCentroid", EOpInterpolateAtCentroid);
+ symbolTable.relateToOperator("EvaluateAttributeAtSample", EOpInterpolateAtSample);
+ // symbolTable.relateToOperator("EvaluateAttributeSnapped"); // TODO: hsnflr positions. new op?
+ symbolTable.relateToOperator("exp", EOpExp);
+ symbolTable.relateToOperator("exp2", EOpExp2);
+ // symbolTable.relateToOperator("f16tof32");
+ // symbolTable.relateToOperator("f32tof16");
+ symbolTable.relateToOperator("faceforward", EOpFaceForward);
+ symbolTable.relateToOperator("firstbithigh", EOpFindMSB);
+ symbolTable.relateToOperator("firstbitlow", EOpFindLSB);
+ symbolTable.relateToOperator("floor", EOpFloor);
+ symbolTable.relateToOperator("fma", EOpFma);
+ symbolTable.relateToOperator("fmod", EOpMod);
+ symbolTable.relateToOperator("frac", EOpFract);
+ symbolTable.relateToOperator("frexp", EOpFrexp);
+ symbolTable.relateToOperator("fwidth", EOpFwidth);
+ // symbolTable.relateToOperator("GetRenderTargetSampleCount");
+ // symbolTable.relateToOperator("GetRenderTargetSamplePosition");
+ // symbolTable.relateToOperator("GroupMemoryBarrier");
+ // symbolTable.relateToOperator("GroupMemoryBarrierWithGroupSync");
+ // symbolTable.relateToOperator("InterlockedAdd");
+ // symbolTable.relateToOperator("InterlockedAnd");
+ // symbolTable.relateToOperator("InterlockedCompareExchange");
+ // symbolTable.relateToOperator("InterlockedCompareStore");
+ // symbolTable.relateToOperator("InterlockedExchange");
+ // symbolTable.relateToOperator("InterlockedMax");
+ // symbolTable.relateToOperator("InterlockedMin");
+ // symbolTable.relateToOperator("InterlockedOr");
+ // symbolTable.relateToOperator("InterlockedXor");
+ symbolTable.relateToOperator("isfinite", EOpIsFinite);
+ symbolTable.relateToOperator("isinf", EOpIsInf);
+ symbolTable.relateToOperator("isnan", EOpIsNan);
+ symbolTable.relateToOperator("ldexp", EOpLdexp);
+ symbolTable.relateToOperator("length", EOpLength);
+ // symbolTable.relateToOperator("lit");
+ symbolTable.relateToOperator("log", EOpLog);
+ symbolTable.relateToOperator("log10", EOpLog10);
+ symbolTable.relateToOperator("log2", EOpLog2);
+ // symbolTable.relateToOperator("mad");
+ symbolTable.relateToOperator("max", EOpMax);
+ symbolTable.relateToOperator("min", EOpMin);
+ symbolTable.relateToOperator("modf", EOpModf);
+ // symbolTable.relateToOperator("msad4", EOpMsad4);
+ symbolTable.relateToOperator("mul", EOpGenMul);
+ // symbolTable.relateToOperator("noise", EOpNoise); // TODO: check return type
+ symbolTable.relateToOperator("normalize", EOpNormalize);
+ symbolTable.relateToOperator("pow", EOpPow);
+ // symbolTable.relateToOperator("printf");
+ // symbolTable.relateToOperator("Process2DQuadTessFactorsAvg");
+ // symbolTable.relateToOperator("Process2DQuadTessFactorsMax");
+ // symbolTable.relateToOperator("Process2DQuadTessFactorsMin");
+ // symbolTable.relateToOperator("ProcessIsolineTessFactors");
+ // symbolTable.relateToOperator("ProcessQuadTessFactorsAvg");
+ // symbolTable.relateToOperator("ProcessQuadTessFactorsMax");
+ // symbolTable.relateToOperator("ProcessQuadTessFactorsMin");
+ // symbolTable.relateToOperator("ProcessTriTessFactorsAvg");
+ // symbolTable.relateToOperator("ProcessTriTessFactorsMax");
+ // symbolTable.relateToOperator("ProcessTriTessFactorsMin");
+ symbolTable.relateToOperator("radians", EOpRadians);
+ symbolTable.relateToOperator("rcp", EOpRcp);
+ symbolTable.relateToOperator("reflect", EOpReflect);
+ symbolTable.relateToOperator("refract", EOpRefract);
+ symbolTable.relateToOperator("reversebits", EOpBitFieldReverse);
+ symbolTable.relateToOperator("round", EOpRoundEven);
+ symbolTable.relateToOperator("rsqrt", EOpInverseSqrt);
+ symbolTable.relateToOperator("saturate", EOpSaturate);
+ symbolTable.relateToOperator("sign", EOpSign);
+ symbolTable.relateToOperator("sin", EOpSin);
+ symbolTable.relateToOperator("sincos", EOpSinCos);
+ symbolTable.relateToOperator("sinh", EOpSinh);
+ symbolTable.relateToOperator("smoothstep", EOpSmoothStep);
+ symbolTable.relateToOperator("sqrt", EOpSqrt);
+ symbolTable.relateToOperator("step", EOpStep);
+ symbolTable.relateToOperator("tan", EOpTan);
+ symbolTable.relateToOperator("tanh", EOpTanh);
+ symbolTable.relateToOperator("tex1D", EOpTexture);
+ // symbolTable.relateToOperator("tex1Dbias", // TODO:
+ symbolTable.relateToOperator("tex1Dgrad", EOpTextureGrad);
+ symbolTable.relateToOperator("tex1Dlod", EOpTextureLod);
+ symbolTable.relateToOperator("tex1Dproj", EOpTextureProj);
+ symbolTable.relateToOperator("tex2D", EOpTexture);
+ // symbolTable.relateToOperator("tex2Dbias", // TODO:
+ symbolTable.relateToOperator("tex2Dgrad", EOpTextureGrad);
+ symbolTable.relateToOperator("tex2Dlod", EOpTextureLod);
+ // symbolTable.relateToOperator("tex2Dproj", EOpTextureProj);
+ symbolTable.relateToOperator("tex3D", EOpTexture);
+ // symbolTable.relateToOperator("tex3Dbias"); // TODO
+ symbolTable.relateToOperator("tex3Dgrad", EOpTextureGrad);
+ symbolTable.relateToOperator("tex3Dlod", EOpTextureLod);
+ // symbolTable.relateToOperator("tex3Dproj", EOpTextureProj);
+ symbolTable.relateToOperator("texCUBE", EOpTexture);
+ // symbolTable.relateToOperator("texCUBEbias", // TODO
+ symbolTable.relateToOperator("texCUBEgrad", EOpTextureGrad);
+ symbolTable.relateToOperator("texCUBElod", EOpTextureLod);
+ // symbolTable.relateToOperator("texCUBEproj", EOpTextureProj);
+ symbolTable.relateToOperator("transpose", EOpTranspose);
+ symbolTable.relateToOperator("trunc", EOpTrunc);
+}
+
+//
+// Add context-dependent (resource-specific) built-ins not handled by the above. These
+// would be ones that need to be programmatically added because they cannot
+// be added by simple text strings. For these, also
+// 1) Map built-in functions to operators, for those that will turn into an operation node
+// instead of remaining a function call.
+// 2) Tag extension-related symbols added to their base version with their extensions, so
+// that if an early version has the extension turned off, there is an error reported on use.
+//
+void TBuiltInParseablesHlsl::identifyBuiltIns(int version, EProfile profile, int spv, int /*vulkan*/, EShLanguage language,
+ TSymbolTable& symbolTable, const TBuiltInResource &resources)
+{
+}
+
+
+} // end namespace glslang
diff --git a/chromium/third_party/glslang/src/hlsl/hlslParseables.h b/chromium/third_party/glslang/src/hlsl/hlslParseables.h
new file mode 100755
index 00000000000..c09c1ecfa45
--- /dev/null
+++ b/chromium/third_party/glslang/src/hlsl/hlslParseables.h
@@ -0,0 +1,61 @@
+//
+//Copyright (C) 2016 LunarG, 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:
+//
+// Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 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.
+//
+// Neither the name of 3Dlabs Inc. Ltd. nor the names of its
+// contributors may be used to endorse or promote products derived
+// from this software without specific prior written permission.
+//
+//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+//"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 THE
+//COPYRIGHT HOLDERS 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.
+//
+
+#ifndef _HLSLPARSEABLES_INCLUDED_
+#define _HLSLPARSEABLES_INCLUDED_
+
+#include "../glslang/MachineIndependent/Initialize.h"
+
+namespace glslang {
+
+//
+// This is an HLSL specific derivation of TBuiltInParseables. See comment
+// above TBuiltInParseables for details.
+//
+class TBuiltInParseablesHlsl : public TBuiltInParseables {
+public:
+ POOL_ALLOCATOR_NEW_DELETE(GetThreadPoolAllocator())
+ TBuiltInParseablesHlsl();
+ void initialize(int version, EProfile, int spv, int vulkan);
+ void initialize(const TBuiltInResource& resources, int version, EProfile, int spv, int vulkan, EShLanguage);
+
+ void identifyBuiltIns(int version, EProfile profile, int spv, int vulkan, EShLanguage language, TSymbolTable& symbolTable);
+
+ void identifyBuiltIns(int version, EProfile profile, int spv, int /*vulkan*/, EShLanguage language, TSymbolTable& symbolTable, const TBuiltInResource &resources);
+};
+
+} // end namespace glslang
+
+#endif // _HLSLPARSEABLES_INCLUDED_
diff --git a/chromium/third_party/glslang/src/hlsl/hlslScanContext.cpp b/chromium/third_party/glslang/src/hlsl/hlslScanContext.cpp
new file mode 100755
index 00000000000..69e582f6fe4
--- /dev/null
+++ b/chromium/third_party/glslang/src/hlsl/hlslScanContext.cpp
@@ -0,0 +1,635 @@
+//
+//Copyright (C) 2016 Google, 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:
+//
+// Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 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.
+//
+// Neither the name of Google, Inc., nor the names of its
+// contributors may be used to endorse or promote products derived
+// from this software without specific prior written permission.
+//
+//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+//"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 THE
+//COPYRIGHT HOLDERS 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.
+//
+
+//
+// HLSL scanning, leveraging the scanning done by the preprocessor.
+//
+
+#include <string.h>
+#include <unordered_map>
+#include <unordered_set>
+
+#include "../glslang/Include/Types.h"
+#include "../glslang/MachineIndependent/SymbolTable.h"
+#include "../glslang/MachineIndependent/ParseHelper.h"
+#include "hlslScanContext.h"
+#include "hlslTokens.h"
+//#include "Scan.h"
+
+// preprocessor includes
+#include "../glslang/MachineIndependent/preprocessor/PpContext.h"
+#include "../glslang/MachineIndependent/preprocessor/PpTokens.h"
+
+namespace {
+
+struct str_eq
+{
+ bool operator()(const char* lhs, const char* rhs) const
+ {
+ return strcmp(lhs, rhs) == 0;
+ }
+};
+
+struct str_hash
+{
+ size_t operator()(const char* str) const
+ {
+ // djb2
+ unsigned long hash = 5381;
+ int c;
+
+ while ((c = *str++) != 0)
+ hash = ((hash << 5) + hash) + c;
+
+ return hash;
+ }
+};
+
+// A single global usable by all threads, by all versions, by all languages.
+// After a single process-level initialization, this is read only and thread safe
+std::unordered_map<const char*, glslang::EHlslTokenClass, str_hash, str_eq>* KeywordMap = nullptr;
+std::unordered_set<const char*, str_hash, str_eq>* ReservedSet = nullptr;
+
+};
+
+namespace glslang {
+
+void HlslScanContext::fillInKeywordMap()
+{
+ if (KeywordMap != nullptr) {
+ // this is really an error, as this should called only once per process
+ // but, the only risk is if two threads called simultaneously
+ return;
+ }
+ KeywordMap = new std::unordered_map<const char*, EHlslTokenClass, str_hash, str_eq>;
+
+ (*KeywordMap)["static"] = EHTokStatic;
+ (*KeywordMap)["const"] = EHTokConst;
+ (*KeywordMap)["unorm"] = EHTokUnorm;
+ (*KeywordMap)["snorm"] = EHTokSNorm;
+ (*KeywordMap)["extern"] = EHTokExtern;
+ (*KeywordMap)["uniform"] = EHTokUniform;
+ (*KeywordMap)["volatile"] = EHTokVolatile;
+ (*KeywordMap)["precise"] = EHTokPrecise;
+ (*KeywordMap)["shared"] = EHTokShared;
+ (*KeywordMap)["groupshared"] = EHTokGroupShared;
+ (*KeywordMap)["linear"] = EHTokLinear;
+ (*KeywordMap)["centroid"] = EHTokCentroid;
+ (*KeywordMap)["nointerpolation"] = EHTokNointerpolation;
+ (*KeywordMap)["noperspective"] = EHTokNoperspective;
+ (*KeywordMap)["sample"] = EHTokSample;
+ (*KeywordMap)["row_major"] = EHTokRowMajor;
+ (*KeywordMap)["column_major"] = EHTokColumnMajor;
+ (*KeywordMap)["packoffset"] = EHTokPackOffset;
+
+ (*KeywordMap)["Buffer"] = EHTokBuffer;
+ (*KeywordMap)["vector"] = EHTokVector;
+ (*KeywordMap)["matrix"] = EHTokMatrix;
+
+ (*KeywordMap)["void"] = EHTokVoid;
+ (*KeywordMap)["bool"] = EHTokBool;
+ (*KeywordMap)["int"] = EHTokInt;
+ (*KeywordMap)["uint"] = EHTokUint;
+ (*KeywordMap)["dword"] = EHTokDword;
+ (*KeywordMap)["half"] = EHTokHalf;
+ (*KeywordMap)["float"] = EHTokFloat;
+ (*KeywordMap)["double"] = EHTokDouble;
+ (*KeywordMap)["min16float"] = EHTokMin16float;
+ (*KeywordMap)["min10float"] = EHTokMin10float;
+ (*KeywordMap)["min16int"] = EHTokMin16int;
+ (*KeywordMap)["min12int"] = EHTokMin12int;
+ (*KeywordMap)["min16uint"] = EHTokMin16int;
+
+ (*KeywordMap)["bool1"] = EHTokBool1;
+ (*KeywordMap)["bool2"] = EHTokBool2;
+ (*KeywordMap)["bool3"] = EHTokBool3;
+ (*KeywordMap)["bool4"] = EHTokBool4;
+ (*KeywordMap)["float1"] = EHTokFloat1;
+ (*KeywordMap)["float2"] = EHTokFloat2;
+ (*KeywordMap)["float3"] = EHTokFloat3;
+ (*KeywordMap)["float4"] = EHTokFloat4;
+ (*KeywordMap)["int1"] = EHTokInt1;
+ (*KeywordMap)["int2"] = EHTokInt2;
+ (*KeywordMap)["int3"] = EHTokInt3;
+ (*KeywordMap)["int4"] = EHTokInt4;
+ (*KeywordMap)["double1"] = EHTokDouble1;
+ (*KeywordMap)["double2"] = EHTokDouble2;
+ (*KeywordMap)["double3"] = EHTokDouble3;
+ (*KeywordMap)["double4"] = EHTokDouble4;
+ (*KeywordMap)["uint1"] = EHTokUint1;
+ (*KeywordMap)["uint2"] = EHTokUint2;
+ (*KeywordMap)["uint3"] = EHTokUint3;
+ (*KeywordMap)["uint4"] = EHTokUint4;
+
+ (*KeywordMap)["int1x1"] = EHTokInt1x1;
+ (*KeywordMap)["int1x2"] = EHTokInt1x2;
+ (*KeywordMap)["int1x3"] = EHTokInt1x3;
+ (*KeywordMap)["int1x4"] = EHTokInt1x4;
+ (*KeywordMap)["int2x1"] = EHTokInt2x1;
+ (*KeywordMap)["int2x2"] = EHTokInt2x2;
+ (*KeywordMap)["int2x3"] = EHTokInt2x3;
+ (*KeywordMap)["int2x4"] = EHTokInt2x4;
+ (*KeywordMap)["int3x1"] = EHTokInt3x1;
+ (*KeywordMap)["int3x2"] = EHTokInt3x2;
+ (*KeywordMap)["int3x3"] = EHTokInt3x3;
+ (*KeywordMap)["int3x4"] = EHTokInt3x4;
+ (*KeywordMap)["int4x1"] = EHTokInt4x1;
+ (*KeywordMap)["int4x2"] = EHTokInt4x2;
+ (*KeywordMap)["int4x3"] = EHTokInt4x3;
+ (*KeywordMap)["int4x4"] = EHTokInt4x4;
+ (*KeywordMap)["uint1x1"] = EHTokUint1x1;
+ (*KeywordMap)["uint1x2"] = EHTokUint1x2;
+ (*KeywordMap)["uint1x3"] = EHTokUint1x3;
+ (*KeywordMap)["uint1x4"] = EHTokUint1x4;
+ (*KeywordMap)["uint2x1"] = EHTokUint2x1;
+ (*KeywordMap)["uint2x2"] = EHTokUint2x2;
+ (*KeywordMap)["uint2x3"] = EHTokUint2x3;
+ (*KeywordMap)["uint2x4"] = EHTokUint2x4;
+ (*KeywordMap)["uint3x1"] = EHTokUint3x1;
+ (*KeywordMap)["uint3x2"] = EHTokUint3x2;
+ (*KeywordMap)["uint3x3"] = EHTokUint3x3;
+ (*KeywordMap)["uint3x4"] = EHTokUint3x4;
+ (*KeywordMap)["uint4x1"] = EHTokUint4x1;
+ (*KeywordMap)["uint4x2"] = EHTokUint4x2;
+ (*KeywordMap)["uint4x3"] = EHTokUint4x3;
+ (*KeywordMap)["uint4x4"] = EHTokUint4x4;
+ (*KeywordMap)["bool1x1"] = EHTokBool1x1;
+ (*KeywordMap)["bool1x2"] = EHTokBool1x2;
+ (*KeywordMap)["bool1x3"] = EHTokBool1x3;
+ (*KeywordMap)["bool1x4"] = EHTokBool1x4;
+ (*KeywordMap)["bool2x1"] = EHTokBool2x1;
+ (*KeywordMap)["bool2x2"] = EHTokBool2x2;
+ (*KeywordMap)["bool2x3"] = EHTokBool2x3;
+ (*KeywordMap)["bool2x4"] = EHTokBool2x4;
+ (*KeywordMap)["bool3x1"] = EHTokBool3x1;
+ (*KeywordMap)["bool3x2"] = EHTokBool3x2;
+ (*KeywordMap)["bool3x3"] = EHTokBool3x3;
+ (*KeywordMap)["bool3x4"] = EHTokBool3x4;
+ (*KeywordMap)["bool4x1"] = EHTokBool4x1;
+ (*KeywordMap)["bool4x2"] = EHTokBool4x2;
+ (*KeywordMap)["bool4x3"] = EHTokBool4x3;
+ (*KeywordMap)["bool4x4"] = EHTokBool4x4;
+ (*KeywordMap)["float1x1"] = EHTokFloat1x1;
+ (*KeywordMap)["float1x2"] = EHTokFloat1x2;
+ (*KeywordMap)["float1x3"] = EHTokFloat1x3;
+ (*KeywordMap)["float1x4"] = EHTokFloat1x4;
+ (*KeywordMap)["float2x1"] = EHTokFloat2x1;
+ (*KeywordMap)["float2x2"] = EHTokFloat2x2;
+ (*KeywordMap)["float2x3"] = EHTokFloat2x3;
+ (*KeywordMap)["float2x4"] = EHTokFloat2x4;
+ (*KeywordMap)["float3x1"] = EHTokFloat3x1;
+ (*KeywordMap)["float3x2"] = EHTokFloat3x2;
+ (*KeywordMap)["float3x3"] = EHTokFloat3x3;
+ (*KeywordMap)["float3x4"] = EHTokFloat3x4;
+ (*KeywordMap)["float4x1"] = EHTokFloat4x1;
+ (*KeywordMap)["float4x2"] = EHTokFloat4x2;
+ (*KeywordMap)["float4x3"] = EHTokFloat4x3;
+ (*KeywordMap)["float4x4"] = EHTokFloat4x4;
+ (*KeywordMap)["double1x1"] = EHTokDouble1x1;
+ (*KeywordMap)["double1x2"] = EHTokDouble1x2;
+ (*KeywordMap)["double1x3"] = EHTokDouble1x3;
+ (*KeywordMap)["double1x4"] = EHTokDouble1x4;
+ (*KeywordMap)["double2x1"] = EHTokDouble2x1;
+ (*KeywordMap)["double2x2"] = EHTokDouble2x2;
+ (*KeywordMap)["double2x3"] = EHTokDouble2x3;
+ (*KeywordMap)["double2x4"] = EHTokDouble2x4;
+ (*KeywordMap)["double3x1"] = EHTokDouble3x1;
+ (*KeywordMap)["double3x2"] = EHTokDouble3x2;
+ (*KeywordMap)["double3x3"] = EHTokDouble3x3;
+ (*KeywordMap)["double3x4"] = EHTokDouble3x4;
+ (*KeywordMap)["double4x1"] = EHTokDouble4x1;
+ (*KeywordMap)["double4x2"] = EHTokDouble4x2;
+ (*KeywordMap)["double4x3"] = EHTokDouble4x3;
+ (*KeywordMap)["double4x4"] = EHTokDouble4x4;
+
+ (*KeywordMap)["sampler"] = EHTokSampler;
+ (*KeywordMap)["sampler1D"] = EHTokSampler1d;
+ (*KeywordMap)["sampler2D"] = EHTokSampler2d;
+ (*KeywordMap)["sampler3D"] = EHTokSampler3d;
+ (*KeywordMap)["samplerCube"] = EHTokSamplerCube;
+ (*KeywordMap)["sampler_state"] = EHTokSamplerState;
+ (*KeywordMap)["SamplerState"] = EHTokSamplerState;
+ (*KeywordMap)["SamplerComparisonState"] = EHTokSamplerComparisonState;
+ (*KeywordMap)["texture"] = EHTokTexture;
+ (*KeywordMap)["Texture1D"] = EHTokTexture1d;
+ (*KeywordMap)["Texture1DArray"] = EHTokTexture1darray;
+ (*KeywordMap)["Texture2D"] = EHTokTexture2d;
+ (*KeywordMap)["Texture2DArray"] = EHTokTexture2darray;
+ (*KeywordMap)["Texture3D"] = EHTokTexture3d;
+ (*KeywordMap)["TextureCube"] = EHTokTextureCube;
+
+ (*KeywordMap)["struct"] = EHTokStruct;
+ (*KeywordMap)["typedef"] = EHTokTypedef;
+
+ (*KeywordMap)["true"] = EHTokBoolConstant;
+ (*KeywordMap)["false"] = EHTokBoolConstant;
+
+ (*KeywordMap)["for"] = EHTokFor;
+ (*KeywordMap)["do"] = EHTokDo;
+ (*KeywordMap)["while"] = EHTokWhile;
+ (*KeywordMap)["break"] = EHTokBreak;
+ (*KeywordMap)["continue"] = EHTokContinue;
+ (*KeywordMap)["if"] = EHTokIf;
+ (*KeywordMap)["else"] = EHTokElse;
+ (*KeywordMap)["discard"] = EHTokDiscard;
+ (*KeywordMap)["return"] = EHTokReturn;
+ (*KeywordMap)["switch"] = EHTokSwitch;
+ (*KeywordMap)["case"] = EHTokCase;
+ (*KeywordMap)["default"] = EHTokDefault;
+
+ // TODO: get correct set here
+ ReservedSet = new std::unordered_set<const char*, str_hash, str_eq>;
+
+ ReservedSet->insert("auto");
+ ReservedSet->insert("catch");
+ ReservedSet->insert("char");
+ ReservedSet->insert("class");
+ ReservedSet->insert("const_cast");
+ ReservedSet->insert("enum");
+ ReservedSet->insert("explicit");
+ ReservedSet->insert("friend");
+ ReservedSet->insert("goto");
+ ReservedSet->insert("long");
+ ReservedSet->insert("mutable");
+ ReservedSet->insert("new");
+ ReservedSet->insert("operator");
+ ReservedSet->insert("private");
+ ReservedSet->insert("protected");
+ ReservedSet->insert("public");
+ ReservedSet->insert("reinterpret_cast");
+ ReservedSet->insert("short");
+ ReservedSet->insert("signed");
+ ReservedSet->insert("sizeof");
+ ReservedSet->insert("static_cast");
+ ReservedSet->insert("template");
+ ReservedSet->insert("this");
+ ReservedSet->insert("throw");
+ ReservedSet->insert("try");
+ ReservedSet->insert("typename");
+ ReservedSet->insert("union");
+ ReservedSet->insert("unsigned");
+ ReservedSet->insert("using");
+ ReservedSet->insert("virtual");
+}
+
+void HlslScanContext::deleteKeywordMap()
+{
+ delete KeywordMap;
+ KeywordMap = nullptr;
+ delete ReservedSet;
+ ReservedSet = nullptr;
+}
+
+// Wrapper for tokenizeClass()"] = to get everything inside the token.
+void HlslScanContext::tokenize(HlslToken& token)
+{
+ EHlslTokenClass tokenClass = tokenizeClass(token);
+ token.tokenClass = tokenClass;
+}
+
+//
+// Fill in token information for the next token, except for the token class.
+// Returns the enum value of the token class of the next token found.
+// Return 0 (EndOfTokens) on end of input.
+//
+EHlslTokenClass HlslScanContext::tokenizeClass(HlslToken& token)
+{
+ do {
+ parserToken = &token;
+ TPpToken ppToken;
+ tokenText = ppContext.tokenize(&ppToken);
+ if (tokenText == nullptr)
+ return EHTokNone;
+
+ loc = ppToken.loc;
+ parserToken->loc = loc;
+ switch (ppToken.token) {
+ case ';': return EHTokSemicolon;
+ case ',': return EHTokComma;
+ case ':': return EHTokColon;
+ case '=': return EHTokAssign;
+ case '(': return EHTokLeftParen;
+ case ')': return EHTokRightParen;
+ case '.': return EHTokDot;
+ case '!': return EHTokBang;
+ case '-': return EHTokDash;
+ case '~': return EHTokTilde;
+ case '+': return EHTokPlus;
+ case '*': return EHTokStar;
+ case '/': return EHTokSlash;
+ case '%': return EHTokPercent;
+ case '<': return EHTokLeftAngle;
+ case '>': return EHTokRightAngle;
+ case '|': return EHTokVerticalBar;
+ case '^': return EHTokCaret;
+ case '&': return EHTokAmpersand;
+ case '?': return EHTokQuestion;
+ case '[': return EHTokLeftBracket;
+ case ']': return EHTokRightBracket;
+ case '{': return EHTokLeftBrace;
+ case '}': return EHTokRightBrace;
+ case '\\':
+ parseContext.error(loc, "illegal use of escape character", "\\", "");
+ break;
+
+ case PpAtomAdd: return EHTokAddAssign;
+ case PpAtomSub: return EHTokSubAssign;
+ case PpAtomMul: return EHTokMulAssign;
+ case PpAtomDiv: return EHTokDivAssign;
+ case PpAtomMod: return EHTokModAssign;
+
+ case PpAtomRight: return EHTokRightOp;
+ case PpAtomLeft: return EHTokLeftOp;
+
+ case PpAtomRightAssign: return EHTokRightAssign;
+ case PpAtomLeftAssign: return EHTokLeftAssign;
+ case PpAtomAndAssign: return EHTokAndAssign;
+ case PpAtomOrAssign: return EHTokOrAssign;
+ case PpAtomXorAssign: return EHTokXorAssign;
+
+ case PpAtomAnd: return EHTokAndOp;
+ case PpAtomOr: return EHTokOrOp;
+ case PpAtomXor: return EHTokXorOp;
+
+ case PpAtomEQ: return EHTokEqOp;
+ case PpAtomGE: return EHTokGeOp;
+ case PpAtomNE: return EHTokNeOp;
+ case PpAtomLE: return EHTokLeOp;
+
+ case PpAtomDecrement: return EHTokDecOp;
+ case PpAtomIncrement: return EHTokIncOp;
+
+ case PpAtomConstInt: parserToken->i = ppToken.ival; return EHTokIntConstant;
+ case PpAtomConstUint: parserToken->i = ppToken.ival; return EHTokUintConstant;
+ case PpAtomConstFloat: parserToken->d = ppToken.dval; return EHTokFloatConstant;
+ case PpAtomConstDouble: parserToken->d = ppToken.dval; return EHTokDoubleConstant;
+ case PpAtomIdentifier:
+ {
+ EHlslTokenClass token = tokenizeIdentifier();
+ return token;
+ }
+
+ case EndOfInput: return EHTokNone;
+
+ default:
+ char buf[2];
+ buf[0] = (char)ppToken.token;
+ buf[1] = 0;
+ parseContext.error(loc, "unexpected token", buf, "");
+ break;
+ }
+ } while (true);
+}
+
+EHlslTokenClass HlslScanContext::tokenizeIdentifier()
+{
+ if (ReservedSet->find(tokenText) != ReservedSet->end())
+ return reservedWord();
+
+ auto it = KeywordMap->find(tokenText);
+ if (it == KeywordMap->end()) {
+ // Should have an identifier of some sort
+ return identifierOrType();
+ }
+ keyword = it->second;
+
+ switch (keyword) {
+
+ // qualifiers
+ case EHTokStatic:
+ case EHTokConst:
+ case EHTokSNorm:
+ case EHTokUnorm:
+ case EHTokExtern:
+ case EHTokUniform:
+ case EHTokVolatile:
+ case EHTokShared:
+ case EHTokGroupShared:
+ case EHTokLinear:
+ case EHTokCentroid:
+ case EHTokNointerpolation:
+ case EHTokNoperspective:
+ case EHTokSample:
+ case EHTokRowMajor:
+ case EHTokColumnMajor:
+ case EHTokPackOffset:
+ return keyword;
+
+ // template types
+ case EHTokBuffer:
+ case EHTokVector:
+ case EHTokMatrix:
+ return keyword;
+
+ // scalar types
+ case EHTokVoid:
+ case EHTokBool:
+ case EHTokInt:
+ case EHTokUint:
+ case EHTokDword:
+ case EHTokHalf:
+ case EHTokFloat:
+ case EHTokDouble:
+ case EHTokMin16float:
+ case EHTokMin10float:
+ case EHTokMin16int:
+ case EHTokMin12int:
+ case EHTokMin16uint:
+
+ // vector types
+ case EHTokBool1:
+ case EHTokBool2:
+ case EHTokBool3:
+ case EHTokBool4:
+ case EHTokFloat1:
+ case EHTokFloat2:
+ case EHTokFloat3:
+ case EHTokFloat4:
+ case EHTokInt1:
+ case EHTokInt2:
+ case EHTokInt3:
+ case EHTokInt4:
+ case EHTokDouble1:
+ case EHTokDouble2:
+ case EHTokDouble3:
+ case EHTokDouble4:
+ case EHTokUint1:
+ case EHTokUint2:
+ case EHTokUint3:
+ case EHTokUint4:
+
+ // matrix types
+ case EHTokInt1x1:
+ case EHTokInt1x2:
+ case EHTokInt1x3:
+ case EHTokInt1x4:
+ case EHTokInt2x1:
+ case EHTokInt2x2:
+ case EHTokInt2x3:
+ case EHTokInt2x4:
+ case EHTokInt3x1:
+ case EHTokInt3x2:
+ case EHTokInt3x3:
+ case EHTokInt3x4:
+ case EHTokInt4x1:
+ case EHTokInt4x2:
+ case EHTokInt4x3:
+ case EHTokInt4x4:
+ case EHTokFloat1x1:
+ case EHTokFloat1x2:
+ case EHTokFloat1x3:
+ case EHTokFloat1x4:
+ case EHTokFloat2x1:
+ case EHTokFloat2x2:
+ case EHTokFloat2x3:
+ case EHTokFloat2x4:
+ case EHTokFloat3x1:
+ case EHTokFloat3x2:
+ case EHTokFloat3x3:
+ case EHTokFloat3x4:
+ case EHTokFloat4x1:
+ case EHTokFloat4x2:
+ case EHTokFloat4x3:
+ case EHTokFloat4x4:
+ case EHTokDouble1x1:
+ case EHTokDouble1x2:
+ case EHTokDouble1x3:
+ case EHTokDouble1x4:
+ case EHTokDouble2x1:
+ case EHTokDouble2x2:
+ case EHTokDouble2x3:
+ case EHTokDouble2x4:
+ case EHTokDouble3x1:
+ case EHTokDouble3x2:
+ case EHTokDouble3x3:
+ case EHTokDouble3x4:
+ case EHTokDouble4x1:
+ case EHTokDouble4x2:
+ case EHTokDouble4x3:
+ case EHTokDouble4x4:
+ return keyword;
+
+ // texturing types
+ case EHTokSampler:
+ case EHTokSampler1d:
+ case EHTokSampler2d:
+ case EHTokSampler3d:
+ case EHTokSamplerCube:
+ case EHTokSamplerState:
+ case EHTokSamplerComparisonState:
+ case EHTokTexture:
+ case EHTokTexture1d:
+ case EHTokTexture1darray:
+ case EHTokTexture2d:
+ case EHTokTexture2darray:
+ case EHTokTexture3d:
+ case EHTokTextureCube:
+ return keyword;
+
+ // variable, user type, ...
+ case EHTokStruct:
+ case EHTokTypedef:
+
+ case EHTokBoolConstant:
+ if (strcmp("true", tokenText) == 0)
+ parserToken->b = true;
+ else
+ parserToken->b = false;
+ return keyword;
+
+ // control flow
+ case EHTokFor:
+ case EHTokDo:
+ case EHTokWhile:
+ case EHTokBreak:
+ case EHTokContinue:
+ case EHTokIf:
+ case EHTokElse:
+ case EHTokDiscard:
+ case EHTokReturn:
+ case EHTokCase:
+ case EHTokSwitch:
+ case EHTokDefault:
+ return keyword;
+
+ default:
+ parseContext.infoSink.info.message(EPrefixInternalError, "Unknown glslang keyword", loc);
+ return EHTokNone;
+ }
+}
+
+EHlslTokenClass HlslScanContext::identifierOrType()
+{
+ parserToken->string = NewPoolTString(tokenText);
+
+ return EHTokIdentifier;
+}
+
+// Give an error for use of a reserved symbol.
+// However, allow built-in declarations to use reserved words, to allow
+// extension support before the extension is enabled.
+EHlslTokenClass HlslScanContext::reservedWord()
+{
+ if (! parseContext.symbolTable.atBuiltInLevel())
+ parseContext.error(loc, "Reserved word.", tokenText, "", "");
+
+ return EHTokNone;
+}
+
+EHlslTokenClass HlslScanContext::identifierOrReserved(bool reserved)
+{
+ if (reserved) {
+ reservedWord();
+
+ return EHTokNone;
+ }
+
+ if (parseContext.forwardCompatible)
+ parseContext.warn(loc, "using future reserved keyword", tokenText, "");
+
+ return identifierOrType();
+}
+
+// For a keyword that was never reserved, until it suddenly
+// showed up.
+EHlslTokenClass HlslScanContext::nonreservedKeyword(int version)
+{
+ if (parseContext.version < version)
+ return identifierOrType();
+
+ return keyword;
+}
+
+} // end namespace glslang
diff --git a/chromium/third_party/glslang/src/hlsl/hlslScanContext.h b/chromium/third_party/glslang/src/hlsl/hlslScanContext.h
new file mode 100755
index 00000000000..144a85343f5
--- /dev/null
+++ b/chromium/third_party/glslang/src/hlsl/hlslScanContext.h
@@ -0,0 +1,109 @@
+//
+//Copyright (C) 2016 Google, 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:
+//
+// Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 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.
+//
+// Neither the name of Google, Inc., nor the names of its
+// contributors may be used to endorse or promote products derived
+// from this software without specific prior written permission.
+//
+//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+//"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 THE
+//COPYRIGHT HOLDERS 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.
+//
+
+//
+// This holds context specific to the HLSL scanner, which
+// sits between the preprocessor scanner and HLSL parser.
+//
+
+#ifndef HLSLSCANCONTEXT_H_
+#define HLSLSCANCONTEXT_H_
+
+#include "../glslang/MachineIndependent/ParseHelper.h"
+#include "hlslTokens.h"
+
+namespace glslang {
+
+class TPpContext;
+class TPpToken;
+
+
+//
+// Everything needed to fully describe a token.
+//
+struct HlslToken {
+ HlslToken() : string(nullptr), symbol(nullptr) { loc.init(); }
+ TSourceLoc loc; // location of token in the source
+ EHlslTokenClass tokenClass; // what kind of token it is
+ union { // what data the token holds
+ glslang::TString *string; // for identifiers
+ int i; // for literals
+ unsigned int u;
+ bool b;
+ double d;
+ };
+ glslang::TSymbol* symbol; // if a symbol-table lookup was done already, this is the result
+};
+
+//
+// The state of scanning and translating raw tokens to slightly richer
+// semantics, like knowing if an identifier is an existing symbol, or
+// user-defined type.
+//
+class HlslScanContext {
+public:
+ HlslScanContext(TParseContextBase& parseContext, TPpContext& ppContext)
+ : parseContext(parseContext), ppContext(ppContext) { }
+ virtual ~HlslScanContext() { }
+
+ static void fillInKeywordMap();
+ static void deleteKeywordMap();
+
+ void tokenize(HlslToken&);
+
+protected:
+ HlslScanContext(HlslScanContext&);
+ HlslScanContext& operator=(HlslScanContext&);
+
+ EHlslTokenClass tokenizeClass(HlslToken&);
+ EHlslTokenClass tokenizeIdentifier();
+ EHlslTokenClass identifierOrType();
+ EHlslTokenClass reservedWord();
+ EHlslTokenClass identifierOrReserved(bool reserved);
+ EHlslTokenClass nonreservedKeyword(int version);
+
+ TParseContextBase& parseContext;
+ TPpContext& ppContext;
+ TSourceLoc loc;
+ TPpToken* ppToken;
+ HlslToken* parserToken;
+
+ const char* tokenText;
+ EHlslTokenClass keyword;
+};
+
+} // end namespace glslang
+
+#endif // HLSLSCANCONTEXT_H_
diff --git a/chromium/third_party/glslang/src/hlsl/hlslTokenStream.cpp b/chromium/third_party/glslang/src/hlsl/hlslTokenStream.cpp
new file mode 100755
index 00000000000..47f779a81f3
--- /dev/null
+++ b/chromium/third_party/glslang/src/hlsl/hlslTokenStream.cpp
@@ -0,0 +1,106 @@
+//
+//Copyright (C) 2016 Google, 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:
+//
+// Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 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.
+//
+// Neither the name of Google, Inc., nor the names of its
+// contributors may be used to endorse or promote products derived
+// from this software without specific prior written permission.
+//
+//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+//"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 THE
+//COPYRIGHT HOLDERS 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.
+//
+
+#include "hlslTokenStream.h"
+
+namespace glslang {
+
+void HlslTokenStream::pushPreToken(const HlslToken& tok)
+{
+ assert(preTokenStackSize == 0);
+ preTokenStack = tok;
+ ++preTokenStackSize;
+}
+
+HlslToken HlslTokenStream::popPreToken()
+{
+ assert(preTokenStackSize == 1);
+ --preTokenStackSize;
+
+ return preTokenStack;
+}
+
+void HlslTokenStream::pushTokenBuffer(const HlslToken& tok)
+{
+ tokenBuffer = tok;
+}
+
+HlslToken HlslTokenStream::popTokenBuffer()
+{
+ return tokenBuffer;
+}
+
+// Load 'token' with the next token in the stream of tokens.
+void HlslTokenStream::advanceToken()
+{
+ pushTokenBuffer(token);
+ if (preTokenStackSize > 0)
+ token = popPreToken();
+ else
+ scanner.tokenize(token);
+}
+
+void HlslTokenStream::recedeToken()
+{
+ pushPreToken(token);
+ token = popTokenBuffer();
+}
+
+// Return the current token class.
+EHlslTokenClass HlslTokenStream::peek() const
+{
+ return token.tokenClass;
+}
+
+// Return true, without advancing to the next token, if the current token is
+// the expected (passed in) token class.
+bool HlslTokenStream::peekTokenClass(EHlslTokenClass tokenClass) const
+{
+ return peek() == tokenClass;
+}
+
+// Return true and advance to the next token if the current token is the
+// expected (passed in) token class.
+bool HlslTokenStream::acceptTokenClass(EHlslTokenClass tokenClass)
+{
+ if (peekTokenClass(tokenClass)) {
+ advanceToken();
+ return true;
+ }
+
+ return false;
+}
+
+} // end namespace glslang
diff --git a/chromium/third_party/glslang/src/hlsl/hlslTokenStream.h b/chromium/third_party/glslang/src/hlsl/hlslTokenStream.h
new file mode 100755
index 00000000000..83365c4cb95
--- /dev/null
+++ b/chromium/third_party/glslang/src/hlsl/hlslTokenStream.h
@@ -0,0 +1,82 @@
+//
+//Copyright (C) 2016 Google, 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:
+//
+// Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 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.
+//
+// Neither the name of Google, Inc., nor the names of its
+// contributors may be used to endorse or promote products derived
+// from this software without specific prior written permission.
+//
+//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+//"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 THE
+//COPYRIGHT HOLDERS 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.
+//
+
+#ifndef HLSLTOKENSTREAM_H_
+#define HLSLTOKENSTREAM_H_
+
+#include "hlslScanContext.h"
+
+namespace glslang {
+
+ class HlslTokenStream {
+ public:
+ explicit HlslTokenStream(HlslScanContext& scanner)
+ : scanner(scanner), preTokenStackSize(0) { }
+ virtual ~HlslTokenStream() { }
+
+ public:
+ void advanceToken();
+ void recedeToken();
+ bool acceptTokenClass(EHlslTokenClass);
+ EHlslTokenClass peek() const;
+ bool peekTokenClass(EHlslTokenClass) const;
+
+ protected:
+ HlslToken token; // the token we are currently looking at, but have not yet accepted
+
+ private:
+ HlslScanContext& scanner; // lexical scanner, to get next token
+
+ // Previously scanned tokens, returned for future advances,
+ // so logically in front of the token stream.
+ // Is logically a stack; needs last in last out semantics.
+ // Currently implemented as a stack of size 1.
+ HlslToken preTokenStack;
+ int preTokenStackSize;
+ void pushPreToken(const HlslToken&);
+ HlslToken popPreToken();
+
+ // Previously scanned tokens, not yet return for future advances,
+ // but available for that.
+ // Is logically a fifo for normal advances, and a stack for recession.
+ // Currently implemented with an intrinsic size of 1.
+ HlslToken tokenBuffer;
+ void pushTokenBuffer(const HlslToken&);
+ HlslToken popTokenBuffer();
+ };
+
+} // end namespace glslang
+
+#endif // HLSLTOKENSTREAM_H_
diff --git a/chromium/third_party/glslang/src/hlsl/hlslTokens.h b/chromium/third_party/glslang/src/hlsl/hlslTokens.h
new file mode 100755
index 00000000000..b3c1227d5b7
--- /dev/null
+++ b/chromium/third_party/glslang/src/hlsl/hlslTokens.h
@@ -0,0 +1,281 @@
+//
+//Copyright (C) 2016 Google, 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:
+//
+// Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 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.
+//
+// Neither the name of Google, Inc., nor the names of its
+// contributors may be used to endorse or promote products derived
+// from this software without specific prior written permission.
+//
+//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+//"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 THE
+//COPYRIGHT HOLDERS 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.
+//
+
+#ifndef EHLSLTOKENS_H_
+#define EHLSLTOKENS_H_
+
+namespace glslang {
+
+enum EHlslTokenClass {
+ EHTokNone = 0,
+
+ // qualifiers
+ EHTokStatic,
+ EHTokConst,
+ EHTokSNorm,
+ EHTokUnorm,
+ EHTokExtern,
+ EHTokUniform,
+ EHTokVolatile,
+ EHTokPrecise,
+ EHTokShared,
+ EHTokGroupShared,
+ EHTokLinear,
+ EHTokCentroid,
+ EHTokNointerpolation,
+ EHTokNoperspective,
+ EHTokSample,
+ EHTokRowMajor,
+ EHTokColumnMajor,
+ EHTokPackOffset,
+
+ // template types
+ EHTokBuffer,
+ EHTokVector,
+ EHTokMatrix,
+
+ // scalar types
+ EHTokVoid,
+ EHTokBool,
+ EHTokInt,
+ EHTokUint,
+ EHTokDword,
+ EHTokHalf,
+ EHTokFloat,
+ EHTokDouble,
+ EHTokMin16float,
+ EHTokMin10float,
+ EHTokMin16int,
+ EHTokMin12int,
+ EHTokMin16uint,
+
+ // vector types
+ EHTokBool1,
+ EHTokBool2,
+ EHTokBool3,
+ EHTokBool4,
+ EHTokFloat1,
+ EHTokFloat2,
+ EHTokFloat3,
+ EHTokFloat4,
+ EHTokInt1,
+ EHTokInt2,
+ EHTokInt3,
+ EHTokInt4,
+ EHTokDouble1,
+ EHTokDouble2,
+ EHTokDouble3,
+ EHTokDouble4,
+ EHTokUint1,
+ EHTokUint2,
+ EHTokUint3,
+ EHTokUint4,
+
+ // matrix types
+ EHTokInt1x1,
+ EHTokInt1x2,
+ EHTokInt1x3,
+ EHTokInt1x4,
+ EHTokInt2x1,
+ EHTokInt2x2,
+ EHTokInt2x3,
+ EHTokInt2x4,
+ EHTokInt3x1,
+ EHTokInt3x2,
+ EHTokInt3x3,
+ EHTokInt3x4,
+ EHTokInt4x1,
+ EHTokInt4x2,
+ EHTokInt4x3,
+ EHTokInt4x4,
+ EHTokUint1x1,
+ EHTokUint1x2,
+ EHTokUint1x3,
+ EHTokUint1x4,
+ EHTokUint2x1,
+ EHTokUint2x2,
+ EHTokUint2x3,
+ EHTokUint2x4,
+ EHTokUint3x1,
+ EHTokUint3x2,
+ EHTokUint3x3,
+ EHTokUint3x4,
+ EHTokUint4x1,
+ EHTokUint4x2,
+ EHTokUint4x3,
+ EHTokUint4x4,
+ EHTokBool1x1,
+ EHTokBool1x2,
+ EHTokBool1x3,
+ EHTokBool1x4,
+ EHTokBool2x1,
+ EHTokBool2x2,
+ EHTokBool2x3,
+ EHTokBool2x4,
+ EHTokBool3x1,
+ EHTokBool3x2,
+ EHTokBool3x3,
+ EHTokBool3x4,
+ EHTokBool4x1,
+ EHTokBool4x2,
+ EHTokBool4x3,
+ EHTokBool4x4,
+ EHTokFloat1x1,
+ EHTokFloat1x2,
+ EHTokFloat1x3,
+ EHTokFloat1x4,
+ EHTokFloat2x1,
+ EHTokFloat2x2,
+ EHTokFloat2x3,
+ EHTokFloat2x4,
+ EHTokFloat3x1,
+ EHTokFloat3x2,
+ EHTokFloat3x3,
+ EHTokFloat3x4,
+ EHTokFloat4x1,
+ EHTokFloat4x2,
+ EHTokFloat4x3,
+ EHTokFloat4x4,
+ EHTokDouble1x1,
+ EHTokDouble1x2,
+ EHTokDouble1x3,
+ EHTokDouble1x4,
+ EHTokDouble2x1,
+ EHTokDouble2x2,
+ EHTokDouble2x3,
+ EHTokDouble2x4,
+ EHTokDouble3x1,
+ EHTokDouble3x2,
+ EHTokDouble3x3,
+ EHTokDouble3x4,
+ EHTokDouble4x1,
+ EHTokDouble4x2,
+ EHTokDouble4x3,
+ EHTokDouble4x4,
+
+ // texturing types
+ EHTokSampler,
+ EHTokSampler1d,
+ EHTokSampler2d,
+ EHTokSampler3d,
+ EHTokSamplerCube,
+ EHTokSamplerState,
+ EHTokSamplerComparisonState,
+ EHTokTexture,
+ EHTokTexture1d,
+ EHTokTexture1darray,
+ EHTokTexture2d,
+ EHTokTexture2darray,
+ EHTokTexture3d,
+ EHTokTextureCube,
+
+ // variable, user type, ...
+ EHTokIdentifier,
+ EHTokTypeName,
+ EHTokStruct,
+ EHTokTypedef,
+
+ // constant
+ EHTokFloatConstant,
+ EHTokDoubleConstant,
+ EHTokIntConstant,
+ EHTokUintConstant,
+ EHTokBoolConstant,
+
+ // control flow
+ EHTokFor,
+ EHTokDo,
+ EHTokWhile,
+ EHTokBreak,
+ EHTokContinue,
+ EHTokIf,
+ EHTokElse,
+ EHTokDiscard,
+ EHTokReturn,
+ EHTokSwitch,
+ EHTokCase,
+ EHTokDefault,
+
+ // expressions
+ EHTokLeftOp,
+ EHTokRightOp,
+ EHTokIncOp,
+ EHTokDecOp,
+ EHTokLeOp,
+ EHTokGeOp,
+ EHTokEqOp,
+ EHTokNeOp,
+ EHTokAndOp,
+ EHTokOrOp,
+ EHTokXorOp,
+ EHTokAssign,
+ EHTokMulAssign,
+ EHTokDivAssign,
+ EHTokAddAssign,
+ EHTokModAssign,
+ EHTokLeftAssign,
+ EHTokRightAssign,
+ EHTokAndAssign,
+ EHTokXorAssign,
+ EHTokOrAssign,
+ EHTokSubAssign,
+ EHTokLeftParen,
+ EHTokRightParen,
+ EHTokLeftBracket,
+ EHTokRightBracket,
+ EHTokLeftBrace,
+ EHTokRightBrace,
+ EHTokDot,
+ EHTokComma,
+ EHTokColon,
+ EHTokSemicolon,
+ EHTokBang,
+ EHTokDash,
+ EHTokTilde,
+ EHTokPlus,
+ EHTokStar,
+ EHTokSlash,
+ EHTokPercent,
+ EHTokLeftAngle,
+ EHTokRightAngle,
+ EHTokVerticalBar,
+ EHTokCaret,
+ EHTokAmpersand,
+ EHTokQuestion,
+};
+
+} // end namespace glslang
+
+#endif // EHLSLTOKENS_H_ \ No newline at end of file
diff --git a/chromium/third_party/glslang/src/make-revision b/chromium/third_party/glslang/src/make-revision
new file mode 100755
index 00000000000..492e437562a
--- /dev/null
+++ b/chromium/third_party/glslang/src/make-revision
@@ -0,0 +1,10 @@
+#!/bin/sh
+(
+echo "// This header is generated by the make-revision script."
+echo "// For the version, it uses the latest git tag followed by the number of commits."
+echo "// For the date, it uses the current date (when then script is run)."
+
+echo
+echo \#define GLSLANG_REVISION \"`git describe --tags --abbrev=0`.`git log --oneline | wc -l`\"
+echo \#define GLSLANG_DATE \"`date +%d-%b-%Y`\"
+) > glslang/Include/revision.h
diff --git a/chromium/third_party/icu/README.chromium b/chromium/third_party/icu/README.chromium
index 0e5e561eb7e..4d1713b0a66 100644
--- a/chromium/third_party/icu/README.chromium
+++ b/chromium/third_party/icu/README.chromium
@@ -304,3 +304,12 @@ D. Local Modifications
- patches/arm_align.patch
- upstream bug:
https://unicode-org.atlassian.net/browse/ICU-20001
+
+17. Windows 7 timezone detection fix
+
+ - patches/win7_tz.patch
+ - upstream bug:
+ https://unicode-org.atlassian.net/browse/ICU-20302
+ - Fix:
+ https://github.com/unicode-org/icu/pull/315
+ https://github.com/unicode-org/icu/pull/318
diff --git a/chromium/third_party/icu/patches/win7_tz.patch b/chromium/third_party/icu/patches/win7_tz.patch
new file mode 100644
index 00000000000..97fae84078a
--- /dev/null
+++ b/chromium/third_party/icu/patches/win7_tz.patch
@@ -0,0 +1,44 @@
+diff --git a/source/common/wintz.cpp b/source/common/wintz.cpp
+index 5e9ac0d2..8a143d9e 100644
+--- a/source/common/wintz.cpp
++++ b/source/common/wintz.cpp
+@@ -35,7 +35,7 @@
+
+ U_NAMESPACE_BEGIN
+
+-// The value of MAX_TIMEZONE_ID_LENGTH is 128, which is defined in DYNAMIC_TIME_ZONE_INFORMATION
++// The max size of TimeZoneKeyName is 128, defined in DYNAMIC_TIME_ZONE_INFORMATION
+ #define MAX_TIMEZONE_ID_LENGTH 128
+
+ /**
+@@ -44,7 +44,7 @@ U_NAMESPACE_BEGIN
+ * Note: We use the Win32 API GetDynamicTimeZoneInformation to get the current time zone info.
+ * This API returns a non-localized time zone name, which we can then map to an ICU time zone name.
+ */
+-U_CFUNC const char* U_EXPORT2
++U_INTERNAL const char* U_EXPORT2
+ uprv_detectWindowsTimeZone()
+ {
+ UErrorCode status = U_ZERO_ERROR;
+@@ -79,7 +79,7 @@ uprv_detectWindowsTimeZone()
+
+ // convert from wchar_t* (UTF-16 on Windows) to char* (UTF-8).
+ u_strToUTF8(dynamicTZKeyName, UPRV_LENGTHOF(dynamicTZKeyName), nullptr,
+- reinterpret_cast<const UChar*>(dynamicTZI.TimeZoneKeyName), UPRV_LENGTHOF(dynamicTZI.TimeZoneKeyName), &status);
++ reinterpret_cast<const UChar*>(dynamicTZI.TimeZoneKeyName), -1, &status);
+
+ if (U_FAILURE(status)) {
+ return nullptr;
+diff --git a/source/common/wintz.h b/source/common/wintz.h
+index f98b1779..cd8565ee 100644
+--- a/source/common/wintz.h
++++ b/source/common/wintz.h
+@@ -28,7 +28,7 @@ U_CDECL_BEGIN
+ typedef struct _TIME_ZONE_INFORMATION TIME_ZONE_INFORMATION;
+ U_CDECL_END
+
+-U_CFUNC const char* U_EXPORT2
++U_INTERNAL const char* U_EXPORT2
+ uprv_detectWindowsTimeZone();
+
+ #endif /* U_PLATFORM_USES_ONLY_WIN32_API */
diff --git a/chromium/third_party/icu/source/common/wintz.cpp b/chromium/third_party/icu/source/common/wintz.cpp
index 9cf79d7b4ac..de7991bb44d 100644
--- a/chromium/third_party/icu/source/common/wintz.cpp
+++ b/chromium/third_party/icu/source/common/wintz.cpp
@@ -35,7 +35,7 @@
U_NAMESPACE_BEGIN
-// The value of MAX_TIMEZONE_ID_LENGTH is 128, which is defined in DYNAMIC_TIME_ZONE_INFORMATION
+// The max size of TimeZoneKeyName is 128, defined in DYNAMIC_TIME_ZONE_INFORMATION
#define MAX_TIMEZONE_ID_LENGTH 128
/**
@@ -44,7 +44,7 @@ U_NAMESPACE_BEGIN
* Note: We use the Win32 API GetDynamicTimeZoneInformation to get the current time zone info.
* This API returns a non-localized time zone name, which we can then map to an ICU time zone name.
*/
-U_CFUNC const char* U_EXPORT2
+U_INTERNAL const char* U_EXPORT2
uprv_detectWindowsTimeZone()
{
UErrorCode status = U_ZERO_ERROR;
@@ -79,7 +79,7 @@ uprv_detectWindowsTimeZone()
// convert from wchar_t* (UTF-16 on Windows) to char* (UTF-8).
u_strToUTF8(dynamicTZKeyName, UPRV_LENGTHOF(dynamicTZKeyName), nullptr,
- reinterpret_cast<const UChar*>(dynamicTZI.TimeZoneKeyName), UPRV_LENGTHOF(dynamicTZI.TimeZoneKeyName), &status);
+ reinterpret_cast<const UChar*>(dynamicTZI.TimeZoneKeyName), -1, &status);
if (U_FAILURE(status)) {
return nullptr;
diff --git a/chromium/third_party/icu/source/common/wintz.h b/chromium/third_party/icu/source/common/wintz.h
index 19b7cfe921f..a29e6e2cbc1 100644
--- a/chromium/third_party/icu/source/common/wintz.h
+++ b/chromium/third_party/icu/source/common/wintz.h
@@ -28,7 +28,7 @@ U_CDECL_BEGIN
typedef struct _TIME_ZONE_INFORMATION TIME_ZONE_INFORMATION;
U_CDECL_END
-U_CFUNC const char* U_EXPORT2
+U_INTERNAL const char* U_EXPORT2
uprv_detectWindowsTimeZone();
#endif /* U_PLATFORM_HAS_WIN32_API */
diff --git a/chromium/third_party/pdfium/fxjs/cjs_document.cpp b/chromium/third_party/pdfium/fxjs/cjs_document.cpp
index 6e2f2da6c60..ff9cfc394d6 100644
--- a/chromium/third_party/pdfium/fxjs/cjs_document.cpp
+++ b/chromium/third_party/pdfium/fxjs/cjs_document.cpp
@@ -744,8 +744,9 @@ CJS_Result CJS_Document::get_info(CJS_Runtime* pRuntime) {
pRuntime->PutObjectProperty(pObj, L"Trapped",
pRuntime->NewString(cwTrapped.AsStringView()));
- // It's to be compatible to non-standard info dictionary.
- for (const auto& it : *pDictionary) {
+ // PutObjectProperty() calls below may re-enter JS and change info dict.
+ auto pCopy = pDictionary->Clone();
+ for (const auto& it : *ToDictionary(pCopy.get())) {
const ByteString& bsKey = it.first;
CPDF_Object* pValueObj = it.second.get();
WideString wsKey = WideString::FromUTF8(bsKey.AsStringView());
diff --git a/chromium/third_party/skia/infra/bots/android_bin.isolate b/chromium/third_party/skia/infra/bots/android_bin.isolate
deleted file mode 100644
index 64915716d3a..00000000000
--- a/chromium/third_party/skia/infra/bots/android_bin.isolate
+++ /dev/null
@@ -1,11 +0,0 @@
-{
- 'conditions': [
- ['OS=="Android"', {
- 'variables': {
- 'files': [
- '../../platform_tools/android/bin/',
- ],
- },
- }],
- ],
-}
diff --git a/chromium/third_party/skia/infra/bots/assets.isolate b/chromium/third_party/skia/infra/bots/assets.isolate
deleted file mode 100644
index 1d9ef7a7fc1..00000000000
--- a/chromium/third_party/skia/infra/bots/assets.isolate
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- 'variables': {
- 'files': [
- 'assets/',
- ],
- },
-}
diff --git a/chromium/third_party/skia/infra/bots/calmbench.isolate b/chromium/third_party/skia/infra/bots/calmbench.isolate
deleted file mode 100644
index f46b70cf14b..00000000000
--- a/chromium/third_party/skia/infra/bots/calmbench.isolate
+++ /dev/null
@@ -1,10 +0,0 @@
-{
- 'includes': [
- 'perf_skia_bundled.isolate',
- ],
- 'variables': {
- 'files': [
- '../../tools/calmbench/',
- ],
- },
-}
diff --git a/chromium/third_party/skia/infra/bots/empty.isolate b/chromium/third_party/skia/infra/bots/empty.isolate
deleted file mode 100644
index 0967ef424bc..00000000000
--- a/chromium/third_party/skia/infra/bots/empty.isolate
+++ /dev/null
@@ -1 +0,0 @@
-{}
diff --git a/chromium/third_party/skia/infra/bots/infrabots.isolate b/chromium/third_party/skia/infra/bots/infrabots.isolate
deleted file mode 100644
index bfe028a53de..00000000000
--- a/chromium/third_party/skia/infra/bots/infrabots.isolate
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- 'variables': {
- 'files': [
- './',
- ],
- },
-}
diff --git a/chromium/third_party/skia/infra/bots/ios_bin.isolate b/chromium/third_party/skia/infra/bots/ios_bin.isolate
deleted file mode 100644
index b51e513ecd3..00000000000
--- a/chromium/third_party/skia/infra/bots/ios_bin.isolate
+++ /dev/null
@@ -1,25 +0,0 @@
-{
- 'conditions': [
- ['OS=="iOS-9.3.1"', {
- 'variables': {
- 'files': [
- '../../platform_tools/ios/bin/',
- ],
- },
- }],
- ['OS=="iOS-10.3.1"', {
- 'variables': {
- 'files': [
- '../../platform_tools/ios/bin/',
- ],
- },
- }],
- ['OS=="iOS-11.4.1"', {
- 'variables': {
- 'files': [
- '../../platform_tools/ios/bin/',
- ],
- },
- }],
- ],
-}
diff --git a/chromium/third_party/skia/infra/bots/isolate_android_sdk_linux.isolate b/chromium/third_party/skia/infra/bots/isolate_android_sdk_linux.isolate
deleted file mode 100644
index 3de92cf02d1..00000000000
--- a/chromium/third_party/skia/infra/bots/isolate_android_sdk_linux.isolate
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- 'variables': {
- 'command': [
- '/bin/cp', '-rL', 'android_sdk_linux', '${ISOLATED_OUTDIR}',
- ],
- },
-}
diff --git a/chromium/third_party/skia/infra/bots/isolate_gcloud_linux.isolate b/chromium/third_party/skia/infra/bots/isolate_gcloud_linux.isolate
deleted file mode 100644
index 028052e1ba6..00000000000
--- a/chromium/third_party/skia/infra/bots/isolate_gcloud_linux.isolate
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- 'variables': {
- 'command': [
- '/bin/cp', '-rL', 'gcloud_linux', '${ISOLATED_OUTDIR}',
- ],
- },
-}
diff --git a/chromium/third_party/skia/infra/bots/isolate_go.isolate b/chromium/third_party/skia/infra/bots/isolate_go.isolate
deleted file mode 100644
index 649a000d93c..00000000000
--- a/chromium/third_party/skia/infra/bots/isolate_go.isolate
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- 'variables': {
- 'command': [
- '/bin/cp', '-rL', 'go', '${ISOLATED_OUTDIR}',
- ],
- },
-}
diff --git a/chromium/third_party/skia/infra/bots/perf_skia_bundled.isolate b/chromium/third_party/skia/infra/bots/perf_skia_bundled.isolate
deleted file mode 100644
index 85040833771..00000000000
--- a/chromium/third_party/skia/infra/bots/perf_skia_bundled.isolate
+++ /dev/null
@@ -1,14 +0,0 @@
-{
- 'includes': [
- 'android_bin.isolate',
- 'assets.isolate',
- 'ios_bin.isolate',
- 'resources.isolate',
- 'swarm_recipe.isolate',
- ],
- 'variables': {
- 'files': [
- '../../tools/valgrind.supp',
- ],
- },
-}
diff --git a/chromium/third_party/skia/infra/bots/resources.isolate b/chromium/third_party/skia/infra/bots/resources.isolate
deleted file mode 100644
index be735523cc3..00000000000
--- a/chromium/third_party/skia/infra/bots/resources.isolate
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- 'variables': {
- 'files': [
- '../../resources/',
- ],
- },
-}
diff --git a/chromium/third_party/skia/infra/bots/skpbench_skia_bundled.isolate b/chromium/third_party/skia/infra/bots/skpbench_skia_bundled.isolate
deleted file mode 100644
index b6ff22c6e7e..00000000000
--- a/chromium/third_party/skia/infra/bots/skpbench_skia_bundled.isolate
+++ /dev/null
@@ -1,12 +0,0 @@
-{
- 'includes': [
- 'assets.isolate',
- 'swarm_recipe.isolate',
- ],
- 'variables': {
- 'files': [
- '../../tools/valgrind.supp',
- '../../tools/skpbench/',
- ],
- },
-}
diff --git a/chromium/third_party/skia/infra/bots/swarm_recipe.isolate b/chromium/third_party/skia/infra/bots/swarm_recipe.isolate
deleted file mode 100644
index c4841dfb492..00000000000
--- a/chromium/third_party/skia/infra/bots/swarm_recipe.isolate
+++ /dev/null
@@ -1,11 +0,0 @@
-{
- 'includes': [
- 'infrabots.isolate',
- ],
- 'variables': {
- 'files': [
- '../../../.gclient',
- '../config/recipes.cfg',
- ],
- },
-}
diff --git a/chromium/third_party/skia/infra/bots/test_skia_bundled.isolate b/chromium/third_party/skia/infra/bots/test_skia_bundled.isolate
deleted file mode 100644
index 85040833771..00000000000
--- a/chromium/third_party/skia/infra/bots/test_skia_bundled.isolate
+++ /dev/null
@@ -1,14 +0,0 @@
-{
- 'includes': [
- 'android_bin.isolate',
- 'assets.isolate',
- 'ios_bin.isolate',
- 'resources.isolate',
- 'swarm_recipe.isolate',
- ],
- 'variables': {
- 'files': [
- '../../tools/valgrind.supp',
- ],
- },
-}
diff --git a/chromium/tools/swarming_client/example/payload/hello_world.isolate b/chromium/tools/swarming_client/example/payload/hello_world.isolate
deleted file mode 100644
index 4157aaa2e60..00000000000
--- a/chromium/tools/swarming_client/example/payload/hello_world.isolate
+++ /dev/null
@@ -1,10 +0,0 @@
-# Copyright 2012 The LUCI Authors. All rights reserved.
-# Use of this source code is governed under the Apache License, Version 2.0
-# that can be found in the LICENSE file.
-{
- 'variables': {
- 'files': [
- 'hello_world.py'
- ],
- },
-}
diff --git a/chromium/tools/swarming_client/tools/spam.isolate b/chromium/tools/swarming_client/tools/spam.isolate
deleted file mode 100644
index 014eb075ca6..00000000000
--- a/chromium/tools/swarming_client/tools/spam.isolate
+++ /dev/null
@@ -1,14 +0,0 @@
-# Copyright 2014 The LUCI Authors. All rights reserved.
-# Use of this source code is governed under the Apache License, Version 2.0
-# that can be found in the LICENSE file.
-{
- 'variables': {
- 'command': [
- 'python',
- 'spam.py',
- ],
- 'files': [
- 'spam.py',
- ],
- },
-}
diff --git a/chromium/ui/webui/resources/js/i18n_behavior.js b/chromium/ui/webui/resources/js/i18n_behavior.js
index 646d6c513b2..2f8a129be33 100644
--- a/chromium/ui/webui/resources/js/i18n_behavior.js
+++ b/chromium/ui/webui/resources/js/i18n_behavior.js
@@ -114,8 +114,11 @@ var I18nBehavior = {
/**
* Call this when UI strings may have changed. This will send an update to
* any data bindings to i18nDynamic(locale, ...).
+ * @suppress {checkTypes}
*/
i18nUpdateLocale: function() {
+ // Force reload.
+ this.locale = undefined;
this.locale = loadTimeData.getString('language');
},
};
diff --git a/chromium/v8/include/v8-version.h b/chromium/v8/include/v8-version.h
index 3e6ddeb8c08..114e57c58ea 100644
--- a/chromium/v8/include/v8-version.h
+++ b/chromium/v8/include/v8-version.h
@@ -11,7 +11,7 @@
#define V8_MAJOR_VERSION 7
#define V8_MINOR_VERSION 1
#define V8_BUILD_NUMBER 302
-#define V8_PATCH_LEVEL 30
+#define V8_PATCH_LEVEL 33
// Use 1 for candidates and 0 otherwise.
// (Boolean macro values are not supported by all preprocessors.)
diff --git a/chromium/v8/src/builtins/array-splice.tq b/chromium/v8/src/builtins/array-splice.tq
index 16a192d2c00..5746f4cdf67 100644
--- a/chromium/v8/src/builtins/array-splice.tq
+++ b/chromium/v8/src/builtins/array-splice.tq
@@ -9,8 +9,12 @@ module array {
// zero-length input FixedArray is handled here.
macro Extract<FixedArrayType: type>(
elements: FixedArrayBase, first: Smi, count: Smi,
- capacity: Smi): FixedArrayType {
- return UnsafeCast<FixedArrayType>(
+ capacity: Smi): FixedArrayType;
+
+ Extract<FixedArray>(
+ elements: FixedArrayBase, first: Smi, count: Smi,
+ capacity: Smi): FixedArray {
+ return UnsafeCast<FixedArray>(
ExtractFixedArray(elements, first, count, capacity));
}
@@ -24,31 +28,73 @@ module array {
ExtractFixedArray(elements, first, count, capacity));
}
+ macro DoMoveElements<FixedArrayType: type>(
+ elements: FixedArrayType, dstIndex: Smi, srcIndex: Smi,
+ count: Smi): void {
+ TorqueMoveElements(
+ elements, Convert<intptr>(dstIndex), Convert<intptr>(srcIndex),
+ Convert<intptr>(count));
+ }
+
+ macro StoreHoles<FixedArrayType: type>(
+ elements: FixedArrayType, holeStartIndex: Smi, holeEndIndex: Smi): void {
+ for (let i: Smi = holeStartIndex; i < holeEndIndex; i++) {
+ StoreArrayHole(elements, i);
+ }
+ }
+
+ macro DoCopyElements<FixedArrayType: type>(
+ dstElements: FixedArrayType, dstIndex: Smi, srcElements: FixedArrayType,
+ srcIndex: Smi, count: Smi): void {
+ TorqueCopyElements(
+ dstElements, Convert<intptr>(dstIndex), srcElements,
+ Convert<intptr>(srcIndex), Convert<intptr>(count));
+ }
+
macro FastSplice<FixedArrayType: type, ElementType: type>(
args: constexpr Arguments, a: JSArray, length: Smi, newLength: Smi,
lengthDelta: Smi, actualStart: Smi, insertCount: Smi,
actualDeleteCount: Smi): void
labels Bailout {
- const elements: FixedArrayBase = a.elements;
- const elementsMap: Map = elements.map;
-
- // If the spliced array is larger then the
- // source array, then allocate a new FixedArrayType to hold the result.
- let newElements: FixedArrayBase = elements;
- if (elementsMap == kCOWMap || lengthDelta > 0) {
- newElements =
- Extract<FixedArrayType>(elements, 0, actualStart, newLength);
- if (elementsMap == kCOWMap) {
- newElements.map = elementsMap;
+ // Make sure elements are writable.
+ EnsureWriteableFastElements(a);
+
+ if (insertCount != actualDeleteCount) {
+ const elements: FixedArrayBase = a.elements;
+ const dstIndex: Smi = actualStart + insertCount;
+ const srcIndex: Smi = actualStart + actualDeleteCount;
+ const count: Smi = length - actualDeleteCount - actualStart;
+ if (insertCount < actualDeleteCount) {
+ // Shrink.
+ DoMoveElements<FixedArrayType>(
+ UnsafeCast<FixedArrayType>(elements), dstIndex, srcIndex, count);
+ StoreHoles<FixedArrayType>(
+ UnsafeCast<FixedArrayType>(elements), newLength, length);
+ } else if (insertCount > actualDeleteCount) {
+ // If the backing store is big enough, then moving elements is enough.
+ if (newLength <= elements.length) {
+ DoMoveElements<FixedArrayType>(
+ UnsafeCast<FixedArrayType>(elements), dstIndex, srcIndex, count);
+ } else {
+ // Grow.
+ let capacity: Smi = CalculateNewElementsCapacity(newLength);
+ const newElements: FixedArrayType =
+ Extract<FixedArrayType>(elements, 0, actualStart, capacity);
+ a.elements = newElements;
+ if (elements.length > 0) {
+ DoCopyElements<FixedArrayType>(
+ newElements, dstIndex, UnsafeCast<FixedArrayType>(elements),
+ srcIndex, count);
+ }
+ }
}
- a.elements = newElements;
}
- // Copy over inserted elements.
+ // Copy arguments.
let k: Smi = actualStart;
if (insertCount > 0) {
const typedNewElements: FixedArrayType =
- UnsafeCast<FixedArrayType>(newElements);
+ UnsafeCast<FixedArrayType>(a.elements);
for (let e: Object of args [2: ]) {
// The argument elements were already validated to be an appropriate
// {ElementType} to store in {FixedArrayType}.
@@ -56,31 +102,6 @@ module array {
}
}
- // Copy over elements after deleted elements.
- let count: Smi = length - actualStart - actualDeleteCount;
- while (count > 0) {
- const typedElements: FixedArrayType =
- UnsafeCast<FixedArrayType>(elements);
- const typedNewElements: FixedArrayType =
- UnsafeCast<FixedArrayType>(newElements);
- CopyArrayElement(typedElements, typedNewElements, k - lengthDelta, k);
- k++;
- count--;
- }
-
- // Fill rest of spliced FixedArray with the hole, but only if the
- // destination FixedArray is the original array's, since otherwise the array
- // is pre-filled with holes.
- if (elements == newElements) {
- const typedNewElements: FixedArrayType =
- UnsafeCast<FixedArrayType>(newElements);
- const limit: Smi = elements.length;
- while (k < limit) {
- StoreArrayHole(typedNewElements, k);
- k++;
- }
- }
-
// Update the array's length after all the FixedArray shuffling is done.
a.length = newLength;
}
diff --git a/chromium/v8/src/builtins/base.tq b/chromium/v8/src/builtins/base.tq
index 20c4f4b9e03..3f5029834db 100644
--- a/chromium/v8/src/builtins/base.tq
+++ b/chromium/v8/src/builtins/base.tq
@@ -844,6 +844,8 @@ macro AllowNonNumberElements(kind: ElementsKind): ElementsKind {
extern macro AllocateZeroedFixedArray(intptr): FixedArray;
extern macro AllocateZeroedFixedDoubleArray(intptr): FixedDoubleArray;
+extern macro CalculateNewElementsCapacity(Smi): Smi;
+
extern macro CopyFixedArrayElements(
constexpr ElementsKind, FixedArray, constexpr ElementsKind, FixedArray,
intptr, intptr, intptr): void;
@@ -879,6 +881,36 @@ extern macro ExtractFixedArray(
extern builtin ExtractFastJSArray(Context, JSArray, Smi, Smi): JSArray;
+extern macro MoveElements(
+ constexpr ElementsKind, FixedArrayBase, intptr, intptr, intptr): void;
+macro TorqueMoveElements(
+ elements: FixedArray, dstIndex: intptr, srcIndex: intptr,
+ count: intptr): void {
+ MoveElements(HOLEY_ELEMENTS, elements, dstIndex, srcIndex, count);
+}
+macro TorqueMoveElements(
+ elements: FixedDoubleArray, dstIndex: intptr, srcIndex: intptr,
+ count: intptr): void {
+ MoveElements(HOLEY_DOUBLE_ELEMENTS, elements, dstIndex, srcIndex, count);
+}
+
+extern macro CopyElements(
+ constexpr ElementsKind, FixedArrayBase, intptr, FixedArrayBase, intptr,
+ intptr): void;
+macro TorqueCopyElements(
+ dstElements: FixedArray, dstIndex: intptr, srcElements: FixedArray,
+ srcIndex: intptr, count: intptr): void {
+ CopyElements(
+ HOLEY_ELEMENTS, dstElements, dstIndex, srcElements, srcIndex, count);
+}
+macro TorqueCopyElements(
+ dstElements: FixedDoubleArray, dstIndex: intptr,
+ srcElements: FixedDoubleArray, srcIndex: intptr, count: intptr): void {
+ CopyElements(
+ HOLEY_DOUBLE_ELEMENTS, dstElements, dstIndex, srcElements, srcIndex,
+ count);
+}
+
macro LoadElementNoHole<T: type>(a: JSArray, index: Smi): Object
labels IfHole;
diff --git a/chromium/v8/src/code-stub-assembler.cc b/chromium/v8/src/code-stub-assembler.cc
index e307ca5cc37..1474e3d97de 100644
--- a/chromium/v8/src/code-stub-assembler.cc
+++ b/chromium/v8/src/code-stub-assembler.cc
@@ -4543,6 +4543,179 @@ void CodeStubAssembler::FillFixedDoubleArrayWithZero(
backing_store, IntPtrConstant(0), byte_length);
}
+void CodeStubAssembler::JumpIfPointersFromHereAreInteresting(
+ TNode<Object> object, Label* interesting) {
+ Label finished(this);
+ TNode<IntPtrT> object_word = BitcastTaggedToWord(object);
+ TNode<IntPtrT> object_page = PageFromAddress(object_word);
+ TNode<IntPtrT> page_flags = UncheckedCast<IntPtrT>(Load(
+ MachineType::IntPtr(), object_page, IntPtrConstant(Page::kFlagsOffset)));
+ Branch(
+ WordEqual(WordAnd(page_flags,
+ IntPtrConstant(
+ MemoryChunk::kPointersFromHereAreInterestingMask)),
+ IntPtrConstant(0)),
+ &finished, interesting);
+ BIND(&finished);
+}
+
+void CodeStubAssembler::MoveElements(ElementsKind kind,
+ TNode<FixedArrayBase> elements,
+ TNode<IntPtrT> dst_index,
+ TNode<IntPtrT> src_index,
+ TNode<IntPtrT> length) {
+ Label finished(this);
+ Label needs_barrier(this);
+ const bool needs_barrier_check = IsObjectElementsKind(kind);
+
+ DCHECK(IsFastElementsKind(kind));
+ CSA_ASSERT(this, IsFixedArrayWithKind(elements, kind));
+ CSA_ASSERT(this,
+ IntPtrLessThanOrEqual(IntPtrAdd(dst_index, length),
+ LoadAndUntagFixedArrayBaseLength(elements)));
+ CSA_ASSERT(this,
+ IntPtrLessThanOrEqual(IntPtrAdd(src_index, length),
+ LoadAndUntagFixedArrayBaseLength(elements)));
+
+ // The write barrier can be ignored if {elements} is in new space, or if
+ // we have a SMI or double ElementsKind.
+ if (needs_barrier_check) {
+ JumpIfPointersFromHereAreInteresting(elements, &needs_barrier);
+ }
+
+ const TNode<IntPtrT> source_byte_length =
+ IntPtrMul(length, IntPtrConstant(ElementsKindToByteSize(kind)));
+ static const int32_t fa_base_data_offset =
+ FixedArrayBase::kHeaderSize - kHeapObjectTag;
+ TNode<IntPtrT> elements_intptr = BitcastTaggedToWord(elements);
+ TNode<IntPtrT> target_data_ptr =
+ IntPtrAdd(elements_intptr,
+ ElementOffsetFromIndex(dst_index, kind, INTPTR_PARAMETERS,
+ fa_base_data_offset));
+ TNode<IntPtrT> source_data_ptr =
+ IntPtrAdd(elements_intptr,
+ ElementOffsetFromIndex(src_index, kind, INTPTR_PARAMETERS,
+ fa_base_data_offset));
+ TNode<ExternalReference> memmove =
+ ExternalConstant(ExternalReference::libc_memmove_function());
+ CallCFunction3(MachineType::Pointer(), MachineType::Pointer(),
+ MachineType::Pointer(), MachineType::UintPtr(), memmove,
+ target_data_ptr, source_data_ptr, source_byte_length);
+
+ if (needs_barrier_check) {
+ Goto(&finished);
+
+ BIND(&needs_barrier);
+ {
+ const TNode<IntPtrT> begin = src_index;
+ const TNode<IntPtrT> end = IntPtrAdd(begin, length);
+
+ // If dst_index is less than src_index, then walk forward.
+ const TNode<IntPtrT> delta =
+ IntPtrMul(IntPtrSub(dst_index, begin),
+ IntPtrConstant(ElementsKindToByteSize(kind)));
+ auto loop_body = [&](Node* array, Node* offset) {
+ Node* const element = Load(MachineType::AnyTagged(), array, offset);
+ Node* const delta_offset = IntPtrAdd(offset, delta);
+ Store(array, delta_offset, element);
+ };
+
+ Label iterate_forward(this);
+ Label iterate_backward(this);
+ Branch(IntPtrLessThan(delta, IntPtrConstant(0)), &iterate_forward,
+ &iterate_backward);
+ BIND(&iterate_forward);
+ {
+ // Make a loop for the stores.
+ BuildFastFixedArrayForEach(elements, kind, begin, end, loop_body,
+ INTPTR_PARAMETERS,
+ ForEachDirection::kForward);
+ Goto(&finished);
+ }
+
+ BIND(&iterate_backward);
+ {
+ BuildFastFixedArrayForEach(elements, kind, begin, end, loop_body,
+ INTPTR_PARAMETERS,
+ ForEachDirection::kReverse);
+ Goto(&finished);
+ }
+ }
+ BIND(&finished);
+ }
+}
+
+void CodeStubAssembler::CopyElements(ElementsKind kind,
+ TNode<FixedArrayBase> dst_elements,
+ TNode<IntPtrT> dst_index,
+ TNode<FixedArrayBase> src_elements,
+ TNode<IntPtrT> src_index,
+ TNode<IntPtrT> length) {
+ Label finished(this);
+ Label needs_barrier(this);
+ const bool needs_barrier_check = IsObjectElementsKind(kind);
+
+ DCHECK(IsFastElementsKind(kind));
+ CSA_ASSERT(this, IsFixedArrayWithKind(dst_elements, kind));
+ CSA_ASSERT(this, IsFixedArrayWithKind(src_elements, kind));
+ CSA_ASSERT(this, IntPtrLessThanOrEqual(
+ IntPtrAdd(dst_index, length),
+ LoadAndUntagFixedArrayBaseLength(dst_elements)));
+ CSA_ASSERT(this, IntPtrLessThanOrEqual(
+ IntPtrAdd(src_index, length),
+ LoadAndUntagFixedArrayBaseLength(src_elements)));
+ CSA_ASSERT(this, WordNotEqual(dst_elements, src_elements));
+
+ // The write barrier can be ignored if {dst_elements} is in new space, or if
+ // we have a SMI or double ElementsKind.
+ if (needs_barrier_check) {
+ JumpIfPointersFromHereAreInteresting(dst_elements, &needs_barrier);
+ }
+
+ TNode<IntPtrT> source_byte_length =
+ IntPtrMul(length, IntPtrConstant(ElementsKindToByteSize(kind)));
+ static const int32_t fa_base_data_offset =
+ FixedArrayBase::kHeaderSize - kHeapObjectTag;
+ TNode<IntPtrT> src_offset_start = ElementOffsetFromIndex(
+ src_index, kind, INTPTR_PARAMETERS, fa_base_data_offset);
+ TNode<IntPtrT> dst_offset_start = ElementOffsetFromIndex(
+ dst_index, kind, INTPTR_PARAMETERS, fa_base_data_offset);
+ TNode<IntPtrT> src_elements_intptr = BitcastTaggedToWord(src_elements);
+ TNode<IntPtrT> source_data_ptr =
+ IntPtrAdd(src_elements_intptr, src_offset_start);
+ TNode<IntPtrT> dst_elements_intptr = BitcastTaggedToWord(dst_elements);
+ TNode<IntPtrT> dst_data_ptr =
+ IntPtrAdd(dst_elements_intptr, dst_offset_start);
+ TNode<ExternalReference> memcpy =
+ ExternalConstant(ExternalReference::libc_memcpy_function());
+ CallCFunction3(MachineType::Pointer(), MachineType::Pointer(),
+ MachineType::Pointer(), MachineType::UintPtr(), memcpy,
+ dst_data_ptr, source_data_ptr, source_byte_length);
+
+ if (needs_barrier_check) {
+ Goto(&finished);
+
+ BIND(&needs_barrier);
+ {
+ const TNode<IntPtrT> begin = src_index;
+ const TNode<IntPtrT> end = IntPtrAdd(begin, length);
+ const TNode<IntPtrT> delta =
+ IntPtrMul(IntPtrSub(dst_index, src_index),
+ IntPtrConstant(ElementsKindToByteSize(kind)));
+ BuildFastFixedArrayForEach(
+ src_elements, kind, begin, end,
+ [&](Node* array, Node* offset) {
+ Node* const element = Load(MachineType::AnyTagged(), array, offset);
+ Node* const delta_offset = IntPtrAdd(offset, delta);
+ Store(dst_elements, delta_offset, element);
+ },
+ INTPTR_PARAMETERS, ForEachDirection::kForward);
+ Goto(&finished);
+ }
+ BIND(&finished);
+ }
+}
+
void CodeStubAssembler::CopyFixedArrayElements(
ElementsKind from_kind, Node* from_array, ElementsKind to_kind,
Node* to_array, Node* first_element, Node* element_count, Node* capacity,
diff --git a/chromium/v8/src/code-stub-assembler.h b/chromium/v8/src/code-stub-assembler.h
index 69ac5e27bb2..8bd39369b79 100644
--- a/chromium/v8/src/code-stub-assembler.h
+++ b/chromium/v8/src/code-stub-assembler.h
@@ -1567,6 +1567,25 @@ class V8_EXPORT_PRIVATE CodeStubAssembler : public compiler::CodeAssembler {
SMI_PARAMETERS);
}
+ void JumpIfPointersFromHereAreInteresting(TNode<Object> object,
+ Label* interesting);
+
+ // Efficiently copy elements within a single array. The regions
+ // [src_index, src_index + length) and [dst_index, dst_index + length)
+ // can be overlapping.
+ void MoveElements(ElementsKind kind, TNode<FixedArrayBase> elements,
+ TNode<IntPtrT> dst_index, TNode<IntPtrT> src_index,
+ TNode<IntPtrT> length);
+
+ // Efficiently copy elements from one array to another. The ElementsKind
+ // needs to be the same. Copy from src_elements at
+ // [src_index, src_index + length) to dst_elements at
+ // [dst_index, dst_index + length).
+ void CopyElements(ElementsKind kind, TNode<FixedArrayBase> dst_elements,
+ TNode<IntPtrT> dst_index,
+ TNode<FixedArrayBase> src_elements,
+ TNode<IntPtrT> src_index, TNode<IntPtrT> length);
+
TNode<FixedArray> HeapObjectToFixedArray(TNode<HeapObject> base,
Label* cast_fail);
@@ -1740,6 +1759,10 @@ class V8_EXPORT_PRIVATE CodeStubAssembler : public compiler::CodeAssembler {
Node* CalculateNewElementsCapacity(Node* old_capacity,
ParameterMode mode = INTPTR_PARAMETERS);
+ TNode<Smi> CalculateNewElementsCapacity(TNode<Smi> old_capacity) {
+ return CAST(CalculateNewElementsCapacity(old_capacity, SMI_PARAMETERS));
+ }
+
// Tries to grow the |elements| array of given |object| to store the |key|
// or bails out if the growing gap is too big. Returns new elements.
Node* TryGrowElementsCapacity(Node* object, Node* elements, ElementsKind kind,
diff --git a/chromium/v8/src/compiler/representation-change.cc b/chromium/v8/src/compiler/representation-change.cc
index ad4c5c916c0..b141cad7736 100644
--- a/chromium/v8/src/compiler/representation-change.cc
+++ b/chromium/v8/src/compiler/representation-change.cc
@@ -586,7 +586,7 @@ Node* RepresentationChanger::GetFloat32RepresentationFor(
} else if (output_rep == MachineRepresentation::kFloat64) {
op = machine()->TruncateFloat64ToFloat32();
} else if (output_rep == MachineRepresentation::kWord64) {
- if (output_type.Is(Type::Signed32())) {
+ if (output_type.Is(cache_.kSafeInteger)) {
// int64 -> float64 -> float32
op = machine()->ChangeInt64ToFloat64();
node = jsgraph()->graph()->NewNode(op, node);
diff --git a/chromium/v8/tools/__init__.py b/chromium/v8/tools/__init__.py
new file mode 100644
index 00000000000..3841a861c83
--- /dev/null
+++ b/chromium/v8/tools/__init__.py
@@ -0,0 +1,4 @@
+#!/usr/bin/env python
+# Copyright 2018 the V8 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.
diff --git a/chromium/v8/tools/unittests/__init__.py b/chromium/v8/tools/unittests/__init__.py
new file mode 100644
index 00000000000..3841a861c83
--- /dev/null
+++ b/chromium/v8/tools/unittests/__init__.py
@@ -0,0 +1,4 @@
+#!/usr/bin/env python
+# Copyright 2018 the V8 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.
diff --git a/chromium/v8/tools/unittests/v8_presubmit_test.py b/chromium/v8/tools/unittests/v8_presubmit_test.py
new file mode 100755
index 00000000000..2c66d1891b8
--- /dev/null
+++ b/chromium/v8/tools/unittests/v8_presubmit_test.py
@@ -0,0 +1,91 @@
+#!/usr/bin/env python
+# Copyright 2018 the V8 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.
+
+import os
+import sys
+import tempfile
+import unittest
+
+# Configuring the path for the v8_presubmit module
+TOOLS_ROOT = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
+sys.path.append(TOOLS_ROOT)
+
+from v8_presubmit import FileContentsCache, CacheableSourceFileProcessor
+
+
+class FakeCachedProcessor(CacheableSourceFileProcessor):
+ def __init__(self, cache_file_path):
+ super(FakeCachedProcessor, self).__init__(
+ use_cache=True, cache_file_path=cache_file_path, file_type='.test')
+ def GetProcessorWorker(self):
+ return object
+ def GetProcessorScript(self):
+ return "echo", []
+ def DetectUnformattedFiles(_, cmd, worker, files):
+ raise NotImplementedError
+
+class FileContentsCacheTest(unittest.TestCase):
+ def setUp(self):
+ _, self.cache_file_path = tempfile.mkstemp()
+ cache = FileContentsCache(self.cache_file_path)
+ cache.Load()
+
+ def generate_file():
+ _, file_name = tempfile.mkstemp()
+ with open(file_name, "w") as f:
+ f.write(file_name)
+
+ return file_name
+
+ self.target_files = [generate_file() for _ in range(2)]
+ unchanged_files = cache.FilterUnchangedFiles(self.target_files)
+ self.assertEqual(len(unchanged_files), 2)
+ cache.Save()
+
+ def tearDown(self):
+ for file in [self.cache_file_path] + self.target_files:
+ os.remove(file)
+
+ def testCachesFiles(self):
+ cache = FileContentsCache(self.cache_file_path)
+ cache.Load()
+
+ changed_files = cache.FilterUnchangedFiles(self.target_files)
+ self.assertListEqual(changed_files, [])
+
+ modified_file = self.target_files[0]
+ with open(modified_file, "w") as f:
+ f.write("modification")
+
+ changed_files = cache.FilterUnchangedFiles(self.target_files)
+ self.assertListEqual(changed_files, [modified_file])
+
+ def testCacheableSourceFileProcessor(self):
+ class CachedProcessor(FakeCachedProcessor):
+ def DetectFilesToChange(_, files):
+ self.assertListEqual(files, [])
+ return []
+
+ cached_processor = CachedProcessor(cache_file_path=self.cache_file_path)
+ cached_processor.ProcessFiles(self.target_files)
+
+ def testCacheableSourceFileProcessorWithModifications(self):
+ modified_file = self.target_files[0]
+ with open(modified_file, "w") as f:
+ f.write("modification")
+
+ class CachedProcessor(FakeCachedProcessor):
+ def DetectFilesToChange(_, files):
+ self.assertListEqual(files, [modified_file])
+ return []
+
+ cached_processor = CachedProcessor(
+ cache_file_path=self.cache_file_path,
+ )
+ cached_processor.ProcessFiles(self.target_files)
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/chromium/v8/tools/v8_presubmit.py b/chromium/v8/tools/v8_presubmit.py
index f35bd9a2eec..22d6bf5389c 100755
--- a/chromium/v8/tools/v8_presubmit.py
+++ b/chromium/v8/tools/v8_presubmit.py
@@ -228,17 +228,98 @@ class SourceFileProcessor(object):
return result
-class CppLintProcessor(SourceFileProcessor):
+class CacheableSourceFileProcessor(SourceFileProcessor):
+ """Utility class that allows caching ProcessFiles() method calls.
+
+ In order to use it, create a ProcessFilesWithoutCaching method that returns
+ the files requiring intervention after processing the source files.
+ """
+
+ def __init__(self, use_cache, cache_file_path, file_type):
+ self.use_cache = use_cache
+ self.cache_file_path = cache_file_path
+ self.file_type = file_type
+
+ def GetProcessorWorker(self):
+ """Expected to return the worker function to run the formatter."""
+ raise NotImplementedError
+
+ def GetProcessorScript(self):
+ """Expected to return a tuple
+ (path to the format processor script, list of arguments)."""
+ raise NotImplementedError
+
+ def GetProcessorCommand(self):
+ format_processor, options = self.GetProcessorScript()
+ if not format_processor:
+ print('Could not find the formatter for % files' % self.file_type)
+ sys.exit(1)
+
+ command = [sys.executable, format_processor]
+ command.extend(options)
+
+ return command
+
+ def ProcessFiles(self, files):
+ if self.use_cache:
+ cache = FileContentsCache(self.cache_file_path)
+ cache.Load()
+ files = cache.FilterUnchangedFiles(files)
+
+ if len(files) == 0:
+ print 'No changes in %s files detected. Skipping check' % self.file_type
+ return True
+
+ files_requiring_changes = self.DetectFilesToChange(files)
+ print (
+ 'Total %s files found that require formatting: %d' %
+ (self.file_type, len(files_requiring_changes)))
+ if self.use_cache:
+ for file in files_requiring_changes:
+ cache.RemoveFile(file)
+
+ cache.Save()
+
+ return files_requiring_changes == []
+
+ def DetectFilesToChange(self, files):
+ command = self.GetProcessorCommand()
+ worker = self.GetProcessorWorker()
+
+ commands = [command + [file] for file in files]
+ count = multiprocessing.cpu_count()
+ pool = multiprocessing.Pool(count)
+ try:
+ results = pool.map_async(worker, commands).get(timeout=240)
+ except KeyboardInterrupt:
+ print "\nCaught KeyboardInterrupt, terminating workers."
+ pool.terminate()
+ pool.join()
+ sys.exit(1)
+
+ unformatted_files = []
+ for index, errors in enumerate(results):
+ if errors > 0:
+ unformatted_files.append(files[index])
+
+ return unformatted_files
+
+
+class CppLintProcessor(CacheableSourceFileProcessor):
"""
Lint files to check that they follow the google code style.
"""
+ def __init__(self, use_cache=True):
+ super(CppLintProcessor, self).__init__(
+ use_cache=use_cache, cache_file_path='.cpplint-cache', file_type='C/C++')
+
def IsRelevant(self, name):
return name.endswith('.cc') or name.endswith('.h')
def IgnoreDir(self, name):
return (super(CppLintProcessor, self).IgnoreDir(name)
- or (name == 'third_party'))
+ or (name == 'third_party'))
IGNORE_LINT = ['export-template.h', 'flag-definitions.h']
@@ -251,55 +332,30 @@ class CppLintProcessor(SourceFileProcessor):
test_dirs = ['cctest', 'common', 'fuzzer', 'inspector', 'unittests']
return dirs + [join('test', dir) for dir in test_dirs]
- def GetCpplintScript(self, prio_path):
- for path in [prio_path] + os.environ["PATH"].split(os.pathsep):
+ def GetProcessorWorker(self):
+ return CppLintWorker
+
+ def GetProcessorScript(self):
+ filters = ','.join([n for n in LINT_RULES])
+ arguments = ['--filter', filters]
+ for path in [TOOLS_PATH] + os.environ["PATH"].split(os.pathsep):
path = path.strip('"')
- cpplint = os.path.join(path, "cpplint.py")
+ cpplint = os.path.join(path, 'cpplint.py')
if os.path.isfile(cpplint):
- return cpplint
-
- return None
-
- def ProcessFiles(self, files):
- good_files_cache = FileContentsCache('.cpplint-cache')
- good_files_cache.Load()
- files = good_files_cache.FilterUnchangedFiles(files)
- if len(files) == 0:
- print 'No changes in C/C++ files detected. Skipping cpplint check.'
- return True
-
- filters = ",".join([n for n in LINT_RULES])
- cpplint = self.GetCpplintScript(TOOLS_PATH)
- if cpplint is None:
- print('Could not find cpplint.py. Make sure '
- 'depot_tools is installed and in the path.')
- sys.exit(1)
-
- command = [sys.executable, cpplint, '--filter', filters]
-
- commands = [command + [file] for file in files]
- count = multiprocessing.cpu_count()
- pool = multiprocessing.Pool(count)
- try:
- results = pool.map_async(CppLintWorker, commands).get(999999)
- except KeyboardInterrupt:
- print "\nCaught KeyboardInterrupt, terminating workers."
- sys.exit(1)
+ return cpplint, arguments
- for i in range(len(files)):
- if results[i] > 0:
- good_files_cache.RemoveFile(files[i])
+ return None, arguments
- total_errors = sum(results)
- print "Total C/C++ files found that require formatting: %d" % total_errors
- good_files_cache.Save()
- return total_errors == 0
-class TorqueFormatProcessor(SourceFileProcessor):
+class TorqueFormatProcessor(CacheableSourceFileProcessor):
"""
Check .tq files to verify they follow the Torque style guide.
"""
+ def __init__(self, use_cache=True):
+ super(TorqueFormatProcessor, self).__init__(
+ use_cache=use_cache, cache_file_path='.torquelint-cache', file_type='Torque')
+
def IsRelevant(self, name):
return name.endswith('.tq')
@@ -308,47 +364,17 @@ class TorqueFormatProcessor(SourceFileProcessor):
test_dirs = ['torque']
return dirs + [join('test', dir) for dir in test_dirs]
- def GetTorquelintScript(self):
+ def GetProcessorWorker(self):
+ return TorqueLintWorker
+
+ def GetProcessorScript(self):
torque_tools = os.path.join(TOOLS_PATH, "torque")
torque_path = os.path.join(torque_tools, "format-torque.py")
-
+ arguments = ['-l']
if os.path.isfile(torque_path):
- return torque_path
-
- return None
-
- def ProcessFiles(self, files):
- good_files_cache = FileContentsCache('.torquelint-cache')
- good_files_cache.Load()
- files = good_files_cache.FilterUnchangedFiles(files)
- if len(files) == 0:
- print 'No changes in Torque files detected. Skipping Torque lint check.'
- return True
-
- torquelint = self.GetTorquelintScript()
- if torquelint is None:
- print('Could not find format-torque.')
- sys.exit(1)
-
- command = [sys.executable, torquelint, '-l']
-
- commands = [command + [file] for file in files]
- count = multiprocessing.cpu_count()
- pool = multiprocessing.Pool(count)
- try:
- results = pool.map_async(TorqueLintWorker, commands).get()
- except KeyboardInterrupt:
- print "\nCaught KeyboardInterrupt, terminating workers."
- sys.exit(1)
-
- for i in range(len(files)):
- if results[i] > 0:
- good_files_cache.RemoveFile(files[i])
+ return torque_path, arguments
- total_errors = sum(results)
- print "Total Torque files requiring formatting: %d" % total_errors
- good_files_cache.Save()
- return total_errors == 0
+ return None, arguments
COPYRIGHT_HEADER_PATTERN = re.compile(
r'Copyright [\d-]*20[0-1][0-9] the V8 project authors. All rights reserved.')
@@ -639,6 +665,7 @@ def PyTests(workspace):
print 'Running ' + script
result &= subprocess.call(
[sys.executable, script], stdout=subprocess.PIPE) == 0
+
return result
@@ -646,6 +673,9 @@ def GetOptions():
result = optparse.OptionParser()
result.add_option('--no-lint', help="Do not run cpplint", default=False,
action="store_true")
+ result.add_option('--no-linter-cache', help="Do not cache linter results", default=False,
+ action="store_true")
+
return result
@@ -656,11 +686,13 @@ def Main():
success = True
print "Running checkdeps..."
success &= CheckDeps(workspace)
+ use_linter_cache = not options.no_linter_cache
if not options.no_lint:
print "Running C++ lint check..."
- success &= CppLintProcessor().RunOnPath(workspace)
+ success &= CppLintProcessor(use_cache=use_linter_cache).RunOnPath(workspace)
+
print "Running Torque formatting check..."
- success &= TorqueFormatProcessor().RunOnPath(workspace)
+ success &= TorqueFormatProcessor(use_cache=use_linter_cache).RunOnPath(workspace)
print "Running copyright header, trailing whitespaces and " \
"two empty lines between declarations check..."
success &= SourceProcessor().RunOnPath(workspace)